Better HN
topnewbestaskshowjobs
Log inSign up

atiedebee

343 karma · joined May 20, 2024 (2y ago) · 160 submissions

Submissions

comment 1w ago · link · parent

Unless the term deep fake has changed from "replace someone's face with someone else's on an existing video" I think the answer is pretty clear.

comment 1w ago · link · parent

Complexity is not something to strive for, but something to be avoided. I would also argue that we aren't good at managing that complexity at all.

comment 1w ago · link · parent

puts("Hey there"); is worse than C++ iostream? In my opinion, even printf style strings are better than iostream shenanigans. The main downside of printf is addressed in more modern languages like rust which allow the printed parameters to be embedded in the string so you don't have to keep track of the ordering.

comment 1w ago · link · parent

Perhaps custom allocators could be interesting for BTreeMap and BTreeSet? I am not familiar with their internal implementation, but as I understand it those should allocate fixed-size blocks, which would benefit from a specialized fixed-size allocator.

comment 2w ago · link · parent

Codeberg specifically has a policy against projects that are maintained heavily with AI tooling, so I don't think they would have that problem.

comment 3w ago · link · parent

I'm fairly certain that GMs often consider many more moves than what they verbalise. If you look at Naroditsky's speedrun episodes, there are many moments where he verbalised a few of the opponents responses, and sometimes said opponent plays something else and he goes "I looked at that, but thought that wouldn't work" (or something along those lines). I've also seen these sorts of things in clips from Levy who is a "mere" IM.

comment 1mo ago · link · parent

Considering that aging only happens later in life, it wouldn't have much of an effect on how efficient humans produce offspring, so it wouldn't be selected against. It is the same explanation for why Huntington's and Alzheimer's are still around.

comment 2mo ago · link · parent

I feel like this becomes less clear if you're talking about "one-time" events. "Our website loads 2x faster now" doesn't mean that they are sending more data per second, and the user won't be doing more website loads. The website load time going from 1 second to 0.5 seconds is "2x faster" and I think that that is a very common way of communicating such performance increases too.

comment 2mo ago · link · parent

Id say that it is a lot more likely for the in-house, at least half a decade old library to be correct and performant than 3000 lines of an LLMs mediocre regurgitation of that code.

comment 2mo ago · link · parent

I've been using kakoune for the past 2-3 years and it has been great. My main reason for switching from vim was the adherence to the Unix philosophy, but the editing model has been great. Seeing your selections change after each command + the clippy help text when entering a different "mode"^1 has made learning different editing patterns very easy. The only thing I really miss from vim is the number increment/decrement shortcut. There is a plugin for it, but I haven't tried it out yet (incrementing each selection by a different amount hasn't come up often enough for me).

^1: kakoune doesn't have multi character shortcuts. You create a "mode" which works basically like a namespace for keystrokes (https://igor-ramazanov.github.io/doc/pages/modes.html).

comment 2mo ago · link · parent

I imagine just ask would be enough for most usecases:

awk '{ freq[$0] += 1 } END { for (n in freq ){ print freq[n] " " n } }' < file.txt

comment 2mo ago · link · parent

bzip3 is not made by the same author as bzip2, that's why there is a licence disparity.

13.

Stockfish 19(stockfishchess.org ↗)

279 points · by atiedebee · 2mo ago · 169 comments

comment 2mo ago · link · parent

I don't think cars gave back many hours for the majority of people, they just increased the distance people travel: https://en.wikipedia.org/wiki/Marchetti's_constant

comment 2mo ago · link · parent

The article touches upon this:

> Unlike prose, where you usually read it linearly, with code you bounce around based on what connected elements you are exploring.

The moment you are jumping around a lot while reading, being able to understand the structure quickly becomes a major help. For example, dictionaries will have the words in a bold font while italicizing things like the plural etc.

comment 2mo ago · link · parent

That would depend on the application. The convenience isn't just a smaller binary, but also being independent of the distros glibc version (being on an LTS distro and not updating often, I have experienced incompatible glibc versions often enough). The megabytes shaved off are significant if the final binary size is < 1MB, which is a completely different size class.

And not all applications are performance sensitive. Something like UNIX's bc command would benefit more from having easier compatibility and a faster startup than more optimized allocators and string functions.

In the end, it ~doesnt even matter~ is all trade-offs. The nice thing is that it is up to the developer to make the decision of which libc to use, so everyone gets what they want.

comment 2mo ago · link · parent

They are not (knowingly) running a piece of software tasked to find cyber security exploits on their laptop.

comment 3mo ago · link · parent

"at the time of execution" could mean that your program never runs an interpreter and instead compiles the input code before running any of it, basically like the --run option in the tiny c compiler

comment 3mo ago · link · parent

Only getting the code right "roughly" is not enough in complex code. An example would be an (multi-symbol) arithmetic coder. They all look very similar at a first glance, but choices on the order of operations influence performance and compression characteristics, off-by-one errors are extremely easy to make.

comment 3mo ago · link · parent

I thought the difference was that a JIT is used alongside an interpreter? It wouldn't need to do optimization, just compile while interpreting?

comment 3mo ago · link · parent

Because the standard library of a programming language has a lot more eyes on it than one of the many small dependencies does.

comment 3mo ago · link · parent

The biggest changes across generations in the last ~5 years were the introduction of specialized instructions for wider vectors (AVX512/AVX2, and even then you need specialized workloads to use them), [...]

AVX2 is actually 13 years (!) old already (first appearing in Intel's Haswell architecture).

AVX512 is also nearly 10 years old right now, but not many CPUs actually support it (none of the devices I own support it)

23.

Freestyle Linked Lists Tricks(nullprogram.com ↗)

1 points · by atiedebee · 3mo ago · discuss

comment 3mo ago · link · parent

You can just not use an LSP? My understanding is that LSPs aren't made to be the fastest (code completion|syntax highlighter|code analysis), but easily integrated into all sorts of IDEs/text editors.

comment 3mo ago · link · parent

Do you maybe have an article on these data structures? It sounds really interesting.

comment 3mo ago · link · parent

I think "n" would be the grid size.

comment 3mo ago · link · parent

> Doubling the input roughly doubles the time, the signature of an n log n algorithm.

Excuse me? This entire paragraph reads like the author has made the assumptions about the time complexity of the algorithms and pretends to discover them by simply timing the functions:

> List append tells a different story: 200,000 appends complete in 0.0071 seconds total, about 4e-08 seconds per operation, which is O(1) amortized.

1. You can't say anything about the time complexity after running the algorithm on a single input. This same exact reasoning would lead us to believe that sorting is O(1) per element because sorting the 200.000 elements took 0.5 seconds, which is 0.5/200000 seconds per element.

2. Even if we assume that we correctly measure list-append to be O(1), you can't just put "amortized" behind it without explaining how you get to that conclusion! Pushing to the front of a linked list is O(1), but that isn't an amortized time complexity.

I couldn't continue reading the article after that paragraph.

comment 3mo ago · link · parent

I personally didn't notice any strong LLM tells in the writing. In fact, I enjoyed the writing style quite a bit. Especially the following sentence near the beginning of the article:

> At that point I had neither a server nor a phone

I don't know why I like it, I just do. Perhaps it is the slightly humorous tone. Anyways, nice article!

comment 3mo ago · link · parent

Ive actually toyed with the idea of having @ as a pointer dereference. It seems to make sense: you want to know what is at the address stored in p.

comment 3mo ago · link · parent

I thought C++ was designed to fit all sorts of applications. There is many GUI libraries for C++ for example, and the language has all the capabilities to add abstractions for making these sorts of libraries easy to work with. I think you could argue that C was made for low level code, since the working group seems to be focussing on making the core of the language more usable instead of allowing for abstractions that make libraries easier to work with (I think we can all agree that the C interface of gtk is not that great to work with, though I do commend their efforts).

Sorry for rambling so much, I hope I got my point across.

123456