|
Barnyard Protein posted:Math articles on wikipedia read like they were written by someone jacking off to how much smarter they are than everyone else. I guess it is supposed to be a reference, not a text book, but Its hard to find math text books that aren't too advanced or too basic. I just ordered this, thank you. I've heard good things about Algebra 0. I've started Algebra of Programming and it is very, very good. Harder to find though.
|
# ¿ May 8, 2015 20:32 |
|
|
# ¿ May 2, 2024 20:22 |
|
FP complete articles are getting better. This works with any language: Start with a simple target like a TODO list web application. Pick a library like Spock or Servant for web stuff, and a friendly database library. Between that documentation, LYAHFGG, and StackOverflow you should be able to limp by. It will be painful at first, but by the end of it you will feel much less crippled and be ready to stroll around the language more confidently. Edit: Also use stackage and stack https://www.stackage.org/
|
# ¿ Jun 19, 2015 09:19 |
|
Use different types of monads. For normal boring enterprise application development in Scala, I've seen folks just use Option and Future in for comprehensions and never really think about what makes a monad or what you're doing under the hood, or that these are monadic operations, except that one value depends on another. But if you demonstrate all the other cliche stuff you would use a monad for, like a functional random number generator, or state (generalization of the former) or logging via writer, it's easier to see a pattern and why you would use these things. Then start thinking about combining effects. I want a machine that gives me logging, the ability to depend on asynchronous values, and an error channel with fail fast semantics. You can build that by stacking monad transformers, which I think of just as 'compressing' monads into another monad. Doing that will give you neat insight into how monads are used in practice.
|
# ¿ Apr 20, 2016 18:55 |
|
xtal posted:Lately I've been learning Idris because Haskell has a bunch of warts that make me cry. The library support is, expectedly, lacking, so I'm considering writing Haskell with an alternate prelude instead. Has anybody worked with ClassyPrelude, Protolude or Foundation who can help me decide what to use? (Or tell me if this is even a good idea, because I expect I am going to need to add a whole lot of string conversions for compatibility with libraries.) I can't answer any of your questions but I'm curious as to what warts you consider to be intolerable in Haskell? Are any of these resolved in version 8 or with compiler extensions? And what is satisfactorily solved by Idris? I've been writing (functional) Scala for the last few years, and I'm sick of suffering its warts. Haskell is closer to what I want, but it'll take a good bit of personal investment before I am useful with it. Lack of libraries aside, is Idris much better?
|
# ¿ Sep 3, 2016 01:45 |
|
I don't really find local mutation very useful. My kind of programming (enterprise SOAy type stuff) doesn't really need super tight performance. GC pauses are occasionally worrisome though. As for reasoning about complexity: if you honestly think a local mutable variable is going to make your function simpler, then your function is probably too big, or you should just learn how to use fold, map and flatMap (or bind). I can't really see how a local mutable variable makes code simpler. There's something to be said for: maybe that's just how your brain works, and it shouldn't really matter so long as a functional interface is presented upwards. But for devs on my team, I politely decline to merge PRs with mutation unless it's very clearly needed for a very specific reason, and suggest an alternative implementation.
|
# ¿ Oct 11, 2016 03:51 |
|
I am writing Diplomacy (the board game) as a REST service which I will turn into a Slack bot. I've used it for a few other random small services. I have no loving clue what Australia uses it for, but here's the job post: https://jobs.csiro.au/job/Brisbane%2C-QLD-Functional-Programming-Engineers/385668100/ Galois in Portland, Oregon, US uses it for space stuff. Or maybe crypto stuff. Or maybe crypto in space stuff. https://galois.com/careers/software-engineer/ Its ecosystem is good enough to use it as a general purpose programming language, but for some applications it is pretty obtuse. sink fucked around with this message at 04:42 on Feb 2, 2017 |
# ¿ Feb 2, 2017 04:40 |
|
FB also uses it for spam, and hired Brian O'Sullivan and some other big-name Haskell people. Many talks online about Haskell at Facebook and how to train an engineering team in FP. As a side note, they also use OCaml and built a new and somewhat disappointing-looking language on top of it.
|
# ¿ Feb 2, 2017 06:10 |
|
|
# ¿ May 2, 2024 20:22 |
|
I'm starting to write some small DSLs for work (and well, for fun. It's really fun). I'm building interpreters with Scala and the atto parser combinator library (https://github.com/tpolecat/atto), which is amazing. The DSLs aren't meant to be used from within Scala, it's just that the interpreter / compiler is implemented in that language. My DSLs are declarative but have features like variable dereferencing, function application, native lists, some basic typechecking, etc. I think I did an okay job implementing them, but I was wondering if anyone can point me to some modern literature on compiler and interpreter implementation. I'm aware of some of the papers on Free and extensible effects, but I am not using those techniques here.
|
# ¿ Jun 15, 2017 02:47 |