« first day (930 days earlier)      last day (4079 days later) » 

10:00 PM
Real World Haskell and Learn you a haskell are the two everyone is supposed to work with
argueably LYAH is more basic where RWH get's into actually doing real development
 
user20683
a metaguide to learning Haskell
 
RWH has chapters that go over implementing network based applications, database based applications, using STM, etc etc, LYAH is great for getting your head into the haskell mindset understanding functors, applicatives, the data types and abstraction techniques idiomatic in haskell
 
psr
Book form about $70 for both. Shame no employer is likely to cough up for them. Books=less eye strain. I'll probably read both on line, though it will go faster if I shell out for the books.
 
user20683
@JimmyHoffa LHFH is interesting for a Haskell tutorial because it starts with Hello World
 
10:06 PM
@psr I never read RWH, I find it a great reference when I want to work with a particular library as it has chapters for lots of the large ones, I read LYAH on a tablet on my porch every night a summer ago
The distinct difference between RWH's approach and LYAH's approach is good as people find one of the two works better for them (and usually the other works poorly for that person)
@WorldEngineer I think I looked at that one a while ago, seems decent for a tutorial style thing. Would actually fit great on SoH
 
user20683
There's also the official wiki
 
@psr have a look here and keep in mind that do notation is hiding some facts from you as you progress you'll want to learn to use monads without it, but don't worry about it, just keep it in mind every time you write something with do
 
psr
10:36 PM
@JimmyHoffa - I get that monads don't change the pure evaluation style of the language - though they might fake it by building up a parse tree of actions to execute outside that environment, using whatever core level cheat the compiler must have for doing things like that. Or at least, something like that.
 
Correctish, except the last part about a compiler cheat, the only cheats at the compiler level are how the primitive data types are defined
 
user20683
@JimmyHoffa Async seems very Monadish to me
 
@WorldEngineer coroutines are monadic
 
psr
@JimmyHoffa - So how are non-pure things done without a cheat?
 
generally
@psr Foreign Function Interface, basically interoperability
putStrLn uses the FFI to call out to a C lib
 
psr
10:40 PM
You don't count that as a cheat? Can you write a Foreign Function Interface in Haskell?
 
user20683
@psr yes
 
Eh, I guess perhaps it is...
I mean, it's a linking operation
is that a cheat? iduno, it is a facility of the compiler like you figure
Though technically the haskell compiler is written in haskell
 
user20683
Compilers are like politicians, they lie and cheat as much as is necessary to make deals
 
so I suppose you can implement FFI in haskell given that..
 
psr
10:42 PM
@JimmyHoffa - I think somewhere it does let you do something impure - it has to.
 
@WorldEngineer yeah, that's pretty much right
@psr FFI is where all the impurity happens
 
psr
@JimmyHoffa - Sounds like a commercial.
 
@psr when you get your head around monads more you'll start to see how it makes what would otherwise be impure actually pure, the first time you try to get something out of an impure context and realize you can't you'll begin to feel funny and realize there's something going on
 
psr
@JimmyHoffa - I actually understand that part (proficiency is another thing entirely). I'm just saying, something somewhere got something into the impure context. It might make it easier for me to reason about things if I knew where. Possibly FFI, then.
 
yeah, it's all FFI
 
psr
10:46 PM
Makes sense, actually.
So, MUMPS FFI is my ticket to fame and fortune, then.
 
if you have an IO a, you can't get the value of a without calling UnsafeCoerce (which you should basically never do, though as you're working with it to begin with you'll really feel like you should be using UnsafeCoerce for things)
(FFI lives in the IO monad, that's what makes the IO monad special)
 
psr
Without knowing implementation details of whatever you are unsafe coercing it must be hard to know what you will actually get. At minimum what state changes have been applied to a would often be implementation dependent. If my mental model of things is correct.
 
sorry not unsafeCoerce, I meant unsafePerformIO, it's the only way to: IO a -> a
unsafeCoerce is the haskell equivalent of a cast, it's a -> b which is also pretty crazy
and yeah, with unsafePerformIO you really don't know what's going to happen (or if it's just going to explode)
 
11:07 PM
mumps ffi huh? I would have presumed you'd prefer a mumps interpreter. For ffi you could just hide normal interop approaches, Haskell interops fine with C or C++
 
psr
Actually if I did anything it would most likely be a MUMPS code generator - which loses quite a lot of value but is quite a lot easier.
 
11:46 PM
implement foldr to spit out a for loop etc.. Interesting idea
 

« first day (930 days earlier)      last day (4079 days later) »