tobiasBora has quit [Quit: Konversation terminated!]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
avsm has joined #ocaml
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
maattdd has joined #ocaml
hyPiRion has quit [Ping timeout: 245 seconds]
hyPiRion has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
nikki93 has quit [Remote host closed the connection]
darkf_ has joined #ocaml
nikki93 has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
darkf has quit [Ping timeout: 265 seconds]
tlockney_away is now known as tlockney
thomasga has quit [Quit: Leaving.]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
manizzle has quit [Ping timeout: 265 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
avsm has quit [Ping timeout: 246 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Simn has quit [Quit: Leaving]
manizzle has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
nikki93 has quit [Remote host closed the connection]
darkf_ is now known as darkf
maattdd has joined #ocaml
ygrek has joined #ocaml
q66 has quit [Quit: Leaving]
maattdd has quit [Ping timeout: 268 seconds]
nikki93 has joined #ocaml
tlockney is now known as tlockney_away
talzeus has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
dsheets__ has quit [Ping timeout: 264 seconds]
madroach has quit [Ping timeout: 252 seconds]
nikki93 has quit [Remote host closed the connection]
avsm has joined #ocaml
kmicinski has joined #ocaml
manizzle has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 265 seconds]
so has quit [Ping timeout: 255 seconds]
kmicinski has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
avsm has quit [Ping timeout: 268 seconds]
gambogi has joined #ocaml
<gambogi>
hi, could someone point me to a beginner guide to imports work?
<gambogi>
I've installed some modules and I'm having a hard time getting corebuild to see them
maattdd has quit [Ping timeout: 268 seconds]
lordkryss_ has quit [Quit: Connection closed for inactivity]
nikki93 has joined #ocaml
<smondet>
gambogi: give us a bit more details, please
<smondet>
which package? what command line are you using
<smondet>
?
mars0000 has joined #ocaml
lostcuaz has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
yacks has joined #ocaml
<gambogi>
I'm trying to import Std and Omd
<gambogi>
both are giving me similar errors
kmicinski has joined #ocaml
tlockney_away is now known as tlockney
<smondet>
you're using -package omd -package core ? or something like that?
<smondet>
what's the error?
<gambogi>
Error: unbound module Extlib
<gambogi>
using -package flags
<smondet>
ok so you're using `-package extlib`
<smondet>
?
<gambogi>
yup
<smondet>
isn't it ExtLib? with a capital L?
<gambogi>
oh
<gambogi>
... yup that was the issue...
<gambogi>
thank you for indulging my typos
<smondet>
no problem
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
avsm has joined #ocaml
avsm has quit [Remote host closed the connection]
zxqdms has joined #ocaml
claudiuc has quit [Remote host closed the connection]
nikki93 has joined #ocaml
divyanshu has joined #ocaml
siddharthv_away is now known as siddharthv
aurynj has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
tlockney is now known as tlockney_away
michel_mno_afk is now known as michel_mno
maattdd has joined #ocaml
michael_lee has joined #ocaml
maattdd has quit [Ping timeout: 246 seconds]
axiles has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Dongyancai has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
Dongyancai has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
kmicinski has quit [Ping timeout: 265 seconds]
maattdd has joined #ocaml
zxqdms has quit [Quit: leaving]
maattdd has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
Snark has joined #ocaml
kmicinski has joined #ocaml
mars0000 has quit [Quit: mars0000]
kmicinski has quit [Ping timeout: 264 seconds]
nikki93 has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 240 seconds]
_5kg_ has quit [Read error: Connection reset by peer]
aurynj has quit [Quit: Leaving]
elfring has joined #ocaml
_5kg has joined #ocaml
yacks has joined #ocaml
siddharthv is now known as siddharthv_away
zpe has joined #ocaml
eni has joined #ocaml
siddharthv_away is now known as siddharthv
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
Kakadu has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
csakatoku has joined #ocaml
michael_lee has quit [Ping timeout: 240 seconds]
<elfring>
Would any software developer or tester like to compare the run time behaviour of current OCaml modules like "Map", "Omap" and "Hashtbl" a bit more?
<elfring>
Are you interested in corresponding benchmarks?
<adrien>
it should be exactly the same since Omap since to only wrap around Map
<adrien>
but again
<adrien>
avoid objects for now
<adrien>
noone uses olabl
<adrien>
so there's not even that reason to use it
<adrien>
and instead you'll get error messages that are more difficult to understand
<flux>
I don't think those leverage the the OCaml object system particularly well.
<flux>
for example, look at the buffer interface. it is quite big. many of those could be external functions.
<flux>
the impact? if you want to implement your own buffer with the same interface, you get to implement both add_substring and add_string (and others)
<adrien>
from what I've seen it's really: method add = Map.add self#map
<flux>
I suppose the problem I pose isn't that big, though, you can just write an adapter converting a 'small' interface into the one required by Obuffer.t..
<flux>
(oh, Obuffer.c)
AltGr has joined #ocaml
<elfring>
My software experiments are evolving around functional, imperative and object-oriented programming styles in OCaml ...
<flux>
but in principle I do agree that some more polymorphic data structures in ocaml could do well
<flux>
it's always annoying to change code from using a List to an Array or vice versa
mika2 has joined #ocaml
<flux>
in particular if you have simple code that uses ('a * 'b) list as an associative container and then want to use Map in its place..
michael_lee has joined #ocaml
SrPx_ has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
zpe has joined #ocaml
ikaros has joined #ocaml
<ygrek>
why Lwt.with_timeout is defined as let with_timeout d f = Lwt.pick [timeout d; Lwt.apply f ()] and not let with_timeout d task = Lwt.pick [timeout d; task] ?
<mrvn>
how would that execute task?
<ygrek>
Lwt.pick waits until task is terminated
Dongyancai has quit [Ping timeout: 265 seconds]
Dongyancai has joined #ocaml
<ygrek>
the only bonus of Lwt.apply is that it catches native exn in first non-async part of f
<mrvn>
ygrek: but task would already be running then
<ygrek>
but the downside is heavier usage sie
<ygrek>
yes, but I envision usage as with_timeout 10. (Lwt_unix write fd "dsds" 4)
<ygrek>
ok, I get your answer, that explains the design
<Drup>
ygrek: the task could have been running before you call timeout, so the duration would not be very precise
<Drup>
(and there is the whole exception issue, which is a good enough reason, I think)
<mrvn>
on the other hand one might want to later add a timeout to a running task. I guess then one use fun () -> task
<ygrek>
mrvn, yes, that's what I am doing :)
<ygrek>
Drup, mrvn: thanks, it makes sense now
Simn has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
Dongyancai has joined #ocaml
rand000 has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
Dongyancai has joined #ocaml
Dongyancai has quit [Ping timeout: 265 seconds]
csakatoku has quit [Remote host closed the connection]
neo007 has joined #ocaml
<neo007>
hi hackers! if a newbie has some javascript programming expenrience, and now he want to hack Ocaml, which book you suggest? is it the book the functional approching to programming suitable?
Dongyancai has joined #ocaml
<neo007>
or just the official site manual?
<Drup>
Depending of your javascript experience, it's better to forget it all :3
<Drup>
the official manual is useful, there is lot's of ressources on http://ocaml.org/ too
<flux>
reminds me of the idea that functions could be called with any order of arguments, as long as the types can be determined to be uniquely identifying
<flux>
(uniquely even)
<Drup>
one day, I will allocate a day to try to understand it, but for now, it's a bit nebulous
<flux>
drup, and that is the day you get admitted to the asylum?
<Drup>
I don't know, are all type theorist crazy ?
<Drup>
hum, don't answer that
<ggole>
flux: I wish I could solve this problem merely by introducing records -_-
avsm has joined #ocaml
<flux>
maybe you could solve them with views!
<flux>
which we don't have ;)
<ggole>
Abstraction over patterns would do it: I was bitching about that yesterday
<ggole>
At least whinging in IRC makes an acceptable substitute
<flux>
maybe whining on IRC should be formalized in the language specification
thomasga has joined #ocaml
yacks has joined #ocaml
<flux>
"Instead of applying views on pattern matching, you may use this format to whine about the lack of pattern abstraction on IRC:" etc
<ggole>
Sounds too constructive, possibly even helpful
knz_ is now known as knz
<mrvn>
Use the Internet Relay Chat Whining Protocol.
<flux>
IRC WhiP
<ggole>
"Type some half-baked invective, press enter"?
<ggole>
(Bears a suspicious resemblance to the IRC Basic Usage Protocol.)
jonludlam has quit [Ping timeout: 245 seconds]
kmicinski has joined #ocaml
malo has joined #ocaml
avsm has quit [Quit: Leaving.]
<michel_mno>
Hi there, is there somewhere a detailed doc about the way the "caml_program" is generated ? and how to find the associated asm file ?
<companion_cube>
there are compiler flags (at least for the generated assembly), but the documentation is poor afaik
<adrien_oww>
michel_mno: call ocamlopt(.opt) with -S
divyanshu has quit [Quit: Computer has gone to sleep.]
mika2 has quit [Read error: Connection reset by peer]
<justinfront>
but it seems to be error on me Error: No implementations provided for the following modules:
<justinfront>
Unix referenced from ogldemo2.cmx
<companion_cube>
what is your compiler command?
<elfring>
companion_cube: I know some module capabilities already. Now I would like to look a bit more at the details for safe interface descriptions.
<companion_cube>
what do you mean by "safe"?
<justinfront>
at moment ocamlopt -I +lablGL lablglut.cmxa lablgl.cmxa ogldemo2.ml -o ogldemo2
<justinfront>
I notice that is different do I need same name as the example?
<justinfront>
will try that
<justinfront>
oh wow it works!
<companion_cube>
forgot unix.cma I think
<justinfront>
ah ok
<justinfront>
so name was not important
<companion_cube>
well, the compiler complains because it cannot find "unix"
q66 has joined #ocaml
<elfring>
companion_cube: Experienced OCaml developers were trained to interpret long arrow chains in data type signatures. Other interested users (like me) might struggle a while with the notation. An alternative description style might help.
<companion_cube>
hmm, you mean you don't understand the notation for types?
<companion_cube>
val f : a -> b -> c -> d ?
<justinfront>
the scientist book seems very expensive compared to other more recent books
<companion_cube>
I don't know much about this book, honestly
avsm has joined #ocaml
<elfring>
companion_cube: I find it challenging in some situations at the moment to interpret which data type elements belong to function parameters and where an "arrow" refers to a function return type.
<companion_cube>
that's very simple
<companion_cube>
the last type is the return type
<companion_cube>
all the previous ones are arguments
<companion_cube>
a -> b -> c -> d is actually a -> (b -> (c -> d)) btw
<companion_cube>
a function from a to (functions from b to (functions from c to d))
kmicinski has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
<elfring>
companion_cube: I would occasionally prefer that some function parameters are grouped together instead of decomposition into function calls with a single parameter. I guess that is the usual "fun" around the topic "Currying", isn't it?
<companion_cube>
yes
<companion_cube>
but the usual style in OCaml is curried functions, and you shouldn't expect people to change that ;)
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
<ggole>
Well, all function calls take a single parameter.
<whitequark>
elfring: you can group things that are best grouped together with tuples
<whitequark>
f (x, y)
<whitequark>
in fact, I think this was the original motivation behind OCaml's function definition syntax, i.e.
<whitequark>
let f(x, y) = x + y in ...
<whitequark>
in f(1, 2)
<companion_cube>
it's not that useful
<companion_cube>
only good if x and y have a very good reason to be grouped together
<whitequark>
yep, it just looks similar to mathematical notation, I guess
<whitequark>
the usual way is currying
<ggole>
That's the usual way in SML
<companion_cube>
depends, sometimes mathematical notation is F_a(b)
<ggole>
(And OCaml does optimise calling coventions for functions that take a single tuple, interestingly.)
<companion_cube>
to denote that a "changes" less often than b
ebzzry has quit [Remote host closed the connection]
Fullma has quit [Ping timeout: 265 seconds]
ebzzry has joined #ocaml
rz has quit [Ping timeout: 240 seconds]
kmicinski has joined #ocaml
rz has joined #ocaml
<elfring>
companion_cube: How long would it take to write a long arrow chains in the interface description file directly instead of copying it from a command line interface (toplevel)?
Fullma has joined #ocaml
<adrien>
less and less time as you get more experienced
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michel_mno is now known as michel_mno_afk
dsheets has joined #ocaml
<companion_cube>
elfring: usually I start by writing the .mli file
<companion_cube>
unless I really have trouble figuring out what it is I want