talzeus has quit [Remote host closed the connection]
ollehar has joined #ocaml
Simn has quit [Quit: Leaving]
Drup has quit [Quit: Leaving.]
mfp has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Quit: emmanuelux]
csakatoku has joined #ocaml
bernardofpc has quit [Read error: Operation timed out]
bernardofpc has joined #ocaml
j0sh has quit [Read error: Operation timed out]
j0sh has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
nikki93 has quit [Remote host closed the connection]
q66 has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 246 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
cdidd has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
manizzle has joined #ocaml
nikki93 has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest56410
jpdeplaix has quit [Ping timeout: 248 seconds]
cdidd has joined #ocaml
arquebus has joined #ocaml
jpdeplaix has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
cdidd has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
f[x] has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
arquebus has quit [Quit: Konversation terminated!]
nikki93 has joined #ocaml
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
nikki93 has quit [Remote host closed the connection]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
chrisdotcode has joined #ocaml
cdidd has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
gour has joined #ocaml
_tca has quit [Remote host closed the connection]
nikki93 has joined #ocaml
cdidd has quit [Ping timeout: 245 seconds]
beckerb has quit [Ping timeout: 245 seconds]
beckerb has joined #ocaml
nikki93 has quit [Remote host closed the connection]
caseyjames has joined #ocaml
<caseyjames>
Hi, I need to store a collection of lists, where I will be targeting an index and appending to the lists. Would a association list be a better approach for this than arrays?
Transhumanist has joined #ocaml
Transhumanist has quit [Client Quit]
Fusebox has joined #ocaml
nikki93 has joined #ocaml
<flux>
caseyjames, if association lists suite your situation, maybe Map would suite as well
<flux>
changing the size of an array (ie. add a new element) is difficult/inefficient, if that matters to you
<flux>
of course, updating a single element from a list is inefficient and probably as difficult as well
<flux>
(well neither is not really difficult)
<flux>
(s/not //)
<caseyjames>
flux: the size will be constant, but I'm worried about arrays being less flexible than lists. Is the performance hit significant?
<flux>
depends on your application I imagine
<caseyjames>
alright, I'll give it a shot with the list and go from there... I'm a bit spooked by ocaml's mutable side, as a beginner
<flux>
the downsides of arrays is that they are not functional, ie. they can be changed without it being apparent, copies should copy all the contents not just the root, and subtyping doesn't work as it does with immutable data structures
nikki93 has quit [Remote host closed the connection]
talzeus has joined #ocaml
cdidd has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
f[x] has quit [Ping timeout: 240 seconds]
derek_c has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
ttamttam has joined #ocaml
mchqwerty has joined #ocaml
octet8 has quit []
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
Guest56410 has quit [Remote host closed the connection]
<pippijn>
I installed eliom and the first example on the tutorial doesn't work.. that's sad
f[x] has joined #ocaml
Neros has quit [Ping timeout: 264 seconds]
<pippijn>
there is no onload event..
yacks has quit [Ping timeout: 264 seconds]
<pippijn>
hm, apparently there now is, but not in opam
<pippijn>
Effective set of compiler predicates: pkg_deriving-ocsigen.base,pkg_num.core,pkg_num,pkg_deriving-ocsigen,pkg_camlp4,pkg_type-conv,pkg_unix,pkg_bigarray,pkg_sexplib,pkg_sexplib.syntax,pkg_corelib,pkg_ucslib,pkg_str,pkg_findlib,pkg_camomile,pkg_batteries,pkg_baselib,autolink,native
<pippijn>
it has findlib in there
csakatok_ has quit [Remote host closed the connection]
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
malo has joined #ocaml
ggole has quit []
cantstanya has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
ocp has joined #ocaml
mort___ has quit [Quit: Leaving.]
nisstyre has quit [Ping timeout: 240 seconds]
<adrien>
anyone slightly used to ocamlbuild?
<adrien>
I need to invoke the shell to run a command; how do I do that?
<adrien>
it's not a command that is part of the regular file creation
<adrien>
seems to be "val run"
cantstanya has joined #ocaml
ski has quit [Ping timeout: 248 seconds]
fryguybo1 has joined #ocaml
Ptival_ has joined #ocaml
<smondet>
adrien: by "regular file creation" you mean that it is not in a `rule`?
<adrien>
yes :)
* adrien
is an expert at stating things in an unclear manner
ski has joined #ocaml
vpm_ has joined #ocaml
rossberg has quit [*.net *.split]
vpm has quit [*.net *.split]
cthuluh has quit [*.net *.split]
fryguybob has quit [*.net *.split]
Neros has quit [*.net *.split]
iZsh has quit [*.net *.split]
TDJACR has quit [*.net *.split]
stomp has quit [*.net *.split]
jbrown has quit [*.net *.split]
Ptival has quit [*.net *.split]
flux has quit [*.net *.split]
ulfdoz has quit [Ping timeout: 245 seconds]
cthuluh has joined #ocaml
Marco__ has quit [Quit: Connection closed for inactivity]
Ptival_ is now known as Ptival
gour has quit [Quit: WeeChat 0.4.1]
vpm_ is now known as vpm
jbrown has joined #ocaml
ski has quit [Ping timeout: 246 seconds]
chrisdotcode has quit [Ping timeout: 260 seconds]
<adrien>
Shell.run isn't exported through the .mli file
<adrien>
there's My_std.sys_command however
ski has joined #ocaml
flux has joined #ocaml
TDJACR has joined #ocaml
iZsh has joined #ocaml
stomp has joined #ocaml
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ocaml
rossberg has joined #ocaml
caseyjames has joined #ocaml
<caseyjames>
Does any one here use association lists? Are there functions for replacing elements at keys (deriving a new list). Does core have its own higher level list functions?
chrisdotcode has joined #ocaml
<companion_cube>
I don't think there is such a function
<companion_cube>
I remember implementing it :)
<pippijn>
an association list is an ordered multiset?
<companion_cube>
caseyjames: can't you use Map?
<pippijn>
multimap*
Kakadu has quit []
<companion_cube>
pippijn: it's a list of pairs, the stdlib provides a few functions for it
<pippijn>
ah
<pippijn>
split and stuff
<companion_cube>
List.assq, List.remove_assoc...
<pippijn>
oh
<pippijn>
right
<pippijn>
never used that
<smondet>
in core, List.Assoc.map works only on the 'values' side
<caseyjames>
I've not used map, will that work if the keys are ints? I'm looking to use this as an array without toeing in to the mutable world just yet
<companion_cube>
caseyjames: it will work
<companion_cube>
Map is a functor, you need to instantiate it for int keys
<companion_cube>
but then it will be neat
thomasga has quit [Quit: Leaving.]
<companion_cube>
module IntMap = Map.Make(struct type t = int let compare = compare end)
<caseyjames>
How would I then call that. I haven't had any hands on experience with functors
<companion_cube>
then you have a module IntMap
<companion_cube>
it behaves like a regular module
<companion_cube>
its signature is Map.S with type key = int
<companion_cube>
so for instance you can IntMap.singleton 1 "foo"
<companion_cube>
which returns a map that associates 1 with "foo"
<caseyjames>
Is "foo" polymorphic, can it be a int as well or does that need to be done in the functor?
nikki93 has joined #ocaml
<companion_cube>
IntMap provides a type that is polymorphic
<companion_cube>
the keys are int, but the values can be any type
<companion_cube>
(as for lists)
<caseyjames>
I found this http://ocaml.org/tutorials/map.html which looks like a nice intro, where can I find the docs on the functions - replacing an element at a key in particular
<companion_cube>
it's the signature for an instance of Map
<pippijn>
caseyjames: "add" replaces
<pippijn>
" add x y m returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears."
<caseyjames>
Great, that's very helpful. Do you think diving into core at this point is wise? Should I stick to the stdlib and only use core when Its needed? I haven't really been able to find a clear documentation for it
<companion_cube>
I think you can stick with the stdlib
<companion_cube>
it cntains some useful stuff, and if you need more you can use Batteries as a strict extension
<rks`>
« should I use core or stick to the stdlib?
<rks`>
- you can use batteries. »
<rks`>
<3
<Drup>
caseyjames: since you are still learning, implementing simple things you miss (like functions on lists and the like) would be a good exercise.
<caseyjames>
Drup: for sure, though I'm starting to feel guilty about the endless pattern matching - like chaining a handful of list functions at a high level would keep my work clearer
<Drup>
caseyjames: I assure you that chaining too much combinators on list is not harmless on the clarity of the code. Try to chain more than two fold and you will see. :p
<companion_cube>
rks`: I didn't say this
<companion_cube>
I said the stdlib is fine
<caseyjames>
Alright, this is very helpful. Thank you. Lunch calls. I'm looking forward to Map after Mexican
<Drup>
Mexican.wrap is a very tasty combinator.
<companion_cube>
have a good lunch!
<companion_cube>
I heard burritos as monads :]
caseyjames has quit [Ping timeout: 250 seconds]
djcoin has quit [Quit: WeeChat 0.4.1]
nikki93 has quit [Remote host closed the connection]
nisstyre has joined #ocaml
mort___ has joined #ocaml
ocp has quit [Ping timeout: 248 seconds]
ontologiae_ has quit [Ping timeout: 260 seconds]
<travisbrady>
Anyone have recommendations for a process pool library in OCaml? nProc? Parmap?
<companion_cube>
no idea, sorry, but both (or functory?) may suit your needs
<companion_cube>
you need those for parallelization?
ollehar has quit [Quit: ollehar]
<Drup>
travisbrady: Parmap is not really a process pool library, even if it can do the same kind of job
<travisbrady>
companion_cube: yes. I have a task which is trivially parallelize-able, so I'd like to just be able to do something like [python] pool.map(myfunc, some_list)
<travisbrady>
Drup: I think the same is true of async_parallel.
<companion_cube>
well then, I know that at least functory is able to do that
<Drup>
parmap seems like a good idea if it suits the paradigm
<Drup>
parmap is only suited for specifics jobs but it do it well and is very easy to use
* travisbrady
looks at functory
zpe has quit [Remote host closed the connection]
nikki93 has joined #ocaml
jave has quit [Ping timeout: 252 seconds]
jave has joined #ocaml
malo has quit [Read error: Connection reset by peer]
caseyjames has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
mort___ has quit [Quit: Leaving.]
nikki93 has quit [Remote host closed the connection]
tani has quit [Quit: Verlassend]
Yoric has quit [Ping timeout: 240 seconds]
ontologiae_ has joined #ocaml
Yoric has joined #ocaml
ontologiae_ has quit [Ping timeout: 245 seconds]
kay__ has joined #ocaml
Neros has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Yoric has quit [Ping timeout: 246 seconds]
UncleVasya has quit [Read error: Operation timed out]
kay__ has quit [Remote host closed the connection]