<Drup>
I have no idea how it's happening, I'm quite impatient to see the bugfix
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
ghostpl_ has joined #ocaml
thomasga has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
oriba has quit [Quit: Verlassend]
rgrinberg has joined #ocaml
maufred has quit [Ping timeout: 245 seconds]
maufred has joined #ocaml
MrScout has joined #ocaml
Guest31614 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antkong has quit [Quit: antkong]
MrScout has quit [Read error: Connection reset by peer]
yminsky has joined #ocaml
MrScout has joined #ocaml
bytbox has joined #ocaml
yminsky has quit [Client Quit]
rgrinberg has quit [Quit: Leaving.]
milosn has quit [Read error: Connection reset by peer]
w0rp has quit [Ping timeout: 245 seconds]
yminsky has joined #ocaml
milosn has joined #ocaml
rgrinberg has joined #ocaml
w0rp has joined #ocaml
MrScout has quit [Ping timeout: 250 seconds]
yminsky has quit [Quit: yminsky]
MrScout has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
yminsky has joined #ocaml
<bernardofpc>
I've got a question for passing functions with optionnal arguments
<bernardofpc>
I want to have let make f x = .... f ~par1:True x ...
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bernardofpc>
but f takes much more arguments than just ?par1 (say ?par2, ?par3, ...)
<bernardofpc>
but the compiler shouts at me that it waits for a ~par1:bool -> 'a -> () function, and I gave it much more
<Drup>
yeah, that's a known issue with labeled (and optional) arguments
<Drup>
they don't mix well with high order function, at least not that way
<Drup>
I advise you not to put any labels inside the definition of make
<Drup>
and use make like this : "make (fun par1 x -> f ~par1 x)"
<bernardofpc>
ugh
<bernardofpc>
sad to hear that
<bernardofpc>
is it a formal requirement, or the implementation of the type-checker could be refined to contemplate these cases ?
<Drup>
it's not clear how to do it
<bernardofpc>
it forces some kind of coercion ?
<Drup>
no, not really, that's the point
<bernardofpc>
(and to be more precise, I'm making a D.table with label / input_field in a post_form, and I wanted to remove all the repetition of establishing string_input / int_input / ...
<Drup>
it's at the application point that, if the application is partial, the optional arguments are considered indeed not filled
<Drup>
so you need an application
<Drup>
which you don't have in case of HOF
<bernardofpc>
I guess I don't have the right model for ?-arguments :/
<bernardofpc>
+mental
<bernardofpc>
you mean that the "make f x" call would pass 'f' unapplied down to the make function ?
<bernardofpc>
instead of the appropriate (?) closure with just the used arguments present in the make signature ?
yminsky has quit [Quit: yminsky]
<Drup>
well, of course it's unapplied, you can see it: "f" doesn't have any arguments :)
<bernardofpc>
sure
<bernardofpc>
but make requires something not exactly the type of f...
<Drup>
hence why it fails.
<Drup>
if you eta expand, however
<bernardofpc>
but could the compiler be smart to create the needed closure if it was able to ?
<Drup>
(turn "f" into "fun x -> f x"
<Drup>
there is an application
<Drup>
so the typechecker will properly erase the optional arguments
<Drup>
created the needed closure is not obvious
<bernardofpc>
well, the nicety of my HOF was precisely to abstract the opt args, which are always the same :/
yminsky has joined #ocaml
<Drup>
then you have a simple solution, create a type-alias which is the type of this closure
<Drup>
and annotate the type of f in the definition of make
<Drup>
it will work
<Drup>
I'm not convinced it will satisfy you in the long run.
thomasga has quit [Quit: Leaving.]
<bernardofpc>
will try that, thanks for both indices
<bernardofpc>
a final question, if you know: I am trying to use Eliom in the toplevel, but have failed
<bernardofpc>
I used #require "eliom" and "eliom.server" (not much sure)
<Drup>
yeah, I'm not surprised, it doesn't work
<bernardofpc>
but Eliom_content appears in the utop-completion, but it complains it is not bound
<bernardofpc>
oh
shinnya has quit [Ping timeout: 252 seconds]
<Drup>
sorry, you will have to do the little eliom compilation dance
<bernardofpc>
which is ?
<Drup>
start a project with eliom-distillery, it should set you right on tracks
<Drup>
(and read the tutorials)
<Drup>
on that note, good night. :)
<bernardofpc>
thnaks
<bernardofpc>
good night
<bernardofpc>
I'm reading the tutorials, but some questions are unrelated (and I'm not 100% clear on where should I have started...)
<bernardofpc>
but I've found many errors in my programs that could have been caught had I tested them on the toplevel
<bernardofpc>
(make test.byte is not as fast, it's very strange... but I guess that's js_of_eliom that takes most of the time)
MrScout has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
jao has quit [Ping timeout: 246 seconds]
bytbox has quit [Ping timeout: 246 seconds]
c74d has quit [Ping timeout: 250 seconds]
yminsky has quit [Quit: yminsky]
ygrek has joined #ocaml
ontologiae_ has joined #ocaml
swgillespie has joined #ocaml
c74d has joined #ocaml
ghostpl_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
ontologiae_ has quit [Ping timeout: 246 seconds]
q66 has quit [Quit: Leaving]
yminsky has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
yminsky has quit [Quit: yminsky]
skinkitten has quit [Quit: Leaving]
swgillespie has joined #ocaml
yminsky has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lordkryss has quit [Quit: Connection closed for inactivity]
swgillespie has joined #ocaml
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
yminsky has quit [Client Quit]
travisbrady has joined #ocaml
jo` has quit [Ping timeout: 265 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
yminsky has joined #ocaml
emias has quit [Ping timeout: 264 seconds]
c74d has quit [Ping timeout: 250 seconds]
emias has joined #ocaml
c74d has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
antkong has joined #ocaml
yminsky has quit [Quit: yminsky]
travisbrady has quit [Quit: travisbrady]
emias has quit [Ping timeout: 264 seconds]
emias has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
jonh has joined #ocaml
matason has joined #ocaml
ghostpl_ has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 245 seconds]
badkins has quit []
c74d is now known as Guest12641
Guest12641 has quit [Ping timeout: 265 seconds]
IbnFirnas has quit [Ping timeout: 244 seconds]
c74d3 has joined #ocaml
IbnFirnas has joined #ocaml
ontologiae_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ontologiae_ has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
IbnFirnas has quit [Ping timeout: 244 seconds]
IbnFirnas has joined #ocaml
reem has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has joined #ocaml
reem has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: Leaving.]
pyon has quit [Quit: fix]
idem-pyon-tent has joined #ocaml
idem-pyon-tent has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
huza has joined #ocaml
idem-pyon-tent has joined #ocaml
reem has joined #ocaml
ghostpl_ has joined #ocaml
rgrinberg has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
swgillespie has joined #ocaml
c74d3 has quit [Ping timeout: 250 seconds]
c74d has joined #ocaml
psy_ has quit [Quit: Leaving]
ygrek has joined #ocaml
c74d is now known as Guest61840
Guest61840 has quit [Ping timeout: 265 seconds]
ontologiae_ has joined #ocaml
antkong has quit [Quit: antkong]
c74d3 has joined #ocaml
ontologiae_ has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
c74d3 has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
c74d has joined #ocaml
MercurialAlchemi has joined #ocaml
antkong has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
antkong has quit [Ping timeout: 246 seconds]
agam has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
reem has quit [Remote host closed the connection]
Haudegen has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reem has joined #ocaml
badon has joined #ocaml
larhat has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
iorivur_ has joined #ocaml
iorivur has quit [Ping timeout: 250 seconds]
sagotch has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
c74d has quit [Ping timeout: 250 seconds]
dmiles_afk has quit [Ping timeout: 265 seconds]
c74d has joined #ocaml
captain_furious has joined #ocaml
yomimono has joined #ocaml
avsm has quit [Quit: Leaving.]
huza has joined #ocaml
yomimono has quit [Ping timeout: 252 seconds]
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
dmiles_afk has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
ghostpl_ has joined #ocaml
Kakadu has joined #ocaml
mort___ has joined #ocaml
sagotch has quit [Ping timeout: 246 seconds]
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
agam has joined #ocaml
ggole has joined #ocaml
Hannibal_Smith has joined #ocaml
domsj has joined #ocaml
<Kakadu>
Why (+) >>= 2 2 is parsed as (+) >>= (2 2) ?
<flux>
consider: a b + c d
<flux>
application has higher precedence than other operators
matason has joined #ocaml
<Kakadu>
OK
Simn has joined #ocaml
yomimono has joined #ocaml
robink has quit [Remote host closed the connection]
robink has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
testcocoon has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
testcocoon has joined #ocaml
reem has quit [Remote host closed the connection]
c74d has joined #ocaml
reem has joined #ocaml
tg has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
iorivur_ has quit [Ping timeout: 250 seconds]
reem has quit [Remote host closed the connection]
c74d is now known as Guest95670
Guest95670 has quit [Ping timeout: 252 seconds]
c74d has joined #ocaml
lordkryss has joined #ocaml
elfring has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
avsm has joined #ocaml
aubergines has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
thomasga1 has joined #ocaml
tane has joined #ocaml
avsm1 has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
avsm has quit [Ping timeout: 264 seconds]
dmiles_afk has quit [Ping timeout: 244 seconds]
iorivur has joined #ocaml
paradoja has joined #ocaml
Haudegen has joined #ocaml
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
dmiles_afk has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
aubergines has quit [Quit: leaving]
cdidd has quit [Remote host closed the connection]
octachron has joined #ocaml
phao has joined #ocaml
contempt has quit [Ping timeout: 244 seconds]
contempt has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
iorivur has quit [Ping timeout: 265 seconds]
ontologiae_ has joined #ocaml
aubergines has joined #ocaml
matason has quit [Ping timeout: 240 seconds]
axiles has joined #ocaml
matason has joined #ocaml
dsheets has joined #ocaml
<phao>
I'm not an ocaml programmer, but I was curious... Does ocaml support multimethods? Or something similar? Maybe something less flexible, like simple function overloading at compile time...
dmiles_afk has quit [Ping timeout: 246 seconds]
<pippijn>
phao: not yet
<phao>
Ok.
<phao>
Do people want to add it to the language?
<pippijn>
people have added it
yminsky has joined #ocaml
<pippijn>
it's not merged yet
robink has quit [Quit: No Ping reply in 180 seconds.]
Guest33653 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bytbox has joined #ocaml
Thooms has quit [Ping timeout: 250 seconds]
swgillespie has joined #ocaml
ptc has joined #ocaml
ptc is now known as Guest48710
leowzukw has joined #ocaml
bytbox has quit [Remote host closed the connection]
phao has left #ocaml ["Leaving"]
manud_ has joined #ocaml
Thooms has joined #ocaml
bytbox has joined #ocaml
ghostpl_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Submarine has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Submarine has joined #ocaml
dsheets has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ollehar has quit [Client Quit]
manud has quit [Ping timeout: 250 seconds]
manud_ is now known as manud
leowzukw has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
divyansh_ has joined #ocaml
matason has joined #ocaml
divyansh_ has quit [Client Quit]
<smondet>
companion_cube: that's interesting!
MrScout has quit [Ping timeout: 265 seconds]
<smondet>
companion_cube: functions like `to_list_rev` in case of error, could maybe return what worked and what didn't (if the error happens in the middle of the pipe, some data maybe lost/consumed)
<companion_cube>
maybe, although it's makes the signature more complicated
rgrinberg has joined #ocaml
reem has joined #ocaml
Submarine has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
jao has quit [Read error: Connection reset by peer]
reem has joined #ocaml
bytbox has quit [Remote host closed the connection]
badkins_ is now known as badkins
q66 has quit [Quit: Leaving]
q66 has joined #ocaml
bytbox has joined #ocaml
MrScout has joined #ocaml
jbalint has joined #ocaml
bytbox has quit [Ping timeout: 255 seconds]
badon has quit [Ping timeout: 264 seconds]
badon_ has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
fraggle-boate has quit [Ping timeout: 264 seconds]
matason has quit [Ping timeout: 250 seconds]
matason has joined #ocaml
jbalint has quit [Quit: Bye!]
elfring has quit [Quit: Konversation terminated!]
thomasga has quit [Ping timeout: 265 seconds]
swgillespie has joined #ocaml
idem-pyon-tent is now known as mabino-pyon
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
reem has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
mort___ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
ghostpl_ has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
thomasga has joined #ocaml
ghostpl_ has joined #ocaml
tane has quit [Quit: Verlassend]
Simn has quit [Quit: Leaving]
Thooms has quit [Quit: WeeChat 1.0.1]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
oscar_toro has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uris77 has quit [Quit: leaving]
sdegutis has joined #ocaml
<sdegutis>
What is the benefit of using OCaml instead of JavaScript?
reem has joined #ocaml
<sdegutis>
I'm not sure that the typical libraries I'd use would benefit from OCaml style over JS style.
<sdegutis>
or something
<pippijn>
sdegutis: typical libraries like what?
<sdegutis>
For example I use a lot of Immutable.js in my application, and Mithril.js which are very dynamic.
<sdegutis>
Most of an application I write is just tying several existing libs together with a little bit of business logic.
<tokenrove>
well, you could write in javascript and use flow, which is written in ocaml, for gradual typing. but i tend to feel javascript is a hassle to write at any scale.
<sdegutis>
Very little of it has to do with the things that the differences of JS and OCaml are about.
<sdegutis>
tokenrove: I haven't found writing JS to be any hassle
<tokenrove>
if it's mostly plumbing, then of course it's not a hassle
<tokenrove>
right, i'm thinking more on the order of thousands or tens of thousands of lines of javascript.
<sdegutis>
oh
<sdegutis>
when would that be written?
<tokenrove>
complex client-side applications. i've encountered a few so far. i'd imagine most html5 games are of a similar scale, too.
<Drup>
(00:13:25) sdegutis: tokenrove: I haven't found writing JS to be any hassle
<Drup>
Good, you are not yet contaminated by better languages :D
<Drup>
and yes, if it's the side of your app.js, javascript is doable, even shell script is doable at this size ...
<Drup>
size*
mort___ has quit [Quit: Leaving.]
<sdegutis>
Drup: I think your perspective is lacking context
<smondet>
sdegutis: js_of_ocaml has Goji https://github.com/klakplok/goji for the libraries. JS has dynamic typing which means trusting humans brains, which is insanely stupid.
<sdegutis>
Drup: for years I was on the search for a better language, going from ObjC to Python to Ruby to Go to Clojure, and eventually debating between Haskell and OCaml
<tokenrove>
sdegutis: for example, i worked a bit on a web-based SIP/IMS client, and it was a significant amount of javascript, and a significant nightmare at that scale. another example is lagoa.com, which i understand had a ton of javascript.
<sdegutis>
Drup: that said, language by itself can't be taken into consideration without regard for its context
<companion_cube>
sdegutis: you don't seem to have settled on the dynamic/static scale
<sdegutis>
Drup: sometimes pragmaticism and practicality are huge factors, and in this case JS wins for me because its the path of least friction
<sdegutis>
companion_cube: i much prefer static typing
<sdegutis>
companion_cube: i prefer languages where everythings checked at compile time and all thats left at runtime are simple static function calls.
<sdegutis>
smondet: thanks
<tokenrove>
so, if you already know all that, going through the long journey through languages and realizing the value of pragmatism, why ask the question you asked?
<companion_cube>
sdegutis: good, you can stay here :p
<sdegutis>
tokenrove: just trying to see if there's anything i Missed
<sdegutis>
companion_cube: lol yeah i think i will probably like ocaml when i find the time to really learn it, but so far i have no real use-case for it
<sdegutis>
companion_cube: i tried to port my window manager to it, but C FFI is horrible in ocaml
<sdegutis>
(even with that third party library)
<sdegutis>
so i gave up on that, and now i have no use case for ocaml (yet?)
<tokenrove>
i think i've gotten used to awful FFIs; i actually feel like ocaml's C FFI is quite good. although it's been some time since i've used it.
<smondet>
do you have a use case for "programming" at all? :)