objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dborisog>
I currently run my Ocsigen project on my OS, Ubuntu 20; OCaml 4.10.0 and one of the packages is ocsigen-toolkit.2.7.0. I would like to run it in Docker container. I found an official image ocaml/opam2:4.10 ( https://hub.docker.com/r/ocaml/opam2/tags ), yet the following instruction "RUN opam install ocsigen-toolkit.2.7.0" produces "[ERROR] Package ocsigen-toolkit has no version 2.7.0", and preceding "RUN opam update" does not help. Is there a way to
<dborisog>
install ocsigen-toolkit.2.7.0 on top of ocaml/opam2:4.10 image?
waleee-cl has quit [Quit: Connection closed for inactivity]
mbuf has quit [Read error: Connection reset by peer]
mbuf has joined #ocaml
kvda has joined #ocaml
Haudegen has joined #ocaml
hlisp has joined #ocaml
jbrown has joined #ocaml
Leonidas has quit [Quit: An ideal world is left as an exercise to the reader]
hlisp has quit [Ping timeout: 258 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hlisp has joined #ocaml
HyperMonkey has quit [Remote host closed the connection]
<flux1>
perhaps. I took a look that someone had begun to write a jsonpath implementation for ocaml but stopped
<olle>
json query language standard
<flux1>
and, of course, it would be nice if such a thing would be as type-safe as feasible
<flux1>
so perhaps something ocaml-specific
<olle>
hm hm
<olle>
yeah, if it returns Some object or Some array or just None
<simpson>
olle: jq is like awk, but for JSON. It is *extremely* useful to know, despite requiring learning a DSL. https://stedolan.github.io/jq/manual/
pigeonv has joined #ocaml
<olle>
ah
<olle>
why is it useful, exactly...?
<flux1>
well, if you have json and you want to process it somehow
<simpson>
Perhaps one might need to process GiB of JSON data.
<olle>
let me stop you right there
<olle>
xD
<olle>
too much webscale for me
<flux1>
json is very common these days
<flux1>
which is a good thing. we could be sinking in XML.
<flux1>
recently I found a website that shows the lake temperatures of Finland—well, the ones that are being officially monitored. turns out the front renders the data based on the json dump it is provided
<simpson>
olle: Well, jq is *also* a compact higher-order concatenative filter language, and with only a few dozen lines, it's possible to write out a basic term-rewriting system: https://github.com/MostAwesomeDude/klesi/blob/master/cat.jq But yeah, jq is useful for cloud work, just like awk is useful for text processing.
<flux1>
so with a little bit of unreadable jq ;) I was able to dump that data into something that was readable and that again to something influxdb was able to accept
<flux1>
I imagine it would have been a lot more in any other language; and probably not more readable anyway
<flux1>
wish more utilities came with json output so we would finally get rid of the ad-hoc text-processing breaking whenever an app decides to change its output format
<flux1>
I mean it could happen with json as well, but it's so much easier to extend it without breaking anything
<flux1>
maybe jq could be implemented as a DSL in ocaml 🤔
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
jnavila_ has quit [Quit: Konversation terminated!]
<olle>
simpson: alright
<olle>
flux1: ppx called :)
<olle>
ppx all the things!
<flux1>
yeah, but it still needs to fix OCaml syntactically
<flux1>
preferably leverage ocaml facilities as good as possible to avoid doing them again :)
<olle>
builder pattern + phantom types
<waleee-cl>
olle: another reason to use jq, nice highlighting (on my distro at least) of fields and values in the json
<companion_cube>
oh I forgot, flux1, there's also `ocaml-decoders`
<flux1>
companion_cube: well that's exactly the ticket!
<companion_cube>
it's inspired by Elm
<flux1>
better error messages as well :)
<companion_cube>
yes, the messages are neat
<flux1>
well, I already pushed my inferior version. I guess I need to force-push an older one so I can refactor it to use this one neatly ;).
jbrown has joined #ocaml
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Read error: Connection reset by peer]
leah2 has quit [Ping timeout: 244 seconds]
objmagic has joined #ocaml
tane has quit [Quit: Leaving]
leah2 has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has joined #ocaml
objmagic has joined #ocaml
peterbb has joined #ocaml
Hrundi_V_Bakshi has joined #ocaml
peterbb has quit [Ping timeout: 264 seconds]
Hrundi_V_Bakshi has quit [Ping timeout: 240 seconds]
kvda has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]