Search Haskell Channel Logs

Tuesday, March 7, 2017

#haskell channel featuring Rotaerk, EvanR, peddie, athan, wizard1337, lambdabot,

EvanR 2017-03-07 19:54:19
if you wait for a result and the thread crashes you get the exception
EvanR 2017-03-07 19:54:50
when the thead is spawned, weird asynchronous exception possibilities are handled
Rotaerk 2017-03-07 19:54:51
sounds like the way tasks and await work in C#... you don't get the exception until you wait for the task, even if it actually is thrown long before you await it
Rotaerk 2017-03-07 19:55:28
it just seems unnecessary to me to ... cancel a task from within itself
Rotaerk 2017-03-07 19:55:39
instead just return from it cleanly
EvanR 2017-03-07 19:55:52
killThread throws a ThreadKilled exception to a thread
athan 2017-03-07 19:56:07
:x
EvanR 2017-03-07 19:56:12
so killing yourself is the same thing (or intuitively is the same) as just thowing an exception
EvanR 2017-03-07 19:57:37
throwIO (userError "I'm dead")
athan 2017-03-07 19:58:54
but... async will ignore it unless they are `link`ed... right?
EvanR 2017-03-07 19:59:27
what, if you throw an exception, youre not going to be continuing
EvanR 2017-03-07 19:59:37
:t throwIO
lambdabot 2017-03-07 19:59:40
Exception e => e -> IO a
EvanR 2017-03-07 19:59:46
it returns an "a"
EvanR 2017-03-07 20:00:23
its illogical to continue
athan 2017-03-07 20:01:08
crud, thanks EvanR
EvanR 2017-03-07 20:01:48
no one may ever know you are dead, but thats another story
EvanR 2017-03-07 20:02:16
but if no one is listening, who cares
wizard1337 2017-03-07 20:24:22
aces: then grow those bits with time
aces 2017-03-07 20:24:51
wizard1337: I don't know much about the basics as of yet. I still need to learn the concepts prior to writing code.
peddie 2017-03-07 20:25:05
@where nicta -- aces
lambdabot 2017-03-07 20:25:05
https://github.com/nicta/course
peddie 2017-03-07 20:25:19
@where cis194 -- aces
lambdabot 2017-03-07 20:25:20
http://www.seas.upenn.edu/~cis194/spring13/
wizard1337 2017-03-07 20:27:25
omg ghci has tab completion :D
aces 2017-03-07 20:27:32
Thank you peddie , having a look.
wizard1337 2017-03-07 20:28:48
and use stack, not cabal
peddie 2017-03-07 20:28:51
aces: good luck and have fun