adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
jamii has quit [Ping timeout: 260 seconds]
ontologiae has quit [Quit: Lost terminal]
mye_ has joined #ocaml
mye has quit [Ping timeout: 245 seconds]
mye_ is now known as mye
milosn has quit [Ping timeout: 276 seconds]
emmanuelux has quit [Remote host closed the connection]
milosn has joined #ocaml
xavierm02 has quit [Quit: Leaving]
suyu has quit [Quit: suyu]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
oriba has quit [Quit: oriba]
Oejet has quit [Quit: Leaving.]
watermind has joined #ocaml
semperos has joined #ocaml
q66 has quit [Quit: Quit]
myx has quit [Ping timeout: 260 seconds]
lolcathost has joined #ocaml
suyu has joined #ocaml
lolcathost has quit [Client Quit]
Automorphism has joined #ocaml
Automorphism has quit [Client Quit]
lolcathost has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
everyonemines has joined #ocaml
lolcathost has quit [Ping timeout: 260 seconds]
everyonemines has quit [Quit: Leaving.]
everyonemines has joined #ocaml
lolcathost has joined #ocaml
lolcathost has quit [Ping timeout: 265 seconds]
weie has joined #ocaml
lolcathost has joined #ocaml
everyonemines has quit [Quit: Leaving.]
ivan\ has quit [Ping timeout: 255 seconds]
gour has joined #ocaml
ivan\ has joined #ocaml
milosn has quit [Ping timeout: 265 seconds]
Yoric has joined #ocaml
djcoin has joined #ocaml
mika1 has joined #ocaml
lolcathost has quit [Ping timeout: 240 seconds]
lolcathost has joined #ocaml
lolcathost has quit [Client Quit]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
lolcathost has joined #ocaml
maufred has joined #ocaml
orbitz has quit [Quit: Reconnecting]
orbitz has joined #ocaml
Snark_ has joined #ocaml
milosn has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
Snark_ is now known as Snark
milosn has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
<fasta> Is it easy to convert bytecode into ocaml again? What are the run-time dependencies of e.g. a main.byte file if any?
ocp has joined #ocaml
<flux> I don't think there is an existing tool for doing such a conversion
<flux> main.byte depends on /usr/bin/ocamlrun if it has not been compiled with an embedded bytecode interpreter
<flux> so ldd /usr/bin/ocamlrun probably tells the library dependencies of a program
<flux> not sure how one can tell the dependency on system libraries that are needed by ocaml libraries.. (ie. some c-binding libraries)
<flux> fasta, one very big piece you lose in compiling programs is type information
<fasta> flux: the goal would basically be to execute code written on one system on another system.
<flux> bytecode binaries can do that to some extent
<flux> but they often have some paths embedded inside them, which makes that difficult
<fasta> flux: I would like to have it by full extent.
<flux> and it won't work across 32/64-bit platforms, possibly not over different endianess either
_andre has joined #ocaml
_andre has quit [Client Quit]
<fasta> flux: I wouldn't mind specifying the target architecture, etc.
<flux> fasta, so you want to do cross-compiling?
<fasta> flux: if I have to, yes.
_andre has joined #ocaml
_andre has quit [Client Quit]
<flux> I don't quite know how difficult that would be. it's probably easier with bytecode, but wouldn't native code (if supported by your target) be nicer..
<fasta> flux: code speed is of little interest in this case.
<adrien_oww> well, there are bytecode to javascript "compilers"
<adrien_oww> I don't know how the generated code looks like however
<fasta> adrien: and these also support files?
<adrien_oww> but I'm not aware of such a project to translate back to ocaml
<adrien_oww> fasta: files?
<fasta> adrien: reading and writing.
<fasta> adrien: directory operations, etc.
<companion_cube> like, js_of_ocaml?
<adrien_oww> fasta: well, -custom is deprecated
<adrien_oww> fasta: ah, dunno; why not?
<adrien_oww> fasta: but why do you want to do that?
<fasta> adrien: do what?
<adrien_oww> you can "/path/to/ocamlrun foo.byte" to run with a different interpreter
<flux> if fasta wants to compile a program to run on another computer, I think doing if the javascript way would be an awfully longwinded way of achieving it
<adrien_oww> heh, yeah; I meant that if it can output js, it's possible to output ocaml too ;-)
<adrien_oww> but if it's bytecode, it's portable
<adrien_oww> so, only need to invoke "ocamlrun foo.byte"
<fasta> So, if ocamlrun is 5 years old, it will work with the ocamlrun from 2 months old?
<fasta> 2 months ago*
<adrien_oww> well
<adrien_oww> no idea :P
<adrien_oww> I think it probably will although I'm not sure
<adrien_oww> but it's definitely worth a try
<adrien_oww> if it works, tell us
<companion_cube> since OCaml erases types, I suppose you don't need the interpreter to know about GADT to run ocaml4.0 bytecode?
<companion_cube> I think the problem is libraries and evolving APIs
<adrien_oww> I don't think ocamlrun bothers about that
RagingDave has joined #ocaml
_andre has joined #ocaml
<fasta> It gets me: Fatal error: unknown C primitive `caml_array_blit'
<fasta> This is moving something from Ubuntu to Debian 6.
<companion_cube> maybe the Array.blit has been moved from pure OCaml to C in a release
mcclurmc has quit [Quit: Leaving.]
_andre has quit [Client Quit]
<fasta> Aren't there any 'deployment tools' somewhere?
_andre has joined #ocaml
<fasta> That is, I would plugin a server where ssh is running and it compiles for the arch and os of that server without bothering me about it?
_andre has quit [Quit: leaving]
_andre has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 244 seconds]
Kakadu has joined #ocaml
myx has joined #ocaml
Snark has quit [Quit: Quitte]
Cyanure has joined #ocaml
<fasta> How can I change the build dir for _oasis? Currently it puts files in the same dir as the_oasis file and some build_dir directory, but how can I change both of those?
sgnb has joined #ocaml
thomasga has joined #ocaml
jamii has joined #ocaml
myx has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
myx has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 252 seconds]
xavierm02 has joined #ocaml
wmeyer` has joined #ocaml
wmeyer` has quit [Client Quit]
wmeyer has quit [Ping timeout: 260 seconds]
smerz has quit [Ping timeout: 276 seconds]
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
rixed has quit [Quit: "rebooting"]
mcclurmc has joined #ocaml
jamii has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 244 seconds]
mcclurmc has joined #ocaml
jbrown has joined #ocaml
jbrown has quit [Ping timeout: 244 seconds]
semperos has quit [Ping timeout: 245 seconds]
<companion_cube> is the regular hashtable faster than a weak hashtable?
jbrown has joined #ocaml
<adrien_o1w> I'd bet on "yes"
<adrien_o1w> but not by a big factor
<adrien_o1w> but why?
<adrien_o1w> faster in which case?
<companion_cube> to retrieve an element that is already present
<orbitz> companion_cube: is a regular hash table too slow for you?
<gour> OPAM as package manager does not attempt to do some of the work meant for OASIS?
<orbitz> gour: there is some overlap I belive. GODI too. But oapm is the only one that Just Works (for me)
<gour> orbitz: but it does not make oasis obsolete?
mika1 has quit [Quit: Leaving.]
<orbitz> gour: oasis has a build infrastructure too which is still useful
<pippijn> companion_cube: are you having performance problems with the hash table?
<companion_cube> orbitz: I don't think so
<companion_cube> I'm not sure it's the real bottleneck, but it's quite likely
<companion_cube> never mind, I have other bottlenecks to remove first :)
<orbitz> companion_cube: profiling ocaml programs is fairly straight forward
<companion_cube> I disagree, the gprof compiler is not very helpful
<orbitz> gprof isn't a compiler
adrien_o1w is now known as adrien_oww
ulfdoz_ has joined #ocaml
suyu has quit [Quit: suyu]
milosn has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Ping timeout: 244 seconds]
ulfdoz_ is now known as ulfdoz
<companion_cube> err, profiler
<companion_cube> -_-
<orbitz> companion_cube: Hrm I havne't had issues with it
<companion_cube> well, it's hard to read, closures have opaque names, and often I get "cycle 42 as a whole"
milosn has joined #ocaml
tac has joined #ocaml
<gour> orbitz: does opam can replace oasis (for you)?
tac has left #ocaml []
<thelema> gour: no, opam packages need a build system, and oasis is one option to provide that
<thelema> opam does replace oasis-db to some extent
<thelema> as it has its own repo structure
<gour> ok, so we can continue focusing on learning oasis as the ocaml build system
philed has joined #ocaml
<thelema> well, oasis can construct a build system for you, its default currently is to create an ocamlbuild-based build system.
<orbitz> if by 'we' you mean 'you', then yes:)
tane has joined #ocaml
<fasta> I got _oasis to the point where I can just write an OCaml file and not have to know anything about _oasis anymore to get something to build; I even don't have to know anything about packages :)
<fasta> (and yes, this will likely break down when multiple packages provide the exact same module)
<fasta> That said, it definitely makes it much more practical to use OCaml.
<adrien_oww> if multiple packages provide the same module, the only sane solution is to spank the authors
<fasta> I also have a build command which automatically corrects all kinds of common problems.
<gour> orbitz: /me nods
<fasta> I really like that approach to fix problems; parse compiler output, do the obvious fix, and try again.
<fasta> (The obvious fix is done by the computer, not me)
<orbitz> which errors do you fix automatically?
<thelema> the best solution to module name conflicts is namespacing, so each person can have their own string module
<fasta> orbitz: let's say I forgot to do oasis setup
<fasta> orbitz: there are a few other things.
<orbitz> oh, you fix oasis issues or actual code issues?
<fasta> orbitz: if I didn't specify some packages, I also include those automatically in the build configuration.
<fasta> orbitz: I don't modify the code, but I might extend it to that.
<fasta> orbitz: e.g. for some things like "foa is undefined" in ths case foo exists.
<fasta> It's nothing high-tech, which is certainly also possible, but I don't need that.
<thelema> fasta: contribute it to oasis?
mye has quit [Quit: mye]
shp has joined #ocaml
mye has joined #ocaml
<shp> hi, i'm looking for a good tutorial to learn how to use camlimages library
<shp> "Error: Unbound module Images" when i do "ocaml thefile.ml"
milosn has quit [Remote host closed the connection]
<thelema> shp: try 'ocamlfind ocamlc -package camlimages thefile.ml -o thefile'
<adrien_oww> for ocamlc, not ocaml ;-)
<thelema> adrien_oww: I'm assuming that was a typo
<thelema> if not, ocamlfind is still the easiest way to make this work
<adrien_oww> add -verbose and copy-paste :P
<shp> same error thelema
<thelema> shp: I probably got the package name wrong. try `ocamlfind list | grep image`
<shp> camlimages (version: 4.0.0)
<thelema> okay, so the package name isn't wrong.
<adrien_oww> add -verbose; what does it say?
<thelema> when you add -verbose, it should print the ocamlc command it uses
mcclurmc has left #ocaml []
<shp> thelema, adrien_oww: http://pastebin.com/70CvPSQZ
<thelema> it looks like it should be working; did anything go weird on install of camlimages?
shp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | nohttp://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<shp> no
<shp> there's no doc on camlimages on the web :/
<shp> I was expecting big user-friendly tutorials :(
liuw has joined #ocaml
<philed> You need to drop that expectation until I've managed to document these libraries myself. :)
<shp> ^^
<philed> Not that I know anything about camlimages, but if I ever do become expert, I hope I will write the doc.
<shp> in fact, i just want to import a picture and make a matrix of the pixels
<shp> not possible with graphics ?
<shp> (I don't want to fiddle around with pictures formats)
<shp> Is this possible simply with the build-in library "graphics" ?
<philed> Are not really done that. I think it might be quicker for you to use a C library like graphics magick or devil and talk to that from ocaml.
leoncamel has quit [Ping timeout: 265 seconds]
<thelema> shp: try -package camlimages.all_formats
<thelema> and -linkpkg
<thelema> thelema@thelema-laptop:~/ocamlbrew/ocaml-4.00.0/build/odb/install-v4.0.1.tar.gz/camlspotter-camlimages-c803efa9d5d3/examples/converter-external$ ocamlfind ocamlc -package camlimages.all_formats converter.ml -linkpkg -o conv
<thelema> this works for me
<shp> yeah me too, thank you thelema !
<thelema> odd; camlimages meta file is weird. I shall poke them with a request to have camlimages = camlimages.all_formats
<xavierm02> I have a bug which I solved but don't know why
<xavierm02> let binop_ (o:binary_boolean_operator) (l:(_, _) boolean_expression) (r:(_, _) boolean_expression) = BinOp (l, o, r);;
<xavierm02> let and_ (l:(_, _) boolean_expression) (r:(_, _) boolean_expression) = binop_ And l r;;
<xavierm02> this works
<xavierm02> let binop_ (o:binary_boolean_operator) (l:(_, _) boolean_expression) (r:(_, _) boolean_expression) = BinOp (l, o, r);;
<xavierm02> let and_ = binop_ And;;
<xavierm02> this doesn't
<xavierm02> how is it it doesn't automatically understand the arguments of and_ will have to the the same as the ones of binop_?
<xavierm02> let binop_ (o:binary_boolean_operator) (l:(_, _) boolean_expression) (r:(_, _) boolean_expression) = BinOp (l, o, r);;
<xavierm02> let and_ l r = binop_ And l r;;
<xavierm02> this works too
<xavierm02> so it's not the types
<xavierm02> it says my expression "contains type variables that cannot be generalized"
<xavierm02> if I don't explicitely name the variables
<flux> xavierm02, you're compiling a single .ml-file I imagine, which has the code you want to run
<flux> xavierm02, if you add an empty .mli-file and compile it, it will work from then on
<xavierm02> I don't get it
<xavierm02> ah
<xavierm02> O_O
<flux> the thing is that if you have 'a type in the public interface in a way that may not be safe
<flux> let's say I had foo.ml: let a = ref [] which would be val a : list ref
<xavierm02> ah
<xavierm02> doesn't work with empty /mli
<flux> doesn't? how do you do it?
<xavierm02> i tried
<xavierm02> using ocamlbuild though
<xavierm02> maybe it ignores it because it's empty
<flux> now that would be very strange
<flux> but I have a sequence that demonstrates the issue and the solution: http://ocaml.nopaste.dk/p16786
<flux> (cat >foo.mli better replaced with touch foo.mli)
<xavierm02> hm
<xavierm02> ok
<xavierm02> I'll just add a todo
<xavierm02> and see if it works later with the main mli file
<flux> well, there's another way, a workaround, if ocamlbuild doesn't work for some reason
<xavierm02> because atm, I have so many things broken that I can't compile the whole thing with the interface etc.
milosn has joined #ocaml
<flux> module A : sig end = struct ..enter code here.. end
<flux> as you can imagine, it exercises the same principle
<xavierm02> i compiled the interface myself
<xavierm02> and ocamlbuild says my dir isnt sane anymore T.T
<xavierm02> I'll just leave it with the arguments for now
djcoin has quit [Quit: WeeChat 0.3.9.2]
<shp> I get this error: "Reference to undefined global `Graphics' " . If I do "open Graphics;;" at the beginning of the file, i get an error too
<shp> camlfind list | grep graphics => graphics is installed
<thelema> shp: -package graphics
ocp has quit [Ping timeout: 260 seconds]
<shp> ty thelema
<shp> i have a question: to know the contents of my variables in ocaml, do I always have to put my code in the "ocaml" interpreter ? because if i compile it's boring to always do "print_int, print_string ..."
<shp> when i used camllight, i did "camllight < mycode.ml" and all was interpreted and i knew all variables contents whenever they were defined
<orbitz> shp: you can use a debugger
ontologiae has quit [Ping timeout: 264 seconds]
Cyanure has quit [Remote host closed the connection]
<shp> there is no documentation for camlimage ? i don't find it
<shp> orbitz: why not but a little complicate for the use i will do, but nevermind i dropped the idea
<thelema> shp: I recommend reading the src/.mli files in the ocamlimages dir
lolcathost has quit [Quit: brb]
lolcathost has joined #ocaml
<shp> thelema: it's what i was looking for ty
smondet has joined #ocaml
RagingDave has quit [Ping timeout: 252 seconds]
RagingDave has joined #ocaml
<xavierm02> I have this in a file
<xavierm02> type binary_boolean_operator = And | Or;;
<xavierm02> name Type.ml
<xavierm02> and this in another file
<xavierm02> type binary_boolean_operator = Type.binary_boolean_operator;;
<xavierm02> in the second file, how can I export the type though a .mli so that the constructors And and Or are accessible
<xavierm02> I tryed putting
<xavierm02> type binary_boolean_operator = Type.binary_boolean_operator;;
<xavierm02> in the .mli but then the constructors are hidden
<xavierm02> type binary_boolean_operator = And | Or;;
<xavierm02> in the mli
<xavierm02> tells me the interface doesn't correspond to the declarations
<xavierm02> ..
<orbitz> why you doing this aliasing?
Kakadu has quit [Read error: No route to host]
Kakadu has joined #ocaml
<thelema> xavierm02: type bbo = Type.bbo = And | Or;;
<xavierm02> thelema: thx
emmanuelux has joined #ocaml
<xavierm02> orbitz: I'm doing this because I have many files and one file that imports all the others and reexposes whatever should be exposed and hiding the rest
<xavierm02> I don't have one .mli per file
<orbitz> xavierm02: That doesn't sound like a good idea. But your best option is prbably to just do 'open Type'
<xavierm02> i did that
<xavierm02> but
<orbitz> then you should be good to go
<xavierm02> I have 3 files
<thelema> orbitz: 'open' doesn't re-export
<xavierm02> thing.ml
<thelema> xavierm02: maybe you want 'include Type'
<orbitz> hrm even in a mli file?
<orbitz> shame
<xavierm02> module.ml
<xavierm02> and submodule.ml
<xavierm02> uh
<xavierm02> didn't know this thing existed
<orbitz> it's pretty sweet
<xavierm02> T.T
<xavierm02> I was reexportng everything
<xavierm02> when I just needed to use include instead of open
<xavierm02> >_<
<thelema> xavierm02: now you know.
<xavierm02> yep, ty :)
<orbitz> And knowing is half the battle! http://www.youtube.com/watch?v=N4OPr_QxoFg
_andre has quit [Quit: leaving]
<flux> meh, I have a program that is very slow, and 45.51% of its time is in mark_slice while 30.38% is in sweep_slice
<thelema> flux: how big is your minor heap?
<flux> but on the other hand I have 3.12.1 so maybe I'm able to up those gc limits myself and get at least some performance back
<flux> thelema, it's the default
<orbitz> is the progarm just generating tons of junk?
<flux> yes
<orbitz> that'll do it
<thelema> flux: increase the minor heap size
<flux> strange, OCAMLRUNPARAM=s=256k and I get (almost) identical results
<adrien> 256k isn't a lot :P
Kakadu has quit [Read error: Connection reset by peer]
<flux> 1024k now, very small effect
<pippijn> flux: try 8M
<adrien> only like 1MB or 2MB
Kakadu has joined #ocaml
<adrien> flux: heh, then create less junk :D
<adrien> (no need to thank me for this excellent piece of advice)
<flux> now 10240k helps a bit
<flux> 34%+33%
<flux> from 42%+31% to 33%+34%
<thelema> how big is the garbage you're creating?
<flux> well, I'm not sure. I'm reading strings from a file, splitting them with pcre and then putting the strings and some values to maps and sets
<flux> I guess if I needed to guess, it's the manipulation of the trees that's creating the most garbage
<flux> do I need to result to using.. hashtables?!
<flux> s/result/resort/
<flux> I have only about 300000 elements I run through the Pcre splitting, should take next to no time
<adrien> no weird regexp?
<flux> Pcre.extract ~full_match:false ~pat:"^([0-9]+)\\s*(.*)$" line
<flux> basically, the output of du
<flux> but maybe I'm onto something there..
<adrien> String.index + String.sub ?
<flux> I thought regexp compilation doesn't take a lot of time
<flux> adrien, sure, but I don't want to be THAT much worse than perl :P
<adrien> when reading lines, do you reuse the same buffer?
<orbitz> how much du output are you parsing? :)
<adrien> heh, it's simple; only two lines
<flux> I'm getting my lines from an enumeration
<adrien> if it's the output from du, why not use cut too?
<thelema> flux: definitely pre-compile your regexp and don't throw away the compiled version
<flux> because all those are based on knowledge I must infer from the data, instead of just saying "I want to parse this data that is an integer, followed by a whitespace, followed by a string"
<flux> now that sped up it significantly indeed
<flux> I had no idea it was THAT slow
<flux> perl hides it for you ;-)
<thelema> perl has super-optimized the process
<flux> no longer is GC the topmost cpu consumer \o/
<thelema> whereas ocaml has pretty boring matching
<flux> 13.90 0.36 0.36 camlBatInnerIO__loop_1419
<flux> ;-)
<orbitz> woot!
<flux> it was pretty obvious in the end from the gprof call traces..
<adrien> hahah, nice find
<adrien> how long did it take before?
<flux> it started from 47 seconds
<flux> now it's 2.9.. but I put Parmap back in ;-)
<flux> withuot Parmap it's 4.4 seconds
<flux> actually that 47 is probably with profiling compiled in and 4.4 without, a more comparable number is 6.8 s
<flux> still, pretty radical
<flux> now I can run it on my actual dataset which is 8505544 lines
<flux> but now I run out of memory.. I have it only 1.5G, though
jbrown has quit [Ping timeout: 276 seconds]
<flux> and I could easily memoize the keys, which are file names that are multiple times in the data set, but not without giving up Parmap :(
Kakadu has quit [Ping timeout: 272 seconds]
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
<flux> cool, it didn't destroy all memoization, so now I have almost 50% time and slightly worse memory use \o/. I really should get a new computer..
<adrien> 3€/GB DDR3
milosn has quit [Ping timeout: 240 seconds]
<flux> those things need a computer around them with available slots
<flux> (obviously I'm maxed out ;))
<flux> (I have 6G total but I don't want that to take it all)
milosn has joined #ocaml
<thelema> flux: can you use maps with mutable values?
<thelema> so that you only ever have one copy of each key? I guess that doesn't work too well with parmap
<flux> well, I use strings as keys to a map
<flux> I process 50 files and put those lines from those files into separate maps
<flux> but the lines in the different files are mostly the same
<thelema> can you put them into the same map?
<flux> so I feed them through a function that for a given string returns always the same string object
<thelema> yes, I see the memoization
<flux> I never put them into the same map
<flux> I'm not quite sure why this works so well with Parmap
<thelema> can you structure the values of the map so that one map represents your n current maps?
<flux> I don't see how it would be natural for the problem
<flux> I basically have 50 samples in time of file sizes
<flux> and I want to run correlation on those sizes, per each file
<flux> so I have a list of samples, each sample is a map of 150000+ directory names and sizes
<flux> and I can construct those StringMap.t-object in parallel with Parmap
<thelema> are all samplex exactly the same list of file sizes?
<flux> no
<flux> there can be more, there can be less
<thelema> overlap of 90+%?
<flux> sure
<thelema> one global map from string names to integers, and arrays of ints to hold the sizes
<flux> but I would need to read all the files through once to have such a map?
<thelema> you're using batteries; you can use Vect for the arrays
<thelema> so you can have "resizable" arrays
<thelema> the map will be complete after all files are read in
<thelema> so instead of memoizing strings, just memoize an int for each string
<flux> well, that optimization would probably speed up creating the maps, as it would need to simply find a values for an integer key
jamii has joined #ocaml
<flux> but I'm uncertain how to parallelize it in that case, if I need to thread a single filename->integer mapping
<flux> now I just do Parmap.parmap ~chunksize:1 samples_of_du_gz (Parmap.L (List.of_enum files))
tac_ has joined #ocaml
<flux> and it results in all worker processes doing their own memoization. but it's ok, because the file names are repeated so many times that it's a (big) net win anyway.
<flux> well, maybe I could do the integer-kind of memoization in those worker processes and then somehow combine those indexes into a map from file names into a list of integers, and vice versa
<thelema> Maybe do one pass outside the parallel section, and then pass that map to the parallel sections
<thelema> anything not in that map could be stored in a string,int map, and the names found in the first pass would go in arrays
<thelema> this is getting a bit more complex
ocp has joined #ocaml
<thelema> but would have quite good GC behavior
<flux> I don't have issues with GC anymore, these optimizations would just speed up the map procesing by removing a pointer dereference when handling the tree
<flux> it's a 18 levels deep tree, so that's maybe worth something..
<shp> I have a question: when i do "try [....] with ExceptionName -> ();" inside a function, when the exception is raised, the function ends. Is it possible that the function does not end ? i just want to use an exception to leave a loop but not to leave the function
<flux> nevermind, Parmap doesn't work perfectly :-) [Parmap]: error at index j=0 in (1,1), chunksize=1 of a total of 1 got exception Failure("") on core 1
<flux> not sure why it worked so great just a minute ago..
<flux> oh, actually, it's my code :-) (..Failure "")
<thelema> shp: use () to encapsulate the try...with
<shp> thelema: sry but i don't understand
<thelema> shp: i.e. let f () = (try while true do raise Not_found end; assert false with Not_found -> ()); 3
RagingDave has quit [Read error: Connection reset by peer]
<shp> ah ok, ty thelema !
RagingDave has joined #ocaml
<shp> thelema: i get this error : "This expression is not a function; it cannot be applied"
<shp> ah f*k
<shp> i forgot a semicolon
lolcathost has quit [Quit: leaving]
weie has quit [Quit: Leaving...]
* adrien is slowly progressing on the ocaml cross-compiler
<adrien> honestly, this shit is annoying
<adrien> good night :-)
<matthewt> anyone here from nancy?
mye has quit [Quit: mye]
wmeyer has joined #ocaml
<wmeyer> hi
<matthewt> hey
jbrown has joined #ocaml
shp has quit [Quit: kit]
<wmeyer> hi matthewt
<adrien> grmbl flexdll grmbl circular dependency
<adrien> morning wmeyer
<adrien> good night =)
<wmeyer> adrien: morning
gour has quit [Quit: WeeChat 0.3.8]
<madroach> hi, is it still possible to create an infinite Num.t ?
Kakadu has quit []
tane has quit [Quit: Verlassend]
lolcathost has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
jbrown has quit [Remote host closed the connection]
lolcathost has quit [Ping timeout: 248 seconds]
Yoric has quit [Ping timeout: 246 seconds]
<thelema> madroach: 1/.0?
<thelema> err, 1//0
myx has quit [Quit: ушёл]
oriba has joined #ocaml
<_habnabit> well, first day at my new non-ocaml-using job
<_habnabit> probably will not be hanging around here much anymore. thanks for the last ~2 years though!
<pippijn> why did you change?
<_habnabit> it wasn't ocaml, haha
<pippijn> and why don't you continue ocaml in your free time?
<pippijn> my job is using java
<pippijn> and here I am
<_habnabit> i just haven't found a use for it
<_habnabit> none of my personal projects have needed it so far
ocp has quit [Quit: Leaving.]
<wmeyer> _habnabit: I do't use ocaml at all at work, it's a common pattern
ftrvxmtrx has quit [Ping timeout: 260 seconds]
<wmeyer> _habnabit: you don't have to say good bye to OCaml or #ocaml
<_habnabit> well sure
<_habnabit> i realize this; i just haven't found anything i've wanted to do with it in personal projects
<wmeyer> use for scripting even
hongboz has joined #ocaml
<orbitz> _habnabit: you shall be missed
thomasga has quit [Quit: Leaving.]
<tac_> lol, programming language ragequit?
q66 has quit [Quit: Quit]
<thelema> tac_: no, just new job not involving primary language of ocaml
jamii has quit [Ping timeout: 265 seconds]
<tac_> I've never used ocaml, and I don't have any issues hanging around here :)
<thelema> tac_: are we just that awesome?
<tac_> Sometimes I just get really sick and tired of Haskellers talking about how awesome their constraint types are.
<thelema> ah. heh.
<tac_> Not that I don't love my theory, but you guys seem much more practical at times.
<thelema> I'm much more practical because I haven't learned all the theory
<tac_> But monads are the limit for me.
<tac_> If you even put a "co-" in front there, I'm packing up my stuff and going home
<orbitz> Just troll them wit hsome bob harper posts
<tac_> Who's Bob Harper?
<orbitz> Smart man/haskell troller
<tac_> ah yes. I know this guy's blog.
<tac_> I'd be on board for that kind of trolling.
smondet has quit [Ping timeout: 248 seconds]
pdw has joined #ocaml
suyu has joined #ocaml
m_m has joined #ocaml
ontologiae has joined #ocaml
smerz has joined #ocaml
pdw has quit [Quit: Bye]
tac_ has quit [Ping timeout: 245 seconds]
suyu_ has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
suyu has quit [Ping timeout: 272 seconds]
suyu_ is now known as suyu
ontologiae has joined #ocaml
<wmeyer> orbitz: i've skimmed to the point where he says that ML has value restriction and is safe. That felt me orgamiscally good and went for a tea.
lolcathost has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
<troydm> btw is there a monad library for ocaml?
<_habnabit> what would it do
<troydm> well nothing in particular
m_m has quit [Ping timeout: 255 seconds]
<troydm> just some simple general monad and say a state monad implementation
<troydm> made me think there's gotta to be some library that has those already defined