adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | 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
Hao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
trepta7 has quit [Ping timeout: 265 seconds]
silver has quit [Quit: rakede]
al-damiri has quit [Quit: Connection closed for inactivity]
agarwal1975 has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Sim_n has quit [Read error: Connection reset by peer]
orbifx has quit [Ping timeout: 246 seconds]
fraggle-boate_ has joined #ocaml
fraggle-boate has quit [Ping timeout: 256 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
wu_ng has joined #ocaml
gregoire has quit [Ping timeout: 265 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
sh0t has quit [Remote host closed the connection]
infinity0 has quit [Remote host closed the connection]
zv has quit [Quit: WeeChat 1.5]
infinity0 has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
srcerer_ has joined #ocaml
chelfi has quit [Ping timeout: 245 seconds]
chelfi has joined #ocaml
thizanne has quit [Ping timeout: 245 seconds]
thizanne has joined #ocaml
mehdib has quit [Ping timeout: 245 seconds]
mehdib has joined #ocaml
srcerer has quit [Ping timeout: 260 seconds]
gregoire has joined #ocaml
g4143 has joined #ocaml
rgrinberg has joined #ocaml
\h has left #ocaml ["WeeChat 1.6"]
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
pierpa has quit [Ping timeout: 246 seconds]
michbad has joined #ocaml
larhat has quit [Quit: Leaving.]
nomicflux has quit [Quit: nomicflux]
g4143 has quit [Quit: Leaving]
dakk_ has quit [Ping timeout: 246 seconds]
dakk_ has joined #ocaml
AlexDenisov has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 246 seconds]
infinity0_ has joined #ocaml
infinity0 has joined #ocaml
infinity0 is now known as Guest41534
Guest41534 has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
dakk_ has quit [Ping timeout: 265 seconds]
trepta7 has joined #ocaml
dakk_ has joined #ocaml
infinity0 has quit [Remote host closed the connection]
henrytill_ is now known as henrytill
henrytill has joined #ocaml
henrytill has quit [Changing host]
infinity0 has joined #ocaml
MightyJoe is now known as cyraxjoe
copy` has quit [Quit: Connection closed for inactivity]
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ygrek has quit [Ping timeout: 260 seconds]
infinity0 has quit [Remote host closed the connection]
kamog has joined #ocaml
infinity0 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
<rgrinberg> vbmithr: \o/
<rgrinberg> reviving conduit is painful T_T
noddy has quit [Ping timeout: 250 seconds]
noddy has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
mkdf has joined #ocaml
fre has joined #ocaml
nore has quit [Quit: WeeChat 1.4]
ocaml851 has joined #ocaml
MercurialAlchemi has joined #ocaml
<ocaml851> Ho is the List compare function used to sort a list of tuples based on the keys ? Any pointers ?
nore has joined #ocaml
<ocaml851> Can I use my own function to compare ?
desert-rose has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
michbad has quit [Remote host closed the connection]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
trepta7 has quit [Ping timeout: 246 seconds]
alfredo has joined #ocaml
<companion_cube> you mean List.sort, ocaml851?
<companion_cube> yes, you can provide your own comparison function
<companion_cube> e.g. `List.compare (fun (x,_)(y,_) -> compare x y) some_list` will sort w.r.t the first element of tuples
argent_smith has joined #ocaml
desert-rose has quit [Ping timeout: 260 seconds]
<ocaml851> companion_cube : I got that.Even this. let mycompare (key,value) (key',value') = compare key key1;;
<ocaml851> Yours is more functional. I guess.
jnavila has joined #ocaml
<companion_cube> heh, in this case it's simple enough that a lambda is shorter
<companion_cube> if you use the comparison function several times, you might still want to name the comparison function, of course
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
kamog has quit [Remote host closed the connection]
larhat has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
zpe has joined #ocaml
ygrek has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
nathanielc has quit [Ping timeout: 268 seconds]
AltGr has joined #ocaml
nathanielc has joined #ocaml
Simn has joined #ocaml
AlexDenisov has joined #ocaml
fre has quit [Ping timeout: 256 seconds]
newbie61 has joined #ocaml
newbie61 is now known as lolisa
MercurialAlchemi has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 248 seconds]
maattdd has joined #ocaml
agarwal1975_ has joined #ocaml
agarwal1975 has quit [Ping timeout: 260 seconds]
agarwal1975_ is now known as agarwal1975
AlexRussia has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mpenet has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
AlexDenisov has joined #ocaml
dakk_ has quit [Quit: Leaving]
jwatzman|work has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
_andre has joined #ocaml
kakadu has joined #ocaml
mkdf has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
wu_ng has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 248 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
mfp has joined #ocaml
AlexRussia has joined #ocaml
FreeBirdLjj has joined #ocaml
<ocaml851> Question. let n = List.assoc a l in (a, (appendtolist n b)) Data structure is [("a,["b"])]
maattdd has quit [Ping timeout: 258 seconds]
<ocaml851> I thought appendtolist will add "c" like this. [("a,["b","c"])]
<ocaml851> It doesn't. Should I remove ("a,["b"]) and add ("a,["b","c"]) again ?
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
<companion_cube> for real use you might want to use a Map instead
<ocaml851> Meaning ?
<companion_cube> association lists are not very good
<companion_cube> and not that convenient
<companion_cube> (since you don't have this "replace" operation)
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<companion_cube> got to go
<ocaml851> Ok. Not sure how to use List.remove_assoc and also modify
maattdd has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zozozo> ocaml851: have you tried the Map module ?
<ocaml851> You mean map and then do the same thing ?
<ocaml851> List.map over [("a,["b"])] and get [("a,["b","c"])]
<ocaml851> I need to add ("a,["b"]) if it isn't there or update to [("a,["b","c"])]
<zozozo> no, I mean the Map.Make functor
<zozozo> this should provide you with much of the functions you need
<ocaml851> Well. I am using assoc. lists to learn.
AlexDenisov has joined #ocaml
<zozozo> ok, so what's your current problem ?
<ocaml851> let insert l a b = if List.mem_assoc a l then let n = List.assoc a l in (a, (appendtolist n b))::(List.remove_assoc a l) else (a, (appendtolist [] b))::l ;;
<ocaml851> [("a,["b"])] to [("a,["b","c"])]
<ocaml851> Doesn't happen like that.
Mercuria1Alchemi has joined #ocaml
<zozozo> hm.. could your full paste your code somewhere ?
<ocaml851> Instead this happens [("a,["b"])] becomes[("a,["c"]]
<zozozo> weird, when I try that code, insert ["a", ["b"]] "a" "c" gives ["a", ["b"; "c"]] as expected
<ocaml851> Oh! Let me check.
maattdd has quit [Ping timeout: 250 seconds]
rb___3 has joined #ocaml
<ocaml851> zozozo : I got the bug which is elsewhere.
gregoire has quit [Ping timeout: 265 seconds]
shintaro has joined #ocaml
<shintaro> j
shintaro has quit [Client Quit]
TarVanimelde has quit [Quit: TarVanimelde]
kamog has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 248 seconds]
TarVanimelde has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfredo[away] has joined #ocaml
alfredo[away] is now known as alfredo
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
mpenet has left #ocaml ["ERC (IRC client for Emacs 26.0.50.2)"]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
dhil has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
Mercuria1Alchemi has joined #ocaml
alfredo has joined #ocaml
alfredo has quit [Client Quit]
maattdd has joined #ocaml
gregoire has joined #ocaml
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
alfredo has joined #ocaml
alfredo has quit [Client Quit]
dhil has quit [Ping timeout: 258 seconds]
alfredo has joined #ocaml
alfredo is now known as alfredo[away]
alfredo[away] is now known as alfredo
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
FreeBirdLjj has joined #ocaml
<ocaml851> Anyone have advice to pattern match recursive structures.
<ocaml851> Something( Something (x , y), Something (x , y), Something (Value 0 , Value 1))
AlexDenisov has joined #ocaml
<ocaml851> Something( Something (x , y, z), Something (x , y, z), Something (Value 0 , Value 1, Value 3))
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<lyxia> what kind of advice
agarwal1975 has quit [Quit: agarwal1975]
<ocaml851> I mean all my patterns don't still seem to match.
<ocaml851> | Something(x,y,z) -> "Pattern1" | Something(x,Value 1,z) -> "Pattern2" and so on.
<ocaml851> Mine is not really pattern matching. It included all possible cases.
dhil has joined #ocaml
<ocaml851> Any book or paper on pattern matching ?
shinnya has joined #ocaml
<thizanne> implementation or use thereof ?
<ocaml851> use
<thizanne> RWO I guess
ocaml851 has quit [Ping timeout: 260 seconds]
gregoire has quit [Ping timeout: 260 seconds]
agarwal1975 has joined #ocaml
FreeBirdLjj has joined #ocaml
malc_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
th5 has joined #ocaml
ciniglio has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
sh0t has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
nomicflux has joined #ocaml
sepp2k has joined #ocaml
zirman has joined #ocaml
dhil has quit [Ping timeout: 245 seconds]
TarVanimelde has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
d0nn1e has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
dhil has joined #ocaml
copy` has joined #ocaml
kamog has quit [Ping timeout: 256 seconds]
nicholasf has quit [Remote host closed the connection]
tennix has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
al-damiri has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
gregoire has joined #ocaml
malc_ has quit [Remote host closed the connection]
isd has quit [Read error: Connection reset by peer]
Muzer has joined #ocaml
yomimono has joined #ocaml
isd has joined #ocaml
tennix has quit [Quit: WeeChat 1.6]
fraggle_ has quit [Ping timeout: 260 seconds]
larhat has quit [Quit: Leaving.]
fraggle_ has joined #ocaml
freusque has quit [Ping timeout: 268 seconds]
jnavila has quit [Quit: It was time]
mfp has quit [Ping timeout: 248 seconds]
nomicflux has quit [Quit: nomicflux]
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
gregoire has quit [Ping timeout: 248 seconds]
zirman has quit [Remote host closed the connection]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfp has joined #ocaml
trepta7 has joined #ocaml
dhil has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
smondet has joined #ocaml
hcarty has joined #ocaml
ryanartecona has joined #ocaml
jnavila has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
hcarty has quit [Quit: WeeChat 1.5]
malina has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
fre has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
kakadu has quit [Quit: Konversation terminated!]
zirmann has joined #ocaml
zirmann has quit [Remote host closed the connection]
zirman has quit [Read error: Connection reset by peer]
AltGr has left #ocaml [#ocaml]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
gregoire has joined #ocaml
sh0t has quit [Ping timeout: 258 seconds]
AlexDenisov has joined #ocaml
zv has joined #ocaml
sh0t has joined #ocaml
calculemus has quit [Read error: Connection reset by peer]
calculemus has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
_andre has quit [Quit: leaving]
jnavila has joined #ocaml
FreeBirdLjj has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
slash^ has joined #ocaml
kakadu has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
rgrinberg has joined #ocaml
ygrek has joined #ocaml
sh0t has joined #ocaml
RichN has joined #ocaml
nomicflux has joined #ocaml
dhil has joined #ocaml
zpe has joined #ocaml
trepta7 has quit [Ping timeout: 248 seconds]
esad has joined #ocaml
zirman has quit [Remote host closed the connection]
<seliopou> jlouis: are you here? I have a request for data :)
yomimono has quit [Ping timeout: 250 seconds]
fre has quit [Ping timeout: 250 seconds]
yomimono has joined #ocaml
th5 has quit []
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
orbifx has joined #ocaml
orbifx1 has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
lolisa has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
jnavila has quit [Ping timeout: 256 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
malina has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
nicholasf has joined #ocaml
jnavila has joined #ocaml
esad has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 260 seconds]
srcerer_ is now known as srcerer
yomimono has joined #ocaml
sh0t has quit [Ping timeout: 245 seconds]
<orbifx1> Can anyone tell how come this compiles on amd64, but not on ARM https://github.com/orbifx/logarion/blob/master/src/web.ml#L42
<orbifx1> It shouldn't built on neither
<orbifx1> because Lwt is not open
agarwal1975 has joined #ocaml
<kakadu> first of all you are missing some dependency because opiom.unix is not found
<orbifx1> ?
<orbifx1> btw link is stale now, as pushed to it
zpe has quit [Remote host closed the connection]
<orbifx1> kakadu: I don't get any issues; what did you get?
<kakadu> ocamlfind: Package `opium.unix' not found
<orbifx1> not installed maybe?
<kakadu> I did make opam.dependencies
nicholasf has quit [Remote host closed the connection]
<orbifx1> strange
<kakadu> weird
<orbifx1> even with make clean and make my compilation works
<orbifx1> Ill update opam in case something changed
gregoire has quit [Ping timeout: 260 seconds]
<orbifx1> what ocaml version are you using kakadu ?
<kakadu> 4.04
<kakadu> ah wait
<orbifx1> I've not built on 4.04 yet
<kakadu> opium doesn't compile with 4.04
<kakadu> I kind of missed that
<kakadu> opium is not installable because package alcotest is not found
<kakadu> 1. Who forgot a dependency
<kakadu> 2. Who invents so weird names?
<kakadu> okay, opium seems to be not installable. I don't want to hack this
sh0t has joined #ocaml
<kakadu> I have some Obj.magics to debug
ewanas has quit [Remote host closed the connection]
<orbifx1> kakadu: thanks for trying, good to know now to upgrade to 4.04 just yet :P
<orbifx1> I will speak to rgrinberg at some point about it
<orbifx1> but it's strange that my intel based machine compiled without me qualifying lwt, but the ARM one didn;t
<rgrinberg> opium is quite installable for me. $ ocamlfind list | grep -i opium gives both opium and opium.unix
<rgrinberg> That's on 4.04 btw
SpiceGuid has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
<orbifx1> I've not tried yet
<orbifx1> kakadu: had some trouble
<rgrinberg> I've never built OCaml on arm so I have no idea what problems could arise there :/
SpiceGuid has quit [Client Quit]
<kakadu> rgrinberg: https://paste.in.ua/2203/raw/
<rgrinberg> kakadu: thanks, let me have a look
<rgrinberg> kakadu: oh, could you try 0.15.1 please?
<rgrinberg> I recall 0.15.0 had some kind of a problem like this.
<orbifx1> rgrinberg: I'm building on ARM, but 4.03 for now, so will let you know
<orbifx1> rgrinberg: quick side question, how do I select the port opium listens to?
<rgrinberg> Depends on if you're using the builtin cmdliner support. In that case just pass -p appropriately.
<orbifx1> no cmdline for now
<orbifx1> I noticed that and I will investigate another day, but fow now, say I want to do it from within the code.
<rgrinberg> Otherwise just use the port function in Opium.App.port
<orbifx1> I tried App.empty |> port ...
<kakadu> File "src/web.ml", line 42, characters 20-26:
<kakadu> Error: Unbound value return
<kakadu> on amd64
<kakadu> orbifx1: !!!!!
<kakadu> No magic in this world except the `Obj.magic`
<rgrinberg> orbifx1: yes! opium will no longer export Lwt's functions for you
<rgrinberg> orbifx1: Let me see an example of where you're trying to set the port
<orbifx1> kakadu, rgrinberg: I guess I have an old version of opium. I've fixed the Lwt opening anyway
<orbifx1> rgrinberg: also my bad, I didn't open App for port
FreeBirdLjj has joined #ocaml
nicholasf has joined #ocaml
zirmann has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
zirman has quit [Ping timeout: 246 seconds]
zirmann has quit [Ping timeout: 258 seconds]
sepp2k has quit [Quit: Leaving.]
jimt_ has joined #ocaml
isd has quit [Ping timeout: 244 seconds]
jimt has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 260 seconds]
agarwal1975 has quit [Ping timeout: 245 seconds]
<orbifx1> rgrinberg: seems to work fine on ARM
gregoire has joined #ocaml
<orbifx1> zozozo: was it you who told me that ppx_deriving can automatically generate string values for field names?
argent_smith has quit [Quit: Leaving.]
kcns has joined #ocaml
kakadu has quit [Remote host closed the connection]
<kcns> does anyone know how to get the threads module working in the interpreter?
yomimono has quit [Ping timeout: 268 seconds]
TarVanimelde has joined #ocaml
jimt_ has quit [Ping timeout: 268 seconds]
jimt has joined #ocaml
zirman has joined #ocaml
zirman has quit [Ping timeout: 245 seconds]
zirman has joined #ocaml
sh0t has quit [Quit: Leaving]
zirman has quit [Remote host closed the connection]
gregoire has quit [Ping timeout: 250 seconds]
kcns has quit [Quit: Page closed]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
malc_ has joined #ocaml
malc_ has quit [Remote host closed the connection]