<zRecursive>
If there is no opam.exe, i will try to built it later.
unbalancedparen has quit [Quit: WeeChat 1.5]
<Algebr>
I'm kind of torn about which to js compiler to really endorse and stick with. bucklescript is in some sense nicer, I like that its a direct patch to the compiler itself rather than byte code hassle
<Algebr>
and the readablility of bucklescript is invaluable
<chenglou>
Algebr: do you have experience with bucklescript?
<Algebr>
little bit
<Algebr>
much more jsoo
govg has quit [Quit: leaving]
zRecursive has quit [Remote host closed the connection]
zRecursive has joined #ocaml
walter|r has quit [Remote host closed the connection]
johnelse has quit [Ping timeout: 260 seconds]
tmtwd has quit [Ping timeout: 246 seconds]
nicholasf has quit [Read error: Connection reset by peer]
<chenglou>
Algebr: is there any show-stopper with bucklescript right now, in the context of gradually switching a javascript codebase over?
nicholasf has joined #ocaml
<Algebr>
what do you mean, what's stopping me from doing it?
<Algebr>
Only thing stopping me is time effort.
<chenglou>
I meant like, e.g. can't use regex or something
<sgronblo>
which one are you using of Lwt and Async?
<Algebr>
who are you asking?
rgrinberg has quit [Ping timeout: 260 seconds]
tmtwd has joined #ocaml
Mercuria1Alchemi has joined #ocaml
<toolslive>
I have two class types; Can I constrtuct a class that has the two types ? (something like 2 pure virtual classes and a class that inherits both, but on type level)
A1977494 has joined #ocaml
yunxing has joined #ocaml
hcarty has joined #ocaml
hcarty has quit [Ping timeout: 260 seconds]
atbagautdinov has joined #ocaml
yunxing has quit [Read error: Connection reset by peer]
yunxing has joined #ocaml
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 260 seconds]
<sgronblo>
Algebr: I'm asking anyone who wants to give their opinion :)
tmtwd has quit [Ping timeout: 250 seconds]
<Algebr>
I started with Async, now use Lwt.
mistermetaphor has quit [Remote host closed the connection]
dsheets has joined #ocaml
johnf_ has joined #ocaml
<toolslive>
just read that blog post on reason.... If you don't like begin...end, you can use parentheses. (btw, we use Lwt for historical reasons)
<toolslive>
haskell syntax for types is more elegant than OCamls, but all this is merely an illustration of Wadler's Law: https://wiki.haskell.org/Wadler's_Law
johnf has quit [Ping timeout: 276 seconds]
dsheets has quit [Ping timeout: 250 seconds]
ewanas has joined #ocaml
johnf has joined #ocaml
johnf_ has quit [Ping timeout: 246 seconds]
<Reshi>
I love haskell, but I am probably getting a job which involves Java, but I want to continue working on side projects on Haskell, does anyone do the same ?
<Reshi>
And have the time
<Algebr>
probably, I think rgrinberg does android?
ewanas has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
yunxing has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
yunxing has joined #ocaml
<zRecursive>
Reshi: Haskell is a good learning material, but not a practical language ued to build Real World software.
<Reshi>
zRecursive: In my graduate studies I have worked with a lot of Haskell, written two projects in it. Its my hobby, but I couldn't land a job in it yet :(
kushal has quit [Quit: Leaving]
<Algebr>
I'm sure plenty of Haskell does real world code.
<zRecursive>
There is few systems built with haskell.
<Reshi>
Standard Chartered was looking for Senior devs in SG
Fleurety has quit [Ping timeout: 260 seconds]
smondet has quit [Ping timeout: 260 seconds]
smondet_ has joined #ocaml
jknick has quit [Ping timeout: 276 seconds]
jknick has joined #ocaml
ygrek has joined #ocaml
Fleurety has joined #ocaml
<Leonidas>
chenglou: yes, I am. Happy to chat about it :-)
<Reshi>
I am sorry, I didn't realise I was on the #ocaml channel, damn. I though weechat was on the #haskell channel.
<chenglou>
semicolon is discussed a lot. The syntax is still in flux. The great part is, no one has to worry about these syntax changes since one `reup` means you can upgrade your codebase to our new syntax. Or stay with the old one. Or have both at the same time if you're crazy about that
<chenglou>
or have devs see the new syntax in their local machine while the checked in version uses the stable, old one
<chenglou>
anyways yeah, we're still thinking about semicolon
<chenglou>
operator: also another hot topic. I'll refrain from talking about all the other syntax changes now. You get the point. Also we've been discussing about this for months... =]
<Leonidas>
chenglou: glad to hear about it. i'm not arguing that the semicolon is less functional btw :-)
<flux>
I think the 'in' can also be a problem for newbies. I don't know if there's a best solution.
<chenglou>
I do find them a bit annoying to type, because when you want to type them your cursor might not be at the end of the line. So you need to go there, insert it, and come back
<zRecursive>
If no MS VC++, can i still build opam on windows using mingw32 ?
<Leonidas>
flux: the issue with in is sometimes where to put it. end of line? beginning of next line?
<chenglou>
lets me toggle semicolon on and off wherever I am on the current line
<chenglou>
put what?
<Leonidas>
where to put the 'in' in OCamls 'let ... in'
<Leonidas>
chenglou: have you looked at the #light syntax in F#?
<toolslive>
why isn't the semicolon an operator ? (like >>= )
<Leonidas>
toolslive: in OCaml or reason?
<toolslive>
does it matter where?
<flux>
with a multiline expression for 'let..in' it is not always clear if in should go on a line of its own before next expression or to the end of the last line in the expression
<chenglou>
Leonidas: nope, but I will. I like checking out new syntaxes and now I can do this as part of my job, which is cool lol
<flux>
with ; I think it quite naturally goes always to the end of the line
<flux>
in particular I think reason may need to be (if it's not already) more permissive about having excess ;s even when there are not required
<Leonidas>
toolslive: in OCaml it can kinda-sorta be seen as a sequencing operator
<flux>
for example if ocaml top level expressions accidentally end with ; the error messages can be confusing
<flux>
not sure how that can be fixed though without whitespace analysis or trying different parse results :)
<chenglou>
flux: I use the reason pretty-printer every 30 seconds or so now
<chenglou>
reason's semicolon rules, disregarding we have semicolons at all, are pretty consistent so far
<chenglou>
(imo)
nicholasf has quit []
<Leonidas>
chenglou: I think you might want to mention reup and refmt more prominently on the web site because these tools could be very useful
<chenglou>
Leonidas: anyways, stdlib & concurrency: another debate that's a huge time sink. But we're looking into it
<Leonidas>
as a Lisp user I see some value in a 'official' code style :-)
<chenglou>
whatever the formatter outputs is the official code style
<chenglou>
^ this is very subtle but I think people will appreciate it a lot in the future
<Leonidas>
yes, like gofmt.
<chenglou>
yeah
FreeBirdLjj has quit [Remote host closed the connection]
<chenglou>
effect system: not sure what you mean. Any reason reason would treat it differently than ocaml?
<Leonidas>
chenglou: I suppose you are planning on your own stdlib ;-)
FreeBirdLjj has joined #ocaml
<Leonidas>
chenglou: I guess ocaml will introduce some syntax for it and you'd have to either follow suit or ignore it in favor of another concept
atbagautdinov has quit [Ping timeout: 244 seconds]
<chenglou>
Leonidas: for stdlib: unlikely...? As much as I'd like to have some fun personally by writing a new stdlib I think we'll just go with one of the existing ones
<chenglou>
better for our community
<chenglou>
effect system: we'll see when that happens
<chenglou>
documentation: yeah... need more of it
<zozozo>
chenglou: do you know if there was a stronger benefit for changing comments in reason than just : people are more used to C style comments ? because it seems to introduce some problems for infix operators
<zozozo>
I agree it's a corner case, but it may be a server obstacle for reading code bases translated from ocaml that use infix operators with slashes or stars
kayceesrk has joined #ocaml
<Leonidas>
chenglou: I think the infix operator issue is (*) which does not work so you have to ( * )
<chenglou>
ah I see. I don't know about this one. I think it's just for familiarity reasons
<zozozo>
Leonidas: indeed C-style comment may solve this one
<Leonidas>
chenglou: does it allow nested comments?
<ahf>
good morning
<Leonidas>
good morning ahf
FreeBirdLjj has quit [Remote host closed the connection]
<Leonidas>
zozozo: I do kinda enjoy that there are line comments now, I installed some vim prugin to specifically comment and uncomment lines in OCaml because typing *) at the end of line was annoying :)
FreeBirdLjj has joined #ocaml
<zozozo>
i agree
mistermetaphor has joined #ocaml
<zozozo>
though I still personally prefer the standard syntax (but probably because I'm mroe used to it)
<mrvn>
There is a problem with C style comments: # let ( /* ) a b = a / b;;
<mrvn>
val ( /* ) : int -> int -> int = <fun>
<mrvn>
# let ( // ) a b = a / b;;
<mrvn>
val ( // ) : int -> int -> int = <fun>
<mrvn>
Cuts into the infix operator namespace.
mistermetaphor has quit [Ping timeout: 260 seconds]
<flux>
well, the Reason doc covers that. basically, don't do it ;-)
<zozozo>
mrvn: that's why in infix operator names, / and * characters which are not the first character must be escaped with backslash
<reynir>
There's quite a few (//) apparently
<flux>
while the same could be said that it affects the (* -operator in ocaml, I think it would be even more rare to use ( as the first character of an infix operator
<mrvn>
reynir: there are only so many 2 letter division operators to choose from.
<reynir>
Heh true :-)
<zozozo>
flux: well in ocaml you have to do ( * ) to use the non-infix version of multiplication
<flux>
zozozo, but that's arguably quite a lot more rare corner case
<zozozo>
indeed
<mrvn>
flux: ( isn't a operator prefix. Only place you ever have a problem is declaring a multiplicative infix operator. So verry rarely.
<reynir>
There's no /* operator, but a few */ operators in batteries
<flux>
I think /* and // are nice in that the same comment syntax is used by many languages
<mrvn>
let ( /* ) a b = (a / b, a mod b)
<flux>
but this change does introduce a bit friction
<flux>
mrvn, I would rather use /% for that..
<mrvn>
flux: true
<flux>
let ( /* ) a b = (a / b, a * b) :-)
* Leonidas
:)
<mrvn>
not many uses for that I think
<flux>
the function nobody has ever written before
<toolslive>
python and bash use # for line comments....
<mrvn>
let ( /* ) a b = a / b * b (* align a to b *)
<flux>
mrvn, /_
<flux>
but that's not legal is it..
<flux>
well, both # and ## are relatively common in ocaml(js), and they don't provide block comments
<mrvn>
Syntax error: ')' expected, the highlighted '(' might be unmatched
Reshi has quit [Quit: WeeChat 1.4]
<toolslive>
is there a decent record (matching) syntax ?
<flux>
in practice reason might do this: let ( /- ) = ( /\/ ) with troublesome libraries and happily go on
<mrvn>
match r with {x=1} -> ?
<flux>
regarding match, I think the change from match to switch is a needless javascriptism ;-), because it does a lot more than just 'switch'es.
<reynir>
match r with { x; y=a ; z=(A|B) } ->
<chenglou>
switch r {
<chenglou>
| {x: 1} => 1
<chenglou>
};
<flux>
plus match fits super nice if you have a language extension for matching regular expressions
<chenglou>
mrvn: ^ straight from the refmt output. Any time you need to know what the reason syntax is, do this:
<mrvn>
chenglou: tell toolslive
kushal has joined #ocaml
<chenglou>
`echo yourCode refmt -use-stdin true -parse ml -print re -is-interface-pp false`
<toolslive>
did they fix some of the franglais ?
<toolslive>
( not that I really mind)
<mrvn>
heve they never heard of --?
<reynir>
for line comments?
<Leonidas>
flux: its a Rustism because Rust calls pattern matching switch
<mrvn>
reynir: for long options
<chenglou>
toolslive: for the command line args?
<chenglou>
yeah maybe we should switch to it
<Leonidas>
yes please
<reynir>
I think swift uses 'switch',too
<mrvn>
also don't forget -- itself to end option parsing
<flux>
why did everyone choose wrong ;(, but if that's so, then I guess the peer pressure is too high ;)
<toolslive>
for example, the guards in OCaml are "when" while it would be less franglais to use "where"
<reynir>
fwiw ocamlc etc use -version etc., too :o
<chenglou>
reynir: yes it's one of the reason we also use switch
<Mercuria1Alchemi>
toolslive: doesn't rust use "if" for that?
<mrvn>
toolslive: they could have used with
<Mercuria1Alchemi>
I think that actually makes sense
<flux>
plus it's shorter!
<Mercuria1Alchemi>
one less keyword
<Mercuria1Alchemi>
I don't know if it makes parsing harder though
<flux>
well, one shouldn't let go of keywords se easily
<flux>
they are might difficult to reclaim later.. ;-)
<flux>
+y
<flux>
I doubt it mattes parsing-wise, it's after a pattern before the arrow
<reynir>
I don't really understand why use '=>' in function types
<Mercuria1Alchemi>
eh, didn't have JS have "class" "reserved for future use" for the longest time?
<Mercuria1Alchemi>
reynir: the fat arrow? I guess it's because it's like the lambda syntax in JS
<Mercuria1Alchemi>
and in C#, etc
<chenglou>
yeah mostly because of es6
<reynir>
I mean, why [let foo : 'a => int = fun x = 42]
<reynir>
I would think 'a -> int would look more familiar for ~everyone (mathematics?)
<reynir>
I meant fun x => 42, sorry
<flux>
=> looks so bold and big and it's going to be a lot more common in ocaml (and therefore reason?) programs than => is in C# programs because it's in types
<reynir>
(I don't mind at all using => in 'fun' and 'switch')
<flux>
basically, in C# => is a block separator, yes?
<Mercuria1Alchemi>
flux: let me tell you, my Typescript code is replete with =>
<Mercuria1Alchemi>
it's not an issue
<reynir>
Oh, typescript uses => in function types?
<flux>
hey thanks I learned a new word ;)
<flux>
also! => looks a lot more like >= or = than -> does!
<Mercuria1Alchemi>
typescript goes: type Foo = int => void; and you also use the ES6 lambda syntax everywhere: (x: int, y: int) => x + y
<Mercuria1Alchemi>
I hardly ever type 'function' anymore
<reynir>
Aha, I had forgotten
<reynir>
I thought only Scala used => in function types
<Mercuria1Alchemi>
(actually, it'd go type Foo = (argname: int) => void)
<flux>
all in all, I doubt these little things really matter, though, but if people say ocaml is not pretty then I guess aesthetics is important ;)
<Mercuria1Alchemi>
well, it's something
<Mercuria1Alchemi>
I don't recall being shocked by ocaml syntax
<Mercuria1Alchemi>
though I think signatures look alien
<flux>
people also said erlang wasn't pretty and now elixir seems relatively popular.
<Mercuria1Alchemi>
oh, maybe the way you write .mli files
<Mercuria1Alchemi>
I was like 'why do you have a 'val' keyword?'
rand__ has joined #ocaml
<flux>
I wonder how ocaml developers feel about reason. apparently the elixir--erlang-work has proceeded in good co-operation ;-).
<toolslive>
well, I never cared about the syntax. when I started with ocaml, I wanted to leverage the super strict compiler feedback.
<toolslive>
and functions as first class values.
<flux>
you never care about how match inside match needs to be dealt with?
<flux>
or if 'begin' or '(' is a better fit to a particular expression :)
<chenglou>
Leonidas: yes, there's nested comment support
<Mercuria1Alchemi>
"functions as first class value" are not really a unique selling point anymore :)
<Mercuria1Alchemi>
flux: {} for the people, I say
manud has joined #ocaml
sepp2k has joined #ocaml
yunxing has quit [Remote host closed the connection]
bba has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Ping timeout: 276 seconds]
infinity0_ has quit [Remote host closed the connection]
infinity0 has joined #ocaml
voglerr has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
kayceesrk has quit [Quit: kayceesrk]
fraggle_ has joined #ocaml
voglerr has quit [Remote host closed the connection]
voglerr has joined #ocaml
kayceesrk has joined #ocaml
voglerr has quit [Client Quit]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
<engil>
Algebr: I'm not sure why Bucklescript being a patch in the compiler is actually nicer than the bytecode reading of jsoo
<engil>
I'm not really sure why Bucklescript is nicer then jsoo at all (readable output ? but jsoo does source-mapping, right ?)
infinity0 has quit [Remote host closed the connection]
kayceesrk has quit [Quit: kayceesrk]
infinity0 has joined #ocaml
kayceesrk has joined #ocaml
struktured has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Ping timeout: 260 seconds]
notcanine has joined #ocaml
mengu has quit [Remote host closed the connection]
zRecursive has quit [Remote host closed the connection]
infinity0_ has quit [Remote host closed the connection]
infinity0 has joined #ocaml
<reynir>
jsoo does source maps. I never got it to work, but I don't really get how source maps work \o/
<reynir>
I mean, I managed to get source map files, but I don't understand how to use them, really
cdidd has quit [Ping timeout: 240 seconds]
<flux>
so how hot is ocaml/javascript-stuff nowadays? it seems most everyone here is doing it.. :-)
ollehar has joined #ocaml
<flux>
also where is node/ocaml?!
<flux>
nevermind: nodejs -- js_of_ocaml bindings for nodejs
<chenglou>
reynir: assuming you're not renaming things after the compilation and all, they should just work
<chenglou>
and assuming you've got source maps turned on (by default)
<Leonidas>
flux: Literally the first thing I tried didn't work and then everybody was explaining how printing in JS is rocket-science ;-)
infinity0 has quit [Remote host closed the connection]
amnn has joined #ocaml
<flux>
..printing in JS?-)
larhat has joined #ocaml
<flux>
I've seen a few presentations on React lately and I do wonder how it compares to Ocsigen
<flux>
it seems like Ocsigen has an edge because of how you can write server/client code in the same file even
dsheets has joined #ocaml
<flux>
s/Ocsigen/Eliom/
<flux>
though personally I've struggled with Eliom's typing at times, I cannot see an average javascript developer struggling less :/
infinity0 has joined #ocaml
<engil>
reynir: well it worked when I played with it
<flux>
and perhaps the eliom examples don't quite lead to such nice structure? in programs as react's 'standard' way of writing apps
<reynir>
engil: I think I might just have put the files in the wrong places when I tested. Again, I don't really understand how source maps work :)
struktured has quit [Ping timeout: 250 seconds]
<engil>
still, what is the point of having a readable output ? debuging ? does that mean that buckle avoid doing any kind of optimization ?
<reynir>
1 / 0 is 0 in bucklescript :v
<engil>
eh
<engil>
that's probably a bug
amnn has quit [Ping timeout: 260 seconds]
<reynir>
It gets compiled to 1 / 0 | 0
larhat has quit [Ping timeout: 240 seconds]
<engil>
but why
amnn has joined #ocaml
<reynir>
I don't know exactly why.
<companion_cube>
typing, I think: |0 is how you tell asm.js that it's an int
<engil>
but that's not how division by zero should behave :/
<mrvn>
division by zero is undefined. Doing so is an error and since programs are error free you can assume it never happens. :) [compiler logic]
<reynir>
1 / 0 | 0 *is* more readable than whatever you could write that would preserve the semantics
toolslive has quit [Ping timeout: 260 seconds]
<reynir>
I don't know if that's their reasoning (play loose w/ semantics for readability)
<flux>
the proper semantics would be to have val (/) : 'a -> 'a -> 'a option ;-)
<engil>
is that a thing ?
<engil>
someone, somewhere, doing that ?
<mrvn>
I prefer x : 'a constraint x != 0
<ollehar>
mrvn: ?
<flux>
I think there was one total language.. that chose to map x/0 to 0 as well
<mrvn>
flux: only int that makes 1 / (1 / 0) fail too
<mrvn>
ollehar: for / the divisior must not be 0
<ollehar>
mrvn: I know, but where is that notation possible? refined types?
<ollehar>
maybe just a jest.
<companion_cube>
would be refined types, indeed
<ollehar>
don't play with my heart...
toolslive has joined #ocaml
kayceesrk has quit [Quit: kayceesrk]
cdidd has joined #ocaml
kayceesrk has joined #ocaml
pierpa has joined #ocaml
rand__ has quit [Ping timeout: 250 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
bronsen has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
freehck has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
atbagautdinov has joined #ocaml
kakadu has joined #ocaml
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
manud has quit [Quit: manud]
orbifx has joined #ocaml
<orbifx>
Float_of_string is throwing an exception but I'm inspecting its input and it should be fine. Any common mistakes?
notcanine has quit [Remote host closed the connection]
<pierpa>
an example of input which raises the exception?
rand__ has joined #ocaml
larhat has joined #ocaml
rand__ has quit [Client Quit]
rand__ has joined #ocaml
mengu has quit [Remote host closed the connection]
dsheets has quit [Remote host closed the connection]
tennix has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<reynir>
Maybe there are unprintable characters in the string?
<pierpa>
even a trailing space causes an exception
FreeBirdLjj has quit [Remote host closed the connection]
<Drup>
Algebr, chenglou: just want to point out that buclescript is not an OCaml compiler. It doesn't respect the OCaml semantics
FreeBirdLjj has joined #ocaml
<Drup>
it's a compiler for a language that has the ocaml syntax, almost the ocaml typing and the javascript semantics
<Drup>
that's interesting, but if you take a random pure ocaml code, it may not work in hard-to-understand ways.
kushal has quit [Quit: Leaving]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<orbifx>
pierpa: yeah, it didn't like the Hawkins in of the float strings
<orbifx>
Thanks reynir, pierpa
<pierpa>
the Hawkins?
<Drup>
objmagic: what is the question exactly ?
mengu has joined #ocaml
tane has joined #ocaml
manizzle has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
<orbifx>
pierpa: sorry, Autocorruption.. was writing "new line"
<pierpa>
:D
sepp2k has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
amnn_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
dsheets has joined #ocaml
<reynir>
Heh
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<companion_cube>
ho
mengu has quit [Remote host closed the connection]
schive has joined #ocaml
NingaLeaf has joined #ocaml
hcarty has joined #ocaml
NingaLeaf has quit [Client Quit]
octachron has joined #ocaml
mengu has joined #ocaml
ollehar has left #ocaml [#ocaml]
kayceesrk has quit [Quit: kayceesrk]
larhat has quit [Ping timeout: 276 seconds]
copy` has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
dsheets has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
unbalancedparen has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
toomuchtvrotsurb has joined #ocaml
ocaml514 has joined #ocaml
prk has quit [Remote host closed the connection]
FreeBird_ has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu has joined #ocaml
sh0t has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
larhat has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
ygrek has joined #ocaml
FreeBirdLjj has joined #ocaml
larhat has joined #ocaml
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 252 seconds]
kushal has joined #ocaml
tane has quit [Quit: Verlassend]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
mengu has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
atbagautdinov has quit [Ping timeout: 276 seconds]
th5 has joined #ocaml
mrvn has quit [Ping timeout: 244 seconds]
<kakadu>
Can I trace how compiler have searched for implicit when it didn't found good one?
<zozozo>
Kakadu: from what I remember there should only ever be exactly one implicit path, no ?
<kakadu>
Compiler can't find this one
<kakadu>
Error: No instance found for implicit S.
<kakadu>
I want to know what did it try
mrvn has joined #ocaml
shinnya has joined #ocaml
<zozozo>
rather, I think it would be interesting to see at which point it failed (for instance if you try to find an implicit for a ((t * t') list), to know it couldn't find an implicit fonctor for pairs)
BitPuffin has joined #ocaml
mengu has joined #ocaml
mrvn has quit [Ping timeout: 244 seconds]
mrvn has joined #ocaml
noethics has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
atbagautdinov has joined #ocaml
tennix has joined #ocaml
larhat has quit [Ping timeout: 252 seconds]
mengu has quit []
bba has joined #ocaml
slash^ has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
tennix has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has joined #ocaml
ewanas has joined #ocaml
mistermetaphor has joined #ocaml
larhat has joined #ocaml
ollehar has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
hcarty has joined #ocaml
tennix has joined #ocaml
kushal has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
mistermetaphor has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
pecan` is now known as pecan
toomuchtvrotsurb has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
kushal has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
ewanas has quit [Read error: Connection reset by peer]
johnelse has quit [Remote host closed the connection]
<objmagic>
Drup : whatever now... it got merged unexpectedly...
<Drup>
:p
darkf has quit [Quit: Leaving]
rand__ has quit [Quit: leaving]
ril has joined #ocaml
johnelse has joined #ocaml
freehck has quit [Remote host closed the connection]
tennix has quit [Read error: Connection reset by peer]
mistermetaphor has quit [Ping timeout: 252 seconds]
shinnya has quit [Ping timeout: 244 seconds]
<Algebr>
Drup: where is it different
<Drup>
?
<ollehar>
Drup: no example usage?
<ollehar>
of the new features.
<Drup>
ollehar: it's in the manual
<Drup>
I will do a nice post
<ollehar>
ok, thanks
tennix has joined #ocaml
<Algebr>
Drup: the compiler
<Algebr>
bucklescript and ocaml
<Drup>
Algebr: lot's of small things, but basically, the memory representation is not the same anymore for a lot of base datatypes
<Enjolras_>
Drup: does it matter in practice ? I guess it changes the performance profile of the code
<Enjolras_>
but for high level and simple tools it shouldn't cause problems
<Drup>
It will also break everything that uses Obj.magic or other memory-representation-based optims
ewanas has joined #ocaml
<Drup>
You might think that's not important, but I'm not convinced it would not break, for example, menhir generated parsers ...
<Drup>
(and yes, the perf profile is different)
orbifx has quit [Read error: Connection reset by peer]
orbifx2 has joined #ocaml
scottj has joined #ocaml
ewanas has quit [Read error: Connection reset by peer]
tennix has quit [Read error: Connection reset by peer]
ewanas has joined #ocaml
<Enjolras_>
Obj often break even with stock compiler
<Enjolras_>
it should not when used properly except it is often not used properly except by highly skilled people stringly familiar with ocaml internals
<Drup>
Enjolras_: except that Obj usages that are correct with the stock compiler are all correct with js_of_ocaml ...
ollehar has quit [Quit: ollehar]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Enjolras_>
Drup: i don't think bucklescript is better than jsoo at all
tennix has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<Enjolras_>
just pointing out that the different memory representation doesn't sound like an issue which would prevent all uses of it
misterme_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
<Drup>
I'm just pointing out that if you want to advise an "Ocaml to js compiler", it's not really a choice
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
orbifx2 has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
<Enjolras_>
Drup: jsoo is an ocaml to js compiler. Bucklescript is a way to write js libs in ocaml
mistermetaphor has joined #ocaml
<Drup>
right, this is a better way to formulate what I meant :p
<Drup>
(I would say "ocaml-ish", but heh :p)
larhat has quit [Ping timeout: 276 seconds]
<Leonidas>
jsoo could use emscripten to translate native modules to JS as well ;-)
<Drup>
not really
tennix has quit [Ping timeout: 260 seconds]
<Algebr>
if using bucklescript means giving up Obj, then I have no tries about that.
<Algebr>
tears*
<Drup>
Algebr: you will have tears when random libraries in your dependencies stop working
<Leonidas>
From my cold, dead trie!
jeffmo has joined #ocaml
<Drup>
(and it's going to be hell to debug)
<Algebr>
Why random, they will presumably be mostly JS anyway
<Enjolras_>
the point is, bucklescript is something you might want to use when you are developping something new for bucklescript
<Leonidas>
chenglou: btw, what about objects in Reason?
<Enjolras_>
And you would be suprised by the number of things that use Obj
<Algebr>
its not like any packages are used with jsoo other than occasional yojson
<Enjolras_>
i'm not ready to give up on atdgen for instance
<Leonidas>
Algebr: I'd totally use xmlm
<Algebr>
ppx_deriving_yojson is fine
<Drup>
Algebr: maybe for the specific thing you are doing, but one of the big strenght of js_of_ocaml is that you can use almost all the ocaml ecosystem ...
<reynir>
I discovered »type foo = int as 'a« is legal. What does it even mean
<Enjolras_>
it is good enough, but 1) it is less expressive, by a large order of magnitude, and 2) it is a bit slower
<Drup>
if you can't do that anymore, what's the point ?
<Algebr>
which in practical terms, how many have actually taken advantage of that
<Enjolras_>
although i don't know if it matters for js
<def`>
reynir: it means that 'a is nunifiable with int :)
<Drup>
Algebr: heh, most js_of_ocaml users ?!
<Algebr>
what packages are they using
<Drup>
(there is even cohttp running in js_of_ocaml ...)
<Enjolras_>
can you use lwt with bucklescript ?
<Enjolras_>
with good perf
<Enjolras_>
being able to use lwt is a good selling point
<Drup>
Enjolras_: considering it needs special handling in jsoo's runtime, I doubt it
orbifx has quit [Ping timeout: 250 seconds]
toomuchtvrotsurb has joined #ocaml
ygrek has joined #ocaml
<reynir>
def`: Ah, I see. Thanks! :-)
<reynir>
Algebr: One difference in bucklescript I noticed is 1/0 is zero and does not raise Division_by_zero
orbifx has joined #ocaml
<Drup>
reynir: that's javascript's semantics
<Algebr>
interesting tradeoffs
yunxing has joined #ocaml
<octachron>
reynir: the normal use case would be more "type 'a t = [< `X] as 'a"
<reynir>
hm, 1 mod 0 is NaN
mistermetaphor has quit [Ping timeout: 246 seconds]
<reynir>
Ah
<smondet_>
Algebr: my jsoo webui uses: sosa nonstd docout pvem yojson uri cohttp \ ppx_deriving_yojson ppx_deriving.show $(BISECT_PACKAGE) react reactiveData
octachron has quit [Quit: Page closed]
ewanas has quit [Read error: Connection reset by peer]
<smondet_>
+ tyxml_js
ewanas has joined #ocaml
<smondet_>
(PS I was at the talk on BuckleScript by Hongbo yesterday)
smondet_ is now known as smondet
mistermetaphor has joined #ocaml
<Enjolras_>
1/0 is 0 ? It should be +infinity in floating point semantic no ?
<reynir>
heh, in bucklescript it's possible to write an expression such that x + 1 = x - 1
<Enjolras_>
doesn't js follow IIE 754 ?
<reynir>
Enjolras_: Yes, but it's compiled to »1 / 0 | 0«
<Enjolras_>
wow. Bitwise operation on floats ?
<reynir>
So the +inf is converted to 32 bit int, and that's 0 for whatever reason
* Enjolras_
fears
<Enjolras_>
i see. This is totally crazy
<reynir>
x | 0 is a javascript idiom for converting to integers
<Enjolras_>
Ok, forget what i said, i don't ever want to deal with bucklescript
<aantron>
and if not then we will do some work to make it so
<Drup>
I wonder how readable the resulting javascript is going to be :D
<yunxing>
Noob question: do we have anything like protocol or interface in OCaml?
<aantron>
yunxing: perhaps signatures?
<aantron>
(aka module type)
<aantron>
or do you mean for the class system?
<aantron>
does anyone know how to list opam switches, including ones not installable on my current system?
<yunxing>
aantron: oh right! That's true.
<Drup>
aantron: "opam sw list -a" ?
<aantron>
List all the compilers which can be installed on the system.
<aantron>
-a, --all
amnn_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup>
huum
<Drup>
I'm not even sure there are non-installable compilers
<Drup>
aantron: ls opam-repository/compilers ? :D
mistermetaphor has quit [Ping timeout: 260 seconds]
<aantron>
actually it seems a different OPAM repo is involved
mistermetaphor has joined #ocaml
jeffmo_ has joined #ocaml
<aantron>
i guess that answers it
jeffmo has quit [Ping timeout: 244 seconds]
jeffmo_ is now known as jeffmo
Nahra has quit [Ping timeout: 276 seconds]
ewanas has quit [Ping timeout: 240 seconds]
<yunxing>
@aantron looks like there is a lot of overlapping between module type and object type? They can both achieve polymorphism
<aantron>
yes, there will be a lot of overlapping. they are both, --very-- roughly speaking, "product" types (like tuples, or structs in C speak)
thomasga has joined #ocaml
<yunxing>
aantron: Interesting.
mistermetaphor has quit [Read error: Connection reset by peer]
jeffmo_ has joined #ocaml
jeffmo has quit [Ping timeout: 260 seconds]
jeffmo_ is now known as jeffmo
mistermetaphor has joined #ocaml
Nahra has joined #ocaml
<smondet>
Algebr: it was interesting and fun. TBH I don't still don't see a valid use-case for bucklescript. I'm surprised by the claim that starting form the Lambda IR makes something maintainable (AFAIR `ocamljs` was doing that and coud not keep up with new versions).
ewanas has joined #ocaml
<Enjolras_>
i guess it depends on the size of the team and the time they are able to dedicate on maintenance
<Drup>
aantron, yunxing: from a typing point of view, module are much more powerfull (they can introduce new types)
BitPuffin has quit [Ping timeout: 276 seconds]
ewanas has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
leyyin has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
misterme_ has joined #ocaml
ocaml514 has quit []
Algebr has quit [Ping timeout: 260 seconds]
Lasher` has joined #ocaml
misterme_ has quit [Read error: Connection reset by peer]
ewanas has joined #ocaml
sepp2k has quit [Quit: Leaving.]
mistermetaphor has joined #ocaml
orbifx has quit [Read error: Connection reset by peer]
orbifx2 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
yunxing has quit [Remote host closed the connection]
schive has quit [Ping timeout: 260 seconds]
yunxing has joined #ocaml
ewanas has quit [Read error: Connection reset by peer]
mistermetaphor has quit [Ping timeout: 244 seconds]
kakadu has quit [Quit: Page closed]
mistermetaphor has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<aantron>
Drup: yes, again was speaking very, very roughly
mistermetaphor has quit [Ping timeout: 260 seconds]
mistermetaphor has joined #ocaml
Algebr has joined #ocaml
rand__ has joined #ocaml
yunxing has quit [Remote host closed the connection]
BitPuffin has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Algebr has quit [Ping timeout: 260 seconds]
hongbo_zhang has joined #ocaml
<hongbo_zhang>
hi , this is Hongbo, I work on BuckleScript, if you have any question, I am very happy to answer : )
<hongbo_zhang>
BuckleScript 's semantics will stay as close as OCaml, about `1/0` issue, it's trivial for use to `raise Division_by_zero`, but I am not sure it is worth the cost
<hongbo_zhang>
I would like to hear about what other people think about it
mistermetaphor has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
th5 has quit []
dsheets has quit [Remote host closed the connection]
yunxing has joined #ocaml
<chenglou>
what's the `ocamlc` command to compile a source along with the mli file, all in one shot, avoiding the "Could not find the .cmi file for interface" error?
<Drup>
I don't think there is one
yunxing has quit [Ping timeout: 246 seconds]
scottj has quit [Quit: leaving]
<mfp>
ocamlc -c x.mli x.ml does seem to work though
<chenglou>
ah yes, it does
<Drup>
it will not do anything special though, it's the same as successive ocamlc calls
<chenglou>
I see
mistermetaphor has quit [Read error: Connection reset by peer]
<chenglou>
thanks
orbifx has joined #ocaml
mistermetaphor has joined #ocaml
orbifx2 has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
Madars has quit [Quit: reboot]
<reynir>
To Cstubs or not (first time using ctypes)
mistermetaphor has joined #ocaml
monod has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
mistermetaphor has quit [Read error: Connection reset by peer]
schive has quit [Quit: Leaving]
dsheets has joined #ocaml
mistermetaphor has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
dsheets has quit [Remote host closed the connection]
Madars has joined #ocaml
sh0t has quit [Ping timeout: 252 seconds]
dave____ has joined #ocaml
<dave____>
hello
<companion_cube>
world
<dave____>
are there any discussion forums that will help us with problems we are having in ocaml?
<companion_cube>
you can try here, or on stack overflow
<dave____>
we are trying to read a java .class file in ocaml, but the byte 1a ocaml treats as end-of-file. Is there any way to do this?
Algebr has joined #ocaml
<companion_cube>
OCaml should read the file until it's over, it does not depend on the characters read
<dave____>
That isn't the case. Our code reads a file that contains over 200 bytes, but stops at the 22nd byte because the 23rd one is 1a.
<pierpa>
did you open the file in binary mode?
<dave____>
how do I open a file in binary mode?
<pierpa>
with open_in_bin
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<Algebr>
dave____: you must not be using merlin either?
<dave____>
Thanks, pierpa! That made our code work beautifully.
<pierpa>
(if you are on a unix, then there's no difference, and you must look somewhere else)
<pierpa>
aha!
<reynir>
I can't figure out why my project using ctypes doesn't work in the toplevel, but this ncurses example does. Both work when used as a library otherwise
dave____ has quit [Quit: Page closed]
dave____ has joined #ocaml
dave____ has quit [Client Quit]
mistermetaphor has quit [Read error: Connection reset by peer]
monod has quit [Quit: gotta go]
mistermetaphor has joined #ocaml
A19774941 has quit [Remote host closed the connection]
<reynir>
If I dlopen libfoo.so before #require "foo" it works
struktured has joined #ocaml
<pierpa>
maybe it's because because your toplevel has already dlopened ncurses for its own use, so it works even if you don't dlopen it
<pierpa>
-because
yunxing has quit [Remote host closed the connection]
mistermetaphor has quit [Read error: Connection reset by peer]
rand__ has quit [Ping timeout: 260 seconds]
mistermetaphor has joined #ocaml
rand__ has joined #ocaml
yunxing has joined #ocaml
<reynir>
Ah right, that would make sense
hcarty has quit [Ping timeout: 240 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermetaphor has quit [Read error: Connection reset by peer]
toolslive has quit [Quit: Leaving]
mistermetaphor has joined #ocaml
lokien_ has joined #ocaml
yomimono has joined #ocaml
yunxing_ has joined #ocaml
yunxing has quit [Read error: Connection reset by peer]
mistermetaphor has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
shinnya has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
yunxing_ has quit [Remote host closed the connection]
mistermetaphor has quit [Read error: Connection reset by peer]
<aantron>
thomasga: im considering making some kind of project, to create binary builds and instructions for the various package managers/systems that arent well-covered right now, i.e. cygwin, windows native, macports, perhaps others. the point is to speed up builds like ppa/avsm does
<aantron>
looking into Cygwin at the moment. any interest?
mistermetaphor has quit [Read error: Connection reset by peer]
<aantron>
but maybe eventually?
<aantron>
im sick of CI taking forever each time i twiddle a byte, and i think ocaml's windows situation is pathetic
darkf has joined #ocaml
mistermetaphor has joined #ocaml
<thomasga>
aantron: yes the tests for oasis and related stuff doesn't seem to pass on windows
<thomasga>
I'm not sure why
<thomasga>
aantron: I understand that feeling
<aantron>
well im going to push ahead with this. the easier testing on windows becomes, the more projects like oasis, hopefully, will tend to test on it and avoid such states
<aantron>
i also wanted to document current workarounds for problems
<aantron>
such as oasis problems
<aantron>
ideally there would be one obvious place to complain that some package manager doesnt have an ocaml 4.03 binary or whatever. i want to store documentation about how to contribute to the package manager as well (even if only samples of existing metadata), so the complaint can also be addressed quickly
bba has joined #ocaml
<aantron>
and maybe building ocaml binaries for all those systems will help to catch compiler distribution problems too, like the apparent 4.03 Unix library incompatibility with Cygwin. i guess nobody really tested that
<aantron>
thomasga: do you know if ppa/avsm is going to get 4.03 soon? or am i missing that somewhere?
orbifx has quit [Remote host closed the connection]