Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
amavect
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
amavect
6mo ago
I hardly use automated formal methods. Disappointing, I know. I use it for thinking through C and Labview programs. It helps with recognizing patterns in data structures and reasoning through code. For example, malloc returns either null or
62.
▲
by
amavect
6mo ago
Not necessarily, I only argue for utility. You can find better justification in the Curry-Howard correspondence.
63.
▲
by
amavect
6mo ago
In constructive logic, a proof of "A or B" consists of a pair (T,P). If T equals 0, then P proves A. If T equals 1, then P proves B. This directly corresponds to tagged union data types in programming. A "Float or Int" c
64.
▲
by
amavect
6mo ago
I'm just having fun. I wrote out the full truth tables and Karnaugh maps on paper, but I trust that you get the idea and can recreate it yourself. (Or, I can write a more detailed blog post, if you'd find that interesting.) If I h
65.
▲
by
amavect
6mo ago
I'll use custom notation =? ≤≥? <? ≤? for comparison to distinguish from = < ≤. x =? x = True Otherwise, a =? b = False NaN ≤≥? NaN = False Otherwise, a ≤≥? b = a =? b -1.0 <? 0.0 = True -1.0 <? +1.0 = T
66.
▲
by
amavect
6mo ago
I love pure puzzles and completed SSR. The story consists of sign plaques that narrate the history of the fictional world, and how your player character fulfills their place in the world through the main goal of cooking sausages. A bit uniq
67.
▲
by
amavect
6mo ago
00 -> 0.0 01 -> +1.0 10 -> NaN 11 -> -1.0 Arithmetic: 0.0 + x = x NaN + x = NaN +1.0 + -1.0 = 0.0 +1.0 + +1.0 = NaN -1.0 + -1.0 = NaN -0.0 = 0.0 -(+1.0) = -1.0 -(-1.0) = +1.0 -NaN = NaN
68.
▲
by
amavect
6mo ago
Yet another reminder that we need approval voting, or even STAR voting, for single-winner elections. https://www.youtube.com/watch?v=yhO6jfHPFQU https://www.equal.vote/approval https://www.equal.
69.
▲
by
amavect
6mo ago
By not tracking file metadata through an index file, mtime-only incremental build systems trade a lot of reliability for only slightly more simplicity. https://apenwarr.ca/log/20181113
70.
▲
by
amavect
7mo ago
I'll also add this argument against RCV. https://www.youtube.com/watch?v=A1UzTeelguY
71.
▲
by
amavect
7mo ago
Can you share some actual evidence for your case? I really don't believe it. The anti-RCV story about Alaska 2022 holds that Palin spoiled round 1 of the instant runoff by splitting the vote with Begich, causing Begich to drop out. RCV
72.
▲
by
amavect
7mo ago
The author agrees with you. In the final paragraph, the author says that they allow ++ and -- when not using the value, as such use poses no harm. Also, you can use a comma with += and -=, for (int i=0, j=n; i<j; i+=1, j-=1) but k
73.
▲
by
amavect
7mo ago
For fun, my attempt to rewrite the functions. Eliminate ++ and pointer arithmetic by introducing a counter. Obviously less terse. void *my_memcpy(void *dst, const void *src, size_t n) { const uint8_t *s = src; uint8_t *d = dst;
74.
▲
by
amavect
7mo ago
Academic research concludes that ranked-choice and vote-for-one both result in a center-squeeze spoiler effect. https://en.wikipedia.org/wiki/Center_squeeze
75.
▲
by
amavect
7mo ago
I think the threat of unapproved candidates winning would lower a voter's approval threshold to include other candidates. Increasing the approval threshold happens when the voter likes all of the candidates, in which case there isn
76.
▲
by
amavect
7mo ago
>imo proof that ranked choice is absolutely needed Ranked choice still succumbs to a spoiler effect. https://realrcv.equal.vote/alaska22 https://www.youtube.com/watch?v=yhO6jfHPFQU Approval voting works
77.
▲
by
amavect
7mo ago
I feel the pain of old geezers. I grew up figuring out which pixels actually do something, like an adversarial game where UI un-designers make the useful buttons look less like buttons. uBlock Origin is the best ad blocker. The full uBlock
78.
▲
by
amavect
9mo ago
Newcomers keep tripping on Free Software vs Freeware, therefore "Free Software" doesn't describe well. We could call it Freedom Software. (There now exist 15 competing jargon files.)
79.
▲
by
amavect
9mo ago
Free Software should rename to Liberty Software. Instead, advocates loaned Spanish "libre" in the ugly FLOSS acronym (Free/Libre Open Source Software). If only we used "liberty" then we could stop quibbling over the
80.
▲
by
amavect
10mo ago
You're welcome. Here's also a video on simulating plurality, RCV, and approval voting. https://www.youtube.com/watch?v=yhO6jfHPFQU
81.
▲
by
amavect
10mo ago
>In my failing democracy Which nation, may I ask?
82.
▲
by
amavect
10mo ago
Lee Drutman advocates for ranked choice voting, but implementations in the USA still degenerated to 2 parties. RCV still has a spoiler effect. https://realrcv.equal.vote/alaska22 https://www.youtube.com/watc
83.
▲
by
amavect
10mo ago
We need to change the voting system in order to dissolve the two party system, per Duverger's law. Ranked choice voting will not work. Approval voting or STAR voting would work. https://www.equal.vote/
84.
▲
by
amavect
11mo ago
No problem. While fuzzy graphing has existed for a long time as contour plots, I'd still like to encourage you to experiment more. The colors look pretty. :) I have a suggestion. Calculate z=left-right without absolute value, and try m
85.
▲
by
amavect
11mo ago
I thought the same, so I programmed the examples into Desmos 3D (click the show/hide buttons on the left). https://www.desmos.com/3d/3divdux6jh Dropping the absolute value makes a better visualization. The 3D grap
86.
▲
by
amavect
1y ago
That trades "min <= max" with "min + interval <= MAXINTEGER": if(number < min) return min; else if(number < min + interval) return number; // "if(number < max)" else return min
87.
▲
by
amavect
1y ago
You implicitly used an axiom to ignore the differences between the apples. Someone else could use different axioms to talk about the sizes of the apples (1 large + 1 small = ?), or the color of the apples (1 red + 1 green = ?), or the taste
88.
▲
by
amavect
1y ago
Some other definition fun: Should we define 0 both positive and negative, or neither positive and negative? Does monotonically increasing mean x<y -> f(y)<f(x) or x≤y -> f(x)≤f(y)? Should we deny the law of excluded middle and u
89.
▲
by
amavect
2y ago
Like you, I have no idea what use the unique 0-sized pointers would provide. SANE_REALLOC_EMPTY is certainly adequate for me. Thank you!
90.
▲
by
amavect
2y ago
I forgot to mention my own opinion. I think that malloc(0) ought to return a 0-sized object, and likewise realloc(ptr, 0) ought to resize the object to 0. Malloc and realloc always allocating feels more consistent to me. For a practical exa
More ›