News for hackers. Stuff that matters.

general_pizza

Re:Godot 4.0 will discontinue visual scripting on Wednesday August 24, 2022 @02:37AM (#32575630)
It’s not text but there’s a podcast with Simon Peyton Jones (Haskell person) talking about his new job at Epic working on verse. Starts around 50s in:

https://podcasts.apple.com/us/podcast/the-haskell-interlude/...

Re:I reverse engineered McDonalds’ internal API on Thursday October 22, 2020 @08:20PM (#24864840)
Not original commenter but I think jackric already alluded to the increased cynicism that develops from clickbait. Personally, when I see so many ppl giving up honest and nuanced statements/opinions for hyperbole in order to gain views/likes, it's disappointing.
Re:Learning Rust via Advent of Code on Tuesday February 05, 2019 @10:58AM (#19086487)
Totally agree, cargo makes it easy. Honestly it’s just that the level of laziness is so high when I’m programming on something personal after work that even having to switch to chrome to check a version number on crates.io will be avoided.
Re:Learning Rust via Advent of Code on Monday February 04, 2019 @05:56PM (#19081518)
The docs are a tad misleading but the important piece is to look at the signature. The `where P: Pattern<'a>` portion states that split needs a type that implements the Pattern trait. If you follow the link to the Pattern trait then at the bottom you'll see a section[0] listing types implementing the trait (&[char] being one) and therefore can be passed into split. Hope that helps!

[0] https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html...

Re:Learning Rust via Advent of Code on Monday February 04, 2019 @03:40PM (#19080404)
I also thought regex seemed overkill and didn't feel like adding an extra crate to my Cargo.toml. Luckily for the days I attempted I was able to get by on just the split method for str's[0] which was nice and concise. So for your regex example you could also do:

    // #1 @ 916,616: 21x29
    let parts: Vec<&str> = l.split(['@', ',', ':', 'x'].as_ref()).collect();
    let x = parts[1].trim().parse::<i32>().expect("x as i32");
    let y = parts[2].trim().parse::<i32>().expect("y as i32");
    let w = parts[3].trim().parse::<i32>().expect("width as i32");
    let h = parts[4].trim().parse::<i32>().expect("height as i32");
[0] https://doc.rust-lang.org/std/primitive.str.html#method.spli...
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Wednesday December 12, 2018 @09:46PM (#18669497)
If you think of it more like “how do I want to handle something bad happening?” instead of “what category does this fall under?” then I believe electrograv‘s point of not being clear-cut becomes more clear.

For example in rust most code that can fail will return a Result and thus the compiler forces you to handle that. However, that code can just as easily panic and behave like an uncaught exception would (thread exiting). An example would be the division operator and the array index operator. Both division-by-zero and out-of-bounds errors can certainly be handled by using a Result but in this case the Rust developers made a decision to use panic. Are these both exceptions bc they are handled like a typical uncaught exception or are they errors bc it’s conceivable to handle them just like a failed file open?

Re:Macintosh Startup Sound History [video] on Friday June 15, 2018 @12:16PM (#17320926)
There’s a great Welcome to Macintosh podcast episode[1] that interviews Jim Reekes about this history, highly recommend it. Fun fact, in addition to the iconic startup sound Jim is also responsible for the camera shutter sound on iPhones.

[1] https://www.macintosh.fm/episodes/13

Hmm I’m seeing the opposite. The last graph shows Google’s hash table outperforming in all but a few places, including at 400k. Perhaps you mixed the axes up, lower is better here.

I also just want to comment that skepticism to high claims is good but your comment seems a bit too harsh. Briefly looking at his post where he goes into his “fastest hash table” it’s quite long, very detailed and has similar graphs. That doesn’t seem under-researched to me.

Re:iPhone X Teardown on Friday November 03, 2017 @09:09PM (#15623294)
Hmm, I've got both Bluetooth File Exchange.app and Bluetooth Explorer.app on my mac which are both from Apple and I think what you're looking for. Not sure if they came default or when I downloaded the bluetooth dev kit years ago. I remember using it to transfer mp3s onto a ZTE bar phone back in the day.
Re:My first fifteen compilers on Sunday September 03, 2017 @03:57AM (#15160222)
> From what I understand, the definition of a transpiler is one which almost exclusively performs syntax-syntax transforms, and doesn't delve into the semantics with e.g. dataflow or control flow.

A counter example to this is the typescript compiler which some might describe as a transpiler. It does sophisticated control flow analysis to, for example, make sure all branches of an if statement return the same type.

Re:My first fifteen compilers on Sunday September 03, 2017 @03:46AM (#15160179)
I've heard of sentence diagrams[0] which are tree-like structures used for checking grammatical correctness.

[0] https://en.m.wikipedia.org/wiki/Sentence_diagram

Exactly. Some of the points just seem ridiculous and make me wonder what this person expected to get out of the book. For example:

> Halliday’s character combines the worst traits of Elon Musk, Mark Zuckerberg and Kim Dotcom.

Do you think its purpose is to inspire you to be a better person? Since when are fiction books self help books? Since when are perfect characters the most interesting ones?

Re:Go reliability and durability at Dropbox on Friday August 04, 2017 @02:05AM (#14926667)
Re:Exa, a modern replacement for ls on Thursday August 03, 2017 @04:59PM (#14923837)
This is heavily influenced by personal taste, but I don't understand the value of having so many elements of the output colorized. File type seems a useful case, everything else in the output of `exa -l` just looks distracting to me. Just my 2 cents.
This a really good point that I've realized just recently. I'd also like to add that integrating your build system with your editor can be a great productivity boost. If you watch someone like Gary Bernhardt program, you can see that good editing skills and build/test integration allows for very quick edit-build-test cycles. You can iterate fast and catch stupid mistakes early.
Re:A vigilante trying to improve IoT security on Wednesday April 26, 2017 @01:08PM (#14204881)
The method they're describing is only permanent for devices without a removable startup disk, right? If they run this on my raspberry pi, for example, just reformatting the sd card and following the same process as when I first got it should immediately fix this.
Re:Rust's 2017 Roadmap on Tuesday February 07, 2017 @01:12PM (#13591278)
Interesting. Out of curiosity, what's a case where tmp = a.b(); tmp.c() works but a.b().c() doesn't? I'm still learning rust and the online book's Methods chapter doesn't say anything about such restrictions.