Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jonathrg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
121.
▲
by
jonathrg
2y ago
A compiler for a language with generic types will definitely do less work to implement generic min/max than the C preprocessor has to do in order to perform all the text substitutions generated by these macros.
122.
▲
by
jonathrg
2y ago
They do not address the question at all. Please write an answer yourself.
123.
▲
by
jonathrg
2y ago
C codebases can often be updated with minor changes to compile with a C++ compiler, after which C++ features can be gradually introduced. Is the Linux kernel different in this regard?
124.
▲
by
jonathrg
2y ago
Can someone explain the benefit of having essentially 4 cores (2 ARM + 2 RISC-V) on the chip but only having 2 able to run simultaneously? Does this take significantly less die space than having all 4 available at all times?
125.
▲
by
jonathrg
2y ago
That series of macros is a nice demonstration of the incredible effort it takes to attempt the most basic generic programming in C. Perhaps it would be more productive to just accept the limitations of the language and define a version of `
126.
▲
by
jonathrg
2y ago
Just curious, what kind of embedded system were you working on that required arbitrary precision numbers, and where it was acceptable for the system to stall for 40 seconds during a calculation?
127.
▲
by
jonathrg
2y ago
Those are definitely not the same question, NP-hardness has a precise meaning while "hard to solve" is a subjective judgement The answer is trying to show the absurdity of the question. It's like asking for the time complexit
128.
▲
by
jonathrg
2y ago
You have misunderstood the article. The question being discussed was not "How hard is it to solve P?=NP", it was "Is P?=NP itself NP-hard", which is just an invalid question.
129.
▲
by
jonathrg
2y ago
Feeding birds will only lead to rats if you give them the wrong food or too much. Otherwise they will eat it all up and there will be nothing left for the rats.
130.
▲
by
jonathrg
3y ago
I was confused because I read the 9 as a manpage section.
131.
▲
by
jonathrg
3y ago
Is this a lone tweet or a thread? Without a Twitter account I can't see anything except the one tweet.
132.
▲
by
jonathrg
3y ago
That's correct. The resulting error message won't be a stack trace, but I find it spells out the problem quite nicely in practice. I haven't had issues with grepping for the errors, but I can see that it would be a problem in
133.
▲
by
jonathrg
3y ago
Since the prompt doesn't mention error handling explicitly, it does show a difference in the general attitude towards error handling in the Python code vs. the Go code in the corpus
134.
▲
by
jonathrg
3y ago
It's generally good practice to not just `return err`, but to `return fmt.Errorf("some context: %w", err)`. That's usually enough for you to get what you need, with a much higher signal-to-noise ratio than a stack trace.
135.
▲
by
jonathrg
3y ago
Those libraries should not have named the methods like that. They could have chosen any naming scheme and they went with something that collides with the only naming scheme available to Python itself
136.
▲
by
jonathrg
3y ago
A decorator is a function that takes a function and returns a modified function - how would you write a decorator without nesting functions? Wrapping the inner function of the decorator with @wraps is quite common - one might consider it a
137.
▲
by
jonathrg
3y ago
> A ring oscillator in an FPGA can be used as a strain gauge. If you implement a ring oscillator on an FPGA and then bend the FPGA, the frequency of the ring oscillator will shift. That's horrifying. I love it.
138.
▲
by
jonathrg
3y ago
Summer of '19 is impressively early to be working on COVID-19 research.
139.
▲
by
jonathrg
3y ago
I'm surprised that qsort can malloc.
140.
▲
by
jonathrg
3y ago
There is a standard for these kinds of things, the IEC-80000 part 13 defines quantities related to information science and technology. The one that is closest to request rate is probably "call intensity / calling rate". http
141.
▲
by
jonathrg
3y ago
What would it mean for _Static_assert to not work at compile time?
142.
▲
by
jonathrg
3y ago
In case anyone else was wondering if this was an acronym for an aphorism (like YAGNI), this is an error code (error text busy). And 'text' refers to the executable
143.
▲
by
jonathrg
3y ago
> Windows build have my Google API keys so you can still sign in That's nice.
144.
▲
by
jonathrg
3y ago
Indeed. Typically you have pairs of call and ret, where call creates a stack frame and ret tears it down caller caller | ^ (call) . . . . . . . . . . . . . (ret)
145.
▲
by
jonathrg
3y ago
This is because of the calling convention / ABI If you write void free_with_extra_args(int *a, int *b) { free(a); } then *a is in already in the correct slot (the RDI register) for the first argument when free_with
146.
▲
by
jonathrg
3y ago
<html translate="no"> I first read this as "translate to Norwegian"
147.
▲
by
jonathrg
3y ago
I have not had much success using MusicXML to switch between different notation programs. Trying to read a score exported from Musescore as MusicXML in Sibelius or vice versa feels worse than switching between Microsoft Office and other ost
148.
▲
by
jonathrg
3y ago
I feel like this has to be breaking the terms of service for the site
149.
▲
by
jonathrg
3y ago
Norway exports about $1B of weapons, missiles etc through Nammo and Kongsberg Gruppen.
150.
▲
by
jonathrg
3y ago
Important context: this is Avi Loeb, the guy who insisted that Oumuamua might be aliens. Here's a nice exposé on him and his shoddy work https://www.youtube.com/watch?v=aY985qzn7oI
More ›