FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
JuggleTux has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 240 seconds]
struktured has joined #ocaml
swgillespie has joined #ocaml
cschneid has joined #ocaml
t4nk908 has joined #ocaml
jeffmo has quit [Quit: jeffmo]
t4nk908 has quit []
darkf has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cthuluh has joined #ocaml
nullcatxxx_ has joined #ocaml
swgillespie has joined #ocaml
mac10688 has quit [Ping timeout: 244 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
Algebr has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
jeffmo has joined #ocaml
zpe has joined #ocaml
antkong_ has quit [Quit: antkong_]
antkong has joined #ocaml
zpe has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
MercurialAlchemi has joined #ocaml
antkong has quit [Quit: antkong]
antkong_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 244 seconds]
jmasseo has quit [Remote host closed the connection]
Algebr has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 250 seconds]
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
ggole has joined #ocaml
AlexRussia has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antkong_ has quit [Quit: antkong_]
Haudegen has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
__uu___ has joined #ocaml
johnf_ has joined #ocaml
johnf has quit [Ping timeout: 240 seconds]
__uu__ has quit [Ping timeout: 252 seconds]
johnf__ has joined #ocaml
johnf_ has quit [Ping timeout: 260 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ely-se has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
zpe has quit [Remote host closed the connection]
keen_____ has quit [Read error: Connection reset by peer]
keen_____ has joined #ocaml
zpe has joined #ocaml
ia0 has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
freehck has joined #ocaml
Pepe__ is now known as Pepe_
sh0t has joined #ocaml
AltGr has left #ocaml [#ocaml]
freehck has quit [*.net *.split]
struk|work has quit [*.net *.split]
antkong_ has joined #ocaml
larhat1 has quit [Quit: Leaving.]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
bjorkintosh has joined #ocaml
infinity0 has quit [Ping timeout: 268 seconds]
rwmjones_hols is now known as rwmjones
infinity0_ has quit [Remote host closed the connection]
yomimono has joined #ocaml
AltGr has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
sh0t has quit [Ping timeout: 268 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Ping timeout: 264 seconds]
ely-se has quit [Quit: leaving]
pw_ has joined #ocaml
infinity0_ has quit [Remote host closed the connection]
infinity0 has joined #ocaml
<pw_>
hi, is there a way to end a scope of a let-binding in ocaml? something like in scheme: (let ((x 1)) (display "x=1 from here on") ... (let ((x 2)) (display "x=2 from here on") ... ) (display "x=1 recoverd from here on") ...) ?
<ggole>
Enclose the let in begin end.
<Snark>
or "let ... in ... " ?
antkong_ has quit [Quit: antkong_]
jerith has quit [Remote host closed the connection]
<pw_>
ggole: I didn't know begin end. go to have a look now (I am new to ocaml, thanks)
<pw_>
Snark: I was talking about nested let ... in .., specifically, how to end the scoping of inner let ... in ...
zpe has joined #ocaml
<Snark>
oh, ok
<ggole>
let f x = begin let z = x + 1 in print_int z end; <z unbound here>
yomimono has quit [Ping timeout: 250 seconds]
<ggole>
A bit clumsy.
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
<pw_>
ggole: this one works well. thanks!
mort___ has joined #ocaml
vpm has quit [Ping timeout: 246 seconds]
mort___ has quit [Ping timeout: 265 seconds]
yomimono has joined #ocaml
ely-se has joined #ocaml
noze has joined #ocaml
<pw_>
seems begin let ... in ... end is the same as (let ... in ...)
zpe has quit [Remote host closed the connection]
<lyxia>
I believe begin/end works the same as brackets
<MercurialAlchemi>
yeah, begin/end is there to avoid an excessive amount of ()
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
tizoc has quit [Quit: Coyote finally caught me]
mort___ has joined #ocaml
ely-se has quit [Quit: leaving]
AlexRussia has joined #ocaml
dsheets has joined #ocaml
AltGr has left #ocaml [#ocaml]
ely-se has joined #ocaml
Simn has joined #ocaml
echo-area has quit [Remote host closed the connection]
eikke has joined #ocaml
ely-se has quit [Quit: leaving]
_andre has joined #ocaml
AlexRussia has quit [Ping timeout: 255 seconds]
mort___ has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 255 seconds]
ely-se has joined #ocaml
jerith has joined #ocaml
AltGr has joined #ocaml
BitPuffin has joined #ocaml
jabesed has joined #ocaml
manuel_ has joined #ocaml
Haudegen has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
tizoc has joined #ocaml
AltGr has left #ocaml [#ocaml]
jabesed has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
AltGr has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
FreeBird_ has quit [Ping timeout: 246 seconds]
AltGr has left #ocaml [#ocaml]
nopf has joined #ocaml
dsheets has joined #ocaml
mort___ has joined #ocaml
ceryo has joined #ocaml
ely-se has quit [Quit: leaving]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
ollehar has quit [Quit: ollehar]
ollehar has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
manuel_ has quit [Quit: manuel_]
rgrinberg has joined #ocaml
toolslive has joined #ocaml
NaCl has joined #ocaml
NaCl has joined #ocaml
NaCl has left #ocaml [#ocaml]
jimt_ has joined #ocaml
tane has joined #ocaml
mort___ has quit [Quit: Leaving.]
toolslive has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
kandu has quit [Ping timeout: 272 seconds]
jimt_ is now known as jimt
manuel_ has joined #ocaml
toolslive has joined #ocaml
obadz- has joined #ocaml
obadz has quit [Ping timeout: 250 seconds]
obadz- is now known as obadz
ely-se has joined #ocaml
mort___ has joined #ocaml
<toolslive>
seems to be a bug in lwt.2.5.0
<mfp>
toolslive: context?
dsheets has quit [Ping timeout: 246 seconds]
<toolslive>
I have a test that opens an ssl connection via Lwt; and it worked for several years, and several lwt versions, but now with lwt.2.5.0 it gives a SSL.Context_error: It seems somehow, the ssl library forgets Ssl.init() was called already.
<toolslive>
I'm still trying to get to the bottom.
<toolslive>
basically, it's Ssl_threads.init();Ssl.init ~thread_safe:true (); ............. Lwt_main.run (.............. let protocol = Ssl.TLSv1 in let ctx = Ssl.create_context protocol Ssl.Both_context in ...........)
<toolslive>
but the bare metal example works. so some of the dots are relevant ....
MercurialAlchemi has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
ely-se has quit [Quit: leaving]
<mfp>
toolslive: there's been a few changes in lwt.ssl as of late, but AFAIK nothing that would affect that (allow to set socket options, avoid allocation, allow to specify buffers). Could it be an ocaml-ssl issue?
jwatzman|work has joined #ocaml
<toolslive>
well, I switched version from an installed 2.5.0 to a 2.4.8 with opam install lwt.2.4.8 and it did not change the ocaml-ssl version.
kandu has joined #ocaml
<toolslive>
the question is also: how do I debug this?
<mfp>
the error is coming from Ssl.create_context ?
<mfp>
(I assume you're getting backtraces)
<toolslive>
exception Ssl.Context_error Raised at file "src/core/lwt.ml", line 789, characters 22-23 Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
<toolslive>
we're not doing anything ssl related yet. (you need a contex before you can start, and the very first lines of the program are Ssl_threads.init(); Ssl.init ~thread_safe.true () ... can't do much wrong there.
<toolslive>
)
<mfp>
yes, getting lwt_* in the backtraces is not so helpful :-/ maybe try wrapping create_context with debug printfs to make sure
marsam has joined #ocaml
<mfp>
and then say ltrace might shed some light on the actual openssl function that's failing (if elsewhere)
<toolslive>
lemme try that
<toolslive>
(btw, the bytecode version has the same problem, but debugging & stepping that didn't learn me anything)
fds has quit [Changing host]
fds has joined #ocaml
ely-se has joined #ocaml
<toolslive>
that's really interesting. SSL_CTX_new(0x7f230524b1a0, 1, 0xbfa340, 0) was the first SSL related call. I would expect SSL_library_init() to be issued, ltrace does not show that
infinity0 has quit [Ping timeout: 250 seconds]
schoppenhauer has joined #ocaml
<schoppenhauer>
hi. how is the default sum-type called in ocaml? (It's Either in Haskell)
<schoppenhauer>
I mean I could define it myself, but if there's a standard one, I want to use it
<def`>
There is none in the current version. It will be result in the next version
slash^ has joined #ocaml
<schoppenhauer>
ok.
<dsheets>
result is a bit more specific than just Left/Right, though
<schoppenhauer>
ok, then I'll just define one myself.
<mfp>
toolslive: could there be another Ssl.create_context in the program that's being called when the corresponding module is initialized? (link order might have changed for some reason)
<Drup>
either is not a great idea anyway
<Drup>
you never know which one encodes what, the functor instance for it is completely arbitrary, ...
vpm has joined #ocaml
<toolslive>
the compilation instructions haven't changed.... what determines link order?
<mfp>
the build system (yours + that of the libs you depend on)?
infinity0 has joined #ocaml
<toolslive>
cucu (printing) before and after the SSL.init () call is are not printed (and yes, I flush) before the error comes.
ncthom91 has joined #ocaml
ely-se has quit [Quit: leaving]
RichN has joined #ocaml
ely-se has joined #ocaml
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
ely-se has quit [Quit: leaving]
ollehar has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
__rlp has quit [Ping timeout: 240 seconds]
__rlp has joined #ocaml
antkong_ has joined #ocaml
AlexRussia has joined #ocaml
__uu___ has quit [Ping timeout: 240 seconds]
psy_ has joined #ocaml
tane has quit [Ping timeout: 246 seconds]
mort___ has quit [Quit: Leaving.]
tane has joined #ocaml
mort___ has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psy_ has quit [Ping timeout: 252 seconds]
<toolslive>
ok. thx for the hint about the order.... in the end, patch got merged in, and somewhere a semi colon was missing, promoting the "second" part of the body of a function to top level.....
rgrinberg has quit [Ping timeout: 260 seconds]
<Drup>
I'm curious to see the piece of code where this can happen
<Drup>
toolslive: I was curious about the state of baardskeerder
<toolslive>
I haven't touched baardskeerder in years. It was abandoned for arakoon because a customer demanded rolling upgrades between the tokyocabinet based arakoons and the baardskeerder based arakoons.... something I considered too much work.
<Drup>
I see
<toolslive>
otoh, baardskeerder works.
<Drup>
Ok
jfntn has joined #ocaml
<companion_cube>
Drup: what do you want to use baardskeerder for?
<toolslive>
you can use it as a single file key value store....
<toolslive>
it has transactions, and guarantees that you don't corrupt the file as it is append only.
<toolslive>
so it works fine for ssds, but the random io becomes painful for hdds
<Drup>
Mostly curiosity, really
mort___ has joined #ocaml
jeffmo has quit [Quit: jeffmo]
<toolslive>
there is however no guarantee that a power cut will not corrupt your database. even if you never touch something, a power cut can completely corrupt your ssd.
<toolslive>
when I wrote baardskeerder, I had the illusion that an append only strategy would safeguard things because there are no in-place updates.
tane has quit [Quit: Verlassend]
<dsheets>
need to buy ssd with a supercap ("enterprise")
^elyse^ has joined #ocaml
<toolslive>
even that is a lie.
<toolslive>
(that was my illusion: since there are no moving parts, adding a capacitor should give you enough energy to consolidate)
<dsheets>
oh? i thought if you pay enough, they'll sell you a device which flushes cache after it loses DC?
<toolslive>
I'm trying to find the paper again that showed how disappointing reality really is.
antkong_ has quit [Quit: antkong_]
<toolslive>
since the device could be doing a rewrite or gc, you might even lose data you were not even using (not reading, not writing)
^elyse^ has quit [Quit: Leaving]
<toolslive>
so the best defense is something like arakoon for small values and a distributed storage system based on error correction for large values.
<toolslive>
and be sure that not all your nodes share the same power supply....
<dsheets>
ugh... seems that local durability has been abandoned :-(
<reynir>
#show_module is for situations where you have a module and a module type with the same name, or?
demonimin has quit [Quit: No Ping reply in 180 seconds.]
l1x has quit [Ping timeout: 250 seconds]
demonimin has joined #ocaml
demonimin has joined #ocaml
l1x has joined #ocaml
tomboy65 has joined #ocaml
tomboy64 has quit [Ping timeout: 265 seconds]
xificurC has joined #ocaml
<mrvn>
Biggary can store 32bit single pecision floats. Is there any way to get at the raw data for that? I need to send a single precision float as 4 bytes over the network.
<mrvn>
(excluding C code)
xificurC has quit [Remote host closed the connection]
ygrek has joined #ocaml
xificurC has joined #ocaml
<poulpeux>
Int32.bits_of_float :)
rgrinberg has joined #ocaml
shinnya has joined #ocaml
pw_ has joined #ocaml
orbifx has joined #ocaml
mort___ has quit [Quit: Leaving.]
pw_ has quit [Ping timeout: 240 seconds]
JJMcHyperklauz has joined #ocaml
<JJMcHyperklauz>
Is there any way to use the .ml files in the current woring directory as modules in utop?
nullcatx_ has joined #ocaml
<ggole>
#mod_use for individual files
_andre has quit [Quit: leaving]
<ggole>
Anything really complicated should probably be done with a build system.
orbifx has quit [Quit: WeeChat 1.3]
nullcatxxx_ has quit [Read error: Connection reset by peer]
<JJMcHyperklauz>
ggole, why thank you.
quelqun_dautre has joined #ocaml
<quelqun_dautre>
hi
ggole has quit [Ping timeout: 260 seconds]
<mahem1>
Error: unbound value hi
mort___ has joined #ocaml
<MercurialAlchemi>
I need to find a better interface for toml
<MercurialAlchemi>
these casting functions all over the place make it quite unpleasant to use
<companion_cube>
hmm are you the original author?
<MercurialAlchemi>
no, I accidentally became co-maintainer after writing a chunk of functionality
<companion_cube>
I see
<MercurialAlchemi>
that said, nobody has been doing anything on it for a while
<companion_cube>
I use it a bit somewhere, but for simple things
<MercurialAlchemi>
I've been coming back to it and the 4.0 compliant branch now works
xificurC has quit [Remote host closed the connection]
<companion_cube>
having a really good APi would be a plus, though
<MercurialAlchemi>
yeah
<companion_cube>
I'd think something close to what Yojson does
<companion_cube>
(including the helpers)
<companion_cube>
would be nice
xificurC has joined #ocaml
toolslive has quit [Ping timeout: 256 seconds]
<MercurialAlchemi>
hmm
* MercurialAlchemi
peeks at yojson.safe
<MercurialAlchemi>
it looks like the v1 version of toml
<MercurialAlchemi>
minus the fact that it's polymorphic variants
<companion_cube>
Drup: any advice on a nice API to toml?
sh0t has joined #ocaml
<MercurialAlchemi>
on one hand, it leads to idiomatic OCaml code
<MercurialAlchemi>
on the other hand, with immutable data structure, any update of a nested value leads to idiotic OCaml code
<companion_cube>
it's still nice to have
jmasseo has joined #ocaml
<MercurialAlchemi>
maybe something like that zipper I made for the rose tree would work
mobius-eng has joined #ocaml
<MercurialAlchemi>
but even then it's a pain in the ass
<companion_cube>
make a separate module for the fancy stuff and the basics
<companion_cube>
I think the basics should define types and provide parse/print functions
<MercurialAlchemi>
yeah
<MercurialAlchemi>
I think hiding the internal types, in hindsight, was a mistake
<companion_cube>
make it simple ;)
<companion_cube>
a variant with a hashtbl in one case
<companion_cube>
or something like this
<companion_cube>
(I don't remember if it's truly nested)
<MercurialAlchemi>
"protect the implementation" isn't worth the casting crap (even if you could argue that it makes sense considering the non-1.0 status of the TOML spec)
<MercurialAlchemi>
you can nest to any depth
<companion_cube>
then I'd do this variant with hashtbl case
<MercurialAlchemi>
well, I do like immutable data structures...
<companion_cube>
well yeah, depends on whether the ordering is important
<MercurialAlchemi>
"update your config but keep the old config" is nice to have
<companion_cube>
or anyway, never mind
<MercurialAlchemi>
but you have the same problem with arrays
<MercurialAlchemi>
which can be nested
<MercurialAlchemi>
then you'd need to have mutable stuff everywhere
<companion_cube>
right, just go for immutable structs
<MercurialAlchemi>
maybe we just need an equivalent of xpath
<MercurialAlchemi>
tomlpath?
<MercurialAlchemi>
/key1/key2[position]
marsam has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
poulpeux has quit [Quit: Leaving]
<companion_cube>
I'd mostly need to read toml, not generate some
<companion_cube>
but still, a nice API to access sub-values...
<MercurialAlchemi>
yeah
marsam has quit [Read error: No route to host]
<MercurialAlchemi>
type safe "xpath" could be something
<MercurialAlchemi>
I'm going to have a look at the current implementations, this may give me some ideas
<MercurialAlchemi>
the Haskell folks have "no bells and whistles" implementations
<Algebr>
Why are some language extensions still "extensions". Looked at "Chapter 7 Language extensions" of the manual and there's stuff from like ocaml 3.0, like uh, why is this an extension and not part of the language proper
<Drup>
That is an excelent question.
<Drup>
I would however argue that they are perfectly part of the *language*
<Drup>
they are not, however, properly integrated in the documentation
<Algebr>
then the word extension is meaningless.
<Algebr>
Drup: then who can change this, the compiler programmers at INRIA?
<Drup>
everyone, the documentation is on github
<ollehar>
yey, my compiler collects 50% of the used memory!
pw_ has joined #ocaml
pw_ has quit [Ping timeout: 272 seconds]
Kakadu has quit [Remote host closed the connection]
theblatt1 has joined #ocaml
theblatte has quit [Ping timeout: 264 seconds]
obadz has quit [Ping timeout: 260 seconds]
swgillespie has quit [Read error: Connection reset by peer]
obadz has joined #ocaml
swgillespie has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lis has joined #ocaml
ncthom91 has joined #ocaml
ollehar has quit [Quit: ollehar]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
madroach has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]