News for hackers. Stuff that matters.

j1f4

Re:Why writing a linked list in safe Rust is so damned hard on Thursday February 22, 2018 @08:03PM (#16443253)
The word that I have seen in similar contexts is 'trusted', which I like and would have preferred -- the block has extra privileges and isn't machine verified. Some people tend to give 'trusted' an opposite reading when they first come across it, though.
Re:Increasing numbers of wingsuit jumpers are dying (2016) on Monday August 28, 2017 @04:15AM (#15115163)
This reminds me of Freeman Dyson's research on British Bombers during WWII -- the data showed experienced crews didn't fair better than novices, but they didn't figure out why till after the war.

> Bomber Command told the crews that their chances of survival would increase with experience, and the crews believed it. They were told, After you have got through the first few operations, things will get better. This idea was important for morale at a time when the fraction of crews surviving to the end of a 30-­operation tour was only about 25 percent. I subdivided the experienced and inexperienced crews on each operation and did the analysis, and again, the result was clear. Experience did not reduce loss rates. The cause of losses, whatever it was, killed novice and expert crews impartially. This result contradicted the official dogma, and the Command never accepted it. I blame the ORS, and I blame myself in particular, for not taking this result seriously enough. The evidence showed that the main cause of losses was an attack that gave experienced crews no chance either to escape or to defend themselves. If we had taken the evidence more seriously, we might have discovered Schräge Musik in time to respond with effective countermeasures.

...

> the German pilots were highly skilled, and they hardly ever got shot down. They carried a firing system called Schräge Musik, or “crooked music,” which allowed them to fly underneath a bomber and fire guns upward at a 60-degree angle. The fighter could see the bomber clearly silhouetted against the night sky, while the bomber could not see the fighter. This system efficiently destroyed thousands of bombers, and we did not even know that it existed. This was the greatest failure of the ORS. We learned about Schräge Musik too late to do anything to counter it.

https://www.technologyreview.com/s/406789/a-failure-of-intel...

The wingsuit jumpers consider possible dangers to lie with complacency of experts on easy flights, experts envelope pushing, or novices jumping unprepared. But these factors are all so contradictory that I'm left wondering if there is a hidden risk that affects novices and experts alike.

As a Firefox on Linux user I checked one of those sites that tries to estimate how many bits each public aspect of your setup reveals about you. It turned out available fonts was by far the most unique aspect of my setup.
Re:Rust 1.17 on Thursday April 27, 2017 @07:51PM (#14215826)
That's a great blog post. The `linux_literal` section is particularly interesting re: mmap.
> reasonable to conflate panics with unsafety if one is only used to "crashing" in the context of C.

I suppose it's possible that's what generates most instances of this question, but I had the same question when I was first introduced to Rust and it came from a different root.

I had been reading about Erlang, and from that context I expected "safety" to be about avoiding system downtime (e.g. gracefully handling failed asserts) as much as anything.

Re:Grappling with Go on Wednesday February 08, 2017 @02:39PM (#13601334)
Go 1.7.4 and rust 1.14. Interesting discrepancy in the relative speeds of the tools we are seeing.
Re:Grappling with Go on Wednesday February 08, 2017 @12:15PM (#13599989)
If you are running the program with `cargo run` that takes the same --release flag. Could be the machine difference though.
Re:Grappling with Go on Wednesday February 08, 2017 @11:14AM (#13599351)
Pass the release flag when you build loc; `cargo build --release`.

I see ~5 seconds for loc and ~34 seconds for loccount to count a freshly cloned linux repository.

edit: woops, that was user time. These both spin all the cores. loc takes ~0.7 secs and loccount ~6.6 secs real time.

> In this specific example, I saw that building the project required mucking with my rust version/setup and decided that the cost of that was too high for me to proceed.

Agreed it would be nice if you could compile it with your package manager's provided version of rust.

Sibling comments mentioned rustup; with it this is the entirety of the mucking required [as described by alacritty's readme, and confirmed by compiling it myself]:

    rustup override set $(cat rustc-version)
The override is local to the project of the directory you set it in. This will also download that version of rust if necessary.
I have a hunch that learning resources get a significant bump from people using upvotes as bookmarks.

I think the ML results and demo posts are mostly getting upvotes because the results are fascinating and the posts are often excellently written. Image manipulation in particular lends itself towards posts that are appealing both to people casually skimming articles and to people looking for some technical depth.

Re:How to Write a Spelling Corrector on Thursday September 08, 2016 @12:59PM (#12454788)
Notable for code archaeology: the docstrings weren't in the previous version[].

(He also switched from manually implementing counting behavior with a Dict to a Counter, added the P function which replaces an inline dict lookup, similarly added the candidates function, changed the somewhat awkward known_edits2 function to just edits2, and reorded some things.)

[] http://web.archive.org/web/20160408180602/http://norvig.com/...

edit: small edits

Of course the risk of a habit of flippantly walking across minefields is significantly more than the willingness to do it to save a life.

It seems likely to me that the respondents deviated from the question strictly asked using at least in part that reasoning.

Re:StumpWM – Tiling Window Manager in Common Lisp on Monday April 18, 2016 @09:21PM (#11524304)
I'm using it too. I've bound my most used Stump keys to windows-key combos so that I don't have to use the prefix key very often. E.g. windows-e to focus Emacs.

For me, a big quality of life win with tiling wms is to set the default screen split to 2/3-1/3 instead of 50-50.

Re:Exploring Rust (from C#) on Wednesday March 23, 2016 @05:15PM (#11348313)
"Systems programming language" seems to be one a frequent definition miscommunication, right alongside "a Lisp" and "self taugt programmer".

People use the phrases without acknowledging or without realizing that there is a great breadth (and sometimes controversy) in what people take them to mean. I think you're doing it right defining it where you use it.

Re:Ask HN: What should we fund at YC Research? on Saturday January 30, 2016 @08:42AM (#11001748)
Research into off label uses of unpatented drugs.

(Inspired by the article recently posted here which pointed out that although a drug is being used off label to treat phobias, there is no incentive for a company to get that use certified.)