mcclurmc has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 246 seconds]
pyon has quit [Quit: These skies and seas hold great possibilities for you. Stay alive. Pursue happiness. I expect much from your life.]
bytbox has joined #ocaml
heidi-ann has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
<johnf>
and one more camlp4 question, how do I handle optional values, e.g. type t = { a : int option }. I tried to print the AST using <:str_item< ... >> and duplicate it but get this error,
<johnf>
Error: The constructor Ast.ExApp belongs to the variant type Camlp4.PreCast.Ast.expr but a constructor was expected belonging to the variant type option
axiles has joined #ocaml
bytbox has quit [Remote host closed the connection]
SethTisue has quit [Quit: SethTisue]
path[l] has joined #ocaml
rbm has quit [Ping timeout: 240 seconds]
WraithM has joined #ocaml
cespinoza has quit [Ping timeout: 255 seconds]
cespinoza has joined #ocaml
yacks has quit [Quit: Leaving]
Hannibal_Smith has joined #ocaml
slash^ has joined #ocaml
heidi-ann has quit [Quit: heidi-ann]
rand000 has joined #ocaml
WraithM has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
heidi-ann has joined #ocaml
samrat has joined #ocaml
pyon has joined #ocaml
rand000 has quit [Ping timeout: 260 seconds]
cespinoza has quit [Ping timeout: 240 seconds]
cespinoza has joined #ocaml
zpe has joined #ocaml
zarul has quit [Ping timeout: 260 seconds]
yacks has joined #ocaml
claudiuc has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Sto andando via]
zarul has joined #ocaml
Simn has joined #ocaml
heidi-ann has quit [Quit: heidi-ann]
pgomes has joined #ocaml
pgomes has quit [Client Quit]
englishm has quit [Remote host closed the connection]
heidi-ann has joined #ocaml
englishm has joined #ocaml
<Drup>
Leonidas: huum, what's wrong in specifying a max length ?
<Drup>
it's only a max length, not the length of the string allocated
WraithM has joined #ocaml
AltGr has joined #ocaml
cago has joined #ocaml
eizodo-- has joined #ocaml
<mrvn>
Drup: the only reasonable max length is infinity
eizodo-- is now known as eizodo
eizodo is now known as amixofgreedandcu
amixofgreedandcu is now known as curiosity
curiosity is now known as eizodo
eizodo is now known as thatsthepoint
thatsthepoint is now known as eizodo
<Drup>
mrvn: no it's not, not when you are storing data comming from untrusted internet
Sizur has joined #ocaml
<mrvn>
Drup: you stream that, you don't store it all in memory.
<Drup>
by taking chunck of it, hence the max lenght argument ...
<mrvn>
Nobody will ever download more than 2GB via http, right? Damn, that Debian.iso has 4.7Gb.
<mrvn>
Drup: if max length determines the chunk size then that is named wrong
<Sizur>
i'm just starting with ocaml and need direction under emacs: Tuareg or TypeRex or OCaml IDE?
<Drup>
you don't understand, it's an attack vector against your server ...
<mrvn>
Sizur: I use tuareg
<Sizur>
mrvn: did you try typerex?
cdidd has quit [Quit: Leaving]
ggole has joined #ocaml
<Drup>
Sizur: typerex is dead, don't use it
<Drup>
either tuareg+ocp-index, or tuareg+merlin
<Sizur>
i cannot find any info about capabilities of tuareg
<Drup>
(merlin is fabulous, but slightly less reliable than ocp-index, try both)
slash^ has quit [Read error: Connection reset by peer]
<Sizur>
thanks for pointers
zpe has quit [Remote host closed the connection]
slash^ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
hhugo has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<Leonidas>
Drup: the problem with a maximum size is getting a number that is a reasonable maximum size
<Leonidas>
I don't know what the size will be but wouldn't want the program to break just because I set a maximum size too small
<mrvn>
see above, infinity
<Drup>
....
<Leonidas>
whereas I don't care much about memory usage, if it gets too big, the kernel can still kill it.
<mrvn>
or at least make it configurable. Don't hardcode some limit that will make it break next year
<Leonidas>
i get that it is a preference, but it would be nice to be able to choose.
cdidd has joined #ocaml
<Drup>
mrvn: you do realize that there is a max length for strings in ocaml ?
<Drup>
Leonidas: Sys.max_string_length, if you don't care
<Leonidas>
Drup: okay, yup that works for me. thanks.
<Drup>
(but do realize it's technically a security hole for your server :p)
<Leonidas>
yep, noted :-)
<mrvn>
Drup: in 32bit that even is ridiciously 16MB low.
<Drup>
in 32bit.
<Leonidas>
why so low?
<mrvn>
At university I had input data that was 300 byte too big for a string.
<Leonidas>
for my purposes this is pretty much enough but still kinda odd
<mrvn>
Leonidas: the length is encoded in the tag word of the block of memory. Only so many bits in a 32bit word.
<Drup>
on 64bit, it's pretty close to infinity
<Leonidas>
Drup: another question: what am I doing wrong with Streamlist? My code compiles but none of the streams gets evaluated. I posted to the ocsigen ML...
<Drup>
Leonidas: haven't look at it just yet
<Leonidas>
mrvn: ah, that explains it. Fortunately 32 bit is on the way out anyway
<Leonidas>
Drup: its probably me doing something stupid
<mrvn>
"There is no statute of limitations on stupidity." -- Randomly produced by a computer program called Markov3.
<mrvn>
The difference between stupidity and genius is that genius has its limits. -Albert Einstein
<mrvn>
"Humans are good at doing stupid things. It's one of our talents, and one we like to exercise frequentyl." -- someone
<mrvn>
Leonidas: you are in good company
* Leonidas
:)
eikke__ has joined #ocaml
<Drup>
Leonidas: I didn't actually knew Eliom_registration.Streamlist :>
<Drup>
but, if you want only to do json, String should be fine
<Leonidas>
:>
<Leonidas>
yes, now that I have an upper limit
<Leonidas>
good thing I posted to the list, maybe someone can explain what is going on
<Leonidas>
or I could try looking into the source code
Hannibal_Smith has quit [Ping timeout: 272 seconds]
abbe_ is now known as abbe
Hannibal_Smith has joined #ocaml
ZenosDance has joined #ocaml
_0xAX has joined #ocaml
cespinoza has quit [Ping timeout: 268 seconds]
claudiuc has joined #ocaml
cespinoza has joined #ocaml
Kakadu has joined #ocaml
hhugo has joined #ocaml
troutwine is now known as troutwine_away
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
avsm has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
hhugo has quit [Quit: Leaving.]
troutwine_away is now known as troutwine
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rand000 has joined #ocaml
zpe has joined #ocaml
lbaan has quit [Quit: sleeping device]
hhugo has joined #ocaml
lbaan has joined #ocaml
elfring has quit [Remote host closed the connection]
Submarine has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
ollehar has quit [Quit: ollehar]
<NoNNaN>
it is possible to enable TargetOptions::GuaranteedTailCallOpt from ocaml binding in recent (>=3.4) llvm version?
zarul has quit [Ping timeout: 240 seconds]
<NoNNaN>
it seems that the llvm-c binding does not expose it
lbaan has quit [Quit: sleeping device]
WraithM has quit [Ping timeout: 246 seconds]
<jpdeplaix>
whitequark: ^
<whitequark>
NoNNaN: it is not
flygeneticist_ has joined #ocaml
flygeneticist_ has quit [Client Quit]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
hhugo has quit [Quit: Leaving.]
sad0ur has quit [Ping timeout: 245 seconds]
sad0ur has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
_0xAX has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
hhugo has joined #ocaml
zpe has joined #ocaml
avsm has joined #ocaml
ZenosDance has quit [Ping timeout: 272 seconds]
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Submarine has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<dmbaturin>
Is :: really an operator?
<def`>
no
<mrvn>
# (::);;
<mrvn>
Error: Syntax error: operator expected.
<mrvn>
:: is a Constructor
<mrvn>
(with magic)
WraithM has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<dmbaturin>
What are the other constructors? Is it possible to make your own?
<mrvn>
type t = Foo of int
<dmbaturin>
Well, that's a type constructor.
<mrvn>
same as ::
<mrvn>
type 'a list = :: of 'a * 'a list | []
bezirg has joined #ocaml
<dmbaturin>
But "normal" type constructors can't be used in infix form, right?
<mrvn>
that's the magic bit
<def`>
dmbaturin: no
<mrvn>
Anyone know why :: isn't an operator?
<def`>
a value constructor, not a type constructor:P
<def`>
mrvn: yes, because it's syntactically defined to behave like Uident (value constructors and module names)
<mrvn>
'let (::) x xs = List.Cons x xs' would use less magic
<def`>
yes, but you want to pattern match
<mrvn>
def`: for reasons of precedence?
<mrvn>
def`: ahh. right.
<dmbaturin>
Value constructor?
<def`>
mrvn: yep, that's all, it tries to mimick the behavior… it could be done differently, since its magic, you can fake more or less, but this way it sticks close to it
<def`>
yes, None, Some, Not_found, those are value constructors
<mrvn>
'yes' isn't a value constructor :)
<def`>
type constructors are bool, int, _ list, (_,_) Hashtbl.t, etc
lbaan has joined #ocaml
BitPuffin has joined #ocaml
philtom has joined #ocaml
avsm1 has quit [Quit: Leaving.]
Submarine has quit [Ping timeout: 246 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
_andre has quit [Quit: leaving]
philtom has quit [Ping timeout: 245 seconds]
bezirg has quit [Read error: Connection reset by peer]
oriba has joined #ocaml
clamky has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
hhugo has quit [Quit: Leaving.]
octachron has joined #ocaml
oscar_toro has quit [Quit: oscar_toro]
zpe has joined #ocaml
lbaan has quit [Quit: sleeping device]
axiles has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Page closed]
rgrinberg has quit [Quit: Leaving.]
Hannibal_Smith has quit [Ping timeout: 245 seconds]
Submarine has quit [Read error: Connection reset by peer]
rand000 has quit [Quit: leaving]
sepp2k has quit [Quit: Konversation terminated!]
lgm has joined #ocaml
<lgm>
Hello!
<oriba>
tried to set a breakpoint in ocamldebug.
<oriba>
the function seems to be unknown
<oriba>
"Unbound identifier"m I get as answer
bezirg has joined #ocaml
<oriba>
how can I se ocamldebug to find that function?
<lgm>
the type checker for ocaml 4.01.0 and i are having a disagreement.
<oriba>
in the docs its not mentioned how to pick a module, when declaring a functionname as bp
<ggole>
oriba: iirc, you have to advance time until "point" enters the scope of the function name
<oriba>
hmhh I tried with modulename and line-nuzmber and then I it stopped in that function. asking for the parameters of that function again gives me the same errmsg...
<oriba>
but they should be known, if I'm already inside...
<lgm>
the compiler feels that the function at line 317 is returning the wrong type
<oriba>
hmhh, ah, I typed run again and now it works...
<ggole>
lgm: wrong in what sense?
<ggole>
Isn't what you expect, or is failing with a type error?
typedlambda has quit [Ping timeout: 250 seconds]
<oriba>
ggole, ah, I thought "l" is list (as in gdb i?), but it meant "last" and so I was back at time = 0 that's why I needed to use "run" again..
WraithM has quit [Remote host closed the connection]
WraithM has joined #ocaml
typedlambda has joined #ocaml
philtor has joined #ocaml
tane has quit [Quit: Verlassend]
lbaan has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
Khady_ is now known as Khady
Khady has quit [Changing host]
Khady has joined #ocaml
englishm has quit [Ping timeout: 240 seconds]
ggole has quit []
MercurialAlchemi has quit [Ping timeout: 240 seconds]
<lgm>
The compiler suggests that the return type should be: (ReflectiveValue.ident, ReflectiveValue.value) ReflectiveEnv.map
<lgm>
This seems to me to be in direct contradiction to the declaration: val unify : pattern -> value -> env option
Simn has quit [Ping timeout: 268 seconds]
<lgm>
given that type env = ReflectiveValue.v_env
<lgm>
This is especially confusing as the compiler calculates that the type the function is returning is: Error: This expression has type env = ReflectiveValue.v_env
ontologiae has quit [Ping timeout: 264 seconds]
<lgm>
if i capitulate to the compiler's whims and return the type it wants it complains that this is inconsistent with the declared type
eikke__ has joined #ocaml
Sim_n is now known as Simn
mfp has quit [Ping timeout: 245 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
darkf has joined #ocaml
<Leonidas>
meh, Type string Ocsigen_stream.stream is not compatible with type
<Leonidas>
string Ocsigen_stream.t
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
mfp has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
<Leonidas>
okay, I need to call Ocsigen_stream.get before reading