gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Batteries 1.2.0 released http://batteries.forge.ocamlcore.org
travisbrady has joined #ocaml
Associat0r has quit [Quit: Associat0r]
thrasibule has joined #ocaml
sshc_ has joined #ocaml
sshc has quit [Ping timeout: 265 seconds]
sshc has joined #ocaml
sshc_ has quit [Ping timeout: 240 seconds]
metasyntax has quit [Quit: Be seeing you.]
jeddhaberstro has quit [Quit: jeddhaberstro]
travisbrady has quit [Ping timeout: 258 seconds]
travisbrady has joined #ocaml
travisbrady has quit [Ping timeout: 240 seconds]
Edward__ has quit []
travisbrady has joined #ocaml
caligula_ has joined #ocaml
caligula__ has quit [Ping timeout: 260 seconds]
travisbrady has quit [Ping timeout: 258 seconds]
thrasibule has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
Shoggoth has joined #ocaml
rixed has joined #ocaml
Yoric has joined #ocaml
Amorphous has quit [Ping timeout: 248 seconds]
valross has quit [Quit: Ex-Chat]
Associat0r has joined #ocaml
Amorphous has joined #ocaml
Submarine has joined #ocaml
hcarty has quit [Ping timeout: 264 seconds]
spearalot has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 252 seconds]
hcarty has joined #ocaml
Associat0r has quit [Quit: Associat0r]
ttamttam has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
hcarty has joined #ocaml
Yoric has quit [Quit: Yoric]
Tianon has quit [Read error: Operation timed out]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
f[x] has joined #ocaml
ygrek has joined #ocaml
Submarine has quit [Ping timeout: 265 seconds]
kaustuv has joined #ocaml
Tianon has quit [Ping timeout: 248 seconds]
barismetin has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
Tianon has quit [Read error: Operation timed out]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
Yoric has joined #ocaml
derdon has joined #ocaml
_unK has joined #ocaml
Edward_ has joined #ocaml
derdon has quit [Ping timeout: 240 seconds]
Edward_ has quit [Ping timeout: 260 seconds]
Edward_ has joined #ocaml
ikaros has joined #ocaml
Associat0r has joined #ocaml
ygrek has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
_unK has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
rossberg has quit [Remote host closed the connection]
rossberg has joined #ocaml
<robthebob> thelema, is it your intention to reintroduce the older syntax extensions into batteries?
_andre has joined #ocaml
<kaustuv> ISTR batteries (AAA) was adopting a just-say-no-to-camlp4 policy
<kaustuv> Or perhaps they are optional. I don't know what I'm talking about, as usual.
<robthebob> they include the list comprehension and string extensions
<robthebob> which it would be a shame to lost
<robthebob> *lose
rjsimmon has joined #ocaml
barismetin has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
derdon has joined #ocaml
barismetin has joined #ocaml
_unK has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
oriba has joined #ocaml
metasyntax` is now known as metasyntax
thrasibule has joined #ocaml
Yoric_ has joined #ocaml
Yoric_ has quit [Client Quit]
boscop has joined #ocaml
Yoric has quit [Ping timeout: 258 seconds]
ikaros has joined #ocaml
thrasibule has quit [Ping timeout: 265 seconds]
<kaustuv> Why on earth did the new version of tuareg-mode stop using font-lock-*-face and make a bunch of tuareg-font-lock-*-face?
Shoggoth has quit [Remote host closed the connection]
ikaros has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
<kaustuv> It is too bad that this does not work: http://ocaml.pastebin.com/hSaGFt5k
fraggle_laptop has joined #ocaml
prince has quit [Ping timeout: 258 seconds]
Submarine has joined #ocaml
prince has joined #ocaml
kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<thelema> robthebob: is there a string extension you really want?
<thelema> s/string/camlp4/
bzzbzz has quit [Quit: leaving]
ccasin has joined #ocaml
bzzbzz has joined #ocaml
Edward__ has joined #ocaml
Edward_ has quit [Ping timeout: 265 seconds]
<robthebob> thelema, i was interested in a few different extensions: pa_where (as opposed to 'let'), pa_batteries (auto-open Batteries), and mikmatch
<robthebob> they aren't something that i think has to be in batteries (apart from pa_batteries), but i noticed they are still mentioned in the documentation so was wondering what the plan was for them
<thelema> I'm against pa_batteries - hiding that you're using batteries through non-standard build-time action is no good.
<thelema> pa_where seems mostly superceded by the new 3.12 first class modules
<thelema> err, the old batteries open...
<thelema> pa_where seems a bow to haskell syntax. I don't find it useful - the case might be made, as it's quite obvious what's going on from just the syntax
<thelema> and mikmatch exists externally - I don't see the benefit of integrating it vs. the cost of maintaining it
<thelema> the main reason I worry about camlp4 is composability issues
joewilliams_away is now known as joewilliams
rjsimmon has quit [Quit: Leaving.]
Yoric has joined #ocaml
spearalot has quit [Quit: -arividerchi]
<robthebob> yeah i see what you mean
<robthebob> pa_where is indeed a bow to haskell syntax, i think it is clearer in this instance
<thelema> (not that pa_comprehension doesn't have composability issues)
<robthebob> are there any particular clashes that you are aware of, or is it a stance of general caution?
<thelema> Many instances of pa_where being clearer are helped by named parameters
<thelema> general caution.
<robthebob> is the concern that applying extensions in different orders could have different behaviour or even not work at all?
<thelema> more or less, yes
<thelema> I also really dislike how camlp4 is a compile time action that has no mandatory "comment" in the source code that it's needed
<thelema> I would be much happier if there were pragmas at the top of a source file indicating what pre-processors needed to be run and in what order
<thelema> as opposed to hidden in a makefile
<robthebob> yes, that's a valid point, similar to how GHC handles it
<robthebob> well, you can enable language extensions either way with GHC
<thelema> I didn't know that.
<robthebob> mm, well it doesnt really affect batteries, but for generalised algebraic datatypes for example you can have the cmd line switch -XGADTS or include {-#LANGUAGE GADTs #-} in your source file
<thelema> I approve. I also kinda wish that such a feature could be implemented in camlp4, but I suspect it can't
ttamttam has quit [Quit: Leaving.]
<robthebob> i can't think how. the only thing I can see right now is to introduce some syntax error that is removed only by the extension required
<robthebob> which is no feature at all
rjsimmon has joined #ocaml
<thelema> yup, a poor circumstance
<palomer> what does ocamlc -I +camlp4 mean?
<palomer> I always thought -I took a directory name
<thelema> it does - the + means prepend the ocaml std install dir
<thelema> so +camlp4 = /usr/lib/ocaml/camlp4 (or /usr/local, depending on install)
<palomer> ahhhhh
<murphe> So i've been learning OCaml for a week or two now. Other than class (which is good), the internet has kiiinda failed me on useful intro-to-ocaml-and-functional-programming material. Do you guys have any reccomendations?
<thelema> the ocaml reference manual part 1 taught me most things
<thelema> but ocaml-tutorial.org might be better now
<thelema> worst case, there's links to other resources
<murphe> mmkay
<murphe> i've been using ocaml-tutorial as reference, but perhaps i should just sit down and work through it instead :)
fabjan has quit [Ping timeout: 260 seconds]
Submarine has quit [Quit: Leaving]
mbishop_ has joined #ocaml
mbishop has quit [Ping timeout: 245 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
mbishop__ has joined #ocaml
mbishop_ has quit [Ping timeout: 258 seconds]
fabjan has joined #ocaml
oriba has quit [Quit: Verlassend]
ikaros has joined #ocaml
kaustuv has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
kaustuv has quit [Ping timeout: 265 seconds]
travisbrady has joined #ocaml
<palomer> camlp4o -I `ocamlfind query type-conv` pa_type_conv.cmo pa_tui.cmo test_pa.ml <--this outputs what I expect
<palomer> but if I try and redirect the output to a file, I get giberrish
ulfdoz has quit [Ping timeout: 240 seconds]
<adrien> which kind of giberrish?
jonafan_ is now known as jonafan
<palomer> Caml1999M012„•¦¾
<adrien> palomer: use -o in your call to camlp4o
<palomer> etc...
<palomer> ok, it works
ulfdoz has joined #ocaml
<palomer> but why did redirecting cause the giberish?
mbishop_ has joined #ocaml
<adrien> no idea =)
<mfp> palomer: camlp4o detects if stdout is a tty and will output the serialized form if not
<mfp> palomer: this way, the code is not parsed twice when you use ocamlc/ocamlopt with -pp camlp4o
mbishop__ has quit [Ping timeout: 265 seconds]
<palomer> ahh
<palomer> I didn't know you could detect such a thing
<mfp> palomer: isatty(3) available as Unix.isatty
Yoric has quit [Quit: Yoric]
<adrien> used by most "polite" programs not to output binary data to terminals (gzip and xz for instance)
ikaros has quit [Quit: Leave the magic to Houdini]
<flux> pretty nifty trick (reading ocaml ml a bit late..): type 'annot tree = | Leaf of 'leaf_annot * string | Node of 'node_annot * 'annot tree list constraint 'annot = < leaf : 'leaf_annot; node : 'node_annot >
<flux> would it allow a nicer way of extending the type 'a in the future?
<palomer> where's this from?
ikaros has joined #ocaml
<robthebob> does anybody here use Kaputt?
<robthebob> i'm trying to get started with it using the example given in kaputt.pdf:
<robthebob> # check Gen.int succ [Spec.is_odd_int ==> Spec.is_even_int];;
Edward__ has quit [Ping timeout: 272 seconds]
<robthebob> but i get: Exception: Invalid_argument "Random.int".
<robthebob> this does not occur if I use Gen.char:
<robthebob> # check Gen.char (fun _ -> 'e') [Spec.always ==> Spec.always];;
<robthebob> Test 'untitled no 2' ... 100/100 cases passed
<robthebob> - : unit = ()
<mfp> flux: yes, the first thing I tried was constraint 'annot = < leaf : 'leaf_annot; node : 'node_annot; .. > and it did work, but I can't see where/how the row variable would be useful
<mfp> robthebob: are you on x86-64? maybe it's doing Random.int max_int
<mfp> (Random.int n will fail if n > 0x3FFFFFF)
<robthebob> i am on 64 bit yes.
<robthebob> ok i'll try Gen.int32
barismetin has quit [Quit: Leaving...]
<robthebob> mfp, good call
<robthebob> pretty big bug that one
<robthebob> # check (Gen.make_int 0 1047483646) succ [Spec.is_odd_int ==> Spec.is_even_int];;
<robthebob> Test 'untitled no 9' ... 100/100 cases passed
<robthebob> - : unit = ()
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
mbishop__ has joined #ocaml
mbishop_ has quit [Ping timeout: 265 seconds]
<flux> palomer, caml mailing list, bluestorm
<flux> mfp, I was simply thinking having an interface that says < leaf : 'bar > at one time and < leaf : 'bar; node : 'baz > the next
<flux> mfp, and it wouldn't break the existing, dependant, code if it has used the .. in type definitions?
<mfp> well, 'baz is bound in the type def so you cannot do w/o it
<mfp> the only use I can see of the row variable is to reuse the 'a in 'a tree in other contexts that share some type parameters and maybe introduce some others
avsm has quit [Ping timeout: 260 seconds]
ttamttam has joined #ocaml
Submarine has joined #ocaml
avsm has joined #ocaml
<avsm> in case anyone's interested, bindings to the LWIP TCP/IP stack are working ok now: http://github.com/avsm/ocaml-lwip
Yoric has joined #ocaml
<mfp> avsm: I read lwIP is a light-weight TCP/IP stack... in which contexts would it make sense to use it from a relatively memory-intensive environment like OCaml's runtime?
<avsm> we're building a Xen OS using it; it's not generally useful
<avsm> compile up OCaml apps into tiny runtime kernels, with no other dependencies
<avsm> got a full OCaml TCP/IP stuck under development using an LLVM parsing backend, but LWIP is an excellent shim until that's finished
<mfp> ic, thanks
<avsm> btw, excellent timing with your message queuing implementation; I was just wondering what a good benchmark would be :)
<mfp> heh
avsm has quit [Quit: Leaving.]
ygrek has joined #ocaml
<palomer> | Prompt of string -> (t * string option) list <--why would ocaml have problems parsing this?
jeddhaberstro has joined #ocaml
<mfp> palomer: what's that, pattern matching or a type declaration?
<mfp> Foo of x belongs to the latter, Foo x -> y to the formmer
<mfp> and you're doing both :)
<mfp> ignore me, misread
<palomer> type declaration
<mfp> what about Prompt of (string -> (t * string option) list) ?
<palomer> it works
<palomer> but I'm wondering why ocaml is having problems parsing the other one
ygrek has quit [Ping timeout: 245 seconds]
mehdid has quit [Quit: leaving]
mehdid has joined #ocaml
mehdid has left #ocaml []
rjsimmon has quit [Quit: Leaving.]
middayc has joined #ocaml
middayc has quit [Client Quit]
ttamttam has quit [Quit: Leaving.]
gildor has quit [Quit: leaving]
oriba has joined #ocaml
oriba has quit [Client Quit]
gildor has joined #ocaml
_andre has quit [Quit: Lost terminal]
<travisbrady> mfp: ocamlmq looks cool, just curious, do you have performance benchmarks anywhere?
rjsimmon has joined #ocaml
ccasin has quit [Quit: Leaving]
rjsimmon has quit [Quit: Leaving.]
rjsimmon has joined #ocaml
Submarine has quit [Quit: Leaving]
murph has quit [Read error: Operation timed out]
pad has joined #ocaml
rjsimmon has quit [Quit: Leaving.]
mbishop_ has joined #ocaml
eelte has quit [Quit: 0x2a]
ulfdoz has quit [Ping timeout: 265 seconds]
mbishop__ has quit [Ping timeout: 265 seconds]
<palomer> ocamlfind ocamlc -verbose -package curses test.ml -o test.cmo
<palomer> Reference to undefined global `Curses'
<palomer> anyone got a clue?
<derdon> palomer: why don't you use C for curses stuff?
<palomer> because I don't need to?
<palomer> :P
<derdon> appearently, you do
<palomer> I can build it with omake
<palomer> fine, ill see what omake is doing...
mbishop__ has joined #ocaml
<mfp> travisbrady: I've indeed bm'ed and compared it to ActiveMQ and RabbitMQ a few times, but didn't have it all written down neatly and didn't want to delay the release
<palomer> I think i need the -linkpkg flag
<palomer> yeah, that's it
mbishop_ has quit [Ping timeout: 265 seconds]
<travisbrady> mfp: cool, what's the memory profile like versus others? Is there an easy way to figure memory requirements given an expected number of items?
<mfp> travisbrady: some ballpark figures: on my 3GHz AMD64 box, ocamlmq delivers ~15000 to 20000 topic messages, and can save up to a few thousand persistent messages / second (accepts ~50K/s message bursts in async mode)
<mfp> memory usage relative to which ops?
<mfp> in general, it uses much less memory than ActiveMQ or RabbitMQ
<mfp> mem usage is independent of the num of queues (because it never keeps the list of queues in mem)
derdon has quit [Ping timeout: 248 seconds]
<mfp> it grows with the number of subscriptions (around ~150 bytes / subscription); it takes less than 10s IIRC for 1 client to subscribe to 1 million queues and that will take around ~160 MB or so
<mfp> also, mem usage is essentially flat vs. number of messages in the queue(s)
valross has joined #ocaml
Yoric has quit [Quit: Yoric]
<mfp> travisbrady: this is what I'm using to bm the STOMP brokers -> http://github.com/mfp/ocaml-stomp (test_receive and test_send)
<mfp> it allows to bm concurrent send / (subscribe) receive ops to/from lots of queues/topics
rjsimmon has joined #ocaml
ikaros_ has joined #ocaml
boscop_ has joined #ocaml
ikaros has quit [Read error: Operation timed out]
boscop has quit [Ping timeout: 265 seconds]
nejimban has quit [Ping timeout: 260 seconds]
nejimban has joined #ocaml
BigJ has joined #ocaml
thrasibule has joined #ocaml
_unK has quit [Read error: Connection reset by peer]
ikaros_ has quit [Quit: Leave the magic to Houdini]
mbishop_ has joined #ocaml
mbishop__ has quit [Ping timeout: 265 seconds]
M| has joined #ocaml
<mbishop_> ...
<mbishop_> could someone fix the ban on unregistered nicknames here?
mbishop_ is now known as mbishop
rjsimmon has quit [Quit: Leaving.]
M| has left #ocaml []
elehack has joined #ocaml