JacobEdelman has quit [Quit: Connection closed for inactivity]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
danieli has joined #ocaml
danieli has quit [Max SendQ exceeded]
kakadu has quit [Remote host closed the connection]
ygrek has joined #ocaml
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
damason has joined #ocaml
haesbaert has quit [Ping timeout: 265 seconds]
haesbaert has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ncthom91 has joined #ocaml
ril has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
struk|desk|away is now known as struk|desk
<Mirry>
How can I simplify this? List.map (List.group (List.sort ~cmp:(compare) num) ~break:(<>)) ~f:(fun x -> (List.length x, List.head x));;
<Mirry>
with num = [1; 1; 3; 2; 1]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
contempt has quit [Ping timeout: 265 seconds]
contempt has joined #ocaml
br01 has quit [Quit: Quitte]
groovy2shoes has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pierpa>
mirry: do you want the result sorted, or only uniqued & counted?
<Mirry>
sorted, uniqued and counted
<pierpa>
then I don't think you can semplify what you did
philtor has quit [Ping timeout: 255 seconds]
<Mirry>
What if I use hashtables?
<Mirry>
Would it improve my code readability?
<pierpa>
that's what I was thinking
<pierpa>
but you want the result sorted
<pierpa>
so you must sort anyway
ril has joined #ocaml
<Drup>
do you need it polymorphic ?
<Mirry>
Nope, only integers
<Drup>
then use a map
<Mirry>
Yeah, that's what I'm gonna do, thank you both
<pierpa>
and, ahem, if the integers are bounded and not too big, an array?
<Mirry>
That I've tried pierpa
<pierpa>
if it is adeguate, it should be the simplest and also the fastest, no?
<Mirry>
That make sense
<Mirry>
Can I update an array with fold_left?
<pierpa>
sure
<pierpa>
fold_left (fun acc i -> acc.(i) <- acc(i) + 1) (Array.make N 0) list_of_int
<lyxia>
that's a map
JacobEdelman has joined #ocaml
<pierpa>
then, Array.fold_right (fun acc i x -> if x = 0 then (i,x)::acc else acc) [] result_of_previous_expression
<pierpa>
and he has a list with the result he wanted
<pierpa>
except that Array.fold_left does not supply the index :(
<pierpa>
*fold_right
<Mirry>
List.fold_left num ~init:(Array.create 10 0) ~f:(fun acc i -> acc.(i) <- acc.(i) + 1);; it doesn't work because the function doesn't return anything
<Mirry>
well it returns unit, which is of no interest
<pierpa>
make it return the acc
<Drup>
yeah, it should be an iter here
<pierpa>
(I didn't test the code)
struk|desk has quit [Quit: Konversation terminated!]
<Mirry>
almost got it !
<Mirry>
let frequency numbers = let arr = Array.create 10 0 in List.iter numbers ~f:(fun i -> arr.(i) <- arr.(i) + 1);;
<Mirry>
This is gonna sound dumb for sure, but, how the hell do I return arr?
<lyxia>
replace ";;" with "; arr;;"
<Mirry>
Perfect !
<Mirry>
Thank you very much
<pierpa>
the fun i shouldn't be fun () i ?
<pierpa>
or fun _ i
<pierpa>
ah, no, sorry
<pierpa>
ignore me :)
<Mirry>
: 'a list -> f:('a -> unit) -> unit = <fun>
<pierpa>
ignore me :)
<Mirry>
Sure nevermind
struk|desk has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haesbaert has quit [Ping timeout: 276 seconds]
haesbaert has joined #ocaml
kushal has joined #ocaml
ril has joined #ocaml
ncthom91 has joined #ocaml
struk|desk is now known as struk|desk|away
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
struk|desk|away is now known as struk|desk
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mcc has joined #ocaml
mac10688 has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Ping timeout: 276 seconds]
shinnya has quit [Ping timeout: 256 seconds]
rossberg has quit [Ping timeout: 264 seconds]
Accidus has quit [Ping timeout: 250 seconds]
cody` has joined #ocaml
maufred_ has quit [Ping timeout: 260 seconds]
maufred has joined #ocaml
darkf has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
Mirry has quit [Quit: leaving]
ollehar1 has joined #ocaml
Fleurety has quit [Ping timeout: 245 seconds]
struk|desk2 has joined #ocaml
struk|desk2 is now known as struk|desk|away
struk|desk has quit [Ping timeout: 260 seconds]
ril has joined #ocaml
sbrouf has quit [Quit: Quitte]
octachron has joined #ocaml
larhat1 has quit [Quit: Leaving.]
<adrien>
#7121 and #7122 on mantis plus skipping the copy of ocamlyacc$(EXE) and ocamlrun$(EXE) in the install: rule \o/
<adrien>
basically OOTB support for cross-compilation to Windows
MercurialAlchemi has joined #ocaml
freehck` has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
Haudegen has joined #ocaml
djellemah has joined #ocaml
tmtwd has joined #ocaml
cody` has quit [Quit: Connection closed for inactivity]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat has quit [Ping timeout: 265 seconds]
jacquev6 has joined #ocaml
larhat has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
inr_ is now known as inr
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sh0t has joined #ocaml
FreeBird_ has joined #ocaml
zpe has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
fluter is now known as fluter_
zaquest has quit [Ping timeout: 256 seconds]
zaquest has joined #ocaml
_andre has joined #ocaml
fluter_ is now known as fluter
Fleurety has joined #ocaml
sepp2k has joined #ocaml
fluter is now known as fluter_
mort___ has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
why coq doesn't use dypgen for its parser ?
FreeBird_ has quit [Remote host closed the connection]
jacquev6 has quit [Quit: jacquev6]
jacquev6 has joined #ocaml
struk|desk|away is now known as struk|desk2
<lewis1711>
sometime I want to use objects just so I don't have to write stupid code like "VM.eval vm"
raphaelss has joined #ocaml
<ggole>
I choose to write stupid code like Vm.eval vm so I don't have to use objects.
<lewis1711>
vm#eval. mmm
<Drup>
ggole: come on, they are not that bad in ocaml.
<Drup>
just slow, but typing/API wise, it's very reasonable
<ggole>
Open-endedness where you don't need it is pretty questionable in my eyes.
<ggole>
(When you need that stuff, objects are OK.)
zpe has quit [Remote host closed the connection]
<Anarchos>
Drup the typing of objects is awful for a day-work engineer :/
<Drup>
ggole: depending of the programming style, you don't necessary have to deal with the open-endedness at all
shinnya has joined #ocaml
<lewis1711>
Anarchos, you mean the structural typing?
<Anarchos>
lewis1711: no idea but i am unable to understand what the reference manual says about object and class typing
<ggole>
The RWO chapters are probably a bit more clear.
<lewis1711>
it's a really good object system. but different to other languages
<lewis1711>
I particularly like the way constructors are done
<Anarchos>
ggole: i should look at it for times :)
<Drup>
lewis1711: constructors are pretty much just functions
<lewis1711>
Drup, exactly
<Drup>
(with a few things for initializer)
<Drup>
I never understood why it was not like that in other languages
<Drup>
well, it's like that in javascript, almost
<ggole>
Because they have silly things like 'this' which needs special handling
<ggole>
(Not really a great reason.)
<Drup>
ggole: well, we have "this" too
<ggole>
Not in the constructor?
<Drup>
What we don't have in the late binding semantic, so it can only be used inside the object
<Drup>
but ... late binding semantic is insane ...
<companion_cube>
Drup: you mean 'self'? it's explicitely bound, so I don't think it should be compared to the usual 'this'
<Drup>
self/this, same thing
<ggole>
The issue is not that 'this' is implicitly bound, but that accesses to the fields may be made during object construction, which causes all kinds of problems
<ggole>
eg, Java has special rules to handle it
<ggole>
So constructors are 'special'.
Recurs has quit [Quit: Page closed]
<lewis1711>
I usually end up writing my modules in a semi-oo style anyway
<lewis1711>
each module has a type t, which is just the data
<Drup>
that's just hierachical, not really OOP :p
<lewis1711>
if ocaml had something like java's "final", I'd probably use modules a lot less
<Drup>
reminds me what this is
<companion_cube>
non heritable classes
<Drup>
what's the point ?
<lewis1711>
optimisation
<Drup>
ah, so that objects behaves like modules ? :D
<lewis1711>
kind of
<lewis1711>
except... then I could do vm#eval and not repeat myself ;)
<ggole>
So rather than the semantic features of objects, you just want foo.bar syntax?
<lewis1711>
it's an important idea though
<lewis1711>
also, then I could write a function that sums a sequence, and not care whether it was a list or array
<Drup>
yeah, it's a terrible idea to solve that with objects
<Drup>
objects are crap, as far as extensibility goes
<Drup>
you can't add methods after the fact
<Drup>
(and have good typing)
<Drup>
typeclasses/implicits are much better at solving this.
<MasseR>
hnngh, scala and implicits. Way to make code incomprehensible
<lewis1711>
Drup, C# is statically typed, and you can add methods to its objects
<Drup>
scala's implicits are a bit bleh
<Drup>
lewis1711: and how do you know statically if an object has a method ?
<ggole>
Elm does OK in terms of record extensibility
<lewis1711>
Drup, not sure, I didn't write the C# compiler
<ggole>
Although row variable records have their own costs
<lewis1711>
I think it's mainly a syntax hack
<lewis1711>
you write static methods that wrap the objects and have access to the public interface. but you call them as if they were methods
<Drup>
(also, C# is half static, half dynamic, and people are using the dynamic stuff a lot)
<lewis1711>
huh? extension methods are definitely not dynamic
<lewis1711>
how is C# half dynamic?
<ggole>
My understanding is that extension methods are lexically visible
<Guest86742>
Hello ! Does someone knows how to use classes in dynamically-loaded plugins (cma, cmxs) ? If I build a plugin containing "class t = object initializer print_endline "Hello !" end;; new t;;" and load it (in bytecode or native mode), it fails because of lacking CamlinternalOO or c stubs... Should I include more things to have it compile ?
<Guest86742>
(sorry for my english)
ygrek has joined #ocaml
jacquev6 has quit [Quit: jacquev6]
<smondet>
Guest86742: you should try with a dummy version of the plugin already loaded (with the program that does the dynlink), it looks like the linker is discarding modules that unused (at compile time)
slash^ has joined #ocaml
<Guest86742>
Well, now the bytecode works. There is still an invalid elf header error for my cmxs, but it will be fixed soon. Thank you :-)
<flux>
smondet, I wonder if that's actually a bug, so that dynlink should just load those parts as well?
kakadu has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
aphprentice has joined #ocaml
yomimono has quit [Ping timeout: 276 seconds]
tei has quit [Quit: WeeChat 1.5-dev]
<smondet>
flux: it's difficult to know what the user wants there :) if ocaml starts inclding modules that are not needed, we're are going to start complaining that “binaries take 42 KB more on my netbsd-router-toaster and that's totally inacceptable”
MercurialAlchemi has quit [Ping timeout: 240 seconds]
xyh has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 272 seconds]
<Drup>
smondet: it's probably going to be much more than 42KB
MercurialAlchemi has joined #ocaml
ril has joined #ocaml
Jane-PC has joined #ocaml
<Jane-PC>
Hi ! I'm learning OCaml on my own, and I'm stuck with an error.
<companion_cube>
that's almost correct, but you still have `enterNumber` as a constant
<companion_cube>
parametrize it with () and it should work
<companion_cube>
currently, enterNumber is a constant, so enteredNumber := enterNumber; does not do much
<Jane-PC>
as a constant ?
<companion_cube>
well it's a constant, not a function
<Jane-PC>
Ah ok.
<Jane-PC>
let enterNumber () =
<Jane-PC>
should work ?
<companion_cube>
it should, yes
<Jane-PC>
ok, I think I get it
<companion_cube>
note that it is the reason with read_int takes a () parameter
<Jane-PC>
Ok, it works.
<Jane-PC>
Yep'
<Jane-PC>
Hum..
<Jane-PC>
Now it's the boolean which seems to have wrong value.
<Jane-PC>
Or my Random.int 101; which is wrong.
<Jane-PC>
I put: "1833728", it says: "It's more", when it should be between 0 and 100 haha.
<Jane-PC>
Ah it's ok lol.
<Jane-PC>
let minus n = (secretNumber > n);; instead of let minus n = (secretNumber < n);;
<Jane-PC>
Thx for the help.
<companion_cube>
you're welcome
_andre has quit [Quit: leaving]
<Jane-PC>
Btw, I've got a question, I didn't find the answer on internet.
<Jane-PC>
Maybe you've got it.
<Jane-PC>
As ! is used to get the value of a ref.
<Jane-PC>
How can I write something like, in C: if(!a)
<Drup>
the "not" function
i_am_mahasamoot has joined #ocaml
<Jane-PC>
It works, thx.
<nullcatxxx_>
Drup : i'd like to rephrase my metaocaml question again...
<nullcatxxx_>
say you have a function ``fun arg1 arg2 ... argN -> result``, is it possible to generate a function ``fun g arg1 arg2 ... argN -> g result``
<Drup>
ooh, ok
<nullcatxxx_>
also, i can know the arity of the function.
<nullcatxxx_>
so i know the value of ``N``
<Drup>
isn't .< (fun g arg1 ... -> g (~.f arg1 ... ) >. enough ?
<Drup>
no CSP for functions ?
<nullcatxxx_>
you can't examine the inside of function...
manizzle has joined #ocaml
<nullcatxxx_>
you don't know the name of argument
<Drup>
you don't need to, since you said you have 1) the function 2) the arity
<Drup>
you juste have to CSP it and call it
<nullcatxxx_>
ok i see
<Drup>
I don't remember if you can CPS functions
<Drup>
worst case, you will be restricted to identifiers that are in another module, I think ?
<nullcatxxx_>
yes...
<nullcatxxx_>
let me think about it...
<nullcatxxx_>
say you can write out a function that does this
<nullcatxxx_>
what's the type the function then
<nullcatxxx_>
the type of the function
<nullcatxxx_>
i still feel it's not possible...
<Drup>
ah well, you need a gadt, obviously
<nullcatxxx_>
gadt for which part?
<Drup>
to count
<Drup>
ah, I see what your issue is
<Drup>
it doesn't have much to do with metaocaml :D
octachron has joined #ocaml
sh0t has quit [Ping timeout: 245 seconds]
exm has left #ocaml [#ocaml]
Algebr has joined #ocaml
<Algebr>
When an Lwt thread is canceled, presumably its garbage collected right? Also are there any good profilers for Lwt, like how many threads are being created, cleaned up, etc
<Algebr>
okay, nice. the state of an lwt thread is return, fail or sleep. under which one is it actually doing work, say in a loop?
spip has joined #ocaml
idegen has joined #ocaml
darkf has quit [Quit: Leaving]
spip has left #ocaml ["Konversation terminated!"]
Algebr has quit [Ping timeout: 260 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat1 has joined #ocaml
<kakadu>
Folks, If I need generic printer (general one, non ad-hoc) should I look at modular implicits or dyntypes?
<companion_cube>
in the future, you may have more luck with modular implicits
<kakadu>
Gasche mentioned something this year that they were created kind of for the same purpose
<companion_cube>
right now neither option is available, so I'd advise ppx_deriving
<kakadu>
No, deriving is not an option
<companion_cube>
why not?
<kakadu>
you kind of need to pass function t -> string to the place where printer is used
<kakadu>
And it is inavoidable with codegeneration approach
<kakadu>
At the moment I have a function 'a -> 'a t which wraps values to `my values` which should be printed
<kakadu>
I can pass printer explicitly when I call this wrapper
<kakadu>
but I want to avoid it
<companion_cube>
well right now you're out of luck
<companion_cube>
wait for modular implicits
<kakadu>
So, at the moment I see 4 optins which I don't like
<kakadu>
1) pass 'a -> string function explicitly which I don't like for obvious reasons
<Drup>
nullcatxxx_: wow, ok, that was messy
<kakadu>
2) As well as my code is neing runned in the toplevel I can add additional stage when I get typed tree, pass it to kind of PPX syntax extension, gneereate right code for printing when I aware of types, untype it, and pass back to the toplevel. Seems a large amount of work
<nullcatxxx_>
ok...
<kakadu>
3 and 4) are dyntypes and modular implicits which I 'm a little bit afraid to touch... TT
<kakadu>
Also, I heared that modular implicits could not be added to the compiler because there are some problems with proving soundness or something lioke that
<companion_cube>
it's not merged yet because of this, indeed
<companion_cube>
that's why it won't be in 4.03
<companion_cube>
but hopefully it will be in 4.04 (?)
i_am_mahasamoot is now known as mahasamoot
<nullcatxxx_>
def is working with jacques to formally prove the soundness of it...
Guest77356 is now known as Algebr``
<Drup>
nullcatxxx_: remind me, how do I solve "Reference to undefined global `Trx'" ?
<nullcatxxx_>
metaocamlc file.ml
ely-se has joined #ocaml
<nullcatxxx_>
did you use metaocamlc
<nullcatxxx_>
or ocamlc
<Drup>
woot, it works
JacobEdelman has quit [Quit: Connection closed for inactivity]
<nullcatxxx_>
can you add some notes on num and tuple?
freehck` has quit [Remote host closed the connection]
<Drup>
anyway, as usual, mighty diff lists to the rescue
<nullcatxxx_>
i didn't see close_code
zpe has joined #ocaml
<Drup>
no, that was just for a test
<Drup>
(I wanted to see the differences between the printing function you gave)
<Drup>
the main difficulty was to realize that I should use a reversed list for the arguments. I tried to reverse the number at the beginning and it didn't work
ril has joined #ocaml
<nullcatxxx_>
hold on sec...
<nullcatxxx_>
it's very close to what i want
<Drup>
I sense a "but"
<nullcatxxx_>
actually, the result should look like
<nullcatxxx_>
fun a b c g -> g (a + b + int_of_float c)
<Drup>
isn't that trivial code reduction from what we have ?
MercurialAlchemi has quit [Ping timeout: 272 seconds]
<nullcatxxx_>
let me figure that out =_=
<nullcatxxx_>
thank you so much
<Drup>
no problem, it was fun, but a bit too mind bending
<Drup>
I'm hungry now x)
<nullcatxxx_>
yesterday, i didn't realize i can have information about arity
<nullcatxxx_>
without arity, it's impossible...
<Drup>
yeah
<Drup>
nullcatxxx_: to have the expression you want
<Drup>
instead of "(arg1 -> .. -> ret) code", you would need "arg1 code -> arg2 code -> ... ret code"
<Drup>
it's possible too, I think
<Drup>
you need to change a few types here and there
<nullcatxxx_>
let me think about it. if i don't know how to do it, i'll come back to you
<Drup>
sure
please_help has quit [Quit: Leaving]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
<Algebr``>
Does it really matter if Lwt_io.server doesn't get a Lwt_io.shutdown server called on the server?
please_help has joined #ocaml
<Drup>
nullcatxxx_: done, gist updated
<nullcatxxx_>
thanks
<Drup>
nullcatxxx_: node that, with g = identity, we end up with a way of transforming "a1 code -> ... -> ret code" into "(a1 -> ... -> ret) code"
<nullcatxxx_>
this is so contrived..
<Drup>
no idea if it's usefull
<nullcatxxx_>
haha...
<Drup>
(with implicits, it would be even better)
<Drup>
(you would not need the number argument, it would be infered)
<nullcatxxx_>
wait...
<nullcatxxx_>
f now has type ``xx code -> yy code -> zz code -> uu code``
<nullcatxxx_>
what if i don't want to change the type of ``f``...
<nullcatxxx_>
it should still be (xx -> yy -> zz -> uu) code
Guest86742 has quit [Quit: Leaving]
<Drup>
I don't think you can have both your nice expression and that
<nullcatxxx_>
ok thanks
<Drup>
it would mean metaocaml operates reductions over the symbolic code
<Drup>
(to beta reduce)
<Drup>
and ocaml doesn't do that :)
<Drup>
metaocaml*
JacobEdelman has joined #ocaml
<nullcatxxx_>
thanks...
<nullcatxxx_>
then i can say my problem cannot be solved
<Drup>
why do you absolutely need the nice version ?
<Drup>
it should be exactly equivalent
<nullcatxxx_>
well, you cannot make your user to write semantic function like f
<nullcatxxx_>
the metathing should be invisible to the user
<nullcatxxx_>
well, your first version has to use .<>.
<nullcatxxx_>
that's fine...
<Drup>
yeah, my first version was fine
<nullcatxxx_>
but i feel xx code -> yy code -> zz code -> ..
<nullcatxxx_>
that's too much
<Drup>
oh, probably
<Drup>
but you asked for nice generated code
<Drup>
and that's the only solution
<nullcatxxx_>
yes.
<Drup>
hence my question: why do you care about what the generated code looks like
Haudegen has quit [Ping timeout: 260 seconds]
<nullcatxxx_>
hold on sec... let me see
<nullcatxxx_>
for you second version
<nullcatxxx_>
how do you write produce the code i want? I tried let f' = .<fun g -> .~(make_apply .<g> f (~~ ~~ ~~Z))>.
<nullcatxxx_>
there will be a type error
<Drup>
huum, indeed
<nullcatxxx_>
oh yes!
<nullcatxxx_>
your first version works
<nullcatxxx_>
great
<nullcatxxx_>
this solves my problem perfectly now
<nullcatxxx_>
i was so stupid haha
<nullcatxxx_>
sorry for the extra work
<Drup>
3rd version, which is version 2 + fix for that issue
<nullcatxxx_>
... ha
<Drup>
(just changed the type of g, type of f is unchanged)
<nullcatxxx_>
actually first version is already very nice
<Drup>
:)
xyh has quit [Remote host closed the connection]
<Drup>
you can switch from one to the other anyway
<nullcatxxx_>
btw, not related to this question, but about the interface to user.
<nullcatxxx_>
the user has to quote f
<nullcatxxx_>
otherwise there will be CSP problem again
<Drup>
yeah
<Drup>
unsurprising
<Drup>
(side note: there is a generalisation issue)
<Drup>
let make_apply f n = .< fun g -> .~ (gen_apply .<g>. f Zero n) >.
<Algebr``>
I can't tell if this is a bug with Lwt. I use Lwt_io.with_connection instead of the callback of Lwt_io.establish server, but even after the connection is done and finished I see one of these for each connection made, TCP 127.0.0.1:callbook->127.0.0.1:54106 (CLOSE_WAIT), which sucks because eventually I run out of file descriptors.
mahasamoot has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<zozozo>
pierpa: no need for anything, writing numbers with underscores is supported by the compiler
<pierpa>
zozozo, but I want to print numbers in that format
<pierpa>
# ultospun 3 "_" 1234567;;
<pierpa>
- : string = "1_234_567"
<pierpa>
this is my function. anything similar in the lib?
<Algebr``>
I don't think so
<pierpa>
ok
<zozozo>
pierpa: ah, sorry, though you wanted to write numbers with underscores in your code, :p
<zozozo>
*thought
<pierpa>
no, I knew that the syntax was supported by the compiler. Thank you :)
Stalkr_ has joined #ocaml
<Algebr``>
pierpa: are you looking for OCaml open source work to do, or just to get better with lang?