chenglou changed the topic of #reasonml to: facebook.github.io/reason/. Public channel logs at irclog.whitequark.org/reasonml. Discord: discord.gg/reasonml
<mst>
chenglou: hm. I thought reason was meant to compile to native as well?
<mst>
I don't mind it being a bit more work
<mst>
I just wanted an adult language server side, I prefer to keep node.js as a dev/build dependency where possible
<mst>
(sorry if I'm being dumb/annoying here)
<kapitan>
Same here, I am interested in knowing if reason can transpile down to Bucklescript so that I can target node as well. I don't mind contributing a patch in case :)
<mst>
kapitan: bucklescript seems to be the main target
<mst>
what I'm asking about is being able to use bucklescript for browser side and then target the native backend for server side
<mst>
since I don't -really- want node/npm in my server side deployment dep chain if I can avoid it
<kapitan>
mst: thanks for answering, in my case I will be using Reason mainly server side, but I have the requirement of Node. Do you know how smooth it is?
<mst>
well, it's what the reason team were recommending
<mst>
so presumably smooth enough
<kapitan>
kk, fingers crossed
apache2 has joined #reasonml
apache2_ has quit [Ping timeout: 258 seconds]
Guest66364 has joined #reasonml
Guest66364 has quit [Quit: So long and thanks for all the fish ...]
<chenglou>
@kapitan: check the js workflow section
<chenglou>
@mst: the native section is just the ocaml opam/rebuild/whatever workflow
<mst>
chenglou: right, which is totally fine, I'm just trying to figure out what I can use server-side (for straight business logic type code I tend to prefer to *not* be async unless I need to, the extra complexity isn't worth it for initial development)
<mst>
of course I could always just pre-fork a bunch of node instances and stop whining ;)
<chenglou>
Yeah our native workflow story can be as simple as you want. Grab the refmt binary and go wild! =P
<mst>
I like the idea of being able to compile a single binary for the server, basically
<mst>
(yes I know node.js is statically linked, that's still not quite as neat ;)
copy` has quit [Quit: Connection closed for inactivity]
<mst>
chenglou: btw, must admit that the more I go through e.g. ocsigen examples the more I realise that I'm probably going to end up liking the reason syntax better in its own right, JS-flavoured-ness be damned
<chenglou>
haha, call it C-like syntax if that feels better =)
<reynir>
kapitan: You can use either js_of_ocaml (aka jsoo) or bucketscript to target javascript. For jsoo there's https://github.com/fxfactorial/ocaml-nodejs for node bindings
copy` has joined #reasonml
<kapitan>
reynir: well I like Reason's syntax as I am an OCaml newbie
<kapitan>
is there an example somewhere on how to require node.js, "fs" let's say, in a Reason program?
caisah has joined #reasonml
<reynir>
kapitan: yea, you can use either with reason
<reynir>
js_of_ocaml works fine with reason despite its name
<reynir>
As for ocaml-nodejs, I have no experience using it (sorry)
caisah has quit [Ping timeout: 252 seconds]
<kapitan>
reynir: no probz, thanks for the info
<reynir>
kapitan: In general I think virtually all OCaml libraries and tools should work just fine with reason
<kapitan>
reynir: yeah I believe so, I was just wondering where to find an example because I am completely new to both :)
<kapitan>
but I'll find it
<reynir>
There should be a tool for translating between reason and ocaml if that helps
<kapitan>
yep, it is `refmt`
<kapitan>
incredible ticks are automatic after so much writing in slack :D
<reynir>
slack is annoying, takes up a lot of resources and the browser tab crashes every few days :(