Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
justinpombrio
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
justinpombrio
2y ago
That's an ordinary argument type. Like: void my_function_to_connect_to_server( Network network, int port, String server_name ) It's not categorically different than the other arguments, and doe
32.
▲
by
justinpombrio
2y ago
No it's not. I'd guess you're imagining a type signature like this one? void effect:Network my_function_to_connect_to_server() { ... } I mean a type signature like this one: void my_function_to_conn
33.
▲
by
justinpombrio
2y ago
That's what I'm calling capabilities at the application level (where you say "this .jar can't access the network"), rather than at the language level (where you say "this function wasn't given access to th
34.
▲
by
justinpombrio
2y ago
You can do a lot with capabilities at the language level, if the language supports it. It doesn't require effect types: it's extremely boring from a type system perspective, which is an advantage. Imagine these changes to a langua
35.
▲
by
justinpombrio
2y ago
Any idea how the executive orders will effect trans people renewing their passports? A trans friend already changed the gender marker on his passport, and it's expiring in two years. He's deciding whether to renew it ASAP or wait.
36.
▲
by
justinpombrio
2y ago
But it's so little hassle: just send the blog author an email saying vaguely what the problem is! Someone emailed me about an issue with my RSS feed once. I don't remember what the issue was anymore, but I was grateful and I fixed
37.
▲
by
justinpombrio
2y ago
Stating that more precisely, if you pick a real number uniformly from the range [0, 1), the probability that it's rational is 0. One way to see this is to imagine a procedure for picking the number: - Start with "0." - Roll a
38.
▲
by
justinpombrio
2y ago
I'm away tonight, but the source code is there if anyone wants to make that change. I imagine it would make the mazes a lot smoother.
39.
▲
by
justinpombrio
2y ago
Walk with a green wall to your right, and a blue or white wall to your left. It's a long path, but shouldn't be too hard to see? I remember being amused that Paint's flood fill could be used to solve mazes. It shows that floo
40.
▲
by
justinpombrio
2y ago
How do you deal with putting information in your error messages? My understanding is that Zig errors can't contain any data. But an error message like "file not found" is awful . Are your error messages awful, or is there so
41.
▲
by
justinpombrio
2y ago
Maybe for some people. Personally I find the concatenative calculus more natural to think about/in than the lambda calculus!
42.
▲
by
justinpombrio
2y ago
> The lambda calculus is only more useful because it's become the basis for a lot of existing programming languages. But there's a reason for that. Functions make a good basis for programming languages. It's not the only g
43.
▲
by
justinpombrio
2y ago
Quick summary: It's a programming language whose programs (and whose values) are unlabeled trees. An unlabeled tree is a tree-shaped data structure whose nodes hold no data. The children of a node are ordered, though. The "Tree
44.
▲
by
justinpombrio
2y ago
From Wikipedia[1]: A poll of 72 "leading quantum cosmologists and other quantum field theorists" conducted before 1991 by L. David Raub showed 58% agreement with "Yes, I think MWI is true".[85] Max Tegmark reports the re
45.
▲
by
justinpombrio
2y ago
Location: Cambridge, MA Remote: Yes Willing to relocate: No Technologies: Rust, C++; JS; Python; Java; FHIR/HL7v2 Resume: https://justinpombrio.net/about-me/resume.pdf Email: On resume About me: PhD in programming
46.
▲
by
justinpombrio
2y ago
We do sort of do that, with state laws. Different states try out different laws, and copy laws from other states. Ideally a state will repeal laws that don't work well, and copy laws from other states when they work well. In practice i
47.
▲
by
justinpombrio
2y ago
https://www.wolframalpha.com/input?i=prime+factors+of+12
48.
▲
by
justinpombrio
2y ago
The implicit context that the poster removed (as you can tell from the indentation) was a function definition: def factorize(n): ... return prime_factors
49.
▲
by
justinpombrio
2y ago
> Can you spot all the problems? You were probably being rhetorical, but there are two problems: - `p = 2` should be outside the loop - `prime_factors.append(n)` appends `1` onto the end of the list for no reason With those two changes I
50.
▲
by
justinpombrio
2y ago
That's correct on two fronts. First, I put "false" in quotes everywhere for a reason: I'm talking about the sort of thing that people would say is false, not what's actually false. And second, yes, I'm merely c
51.
▲
by
justinpombrio
2y ago
> If the program was trained on a thousand data points saying that the capital of Connecticut is Moscow, the model would encode this “truthfulness” information about that fact, despite it being false. This isn't true. You're co
52.
▲
by
justinpombrio
2y ago
You're handwaving, but I think there is a middle-ground in this proof: Sum(i=1..n, i) = Sum(i=1..n/2, i) + Sum(i=1..n/2, n+1-i) = Sum(i=1..n/2, n+1) I'm still interested in the general question, of whether some pr
53.
▲
by
justinpombrio
2y ago
If two programs are equivalent, you can typically show that they're equivalent with a sequence of small refactorings. Replace `x + x` with `2 * x`. Inline that function call. Etc. Can you do that with these two proofs? What's a pr
54.
▲
by
justinpombrio
2y ago
Some proofs that aren't "essentially the same": 1. Prove that the interior angles of a triangle sum to 180 degrees. First proof: draw a line parallel to one of the triangle's sides passing through its opposite vertex. Th
55.
▲
by
justinpombrio
2y ago
This is one of the puzzles at BrainBashers: https://www.brainbashers.com/battleships.asp
56.
▲
by
justinpombrio
2y ago
You should email them and tell them they're not in compliance with that regulation. IBM will have lawyers who care, so you might be able to stop that spam not just for yourself but for everyone.
57.
▲
by
justinpombrio
2y ago
Unsubscribe links are a fantastic regulation, but there is a workaround. I must have received at least a dozen emails from Brown after graduating despite unsubscribing to every email they sent. The trouble is they're endlessly creati
58.
▲
by
justinpombrio
2y ago
You can do that in a couple different ways in Typst. First, if the user passes content into the template, then it's the user's content that ultimately gets to choose its styling. That is, there are three places that a style can be
59.
▲
by
justinpombrio
2y ago
I imagine you're projecting how LaTeX works onto Typst, though despite years of use and a PhD in PL I never really figured out how LaTeX works so I'm not certain. I don't think Typst has a lot of global state to get corrupt
60.
▲
by
justinpombrio
2y ago
Regardless of how big a bomb is, there's going to be a distance at which it's no longer immediately lethal. Inside that radius you die quickly, outside you die slowly.
More ›