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/
dhil has joined #ocaml
Haudegen has joined #ocaml
chrisz has quit [Ping timeout: 260 seconds]
chrisz has joined #ocaml
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
pi3ce has quit [Ping timeout: 260 seconds]
pi3ce has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
divya has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
chrisz has quit [Ping timeout: 265 seconds]
chrisz has joined #ocaml
ced2 has joined #ocaml
ced2 has quit [Changing host]
ced2 has joined #ocaml
ced2 is now known as cedb
<cedb> is there a specific way to enter ansi escape codes in ocaml? im trying to do the osc8 spec and the given examples don't work for me, e.g. Printf.printf "\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n" just prints out the escape characters literally instead of providing a link in the terminal
CalimeroTeknik has quit [Ping timeout: 244 seconds]
<cedb> ive tried swapping \e for \033 to no avail
<discocaml> <yawaramin> try using quoted strings ie `{| ... |}`
<discocaml> <froyo> I don't remember the decimal for ESC but be mindful that `\033` isn't octal
<discocaml> <froyo> `\x1b[stuff` works fine
<discocaml> <froyo> yawaramin: quoted strings is probably a misfeature here because you _do_ want to escape
<cedb> so how do you manually input escape here? the equivalent works in perl
<discocaml> <froyo> same as what you did, but using `\x1b` or `\027`
<discocaml> <froyo> or i guess `\o033` if you insist
<discocaml> <yawaramin> yeah that works
CalimeroTeknik has joined #ocaml
<cedb> froyo much thanks that works
<discocaml> <froyo> np
<dh`> is \027 read in decimal? much as octal is silly in 2025 (or even 2005) that seems like borrowing trouble
<discocaml> <froyo> tbf prefixing octal with just 0 but hex with 0x and binary with 0b was a weird design choice
<discocaml> <froyo> blame c-family
bartholin has quit [Remote host closed the connection]
<companion_cube> cedb: I use \x1b
<cedb> i prefer sticking as close o possible to the online docs for this ansi nonsense
Tuplanolla has quit [Quit: Leaving.]
chiselfuse has quit [Ping timeout: 264 seconds]
hannes_ has joined #ocaml
cedb_ has joined #ocaml
cedb_ has quit [Client Quit]
cedb_ has joined #ocaml
cedb_ has quit [Client Quit]
cedb_ has joined #ocaml