HNHacker News
TopNewBestAskShowJobs

bsummer4

55 karma · joined July 2, 2014

submissionscomments
bsummer4··on Enter the Matrix – A technical overview and guide to all things Matrix
But flexibility is the problem with XMPP in the first place. None of the clients and servers have compatible feature sets.
bsummer4··on In Praise of ADHD
So? The problem is our school systems and or work environments, not our biology.

We are a VERY significant minority of the population, and our institutions are not working for us. We should organize and do something about it instead instead of letting people try to medicate away our differences.

bsummer4··on Repair cafés waging war on throwaway culture
I've argued with a lot of friends about the "buy it for life" meme. I think it overlooks how quickly people change what they want from their things.

Maybe a more healthy meme could be: "Buy high-quality things, but never buy new". If you believe a product is durable, you should be comfortable with buying it used. If you end up not needing the thing anymore, you should be able to sell it again without any waste or loss of value.

bsummer4··on “We’re committing Twitter to increase the health and civility of conversation”
People need to stop using the word "hate" and start calling people out whenever they use it. "Hate" just means "blasphemy". Once you make this substitution, discussions like this start to make a lot more sense.

Serious question: If people want to post blasphemy, what's preventing them from doing so? [...] I honestly don’t understand why mainstream social media websites should be allowing that sort of thing.

bsummer4··on An opinionated guide to Haskell
If you upgrade stack and then do stack build, it's very close to being guaranteed to work.

Stack (and stackage) is the best nicest, most-reliable build-system of any language.

bsummer4··on An opinionated guide to Haskell
One has to learn how to deal with cabal anyway

Nah, I haven't used cabal-install in years now. Because of hpack, you don't even need to write .cabal files.

The only time I touch cabal is when I need to write Setup.hs files, which is, mercifully, quite rare.

bsummer4··on The Future of Standard ML (2013) [pdf]
Do be fair, he said "impure language" and not "impure code".

"Looks like we need to let the scholars know - there are 18,300 uses of the non-word "performant" in scholarly papers" <- If that's not sarcasm, something is wrong. Performant is a word!

bsummer4··on Building a Better Custom Haskell Prelude
It's not! classy-prelude is compatible with existing abstractions and doesn't try to replace large portions of the basic types and classes.
bsummer4··on So you're learning OCaml
I think the similarities are mostly superficial. I mean it has (local) type inference, ADTs, and traits (which are sooooorta like type classes). But, as a Haskell programmer, the Rust type system feels very foreign.

No typeclasses (and associated goodness), GADTs, HKTs, Monadic IO, first class functions, generic deriving, higher rank types, existential type, etc. These are bread-and-butter features in day-to-day Haskell work. Rust's type system isn't powerful enough to build the vast majority of the tools that Haskell programmers use every day.

I don't mean this as a criticism; The Rust design seems solid. But different priorities lead to different trade-offs, and the end result is a very different type system.

bsummer4··on So you're learning OCaml
It really doesn't have that much in common with Haskell either. It's designed by people who are not oblivious about PL stuff, but it's still pretty thoroughly in the C/C++ world in terms of both syntax and semantics.

It's not a bad thing, but Rust has very little in common with Haskell/Ocaml; aside from stealing a couple of good ideas.

bsummer4··on What I Wish I Knew When Learning Haskell
Yeah, this is a good point. Both math and music have extremely ad-hoc and inconsistent syntax.
bsummer4··on Warming up to Go
The article spends a lot of time talking about how "Complicated" abstractions are, and about how abstractions come with a complexity cost. IMHO, the opposite is true.

> Whenever I work in Rust, I find myself having a good time mucking around with the abstractions.

Good abstractions, the kind you use in Haskell and (presumably) Rust are simple, non-leaky, and exist to enable simple, correct code.

It's true that abstractions, even good abstractions, take time to learn. However, once you've digested them, you'll see them everywhere, and you can continue to use them for the rest of your life. Functors, for example, are a foundational abstraction. They are extremely simple, extremely powerful, and will relevant forever.

bsummer4··on The bachelor’s to Ph.D. STEM pipeline no longer leaks more women than men
Yep. This is the same bullshit that some companies with open-source products try to shove down your throat.
bsummer4··on John Carmack's son's game in Racket
Racket is pretty cool!

Sincerely, a Haskell developer.

bsummer4··on Pedants' Favorite Grammar Rules are Probably Fake
Sure, but in this case "knowing the rules" is equivalent to being fluent in a language, not some document that you can read.
bsummer4··on Ask HN: Does such a programming language exist?
Haskell is all of these things, though it's library ecosystem has a pretty lengthy learning curve.
bsummer4··on How Soylent Ships a Trillion Calories per Month
1.4 tastes terrible. I've been using it, but I've developed a very specific ritual for making it palatable, and it's still not an enjoyable experience.

If 1.5 is anywhere near as tasty as 1.3, then I strongly recommend that you give it another try. You might be able to buy some from Craigslist or something? I don't know if that's still a thing.

bsummer4··on Cloud Haskell
Any idea when GHC 7.10's static pointers will be supported?
bsummer4··on Is surviving on 20-minute naps bad for you?
Are you sure you're not still waking up in the middle of the cycle? 90 minutes is just a loose generalization. Different people have different sleep cycles and take different amounts of time to fall asleep.

Personally, 2 hours works well for me but 90 minutes does not.

bsummer4··on Pure Python Vim clone
Yi is really nice, overall. The code is clean too.

I don't remember all of the issues, but there are a ton of small things that make the editor unusable to me. I used it for a couple of weeks, and I spent some time working on these issues, but never had PR-worthy code. Here's what I can remember off the top of my head:

- Startup time is very slow because of the way configuration works. In my local copy, I made a version without runtime configuration, and that solved this problem. This conflicts pretty badly with the whole architecture, so I didn't make a PR.

- :n :N don't work. Opening multiple files from the command line doesn't work.

- :cq doesn't work. I fixed this, but my fix was a hack, so I didn't make a PR.

- Operating on regions with '{' and '}' is off by one line in some directions.

- You can't replace regions with shell commands. For example, using '!}sort' to sort a paragraph.

bsummer4··on Pure Python Vim clone
Not really, no. yi badly needs some more love.
bsummer4··on Pure Python Vim clone
You can't write this in Haskell:

  print(arr[i])
You can write this, but you probably wouldn't.

  print (arr `V.unsafeIndex` i)
bsummer4··on Becoming Productive in Haskell
Thank you! This is a really good comment.

Also, your bug reports are really solid.

bsummer4··on Becoming Productive in Haskell
I went through some examples to make 100% sure that fold has different behavior than foldl/foldr:

  fold      [[_ 4 _] 3 _] → f 4 (f 3 #)
  fold2 f # [[_ 4 _] 3 _] → f (f # (f 4 #)) (f 3 #)
  foldl f # [[_ 4 _] 3 _] → f (f # 4) 3
  foldr f # [[_ 4 _] 3 _] → f 3 (f 4 #)
Reductions:

  fold [[_ 4 _] 3 _]
  f    (go [_ 4 _])  (f 3 (go []))
  f    4             (f 3 (go []))
  f    4             (f 3 #)

  fold2 [[_ 4 _] 3 _]
  fold3 f                       #             [[_ 4 _] 3 _]
  f     (go [_ 4 _])            (f 3 (go _))
  f     (f (go _) (f 4 (go _))) (f 3 (go _))
  f     (f #      (f 4 #     )) (f 3 #     )
  f     (f #      (f 4 #     )) (f 3 #     )
  f (f # (f 4 #)) (f 3 #)

  foldl f                     #             [[_ 4 _] 3 _]
  go    #                     [[_ 4 _] 3 _]
  go    (f (go # [_ 4 _]) 3)  _
  f     (go # [_ 4 _])        3
  f     (go (f (go # _) 4) _) 3
  f     (go (f # 4) _)        3
  f     (f # 4)               3

  foldr f                    #                      [[_ 4 _] 3 _]
  go    #                    [[_ 4 _] 3 _]
  go    (f 3 (go # [_ 4 _])) _
  f     3                    (go # [_ 4 _])
  f     3                    (go (f 4 (go # _)) _)
  f     3                    (f 4 (go # _))
  f     3                    (f 4 #)
bsummer4··on Becoming Productive in Haskell
Ugg, I had to spend a fair amount of time coming up with a good example. Hope this is helpful!

The Monoid operation mappend is guaranteed to be associative, so the order is irrelevant. Data structures can fold in whatever way is most efficient for their structure.

It's true that lists and arrays are implemented as right folds, however the fold implementation for sets is neither:

From Data.Set:

  fold = go
    where go Tip = mempty
          go (Bin 1 k _ _) = k
          go (Bin _ k l r) = go l `mappend` (k `mappend` go r)

  -- Here, I reorganized the code of `fold` to have the same shape as
  -- `foldl/foldr` so that you can see the difference in structure more
  -- clearly.
  fold2 = fold3 mappend mzero
  fold3 f z = go z
    where
      go z' Tip           = z'
      go z' (Bin _ x l r) = f (go f z' l) (f x (go f z' r))

  foldl f z = go z
    where
      go z' Tip           = z'
      go z' (Bin _ x l r) = go (f (go z' l) x) r

  foldr f z = go z
    where
      go z' Tip           = z'
      go z' (Bin _ x l r) = go (f x (go z' r)) l
bsummer4··on Becoming Productive in Haskell
Could you name some of these libraries? IME, most of the libraries that are needed for common things are very mature.
bsummer4··on Becoming Productive in Haskell
foldl' is a consistent and meaningful name. fold performs a fold without specifying an order[1], foldl folds from the left, and foldl' is a non-lazy version of of foldl.

1: fold :: (Foldable t,Monoid m) => t m -> m

bsummer4··on Elixir vs. Erlang: a question of momentum
Pusher? Aren't they moving all of their code to Haskell?
bsummer4··on Yi – Text editor written in Haskell
How so?

Basically, the idea is that Yi is actually a Haskell library, and your "config file" is really a Haskell program that uses this library to build an editor.

This is similar to how many suckless tools are written. If you want to configure them, edit the source: It's designed to be approachable and easy to modify.

This style of configuration is extremely nice IMHO. It gives you complete control over everything in one of the cleanest, most expressive languages around. It also means that you don't need to maintain a separate configuration language, and people that use your software are already taking steps towards becoming contributors.

bsummer4··on Yi – Text editor written in Haskell
Yeah, Yi uses Xmonad style configuration. That is, it re-compiles itself when you modify the configuration file.

This approach means that Yi has to depend on the entire Haskell toolchain :(

Page 1 of 2Next →