waleee-cl has quit [Quit: Connection closed for inactivity]
dckc has joined #ocaml
dckc has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
olle has quit [Ping timeout: 256 seconds]
olle has joined #ocaml
cgenie[m] has quit [Ping timeout: 246 seconds]
labor[m] has quit [Ping timeout: 246 seconds]
cgenie[m] has joined #ocaml
labor[m] has joined #ocaml
dckc has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
Jesin has joined #ocaml
<HyperTables>
I'm trying to build ocaml in opam with a musl compiler build by crossdev in gentoo. I get: /lib/ld-musl-aarch64.so.1: No such file or directory I don't get why since I am trying with +static
<HyperTables>
4.10.0+musl+static+flambda
_whitelogger has joined #ocaml
nullcone has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfp has quit [Ping timeout: 258 seconds]
ArthurStrong has joined #ocaml
kvda has joined #ocaml
ArthurSt1ong has joined #ocaml
ArthurStrong has quit [Ping timeout: 272 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has joined #ocaml
inkbottle has quit [Ping timeout: 272 seconds]
kvda has joined #ocaml
kvda has quit [Client Quit]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
narimiran has joined #ocaml
ArthurSt1ong has quit [Quit: leaving]
vicfred has quit [Quit: Leaving]
def_ is now known as def
mbuf has joined #ocaml
tobiasBora has quit [Read error: Connection reset by peer]
kvda has joined #ocaml
dborisog has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dckc has quit [Ping timeout: 246 seconds]
dckc has joined #ocaml
chripell has joined #ocaml
Haudegen has joined #ocaml
olle_ has joined #ocaml
ollehar_ has joined #ocaml
rpcope has quit [Ping timeout: 256 seconds]
rpcope has joined #ocaml
ArthurStrong has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
White__Flame is now known as White_Flame
mfp has joined #ocaml
olle__ has joined #ocaml
tobiasBora has joined #ocaml
eagleflo_ is now known as eagleflo
dborisog has quit [Ping timeout: 256 seconds]
<olle__>
;*
nullcone has quit [Quit: Connection closed for inactivity]
muskan has joined #ocaml
dborisog has joined #ocaml
tobiasBora has quit [Ping timeout: 272 seconds]
Haudegen has quit [Ping timeout: 272 seconds]
Serpent7776 has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
Serpent7776 has joined #ocaml
t0b0 has quit [Ping timeout: 256 seconds]
t0b0 has joined #ocaml
FreeBirdLjj has joined #ocaml
t0b0 has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
t0b0 has joined #ocaml
FreeBirdLjj has joined #ocaml
mrd has quit [Ping timeout: 258 seconds]
mrd has joined #ocaml
mrd is now known as Guest32377
muskan has left #ocaml [#ocaml]
dckc has quit [Ping timeout: 260 seconds]
dckc has joined #ocaml
ArthurStrong has quit [Quit: leaving]
tane has joined #ocaml
HyperTables has quit [Ping timeout: 245 seconds]
Anarchos has quit [Remote host closed the connection]
<theblatte>
I'd like to include some documentation text that potentially lives in a file on disk in OCaml code (to avoid writing giant strings in my .ml file), is ppx_blob recommended?
Anarchos has joined #ocaml
narimiran has quit [Ping timeout: 272 seconds]
<Drup>
I don't know this one specifically, but there are several ppxs to do that, and yes, it's a good solution
<companion_cube>
that, or dune based codegen to produce a ml file with blobs inside
<Drup>
(which is equivalent to reimplement ppx_blob, in dune :D)
<theblatte>
Drup: I was wondering if there was one people used in particular, I just happened on ppx_blob after 12s of googling :)
<theblatte>
do you know others?
<companion_cube>
Drup: yes pretty much
<companion_cube>
(but without 5 deps)
<Drup>
theblatte: I think this one is fine. The mirage one (crunch) is very specific to mirage things
<theblatte>
Drup: ok thanks!
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
olle_ has quit [Ping timeout: 246 seconds]
ollehar_ has quit [Ping timeout: 272 seconds]
olle__ has quit [Ping timeout: 272 seconds]
waleee-cl has joined #ocaml
vicfred has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
<theblatte>
actually, I'm a bit scared about bloating the binary with large strings of documentation so will keep these dynamic
<Drup>
make a size test
<Drup>
text is not that big
<companion_cube>
worse case you can probably compress the text :p
<companion_cube>
(not sure it'll be smaller in source code, though)
<companion_cube>
(escaping and all that)
<theblatte>
true, it's only a few 10s of KB of text in a 10s of MB of executable
<theblatte>
(ugh)
<theblatte>
do string literals just chill in some section that is not handled by the gc?
dborisog has quit [Ping timeout: 272 seconds]
zolk3ri has quit [Quit: leaving]
<Drup>
string literals are in the DATA section of the executable
<Anarchos>
Drup i always find it weird that java stores the strings in a special section of the bytecode
oriba has joined #ocaml
<dash>
Why's that strange
nullcone has joined #ocaml
<Anarchos>
dash cause strings are not treated as all other kind of first-class values
<companion_cube>
aren't they the only first-classe values to be allocated though?
<companion_cube>
the rest is immediate
<Drup>
companion_cube: arrays to
<Drup>
too*
<companion_cube>
are they first-class values though?
<Drup>
(in ocaml, not sure in Java)
<companion_cube>
(in java)
<companion_cube>
ocaml arrays are weird since they're the only builtin (I think?) that is mutable
<Anarchos>
companion_cube strings were, but not nowadays :)
<companion_cube>
exactly and we don't have literals for them
chripell has quit [Quit: Leaving]
<d_bot>
<Et7f3> string not builtin ?
<Anarchos>
d_bot strings used to be mutable, before bytes existed
<d_bot>
<Et7f3> Ah I have misread (I haven't read `that is mutable`)
<flux1>
curiously `opam-doc → ocaml = 4.01.0`; is opam-doc intended to work with more recent OCamls?
<flux1>
or is there some other standard way to build docs for opam packages nowadays
bartholin has joined #ocaml
mbuf has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
<flux1>
what's the best way to go about supporting passwords in an OCaml app? it seems cryptokit doesn't come with nice ready-to-use functions for that case :/
FreeBirdLjj has joined #ocaml
<flux1>
I guess I could just use 'scrypt' but then I only support one way to hash passwords
<oriba>
Drup: you recommended notty and lambda-term ... notty "does not have universal support for various terminals out there". Bad thing. I hope lambdaterm is better on that...
<companion_cube>
universal support sounds like a very high bar
<oriba>
that's the ncurses bar
ipavlo_ has quit [Quit: Connection closed for inactivity]
<companion_cube>
if your use case is to work on a 1970 terminal, yes :D
<oriba>
I want to have it run on most terminals which are in use today. So it's not clear to me, if notty does it.
tane has quit [Ping timeout: 260 seconds]
<companion_cube>
I think so
<companion_cube>
any reasonable terminal, that is
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Hrundi_V_Bakshi has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
jnavila has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
<Anarchos>
How to discover the list of printers installed in the toplevel ?
<companion_cube>
there's a hashtable somewhere
<companion_cube>
(in Topdirs I think)
<Anarchos>
cause i don't know which printer is used to print a value
<companion_cube>
well there's only one printer per type
<companion_cube>
look at the type and you will know
<Anarchos>
i know the type
<Anarchos>
i type #remove_printer printer, but i should do #remove_printer Module.printer ?
<companion_cube>
remove it with the name you used to install it
<companion_cube>
somewhere you must have done `#install_printer foo`
<companion_cube>
do the opposite
<Anarchos>
companion_cube i tried but it doesn't work
<companion_cube>
you removed it and it still prints?
<companion_cube>
try a new session maybe?
<Anarchos>
i got it : i had to 'open Module' before #remove_printer printer
<companion_cube>
#remove_primter "Module.printer";; shoiuld also work
<oriba>
notty looks nice to me, after playing with the examples...
<oriba>
btw: is there a module/package that allows typestting complex tabulars with LaTeX?
<companion_cube>
you mean, if you generate LaTeX from OCaml?
<companion_cube>
I'm afraid this road leads to madness if you're not careful :D
<oriba>
leads to madness?
<oriba>
I want to get rid of the madness!
<companion_cube>
ah well :D
<companion_cube>
tabulars are a nightmare
<oriba>
LaTeX-table typsetting... maybe a toy project with notty.... :-)
<companion_cube>
even though it doesn't do much nice typesetting
<oriba>
-> "LaTeX (not implemented yet)"
<oriba>
but maybe worth a try for text/html
<companion_cube>
html works
<companion_cube>
the html output works, I mean
<oriba>
ok
<oriba>
I just play with the text stuff from the readme. looks nice
<oriba>
maybe I can add the LaTeX part.
<companion_cube>
ah well, PRs welcome if you do
<companion_cube>
I actually tend to use the html part more these days
<oriba>
ah, the code is from you?!
<companion_cube>
zozozo and me
<oriba>
ok, nice
<zozozo>
actually outputing latex should be... hmm.. maybe doable (I was planning on saying simple when beggining to write the sentence, then remembered that printbox has complex constructions, and that latex is hell)
<oriba>
ooops: "Alert deprecated: ISO-Latin1 characters in identifiers"
<companion_cube>
zozozo: yeah stuff in tabulars… ugh
<zozozo>
oriba: is that warning when compiling PrintBox ?
<oriba>
it's from copying an example into the toplevel
<zozozo>
companion_cube: right, I'm almost at the point where I think we could use the layout computation of the text part to.. cheat latex ?
<oriba>
zozozo: the problem comes from the omega-symbol or the omega-squared - 2nd last example
<companion_cube>
zozozo: you mean bypass it, or do it ourselves?
<companion_cube>
oriba: weird, the text of the readme is utf8
<oriba>
hmhh
<zozozo>
companion_cube: I meant just pipe the text output into latex somehow but that's a stupid idea, XD
<oriba>
zozozo: ah, I used 'ledit' - problem comes from there
<zozozo>
oriba: yeah, it probably messed with the comment and/or formatting of the strings (which contain unicode characters)
<oriba>
if notty is doing what I want, I may do more OCaml programming the next time
<oriba>
I had longer pause.
<oriba>
Much has changed.
<oriba>
maybe then I have the mood and time for GADTs
<zozozo>
you can do pretty fun (and useful) stuff with GADTs
<oriba>
you used it a lot?
<zozozo>
quite, yes
<oriba>
great... so I can ask you then.... I think I can rewrite an older tool and maybe can throw out 1/3 of the code by using GADTs
<zozozo>
lastly, I used GADTs and extensible types to create a type of errors that can be parameterised by the type of fragments of code on which they can occur (i.e. some errors can occur on terms/formulas of the AST, other on top-level declarations, etc..)
<oriba>
ok, wow
<zozozo>
that was fun
<oriba>
hehe :-)
<oriba>
I had problems with the syntax when I played with them
<oriba>
then one day I thought: looks like as if they do some kind of bijection... something will be "wraped" into the gadt and later pulled out again
<zozozo>
yeah syntax can be a bit tricky, but once you know the one or two syntax (and the trick about where to put type annotations), I found it went relatively smoothly
<oriba>
without gadts it would be much more code and not that nice I think
<oriba>
parsers aha
<oriba>
"automated deduction and formal logic" cool
<zozozo>
yeah, I've written a SMT solver during my PhD, and I made dolmen during that time to split out the parsers from the solver itself
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<zozozo>
in the hope you the parsers could be re-used by other solvers instead of re-implementing (often incorrect) parsers
<oriba>
nice
<zozozo>
hence why everywhere is full of functors
<zozozo>
(similarly, I made a lib for a functorized SMT solvers)
<oriba>
hey, printbox is my new friend :-)
<oriba>
even for text-output it's great
<companion_cube>
ahah cool :D
<zozozo>
yeah, it's particularly nice for printing boxes in the terminal I found (as logging)
<oriba>
could use verbatim for LaTeX until printbox supports it natively
<oriba>
long long ago I had written a similar tool.
<oriba>
but not used it, nevert finished it
<oriba>
but it worked
tane has joined #ocaml
<oriba>
but not that fancy
<oriba>
so good toi have this possibility
<oriba>
the one example with the table is good
<oriba>
if for example creating multiplication tables, for groups or such stuff....
<oriba>
the tree output also is great. (didn't had such stuff in my ages old tool, only boxes)
FreeBirdLjj has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
<oriba>
zozozo: I rather have the LaTeX stuff in mind with PrintBox, not the terminal.
<oriba>
for the terminal I would now look for Notty.
<oriba>
Need the terminal stuff, because I want to write my own shell.
<zozozo>
sure, ^^
FreeBirdLjj has quit [Ping timeout: 272 seconds]
<oriba>
I think I can change my background image from my screen again... just added some ncurses stuff as bg-image yesterday :-)
<oriba>
but it's not bad as an image... so maybe I let it there for a while
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
<oriba>
wonder, if there are already well known programs that use notty or lambda-term
<zozozo>
oriba: you can look at its rev_deps in opam
<zozozo>
there should be an opam command to get the list, but I can't remember it
<oriba>
crazy stuff: trying notty with some stand alone code now... and hey, what was printed by notty is just there... mixed with my rest of what I saw in my shell before
<oriba>
with ncurses there would be either ncurses stuff or the stuff that were there before
<oriba>
no mixing
<oriba>
so that can also be used as a more elaborated print-to-terminal
<seliopou>
Any maintainers of ocaml-toml around?
<companion_cube>
👀
<seliopou>
gotcha!
<seliopou>
@companion_cube: I wanted to talk to somebody about ocaml-toml before I submit more PRs since they're starting to rack up and that might get annoying for maintainers
<seliopou>
I've got a personal project I want to use it for and while I'm working on it am fixing things as I go along
<seliopou>
I just wanted to get a sense of how active it is and if there are any plans for it so I can keep that in mind when submitting PRs
<companion_cube>
how's the activity on ocaml-toml anyway?
<seliopou>
seems low
<seliopou>
which is another question, is it being actively maintained? if not I can just pin it locally and keep the noise down on github
<companion_cube>
I'm not sure
<companion_cube>
it should probably have been forked a long time ago, adn given a good API
<seliopou>
One maintainer approved the first two prs and didn't merge, which I was a little confused about
<seliopou>
:)
<seliopou>
I wasn't gonna say it, but since you just did...
<companion_cube>
🤷
<companion_cube>
I stopped using it a long time ago, tbh
<companion_cube>
now I use sexps for config
<seliopou>
Yeah maybe I should just do that
<seliopou>
sexps are such a PITA to edit tho
<seliopou>
if you're generating them they're great
<companion_cube>
are they?
<companion_cube>
I like dune's config
<seliopou>
as long as you're not like 9 ('s deep
<seliopou>
then it gets confusing
<companion_cube>
ah well, 9 levels deep, I do try to avoid that
<companion_cube>
but my editor matches parens
<companion_cube>
(have you seen 9-levels deep toml? :DD)
<seliopou>
Not sure but I have seen 9 deep sexps
<seliopou>
oy
<seliopou>
the nesting
<companion_cube>
:D
<companion_cube>
not worse than json, if you ask me
<seliopou>
yeah
<seliopou>
hence my question about toml
<companion_cube>
toml is even worse imho
<seliopou>
comments!
<companion_cube>
its useful subset is more or less .ini
<oriba>
or as doctors would call it: parenthesitis ;-)
<oriba>
M. Fowler wrote an article many years ago. summarized: after languages came from Lisp and left it, had some amount of evolution, they eventually all will become Lisp again...
<oriba>
it starts with configs ;-)
<companion_cube>
meh
dckc has quit [Ping timeout: 246 seconds]
<oriba>
2021: new OCaml styleguide: ((((( let foo = () ))))
<zozozo>
I really don't like that much parentheses, :p
<zozozo>
that would be the time to fork ocaml, XD
<oriba>
yes
<oriba>
o(aml
* zozozo
looks, horrified
<oriba>
in the fork it looks like this: [[[[[ letfoo = [] ]]]]]
dckc has joined #ocaml
<oriba>
forka again and then it's {{{{{ let foo = {} }}}}}
<companion_cube>
zozozo: still beats begin/end ;)
<zozozo>
companion_cube: I'm ... not sure
<oriba>
if ... fi
<companion_cube>
if..end would be a blessing
<zozozo>
it could be useful, but the backward-compatibility seems hard to keep
<companion_cube>
sadly
Anarchos has joined #ocaml
* Anarchos
just announce to the world a little math proof verifier in ocaml, with inputs in latex syntax : https://github.com/Sylvain78/Preuves. I need some advise if folks are interested to look at it.
tinga has quit [Remote host closed the connection]