Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
danidiaz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
211.
▲
by
danidiaz
11y ago
I wouldn't say they are eschewed. Haskell programmers do seem to prefer typeclasses that come equipped with some set of meaningful "laws" that help to reject "unreasonable" instances. And even without that, they are
212.
▲
by
danidiaz
11y ago
> Strings The strings types are mature, but unwieldy to work with in practice. It’s best to just make peace with the fact that in literally every module we’ll have boilerplate just to do simple manipulation and IO. Conversion is part of
213.
▲
by
danidiaz
11y ago
A workaround for long compile times is trying to stay withing GHCi whenever possible and reload from there. http://chrisdone.com/posts/haskell-repl http://chrisdone.com/posts/making-ghci-fast The
214.
▲
by
danidiaz
11y ago
"Amortised complexity", a concept so esoteric that is used in the documentation of basic Java data structures: https://docs.oracle.com/javase/8/docs/api/java/util/ArrayLis... "Th
215.
▲
by
danidiaz
11y ago
Are transducers really stateless? Decoders and transducers that perform grouping operations need to keep some state.
216.
▲
by
danidiaz
11y ago
> Generators have a "send()" method to push data in it. What would be the pythonic way of "mapping over" the inputs that are sent into a generator, or performing grouping operations on those inputs? For example, how t
217.
▲
by
danidiaz
11y ago
Transformations created with premap are stateless, they depend only on the current input. So one can't build UTF8 decoders with them, for example. That said, if you supply a function to premap, the result typechecks as a "Transduc
218.
▲
by
danidiaz
11y ago
My own attempt at implementing something like transducers in Haskell: http://hackage.haskell.org/package/foldl-transduce . It depends on the useful "foldl" library of reducers.
219.
▲
by
danidiaz
11y ago
Admittedly non-illuminating, and maybe even misleading, musings: I like to think of free monads and related constructions as dependency injection "turned inside out". With dependency injection, you configure a foozle in various wa
220.
▲
by
danidiaz
11y ago
There's also a video: https://www.youtube.com/watch?v=3Ltgkjpme-Y
221.
▲
by
danidiaz
11y ago
You might be interested in the inverse burrito-monad tutorial: http://www.cs.cmu.edu/~edmo/silliness/burrito_monads.pdf
222.
▲
by
danidiaz
11y ago
> it can come off really bad if you approach them and ask them to explain it to you so that you can understand it in a fraction of the time But it works like that with software libraries. Even if they are the product of arduous work, the
223.
▲
by
danidiaz
11y ago
In pure functional programming, = = = (bindings are unmodifiable, and it's easier to substitute equals for equals). The assignment operator should have been <- or something other than = from the beginning. I wonder if there was som
224.
▲
by
danidiaz
11y ago
shake, an alternative to make.
225.
▲
by
danidiaz
11y ago
Not that I fully understand it, but this post https://golem.ph.utexas.edu/category/2008/01/the_continuatio... establishes a connection between the Yoneda lemma and continuation-passing style, with C (well, C+
226.
▲
by
danidiaz
11y ago
The monads that were harder for me to understand while learning Haskell had quite plain names like "State" and "Continuation". I don't think alternative naming would have helped. By the way, while I'm not sure
227.
▲
by
danidiaz
11y ago
I enjoyed this explanation of monads in Ruby: http://codon.com/refactoring-ruby-with-monads
228.
▲
by
danidiaz
11y ago
I have found micro-web frameworks like Spock https://www.spock.li/ or Scotty are a good way to "get something started" in Haskell. With that, "aeson" for JSON, "sqlite-simple" for persistence a
229.
▲
by
danidiaz
11y ago
One alternative is using "data virtualization" tools like Denodo Virtual DataPort, that create the illusion of a single relational RDBMS and let you perform joins between different databases (disclosure: I work at Denodo). I wrote
230.
▲
by
danidiaz
11y ago
"aeson" is the go-to library for producing and parsing JSON in Haskell.
231.
▲
by
danidiaz
11y ago
Cool, reminds me of a R. A. Lafferty short story with a similar premise, titled "And Read the Flesh Between the Lines".
232.
▲
by
danidiaz
11y ago
In Haskell, there are language pragmas that enable extra features for a given module, but sometimes can also remove them (completely forbidding unsafe functions, disabling record syntax, and the like).
233.
▲
by
danidiaz
11y ago
The use of Applicative is actually an attempt at clarity, by restricting the kinds of things that the code can actually do. As it name implies, Applicative is a kind of "effectful application". There have been proposals to impleme
234.
▲
by
danidiaz
11y ago
I occasionally use the "diagrams" library to, well, draw diagrams: http://projects.haskell.org/diagrams/gallery.html https://www.youtube.com/watch?v=5_fCUSOn7m0
235.
▲
by
danidiaz
11y ago
Additional problems: running into deadlocks because a standard stream is not being read, ensuring cancellation of the external program when the parent is cancelled.
236.
▲
by
danidiaz
11y ago
Reminds me of a Ted Chiang short story, "Exhalation", about a being that cracks open and inspects its own functioning brain. http://www.lightspeedmagazine.com/fiction/exhalation/
237.
▲
by
danidiaz
12y ago
There is a "createPipe" function in the "unix" package http://hackage.haskell.org/package/unix-2.7.1.0/docs/System-... that gets us half-way towards process substitution. Unfortunately, I
238.
▲
by
danidiaz
12y ago
"process-streaming" is more like a set of helper functions for "process"; it doesn't provide formatting, regexps, or OS-independent implementations of typical shell commands. It does support piping of processes, tho
239.
▲
by
danidiaz
12y ago
> What's the idiom for chdir'ing to a subdirectory such that you pop back out again when you're done This can be done with the "bracket" function, which works roughly like a context manager in Python: import
240.
▲
by
danidiaz
12y ago
If you don't mind propietary software, my employer Denodo has recently released an "Express" version of its data virtualization platform: http://www.denodo.com/denodo-platform/denodo-express One of its f
More ›