F# の Trampoline の話+α

補足していない部分があるかも
1
Mauricio Scheffer @mausch

Cool, @pocketberserker's port of attoparsec to #fsharp includes an implementation of trampoline github.com/pocketberserke…

2014-05-22 00:46:41
Nick Palladinos @NickPalladinos

@mausch Actually the code of @pocketberserker is very similar with the code from my old snippet.

2014-05-22 01:40:58
ぽけば @pocketberserker

@NickPalladinos @mausch I tried to implement a trampoline in reference to blog.higher-order.com/assets/trampol… . But I could not implement free monad...

2014-05-22 09:10:22
ぽけば @pocketberserker

まぁ、確かに私のTrampoline実装だとtype freeではない…。が、にっくさんの実装は最適化されるのか…?よくわからん。

2014-05-22 09:13:51
Nick Palladinos @NickPalladinos

@pocketberserker @mausch Yiep Im aware of this paper, my trampoline uses the same gadt free monad encoding and explicit tagging.

2014-05-22 16:37:04
Nick Palladinos @NickPalladinos

@pocketberserker @mausch one interesting difference between scala and f# tramp. is the lack of implicit delay thunks in scala's for monad.

2014-05-22 16:45:33
Mauricio Scheffer @mausch

@pocketberserker @NickPalladinos Been thinking about Church-encoding Free using inline to overcome lack of type constructor abstraction...

2014-05-23 01:57:08
Nick Palladinos @NickPalladinos

@mausch @pocketberserker Noop, Scala's for-monadic support is simply a lot less expressive than F#'s computation expressions.

2014-05-23 02:15:00
Nick Palladinos @NickPalladinos

@mausch @pocketberserker I have done some crazy things in this direction. But I think is language abuse. We must love F# for what it is.

2014-05-23 02:17:27
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker Meh, "language abuse" is too subjective. Do you also consider FsControl/FSharpPlus as lang abuse?

2014-05-23 02:28:38
Nick Palladinos @NickPalladinos

@mausch @pocketberserker Abuse maybe is a strong word. Do not get me wrong I really like PL theory/type theory and in general abstract math.

2014-05-23 02:34:55
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker I know little about PLT, but I just want more tools to enforce correctness. Wasted much time 4 lack of it.

2014-05-23 02:41:56
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker If I have to "bend" the lang a little to get more correctness and downsides aren't bad, I'll go for it.

2014-05-23 02:42:36
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker Yes, I've been following your fssnips with much interest :)

2014-05-23 02:43:08
Nick Palladinos @NickPalladinos

@mausch @pocketberserker I get your point. It is always a balance. For correctness will be great if ideas from F* find their way to #fsharp.

2014-05-23 02:49:28
Nick Palladinos @NickPalladinos

@mausch @pocketberserker Instead of having to "bend" the language for correctness you can try another route, but this margin is too small :)

2014-05-23 02:55:33
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker Heh, if you mean work on improving the lang, I'm just a regular web developer, I just use what I have :)

2014-05-23 02:59:21
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker Which most of the time is restricted to just Javascript and C#

2014-05-23 03:00:12
Nick Palladinos @NickPalladinos

@mausch @pocketberserker You can write your programs in Coq, prove them correct and extract OCaml code.

2014-05-23 03:02:32
dk @action_dk

@NickPalladinos @mausch @pocketberserker did you have any more thoughts on this? What compile time features can be dragged across?

2014-05-23 03:03:28
Mauricio Scheffer @mausch

@NickPalladinos @pocketberserker Adam Chlipala's book has been in my bookmarks for a long time. One day I'll get to it :)

2014-05-23 03:05:59