Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
PeCaN
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
PeCaN
7y ago
Type checkers are actually surprisingly easy to write. I recommend learning about unification (in the logic sense), maybe just by playing around with Prolog. After you understand that I think type checking is rather easy to figure out (it&#
32.
▲
by
PeCaN
7y ago
Prolog is fun. It's fantastically fun. It's maybe one of the most fun programming languages in existence. I suppose most people who, in production, have to solve the sort of problems that Prolog is really good at are using some so
33.
▲
by
PeCaN
7y ago
>Do you think all rust developers are connected together like some sort of hivemind? They do do a pretty damn good job of giving people this impression.
34.
▲
by
PeCaN
7y ago
err are you forgetting about GCC or something (also theres emacs and 50 years of bloat have led to libc and common unix utilities ending up surprisingly complicated but i digress)
35.
▲
by
PeCaN
7y ago
Agner Fog's instruction tables list it as issuing ~23 fused uops (a bit more or fewer depending on generation) and a throughput of 1 per ~32 cycles. That seems like it could be microcoded.
36.
▲
by
PeCaN
7y ago
Programming languages aren't literal businesses who the hell cares about ""frontloading their value"" mein gott. There's no reason to force your startup world ""wisdom"" on programming langu
37.
▲
by
PeCaN
7y ago
congratulations you write horrible software
38.
▲
by
PeCaN
7y ago
It's very much a "this is productive for me and fits how I think, maybe to the exclusion of making sense to other people" project. It's closest to J or Dyalog APL but with a much different syntax that aims to make it mor
39.
▲
by
PeCaN
7y ago
>A prefix tree for searches? Done, but that didn't need well formed text/strings for it to work. I think this does need "well formed" strings and the complexities of Unicode. Is a a prefix of ä? Is 앉 a prefix of 앉다
40.
▲
by
PeCaN
7y ago
Well, yes, but we gotta stop somewhere or just give up any hope of computers operating on text. Although I think grapheme clusters are a pretty good approximation in that it's usually what you want to backspace in a word processor.
41.
▲
by
PeCaN
7y ago
(I consider "formatting" under "manipulating". Parsing too, actually. Really anything where you have to consider the parts of the string individually and not just the whole.) By and large I think you're right; as th
42.
▲
by
PeCaN
7y ago
No; symbols are opaque; to manipulate them at all you have to convert them to strings. (For example you can't concatenate or reverse :foo and :bar or iterate over their characters.)
43.
▲
by
PeCaN
7y ago
The "tokens" you're thinking of are "grapheme clusters" in Unicode. Unfortunately just reversing by grapheme clusters doesn't solve the problem because of directional formatting codes; if you have e.g. a right-
44.
▲
by
PeCaN
7y ago
It's definitely pretty leaky (just prompting the user for a filename already breaks it; you either leak the rules for machine strings to the user or you pray to god they don't enter something too weird). However the problem with i
45.
▲
by
PeCaN
7y ago
Iterating from back to front doesn't work either; you probably (depending on what you're doing) still have to segment into grapheme clusters—which is stateful as of unicode 9, so you have to start from the beginning of the string.
46.
▲
by
PeCaN
7y ago
Unicode strings are really, really hard. I'm working on a programming language sort of like K or APL. Among other things it has "good" unicode support (I'm fully convinced such a thing is even possible). It introduces a
47.
▲
by
PeCaN
7y ago
Eh? The LuaJIT and K interpreters definitely fit into L1 instruction cache. (And have since well before 2013 probably.) Honestly I would be kind of surprised if most interpreters for reasonably small languages don't fit into icache. Su
48.
▲
by
PeCaN
7y ago
Maybe I should've said a "screen" instead of a "page" (if you have two files open side-by-side and they both fit on your screen it's the same benefit). And I admit it is slightly hyperbolic (to make a point abo
49.
▲
by
PeCaN
7y ago
What does "legibility" really mean? Presumably it means something like the ease of going from looking at code to understanding what it does and how, and having a mental model to reason about the code and what modifying it will do.
50.
▲
by
PeCaN
7y ago
i mean, it's the cops, what do you expect exactly
51.
▲
by
PeCaN
7y ago
This seems unlikely since many are edible and some (e.g. potato, eggplant, tobacco) were eaten concurrently with the tomato confusion in Europe.
52.
▲
by
PeCaN
7y ago
'just use rust' is like some 2010s advice everyone's moved on to ATS now
53.
▲
by
PeCaN
7y ago
>There's no reason a C99 compiler can't do those optimizations. No, there actually is, the C standard says structs have to be laid out in memory in the same order they're written and C has much weaker aliasing rules.
54.
▲
by
PeCaN
7y ago
OllyDbg is technically dead but it still works as well as ever (for 32-bit software). I still break it out sometimes. I find it much smoother to use than x64dbg (maybe just due to using it more, but I do think OllyDbg nailed the debugger ex
55.
▲
by
PeCaN
7y ago
Factor is definitely not that small (there's a full optimizing compiler and a giant standard library…) and doesn't run on any embedded platforms. It's more like C# than like Forth in terms of usage scenarios.
56.
▲
by
PeCaN
7y ago
Sun made a windowing system based on (Display) PostScript way back https://en.wikipedia.org/wiki/NeWS
57.
▲
by
PeCaN
7y ago
"don't install software because it could be bad"
58.
▲
by
PeCaN
7y ago
Linear types (and affine types, as in Rust) only buy you some memory safety (preventing use-after-frees, and memory leaks although that's not really a safety issue). The more important part of memory safety is preventing out-of-bounds
59.
▲
by
PeCaN
7y ago
this is the philosophy that brought us software like atom and slack
60.
▲
by
PeCaN
7y ago
that sounds perfect for data scientists and machine learning 'engineers'
More ›