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
toppler has joined #ocaml
kvda has joined #ocaml
zolk3ri has quit [Quit: leaving]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
vicfred has joined #ocaml
infinity0 has quit [Ping timeout: 265 seconds]
toppler has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toppler has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
rople has joined #ocaml
warriors has quit [Quit: Connection closed for inactivity]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Client Quit]
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
kvda has joined #ocaml
kmg has joined #ocaml
penguwin has quit [Quit: NO CARRIER]
silver has quit [Read error: Connection reset by peer]
toppler has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 246 seconds]
toppler has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
gravicappa has joined #ocaml
sagax has quit [Ping timeout: 245 seconds]
narimiran has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
retropikzel has joined #ocaml
bitwinery has quit [Quit: Leaving]
keep_learning has joined #ocaml
keep_learning has quit [Read error: Connection timed out]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
retropikzel has quit [Remote host closed the connection]
<xvilka> hi! If there anyone with Alpine experience it would be awesome if you can take a look: https://discuss.ocaml.org/t/alpine-mainstream-ocaml-is-broken/4597
toppler has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
_whitelogger has joined #ocaml
<xvilka> I tried 3 different workarounds and failed
<xvilka> Alpine's own OCaml package is broken
<xvilka> OCaml building from source in Alpine is broken (with opam)
<xvilka> My code already migrated to 4.08.0+, so can't use earlier Alpine releases or system switch
<xvilka> /o\
<xvilka> quality ecosystem
sagax has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
Serpent7776 has quit [Quit: leaving]
toppler has quit [Ping timeout: 245 seconds]
brillenfux has joined #ocaml
Serpent7776 has joined #ocaml
toppler has joined #ocaml
<Leonidas> maybe don't use alpine then?
<Leonidas> I think reporting to the OCaml Discuss is less effective than reporting to Alpine themselves, because that has most likely a very much higher amount of Alpine developers
Haudegen has joined #ocaml
<xvilka> Leonidas: Ubuntu and co produce ridiculously big containers
<xvilka> Leonidas: and I reported that to Alpine devs as well
<xvilka> I found a workaround, but hope it will be fixed mainstream
<Leonidas> try debian or void maybe?
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toppler has quit [Ping timeout: 264 seconds]
toppler has joined #ocaml
ggole has joined #ocaml
<xvilka> Leonidas: void, interesting idea, thanks
<xvilka> debian still big
<Leonidas> xvilka: the debian stretch-slim base image is 22MB. While not as tiny as Alpine, I think it's not too bad.
toppler has quit [Ping timeout: 240 seconds]
bartholin has quit [Remote host closed the connection]
toppler has joined #ocaml
<flux> xvilka: of course you should use mirage :-)
<flux> but yeah, certainly it would be nice that it worked out-of-the-box on 'all' platforms
porchetta has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
jaar has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
slice has quit [Ping timeout: 246 seconds]
slice has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
Serpent7776 has joined #ocaml
mfp has joined #ocaml
ggole has quit [Remote host closed the connection]
ggole has joined #ocaml
jbrown has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
rople has quit [Ping timeout: 265 seconds]
silver has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
Haudegen has joined #ocaml
Niamkik has quit [Ping timeout: 276 seconds]
toppler has quit [Ping timeout: 265 seconds]
Niamkik has joined #ocaml
toppler has joined #ocaml
ygrek has joined #ocaml
spew has joined #ocaml
<companion_cube> isn't it a strange thing that the language is supposed to be backward compatible, yet migrating to newer versions is a hassle? 🤔
<Armael> ssssss
<companion_cube> coucou Armael o/
<Leonidas> Armael: Parseltongue goes to #python
<Armael> ah so that's how it's called in english
toppler has quit [Ping timeout: 245 seconds]
toppler has joined #ocaml
zolk3ri has joined #ocaml
gareppa has joined #ocaml
<companion_cube> does camel tongue go to #perl?
warriors has joined #ocaml
madroach_ has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
smazga has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
<Leonidas> Armael: yeah, I learned from Harry Potter
retropikzel has joined #ocaml
<Armael> I only read harry potter in french :-(
gareppa has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 276 seconds]
brillenfux has quit [Remote host closed the connection]
jbrown has joined #ocaml
toppler has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
tane has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
GreyFaceNoSpace has joined #ocaml
toppler has quit [Ping timeout: 252 seconds]
toppler has joined #ocaml
bitwinery has joined #ocaml
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Vikfret has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
dhil has joined #ocaml
vicfred has quit [Quit: Leaving]
<Leonidas> rgrinberg: is ocaml-hamt maintained?
Serpent7776 has joined #ocaml
ggole has quit [Quit: Leaving]
jnavila has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
toppler has joined #ocaml
jaar has quit [Ping timeout: 276 seconds]
KeyJoo has joined #ocaml
jp has joined #ocaml
<Leonidas> heh, I just looked for Tyxml for Haskell and only found something because Drup posted in a reddit discussion about it :)
<Drup> :D
<Drup> afaik, it doesn't really exist, and it would be really hard to reproduce
<Drup> there is an attempt in Rust tho, but I don't think it's super usable
bartholin has joined #ocaml
toppler has quit [Ping timeout: 264 seconds]
dhil has quit [Quit: Leaving]
retropikzel has quit [Remote host closed the connection]
jp has quit [Remote host closed the connection]
jp has joined #ocaml
toppler has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
hashbjorn has joined #ocaml
<hashbjorn> I'm new to ocaml, having written a bunch of F#. It's a neat language that I'd love to get better at
<hashbjorn> BUT....
<Leonidas> I was quite shocked by the compile times reported in that thread. minutes for a semi-large page like wikipedia?
<hashbjorn> I'm kind of being frustrated at the fact that I have no quick way of printing complicated data structures..
jp has quit [Ping timeout: 240 seconds]
jbrown has quit [Ping timeout: 240 seconds]
<hashbjorn> in F# I can use `printfn "%A"` to print whatever nested list of list of list of tuples I want
<Drup> Leonidas: huh, which thread ?
<hashbjorn> but it seems like the Ocaml way to do this is to string together a bunch of higher order functions according to my needs.
<Leonidas> Drup: https://redd.it/6z8de0
<hashbjorn> Is it really the case that I can't print a list of list of tuples in Ocaml without invoking three different higher order functions?
<Leonidas> hashbjorn: yes, ocaml values are not printable by default.
jbrown has joined #ocaml
<Leonidas> there is no default string representation for all ocaml types when they fall out of the compiler
<hashbjorn> this seems a bit silly. Is it not? for what reason?
<Leonidas> hashbjorn: I guess you don't always need or want that. But you can just derive yourself a printer.
<Leonidas> kinda like one would do in Haskell or Rust, so you don't actually need to compose a printing function
jp has joined #ocaml
<hashbjorn> hmmm.. I'm not terribly fast at writing printers for complex data structures, but I guess that'll get better as I improve at FP
<Leonidas> hashbjorn: `type t = … [@@deriving show]`
<hashbjorn> for now it's just a bit frustrating that I need to write more code to display the data than I did to create it..
<Drup> Leonidas: I'm not that shocked, given the encoding in haskell
<Drup> but the guys says it was improved quite a lot
<Leonidas> hashbjorn: at work we use deriving A LOT for all kinds of things
<Drup> (Ocamlers don't realize how good they have it, compile-time wise)
<hashbjorn> Leonidas: I'll look into that
<hashbjorn> Lenoidas: it sounds like you don't personally care about printing deep data structures though. is your fp code really predictable enough that you don't check the values you generate?
jp has quit [Ping timeout: 252 seconds]
<hashbjorn> Leonidas: I'm just trying to get into this thing, and it's not necessarily a requirement for me to bring my habits over from python. do FP'ers just not print? do people do mroe TDD instead?
<simpson> Do you add a __repr__() to every class in Python? (Although perhaps you use `attrs` or similar everywhere! [@@deriving show] is like that.)
<Leonidas> hashbjorn: I think it is more useful to restrict the types enough so you can't represent invalid states in them instead of having very generic ones that you have to look at to detect whether they are correct or not
<Leonidas> hashbjorn: yes, indeed we do more TDD (type-driven development)!
<Leonidas> hashbjorn: I think one difference towards python is that you rarely use very generic data structures (like lists that might contain anything or dics that contain anything) but rather define a lot of types which are pretty specific what can be in there
<hashbjorn> Leonidas: that sounds neat - and exactly like the direction I'd like to move my habits.
<hashbjorn> simpson: exactly as you say, I use dataclasses everywhere
<hashbjorn> I think I'm also just hitting a lot of (new to me) compile time errors when trying to write small exercise programs. my go-to debugging strategy is to print the data before running it into the function that doesn't work, to check the actual state of it.
<Leonidas> hashbjorn: e.g. we take all our input JSON and convert it into very explicit types, so when you know you have a parsed JSON, you know that it will contain exactly the data that your types expect instead of wondering why suddenly you have `None` in one nesting level
<hashbjorn> Lenoidas: that seems like a really sane way to treat your data too. I guess I'm just looking for ways to debug when my stuff isn't coming out like I expect it to (because of my own fuckups)
<Leonidas> hashbjorn: I don't know if it helps you in the specific case but maybe you can try to constrain your data structures further so doing the wrong thing will turn into a type error?
jp has joined #ocaml
<Leonidas> that's of course only practical to some degree
<hashbjorn> I think that's what I need to do thanks :) One last stupid question: If I want to have an integer that has to be greater than 0 - is "constrained types" the term I'm interested in?
<Leonidas> well, that's one of the cases where constraining that becomes somewhat tricky
<Leonidas> ocaml has, unlike e.g. ada no way to define number types with a limited range
<Leonidas> what you can do is to define your own integer type with conversion functions but it can get unwieldy
gravicappa has quit [Ping timeout: 240 seconds]
<hashbjorn> Lenoidas: my specific use case is that I'm trying to write a conway's game, and I just want to check that I'm not generating coords to check that are outside the grid... but I guess I hit something of a rabbit hole here. I'm just gonna assume that my code is correct and keep going :)
jp has quit []
<hashbjorn> Leonidas: thanks for your help though. you've been kind and pedagogical! I'll let you all get back to sophisticated conversation now :)
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
warriors has quit [Quit: Connection closed for inactivity]
kakadu has joined #ocaml
<cemerick> is there a way to suppress all cuts emitted by a `%a` printer?
<cemerick> i.e. I want the output of `Format.asprintf "...%a..." Foo.pp foo` to not contain any linebreaks or indenting spaces
<octachron> cemerick, you could print it in a buffer with geometry set to essentially infinity then reverse back this buffer to the main buffer.
gareppa has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
gareppa has quit [Remote host closed the connection]
toppler has joined #ocaml
gareppa has joined #ocaml
<cemerick> octachron: ok, I can see how that'll fit together, thanks
lucilius has joined #ocaml
gareppa has quit [Quit: Leaving]
lucilius has quit [Client Quit]
narimiran has quit [Ping timeout: 264 seconds]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 268 seconds]
tane has quit [Quit: Leaving]
toppler has joined #ocaml
count3rmeasure has joined #ocaml
<dmbaturin> [ERROR] Uncaught exception: "/usr/bin/git fetch --multiple origin user" exited with code 1 "error: Could not fetch user"
<dmbaturin> What is 'opam publish' trying to say?
vicfred has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
jnavila has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
jave has quit [Ping timeout: 245 seconds]
toppler has quit [Ping timeout: 264 seconds]
spew has quit [Quit: Connection closed for inactivity]
g0d_shatt3r has joined #ocaml
smazga has quit [Quit: leaving]
count3rmeasure has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
Serpent7776 has quit [Quit: leaving]
kvda has joined #ocaml
Vikfret has quit [Quit: Leaving]