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
mfp has joined #ocaml
<cemerick> Anyone have recommendations for app-level tracing beyond just abusing https://github.com/dbuenzli/logs?
<dmbaturin> What's wrong with abusing it? :)
spew has quit [Quit: Connection closed for inactivity]
silver has quit [Read error: Connection reset by peer]
ygrek__ has joined #ocaml
Nahra has quit [Ping timeout: 268 seconds]
Nahra has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
gravicappa has joined #ocaml
gravicappa has quit [Ping timeout: 250 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
gravicappa has joined #ocaml
<cemerick> dmbaturin: ~vanilla logging frameworks (including the one I linked) are usually overly biased towards text output and (IMO) overly simplistic "levels". Perfectly fine when you're really just dumping to a log file or a tty, but almost off-topic if you want to capture events with structured data and send to e.g. databases or flat files, filtered by more flexible tags/selectors.
narimiran has joined #ocaml
Nahra has quit [Ping timeout: 240 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
andrewalker has quit [Ping timeout: 240 seconds]
andrewalker has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
spew has quit [Quit: Connection closed for inactivity]
Serpent7776 has joined #ocaml
nullifidian has quit [Quit: Leaving]
Haudegen has joined #ocaml
nullifidian has joined #ocaml
nullifidian has quit [Client Quit]
nullifidian has joined #ocaml
nullifidian has quit [Remote host closed the connection]
nullifidian has joined #ocaml
mbuf has joined #ocaml
rotucer has joined #ocaml
ygrek__ has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
wagle has quit [Ping timeout: 240 seconds]
wagle has joined #ocaml
bartholin has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 240 seconds]
Nahra has joined #ocaml
<prsafont[m]> Have you found the Tags in that library to be insufficient? https://erratique.ch/software/logs/doc/Logs/Tag/index.html
<mbuf> Leonidas, def` thanks for https://github.com/ocaml/opam-repository/pull/15506. I now have the stog binary.
dborisog has joined #ocaml
<Leonidas> mbuf: Guess I'll need to do the PRs for the other versions as well.
<def`> mbuf: cool :)
Serpent7776 has joined #ocaml
mfp has joined #ocaml
<Leonidas> how can I convert an 'a Fmt.t into something I can format with Fmt.str?
<Leonidas> like I built this nice `Fmt.const Fmt.int 42` but how do I get a `"42"` out of it?
<Leonidas> ah, now I get what the format4 is!
gravicappa has quit [Ping timeout: 276 seconds]
gravicappa has joined #ocaml
Nahra has quit [Quit: leaving]
Nahra has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
gravicappa has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
mbuf has quit [Quit: Leaving]
<octachron> Leonidas, do you mean Fmt.(str "%a" (const int 42) ()) ?
<Leonidas> octachron: yeah, I figured out that I need to pass a format string with "%a" to get the signature that `Fmt.str` wants.
spew has joined #ocaml
minusoneplusone has joined #ocaml
<minusoneplusone> hi people
<minusoneplusone> i have packaged a simple thing that got merged into the main opam repository on github
<minusoneplusone> some of my friends then tried to install the package with `opam install pkgname` after updating their local opam repos
<minusoneplusone> but they didn't find the package
<minusoneplusone> i have found no details about how packages get released into the main opam repositories (except for the packaging documentation)
<minusoneplusone> and the github pull request process, can you tell me more about how that works?
<zozozo> minusoneplusone:from what I remember the main opam repo (which is what is pulled when doing opam update), is synced with the github opam repo every hour or so ?
<zozozo> don't remember exactly the frequency of the syncs
aciniglio has joined #ocaml
<minusoneplusone> it seems i can only install it by pinnign
<minusoneplusone> im sure im doing something wrong
<zozozo> ah, you're syncing with the 1.2.2 repo, whereas we now have a 2.0 repo for opam packages
<zozozo> and they maybe stopped to backport 2.0 packages into the 1.2.2 repo
<minusoneplusone> oh okay
<minusoneplusone> same url format?
<minusoneplusone> `https://opam.ocaml.org/2.0` ??
<zozozo> let me check
<zozozo> minusoneplusone: `https://opam.ocaml.org`
<zozozo> btw, do you have opam 1.2 installed or opam 2 ?
<zozozo> because the 2.0 repo is likely to need opam2 (which itself should set the 2.0 repo as default)
rickjames has joined #ocaml
<minusoneplusone> 2.0.4
<rickjames> guys, i have problem packaging native app so that i could upload it without modification to my server. i have openssl dependency comflict on my ubuntu and in the server. what is the defacto way to package my app?
rickjames has quit [Remote host closed the connection]
<cemerick> prsafont[m]: that notion of tags certainly puts logs above other options in the space, but reporters can't change behaviour based on tags (they're only used for adding context to formatted log messages AFAICT)
<prsafont[m]> I see, what you want sounds to me something more akin to a message queue than to the normal purpose of logging.
<cemerick> that's one way to think of it. But, I was originally asking about app-level tracing, not logging per se, since the latter as it's usually construed is IMO of limited usefulness. It doesn't take much scale or complexity before it's _way_ better to analyze sets of events carrying structured data rather than picking through log files that are just text
Haudegen has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
jao has joined #ocaml
mfp has quit [Ping timeout: 265 seconds]
<minusoneplusone> im having a problem using dune and ppx_deriving
<minusoneplusone> ```
<minusoneplusone> this is the error im running into
<minusoneplusone> dune buildFile "_none_", line 1:Error: Unbound value pp_idemake: *** [Makefile:6: build] Error 1
<minusoneplusone> cannot find anything on the internet
<octachron> minusoneplusone, it sounds like you are missing a printing function for your own `idemake` type
<minusoneplusone> can you tell me more?
<minusoneplusone> oh ok!
<minusoneplusone> solved
smazga has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
ziyourenxiang has quit [Ping timeout: 276 seconds]
bartholin has joined #ocaml
jao has quit [Remote host closed the connection]
rotucer has quit [Ping timeout: 268 seconds]
domovoy has joined #ocaml
mfp has joined #ocaml
<domovoy> hi
<zozozo> hi
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
jao has joined #ocaml
jao is now known as Guest66072
Guest66072 has quit [Remote host closed the connection]
jao- has joined #ocaml
jao- is now known as jao
<domovoy> i'm trying to make a module wich essentially is a Hashtbl. It has some added functions, and its keys and values should be of type string. I started by a .ml like this: https://pastebin.com/pg8DNBrX Then i wanted to create the .mli: https://pastebin.com/NERbD2sL I get compilation errors (This expression has type ('weak1, 'weak2) Hashtbl.t but an expression was expected of type Meta.t = LS_metadata.t). My guess is this is because the 'include (module
<domovoy> type of..)' doesn't have a 'with type'. I'm new to ocaml, how should i define the interface?
dborisog has quit [Ping timeout: 246 seconds]
madroach_ has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
bartholin has quit [Remote host closed the connection]
Xizor_ has left #ocaml [#ocaml]
bartholin has joined #ocaml
vicfred has quit [Quit: Leaving]
narimiran has quit [Ping timeout: 268 seconds]
<Leonidas> does anyone know how to generate a `pp` function using the [%deriving.show: type] thing? It seems like it generates an anonymous show function, but I want the `pp` variant.
ggole has quit [Quit: Leaving]
mfp has quit [Ping timeout: 252 seconds]
gareppa has joined #ocaml
<spew> it also generates a pp
gareppa has quit [Quit: Leaving]
c4rc4s has joined #ocaml
gareppa has joined #ocaml
<Leonidas> spew: yes, but if I say `Alcotest.testable [%deriving.show: mytype] [%deriving.equal mytype]` it generates the `show`, not the `pp`.
<spew> it's just called pp_mytype I think
<spew> that %show thing is more for stuff like [%show: mytype list] so that it can generate a show on the fly for some type that has a show
<spew> if you're just going to do [%show: mytype] you might as well just do show_mytype
gareppa has quit [Remote host closed the connection]
<spew> the point of %show is to generate the right show for any type expression involving 'a0, 'a1, ... as long as each 'a_n has a show.
oni-on-ion has quit [Ping timeout: 245 seconds]
<Leonidas> spew: yes, that's exactly what I want, I want an on the fly pp
<spew> does %pp exist?
<Leonidas> spew: I solved it with redefinint the type a second time and slapping [@@deriving] on it but it feels kinda ugly
<Leonidas> spew: no
<Leonidas> I looked at the source code and actually it wasn't really clear what exactly exists
<minusoneplusone> i had fun making this one
oni-on-ion has joined #ocaml
minusoneplusone has quit [Remote host closed the connection]
mfp has joined #ocaml
<domovoy> any idea how i could make a module wich would be the same as Hashtbl, but with keys and values constrained to the type 'string'?
<Leonidas> domovoy: Core.Hashtbl allows functorization over the key type
<domovoy> Leonidas> yes, but what about the value?
<Leonidas> but for the default one I'd say "implement the same interface, but with 'a and 'b fixed to string"
<domovoy> So basically, i cant reuse Hashtbl, i have to create my own?
<Leonidas> I don't think you can, no. But I'm gladly proven wrong by people who know the module language better than I do
<domovoy> i was hoping i could get there with 'include Hashtbl' but got stuck trying to understand 'include (module type of Hashtbl) with type ??? := ???'
<Leonidas> you'd need `with type 'a := string` but I am unsure that's possible.
<domovoy> from what i understood, that would allow my module to be the same as Hashtbl, but with its type changed; just couldn't find a way to make it work
<domovoy> yeah, tried that, no luck
kakadu_ has joined #ocaml
c4rc4s has quit [Quit: Adios]
narimiran has joined #ocaml
jnavila has joined #ocaml
gravicappa has quit [Ping timeout: 265 seconds]
narimiran has quit [Ping timeout: 268 seconds]
jnavila has quit [Ping timeout: 276 seconds]
jnavila has joined #ocaml
<dmbaturin> Leonidas: Does anything allow an (amortized) O(1) way to find what key would be next in the iter order?
andreas303 has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
aciniglio has quit [Ping timeout: 245 seconds]
jnavila has quit [Remote host closed the connection]
Nahra has quit [Quit: leaving]
<Leonidas> dmbaturin: my data structures are a bit rusty, but wouldn't a b-tree offer that?
kakadu_ has quit [Remote host closed the connection]
<oni-on-ion> using rust ? well..
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
smazga has quit [Read error: Connection reset by peer]
smazga has joined #ocaml
greenbagels has quit [Quit: WeeChat 1.6]
greenbagels has joined #ocaml
ohama has quit [Remote host closed the connection]
ohama has joined #ocaml
infinity0 has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
ziyourenxiang has joined #ocaml
nullifidian has quit [Ping timeout: 245 seconds]
domovoy_ has joined #ocaml
domovoy has quit [Ping timeout: 250 seconds]
smazga has quit [Quit: leaving]