ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
Simn has quit [Quit: Leaving]
ygrek has joined #ocaml
vanila has quit [Quit: Leaving]
natrium1970 has quit [Quit: natrium1970]
hellofunk has quit [Ping timeout: 240 seconds]
Kakadu has quit [Remote host closed the connection]
badkins has quit [Remote host closed the connection]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antkong has joined #ocaml
antegallya has joined #ocaml
reem has quit [Remote host closed the connection]
psy_ has quit [Read error: Connection reset by peer]
psy_ has joined #ocaml
reem has joined #ocaml
badkins has joined #ocaml
reem has quit [Remote host closed the connection]
oscar_toro has quit [Ping timeout: 255 seconds]
struktured has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 245 seconds]
antkong has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
malc_ has quit [Quit: leaving]
skinkitten has quit [Quit: Leaving]
seliopou has quit [Ping timeout: 256 seconds]
nopf has quit [Ping timeout: 256 seconds]
badkins has quit [Ping timeout: 256 seconds]
pdewacht has quit [Ping timeout: 256 seconds]
sheijk has quit [Ping timeout: 256 seconds]
hnrgrgr_ has quit [Ping timeout: 256 seconds]
tg has quit [Ping timeout: 256 seconds]
jlouis has quit [Ping timeout: 256 seconds]
voglerr1 has quit [Ping timeout: 256 seconds]
majoh has quit [Ping timeout: 256 seconds]
srax has quit [Ping timeout: 256 seconds]
ygu has quit [Ping timeout: 256 seconds]
jpdeplaix has quit [Ping timeout: 256 seconds]
kerneis_ has quit [Ping timeout: 256 seconds]
adrien_znc has quit [Ping timeout: 256 seconds]
Antoine59 has quit [Ping timeout: 256 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
pollux has quit [Ping timeout: 256 seconds]
troydm has quit [*.net *.split]
vpm has quit [*.net *.split]
emias has quit [*.net *.split]
Muzer has quit [*.net *.split]
ia0 has quit [*.net *.split]
hilquias` has quit [Read error: Connection reset by peer]
seliopou has joined #ocaml
sheijk_ has joined #ocaml
jlouis_ has joined #ocaml
badkins_ has joined #ocaml
natrium1970 has joined #ocaml
<natrium1970> I’m trying to get aspcud working with opam. Running “opam update” spews out some error information without actually telling me what the problem is. “error: could not lstat file” is the last line. What FILE?!
hnrgrgr has joined #ocaml
pdewacht_ has joined #ocaml
jpdeplaix1 has joined #ocaml
nopf_ has joined #ocaml
srax1 has joined #ocaml
voglerr2 has joined #ocaml
<natrium1970> Is there an easier solver to work with, or is just a difficult issue?
kerneis__ has joined #ocaml
<bernardofpc> natrium1970: strange
<bernardofpc> you could guess what the file is by running opam under strace -e trace=file
nullcat has joined #ocaml
<bernardofpc> (if you're on linux, at least)
<natrium1970> I probably installed aspcud wrong, but they don’t actuallly say how to install it.
<natrium1970> I’m not. I’m on OS X.
Antoine60 has joined #ocaml
<bernardofpc> (btw, I've found some strange things about opam using strange, like going to the aspcud solver in "opam list")
OnkV has joined #ocaml
<bernardofpc> (i shoulda repport that)
<bernardofpc> maybe OS X has strace
adrien_znc_ has joined #ocaml
pollux_ has joined #ocaml
<natrium1970> Actually, it doesn’t have strace.
pollux_ is now known as pollux
adrien_znc_ is now known as adrien_znc
srax1 is now known as srax
tg has joined #ocaml
ygu_ has joined #ocaml
c74d has quit [Remote host closed the connection]
majoh has joined #ocaml
<natrium1970> Running ‘opam update’ gives the output http://pastebin.com/MY2D9npn.
<natrium1970> I’m not sure how to “install” aspcud, though. The docs with aspcud seem to assume you won’t be installing it at all.
The_third_man has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
Muzer has joined #ocaml
troydm has joined #ocaml
vpm has joined #ocaml
emias has joined #ocaml
ia0 has joined #ocaml
c74d has joined #ocaml
The_third_man has joined #ocaml
<bernardofpc> natrium1970: maybe the "cloud solver" will help you ?
<Drup> natrium1970: bug report, I guess ?
<Drup> (you tried with -v to have details ?)
<Drup> :D
<Drup> it's not in port ?
<Drup> or brew
<Drup> actually, I'm pretty sure it is.
<bernardofpc> this way, you don't need to "install"
<natrium1970> How does opam find uspcud then?
<Drup> it tries to call it.
<bernardofpc> natrium1970: http://cudf-solvers.irill.org/index.html
<natrium1970> So upscud executable needs to be installed somewhere.
<Drup> indeed
<Drup> (aspcud*)
jabesed has quit [Ping timeout: 265 seconds]
hilquias has joined #ocaml
MrScout_ has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
huza has joined #ocaml
AlexRussia has joined #ocaml
<natrium1970> it works with the cudf_remote_proxy. I had horrible problems with aspcud anyway.
<natrium1970> Now for some reason, opam says I can’t upgrade to lwt 2.4.7 without downgrading or uninstalling some things (doesn’t say what things)
<Drup> if you have eliom installed, it's normal
<natrium1970> Oh, I guess I don’t need any of that anyway. I was going to try ocamleditor, but it only works with version=4.01.0.
natrium1970 has quit [Quit: natrium1970]
<imslavko> is anyone using Emacs for ocaml development? Do you have merlin and ocp-indent setup? If so, can I please look at your .emacs files...
<Drup> (it's not completely ironed out, but afaiu, it works for emacs)
<imslavko> thanks, trying the first step from their readme:
<imslavko> ~> opam install user-setup
<imslavko> [ERROR] No package named user-setup found.
<imslavko> what am I doing wrong?
<Drup> it's just not in opam yet
<Drup> "opam pin add user-setup https://github.com/OCamlPro/opam-user-setup.git"
<Drup> then it's in opam :)
<imslavko> I updated opam's index and now I get it
<imslavko> just didn't know opam doesn't refresh its catalog automatically
<Drup> indeed, you need to update
<Drup> (and upgrade)
MrScout__ has joined #ocaml
MrScout_ has quit [Read error: Connection reset by peer]
MrScout_ has joined #ocaml
badkins_ has quit []
reem has joined #ocaml
darkf has joined #ocaml
MrScout__ has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
MrScout_ has quit [Ping timeout: 265 seconds]
antkong has joined #ocaml
<imslavko> Drup I think that worked! thanks
antkong has quit [Ping timeout: 264 seconds]
moei has quit [Quit: Leaving...]
moei has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
rgrinberg1 has quit [Quit: Leaving.]
reem has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ocaml
reem has quit [Ping timeout: 246 seconds]
chinglish has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
enitiz has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
struktured has joined #ocaml
IbnFirnas has quit [Ping timeout: 244 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zwer_z has joined #ocaml
zwer has quit [Ping timeout: 250 seconds]
antkong has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
psy_ has quit [Read error: Connection reset by peer]
antkong has quit [Ping timeout: 245 seconds]
rgrinberg has joined #ocaml
ggole has joined #ocaml
nullcat has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
IbnFirnas has joined #ocaml
AltGr has joined #ocaml
AltGr has left #ocaml [#ocaml]
struktured has quit [Ping timeout: 272 seconds]
IbnFirnas has quit [Read error: Connection reset by peer]
antkong has joined #ocaml
verthandi has quit [Quit: leaving]
IbnFirnas has joined #ocaml
slash^ has joined #ocaml
antkong has quit [Ping timeout: 240 seconds]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reem has joined #ocaml
IbnFirnas has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
IbnFirnas has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
anemator has joined #ocaml
keen__________51 has joined #ocaml
keen__________50 has quit [Ping timeout: 265 seconds]
anemator has quit []
AlexRussia has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ocaml
Simn has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
hilquias has quit [Remote host closed the connection]
trap_exit has joined #ocaml
<trap_exit> does js_of_ocaml support source maps?
rgrinberg1 has joined #ocaml
lu324__ has joined #ocaml
Kakadu has joined #ocaml
tane has joined #ocaml
<def`> trap_exit: yes
<trap_exit> hmm, i am so tempted to betray haskell right now
<def`> -sourcemap flag I think
milosn_ has joined #ocaml
pippijn_ has joined #ocaml
AlexRussia_ has joined #ocaml
Mercuria1Alchemi has joined #ocaml
<def`> give it a try, you won't lose anything, haskell isn't going to disappear :)
dmbaturin_ has joined #ocaml
Cypi_ has joined #ocaml
hilquias has joined #ocaml
ivan\_ has joined #ocaml
iago has joined #ocaml
MercurialAlchemi has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
bytbox has quit [*.net *.split]
milosn has quit [*.net *.split]
ivan\ has quit [*.net *.split]
stux has quit [*.net *.split]
unix_beard has quit [*.net *.split]
pippijn has quit [*.net *.split]
lu324_ has quit [*.net *.split]
so has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
psy_ has quit [*.net *.split]
fds has quit [*.net *.split]
Cypi has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
fds has joined #ocaml
stux has joined #ocaml
ivan\_ is now known as ivan\
psy_ has joined #ocaml
_5kg has quit [Ping timeout: 265 seconds]
milosn_ is now known as milosn
bytbox has joined #ocaml
contempt has quit [Ping timeout: 272 seconds]
reem has quit [Remote host closed the connection]
contempt has joined #ocaml
SuperNoeMan has quit [Ping timeout: 276 seconds]
reem has joined #ocaml
shinnya has quit [Ping timeout: 277 seconds]
Unhammer has quit [Ping timeout: 276 seconds]
hellofunk has joined #ocaml
mrvn has quit [Ping timeout: 276 seconds]
SuperNoeMan_ has joined #ocaml
oscar_toro has joined #ocaml
Sim_n has joined #ocaml
mrvn_ has joined #ocaml
Unhammer has joined #ocaml
shinnya has joined #ocaml
ivan\ has quit [Ping timeout: 276 seconds]
Simn has quit [Ping timeout: 276 seconds]
ivan\ has joined #ocaml
reem has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
destrius has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
leowzukw has joined #ocaml
chris2 has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aubergines has joined #ocaml
destrius has joined #ocaml
araujo has quit [Quit: Leaving]
_5kg has joined #ocaml
MisaMisa has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
so has joined #ocaml
destrius has quit [Quit: Leaving.]
destrius1 has joined #ocaml
destrius1 has quit [Client Quit]
yminsky has joined #ocaml
destrius has joined #ocaml
destrius has quit [Client Quit]
destrius has joined #ocaml
yminsky has quit [Client Quit]
yminsky has joined #ocaml
reem has quit [Remote host closed the connection]
yminsky has quit [Quit: yminsky]
destrius has quit [Ping timeout: 244 seconds]
reem has joined #ocaml
lordkryss has joined #ocaml
struktured has joined #ocaml
reem has quit [Remote host closed the connection]
Submarine has joined #ocaml
reem has joined #ocaml
destrius has joined #ocaml
govg has joined #ocaml
<aubergines> is there any standar function that is like fold_right but that do not reverse the list?
<aubergines> I mean in my case it is the same f(a1, f(a2, b)) and f(a2, f(a1,b))
reem has quit [Remote host closed the connection]
<struktured> Submarine: why is fold_left not usable for you?
<struktured> aubergines, not Submarine
OnkV has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
Haudegen has joined #ocaml
leowzukw has quit [Ping timeout: 246 seconds]
leowzukw has joined #ocaml
destrius has quit [Ping timeout: 245 seconds]
Haudegen has quit [Ping timeout: 245 seconds]
so has quit [Ping timeout: 245 seconds]
so has joined #ocaml
<aubergines> struktured: it is usable, but since f is kind of Set.add the order is not important
<aubergines> struktured: and the usual fold_right is not tail recursive
Haudegen has joined #ocaml
<struktured> aubergines: http://cedeela.fr/~simon/software/containers/CCList.html (fold_right won't blow up your stack at least)
<aubergines> struktured: ok, I will take a look at it
rgrinberg1 has quit [Quit: Leaving.]
paradoja has joined #ocaml
Thooms has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
iago has quit [Ping timeout: 264 seconds]
larhat has joined #ocaml
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Thooms has quit [Quit: WeeChat 1.0.1]
mfp has quit [Ping timeout: 264 seconds]
mfp has joined #ocaml
hilquias has quit [Read error: Connection reset by peer]
hilquias has joined #ocaml
seliopou has quit [Ping timeout: 264 seconds]
skinkitten has joined #ocaml
seliopou has joined #ocaml
tane has quit [Excess Flood]
tane has joined #ocaml
so has quit [Ping timeout: 245 seconds]
so has joined #ocaml
elfring has joined #ocaml
chris2 has joined #ocaml
Thooms has joined #ocaml
_5kg has quit [Ping timeout: 264 seconds]
vanila has joined #ocaml
iago has joined #ocaml
darkf_ has joined #ocaml
Thooms has quit [Ping timeout: 245 seconds]
nopf_ is now known as nopf
darkf has quit [Ping timeout: 272 seconds]
sivoais has quit [Ping timeout: 244 seconds]
darkf_ is now known as darkf
govg has quit [Quit: leaving]
sivoais has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
chris2 has quit [Quit: trotz alledem!]
iago has quit [Ping timeout: 264 seconds]
_5kg has joined #ocaml
dsheets_ has joined #ocaml
destrius has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
dsheets_ has quit [Ping timeout: 255 seconds]
dsheets has joined #ocaml
chris2 has joined #ocaml
dsheets_ has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
psy_ has quit [Quit: Leaving]
psy_ has joined #ocaml
zwer_z is now known as zwer
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Thooms has joined #ocaml
destrius has quit [Ping timeout: 240 seconds]
Sim_n has quit [Ping timeout: 265 seconds]
waneck_ has quit [Read error: Connection reset by peer]
tobiasBora has joined #ocaml
MrScout has joined #ocaml
enitiz has joined #ocaml
_5kg has quit [Ping timeout: 250 seconds]
_5kg has joined #ocaml
destrius has joined #ocaml
dmbaturin_ is now known as dmbaturin
Mercuria1Alchemi has quit [Ping timeout: 264 seconds]
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
leowzukw has quit [Quit: leaving]
ygrek has joined #ocaml
paradoja has quit [Ping timeout: 265 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
darkf has quit [Quit: Leaving]
ontologiae has joined #ocaml
MrScout_ has joined #ocaml
trap_exit has quit [Ping timeout: 246 seconds]
MrScout has quit [Ping timeout: 240 seconds]
MrScout_ has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 250 seconds]
MrScout has joined #ocaml
govg has joined #ocaml
chinglish has joined #ocaml
paradoja has joined #ocaml
oriba has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
Cypi_ is now known as Cypi
jao has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
enitiz has quit [Quit: Leaving]
chaptastic has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
tani has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
yminsky has joined #ocaml
yminsky has quit [Quit: yminsky]
lordkryss has quit [Quit: Connection closed for inactivity]
Sim_n has joined #ocaml
skinkitten has quit [Ping timeout: 252 seconds]
aliasananas has joined #ocaml
<aliasananas> Hello, a stupid question here : what module is created when I compile foo.bar.ml ? Foo.bar ? Foo_bar ? Foobar ?
<tokenrove> Warning 24: bad source file name: "Foo.bar" is not a valid module name.
paradoja has left #ocaml ["Killed buffer"]
<aliasananas> :(
<tokenrove> indeed :-/
<aliasananas> Thank you :)
<ggole> I think packs are the usual way to do things like that
destrius has quit [Quit: Leaving.]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
rgrinberg has joined #ocaml
swgillespie has joined #ocaml
skinkitten has joined #ocaml
aliasananas has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: Leaving.]
chaptastic has quit [Read error: No route to host]
chaptastic has joined #ocaml
micrypt has joined #ocaml
oriba has quit [Quit: Verlassend]
skinkitten has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
dlat has joined #ocaml
skinkitten has joined #ocaml
rgrinberg has joined #ocaml
leowzukw has joined #ocaml
jave has quit [Ping timeout: 272 seconds]
MisaMisa has joined #ocaml
jave has joined #ocaml
pyon has quit [Quit: fix]
Leonidas has quit [Ping timeout: 265 seconds]
pyon has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
aliasananas has joined #ocaml
Leonidas has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
TheCommieDuck has joined #ocaml
tane has joined #ocaml
<TheCommieDuck> Hey. Is 'a option /roughly/ equivalent to Optional<T> in imperative languages?
Sim_n is now known as Simn
<Drup> it's not-roughly equivalent
<TheCommieDuck> so it's..equivalent? Or it's 'you have no idea what you're talking about'? :P
<vanila> int option has values like: None or Some 4
<Drup> it's exactly the same, yes :)
<TheCommieDuck> awesome, thanks :)
tani has quit [Ping timeout: 264 seconds]
ontologiae has quit [Ping timeout: 256 seconds]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<MercurialAlchemi> exactly the same except the stdlib falls short on option-related utilities
<TheCommieDuck> Is there some built-in Some a -> a | None -> exception function?
AlexRussia_ has quit [Ping timeout: 245 seconds]
<companion_square> no, but all stdlib replacements/enhacements provide some
<companion_square> none provides none
<Drup> BatOption is the module we need. :D
<companion_square> *Option ;)
companion_square is now known as companion_cube
<TheCommieDuck> ah :P
<MercurialAlchemi> TheCommieDuck: don't worry
<MercurialAlchemi> you want an stdlib replacement/enhancement anyway
MisaMisa has joined #ocaml
<TheCommieDuck> MercurialAlchemi: I'll guess I'll get to that stuff later on :)
<Drup> writing your own option functions is not a bad exercise initially anyway.
<flux> thecommieduck, I think the key difference is that some imperative languages still have the value 'null' even if the type is Optional<T>
<TheCommieDuck> flux: whereas OCaml has no null directly, right?
<flux> right
<flux> thecommieduck, another is that one should typically avoid using the kind of functions you just described, because they are great at producing 'null pointer exceptions'
<flux> usually one would consider all the cases when deconstructing a value
<flux> and then pass the deconstructed value forward
<TheCommieDuck> you mean the Some unboxing-type?
<flux> I don't think boxing comes into picture here..
<TheCommieDuck> bad choice of words, then
<flux> let's say, there wouldn't be a function 'print_client_info' that takes Optional<Client> as a parameter
<TheCommieDuck> I'm assuming you mean avoiding 'Some a -> a | None -> exception' kind functions
<flux> yes
<companion_cube> yes, avoid this
<TheCommieDuck> makes sense
<flux> instead, the Optional-part is stripped somewhere explicitly and the case of 'None' is considered separately
<Drup> this function should be named "(╯°□°)╯︵ ┻━┻"
<flux> there are of course times when it's more convenient to do otherwise, but this is a rule of thumb :)
<Drup> (un)fortunatly, no utf8 in names in ocaml :p
<flux> yet! ;-)
rgrinberg has quit [Quit: Leaving.]
mort___ has joined #ocaml
<TheCommieDuck> I must say...these error messages actually giving you the source of an error are a breath of fresh air
AlexRussia_ has joined #ocaml
<ggole> Drup: you'll have to settle for Option.you_only_live_once
<ggole> Which is at least discouragingly long.
<companion_cube> Option.i_am_really_sure_i_want_to_unsafely_unwrap_this_particular_option_because_it_cannot_be_none
<flux> you know.. you could just write the function inline in that case..
<flux> you need to find a name that's just short enough to not do that
<Drup> Option.magic
<flux> but still annoying to use
<companion_cube> Obj.option
<companion_cube> flux: not bad
<companion_cube> reminds me of the amusing replacement of (==), in Core, with something of type [`Consider_using_physical_eq] where physical_eq is the new name of ==
<flux> well, I'm sure in short time Merlin will learn how to convert a value from type x to type y
<flux> using all available conversion and pattern matching methods!
rgrinberg has joined #ocaml
<companion_cube> heh, merlin driven code generation...
<ggole> We'll have M-x dwim up and running in no time.
<flux> you can simply bind a key for it
<Drup> given that merlin now supports ppx
<flux> in fact, you can bind all keys to it
<Drup> you only need to write the correct ppx
<flux> it will Just Work(TM)
<Drup> and add a thing in merlin to replace a region by the ppx-extended version.
<flux> drup, and there was this hack to access type information from within ppx
<companion_cube> :Destruct paves the road for :Reconstruct
<companion_cube> :Guess
<Drup> :DearMerlinPleaseWriteMyCode
nullcat has joined #ocaml
<Drup> (which is sort of what Agda/Idris do, btw)
<flux> you could easily implement that with Amazon Mechanical Turk
<flux> just mark the area you wish to be filled with code and put a bounty on it
<Drup> I'm not sure I would trust this code.
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ggole> Do you trust *your* code?
<flux> well, it compiles.. ?
<Drup> depends of the amount of polymorphic variants in it
<ggole> Heh.
<ggole> Not enough GADTs, doesn't work yet.
<Drup> with a sufficiently precised type signature, there is only one valid function :D
<companion_cube> that's the PhD topic of gasche ;)
<Drup> well, parametricity is not only gasche's thing ;)
<ggole> val dwim : unit -> something_worth_money
<ggole> There, I've done the hard work. Somebody implement that.
<Drup> Error: Unbound type constructor something_worht_money
<Drup> worth*
<Drup> (I'm the only typechecker that do typoes)
<companion_cube> I can write such a typechecker juste to prove you wrong, if you want
aliasananas has quit [Quit: Leaving]
<Drup> keep the idea for 1st april
<companion_cube> ^^
<companion_cube> a patch that introduces typos in error messages of ocamlc
<Drup> then you can release it as an opam switch
<Drup> I authorize you to use my name for it if you want :D
<companion_cube> then it should interact with the typo-aware "did you mean" messages
<Drup> that would be so devious :]
<companion_cube> at line 5, value 'x' has type 'foa' but type 'bar' expected. Did you mean type 'foo'?
<ggole> I'm waiting for the day it says "something something foo. Did you mean foo?"
<Drup> ggole: too easy, you can already do that.
<ggole> The name suggestion?
<Drup> 'type t = Bla module M = struct type t = Blo let x : t = Bla end
<Drup> there you go.
enitiz has joined #ocaml
<ggole> Those are different names though.
<Drup> the type t is not
<ggole> That's not the name being suggested.
<Drup> hum, indeed
<ggole> I'm (very) familiar with the good old "this is of type t, should be of type t"
<Drup> :D
<Drup> In the scale of confusing error messages, this one ranks quite high.
<ggole> Which I think you can still coax from the compiler if you are careful
<Simn> In Haxe we had "Type X has no field foo (suggestion: foo)" which was caused by some Not_found exception being caught in the wrong place.
<Drup> ggole: I just got "Values do not match: val x : t is not included in val x : t"
<ggole> This expression has type 'a t but an expression was expected of type 'a t The type constructor t would escape its scope
<ggole> Good fun!
<ggole> (I think whitequark submitted a request for that one to be less confusing.)
Hannibal_Smith has joined #ocaml
mort___ has quit [Quit: Leaving.]
<Drup> today in #ocaml, how to extract the most terrible error message from the typechecker.
paradoja has joined #ocaml
<ggole> Well, we can't compete with the C++ peeps for volume.
paradoja has left #ocaml [#ocaml]
<Drup> for volume of the error message ?
<Drup> we certainly can :p
<ggole> I think they figured out how to get arbitrarily large amounts of barf from short programs after that competition took place.
<Drup> functors to the rescue !
<ggole> Oh, isn't there that exponential size type inference trick?
<Drup> no, that's another one
<ggole> That seems a bit like cheating.
<Drup> I mean, just do a functor taking Core as argument, or two module A and B of module type Core, and so on
<Drup> and apply to something big but not Core
<Drup> actually, it's probably much better since 4.02, because module aliases
<ggole> Yeah
<Drup> ahah, I just crashed emacs by doing "ocamlc -i" on "module F (M : module type of Core_kernel) = M"
<Drup> no, it's not better :D
<ggole> O_o
<ggole> Hung or crashed?
<Drup> it's still alive
<Drup> but it's hurting x)
<ggole> Might be murdering itself trying to syntax highlight a vast quantity of output
<Drup> possible
* ggole has fond memories of waiting for the camlp4 interface to print out
<Drup> 23M of type signature
<Drup> just for this small functor
<ggole> Nice!
<Drup> and it's with Core_kernel, I don't have core installed
<whitequark> ggole: it got fixed actually
elfring has quit [Quit: Konversation terminated!]
<whitequark> regarding c++, http://tgceec.tumblr.com/
<whitequark> "In the oneshot category the leading submission manages to achieve over 1.5 gigabytes of error. This is remarkable especially given that the source size is limited to 256 bytes.
<ggole> That's the competition I mentioned, yeah
<ggole> A wonderful and terrible thing.
<Drup> ggole: if you add "module Bli = Bla (Bla)"
<Drup> you get a 40M type error.
<Drup> \O/
<flux> whitequark, I belive it's been stated that the challenge is actually producing the greatest size error message within the time allocated
<flux> otherwise it would be too easy I guess :-)
_5kg has quit [Ping timeout: 250 seconds]
goraci has joined #ocaml
<goraci> hi - can we add something to tuple ? (1,2,"house") for example
<goraci> or how to modify to get new tuple ? pattern matching ?
<ggole> goraci: pull it apart and put it back together with matching
<ggole> There's no variadic machinery so you'll have to pick a size (or write variants for each size, blugh)
<goraci> something like let new_tpl (x,y,z) = (1,2,"house")
<goraci> and then how to add something ?
<Drup> tuples are immutables, so you never "add" something.
<ggole> let add_t4 (a,b,c) d = a,b,c,d
<Drup> ggole: please add parens :<
<ggole> Boo!
<ggole> It's probably a good idea though.
<Drup> (and don't tell me you can't because your code is immutable !)
dario has joined #ocaml
leowzukw has quit [Quit: Lost terminal]
<dario> Drup: just noticed an anomaly on $OPAM/lib/tyxml -- files named tymlx_p.*
<dario> Am I correcting in presuming this to be a typo?
<Drup> no it's not
<Drup> it's the internal name of the parser
<dario> Ah, okay...
<Drup> is there an issue with it ?
<Drup> well, there are tons of issues with this parser, but a specific one :D
<dario> Probably not...
<dario> ...However...
<dario> ...On the toplevel, I tried to #require "bookaml.ocamlnet" and got an error message...
<dario> ..."Reference to undefined global `Simplexmlparser'"...
<dario> (which is why I was looking into the Tyxml lib dir)
<Drup> you forgot a dependency to tyxml.parser then
<dario> Hmm, I see it now. Is the addition of subpackages to Tyxml recent(ish)?
<Drup> not really
<dario> It's been a while since I needed Bookaml.ocamlnet, though...
<Drup> I don't remember modifying that, so > 2 years
<dario> I've been using only Bookaml.ocsigen, so Bookaml.Ocamlnet has just bitrotted...
<dario> But it's a simple update, thankfully...
<dario> Btw, is Ocsigen moving away from Ocamlnet completely?
ggole has quit []
<Drup> yeah
<Drup> because of the C dependencies
<dario> Because of Mirage?
<dario> I mean: because you want Ocsigen to be Mirage-friendly?
<Drup> yes
<dario> Anyway, it's good to know that.
<dario> Also, is Ocsigenserver going to use Cohttp exclusively or are you functorising the HTTP engine?
<Drup> the former
<dario> Ah... good to know, thanks!
pyon has quit [Ping timeout: 264 seconds]
enitiz has quit [Ping timeout: 245 seconds]
<Drup> we use this occasion to just drop a big chunk of code that is hold and hard to maintain :)
<dario> Understandable...
pyon has joined #ocaml
<dario> Moreover, OPAM makes the issue of external dependencies less of a hassle...
<Drup> exactly
<dario> One request, though: you guys should write a blog post describing these plans...
<dario> ...particularly the new set of libraries you will depend on...
<dario> ...so that projects around the Ocsigen ecosystem can move in tandem...
<dario> (Myself I've been considering moving to Cohttp, and now will definitely do so)
pyon has quit [Client Quit]
<Drup> I really need to put up this ocsigen blog
<dario> Or write an email to the mailing-list...
<dario> Besides Cohttp, which other libraries will you use to replace Ocamlnet?
<Drup> ocaml-re probably
<Drup> it remains to be done, so the plans are not really set in stone
<dario> Probably ocaml-uri for the stuff currently done by Netstring?
<dario> Okay. Once those plans solidify, do announce them! :-)
<Drup> Didn't look at that part, so not sure
<Drup> (but using ocaml-uri would be a very good idea)
<dario> Hmm, the Mirage guys also have ocaml-base64, which you might need...
<dario> (Ocamlnet is huge!)
<dario> Oh, and there's also ocaml-ipaddr...
<dario> (I'm looking at Mirage's Github page...)
<Drup> some of those are already used by cohttp
<dario> OK, makes sense...
rgrinberg has quit [Quit: Leaving.]
<dario> Anyway, I have to go soon. Nice chatting with you!
<Drup> see you :)
struktured has joined #ocaml
dario has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<struktured> has any written a "has at least one element" collection type in ocaml?
slash^ has quit [Read error: Connection reset by peer]
pyon has joined #ocaml
<Tekk_> struktured: I believe that you can't have a zero element tuple :)
yminsky has joined #ocaml
<struktured> Tekk_: sure, but tuples are strongly typed for each dimension
pyon has quit [Quit: bye bye rcirc, hello circe]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
_5kg has joined #ocaml
lordkryss has joined #ocaml
<Drup> Tekk_: nor a one-tuple
<Drup> struktured: ('a * 'a set) ? :p
<Tekk_> Drup: any binding is a one-tuple, when you think about it
<Tekk_> :p
<Drup> Tekk_: ppx authors disagree with you
<Tekk_> Drup: bah, surely charlatans with their "degrees" and "research" and "mathematics" :)
araujo has joined #ocaml
araujo has joined #ocaml
<struktured> Drup: I'm running into this because I find the case of folding a possibly empty collection awkward and have to return an optional type in the accumulator to handle that case.
<nicoo> Tekk_: Well, you could consider unit to be a degree 0 tuple and 'a to be degree 1, but I don't see the point
<struktured> Drup: and in practice, my lists are never empty, or should have died earlier because they were empty
<nicoo> struktured: You could have a type for non-empty lists :3 (ok, that's a bit unwieldy though)
<Tekk_> nicoo: to amuse myself, mostly.
<struktured> nicoo: I've considered it..hrpmh..anyhow gotta run, thanks for the ideas
<nicoo> struktured: Bye
goraci has quit [Quit: Leaving]
Submarine has quit [Quit: Leaving]
Submarine has joined #ocaml
Guest554 has joined #ocaml
Guest554 has quit [Changing host]
Guest554 has joined #ocaml
Guest554 has quit [Client Quit]
yminsky has quit [Quit: yminsky]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdewacht_ is now known as pdewacht
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rom1504_ is now known as rom1504
pyon has joined #ocaml
tane has quit [Quit: Verlassend]
BitPuffin has joined #ocaml
oriba has joined #ocaml
nullcat has joined #ocaml
yminsky has joined #ocaml
Submarine has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
yminsky has quit [Quit: yminsky]
antegallya has quit [Quit: Leaving.]
mort___ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
antkong has joined #ocaml
swgillespie has joined #ocaml
<TheCommieDuck> How do you say 'type 'a foo' = Integer of int | Boolean of bool'? foo is a disjoint union over type 'a, with cases Integer of type int and Boolean of type bool? Just trying to make sure I don't think about these the wrong way.
<companion_cube> why do you have a parameter 'a?
<TheCommieDuck> er, I'm not sure D:
<TheCommieDuck> No, that should not be there.
<companion_cube> type foo = Int of int | Bool of bool
<TheCommieDuck> That's what I'm meaning, yes.
<companion_cube> ↑ this is a disjoint union
<companion_cube> you can create values of type foo like this: Int 42 or Bool true
<TheCommieDuck> Yep
<companion_cube> and pattern-match to deconstruct :)
<TheCommieDuck> Just making sure I've not got the wrong idea in mind about what it represents :P
<TheCommieDuck> Thanks!
<MercurialAlchemi> you only use a type parameter to say 'any type'
<MercurialAlchemi> eg, type 'a option = None | Some of 'a;;
<companion_cube> yes
Haudegen has quit [Ping timeout: 246 seconds]
<MercurialAlchemi> this lets you feed a value of any type to the Some constructor
<companion_cube> then, you can talk about int option, string option, etc.
<companion_cube> Some 1 : int option
<companion_cube> Some [1;2;3] : int list option
<companion_cube> are you using the toplevel?
<MercurialAlchemi> companion_cube: a better question is, are you using utop :)
<companion_cube> yeah
<companion_cube> that was going to be my point ;)
<MercurialAlchemi> even with rlwrap, the toplevel is... well...
Hannibal_Smith has quit [Quit: Leaving]
rgrinberg has joined #ocaml
<MercurialAlchemi> quite lacking
<MercurialAlchemi> or rather, in the spirit of the stdlib
<companion_cube> :)
<companion_cube> it works, but doesn't do much more
Haudegen has joined #ocaml
<companion_cube> I prefer having a good language and a slightly lacking stdlib than a bad language with a good stdlib anyway
Thooms has joined #ocaml
<MercurialAlchemi> indeed
enitiz has joined #ocaml
<MercurialAlchemi> some stuff you can't patch away
<MercurialAlchemi> on this, bedtime
<companion_cube> good night MercurialAlchemi
waneck has joined #ocaml
<MercurialAlchemi> companion_cube: oh, and there is a new toml with the location fix (at last) and less verbosity, I'll try and push it to the opam repo tomorrow
<companion_cube> nice
<TheCommieDuck> yeah, I based it off an example using a parameter then made an example not using one :p
Kakadu has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 245 seconds]
milosn has quit [Ping timeout: 272 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milosn has joined #ocaml
Haudegen has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
milosn has quit [Ping timeout: 256 seconds]
hellofunk has quit [Ping timeout: 245 seconds]
Thooms has quit [Ping timeout: 250 seconds]
Thooms has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
milosn has joined #ocaml
micrypt has left #ocaml ["."]
enitiz has quit [Ping timeout: 250 seconds]
Simn has quit [Quit: Leaving]
bjorkintosh has joined #ocaml
enitiz has joined #ocaml
mort___ has quit [Quit: Leaving.]
AltGr has joined #ocaml
Nadrieril has joined #ocaml
Nadrieril has left #ocaml [#ocaml]