<Drup>
AltGr: btw, I don't know if I told you, but the new // engine (and execution engine in general) is really great.
<AltGr>
Thanks!
<AltGr>
Glad you like it
<Drup>
it works really well
<Drup>
(on top of being all pretty and utf8)
<AltGr>
(yeah that was the sugar coating)
<AltGr>
I'll try to find some time to make it a separate library at some point
<Drup>
in particular, I have the feeling (but no proof) that it's faster (more //)
xaimus has joined #ocaml
<AltGr>
Not sure if it's really of general use though ; but a build-system (haha) may use it for example
<Drup>
I really would like that, I'm pretty sure people would fine some usages
<AltGr>
Hm, it may be faster, but that may be the display tricking your brain too :p
<Drup>
maybe it's just because I now know what it's doing at the same time, yes
<AltGr>
(to be clear: some stuff should be faster, but I don't think it's a significant time compared to the builds)
zpe has joined #ocaml
<Drup>
I wonder if you could add an heuristic for packages that are long to builds and do the scheduling accordingly.
<Drup>
long builds are pretty much known in advance
<Drup>
currently, you use the first topological sort that you can get, right ?
tautologico has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
<AltGr>
One of the packages that has all its prerequisites already installed is chosen pretty much at random, yes
<AltGr>
I was thinking about something like adapted build-time statistics to show build%, but well, just wild thoughts :)
<Drup>
yes, that would be cool
<Drup>
from my current point of view, there are two types of libraries: the instantaneous kind and the ReallyReallyLong kind.
<AltGr>
On the times: parallelism should be much better for downloads and remove actions though.
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
lightstep has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 250 seconds]
ollehar1 has quit [Quit: ollehar1]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
rkowalick has quit [Quit: leaving]
badon has quit [Ping timeout: 256 seconds]
swgillespie has quit [Max SendQ exceeded]
swgillespie has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf has joined #ocaml
mcc has joined #ocaml
struktured has joined #ocaml
ygrek has joined #ocaml
q66 has quit [Quit: Leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paolooo has joined #ocaml
paolooo has quit [Client Quit]
<bitemyapp>
Does OPAM enforce transitive dependency consistency?
badon has joined #ocaml
SomeDamnBody has quit [Ping timeout: 264 seconds]
ygrek has quit [Ping timeout: 264 seconds]
SomeDamnBody has joined #ocaml
SomeDamnBody has quit [Ping timeout: 244 seconds]
tnguyen has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
SomeDamnBody has joined #ocaml
enitiz has quit [Remote host closed the connection]
<mcc>
Really embarrassing question: Where in the stdlib is the "exit" function?
<mcc>
I just want to print an error message and terminate the process with an error code
<mcc>
I can use failwith but this wraps this "Fatal error: exception Failure" message around whatever I actually wanted to say
<rgrinberg>
mcc: i don't believe you can print a message and exit. you can wrap prerr_endline + exit though
<rgrinberg>
val exit : int -> 'a
<mcc>
what, really
<mcc>
okay so
<mcc>
let's say i don't care about exiting, i just want to set an exit code
<mcc>
or… wait
<mcc>
oh
<mcc>
"exit" is in the main namespace and i don't need to include anything.
<mcc>
i tried this in utop and misinterpreted the error D:
<mcc>
thanks, sorry
<mcc>
i was digging around in Sys going WHY IS THERE NO EXIT
matason has joined #ocaml
matason has quit [Client Quit]
matason has joined #ocaml
matason has quit [Client Quit]
matason has joined #ocaml
<struktured>
ok I'm pretty sure Array is special and that's why operators foo.(i) and foo.(i) <- x both work...is this correct?
<dmbaturin>
mcc: There is no exit, you are trapped in ocaml forever!
<dmbaturin>
struktured: Yeah, Array is quite special it seems, although I didn't read that source.
<struktured>
dmbaturin: perhaps the author was implying that if "val (.()): t -> int -> elt" could be defined then anyone can make an array implementation acccordingly
struktured has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: Leaving.]
ebzzry has joined #ocaml
struktured has joined #ocaml
rgrinberg has joined #ocaml
ygrek has joined #ocaml
octachron has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
struktured has quit [Ping timeout: 246 seconds]
tnguyen has quit [Remote host closed the connection]
tnguyen has joined #ocaml
octachron has quit [Quit: Leaving]
SomeDamnBody has quit [Ping timeout: 245 seconds]
SomeDamnBody has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
SomeDamnBody has quit [Ping timeout: 240 seconds]
SomeDamnBody has joined #ocaml
SomeDamnBody has quit [Ping timeout: 244 seconds]
SomeDamnBody has joined #ocaml
kapil__ has joined #ocaml
JuggleTux has quit [Ping timeout: 246 seconds]
tautologico has quit [Quit: Connection closed for inactivity]
SomeDamnBody has quit [Ping timeout: 265 seconds]
c74d is now known as Guest28395
swgillespie has joined #ocaml
Guest28395 has quit [Ping timeout: 252 seconds]
c74d has joined #ocaml
SomeDamnBody has joined #ocaml
SomeDamnBody has quit [Ping timeout: 264 seconds]
SomeDamnBody has joined #ocaml
ygrek has joined #ocaml
axiles has quit [Quit: Quitte]
oscar_toro has quit [Quit: oscar_toro]
SomeDamnBody has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: Leaving.]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
larhat has joined #ocaml
octachron has joined #ocaml
matason has quit [Ping timeout: 250 seconds]
manizzle has joined #ocaml
<def`>
struk|work: .() is desugared to Array.get and .()<- to Array.set directly in the parser
c74d has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
<octachron>
struk|work: however in the development version of the compiler, .()/.()<- are now defined as standard operators which can be redefined.
c74d has joined #ocaml
MasseR has quit [Ping timeout: 246 seconds]
<dmbaturin>
octachron: Oh, that's nice.
MasseR has joined #ocaml
oscar_toro has joined #ocaml
dmiles_afk has quit [Ping timeout: 250 seconds]
dmiles_afk has joined #ocaml
cago has joined #ocaml
tane has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mcc has quit [Quit: This computer has gone to sleep]
<def`>
octachron: yep, cool
pii4 has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
Haudegen has joined #ocaml
domsj has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
JuggleTux has joined #ocaml
vodkaInferno has quit [Ping timeout: 252 seconds]
cago has left #ocaml [#ocaml]
vodkaInferno has joined #ocaml
gargaml has joined #ocaml
dsheets_ has joined #ocaml
samrat has joined #ocaml
Submarine has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 250 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
matason has joined #ocaml
lnich has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
oriba has joined #ocaml
c74d is now known as Guest89307
lordkryss has joined #ocaml
Guest89307 has quit [Ping timeout: 265 seconds]
c74d has joined #ocaml
chinglish has joined #ocaml
Kakadu has joined #ocaml
rand000 has joined #ocaml
SomeDamnBody has joined #ocaml
psy_ has quit [Ping timeout: 246 seconds]
pii4 has joined #ocaml
SomeDamnBody has quit [Ping timeout: 252 seconds]
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
SomeDamnBody has joined #ocaml
Tamae has joined #ocaml
SomeDamnBody has quit [Ping timeout: 264 seconds]
oscar_toro has left #ocaml [#ocaml]
Submarine has joined #ocaml
Submarine has joined #ocaml
pyon has quit [Quit: stupid emacs]
pyon has joined #ocaml
c74d is now known as Guest68272
Guest68272 has quit [Read error: Connection reset by peer]
<robbert`>
I am looking for a (standard library) function to execute a command, that yields the exit code and an in_channel for the results. Unix.open_process_in is close, but executes the command in paralel and does not give the exit code.
dsheets_ has quit [Ping timeout: 246 seconds]
lordkryss has quit []
lordkryss has joined #ocaml
c74d has joined #ocaml
AltGr has left #ocaml [#ocaml]
SomeDamnBody has joined #ocaml
<dmbaturin>
robbert`: Unix.close_process_* give you the exit status of a process.
<companion_cube>
robbert`: the subprocess could live arbitrarily long, you need to specify somehow how to read its output
<dmbaturin>
You can always Unix.fork :)
SomeDamnBody has quit [Ping timeout: 255 seconds]
<dmbaturin>
Disregard the fork comment, I misread the "parallel" part of the original question.
<pippijn>
whitequark: maybe they use the intellij ocaml plugin
<vanila>
what about it?
<whitequark>
it looks like something out of javascript
thomasga has joined #ocaml
<vanila>
isnt that normal o caml, how else would this be wrtten?
<MercurialAlchemi>
looks like haskell-style to me
enitiz has quit [Quit: Leaving]
<MercurialAlchemi>
always found that ugly
Submarine has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 255 seconds]
travisbrady has joined #ocaml
raphaelss has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
SomeDamnBody has joined #ocaml
Haudegen has joined #ocaml
darkf has quit [Quit: Leaving]
octachron has quit [Quit: Leaving]
<whitequark>
vanila: semicolon at the end of previous line
<vanila>
ohh.. that would make a LOT more sense
slash^ has joined #ocaml
mcclurmc_ has joined #ocaml
cdidd has quit [Quit: Leaving]
dsheets_ has joined #ocaml
cdidd has joined #ocaml
mcclurmc has quit [Ping timeout: 245 seconds]
keen__________67 has joined #ocaml
keen__________66 has quit [Ping timeout: 252 seconds]
kaiyin has quit [Ping timeout: 246 seconds]
dsheets_ has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
psy_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
manizzle has quit [Ping timeout: 252 seconds]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ontologiae has joined #ocaml
asQuirreL has joined #ocaml
bytbox has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
asQuirreL has quit [Read error: Connection reset by peer]
asQuirreL has joined #ocaml
enitiz has joined #ocaml
psy_ has quit [Ping timeout: 252 seconds]
enitiz has quit [Max SendQ exceeded]
swgillespie has joined #ocaml
enitiz has joined #ocaml
bytbox has joined #ocaml
psy_ has joined #ocaml
dsheets_ has joined #ocaml
swgillespie has quit [Client Quit]
rkowalick has joined #ocaml
jgjl has quit [Ping timeout: 240 seconds]
bytbox has quit [Ping timeout: 256 seconds]
uris77 has quit [*.net *.split]
ggole has quit [*.net *.split]
pyon has quit [*.net *.split]
tane has quit [*.net *.split]
sivoais has quit [*.net *.split]
monoprotic has quit [*.net *.split]
milosn has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
cthuluh has quit [*.net *.split]
pippijn has quit [*.net *.split]
nopf has quit [*.net *.split]
adrien_znc has quit [*.net *.split]
ddosia has quit [*.net *.split]
fds has quit [*.net *.split]
robbert` has quit [*.net *.split]
srax has quit [*.net *.split]
segmond has quit [*.net *.split]
ohama has quit [*.net *.split]
clog has quit [*.net *.split]
michatotol has quit [*.net *.split]
Armael has quit [*.net *.split]
rks` has quit [*.net *.split]
acieroid has quit [*.net *.split]
eikke has quit [*.net *.split]
def` has quit [*.net *.split]
travisbrady has joined #ocaml
lightstep has joined #ocaml
psy_ has quit [Ping timeout: 252 seconds]
ocp has quit [Quit: Leaving.]
Anarchos has joined #ocaml
bytbox has joined #ocaml
_obad_ has joined #ocaml
struktured has joined #ocaml
uris77 has joined #ocaml
ggole has joined #ocaml
pyon has joined #ocaml
tane has joined #ocaml
fds has joined #ocaml
pippijn has joined #ocaml
rks` has joined #ocaml
srax has joined #ocaml
milosn has joined #ocaml
michatotol has joined #ocaml
acieroid has joined #ocaml
def` has joined #ocaml
segmond has joined #ocaml
ohama has joined #ocaml
cthuluh has joined #ocaml
ddosia has joined #ocaml
robbert` has joined #ocaml
monoprotic has joined #ocaml
tobiasBora has joined #ocaml
sivoais has joined #ocaml
eikke has joined #ocaml
nopf has joined #ocaml
adrien_znc has joined #ocaml
clog has joined #ocaml
Armael has joined #ocaml
sivoais has quit [Max SendQ exceeded]
sivoais has joined #ocaml
bytbox has quit [Ping timeout: 246 seconds]
psy_ has joined #ocaml
<_obad_>
on cherche un bon programmeur qui connaît bien ocaml, c et linux, pour un poste à temps plein à montréal, dans l'aérospatiale. c'est urgent donc il faut que vous soyez dispo très rapidement, donc il faut être résident ou citoyen canadien.
<Drup>
_obad_: 1) this chan is english speaking, use #ocaml-fr for french 2) there is mailing list called ocaml-jobs, you will probably have more success there.
ontologiae_ has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
contempt has quit [Ping timeout: 245 seconds]
arj has joined #ocaml
psy_ has quit [Ping timeout: 250 seconds]
<_obad_>
sorry about that, here's an english version: we're looking for an ocaml, c and linux programmer for a full-time aerospace position in montreal. candidate needs to be a canadian citizen or a permanent resident. english required, french appreciated.
<companion_cube>
sounds nice, too bad I'm in France ;)
Submarine has joined #ocaml
<def`>
+1 :D
reem has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
<Anarchos>
_obad_ and for a french married to a canadian girl ?
rgrinberg has quit [Quit: Leaving.]
reem has quit [Ping timeout: 264 seconds]
<_obad_>
anarchos: you can get PR as a spouse, but unfortunately it takes a year or two if you are already here
<Anarchos>
_obad_ i have children so i can get my nas as humanitarian conditions :)
<_obad_>
anarchos: are you in canada? if you're not it goes faster, but it would still take a few months. this is kind of urgent. but if you do come after a few months let me know we may need more people.
yomimono has quit [Ping timeout: 264 seconds]
<Anarchos>
_obad_ ok i will remember for sure. I am kinda stuck in french for now, cause my son has an handicap, and my daughter is in a briton school...
Thooms has quit [Quit: WeeChat 1.0.1]
<MercurialAlchemi>
_obad_: you can try the ocaml mailing list, and r/ocaml
<_obad_>
mercurialalchemi: good idea, will do.
<Anarchos>
_obad_ are you authorized to give some details about the job to do ?
<_obad_>
anarchos: we have an embedded linux device where the high-level stuff is written in ocaml, and there is also support and scientific software that talks to that, also mostly written in ocaml. however there is linux and kernel drivers involved, so C is also required.
<Anarchos>
sounds really nice
<Anarchos>
thanks for the explanation
q66 has joined #ocaml
paradoja has quit [Ping timeout: 256 seconds]
leowzukw has joined #ocaml
<tokenrov1>
ocaml in montreal. that's good news; we don't even seem to have a meetup group here. i keep having to go to the haskell ones instead.
rkowalick has quit [Ping timeout: 244 seconds]
tokenrov1 is now known as tokenrove
contempt has joined #ocaml
psy_ has joined #ocaml
Kakadu has quit [Quit: Page closed]
bytbox has joined #ocaml
psy__ has joined #ocaml
psy__ has quit [Max SendQ exceeded]
psy__ has joined #ocaml
asQuirreL has joined #ocaml
jc has joined #ocaml
travisbrady has quit [Quit: travisbrady]
thomasga has quit [Ping timeout: 265 seconds]
<tcpc>
(query _obad_ )
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
yminsky has joined #ocaml
enitiz has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
SomeDamnBody has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
travisbrady has joined #ocaml
thomasga has joined #ocaml
manizzle has joined #ocaml
asQuirreL has joined #ocaml
yminsky has quit [Quit: yminsky]
jc has quit [Read error: Connection reset by peer]
jc has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
uris77 has quit [Quit: leaving]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asQuirreL has joined #ocaml
asQuirreL has quit [Remote host closed the connection]
asQuirreL has joined #ocaml
yomimono has joined #ocaml
avsm has joined #ocaml
ceh has joined #ocaml
tani has joined #ocaml
tane is now known as Guest32230
tani is now known as tane
rgrinberg has joined #ocaml
asQuirreL has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 265 seconds]
Guest32230 has quit [Ping timeout: 255 seconds]
asQuirreL has joined #ocaml
avsm has quit [Ping timeout: 250 seconds]
dav has quit [Ping timeout: 250 seconds]
<bernardofpc>
I got an Eliom / ppx question...
<bernardofpc>
so, I am trying to build a website, that would be a front-end to some code I have already done
<bernardofpc>
the problem is that it uses @@deriving yojson, and using the (simple) eliom setup I get compilation erros with camlp4o
<bernardofpc>
but I (guess) that I don't really need to pass my (old) code through camlp4o
<bernardofpc>
is there a way to build the needed bits (and what these bits are...) without camlp4o ?
<bernardofpc>
I (hope) that the new (=web) code can be compiled by eliom with all camlp4, but reference code built with -ppx
<whitequark>
do you use ocamlbuild?
<bernardofpc>
I'm using the eliom-provided makefile
<bernardofpc>
I don't really know what it does
<bernardofpc>
(well, it does compile lots of stuff, and makes js_of_ocaml, etc, etc)
rgrinberg1 has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
matason has quit [Ping timeout: 240 seconds]
manu3000 is now known as manud
rkowalick has joined #ocaml
ghostpl_ has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ceh has left #ocaml [#ocaml]
leowzukw has quit [Quit: Lost terminal]
bytbox has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
rgrinberg1 has quit [Quit: Leaving.]
ggole has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Simn has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
raphaelss has quit [Quit: leaving]
yomimono has quit [Ping timeout: 250 seconds]
domsj has quit [Ping timeout: 264 seconds]
MooseAndCaml has joined #ocaml
contempt has quit [Ping timeout: 255 seconds]
<MooseAndCaml>
if I have a let acc = ref [], I can add to it with 3 :: !acc, but how can I replace !acc with a empty list?
<mrvn>
acc <- []
<companion_cube>
acc := [] you mean
<mrvn>
one of those. I can never remember which
contempt has joined #ocaml
<MooseAndCaml>
:= worked... thanks.. I had been bopping through the various permutations of those with no luck
<mrvn>
how did you add 3 to it without :=?
<Drup>
bernardofpc: that's a ... complicated question
<MooseAndCaml>
3 :: !acc
<bernardofpc>
Drup: :/
<Drup>
to be completely honest, my advice would be to do all your non-web code (with potentially some ppx in it) in a separated library
<Drup>
and use the eliom-machinery only for the front end
<bernardofpc>
well, I could do that
<Drup>
and not to mix the two
<bernardofpc>
but it's cumbersome
<Drup>
with opam, not so much
<bernardofpc>
anyway, I could give it a try
<Drup>
the other solution is fiddling with eliom-distilery's makefile
<bernardofpc>
is there a GOOD tuto on how to make up an opam package from local files ?
<Drup>
oh, there is a third solution, in fact
<Drup>
it's too use cumulus' build system
<bernardofpc>
(I've failed hacking the Makefile)
<Drup>
which isn't that bad.
<Drup>
but a bit limited in some aspects
<bernardofpc>
probably using a separate lib would be a good solution, but I don't know how to do it
<Drup>
bernardofpc: simply do "opam show --raw some_lib" and look at the content and do something similar in an "opam" file at the root of your repository
<bernardofpc>
whitequark: did that, it worked for the .byte version
<bernardofpc>
but not for the .antive version
<bernardofpc>
where it does not find A
<whitequark>
that's really weird
<whitequark>
what's the exact link command
<bernardofpc>
Error: No implementations provided for the following modules: A referenced from test_g.cmx
<whitequark>
oh
<whitequark>
that's a different problem
<bernardofpc>
yeah
<bernardofpc>
been banging my head around ocaml's build systems
<bernardofpc>
perhaps I need .cmti for native compilation ?
bytbox has joined #ocaml
<whitequark>
no
<bernardofpc>
just .cmxa and .cmi ?
<whitequark>
yes
<whitequark>
try ocamlobjinfo to peek inside .cma/.cmxa
rgrinberg has quit [Quit: Leaving.]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Hannibal_Smith has joined #ocaml
thomasga has quit [Quit: Leaving.]
<bernardofpc>
well
Submarine has quit [Remote host closed the connection]
<bernardofpc>
since I'm still on the test.byte phase of Eliom, it is enough
rwmjones has joined #ocaml
<bernardofpc>
2h for using a stupid .ml in Eliom :/
<bernardofpc>
(well ,not *so* stupid since it contains ppx, but having to transform that into a lib kinda sucks a lot)
thomasga has joined #ocaml
rgrinberg has joined #ocaml
ygrek has joined #ocaml
reem has joined #ocaml
<Drup>
bernardofpc: I know
ygrek has quit [Ping timeout: 246 seconds]
<bernardofpc>
well, in spite of all my rants, Eliom is beautiful
<bernardofpc>
(typed HTML is SO nice)
<bernardofpc>
but I'll come back in some days to try and make the .native version of my lib work
<bernardofpc>
now I have to get dinner
<bernardofpc>
and thanks yall for the help
bacam has quit [Ping timeout: 244 seconds]
bacam has joined #ocaml
enitiz has quit [Quit: Leaving]
nullcat_ has joined #ocaml
arj1 has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
yminsky has quit [Quit: yminsky]
asQuirreL has joined #ocaml
asQuirreL has quit [Remote host closed the connection]
asQuirreL has joined #ocaml
Simn has quit [Quit: Leaving]
sdegutis has joined #ocaml
<sdegutis>
I've heard that ML's modules/functors are more powerful than Haskell's type classes, but nobody has explained why. Can someone help me understand?
<sdegutis>
Personally I find type classes extremely easy to understand and use and think they're powerful enough.
<mrvn>
is this #ml or #haskell?
rgrinberg has joined #ocaml
<sdegutis>
OCaml is the most popular ML variant.
<mrvn>
ocamls modules/functors are certainyl no replacement for type classes
<mrvn>
I wonder if one could make something like type classes with ppx
<Drup>
sdegutis: not better, different
<Drup>
(there is a paper which encode one in the other and the reversal, proving the equivalence)
<sdegutis>
oh
<Drup>
(but it's without counting the various extensions people have added, so it's a bit tricky)
<mrvn>
Drup: but can you hide that encoding in ppx?
<sdegutis>
Drup: hmm, thanks
<Drup>
no, and the encoding is so huge and ugly that you don't want to use it anyway
<sdegutis>
Drup: why do you prefer OCaml's functors over Haskell's type classes?
<mrvn>
sdegutis: because haskell is unreadable (to me)
<Drup>
because typeclasses are much easier to abuse than functors
<sdegutis>
ah
<Drup>
the whole haskell ecosystem is abusing typeclasses to make cost as unreadable as possible
<sdegutis>
Thanks.
<Drup>
code*
<sdegutis>
I agree it's incredibly difficult to read Haskell code.
<sdegutis>
That's why I'm still on the fence between OCaml and Haskell.
<Drup>
also, from a runtime cost point of view, functors are much simpler than typeclasses
<Drup>
(also, there are details of the Haskell implementation of typeclasses that I dislike a lot)
<sdegutis>
likw?
<sdegutis>
like?
<Drup>
the unicity constraint
<Drup>
and the fact they are globaly namespaced
<sdegutis>
i didnt think they were globally namespced
<sdegutis>
you just have to import -- oh
<sdegutis>
i see.
<sdegutis>
besides being generally unreadable in real world code, my biggest dislike of haskell so far is that record field names leak into the namespace
<sdegutis>
this isnt a problem in ocaml, right?
<Drup>
the funny bit is that haskell is trying to get a decent module system while ocaml is trying to have implicits, which are very much like typeclasses :p
<mrvn>
they are part of the module
<rgrinberg>
What i miss from Haskell is kinds :/
<mrvn>
but ocaml guesses what module you ment so they kind of leak (with a warning)
<sdegutis>
why cant ocaml and haskell just have a baby thats got only the best of both worlds?
<sdegutis>
that would rule.
<Drup>
mrvn: it's easily customizable
<Drup>
sdegutis: well, there are several divergence of opinions between the two communities ...
<Drup>
about purity, about lazyness
<def`>
sdegutis: type classes coherency behaves bad with type abstraction and modular programming
<sdegutis>
def`: wat
<sdegutis>
Drup: tru
<rgrinberg>
translating fred: type classes = baaaaaaaaaaaaaad
<rgrinberg>
;D
<sdegutis>
uhh
<def`>
:DDD
<def`>
sdegutis: you can leave a type abstract in a module, hiding the implementation
<Drup>
literally Hask-hell.
<def`>
E.g. sig type t end
<def`>
there is no way to enforce the unicity of type classe instances with such feature, at least without breaking abstraction
<def`>
so either you have unicity (which is part of type classes) or abstract types
<sdegutis>
oh
<sdegutis>
So, in all my research, learning, trials and errors, and general investigation into each language over the past few weeks, ultimately I've come to dislike both of them for too many reasons to look passt.
<Drup>
ahah
<sdegutis>
But they're both still generally better than any other language I've yet found.
<sdegutis>
So it feels a lot like it's down to a choice of the lesser of two evils.
vanila has quit [Quit: Leaving]
<Drup>
nothing is perfect :)
<rgrinberg>
sdegutis: do you want to learn more about FP or write useful software?
<tane>
sdegutis, just have a closer look at each :)
<def`>
(but I agree with rgrinberg, a bit more higher-kinded programming would be good… although I don't like haskell/scala code abusing it)
<Drup>
sdegutis: remind me, what are you usually developing ?
<Drup>
sdegutis: also, I'm surprised you didn't yet yelled about cabal.
<rgrinberg>
cabal is really good :O
<def`>
rgrinberg: you do a lot of haskell (question not related to cabal, just out of curiosity −− I didn't use it in the last two years)
<def`>
?
<sdegutis>
rgrinberg: I've really enjoyed the FP that I do at work in Clojure. It's got destructuring, higher-ordered functions, etc. which I find necessary in a language now.
<sdegutis>
tane: what do you mean to imply?
<sdegutis>
Drup: right now, I am writing a budget application for myself using node-webkit for the GUI (because every other GUI toolkit I've found so far is pure awfulness).
<rgrinberg>
rgrinberg: not a lot but I definitely dabble quite a bit
<rgrinberg>
always found cabal to be great
<def`>
def`: ok :)
<rgrinberg>
sure there's a few flaws
<rgrinberg>
ha, oops
<sdegutis>
I started to write it in Swift using AppKit (Cocoa) with my son to show him the basics of programming, and it was a reminder that it's an awful GUI toolkit that I never want to use in real life.
<def`>
sdegutis: I found Cocoa slightly more enjoyable than android equivalent :)
<sdegutis>
def`: I believe it.
<sdegutis>
def`: I've mastered Cocoa over the past 6 years, apparently for no reason considering now I never want to use it again.
<Drup>
rgrinberg: cabal-build-system or cabal-package-manager ?
<def`>
I believe it too. I have yet to find a pleasant gui toolkit
<rgrinberg>
OTOH, cabal's solver is worse, there's waaaaaay more packages so breakage is more common and there's a culture of taking a dependency to save 5 lines of codes
<def`>
yep, I think that's what most people complain about
<sdegutis>
def`: the widgets are difficult to use, difficult to style, Swift broke the data-bindings feature that I liked so much, the delegation system is difficult and annoying to use, etc.
<Drup>
I agree with you on cabal-build-system
<rgrinberg>
Drup: the build system is fine, most importantly there's only 1 to use/learn
<Drup>
but cabal-package-manager is pure crap.
<Drup>
and the kind of crap that gets in your way all the time
<rgrinberg>
yeah, it isn't github based which is kind of flawed
<rgrinberg>
but stackage is basically haskell's opam to me
<Drup>
that's ... not at all the issue
<rgrinberg>
well, opam-repository
<sdegutis>
One thing I've been noticing, btw, is that the same general debates found in Ruby vs Python relating to tooling and such are also found in OCaml vs Haskell etc.
<Drup>
I'm fine with hackage, it's good
<sdegutis>
Basically nobody can agree on anything, but often everyone disagrees about similar things.
<Drup>
sdegutis: well, half the haskell community agrees about cabal, so .... :D
<sdegutis>
lol
<rgrinberg>
Drup: what's wrong with it?
<dmbaturin>
sdegutis: Many programming language debates are equivalent up to isomorphism. :)
<Drup>
rgrinberg: it's solver is terrible, it can't upgrade, it can't remove, it enters dependency hell all the time
<Drup>
before sandboxes, it couldn't do any kind of isolation
<Drup>
(it's half solved, but only half
<rgrinberg>
it can upgrade, it's just not recommended
<Drup>
yeah, and it's doing it wrong all the time
<rgrinberg>
also, the reason why it enters dependency hell is b/c tehy don't have the opam-repository team CI'ing every PR
<rgrinberg>
hence why hackage sucks
yomimono has quit [Ping timeout: 265 seconds]
<Drup>
(arguably, the haskell idiom of breaking compat all the time doesn't help)
tane has quit [Quit: Verlassend]
<rgrinberg>
not a cabal issue
<Drup>
yeah, the rest is
<rgrinberg>
whenever there's a bad/breaking package in hackage cabal is helpless
<rgrinberg>
while we can apply a commit to all of opam-repository
<sdegutis>
heh look what i started
<Drup>
:D
<Drup>
(the fact that cabal broke in every single paper/talk rush I had while I was working in Haskell doesn't help :D)
<sdegutis>
ha
<rgrinberg>
i've given up on hackage and haven't had problems since
<sdegutis>
Also Haskell's syntax began to grow on me to some extent, especially its terseness.
<Drup>
I don't like indentation based languages, but I can understand the taste :)
<sdegutis>
isn't ocaml also?
<Drup>
?
<Drup>
certainly not
<dmbaturin>
Drup: I used to like indentation-based languages until I've found a language that wants neither indentation nor begin/end.
<sdegutis>
oh ok
<Drup>
dmbaturin: which one is that ? :p
<dmbaturin>
It didn't exactly make me hate significant indentation though.
rkowalick has quit [Ping timeout: 246 seconds]
<dmbaturin>
Drup: OCaml, of course. :)
<Drup>
dmbaturin: that's ... not really the case for ocaml
<Drup>
I would like, but that's not true
<dmbaturin>
Well, it wants far fewer delimiters than say C or Ada anyway.
Kakadu has quit [Remote host closed the connection]
<dmbaturin>
let/in are annoying sometimes, but they don't feel like an offering to the parser to me for some reason.
<dmbaturin>
Also, python significant indentation can easily change program meaning if you hit space in a wrong place.
<dmbaturin>
And sometimes, when reading somene else's code, it's hard to find out if it was what the author meant or indentation mistake. :)
asQuirreL has quit [Remote host closed the connection]
<dmbaturin>
...guess that's why let/in don't feel useless to me, they make the scope more obvious than {/}/begin/end that are fairly easy to insert in a wrong place.
asQuirreL has joined #ocaml
<Drup>
sdegutis: you should try js_of_ocaml :)
gargaml has quit [Quit: WeeChat 1.1.1]
<sdegutis>
Drup: if ocaml makes the cut, i probably will
<sdegutis>
Drup: but the website was not easy to navigate to get started with it
<Drup>
the thing is, between OCaml/Haskell, if you (dis)like both equally, the libraries are going to make the difference
<sdegutis>
1. it wasnt clear how to install it outside downloaiding a .zip file (which i prefer not to do), ie through opam or homebrew etc
<Drup>
(I would probably be more offended if people avoid telling me something was wrong ..)
<sdegutis>
2. the double-nav-bar at the top looks really unprofessional and amateurish
<dmbaturin>
Wait, js_of_ocaml is in opam.
<sdegutis>
3. the links in the sub-navbar are very well hidden, i didnt see them the first like 10 times i visited this website
<sdegutis>
in fact i only saw them just now, despite seeing this site a dozen times in the past month
<Drup>
ok
<Drup>
I mostly agree and I would really like to change it :D
<sdegutis>
4. the main content on the main page (http://ocsigen.org/js_of_ocaml/) doesnt show any demo of the code, doesnt have a download link or explain where else to get it from, doesnt even have an easy to find link for ref manual or api
<Drup>
but yes, the website was done 6 or 7 years ago, and it shows
<Drup>
(maybe a bit more, actually)
<sdegutis>
my eyes have been trained in certain navigational heuristics, so that i dont have to scan /all the text on every given page/
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<sdegutis>
but it seems that no techniques that assist me in that endeavor have been used, at all, on this website
<Drup>
or rather, you are used the 2010+ fashion and this one uses the 2005 fashion
<Drup>
used to*
<sdegutis>
Drup: in general, that gives me the impression that the compiler and api design are also outdated and dont take into account newer innovations/etc
<Drup>
I won't argue which one is better, the internet decided for me :p
<sdegutis>
anyway, these are all minor hits against jsofocaml
<Drup>
sdegutis: that's really a bad case of judging a book by its cover, you realize that ?
<sdegutis>
the primary hit being that the website gives the compiler/library a bad impression
<sdegutis>
Drup: yep
ontologiae_ has quit [Ping timeout: 250 seconds]
<Drup>
as long as you do :D
mort___ has quit [Ping timeout: 245 seconds]
<Drup>
if http://caml.inria.fr/ was still the main page of the ocaml langage, I'm pretty sure you wouldn't even have tried it :D
rkowalick has joined #ocaml
rkowalick has quit [Client Quit]
<dmbaturin>
Apparently, ocaml.org is quite young and caml.inria.fr did serve as the main page for a good while.
<Drup>
companion_cube: lacks a killer feature compared to xmpp
<companion_cube>
well, it looks simpler, and synchronization is nice
<companion_cube>
being able to synchronize several servers to reach a common history of discussion...
<Drup>
I don't care about complexity as a user, it's mostly hidden in the client
<Drup>
and synchronisation between server, as a user again, is not a killer feature, because I basically don't need it. Some advanced user may, but most don't
<companion_cube>
you could join a conversation later
<Drup>
I can already do that
<dmbaturin>
Drup: Oddly enough, when I went to clean up the /install page, I've removed some stuff about PPC Mac OS X era tools that no longer work. Guess that was migrated to ocaml.org from elsewhere.
<companion_cube>
doesn't it depend on some extension of XMPP?
<Drup>
companion_cube: not, it's one of the feature that is part of the spec and is implemented by anyone
<Drup>
no*
shinnya has joined #ocaml
<companion_cube>
so even if your server was down, you can get history of what was told?
<Drup>
that's called local history, yes, most clients have it, and that's not a matrix feature :D
mcc has joined #ocaml
<companion_cube>
no no no, I'm not talking about local history, but synchronization to get what yu missed
<Drup>
right, it works for short durations in xmpp, but not in general
<Drup>
short as in "my network had a 5 minute stroke" but not more.
<emias>
There's no globally distributed history thingy for XMPP, so if your server is down you're lost. but there is an extension for server-side message storage and hence proper synchronization.
thomasga has quit [Quit: Leaving.]
<emias>
(Well it's XMPP, so of course there are multiple extensions. But there's one you're supposed to use today, until the next one is written.)