Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomasmg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
181.
▲
by
thomasmg
3y ago
I wonder how it compares against LZ4 for the same platform: https://github.com/arnaud-carre/lz4-68k . Specially because this LZ4 implementation doesn't use a table, it seems.
182.
▲
by
thomasmg
3y ago
Well, it seems "ternary" is more common than "trinary", according to https://www.reddit.com/r/Iota/comments/cepkv7/difference_bet... Update: there's also the "Ternary tree&q
183.
▲
by
thomasmg
3y ago
Nice! For show, I would try to levitate. Probably using a stronger magnet, inside a small (tiny?) glass tube, so it slides up a bit. I wouldn't do "rock surgery" just yet, to remove dead weight. Levitation with 4 magnets in a
184.
▲
by
thomasmg
3y ago
Lead is still used for example in car batteries (lead-acid), bullets, and solders (electronic components).
185.
▲
by
thomasmg
3y ago
Not if 2 magnets are flipped. Over just one magnet, the pyrolytic carbon (or LK-99) would slide off to the side. Over 4 magnets arranged correctly, it stays in the middle. This is described here: https://www.imagesco.com/mag
186.
▲
by
thomasmg
3y ago
I think they didn't show that yet because for scientists, what they did already proves diamagnetism: they show that both sides of the magnet lift the sample. They could more or less easily demonstrate levitation even with the current s
187.
▲
by
thomasmg
3y ago
When I started reading such papers this also confused me. Yes, it's about randomness and probability of collisions. Adding two characters might be OK or not, it depends on the hash function and the use case. For example, the Java "
188.
▲
by
thomasmg
3y ago
I have written 4 query optimizers: HypersonicSQL, H2 database, PointBase Micro, and Apache Jackrabbit Oak. I know procedural language don't have such optimizers. But I argue that you don't always need them. I argue that the databa
189.
▲
by
thomasmg
3y ago
We write programs with Python, Java, Rust, Javascript and so on. Yet we use a very different language, eg. SQL, to query and modify data. Why? Why don't we use eg. Python as well? SQL is different from other languages: it is declarativ
190.
▲
by
thomasmg
3y ago
I was talking about "exponential algorithms" in general, and about business logic. I know FreeBSD isn't business logic, but low-level kernel code. I don't know the details of the FreeBSD problem.
191.
▲
by
thomasmg
3y ago
For each page, you have a select statement. The first without offset, then with offset 10 limit 10, then offset 20 limit 10, offset 30 limit 10 and so on. The database engine will, for each query, read all entries up to the offset + limit.
192.
▲
by
thomasmg
3y ago
O(n^2) algorithms often cause performance issues. The main cases I have seen in business logic are: (A) offset pagination (select ... offset n) and then paginate over all entries, and (B) read a text value, append something, store, repeat.
193.
▲
by
thomasmg
3y ago
Why do you think qsort is not nice? I could imagine that qsort is not an option in FreeBSD for example because it is recursive and there is no stack at that level, or there is a risk of stack overflow. If that's the case, shell sort sh
194.
▲
by
thomasmg
3y ago
Non-fossil diesel is going to be very expensive... The alternative is battery swap stations. Nio seems to be successful with that.
195.
▲
by
thomasmg
4y ago
Actually I think it would help quite a lot in what I struggled with! > as LLMs are prone to BS I agree. The output sounds very convincing, and on a high-level it might make sense. If there are 3 layers: (a) high-level idea, (b) more deta
196.
▲
by
thomasmg
4y ago
Let me know if I can help! If you are interested in new developments in this area, I can recommend reading the papers of Stefan Walzer. His work is quite amazing.
197.
▲
by
thomasmg
4y ago
Yes! That's the implementation from the paper. There's also a Java implementation: https://github.com/thomasmueller/minperf
198.
▲
by
thomasmg
4y ago
Exactly. The reviews where blind in my case (even thought I heard that's not always the case, specially for journals). In my case, there were multiple problems, like missing proves (probabilities and examples are not enough), which I a
199.
▲
by
thomasmg
4y ago
About finding a minimal perfect hash function for a small set by brute force ("you'd be surprised to see how often you get lucky"): A few years ago, I spend (far too much) time in this rabbit hole, and invented a new algorith
200.
▲
by
thomasmg
4y ago
In the movie "Gifted" a girl calculates the approximate square root of a 4-digit number in her head. Here the scene on YouTube: https://www.youtube.com/watch?v=37meAwQqPsE Later, it is said she is using the Tracht
201.
▲
by
thomasmg
4y ago
I don't know if something like that would help, but in Switzerland there are annual measurement flights (with a helicopter): https://blog.alertswiss.ch/en/categories/focp-news/annual-ne... Part of this s
202.
▲
by
thomasmg
4y ago
You are right, heap sort doesn't need recursion, and is more efficient than shell sort for large arrays. But if you compare the code size, it is hard to beat shell sort. This is a Java version: static <T>void shellSort(T[]
203.
▲
by
thomasmg
4y ago
I wonder which type of Shell sort you were looking at. In my experience, it is fairly simple to implement gap sequence that is faster than O(n^2). Sure it is not a stable sort. But it is really simple (a few lines of code), doesn't use
204.
▲
by
thomasmg
4y ago
Natural gas already contains hydrogen. Up to 20% of hydrogen in natural gas doesn't sound all that dangerous. The article you linked says "if a hydrogen economy replaced the fossil fuel-based energy system and had a leakage rate o
205.
▲
by
thomasmg
4y ago
Natural gas infrastructure already deals with hydrogen: 2% of natural gas is hydrogen. For town gas which was used before (made from coal), hydrogen content was around 50%, so this isn't entirely new. Of course you can't re-use th
206.
▲
by
thomasmg
4y ago
You can add hydrogen to natural gas (using existing pipelines and storage), and so slowly replace that. No changes to existing infrastructure needed up to maybe 20% I think.
207.
▲
by
thomasmg
4y ago
The grid can handle everyone using electric cars. Yes some upgrades are needed, but they are needed anyway. See for example https://www.scientificamerican.com/article/why-electric-vehi... Electric car batteries are eve
208.
▲
by
thomasmg
4y ago
I don't want to write everything myself. (Well, I did write 3 relational database engines, and 4 query optimizers... Hypersonic SQL, PointBase Micro, H2 database, and the Apache Jackrabbit Oak query engine.) I want a good abstraction (
209.
▲
by
thomasmg
4y ago
> What we have is generally good enough Well, that can be said about any programming language (assembler, C,...) but yet there is innovation in this area still. And that's good. But in the database space, there is little innovation.
210.
▲
by
thomasmg
4y ago
> part of its purpose is to be back-end agnostic Low-level languages can be backend agnostic. For example C or Rust allows to write low-level code that is back-end agnostic, and doesn't cause cause vendor or technology lock-in. What
More ›