Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomasmg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
thomasmg
6mo ago
The point is that you don't need the very latest version. The 20 years old version is enough.
32.
▲
by
thomasmg
7mo ago
The syntax in Kotin is: "val name: String? = getName(); if (name != null) { println(name.length) // safe: compiler knows it's not null }" So, there is no explicit type conversion needed. I'm arguing for integer
33.
▲
by
thomasmg
7mo ago
Thanks a lot! I wasn't aware of Gleam, it really seems simple. I probably wouldn't say "learn in a day", any I'm not sure if it's simpler than Python, but it's statically typed, and this adds some complexi
34.
▲
by
thomasmg
7mo ago
I would be very interested in this research... I'm trying to write a language that is simple and concise like Python, but fast and statically typed. My gutfeeling is that more concise than Python (J, K, or some code golfing language) i
35.
▲
by
thomasmg
7mo ago
Well, the parent wrote "I honestly just don't believe that Rust is more complex to onboard to compared to languages like Python." And you wrote "The language itself is not more complex to onboard." So... to contract
36.
▲
by
thomasmg
7mo ago
> the article was not intended to users but to other language designers. That might be true, but it shows the direction that Rust is talking: put in the kitchen sink, just like C++ and Scala did. And _that_ is very much important for use
37.
▲
by
thomasmg
7mo ago
Hm, you claim that Rust and Scala are not more complex to onboard than Python... but then you say you never used Python? If that's the case, how do you know? Having used both, I do think Rust is harder to onboard, just because there is
38.
▲
by
thomasmg
7mo ago
> the only feasible compiler solutions to preventing division-by-0 errors are either: defining the behaviour, which always ends up surprising people later on, or; incredibly cumbersome or underperformant type systems/analyses which
39.
▲
by
thomasmg
7mo ago
Objects and structs are described in "Types" [1]. There are no typed unions currently (maybe I'll add them, not sure yet), but there are "Traits" [2]. [1] https://github.com/thomasmueller/bau-la
40.
▲
by
thomasmg
7mo ago
Since about two years I'm working on a new systems programming language [1] that is supposed to be nearly as fast as C, memory safe, and as concise and easy to learn as Python. Right now I'm trying to integrate Perceus, the ref-co
41.
▲
by
thomasmg
7mo ago
Optimizing requires a (performane) problem, and often needs a benchmark. In my view, the article is not about optimizing, but about understanding how things work under the hood. Which is interesting for some.
42.
▲
by
thomasmg
7mo ago
I asked ChatGPT to translate (the free version), pasting the source code. The resulting Java code came back a second later.
43.
▲
by
thomasmg
7mo ago
I got a convertion to Java. It worked (at least I think...) in the first try. Then I want to convert this to my own programming language (which traspiles to C). I like those tiny projects very much!
44.
▲
by
thomasmg
8mo ago
Your blogpost is great! Except for one detail: you have used modulo n. If n is not known at compile time, multiply+shift is much faster [1]. Division and modulo (remainder) are slow, except on Apple silicon (I don't know what they did
45.
▲
by
thomasmg
8mo ago
Yes. The problem is that most memory errors (out of bounds + use after free etc.) result in a vulnerability. Only a minority of the logic errors do. For operating systems kernels, browsers etc, vulnerabilities have a much, much bigger impac
46.
▲
by
thomasmg
8mo ago
Yes. His work is really inspiring, eg. the text editor less than 1000 lines, tiny language in less than 1000 lines etc. When I read this on HN, I converted his text editor to my hobby programming language [1] (330 lines), and then wrote a c
47.
▲
by
thomasmg
8mo ago
I tried to describe this in [1]: "Unsigned integer are intentionally not supported to simplify learning and using the language, to avoid surprising behavior and edge cases, and to reduce security issues and error-handling pitfalls. Whe
48.
▲
by
thomasmg
8mo ago
Cool! I just recently implemented a chess engine in ~400 (readable) lines, with all rules, first in Java and then ported to my own programming language "Bau" [1]. This is including a terminal UI. I'll measure the ELO, but I w
49.
▲
by
thomasmg
8mo ago
LLMs are good at predicting the next token. Basically you use them to predict what are the probabilities of the next tokens to be a, b, or c. And then use arithmetic coding to store which one matched. So the LLM is used during compression a
50.
▲
by
thomasmg
8mo ago
China: for Taiwan, they are in the planning phase. (Vietnam, Hong Kong, Tibet, Aksai Chin, Korea, Scarborough Shoal do not count in your view of course). Not saying they are worse than the US.
51.
▲
by
thomasmg
8mo ago
Yes exactly!
52.
▲
by
thomasmg
8mo ago
Right, it would be wasteful if it's done for each entry separately. But that is not needed. (I should probably write an article about this and a better implementation). The "succinct counting (blocked) Bloom filters" have two
53.
▲
by
thomasmg
8mo ago
Schubfach, Ryū, Dragonbox etc support round-tripping and shortest-width, which (it sounds like) is not important for you. The idea of round-tripping is that if you convert a double to a string and then parse that, you get the exact same val
54.
▲
by
thomasmg
9mo ago
Yes the count storage update is a bit slow. It could be implemented as a background thread, so that it is not blocking. It depends on the use case wheter this is a problem. The 'blocked' variant might be faster to optimize I assum
55.
▲
by
thomasmg
9mo ago
Yes, non-blocked is also possible. This would need a bit less space, and would be a bit slower. The counts > 1 (per bit that is set) are stored spearately, yes.
56.
▲
by
thomasmg
9mo ago
Yes, you would need a dynamic filter (eg. regular Bloom filter or cuckoo filter) for this, due to the insertions. Static filters are good for eg. leaked password lists, LSM trees (LevelDB, RocksDB), and so on.
57.
▲
by
thomasmg
9mo ago
There are many variants. It really depends on what features you need. Cuckoo filters were mentioned. If you want to add and remove entries and the regular counting Bloom filter are not good enough, I would look at the "succinct countin
58.
▲
by
thomasmg
9mo ago
I'm one of the authors. Feel free to ask anything.
59.
▲
by
thomasmg
9mo ago
The PDF standard uses base 85 encoding (Ascii 85).
60.
▲
by
thomasmg
9mo ago
I wonder, how can a programming language have the productivity of a high-level language ("write like a high-level language"), if it has manual memory management? This just doesn't add up in my view. I'm writing my own pr
More ›