companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest82935
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Changing host]
infinity0 has joined #ocaml
enterprisey has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
infinity0 has joined #ocaml
spew has joined #ocaml
cggong has joined #ocaml
kolko has quit [Quit: ZNC - http://znc.in]
ziyourenxiang has quit [Ping timeout: 255 seconds]
enterprisey has quit [Read error: Connection reset by peer]
cggong has quit [Quit: cggong]
shinnya has joined #ocaml
manizzle has quit [Ping timeout: 260 seconds]
cggong has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
slack4 has quit [Remote host closed the connection]
slack5 has joined #ocaml
P4Titan has joined #ocaml
<P4Titan> Hi all. This is a question on good programing practice. I have a snippet of code: https://hastebin.com/asovosehap.hs
<P4Titan> If you see, the `prehandle_conn`, `handle_conn`, and `posthandle_conn` take the same arguements and are chained as such
<P4Titan> is there a neater way of writing this?
<P4Titan> Many thanks in advance!
<apache2> oh wow inline records are a thing now?
<apache2> what is the type name when decomposed then?
<P4Titan> is this for me?
<apache2> no, it's for mrvn.
<apache2> I can't read your link since it uses cloudflare
pete_8 has quit []
mengu has quit [Ping timeout: 260 seconds]
silver has quit [Read error: Connection reset by peer]
<P4Titan> anyone?
<P4Titan> apache2: also, do you have a prefered snippet website?
tautologico has quit [Quit: Connection closed for inactivity]
ygrek has quit [Ping timeout: 240 seconds]
<apache2> 0paste.com ?
cggong has quit [Quit: cggong]
enterprisey has joined #ocaml
cggong has joined #ocaml
agravier has joined #ocaml
P4Titan has quit [Ping timeout: 255 seconds]
spew has quit [Quit: foobar]
_whitelogger has joined #ocaml
mfp_ has quit [Ping timeout: 246 seconds]
average has quit [Ping timeout: 245 seconds]
raphaelss has joined #ocaml
olibjerd has joined #ocaml
cggong has quit [Quit: cggong]
copy` has quit [Quit: Connection closed for inactivity]
ghs39ghsggf has joined #ocaml
ghs39ghsggf has left #ocaml [#ocaml]
iitalics has joined #ocaml
demonimin has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 240 seconds]
demonimin has joined #ocaml
agravier_ has joined #ocaml
agravier has quit [Ping timeout: 240 seconds]
cggong has joined #ocaml
iitalics has quit [Quit: /thread]
MercurialAlchemi has joined #ocaml
olibjerd has quit [Quit: olibjerd]
FreeBirdLjj has joined #ocaml
cggong has quit [Quit: cggong]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
enterprisey has quit [Remote host closed the connection]
jao has quit [Ping timeout: 240 seconds]
thizanne has quit [Ping timeout: 260 seconds]
Asmadeus has quit [Ping timeout: 255 seconds]
thizanne has joined #ocaml
Asmadeus has joined #ocaml
kyod has quit [Ping timeout: 260 seconds]
kyod has joined #ocaml
lostman has joined #ocaml
average has joined #ocaml
nightmared has joined #ocaml
govg has joined #ocaml
govg has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
AlexRussia has quit [Ping timeout: 255 seconds]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
MercurialAlchemi has joined #ocaml
enterprisey has joined #ocaml
enterprisey has quit [Remote host closed the connection]
Simn has joined #ocaml
alfredo has joined #ocaml
marctrem has joined #ocaml
AlexRussia has joined #ocaml
Merv__ has quit [Remote host closed the connection]
samrat has joined #ocaml
agravier_ has quit [Quit: agravier_]
marctrem has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jlam_ has quit [Read error: Connection reset by peer]
lostman has quit [Quit: Connection closed for inactivity]
<reynir> mrvn: As I understand it atd is its own language that just happens to look a lot like a subset of OCaml. Inline records weren't working for me, and »type t = [ | Foo of int]« was turned into »type t = [`Foo of int]« :)
marctrem has joined #ocaml
<marctrem> Hello, I was wondering if the -fARCH flag to ocamlopt was deprecated. It's in the manpage but ocamlopt says it's unrecognized. Am I missing something? Thank you very much!
marctrem has quit [Client Quit]
argent_smith has joined #ocaml
dhil has joined #ocaml
<apache2> ahhh I didn't see wewere talking about atdgen. yes, atd is only periferally connected to ocaml I guess
marctrem has joined #ocaml
agravier has joined #ocaml
marctrem has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<reynir> apache2: inline records is a thing in ocaml thoguh!
<apache2> reynir: oh nice!
<apache2> always found the other thing awkward. do you know since what version?
<reynir> I can't remember exactly, but I think 4.03 maybe
<reynir> apache2: https://0paste.com/13528
dhil has quit [Ping timeout: 260 seconds]
madroach has quit [Read error: Connection reset by peer]
<apache2> aha!!
<apache2> but you could still do | G { x } -> .. ?
<apache2> that is nice
agravier has quit [Quit: agravier]
madroach has joined #ocaml
agravier has joined #ocaml
Merv_ has joined #ocaml
agravier has quit [Quit: agravier]
agravier has joined #ocaml
Merv__ has joined #ocaml
barcabuona has quit [Ping timeout: 240 seconds]
Merv_ has quit [Ping timeout: 246 seconds]
barcabuona has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
agravier has quit [Quit: agravier]
freusque has joined #ocaml
agravier has joined #ocaml
tormen has quit [Remote host closed the connection]
agravier has quit [Quit: agravier]
AlexRussia has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
tormen has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
agravier has joined #ocaml
freusque has joined #ocaml
agravier has quit [Client Quit]
freusque has quit [Quit: WeeChat 1.7]
mfp_ has joined #ocaml
freusque has joined #ocaml
<octachron> apache2, however inline records are not totally first class (for now) since they don't have a name, thus "| G x -> x " is not allowed when x is an inline record
freusque has quit [Quit: WeeChat 1.7]
<apache2> no, but that is kind of nice
andreas_ has joined #ocaml
KeyJoo has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
_andre has joined #ocaml
<orbifx[m]> what would you recommend for passing "signals" to terminate between standard Thread threads?
<orbifx[m]> I got food, but keen to get out more
samrat has quit [Ping timeout: 240 seconds]
olibjerd has joined #ocaml
AlexRussia has joined #ocaml
samrat has joined #ocaml
<johnelse_> orbifx[m]: have you tried http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html ? quite nice for sending messages between threads
sepp2k has joined #ocaml
johnelse_ is now known as johnelse
olibjerd has quit [Quit: olibjerd]
<orbifx[m]> have seen that before
samrat has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
<orbifx[m]> I wanted something simpler to control threads
cggong has joined #ocaml
freusque has joined #ocaml
<johnelse> hmm, well I hacked together a port of haskell's mvar a while ago: https://github.com/johnelse/ocaml-mvar/tree/master/lib
<johnelse> build system needs updating (it uses obuild!) but it only depends on threads
jbrown has joined #ocaml
wonderer87 has joined #ocaml
<wonderer87> I'm trying to install prof_spacetime. When I run "opam install prof_spacetime", I get an error: "ocamlfind: Package `conduit' not found"
<wonderer87> Why can't ocamlfind find conduit?
<johnelse> wonderer87: do you have conduit installed (try "opam show conduit") ?
<companion_cube> it's been renamed `mirage-conduit` apprently
<wonderer87> oh really, thanks. Link?
<companion_cube> juste `opam search conduit`
<companion_cube> :D
<companion_cube> just*
<wonderer87> johnelse: opam install conduit Your request can't be satisfied: - cohttp.0.9.6 is in conflict with lwt.3.0.0
<johnelse> hmm, that's a pretty old cohttp, is it pinned?
troydm has quit [Ping timeout: 255 seconds]
<orbifx[m]> thanks johnelse will check your mvar out
<orbifx[m]> The proper solution would be to move to lwt, but looking for a shortpath just now
ziyourenxiang has joined #ocaml
<johnelse> orbifx[m]: no problem, if I get time I'll tidy it up and put it on opam
<johnelse> though since it's just one module feel free to just copy it :)
cggong has quit [Quit: cggong]
<orbifx[m]> :)
cggong has joined #ocaml
zpe has quit [Remote host closed the connection]
shinnya has joined #ocaml
wonderer87 has quit [Quit: Page closed]
MK__ has joined #ocaml
Mat__ has joined #ocaml
<Mat__> I would like to understand how mutable variables are implemented in OCaml. For instance, it looks if a record containing some mutable variables are passed as a function argument, updating the mutable variables inside the function actually updates the variable outside the function too. That is like passing a variable by reference to a C function. Am I right?
<companion_cube> so, the thing is, there are no mutable *variables*
<companion_cube> variables are always immutable
<companion_cube> but they can point to in-memory records that have mutable fields
<companion_cube> and these fields can be mutated, but they are not variables
<companion_cube> (it's like fields in C struct)
<Mat__> OK, it is like pointer to memory locations
<Mat__> So, what happens when a record with some mutable fields is passed to a function?
<zozozo> waht is actually passed to the function is the in-memory address of the record
<Mat__> This is what I was looking for. So, it is not like C that a copy will be created in stack if variable (not the ref/pointer) is passed.
<Mat__> It is always passed as pointer
<zozozo> yes
<Mat__> So, if a filed is mutable, function can alter corresponding memory location
<Mat__> Which affects the record outside the function
<zozozo> yes
MK__ has quit [Remote host closed the connection]
<zozozo> if you want to avoid that behavior, then making the field immutable, and having your function returns a new record is the usual solution
enterprisey has joined #ocaml
wonderer89 has joined #ocaml
cggong has quit [Quit: cggong]
<wonderer89> I'm trying to install prof_spacetime. Why am I getting the error: ocamlfind: Package `cohttp.lwt' not found
<wonderer89> why can ocamlfil not find cohttp.lwt ?
<reynir> Is cohttp and lwt installed?
<wonderer89> yes
<wonderer89> $ opam list ....
<wonderer89> lwt 2.4.5
<wonderer89> cohttp 0.9.6
<def`> ocamlfind list
cggong has joined #ocaml
cggong has quit [Client Quit]
<wonderer89> cohttp (version: 0.9.6)
<wonderer89> lwt (version: 2.4.5)
<wonderer89> def`: but not cohttp.lwt
cranmax has joined #ocaml
enterprisey has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
cranmax2 has joined #ocaml
olibjerd has joined #ocaml
samrat has joined #ocaml
picolino has quit [Ping timeout: 255 seconds]
cranmax2 has quit [Client Quit]
cranmax2 has joined #ocaml
cranmax2 has quit [Client Quit]
hannes` is now known as hannes
cranmax has left #ocaml [#ocaml]
cranmax2 has joined #ocaml
cranmax2 has quit [Client Quit]
cranmax2 has joined #ocaml
cranmax2 has quit [Client Quit]
ramon has joined #ocaml
ramon is now known as Guest38456
<wonderer89> Is someone able to answer the question as to why ocamlfind is not able to find cohttp.lwt ? See above ^^
Guest38456 has quit [Client Quit]
samrat has quit [Ping timeout: 268 seconds]
<johnelse> I seem to remember cohttp.lwt requires something odd, ssl maybe?
cranmax2 has joined #ocaml
<orbifx[m]> wonderer89: are you sure you need to be searching for `cohttp.lwt` ? I'm not familiar with those packages, but sometimes you don't need to specify the submodule
<wonderer89> sigh, I'm passed that problem (I had to pin cohttp to the github version). Now I've got another problem.
<wonderer89> ocamlfind: Package `cohttp-lwt-unix' not found - required by `cohttp.lwt'
<wonderer89> how do I resolve this?
<rixed_> To copy a record, what's more elegant than { record with some_field = record.some_field } ? I which { record } was valid :=/
<zozozo> rixed_: does the record contain mutable field ?
<companion_cube> rixed_: there's indeed no way of doing that afaik
<companion_cube> but just write a `copy` function for the record, it remains readable
enterprisey has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
argent_smith has quit [Quit: Leaving.]
freusque has joined #ocaml
<rixed_> zozozo: yes it does but how is this related to copying ?
wonderer89 has quit [Quit: Page closed]
<zozozo> it's more that if it didn't ther would be no need for copying
<rixed_> zozozo: indeed.
ryanartecona has joined #ocaml
darktenaibre has quit [Ping timeout: 268 seconds]
MercurialAlchemi has joined #ocaml
silver has quit [Read error: Connection reset by peer]
johnelse is now known as johnel_away
johnel_away is now known as johnelse
<def`> rixed_: that's indeed ugly. I am afraid syntax would be ambiguous if { record } was allowed
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
darktenaibre has joined #ocaml
copy` has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
jack5638 has quit [Ping timeout: 260 seconds]
samrat has joined #ocaml
<rixed_> def`: what about { record with _ } ?
ryanartecona has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
jack5638 has joined #ocaml
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
Merv__ has quit [Remote host closed the connection]
Merv_ has joined #ocaml
jao has joined #ocaml
Merv_ has quit [Ping timeout: 255 seconds]
olibjerd has left #ocaml [#ocaml]
cggong has joined #ocaml
olibjerd has joined #ocaml
marsam has joined #ocaml
al-damiri has joined #ocaml
cggong has quit [Client Quit]
alfredo has joined #ocaml
cggong has joined #ocaml
argent_smith has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
cggong has quit [Quit: cggong]
silver has joined #ocaml
cggong has joined #ocaml
maarhart has joined #ocaml
maarhart has quit [Client Quit]
cranmax2 has quit [Ping timeout: 260 seconds]
cggong has quit [Quit: cggong]
AlexRussia has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
madroach has quit [Quit: leaving]
olibjerd has quit [Ping timeout: 246 seconds]
samrat has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
AlexRussia has joined #ocaml
Anarchos has joined #ocaml
argent_smith has quit [Client Quit]
argent_smith has joined #ocaml
olibjerd has joined #ocaml
cggong has joined #ocaml
cggong has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
Mat__ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jlam_ has joined #ocaml
argent_smith has quit [Quit: Leaving.]
ryanartecona has quit [Quit: ryanartecona]
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
jnavila has joined #ocaml
Merv_ has joined #ocaml
shinnya has joined #ocaml
jnavila has quit [Ping timeout: 255 seconds]
jlam_ has quit [Ping timeout: 240 seconds]
jlam__ has joined #ocaml
cggong has joined #ocaml
ryanartecona has joined #ocaml
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
Anarchos has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
jlam_ has joined #ocaml
Merv_ has quit [Remote host closed the connection]
jlam__ has quit [Ping timeout: 255 seconds]
argent_smith has joined #ocaml
slash^ has joined #ocaml
TheLemonMan has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
Merv_ has joined #ocaml
jack5638 has quit [Ping timeout: 268 seconds]
jack5638 has joined #ocaml
olibjerd has quit [Quit: olibjerd]
<def`> ~~~
cranmax has joined #ocaml
<companion_cube> there could be Obj,copy_block :p
<companion_cube> (although it would probably be less efficient than specialized code)
jlam__ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
hashpuppy has joined #ocaml
Merv_ has quit [Remote host closed the connection]
andreas_ has quit [Quit: Connection closed for inactivity]
TheLemonMan has quit [Read error: Connection reset by peer]
TheLemonMan has joined #ocaml
kakadu has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
antismap has quit [Quit: WeeChat 1.0.1]
antismap` has joined #ocaml
antismap` has quit [Remote host closed the connection]
jnavila has joined #ocaml
jack5638 has quit [Ping timeout: 246 seconds]
TheLemonMan has quit [Ping timeout: 240 seconds]
jlam1 has joined #ocaml
TheLemonMan has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
jack5638 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
cranmax has quit [Read error: Connection reset by peer]
dwillems has joined #ocaml
kakadu has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
jbrown has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
TheLemon1an has joined #ocaml
TheLemonMan has quit [Ping timeout: 240 seconds]
jack5638 has quit [Ping timeout: 268 seconds]
TheLemon1an has quit [Client Quit]
TheLemonMan has joined #ocaml
jack5638 has joined #ocaml
enterprisey has quit [Remote host closed the connection]
cggong has quit [Quit: cggong]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
cggong has joined #ocaml
dwillems has quit [Ping timeout: 260 seconds]
dtornabene has joined #ocaml
dtornabene has quit [Remote host closed the connection]
dtornabene has joined #ocaml
dtornabene has quit [Remote host closed the connection]
dtornabene has joined #ocaml
jnavila has quit [Remote host closed the connection]
mengu has joined #ocaml
ryanartecona has joined #ocaml
dwillems has joined #ocaml
daniel_ has joined #ocaml
dtornabene has quit [Read error: Connection reset by peer]
cranmax has joined #ocaml
cranmax has quit [Client Quit]
ryanartecona has quit [Quit: ryanartecona]
cranmax has joined #ocaml
dwillems has quit [Ping timeout: 240 seconds]
boojinks has joined #ocaml
Merv_ has joined #ocaml
_andre has quit [Quit: leaving]
pierpa has joined #ocaml
boojinks has quit [Quit: Lost terminal]
larhat has joined #ocaml
hashpuppy has quit [Quit: Connection closed for inactivity]
ygrek has joined #ocaml
dwillems has joined #ocaml
cranmax has quit [Read error: Connection reset by peer]
slack5 has quit [Remote host closed the connection]
slack1 has joined #ocaml
cranmax has joined #ocaml
dwillems has quit [Quit: Ex-Chat]
dwillems has joined #ocaml
dwillems has quit [Client Quit]
marsam has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
cggong has quit [Quit: cggong]
KeyJoo has quit [Ping timeout: 260 seconds]
daniel_ has quit [Remote host closed the connection]
dtornabene has joined #ocaml
ryanartecona has joined #ocaml
Simn has joined #ocaml
dxtr has quit [Quit: quit]
larhat has quit [Quit: Leaving.]
dxtr has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
ryanartecona has quit [Client Quit]
dxtr has quit [Quit: leaving]
dxtr has joined #ocaml
marsam has joined #ocaml
cggong has joined #ocaml
jlam has joined #ocaml
cggong has quit [Client Quit]
jlam1 has quit [Ping timeout: 258 seconds]
spew has joined #ocaml
jlam_ has joined #ocaml
jlam is now known as Guest83230
jlam__ is now known as jlam
Guest83230 has quit [Killed (card.freenode.net (Nickname regained by services))]
kakadu has quit [Remote host closed the connection]
spew has quit [Quit: foobar]
phase has joined #ocaml
phase is now known as Guest28374
mfp__ has joined #ocaml
mfp_ has quit [Ping timeout: 240 seconds]
marsam has quit [Remote host closed the connection]
cggong has joined #ocaml