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
zolk3ri has quit [Quit: leaving]
pierpal has joined #ocaml
hdon has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
<Fare> octachron, thanks a lot! That was the solution.
<Fare> the tests don't pass somehow, but that's because they try to define interface and implementation in the same module.
FreeBirdLjj has joined #ocaml
pierpa has joined #ocaml
silver has quit [Read error: Connection reset by peer]
rostero has quit [Quit: Connection closed for inactivity]
sz0 has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Remote host closed the connection]
pmetzger has quit []
mfp has quit [Ping timeout: 256 seconds]
cbot has joined #ocaml
tarptaeya has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
hdon has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
Walter[m] has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 256 seconds]
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
govg has joined #ocaml
pierpa has quit [Quit: Page closed]
malina has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
hdon has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
hdon has quit [Ping timeout: 268 seconds]
jimmyrcom_ has quit [Ping timeout: 264 seconds]
jimmyrcom_ has joined #ocaml
hdon has joined #ocaml
MercurialAlchemi has joined #ocaml
hdon has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
mbuf has joined #ocaml
malina has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
malina has quit [Remote host closed the connection]
malina has joined #ocaml
jack5638 has quit [Ping timeout: 256 seconds]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
malina has quit [Remote host closed the connection]
jack5638 has joined #ocaml
muelleme has joined #ocaml
hdon has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 256 seconds]
hdon has quit [Ping timeout: 268 seconds]
muelleme has quit [Ping timeout: 260 seconds]
noitakomentaja has joined #ocaml
<keep_learning> Hi Everyone, I have project which uses jbuilder (I am trying to learn it) https://github.com/mukeshtiwari/learnjbuild
<keep_learning> When I am running jbuilder build main.exe to get executable, I am getting Error: Library "ocamllex" not found.
<keep_learning> I am wondering if there is special syntax for ocamllex and menhir
mk9 has joined #ocaml
malina has joined #ocaml
hdon has joined #ocaml
cbot has quit [Quit: Leaving]
flodin_ has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 265 seconds]
Fare has quit [Ping timeout: 240 seconds]
tarptaeya has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
mk9 has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
malina has joined #ocaml
<octachron> keep_learning, there is, since they are code generators and not libraries: http://jbuilder.readthedocs.io/en/latest/jbuild.html#ocamllex
hdon has joined #ocaml
flodin has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
dhil has joined #ocaml
baroud has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
flodin has quit [Remote host closed the connection]
<keep_learning> octachron Thank you. I changed the whole jbuild file and wrote the instructions (ocamllex (lexer)) and when running it from top (jbuilder build main.exe), I am getting the same answer
<keep_learning> (jbuild_version 1)
<keep_learning> (ocamllex (lexer))
jack5638 has quit [Ping timeout: 260 seconds]
<keep_learning> The idea I have taken is from your link and https://github.com/vsiles/tiger/blob/master/src/jbuild
<keep_learning> But my parser has its own jbuild
bglm[m] has joined #ocaml
jack5638 has joined #ocaml
<octachron> keep_learning, it should be fine to define your parser as a library, what is the error precisely?
mk9 has joined #ocaml
<keep_learning> Error: Library "lexer" not found.
<keep_learning> which depends on lexer
<octachron> Why is the lexer (and big) its own library?
<octachron> and do you have a (library ((name lexer)...)) to match this declaration?
<keep_learning> octachron I am just learning it, so I am trying to keep everything in separate file.
flodin has joined #ocaml
<octachron> keep_learning, you mean in a module? You don't need to have a library per module
<keep_learning> Big is it's own because I have extracted lib.ml from Coq code (https://coq.inria.fr/library/Coq.extraction.ExtrOcamlZBigInt.html)
<keep_learning> octachron Should I move these into same directory ?
<octachron> The hierarchy expected by jbuilder is file=module/subfolder=library(or executable)
ncthbrt has joined #ocaml
<octachron> keep_learning, do you ever intend to use the lexer and parser separately in another project?
<keep_learning> octachron My make file works very nice (https://github.com/mukeshtiwari/EncryptionSchulze/blob/master/code/Makefile#L34), but now I have to accommodate ocaml-java so I changed it to jbuilder
<keep_learning> octachron No
<keep_learning> lexer and parser is just for this project
<octachron> and they are thematically related, I see thus no reason to split them in two distinct libraries
<keep_learning> I can move them in same directory.
<octachron> then you can fix your jbuild files for the parser and lexer by using (ocamllex …) and (menhir …)
Guest54659 is now known as adrien
<keep_learning> octachron Thank you very much
ncthbrt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mk9 has quit [Quit: mk9]
<keep_learning> octachron I have moved the lexer.mll and parser.mly in same directory (https://github.com/mukeshtiwari/learnjbuild/tree/master/lexer), and when I am running it from top (jbuilder build main.exe)
<keep_learning> still the same error.
<keep_learning> My limited understanding to jbuild is it goes recursively and build the library ?
<octachron> keep_learning, you need to generate the parser with menhir, not use menhir as a library in the parser
<octachron> keep_learning, also naming the library inside the "lexer" folder "parser" may be a bit confusing
mattcode has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
maelkum has joined #ocaml
jack5638 has quit [Ping timeout: 240 seconds]
<keep_learning> octachron I have changed the name of directory and content of jbuild (https://github.com/mukeshtiwari/learnjbuild/blob/master/parsingcode/jbuild)
<keep_learning> Now I am wondering if you could tell me how to import these two libraries (Lexer and Parser) in main
jack5638 has joined #ocaml
zolk3ri has joined #ocaml
<steenuil> you need to add a library to the jbuild file in parsingcode, such as (library ((name parsingcode)))
<octachron> keep_learning, they are not libraries, they are modules
<octachron> keep_learning, you don't need to precise dependencies at the module(compilation unit) level, only at the libraries level
hdon has joined #ocaml
ncthbrt has joined #ocaml
zolk3ri has quit [Client Quit]
zolk3ri has joined #ocaml
hdon has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
hdon has joined #ocaml
<keep_learning> octachron steenuil Sorry for being dumb :(
<keep_learning> I have added the require change in jbuild https://github.com/mukeshtiwari/learnjbuild/blob/master/parsingcode/jbuild#L8
<keep_learning> and I have opened this library in main https://github.com/mukeshtiwari/learnjbuild/blob/master/main.ml#L5
hdon has quit [Ping timeout: 240 seconds]
<keep_learning> But now I am getting Error: Unbound value Parsingcode.prog https://github.com/mukeshtiwari/learnjbuild/blob/master/main.ml#L99
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
<steenuil> prog is on Parsingcode.Parser.prog now, so if you opened Parsingcode it should be Parser.prog
<keep_learning> steenuil Thank you. Now I can compile it, and it's giving me _build library, but I am wondering how to run it. Previously when I compiled my code using ocamlbuild (https://github.com/mukeshtiwari/EncryptionSchulze/blob/master/code/Makefile#L34 )
<keep_learning> I got main.byte or main.native so I could run it ./main.byte < filename.txt
<keep_learning> But now, I don't see any byte or native executable
kakadu has joined #ocaml
<keep_learning> steenuil Thank you. This one is figured out ( _build/default/main.exe < ballot_mat.txt )
<keep_learning> steenuil octachron Thank you very much for helping me all the way upto this point. Now I know how it works :)
maelkum has quit [Read error: Connection reset by peer]
maelkum2 has joined #ocaml
malina has quit [Remote host closed the connection]
Exagone313 has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
mfp has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Remote host closed the connection]
mk9 has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
Haudegen has quit [Remote host closed the connection]
pierpal has joined #ocaml
jao has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
hdon has joined #ocaml
dhil has joined #ocaml
mk9 has quit [Quit: mk9]
hdon has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
jack5638 has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
jack5638 has joined #ocaml
Haudegen has joined #ocaml
_andre has joined #ocaml
kalio has quit [Ping timeout: 264 seconds]
kalio has joined #ocaml
pierpal has quit [Remote host closed the connection]
<Leonidas> whoa, the discussions on the styling of the ocaml docs are more tiring than the current ugly style ever was :(
jao has quit [Ping timeout: 260 seconds]
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
<Armael> heh
<Armael> its for the greater good!
dhil has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
sh0t has joined #ocaml
Fare has joined #ocaml
mbuf has quit [Quit: Leaving]
Fare has quit [Ping timeout: 264 seconds]
<steenuil> it is the fate of such things to be bikeshed
spew has joined #ocaml
gtrak has joined #ocaml
maelkum has joined #ocaml
maelkum2 has quit [Ping timeout: 248 seconds]
<ncthbrt> ReasonML has a separate channel/room for #bikeshedding
pierpal has joined #ocaml
dhil has joined #ocaml
sh0t has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
discord2 has joined #ocaml
dedgrant_ has joined #ocaml
<Leonidas> what is the current state of the art way of binding stuff with ctypes + codegen + jbuilder?
<Leonidas> I am trying to bind https://linux.die.net/man/3/res_query :/
<Drup> does jbuilder even supports that ?
richi-235 has joined #ocaml
pierpal has joined #ocaml
<Khady> it does support that
artart78_ has joined #ocaml
artart78_ has joined #ocaml
artart78_ has quit [Changing host]
krkini has joined #ocaml
Sargun_ has joined #ocaml
dmbaturin_ has joined #ocaml
rixed has joined #ocaml
<Leonidas> I saw some trickery with Configurator but it is a lot of boilerplate
bacam_ has joined #ocaml
<Khady> engil: ping
<Khady> engil: where did you get inspiration from to write the jbuilder config of your bindinds?
hdon has joined #ocaml
malina has joined #ocaml
butterthebuddha_ has joined #ocaml
artart78 has quit [Disconnected by services]
artart78_ is now known as artart78
dedgrant has quit [*.net *.split]
discord1 has quit [*.net *.split]
bacam has quit [*.net *.split]
h11 has quit [*.net *.split]
richi235 has quit [*.net *.split]
kini has quit [*.net *.split]
butterthebuddha has quit [*.net *.split]
Sargun has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
rixed_ has quit [*.net *.split]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
Haudegen has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 240 seconds]
butterthebuddha_ is now known as butterthebuddha
ziyourenxiang_ has joined #ocaml
h11 has joined #ocaml
bacam_ is now known as bacam
tarptaeya has joined #ocaml
mk9 has joined #ocaml
shinnya has joined #ocaml
Haudegen has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
malina has quit [Remote host closed the connection]
malina has joined #ocaml
sh0t has joined #ocaml
ncthbrt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ncthbrt has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
noitakomentaja has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 255 seconds]
jbrown has joined #ocaml
silver has joined #ocaml
malina has quit [Remote host closed the connection]
shinnya has joined #ocaml
baroud` has joined #ocaml
malina has joined #ocaml
baroud has quit [Ping timeout: 268 seconds]
malina has quit [Remote host closed the connection]
malina has joined #ocaml
<discord2> <Perry> Leonidas: strong agree on the arguments about the styling of the manual (even though I'm a participant). I wish people got so passionate about important things like technical improvements. 😦
malina has quit [Client Quit]
malina has joined #ocaml
tane has joined #ocaml
<rgr[m]> What's the syntax for including a module with a signature inlined?
<rgr[m]> E.g. I have something like module X : sig .. end = struct .. end include X
<rgr[m]> and I'd like to do this without the intermediate X module (if possible)
Fare has joined #ocaml
<steenuil> why do you need that?
malina has quit [Ping timeout: 260 seconds]
<rgr[m]> I remember it now, include ((struct .. end) : (sig .. end)). Clunky...
FareTower has joined #ocaml
jao has joined #ocaml
<Armael> Leonidas: try to look at my wlroots-ocaml repo
Fare has quit [Ping timeout: 276 seconds]
<Armael> It uses jbuilder + ctypes + codegen including cstubs-structs
<Armael> (github.com/swaywm/wlroots-ocaml)
<Armael> It does involve a fair amount of boilerplate indeed
<Leonidas> Armael: That looks exactly like what I want, thank you. I think I'll try to copy that tomorrow and see how far I get.
<Armael> It took me some time to come with that setup tbh
<Armael> I started by grepping through the code in dune-universe + fiddled a lot
jimmyrcom_ has joined #ocaml
<Armael> and I don't know if it's the best way of doing things
dhil has quit [Ping timeout: 256 seconds]
<Armael> (but it seems to work...)
<Armael> Don't hesitate to ask me if there's something you don't understand btw
<Leonidas> yes, some bits seem familiar from async_ssl :)
jimmyrcom_ has quit [Ping timeout: 265 seconds]
hdon has joined #ocaml
pierpal has joined #ocaml
ncthbrt has quit [Ping timeout: 260 seconds]
hdon has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
mk9 has joined #ocaml
fare__ has joined #ocaml
ncthbrt has joined #ocaml
baroud`` has joined #ocaml
FareTower has quit [Ping timeout: 264 seconds]
jimmyrcom_ has joined #ocaml
baroud` has quit [Ping timeout: 240 seconds]
mk9 has quit [Quit: mk9]
fare__ has quit [Ping timeout: 276 seconds]
<exarkun> is there a way to have a string type specialized on length? like a type "string of length 6"
maelkum has quit [Ping timeout: 268 seconds]
<steenuil> that sounds like dependent typing
baroud`` has quit [Remote host closed the connection]
<companion_cube> exarkun: not statically, it's dependent typing indeed
<companion_cube> but if it's really important, you can make a private type alias (`type t = private string` in the mli) and enforce the size limit in constructors
<companion_cube> i.e. functions that return a `t`
mk9 has joined #ocaml
<exarkun> thanks
<discord2> <Perry> Dependent typing is cool. Unfortunately it is so easy to drift off the edge of the cliff into undecidability...
dhil has joined #ocaml
ctrlsbstr has joined #ocaml
ctrlsbstr has quit [Client Quit]
<flux[m]> Armael: pretty cool project!
fare__ has joined #ocaml
aubian is now known as Fistine
<Drup> Perry: I would have said unusability :)
<companion_cube> :D
<discord2> <Perry> Unusability too. 😃
<Armael> flux[m]: heh, thanks
Haudegen has quit [Remote host closed the connection]
fare__ has quit [Ping timeout: 260 seconds]
pierpal has quit [Ping timeout: 260 seconds]
<Drup> Undecidability is not such a big problem for programming in practice
<Drup> (or rather: it's the job of the language designer to solve it before)
<discord2> <Perry> For things like array and string lengths and such it isn't too bad at all.
<discord2> <Perry> The problem comes when you have a sort function whose type describes the fact that it returns a non-decreasing permutation of the input list. 😃
jimmyrcom_ has quit [Ping timeout: 260 seconds]
<Drup> That's not so bad
<discord2> <Perry> Determining that type is correct implies proving the sorting function is correct. 😃
<Drup> it depends how you implement it, but the straightforward version (a type predicate) is fine
<companion_cube> I'd go with predicate typing + runtime checking
<discord2> <Perry> Which usually isn't so bad, but at DSSS'17 it took most of us a few hours to do it for insertion sort. 😃
<companion_cube> (that can be disabled)
<discord2> <Perry> (In Coq.)
<discord2> <Perry> To be fair, that wasn't because it would normally have been so bad, it was just that the problem was set up for us non-optimally.
<companion_cube> in practice I think no one is ready to formally prove their production code
<discord2> <Perry> BTW, it's too late to go to DSSS'18 but I highly recommend DSSS'19 for people interested in formal verification even if you know a lot.
<companion_cube> it's far too much work
<discord2> <Perry> It's a very fun summer school.
<Armael> What's DSSS?
<companion_cube> softer formal methods, on the other hand…
<discord2> <Perry> DSSS = Deep Spec Summer School
<companion_cube> doki super summer school, obviously
<Armael> Ah, yes.
<discord2> <Perry> Pierce, Chlipala, Appel, etc., etc.
<Armael> Yeah. I was at oplss last summer
<discord2> <Perry> I think the trick with formal verification is to apply it very strategically. Microkernels, compilers, etc.
<discord2> <Perry> Not to throw it at everything right now, we can't do it well enough.
<discord2> <Perry> But if you can prove, say, that your microkernel provides certain isolation properties, then you can use much less trusted code with it and know you are safe.
<discord2> <Perry> The trick is to protect big chunks of unproven code with small bits of proven code I think.
<discord2> <Perry> The Quark browser did this, isolated a huge Webkit implementation using a small formally verified shell of code around the millions of lines of horrible C++.
<discord2> <Perry> Software firewalls as it were.
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]
<discord2> <Perry> http://goto.ucsd.edu/quark/ is the browser I just mentioned.
<companion_cube> yes, there are cases where formal proof is realistic, even now
<companion_cube> but we shouldn't focus too hard on it
<Armael> companion_cube: ? :/
ctrlsbstr has joined #ocaml
<companion_cube> well, proving is just super hard
<companion_cube> there's a whole continuum of formal methods which could be applied more easily
<companion_cube> contracts with runtime checks (like a better organized form of `assert`)
<companion_cube> concrete model checking
<Armael> Ah, sure
<companion_cube> symbolic model checking (just annotated invariants/bad states)
<Armael> You do that then :)
<companion_cube> I think this all-or-nothing approach of proving stuff formally is not the best priority
shinnya has quit [Ping timeout: 240 seconds]
<companion_cube> Armael: yep, that's my job ;-)
<Armael> It's less amusing, it actually works
<discord2> <Perry> All or nothing isn't necessary. You can get improvement from applying a wide variety of methods.
<discord2> <Perry> The problem is that most people don't even test their code properly. 😦
<discord2> <Perry> (I'm not referring to the OCaml community.)
<Armael> *shrug*
<companion_cube> it's also funny that we have a straw in our eye
<companion_cube> how tested is Coq's code? :D
<companion_cube> (I mean, there's a lot of integration tests, but otherwise…)
<Drup> companion_cube: most of Coq's code is either written in Coq (the engine) or not trusted (the tactics unsuggaring, the syntactic aspects)
<companion_cube> the engine is written in Coq‽
<steenuil> you can extract OCaml code from Coq
<Armael> Um yes what :D
<companion_cube> I guess the native tactics are untrusted
<Armael> The kernel is definitely not written in coq
<companion_cube> but the kernel, afaik, is a big pile of complicated OCaml code
<Drup> there is a small bit of non-coq code, and then the rest are successive layers expressed in term of it
<companion_cube> (well, there's good reasons for that, it's kind of rocket science)
<companion_cube> "small", well
<companion_cube> (oh wait, at work we rely on z3, yolo :D)
<Drup> :D
<companion_cube> well we don't really have a choice anyway
<discord2> <Perry> So the general deal is, you have to trust the small kernel that checks the proofs, but if things like tactics mess up, it won't harm the integrity of Coq.
<Drup> companion_cube: well, you can always recheck the certificate with certified code
<Drup> that's "easy"
<discord2> <Perry> If for example you used one of the projects that found a proof with Z3, it would still have to pass the check from the kernel.
<Armael> companion_cube: there's an ongoing project of reimplementing the kernel using template coq
<companion_cube> Drup: checking Z3's certificates? that's huge amount of work
<Drup> hence the quotes
<companion_cube> yeah
<companion_cube> even models might not be easy to check at all :-)
<Drup> it's easier than solving :p
pierpal has joined #ocaml
<companion_cube> yeah, I'm not even sure
<Armael> companion_cube: so you were advocating for soft formal methods, and now you're complaining about the size of coq's kernel :p
<companion_cube> checking theory lemmas is basically re-proving them
<companion_cube> Armael: heh ^^
<companion_cube> about its tests, note
<discord2> <Perry> Generally, exploring any of these things is so much better than the way stuff has been done until recently.
tarptaeya has quit [Quit: Konversation terminated!]
<companion_cube> yeah…
<companion_cube> … and now I want to write a SMT solver again
<companion_cube> damn y'all
jbrown has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
<discord2> <Perry> An SMT solver with good performance written in a decent language instead of C++ would rock.
<companion_cube> I was of course thinking of rust 0:-)
<discord2> <Perry> It would also absorb all your time for the foreseeable future.
<companion_cube> yes :-(
<companion_cube> and I'm not paid to do it
<companion_cube> :sad:
<discord2> <Perry> Hey, you joke, but Rust >> C++. Anything to get away from C++.
<companion_cube> of course
<companion_cube> Z3 is nice, but modifying it is… challenging
<discord2> <Perry> Every line of code of C++ that people erase or that stops being used is a benefit to the world.
<discord2> <Perry> Every time a major C++ program is deprecated, a heavenly chorus sings.
<companion_cube> :D
<companion_cube> now that's some strong opinions
<companion_cube> I'm pretty sure that writing a SMT in rust in 2018 would make it possible to have an unprecedently modular SMT solver
<discord2> <Perry> I avoided C++ for years, and now I have to work with LLVM. 😦 😦 😦 😦
<discord2> <Perry> At least I can use OCaml for most of my work but I can't avoid looking at the C++ entirely, and it causes my eyes to burn.
<spew> I'm lucky enough mostly to write ocaml that writes my c++ for me
<discord2> <Perry> At least LLVM is better than the GCC codebase though. It is possible to work with it reasonably.
<discord2> <Perry> spew: how do you do that?
al-damiri has joined #ocaml
fare__ has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
<steenuil> is there a good name for this function: 'a option Lazy.t -> 'a option -> 'a option
<steenuil> the first argument is only evaluated if the second is None
<steenuil> it's kinda like map, but not quite
Exagone313 has joined #ocaml
<companion_cube> <+> ;-)
mk9 has quit [Remote host closed the connection]
<steenuil> gotta love Haskell operators that don't have a name
Guest66835 has joined #ocaml
cbot has joined #ocaml
<companion_cube> :D
jimmyrcom_ has joined #ocaml
<companion_cube> also named `mplus`, but well
mk9 has joined #ocaml
<companion_cube> I have `val CCOpt.or_lazy else_:(unit -> 'a t) -> 'a t -> 'a t` in containers
<steenuil> yeah, but the result is 'a option, not 'a
<companion_cube> yes?
Guest66835 is now known as Haudegen
fare__ has quit [Ping timeout: 264 seconds]
mk9 has quit [Client Quit]
<steenuil> oh wait, I think my fonts bugged out
mk9 has joined #ocaml
<steenuil> hexchat doesn't like my ligatures
<steenuil> I guess or_lazy will do then
<companion_cube> Perry: what do you do with SMT + llvm, btw?
hdon has joined #ocaml
mk9 has quit [Ping timeout: 240 seconds]
<discord2> <Perry> I don't do things with SMT and LLVM. I do do things with LLVM though. Part of my current academic research is on a compiler I'm building, and LLVM was the only reasonable option for a back-end.
<companion_cube> ah, right
<companion_cube> (well there's also malfunction 0:-))
<companion_cube> *cough*
<discord2> <Perry> I have opinions on SMT solvers not being written in C++. 😃
noitakomentaja has joined #ocaml
<companion_cube> sadly they're all in C or C++
<discord2> <Perry> I went through several languages for the front end and then settled on OCaml because the language was sane and the bindings to LLVM were supported.
<companion_cube> the main one in OCaml isn't really designed for brute performance
troydm has joined #ocaml
<discord2> <Perry> Sadly, SMT solvers are one of those rare areas where you really want brute performance. 😦
<companion_cube> exactly…
<companion_cube> well, a subtly mix of good API and brute performance
<companion_cube> subtle*
<discord2> <Perry> How hard is it to "oxidize" C++ code with tool assistance I wonder? Maybe that's a shortcut.
<companion_cube> I think there's not much tooling for that for now
hdon has quit [Ping timeout: 256 seconds]
<discord2> <Perry> Ah, so I've solved the unsolved problem to a previously unsolved problem! Progress! 😃
<discord2> <Perry> er reduced
<discord2> <Perry> Of course I suppose we're trying to oxidize rather than to reduce.
<companion_cube> :D
<companion_cube> nice
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheLemonMan has joined #ocaml
hdon has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
ctrlsbstr has joined #ocaml
pierpal has joined #ocaml
hdon has quit [Quit: leaving]
noitakomentaja has quit [Ping timeout: 255 seconds]
pierpal has quit [Ping timeout: 256 seconds]
ncthbrt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hdon has joined #ocaml
<hdon> good morning :)
jnavila has joined #ocaml
jbrown has joined #ocaml
pierpal has joined #ocaml
fare__ has joined #ocaml
<spew> discord2: wrote a compiler in my spare time and convinced them they needed it
jnavila has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
<wagle> wait. do I install / upgrade with opam or brew?
<wagle> i seem to have used brew earlier, and now opam is veryunhappy
<wagle> (opam upgrade succeeded at 50%, and failed at the rest, leaving coq itself missing)
FreeBirdLjj has quit [Remote host closed the connection]
<wagle> haha.. painted myself into the corner where I trigger the bug
<Drup> Perry: the ocaml bindings are not great, but at least they should be complete enough
<Drup> (unfortunately, they're not completely memory safe ...)
hdon has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
<wagle> Drup: you answering me? if so I dont understand
kakadu has quit [Quit: Konversation terminated!]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Drup> wagle: As indicate by the first word, I was answering Perry :3
<wagle> I'm perry
<wagle> haha
<wagle> must mean metzger then
<Drup> You are not perry, you are wagle!
ctrlsbstr has joined #ocaml
<Drup> don't confuse me with real names, I only use nicks :<
ygrek has joined #ocaml
<wagle> there's no user named "Perry"
<wagle> i looked
<wagle> but ok, thanks
<Drup> he's on the other side of the rainbow^W discord bridge
<wagle> oic
<steenuil> I think I managed to write an acceptable Option module, but man, documentation is hard
<companion_cube> ah, the ritual of writing one's own basic modules :-)
<steenuil> I was talking about this yesterday, I thought an Option module would be a good addition to the stdlib
<Drup> yeah, we can add it now
<Drup> prepare some real intense bikeshedding, tho
<companion_cube> ohhhhhhhhhh
pierpal has quit [Ping timeout: 255 seconds]
ncthbrt has joined #ocaml
noitakomentaja has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 240 seconds]
<steenuil> yeah, that's really putting me off
hdon has joined #ocaml
<Drup> steenuil: why do you think noone has done it yet :D
hdon has quit [Ping timeout: 248 seconds]
hdon has joined #ocaml
dhil has joined #ocaml
hdon has quit [Changing host]
hdon has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
ncthbrt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tane has quit [Quit: Leaving]
<discord2> <Perry> steenuil: you will survive the bikeshedding.
<discord2> <Perry> And if you want someone to look over your docs I'll volunteer.
kakadu has joined #ocaml
<Armael> oh yea it would be super nice to finally have an option module in the stdlib
Haudegen has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
<steenuil> ok, I'll add some tentative docs and upload it somewhere tomorrow then
richi-235 is now known as richi235
takanuva has joined #ocaml
<takanuva> I'm interested in multicore ocaml (because of effects)... I'd like to ask for details of the garbage collector: can anyone argue on how difficult it would be to edit it to enable limiting memory on certain code sections? e.g., "run function foo () but do not use more than 20mb of RAM there"
<takanuva> (and if the community would like a pull request for such a feature, if I decide to go through and implement it)
pierpal has quit [Read error: Connection reset by peer]
tilpner_ has joined #ocaml
ianconnolly_ has joined #ocaml
sspi__ has joined #ocaml
jeroud_ has joined #ocaml
Algebr has joined #ocaml
cbarrett_ has joined #ocaml
argent_smith1 has joined #ocaml
isd has joined #ocaml
argent_smith has quit [Ping timeout: 240 seconds]
muelleme has joined #ocaml
_andre has quit [Quit: leaving]
bbc_ has joined #ocaml
Haudegen has joined #ocaml
fare__ has quit [*.net *.split]
ianconnolly has quit [*.net *.split]
RouvenAssouly[m] has quit [*.net *.split]
pmetzger[m] has quit [*.net *.split]
tilpner has quit [*.net *.split]
keep_learning has quit [*.net *.split]
Fistine has quit [*.net *.split]
dlebrecht[m] has quit [*.net *.split]
smondet[m] has quit [*.net *.split]
hdurer[m] has quit [*.net *.split]
M-jimt has quit [*.net *.split]
spectrumgomas[m] has quit [*.net *.split]
jeroud has quit [*.net *.split]
bbc has quit [*.net *.split]
cbarrett has quit [*.net *.split]
sspi has quit [*.net *.split]
tilpner_ is now known as tilpner
jeroud_ is now known as jeroud
sspi__ is now known as sspi
cbarrett_ is now known as cbarrett
Fistine has joined #ocaml
<discord2> <Perry> steenuil: put the whole thing on github and post the URL to discuss.ocaml.org. And don't let it get you down when we all have opinions about tweaks and argue with each other.
fare__ has joined #ocaml
jnavila has quit [Remote host closed the connection]
dlebrecht[m] has joined #ocaml
hdurer[m] has joined #ocaml
pmetzger[m] has joined #ocaml
spectrumgomas[m] has joined #ocaml
<steenuil> I'm not really worried about it, it's just that it can be kind of tiring.
bbc_ has quit [Ping timeout: 240 seconds]
smondet[m] has joined #ocaml
M-jimt has joined #ocaml
RouvenAssouly[m] has joined #ocaml
bbc has joined #ocaml
<discord2> <Perry> I know. 😐
<discord2> <Perry> But just think, if you went in with a proposal to do some sort of major important surgery on the compiler itself, one person would give you a vague opinion. 😃
<discord2> <Perry> This is the way of programmer culture.
<discord2> <Perry> It depresses me at times, too. I really don't want to argue with people about font sizes etc. which has been the last few days.
<Armael> well I feel that it's just that people are more likely to have opinions about things that matter for them
<Armael> an Option module is likely to matter for a bunch of people
<discord2> <hcarty> Font sizes matter a lot of users with usability constraints/concerns. These kinds of core topics are worth spending time on up-front
<Armael> while some arcane code in some parts of the compiler will only matter for a couple people
<discord2> <Perry> Armael: I think I'd change that slightly to "people are more likely to discuss topics they understand well, and font sizes and Option modules are both that, while register allocators probably aren't."
<takanuva> should I post my issue on discuss.ocaml.org?
<discord2> <Perry> @hcarty That's why I'm interested in making sure the default font is relatively large. I have vision problems so I sympathize with people with that constraint. But the wider topic is, steenuil is right, such discussions sap people's energy, even if they're necessary.
<discord2> <hcarty> takanuva: Your best bet is probably to ask somewhere like https://github.com/ocamllabs/ocaml-multicore - that's where the work is currently happening IIRC
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<takanuva> hcarty: I'll open an issue then; thank you
<discord2> <hcarty> @Perry Agreed that they sap a lot of energy. It's a (difficult) question of spending the energy now vs later.
<discord2> <hcarty> takanuva: Good luck - it sounds like a very useful addition!
<discord2> <Perry> @hcarty I think the most important thing (which I often suck at) is being really nice to everyone else in such a discussion. It makes it easier. But I won't claim to being a paragon on this, I often get frustrated and post too quickly.
<discord2> <Perry> (and angrily.)
mk9 has joined #ocaml
<discord2> <Perry> But if everyone tries hard to be friendly, it lowers the stress level in the inevitable bikeshed discussion. (And again, anyone who wants to say "but you not friendly enough!" has a right to.)
<steenuil> yeah, you can't really have a proper discussion when people are bullying each other.
<Leonidas> That said, I sort of prefer to hear a well-founded opinion from a compiler engineer who knows what he's talking about to 15 people saying they prefer Comic Sans, none of them having experience in design or typography :/
dogui has quit [Ping timeout: 248 seconds]
dogui has joined #ocaml
<Leonidas> and what "looks nice" is not always useful, a fallacy modern web design does way too often lately.
cbot has quit [Ping timeout: 255 seconds]
mikeyhc has quit [Ping timeout: 260 seconds]
mikeyhc has joined #ocaml
takanuva has quit [Quit: Page closed]
<steenuil> I actually find the way the manual currently looks pretty readable (though admittedly kind of ugly), I find that styles like gitbook's and readthedocs' make everything look very confusing to me
<steenuil> despite the fact that they might have individual elements that make them look good in some ways
<steenuil> so yeah, I agree that what "looks nice" might not always be better
zolk3ri has quit [Remote host closed the connection]
mk9 has quit [Quit: mk9]
dogui_ has joined #ocaml
dogui has quit [*.net *.split]
muelleme has quit [Ping timeout: 264 seconds]
ctrlsbstr has joined #ocaml
Soni has quit [Excess Flood]
Soni has joined #ocaml
pierpa has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
gtrak has quit [Ping timeout: 264 seconds]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<discord2> <Perry> Leonidas: As it happens, I've got a background in typography and typesetting. Mostly from being a very very dedicated amateur, but I'm the sort of lunatic who goes to museum exhibits on typesetting. (And yes, there are places like the Grolier Club in NYC that do such exhibitions for other font fetishists.)
<discord2> <Perry> I don't like Read The Docs. I do like the Racket manual site a great deal.
<discord2> <Perry> And some of my tastes are old fashioned — I'm a big proponent of serifed fonts for body type and restricting the use of sans serif mostly to display type (headings, titles, and such.) I recognize that's a taste issue.
<discord2> <Perry> I care much more about readability than aesthetics, but I care about aesthetics to the following extent: if the manual looks like someone designed the website in the last decade, it will make OCaml look less like it must be dead to random college students who look at it.
<discord2> <Perry> Mostly my care is about readability though, because I spend a lot of time trying to read the thing.
<discord2> <Perry> And it is true, what looks nice is often quite unreadable. I can name examples of this, especially in magazine design but also in website design, that are quite dramatic.
argent_smith1 has quit [Quit: Leaving.]
fare__ has quit [Ping timeout: 276 seconds]
<discord2> <Perry> I have a real anger about certain Akzidenz-Grotesk descended typefaces (Helvetica and the like) that make it impossible to read the beginning of a word like "Illinois" without eye strain. Having many letters that are near clones is hideous, and yet, Helvetica screams "good modern design!" to a lot of people.
<steenuil> it's good for headings
<discord2> <Perry> Akzidenz-Grotesk, Univers, etc., are great for display type, yes.
<discord2> <Perry> But everyone now uses them for body type.
<discord2> <Perry> Worse, they use terrible Helvetica clones like Arial. Arial is something of an abomination. At least have the decency to pirate the real Helvetica...
<steenuil> I wish DIN had gotten popular instead, at least you can tell the I and the l apart
<discord2> <Perry> (I do have a soft spot for Futura, but generally for display type, not body type. And I have a real soft spot for eurostile bold extended in science fiction movies. If you look it up, you'll see why.)
<discord2> <Perry> Yah. Making the I and the l look nearly identical is kind of the opposite of what readability is about.
<steenuil> oh, wasn't that font in Alien
<steenuil> oh wait, I'm confused.
<discord2> <Perry> Eurostile Bold Condensed is in every science fiction movie. It's a calling card.
<discord2> <Perry> It's kind of an insider joke among typographers working in Hollywood.
al-damiri has quit [Quit: Connection closed for inactivity]
<discord2> <Perry> Fira Sans is a decent choice for readability in our headers and for display type. I am in favor of EB Garamond for the body font. It's a nice serif font, works well in place of the defaults. I'm much less decided on what a good code font would be. Source Code Pro is free and is widely used for this but I actually prefer courier-like designs for readability in documentation.
Haudegen has quit [Remote host closed the connection]
ziyourenxiang_ has quit [Ping timeout: 256 seconds]
kakadu_ has quit [Remote host closed the connection]
shinnya has joined #ocaml
fare__ has joined #ocaml
noitakomentaja has quit [Ping timeout: 255 seconds]
noitakomentaja has joined #ocaml
cbot has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 260 seconds]