companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
rostero has joined #ocaml
<rostero> how would i use this type? `type foo = | Foo of foo_t and foo_t = { x: string; y: string;}`?
<rostero> can someone give me an example?
VermillionAzure has joined #ocaml
<wtetzner> I'm not sure what you mean. You mean how would you construct an instance of that type?
<rostero> yes
<wtetzner> here's a simple example
<wtetzner> let () = let foo = Foo { x = "stuff"; y = "things" } in
<wtetzner> match foo with
<wtetzner> | Foo { x; y } -> Printf.printf "x: %s; y: %s\n" x y
<rostero> perfect. thanks, wtetzner
<wtetzner> does anyone know of some good resources on how to write ppx extensions?
<wtetzner> I found an old one, but it would be nice to know how to use ocaml-migrate-parsetree and whatever else is the "right" way to do it (and it should work with jbuilder)
enterprisey has joined #ocaml
lgd has quit [Read error: Connection reset by peer]
lgd has joined #ocaml
sh0t has quit [Remote host closed the connection]
cobreadmonster has quit [Quit: Connection closed for inactivity]
cobreadmonster has joined #ocaml
wtetzner has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
mayhew has quit [Remote host closed the connection]
rwmjones|KVM2017 has quit [Ping timeout: 246 seconds]
Denommus has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
wtetzner has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
enterprisey has joined #ocaml
wtetzner has quit [Ping timeout: 248 seconds]
enterprisey has quit [Remote host closed the connection]
\k has joined #ocaml
wtetzner has joined #ocaml
\k is now known as h11
enterprisey has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
_whitelogger has joined #ocaml
troydm has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
Denommus has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
VermillionAzure has quit [Remote host closed the connection]
VermillionAzure has joined #ocaml
nomicflux has quit [Quit: nomicflux]
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
kerrhau has quit [Ping timeout: 255 seconds]
enterprisey has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
enterprisey has joined #ocaml
zaquest has quit [Quit: Leaving]
rpcope has quit [Ping timeout: 240 seconds]
zaquest has joined #ocaml
rpcope has joined #ocaml
govg has joined #ocaml
enterprisey has quit [Quit: Leaving]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Killed (verne.freenode.net (Nickname regained by services))]
infinity0_ has joined #ocaml
lgd has quit [Remote host closed the connection]
lgd has joined #ocaml
cbot_ has quit [Quit: Leaving]
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 240 seconds]
mbuf has quit [Ping timeout: 258 seconds]
mbuf has joined #ocaml
MercurialAlchemi has joined #ocaml
mk9_ has joined #ocaml
mk9_ has quit [Client Quit]
nahra has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
zmt00 has quit [Quit: Leaving]
Terminus has joined #ocaml
<Terminus> hi there. i really know nothing about ocaml. i'm trying to run opam init on a digital ocean droplet with 512MB RAM and i'm getting the error `Sys_error("rm -rf /opt/liquidsoap/system/lib/base-bigarray: Cannot allocate memory")`. how much RAM do i actually need or is RAM not the problem?
<Terminus> oh, there is an existing ocaml install from debian jessie repos on the system. would that affect it? i just reran opam init again and it seemed to have been able to proceed.
Simn has joined #ocaml
mk9_ has joined #ocaml
dtornabene has joined #ocaml
mk9_ has quit [Quit: mk9_]
mk9_ has joined #ocaml
mk9_ has quit [Client Quit]
TheLemonMan has joined #ocaml
argent_smith has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
jbrown has quit [Ping timeout: 258 seconds]
samrat has quit [Ping timeout: 255 seconds]
alexyan has joined #ocaml
<alexyan> Hi! How can I use method names with underscores in jsoo objects, like "is_checked"? It seems that after compilation this method name is trimmed to "is"
troydm has joined #ocaml
AltGr has joined #ocaml
andreas__ has joined #ocaml
samrat has joined #ocaml
TheLemonMan has quit [Ping timeout: 240 seconds]
JeanMax has joined #ocaml
ygrek_ has joined #ocaml
freyr has joined #ocaml
shiyaz has joined #ocaml
TheLemonMan has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
VermillionAzure has quit [Remote host closed the connection]
VermillionAzure has joined #ocaml
TheLemonMan has quit [Ping timeout: 240 seconds]
TheLemonMan has joined #ocaml
<JeanMax> hello
shinnya has joined #ocaml
<reynir> hello
AltGr has left #ocaml [#ocaml]
nicooo has joined #ocaml
mfp has joined #ocaml
dhil has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
ziyourenxiang has joined #ocaml
zolk3ri has joined #ocaml
johnelse has quit [Quit: leaving]
johnelse has joined #ocaml
freusque has joined #ocaml
<JeanMax> I'm struggling to integrate merlin to emacs with the basic eliom template... is it possible to let merlin understand the syntax extensions %client / %server / %shared ?
<Armael> JeanMax: I think the answer is mostly "no". merlin is able to parse %client & co since it's standard ocaml syntax, but it is not able yet to type it correctly
<JeanMax> ok thanks!
<JeanMax> looks like it stops complaining when I include eliom.ppx.type, that's a beginning :)
_andre has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
samrat has quit [Ping timeout: 248 seconds]
nahra has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
shepi has joined #ocaml
mnemem has joined #ocaml
shepi has quit [Ping timeout: 260 seconds]
shepi has joined #ocaml
<shepi> hello?
<shepi> sounds like it works this time :-)
shepi has quit [Ping timeout: 260 seconds]
mk9_ has joined #ocaml
mk9_ has quit [Ping timeout: 252 seconds]
nomicflux has joined #ocaml
samrat has joined #ocaml
mnemem has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
dhil has joined #ocaml
Denommus has joined #ocaml
kakadu has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
shinnya has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
samrat has quit [Ping timeout: 240 seconds]
alexyan has quit [Quit: Ухожу я от вас]
theglass has quit [Quit: ZNC - http://znc.in]
freusque has joined #ocaml
sh0t has joined #ocaml
samrat has joined #ocaml
dhil has joined #ocaml
jbrown has joined #ocaml
nicooo has quit [Remote host closed the connection]
nicooo has joined #ocaml
mengu has joined #ocaml
nicooo is now known as nicoo
mbuf has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 246 seconds]
mnemem has quit [Read error: Connection reset by peer]
freyr has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
Denommus has quit [Quit: restarting emacs]
jao has joined #ocaml
thegameg has quit [Quit: Bye bye.]
mengu has joined #ocaml
thegameg has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 248 seconds]
<Leonidas> hmm, I am trying to require mysql_protocol in utop
<Leonidas> but it fails with undefined global Big_int
<Leonidas> but that's part of the ocaml compiler?
<Leonidas> Error: Reference to undefined global `Big_int'
<Leonidas> hmm, https://github.com/diml/utop/issues/213 utop-full does not help
<zolk3ri> "#load "nums.cma" ;;"?
<reynir> Leonidas: not anymore, I think
<reynir> "The legacy Num library for arbitrary-precision integer and rational arithmetic that used to be part of the OCaml core distribution" https://github.com/ocaml/num
<Leonidas> reynir: but I can acces Big_int.* from utop just fine
<reynir> Ah really?
<Leonidas> well I can enumerate them, haven't tried calling anything
<Leonidas> yeah, I can get big int zero just fine
<reynir> Is there a #require "num";; in your .ocamlinit perhaps?
johnelse_ has joined #ocaml
johnelse has quit [Ping timeout: 255 seconds]
<Leonidas> no, I have none
<Leonidas> and building a program with it works just fine
VermillionAzure has quit [Ping timeout: 248 seconds]
jcelerier1 has joined #ocaml
FreeBirdLjj has joined #ocaml
<jcelerier1> hi :)
<jcelerier1> is there a generic, n-ary List.split ?
<jcelerier1> eg I'd like to convert a list of n-uplets into n-uplets of lists
<Drup> jcelerier1: No
<jcelerier1> :(
<Drup> (try to write down the type of that function, you should see why)
<jcelerier1> aren't there some kind of template extensions to ocaml that would look like C++ templates ?
<Drup> not "like C++ templates", no :p
<octachron> jcelerier1, it is hard to tell what do you mean by "like C++ templates" (beyond "a broken not-even-lisp-like untyped macro system operating at the type-level")
zmt00 has joined #ocaml
Associat0r has joined #ocaml
Associat0r has joined #ocaml
pmetzger has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 255 seconds]
dhil has quit [Ping timeout: 248 seconds]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
dratini0 has joined #ocaml
Denommus has joined #ocaml
johnelse_ has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
nahra has quit [Remote host closed the connection]
wtetzner has joined #ocaml
<jcelerier1> octachron: I did it in C++ for the sake of spelling it out : https://paste.ofcode.org/z8sGZbRgmeCq25av45MuQq
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
mbuf has joined #ocaml
<M-ErkkiSeppl> actually there was this one ppx that did type-directed stuff, by running a type checker in itself before the compiler
<M-ErkkiSeppl> not sure if it worked very well or if it was robust regarding compiler updates, but it does exist :)
Soni has quit [Excess Flood]
Soni has joined #ocaml
aegray has joined #ocaml
<aegray> From the c api (I'm calling into ocaml from c with caml_callback), how is an option type represented? If I wanted to call a function that takes an int option - what does that look like?
<aegray> awesome thank you!
kakadu has left #ocaml ["Konversation terminated!"]
kakadu has joined #ocaml
mengu has quit [Remote host closed the connection]
enterprisey has joined #ocaml
slash^ has joined #ocaml
Associat0r has quit [Read error: Connection reset by peer]
mbuf has quit [Quit: Leaving]
mk9_ has joined #ocaml
wtetzner has quit [Ping timeout: 252 seconds]
dtornabene has quit [Read error: Connection reset by peer]
dtornabene has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jnavila has joined #ocaml
dhil has joined #ocaml
jnavila_ has joined #ocaml
jnavila has quit [Read error: Connection reset by peer]
JeanMax` has joined #ocaml
JeanMax has quit [Ping timeout: 248 seconds]
wtetzner has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
jnavila_ has quit [Ping timeout: 240 seconds]
<octachron> jcelerier1, it is possible to use ppx (aka an ast-level macro system) to generate this kind of code, but yes there is no direct way to do this in OCaml
jnavila_ has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
jnavila_ has quit [Ping timeout: 240 seconds]
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 248 seconds]
nahra has joined #ocaml
jnavila_ has joined #ocaml
dtornabene_ has joined #ocaml
mengu has joined #ocaml
mk9 has joined #ocaml
dtornabene has quit [Ping timeout: 248 seconds]
mk9_ has quit [Ping timeout: 258 seconds]
TheLemonMan has joined #ocaml
shinnya has joined #ocaml
webshinra has quit [Quit: Leaving]
pmetzger has quit [Read error: Connection reset by peer]
pmetzger has joined #ocaml
sh0t has quit [Ping timeout: 246 seconds]
pmetzger has quit []
kakadu has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 260 seconds]
jnavila_ has quit [Ping timeout: 240 seconds]
jnavila_ has joined #ocaml
mengu has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
jnavila_ has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
al-damiri has joined #ocaml
dtornabene_ has quit [Read error: Connection reset by peer]
JeanMax` has quit [Remote host closed the connection]
wtetzner has quit [Ping timeout: 246 seconds]
dtornabene_ has joined #ocaml
jnavila_ has joined #ocaml
wtetzner has joined #ocaml
jnavila has quit [Read error: Connection reset by peer]
enterprisey has quit [Remote host closed the connection]
wtetzner has quit [Ping timeout: 246 seconds]
wtetzner has joined #ocaml
kerrhau has joined #ocaml
enterprisey has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
dtornabene_ has quit [Quit: Leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
dratini0 has quit [Quit: Leaving]
shiyaz has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
VermillionAzure has joined #ocaml
mnemem has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
Denommus has quit [Ping timeout: 255 seconds]
enterprisey has quit [Ping timeout: 248 seconds]
jnavila_ has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
jnavila_ has joined #ocaml
argent_smith has joined #ocaml
SpiceGuid has joined #ocaml
ayxih has joined #ocaml
jao has quit [Remote host closed the connection]
lgd has quit [Read error: Connection reset by peer]
lgd_ has joined #ocaml
jnavila_ has quit [Remote host closed the connection]
nomicflux has joined #ocaml
jao has joined #ocaml
mk9 has quit [Ping timeout: 264 seconds]
lgd__ has joined #ocaml
lgd_ has quit [Read error: Connection reset by peer]
troydm has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
kakadu_ has quit [Remote host closed the connection]
VermillionAzure has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
cbot has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
mengu has quit [Remote host closed the connection]
troydm has joined #ocaml
mnemem has quit [Ping timeout: 252 seconds]
Simn has quit [Quit: Leaving]
ziyourenxiang has quit [Ping timeout: 252 seconds]
mengu has joined #ocaml
pierpa has joined #ocaml
mnemem has joined #ocaml
mengu has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
mnemem has quit [Ping timeout: 240 seconds]
VermillionAzure has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
VermillionAzure has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml