Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
trealira
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
391.
▲
by
trealira
2y ago
Higan is a cycle-perfect SNES emulator, and it's very single-core CPU-intensive. This is what the FAQ [0] says: Full-speed emulation for the Super Famicom base unit requires an Intel Core 2 Duo (or AMD equivalent), full-speed for game
392.
▲
by
trealira
2y ago
I like how simple it is. Thanks for sharing. By the way, I found one or two bugs. The empty parentheses alone are treated as undefined: > () undefined And I think any equation using empty parentheses as an expression gets treate
393.
▲
by
trealira
2y ago
You may be right that the body could adapt and eventually I might have just stopped feeling that way. I just decided to stop after a month because I thought I wasn't really trans and because I didn't want to feel so sad anymore. B
394.
▲
by
trealira
2y ago
I'll only say this due to anonymity, but: mistakenly thinking I was trans, I once took testosterone blockers and estrogen for about a month (having bought them online probably illegally). After a week, I was on the verge of tears prett
395.
▲
by
trealira
2y ago
I've just realized that what I'm describing is called a rope data structure: https://en.wikipedia.org/wiki/Rope_(data_structure) So, a difference list is a rope, but encoded with closures instead of explicit
396.
▲
by
trealira
2y ago
Well, self-correction: not a binary tree in the traditional sense, since only the leaf nodes contain the elements. It's that each of the two tree pointers either points to another subtree, or to the start of a list, but not both.
397.
▲
by
trealira
2y ago
The comic, for reference: https://www.newyorker.com/cartoon/a16995
398.
▲
Demystifying DList
(h2.jaguarpaw.co.uk)
1 points
by
trealira
2y ago
|
3 comments
399.
▲
by
trealira
2y ago
I thought this was an interesting data structure, which is mainly used by Haskell and Prolog programmers. When you ignore the fact that it's implemented with functions, it seems that a difference list is a binary tree of lists. Appendi
400.
▲
by
trealira
2y ago
It doesn't look at all like hentai, but the art does seem uncanny and stilted. It seems more like obvious wish-fulfillment romance, or at least the first one does; that one focuses on how some really rich guy that's relatively att
401.
▲
by
trealira
2y ago
I think a good write-up that shows some practical use cases of monads is a paper called "Monads for functional programming" by Philip Wadler. It assumes you're familiar with the basic syntax of Haskell or its predecessors, th
402.
▲
by
trealira
2y ago
> Apologies in advance to who(m)ever posted this article FYI, and this is just a tangentially related grammar remark, but "whomever" wouldn't be correct here, because the phrase "whoever posted this article" has
403.
▲
by
trealira
2y ago
That's true, and many libraries do this. However, it comes at the cost of an unnecessary heap allocation that wouldn't otherwise be necessary if not for this encapsulation. If you want to do this, but allocate on the stack, you ha
404.
▲
by
trealira
2y ago
I don't see how your comment relates to the parent's comment; however, here's a reply. > All anyone has to do is farm a few accounts to flag the mildest mention of this out of existence, and to upvote the most obtuse, simp
405.
▲
by
trealira
2y ago
C still has fields in structures; you just have to pass a structure as the argument to a function. As long as you're okay with syntax like "self->field" or "self.field" (given a parameter called "self")
406.
▲
by
trealira
2y ago
Is an entity component system really functional programming? I had the sense that functional programming was more about writing functions that are pure and referentially transparent, and making data immutable normally, which can make code s
407.
▲
by
trealira
2y ago
> SML in particular is cute if you use your tiny Prolog to implement the type system. That sounds pretty cool; do you know of an implementation of SML that fits into 10 KB of memory because it uses tiny Prolog?
408.
▲
by
trealira
2y ago
Apparently, the B programming language from 1969 fit into 8 KB of memory: https://www.bell-labs.com/usr/dmr/www/chist.html After a rapidly scuttled attempt at Fortran, he created instead a language of his ow
409.
▲
by
trealira
2y ago
Ostensibly, it's to prevent attacks, according to the author of the bill: “At 25 feet, that person can’t spit in my face when I’m making an arrest,” Fontenot said while presenting his bill in a committee earlier this year. “The chance
410.
▲
by
trealira
2y ago
There's an ant called the bullet ant, so named because its sting feels like getting shot. Its Wikipedia page shows other similar nicknames in Spanish and in Portuguese. So, given that other bugs' stings have already been described
411.
▲
by
trealira
2y ago
That's fair. I taught myself to program using C, and C's conflation of pointer parameters with arrays, and its declaration syntax, confused me at first. And I also ended up with more unexplained glitches segfaults in the beginning
412.
▲
by
trealira
2y ago
But nowadays, why would anyone use Modula-2 today and not Rust, C++, Go, or basically any other programming language?
413.
▲
by
trealira
2y ago
We also learned some first order logic, enough to write the proofs in formal language, though we didn't learn anything about type systems. You're probably right about the ship having sailed, though. It's probably harder to ge
414.
▲
by
trealira
2y ago
At my university, all majors of computer science have to take a course in discrete math, which involves writing a couple different types of math proofs using proof by induction (including strong induction) and proof by contradiction. Howeve
415.
▲
by
trealira
2y ago
> It's only recently that congress has decided that we can't amend the constitution, despite that being such an important and essential part of how the constitution was supposed to work, that the founders put together a bunch o
416.
▲
by
trealira
2y ago
I see, now I understand. Thanks for elaborating!
417.
▲
by
trealira
2y ago
Yes, I was also confused at first. The closest C function to this one is asprintf, because this function gives you back a new, separate string, which you may or may not decide to print. Just imagine if asprintf simply returned a char* point
418.
▲
by
trealira
2y ago
> Isn't Int -> String -> String a shorthand for Int -> (String -> String)? Yes. Though I find it more convenient think of it as a function with multiple arguments and not a function that returns another function. > Th
419.
▲
by
trealira
2y ago
I'm confused why it's said to be backwards (in the article and by you). This paragraph shows that with a format string with an int format specifer, and then a string format specifier, the token list shows is exactly that, and the
420.
▲
by
trealira
2y ago
Finding out about how, in a programming language with dependent types, types can be returned from functions like values, feels about the same way as when I learned functions can be returned as first-class values in functional programming. I
More ›