Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
moefh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
181.
▲
by
moefh
4y ago
UTF-32 is a fixed-length encoding of Unicode[1], so it does simplify things a lot for a regex engine. [1] At least when talking about code points, which is what matters for regular expressions (unless you want stuff like \X with is not univ
182.
▲
by
moefh
4y ago
Right, but traditional LTO is for static linking. How would one even do LTO with a shared library?
183.
▲
by
moefh
4y ago
I'm not sure LTO is the correct term for this. What makes C slower than these other languages is that the external function is in a dynamic library. Calling external functions like this is notoriously slow because it involves a double
184.
▲
by
moefh
4y ago
My point about "weak typing" is this: if someone says "hey, I'm designing a new language, its type system is going to be weak", they gave you no information whatsoever about the type system other than maybe "so
185.
▲
by
moefh
4y ago
I think you're talking past the comment you're replying to. In both examples, you have tell the compiler exactly what the types are. In the first one you have to cast the return value of `dlsym` to a function pointer, and at tha
186.
▲
by
moefh
5y ago
This is really cool! I never looked into WASM before, I'm really happy to see it's not that difficult to build a simple example like this. One thing that's bothering me about that code is the declaration of `memory` as an uin
187.
▲
by
moefh
5y ago
> - "I decided to leave the XIP cache to do its thing, and select a few small areas of hot code or data to promote to RAM manually"[1]: I understood this as you leaving the XIP cache activated. But this seems at odds with "
188.
▲
by
moefh
5y ago
> As I recall, the C standard makes no assumption of whether strings are null-terminated or not. I'm not sure what you mean by assumptions made by the C standard, but it definitely says strings are null-terminated: > A byte with
189.
▲
by
moefh
5y ago
> from the issue discussion we can see that it is indeed possible to do this without PowerShell Read the whole discussion[1]. It used to be possible to do this without PowerShell, but that's no longer the case. [1] https:/&#
190.
▲
by
moefh
5y ago
If you want confusion with a valid expression: [0x1for x in (1,2,3)] looks like it should parse as [0x1 for x in (1,2,3)] but instead parses as [0x1f or x in (1,2,3)]
191.
▲
by
moefh
6y ago
Same here. I clicked on the link fully expecting a discussion about the transition from TTL to CMOS, or something like that.
192.
▲
by
moefh
6y ago
Thank you, that clears things up.
193.
▲
by
moefh
6y ago
You seem to know what's going on, do you mind answering a question about the schematic? If the transistor is a PMOS like the author says, when the output of the NAND goes low wouldn't both the LED and the transistor turn on? The w
194.
▲
by
moefh
6y ago
That list is not complete -- US is not the first, and India is not the last in the World. A better picture can be seen in the link in that comment. I think that list is meant to show that a lot of the rich industrialized countries emit much
195.
▲
by
moefh
6y ago
I'm confused about what other normalization is needed. China and India have (combined) 1/3 of the world population. Why shouldn't they be responsible for 1/3 of the world emitted CO2?
196.
▲
by
moefh
6y ago
> They put their safe harbor position at risk if they do so. Only if they don't comply with a DMCA takedown notice, which allows the supposed violator to claim responsibility. That is, whoever posted the video can say to Youtube &qu
197.
▲
by
moefh
6y ago
It's more or less explained in 1.2. A system is "sound" if it's consistent AND can only prove true things. To see the difference between sound and consistent, suppose you have a formal system A which you know is sound. Y
198.
▲
by
moefh
6y ago
I have no experience whatsoever with sound, but I got curious and did that, and got weird results: https://imgur.com/HSSdM5t (below is the original 440Hz square wave; above is the recorded sound) The recorded waveform looks
199.
▲
by
moefh
7y ago
Just remove the extra "4" from the end of the URL: https://www.makershed.com/products/make-electronics-2ed
200.
▲
by
moefh
7y ago
> Chaining pluses together is the same as adding arguments to add No, chaining multiple pluses together in Python (as in most widely-used programming languages) is exactly the same as doing multiple two-argument additions, and is not th
201.
▲
by
moefh
7y ago
> Balanced Ternary can be mathematically elegant way to represent numbers When discussing ternary computation, I always see people talking about representation and storage. In these aspects, ternary can indeed be more elegant and efficie
202.
▲
by
moefh
7y ago
Yes, they are (assuming the words are actually chosen at random). The idea of "correcthorsebatterystaple-style" passwords is to randomly choose 4 words from a pool of about 2000 words. That gives about 11 bits of entropy per wor
203.
▲
by
moefh
7y ago
I think it will break a lot less code than you think. The C standard has a subtlety with regards to const in that it allows you to (for example) cast away the const-ness of a pointer and use it to write to it, as long as the original memo
204.
▲
by
moefh
7y ago
That doesn't seem to be a fair argument, you can also do that with rational numbers: if I give you an infinite sequence that is exactly 1/3, can you in finite time say it actually is? If you choose to represent numbers as infini
205.
▲
by
moefh
7y ago
> The use of "undefined behavior" was and remains a mechanisms for achieving that goal. Is that really true? Couldn't the same goal be achieved by using implementation-defined behavior instead? I thought C keeps undefined
206.
▲
by
moefh
7y ago
That's not really a fair comparison. The Atari didn't have any video memory, you drew by changing the color of the electron beam while it scanned the screen. It also had only 16 colors and a much lower resolution than what's
207.
▲
by
moefh
7y ago
"Forcing read/write to memory" is very different from "not caching the value in a register". Optimizations can involve not just caching values in registers, but also reordering operations, calculating things at comp
208.
▲
by
moefh
7y ago
I know nothing about Python internals, but my understanding from the article is that this "overhead" is about creating a new sub-interpreter (loading modules is particularly slow in Python), not the performance of executing code a
209.
▲
by
moefh
7y ago
Thank you for explaining, that makes a lot of sense. What's surprising is not that it's very hard to understand the law; it's big and messy and evolving. What's surprising is that in practice one has to pay money to even
210.
▲
by
moefh
7y ago
To an outsider like me, this situation seems bizarre; please correct me if this is wrong, but... It seems like you're arguing that it's reasonable to keep these annotations private because it's already impossible to understan
More ›