<Drup>
it includes everything except libc (and C bindings)
<darius93>
C bindings? Drup you mean if i were to make bindings it wont be included in the application or are you referring to the C library themselves?
<Drup>
the C library themselves
<darius93>
ah okay
grouzen has quit [Ping timeout: 240 seconds]
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
keen__________16 has joined #ocaml
browncodes has quit [Remote host closed the connection]
keen__________15 has quit [Ping timeout: 256 seconds]
<Enjolras>
note that you can statically link C libraries if you want to
ptrz has joined #ocaml
<ptrz>
if I want to write a C static analyzer in OCaml, is there a specific parser library I should be using?
<ptrz>
or should I try to pull code from Frama-C?
<Drup>
pull code from FramaC
<Drup>
or other similar framework (there are several such projects in OCaml)
<Enjolras>
Or Cil
<Enjolras>
FramaC has its custom version of Cil, but it's standalone
johnf_ has joined #ocaml
rgrinberg has joined #ocaml
browncodes has joined #ocaml
tennix has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
psy_ has quit [Ping timeout: 265 seconds]
NingaLeaf has joined #ocaml
NingaLeaf has quit [Client Quit]
samrat has joined #ocaml
arjunguha has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Ping timeout: 240 seconds]
MrScout has quit [Remote host closed the connection]
NingaLeaf has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 268 seconds]
NingaLeaf has quit [Ping timeout: 240 seconds]
mac10688 has quit [Ping timeout: 244 seconds]
Stany has quit [Ping timeout: 246 seconds]
pyon has quit [Quit: F...ix you, Emacs.]
pyon has joined #ocaml
ptrz has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
johnf_ has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
huza has joined #ocaml
samrat has joined #ocaml
MercurialAlchemi has joined #ocaml
psy_ has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
MrScout has joined #ocaml
rgrinberg1 has quit [Ping timeout: 268 seconds]
rgrinberg1 has joined #ocaml
kushal has joined #ocaml
deavid has quit [Ping timeout: 250 seconds]
browncodes has quit [Remote host closed the connection]
browncodes has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
deavid has joined #ocaml
deavid has quit [Ping timeout: 264 seconds]
deavid has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
ptrz has joined #ocaml
ygrek has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
rgrinberg1 has quit [Ping timeout: 256 seconds]
grouzen has joined #ocaml
psy_ has quit [Remote host closed the connection]
Haudegen has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Kakadu has joined #ocaml
MasseR has joined #ocaml
ptrz has quit [Ping timeout: 246 seconds]
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 244 seconds]
sh0t has joined #ocaml
Kakadu has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
sh0t has quit [Ping timeout: 250 seconds]
rgrinberg1 has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
rgrinberg1 has quit [Ping timeout: 264 seconds]
freehck has joined #ocaml
sepp2k has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Client Quit]
<freehck>
good ugt morning! :)
<freehck>
i forgot whether ocaml has an internal symbol type?
<freehck>
like symbols in scheme/cl?
BitPuffin|osx has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
<companion_cube>
no, it doesn't
<companion_cube>
you can probably use a hashconsed string type
<freehck>
thx, i'd rather use strings then.
<companion_cube>
depends, what did you intend to use symbols for?
<companion_cube>
in general OCaml favors a more typed approach than lisps
<flux>
companion_cube, why isn't the weight also parametrizable, does the algorithm require it to be an integer?
<companion_cube>
well it needs some arithmetic comparisons on it
<companion_cube>
I didn't take time to parametrize addition, product and comparison
<flux>
I suppose integer is then alright (though float might be easier to use, but not a general solution)
<flux>
(also float could break it ;-))
<companion_cube>
it might be possible though to ask for a type and the operations in the functor
<companion_cube>
yeah, float is risky
<companion_cube>
the sane default is int, with every value weighting 1
<companion_cube>
(so you have weight = cardinal)
<flux>
I think it's a rare case when you would like to parametrize weight with an argument that can be multiplied easily, without it being just as easy to convert into integer
<flux>
I was hoping it would only need comparisons :)
<flux>
but of course not..
<companion_cube>
heh
<companion_cube>
you need sum to compute the weight of a node anyway
<companion_cube>
and product for the balancing criterion
ollehar has joined #ocaml
<flux>
first I need to find even the first application for it, even though it does sound useful.. :)
<flux>
freehck, have you noticed `PolymorphicVariants?
<freehck>
companion_cube: i just wanted to have an analog to my lovely '#err function from lisps which had syntax like (err 'function "message-format" . parameters).
<flux>
I think they are similar to scheme symbols for some uses
<freehck>
I can use "function" instead so it's normal.
<freehck>
there's no need to use specifically symbols here.
<freehck>
i think it's just a habit
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 240 seconds]
<companion_cube>
freehck: you can use specific types (type err_type = Function | String | ...), or named parameters, or optional parameters
mea-culpa has joined #ocaml
Kakadu has joined #ocaml
kushal has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
mort___ has joined #ocaml
dario2 has joined #ocaml
<dario2>
Hi everyone! I got a weird bug report. Are there any circumstances when a call to "Pervasives.exit 1" would fail to terminate an application?
<flux>
1) it's a forked process 2) infinite loop in at_exit-registered function 3) bug in ocaml runtime 4) bug in C library 5) bug in the operating system 6) bug in the hardware 7) bug in perception :)
<dario2>
flux: It's an Ocsigen application, so LWT is involved. Also, I cannot reproduce the problem in my Linux machine (the bug reporter runs OSX).
<Leonidas>
clearly, bug in operating system, the reporter should switch to Linux ;)
<ollehar>
flux: 8) bug in the fabric of space-time/the matrix
<ollehar>
call doctor who!
<flux>
dario2, well, Pervasives.exit first calls all at exit handlers and then calls the C library exit..
<flux>
dario2, so maybe lwt registers some at_exit handlers
<MasseR>
dario2: probably has nothing to do with this, but I found some difference between lwt's daemon module between linux and osx
<flux>
dario2, if it does, chances are it does so on linux as well (but works otherwise), so you could point your debugging efforts there
<dario2>
Paging Ocsigen guys in the channel: do you know what might be going on?
<dario2>
flux: Also, I don't exclude option 7... :-)
<haesbaert>
how do I detect overflows with int32 ?
rgrinberg1 has joined #ocaml
mort___ has quit [Quit: Leaving.]
rgrinberg1 has quit [Ping timeout: 268 seconds]
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
octachron has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
Haudegen has quit [Ping timeout: 268 seconds]
tane has joined #ocaml
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
Haudegen has joined #ocaml
Simn has joined #ocaml
Lasher` has quit [Ping timeout: 250 seconds]
dario2 has quit [Quit: Konversation terminated!]
_andre has joined #ocaml
mort___ has joined #ocaml
mac10688 has joined #ocaml
mal`` has quit [Ping timeout: 240 seconds]
ingsoc has joined #ocaml
Lasher` has joined #ocaml
mac10688 has quit [Ping timeout: 272 seconds]
mal`` has joined #ocaml
bendiken has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
igoroliveira has joined #ocaml
ggole has joined #ocaml
BitPuffin has joined #ocaml
ygrek has joined #ocaml
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
grouzen has quit [Ping timeout: 264 seconds]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
samrat has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
mort___ has left #ocaml [#ocaml]
kushal has quit [Quit: Leaving]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
rgrinberg1 has joined #ocaml
kaepora has quit [Remote host closed the connection]
<freehck>
haesbaert: I suppose the question is "how do I detect overflows with int31"? )
samrat has joined #ocaml
<freehck>
haesbaert: as I got there's no way to do it. it cannot be catched at all.
<flux>
there are bit tricks you can do to detect the situation, but you of course need to apply them with each operation
<flux>
'bit tricks c' is probably a good google keyword, it should be applicaple to ocaml as well
Haudegen has quit [Ping timeout: 272 seconds]
ousado has quit [Ping timeout: 264 seconds]
ousado has joined #ocaml
ousado has joined #ocaml
jao has joined #ocaml
tennix has joined #ocaml
arjunguha has joined #ocaml
ollehar has joined #ocaml
arjunguha has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
ingsoc has quit [Quit: Leaving.]
ingsoc has joined #ocaml
tane has quit [Quit: Verlassend]
Muzer has quit [Read error: Connection reset by peer]
martintrojer has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
<vbmithr>
hi
arjunguha has joined #ocaml
<vbmithr>
In Async, when I open a TCP connection and do a Writer.write of a string in it, is the data sent immediately ?
Muzer has joined #ocaml
<MasseR>
vbmithr: my _guess_ would be that it will be sent as soon as it can be sent
martintrojer has joined #ocaml
<MasseR>
(No idea whether flushing is required)
<vbmithr>
Because it seems than when I send 2 bytes, they are not sent
araujo has joined #ocaml
<vbmithr>
No, maybe it is another issue in my code… But I'd like to know what I should do to ensure that what I'm writing is sent immediately
<rgrinberg1>
vbmithr: you can call Writer.flushed to wait until it's flushed but i don't know if you can flush stuff manually
<vbmithr>
That's what I'm trying to figure out
<vbmithr>
But I think I have another problem:
<vbmithr>
When you transfer data from a pipe reader to a pipe writer
<vbmithr>
it is ok to also manually write data in the pipe writer sometimes ?
<vbmithr>
I.e. to transfer makes a pipe writer unusable ?
<rgrinberg1>
vbmithr: depends if it closes it or not i guess
<vbmithr>
yeah.
<vbmithr>
doesn't seem so.
<vbmithr>
Ok, seems it needs at least 6 bytes to send something :(
<vbmithr>
even though Socket.(setopt s Opt.nodelay true);
tennix has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
grouzen has joined #ocaml
rgrinberg1 has quit [Ping timeout: 252 seconds]
<vbmithr>
By default, a write system call occurs at the end of a cycle in which bytes were written.
obadz- has joined #ocaml
obadz- has quit [Changing host]
obadz- has joined #ocaml
rgrinberg1 has joined #ocaml
obadz has quit [Ping timeout: 240 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
jeffmo has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
samrat has quit [Ping timeout: 255 seconds]
Muzer has quit [Excess Flood]
ollehar has quit [Ping timeout: 244 seconds]
samrat has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
nuki has joined #ocaml
AlexRussia has joined #ocaml
Muzer has joined #ocaml
Tamae has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
samrat has quit [Ping timeout: 252 seconds]
<vbmithr>
crazy, I can't find how to flush
JuggleTux has joined #ocaml
samrat has joined #ocaml
<nuki>
I, excuse me but is there a way to generate InternalModule's documentation
<nuki>
with oasis ?
<Drup>
well, if they are internal, they should appear in the API ...
moei has quit [Quit: Leaving...]
grouzen has joined #ocaml
kolko has quit [Ping timeout: 246 seconds]
arjunguha has joined #ocaml
<vbmithr>
(it is flushed automatically asap, actually. Problem lies elsewhere.)
moei has joined #ocaml
<Drup>
they should not*
mal`` has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
mal`` has joined #ocaml
rgrinberg1 has quit [Ping timeout: 250 seconds]
ingsoc has quit [Quit: Leaving.]
mea-culpa has quit [Remote host closed the connection]
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
tennix has quit [Ping timeout: 268 seconds]
grouzen has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
tennix has quit [Ping timeout: 256 seconds]
tennix has joined #ocaml
larhat1 has joined #ocaml
larhat1 has quit [Client Quit]
tennix has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
ollehar has quit [Client Quit]
darkf has quit [Quit: Leaving]
JuggleTux has quit [Quit: Lost terminal]
JuggleTux has joined #ocaml
tennix has joined #ocaml
kolko has joined #ocaml
larhat1 has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
larhat1 has quit [Client Quit]
jwatzman|work has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
samrat has joined #ocaml
grouzen has joined #ocaml
enamex has joined #ocaml
<nuki>
yes but in the "main module" i reference others modules
<nuki>
for example
<nuki>
Truc = PrefixTruc
<nuki>
(module Truc = PrefixTruc)
swgillespie has joined #ocaml
<nuki>
but when i'm run "make doc"
<nuki>
Warning: Module or module type PrefixTruc not found
<companion_cube>
I have this a lot, too
swgillespie has quit [Ping timeout: 246 seconds]
<nuki>
is there a way to resolve that ? I can referre manually all modules but it is not verry conveinent (lol i must studying English, i totally sucks)
<Drup>
nuki: if you reference PrefixTruc in your interface, it's not an internal module
MrScout has joined #ocaml
<nuki>
Ok
<nuki>
thanks
ptrz has joined #ocaml
creichert has joined #ocaml
<nuki>
it's perfectly working. Thanks a lot Drup
tennix has joined #ocaml
<nuki>
And is there a way to understand clearly the difference between Generative functor and Applicative Functor?
Guest38 has joined #ocaml
tennix has quit [Ping timeout: 265 seconds]
<Drup>
if F is a functor containing a type t
<Drup>
if F is applicative, M = M' => F(M).t = F(M').t
<Drup>
that is all.
<mrvn>
also F(M).t = F(M).t
<Drup>
(in OCaml, we mark generative functor by adding a unit-like argument () to the functor, but it's merely syntax)
<Drup>
mrvn: that is implied :]
tennix has joined #ocaml
<mrvn>
but confusing to many with Generative functors
<mrvn>
F(M).t != F(M).t
<nuki>
And is there use-case of generative functors ?
<mrvn>
nuki: lots. e.g. generating unique ids
samrat has quit [Ping timeout: 250 seconds]
<Drup>
nuki: generating unique new types, mostly
<nuki>
Ok thanks
<mrvn>
often one is also to lazy to make a functor applicative
<def`>
sadly unique ids can also be generated with applicative functors
samrat has joined #ocaml
<Drup>
but not unique types
<mrvn>
def`: then the functor isn't pure. But that is ok
tennix has quit [Ping timeout: 268 seconds]
<def`>
mostly :)
<Drup>
I personally use impure functor rather liberally but can't mark them generative because compat :/
enamex has quit [Ping timeout: 246 seconds]
samrat has quit [Ping timeout: 264 seconds]
<adrien>
so you care about compat? :D
samrat has joined #ocaml
rgrinberg1 has joined #ocaml
ptrz has quit [Quit: WeeChat 1.2]
tennix has joined #ocaml
mea-culpa has joined #ocaml
<Drup>
adrien: I never say I didn't :p
<Drup>
said*
johnf_ has quit [Read error: Connection reset by peer]
<adrien>
:)
tennix has quit [Ping timeout: 256 seconds]
arjunguh_ has joined #ocaml
dario1 has joined #ocaml
<dario1>
Drup: Are there any circumstances when a call to "Pervasives.exit 1" would fail to terminate an Ocsigen server application?
arjunguha has quit [Ping timeout: 268 seconds]
<Drup>
dario1: server or client ?
<Drup>
ah, server
<Drup>
I'm not sure
<dario1>
Server. Also, I cannot reproduce the problem in my Linux machine (the bug reporter runs OSX).
<Drup>
open a bug report
tennix has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
<dario1>
Someone on this channel mentioned the possibility of an infinite-loop in an at_exit-registered function
<Drup>
if that was the case, ^C would not work
<dario1>
Yeah, as soon as I can get my hands on an OSX machine I'll try to reproduce the problem. If confirmed I'll file a bug report.
arjunguh_ has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
Haudegen has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ocaml
thomasga has joined #ocaml
dario1 has quit [Quit: Konversation terminated!]
tennix has joined #ocaml
tennix has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ygrek has joined #ocaml
sz0 has joined #ocaml
kushal has joined #ocaml
sepp2k has quit [Quit: Leaving.]
tennix has joined #ocaml
Edgemaster has joined #ocaml
ollehar_tmp has joined #ocaml
<ollehar_tmp>
test
nuki has quit [Remote host closed the connection]
<ollehar_tmp>
what's is the purpose of caml_gc_get and caml_gc_set?