Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dons
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
151.
▲
by
dons
14y ago
> as opaque to the developer http://hackage.haskell.org/packages/archive/unordered-contai... This highly optimized data type is defined in 6 lines, easily accessible from the docs.
152.
▲
by
dons
14y ago
> six hours of debugging I guess this just shows that Math PhDs don't know how to use the fine profiler: http://stackoverflow.com/questions/15046547/stack-overflow-i... Which would have saved about 5hrs 50mins...
153.
▲
by
dons
14y ago
> sacrifices type safety How does TH sacrifice type safety? The generated code is type checked. For actually customizing syntax via macros, quasi quotation is the popular approach, combined with TH. People can eg embed JS or ObjC syntax
154.
▲
by
dons
14y ago
> effectively amounts to a O(1) lookup So O(log n) then. We obey gravity around these parts. I presume you are referring to HAMT-like structures ,such as found in http://hackage.haskell.org/packages/archive/unordered-contai... which a
155.
▲
Introduction to Concurrent Haskell - Simon Marlow
(infoq.com)
2 points
by
dons
14y ago
|
0 comments
156.
▲
by
dons
14y ago
As always, parametric polymorphism necessitates one-letter names, as variables can really stand for anything at all. The compiler guarantees you can't know much (or anything) about some polymorphic variables. Other idioms come from math, e.
157.
▲
An HTTP client in Haskell using io-streams
(blogs.operationaldynamics.com)
41 points
by
dons
14y ago
|
16 comments
158.
▲
by
dons
14y ago
He sure takes his time.. Episode 4: Conclusion: But we are so close! Next time on FAIC we'll make a small but vital modification to the signature pattern ApplyFunction to arrive at the actual second requirement of the monad pattern.
159.
▲
by
dons
14y ago
Precisely. Threads allow you to separate concerns better - one thread per task, rather than trying to process all tasks. Simon Marlow captured this well: http://stackoverflow.com/a/3858684/83805 "the abstractions that threads provide are
160.
▲
by
dons
14y ago
`map` is the trivial case. There are plenty of loop compositions that are completely non-trivial to do by hand. That's why array fusion (see e.g. repa or vector) is a huge win. foldl g . scanl y . concatMap x . filter h . unfoldr k
161.
▲
by
dons
14y ago
It has nothing to do with laziness. It has everything to do with the guaranteed absence of side effects. Deforestation is /more useful/ in strict languages, because allocation of temporary structures costs more. So fusion on strict arrays i
162.
▲
by
dons
14y ago
Mutating collections with shared state isn't what you do in pure Haskell, though. That's the difference between the now classic deterministic parallelism , and the newer side-effect oriented concurrency in Haskell using stm or mvars. Withou
163.
▲
by
dons
14y ago
> and probably Haskell somehow By design - pure values are always thread safe.
164.
▲
Draft of "Parallel and Concurrent Programming in Haskell" open for comment
(reddit.com)
5 points
by
dons
14y ago
|
0 comments
165.
▲
by
dons
14y ago
Virtual machines most certainly do not require bytecode. GHC for example targets the "Spineless, tagless G machine" by compiling to native code that calls runtime services defined by the (abstract) STG machine ISA (the "primops"). Similarly
166.
▲
by
dons
14y ago
> The canonical Python example of this is defining a tree data structure: def tree(): return defaultdict(tree) But you're not defining a data structure -- you're just reusing the builtin dictionary type. Try defining say a RB tre
167.
▲
by
dons
14y ago
Of course it has a "VM" (aka runtime system), providing services like thread scheduling, garbage collection, IO management and so forth. It might just not be an easily accessible standalone VM like the JVM. > Compiles super fast Because
168.
▲
by
dons
14y ago
Fair enough. I'd say they provide more of a flavor of "higher orderness" rather than a true implementation, as the semantics are so limited and ad hoc in Ruby.
169.
▲
Parallelism and Concurrency with Haskell and Cloud Haskell
(infoq.com)
71 points
by
dons
14y ago
|
1 comments
170.
▲
by
dons
14y ago
> A few years back, one big lure of Python or Ruby used to be the functional constructs that they offered like higher order functions. This statement surprises me.
171.
▲
by
dons
14y ago
Diverging for good reason is ok. Diverging for pointless reasons is not.
172.
▲
by
dons
14y ago
http://www.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publicat... Fast and loose reasoning is morally correct.
173.
▲
by
dons
14y ago
I am always disappointed that these Haskell-alikes don't just follow the Haskell spec -- too often they diverge for no good reason, and then there's no point.
174.
▲
by
dons
14y ago
Looks like a reimplementation of Wouter Swiestra's work on a functional model of IO, http://www.staff.science.uu.nl/~swier004/Publications/Beauty... Author = {Wouter Swierstra and Thorsten Altenkirch}, Booktitle = {Haskell '07: Proceedin
175.
▲
by
dons
14y ago
> A Monad is an object whose methods return monads. Is a truly terrible "definition". It is not a constructive definition. You can't implement anything with this. Mostly this article is about combinator libraries -- where bind is functi
176.
▲
School of Haskell Goes Beta
(fpcomplete.com)
179 points
by
dons
14y ago
|
69 comments
177.
▲
by
dons
14y ago
True enough. Strachey '67 after all...
178.
▲
by
dons
14y ago
Welcome to bounded polymorphism, circa 1989. A young Wadler would be pleased. An aside, it is not "duck typing" if it involves a static type system.
179.
▲
by
dons
14y ago
Generally, people use these high-level HDLs, like Lava or Cryptol, because: - faster design time, as you write less code to get the same things done - reusable high level specifications - access to high level optimizations not easily possib
180.
▲
by
dons
14y ago
Where? ... Specifying yr cpus, of course... https://github.com/gergoerdi/brainfuck-cpu-fpga/blob/master/...
More ›