Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
301.
▲
by
cb321
2y ago
By separating "seek" (min/max/key/nth) from "edit" (in-del) and "balance" (AVL, red-black, etc.) operations, you can indeed cover a lot of bases as elaborated here: https://github.com&
302.
▲
by
cb321
2y ago
Some here are questioning the motivation of this data structure. It is well motivated at least in the context of time series. We (almost) all learn 2 things at very young ages: 1) the world changes and 2) even one wild point can pollute a
303.
▲
by
cb321
2y ago
Nim ( https://nim-lang.org/ ) originally had "syntax skins" with thoughts like these in mind.. e.g. braces vs. indent for block structure as per user-preference. The particular feature was unused enough to be dropp
304.
▲
by
cb321
2y ago
Besides the ideas from istjohn, empath-nirvana, and rcarmo, you can also just "flip the script": solve for epsilon and report that as 1-delta confidence interval for the worst case data distribution as here: https://new
305.
▲
by
cb321
2y ago
You just solve for epsilon. That's what I did: https://news.ycombinator.com/user?id=cb321
306.
▲
by
cb321
2y ago
I agree the paper is better than the blog post, although one criticism I have of the CVM paper is that it has some termination/algo exit condition instead of what Knuth's CVM notes (refed else-thread here) do which is just a loop
307.
▲
by
cb321
2y ago
How big was your thresh ? I found it pretty accurate: https://news.ycombinator.com/item?id=40388878
308.
▲
by
cb321
2y ago
This Nim program might clarify some things for someone. import std/[random, math, sets, times]; type F = float template uniqCEcvm*(it; xfm; k=100, alpha=0.05): untyped = ## Return (unbiased estim. cardinality of `i
309.
▲
by
cb321
2y ago
Or you could just use Nim ( https://nim-lang.org/ ) and pass code blocks with templates and/or define iterators for your types - whichever best fits your use-case (with ahead-of-time compilation to native binary executab
310.
▲
by
cb321
3y ago
I think of what you say as really just the first step on the path to the parsing state machine in the c2tsv.nim (or /c2dsv.c in the same folder) thing I mentioned above which have comments in their source code. I think it helps to thin
311.
▲
by
cb321
3y ago
That's right - pure splitting is much more SIMD-friendly than..the whole syntax melange. This is another charm to the "partitioned" design. The conversion to split-parseable TSV can run on its own CPU core and the SIMD spli
312.
▲
by
cb321
3y ago
Don't just parse - convert. In a pipeline to split-parseable data, if you like, such as the possibly smaller, faster, and more general: https://github.com/c-blake/nio/blob/main/utils/c2tsv.nim
313.
▲
by
cb321
3y ago
For a prior generation of karpathy-splaining this is this Nim port: https://github.com/Vindaar/llama2nim - maybe of interest if you are interested in Mojo.
314.
▲
by
cb321
3y ago
People have been bandying about "10 lines of C", but I'm curious if you know why the protocol is not "2 characters " of shell, namely ":>PATH" (ok, ok, PATH is probably something like /run/se
315.
▲
by
cb321
3y ago
Fair enough - I agree that sophistication inspires the presumption, but it's still just that (not that you said otherwise - just emphasizing). Anyway, I've yet to hear of anything in the xz work beyond the ability of 1-3 skilled b
316.
▲
by
cb321
3y ago
Why are people assuming it's any intelligence service/state actor? With cryptocurrency valuations, it would seem like remote rooting gajillions of machines would be highly incentivized for a private person/collective. Not
317.
▲
by
cb321
3y ago
To amplify your "comma right after", the call can even be simply: some_function(proc(a: int): int = a, proc(b: int): int = b) And Nim lets you put ()s in a great many places to resolve problems. I find its syntax quite a
318.
▲
by
cb321
3y ago
I agree with your disagreement. As a case in point, Nim has packed bitfields but various choices in automatic memory management. As a concrete example, a spell-check custom-data store uses them here: https://github.com/c-b
319.
▲
by
cb321
3y ago
> I have no experience making a live always-running Nim application, so I can't speak to that. But in the context I use it, it's incredible. I have done this several ways quite successfully. Firstly, instead of "%cpu"
320.
▲
by
cb321
3y ago
1967 Star Trek presented one take on this idea: https://en.wikipedia.org/wiki/A_Taste_of_Armageddon
321.
▲
by
cb321
3y ago
I will try to be more concrete than I was (though I did link to some Nim/shell that "does it all" the 2nd way I mentioned). j.py: import multiprocessing as mp, contextlib as cl, time def f(x): name = mp.curr
322.
▲
by
cb321
3y ago
You could also just send output to separate files by re-opening stdout/stderr and use https://www.vanheusden.com/multitail/index.html (or GNU screen or tmux or whatever) to multiplex a terminal in a more organized
323.
▲
by
cb321
3y ago
Nim indeed has UFCS. So you can get an i.fizzBuzz notation without any fussing about with "objects": proc fizzBuzz(i: int): string = if i mod 15 == 0: "FizzBuzz" elif i mod 3 == 0: "Fizz"
324.
▲
by
cb321
3y ago
Though the pool of students was biased towards those who excelled in high school which post 1980..1990 probably means some prior exposure (i.e., not your "total beginners"), this was a big part of the original idea behind SICP-6
325.
▲
by
cb321
3y ago
I am looking at a 1989 paper by Beetem & Beetem [1] but then it was called Galaxy.. I agree "much older" might be a bit.. much. Haha. EDIT: Joking aside, I would love to hear a compare & contrast between Galaxy/Gala
326.
▲
by
cb321
3y ago
Those interested in XL may also find the much older GalaxC by John Beetem interesting: https://community.element14.com/technologies/fpga-group/b/bl...
327.
▲
by
cb321
3y ago
If you liked Pascal and like Python and prioritize the things you mentioned and are considering languages as young/rough as Zig not directly compatible with C but with easy declare-and-go FFIs, then Nim https://nim-lang.or
328.
▲
by
cb321
3y ago
BTW, in the original article I believe the "table based" hashing Dan alludes to is some kind of BuzHash and even mentions it probably being faster. I also just noticed that one of your intended applications is DNA sequences. For
329.
▲
by
cb321
3y ago
I timed the Buz Hash ( https://en.wikipedia.org/wiki/Rolling_hash#Cyclic_polynomial ) at about 1.38 cycles/byte on Skylake generation - but only to "hash in" (i.e. no hash-out). At 6Ghz that should transl
330.
▲
by
cb321
3y ago
Yeah.. FlexSC / Soares is my favorite paper from OSDI 2010. The system call batching with "looped" multi-call they mention there relates to the roughly 30 line (not actually looping ) assembly language in my other comment h
More ›