Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jbert
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
31.
▲
by
jbert
12y ago
Excellent post. Your type-based approach is a very useful tool for thinking about things which I find difficult. Thanks for that.
32.
▲
by
jbert
12y ago
Nice. It looks like that's effectively using true/false (as defined via lambda) as the two constants and inlining the "if true" and "if false"?
33.
▲
by
jbert
12y ago
I like the definition of cons/car/cdr in terms of lambda. A cons cell is just a function you can call to get back the car or cdr. Once you have 'if' and any two constants, you can do: (define mcons (lambda (a b)
34.
▲
by
jbert
12y ago
Using setf is a nice example of something which a macro can do which a function cannot (as well as being a good example of code-is-data). Lots of posts discussing lisp macrology lack that kind of compelling use case. The 'magic' u
35.
▲
by
jbert
12y ago
So, immutability and/or api contract is important here. If I'm pulling in a function, I want it to do what I think I want. Sometimes I want that to change (get a bug fix), but sometimes I don't (someone introduces a bug, or m
36.
▲
by
jbert
12y ago
Why try and be so clever? I'd hate to be tracing a problem and find code deep in a lib trying to do that. It's OK-ish to expose such things in explicit API, but then you put the burden of choosing (and updating) such constants on
37.
▲
by
jbert
12y ago
> You can certainly set reasonable limits. No, not really. Not unless you plan to review them every few years or so. Which no-one will ever do. The point about exponential allocation is that it is scale-independent. It doesn't depen
38.
▲
by
jbert
12y ago
Dumb question - if problem is a latency spike in the parent, any chance you can continue serving in the child and let the parent do the BGSAVE (and take the latency spike)? (The child should be able to inherit all open fds?)
39.
▲
by
jbert
12y ago
To me, the interesting thing in terms of building reliable, performant systems is what do you want to do when the request rate (incoming desired throughput) exceeds your possible throughput. Broadly, you have to choose between quickly faili
40.
▲
by
jbert
12y ago
Seconded. That is a great read to help improve your understanding of the C runtime environment (stack frames, longjmp etc).
41.
▲
by
jbert
12y ago
It's pretty interesting to read into the original "broadcast" ethernet specs. The "thick yellow wire" and the "coax" both had a single broadcast domain for all devices on the segment. You then linked segme
42.
▲
by
jbert
12y ago
I guess I would prefer that SMTP "skip over" the CA/DNSSEC model and go straight to something like HSTS+TACK to add the expectation of validity to the expected certs, rather than place trust in the DNSSEC roots. I guess DANE
43.
▲
by
jbert
12y ago
Thanks for that. Do you have an understanding of what would happen if SMTP servers switched to demanding TLS (i.e. bouncing the message if next hop doesn't offer STARTTLS?) with validated certs? It would hurt mail reachability, but are
44.
▲
by
jbert
12y ago
Doesn't this just swap the existing set of trusted CAs (used to bootstrap TLS trust) for a new set of trusted DNS root operators (used to bootstrap DNSSEC trust)? Surely if you're worried about state actors, this is no help?
45.
▲
by
jbert
12y ago
I use this http://pastebin.com/HDJvD3GC which as I say isn't my own work (although I've tweaked it a bit). It depends on some git output strings, so is theoretically fragile but in practice has been stable over a
46.
▲
by
jbert
12y ago
Slightly related, I get a lot of value out of a bash prompt which tells me: - if my git repo is dirty (uncommitted changes) - which branch it is on - if (and how many) changes I have stashed It's not originally my work but I find it ma
47.
▲
by
jbert
12y ago
At a guess (after 1 min grep), this is the original code (from an old copy of the HN src). afaics, that's the code to render the entire table for all the stories (plus the 'more' link), including the html (note the inline &#x
48.
▲
by
jbert
12y ago
No, aiui, the trust model is the same. If a peer announces routes to you, all you can do is: - throw away "martians" (routes to known-reserved/bad parts of IP space) - throw away stuff you know they shouldn't be announ
49.
▲
by
jbert
12y ago
Thanks for that. I hadn't realised that most (large) commodity systems these days had a NUMA setup. I thought it was relegated to the more esoteric end of things (super computer setup, single-system-image clusters). Thanks - I can see
50.
▲
by
jbert
12y ago
> The biggest insight was this: memory behaves like complex block storage, with everything implied with respect to optimization, if you really care about performance. Could you describe the factors causing that? Is it just the cacheing h
51.
▲
by
jbert
12y ago
Would you get simpler (faster) ops if you stole the high bit instead of the low bit? e.g. x+y becomes (x + y | (1<<63)) Or does the loss of overflow detection hurt you more?
52.
▲
by
jbert
12y ago
Nice. I hadn't thought of there being a limit (due to vacuum) to sound intensity. Reminds me of this recent comment on reddit: http://np.reddit.com/r/space/comments/2h9y9g/the_first_launc... "t
53.
▲
by
jbert
12y ago
When bytes count (and they often don't, but in this case they probably do), what would be your preferred system? And what do you see as your favoured approach's main advantage(s) over ASN.1/BER?
54.
▲
by
jbert
12y ago
> Now open the compiled `main` file in a text editor and search for this text: FYI, the unix utility 'strings' has this as it's raison d'etre.
55.
▲
by
jbert
12y ago
Awesome app. I was thinking about something like this recently for a niche. I was going to ask how you direct the SMS to the app, but taking a quick look at the src, it seems the app reads the sms inbox, looking for the specific phone numbe
56.
▲
by
jbert
12y ago
I was thinking about that. I think the way to do the test would be to put in a known key value, then call the platform-specific equivalent of "abort and write a core file". The test would then grovel through the core looking for t
57.
▲
by
jbert
12y ago
Can you play the game the other way and "fail safe"? i.e. declare the storage volatile but running your crypto code on a non-volatile ptr to it (obtained via cast) to get your performance back? If the compiler then generates enoug
58.
▲
by
jbert
12y ago
This is amazing technology - but I'm curious as to how unusual it is? The article says "It feeds (fed) power from the Scattergood Steam Plant in El Segundo to a distribution center near Bundy and S.M. Blvd." Are most power s
59.
▲
by
jbert
12y ago
I have a pet theory as to why rubberducking works. Basically I think it uses some additional brain machinery to check the metadata on our facts - i.e. how reliable are each of the 'facts' we are using in our reasoning. I tried to
60.
▲
by
jbert
12y ago
I think that also works if the link is actually to the immutable commit to which the branch is currently pointing?
More ›