Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
omaranto
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
241.
▲
by
omaranto
7y ago
Oh, boy, you should really finish reading the book! The second half is amazing. I just looked through the table of contents and almost all the things I remembered most fondly are in chapters 3, 4 and 5. It's all about understanding com
242.
▲
by
omaranto
7y ago
If you could configure how to render PDF links (mainly so tables of contents didn't look so aggresively yellow), Ebookdroid would be perfect for reading! (I added the "for reading", because I wish you could create and edit st
243.
▲
by
omaranto
7y ago
In case anyone is curious about the name of the main UI, "xochitl", it is a fairly common female name (for people, not UIs) in Mexico. It means flower in Náhuatl, the language of spoken by the Aztecs and still spoken by between 1
244.
▲
by
omaranto
7y ago
To make sure I understand, is this an accurate expansion of your comment? Yes it would leak, to avoid leaking you could invoke the GC when you’re not in a critical section. Alternatively, if you don't use maps and instead structure all
245.
▲
by
omaranto
7y ago
Does Go really let you use closures, arrays, slices and maps when you disable the garbage collector? If so, does that just leak memory?
246.
▲
by
omaranto
7y ago
I don't know what cmd means (I'm kidding, I have seen Apple computers even if I've never used one), but you can find out what the keyboard shortcut is on your own copy of Firefox by hovering the mouse over the Reader mode i
247.
▲
by
omaranto
7y ago
You need more precision. Try this in your browser console instead, using the new BigInt type in JavaScript: (-80538738812075974n)**3n + 80435758145817515n**3n + 12602123297335631n**3n
248.
▲
by
omaranto
7y ago
The mouse could be convenient to resize or rearrange windows. For example, it would be nice if dragging one window onto another swapped them. I think that would be faster than swapping them with i3's shortcuts.
249.
▲
by
omaranto
7y ago
I think you meant " differential privacy", and no, it's not closely related to differentiable programming. [1] https://en.wikipedia.org/wiki/Differential_privacy
250.
▲
by
omaranto
7y ago
That didn't quite clear up for me what happens when you mutate keys, so I ran a quick experiment. It seems like maybe the map stores a copy of the key, as the map doesn't "see the mutation". package main impor
251.
▲
by
omaranto
7y ago
Oh, cool! This still doesn't quite get rid of my complaint since the size of an array must be known at compile time, but it's good that they don't all have to be the same size.
252.
▲
by
omaranto
7y ago
Lots of currently allowed map keys can be mutated such as structs or arrays. Let whatever happens when you mutate them (what does happen?) happen also for slices.
253.
▲
by
omaranto
7y ago
Fixing the existing maps sounds a lot easier than adding generics. All that would be required is to allow slices as keys. If there is a concern about immutability you could just say mutating a slice used as a key leads to undefined behavior
254.
▲
by
omaranto
7y ago
I always have trouble explaining this limitation of Go maps. First, a string can point to an unlimited amount of data (i.e., it can be of arbitrary length) and all of its characters are taken into account when deciding string equality. Now,
255.
▲
by
omaranto
7y ago
Maybe "fixed size" was the wrong way to phrase it. What I meant is that a string points to an unlimited amount of data and all of that unlimited amount of data is taken into account when deciding equality of strings. And my qu
256.
▲
by
omaranto
7y ago
I haven't been keeping up with Go. Is it still the case that the only datatype than can be used as keys to a map and is not of a fixed size is string?
257.
▲
by
omaranto
7y ago
Exactly, disabled apps still take up space. So on a limited space device I just use what's there. I haven't tried the new version of Edge based on Chromium, but my guess is that it'll be as slow as Chrome. :(
258.
▲
by
omaranto
7y ago
On the author's website, nicklevine.org, I found it was presented at the 7th European Lisp Symposium, Paris, May 2014.
259.
▲
by
omaranto
7y ago
I use Firefox on Linux and (current) Edge on Windows, in both cases because they feel faster than Chrome (which I used to use when it felt faster). I still use Chrome on my phone because I can't uninstall it. :)
260.
▲
by
omaranto
7y ago
Here's a refutable claim for you: if you try journaling you will enjoy it and find it, in your own personal subjective opinion, a worthwhile use of your time.
261.
▲
by
omaranto
7y ago
PWA = Progressive Web App ---"progressive" seems to mean it uses some relatively recent additions to browsers to make the app feel more like a native app. (In case others didn't know either.)
262.
▲
by
omaranto
7y ago
I think that simulating coroutines by explicitly building the call stack they would have had isn't too ugly. This solution only conses to build those call stacks: (defun leaves (tree) "Return a function that returns th
263.
▲
by
omaranto
7y ago
Well, Python does have a looping facility that can do everything it's comprehensions can do and more. It's just more special syntax and looks somewhat different from the comprehensions (though they do share keywords where appropri
264.
▲
by
omaranto
7y ago
Common Lisp's iter or loop macros are special syntax for, among other things, building lists. I think maybe you should have said instead that it's nice when a language let's you add such special syntax in libraries. :)
265.
▲
by
omaranto
7y ago
Now that I think of it, even the flatMap version builds a lot of unnecessary arrays. The comprehension isn't just more readable, it's also more efficient. (Unless you're using a fancy compiler like GHC that does deforestation
266.
▲
by
omaranto
7y ago
I am sure you are right about the real world, I wouldn't know anything about it. :) I'm a mathematician and I do use a computer whenever I can. In that domain the problem I gave is a reasonable toy model of the code I sometimes wr
267.
▲
by
omaranto
7y ago
I think this looks about as clean as I expected, I definitely like the look of the list comprehension better. (But of course, this is just a superficial syntactic matter: there is no essential difference.) Does JavaScript not come with a .
268.
▲
by
omaranto
7y ago
Here's the flatmap version with better formatting: flatmap(lambda a: flatmap(lambda b: flatmap(lambda c: (lambda d: [(a,b,c)] if a**3+b**3+c**3==d**3 else [])(
269.
▲
by
omaranto
7y ago
I agree. Also as minor nitpick, I doubt your Haskell typechecks (haven't tried it): you forgot to take the floor of d.
270.
▲
by
omaranto
7y ago
I'd replace the inner concatMap (\y -> [x+y]) with a simple map (\y -> x+y), or, if I'm honest, with map (x+). Here's hoping HN doesn't mess up the asterisks... EDIT: I've replaced all asterisks with plus sign
More ›