Threads for chrishenn

  1. 1

    Very cool. I’ve been exploring similar solutions lately but this one takes matters much further.

    One aspect I would change would be checking that every action is handled. Most Redux apps I see use multiple reducers via combineReducers, but every action is still run through every reducer in that case. So some actions definitely shouldn’t be handled. For that reason, I also want to use a single app-wide action type (to detect conflicting actions names).

    1. 1

      Thanks. The solution I end up with discards the handler for every action check since the Action types are derived from the handlers themselves. If you wanted multiple reducers I suppose you could create multiple Handler classes and derive an Action type for each, then union these for the overall Action type.

      Of course, if you have a separate handler function for each action anyway you won’t need any reducers.

    1. 2

      I’m supposed to be working on a paper, so I wrote a CLI to search for BibTeX references instead :)

      This was just a little learning project, my first time writing Rust. Coming from JavaScript and Python, I really enjoyed the experience.

      1. 3

        I like Knuth’s take on the subject: http://literateprogramming.com

        1. 13

          Still working on Haskell Programming with my coauthor Julie. Recently finished an initial scaffold of the functor/applicative/monad material, moving on to foldable and traversable now. We’re releasing algebraic datatypes through testing (right before monoids) this 15th. Next month on September 15th the monoid/functor/applicative/monad sequence will be released.

          Kicking around ideas for a final project, pretty hard to find something that fits all of our specifications. Not easy to find something that’s:

          1. Tractable for a beginner without much exposure to Haskell libraries. We’re not assuming they know databases and the like, for example. The book is written with the limitations of inexperienced programmers in mind.

          2. Sufficiently interesting to someone that hasn’t been neck deep in code or distributed systems for awhile. I’d love nothing more than to have them make a Kafka or SaltStack clone in Haskell but it’s going to bore them to tears.

          Trying to avoid heavy duty web apps that would require a lot of frontend work or learning a whole framework as well. If anyone has any suggestions, please reply here or please tweet or email them to me.

          We’re also looking for reviewers (of any experience level) so if you have the time and it interests you, please reach out!

          1. 6

            For a final project, perhaps a (text based) command-driven discussion / social network? Maybe start out with an in-memory implementation then swap it out for a file-based implementation (reinforcing the abstraction tools you’ve taught)? It could be a lead-in to databases: “manipulating all that text data was kind of a pain and won’t be very fast with hundreds of users. go check out databases!”. You could also generate/serve some simple HTML and say “that’s the basic idea behind webapps”

            1. 5

              I really like this idea! I’d have to think about how to avoid the problems with NAT and networking for home-users, but I’m going to kick it around with Julie and see if there’s something workable here.

              Thank you :)

              1. 3

                Maybe could be a LAN-only thing for e.g. conferences or something along the lines of that.

                1. 3

                  Pop-up social network?

                  1. 3

                    That’d be a good descriptor: you could include your <social-network-du-jour> handle in your profile for longer-term connections, maybe. For a talk, maybe a way to submit questions during the talk and have them queued up at the end.

                2. 2

                  Sure thing!

                  Maybe https://ngrok.com/ will help? (also has a handy request inspector!). I’m not sure if it will be appropriate in complexity/difficulty for your audience, though.

              2. 2

                I’d like to review. What do you need?

                1. 1

                  Is the email address in your lobsters profile a good way to reach you?

                  1. 1

                    Yeah, sure, contact me at jordigh@octave.org

                2. 2

                  For review, do you need anything more formal than what I’ve been sending you and Julie on Twitter?

                  1. 1

                    It’s more work and structure than that, but what you’ve been doing isn’t wildly different.

                    1. 2

                      I wouldn’t mind helping out, since I want good learning materials out there.

                      Use the email address I used when I mailed you last week if you want to send me more info.

                  2. 2

                    Cool, i’m curious what you think of the maybe haskell book that thoughtworks put out recently? I rather liked its approach of introducing functor/applicative/monad as concepts. I wish it had been out a year ago when I was starting to relearn haskell in earnest.

                    I’ll have a look at the new updates after you update the epub, been following along with interest on this book.

                    And for a final project, can always punt and do a todo application. >.<

                    1. 2

                      It’s hard for me to think about a 94 page book when we’re working on something much longer with very different objectives. You could probably stack it up against how I review books with more similar objectives in this post and see whether it hits the high notes I care about.

                      It’s very hard to think about a book with wildly different scope like that. We release >100 pages every month and we’re trying to make a book that gets people from zero to, “I can begin to solve my problems with Haskell”.

                      More fundamentally, I’m skeptical people can just be taken on an isolated tour of functor/applicative/monad, there are foundations that have to be in place for it to be anything but cargo culting.

                      1. 2

                        Fair enough, just thought i’d ask is all. Looking forward to the updates regardless! I’ll dig into the link.

                        1. 2

                          More specifically about Maybe Haskell: I think it’s worth giving people a teaser of what’s possible. I do this sort of thing too, but usually for in-person demos/tutorials. However, I don’t regard them as being a component of any kind of pedagogical scheme.

                          1. 2

                            For sure, i’ll admit maybe haskell is at best a great way to whet someones appetite for haskell. So in that regard I’d place it alongside LYAH. Although even less comprehensive in that it doesn’t cover a whole lot of haskell at all. Then again it doesn’t really bill itself as such either.

                            I just really liked the approach to the functor/applicative/monad explanation used is all. It helped convince a friend to learn haskell. But they’re hitting the same wall everyone seems to with haskell learning materials. I’m helping but i’m not the best teacher so I’m not sure if I’m hindering more than helping. Haskell isn’t hard either its just difficult to elaborate why doing things a different way is beneficial. In hindsight its 20/20 but from the other direction it just looks like a mirror.

                            Either way keep it up the lambda calculus links on the first chapter were fun to review and read. I was pleasantly amused that you started out with that.

                    2. 2

                      I grabbed a copy of the book last week, so far so good.

                      1. 2

                        sure, i’d be glad to help review. email address in profile is valid.

                        1. 1
                          1. 2

                            oops, thought i had :) fixed now

                        2. 2

                          Looking over the ToC, I’d noticed that the four final chapters are TBA. I’d love to see at least one on something along the lines of “using Haskell in anger”: some tips for real-world Haskell use. Things like common packages to be aware of, debugging, problem solving with Haskell, and deploying my programs. Are there plans to include something like that?

                          1. 2

                            We’re always open to ideas/suggestions, but those chapters are literally TBA. We have topics planned for them.

                            The “almost guaranteed to happen” chapters are IO, “when things go wrong”, and the final project. The more open slot is DSLs & APIs. Data structures covers a lot of the common packages to be aware of, monad transformers covers some of those as well. Debugging is sort-of part of “when things go wrong” but it’s probably not quite what you’d think.

                            The way we name our chapters hides practical examples. The upcoming release (15th) has more practical projects and examples than have been seen so far.

                            1. 2

                              Fair enough.

                              1. 2

                                Your suggestions are very much appreciated as I wasn’t happy with the “DSLs & APIs” chapter and I’m seeing a common theme (which you’ve improved the confidence in) in what practical bits people want.

                          2. 2

                            I’d be happy to review; I’m going to university in a couple of months and will be doing a very theoretical CS course, which begins with haskell - I’ve been told to buy the Bird book on Haskell, but a lot of people have told me it’s terrible. I already know the basics of haskell though as I’ve used it for a couple of years.

                            1. 1

                              What email should I contact you at?

                              1. 1

                                Ah, I sent you a pm, not entirely sure how the privacy settings work on this website but I was under the impression my email was viewable in my profile.

                                1. 1

                                  Only what you explicitly put in the “About” box is visible (plus your Gravatar). You can see here what’s visible: https://lobste.rs/u/NickHu

                                  1. 1

                                    I just thought there ought to be a “make my email public” checkbox or something like that, and reading https://lobste.rs/privacy implied that that might already be the case, duly noted though.

                            2. 2

                              I’d love to help review! I have experience in other languages, and have made a few false starts with Haskell (through LYAH and the cis194 class).

                              1. 1

                                A cis194 dropout is a perfect candidate for us! What email should we contact you at?

                                1. 1

                                  There’s a link in my profile now. Thanks!