Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dilap
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
70 ms
·
781.
▲
by
dilap
6y ago
Doesn't seem useful to the wearer: https://www.acpjournals.org/doi/10.7326/M20-6817 Perhaps useful to other people, but that's just speculation.
782.
▲
by
dilap
6y ago
Though I wonder what fraction of those people are interested in installing new software? I wouldn't be surprised if it was pretty small.
783.
▲
by
dilap
6y ago
That's cool as long as you don't care about having kids, a spouse, a house, ...
784.
▲
by
dilap
6y ago
I'd disagree, personally. I much prefer the explicit error-handling style of Go, even if I also have to handle panics. Errors are explicit; panics (which are program bugs, and can't be handled) are implicit. But program bugs are a
785.
▲
by
dilap
6y ago
Ha, you're right! So the algorithm is correct, but I think sort of by accident. If you change the initial check from "if lo > hi then" to "if lo >= hi then", the algorithm remains correct, and does not depend
786.
▲
by
dilap
6y ago
> I like that in Elm there is no such thing as undefined behavior. Thanks, that's an interesting perspective to consider. I do know most things I've read about Elm have been very positive, so apparently it does work pretty well
787.
▲
by
dilap
6y ago
(HN reply speed limitations are silly. :) Right, as you noticed in your second comment, I'm talking about the inner -1, which should never be hit. The issue is broader than just the specific issue of binary search; it's a question
788.
▲
by
dilap
6y ago
The -1 will never actually happen though -- it's -1 if the binary search algorithm itself tries to do an out-of-bounds array access. If that happens, your binary search had a bug. So in this case possible bugs are being obscured, rat
789.
▲
by
dilap
6y ago
I get that, but I feel like the questions I'm curious about have still not been answered... 1. Array out of bounds is different than other types of errors, like e.g. file does not exist: Because the size of the array is entirely contro
790.
▲
by
dilap
6y ago
Right, but that's for a context where None is a natural value. Have array access return maybe would be much less convenient. What would binary search look like? How about integer division? How about addition, which might overflow? Mode
791.
▲
by
dilap
6y ago
Hmm, I think it's the same still. Go doesn't have type heirchies, but you can "catch" (recover in Go parlance) any panicked value. It's exactly equivalent, no?
792.
▲
by
dilap
6y ago
That's the same as Go panic's tho. (Go panics are extremely close to exceptions: the only difference is they can only be caught at function boundaries instead of scope boundaries.) The main difference is cultural: you're enco
793.
▲
by
dilap
6y ago
intersting. how's that work out in practice? seems like it could be clumsy. e.g. what does binary search look like in elm? in general i always thought out-of-bounds controlled-crashing seemed the program was a reasonable thing to do, s
794.
▲
by
dilap
6y ago
doesnt every mainstream language panic (or undef behavior) on out of bounds array access? explicit error returns is a little clumsy, but still nicer than exceptions. (zig error handling seems basically perfect to me.)
795.
▲
by
dilap
6y ago
The water is warm but it isn't boiling yet. All the infra is in place though, and the economic incentives are inevitably going to push Apple in this direction.
796.
▲
by
dilap
6y ago
(Not even close to a zig expert, but I've been playing with it a little bit, find it very interesting, and think what I'm about to say is correct:) The zig equivalent of a module, a struct, is also a first-class object in zig, s
797.
▲
by
dilap
6y ago
We're starting to get into some pretty controversial territory here, but I think you're probably better off still getting at least SOME sunshine. It's speculative, but I believe the skin cancer risk can be dramatically reduce
798.
▲
by
dilap
6y ago
Or just get some sunshine! It's likely there are other benefits, besides just the vitamin D.
799.
▲
by
dilap
6y ago
So I'm going off of this clip: https://twitter.com/FrankFigliuzzi1/status/13244858190427054... It's hard for me to believe that someone can watch that and think that Bannon is literally suggesting we p
800.
▲
by
dilap
6y ago
You seem to be writing in good faith, but it is mind-boggling to me how anyone could take what Bannon said as anything other than a metaphor. Ironically, to me the Sartre quote better applies to your own comment than Bannon's bit. Perh
801.
▲
by
dilap
6y ago
Haven't used it in a while, but I always found Trello to be extremely snappy. Once of the things I really liked about it, and that competitors like ClickUp and (more tangentially) Notion are missing.
802.
▲
by
dilap
6y ago
Just for fun, I went back to the very first thing I implemented in Go, about 8 years ago†. Compiled and ran flawlessly. It is SO nice to not have stuff just break out from underneath you. (Modules wrecked this a little bit; I think it was a
803.
▲
by
dilap
6y ago
Well, I think I have it installed (via brew), and the .dylib exists, it's just that doesn't have the spcific mangled symbol Rust is looking for inside the library. Feels like a version mismatch or something. Edit: The nix tip work
804.
▲
by
dilap
6y ago
It blows my mind that the top search result for an app is often an ad for a different app. You know that gazillions of unsophisticated users are downloading the wrong app as a result and having a worse experience. (It's easy to do as
805.
▲
by
dilap
6y ago
Very interesting! I'm surprised I've never encountered it before. Thanks for Pijul; I'm super-excited about the possibilities. (Unlike many HN commentators, who are too trapped inside the git way of thinking to realize its li
806.
▲
by
dilap
6y ago
Has any1 had success compiling it on mac? I get a link error involving libclang. thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/local/opt/llvm/
807.
▲
by
dilap
6y ago
The funny thing about names is whatever they are, you end up getting used to them. I remember when the iPad first came out the whole internet was going on about what a terrible name it was. Now it seems completely natural. Pijul is similar:
808.
▲
by
dilap
6y ago
Nothing, thank you! I must have been looking in the wrong place; I really did try to find it though...
809.
▲
by
dilap
6y ago
Personally, I've never found the Go spec to be too ambiguous, and it's always answered my questions and in an easy and clear way. I'm a fan! For example, what does the following C# code print? UInt32 x = 1; UInt32 s
810.
▲
by
dilap
6y ago
oh that's neat, i didn't know about that! could help. my ideal editor would never block, and use file-sized based approximations to allow scrolling to arbitrary locations w/o having to actually read the contents of the enti
More ›