gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
dnolen has joined #ocaml
lopex has quit []
fraggle_ has quit [*.net *.split]
hcarty has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
caligula has quit [*.net *.split]
flux has quit [*.net *.split]
bohanlon has quit [*.net *.split]
explodus has quit [*.net *.split]
emias has quit [*.net *.split]
Pepe_ has joined #ocaml
hcarty has joined #ocaml
emias has joined #ocaml
flux has joined #ocaml
caligula has joined #ocaml
fraggle_ has joined #ocaml
bohanlon has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 250 seconds]
Boscop has quit [Ping timeout: 260 seconds]
Boscop has joined #ocaml
Associat0r has quit [Quit: Associat0r]
joewilliams is now known as joewilliams_away
khia0 has joined #ocaml
khia0 has left #ocaml []
jamii has quit [Ping timeout: 250 seconds]
jamii has joined #ocaml
lamawithonel has quit [Ping timeout: 264 seconds]
dnolen has quit [Quit: dnolen]
sebz has quit [Quit: Computer has gone to sleep.]
dnolen has joined #ocaml
jamii has quit [Ping timeout: 252 seconds]
sebz has joined #ocaml
joewilliams_away is now known as joewilliams
StepanKuzmin has quit [Read error: Connection reset by peer]
joewilliams is now known as joewilliams_away
jamii has joined #ocaml
sebz has quit [Read error: Connection reset by peer]
sebz has joined #ocaml
jimmyrcom has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
arubin has quit [Quit: arubin]
dnolen has quit [Quit: dnolen]
jamii has quit [Ping timeout: 240 seconds]
jamii has joined #ocaml
sebz has quit []
jamii has quit [Ping timeout: 258 seconds]
jamii has joined #ocaml
ulfdoz has quit [Ping timeout: 250 seconds]
jamii has quit [Ping timeout: 250 seconds]
jamii has joined #ocaml
jamii has quit [Ping timeout: 250 seconds]
jamii has joined #ocaml
jamii has quit [Ping timeout: 250 seconds]
jamii has joined #ocaml
larhat has joined #ocaml
ankit9 has quit [Quit: Leaving]
jamii has quit [Quit: Leaving]
betta_y_omega has quit [Ping timeout: 250 seconds]
Associat0r has joined #ocaml
betta_y_omega has joined #ocaml
junsuijin has quit [Quit: Leaving.]
Associat0r has quit [Quit: Associat0r]
ankit9 has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
bobry1 has joined #ocaml
ikaros has joined #ocaml
edwin has joined #ocaml
<flux> tangentially related: a tagline for ml-family languages just popped into my mind: "Lets rock!"
avsm has quit [Quit: Leaving.]
slash_ has joined #ocaml
avsm has joined #ocaml
StepanKuzmin has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 252 seconds]
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
iZZy_ has joined #ocaml
betta_y_omega has quit [Ping timeout: 252 seconds]
mattam has quit [Quit: mattam]
iZZy_ has quit [Client Quit]
ikaros_ has quit [Ping timeout: 258 seconds]
betta_y_omega has joined #ocaml
<adrien> is there a way to deconstruct tuple which is given to a function with an optional argument?
slash_ has left #ocaml []
ikaros has joined #ocaml
lopex has joined #ocaml
<raphael-p> let f ?blah () = match blah with
<raphael-p> |None -> … | Some (x,y) -> …
<raphael-p> adrien: ^^ is this what you want?
<adrien> raphael-p: that's the functionality I was after, but I'd like to do the deconstruction like in "let f (foo, bar)": right in the arguments
ikaros has quit [Quit: Ex-Chat]
milosn has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
<raphael-p> adrien: according to http://caml.inria.fr/pub/docs/manual-ocaml/expr.html arguments are either expressions or ~/?-prefixed named labels and (see http://caml.inria.fr/pub/docs/manual-ocaml/lex.html#label-name for definition of label names)
milosn has quit [Read error: Operation timed out]
milosn has joined #ocaml
<flux> adrien, how would that work anyway? if the value is None, what would the extracted tuple members be?
<flux> in any case, I shall remind of 'as', if that could be of any use here
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
<adrien> flux: well, you can provide defaults values
<adrien> raphael-p: ok, thanks, I had been looking for that page but had failed to find it
zorun has joined #ocaml
lamawithonel has joined #ocaml
_andre has joined #ocaml
jimmyrcom has joined #ocaml
thomasga has joined #ocaml
dnolen has joined #ocaml
hcarty has quit [Read error: Connection reset by peer]
dnolen has quit [Quit: dnolen]
edwin has quit [Remote host closed the connection]
dnolen has joined #ocaml
edwin has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
zorun has quit [Quit: Lost terminal]
avsm has joined #ocaml
avsm1 has quit [Ping timeout: 260 seconds]
BiDOrD_ has quit [Ping timeout: 260 seconds]
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]
_habnabit has joined #ocaml
iratsu has quit [Ping timeout: 250 seconds]
BiDOrD has joined #ocaml
zorun has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
hcarty has joined #ocaml
avsm1 has quit [Ping timeout: 240 seconds]
iratsu has joined #ocaml
avsm has joined #ocaml
_andre has quit [Quit: Lost terminal]
avsm has quit [Quit: Leaving.]
milosn has quit [Ping timeout: 246 seconds]
dnolen has quit [Quit: dnolen]
ankit9 has quit [Quit: Leaving]
<metasyntax|work> Is it possible to directly read a file in .piq format using Piqi? Or can you only read the protocol buffers format?
lopex has quit []
<hcarty> Is ocamlcore down?
<NaCl> works for me
<hcarty> NaCl: Thanks. It looks like the forge is up, but the oasis-db site is down
<NaCl> ah
<hcarty> That's a bummer
* NaCl looked at updating haskell for opensuse
<NaCl> that was a disaster
<hcarty> thelema: A reasonably near-term goal for odb may be to have a mirror of the odb-relevant portions of the oasis-db site
<hcarty> thelema: A simple, static mirror updated by cron or similar, would hopefully not be too much to maintain.
Snark has joined #ocaml
george_z0rwell has joined #ocaml
Reaganomicon has quit [Ping timeout: 250 seconds]
<adrien> would it be technically feasible to have the datastructures from batteries in another library? I mean like batteries-data-structures and batteries
<adrien> and "batteries" would depend on the other one
* adrien needs an interval map on windows and knows of BatIMap now ='(
<adrien> or can I copy the files I need in a proprietary application?
larhat has quit [Quit: Leaving.]
avsm has joined #ocaml
<adrien> yeah, I'm definitely not going to create my own interval tree myself
ankit9 has joined #ocaml
betta_y_omega has quit [Ping timeout: 250 seconds]
bobry1 has quit [Ping timeout: 250 seconds]
betta_y_omega has joined #ocaml
<adrien> found ocamlplot.sf.net, it mentions an interval tree (diet too) but I couldn't find the implementation in the sourceforge packages and it hasn't been updated in a long time
betta_y_omega has quit [Excess Flood]
<adrien> (it's an interface to libplot in the first place)
joewilliams_away is now known as joewilliams
betta_y_omega has joined #ocaml
<thelema> adrien: what's the problem with using batteries on windows?
<thelema> hcarty: is oasis-db down?
avsm has quit [Quit: Leaving.]
_habnabit has quit [Changing host]
_habnabit has joined #ocaml
<thelema> hcarty: isn't a better solution to have a mirror of oasis-db?
<thelema> adrien: if you can't use the whole of batteries, you're welcome to take only the parts that you need. Make sure to grab BatAvlTree with BatIMap
<flux> how does the license work in that case?
<thelema> adrien: but I'd like to work with you on batteries on windows, if you have time.
<thelema> flux: for batteries modules? They're each LGPLv2.1
<thelema> + linking exception
avsm has joined #ocaml
<adrien> thelema: ok, that should do it, thanks :-)
<adrien> thelema: as for windows, I don't have time right now (and that's also why I'm doing ocaml, because there aren't many languages (and library set) that will allow me to do what I have to do fast enough)
<adrien> but in the future, sure
<adrien> my plans for the future are: finish something with lablgtk-react (almost done, won't take long), update yypkg's gui with that, and make packages for yypkg again
<thelema> let me know if you're ever available to work on this.
<adrien> ok :-)
<adrien> (the packages for yypkg includes ocaml packages this time ;-) )
<hcarty> thelema: A mirror of oasis-db would be ideal, but that requires more infrastructure on the mirror side
<thelema> hcarty: why mirror odb?
<thelema> reliability? bandwidth?
<hcarty> Reliability
<thelema> ah, is oasis-db down?
<hcarty> http://oasis.ocamlcore.org/dev/odb/ -- yep, a 503 error
<thelema> hcarty: I guess we'll have to wait for gildor to get back from vacation...
<hcarty> thelema: Looks like it. One of the pitfalls of a development system I suppose
<hcarty> "Official" mirrors could be pushed to each time a package update occurs
<hcarty> Unofficial mirrors could pull specific content at regular intervals
<thelema> hcarty: todo: mirror system for odb -- there'll still have to be a toplevel server with the mirror list
<thelema> or maybe a few toplevel servers or maybe a few mirrors built into odb
<hcarty> thelema: Each server could hold a list of mirrors, and odb could come pre-loaded with a set of mirrors hard-coded.
chrissbx has quit [Ping timeout: 252 seconds]
<hcarty> Although, if you have one mirror you can pull a list from you may not need the rest
<hcarty> Since you could presumably pull packages from there as well
<thelema> I'm thinking two mirror-list servers + a few mirrors builtin if both mirror-lists are down
<thelema> maybe just a mirror list built in to odb is enough.
<thelema> I'm thinking that odb shouldn't download a mirror list every time it wants to install a package
<thelema> it should just pick a random mirror and download from there
<thelema> although the benefits of geolocation would be lost...
<thelema> feh.
<hcarty> thelema: odb could avoid downloading a mirror list unless the hard coded mirrors are not available
<thelema> hcarty: we should delay this over-engineering until we have enough mirrors to make a mirrorlist worthwhile, no?
<hcarty> thelema: Completely agreed.\
penryu has joined #ocaml
<NaCl> actually, mirrorbrain would make these problems go away. :P
<thelema> NaCl: reading this, nice!
<thelema> NaCl: thanks for the pointer
<NaCl> openSUSE uses it for package distribution
<NaCl> np
<thelema> NaCl: hmm, maybe not... This looks like it has a non-trivial client library that would have to be re-implemented
<thelema> that said, I don't know.
<thelema> maybe it just works through http redirects
<hcarty> thelema: One mirror would be plenty to start out
<NaCl> re-implemented?
rbancroft has left #ocaml []
<thelema> NaCl: mirror selection... there's perl and python modules for ... something. Maybe all this is server-side and not an issue for the client
chrissbx has joined #ocaml
<NaCl> As necessary ingredient, there need to be mirror servers. They need to serve content via HTTP or FTP. To be scanned, they need to run rsync, FTP or HTTP (where rsync is most efficient).
<NaCl> That stuff is for the server only
avsm has quit [Quit: Leaving.]
<thelema> NaCl: what's required on the client side?
<NaCl> rsync
<NaCl> some way for the mirrors to scan
zorun_ has joined #ocaml
zorun_ has quit [Client Quit]
<NaCl> rather, the primary source to scan the mirrors and check if they are alive/updated
<NaCl> IIRC
<thelema> so prior to downloading, there's a "scan mirrors for content" step that the client does, right?
<NaCl> I believe so. I have never used it myself
<thelema> and I'll have to implement whatever this entails in ocaml for odb to use mirrorbrain
<NaCl> actually
<NaCl> I think the checking is done on teh server side
<NaCl> add a mirror there, and it checks stuff
<thelema> If so, this seems nice, except for the complexity in setting up a mirror
<NaCl> doesn't look like it's too hard
<NaCl> it looks like communication is just set up via cron jobs, rsync, http, and ftp
<thelema> requires: apache 2.2.6 or newer w/ mod_form, some database
ygrek has joined #ocaml
zorun_ has joined #ocaml
zorun has quit [Quit: leaving]
zorun_ has quit [Client Quit]
ygrek has quit [Remote host closed the connection]
zorun has joined #ocaml
<hcarty> thelema, NaCl: This sounds like something which would be helpful once there are 10s of mirrors, rather than 1 or 2
<qdl> I have a problem with string_of_float.
<qdl> string_of_float 0.12 gives "0.12" as I like it.
<qdl> string_of_float (0.0000012);; uses the so called scientific representation and gives "1.2e-06".
<hcarty> qdl: You can use sprintf if you want more control over the format
<hcarty> qdl: Printf.sprintf
<qdl> Is it possible to use string_of_float without the scientific rubbish?
<NaCl> Printf.sprintf
<hcarty> qdl: It is if you spell it "Printf.sprintf"
<thelema> qdl: let string_of_float x = Printf.sprintf "%f" x
<NaCl> keep in mind that %f has a cutoff
<NaCl> so you may need to extend it
<qdl> Well, no. Printf.sprintf "%f" (0.0000012);; gives ...
<qdl> ... - : string = "0.000001" I'd really like to have all the digits.
<adrien> what do you want instead?
<thelema> qdl: how many digits?
<NaCl> Printf.sprintf "%.6f" 0.0000012
<thelema> "all the digits" doesn't make sense for floats
<qdl> So many as there are.
<adrien> ah, I had skipped the trailing "2"
<NaCl> .7
<NaCl> Printf.sprintf "%.7f" 0.0000012
<qdl> As you know perhaps, in a computation it might happen, that you do not know the result. And thus you don't know the number of digits.
<qdl> This sprintf stuff reminds me of the printf stuf i hated in C.
<NaCl> that's because it's based on it. :P
<qdl> If you wanna do it bad, do it like they do it in C.
<qdl> Something else?
<NaCl> uh.
<NaCl> printf is one of the best parts of C.
<hcarty> qdl: Keep track of the precision of your calculations
<hcarty> qdl: Then it's not an issue
<NaCl> you can also specify the precision
<NaCl> dynamically
<qdl> NaCl: How?
<thelema> qdl: floating point numbers have a mantissa with fixed precision and an exponent. How do you propose figuring out the "number of digits"?
<NaCl> Printf.sprintf "%.*f" 7 0.0000012
ygrek has joined #ocaml
<qdl> NaCl: I still have to say that there should be 7 digits.
<thelema> qdl: you're welcome to say 50, and always get all the digits.
<thelema> and then trim trailing zeros
betta_y_omega has quit [Ping timeout: 258 seconds]
<qdl> OK. It seems there's no built in function. I'll get myself one.
<qdl> I won't do it with this C like rubbish.
<qdl> Thanks a lot, all of you
<adrien> qdl: an issue is that there might be no finite decimal representation to a float
<adrien> might be finite in binary but not in decimal
<adrien> so you can't go unbounded
<qdl> adrien: OK.
<NaCl> # sprintf "%.50f" (1. /. 3.) ;;
<NaCl> - : string = "0.33333333333333331482961625624739099293947219848633"
<hcarty> adrien: True... 50 places is not enough if you have 1e-200
<adrien> NaCl: yeah, _that_ too ;-)
<adrien> hcarty: exactly
<hcarty> Which is part of why that notation is so handy :-)
* NaCl likes printf
<adrien> and also 1/2 which is finite in decimal but maybe not in binary (and you can find other examples for the other way round)
<NaCl> 0.1
<thelema> adrien: 1/5
betta_y_omega has joined #ocaml
<adrien> :-)
<thelema> adrien: also, any finite binary decimal has a finite base-10 decimal
<thelema> (because 2 divides 10)
<NaCl> they have a common divisor
<adrien> thelema: yeah, makes sense ;-)
* adrien goes back to swearing at seamonkey for being an unreliable piece of crap
milosn has joined #ocaml
betta_y_omega has quit [Excess Flood]
betta_y_omega has joined #ocaml
betta_y_omega has quit [Read error: Operation timed out]
betta_y_omega has joined #ocaml
betta_y_omega has quit [Ping timeout: 240 seconds]
betta_y_omega has joined #ocaml
Boscop has quit [Quit: OutOfTimeException: Allocation of TimeFrame failed due to lack of time. Free up time by cancelling unimportant events.]
lopex has joined #ocaml
mwm1 has joined #ocaml
bobry has quit [Quit: Leaving.]
bobry has joined #ocaml
jonkri has joined #ocaml
jonkri has left #ocaml []
avsm has joined #ocaml
ikaros has joined #ocaml
The_third_man has joined #ocaml
iratsu has quit [Ping timeout: 260 seconds]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
iratsu has joined #ocaml
seafood has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
ulfdoz has joined #ocaml
edwin has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 258 seconds]
Snark has quit [Quit: Quitte]
Morphous has joined #ocaml
Morphous has quit [Changing host]
Morphous has joined #ocaml
jamii has joined #ocaml
avsm has quit [Quit: Leaving.]
ztfw has joined #ocaml
thomasga1 has joined #ocaml
thomasga1 has quit [Client Quit]
thomasga has quit [Read error: No route to host]
seafood has quit [Ping timeout: 260 seconds]
ikaros has quit [Quit: Ex-Chat]
bitbckt has quit [Ping timeout: 255 seconds]
khia0 has joined #ocaml
khia0 has left #ocaml []
jamii has quit [Ping timeout: 252 seconds]
bitbckt has joined #ocaml
darkf has joined #ocaml
qdl_ has joined #ocaml
yroeht has quit [Read error: Operation timed out]
yroeht has joined #ocaml
qdl has quit [Ping timeout: 252 seconds]
qdl_ is now known as qdl