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?
<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?
<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 :-)