skysight-inc/HackerNews huggingface dataset:
If he had just said what you quoted he would be wrong in the general case.

He actually said it is all those things in comparison to doing fixed allocation. The reason that is relevant is the kernel stack is so small you can only use a VLA when you know in advance the upper bound on the size is small, but if it's small you may as well use the fixed upper bound, and if you do that it is always faster, smaller and less fragile than using a VLA.

He's wrong in the general case, because user land C programmers will replace a VLA with:

if (!(array = malloc(n * sizeof(array[0]))) fatal("I'm out of memory");

which compared to the VLA generates more code and is slower. In both the VLA and malloc() case if you run out of memory the program will die nice and deterministically (unlike the kernel), but in the malloc() case that will only happen if you remember to do the check whereas in the VLA case the compiler ensures it always happens.
Of course it doesn't speed up your own time, since you have perfect information about your own hashpower. But it does tell you information about the total hashpower that's online, statistically.

I'll give an extreme example to make this clearer. Suppose 10X hashpower just came online an hour ago. It's quite likely that ~60 blocks have been found in the last hour, assuming the difficulty adjustment hasn't happened since. Seeing this, one could deduce that hashpower went up by ~10 and that the expected time till next block is roughly 1 minute instead of 10.

Now, in most cases hashpower doesn't change that drastically but it remains true that recent block times give you more than 0 information about hashpower and therefore about the expectation for future block times.
> no room for manoeuvre left

no room for manoeuvre within the current system. So we'll have to change the system. Unfortunately, I have not yet seen dissent proposals of what the new system should look like (I don't consider crypto a feasible alternative). Nevertheless, I am optimistic.
Thanks for your answer, I see that cmake is not as cumbersome as I thought.

> Also, you may have libpng.so but not the headers.

Then how on earth are you supposed to compile it? You write the definitions verbatim on your code?

> It won't work as is on OS X because you have to add -L/usr/local/lib.

For that case it is better to not mess with compiler options and set up the compiling environment so that -lpng works, e.g. by setting LIBRARY_PATH=/usr/local/lib, and similarly for C_INCLUDE_PATH. These variables are recognized by all unix linkers and compilers that I care about.

Of course, this attitude may not be appropriate for everyone. Yet, I am in the happy position to be able to say say "this program requires gcc, clang, tcc or icc to be compiled, otherwise, please edit the makefile to suit your needs". Are there really other C compilers around? (notice that visual studio is not a C compiler, and cannot compile modern C code, so it does not enter into the discussion if you are a C programmer).
Some compilers turn large switches into lookup tables. Using side effects like this however, makes the compiler shy away from this optimisation, and compile it literally. So it's probably not a good idea anymore.
Ask HN: How to start contributing to open source projects?
I would like to know how to start in open source. How do I start collaboration with other developers and programmers in the open source ecosystem?
Mozilla/libdweb – experimental WebExtensions APIs for dweb protocols
A Dozen Things I’ve Learned from Nassim Taleb about Optionality/Investing
http://opml.sharjeelsayed.com
Indeed. It may be legally wrong, but what is the risk that they will actually sue you?
Careful, this might only apply to professors, not the rest of the staff.
It is the same in the UK.
You don't own any of the code made for university assignments.
I hope this day never arrives for me... In any case, if I ever had to compile something for windows I would rather install cygwin and a posix toolchain than cmake and visual studio.
You're taking the exception (people buying several houses and renting them out) and just declaring that it applies across the board. In many cases it wasn't like this at all - just families who had been duped into thinking they could afford something they couldn't. Sure you could point the finger and say they could have pored over every clause in their mortgage contract and produced their own models for what could happen to their repayments under various circumstances, but why would they? They had no idea whoever "sold" them the mortgage was acting in bad faith. It's only now we know that it was all a sham and that you shouldn't trust these guys as far as you can throw them.

The idea that the financial crisis was brought on by some greedy underclass with ideas above their station is a myth that the banks have been pushing ... and it seems a few HNers have just bought it hook, line and sinker.
Only time i've come to hate code review was when my counterpart (reviewer or the author) has been overly pedantic with no hint of any empathy in hir writing. I do not know was it because of inherent insecurity or no previous experience writing in more friendly manner but boy oh boy i was boiling inside arguing about useless things. The socially awkward seem to be in high numbers amongst programmers which makes these kind of ordeals a bit of agony at times.
> If you check the current proposals (http://data.consilium.europa.eu/doc/document/ST-12513-2018-I...) you will find (page 93) that the Council inserted a specific exemption for wikipedia and open source code.

Specifically, it says

> The definition does not include services whose main purpose is not to provide access to copyright protected content with the purpose of obtaining profit from this activity. [...] Nor does this definition cover websites which store and provide access to content for non-for-profit purposes, such as online encyclopaedias, scientific or educational repositories or open source software developing platforms which do not store and give access to content for profit making purposes.
Honestly? I think IBM isn’t as relevant as they’d like to be, so they’re buying a Nike. They haven’t thought about the details, or worked out the long term. It could still go either way, but RH will chamge some over time. The real problem will probably be the perception, largely thanks to Oracle and it’s behavior with Sun. Does make you wonder if open source is a sustainable business model in the ultra-long-term.
I think the author and many folks here have an unhelpful understanding of code reviews.

I suggest code reviews' primary purpose should not be to catch bugs or trivial style issues; automated tests and linters exist for those purposes.

Instead, code reviews should be primarily thought of as "human comprehensibility tests".

When we write code, we've may have spent a significant amount of time thinking about the problem. This puts us in a bad position to gauge how readily someone in the future can reason about our code in order to fix or modify it safely and easily. Code reviews are a mechanism for showing empathy to our future selves, which accumulates over time into a much more pleasant coding environment.

Relatedly, comments on a PR are ephemeral. A rule of thumb I use: if a reviewer asks a reasonable question -- something someone in the future might wonder about when I'm no longer around, I answer it by first improving the code.
I get the sentiment. I'm currently in a small startup and not doing any code reviews as such. That's probably not ideal because I know I make mistakes.

Last year I was on a big project in a senior role and doing and receiving lots of code reviews. There's a whole etiquette around these things that you have to appreciate. First off, I got lots of feedback that was valuable.

My view with code reviews is that they should be timely and appropriate in scope. Reviewers should have some time to review but not forever. I tend to do them early in the morning or before I leave but I'm not likely to interrupt my workflow for them; unless I'm asked to do so. Real time is not a reasonable expectation. But days delay is also not reasonable. The smaller the pull request, the less time is acceptable. The bigger the change, the longer you allow for reviews.

Also, the bigger the PR, the higher the workload for reviewers. Keep your PRs small and create lots of them instead of dumping lots of big changes in one PR.

It also helps to classify review comments as blocking or not blocking. A valid outcome can be to file a follow up ticket for another change. Yes, it would be nice to refactor this bit of code but given that it was a two line code change that got the job done, maybe right now that is good enough. My view is that if CI tests pass and the code is better than before it was changed in some meaningful way, it should always be OK to merge.

Finally, sometimes there's an asymmetric relation with the reviewer and reviewee in terms of seniority. You can use this as a didactic tool to educate juniors. But it is also an opportunity to point out they did well; which I'd argue is just as important. Likewise, you have to place comments from juniors in context as well. They might feel a little intimidated commenting on your code and if they mean well, it's important to give them feedback on their comments. IMHO it is important that people speak up and feel safe to do so. A simple "You are right, I will fix this. Thanks for pointing that out." makes them feel good.
Hi, I want to introduce my newest tool - Reshape.XL. Simple add-in for data wrangling in Excel. Tool was strongly inspired by dplyr/tidyr packages in R. Add-in does not require programming and is used through the visual interface. Complicated data processing can be done in few clicks.
And people wonder why the brits voted Brexit.
I'll take phone conversations to email (including a quick recap of the conversation) for precisely this reason. A searchable record of business comms can be invaluable.
A PhD in STEM, of course.
There are two possible outcomes from Article 11. Either it will backfire and large Internet networks like Google or Facebook will start removing links to news sites which will have the opposite result from what the latter where hopping when they were lobbying for a new copyright law, or it will kill the web as we know it at least in Europe. I'd put my money on the first scenario.
Installed WordPress? Here Are Things to Do Next
No, I would never downvote for opinions expressed.

But I certainly downvote ludicrous and dishonest statements like Visa consumes more energy than bitcoin and here's why.

While theoritcally true here's the thing:

While one bitcoin transaction consumes 1'005 kWh of energy 100'000 visa transactions require 169 kWh.[1]

Trying to frame that in a way that Visa is more expensive than Bitcoin, energy wise, is a deeply dishonest sleight of hand, which absolutely deserves to be downvoted into oblivion.

[1] https://www.statista.com/statistics/881541/bitcoin-energy-co...
You can have as many co-founders as you want but they will never ever know more than your customers.
> debt is generally dischargeable

How stressful is the process of discharging debt and what is the difference in suicide rate between baseline and those going through this process?
Exactly. I have met plenty of PhDs that have switched fields from Physics to biology for example.
If you are punishing one organization for bad behavior 1) in secret and 2) without expressly breaking any written rules (the article says they broke "unwritten rules") then this is going beyond enforcement of regulatory oversight.

I dont disagree with the end result, I disagree with the method.

Also, you may disagree, but I dont believe you honestly dont understand what I am saying.
So what is the currently "best compiler" for D? Is it DMD or GCC or...?
Hacked British Airways Customers' Number Is Increasing
> a bank can be quite happy to give you a loan you don't have a high chance of paying back

This is only true under assumption that house prices won't decline.
Ok fair enough! I didn't know that, it was just the nearest park to Moscone so I assumed this is what public parks look like in downtown SF.
I read that and it seems wrong. The question asked "what fraction of the pop is female" but his argument is that 3 families of 4 girls and 1 family of 12 boys make the fraction of girls in the average family 75% (the average of 100% x3 and 0% x1) which is non-sensical to me.

>E[X]/E[Y] = E[X/Y] is not a valid identity.

is completely irrelevant here because it is being used to point out that a non-answer is wrong.
I help maintain a Chef recipe that installs both - it's quite feasible but not for the casual user.

https://github.com/IshentRas/cookbook-openshift3
Same here. I'm a HPC admin. We carefully avoid vendor lock-in because it gets too expensive too easily.

Performance is king, and we don't buy into the kind of sales bullshit that IBM is famous for.

Sadly, we just standardised on CentOS 7 for our new cluster and I am nervous about its future considering IBM involvement now.
Are they trying to stay in Physics? I know ex-physicists who have switched to biology of programming.
I started using DDG and Firefox after Chrome v69. I couldn't always find what I needed with DDG so I use g! when the search doesn't cut it (~20% of the time) but for the other 80% it's great. I've loved some unique features like the stack overflow first answer integration.I also noticed a big increase in Google advertising recently. Ads in the Gmail app and new types of ads--shopping ads below the YouTube video above the description and movie poster type ads on the right panel of some movie trailers. I bet their ad revenue in the next quarter is going to increase significantly. Is there a new person in charge or new decisions in place to serve more ads?
(sorry about the Google search heavy comment but DDG revenue generation got me thinking about Google revenue)
The real problem with code reviews is when the reviewer isn't good. If they pick on trivia or make you redesign unnecessarily or are unpleasant or too busy its a problem.
In an urban area, there's two related costs; money and time. Depending on where you're trying to go and how to get there it can be a lot. Not everybody can afford the time to go out, and throw in parking a car in there and you can easily waste way too much time trying to get food. And that's assuming you can even find free parking.
That was in 2015 but they completed the IOTA IASA since and that _should_ mean it's a safe airline.
I am looking for a way to generate photos of me after plastic surgery.

The AI should generate a face which will be most beautiful and trusted in all cultures.

It will be using my present face and morph things from there according to the limitations.

Using least incisions in least risky areas of face.

After that we get a surgeon to do perform plastic surgery as per this AI.

I am looking for ideas on how to accomplish it.
Yeah, CMake and autotools solve different problems than make. I'm definitely not a fan of either one but if I need to really distribute and compile something on more than one OS there isn't much of a choice.

The posted makefile example fails right away on multiple platforms since headers are often in somewhere else than in /usr/include directly, for example in Debian the right (atm) path would be /usr/include/libpng16 and Makefile does not handle that.
Yeah but how many people are coming from Copenhagen vs e.g. LA or Miami[1]? Let alone any large Latin American or Asian city. But maybe that's just the HN demographics.

[1] I haven't visited Miami in a long time but last I went it was far seedier and grimier than SF, despite lots of rain.
Parts of this are in other comments, but I find a couple things help code reviews enormously to be more efficient.

1) Automatic code formatters/linters before the code gets to review. When everybody knows there's a formatter, reviewers can spend less time looking for formatting issues. Generally, people are more inclined to take a quick look at the code then too, because they know their focusing on "just" the logic, which helps with getting a review sooner.

2) Smaller sets of changes up for review. Yes, this might mean more code reviews overall and more process, but it's way easier to catch a bug in a < 100 line change than in a 1000+ line change. This also means keeping the contents of the review as focused as possible. If you want to refactor some major chunk of code because it makes the actual thing you're trying to do easier, go for it, but do it in a first code review and separate the logical changes. This goes to both reviews being more straightforward for the reviewer to get through and them wanting to do it in the first place. I'm way more likely to avoid a massive 30 changed files code review than a quick 5 line change, because I need way less focus to review the latter.

3) (this one might be controversial) Early code reviews where appropriate. If you're making a change that's more likely to be totally rejected, get it into code review as soon as the basic structure and logic is in place and ask somebody to review it as quickly as possible. This is before tests are ready and every todo is completed or whatever else. The review should be quick and dirty, but at least that way you know if you should be proceeding with your current path at all or change course. Again, this means more time spent reviewing, but it's a lot better than getting a review after a week saying what you just wrote has already been done, or it totally misses goal, or it has some critical issue, or whatever. This helps a lot with what to do while you're waiting for feedback too. If you've got this type of code review up then you can keep working on the details while you're waiting on feedback. If your code review doesn't fall into this category, you're probably relatively safe to start working on the next thing, because at most you'll need to make some small changes to what you're working on, not throw it out altogether.

4) Making sure code review is considered a priority on the team. That includes the team lead prioritizing code reviews and encouraging others to prioritize code reviews. If the code doesn't get reviewed, it doesn't get shipped, so it's ultimately more important than writing new code.
I think the point is to get people interested in more serious tools, not to prevent people from using them. Crayons are great for getting kids to draw. Doesn't mean a professional artist would use them (well, now that I think about it I'm sure there's at least a sculpture or two with crayons, but you get my point).
I generally agree. I'd like the same search to return the same results. But I bet there are things I'd be willing for it to be different. I can only think of 'food near me' though
LDC LLVM D compiler, GDC is second, DMD is a reference implementation that doesn't win benchmarks.
I think the problem is more about workflow than code review per se. I have previously complained about the exact same things as this article. If you factor in your CI pipeline as well it could be hours from writing a patch until its merged and during that time you are in practice blocked from continuing to build stuff on top of your previous commit. Because of this high friction you wont bother to rename that variable or fix that whitespace because its not worth the time.

Instead I thought it would help to make code reviews optional. It is dangerous and I wouldnt recommend it for everyone and it only works if you have a CI pipeline in place of good quality. What you do is that you allow people to push directly to master, then you have your CI system continously testing all the latest commits and only if something breaks will it report it back and then the person who wrote that commit needs to fix it. I have never tried this in a real working environment but I think it would decrease friction a lot and just be slightly worse in quality. Also instead of pushing to master you could have a staging area that automatically pushes to master if it passed the tests. That might even be better actually.
Either:

- try to discuss issues on the bug trackers (or IRC), propose a solution, then send a patch/PR.

- find an itch on the project and scratch it. I did that for grml-etc-core [0], and helped port some advanced functionality to *BSD because I found it cool, but it only worked well enough on Linux. I also add some specific info in documentation when needed [1]

Don't work alone on a task before pushing a patch to the devs, make sure someone's aware of your work.

[0] https://github.com/grml/grml-etc-core/commits?author=moviuro

[1] https://github.com/nextcloud/documentation/commit/c40a80a236...
Start a cloud service, provision a bunch of VMS and let HNers rent them for electricity cost, and they can decide how best to put them to use.
You still need a resolution, though. (1) conflict (2) either conflict is solved or it is definitely unsolved.
Protect it from whom? Family? Casual thieves? Hackers? Corporations? Governments?
I echo most of these sentiments, but it might be possible to solve it once and for all with an approach similar to Jane Street's Iron. https://blog.janestreet.com/ironing-out-your-development-sty...
This was modeled on early Fortran where all local variables were static and it was trivial to implement persistent state machines.
My CSS-foo is fairly weak; what problems would em cause such that they disallow it in the code base?
it was just an example, you can choose another if you think it's more appropriate, my point is that this idiotic censorship has no place in search

if it has something to show me regarding my search (and it certainly does), it must
Namecheap offers free whois guard. So use that.

Or burner phone and po box address for the whois.
Many people looking for help aren't up to asking an SO style question.
Myntra Engineering
Continued from - https://myntra.github.io/
Show HN: React-smart-key – Pass anything as key without re-renders
On the one hand I get where you’re coming from, on the other hand I definitely broke our submit tracking by randomly inserting a space into a string in a commit I made months ago and my coworker just noticed it last week. Sometimes it’s nice just to have another pair of eyes glance over your diff to pick out obvious mistakes.
It's also incredibly important to note that Bitcoin (and really all current cryptocurrency implementations) are still very much in their early stages, like a child intuitively understanding the spatial dimensions of the world by bumping into furniture.

The environment probably needs more rigorous and academic consideration in order to legitimise it (if for no other reason than that it does contribute to comp sci theory at least).

I also do not think that Satoshi Nakamoto intended for his technology to be the last say in the crypto space. The implementation was given to the world to iterate on and improve the tech (just like every other tech ever). Environmental impact of mining, inefficiency, scalability etc. should all be considered candidates for improvement as opposed to armchair criticism alone.
I'm an IBMer and the current rule is you can work on OS projects in your own time as long as it isn't to the detriment of IBM's projects.
Yikes! Demanding a bug fix also remediate unrelated, extant style violations is a good way to ensure nothing improves.
Ask HN: Debian as alternative to RHEL/CentOS/Fedora what would you miss?
In light of IBM's involvement and the price tag on RH. The days of IBM enterprise Linux with a hefty price tag and crippled community editions is not that far.

As a HPC admin, we have been standardising on CentOS for a good while and are nervous about this development. Would Debian be the savior and become the beacon of "Open Linux"? What would you miss or gain by moving to the Debian world?