ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jwatzman|work has quit [Quit: jwatzman|work]
ontologiae_ has quit [Ping timeout: 260 seconds]
jeffmo has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mac10688 has joined #ocaml
lostman has quit [Quit: Connection closed for inactivity]
manizzle has quit [Ping timeout: 250 seconds]
nullcatxxx_ has joined #ocaml
badon has joined #ocaml
rpg has quit [Quit: rpg]
manizzle has joined #ocaml
psy has joined #ocaml
morolin_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
psy has quit [Disconnected by services]
igoroliveira has quit [Quit: Connection closed for inactivity]
enquora has joined #ocaml
enquora has quit [Remote host closed the connection]
ceryo has joined #ocaml
NingaLeaf has joined #ocaml
manizzle has quit [Ping timeout: 245 seconds]
NingaLeaf has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ceryo has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
NingaLeaf has joined #ocaml
nullcatxxx_ has joined #ocaml
igoroliveira has joined #ocaml
ceryo has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
ceryo has quit [Ping timeout: 245 seconds]
ceryo has joined #ocaml
morolin has joined #ocaml
ceryo has quit [Ping timeout: 260 seconds]
benjamin1 has joined #ocaml
ygrek has joined #ocaml
ceryo has joined #ocaml
benjamin1 has quit [Ping timeout: 250 seconds]
ceryo has quit [Ping timeout: 260 seconds]
benjamin1 has joined #ocaml
systmkor has quit [Ping timeout: 250 seconds]
switchy has quit [Quit: Bye!]
switchy has joined #ocaml
ryanartecona has joined #ocaml
benjamin1 has quit [Ping timeout: 245 seconds]
benjamin1 has joined #ocaml
switchy has quit [Changing host]
switchy has joined #ocaml
switchy has quit [Quit: Bye!]
switchy has joined #ocaml
mac10688 has quit [Ping timeout: 260 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
darkf has joined #ocaml
systmkor has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
mac10688 has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
Madars has quit [Ping timeout: 276 seconds]
systmkor has quit [Remote host closed the connection]
Madars has joined #ocaml
enamex has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benjamin1 has quit [Ping timeout: 245 seconds]
Bahman has joined #ocaml
enamex has quit [Ping timeout: 250 seconds]
mac10688 has quit [Ping timeout: 250 seconds]
t4nk130 has joined #ocaml
t4nk130 has quit [Ping timeout: 252 seconds]
ryanartecona has quit [Quit: ryanartecona]
JacobEdelman has quit [Quit: Connection closed for inactivity]
copy` has quit [Quit: Connection closed for inactivity]
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
benjamin1 has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
nojb has joined #ocaml
Haudegen has joined #ocaml
Ravana- is now known as Ravana
ely-se has joined #ocaml
pierpa has joined #ocaml
kushal has joined #ocaml
pierpa` has joined #ocaml
aaronelkins has joined #ocaml
struktured has quit [Ping timeout: 250 seconds]
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
ril has joined #ocaml
Bahman has quit [Read error: Connection reset by peer]
Bahman has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freehck has joined #ocaml
<flux>
I wonder if the forecoming alpha multicore branch next year will also come with alpha native compiler..
caisah has joined #ocaml
Simn has joined #ocaml
benjamin1 has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
jonludlam has joined #ocaml
larhat1 has quit [Quit: Leaving.]
AlexRussia has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
rand has joined #ocaml
benjamin1 has joined #ocaml
pierpa` has quit [Read error: Connection reset by peer]
pierpa` has joined #ocaml
agumonkey has quit [Ping timeout: 245 seconds]
agumonkey has joined #ocaml
zpe has quit [Remote host closed the connection]
_andre has joined #ocaml
FreeBird_ has joined #ocaml
ontologiae_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
FreeBird_ has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
python476 has joined #ocaml
aaronelkins has quit [Ping timeout: 260 seconds]
aaronelkins has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
agumonkey has quit [Ping timeout: 260 seconds]
agumonkey has joined #ocaml
dch has quit [Ping timeout: 240 seconds]
pierpa` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
tristero has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
dch has joined #ocaml
Bahman has quit [Ping timeout: 245 seconds]
tristero has joined #ocaml
slash^ has joined #ocaml
Sorella has joined #ocaml
stephe has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe_ has joined #ocaml
stephe has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 260 seconds]
sepp2k has joined #ocaml
aaronelkins has quit [Quit: aaronelkins]
JacobEdelman has joined #ocaml
yomimono has joined #ocaml
Haudegen has joined #ocaml
NingaLeaf has joined #ocaml
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe_ has quit [Ping timeout: 260 seconds]
pierpa has quit [Remote host closed the connection]
zpe has quit [Read error: Connection reset by peer]
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
pierpa has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has quit [Ping timeout: 245 seconds]
rand has quit [Quit: leaving]
dsheets has joined #ocaml
ryanartecona has joined #ocaml
ontologiae_ has quit [Ping timeout: 245 seconds]
<freehck>
People, could you recommend me an ocaml module for parsing Sys.argv?
<companion_cube>
Arg
<companion_cube>
or, if you want something fancier, cmdliner (on opam)
<companion_cube>
but Arg is fine for beginning
sz0 has quit [Quit: Connection closed for inactivity]
d0nn1e has quit [Ping timeout: 260 seconds]
<flux>
Arg is a bit annoying if you are allergic about side effects
<flux>
and Cmdliner has a steep learning curve, in particular for a beginner
<flux>
but Arg works fine
d0nn1e has joined #ocaml
<companion_cube>
well, you can restrict those side effects to a small part of the program (the main module, say)
IP92 has joined #ocaml
<IP92>
I'm reading some input from the user, which I then convert to a float. I also have a custom exception, for when the input cannot be converted to float. How should I achieve the following that, when the input is incorrect, it raises a failure with the input. If I catch the Failure, the string it has with it, is "float_of_string"
BitPuffin has joined #ocaml
<theblatte>
IP92: try float_of_string "a" with | Failure "float_of_string" -> raise Foo?
<flux>
in practice I would limit the scope of the exception to the smallest possible, ie. let user_float_of_string str = try float_of_string str with _ -> raise (MyError str)
<IP92>
theblatte: Foo should also include the read input
copy` has joined #ocaml
copy` has left #ocaml [#ocaml]
copy` has joined #ocaml
kushal has quit [Quit: Leaving]
<IP92>
flux: yes, that was my idea as well, but I'm getting unbound value: str
<companion_cube>
I wouldn't rely on the exact text inside Failure
<companion_cube>
it's not future-proof
<companion_cube>
try float_of_string s with _ -> raise MyExn is fine
yomimono has joined #ocaml
<flux>
what he said. though, in practice, I think it is future prof, nobody dares to break it?-)
<flux>
ip92, works on my computer(TM)
<IP92>
here's the code I have http://pastebin.com/gsa98wrF (don't mind the weird language). and this currently gives me "unbound value sisu"
<zozozo>
IP92: you should begin the 'try' after you define sisu
<zozozo>
i.e let sisu = read_line () in try float_of_string sisu with _ -> raise Illegaalne (sisu)
<zozozo>
else, sisu is not defined in the exception handler
<IP92>
zozozo: yes, that works, thanks. I for some reason though the whole definition must go inside the try block
<IP92>
thought*
kushal has joined #ocaml
<freehck>
Hm... I see cmdliner can provide me with a well-formatted manpage.
ceryo has joined #ocaml
<zozozo>
yup, it's quite more readable than the Arg help when you have a lot of options
<IP92>
is there a predefined function for padding a string with double quotes?
enamex has joined #ocaml
<zozozo>
IP92: let quote s = Printf.sprintf "%S" s should do something similar to chat you want I think
<companion_cube>
String.escape ?
ely-se has quit [Quit: leaving]
ryanartecona has quit [Quit: ryanartecona]
IP92 has quit [Quit: Leaving]
igoroliveira has joined #ocaml
rand has joined #ocaml
ely-se has joined #ocaml
ely-se has quit [Client Quit]
Mercuria2Alchemi has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
python476 has quit [Ping timeout: 252 seconds]
adrien has quit [Ping timeout: 244 seconds]
adrien has joined #ocaml
benjamin1 has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ocaml
lobo has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
enamex has quit [Ping timeout: 250 seconds]
rand has quit [Quit: leaving]
ely-se has joined #ocaml
sgnb has quit [Ping timeout: 250 seconds]
enamex has joined #ocaml
sgnb has joined #ocaml
sepp2k has joined #ocaml
benjamin1 has joined #ocaml
MercurialAlchemi has joined #ocaml
ely-se has quit [Quit: leaving]
ryanartecona has joined #ocaml
clockish has quit [Ping timeout: 260 seconds]
clockish has joined #ocaml
native_killer has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Snark has quit [Remote host closed the connection]
Snark has joined #ocaml
Bahman has joined #ocaml
ygrek has joined #ocaml
ncthom91 has joined #ocaml
kushal has quit [Ping timeout: 250 seconds]
tane has joined #ocaml
kushal has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
agumonkey has quit [Ping timeout: 245 seconds]
agumonkey has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
<tane>
is there a way to have sub modules without having to c&p types three times? (.mli & 2* in .ml)
<Maelan>
why 2× in .ml ?
ollehar has joined #ocaml
<Maelan>
when there will be a case-insensitive string comparison in stdlib? :-(
<Maelan>
but the goal of a stdlib is avoiding to redefine each time the more common functions
<zozozo>
well, that's not really the spirit of the stdlib at the moment
<Maelan>
and notice how this simple definition does useless operations; for a more efficient function you need to resort to loop / recursive function
<theblatte>
you can submit a PR and get it rejected :)
<tane>
Maelan, yeah, I've just noticed the problem is limited to my recursive modules :)
vpm_ is now known as vpm
jonludlam has joined #ocaml
psy_ has joined #ocaml
native_killer has quit [Quit: Leaving]
psy_ has quit [Max SendQ exceeded]
yomimono has quit [Ping timeout: 250 seconds]
ryanartecona has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
jonludlam has quit [Ping timeout: 260 seconds]
srcerer has joined #ocaml
jwatzman|work has joined #ocaml
<Maelan>
also, String.is_alpha and the kind
^elyse^ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
<companion_cube>
Maelan: you should use a unicode lib anyway
benjamin1 has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
<Maelan>
for real programs of course
<Maelan>
i am writing a small standalone script so it would not make sense
Haudegen has quit [Ping timeout: 250 seconds]
kushal has quit [Ping timeout: 250 seconds]
<Maelan>
by the way, a syntax like (expr ~= pattern) (sugar for match expr with pattern -> true | _ -> false) would be nice for simple tests with no need for binding
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube>
this requires magic
<companion_cube>
unless you put ~= in the syntax itself, but I doubt the maintainers will like such modifications to the language
<thizanne>
yeah it's bad for beginners who want to define ~= as a custom operator
<thizanne>
but wait, they're not supposed to define operators anyway !
<flux>
maelan, a lot of the point in pattern matching is that you get results.. while there are applications where simply getting a true/false is useful, a lot of time that can be a sign of unsafe code
<flux>
ie. if foo ~= Some _ then operate foo
nojb has quit [Ping timeout: 260 seconds]
<flux>
match foo with Some foo' -> operate foo' is indeed slightly longer, though :)
<flux>
(and causes a compiler warning..)
<companion_cube>
it's not the issue, the problem is patterns aren't values
Haudegen has joined #ocaml
<flux>
first class patterns would be nice, but probably would need some decisions to be made :)
<companion_cube>
oh dear.
jonludlam has joined #ocaml
<mrvn>
and curried constructors
<Maelan>
and curried constructors
<Maelan>
companion_cube, yes, this is why i said « syntax » instead of « operator » ;-)
<Maelan>
flux, there are many cases in which you simply want to test for a value to have some form
<Maelan>
eg if a list is not empty (okay, here you can compare to [] instead)
<Maelan>
if you have a result (okay, compare to None instead)
<Maelan>
to write Char.is_alpha
Kakadu has quit [Quit: Page closed]
<Maelan>
if a list has at least two elements
<flux>
and when you want a list of two elements, it's highly likely you want to access said elements.. so you use pattern matching ;)
<flux>
I think if you'll take an existing program and refactor it to use this new syntax, you may find that there aren't all that many places where it's applicaple. but, that's just, like, an opinion ;-)
tane has quit [Quit: Verlassend]
tane has joined #ocaml
Algebr has joined #ocaml
ygrek has joined #ocaml
Algebr` has joined #ocaml
<Maelan>
a funny question that just came to me: each time you have an unit value somewhere, does it allocate something? or is it optimized so you only have one in memory, or null pointers or something? or nothing at all when returning it from a function?
ril has joined #ocaml
<Drup>
Maelan: this is trivial to implement as a ppx
<companion_cube>
unit is a integer-sized value
<Maelan>
oh right, stupid question
<companion_cube>
no, no pb, it's a reasonable question
<Maelan>
it’s okay because this is a constant constructor
<Drup>
Maelan: also, note that there are strong reasons not to add this ~= operator
<companion_cube>
kind of, yeah
<Drup>
it encourage to write bad code
<Maelan>
actually the last part of my question is more relevant
<Maelan>
about return value
Guest38 has joined #ocaml
<Drup>
(like "if foo ~= Some _ then let x = get_opt foo in ..."
<zozozo>
Maelan: actually, () has exactly the same runtime representation as the integer 0
Algebr has quit [Remote host closed the connection]
Algebr` has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
darkf has quit [Quit: Leaving]
ryanartecona has joined #ocaml
^elyse^ has quit [Quit: Leaving]
Bahman has quit [Quit: Ave atque vale]
larhat has joined #ocaml
larhat has quit [Remote host closed the connection]
larhat has joined #ocaml
^elyse^ has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
jeffmo has quit [Quit: jeffmo]
xificurC has joined #ocaml
_andre has quit [Quit: leaving]
slash^ has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
yomimono has quit [Client Quit]
Haudegen has joined #ocaml
Simn has quit [Quit: Leaving]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freehck has quit [Ping timeout: 245 seconds]
caisah has quit [Quit: Leaving]
inr_ is now known as inr
ril is now known as ril[away]
^elyse^ has quit [Quit: Leaving]
ril[away] is now known as ril
jonludlam has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
Anarchos has joined #ocaml
Anarchos is now known as Guest25963
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
^elyse^ has joined #ocaml
Algebr has quit [Remote host closed the connection]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
sz0 has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
ontologiae_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
Denommus has joined #ocaml
rand has joined #ocaml
nojb has joined #ocaml
nojb has left #ocaml [#ocaml]
nojb has joined #ocaml
nojb has left #ocaml [#ocaml]
nullcatxxx_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 250 seconds]
Fleurety has joined #ocaml
badon has quit [Quit: Leaving]
BitPuffin has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ontologiae_ has joined #ocaml
ollehar has quit [Quit: ollehar]
ygrek has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
xificurC has quit [Quit: WeeChat 1.3]
ryanartecona has quit [Quit: ryanartecona]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tane has quit [Quit: Verlassend]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
mac10688 has joined #ocaml
nullcatxxx_ has joined #ocaml
jonludlam has joined #ocaml
Guest25963 has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ygrek has joined #ocaml
rand has quit [Quit: leaving]
^elyse^ has quit [Quit: Leaving]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
copy` has joined #ocaml
Guest38 has joined #ocaml
groovy2shoes has joined #ocaml
type has joined #ocaml
<type>
has someone here used redis with lua scripts? i cant find the right call in the redis binding
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
type has quit [Quit: Page closed]
damason has quit [Ping timeout: 260 seconds]
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kakadu has quit [Remote host closed the connection]
enamex has quit [Quit: Leaving]
<Leonidas>
oh, ocamlbuild is split off? better migrate to omake then ^^
nullcatxxx_ has joined #ocaml
<Drup>
Leonidas: why ?
nullcatxxx_ has quit [Client Quit]
nullcatxxx_ has joined #ocaml
<Leonidas>
for me the biggest advantage was that it was "standard"
<Leonidas>
similarly to how make is "standard"
<Drup>
for all purposes, it's going to be much standard than omake for a while
<Leonidas>
true, but if it it will be a dependency, it's not obviously clear what to use. ocamlbuild? omake? ocaml-makefile? custom shellscript to avoid a dependency?
<zozozo>
I'd say that most of the packages that currently use ocamlbuild will continue to do so
<Drup>
clearly
<zozozo>
so ocamlbuild will mostlikely be installed on most machines
<zozozo>
for a while at least
<Leonidas>
I liked the fact that it was included, a little bit "working out of the box" in the compiler distribution is quite good
<Leonidas>
I always liked in ghc how easy it was to build things
<Drup>
well, except that ghc itself is a nightmare to build :p
<Leonidas>
yes, but that's the distributors problem :)
<Leonidas>
and ghci can easily load packages
<Leonidas>
whereas in ocaml everything is painfully optional
<Drup>
do you maintain any haskell software ?
<Leonidas>
no, I just taught it at university.
<Drup>
ok
Guest38 has quit [Ping timeout: 250 seconds]
<Leonidas>
I do maintain ocaml software, and setting up a build-chain has always been quite an effort.
<Leonidas>
cabals not perfect either, sure.
<fds_>
I thought "the box" everything worked out of was opam?
<Drup>
oh, I'm the first one to complain about build systems
<Drup>
haskell happen to have a decent build system
<Drup>
is the entire rest of the ecosystem that happens to be broken beyond belief
<Drup>
+it
<Leonidas>
opam has been an *incredible* improvement, no doubt about it and hats off to everyone involved
<Drup>
fds_: opam doesn't completely solve the problem of actually distributing the software to users
<Leonidas>
but it solves the dependency problem, not the building problem
<Leonidas>
I was hoping oasis could take care of the rest, but at the current state oasis seems to be a dead-end.
<zozozo>
don't know much about it, but assemblage could maybe help when it's released ?
<Leonidas>
haven't looked into it, so, maybe?
<Leonidas>
I'd dream of a tool that was well integrated with both ocamlfind and opam
<Drup>
to quote the estimed author "assemblage is vaporware until it's done"
<zozozo>
Drup: any estimate for when it will be done ?
<Drup>
ahah, like I'm the person to ask
<zozozo>
well you seem to know what's going on at least, ^^
<Drup>
I read the mailing list
<zozozo>
there's an assemblage mailing list ?
<zozozo>
or I missed it on ocaml-list ?
<Drup>
the later
<Drup>
it was several month ago
<Drup>
or maybe on the mirage ml, it doesn't matter
<zozozo>
hmm.. mirage list I'd say (I just searched my mails for assemblage references and didn't find any)
Denommus has quit [Quit: going home]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]