Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
harpocrates
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
harpocrates
5y ago
GHC also uses Demarau-Levenshtein [0]. The fuzzy lookup function gets re-used for a couple places too (including whatever you encountered in GHCi). [0]: https://github.com/ghc/ghc/blob/25977ab542a30df4ae71d969
2.
▲
What Is Categorical Data?
(thatdot.com)
10 points
by
harpocrates
5y ago
|
1 comments
3.
▲
by
harpocrates
6y ago
For anyone curious about the difference between the two: Hughes' pretty printer works really well for pretty-printing Haskell code, but Wadler's is more flexible for pretty-printing C-style languages where there is a dedented clos
4.
▲
by
harpocrates
7y ago
As I've already posted elsewhere on this thread, such a tool has been developed in parallel (and with the intent to consume the output of) c2rust. Development on that occurs here: https://github.com/immunant/c2rust
5.
▲
by
harpocrates
7y ago
Step 2 has been happening concurrently, and pretty much since the start of the project. See https://github.com/immunant/c2rust/tree/master/c2rust-refact... . It is just a lot tougher to get right, so it g
6.
▲
by
harpocrates
7y ago
Safety in the form of tightly-fitting types is great, but the signatures definitely suffer a bit in readability (otherwise, Haskell signatures are generally quite helpful when deciphering a functions purpose). I understand why it needs to b
7.
▲
by
harpocrates
8y ago
> It's available in Haskell as a first class citizen. Not really. Haskell's laziness makes it easier to write functions that are memoized, but it does not automagically memoize functions. And how could it without incurring a no
8.
▲
by
harpocrates
8y ago
`@implicitNotFound` still only gives you a top-level failure message. Also, my comment was aimed more at developers of libraries with complex implicit derivations not the consumers of such libraries.
9.
▲
by
harpocrates
8y ago
I heartily recommend [splain][0] to anyone debugging non-trivial implicits. It is a scalac compiler plugin that, among other things, will swap out the horribly unhelpful "implicit not found" or "diverging implicit expansion&q
10.
▲
by
harpocrates
8y ago
FWIW we've spent a lot of time trying to re-engineer the control-flow translation to be heuristic-friendly in c2rust. We've extended and tweaked the Relooper algorithm in hopes of preserving more of the initial control flow. It st
11.
▲
by
harpocrates
8y ago
The idea is that this is a first step towards safe Rust. First, you convert to unsafe (but semantically preserving) Rust, then you refactor. The refactor stage probably will involve changing some semantics (read: fixing bugs), or perhaps pr
12.
▲
by
harpocrates
8y ago
I'm a primary contributor to c2rust and I may be the person "stolen" away from corrode. I'd like to apologize if it feels like we ripped off ideas without giving due credit - the project wasn't really supposed to &q
13.
▲
by
harpocrates
8y ago
I have very mixed feelings about using parser generators instead of hand written parsers. I've contributed to GHC's parser grammar and spent a lot of time reading Rust's hand-written parser. On one hand, a grammar is an inval
14.
▲
by
harpocrates
8y ago
Some other applications are more interesting. For instance, finger trees (which back the efficient implementations of a handful of immutable data structures) usually are implemented in a way that requires polymorphic recursion.
15.
▲
by
harpocrates
8y ago
The introductory one is known as Baby Rudin and is a pretty good first exposure to real analysis.
16.
▲
by
harpocrates
9y ago
I'm not sure I understand: WebAssembly is the output of a (hopefully) optimizing compiler. LLVM is such a compiler backend. If you use WebAssembly today, you are probably going through LLVM. Perhaps you meant: why not use LLVM IR inste
17.
▲
by
harpocrates
9y ago
> No they wouldn't. They still need to turn WebAsm/IR into assembly, which is the thing they already do today anyway. Nothing changes for compilers, other than the potential for optimizations gets much, much worse as the IR is
18.
▲
by
harpocrates
9y ago
What other low-level format supports my points (a), (b), and (c)? And has an actual spec? EDIT: you've since added some examples. Here are my (very subjective) opinions: - The JVM isn't really all that low-level - it eeks out a lo
19.
▲
by
harpocrates
9y ago
One thing that continues to amaze me is that WebAssembly isn't being discussed more outside of the context of the web. Think about it just as a format that (a) is low-level enough to support performance tricks, (b) is fast to turn into
20.
▲
by
harpocrates
9y ago
Yes, when people use them. There is no really elegant way of adding a type annotation to a `do` block. (do x <- pure 1 y <- pure 5 pure (x + y)) :: Maybe Int It isn't uncommon to have to scan the `do` blo
21.
▲
by
harpocrates
9y ago
You've changed my mind on adding special syntax for `async`, generators, and results (`?`). I previously thought it was a big mistake given that these all generalize as monads (granted, there is some ground to be covered before such an
22.
▲
by
harpocrates
9y ago
This is not possible in regular Haskell. For one, it isn't obvious how to do such a desugaring and, even if it were, this is pretty gross. I remember a co-worker finding some weird combination of old extensions which allowed you to do
23.
▲
by
harpocrates
9y ago
> People underestimate the compiler cost of deriving instances. It adds up very fast if you derive lots of functors and foldables in your quest for unique names everywhere. Do you pay this price when you derive via a `newtype`? Or does G
24.
▲
by
harpocrates
9y ago
The comments from the original post[1] of this are still quite relevant. I feel like I've seen this link posted here several times (much more recently than 2009), but I can't find the links. [1]: https://news.ycombin
25.
▲
by
harpocrates
9y ago
This is a cool (if not particularly new) paper. Interestingly enough, the [vector library][0] mentioned in the paper isn't just a research project - it is one of the most widely used Haskell libraries for vector. That said, I am sadden
26.
▲
by
harpocrates
9y ago
I think this actually misses the biggest point. Complex numbers are special because they are an algebraic closure of the real numbers (what makes the real numbers interesting should be more obvious), and because Zorn's lemma tells us t
27.
▲
GHC proposal for Linear Types
(github.com)
2 points
by
harpocrates
9y ago
|
0 comments
28.
▲
by
harpocrates
9y ago
> It may even be fair to say that Haskell's typeclasses make it more like an object-oriented programming language. The trick here is defining "object-oriented". In modern object-oriented languages, I usually assume that in
29.
▲
by
harpocrates
9y ago
Diagnosing oneself with imposter syndrome (or, at the other end of the spectrum, recognizing the Dunning–Kruger effect in oneself) is a perfect catch 22. This article hits the nail on the head: being slightly paranoid and doubting oneself i
30.
▲
by
harpocrates
9y ago
I would hardly identify lazy evaluation as a core feature of functional programming. It definitely forced Haskell not to compromise on purity but, as SPJ himself has pointed out, that may be the only strong thing it has going for it[0]. Cur
More ›