adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has quit [Remote host closed the connection]
jimmyrcom has quit [Ping timeout: 246 seconds]
gtrak has joined #ocaml
infinity0 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
tokomak has joined #ocaml
mengu has joined #ocaml
gtrak has quit [Ping timeout: 248 seconds]
gtrak has joined #ocaml
mengu has quit [Ping timeout: 276 seconds]
spew has quit [Quit: Connection closed for inactivity]
ziyourenxiang has quit [Ping timeout: 240 seconds]
gtrak has quit [Ping timeout: 264 seconds]
am55 has quit [Quit: am55]
gtrak has joined #ocaml
orbifx has quit [Quit: WeeChat 2.0.1]
shinnya has quit [Ping timeout: 246 seconds]
tokomak has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 256 seconds]
gtrak has joined #ocaml
jonh has joined #ocaml
gtrak has quit [Ping timeout: 264 seconds]
gtrak has joined #ocaml
mbuf has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
mbuf has left #ocaml ["Leaving"]
zolk3ri has quit [Quit: leaving]
al-damiri has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 268 seconds]
p_d has joined #ocaml
p_d has quit [Excess Flood]
p_d has joined #ocaml
SiGe has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jimmyrcom has joined #ocaml
tormen has joined #ocaml
p_d has quit [Quit: If you think nobody cares, try missing a few payments]
tormen_ has quit [Ping timeout: 264 seconds]
spew has joined #ocaml
TC01 has quit [Remote host closed the connection]
jimmyrcom has quit [Ping timeout: 246 seconds]
jimmyrcom has joined #ocaml
spew has quit [Quit: Leaving]
whoman has quit [Quit: WeeChat 1.9.1]
whoman has joined #ocaml
jao has quit [Ping timeout: 263 seconds]
jbrown has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
cbot has quit [Quit: Leaving]
zmt00 has quit [Quit: Leaving]
raphinou has joined #ocaml
SiGe has quit [Read error: Connection reset by peer]
jimmyrcom has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
jimmyrcom has joined #ocaml
mengu has joined #ocaml
jimmyrcom has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
remix2000 has quit [Quit: The Lounge - https://thelounge.github.io]
tarptaeya has joined #ocaml
zpe has joined #ocaml
remix2000 has joined #ocaml
mbuf has joined #ocaml
mbuf has left #ocaml [#ocaml]
<remix2000> Does somebody here use OCaml for web backend?
dhil has joined #ocaml
Onemorenickname has joined #ocaml
tarptaeya has quit [Remote host closed the connection]
AltGr has joined #ocaml
ollehar has joined #ocaml
jimmyrcom has joined #ocaml
barcabuona has quit [Quit: WeeChat 2.0.1]
barcabuona has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
ziyourenxiang has joined #ocaml
nicoo has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
mpenet has joined #ocaml
mpenet has left #ocaml [#ocaml]
<_xvilka_> hi
malc_ has joined #ocaml
<_xvilka_> what is the best modern way to deal with files? create/delete/copy/move?
mfp has joined #ocaml
<_xvilka_> I found 0 functions in Unix or Sys related to copying files
<_xvilka_> Sys.command("cp " ^ file1 ^ " " ^ file2) looks really weird
inr has quit [Quit: WeeChat 2.0.1]
<_xvilka_> remix2000: yes
<remix2000> _xvilka_, is it usable?
<flux[m]> _xvilka_: well at least don't do that :-)
<flux[m]> _xvilka_: perhaps shcaml, or some other library has functions for copying files
<_xvilka_> remix2000: depends on what you need. You can check Opium or Oscigen
<_xvilka_> remix2000: Eliom part
<Armael> _xvilka_: you can use Bos that contains these kind of basic file manipulation functions, or Shcaml which also provides a bunch of shell-like abstractions & features
<_xvilka_> thx, opened bug in the Core library. It is ridiculous they have rename and remove but not copy
ollehar has quit [Ping timeout: 264 seconds]
<malc_> _xvilka_: there's no copy C library call either
inr has joined #ocaml
<malc_> so ahem
<_xvilka_> malc_: OCaml is high level language, so comparing to C is not fair, really not
<malc_> _xvilka_: sys/unix are wrappers around libc functionality
ollehar has joined #ocaml
<malc_> one could make a case for Sys
<malc_> but then the semantics has to be specified
<malc_> and there's nothing to follow on
<flux[m]> I don't think there's THAT much to follow.. it should work like a basic copy function one would write using open_in and open_out in binary mode, with overwriting?
<_xvilka_> yeah, like others
<malc_> flux[m]: and the guessing game what copy should entail begins. coding this thing is far from the hardest part of the equation is what i'm trying to say
<_xvilka_> malc_: I would agree if not other similar language did that as a part of stdlib
<_xvilka_> *languages
<malc_> _xvilka_: have an example in mind?
<flux[m]> I think even the symlinks are extra ;)
<malc_> flux[m]: thanks.. the thing to note here is that this page begins with a big fat warning
trochdewei has joined #ocaml
<malc_> i.e. this thing is _NOT_ easy to specify
<_xvilka_> malc_: Rust for example
<flux[m]> malc_: I wouldn't expect any more
<flux[m]> ie. Unix 'cp' doesn't preserve permissions unless given special flags
ollehar has left #ocaml [#ocaml]
<_xvilka_> flux[m]: just checked shcaml, doesn't have a "copy" function
<malc_> flux[m]: "This function will overwrite the contents of to." unlike $ cp
<malc_> there go some expectations
<flux[m]> well it would certainly fit the library :)
<malc_> point being - not easy
<flux[m]> malc_: what do you mean unlike cp? cp overwrites.
<flux[m]> it's your alias cp -i that warns probably
<malc_> flux[m]: fair point, but it doesn't nullify mine! :)
<flux[m]> specify it as "do what cp, rust copy and python copy do by default" and you're pretty far ahead ;)
<malc_> and let the bike-sheding begin ;)
<flux[m]> well yes, that would be endless
<flux[m]> cool, found an another version: c++ boost::filesystem::copy_file doesn't overwrite by default. those boost guys often overthink things..
<kakadu> Drup: What have you meant saying `one way communications` here ? https://www.irif.fr/~gradanne/papers/talk_phdthesis.pdf#page=21
mengu_ has joined #ocaml
_whitelogger_ has joined #ocaml
averell- is now known as averell
shakalaka_ has joined #ocaml
Haudegen has quit [Remote host closed the connection]
barcabuona has joined #ocaml
shakalaka has quit [Ping timeout: 260 seconds]
keep_learning has quit [Ping timeout: 260 seconds]
gtrak has quit [Ping timeout: 260 seconds]
mrgrieves has quit [Ping timeout: 260 seconds]
micro has quit [Ping timeout: 260 seconds]
mengu has quit [Ping timeout: 260 seconds]
trochdewei has quit [Ping timeout: 260 seconds]
troydm has quit [Ping timeout: 260 seconds]
Sargun has quit [Ping timeout: 260 seconds]
darktenaibre has quit [Ping timeout: 260 seconds]
lopex has joined #ocaml
vinoski has joined #ocaml
awal has joined #ocaml
caw_______ has joined #ocaml
adi_____ has joined #ocaml
strmpnk has joined #ocaml
awal has quit [Ping timeout: 260 seconds]
dmbaturin has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 260 seconds]
xaimus has quit [Ping timeout: 260 seconds]
rixed has quit [Ping timeout: 260 seconds]
tormen has quit [Read error: Connection reset by peer]
adi_____ has quit [Changing host]
vinoski has quit [Changing host]
strmpnk has quit [Changing host]
lopex has quit [Changing host]
caw_______ has quit [Changing host]
_whitelogger has quit [Remote host closed the connection]
so has joined #ocaml
awal is now known as Guest86106
ahf has joined #ocaml
zolk3ri has joined #ocaml
mk9 has joined #ocaml
raphinou has quit [Ping timeout: 246 seconds]
mk9 has quit [Remote host closed the connection]
shinnya has joined #ocaml
Haudegen has joined #ocaml
sh0t has joined #ocaml
AltGr has joined #ocaml
mk9 has joined #ocaml
Guest86106 is now known as awal
raphinou has joined #ocaml
mk9_ has joined #ocaml
mk9 has quit [Read error: Connection reset by peer]
mk9_ has quit [Client Quit]
mk9 has joined #ocaml
raphinou has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
spew has joined #ocaml
spew has quit [Remote host closed the connection]
raphinou has joined #ocaml
orbifx has quit [Ping timeout: 248 seconds]
spew has joined #ocaml
dhil_ has quit [Ping timeout: 276 seconds]
raphinou has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
gtrak_1 has quit [Ping timeout: 276 seconds]
raphinou has joined #ocaml
tarptaeya has joined #ocaml
jbrown has joined #ocaml
p_d has joined #ocaml
gtrak_1 has joined #ocaml
dhil_ has joined #ocaml
am55 has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
sh0t has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
al-damiri has joined #ocaml
am55 has quit [Quit: am55]
zpe_ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
am55 has joined #ocaml
navaja has joined #ocaml
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
spew has quit [Disconnected by services]
navaja is now known as spew
spew has quit [Read error: Connection reset by peer]
mk9 has quit [Ping timeout: 245 seconds]
kalio has quit [Ping timeout: 256 seconds]
kalio has joined #ocaml
mk9 has joined #ocaml
<Leonidas> Is there a way I can retrieve each field of a module I am using as argument to a functor?
<Drup> I'm not sure what you mean
<Leonidas> I want to translate each val of a module to a different val, basically mapping over a module.
<thizanne> Leonidas: no you can't
raphinou has quit [Ping timeout: 264 seconds]
<Leonidas> module Added = Add1(struct a = 1 b = 2 end)
<thizanne> but that sounds like an XY problem: modules are probably not the right abstraction for what you're trying to do in the first place
AltGr has left #ocaml [#ocaml]
<companion_cube> unrelated, but I want implicits :/
<Leonidas> probably not! I am exploring ways on how to make things type-safe
<Leonidas> companion_cube: yesterday I mentioned I want a t-shirt that says "modular implicits"
<thizanne> "automagically transform all exported by a module" doesn't really rhyme with "type-safe" :)
<thizanne> all values*
<thizanne> maybe you could describe your actual problem so companion_cube could point you to the right solution instead of being sad about modular implicits
<Leonidas> haha
<companion_cube> :D
xutux has joined #ocaml
<companion_cube> if I describe my problem, will I get modular implciits ?
jao has joined #ocaml
<companion_cube> I'd really like to kill `=`
<thizanne> ok you'll get them
<thizanne> as soon as sequences are merged into stdlib
<companion_cube> ahah :D
<companion_cube> don't speak too soon
<companion_cube> this might actually happen
<thizanne> let's hope you're also talking about modular implicits then
<Leonidas> ok, so I am trying to have a nicer way to read config from the environment. Currently I have modules like module Redis = struct let username = Sys.getenv("Foo"); let dump () = sprintf "Username: %s" username end
<flux[m]> imagine.. one day you'll find not only sequences, but also effects AND typed effects, AS WELL AS multicore integrated
<flux[m]> and then you wake up
<companion_cube> exactly
gargawel has quit [Ping timeout: 255 seconds]
<Leonidas> and I would like to build modules out of specifications. So I'd like to say "there is a field username, which is read from that env var" and then I get this module which will give me these values and automatically generates a dump function.
Drup has quit [Ping timeout: 248 seconds]
<Leonidas> I mean, I could do it with PPX but I was hoping I could sort-of do it in-language
<companion_cube> ppx also won't help you with module inclusion
<thizanne> that doesn't sound too hard
<thizanne> wait that depends actually
<thizanne> couldnt you have one module per field ?
<Leonidas> thizanne: is this an idris joke?
<thizanne> module Username = struct let name = "username" let value = Sys.getenv("Foo") end
<Leonidas> thizanne: absolutely, but I somehow need to generate the dumping function from a list of modules?
<octachron> Leonidas, what is the difference between your modules and a map with string keys?
<thizanne> do you want to have only one dumping function ?
<companion_cube> a heterogeneous map, even
<Leonidas> octachron: that I would get an error on compile time when I try to access config.user_name instead of config.username
<Leonidas> thizanne: One per "service" (aka, redis, postgres etc) I'd imagine.
<thizanne> well there's no free lunch
<thizanne> if you make the compiler aware of each of your fields distinctively, then you have to explain how to manage them distinctively
Drup has joined #ocaml
<thizanne> but you could have your config as a record rather than a module, and ppx would help you quite a lot
<octachron> Leonidas, if it is just for catching spelling mistake, it may suffice to make the keys private strings
xutux has quit [Ping timeout: 260 seconds]
<companion_cube> +1 on the record type
<Leonidas> I could, but I specifically want to avoid going overboard and making things depend on code generation via ppx is a line which I wouldn't want to cross
<companion_cube> actually, a ppx for reading records from toml files would be cool
<Leonidas> I expect you can make a ppx_protocol_conv plugin for it
<Leonidas> shouldn't be too hard
<thizanne> if you don't want to use ppx, then you can either make your setting fields uniform enough so that you can manage them uniformly (that is, a map or something), or you have to explicitly manage each of them, as I said earlier
<thizanne> (but then ppx arent that bad, so that's probably getting the best of both approaches)
Mercuria1Alchemi has quit [Ping timeout: 264 seconds]
<companion_cube> I wish we had macros as part of the language, instead of these weird compiler plugins that are ppx
mengu_ has quit [Remote host closed the connection]
mengu has joined #ocaml
dhil_ has quit [Ping timeout: 256 seconds]
Onemorenickname_ has joined #ocaml
Onemorenickname has quit [Ping timeout: 248 seconds]
mengu_ has joined #ocaml
<flux[m]> am I hearing a new preprocessing facility for ocaml being specified here?! great!
TC01 has joined #ocaml
<bartholin> I wish there were a notation system à la Coq in OCaml.
mengu has quit [Ping timeout: 248 seconds]
xutux has joined #ocaml
<Drup> oh no
<Drup> plz
FreeBirdLjj has joined #ocaml
<bartholin> why not
<Drup> I have seen what it looks like in Agda (and to a lesser extend, in Haskell)
<Drup> In Coq, it's okayish because the community is small and most of the code is math
<Drup> don't ever give that tool to software developers or you will have billions of incompatible syntaxes and dialects that are impossible to understand
sz0 has quit [Quit: Connection closed for inactivity]
mk9 has quit [Ping timeout: 260 seconds]
mk9 has joined #ocaml
p_d has quit [Ping timeout: 240 seconds]
mengu_ has quit [Remote host closed the connection]
mengu has joined #ocaml
ziyourenxiang has quit [Ping timeout: 240 seconds]
zmt00 has joined #ocaml
ziyourenxiang has joined #ocaml
<Leonidas> Never saw this as a problem in Clojure.
mfp has quit [Ping timeout: 268 seconds]
<Leonidas> Though I am not sure this is similar to the notation system in Coq
<Leonidas> BER MetaOCaml to the rescue!
<Drup> Leonidas: Clojure doesn't allow you to change the syntax
<Drup> it's still mostly sexp-ish
mengu has quit [Ping timeout: 252 seconds]
<Drup> (at least, afaik)
<Leonidas> yes, that is true.
<Drup> Coq notations are arbitrary multi-argument language constructs
<Drup> with a type-based disambiguation system
<Leonidas> > MetaOCaml supports an arbitrary number of later stages, letting us write not only code generators but also generators of code generators, etc.
FreeBirdLjj has quit [Remote host closed the connection]
<thizanne> you won't use ppx but you're ok with MetaOCaml ?
<companion_cube> ^
kalio has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
kalio has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
mk9 has quit [Quit: mk9]
zpe has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
mk9 has joined #ocaml
zpe has joined #ocaml
AltGr has joined #ocaml
zpe has quit [Remote host closed the connection]
dhil_ has joined #ocaml
Onemorenickname_ has quit [Read error: Connection reset by peer]
Onemorenickname_ has joined #ocaml
ddosia has joined #ocaml
kuwze has quit [Ping timeout: 260 seconds]
<whoman> most packages on opam i see, are ppx
ygrek has quit [Ping timeout: 256 seconds]
dtornabene has joined #ocaml
orbifx has joined #ocaml
mfp has joined #ocaml
mk9_ has joined #ocaml
mk9 has quit [Ping timeout: 260 seconds]
mk9_ is now known as mk9
AltGr has left #ocaml [#ocaml]
mk9 has quit [Quit: mk9]
tane has joined #ocaml
dhil_ has quit [Ping timeout: 246 seconds]
mengu has joined #ocaml
am55 has quit [Quit: am55]
mengu has quit [Ping timeout: 263 seconds]
am55 has joined #ocaml
orbifx has quit [Read error: Connection reset by peer]
orbifx1 has joined #ocaml
orbifx1 has quit [Quit: Quit]
kakadu has quit [Quit: Konversation terminated!]
Haudegen has quit [Remote host closed the connection]
orbifx has joined #ocaml
btbytes has joined #ocaml
btbytes has quit [Client Quit]
Haudegen has joined #ocaml
kakadu has joined #ocaml
Onemorenickname_ has quit [Ping timeout: 268 seconds]
dejanr_ has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
dejanr has joined #ocaml
shinnya has joined #ocaml
AltGr has joined #ocaml
AltGr has left #ocaml [#ocaml]
gtrak_1 has quit [Ping timeout: 260 seconds]
gtrak_1 has joined #ocaml
gtrak_1 has quit [Ping timeout: 240 seconds]
gtrak_1 has joined #ocaml
tarptaeya has quit [Quit: Leaving]
zolk3ri has quit [Ping timeout: 248 seconds]
<orbifx> elo
zolk3ri has joined #ocaml
Jesin has joined #ocaml
_andre has quit [Quit: leaving]
Pierpa_ has joined #ocaml
tane has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
am55 has quit [Quit: am55]
shinnya has quit [Ping timeout: 276 seconds]
dmbaturin_ is now known as dmbaturin
mengu has joined #ocaml
xutux has quit [Ping timeout: 240 seconds]
leah2 has quit [Ping timeout: 240 seconds]
leah2 has joined #ocaml
gtrak_1 has quit [Ping timeout: 264 seconds]
argent_smith has quit [Quit: Leaving.]
bartholin has quit [Ping timeout: 276 seconds]
mengu has quit [Quit: Leaving...]
cbot has joined #ocaml
Pierpa_ has quit [Quit: Page closed]
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 246 seconds]
sh0t has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
isd has joined #ocaml