Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sebcat
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
241.
▲
by
sebcat
10y ago
Good point. I added a new branch where I broke the "literal" rule into multiple rules and added some comments where I try to explain what's going on in English. I also added an achor to it in the master README.md. I find it a
242.
▲
by
sebcat
10y ago
Nice work! I agree with you regarding LPeg values as first class objects in Lua. It's a really nice fit, and a much nicer way to solve parsing problems than using flex/bison IMO. Having it in Lua allows for pretty fast code-writin
243.
▲
Show HN: Using Parsing Expression Grammars to rewrite source code
(github.com)
63 points
by
sebcat
10y ago
|
26 comments
244.
▲
by
sebcat
10y ago
What is a system call in Forth? NEXT (load an address and jump to it)? If so, yes, forth "system calls" are faster than Plan 9s, but only because Forth doesn't have the separation of user-/kernel land. It's really n
245.
▲
by
sebcat
10y ago
A pilot can correct by giving more power. Someone in an unpowered suit with ~3:1 glide ratio starting to recognize a stall while flying over terrain is already dead.
246.
▲
by
sebcat
10y ago
People fly at max glide too close to terrain which leaves them with no options. If people instead flew fast, they could transfer that speed to lift if they find themselves in the corner, but if you're at max glide you can't really
247.
▲
by
sebcat
10y ago
I stood in line at a grocery store recently where the POS terminal failed and they started letting through people who could pay in cash. When they announced that, a hipster-looking guy in front of me commented "who uses cash in 2016?&q
248.
▲
by
sebcat
10y ago
> I don't want M:N threading as Go implements it. As someone who writes code for enterpricey businesses doing a lot of I/O bound stuff, golang style M:N threading is a godsend over Java's standard library, and other common
249.
▲
by
sebcat
10y ago
I once came across a bug in a codebase I inherited that parsed URI-references from HTML documents. That bug was caused by using that very same regular expression. The string "foo" correctly gets parsed as a path (group 5). However
250.
▲
by
sebcat
10y ago
I use mitmproxy and mitmdump a lot. I really recommend it. Someone else said it's not easy to hack on, I do not agree. It's a really approachable project and great if you're doing anything HTTP related. That said, there are s
251.
▲
by
sebcat
10y ago
you call fstat on the opened file descriptor and compare device IDs and inodes, as was done in the referenced OpenBSD patch from -96: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/mail.lo... EDIT:
252.
▲
by
sebcat
10y ago
Or just review the code. It's not hard, and if you add a dependency to your code base you should review it. If you lack the ability, time or <insert random excuse here> then you should not add it as a dependency. DRY only goes so
253.
▲
by
sebcat
10y ago
The plaintext TLS part reminded me of the "SSL added and removed here :v)" slide regarding google's infrastructure
254.
▲
by
sebcat
10y ago
Sometimes I let my biases get the better of me. Thanks for the reference.
255.
▲
by
sebcat
10y ago
I understand the rationale for this (performance), but it scares me a bit to have something as complex as a TLS stack running in kernel-space, which I assume it will do.
256.
▲
by
sebcat
10y ago
Use of DSLs and tools like flex and bison makes the implementation a whole lot more reliable (but only if they're used, and some commonly run languages have a very implementation-specific grammar). consider: input: /* emp
257.
▲
by
sebcat
10y ago
> I don't have high hopes for this algorithm, because my intuition is that transactions aren't common enough to make a big difference. Every served request by net/http#Server, net/rpc#Server and similar gets its own g
258.
▲
by
sebcat
10y ago
> They wouldn't have to let war refugees and asylum seekers in, though Other EU states would give them citizenship (or residency) though
259.
▲
by
sebcat
10y ago
Career-wise, I came from a proprietary package management system to a red hat based one, and I don't know what you're talking about. Why do you think that spacewalk is kinda terrible, and why is working with rpm a real bummer? Per
260.
▲
by
sebcat
10y ago
If you're not using fork, dup2, execve instead of popen, you deserve what you get.
261.
▲
by
sebcat
10y ago
Those "features" would be built into the platform. Instead of having the return stack and the parameter stack share memory space, the stacks would be kept separate by design. Instead of having malloc_chunks, the MMU would keep all
262.
▲
by
sebcat
10y ago
Maybe the machine is at fault? Maybe the problem is not with C, but with a hardware architecture that does not offer finer granularity than page allocations? What if everything returned from malloc() would be bound checked by hardware? What
263.
▲
by
sebcat
11y ago
The good security guys don't work a hospital security job. As with everything else, you get what you pay for. The calm, humble, balanced types go for greener pastures.
264.
▲
by
sebcat
11y ago
There was a code base where people wrapped glibc-functions. Most of the time it was straight calls to the corresponding functions in glibc, but they were called x... instead, so malloc became xmalloc, free became xfree, &c. At one time
265.
▲
by
sebcat
11y ago
> Especially with containers, this is a never-ending target... They apparently have user namespaces, but what about network namespaces or IPC namespaces? There's no reason calls to e.g. unshare(2) and setns(2) can't be added to
266.
▲
by
sebcat
11y ago
I don't understand. How is using ForkExec, Wait4 forcing you to use threads? What do you mean with "You basically can't do anything with file descriptors or containers at all with this model."? It is possible to pass a P
267.
▲
by
sebcat
11y ago
Sandboxing is great. Isolate certain functionality in a separate process, sandbox it with OS-provided solutions like seccomp-bpf or capsicum, make it terminate on a violation, design its API to be idempotent so you can just restart the proc
268.
▲
by
sebcat
11y ago
The problem is the PKI. For your own services, you can have your own PKI, and the issue of "trust one, trust all" is not really an issue anymore because you would only trust your own certificates for your own services. The problem
269.
▲
by
sebcat
11y ago
Dan Kaminsky had a good talk[1] regarding this on 26c3, where he essentially argued that the only reason we have TLS at all is because companies selling stuff over the Internet wants to make it seem secure for the customer. State actors or
270.
▲
by
sebcat
11y ago
My experience is the same. Go mitigates pointer problems very well by having zero values and explicitly separating error returns. If anyone complains about having nil in Go, I usually assume they're either forced to work a really bad c
More ›