skysight-inc/HackerNews huggingface dataset:
EDIT: On second thought you basically answered my question in the last paragraph of your reply, I'm keeping it up in case you want to confirm my understanding, but the way I read it, the 15 % speed up comes from the fact that indeed CPU processing (the regexes) was comparable to the file reading in speed and breaking up the bits to individual core caches is what gives way for the speed up, memory is fast enough for this to be possible.

I don't understand the I/O part of the whole deal. AFAIK you can't read multiple files at once off the drive, so are the files read sequentially to memory and then searched in parallel in memory? Does memory allow you to read multiple places at once, even with multiple threads? Surely the files are too large for the processor caches to be of any effect. So if you'd entertain my curiosity a bit more, is what's happening the fact that multiple files are cached in memory and memory is so fast that loading bits of the files to the processor cache takes less time than regexing those bits, moving the balance of this process to the CPU-bound side? Is the actual parallelism in the fact that multiple cores can search their individual caches at the same time and loading those caches from the RAM is fast enough to not become a bottleneck? Sorry for possibly amateurish question, I've never dug deep enough when it comes to parallelism to understand this, but I spent a good amount of time thinking about parallelising I/O stuff and came to the conclusion that I/O must be magnitudes slower and thus always is a bottleneck and any sort of I/O-bound problem (which file search surely is) must be non-parallelizable and instead can only be sped up by keeping indexes the way some OS's do.
Doesn't seem to be working for me, all I see is a spinner...
MLton comes within a factor of 1.5 or 2 of C and C++'s runtime speed, at the price of requiring whole-program compilation and having long compilation times. (Not that C++'s compilation times are blazing fast either.) The implementation of a single algorithm is hardly ever big enough a project for long compilation times to become a serious problem, so this seems like an acceptable tradeoff to me.
The issue being that most customers won't agree using tools that aren't stable and having libraries that keep on depending on nightly doesn't bring any confidence to those businesses.
Starbot – Get any number of fake stars on your GitHub repository
How does it compare to helm-git-grep / helm-ag ?
Some of the escalators are very long and very slow, you can save a couple minutes, combined with less congestion at the ticket gates (because you just beat most of the people flooding the station from your train)
As someone whos' written almost no C in over a decade, and read minimal C in that time, I would say strlen1 is clearest because it's so simple and succinct, mainly because of how simple the underlying algorithm is.

strlen3 is easiest to read, as you can make fairly valid assumptions about the helper functions, and easily confirm them if needed, and it very clearly breaks down the algorithm into its conceptual components. I think it would also be clearest (and thus winner) if the algorithm was slightly more involved, as the gains in clarity would outweigh the gains of having everything defined in just a few lines.

strlen2 is worst, because the helper function gains you very little for the cognitive overload of having the implementation being somewhere else. You are just as well served in this case by a trailing comment, IMO.
Limit Hold'em Heads-up is 'solved'. Over the long run, the AI will break even no matter who the opponent is (rake excluded, of course).

IIRC this involved making precalculations for the entire sample space, which is massive, but tiny compared to no-limit full-ring.
> an arrangement is not empirically available, or not empirically valued.

Maybe its value is beyond your reductionistic analysis. For example, light pollution impacts bats which pollinate flowers which only bloom at night (cactus, etc).
> They can be stressful, challenging problems, or simple ones. For me, the longer I am at an organization, the less stressful communications become, assuming I've built good relationships.

I like to communicate with customers always short and to the point via emails, because I value my and their time.

But with friends, I like to write more interesting and funny emails, that takes me more time. But because they are my friends I am willing to spend it.

Writing those mails to friends takes more concentration and allows more reflection about them and myself, in order to express myself correctly and in a nice way.

I would see the culprit more in todays Twitter culture, where people are force to write short messages without much reflection.

Maybe even the onscreen keyboard in most smartphones are another reason. Nobody wants to write more expressive messages with them.
They do that in Moscow as long as I remember.

During rush hours, it's "please take both sides of an escalator", during calmer hours, it's "please stand to the right, walk to the left".

Mostly works.
> I know they are, I'm saying that the main attraction is memory access stuff (at least, for me it was when I used to use them).

It depends on what you're working on. In the context of the original question of the thread (i.e. autonomous vehicles), I'd consider memory access to be the least difficult thing that static analysis can help me with. With code review, careful structuring of your data and, if it's available, hardware support for memory access models (e.g. ring buffers), memory access bugs can be reasonably avoided even without code analysis tools (not that it should!). Things like timing analysis are a lot harder to do without proper tools.

> For the rest, Rust does have static analysis tooling of the kind you describe in the form of clippy. There's still a lot that can be done, but it's already quite helpful and catches all kinds of things.

I would, uh, rather not be put in a situation where I have to send documentation to an approval body, and have the documentation mention -- as the only static analysis tool that was used -- a community project that's at version 0.0.75.

For comparison, there was a thread around here a while ago, where I think Gerald Holzmann from JPL mentioned how they used several (something like the top 5) code analysis tools to check their code. A top of all available static analysis tools for Rust would be a lot shorter than that.

This kind of stuff is important for mission-critical applications. I like Rust and I think it's a step in the right direction (and would certainly love to see it go all the way in that direction!) but I'm not about to write code that could kill people in a language whose only viable compiler barely reached 1.0, barely has a working debugger and only lint-level static analysis. It's the right track, but we're not there yet.

Edit: oh -- and I would like to point out one thing that seems to be often lost in the HN bandwagon. If you look at the numbers, it turns out that programmers have been able to get C and C++ to perform reliably for quite some time now. Failures are high-profile, but by and large, the medical, space and automotive industries have been doing a pretty good job at delivering safe tools, considering how many cardiac pumps, cars, airplanes and spaces probes are around and how few of them fail. It goes without saying that we should aspire for better, but the status quo is really hard to beat.
> I maintain that Adam Curtis, Nassem Taleb and Manufacturing Consent are on a subject in which it's impossible to not be a teeny bit paranoid

I see what you mean, and I find 'teeny bit paranoid' as a concept so intensely frustrating! We're using a word that by definition is extreme, and then use it in a situation where it doesn't really apply (on account of it being a 'teeny bit so'). It's basically 'guilt by association'.

It's akin to calling someone's views a 'teeny bit mysogynic', or 'a teeny bit racist', makes as much sense as 'somewhat unique', but it basically removes any gray area from the discussion.

I understand why and how this happens, but it's so frustratingly effective to shut down any kind of interesting avenue of discussion.

(Edit: it gets worse when, in a conversation, an actual full-blown mysogynist or racist decides to come to your aid, although sometimes the resulting conversation is so farcical to be funny again)

(Edit 2: that one guy with that blog with codex in it that is often posted to HN wrote about this quite eloquently, if I remember correctly)
There is no such thing as "fundamentally impossible to do it safely": if you use a theorem prover like Coq then you can formally verify any* code as correct, not just memory safe but truly bug free. See seL4. You'll have to write like 20 lines of proof code for every line of real code, and that code is difficult to write... but it's possible.

On the other end of the scale, Rust doesn't have much annotation overhead, but if you truly want zero cost, the borrow checker has significant limitations - you can't have any cycles in your ownership graph, not even parent pointers. The alternative is to live with reference counting overhead, and I'm not sure how much benchmarking has been done of exactly how much overhead that is, but the community tends to value pragmatism over purity, so a lot of data structure libraries take the third option and use `unsafe` fairly liberally behind the scenes. (Which makes the parent's point somewhat inaccurate - Rust is not pure 100% memory safety; unfastening the seatbelt is possible. You just have to explicitly request it.)

Of course, there is a huge gulf between those two paradigms. There are languages out there that could be said to live somewhere in the middle, like ATS, but they're not popular, and in general I think the spectrum is quite poorly explored. Certainly in theory there should be a fair amount of room to build from Rust's pragmatic approach and improve on it, by expanding what kinds of ownership models can be checked and/or reducing annotation overhead - but so far nobody has figured out what such an improvement could actually look like (except maybe this C++ thing, if it's not vaporware, heh), so it's up in the air how far this can be taken. I expect and hope Rust itself will continue to improve.

* Technically not any, due to Gödel's incompleteness theorem, but certainly any code a human would write. (Anyone who cites either the incompleteness theorem or the halting problem as having practical relevance to basically anything in computing is mistaken.)
Because it was a science startup company. The underlying proprietary technology that the entire company is supposed to be based on is a fraud.

It doesn't matter if their tech may one day only require a microlitre of blood to do a blood test. It doesn't work today. They were trading in the market as if it did. That can't be handwaved away. That fact isn't under dispute. That's according to several of Theranos's own current and former employees.

Extraordinary claims require extraordinary evidence. Scientists know this. The fact that Theranos's board lost all it's scientific leadership in July 2013 has been widely cited as a major contributing factor to this debacle. The judgement to not make those false claims is what running the company has to do with science.
Can you link to these better approaches?
> I don't actually believe that most people understand these issues

Right. What I'm asking is, why don't people and organizations understand these issues?

There is a solution. I'm not sure we've identified all the details of the problem.
What a great project, and what a great synth you have reproduced! This is an awesome musical instrument, nothing less. Really inspiring, thanks for making and posting it.
Guys, I think I found Holmes.
I second this. Who knows, maybe motion sensors can give us the same utility with less power and light pollution.
Still, isn't ironic that a systems programming language isn't able to be used without C, because its runtime was made to rely on libc instead of the raw OS APIs?

I understand the shortcut as a way to reduce development time, but maybe that is something to improve.

Go made the right decision by integrating directly with the OS APIs.
If you can find it, "The Dot and the Line" is another brilliant tale along these (ahem) lines [0]

I've had a look around and cannot find it online, though the excellent animated adaptation is easy to find [1] - well worth picking up the hardcopy as a beautifully designed picture book.

I'd also recommend Norton Juster's other work "The Phantom Tollboth" as being another great math & science inspired kids fairy-tale type book [2]

[0] https://en.wikipedia.org/wiki/The_Dot_and_the_Line

[1] https://www.youtube.com/watch?v=OmSbdvzbOzY

[2] https://en.wikipedia.org/wiki/The_Phantom_Tollbooth
Out of interest, what is it that you do in your life that you're informed about such unusual knowledge?
A story of finding work as a programmer with Autism
I wonder if it would make more sense to tell people "please consider walking up the left side of the escalator instead of standing". It would probably improve congestion, but even if it didn't, people might get a little bit more exercise out of their commute.
It's free because Facebook wants the training data. Pretty obvious I would have thought.

If you're ok with helping Facebook improve its AI then I see no reason to worry about the fact that it is free.
Mondo Bank App Needs Your Help to Find a New Name
There are two problems with this.

(1) Unions. (The tube driver's union is able to stop London and they are not afraid to do so.)

(2) It's not actually very easy to do for several of London's tube stations. Several of the tube stations have curved platforms making it rather harder to install the safety double elevator doors.
>Walking anywhere in London or navigating the subway during rush hour means having to make a mad, dodging, aggressive dance against an oncoming tide of people, many of whom seem oblivious to Britain’s long tradition of walking on the left.

I feel obliged to point out that this 'long tradition' only exists on escalators in the London Underground. Anywhere else in the country (or London for that matter) we walk on whichever side we feel like.
Wallgreens will try anything to make a buck. They sold out a long time ago.

They don't do anything well. I think their corporate mission is literally open up shop in the sketchy part of town, and stock the shelfs with Chinese crap that only a person on drugs would buy? Oh yea, mark up the stuff people actually need--maybe they won't notice?

As to their Pharmacy services; they don't even do the bare minimum. I kinda understand not filling out a TAR request. I get it, but I hope the state comes down on you hard.

I don't get not contacting doctors for refills. I have never met a doctor who literally didn't say this, "Walgreens has giving me the most trouble over the years." If there's a doctor on this site who disagrees, please speak up.

Enough said on the wonderful Wallgreens.
Actually, Paul, your advice needs a caveat.

I'm a huge fan of Clojure, have attended a conj, and forked it into a literate program. Hickey's insights are brilliant.

But I wouldn't use Clojure to write code my company considers vital. We all know that most of the cost of a program is maintenance, estimated at 80% or so.

Clojure code I wrote a few years ago no longer compiles. I didn't change the code, the Clojure language changed. My literate program no longer compiles either. So it is likely that the next time you upgrade your system your company's vital program fails.

Common Lisp is a standard. Code I wrote in the last century runs unchanged. It will run unchanged in the next decade.

If I'm writing code I care about, meaning that my company needs it to work for more than a few years, I strongly suggest using Common Lisp.

"Common Lisp: It Just Works".
Oh god how I wish people would start thinking just a single cycle ahead in terms of unintended consequences before knee-jerking into outlawing things.

Seriously, what could possibly go wrong when companies can get sued over the inaccuracies of anonymous third-party review websites?

Reminder: you don't need to lose a lawsuit for one to be enormously costly.
Is really rust not needing valgrind, and more specifically the memcheck tool ? OK for leak detection. But is it really able to detect all not initialized memory accesses ?

Anyway, I suppose that rust can still benefit from other valgrind tools, like helgrind, drd, massif and so on.
5 seconds makes all the difference when you're running for a train.
Clinton approved CIA drone assassinations with her cellphone, report says
Also catching a connection. Running is usually involved given the wonderful lateness our railways pride themselves on.
That is the normal recommendation on the London Underground and that is what they are specifically not doing in this case as an experiment.

http://citytransport.info/Digi/P1240646a.jpg
Ha, that reminds me of this here:

https://en.wikipedia.org/wiki/The_Three_Christs_of_Ypsilanti
Those languages provide other mechanisms, but people keep ignoring them on this discussions.

Besides the usual set of using, with, try-finally, there are higher order functions for those languages that support it.

For example,

with-file "/pathname" {
//fd is only visible and open here
}

accept-connection {
// socket
}

// ....

You just need higher order functions and implicit parameters to be able to do that in your GC language of choice.
It took a while for me to figure this out, but there's actually an unmentioned rule in the US that you walk to the right when you're passing people, at least when it's congested enough that you have to choose. I see a lot of people from overseas struggling with this where I work, at least early on.
Correct. The similarity between actual neurons and "neural networks" exists in the name only, functionally they are night and day different. Neural nets are really closer to multi-variate regression curves than brain matter.
This has been discussed here before: standing people pack tighter than walking people, therefore all standing ends up with more throughput, at the expense of lower individual latency (for the would-be walkers).

But you only need that optimization when escalators are at full utilization. In many cities, escalator discipline is low enough that the walk/stand lane pattern deteriorates when the escalator approaches maximum capacity. The minority who don't get it and rudely block the walkers accidentally apply the throughput optimization. London seems to lack a reliable distribution of rude blockers who would accidentally optimize for throughput when necessary, so they need to search for an explicit solution.
> But with friends, I like to write more interesting and funny emails, that takes me more time

That's interesting that you find being funny more time consuming. Some people would say work/business/math is harder than humor.

You've proven my solution wrong. I can't think of anything more to say other than "some emails are easy, some aren't". And then, there will still probably be someone who says all their emails are a challenge, like Don Knuth, lol
> Yes, but while easier it is also less useful -- since the unsafe language we're talking about has millions of users, billions of lines of codes, tons of libraries, huge support, hundreds of books, great tools, etc. The safe one, not so much.

Is this a plea for sticking to broken technologies 'cause social/environmental reasons?
During rush hour the platforms are packed meaning you might have to wait for 2-3 trains before you can board. So arriving at the platform a few seconds earlier can shorten your trip by 10 minutes or more depending on your route.
That quote is perhaps better understood as "something many thought would happen eventually". That doesn't mean they'd know which time in particular well enough to cash out.

I (and many others) can predict with some certainty that the stock market will have a one-day drop of more than X% eventually. That doesn't mean I know when that will be well enough to "cash out".
How do you then give say 20GB of test production data in a packed structure to ML?

Re-write thousands of lines of C++ infrastructure into another language just to test it in this "theoretical" language?

Or re-use the existing code and write a slightly hacky prototype within the code which can close to effortlessly run any data the program creates/accepts.

I know which one I'd pick.
Very interesting structure of explanation. I like your short sumarization (tl;dr) at beginning and "why?" reasoning. I think i will copy it in my next book :-)
There could be an overlap. While I don't know if this has been researched, my experience in Evangelic and Pentecostal churches is that it has a really high number of people who have mental disorders.

That's not a cheeky militant atheist comment, by the way. I'm not counting the average church member who believes things that to most (or at least many) of us is crazy.

Honestly, it was really nice to see. Many of these people suffered greatly outside of and before their church life, but as part of a community that itself was considered 'acceptably crazy' by much of society, and a community that strongly emphasizes care for each other, they often thrived and, interestingly, their symptoms often decreased.

For example, prophecy was a relatively common element of church life. There were special services where there was 'more room for the holy spirit', and people could share what I would call 'intuitions', which could range from a premonitory dream they had to a full-blown vision. This was catnip for people with 'known' mental issues, but the mere fact that their visions were given room and a measure of respect seemed to actually help them 'get better'.

What was fascinating about all this to me was that there was, in fact, a huge difference between the average church goer and the 'mentally ill' person sharing a prophecy, even if on a rational level I consider both prophecies to be fundamentally delusional (and I don't mean that in a derogatory way).

I've long been meaning to dive into this again, or look into research on the matter, because it's just so incredibly weird to experience a bunch of people acting, by some measures, insane and yet noticing a marked difference between those who are 'otherwise normal' and those who are not, even as a nonbeliever.
The problem is actually remembering to use `using`, `finally`, `with-foo`, whatever. With RAII, I don't need to remember - forgetting to free is literally impossible.
No, that means "if you choose to walk, walk on the left". I mean "Walk, and do it on the left."
For certain values of works, that's true. It will take a long time and won't produce very good results.

structureshrink more or less came out of frustration with what a bad job most of the existing shrinkers do. In particular the algorithm that lithium uses is more or less structureshrinks last ditch "Welp, everything else has failed, might as well try this" approach.
Another idea to reduce congestion even further: "Please ALL walk up the escalator."
If i consume 12+ episodes of something it means there is some value there. Otherwise I would have stopped earlier. I don't really understand all this negativity towards Ferriss. He's an honest guy who provides a lot of value to people. No one is forced to listen to him.