chenglou changed the topic of #reasonml to: http://facebook.github.io/reason/. Public channel logs at http://irclog.whitequark.org/reasonml
Algebr`` has quit [Ping timeout: 252 seconds]
schmave has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rgrinberg has joined #reasonml
pipeep has quit [Ping timeout: 250 seconds]
pipeep has joined #reasonml
seangrove has quit [Ping timeout: 244 seconds]
jonasen has joined #reasonml
jonasen has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
jonasen has joined #reasonml
pierpa` has quit [Ping timeout: 240 seconds]
Algebr`` has joined #reasonml
Algebr`` has quit [Ping timeout: 258 seconds]
engil1 has joined #reasonml
struk|desk2 has joined #reasonml
struk|desk has quit [Ping timeout: 246 seconds]
engil has quit [Ping timeout: 252 seconds]
sverrej has quit [Ping timeout: 252 seconds]
sverrej has joined #reasonml
andreypopp has quit [Ping timeout: 258 seconds]
andreypopp has joined #reasonml
tadeuzagallo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pierpa has joined #reasonml
rgrinberg has joined #reasonml
rgrinberg has quit [Ping timeout: 250 seconds]
<sspi> What's the idea behind using foo::bar instead of ~foo:bar? I don't see one as better then the other but probably I miss something...
jeffmo has joined #reasonml
sethltx has joined #reasonml
<sethltx> reynir what did you mean?
<sspi> chenglou: can I help with anything Atom-Reason related? not sure what I should pick up
<mfp> sspi: does foo::bar allow punning, as in ~foo ?
<sspi> mfp: yes, it does
<sspi> mfp: hmmm not sure now, tried it but can't get it to work
<sspi> seems unlikely I think
freebroccolo has quit []
<reynir> sethltx: ?
<sethltx> reynir yesterday you said, "not anymore," was just wondering what you were referring to
<reynir> sethltx: "well you're here, that's already fun right :P" and then you timed out :-)
<reynir> It was just a bad joke
<sethltx> oh haha sorry
<mfp> sspi: then one is better than the other ;)
<mfp> punning is most convenient when you have a recursive function with labels
<sspi> mfp: from what I see in the issues it's on the radar - so I expect this to change
<sspi> mfp: but not sure why it needs to be changed - OCaml version seems good enough for me
<mfp> that's good news, making labels unwieldy would defeat their purpose (making code easier to read)
<mfp> I believe it's to match ES6 syntax or something
<mfp> iow. make it more approachable to JS developers
<mfp> but that shouldn't come at the cost of duplicating source code size :)
<reynir> Record field punning is very useful, too, I think
<sspi> mfp: in that case foo {bar, bar2} would make more sense
<sspi> mfp: which I think is possible
<mfp> I don't remember which syntax it was meant to resemble :/
<sspi> hmmm no, too optimistic again
<sspi> anyway, still work left in this area I guess :P
kentwilliam has joined #reasonml
schmave has joined #reasonml
kentwilliam has quit [Ping timeout: 250 seconds]
seangrove has joined #reasonml
kentwilliam has joined #reasonml
jeffmo has quit [Quit: jeffmo]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
schmave has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sethltx has quit [Quit: Page closed]
sethltx has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
schmave has joined #reasonml
jeffmo has quit [Quit: jeffmo]
jeffmo has joined #reasonml
iwan_ has joined #reasonml
kentwilliam has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
<bsansouci> I think part of the point was to avoid using ":" to not overload its meaning, and to have the exact same syntax to declare a named arg and to make a call with a named arg.
<bsansouci> Punning is not yet implemented, but Jordan has a proposal that is to just do `::argName`
Algebr`` has joined #reasonml
<iwan_> A shorter way to write named args, wouldn't be a bad idea... e.g. let module Div { let make style::style children::children onClick::onClick children::children => /* React.DOM.div */ }
<bsansouci> yeah so @schmave has been throwing around the idea to have auto naming. So let make style children onClick ....
<iwan_> All function args auto named?
<bsansouci> yeah
<bsansouci> OCaml allows you to pass args in the right order too
<bsansouci> So you can short declaration and naming if you want. Otherwise you can provide the args in the right order
<iwan_> That would be pretty nice :D
<bsansouci> Using `::argName` for punning also solves this without ambiguity... I think Jordan's still looking for the best solution
<iwan_> `::argName` is indeed less ambiguous.
<iwan_> depends on the type of developers user is targeting
<Algebr``> I want prunning
<bsansouci> Algebr``: :)
<Algebr``> bsansouci: are you coming tonight
<bsansouci> Algebr``: Oooooh you're him! olololol
<bsansouci> I told you, I can't :/
<bsansouci> I'd be pretty down to organize those meetup... But I don't know of a place that would accept a bunch of random people other than my apartment
<Algebr``> oh doh forgot
<Algebr``> lol, you didn't know it was me?
<bsansouci> I hadn't put 2 and 2 together, but I remember you told me this was you already :p
<bsansouci> How's JSC treating you?
sethltx has quit [Quit: Page closed]
<iwan_> Has anyone tried build a React wrapper in Reason (or even OCaml) ?
<bsansouci> iwan_: I think that might happen soon, not sure of existent implementations...
<iwan_> I'm playing with it atm, it's harder than I thought :)
<bsansouci> ¯\_(ツ)_/¯
<bsansouci> You want to just wrap it in a typed interface?
<iwan_> That's the idea
<iwan_> I found an OCaml api sketch from Jordan himself https://gist.github.com/jordwalke/67819c91df1552009b22
<bsansouci> Which part is harder than you thought?
iwan_ has quit [Ping timeout: 250 seconds]
iwan_ has joined #reasonml
<iwan_> There are some things I take for granted in React.js, e.g. `children` can be either a plain old string or a component. Never thought about it.
<iwan_> Or all the elements like `React.DOM.div`
<iwan_> if I want to generate those from a list of tags like ["div", "h1", "p", etc.]
<iwan_> I think that isn't possible with Reason being statically typed.
<iwan_> Mapping those elements to modules I mean
<iwan_> Meanwhile I got a `div` tag working xD
<iwan_> open React.DOM; let random_div = Div.make children::[Text "this is a random div"]; React_DOM.render random_div root_node;
<Algebr``> bsansouci: very good, although going back and forth about how to represent stuff.
<Algebr``> Decided to go with a higher level view and using objects
<bsansouci> If you really want to go down that route you can use ppx. But it has been giving me headaches lately so I'd recommend finding some other solution even if you feel like it's less nice
<Algebr``> trying to get typechecking help from flow, have an open issue from them
<bsansouci> Iwan_: Oh wow nice. Do you run this through js_of_ocaml?
<Algebr``> iwan_: I have
<Algebr``> Iwan_: its difficult to type properly
<iwan_> I'm running it through js_of_ocaml and pipe it through webpack
<Algebr``> handling this is a bit annoying
<iwan_> does ppx work with Reason?
<Algebr``> it should
<bsansouci> Algebr``: represents stuff internally?
<bsansouci> Yes of course :d
<Algebr``> what represents stuff interally
<bsansouci> > "very good, although going back and forth about how to represent stuff"
<bsansouci> What are you talking about when you say represent stuff :p
<Algebr``> whether to not to garbage collect JSC objects
<Algebr``> right now only doing it for a Virtual Machine
<bsansouci> why wouldn't you?
<Algebr``> because they arne't really meant to be GCed since they have their own release/retain calls
<Algebr``> so caller can take care of calling release
<Algebr``> and say you put a JSStringRef in a vm, I don't know what that vm will do, will it add a retain call itself? Best to not be too smart about it i think.
<bsansouci> Oh man... Removing GC from JS ... Feels pretty darn dangerous lol
<Algebr``> No no, not from JS
<Algebr``> from the JSC values themselves
<Algebr``> would make more sense if you are more familiar with JSC
<bsansouci> ok ok I trust you xD
<iwan_> Has anyone got Bucklescript fully working yet btw?
iwan_ has quit [Quit: Page closed]
<bsansouci> chenglou: ^
<chenglou> sspi: yeah there are a few things to work on for atom-reason. But anything in particular that you're interested in?
<reynir> took me a while to realize JSC is not Jane Street Core
<bsansouci> it's hard to refer to Jane Street folks at JS folks ;)
<Algebr``> okay, so I'll start typing out JavaScriptCore
<chenglou> as for the labelled syntax, it's still being worked on. No punning for now afaik (but we want that too). It's a hard problem because there's also inline type, renaming, optional, optional with default, destructuring and destructuring along with `as` to consider
<chenglou> Iwan_ (when you log back on): BuckleScript listed react bindings in their roadmap. I was gonna make some random ones too
<chenglou> still using jsoo for now
<reynir> Algebr``: I guess it's fine. It's just unfortunate that JS can mean the company or the language :-)
kentwilliam has quit [Ping timeout: 250 seconds]
jeffmo_ has joined #reasonml
jeffmo has quit [Ping timeout: 244 seconds]
jeffmo_ is now known as jeffmo
<Algebr``> jeffmo: you're on flow right
schmave has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
freebroccolo has joined #reasonml
<jeffmo> Algebr``: I am, yea
schmave has joined #reasonml
<bsansouci> Algebr``: you know ocaml pretty well right? Is there any way to check what preprocessor a file depends on other than grep-ing the file
<Algebr``> jeffmo: presume you saw this, https://github.com/facebook/flow/issues/1947, any help/pointers?
<Algebr``> bsansouci: i'd like to think so. what do you mean what preprocessor?
<Algebr``> like what ppx it will use?
<jeffmo> Algebr``: looking..
kentwilliam has joined #reasonml
<jeffmo> Algebr``: So IIUC you're looking to extract the detailed error info from the error being raised?
<jeffmo> Parse_error.ml should be all you need
<jeffmo> Errors_js.ml is typechecking stuff -- I think you only want parsing stuff here
<jeffmo> Algebr``: ^
<jeffmo> Parse_error.Error is the exception that has a list of error messages (Parse_error.t) couple with location info for the errors (Loc.t)
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
seangrove has quit [Ping timeout: 250 seconds]