These are chat archives for got-lambda/expression

4th
May 2017
Erik Svedäng
@eriksvedang
May 04 2017 07:31
When monads go wrong
iiiniti igi(i)i i{i
i i irieitiuirini i1i2i3i.i0i;i
i}ninnntn ngn(n)n n{n
n n nrnentnunrnnn n1n2n3n.n0n;n
n}titnttt tgt(t)t t{t
t t trtetttutrtnt t1t2t3t.t0t;t
t} i n t   g ( )   { 
     r e t u r n   1 2 3 . 0 ; 
 }fifnftf fgf(f)f f{f
f f frfeftfufrfnf f1f2f3f.f0f;f
f}(i(n(t( (g((()( ({(
( ( (r(e(t(u(r(n( (1(2(3(.(0(;(
(})i)n)t) )g)())) ){)
) ) )r)e)t)u)r)n) )1)2)3).)0);)
)} i n t   g ( )   { 
     r e t u r n   1 2 3 . 0 ; 
 }{i{n{t{ {g{({){ {{{
{ { {r{e{t{u{r{n{ {1{2{3{.{0{;{
{}
i
n
t

g
(
)

{
Fredrik Dyrkell
@fredyr
May 04 2017 07:35
:D
Fredrik Dyrkell
@fredyr
May 04 2017 08:16
quite a few that has dropped out last minute from the meetup
but i guess thats normal
still got 40 ppl coming, so thats exciting
:thumbsup:
Fredrik Dyrkell
@fredyr
May 04 2017 09:14
@Jell BTW, can I ask how much pizza and soft drinks you've usually ordered (based on how many people answered yes)
estimation is difficult :D
Jean-Louis Giordano
@Jell
May 04 2017 09:15
ah! depends on the pizzeria
I think we go for 1 pizza for 2 based on the number of people that registered (knowing that only between half and two-thirds actually shows up)
Fredrik Dyrkell
@fredyr
May 04 2017 09:16
cool
Jean-Louis Giordano
@Jell
May 04 2017 09:17
the result is quite random, but 1 for 2 has always been either just enough or too much
which I think is overall reasonable
Fredrik Dyrkell
@fredyr
May 04 2017 09:17
there's 40 on the list right now, so that would mean 15 pizzas?
Jean-Louis Giordano
@Jell
May 04 2017 09:17
something like that
Fredrik Dyrkell
@fredyr
May 04 2017 09:17
:thumbsup:
thanks
im hungry already
Jean-Louis Giordano
@Jell
May 04 2017 09:18
:smile:
Marco Zocca
@ocramz
May 04 2017 10:08
@eriksvedang what happened to that output? a race between threads?
jolod
@jolod
May 04 2017 10:29
@eriksvedang @ocramz Looks like the elements in a list of strings were merged applicatively? Like ´(,) <$> xs <*> ys´. <--- Does not pair up the elements, I think.
Erik Svedäng
@eriksvedang
May 04 2017 10:34
yeah, no threads :) something like fmap sequence (mapM binderToC binders)
correct one was sequence (map binderToC binders)
(I'm rewriting the Carp compiler in Haskell)
Marco Zocca
@ocramz
May 04 2017 10:37
\m/
@eriksvedang you're a champ
Erik Svedäng
@eriksvedang
May 04 2017 10:39
thank you! It's definitely easier than the previous time ^^
Marco Zocca
@ocramz
May 04 2017 10:40
writing compilers is one thing Hs is good for
Erik Svedäng
@eriksvedang
May 04 2017 10:42
for sure
Magnus Therning
@magthe
May 04 2017 11:01
it's also easier to write a program the second time around :)
Fredrik Dyrkell
@fredyr
May 04 2017 12:09
:D
@magthe or anyone that might know, I was looking for a gzip reader for OCaml/Reason
but only got confused w/ some Batteries beta version having docs and not finding that much references on it elsewhere
Fredrik Dyrkell
@fredyr
May 04 2017 12:16
this might be
Magnus Therning
@magthe
May 04 2017 12:16
yupp
Fredrik Dyrkell
@fredyr
May 04 2017 12:16
oh
:D
thanks
Magnus Therning
@magthe
May 04 2017 12:17
French-sounding name too, that's promising in OCaml land
:)
Fredrik Dyrkell
@fredyr
May 04 2017 12:18
lol
yes i'm rather surprised that jean-louis went with haskell before putting OCaml into production :wink:
Jean-Louis Giordano
@Jell
May 04 2017 12:19
¯_(ツ)_/¯
Fredrik Dyrkell
@fredyr
May 04 2017 12:35

/* Decompress a gzip to stdout */
let buffer = Bytes.create 4096;

let _ = {
  let ic = Gzip.open_in_chan stdin;
  let rec decompress () => {
    let n = Gzip.input ic buffer 0 (Bytes.length buffer);
    if (n == 0) {
      ()
    } else {
      output stdout buffer 0 n;
      decompress ()
    }
  };
  decompress ();
  Gzip.dispose ic
};
1-minute hack to get something
all needed was opam install camlzip
and rebuild -pkgs zip gziphack.native
Magnus Therning
@magthe
May 04 2017 12:38
nice tooling is nice!