avsm has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
iago has quit [Quit: Leaving]
datkin has quit [Read error: Connection reset by peer]
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
datkin has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
lusory has quit [Ping timeout: 248 seconds]
datkin has quit [Read error: Connection reset by peer]
datkin has joined #ocaml
Submarine has joined #ocaml
oriba has quit [Quit: oriba]
twittard has joined #ocaml
twittard has quit [Quit: twittard]
snearch has joined #ocaml
ezyang has joined #ocaml
<ezyang>
What do I have to do to make jumping between ml and mli definitions in OCaml happen in Vim?
ulfdoz has joined #ocaml
<ezyang>
Looks like it's BACKSLASH s
twittard has joined #ocaml
andreypopp has quit [Quit: Computer has gone to sleep.]
ulfdoz has quit [Read error: Operation timed out]
NaCl has quit [Ping timeout: 265 seconds]
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
MaskRay has quit [Ping timeout: 260 seconds]
everyonemines has joined #ocaml
snearch has quit [Quit: Verlassend]
yroeht has quit [Ping timeout: 265 seconds]
thomasga has joined #ocaml
yroeht has joined #ocaml
pango is now known as pangoafk
everyonemines has quit [Quit: Leaving.]
Submarine has quit [Remote host closed the connection]
ftrvxmtrx has quit [Quit: Leaving]
Xizor has joined #ocaml
twittard has quit [Quit: twittard]
TerTar has joined #ocaml
<TerTar>
hello
<TerTar>
is it true that Ocaml is one of the best languages there are?
<_habnabit>
sure
<Drakken>
Yes. OCaml is the best language in the world for large-scale development. :)
<TerTar>
but for small programs, is it still good?
<TerTar>
is it better than Java for example
<adrien>
yes; I've used it for a number of scripts too
emmanuelux has quit [Ping timeout: 245 seconds]
<_habnabit>
everything is better than java
<TerTar>
at my university they make us learn ocaml
<Drakken>
good
<TerTar>
but I am not used to it cause some things are hard
<_habnabit>
it's less of 'hard' and more of 'something you\'re not used to'
<Drakken>
they're hard at first, but they're easier and more fun after you learn them.
<Drakken>
things people aren't used are hard.
<Drakken>
until they get used to them :)
<Drakken>
used TO
<TerTar>
for example, yesterday I had to implement deques and in java it's easy, double pointed linked list, but in Ocaml you have to do it with two lists that revert each other
<TerTar>
it sux
<TerTar>
and for my compilation course they made us use menhir instead of yacc for example
<_habnabit>
why do you think you have to use two lists
<TerTar>
I mean nobody uses menhir in real life
<_habnabit>
you could make a doubly-linked list in ocaml if you wanted
<TerTar>
_habnabit: they told us to use it in a functional way, without references
<_habnabit>
okay, so?
<TerTar>
so Ocaml should take some stuff from Java, and evolve
<TerTar>
like Classes
<_habnabit>
ocaml has classes
<_habnabit>
also that's kind of a non sequitur
<TerTar>
but we are discouraged to use them, I never saw one teacher use them before
<_habnabit>
that seems awfully silly
<_habnabit>
there's no reason to avoid using them
<TerTar>
the syntax and the language itself is not object friendly, even if the language supports it
<_habnabit>
what does that even mean
<Drakken>
objects aren't very important for most applications
<_habnabit>
how is java 'object friendly'
<Drakken>
why do you need objects for a deque if it's just a doubley linked list?
<Drakken>
doubly
<adrien>
TerTar: menhir is mostly like ocamlyacc which in turns is mostly like yacc
<_habnabit>
also doubly-linked lists are super easy: module DoublyLinkedList = struct type 'a t = Node of 'a t option * 'a * 'a t option end
<adrien>
of course there are differences because of the language but they're really minor
<TerTar>
and why does ocaml have a gtk+ library in it, but not a socket one
<TerTar>
it's silly
<_habnabit>
'in it' ?
<_habnabit>
anyway your trolling is boring
<adrien>
lablgtk(2) is not "in" ocaml
<adrien>
there's labltk however
<TerTar>
by in it I mean in the standard library
<_habnabit>
there's no gtk+ in the ocaml stdlib
<adrien>
and no tk either
<TerTar>
let me recheck
<adrien>
it's aside
asdfhjkl has joined #ocaml
<TerTar>
then my teacher lied to me when he told me there is a gtk+ library for ocaml
<adrien>
there is one but it's not in the standard library
<Drakken>
_habnabit or type 'a t = Bottom of 'a * 'a t | Cons2 of 'a t * 'a * 'a t | Top of 'a t * 'a
cdidd has joined #ocaml
<TerTar>
I think Ocaml needs more public support or something
<Drakken>
it needs generic printing.
<_habnabit>
Drakken, you need an empty cell
<_habnabit>
for a totally empty deque
<_habnabit>
(but I'd just use the double-option.)
<Drakken>
sorry. type 'a t = Nil2 | Cons2 of 'a t * 'a * 'a t
<Drakken>
or not
TerTar has quit [Quit: Page closed]
twittard has joined #ocaml
<Drakken>
Wait, that's just an alist. You can put low values in the fsts and high values in the snds. That's how interval heaps work, except with a list instead of a heap.
ftrvxmtrx has joined #ocaml
cago has joined #ocaml
<Drakken>
Nil2 | Odd2 of 'a | Cons2 of 'a * 'a * 'a t
edwin has joined #ocaml
djcoin has joined #ocaml
ocp has joined #ocaml
wagle has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
<Ptival>
wow
<Ptival>
my OCaml program segfaulted :s
<adrien>
gdb it ;-)
<adrien>
or you're using too much memory
<Ptival>
it's a fuzz-test so it'll be hard to reproduce :(
wagle has joined #ocaml
<kaustuv>
A segfault can also be caused by too much non-tail recursion
<adrien>
always run your fuzz tests under gdb then ;-)
<Ptival>
maybe I should print the seed used or something
<adrien>
yes, too ;p
<Ptival>
kaustuv: since I had it loop 100k times before, I'm pretty sure the tail recursion is going on well
<Ptival>
0x000000000041c2dc in caml_interprete ()
<Ptival>
watdo?
<adrien>
"bt"
<adrien>
and show the backtrace
<Ptival>
#0 0x000000000041c2dc in caml_interprete ()
<Ptival>
#1 0x000000000040a630 in caml_main ()
<Ptival>
#2 0x000000000041b294 in main ()
<adrien>
that's, huh, nice
<adrien>
I doubt it but can you reproduce it with native code?
<thelema>
zcero: since oasis uses ocamlbuild, all the files ocamlebug needs are in _build/ - maybe use -I _build/ when running ocamldebug?
djcoin has quit [Quit: WeeChat 0.3.2]
<zcero>
thelema: Yup. That seems to be the problem. Haven't used ocamldebug that much. Seems like i haven't built my libraries with debug info.
<zcero>
thelema: hmmm.. ocamldebug cannot find some modules (third party libraries). Am I right in assuming they are build without debug info, or is there a way to add them so oacmldebug can find them?
cago has quit [Read error: Connection reset by peer]
<csmrfx>
ok
<csmrfx>
is Oasis defacto?
<csmrfx>
(is it *the* build tool for OCaml?)
<zcero>
csmrfx: It wraps several of the other build systems. ocamlbuild is one of them that comes with the compiler from INRIA.
<NaCl>
s/several/one/
<NaCl>
unless the others have been implemented
<csmrfx>
so, ocamlbuild is the 'rake' of OCamlworld
<csmrfx>
or will Oasis be that?
<zcero>
I thouhgt it did wrap others? ocamlbuild works so I haven't tried any other.
<csmrfx>
ok
<zcero>
csmrfx: probably. But OCaml Pro is working on some kind of package manager. Don't know anything about the plans for that though.
<csmrfx>
wait, package manager? you mean oasisdb?
<zcero>
csmrfx: No another one I think. At least there is a github repo for one. Forgot about oasisdb. If it's half as good as oasis it's going to be great.
<zcero>
starting to sound like a oasis groupie now, but it's really working very well.
fraggle_ has quit [Remote host closed the connection]
<zcero>
gah.. I'm trying to debug a module using stuff from jane streets core library and ocamldebug keeps saying "Cannot find module Core.Std". I use GODI to install packages. Am I right in assuming that GODI doesn't build libraries with debug info?
ulfdoz has joined #ocaml
fraggle_ has joined #ocaml
benozol has quit [Quit: Konversation terminated!]
The_third_man has quit [Ping timeout: 248 seconds]
<thelema>
do the Obj.magics go away if you put next inside the let () =?
<mrvn>
nope. still: Error: This expression has type task but an expression was expected of type M.a
<hnrgrgr>
mrvn: on line 15 use: module M : DList with type a = task = struct
<hnrgrgr>
otherwise M.a is abstract.
<mrvn>
thx.
<mrvn>
that was it.
<_habnabit>
hnrgrgr, hum, what's the difference?
<mrvn>
you can't access abstract types from outside the module or cast the type
Zedrikov has joined #ocaml
<_habnabit>
ah
<hnrgrgr>
The type signature (M : DList) hides the concrete type definition of type a. And outside the module M, the type 'M.a' is not equal to 'task' anymore.
<_habnabit>
right, okay
<hnrgrgr>
another solution is to remove the type constraint: module M = struct ... end
<thelema>
better to use clang's error messages - they're much better
<pippijn>
thelema: yes, but they are too good
<pippijn>
they contain too much context information
<pippijn>
so I can't use them
<pippijn>
besides
<pippijn>
this is just a temporary solution
<pippijn>
so I have anything at all
<thelema>
I've been thinking about improving the ocaml parser so it could produce clang-quality error messages
<pippijn>
with a generated parser, you're not going to get there so easily
cdidd has quit [Ping timeout: 245 seconds]
<thelema>
how hard could writing a custom parser for ocaml be? <cough, cough>
<pippijn>
not that hard, I think
<pippijn>
but then making it produce good error messages is
<pippijn>
ocaml doesn't seem to be a very difficult language to parse
Tobu has quit [Ping timeout: 260 seconds]
<pippijn>
type checking is more difficult, but that's already there
<thelema>
true. That said, the grammar has its problems
<pippijn>
like what?
<thelema>
a missing ; gives an error far away
<thelema>
rather, an extra ;
<pippijn>
ah
<thelema>
missing the semicolon at the end of a printf gives an amazingly complex error message
<pippijn>
right
<pippijn>
with the format type
<pippijn>
but that's a type error
<thelema>
granted.
<thelema>
what else... if/then/else has no terminator
<thelema>
which is great for very short if/then/else, but terrible when you try to put a debug statement in your else, and the code that was there is always run
<pippijn>
that's true
<thelema>
total lack of single-line comments is annoying sometimes
<thelema>
but syntax highlighting deals with that okay
<Drakken>
you definitely have to remember that if has higher precidence than ;
<pippijn>
sometimes I want to comment out large blocks of code that contain strings with (* in them
<Drakken>
unlike try, let, and match
<Drakken>
or sml for that matter
<thelema>
Drakken: the best part is that using 'let' directly inside your 'then' allows ; sequences
<thelema>
if b then let a = b in foo; bar else baz
djcoin has joined #ocaml
Tobu has joined #ocaml
<Drakken>
thelema I don't have a strong opinion on the subject yet. I just try to remember what the current rules are :)
<pippijn>
I was happy to see that the functional way (first building a list of symbols and then adding them all to the hash table in one go) is roughly as fast as the imperative way (adding symbols while traversing)
<pippijn>
and this way, it's much nicer :)
<pippijn>
by the way, I've noticed that the number of times something compiles and works the first time I type it in is much higher in ocaml than it is in C++
<pippijn>
I'm more and more amazed by that fact
ikaros has quit [Quit: Ex-Chat]
<Drakken>
yep
thomasga has quit [Quit: Leaving.]
djcoin has quit [Quit: WeeChat 0.3.2]
<ousado>
pippijn: you said you wrote a C++
<ousado>
.. parser?
<thelema>
ousado: C89
Drup has quit [Quit: Leaving.]
<ousado>
lemme check the backlog ..
Tobu has quit [Ping timeout: 260 seconds]
<ousado>
yep: [21:18] <pippijn> I've written a C++ parser in C#
<ousado>
that was yesterday
<pippijn>
ousado: yes
<ousado>
pippijn: just wanted to ask, a complete one?
<pippijn>
pretty much
<ousado>
wow..
<pippijn>
template templates have issues in certain situations