<discord2>
<Perry> Why did the revised syntax not get anywhere?
mbuf has quit [Quit: Leaving]
<discord2>
<Perry> It does look kind of nice.
mk9 has quit [Quit: mk9]
<Drup>
too little, too late, wrapped in too much baggage
<discord2>
<rizo> I've plans to revisit the revisited syntax in a more modern (camlp4-less) way. I think we have decent tooling support for that nowadays. Reason is a good example of that, albeit in a very isolated way.
<discord2>
<ncthbrt> rizo: what do you mean by isolated?
mk9 has joined #ocaml
<discord2>
<rizo> I think it doesn't play well with OCaml and all existing tooling. And it's not the projects priority.
<Drup>
reason itselfs plays fine
<Drup>
the ecosystem ... eh
mk9 has quit [Quit: mk9]
deba5e12 has joined #ocaml
hdon has joined #ocaml
<discord2>
<Perry> I suppose that in theory, if the semantics of the two syntaxes are identical, you could have files in either and the compiler would just pick the right parser...
<discord2>
<ncthbrt> That's actually what happens right now with reason/bucklescript
<discord2>
<Perry> BTW, reading the revised syntax, I'm really sad it hasn't taken off, it's so much nicer...
jaar has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 245 seconds]
<discord2>
<Christophe> I must say the same, I had not heard of it, it solves lots of issues
jaar has joined #ocaml
<discord2>
<bobby> Eh, really? other than the flipped type declaration (list int instead of int list) I'm not really fond of the rest..
hdon has quit [Ping timeout: 260 seconds]
<Drup>
The problem is that it mixes things that are mostly undisputed with things that are highly questionable :/
<discord2>
<Bluddy> There are some things I like, and many I don't like, about the revised syntax.
<discord2>
<Bluddy> The biggest problem in OCaml's syntax is lack of terminators causing subtle bugs.
<discord2>
<Bluddy> The culprits being the if statement and nested match.
<discord2>
<Perry> Well, the things I do like are the places where it is clear that the error messages could be better (because of terminators) and the flipped type declarators etc.
<discord2>
<Perry> There are a few things that seem controversial though, yes.
<discord2>
<Bluddy> A simpler solution IMO is just to add end to the end of all ifs and match expressions. Done.
<discord2>
<Bluddy> With that simple fix, you no longer have the issue of state being added to old if expressions and causing unexpected behavior. You also don't have the problem of inner match expressions being parsed wrong. reason fixed this by using braces to delineate termination.
<steenuil>
should be added to match too
<discord2>
<Perry> end would be a fix, yes.
<discord2>
<Perry> I wonder if there's a way to make it optional so that it could be added to the existing grammar.
<discord2>
<Bluddy> As it is, many people are proactive and wrap all their ifs in begin...end
<discord2>
<Bluddy> No it can't be optional.
<discord2>
<Perry> So code could be written either way... and so a migration could occur.
<discord2>
<Perry> Because if it can't be optional it is hard to migrate to it.
<discord2>
<Bluddy> I've submitted a PR to the compiler for a -safe-syntax version for these things.
<discord2>
<Bluddy> Similar to safe-string
<discord2>
<Perry> That would be cool.
<discord2>
<Bluddy> But it wasn't accepted.
<discord2>
<Perry> Aw. 😦
<discord2>
<Perry> too bad.
<steenuil>
ah, but then it it wouldn't look great when you want to chain multiple if-then-else
<theblatte>
ocamlformat (and ocp-indent to a degree) does a good job at making gotchas more explicit in the code you see
<dmbaturin>
Bluddy: "end match" would be really nice.
<steenuil>
you'd have to do it like if .. then .. else .. if .. then .. else .. end end
<theblatte>
it's one of its explicit goals
* dmbaturin
often proactively wraps matches in begin/end
<discord2>
<Bluddy> steenuil: people already do that
<discord2>
<Bluddy> they just use begin..end inside if
<discord2>
<Bluddy> to avoid the issue later
<discord2>
<Bluddy> dmbaturin: no need for end match, just end.
<discord2>
<Bluddy> Same thing as the } terminator in reason/javascript/etc
<discord2>
<Perry> cond/switch style stuff seems better for multiway, yah. But all this is theoretical.
<steenuil>
since we were on the topic of changing syntax
weird_error has quit [Quit: weird_error]
weird_error has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
<discord2>
<Perry> indeed.
pierpal has joined #ocaml
weird_error has quit [Quit: weird_error]
aciniglio has joined #ocaml
sh0t has joined #ocaml
on_ion has joined #ocaml
shinnya has joined #ocaml
weird_error has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
JimmyRcom_ has joined #ocaml
JimmyRcom_ has quit [Max SendQ exceeded]
JimmyRcom_ has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
mk9 has joined #ocaml
jaar has quit [Quit: Leaving]
mk9 has quit [Quit: mk9]
ioanluca has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
sagotch has quit [Ping timeout: 260 seconds]
objmagic has joined #ocaml
rwmjones is now known as rwmjones|hols
mk9 has joined #ocaml
hdon has joined #ocaml
dedgrant has quit [Ping timeout: 245 seconds]
hdon has quit [Ping timeout: 245 seconds]
dedgrant has joined #ocaml
ctrlsbstr has joined #ocaml
jack5638 has quit [Ping timeout: 256 seconds]
bairui has quit [Ping timeout: 256 seconds]
bairui has joined #ocaml
jack5638 has joined #ocaml
larhat has joined #ocaml
hdon has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mk9 has quit [Quit: mk9]
gtrak has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<def`>
rgr[m]: thanks for the cookie PR on sturgeon. I am curious if you have any use case for it :) ?
FreeBirdLjj has joined #ocaml
muelleme has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
al-damiri has joined #ocaml
rtb has joined #ocaml
mk9 has joined #ocaml
muelleme has quit [Ping timeout: 245 seconds]
malina has joined #ocaml
<discord2>
<Perry> Octachron?
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
<octachron>
yes?
<discord2>
<Perry> Did you ever submit that patch for the improved arrows to the hevea maintainer? I realized I'd lost track of what happened to it.
Anarchos has joined #ocaml
<octachron>
Not yet, it is on my todo list for the week-end, with local exceptions
pierpal has quit [Read error: Connection reset by peer]
malina has quit [Quit: Throwing apples of Montserrat]
FreeBirdLjj has quit [Remote host closed the connection]
muelleme has joined #ocaml
l1x has quit []
l1x has joined #ocaml
l1x has quit [Client Quit]
lobo is now known as Guest82999
nore is now known as Guest21317
tsani is now known as Guest69810
_habnabit is now known as Guest67145
bbc is now known as Guest70885
ELLIOTTCABLE is now known as Guest44951
reynir is now known as Guest86809
xttraces is now known as Guest85232
JSharp is now known as Guest36441
lynn is now known as Guest13947
DanielRichman is now known as Guest48474
Leonidas is now known as Guest38721
tianon is now known as Guest43437
Guest43437 has quit [Killed (cherryh.freenode.net (Nickname regained by services))]
swistak35 is now known as Guest50286
spion is now known as Guest58558
bronsen is now known as Guest61818
bjs is now known as Guest2337
awal is now known as Guest46886
salc is now known as Guest38857
lix is now known as Guest55519
kandu is now known as Guest96492
theglass is now known as Guest67422
dmbaturin is now known as Guest80739
tg is now known as Guest84083
Guest86809 is now known as reynir
Guest21317 is now known as nore
tianon has joined #ocaml
Guest61818 is now known as bronsen
Guest38721 is now known as Leonidas
Leonidas is now known as Guest15244
<flux>
ok..
jack5638 has quit [Ping timeout: 260 seconds]
jack5638 has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
<discord2>
<Perry> octachron: cool.
l1x has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zolk3ri has quit [Ping timeout: 256 seconds]
Guest15244 is now known as Leonidas
zolk3ri has joined #ocaml
jnavila has joined #ocaml
<discord2>
<Perry> octachron: if you need any help (not that you will) feel free to bug me.
jaar_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
Guest67145 is now known as _habnabit
zozozo has joined #ocaml
muelleme has quit [Ping timeout: 240 seconds]
mk9 has quit [Quit: mk9]
sz0 has joined #ocaml
kakadu_ has joined #ocaml
objmagic has joined #ocaml
Guest2337 is now known as bjs
mk9 has joined #ocaml
marxS has joined #ocaml
<marxS>
do 'match' and 'function' run the same? or are there cases in which I'd use one over the other?
<companion_cube>
`function p1 -> t1 | …` is the same as `fun x -> match x with p1 -> t1 | …`
<marxS>
yeah, so I could use them interchangeably and the code would run exactly the same?
<marxS>
I was just reading real world Ocaml and it says "we'll use the function keyword to eliminate the need for an explicit match"
<companion_cube>
they should be the same yes
<marxS>
ok thanks
objmagic_ has joined #ocaml
objmagic has quit [Ping timeout: 248 seconds]
Guest82999 has quit [Quit: WeeChat 1.6]
lobo has joined #ocaml
objmagic_ has quit [Quit: gone...]
malina has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
aciniglio has quit [Ping timeout: 256 seconds]
rtb has quit [Read error: No route to host]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 248 seconds]
cobreadmonster has joined #ocaml
pierpa has joined #ocaml
Guest58558 is now known as spion
spion is now known as Guest11810
navaja has joined #ocaml
spew has quit [Disconnected by services]
navaja is now known as spew
mk9 has quit [Quit: mk9]
spew has quit [Ping timeout: 240 seconds]
kakadu_ has quit [Remote host closed the connection]
spew has joined #ocaml
<discord2>
<Perry> I always find function a little weird, because I always imagine the function parameter in my head, and when it has no name it bothers me.
larhat has quit [Quit: Leaving.]
<discord2>
<Perry> (I've also always been suspicious of syntactic sugar, as (in Perlis' words) it can lead to cancer of the semicolon.)
ctrlsbstr has joined #ocaml
_berke_ has joined #ocaml
<_berke_>
hi. using jbuilder/dune is it possible to compile and link some fortran code (as for C code)?
argent_smith has quit [Quit: Leaving.]
_etc has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has joined #ocaml
<_etc>
Hi! Is there a cross-platform way to execute a process and read its stdout? I'm specifically hoping to not have to use the Unix module
<_berke_>
_etc: looking at the jbuilder code (process.ml) I see they do use the unix module to do exactly that, and since jane street seems to be kind of a windows shop, my guess is that it works relatively portably. other than that the only way I see is using sys.command and sending the output to a file and reading it, I think that works under windows too.
sh0t has quit [Remote host closed the connection]
<_etc>
Really? I thought the Unix module only worked on unix? It'd be great if that wasn't the case...
<_berke_>
it does work under windows, but not everything works 100% or exactly as under unix
<_berke_>
"Windows: A fairly complete emulation of the Unix system calls is provided in the Windows version of OCaml. The end of this chapter gives more information on the functions that are not supported under Windows."