<pippijn>
troydm: by the way, String.length a - 1 doesn't need ()
<pippijn>
troydm: I think it would be better to add the "," as strings in the list and concat with ""
<adrien>
troydm: btw, String.length (like any Foo.length in the standard lib) is basically free
<troydm>
adrien: what do you mean by free ?
ikaros has joined #ocaml
<pippijn>
troydm: O(1)
<pippijn>
List.length is not free
<pippijn>
but String and Array are
<troydm>
ic
<troydm>
you mean to count string's length it doesn't need to traverse each char
<pippijn>
right
<pippijn>
string length cannot change
<pippijn>
array length cannot change, either
<pippijn>
and it is stored along with the object
mye_ has joined #ocaml
ontologiae has joined #ocaml
mye has quit [Ping timeout: 245 seconds]
mye_ is now known as mye
<adrien>
heh, right, I had forgotten about List and a few friends :P
mye has quit [Ping timeout: 246 seconds]
mye has joined #ocaml
ben_zen has joined #ocaml
larhat has quit [Quit: Leaving.]
xavierm02 has joined #ocaml
milosn has quit [Ping timeout: 255 seconds]
jewel has joined #ocaml
milosn has joined #ocaml
matthewt is now known as fruitcake
milosn has quit [Ping timeout: 255 seconds]
milosn has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 260 seconds]
<wmeyer>
adrien: I wonder what is possible with GADTs, it looks like omega7.ml in the testsuite/typing-gadts shows what can be done
<wmeyer>
for instance it's easy to encode peano natural numbers with two operations, succ and pred, but one somebody is wanting addition it becomes more hairy, as there are no type level functions, therefore the recursion for adding number is not captured in the type
<wmeyer>
so there are hacks, to just encode in the plus data structure
ben_zen has quit [Ping timeout: 246 seconds]
<wmeyer>
i'm trying to work out a collection of basic data types that exploit GADTs, some obvious candidates would be Nat, List, Option, AVL trees
<adrien>
I have no experience with GADTs so far ='(
Cyanure has quit [Remote host closed the connection]
<wmeyer>
I understood GADTs after dependent types in fact
<wmeyer>
but not to the extent I can throw insane proofs using them
gnuvince has joined #ocaml
<troydm>
btw is there a way to turn readline support in ocaml interp
<troydm>
or i should use rlwrap?
<adrien>
rlwrap or ledit
<adrien>
these are the quickest solutions
<adrien>
and then there is utop I think
* wmeyer
tired, will have a nap
Cyanure has joined #ocaml
ygrek has joined #ocaml
voglerr has joined #ocaml
ben_zen has joined #ocaml
voglerr has quit [Quit: Leaving]
lolcathost has quit [Ping timeout: 255 seconds]
Snark has joined #ocaml
gnuvince has quit [Ping timeout: 255 seconds]
<adrien>
if I have a bytecode program and changes ocamlrun, will it still work?
<adrien>
changing ocamlrun and nothing else
lolcathost has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 255 seconds]
gnuvince has joined #ocaml
fraggle_laptop has joined #ocaml
<adrien>
yeah, it works =)
Kakadu has quit [Ping timeout: 244 seconds]
Kakadu has joined #ocaml
hongboz` has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
mattrepl has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
eikke has joined #ocaml
fraggle_laptop has quit [Ping timeout: 264 seconds]
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Guest95276 is now known as micro
micro is now known as Guest18906
fraggle_laptop has joined #ocaml
Yoric has joined #ocaml
tane has joined #ocaml
Qrntz has joined #ocaml
Qrntz has quit [Changing host]
Qrntz has joined #ocaml
fraggle_laptop has quit [Ping timeout: 245 seconds]
<adrien>
you want to use the second definition of "bleh" in the function?
<syamajala>
yeah
<syamajala>
but i dont really wanna pass it in as argument because that would involve changing a lot of code
<adrien>
you can use references which are mutable
<adrien>
but using references to avoid refactoring is a bad idea
<adrien>
especially since refactoring in ocaml is very easy thanks to the type system
<syamajala>
also
<syamajala>
in tuareg mode is there anyway to send a whole file to ocaml?
<syamajala>
for emacs that is
<syamajala>
i use C-c C-e right now
mye has quit [Quit: mye]
ontologiae has quit [Ping timeout: 246 seconds]
jewel has quit [Ping timeout: 255 seconds]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
lolcathost has quit [Ping timeout: 246 seconds]
fraggle_laptop has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 245 seconds]
syamajala has quit [Remote host closed the connection]
lolcathost has joined #ocaml
wormphlegm has joined #ocaml
Yoric has quit [Ping timeout: 265 seconds]
ygrek has quit [Quit: Leaving]
<matthewt>
i want to write a function that generates a list of ints from 1..n http://pastie.org/5540526 this gives me n..1 but reversing the order of n::(interval(n-1)) gives me an error. is there another way i can do it?