ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
onigiri has quit []
verte has joined #ocaml
phf has joined #ocaml
phf has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Mr_Awesome has joined #ocaml
ski_ has joined #ocaml
tmaedaZ is now known as tmaeda
mjonsson has quit [Remote closed the connection]
valross has quit [Remote closed the connection]
caligula_ has joined #ocaml
shazam has joined #ocaml
shazam is now known as palomer
caligula__ has quit [Read error: 110 (Connection timed out)]
verte has quit ["~~~ Crash in JIT!"]
f[x] has joined #ocaml
ttamttam has joined #ocaml
ski_ has quit ["Lost terminal"]
ski_ has joined #ocaml
_zack has joined #ocaml
deavid has joined #ocaml
verte has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
_zack has joined #ocaml
munga has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
mfp has joined #ocaml
julm_ has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
julm has joined #ocaml
munga has quit [Read error: 113 (No route to host)]
julm_ has quit [Read error: 110 (Connection timed out)]
kaustuv_` has joined #ocaml
kaustuv_ has quit [Read error: 110 (Connection timed out)]
tmaeda is now known as tmaedaZ
ikaros has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
hkBst has joined #ocaml
julm_ has joined #ocaml
jonafan has quit [robinson.freenode.net irc.freenode.net]
tiz_ has quit [robinson.freenode.net irc.freenode.net]
kattla1 has quit [robinson.freenode.net irc.freenode.net]
patronus has quit [robinson.freenode.net irc.freenode.net]
jonafan has joined #ocaml
tiz_ has joined #ocaml
kattla1 has joined #ocaml
patronus has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
Alpounet has joined #ocaml
Alpounet has quit [Remote closed the connection]
mihamina has joined #ocaml
<mihamina>
hi all
<mihamina>
using ocamlnet/netcgi, i would like to play with exception, and if a cookie does not exist, I crate it. I do that with http://pastebin.com/m7fd732dc
<mihamina>
but I fail, because the "with" must be a string....
<mihamina>
how to?
animist has joined #ocaml
<mihamina>
nope, I was wrong
<mihamina>
cookie.value is a string
ikaros_ has quit ["Leave the magic to Houdini"]
Alpounet has joined #ocaml
julm_ is now known as julm
_andre has joined #ocaml
Alpounet has quit [Remote closed the connection]
Alpounet has joined #ocaml
julm_ has joined #ocaml
RLa has joined #ocaml
<RLa>
hey, where i could find package netstring?
mihamina has quit ["Leaving."]
verte has quit ["~~~ Crash in JIT!"]
thrasibule has quit [Read error: 110 (Connection timed out)]
albacker has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
kaustuv_ has joined #ocaml
jimmyb2187 has left #ocaml []
kaustuv_` has quit [robinson.freenode.net irc.freenode.net]
ttamttam has quit [robinson.freenode.net irc.freenode.net]
thelema has quit [robinson.freenode.net irc.freenode.net]
aij has quit [robinson.freenode.net irc.freenode.net]
tomaw has quit [robinson.freenode.net irc.freenode.net]
tomaw has joined #ocaml
aij has joined #ocaml
jimmyb2187 has joined #ocaml
thelema has joined #ocaml
<thelema>
RLa: it's part of ocamlnet
albacker has quit ["Leaving"]
julm_ is now known as julm
seanstickle has joined #ocaml
willb has joined #ocaml
ttamttam has joined #ocaml
Dodek has joined #ocaml
<Dodek>
hey, i can use + as a function by surrounding it with parentheses - (+). It doesn't seem to work with cons (::). what should i do?
tmaedaZ is now known as tmaeda
<Alpounet>
you can with @
<Alpounet>
not with (::)
<Dodek>
oh. why's that?
<orbitz>
:: is a constructor
<orbitz>
not a function
<orbitz>
or at least that's wha ti tis in Hakell
<orbitz>
i would imagine the same basic idea applies
<Alpounet>
@ lets you concat 2 lists
<Alpounet>
[1;2] @ [3;4] gives you [1;2;3;4]
<thelema>
yes, :: is the constructor for lists
<thelema>
@ is a function that concatenates two lists.
<thelema>
let cons a b = a :: b
<Alpounet>
:: is often called "cons"
<Dodek>
i get it now.
<orbitz>
and contructors can't be curried/firstclass
<Dodek>
it would be useful, i guess
<Dodek>
i just tried to reverse a list by doing "fold_left (::) [] list"
<orbitz>
surely that is better written List.rev
<thelema>
just declare 'cons' and use it for functions
<Dodek>
i think so, i just wanted to do it myself
<orbitz>
in otherwords, I think you'd have to come up with a more motivating example for (::)
<Dodek>
why can't 'cons' be part of List module?
_zack has quit ["Leaving."]
<orbitz>
it just sin't. Ocaml's stdlib is very thin
<thelema>
It's in batteries' List module.
* thelema
needs to put some work in aaa batteries so people might actually be able to use it.
ikaros has joined #ocaml
Pepe__ is now known as Pepe_
r0bby_ has joined #ocaml
r0bby has quit [Read error: 60 (Operation timed out)]
_zack has joined #ocaml
seanstickle has quit []
Dodek has left #ocaml []
smimou has quit ["bli"]
smimou has joined #ocaml
RLa has quit [Read error: 113 (No route to host)]
mol has joined #ocaml
mol has quit ["Leaving"]
ski_ has quit ["Lost terminal"]
<thelema>
grr! again with the needing to build graphs using mutation...
<thelema>
immutable structures suck for non-regularly cyclic structures
<thelema>
I think...
<thelema>
hmm, maybe the way I'm building is actually exactly the way I need...
smimram has joined #ocaml
<thelema>
now I have a function that takes a structure and gives me a node with labeled transitions to other structures
<thelema>
val canonize : reg -> reg IMap.t
smimou has quit [Read error: 110 (Connection timed out)]
<thelema>
and all I need to do is memoize this, and use the straightforward recursive node building...
<thelema>
nope, still need mutability - have to build the nodes, and then add the edges.
albacker has joined #ocaml
_zack1 has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
ttamttam has quit ["Leaving."]
* thelema
wonders if there's an in-use Finite Automaton library for ocaml
f[x] has quit [Read error: 110 (Connection timed out)]
Modius has joined #ocaml
ttamttam has joined #ocaml
Narrenschiff has joined #ocaml
<thelema>
hmm, I find a paper on exactly what I want, and it seems the code has disappeared...
<thelema>
anyone know about a Dash project at LSV (@ ENS-Cachan)?
jeddhaberstro has joined #ocaml
<albacker>
if i create a string of length A using String.create can i add A+1 chars to it without needing to run another String.function ? or should i copy all the information to a A+1 string that i have to create
<thelema>
albacker: strings don't automatically extend - you get an error from trying to g ooutside bounds
<thelema>
Use a buffer if you want to accumulate strings
<albacker>
so i have to create a A+1 string and copy the first A chars and add the last one? or is there a better idea.
<thelema>
Buffer
<albacker>
oh :/
<albacker>
never used/read code that uses that.
* albacker
looks at Buffer in the lib.
<albacker>
thelema, so if i do let a = ref Buffer.create 1. i can then extend a to as many chars as i want?
<thelema>
let a = Buffer.create 20
<thelema>
you don't need buffer references - buffer is mutable, like hashtbl
<thelema>
and size 1 is a bad size for a buffer, as it'll have to grow a lot
<albacker>
ok
<albacker>
thanks
subito has joined #ocaml
<albacker>
is there a string_of_int function or a way to concatenate chars with strings?
<subito>
hi, i'm trying to make the list of all the partitions of a list (of a set) with the ordering taken into account (for instance [ [3];[1;2] ] is not the same than [ [1;2];[3] ]) however when i try to start my code with 9 elements i have a stack overflow but i don't understand where it comes from since i have used a List.rev_map on the last line instead of List.map
<mfp>
albacker: in Buffer?
<mfp>
albacker: there's Printf.bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a
<albacker>
mfp, yes. if i have a a buffer and i an integer. i'd like to add it at the end for ex.
<mfp>
either bprintf buf "%d" n
<subito>
(hm sorry actually [3];[1;2] is the same than [1;2];[3] but not the same than [3];[2;1]
<mfp>
or Buffer.add_string buf (strinf_of_int n)
<mfp>
s/n/i/g
<mfp>
s/\<n\>/i/g even
<albacker>
:)
<albacker>
thanks
<mfp>
np
_andre has quit ["leaving"]
<subito>
is there a way to avoid the stack overflow?