Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
duckerude
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
duckerude
7mo ago
Perhaps notable: years ago the original original chardet was rewritten with a different license: https://github.com/hsivonen/chardetng AFAIK this was not a clean room reimplementation. But since it was rewritten by h
2.
▲
by
duckerude
7mo ago
Previously: https://news.ycombinator.com/item?id=45585869 (At the time it wasn't public which OEM GrapheneOS would partner with.)
3.
▲
by
duckerude
7mo ago
Looks like the command is still called tldr at least, only the package/repo has a different name.
4.
▲
by
duckerude
7mo ago
That comment is saying to use C++, not to add destructors to C.
5.
▲
Multo ante natus eram (1995)
(multicians.org)
2 points
by
duckerude
8mo ago
|
0 comments
6.
▲
by
duckerude
9mo ago
I've worked on a system where ULIDs (not UUIDv7, but similar) were used with a cursor to fetch data in chronological order and then—surprise!—one day records had to be backdated, meaning that either the IDs for those records had to be
7.
▲
by
duckerude
10mo ago
The current amount of typechecking might be a net efficiency improvement AFAIK. It provides a hard runtime guarantee that variables are certain types while Python has to check whether something is supported at the last possible moment. But
8.
▲
by
duckerude
10mo ago
Python managed to do this by not actually checking the types at runtime. If you declare a list[int] return type but you return a list[string] then nothing happens, you're expected to prevent that by running an offline typechecker. PHP
9.
▲
by
duckerude
11mo ago
I don't think this shows deep thought on his part. By Stallman's own telling a free Objective-C frontend was an unexpected outcome. Until it came up in practice he thought a proprietary compiler frontend would be legal ( https:&#x
10.
▲
by
duckerude
11mo ago
I think you're getting fooled: >>> from io import StringIO >>> for line in StringIO("foo\x85bar\vquux\u2028zoot"): print(repr(line)) ... 'foo\x85bar\x0bquux\u2028zoot'
11.
▲
by
duckerude
1y ago
rustc is only loosely tied to LLVM. Other code generation backends exist in various states of production-readiness. There are also two other compilers, mrustc and GCC-rs. mrustc is a bootstrap Rust compiler that doesn't implement a bor
12.
▲
by
duckerude
1y ago
RFC 3629 says surrogate codepoints are not valid in UTF-8. So if you're decoding/validating UTF-8 it's just another kind of invalid byte sequence like a 0xFF byte or an overlong encoding. AFAIK implementations tend to follow
13.
▲
by
duckerude
1y ago
The big problem isn't invalid UTF-8 but invalid UTF-16 (on Windows et al). AIUI Go had nasty bugs around this ( https://github.com/golang/go/issues/59971 ) until it recently adopted WTF-8, an encoding that
14.
▲
by
duckerude
1y ago
Rust has the clap_complete package for its most popular arg parsing library: https://crates.io/crates/clap_complete ripgrep exposes its (bespoke) shell completion and man page generation through a --generate option: rg
15.
▲
by
duckerude
1y ago
See also: https://internals.rust-lang.org/t/can-the-standard-library-s... A file descriptor can't be -1 but it's not 100% clear whether POSIX bans other negative numbers. So Rust's stdlib only bans -1 (f
16.
▲
by
duckerude
1y ago
It means that anything strange that happens next isn't a language bug. Whether something is a bug or not is sometimes hard to pin down because there's no formal spec. Most of the time it's pretty clear though. Most software d
17.
▲
by
duckerude
1y ago
I can think of a lot of cases where it theoretically could be a problem, but `cut -d=` is the only one I've found so far where an end user ran into trouble because of this ambiguity, and I think it's the only one for which uutil
18.
▲
by
duckerude
1y ago
The problem is existing shell scripts and muscle memory and command histories. `cut -d=` has always worked and works on all the other implementations so it should keep working if you switch to uutils.
19.
▲
by
duckerude
1y ago
I researched this for my own argument parser ( https://github.com/blyxxyz/lexopt/issues/13 ) and concluded that it's a minor issue. This syntax is supported by argparse and clap, the most popular argument
20.
▲
by
duckerude
2y ago
Anders Hejlsberg explains here: https://youtu.be/10qowKUW82U?t=1154 . TL;DW: - C# is bytecode-first, Go targets native code. While C# does have AOT capabilities nowadays this is not as mature as Go's and not all platfor
21.
▲
by
duckerude
2y ago
According to the blog post ( https://fishshell.com/blog/rustport/#fn:formatting ): > A lot of the increase in line count can be explained by rustfmt’s formatting, as it likes to spread code out over multiple line
22.
▲
by
duckerude
2y ago
Agreed that societies can get sophisticated without writing, but Egypt was already considered mind-blowingly old in Plato's time. The start of the Timaeus features an eight thousand year old Egyptian city with an eight thousand year lo
23.
▲
by
duckerude
3y ago
That's a wrapper around the actual implementation (which lives in an external package). Notice "use hashbrown::hash_map as base;" at the top. There's far more unsafe there: https://github.com/rust-lang&#x
24.
▲
by
duckerude
3y ago
C-c M-g l gets you there. (C-c M-g leads to a submenu that also has blame.) Until this thread I didn't know it could also do regions.
25.
▲
by
duckerude
4y ago
You can download tsv files with entries like this: 2011-09-22 22:29:24 10.1007/BF01907940 www.springerlink.com/content/ppt42929g7645548/fulltext.pdf 213.87.138.* -176088 Russia That's 3/4 of the IP addre
26.
▲
by
duckerude
4y ago
One of the authors mirrored the paper: https://fservant.github.io/papers/DavisServantLee-SelectiveM...
27.
▲
by
duckerude
4y ago
map() and filter() being functions means you can run them on any object that implements __iter__(). To make them methods they'd have to be added to each individual type that might want to use them. IIRC Ruby does that using mixins but
28.
▲
by
duckerude
4y ago
I've seen cases where an iterator was better, but I've also seen gains from using an imperative loop with manual indexing. Loop conditions and the occasional assertion can be enough to elide bounds checks. (Though sometimes the co
29.
▲
by
duckerude
4y ago
PHP's arrays are a bit like this. You can treat them either like an (ordered) hashmap or like a growable array. The underlying representation will adapt depending on whether the current state can be represented as an array. And I hate
30.
▲
by
duckerude
4y ago
> If the user really wants, they can make a custom slice wrapper that implements the `Index` trait in a way that returns `Option`. You can't, because indexing is required to return a reference. It's hard to get creative.
More ›