Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
danidiaz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
31.
▲
by
danidiaz
5y ago
"Spectacle" is a Haskell DSL for writing TLA+ specifications: https://awakesecurity.com/blog/spectacle-a-language-for-writ...
32.
▲
by
danidiaz
5y ago
One way I like to think of application contexts in frameworks like Spring is as a huge product type with one "field" for each managed component. Objects have views of particular sections of this product, namely, their own dependen
33.
▲
by
danidiaz
5y ago
> Don't just read stuff, run it in GHCI Newcomers should absolutely use ghci commands like :t :type https://downloads.haskell.org/ghc/latest/docs/html/users_gui... to tinker and experiment. Also
34.
▲
by
danidiaz
5y ago
Don Quixote is windmillpunk! Less facetiously, it's a work informed by the technological developments of its time. http://www.cervantesvirtual.com/obra-visor/cervantes-bulleti... According to this article https:&
35.
▲
by
danidiaz
5y ago
It's interesting to compare Copilot with Wingman for Haskell: https://youtu.be/S0HvfXq3454?t=550 Both attempts at somewhat automating repetitive aspects of programming, but with completely different approaches. Wingman
36.
▲
by
danidiaz
5y ago
> Textile terminology proliferates throughout the English language. I think "seam" ("a place where two parts of the code meet and where something else can be injected") is a felicitous metaphor. "thread" as
37.
▲
by
danidiaz
5y ago
Aspect-oriented programming is alive and well and living in the Spring Framework. While it can be misused (by making unclear what aspects are being applied, as you mention) it can be very useful and avoid a lot of boilerplate code and repea
38.
▲
by
danidiaz
5y ago
This is one such setup: https://twitter.com/fresheyeball/status/1403192219092144130
39.
▲
by
danidiaz
5y ago
One practical use of "fix" is emulating Python-like decorators in Haskell: http://web.cecs.pdx.edu/~ntc2/haskell-decorator-paper.pdf Fixed points are also an important part of the technique described in the p
40.
▲
by
danidiaz
5y ago
I recently read and enjoyed "Haft Peykar" by the poet Nizami. Although I guess that much of its original beauty is lost in translation, some the language and imagery remain striking nonetheless. One of the stories-within-the-story
41.
▲
by
danidiaz
5y ago
Here's a possible implementation of "duplicate": https://stackoverflow.com/a/67475265/1364288
42.
▲
by
danidiaz
5y ago
I'm not sure you could implement a useful flatMap() for Collector-like types, at least without forcing the collector to hold all the received values in memory, which would defeat the purpose. It would be like a function that takes - a
43.
▲
by
danidiaz
5y ago
In Haskell terms, Collectors have an Applicative instance, and teeing corresponds to the liftA2 function: > liftA2 :: (x -> y -> z) -> Fold a x -> Fold a y -> Fold a z The "teeing" functionality is actually one o
44.
▲
by
danidiaz
6y ago
I believe that negative view of do notation is not popular nowadays. The tendency is to lean more on it. There are language extensions like ApplicativeDo and the newer QualifiedDo which expand the reach of the notation.
45.
▲
by
danidiaz
6y ago
The paper notes a limitation this approach has with arrays: once you stop mutating an array and want to make a "pure" version that is useable outside ST, you have to choose between the safe but slow option of copying the array, an
46.
▲
by
danidiaz
6y ago
> did not know you could do global marks with mA and `A. Incidentally, the "Vimium" browser extension also supports those marks with the same syntax; they're an interesting alternative to conventional bookmarks for frequen
47.
▲
by
danidiaz
6y ago
The error is explicitly awaiting for the result; "sending tasks" to the future is the correct way, and corresponds to "then" in Promise.
48.
▲
by
danidiaz
6y ago
One annoyance is that on Windows the binary distribution of the shell doesn't support readline bindings. You have to recompile the shell for that. Instead of recompiling, I wrote a simplistic rlwrap clone in Haskell https://
49.
▲
by
danidiaz
6y ago
The same "final state" of a fake can potentially be achieved by many different patterns of interaction between the system under test and the fake. We don't really care about those patterns of interaction as long as they end u
50.
▲
by
danidiaz
6y ago
I disagree with this: > One, types are a concretion. If you’re looking for higher level of abstractions to get flexible behaviour, you’re ultimately going to have a world of pain I don't see why types should be in the way of flexibl
51.
▲
by
danidiaz
6y ago
According to the proposal, affine types and linear types "are not equi-expressive": https://github.com/ghc-proposals/ghc-proposals/blob/master/p...
52.
▲
by
danidiaz
6y ago
On the opposite end, reading long functions can be hard when they mix levels of abstraction, or their lack of abstraction buries the overall logic with details. If I'm reading a novel, it would be jarring to read "and then he took
53.
▲
by
danidiaz
6y ago
With [a] -> b, when production of the input elements requires I/O and you don't want to read the entire list beforehand, you are forced to use lazy I/O, which is notoriously flaky and doesn't handle errors well. Meanw
54.
▲
by
danidiaz
6y ago
It's not isomorphic to [a] -> b, because you are not restricted to feed a Collector with a preexisting list, you can feed it with lines read incrementally from stdin for example. Another difference is that you can combine a "Co
55.
▲
by
danidiaz
6y ago
One neat and practical application of existential types if for defining "collectors" for streaming sources. The internal state of the collector is hidden and it can be different form what the collector ultimately returns. For exam
56.
▲
by
danidiaz
6y ago
The only way to get hold of a DArray is inside the callback of the "alloc" function: alloc :: Int -> (DArray a ⊸ ()) ⊸ Array a According to the linear Haskell paper: "f :: s ⊸ t guarantees that if (f u) is consum
57.
▲
by
danidiaz
6y ago
This is a good way of getting your feet wet: https://haskell-via-sokoban.nomeata.de/
58.
▲
by
danidiaz
6y ago
This post might give some ideas about configuring .ideavimrc https://medium.com/@danidiaz/configuring-ideavimrc-de16a4da0... Although one person's finely honed vimrc is another's absurd unergonomic configurat
59.
▲
by
danidiaz
6y ago
Besides potentially enabling new types of APIs, I simply like that this extension lets you write more precise type signatures. A function with type [a] %1 -> [a] can do less things that a function with type [a] -> [a].
60.
▲
by
danidiaz
6y ago
There are indeed "coalgebraic" descriptions of OOP. - "Objects and Classes, Coalgebraically" (1995) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.6... - "Codata in action" (2
More ›