adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
isd has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest54842
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
Guest54842 has quit [Killed (weber.freenode.net (Nickname regained by services))]
letoh has quit [Ping timeout: 240 seconds]
Algebr has joined #ocaml
sh0t has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
bruce_r has joined #ocaml
dh` has joined #ocaml
<dh`> what's the Bytes syntax equivalent to this?
<dh`> s.[7-i] <- Char.chr (0xff land (x lsr (8 * i)))
<dh`> I'm updating someone's old mutable strings
<companion_cube> Bytes.set s (7-i) (0xff land…)
<dh`> ...there's no syntax for it any more?
<companion_cube> I don't think so
<dh`> seems like a regression :(
<dh`> oh well
<companion_cube> meh, .[]<- was always a bit of a hack imho
<companion_cube> you can `let module String = Bytes in …` locally I guess
<companion_cube> but that's ugly
<companion_cube> the future is .{} <-
bruce_r has quit [Ping timeout: 260 seconds]
<dh`> what is that? it doesn't seem to apper in https://caml.inria.fr/pub/docs/manual-ocaml-4.06/expr.html
<dh`> (which confirms that there's no syntax for Bytes.set, alas)
<dh`> s/apper/appear/
SiGe_ has joined #ocaml
<companion_cube> there's a PR for being able to consider .{} and .{}<- as functions
<companion_cube> and thus be able to overload them using Module.(…) syntax
govg has quit [Ping timeout: 240 seconds]
SiGe_ has quit [Remote host closed the connection]
jao has joined #ocaml
<companion_cube> et (.%{}<-) a i x = Bytes.set a i x;;
<companion_cube> then a.%{i} <- x
<dh`> ah hmm
<companion_cube> 4.06
<dh`> right, I'm doing this because the 4.06 changes broke someone's code
silver_ has quit [Read error: Connection reset by peer]
<dh`> but I should probably not patch it such that it requires 4.06 :-/
<companion_cube> right
<companion_cube> it's not that bad to use Bytes.set, tbh
<companion_cube> a bit tedious, but not hard, and the result is not worse
<dh`> yeah
<dh`> well, mostly
<dh`> there's also an argument that having assignments syntactically visible is better
Algebr has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 264 seconds]
noddy has joined #ocaml
noddy has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]
isd has quit [Quit: Leaving.]
Algebr has joined #ocaml
bruce_r has joined #ocaml
bruce_r has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
letoh has joined #ocaml
_whitelogger has joined #ocaml
Algebr has quit [Remote host closed the connection]
bruce_r has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
dh` has left #ocaml [#ocaml]
troydm has quit [Ping timeout: 240 seconds]
pierpa_ has quit [Quit: Page closed]
bruce_r has quit [Ping timeout: 256 seconds]
bruce_r has joined #ocaml
jimmyrcom has quit [Ping timeout: 240 seconds]
jimmyrcom has joined #ocaml
FreeBirdLjj has joined #ocaml
bruce_r has quit [Ping timeout: 276 seconds]
bruce_r has joined #ocaml
ziyourenxiang has quit [Ping timeout: 256 seconds]
ziyourenxiang has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tarptaeya has joined #ocaml
bruce_r has quit [Ping timeout: 260 seconds]
spion has quit [Ping timeout: 248 seconds]
spion has joined #ocaml
trochdewei has joined #ocaml
kakadu has joined #ocaml
tarptaeya has quit [Remote host closed the connection]
troydm has joined #ocaml
tarptaeya has joined #ocaml
tarptaeya has quit [Remote host closed the connection]
tarptaeya has joined #ocaml
trochdewei has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
tarptaeya has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
shinnya has joined #ocaml
noddy has joined #ocaml
mfp has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
noddy has quit [Quit: WeeChat 2.0.1]
TarVanimelde has joined #ocaml
tarptaeya has joined #ocaml
zolk3ri has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Quit: WeeChat 2.0.1]
slash^ has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
nullifidian has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
inr_ has joined #ocaml
inr__ has joined #ocaml
inr has quit [Ping timeout: 240 seconds]
inr_ has quit [Ping timeout: 264 seconds]
inr has joined #ocaml
Haudegen has joined #ocaml
inr__ has quit [Ping timeout: 240 seconds]
inr_ has joined #ocaml
inr has quit [Ping timeout: 240 seconds]
nullifidian has quit [Remote host closed the connection]
nullifidian has joined #ocaml
ggherdov has joined #ocaml
nullifidian has quit [Remote host closed the connection]
am55 has quit [Quit: am55]
am55 has joined #ocaml
nullifidian has joined #ocaml
AltGr has joined #ocaml
nullifidian has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
nullifidian has joined #ocaml
sh0t has joined #ocaml
nullifidian has quit [Remote host closed the connection]
nullifidian has joined #ocaml
jao has joined #ocaml
tarptaeya has quit [Quit: Leaving]
am55 has quit [Quit: am55]
FreeBirdLjj has joined #ocaml
am55 has joined #ocaml
argent_smith has joined #ocaml
am55 has quit [Quit: am55]
am55 has joined #ocaml
groovy2shoes has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
tarptaeya has joined #ocaml
tarptaeya_ has joined #ocaml
tarptaeya__ has joined #ocaml
tarptaeya__ has quit [Client Quit]
tarptaeya has quit [Read error: Connection reset by peer]
tarptaeya_ has quit [Ping timeout: 240 seconds]
bruce_r has joined #ocaml
bruce_r has quit [Ping timeout: 255 seconds]
bruce_r has joined #ocaml
bruce_r has quit [Ping timeout: 256 seconds]
pierpa_ has joined #ocaml
mjiig has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<mjiig> Is there a way to apply a functor to a module and take a member from the result inline (ie without binding the result of the module application to name first)
<companion_cube> not that I know of
<mjiig> In that case what should I do where I need to access such a member somewhere I can't bind names, like when specifying type constraints on another modules signature?
<octachron> you can do it for type "F(X).typename" is valid
GreyFaceNoSpace has joined #ocaml
<mjiig> octachron: Sadly it's a type in a sub module, something like this https://paste.ubuntu.com/p/4fHK3P3MsX/
<Drup> mjiig: that should be fine
<Drup> at least, that's syntactically valid
<mjiig> Oh, weird, apparently I was being too enthusiastic with brackets
<mjiig> That's the opposite problem to what usually happens...
<mjiig> In the same vein, how would I write something like this? https://paste.ubuntu.com/p/rSkwfSwv55/
<Drup> mjiig: what is F ?
<mjiig> Drup: A functor
<Drup> then it depends what you want to do
<Drup> if G(A).X is a module, you might use "module type of F(..)", but that's not necessarely a very good idea in the long run
GreyFaceNoSpace_ has joined #ocaml
<mjiig> Drup: Sorry, I'm not entirely sure where you think that should go?
<mjiig> This error is really confusing me, I don't really understand how that code can give a syntax error for unmatched brackets
<Drup> instead of "F(...)"
GreyFaceNoSpace has quit [Ping timeout: 248 seconds]
jmsaunde has joined #ocaml
<jmsaunde> is there a way to override the C++ compiler in jbuilder?
<jmsaunde> it appears to be trying to use 'x86_64-w64-mingw32-gcc'. I want to try some others because that generates insane executables for me. (windows)
bruce_r has joined #ocaml
<Drup> mjiig: oh, it's a module, not a module type, sorry
<Drup> Then you have to name the intermediary modules
<Drup> module X (A:SIGNATURE) = struct module Y = G(A) include F(Y) end
<Drup> Y.X*
<mjiig> Drup: thank you so much, it's been a while since I played with functors and I knew I was missing a trick like that
<mjiig> Any idea why that code gives such bizarre error messages?
<octachron> jmsaunde, jbuilder uses the c and c++ compiler used to build the compiler, I don't know if this configurable at all
<jmsaunde> octachron: I managed to kind of make that compiler work but need to use some special linker flags that flexlink appears to not be super happy with. I need some equivalent of -static-libstdc++ and -static
<jmsaunde> otherwise it tries to bring in deps on libstdc++ and pthread dlls that don't exist??
<Drup> mjiig: because F(<M>).X is not a valid module path
<Drup> it's a valid module *type*
<mjiig> Oh I see
<mjiig> Thank you again
GreyFaceNoSpace has joined #ocaml
GreyFaceNoSpace_ has quit [Ping timeout: 264 seconds]
xx has joined #ocaml
xx is now known as Guest68706
andreas_ has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
mjiig has quit [Quit: Page closed]
argent_smith has quit [Quit: Leaving.]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
bruce_r has quit [Ping timeout: 240 seconds]
ohama has quit [Remote host closed the connection]
ohama has joined #ocaml
isd has joined #ocaml
kakadu has quit [Remote host closed the connection]
bruce_r has joined #ocaml
Haudegen has joined #ocaml
polo has joined #ocaml
ziyourenxiang has quit [Ping timeout: 256 seconds]
polo has quit [Ping timeout: 268 seconds]
Guest68706 has quit [Ping timeout: 260 seconds]
bruce_r has quit [Ping timeout: 245 seconds]
zolk3ri has quit [Remote host closed the connection]
bruce_r has joined #ocaml
Haudegen has quit [Remote host closed the connection]
whoman has quit [Read error: No route to host]
whoman has joined #ocaml