adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
cemerick has quit [Ping timeout: 276 seconds]
cemerick has joined #ocaml
iovec has quit [Quit: Connection closed for inactivity]
unyu has quit [Quit: brb]
unyu has joined #ocaml
theglass has quit [Ping timeout: 265 seconds]
Hrundi_V_Bakshi has quit [Ping timeout: 265 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
theglass has joined #ocaml
theglass is now known as Guest66690
madroach has joined #ocaml
Guest66690 has left #ocaml [#ocaml]
spew has quit [Quit: Connection closed for inactivity]
theglass has joined #ocaml
h11 has joined #ocaml
andreas303 has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
cobreadmonster has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 265 seconds]
dmiles has quit [Read error: Connection reset by peer]
dmiles has joined #ocaml
bitwinery has quit [Ping timeout: 265 seconds]
rotucer has quit [Ping timeout: 268 seconds]
vicfred has joined #ocaml
bitwinery has joined #ocaml
narimiran has joined #ocaml
ggole has joined #ocaml
bitwinery has quit [Read error: Connection reset by peer]
rotucer has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
gravicappa has joined #ocaml
dborisog has joined #ocaml
rotucer has quit [Ping timeout: 268 seconds]
rotucer has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
brettgilio has joined #ocaml
jao has joined #ocaml
jco has joined #ocaml
jco has quit [Quit: WeeChat 2.6]
Haudegen has joined #ocaml
<rzmt> Hi, any tips why the second pmatch returns false? Is this a bug in the ocaml-re library? https://bpaste.net/show/4ZZOK
<dmbaturin> rzmt: Looks like it may have a problem with non-ASCII characters...
<dmbaturin> ...but only in character ranges.
<dmbaturin> # Re.matches (Re.Perl.compile_pat "\\d+–\\d+") "123–123" ;;
<dmbaturin> - : string list = ["123–123"]
jnavila has joined #ocaml
<Armael> ye I think re only knows about ascii
<rzmt> I see
<Armael> your '–' is probably interpreted as the set of (several) bytes that compose its codepoint
<Armael> so from the perspective of re you should consider it being several characters
<ggole> Might wanna test that: I don't have re installed, but I imagine it's something like let re = Pcre.regexp "[a–]" in String.iter (fun char -> Printf.printf "%c matched by regexp : %b\n" char (Pcre.pmatch ~rex:re (String.make 1 char))) "a–"
<rzmt> it prints "a matched by regexp : true" and then three times " matched by regexp : true"
<ggole> Right. That indicates that the alternative is being interpreted as four unrelated characters (a, and the three bytes of the utf-8 representation of –).
<ggole> Which is what dmbaturin and Armael suspected was happening.
madroach has quit [Read error: Connection reset by peer]
<rzmt> My goal is to extract the integers from strings like in my example. Maybe i should try another lib? This library supports unicode, but im not sure if its meant for this kind of stuff https://github.com/ocaml-community/sedlex
<ggole> You could do that. It might be a bit heavyweight, but it should work.
madroach has joined #ocaml
<Armael> rzmt: what about matching with "\\d+(a|–)\\d+" ?
<rzmt> Armael: that seems to work thanks. i think ill just use this even though its a bit hacky
mfp has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
jnavila has quit [Ping timeout: 246 seconds]
jnavila has joined #ocaml
jao has joined #ocaml
gareppa has joined #ocaml
silver has joined #ocaml
amiloradovsky has joined #ocaml
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 276 seconds]
amiloradovsky has quit [Ping timeout: 245 seconds]
jnavila_ has quit [Ping timeout: 246 seconds]
Serpent7776 has joined #ocaml
klntsky has quit [Read error: Connection reset by peer]
nicooo has quit [Read error: Connection reset by peer]
andreas303 has quit [Write error: Broken pipe]
oxford has quit [Read error: Connection reset by peer]
oxford has joined #ocaml
klntsky has joined #ocaml
andreas303 has joined #ocaml
nicooo has joined #ocaml
nicooo has quit [Excess Flood]
nicooo has joined #ocaml
theglass has left #ocaml [#ocaml]
FreeBirdLjj has joined #ocaml
gareppa has quit [Quit: Leaving]
<rzmt> csv package in opam serializes into csv from type "string list list". Can i somehow write a function which converts a record into "string list", so that i dont have to modify the function when new fields are added to the record?
<rzmt> in python i could use something like dict.values(), maybe there is something similar in OCaml?
iovec has joined #ocaml
<def`> rzmt: no there is no such thing. At least with pattern matching the compiler will tell you which field you forgot to add
<thizanne> rzmt: you seem to be comparing things living on different levels
<thizanne> a record is not comparable to a python dict, it would be something like a python object, where fields of the record become attributes of the object
<thizanne> to write such a to_string, you would need to do introspection, and no ocaml won't let you do that
<thizanne> if you want something that works like a python dict, that would be a hash table (module Hashtbl), or a Map if you want persistence (~ immutability), and then you'll get the function you want
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
UndefinedIsNotAF has joined #ocaml
ziyourenxiang__ has quit [Ping timeout: 246 seconds]
<ggole> There's a ppx for generating csv output
zmt00 has quit [Quit: Leaving]
kakadu has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
gareppa has joined #ocaml
rotucer has quit [Ping timeout: 265 seconds]
dborisog has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 276 seconds]
unyu has quit [Quit: unyu~]
parcs has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
parcs has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
kakadu has joined #ocaml
rotucer has joined #ocaml
sagax has quit [Quit: Konversation terminated!]
gareppa has quit [Quit: Leaving]
gareppa has joined #ocaml
unyu has joined #ocaml
<rzmt> didn't know that the compiler warns about unused labels with pattern matching, very useful
<rzmt> thanks all
<rzmt> "Either bind these labels explicitly or add '; _' to the pattern."
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
vicfred has quit [Quit: Leaving]
gareppa has quit [Quit: Leaving]
_whitelogger has joined #ocaml
Hrundi_V_Bakshi has joined #ocaml
oni-on-ion has quit [Ping timeout: 245 seconds]
oni-on-ion has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 276 seconds]
ggole has quit [Quit: Leaving]
jnavila_ has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 276 seconds]
Serpent7776 has quit [Quit: leaving]
unyu has quit [Quit: brb]
unyu has joined #ocaml
sagax has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
narimiran has quit [Ping timeout: 265 seconds]
kakadu has quit [Ping timeout: 265 seconds]
kakadu has joined #ocaml
j9m has quit [Quit: ZNC 1.7.1 - https://znc.in]
gareppa has joined #ocaml
tobiasBo1 is now known as tb
tb is now known as t0b0
averell has quit [Remote host closed the connection]
gareppa has quit [Remote host closed the connection]
jnavila_ has quit [Remote host closed the connection]
Madars has quit [Ping timeout: 276 seconds]
Madars has joined #ocaml
bronsen has quit [Ping timeout: 265 seconds]
iovec has quit [Quit: Connection closed for inactivity]
jao has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 265 seconds]
jao has joined #ocaml
<hannes> in a dune project (with 1.11), is there a way to use C stubs directly from an (executable ..) stanza? it complains about (c_names ..) and also (foreign_stubs ..) in the (executable ..)?
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 268 seconds]
kakadu has quit [Remote host closed the connection]
rotucer has quit [Ping timeout: 265 seconds]
rotucer has joined #ocaml
silver has quit [Quit: rakede]
ziyourenxiang has joined #ocaml