<firefux>
What's a good resource to start learning OCaml for someone with no functional programming background?
Icarot has joined #ocaml
leoncamel has joined #ocaml
leoncamel has quit [Client Quit]
leoncamel has joined #ocaml
<orbitz>
firefux: ocaml.org probabl has pointers
Icarot has quit [Ping timeout: 246 seconds]
derek_c has quit [Quit: Lost terminal]
Icarot has joined #ocaml
lexa_ has joined #ocaml
sgnb` has joined #ocaml
ivan\_ has joined #ocaml
ivan\ has quit [Ping timeout: 248 seconds]
sgnb has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
ivan\_ is now known as ivan\
hto has joined #ocaml
lexa_ has quit [Quit: Leaving]
Cyanure has joined #ocaml
Icarot has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
Dongyancai has joined #ocaml
<Dongyancai>
Excuse me, why when I set breakpoint like GC.set it says 'GC.set' is an unbounded identifier?
jpdeplaix has quit [Ping timeout: 246 seconds]
<darkf>
Dongyancai: use Gc, not GC
<Dongyancai>
darkf: 'Gc is an unbounded identifier'
<darkf>
Dongyancai: you probably have to link it first, have you tried that?
<Dongyancai>
darkf: I am trying to trace compcert, I modified Make file to create ccomp.d.byte and run ocamldebug in emacs.
<Dongyancai>
*Makefile
adotbrown has quit [Ping timeout: 245 seconds]
Dongyancai has quit [Quit: Page closed]
ttamttam has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
ttamttam has quit [Remote host closed the connection]
vivanov has joined #ocaml
<vivanov>
best way to read txt file to gsl matrix? im thinking of reading file to bigarray, converting to array of arrays and converting to gsl matrix. anything better ?
emias has quit [Remote host closed the connection]
hkBst has quit [Ping timeout: 245 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ottbot has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
darkf_ has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
darkf has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
yacks has quit [Ping timeout: 255 seconds]
<vivanov>
when i use Bigarray.Array2.map_file fd Bigarray.float64 Bigarray.c_layout false (-1) 1 it doesnt automatically read all lines and gives an error : Exception: Failure "Bigarray.mmap: file size doesn't match array dimensions".
mika1 has joined #ocaml
cago has joined #ocaml
adotbrown has joined #ocaml
hkBst has quit [Ping timeout: 246 seconds]
hkBst has joined #ocaml
thomasga has joined #ocaml
leoncamel has quit [Quit: WeeChat 0.3.9.2]
yacks has joined #ocaml
mcclurmc has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
chambart has joined #ocaml
darkf_ is now known as darkf
ollehar has joined #ocaml
fraggle_ has joined #ocaml
emias has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 256 seconds]
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
_andre has joined #ocaml
clog has quit [^C]
clog has joined #ocaml
Xizor has joined #ocaml
Snark has joined #ocaml
tane has joined #ocaml
djcoin has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
Cyanure has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 260 seconds]
vivanov has quit [Quit: Lost terminal]
Xizor has quit [Ping timeout: 245 seconds]
fraggle_ has joined #ocaml
Xizor has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
hkBst has quit [Ping timeout: 245 seconds]
beckerb has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
fraggle_ has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
hkBst has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
adotbrown has quit [Ping timeout: 255 seconds]
<ollehar>
I get this alot when compiling: Error: Files controller/cardController.cmx and operation.cmx
<ollehar>
make inconsistent assumptions over interface Operation
hkBst has quit [Remote host closed the connection]
<ollehar>
Which is fixed by "make clean"
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
noam has quit [Read error: Connection reset by peer]
<adrien_oww>
it's a common issue with make-based build systems
noam has joined #ocaml
<ollehar>
adrien_oww: no way to fix it?
<adrien_oww>
such make rules expect that you can compile all file separately which is not the case here
ontologiae has joined #ocaml
kaustuv has joined #ocaml
<kaustuv>
Why does this not typecheck (i.e., under what conditions can this be a runtime error if the typechecker accepted it): let f (x : [`A]) : [`A | `B] = x ;;
<pippijn>
kaustuv: cast it
<kaustuv>
I know how to silence the type error. I want to know why it is considered an error in the first place.
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
chambart has joined #ocaml
fraggle_ has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
kaustuv has left #ocaml []
hkBst has quit [Ping timeout: 260 seconds]
Cyanure has joined #ocaml
hkBst has joined #ocaml
cdidd has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
q66 has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
cdidd has joined #ocaml
maufred has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
ollehar1 has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
ollehar1 has joined #ocaml
firefux has left #ocaml []
vivanov has joined #ocaml
travisbrady has joined #ocaml
<vivanov>
Bigarray fails to read 1.5 mio lines file -- any other quick way to read a txt file to array?
<pippijn>
vivanov: how do you read a file with Bigarray?
<vivanov>
Array2.map_file ;;
<pippijn>
nice
<vivanov>
im looking to smth like numpy/octave loadtxt
smondet has joined #ocaml
<hcarty>
vivanov: Bigarray.*.map_file expects a native-binary representation, not text
<hcarty>
vivanov: Unless you are mapping a Bigarray with character elements
<pippijn>
vivanov: are those lines all the same length?
<vivanov>
hcarty: so whats the best way to convert 1.5m x 20 float number file to array of arrays in ocaml ?
<vivanov>
should i first convert it using some other tool to native-binary representation ?
<hcarty>
vivanov: Read each line, parsing each one to get a float array
zbroyar has joined #ocaml
<hcarty>
vivanov: Or you could convert the data before bringing it into OCaml. Which is best would depend on how you are using the data.
<vivanov>
hcarty: im doing it now
<vivanov>
reading line by line
<vivanov>
but its slow
<vivanov>
numpy.loadtxt is times faster
<vivanov>
ok ill convert it first
<hcarty>
vivanov: Could be the implementation. You could read all of the text at once then convert it. Again, the best approach will depend on your specific environment.
<hcarty>
vivanov: Some experimentation is usually required to find the 'best' approach, for better or worse.
<vivanov>
ok i see
<vivanov>
thx
hkBst has quit [Quit: Konversation terminated!]
darkf has quit [Quit: Leaving]
ttamttam has joined #ocaml
<companion_cube>
just released sequence-0.3.3 :)
Cyanure has quit [Read error: Connection reset by peer]
vivanov has quit [Read error: No route to host]
rixed has quit [*.net *.split]
bobry has quit [*.net *.split]
areece has quit [*.net *.split]
noj has quit [*.net *.split]
troydm has quit [*.net *.split]
cross has quit [*.net *.split]
TaXules has quit [*.net *.split]
Cyanure has joined #ocaml
troydm has joined #ocaml
cross has joined #ocaml
TaXules has joined #ocaml
rixed has joined #ocaml
bobry has joined #ocaml
areece has joined #ocaml
noj has joined #ocaml
gustav_ has quit [Excess Flood]
ollehar1 has quit [Quit: ollehar1]
gustav_ has joined #ocaml
noam_ has joined #ocaml
noam has quit [Ping timeout: 244 seconds]
chambart has quit [Ping timeout: 245 seconds]
Xizor has quit [Remote host closed the connection]
<hcarty>
Enum, Seq, Sequence provide generic collections/enumerations of elements. Is there something similar for indexed collections of elements?
mikurubeam has quit [Ping timeout: 244 seconds]
Kakadu has quit []
<hcarty>
Along the lines of: type ('index_type, 'element_type) index ... val get : ('i, 'e) index -> 'i -> 'e
<companion_cube>
that would be interesting, too
<companion_cube>
val get : index -> 'i -> 'e val multi_get : index -> 'i -> 'e Sequence.t, too
<companion_cube>
for multimaps or such
<hcarty>
companion_cube: Indeed!
<companion_cube>
that looks like a type-class...
<hcarty>
companion_cube: Or 'e would be ('a Sequence.t) in that case
<companion_cube>
hcarty: I think it's more clean to have both
<companion_cube>
because that way you can choose to use get nonetheless rather than go through the sequence
<hcarty>
I haven't experimented enough to know if it's possible in OCaml without functors or classes/objects.
<companion_cube>
and you still have a relation between 'e and the type of the container
<companion_cube>
well, you'd have to get a ('i,'e) indexed out of your data structure
<companion_cube>
the same way you have to convert into Enum/Sequence
<companion_cube>
but then, you can also have 'indexed' that are not backed by containers
cago has left #ocaml []
<companion_cube>
(like Enum.--)
<companion_cube>
let fibonacci : (int,int) indexed = ....
<hcarty>
I'd definitely like to have functions as the element providers.
<hcarty>
companion_cube: But that provides a base to build on
<wmeyer>
hello
<thelema>
wmeyer: hi
<thelema>
wmeyer: It doesn't look like C++-style namespaces will be added to OCaml
ollehar1 has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
<wmeyer>
thelema: it could be done, I don't mind the DSL approach at the same time
<wmeyer>
I agree it's tricky
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
<wmeyer>
so I'd rather not participate directly as I currently can only guess how the object format looks like in OCaml
travisbrady has quit [Quit: travisbrady]
<thelema>
I imagine the best approach is to have namespaces as restricted modules, although this doesn't directly solve problem of module name collisions, it allows unique internal names + reasonable external names
<wmeyer>
but side effects and merging environments are limiting factor
<adrien>
morning
<thelema>
adrien: good afternoon
<wmeyer>
adrien: once adrien says "morning" when it's 21 I am tempted to say with complete non sense: good year! ;-)
<wmeyer>
adrien: i will look into your patches, hold on a bit
<adrien>
I have to admit I have a tendency to say "happy easter" at christmas :-)
* adrien
has spent the week finishing the release at work and wants holidays ='(
<wmeyer>
merging easter with christmas would great, the same gifts as for christmas, time for easter, and holiday from easter to christmas
<wmeyer>
:-)
<adrien>
where do I sign up?
travisbrady has joined #ocaml
<wmeyer>
I will keep you informed.
<adrien>
:-)
<adrien>
I need to hurry up and build another release of yypkg and packages too
<wmeyer>
you should I think
<wmeyer>
my personal khem deadline for your patches is Sunday evening.
<adrien>
for all of them? :D
<wmeyer>
maybe another part
<wmeyer>
the scary ones are just in the end
<adrien>
:-)
<adrien>
don't pay too much attention to 03-wip/, they're really going to need some rework
<wmeyer>
will do it gradually, but I'd like first try to cross compile for ARM.
<adrien>
ocamlopt(.opt) will require the same kind of code than one of the latest patch
<adrien>
which only touches i386
<adrien>
it's actually not difficult to do the same for other targets but I'm not even sure the i386 code is right
<wmeyer>
no worry, we will to get it right, keep the conversation on the mantis
<hcarty>
Well, the 'basic' operations are the first four functions listed in the S signature. The rest are based on those four.
<hcarty>
I'm trying to put some basic ocamldoc comments in place and the naming is making it difficult.
<pippijn>
wmeyer: I've been walking on hot coals for the past 2 months
<pippijn>
I'm amazed my sleep has been reasonably good
<hcarty>
It's sort of a map but not in the stdlib/Batteries/Core sense of ordered keys.
<pippijn>
hmm
<wmeyer>
pippijn: That's nothing. I've been eating (on daily basis) 17KGs of water proof nails. I noticed increase concetration.
ontologiae has quit [Ping timeout: 264 seconds]
<wmeyer>
pippijn: JOKE! ;-)
<pippijn>
I must be out of humour
<pippijn>
I'm waiting for something to happen.. and it started happening 2 days ago, but today it stopped again
<pippijn>
it's incredibly frustrating, although I do my best not to let it get to me
<wmeyer>
I just rebind Meta to Esc
<pippijn>
I'm in a fight, and my weapons are glass needles
<pippijn>
and I'm fighting a soap bubble
<pippijn>
but it can't pop
<pippijn>
I mean I shouldn't let it pop
<hcarty>
IndexMap for now. Iarray or Garray may win out later.
<hcarty>
Thanks for the suggestions
<wmeyer>
hcarty: actually Iarray was a bit of joke - I made a library called Ilist but feel free to use. (which has completely different purpose than your IArray!)