ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jonludlam has quit [Quit: Leaving]
struktured has quit [Ping timeout: 255 seconds]
ncthom91 has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
ncthom91 has quit [Client Quit]
ril has joined #ocaml
<Algebr>
edwin: I'm doing Lwt_io.LE.read_int32 and the value that I'm getting when I print it out after doing Int32.to_int is a huge, overflow looking number.
<Algebr>
I guess that means its just junk values
wagle has quit [Remote host closed the connection]
ril has quit [Ping timeout: 240 seconds]
damason has quit [Ping timeout: 240 seconds]
damason has joined #ocaml
struk|desk is now known as struk|desk|away
Kakadu has quit [Remote host closed the connection]
zdm has joined #ocaml
j0sh has quit [Quit: Lost terminal]
wagle has joined #ocaml
wagle has quit [Remote host closed the connection]
wagle has joined #ocaml
toomuchtvrotsurb has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
zdm has left #ocaml ["WeeChat 1.0.1"]
wagle has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
wagle has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
wagle has quit [Read error: Connection reset by peer]
kido1412 has joined #ocaml
struk|desk|away is now known as struk|desk
pierpa has quit [Ping timeout: 256 seconds]
mcmillhj_ has joined #ocaml
damason has quit [Ping timeout: 240 seconds]
damason has joined #ocaml
cody` has quit [Quit: Connection closed for inactivity]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
toomuchtvrotsurb has joined #ocaml
kido1412 has quit [Quit: Page closed]
struk|desk is now known as struk|desk|away
struk|desk|away is now known as struk|desk
badon has joined #ocaml
<Algebr>
Why isn't the server in Lwt_io's establish server wrapped in a Lwt.t? I can't seem to find a self-contained working usage of it
nullcatxxx_ has joined #ocaml
jhaberku has joined #ocaml
wagle has joined #ocaml
<jhaberku>
Need to compliment the Merlin authors. The latest OCaml experience on the development version of Spacemacs is really great.
<struk|desk>
yeah I love those guys
wagle has quit [Read error: Connection reset by peer]
Algebr has quit [Remote host closed the connection]
<freehck>
Btw, a little question about polymorphism in Ocaml. Is it possible to "extend" some polymorphic function for new types? For example, I have a struct type "type struct = {number: int; ...}" and I want to use "(<) : struct -> struct -> bool" to compare variables of this type. For example "let (<) a b = a.number < b.number". Could I do it some way?
<def`>
freehck: no, not yet.
<freehck>
yet?
<def`>
(<), hash, etc are "magic" functions which make assumption on the representation of values
ncthom91 has joined #ocaml
<def`>
You can't write them in normal OCaml, they are compiler internel.
<def`>
internal*.
<def`>
(well runtime actually).
<freehck>
Okay, and if we substitute (<) with some name in the example above?
<def`>
Modular implicits is a proposal to offer more disciplined adhoc polymorphism, with which you could implement your own
<ely-se>
freehck: teb
<ely-se>
ugh, stupid keyboard
<def`>
freehck: then just define your own function?
<ely-se>
what moron thought it was a good idea to put backspace directly adjacent to return
<freehck>
ely-se: how have you missed such a big key like Enter? :)
<freehck>
def`: I mean if I already have a polymorphic function max, could I extend it for some new type?
* ggole
looks at his keyboard, where \ is between enter and backspace
<def`>
freehck: no
<ely-se>
freehck: no, I missed backspace, and hit return instead
<ely-se>
freehck: you might want to use functors. for example, Map.Make takes a module that has a compare function
* freehck
hates this variant of keyboard, because does love Enter in form of daw.
<def`>
that's adhoc polymorphism, OCaml only provide parametric polymorphism at the current time
<def`>
(except for these few magic functions)
<freehck>
s/daw/mark/
<freehck>
def`: thx
BitPuffin has joined #ocaml
ely-se has quit [Quit: leaving]
struk|desk|away is now known as struk|desk
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBird_ has quit [Remote host closed the connection]
igstan has joined #ocaml
ncthom91 has joined #ocaml
igstan has quit [Quit: igstan]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
ncthom91 has joined #ocaml
pierpa has joined #ocaml
ely-se has joined #ocaml
ely-se has quit [Client Quit]
sz0 is now known as sz0`
sz0` is now known as sz0
sz0 is now known as sz0`
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ely-se has joined #ocaml
struk|desk is now known as struk|desk|away
Kakadu has joined #ocaml
struktured has joined #ocaml
sbrouf has joined #ocaml
ril has joined #ocaml
dsheets_ has quit [Ping timeout: 260 seconds]
dsheets_ has joined #ocaml
struk|desk|away is now known as struk|desk
jeffmo has joined #ocaml
zpe has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
struktured has quit [Ping timeout: 246 seconds]
ldopa has joined #ocaml
ely-se has quit [Quit: leaving]
sz0` has quit [Quit: Bye.]
rand has quit [Ping timeout: 256 seconds]
sz0 has joined #ocaml
slash^ has joined #ocaml
govg has joined #ocaml
sz0 has quit [Quit: Bye.]
rand has joined #ocaml
sz0 has joined #ocaml
zpe has joined #ocaml
aftershave has joined #ocaml
amirmc has joined #ocaml
ely-se has joined #ocaml
m_ has joined #ocaml
rand has quit [Ping timeout: 272 seconds]
JacobEdelman has joined #ocaml
sbrouf has quit [Ping timeout: 240 seconds]
struk|desk is now known as struk|desk|away
ely-se has quit [Quit: leaving]
zpe has quit [Remote host closed the connection]
jhaberku has joined #ocaml
<jhaberku>
Let's suppose I need to have dynamic dispatch (a collection of simulation instances where I need to invoke a call-back on a particular one where I only know at run-time). Each of the simulaton instances has some state and some shared call-backs. I have an implementation using first-class modules but I think I could do the same with objects. What are your preferences in this case?
Anarchos has quit [Quit: Page closed]
Denommus has joined #ocaml
<zozozo>
jhaberku: well, I kinda have the same problem for a smt-solver I'm developping, with plugins that can be activated using the CLI
<zozozo>
right, now I basically use a mapping from strings to records containing the various functions to be called
<Enjolras>
jhaberku: it is really a matter of taste. You could also do it the C way with a record of closures. I think first class modules syntax is really heavy and i prefer objects
<Enjolras>
but just do what you feel easier :)
Mercuria1Alchemi has joined #ocaml
<companion_cube>
first-class modules are nice if you have a few types and a lot of functions
amirmc1 has joined #ocaml
amirmc has quit [Read error: Connection reset by peer]
<jhaberku>
The record of functions idea is tempting and actually might the simplest in this case, but objects naturally encode the pattern in the language level.
<jhaberku>
I think first-class modules make sense when type members are needed, yes.
<jhaberku>
I'm going to try the object approach and see what it looks like. :-)
Guest93750 has joined #ocaml
Guest93750 has quit [Remote host closed the connection]
rand has joined #ocaml
Denommus has quit [Read error: Connection reset by peer]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hay207 has quit [Ping timeout: 240 seconds]
hay207 has joined #ocaml
jhaberku has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
jhaberku has joined #ocaml
apache2 has left #ocaml [#ocaml]
chambart has quit [Ping timeout: 272 seconds]
apache2 has joined #ocaml
Major_Biscuit has quit [Quit: WeeChat 1.3]
mort___ has quit [Ping timeout: 260 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
palomer has joined #ocaml
m_ has quit [Quit: Page closed]
<palomer>
hmmm, can I just stick lwt.async anywhere in my code?
ril has joined #ocaml
ril has quit [Client Quit]
hay207 has quit [Ping timeout: 246 seconds]
hay207 has joined #ocaml
larhat1 has joined #ocaml
dsheets_ has quit [Ping timeout: 240 seconds]
jonludlam has joined #ocaml
Algebr has joined #ocaml
ygrek has joined #ocaml
jhaberku has quit [Remote host closed the connection]
^elyse^ has quit [Quit: Leaving]
ggole has quit []
^elyse^ has joined #ocaml
kushal has quit [Quit: Leaving]
zpe has quit [Ping timeout: 255 seconds]
psy_ has joined #ocaml
ollehar has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
ollehar has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
nullcatxxx_ has joined #ocaml
Kakadu_ has joined #ocaml
<Algebr>
Lwt_main.at_exit apparently isn't called when program gets ctrl+C, would that be a signal instead?
mort___ has joined #ocaml
<adrien>
SIGINT
<Algebr>
ah, yep.
<Algebr>
wonder why signal's return value isn't just unit
ollehar has joined #ocaml
palomer_ has joined #ocaml
palomer has quit [Ping timeout: 272 seconds]
palomer_ is now known as palomer
palomer has quit [Quit: palomer]
palomer has joined #ocaml
_andre has quit [Quit: leaving]
wagle has joined #ocaml
palomer has quit [Quit: palomer]
palomer has joined #ocaml
wagle has quit [Remote host closed the connection]
jonludlam has quit [Remote host closed the connection]
wagle has joined #ocaml
palomer has quit [Quit: palomer]
palomer has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Remote host closed the connection]
<flux>
algebr, what is it then? it's unit for plain OCaml's signals.
Simn has quit [Quit: Leaving]
BitPuffin has quit [Ping timeout: 256 seconds]
struk|desk|away has quit [Remote host closed the connection]
Anarchos has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
darkf has quit [Quit: Leaving]
nullcatx_ has joined #ocaml
slash^ has left #ocaml [#ocaml]
slash^ has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 265 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
slash^ has quit [Read error: Connection reset by peer]
dfjskla has quit [Ping timeout: 240 seconds]
dfjskla has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
<Algebr>
it gives back Sys.signal_behavior, or somethign liek that
tane has joined #ocaml
ollehar has joined #ocaml
psy_ has quit [Ping timeout: 255 seconds]
Denommus has joined #ocaml
<Algebr>
the ppx extension for lwt is so pleasing to work with, a nice improvement over the camlp4
mort___ has quit [Quit: Leaving.]
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Kakadu_>
I have some code that prints in bytecode toplevel but doesn't in js_of_ocaml toplevel. Any ideas how to debug it?
<Kakadu_>
btw, Do we able to enable dumping source from the toplevel without restarting it?
<Kakadu_>
(I added directive for that but I'm expereincing problems with see actual dumped source)
psy_ has joined #ocaml
nullcatxxx_ has joined #ocaml
freehck has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
hay207 has quit [Ping timeout: 256 seconds]
Mercuria1Alchemi has quit [Ping timeout: 255 seconds]
clog has quit [Ping timeout: 250 seconds]
jeffmo has quit [Quit: jeffmo]
groovy2shoes has quit [Quit: Leaving]
zol has quit [Quit: WeeChat 0.4.2]
groovy2shoes has joined #ocaml
sbrouf has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ygrek has joined #ocaml
averell has quit [Remote host closed the connection]
sbrouf has joined #ocaml
BitPuffin|osx has joined #ocaml
Kakadu_ has quit [Remote host closed the connection]
^elyse^ has quit [Quit: Leaving]
Kakadu_ has joined #ocaml
ollehar has quit [Quit: ollehar]
mac10688 has joined #ocaml
sbrouf has quit [Ping timeout: 240 seconds]
chambart has joined #ocaml
jonludlam has joined #ocaml
ollehar has joined #ocaml
<Algebr>
Is there any nice abstraction in lwt to say whenever this input channel has any thing to write, then just write it to this other write channel
ollehar has quit [Quit: ollehar]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Algebr>
lame, no read_into_output_chan
cody` has joined #ocaml
Denommus has quit [Quit: going home]
ygrek has quit [Ping timeout: 255 seconds]
jonludlam has quit [Remote host closed the connection]
ygrek has joined #ocaml
tane has quit [Remote host closed the connection]
dfjskla has quit [Ping timeout: 260 seconds]
damason has joined #ocaml
dfjskla has joined #ocaml
Major_Biscuit has joined #ocaml
rand has quit [Quit: leaving]
chambart has quit [Ping timeout: 255 seconds]
clog has joined #ocaml
Kakadu_ has quit [Remote host closed the connection]