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
connorjacobsen has joined #ocaml
MooseAndCaml has quit [Quit: Page closed]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
zv has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody> Does anybody know how to link against a C shared library with oasis and opam?
<SomeDamnBody> Like, I'd like to specify a target to build as both bytecode and compiled, and link the shared object two different ways.
connorjacobsen has quit [Ping timeout: 260 seconds]
cthuluh has quit [Remote host closed the connection]
jlam_ has quit [Ping timeout: 248 seconds]
jlam has joined #ocaml
Ergatis has quit [Quit: Konversation terminated!]
jlam is now known as Guest56199
jlam__ is now known as jlam
iitalics has joined #ocaml
FreeBirdLjj has joined #ocaml
mfp__ has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
iitalics has quit [Quit: /thread]
iitalics has joined #ocaml
cbot has quit [Ping timeout: 252 seconds]
cbot has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 248 seconds]
pyx has joined #ocaml
pyx has quit [Client Quit]
ygrek has quit [Ping timeout: 240 seconds]
cbot_ has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
cbot has quit [Ping timeout: 252 seconds]
zv has quit [Quit: WeeChat 1.9]
zv has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
samrat has joined #ocaml
pierpa has quit [Quit: Page closed]
enterprisey has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
sam_ has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
vramana has quit [Ping timeout: 260 seconds]
vramana has joined #ocaml
sam_ has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 248 seconds]
jao has quit [Ping timeout: 240 seconds]
iitalics has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
samrat has joined #ocaml
SomeDamnBody has quit [Remote host closed the connection]
jlam_ has joined #ocaml
Guest56199 has quit [Ping timeout: 248 seconds]
MooseAndCaml has joined #ocaml
jlam_ has quit [Ping timeout: 248 seconds]
<MooseAndCaml> refactoring code into separate omake libs... how should I deal with a common_types.ml file that is shared across multiple libs? Should I copy the file into each lib/dir or make a lib just for those common types?
raphaelss has quit [Ping timeout: 246 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
raphaelss has joined #ocaml
_whitelogger has joined #ocaml
MercurialAlchemi has joined #ocaml
enterprisey has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
malina has joined #ocaml
Associat0r has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
bruce_r has quit [Ping timeout: 246 seconds]
malina has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
enterprisey has quit [Remote host closed the connection]
enterprisey has joined #ocaml
Simn has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
enterprisey has quit [Remote host closed the connection]
troydm has joined #ocaml
<orbifx[m]> MooseAndCaml: why not make it common within your project? I.e. one copy used by all your other modules in your projet?
tormen has quit [Ping timeout: 240 seconds]
tormen has joined #ocaml
olle has joined #ocaml
<def`> make a lib just for those common types
<def`> otherwise they won't be the same types...
samrat has quit [Ping timeout: 240 seconds]
cbot_ has quit [Quit: Leaving]
peterpp has joined #ocaml
mfp__ has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
argent_smith has joined #ocaml
<MooseAndCaml> thanks def... just finished first pass of the refactor... zzz city here I come
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 252 seconds]
samrat has joined #ocaml
xuanrui has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 255 seconds]
<companion_cube> hmmm, no hidden modules in jbuilder libs, it seems?
malina has joined #ocaml
dakk has joined #ocaml
BitPuffin|osx has joined #ocaml
pigeonv has joined #ocaml
<pigeonv> orbifix: I mostly relay interesting things I see, sometimes in OCaml (sometimes in French), sometimes about other things...
TheLemonMan has joined #ocaml
troydm has joined #ocaml
pigeonv has quit [Ping timeout: 240 seconds]
samrat has quit [Ping timeout: 248 seconds]
cthuluh has joined #ocaml
<rixed> I just noticed that OCaml parser rightfully reject "3600000000l" with "Integer literal exceeds the range of representable integers of type int32", but still accept the same litteral in hexadecimal: 0xD693A400l -> int32 = -694967296l Is there a reason for this?
<adrien> you're on 64 bits?
<adrien> ah, sorry, with the trailing 'l' :)
<adrien> really no idea :)
tane has joined #ocaml
nkhodyunya has joined #ocaml
nopf has joined #ocaml
<nkhodyunya> Hello, I'm trying to compile ocaml 4.05.0 with opam switch 4.05.0. After several warnings like "Warning 58: no cmx file was found in path for module Odoc_info, and its interface was not compiled with -opaque" i get " [Makefile:283: generators/odoc_literate.cmxs] Error 2
<nkhodyunya> ".
jao has joined #ocaml
<octachron> nkhodyunya, are you trying to install ocaml 4.05.0 with "opam switch 4.05.0" or building from source on your own? Are you using any exotic architecture, OS, or libc?
<nkhodyunya> octachron, I've tried both options. When building on my own, this errors shows up during make world.opt execution. I'm on Fedora 26.
<octachron> nkhodyunya, does it fail even when building with only one job?
<octachron> (in particular, heavily multithreaded OCaml compilation can trigger a hardware bug on non-μcode-patched Intel Sky/Kaby lake)
<nkhodyunya> I'll check it now
Associat0r has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
olle has joined #ocaml
Associat0r has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
<nkhodyunya> Wow, it works
<nkhodyunya> Thank you!
<octachron> nkhodyunya, what did work at the end, building with only one job?
\k has left #ocaml ["WeeChat 1.9"]
nomicflux has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Sim_n has quit [Ping timeout: 276 seconds]
<dinosaure> lyxia: here :)
peterpp has quit [Ping timeout: 240 seconds]
Sim_n has joined #ocaml
xuanrui has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
copy_ has joined #ocaml
mbuf has joined #ocaml
paxcoder has joined #ocaml
niris has joined #ocaml
<paxcoder> Hey, how doe this ML dialect stay alive? I feel like there are people going to companies to push ocaml, what gives?
<tane> paxcoder, how did you come to that feeling?
nomicflux has quit [Quit: nomicflux]
al-damiri has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<paxcoder> tane: It's a combination of things. The whole MirageOS thing, the fact that F# is based on Ocaml, WebAssembly has something to do with it, and now I've heard of ocaml-git. I just learned Flow is written in it too. SML seems dead in comparison, despite seemingly being the model language for type theory (short of full-on category theory).
bruce_r has joined #ocaml
malina has quit [Ping timeout: 240 seconds]
<paxcoder> tane: can I at least get an ack?
<tane> paxcoder, I still don't get your original question. Surely there are companies specialised in ocaml consulting. But what else did you expect?
wklm has joined #ocaml
<tane> some languages, their ecosystem and tooling is better suited for certain tasks than another language and vice versa for other tasks
<wklm> hey guys
<tane> howdy
<wklm> what's wrong with print_int function? Merlin tells me to use Out_channel.output_string stdout, but I can't find any documentation about it. It comes from Core lib
malina has joined #ocaml
paxcoder has left #ocaml [#ocaml]
tane has quit [Quit: Leaving]
MercurialAlchemi has joined #ocaml
sepp2k has joined #ocaml
sepp2k has quit [Client Quit]
sepp2k has joined #ocaml
<wklm> could someone tell me please why this weird exception is thrown? https://gist.github.com/wklm/2602a76c686421146af559a5ad222d91
sepp2k has quit [Remote host closed the connection]
<jmiven> wklm: Sys.argv.(0) is the name of the executable, not the name of the first argument
sepp2k has joined #ocaml
Soni has quit [Ping timeout: 246 seconds]
bruce_r has quit [Ping timeout: 246 seconds]
Soni has joined #ocaml
malina has quit [Ping timeout: 246 seconds]
ziyourenxiang has quit [Ping timeout: 248 seconds]
mbuf has quit [Quit: Leaving]
nomicflux has joined #ocaml
malina has joined #ocaml
TheLemonMan has joined #ocaml
enterprisey has joined #ocaml
Ragora has joined #ocaml
MooseAndCaml has quit [Quit: Page closed]
enterprisey has quit [Ping timeout: 260 seconds]
soultadu has joined #ocaml
soultadu has quit [Client Quit]
coventry has joined #ocaml
malina has quit [Ping timeout: 252 seconds]
enterprisey has joined #ocaml
malina has joined #ocaml
dhil has joined #ocaml
sz0 has joined #ocaml
olle has quit [Remote host closed the connection]
kakadu has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 248 seconds]
enterprisey has quit [Remote host closed the connection]
<wklm> jmiven: thanks a lot!
nomicflux has quit [Quit: nomicflux]
pigeonv has joined #ocaml
copy_ has quit [Quit: Connection closed for inactivity]
nomicflux has joined #ocaml
enterprisey has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
ayxih has quit [Quit: Leaving]
ayxih has joined #ocaml
_habnabit has quit [Remote host closed the connection]
cbot has joined #ocaml
_habnabit has joined #ocaml
mrvn has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
tane has joined #ocaml
jao has joined #ocaml
bruce_r has joined #ocaml
mrvn has quit [Ping timeout: 248 seconds]
coventry has quit [Ping timeout: 246 seconds]
mrvn has joined #ocaml
coventry has joined #ocaml
malina has joined #ocaml
mrvn has quit [Ping timeout: 248 seconds]
mrvn has joined #ocaml
mrvn has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
mengu has joined #ocaml
connorjacobsen has joined #ocaml
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
mrvn has quit [Ping timeout: 248 seconds]
mrvn has joined #ocaml
Sim_n has quit [Ping timeout: 276 seconds]
bruce_r has quit [Ping timeout: 246 seconds]
dhil has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<coventry> When faced with a non-principal type inference problem, could the compiler construct an implicit sum type? Is this not done because it would lead to some kind of potential combinatorial explosion in type inference?
tane has quit [Quit: Leaving]
mrvn has quit [Ping timeout: 248 seconds]
mrvn has joined #ocaml
bruce_r has joined #ocaml
<Drup> I'm not sure how non-principality is related
<Drup> About "implicit" sum types. I guess you mean structural tagged unions, which is more or less what polymorphic variants are. They have their own problems. If you want to avoid row polymorphism and use real subtyping, you get yet another set of issues (combining real subtyping with inference is very hard)
<Drup> No silver bullets :p
mrvn has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
<coventry> My understanding is that a type inference is non-principal when there's no single type which includes all inferred types for the phrase, so I meant a sum over those inferred types. I'm mostly going off what's written here: https://stackoverflow.com/questions/11542446/what-is-a-principal-type
<coventry> Also, what is a refutation case? This seems to be the only place in the manual where they're mentioned, and their definition seems to be assumed: https://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec241
<Drup> coventry: what exactly is unclear in the definition of refutation cases ?
<Drup> (cc octachron)
<coventry> FWIW, octachron's explanation here clarified things for me: https://discuss.ocaml.org/t/matching-incompatible-gadt-constructors/682
<coventry> Specifically, "the dot . on the right hand side of the case indicates that the pattern on the left hand side should not be reachable and the type-checker will check that it is impossible to produce a value that matches this pattern." is much clearer than the manual text.
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<Drup> About principal types ... I feel like your interpretation is based on a misunderstanding of how inference work, but I'm not sure how to explain things ^^'
<Drup> The short answer is no: you can't take the union of arbitrary types in OCaml, because that's just not how the system is designed (what would be the union of int list and int option ?)
<coventry> Something like "type t = [List of int list | Option of int option]" is the way I'm imagining it. But it's quite likely I'm laboring under misconceptions about the type inference algorithm.
sz0 has quit [Quit: Connection closed for inactivity]
enterprisey has quit [Read error: Connection reset by peer]
<octachron> coventry, would you mean opening a ticket on mantis for the refutation case documentation? It helps me to keep track of these documentation requests.
<coventry> Sure.
<Drup> except that type is not expressible in OCaml. There are some systems where that works (see the papers "Set-Theoretic Types for Polymorphic Variants" and "Polymorphism, subtyping and type inference in MLsub" for example)
<octachron> coventry, I should have an extended explanation somewhere, but I have some slides to take care first.
<coventry> octachron: That's OK, your SO answer resolved it for me. Thanks, though.
<Drup> In practice, the whole principality thing is mostly a non-issue. The issue is in fact intended to protect you breaking changes in the typecheckers that would (subtely) change type inference
<Drup> The option*
SomeDamnBody has joined #ocaml
<SomeDamnBody> oasis is looking for libdai_stubs.ml, but I didn't list that in the _oasis file...
<SomeDamnBody> I don't know why it's looking for that.
<Drup> -principal makes the typechecker verifies that type-inference was done in a way that doesn't rely on the order of inference
<Drup> For example, checking one branch of the if before the other
<coventry> Drup: Thanks. I won't worry about it too much. My example's syntax was slightly off, but the toplevel accepts "type t = [`List of int list | `Option of int option]"
<coventry> Drup: I see.
mengu has quit [Quit: Leaving...]
<Drup> So, if tomorrow the typechecker decides to changes the order in which if branches are explored, while programs that rely on disambiguation can stop typechecking, programs that typecheck with -principal are guaranteed to keep working
<Drup> In practice, using -principal really doesn't work well with constructor/record disambiguation, so it's kind of annoying
<coventry> Thanks, Drup.
<octachron> coventry, thanks
pierpa has joined #ocaml
<SomeDamnBody> Is there any way to get ocamlbuild to build both fully compiled and bytecode targets?
<orbifx[m]> SomeDamnBody: I think there is yeah
<SomeDamnBody> Oh wait, just put a comma on the byte, best
<orbifx[m]> ;)
<orbifx[m]> anyone here to help me by bouncing some ideas around blogging filesystems
<orbifx[m]> ?
<SomeDamnBody> But right now, I'm having trouble getting the generated setup.ml to not mention some _stubs
<SomeDamnBody> target
<SomeDamnBody> orbifx[m]: blogging filesystems? A filesystem to back a blogging server application?
bruce_r has quit [Ping timeout: 255 seconds]
<orbifx[m]> yeah
<orbifx[m]> I want to make the directory (repository) of the notes mode intuitive. Currently a user provides a "repository" directory and under there is supposed to be a directory called "notes" with just notes, the idea being that one day other directories might come to be, with unforseen filetypes.
<orbifx[m]> Now I'm thinking about making my system structure agnostic, to let the user pick how they like structuring it.
<orbifx[m]> Any views or thoughts?
<SomeDamnBody> But what's wrong with them having the normal powers over the filesystem just with some restrictions to limit them to a particular directory.
<SomeDamnBody> Also, oasis is still trying to reference ./libdai_stubs.a ./dlldai_stubs.so and I don't know what that's about...
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<orbifx[m]> SomeDamnBody: do a `grep`. Did you copy any files from another project?
<zozozo> orbifx[m]: i see two options: either the directory/repository is not really made to be accessed by the user (other than by the app), and then the first option seems fine (for instance if the directory is, by default something like ~/.app_name), or the directory is meant to be read/accessed by the user, and in that case I would allow the user to specify a 'notes' directory, and then when other directories are
<zozozo> needed, allow configuration for them too (or did I misunderstood your problem ?)
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<orbifx[m]> I think you got it. I'm leaning towards the second. I want power users to have that flexibility
<SomeDamnBody> orbifx[m]: no
<orbifx[m]> In case they want to do funky things. Like split different types of notes under different directories. Or have some checked out by git, whilst others are generated, etc etc.
<orbifx[m]> All I'd have to do is a recursive search to begin with rather than expect to file all the notes neatly in one place
<orbifx[m]> SomeDamnBody: you best search with grep for `dai` to find where it's mentioned.
<zozozo> orbifx[m]: how about allowing a list of directories for notes ?
<zozozo> rather than a recursive search
<orbifx[m]> That's also doable. To create a union from separate places. But do you not think it adds value to not force the user to have all notes in place zozozo ?
<orbifx[m]> What if someone want to have a directory per entry, with all attachments under the same directory? (That was how I implemented it for a previous system I wrote in Bash)
<zozozo> ah yes, well of course recursive search is useful indeed
<zozozo> so I'd say a list of direcotries with recursive search as a toggle option ?
<zozozo> i mean, with recursive search configurable per directory
<orbifx[m]> Of course the system can suggest a structure, which most user might want to adopt to avoid inventing a new one.
<orbifx[m]> yeah something like that. I'll open an issue for supporting a list for directories, should take much effort.
<zozozo> does the file structure (i.e sub-directories) affect the semantics of the notes ? or do you have (for isntance) metadata at the start of notes), so that the configurable direcotires only give you a flat list of notes, that you then order using the metadat ?
<orbifx[m]> All notes have metadata indeed
<zozozo> hm.. I'm getting sleepy, sorry for the wrong parentheses :p
<orbifx[m]> It's a design goal to have it be file driven. So everything about the note is contained in the note (file).
<zozozo> seems like a good idea
Associat0r has quit [Remote host closed the connection]
<orbifx[m]> I'm even considering embedding images using the base64 coding them, but that is an editor issue mostly.
Associat0r has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
<zozozo> ^^
<orbifx[m]> zozozo: here is the metadata record: https://gitlab.com/orbifx/logarion/blob/master/src/core/meta.ml#L102
<orbifx[m]> been contemplating about switching it to a map for variants to allow for user defined keys-values. So many ways, so many ideas :P
<zozozo> a heterogeneous map ?
sepp2k has quit [Quit: Leaving.]
<orbifx[m]> Yeah
<zozozo> could be nice indeed, assuming it's not too performance sensitive
<orbifx[m]> Indeed. There is also the hybrid idea: a specialised record for performance sensitive data, and then a generic one for extras
<zozozo> that's about the thing I have in my prover ^^
<orbifx[m]> what thing? What prover?
<zozozo> the prover I'm developping for my thesis
<zozozo> having a record with frequently acessed data, and a heterogeneous map for abitrary information
Associat0r has quit [Read error: Connection reset by peer]
BitPuffin|osx has quit [Ping timeout: 248 seconds]
<orbifx[m]> what does the prover prove?
<zozozo> currently, it handles first-order with uninterpreted functions and predicates
<zozozo> and also can output coq proofs (since a week ago), ^^
sz0 has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
<orbifx[m]> Cool zozozo :)
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
<zozozo> ^^
connorjacobsen has quit [Read error: Connection reset by peer]
connorja_ has joined #ocaml
jlam_ has joined #ocaml
connorja_ has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
coventry has quit [Remote host closed the connection]
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]
argent_smith has quit [Quit: Leaving.]
olle has joined #ocaml
_habnabit has joined #ocaml
ziyourenxiang has joined #ocaml
_whitelogger has joined #ocaml
connorja_ has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorja_ has quit [Read error: Connection reset by peer]