adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
jao has quit [Ping timeout: 255 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
silver_ has joined #ocaml
discord8 has joined #ocaml
silver has quit [Read error: Connection reset by peer]
discord7 has quit [Remote host closed the connection]
tarptaeya has quit [Quit: ZNC 1.7.2 - https://znc.in]
TC01 has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
tarptaeya has joined #ocaml
TC01 has joined #ocaml
keep_learning_M has quit [Ping timeout: 255 seconds]
keep_learning_M has joined #ocaml
mfp has quit [Ping timeout: 255 seconds]
Jeanne-Kamikaze has joined #ocaml
Jeanne-Kamikaze has quit [Remote host closed the connection]
silver_ has quit [Read error: Connection reset by peer]
AtumT has quit [Quit: AtumT]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 245 seconds]
caltelt_ has joined #ocaml
gravicappa has joined #ocaml
AnAverageHuman has joined #ocaml
seliopou_ has quit [Ping timeout: 250 seconds]
themsay has joined #ocaml
AnAverageHuman has quit [Remote host closed the connection]
seliopou has joined #ocaml
Netsu has joined #ocaml
<Netsu> Hello. Question about nonrec extensible variant type, I guess: example here https://gist.github.com/Pitometsu/679a053b027637fbb6a46c35903cec92
<Netsu> So ^^^^^ how can I access from nested module of signature or functor to external type with same name?
<Netsu> As a workaround, I can use tempruary `type t' = t` before `include A`, but it would add unnecessary extra type alias to public interface.
Netsu has quit [Ping timeout: 256 seconds]
Netsu has joined #ocaml
themsay has quit [Ping timeout: 246 seconds]
jao has joined #ocaml
AxiomaticEspress has quit [Quit: WeeChat 2.4]
Haudegen has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
freyr69 has joined #ocaml
caltelt_ has quit [Ping timeout: 245 seconds]
powerbit has joined #ocaml
nullifidian_ is now known as nullifidian
xuib has joined #ocaml
xuib has quit [Client Quit]
xuib has joined #ocaml
jao has joined #ocaml
zolk3ri has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
mfp has joined #ocaml
<flux[m]> Netsu: I don't think there's a better solution..
<Netsu> flux[m]: thanks. Sad that module language is not rich and flexible enough for this moment, doh
<flux[m]> if you would work with module instead of module types then I think you would be able to use `.. : sig .. end` for hiding parts
<flux[m]> but I don't think there's a way to hide parts from module types in a similar way, unless with destructive substitution
<Netsu> flux[m]: it might work for such cases, thanks
<octachron> In 4.08, you can use a local type substitution "type tmp := t"
<flux[m]> cool. I don't have 4.08 here, but so this results in empty signature? `module Foo = struct type tmp := int end` ?
<flux[m]> sounds like you are referring to some syntaxs that doesn't involve `..with type t := ` ..?
<def`> It would be worrying to have modules that have no textual syntax :P
<flux[m]> type level and value level parent-scope -operators would be nice at times.
<octachron> flux[m], "type t := .." will only work in signature but yes "module type s = sig type t:= tmp end" results in a empty signature
<flux[m]> heh, nice. but sometimes the disease is better than the cure :), if the module has a lot of other stuff that is
<flux[m]> octachron: so sounds like it would fix this perfectly, with `type b_t := t type t += Ref of b_t` ?
jao has quit [Ping timeout: 246 seconds]
<octachron> indeed, it was one of the motivation for the feature
jao has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
Haudegen has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Max SendQ exceeded]
gareppa has joined #ocaml
<CcxWrk> Is there a way to prettyprint whatever value? I see hooks for toplevel for this in Base, but can't find how to invoke it myself.
<theblatte> no :/
<CcxWrk> I was pointed at ppx_deriving, so hopefully it's show will be helpful.
<CcxWrk> (Whenever I find out how to actually use it)
octachron has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
aspiwack[m] has quit [Ping timeout: 240 seconds]
copy` has quit [Ping timeout: 240 seconds]
peddie has quit [Ping timeout: 264 seconds]
isaachodes[m] has quit [Ping timeout: 240 seconds]
cgenie[m] has quit [Ping timeout: 240 seconds]
nojb_[m] has quit [Ping timeout: 252 seconds]
rgr[m] has quit [Ping timeout: 250 seconds]
flux[m] has quit [Ping timeout: 265 seconds]
Haudegen[m] has quit [Ping timeout: 265 seconds]
aecepoglu[m] has quit [Ping timeout: 250 seconds]
yetanotherion[m] has quit [Ping timeout: 250 seconds]
dl3br[m] has quit [Ping timeout: 250 seconds]
karan[m] has quit [Ping timeout: 250 seconds]
miguelbe[m] has quit [Ping timeout: 252 seconds]
Virgile[m] has quit [Ping timeout: 240 seconds]
nojb[m] has quit [Ping timeout: 240 seconds]
smondet[m] has quit [Ping timeout: 240 seconds]
regnat[m] has quit [Ping timeout: 252 seconds]
otini has quit [Ping timeout: 264 seconds]
Walter[m] has quit [Ping timeout: 250 seconds]
jimt[m] has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
spectrumgomas[m] has quit [Ping timeout: 268 seconds]
hdurer[m] has quit [Ping timeout: 268 seconds]
lokydor[m] has quit [Ping timeout: 264 seconds]
octachron has joined #ocaml
silver has joined #ocaml
spew has joined #ocaml
<Leonidas> CcxWrk: ppx_deriving generates show functions for each type, if your type doesn't have it, it won't help you
<CcxWrk> It's for custom types, so that's fine. I'm just struggling make it compile right, (or recognize the annotation, merlin was complaining about that before I fiddled with opam and everything blew up)
<Leonidas> CcxWrk: well, you add [@@deriving show] at your type and add (preprocess (pps ppx_deriving.show)) to your dune file
<CcxWrk> I was compiling with just: ocamlfind ocamlc -linkpkg -package core -package ppx_deriving -package ppx_let -thread ppio.ml -o ppio.bc
<CcxWrk> Then I tried to get dune working and now I'm picking up the pieces.
<Leonidas> you probably need -package ppx_deriving.show but honestly I would suggest you use dune instead of wasting time to decipher how to run the compiler against your code.
<freyr69> Does bigarray support custom finalization?
<freyr69> Could I create a bigarray with a custom finalizer out of c stubs?
<CcxWrk> I'd rather know this works under the hood. Anyway, now I'm getting "Error: Attribute `deriving' was not used" on https://bpaste.net/show/aff9d555ec4a
<CcxWrk> (Will try to get dune working, this time without opam)
themsay has joined #ocaml
zolk3ri_ has joined #ocaml
zolk3ri_ has quit [Remote host closed the connection]
<Leonidas> CcxWrk: yeah, there is some interaction between ppx_driver and ppx_deriving, where the latter does not mention that it has processed the attribute thus ppx_driver aborts compilation because it thinks the annotation was unused
<Leonidas> CcxWrk: also color_pair and color_scheme must have deriving show.
notnotdan has quit [Quit: leaving]
AnAverageHuman has joined #ocaml
<CcxWrk> Yeah, adding those only moves the error to first instance. And dune fails with "Error: No ppx driver were found."
FreeBirdLjj has joined #ocaml
gareppa has quit [Quit: Leaving]
<Leonidas> CcxWrk: how does your dune file look like?
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<Leonidas> CcxWrk: you need to replace ppx_deriving with ppx_deriving.show
<CcxWrk> Same error
<Leonidas> CcxWrk: is the repo accessible somewhere?
<CcxWrk> As in my code? I could upload it, sure, as long as you are comfortable with bzr (or browsing it via web)
jao has joined #ocaml
okuu has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
<Leonidas> I stopped using bzr a decade ago or so, but I guess I can just download the code
* Leonidas building switch…
wilfredh has joined #ocaml
<wilfredh> is it possible to format an integer to a *dynamic* width in ocaml?
<wilfredh> e.g. `Printf.sprintf "%3d" 42` works great when I know the width at compile time, but what if I don't know the width?
okuu has quit [Ping timeout: 240 seconds]
<def`> %*d
<Armael> There is a way I think
<Armael> Maybe %*d ?
<wilfredh> # Printf.sprintf "%*d" 4 42;;
<wilfredh> - : string = " 42"
<wilfredh> perfect, that works :)
AnAverageHuman has joined #ocaml
freyr69 has quit [Remote host closed the connection]
Netsu has quit [Ping timeout: 256 seconds]
<Leonidas> CcxWrk: Which version of core do you use? It doesn't build with v0.12
<CcxWrk> Something old I guess.
<Leonidas> that's not particularly helpful to get it to work :p
<CcxWrk> I will try fresher OPAM install
<Leonidas> meh, v0.9 does not build on ocaml 4.07 :(
<CcxWrk> Oops, sorry about the ANSI escapes there.
<CcxWrk> Downloading latest opam-full
andrewlitteken has joined #ocaml
<CcxWrk> And it doesn't install because it doesn't follow --prefix I gave it. *sigh*
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek has quit [Read error: Connection reset by peer]
<CcxWrk> So I reinstalled everything from scratch and now it compiles (with my Makefile). And after some fiddling I even found how to use the generated function.
sonologico has joined #ocaml
Serpent7776 has joined #ocaml
AtumT has joined #ocaml
ziyourenxiang_ has quit [Ping timeout: 246 seconds]
sonologico has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 264 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
sonologico has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
AnAverageHuman has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
wiml has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
gravicappa has joined #ocaml
<wiml> I'm trying to use ppx_optcomp to conditionally expose some internal functions only when I'm building with tests. I can't figure out how to define/undef a symbol for optcomp to look at, though. Is there a usual way to do this kind of thing? I'm not wedded to optcomp.
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
wiml has quit [Ping timeout: 250 seconds]
Keodedad has joined #ocaml
AnAverageHuman has joined #ocaml
Keodedad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aciniglio has joined #ocaml
gravicappa has quit [Ping timeout: 250 seconds]
wiml has joined #ocaml
kakadu_ has joined #ocaml
Serpent7776 has quit [Quit: leaving]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
xuib has quit [Quit: xuib]
AnAverageHuman has quit [Ping timeout: 256 seconds]
AnAverageHuman has joined #ocaml
keep_learning_M has quit [Ping timeout: 246 seconds]
stux|RC-only has quit [Ping timeout: 240 seconds]
keep_learning_M has joined #ocaml
jao has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
wiml has quit [Ping timeout: 250 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
fishyfriend has joined #ocaml
themsay has quit [Quit: Quit]
themsay has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
nullifidian has quit [*.net *.split]
crowley95 has quit [*.net *.split]
jstolare1 has quit [*.net *.split]
tizoc has quit [*.net *.split]
mbac has quit [*.net *.split]
companion_cube has quit [*.net *.split]
ocabot has quit [*.net *.split]
Madars has quit [*.net *.split]
nullifidian has joined #ocaml
crowley95 has joined #ocaml
jstolare1 has joined #ocaml
Madars has joined #ocaml
companion_cube has joined #ocaml
ocabot has joined #ocaml
tizoc has joined #ocaml
mbac has joined #ocaml
spew has quit [Quit: going home]
jao has quit [Ping timeout: 252 seconds]
fishyfriend has quit [Quit: WeeChat 2.3]