Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zeugmasyllepsis
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
zeugmasyllepsis
4y ago
I was curious about node/jitless node versus python/pypy: src time node primes.js 78498 node primes.js 1.75s user 0.05s system 102% cpu 1.761 total src time node --jitless primes.js 78498
2.
▲
by
zeugmasyllepsis
4y ago
A GADDAG[1] is a combination pre-/suffix trie that's used for move generation in Scrabble. Unlike a traditional dictionary to find anagrams for words, a GADDAG makes it easier to identify plays based off of available letters alrea
3.
▲
by
zeugmasyllepsis
4y ago
Playing around in a docker image of the beta build, it looks like this allows you to add a `unique nulls not distinct` constraint to a composite set of fields, but still does not allow you to specify those same fields a primary key. For e
4.
▲
by
zeugmasyllepsis
5y ago
Curious, what is your argument in favor of a container over a type union to represent Result? As long as the type checking system forces users to refine the union to use the value and is aware of blocks of code within type guards (I've
5.
▲
by
zeugmasyllepsis
5y ago
Smalltalk
6.
▲
by
zeugmasyllepsis
5y ago
This might work out well in practice when tracking a single effect with a monad (e.g. with Haskell's `do` notation) but I think it quickly falls apart when working with multiple effects. Monads don't have a general form of composi
7.
▲
by
zeugmasyllepsis
5y ago
> Real number counting is a bit more loose. To find the numbers between .1 and .2, you find all fractionals of a given size, normally 1/10. Unfortunately the fractionals method does not work, since there are numbers (in fact, uncoun
8.
▲
by
zeugmasyllepsis
5y ago
Go supports a handful of built-in generic types, like hashmaps. What Go currently lacks is user-defined generics, though that is actively being worked on.
9.
▲
by
zeugmasyllepsis
5y ago
Thank you for providing details and not just assuming the JIT was the cause of the difference.
10.
▲
by
zeugmasyllepsis
6y ago
Right - so if you're introducing type annotations into an existing project and have a method expecting some interface, used by many call-sites spread across various parts of the project, then you can go around wrapping the original typ
11.
▲
by
zeugmasyllepsis
6y ago
Not without modifying the existing type. Since Interfaces rely on nominal typing, each type implementing an interface must explicitly declare that they do so. On the other hand, since Protocols are checked structurally you can declare a pro
12.
▲
by
zeugmasyllepsis
6y ago
Sum and intersection types + pattern matching feels so natural in languages like F#, OCaml, Reason, and Elixir. I know they add a significant amount of complexity to the language, but the more I use them, the more I feel that the tradeoff l
13.
▲
by
zeugmasyllepsis
6y ago
> static type checking based on sequent calculus, one of the most powerful systems for typing in Not exactly a common characteristic for Lisps
14.
▲
by
zeugmasyllepsis
6y ago
This reminds me of a discussion between Alan Kay and Rich Hickey on role of "data" that occurred right here on HN[1]. The TLDR (though the thread is very worth reading, IMO): Alan Kay argues that bare "data" isn't v
15.
▲
by
zeugmasyllepsis
6y ago
> .. in favor of targeted JS libraries that extend HTML capabilities. Do you mean libraries like Turbolinks[1] and/or Intercooler[2] here? I'm interested in what libraries you use, and others like these which help "bridge
16.
▲
by
zeugmasyllepsis
7y ago
While functions are first class in Go, the limitations of the type system make them less ergonomic to use, I think. Without user defined generics, many of the common uses of first-class functions become a lot less convenient to use.
17.
▲
by
zeugmasyllepsis
7y ago
Maybe a simpler way to illustrate this is two different functions built off of filter: `keep`: Given a predicate and a collection, filter the collection to retain only items for which predicate evaluates to true. `discard`: Given a predicat
18.
▲
by
zeugmasyllepsis
7y ago
Persisting it on the server allows users to browse on multiple devices and keep their collapse settings in sync. This is useful in particular for long threads of comments, where collapsing can be used as a tool to keep track of progress thr
19.
▲
by
zeugmasyllepsis
7y ago
I agree with you! Static typing and more broadly static analysis can help catch some types of backwards incompatibilities. The intent of my comment was to highlight complementary techniques that can minimize the reliance on static analysi
20.
▲
by
zeugmasyllepsis
7y ago
I apologize for being unclear. My intent was not to suggest that static type checking (and more broadly, static analysis) were not useful tools in catching errors early. Rather, I wanted to emphasize that other techniques could be used to m
21.
▲
by
zeugmasyllepsis
7y ago
I don't disagree that static type checkers and analysis software can be useful for catching many kinds of errors. In fact, at the end of my comment I emphasize exactly their strength: in automatically detecting when and where clients n
22.
▲
by
zeugmasyllepsis
7y ago
> ...would have told them immediately at compile time that the last_name field access by other client code was broken. What's the proposed fix in this case? Should all clients accessing that field switch to `customer.full_name`? Do
23.
▲
by
zeugmasyllepsis
7y ago
To be fair, their general use is discouraged unless you want the process to terminate. Not that you can't do that in other languages, but the culture in Go seems to prefer returning error codes.
24.
▲
by
zeugmasyllepsis
7y ago
> It seems like a messaging system like this would require all calling components to micro-manage... I think that's part of the trick, actually. When every component of a system behaves in similar ways, it's easier to extract t
25.
▲
by
zeugmasyllepsis
7y ago
To varying degrees depending on the library, I believe the answer is "yes, they sometimes do". Angular and Ember at least have systems for batching user interactions, which translate into model updates, and thus potentially DOM up
26.
▲
by
zeugmasyllepsis
8y ago
I'm certainly not well versed in OCaml, but my understanding is that it is also structurally typed. This particular example would also be permitted in OCaml, correct?
27.
▲
by
zeugmasyllepsis
8y ago
> Pretty sure abstraction power drives _less_ consistency, not more. It depends, I think. Abstractions allow users to specify part of a program's behavior independently from others. This is not intended to start a flamewar or pick
28.
▲
by
zeugmasyllepsis
8y ago
In some sense that's kind of the point right? If Qwant isn't tracking user information than we _expect_ the results to be different, since the engine doesn't have a chance to build up an information bubble about its users.
29.
▲
by
zeugmasyllepsis
8y ago
That would have been... GAWKward.
30.
▲
by
zeugmasyllepsis
8y ago
The truth is, plenty of people go to libraries. By my local library's annual 2017 report, they have 625,000 active library card holders which collectively visited the library over 10 million times. [1] This is one of the busiest librar
More ›