Top Poster of the Day:
Sasanka_of_Gauda
Current Registered Users: 26,836
tech/science swag.
Guidelines:
What to Submit
On-Topic: Anything that good slackers would find interesting. That includes more than /g/ memes and slacking off. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual laziness.
Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably lame.
Help keep this hole healthy by keeping drama and non-drama balanced. If you see too much drama, post something that isn't dramatic. If there isn't enough drama and this hole has become too boring, POST DRAMA!
In Submissions
Please do things to make titles stand out, like using uppercase or exclamation points, or saying how great an article is. It should be explicit in submitting something that you think it's important.
Please don't submit the original source. If the article is behind a paywall, just post the text. If a video is behind a paywall, post a magnet link. Fuck journos.
Please don't ruin the hole with chudposts. It isn't funny and doesn't belong here. THEY WILL BE MOVED TO /H/CHUDRAMA
If the title includes the name of the site, please leave that in, because our users are too stupid to know the difference between a url and a search query.
If you submit a video or pdf, please don't warn us by appending [video] or [pdf] to the title. That would be r-slurred. We're not using text-based browsers. We know what videos and pdfs are.
Make sure the title contains a gratuitous number or number + adjective. Good clickbait titles are like "Top 10 Ways to do X" or "Don't do these 4 things if you want X"
Otherwise editorialize. Please don't use the original title, unless it is gay or r-slurred, or you're shits all fucked up.
If you're going to post old news (at least 1 year old), please flair it so we can mock you for living under a rock, or don't and we'll mock you anyway.
Please don't post on SN to ask or tell us something. Send it to [email protected] instead.
If your post doesn't get enough traction, try to delete and repost it.
Please don't use SN primarily for promotion. It's ok to post your own stuff occasionally, but the primary use of the site should be for curiosity. If you want to astroturf or advertise, post on news.ycombinator.com instead.
Please solicit upvotes, comments, and submissions. Users are stupid and need to reminded to vote and interact. Thanks for the gold, kind stranger, upvotes to the left.
In Comments
Be snarky. Don't be kind. Have fun banter; don't be a dork. Please don't use big words like "fulminate". Please sneed at the rest of the community.
Comments should get more enlightened and centrist, not less, as a topic gets more divisive.
If disagreeing, please reply to the argument and call them names. "1 + 1 is 2, not 3" can be improved to "1 + 1 is 3, not 2, mathfaggot"
Please respond to the weakest plausible strawman of what someone says, not a stronger one that's harder to make fun of. Assume that they are bad faith actors.
Eschew jailbait. Paedophiles will be thrown in a wood chipper, as pertained by sitewide rules.
Please post shallow dismissals, especially of other people's work. All press is good press.
Please use Slacker News for political or ideological battle. It tramples weak ideologies.
Please comment on whether someone read an article. If you don't read the article, you are a cute twink.
Please pick the most provocative thing in an article or post to complain about in the thread. Don't nitpick stupid crap.
Please don't be an unfunny chud. Nobody cares about your opinion of X Unrelated Topic in Y Unrelated Thread. If you're the type of loser that belongs on /h/chudrama, we may exile you.
Sockpuppet accounts are encouraged, but please don't farm dramakarma.
Please use uppercase for emphasis.
Please post deranged conspiracy theories about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email [email protected] and dang will add you to their spam list.
Please don't complain that a submission is inappropriate. If a story is spam or off-topic, report it and our moderators will probably do nothing about it. Feed egregious comments by replying instead of flagging them like a pussy. Remember: If you flag, you're a cute twink.
Please don't complain about tangential annoyancesβthings like article or website formats, name collisions, or back-button breakage. That's too boring, even for HN users.
Please seethe about how your posts don't get enough upvotes.
Please don't post comments saying that rdrama is turning into ruqqus. It's a nazi dogwhistle, as old as the hills.
Miscellaneous:
We reserve the right to exile you for whatever reason we want, even for no reason at all! We also reserve the right to change the guidelines at any time, so be sure to real them at least once a month. We also reserve the right to ignore enforcement of the guidelines at the discretion of the janitorial staff. Be funny, or at least compelling, and pretty much anything legal is welcome provided it's on-topic, and even then.
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
/h/slackernews LOG /h/slackernews MODS /h/slackernews EXILEES /h/slackernews FOLLOWERS /h/slackernews BLOCKERS
Jump in the discussion.
No email address required.
Some things:
1. In JS, the bracket syntax is just an alternative way of accessing a property.
something.prop
is the same assomething['prop']
, but JS parsing rules don't allow you to use the dot syntax with numbers (so you need to use brackets).2. All keys in JS are strings. If you try to index an object (arrays are objects) with a number, JS will first convert that to a string.
3. Arrays in JS are known as "exotic objects" and have special behavior -- if you try to set an own property (that is a property which belongs to that object and not its prototype) which also is an integer, it will set that property and then update the length value.
4. This special handling doesn't apply because 0.5 isn't an integer. You've just added the property
'0.5'
to the object. In effect you have created something like the following:You could have called your additional property
boobies
and it would have the same effect, as long as it's not an integer when converted to a string and then converted back into a number.Jump in the discussion.
No email address required.
K
Jump in the discussion.
No email address required.
More options
Context
K
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Most popular language in the world somehow.
Jump in the discussion.
No email address required.
It's not rocket science. It's the only thing you can run in a browser, browsers are where you do 70% of computing in 2023.
Web Assembly may change this with time, but JS is here to stay.
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
No shit, what's baffling is that it wasn't replaced 20 years ago.
Jump in the discussion.
No email address required.
Replace it with what? Java applets were a security nightmare, so was Flash - ActiveX was dogshit too.
Completely ditching JS meant sites would no longer function.
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
They managed to get rid of flash and java applets. You bite the pillow and get it done.
Jump in the discussion.
No email address required.
More options
Context
Flash was amazing and we should have double and tripled down on it
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Webassembly is coming I guess
No DOM manipulation yet doe
Jump in the discussion.
No email address required.
More options
Context
More options
Context
There's always WebAssembly.
Jump in the discussion.
No email address required.
yes I mentioned that.
I think we need Web Assembly GC on all browsers for best support of all languages (WebKit will lag behind as usual) but that's shipping in Chrome and Fx nightly.
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
js is great. It's not going to hold your peepee but it's a lot more intuitive than people like to pretend.
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
Yeah I wouldn't trust anything I say.
Except for that.
And that.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
get this hothead outta here
Jump in the discussion.
No email address required.
More options
Context
It's not even strongly typed
Jump in the discussion.
No email address required.
STRONGLY
TYPED
holy shit lol
Jump in the discussion.
No email address required.
Sorry I only work in languages where a good portion of my logic can be handled by the type system, imagine working in a language where you need to run your code to even know if it might work.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
Good proof that most programmers are legitimately r-slurred.
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
Oh nice, we got a real life cowboy here who never makes a typo and type safety just slows him down.
Go back to Brokeback Mountain.
Jump in the discussion.
No email address required.
More options
Context
If I want to put an element between the one at index zero and the one at index 1, 0.5 is the obvious place to put it.
Jump in the discussion.
No email address required.
There are an uncountably infinite number of slots between 0.0 and 1.0, so it's basically free memory
Jump in the discussion.
No email address required.
More options
Context
Where else would I put it? Ordering is a post-facto judgement anyways. Index them all and let Allah sort them out
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
you start counting from 0
items.length = 0, 1, 2, 3 = 3
Jump in the discussion.
No email address required.
More options
Context
Here's the thing. You assigned a property called
'0.5'
to an object that happens to be an array, then asked for the count, which is 3. If you want to update an array like you said they're not the same thing. You can do the same logic with a function object, it's valid.Jump in the discussion.
No email address required.
You shouldn't be allowed to do that.
Jump in the discussion.
No email address required.
coulda shoulda woulda
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
arrays are objects you big dumb doofus
Jump in the discussion.
No email address required.
More options
Context
You're mad that arrays can have metadata, b-word? What are fricking you, a fricking baby, b-word?
Jump in the discussion.
No email address required.
no, I just like dramacoin
Jump in the discussion.
No email address required.
More options
Context
More options
Context
JavaScript is like a language where logic was patched in later.
Jump in the discussion.
No email address required.
More options
Context
i hate this so much
Jump in the discussion.
No email address required.
More options
Context
Lmao
Jump in the discussion.
No email address required.
untypedcels get the rope when they die and god sees what they've done
Jump in the discussion.
No email address required.
I work in corporate development, coding in heck is going to be a breeze
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
It's common for the victims of abuse to make apologies and excuses for their abuser
Jump in the discussion.
No email address required.
Where am I supposed to live? Grief, anger? Denial is way better frick you
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
ITT: Highly regarded JScels explain why this is technically possible as if there was a point to this thread other than laughing at their r-slurred abortion of a "language".
Jump in the discussion.
No email address required.
More options
Context
Javascript won't hold your hand you dumb little baby b-word. How about you put on your thinking cap, pull up your big boy pants, and actually learn how to code, hm?
Jump in the discussion.
No email address required.
Favorite language of young girls like @HardIsLife. Front end development is definitely way more masculine than aerospace, finance, manufacturing, logistics.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
!slots100
Jump in the discussion.
No email address required.
More options
Context
I don't want to meet the person too stupid to figure out statically typed programming languages, but that is somehow smart enough to jump through all the hoops created by dynamic typing.
Jump in the discussion.
No email address required.
More options
Context
I love JavaScript so much then one day I tried Typescript and it was like that time I discovered what a prostate orgasm was.
Jump in the discussion.
No email address required.
so that was the fricking day you became a fricking CUTE TWINK, b-word?
Jump in the discussion.
No email address required.
More options
Context
More options
Context
You're treating it as an array list and an object. this is your fault.
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
More options
Context