skysight-inc/HackerNews huggingface dataset:
How dynamic array access work?
In C if i declare int x[4]

Which tells me its an integer array with each array element size fixed of size 4.

So after initialization when I access x[3] : address of array +element size which is 2 * index => (x[3]=2000+2*3) Assuming 2000 is the array address

In Javascript

We have

var a=[3,"rohan",6] //Dynamically typed

Here array elements are not equally sized for eg.a[2] is a string whose element size is different than a[0] which is an integer

So how does the array access work?
I would recommend reading Why We Sleep by Matthew Walker instead. [0]

The Promise of Sleep is an okay book, but it is almost 20 years old now and it shows.

I have read both books and it is remarkable how much more we learned in the time between them.

[0]: https://www.amazon.com/Why-We-Sleep-Unlocking-Dreams/dp/1501...
Thanks a lot for the answer! It's very promising.
My wife and I were watching Wild Wild Country (events from the 80s) the other week and we commented on how skinny everyone in the cult/commune was. Image in the header here:

https://www.elitedaily.com/p/netflixs-wild-wild-country-docu...

You'd be working hard to find a cross-section of non-athletes/models in the US these days that didn't include a reasonable number of larger people.

Sugar lobbyists have a lot to answer for IMO.
The worst mass deaths under Chinese Communism occurred during the huge famine of 1959-1961. About 50 million people died who shouldn’t have died. Mass numbers of anything are hard to wrap our minds around, but essentially this was the Holocaust times 4.

I wish I could say Justice would be dispensed to the Western collaborators of totalitarian regimes, but both the Koch’s and IBM sold extensively to the Nazi’s, and only grew richer later.
What about GitKraken? I don’t think they’re large enough yet but it seems they would need to change their name.
DRY HTML or DRY CSS?
Where Does Machine Learning Fit in Real Time Communication (ML in RTC)?
First state net neutrality law took effect today, countering FCC repeal
> It’s inevitable that as you make yourself miserable, you’ll be making those around you miserable also, at least until they leave you—which will give you another reason to feel miserable.
Low fat, high carb, is actually quite unhealthy. It is a shame to hear this, with just a little practice and preparation you can learn to make fresh, tasty and healthier food in under 20 minutes every day.
I know you didn't insinuate that, but I would like to point out that there's nothing wrong with detecting test conditions, per se.

It might have safety implications (e.g. deactivating airbags so they don't fire because of implausible-on-the-road vehicle states), or even enable certain tests in the first place (perhaps by disabling traction control systems confused by vastly differing speeds per axle).

Using them in order to cheat, however, is clearly not nice at all.

Speaking as a German, and as someone who has worked in the automotive industry, I'd really like for manufacturers to be punished hard on this.

The amount of complacency and disdain for regulations on the part of the manufacturers is disappointing, and the collusion by the German government distasteful.
There's even more context about how this CEO managed the business in a reddit thread in response to those tweets as well, which includes some detailed and revealing comments from the developer:

https://www.reddit.com/r/CopperheadOS/comments/8oq1l3/cos_fu...

https://www.reddit.com/r/CopperheadOS/comments/8oq1l3/cos_fu...
Creating a technical book is pretty hard (source: I've done it, as well as many others here). You're not just writing the book, but attempting to lead the reader from a point of little/no knowledge, so each step in your narrative needs to build completely on the last. Added to that, you're attempting to write idiomatic, clean and bug-free code to go alongside the writing.

Right now, he's clocking in at 350+ pages with his co-author. A chapter would take me a week to write, basically, so that's about three months of effort already. That's before you've done review, editing, etc., so you're looking at raw material costs of about $40-50k just to bring the text together with code in a reasonable package.

Even on the $89 package, they're adding in interview videos, interactive exercises(!), and a bunch of extra chapters. I doubt that doubles the cost, but it's probably a chunk extra (unless the book revolves around "designing software for interactive exercises", that's more code they need to write). Then on the higher package, even more chapters and videos, plus technical support (which I think is nuts).

They're pitching it as a book which probably isn't helping, but I actually think that's decent value for what they're offering. Are they going to make a profit? Hopefully, but that's going to come down to how many people are interesting in what is really a technical niche topic.

A lot of content is free; good-quality content tends not to be, and I think the world could use more like this. The market will decide, I guess.
Transportation is still 92% petroleum

https://www.eia.gov/energyexplained/?page=us_energy_home

It will take some times to replace all existing vehicules by EV. So it might be a bit early to ask the question.
I assume you live in the US? The difference in what's on offer in supermarkets, restaurants or convenience stores, compared to northern Europe or even South America (halfway in between I'd say) is astounding.
> To pay them more than average?

No, to get a bigger talent pool.
Slightly offtopic, but I do miss the blog http://www.theoildrum.com/ for discussing energy issues - it had the highest quality discussions of the subject I've ever found on the internet. Is there a current replacement?
My mom and I were so fluent in Graffiti when I was in High School that the post-it notes my mom left for me when she was out would be written in it
It's only really feedback if it goes to source. If it's on here it's just whinging.
Sure you can - you can look at the manufacturer / product strings. And for standard device classes (eg mass storage or CDC ACM, aka USB serial) you can just use interface descriptors to identify them.

Would be nice if more systems used the strings embedded in the device, like eg FreeBSD does, instead of looking up PID/VID in a static table.
In a sense, yes.

It might even be a good thing to remove dead code -- what isn't there can't possibly cause trouble.

But it complicates product management: instead of a single binary and a bunch of feature flags, you now have a bunch of binary versions; and the number of permutations can get quite large quite quickly.
Green 3D-printed violin
50 Best Players Missing the 2018 World Cup
Speaking for the UK, it is certainly the case that couples put off having children until they've bought their own home, and the shameful reason for this is that renters have no security of tenure here. Unless you're in state subsided social housing you live with the permanent threat of being turfed out of your home at only two months notice, for no better reason than the landlord wants to do something else with it. Finding a new home and organizing a move is difficult and unsettling enough for a young working couple, but with children involved its on another level, not least because it could well mean a change of school, or result in siblings in different schools.
VueJS – Smart vs. Dumb components and folder structure
Yes, he’s a terrible person to try to learn from since his methods of success were so singular. I can imagine running the “Jeff Bezos playbook” but not the Steve Jobs playbook.
He said "A free app with in-app purchases to export the result for 3d printing." Do you expect him to add an "export the result for 3d printing" feature without a payment model?
An Unexpected Interaction of Features
I agree and went through similar experiences.

I will however mention for the other readers that not all modes and schools of therapy see "digging up the past" as essential, in fact I believe this is a point of contention.

Methods such as Cognitive Behavioral Theory, I believe, focus much more on "OK, but how does that influence your behavior? Should it?"
On the upside, the damage that's there remains in plain sight thanks to the guy who made the opposite of the last paragraph happen.
They could easily remove it. It bothers me that the parent comment has been downvoted so heavily—"MAGA" does have racial overtones and probably doesn't belong in a technical document. I'm sure the author meant it as a joke (especially as a European who isn't familiar with American culture), but that doesn't invalidate the criticism.
I have last name at gmail too and I can tell you, we win on misdirected mail due to people typing `firstname lastname@gmail.com`
Because of their process, diesels are also more efficient at partial loads (e.g. city driving) than petrol engines.

This gives you an efficiency advantage right off the bat.
Use simple Trigonometry to create better loaders
In the EU (which Sweden belongs to), giving hormones to dairy animals to increase milk production is illegal, so that was not part of my reasoning. In other countries milk might be less optimal then (but perhaps you get organic milk or something with fewer additives).
I'm wondering if destroying the signing keys will have legal consequences. Are signing keys considered company IP when their identity is "fused" with the main developer?

Reading online posts it seems that the community is trusting the developer, not the company behind him.
If I earnt a million a year, I wouldn't be commuting more than 5 minutes to to work. Commuting sucks.
Really cool stuff!
I was wondering, how are you solving the issues of sculpting low polygon primitives (do you dynamically subdivide or?).
This has become increasingly vivid for me since having a child.

I've only been "health conscious" for half a decade or so, and went sugarless for at least a year of that, but got off that mainly for social reasons and difficulties finding food when not at home.

But to the point: We have thus far made all her food from scratch, and would never in a million years entertain the idea of feeding her soda, cookies, or ice cream, when she's already super happy with cinnamon oatmeal with mashed apple or brown rice carrot chicken with cumin and black pepper. Because why not? That stuff is super tasty.

What's weird and really scary is realizing the effect sugar has on your own psyche. I know sugar only do bad things to my body in the long term, and yet I stuff my face with a chocolate bar for the immediate euphoria.

Stepping back and reviewing the ingrained cultural tradition of sugar becomes fascinating when we consider it only does harm, and it's extremely addictive.

If we (hyperbole, I know, or is it?) substitute heroin for it, and then discuss it like we do sugar?

"It's his/her birthday, we should celebrate it with a cake (heroin). Just this once"

"Heroin is fine in moderation, if you otherwise live healthy and eat well".

"I only use heroin sometimes, and I'm in control of it."

I mean, I guess all of those can be true, but it's keeping something really bad in your life that probably takes a heavy mental toll, rather than just avoiding it.

And I'm as guilty as anyone. And I'm sure my daughter will be exposed in time regardless of what we as parents do.

Maybe it's not as dire as I portray it, but does it have any redeeming qualities, at all?
How nice.
There are also the free shared PID/VID numbers from https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-fo.... They don’t have any licensing requirements.
How much electricity would we need to power a fictional dinosaur theme park
The ko rule in Go can get a bit more complex.

https://senseis.xmp.net/?Superko

This gif has an example of a Superko (which would likely become illegal depending on what ruleset you use): https://towardstengen.files.wordpress.com/2010/03/superkoles...

Different rulesets (Japanese, Chinese, Korean) define and handle Superko differently.
It seems like net share settlement for employee option exercise would benefit early employees considerably without really costing the issuing company much. For example, if I have options to purchase 100 shares at $1 each and current market value is $2, instead of me having to pay $100 to exercise I can pay in shares, so I instead end up with 50 shares of stock ($200 current value minus $100 to exercise, so I get net $100 in value, $100 / $2 = 50 shares).

This is pretty common in the convertible bond world. When I first learned that employees had to write a check to exercise that sounded crazy to me. I’m curious why net share settlement doesn’t seem to really exist in the startup world. Maybe due to the difficulty in determining current market price?
Embedded dev here.

Using C/C++ for embedded systems external communications feels like building a house out of matches.

Sure, there's tooling to help fire proofing things a bit, like static analysis and so on. You see, it's important to spray some fire retardant on the match house.

But wouldn't it be so much nicer to have a construction material other than matches for this purpose...
> .idea

What's the purpose of checking this stuff into version control?
Yeah and it’s one hundred percent true. If the story wasn’t “I won the lottery” but instead was “I missed out big time” that may change things significantly
For those who don't want to relinquish drinks altogether, getting a thermos/French press etc. and buying tea/coffee yourself reduces those expenses almost twenty fold over time.

Soda is best abandoned, however.
Perl's pack is not very easy to understand though. If you have a intuitive tutorial. Do share.
Sounds a lot like the D programming language.
>Japan hasnt innovated in 30 years.

Just in case, soon to hit the market (hopefully) Mazda's HCCI/SCCI new engine:

https://www.extremetech.com/extreme/253842-mazdas-2019-effic...
But what about apps? That's a major part of the reasons why Windows Phone died, developers refused to commit resources to port/develop apps to yet another mobile platform.

IIRC, Palm webOS tried to fix that by allowing developers use familiar HTML/JS-based tooling (Enyo) [0] to build apps for that platform, but the die had been cast with iOS and Android.

[0] https://en.wikipedia.org/wiki/Enyo_(software)
> The most vexing part of this is how long it took for others to notice.

This has been an open secret for years. Anyone who wanted to know, easily could.

Perhaps not the existence of "defeat devices", but open disdain for and cavalier circumvention of the rules by all manufacturers.

> Did no competitor try to legitimately meet emissions requirements

Probably.
German manufacturers openly share products for comparison with their competitors (realising they can't avoid it anyway). I think it's a safe bet that everyone knows what everyone else is doing.
Are real numbers really real?
> the petrodollar

Petrodollar hypotheses get the dollar's hegemony in international trade backwards. Petrodollars (i.e. oil producers' surplus revenues invested in U.S. dollar denominated instruments [1]) don't cause the hegemony. The United States being (a) the only advanced economy not bombed to the 19th century post-WWII and (b) the world's largest single consumer market [2] created and create international holders of U.S. dollars. (In the initial case, thanks to Bretton Woods. In the recurring case, since Americans pay with U.S. dollars.) Those holders, in turn, drive demand for dollar-denominated investments.

The interaction between these processes, international consumption by Americans and the reinvestment of international dollars, drives economies of scale in the American financial system. (It is why, until very recently, it was cheaper and faster to send U.S. dollars between two European capitals than initiate a Euro-denominated transfer.)

TL; DR Every watt the U.S. generates from solar is a watt of (a) cheap, domestic energy and (b) petroleum the U.S. has the choice to export. Cheap and plentiful energy drives economies; economies, ultimately, drive demand for their currencies.

[1] https://en.wikipedia.org/wiki/Petrocurrency

[2] https://en.wikipedia.org/wiki/List_of_largest_consumer_marke...
The simple naive way is to indirect through a pointer, so your array elements would each be say 8 bytes pointing to things of various types.

In practice you can play a lot of tricks to avoid the overhead.

One example would be NaN-tagging. Another would be to speculatively store the array elements "unboxed" as long as they all have the same type and fallback to pointers when the array actually becomes heterogeneous.

I'm not up to date on what today's javascript JIT do for storage optimizations but when you add in sparse arrays etc, I'm sure it's quite involved.
If you don’t think reading books is valuable enough to do when you aren’t commuting, is it really valuable to you? Or are you just doing the best you can to salvage a shitty situation?

(I audiobook when running so I’m no better)
Pulling the rug out from under an internet protocol
Awesome Talks
Quote: "I think it's just not a very human mindset. I've talked to natural scientists and social scientists alike. All of them want their research to succeed, they all want to get their PhDs, get good results for their postdocs, get publications going etc."

And that is one of the major problems. Hubris and arrogance and thus bad requirements and expectations and thus cheating and lies and half-truths as normal behavior.

Also in economics: http://bilbo.economicoutlook.net/blog/?p=39198

Quote: "Further, in my field (economics) one can never really get a publication if the research only produces ‘negative’ results. That is, the researcher fails to find anything. I believe this is a common problem in other disciplines as well."
I fail to see that as highly positive though - with that attitude, I would stop exercising and invest all of my savings into cake and pizza. These things would make me happy each day, but miserable each month.
Archiving your website in the Wayback Machine
I did this back in 1995. I can count on one hand the times I've been sick since then, and every single time has been because I drank too much coffee, not enough water and didn't sleep properly or at all for days.

I do eat organic sugar and honey though, but because I don't eat any white/processed sugar (nor corn syrup) this automatically cuts out 95% (guess) of the bad food I would normally have been eating.

There's no one solution for "wellbeing" of course, but this sure is a big thing to change.
I think it depends on how you take it; some of cognitive behavioural therapy is about changing how you behave physically in order to achieve changes of your mood, or break you out of unhealthy mental habits.
Fail fast in development. Have fallback code for deployment or you will be in deep trouble.

And as all solutions, sometimes the cost is too much for the immutability.

Writing tests is a bit glib...
Hmm. Doubt the accuracy.

I got “senior” 170k base with a much higher number in the 200-300k range, but I haven’t even graduated uni yet.

Also, I don’t write Ruby (why is this so ruby-heavy?) so I guessed all those.
AgileWorks Ltd. is looking for a full-time SENIOR JAVA DEVELOPER

http://www.agileworks.eu/et/too/

LOCATION: Tallinn, Estonia

A GOOD CANDIDATE..

– knows agile methodologies

– has a previous work experience as a Java developer (at least 2 years)

– is interested in learning new languages (C#, F#, Kotlin, Scala, Clojure, Python)

– knows how to use Git or other version managment system

– has a higher education in informatics

– speaks Estonian and English because our clients are mostly Estonians

WE ARE HAPPY IF YOU..

- know SQL, NoSQL; Azure/Amazon cloud services; ORM; Elasticsearch; CQRS and have an excellent ability to communicate

WE ARE OFFERING

- competitive salary from 1918 - 3240 euros a month (gross salary); opportunity to create quality software; young and supportive team; software development conferences and courses; modern office with a terrace near Kalamaja; sport compensation; fun and motivating events with colleagues

If you think this job is for you, please send your application info@agileworks.eu
Ok, I'm not talking about sandwiches or making your own bread, but "proper" meals, like aspargus-risotto, (store-bought-)pasta with homemade-sugo, cooked beef with homemade-gravy, vegetables and dumplings as a side, diverse soups made from fresh vegetables/beans/meat, vegetable casserole, mixed salad, grilled fish, curry with rice etc. (Just a selection of the stuff we had in the past days). Guess as a european I'm still naive about life in the USA :-)
Rigorous configuration management of data and metadata mostly. (Primary records kept as text in a version control system, with a copy loaded into a DB for searching).
What baddox's comment (about only the difference mattering) misses is this: what if you need another bedroom?

In other words, it's ignoring the fact that houses come in many sizes. Anyone spending 75% of income on housing has an enormous incentive to choose a slightly smaller apartment. And is completely unable to contemplate expanding slightly. What if you want two kids... and the second one turns out to be twins? Can their grandmother come to stay for the summer & help out?

If you're spending 20% of income on housing, then you have a lot more room to solve these problems. (And, as others pointed out, to get a different job which pays slightly less, etc.)
Maybe it that people want to do different things with their lives and have more choices available.

I even see higher divorce rates as a positive thing in some ways. 50 years ago it may not have been a valid choice for a woman to leave an abusive husband and set up on her own. Now they have a lot more choice in that regard.
How Does the Computer Boot?
>>no ketchup, no canned fish, no juices, no syrupy breads, etc

One of these things don't seem to be like the others. Is there typically added sugar in canned fish? My go to is canned tuna, but the nutritional label checks out to me.
Consider replacing anything that has sugar in it, with an organic sugar alternative. Trader Joes, Whole Food, Costco, local organic store/coop have many alternatives, and many of them taste better than the popular brands.
I've noticed this too.

The expectation is for sleep to affect productivity, but I don't find that to be the case. Instead, I find that it has a lot of impact on my social and emotional well being rather than my productivity.

Productivity doesn't lead to many positive states - just exhaustion. Being well rested on the other hand has led to lots of positive mental conditions - surplus energy after work, dramatic decrease of negative thoughts, positive attitude towards new things, willingness for social activities, more boldness and confidence, and all these things snowball off of each other.
The problem with sugar is that there's no daily recommended value... because that value would be 0.

A "safe value" for an adult would probably be up to 40g. A can of soda has exactly that amount.

Now imagine a kid eating cereal, snacks, then soda... can probably end up having 160g of sugar in a day, or about 38 teaspoons.
Do you have any book recommendations or resources for eating healthier?
Wow! This gave me a whole new perspective on the Uruguayan coast, it's so cool to know that what I am seeing latched off the Antarctic peninsula!!! Specially since it so recognisable. Just a nice piece of trivia, but awesome for me.
Nice
However the link to tutorial is broken
(Also, boys, that is time to update to angular 2+ :) )
Well, the difference between the stack and the heap is quite rudimentary; to be fair.