companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
pi3ce has joined #ocaml
<cedb> hi, currenty learning, doing a toy project, im trying to wrap my head around the ocolor package. it uses these semantic tags for formatting e.g. Ocolor_format.printf "@{<bold>boldtext@}" lorem, but if I bind that string first instead of passing it literally i get a type error
<cedb> tyrying to wrap my head how that even makes sense before even understanding the type error itself
<discocaml> <Kali> that is because string syntax is overloaded to also be format syntax depending on the context it's in
<discocaml> <Kali> this is why we have can have type-safe printf
<discocaml> <Kali> and such
<discocaml> <Kali> because it's not actually a string, it's a formatting literal
<discocaml> <Kali> by default, they are assumed to be strings, so in your case the binding without a type annotation makes it be a string
<discocaml> <Kali> which is then a type error since strings and formatters are not interchangable
<cedb> ah okay that makes sense thanks, so the type of that "syntactic string" would be a Format.formatter object?
<cedb> ehh, shouldnt use that word
<cedb> gdmnit didnt expect to fall that fast in the whole pp rabbit hole
<cedb> can i just annotate the binding to some fixed type just factor out that nasty long string im gonna write
<discocaml> <Kali> : _ format
<discocaml> <Kali> let test : _ format = "hello %s"
<discocaml> <Kali> for instance
<discocaml> <absolutemillow> i would like to write a lsp in ocaml somehave documentation ?
<cedb> great thanks
<cedb> (just found this blog post) http://gallium.inria.fr/blog/format6/ pretty intense thing to have so, idk how to say, close to casual user/newbie surface of interaction
<cedb> cool, but intense
f[x] has joined #ocaml
buoy49__ has quit [Read error: Connection reset by peer]
buoy49__ has joined #ocaml
f[x] has quit [Remote host closed the connection]
myrkraverk has quit [Ping timeout: 255 seconds]
myrkraverk has joined #ocaml
mbuf has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
bartholin has joined #ocaml
toastal has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
myrkraverk_ has joined #ocaml
dylanj has quit [Ping timeout: 255 seconds]
myrkraverk has quit [Ping timeout: 260 seconds]
toastal has joined #ocaml
Anarchos has joined #ocaml
toastal has left #ocaml [#ocaml]
toastal has joined #ocaml
toastal has left #ocaml [#ocaml]
toastal has joined #ocaml
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<rustyne> Anarchos, adrien: There will be a talk on picos tomorrow at the OCaml workshop (it will streamed)
<reynir> ^ specifically at 14:00 CEST
<Anarchos> rustyne
<Anarchos> ok
euphores has quit [Quit: Leaving.]
f[x] has joined #ocaml
patrick_ is now known as patrick
toastal has joined #ocaml
toastal has quit [Quit: Gateway shutdown]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml> <reynir1396> how do you print the ppx'ed source? I know dune creates a file foo.pp.ml which is a "OCaml abstract syntax tree implementation file" but I forgot how to make that into something readable
<discocaml> <anmonteiro> if you're using dune you can use `dune describe pp ./path/to/foo.ml`
<discocaml> <reynir1396> ah great thanks
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
<discocaml> <sim642> Maybe the VSCode plugin should just unmarshal and pretty print it, assuming it's self-contained
Serpent7776 has joined #ocaml
<rustyne> `dune show pp ...` works too
m5zs7k_ has joined #ocaml
m5zs7k has quit [Read error: Connection reset by peer]
lobo has quit [Ping timeout: 252 seconds]
lobo has joined #ocaml
m5zs7k_ is now known as m5zs7k
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
pi3ce has quit [Client Quit]
pi3ce has joined #ocaml
mbuf has quit [Quit: Leaving]
pi3ce has quit [Read error: Connection reset by peer]
pi3ce_ has joined #ocaml
<companion_cube> I'm confused again by deriving_inline
<companion_cube> there's barely any docs on the subject :/
dstein64- has joined #ocaml
dstein64 has quit [Ping timeout: 265 seconds]
dstein64- is now known as dstein64
f[x] has quit [Remote host closed the connection]
f[x] has joined #ocaml
Tuplanolla has joined #ocaml
dylanj has joined #ocaml
bartholin has quit [Quit: Leaving]
f[x] has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Serpent7776 has quit [Ping timeout: 248 seconds]
Tuplanolla has quit [Quit: Leaving.]
neuroevolutus has joined #ocaml