Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
trealira
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
121.
▲
by
trealira
1y ago
Forgot about that lol, my bad. I was really thinking of deriving the equivalent of catamorphisms.
122.
▲
by
trealira
1y ago
So a news site had some report that indicated that Amazon was considering displaying the cost of the tariffs next to the prices on their website. Trump responds to it as though it were fact. The headlines imply it's fact and not just a
123.
▲
by
trealira
1y ago
I do think recursion schemes are pretty cool, particularly the idea that a list fold could be generalized to the concept of catamorphisms, which could be mechanically derived upon defining a data structure, because the shape of the recursio
124.
▲
by
trealira
1y ago
Yeah, if it has built-in support for generators, it basically makes the state machine implicit for you, which is nice and convenient; it's like going from having to manage your own stack call stack to using a programming language that
125.
▲
by
trealira
1y ago
I feel like programming an iterator like this akin to a state machine is just not that convenient or trivial, though. Below is pseudo-Java. class InOrderTreeIterator { Stack stack; TreeNode cursor; InOrderTreeIterator
126.
▲
by
trealira
1y ago
Yeah, I actually recently tried making a game in Lua using LOVE2D, and then making the same one in C with Raylib, and I didn't feel like Lua itself gave me all that much. I don't think Lua is best for game logic so much as it'
127.
▲
by
trealira
1y ago
I wouldn't say it's a non-issue. I've played 2D tile-based, pixel art games where the framerate dropped noticeably with too many sprites on screen, even though it felt like a 3DS should have been able to run it, and my comput
128.
▲
by
trealira
1y ago
I'm also making plans contingency plans to move, but I may not be able to. Individually, no, we don't have power, but if everyone actually protested, we would - the Ukrainian revolution[1] started out as just mass protests (Euroma
129.
▲
by
trealira
1y ago
I'm interested in hearing how considering the document as a whole leads to a different conclusion.
130.
▲
by
trealira
1y ago
You seem to be quite blasé about the possibility of autocracy. But yes, there is a risk that Trump becomes a dictator and we're no longer a nation of laws. It depends on how people like us react to consolidations of power like this, or
131.
▲
by
trealira
1y ago
The context is that it's a footnote. The footnote is referenced in this paragraph: A postfix expression followed by the . operator and an identifier designates a member of a structure or union object. The value is that of the named me
132.
▲
by
trealira
1y ago
Maybe, but we were talking about "undefined behavior," not "UB," so the point is moot.
133.
▲
by
trealira
1y ago
That's fair. In the end, what matters is how C is implemented in practice on the platforms your code targets, not what the C standard says.
134.
▲
by
trealira
1y ago
It doesn't. That commenter is saying that in C99, it was unspecified behavior. Since C11 onward, it's been removed from the unspecified behavior annex and type punning is allowed, though it may generate a trap/non-value repre
135.
▲
by
trealira
1y ago
I actually might, although not now. Thanks for the link. I'm surprised he directly contradicted the C standard, rather than it just being a misunderstanding.
136.
▲
by
trealira
1y ago
> In C99, it was made expressly legal, but it was erroneously included in the list of undefined behavior annex. In C99, union type punning was put under Annex J.1, which is unspecified behavior, not undefined behavior. Unspecified behavi
137.
▲
by
trealira
1y ago
From a draft of the C23 standard, this is what it has to say about union type punning: > If the member used to read the contents of a union object is not the same as the member last used to store a value in the object the appropriate par
138.
▲
by
trealira
1y ago
Late response, but yes, you are completely right. You wouldn't use either implementation whether you're using Python or Haskell; you'd use what you said, because that's both the most obvious and the most performant metho
139.
▲
by
trealira
2y ago
Buffer overflow vulnerabilities are prevented with bounds checking, but that just means you get a panic at runtime. With formal verification, you can prove that the program never accesses an array with an index that's out of bounds. I
140.
▲
by
trealira
2y ago
> In my mind, Python has all the pedagogical advantages of Lisp, plus enough syntactic cues to prevent getting "lost in a sea of parentheses". (Of course, it lacks plenty of other nice Lisp-family features.) What you say here r
141.
▲
by
trealira
2y ago
> Reader needs to recognize reading from left->right to right->left. Yeah, I agree. The problem is that you have to keep track of nesting in the middle of the expression and then unnest it at the end, which is taxing. So, I also th
142.
▲
by
trealira
2y ago
That is a circular argument. Your basis that I'm arguing against plurality of thought is that you have labeled my comments as having done so. Yes, I'm calling Republican commissars authoritarian. I'm literally quoting the let
143.
▲
by
trealira
2y ago
> We have established No, you have accused without basis, because you know you have no defense of installing conservative Republican commissars in schools, and to privilege the Republican students and workers present, so your only hope i
144.
▲
by
trealira
2y ago
The House of Representatives just needs a majority vote to approve the articles of impeachment, but to convict, the Senate requires a two-thirds vote. That's what I meant by a supermajority. My bad for the miscommunication.
145.
▲
by
trealira
2y ago
Typical conservative doublespeak - speak as though there are commissars suppressing political dissidence so you can actually have an excuse to install commissars to suppress political dissidence. Conservatives have long disdained education
146.
▲
by
trealira
2y ago
Yes. The only way Trump is ousted is if Democrats somehow get a supermajority in the House and the Senate and impeach and remove him, which isn't going to happen. Republicans will always close ranks around Trump at this point. He defin
147.
▲
by
trealira
2y ago
"By August 2025, the University shall commission an external party, which shall satisfy the federal government as to its competence and good faith, to audit the student body, faculty, staff, and leadership for viewpoint diversity, such
148.
▲
by
trealira
2y ago
Compilation threads like those seem to me more like ways to make each other angrier and more racist. I think they legitimately just hate black people. Like, there's definitely some element of smug self-aware memey edginess about being
149.
▲
by
trealira
2y ago
Well, I believe you that there are lots of kids there that try to seem racist for 4chan cred, and I guess people would know not to post videos of themselves doing those illegal things. But I remember they had stuff like "n*gger chimpou
150.
▲
by
trealira
2y ago
It's not hard to find people with a racist /pol/er's opinions in real life, or on other social media like Instagram or Twitter. Maybe /pol/ in particular is/was filled with bots, I don't know, but suc
More ›