Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
faragon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
151.
▲
by
faragon
9y ago
A faster alternative, using a LUT (lookup table): - At initialization time, from the given palette (e.g. the CSS palette), build a 16-bit (RGB565) to 8-bit LUT, and find for every 2^16 entry the nearest palette color. Time complexity: O(n^2
152.
▲
by
faragon
9y ago
Amazing. A great candidate to be included into suckless.org [1], in my opinion. [1] https://suckless.org/rocks
153.
▲
by
faragon
9y ago
"Nearly all of GDI was written in assembly language in versions of Windows up to and including the Windows 95 family. In that era, being able to not only read but also write assembly language was a core developer skill." For graph
154.
▲
by
faragon
9y ago
Sure. I would love to buy that RISC-V board. But 1000 USD is way too much. Anyway, it is not a bad start, e.g. exotic ARM dev boards are very expensive, too.
155.
▲
by
faragon
9y ago
From the PDF: "Each U54 core has a high-performance single-issue in-order 64-bit execution pipeline, with a peak sustained execution rate of one instruction per clock cycle.". I.e. lower performance per clock vs an ARM Cortex A53
156.
▲
by
faragon
9y ago
I was kidding, it was just "systemd overlords"-irony :-)
157.
▲
by
faragon
9y ago
Now systemd will be in the boot loader, too, so finally we'll be able to have perfect power management in Linux, once it controls everything first-hand :-)
158.
▲
by
faragon
9y ago
The main reason is that in Windows executable files and dynamic libraries (.exe and .dll) are locked while a process is using them, while in other systems, e.g. Linux, you can delete them from disk. The only absolute need for reboot should
159.
▲
by
faragon
9y ago
Well, if you use metaprogramming in e.g. 5% of the C code base, it would be OK, in my opinion, as C has lots of benefits vs other high level languages.
160.
▲
by
faragon
9y ago
More examples (C89/90 preprocessor compatible): Function building using templates: https://github.com/faragon/libsrt/blob/master/src/saux/ssort.c Passing macros to macros (meta-tem
161.
▲
by
faragon
9y ago
In this context: Tractable problem = generalization from previous knowledge. Intractable problem = not enough previous knowledge.
162.
▲
by
faragon
9y ago
In my opinion, Bitcoin trading is about trading bad money for good money. When the bubble burst, the good money will be in the pockets of former Bitcoin "market makers", while the loses will be in the side of the enthusiasts/
163.
▲
by
faragon
9y ago
Intel, please, hire Linus: If you can't beat him, join him.
164.
▲
by
faragon
9y ago
+1, FastCGI is the way to go for web services in C/C++: not only because cause of avoiding to spawn a process for each request, but because of having web services state in memory. Also, for avoiding heap fragmentation in long lived pro
165.
▲
by
faragon
9y ago
Little endian is genius. Not only because of size casts being "free" (because LE is compatible among "word" sizes -lower bits are at a known location-, while with BE you need to know the word size in order to locate the
166.
▲
by
faragon
9y ago
They provide an optimized non-SIMD generic implementation. The version I posted is similar, speed-wise, and it supports in-place base64 encoding/decoding (i.e. allowing aliasing, supporting the case of using one buffer for both input a
167.
▲
by
faragon
9y ago
Another fast implementation (plain C99, without using SIMD), supporting buffer aliasing (i.e. allowing in-place encoding/decoding, check senc_b64() and sdec_b64() functions): https://github.com/faragon/libsrt/
168.
▲
by
faragon
9y ago
That's OK for code e.g. you know it could benefit from SIMD usage. However you can not tag every function of user code for safe/unsafe mode. Also, optimizations would increase the mess (inlining, unrolling, etc.). Generated code w
169.
▲
by
faragon
9y ago
So you mean having two executables in one? A la Apple "fat executables"?
170.
▲
by
faragon
9y ago
Runtime checks cost CPU cycles as well.
171.
▲
by
faragon
9y ago
In my opinion, the worst long-term consequence will be that even having newer CPUs with the issues fixed in hardware, we'll have a performance impact because of code compiled to work with both old and new CPUs. Just like the case of ha
172.
▲
by
faragon
9y ago
Is Google doing something to fix that?
173.
▲
by
faragon
9y ago
Dunning-Kruger effect explanation should be in every single high school education program. Quoting Bertrand Russell: "The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are fu
174.
▲
by
faragon
9y ago
"The devs are users themselves, and they hate breaking changes too." Sure. That's the point: e.g. back in the day UTF-8 was invented for allowing Unicode support without breaking API compatibility. I ask for thinking 10.000 t
175.
▲
by
faragon
9y ago
"unless there is an absolute need to break" So when someone has to decide between language X and Y, with the risk of another Python 2.x to 3.x "drama", that argument would be an important point for picking one language o
176.
▲
by
faragon
9y ago
How many mainstream programming languages do you know having equivalent issues as Python 2.x to 3.x? Do you think it is reasonable to rewrite your code base on every programming language "major version update"? One thing is deprec
177.
▲
by
faragon
9y ago
Why?
178.
▲
by
faragon
9y ago
If there is Python 4, please, make it backwards compatible. Thank you.
179.
▲
by
faragon
9y ago
I hope that's related to some specific branch prediction type, and not disabling branch prediction completely. I.e. if it is not a mistake in the SUSE comment, it could be painful: branch prediction is fundamental for modern OooE CPUs
180.
▲
by
faragon
9y ago
Where is the disk key? Is it stored in the main board, or in the flash disk itself? E.g. if you have to replace the motherboard, do you lose the data, or because of being in the flash disk it is OK? BTW, if being in the flash disk, how secu
More ›