<octachron>
xvilka, is the type `t` in Byteable abstract? (there is a trailing `=` in your post).
<octachron>
Any way the signatures of StringB and ByteB make them unusable
ShalokShalom has quit [Ping timeout: 268 seconds]
<xvilka>
octachron: traling '='?
<rks`>
you have "type t =", with nothing after the =
<xvilka>
ah, sorry, a "type-o"
<xvilka>
it is just abstract type, yes
<xvilka>
I know I do something horribly wrong, but googling/trial&error tactics didn't help
<rks`>
ok so
<rks`>
instead of "StringB : Bytebale = struct"
<rks`>
you want
<rks`>
"StringB : Byteable with type t = string = struct"
<rks`>
etc etc
<octachron>
You are making a classical error of making everything abstract with signature constraints which leads to useless modules
<rks`>
your version makes the types abstract, so the compiler doesn't know they're equal anymore
<rks`>
you have to explicitely maintain the equalities.
<rks`>
ah, octachron just said the same thing on discuss, cool.
<xvilka>
octachron: rks` so there is no way to derive the string type from String module and bytes type from the Bytes module automatically?
<xvilka>
is it a hard requirement to specify `with type t = string`?
<octachron>
In the implementation? You can just remove the signature constraint `: Byteable`.
<octachron>
The point is that signature constraint removes information, when you add the `Byteable` constraint, you are asking the module system to forget everything about `t` outside of the module definition.
<xvilka>
I see, thanks
<xvilka>
I misunderstood then this thing
<xvilka>
I really appreciate a quick answer, it saved my day
<xvilka>
by the way, is it possible to "functorize" signatures too? like the implementation with Make_stuff (module)?
<xvilka>
in the .mli file
<octachron>
Note that if you wanted to check if the module was compatible with the functor argument type, you can do it with a separate module (e.g. module Check:Byteable=StringB, while waiting for transparent module ascription.
<xvilka>
to avoid the need to specify the signatures by basically copy-pasting them (they are same, you might notice with StringB and BytesB)
<octachron>
You cannot functorize signature, but you can use substitution to a similar effect
AtumT has joined #ocaml
<xvilka>
btw, wasn't transparent module ascription already merged in 4.08?
<xvilka>
I didn't migrated completely yet, due to some dependencies holding me back, so can't check
<octachron>
No, there is no transparent module ascription in 4.08
<rks`>
I expect janestreet will be publishing a postmortem of sorts somewhat soon
jbrown has quit [Ping timeout: 258 seconds]
jbrown has joined #ocaml
dhil has quit [Ping timeout: 272 seconds]
kiwi_7 has joined #ocaml
jnavila has joined #ocaml
kiwi_7 has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 252 seconds]
emias has quit [Quit: WeeChat 2.3]
emias has joined #ocaml
Kitambi has joined #ocaml
floatingballs has joined #ocaml
floatingballs has quit [Remote host closed the connection]
high_shoes has joined #ocaml
<high_shoes>
hi, i'm new to ocaml and was trying to use ocamllex. when I write the statement as an action Printf.printf "%s" (Lexing.lexeme lexbuf); that works (have opened Lexing at the top) but I get an unbound error when doing with_positions instead. can anyone explain please?
<octachron>
The function "with_position" is only available with OCaml 4.08.
<high_shoes>
okay thank you, are there any alternatives for older versions?
<octachron>
Well, for older versions, `with_positions` would be essentially `let f _ = true`
<high_shoes>
I'm a bit confused octachron, from my understanding of reading the right docs you have to update it?
<high_shoes>
"In order to keep them accurate, they must be initialised before the first use of the lexbuf, and updated by the relevant lexer actions" I'm guessing then you need to do newlines
<octachron>
Yes, you need to update newline position in the action.
al-damiri has joined #ocaml
Haudegen has joined #ocaml
tristero has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
<aecepoglu[m]>
there isn't a libnotify for ocaml, is there
<Armael>
$ opam search inotify
<Armael>
inotify 2.3 Inotify bindings for ocaml.
<Armael>
:thinking:
<Drup>
inotify ≠ libnotify
<Armael>
mm wait my bad, yeah
<Armael>
sorry :D
<Drup>
libnotify is the gtk thingy to make popup-y notifications
<aecepoglu[m]>
when your sarcasm falls on its head
<Armael>
:)
<Drup>
aecepoglu[m]: that being said, use obus to send the messages, it will work perfectly fine
<aecepoglu[m]>
I could also just Unix.exec notify-send somehow
<Drup>
No need to use libnotify, the daemon is already listening to dbus
<aecepoglu[m]>
That is an expressive type. I should be able to use it
<Drup>
(obus would deserve a bit of a spring cleanup, but that's another topic)
FreeBirdLjj has joined #ocaml
Guest7 has joined #ocaml
ziyourenxiang has quit [Ping timeout: 245 seconds]
<high_shoes>
thank you octachron, have a nice day
high_shoes has quit [Remote host closed the connection]
progman has joined #ocaml
progman has quit [Remote host closed the connection]
Guest7 has left #ocaml [#ocaml]
Guest37 has joined #ocaml
Guest37 has left #ocaml [#ocaml]
progman has joined #ocaml
jaar has quit [Ping timeout: 252 seconds]
jerith has joined #ocaml
progman1 has joined #ocaml
progman1 has left #ocaml [#ocaml]
progman1 has joined #ocaml
barockobamo2 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
progman has quit [Remote host closed the connection]
progman has joined #ocaml
progman has quit [Remote host closed the connection]
dmiles has quit [Ping timeout: 245 seconds]
progman1 has quit [Quit: Leaving.]
progman2019 has joined #ocaml
progman2019 has quit [Remote host closed the connection]
progman2019 has joined #ocaml
CcxWrk has joined #ocaml
dmiles has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<aecepoglu[m]>
Drup: so I used 'obus' as you said and it worked out nice. I wish it could have been done without wrapping my functions with Lwt_main though :)
<aecepoglu[m]>
Oh and that I had to use 4.05.0 for it, which didn't get along at all with my vim+merlin setup.
Anarchos has joined #ocaml
<progman2019>
hmmm
<progman2019>
am I in IRC world now?
<Anarchos>
progman2019 yes
<progman2019>
tnx what a fuckin relief
<aecepoglu[m]>
progman2019: difficult journey?
narimiran has quit [Ping timeout: 246 seconds]
narimiran has joined #ocaml
gravicappa has quit [Ping timeout: 245 seconds]
gravicappa has joined #ocaml
Serpent7776 has joined #ocaml
dhil has joined #ocaml
<dmbaturin>
Armael: I've got the .messages to work finally. The only thing I still don't understand is how to refer to actual offending tokens in error messages.
<Drup>
aecepoglu[m]: hmm, I'm pretty sure I compiled obus on something much more recent
<dmbaturin>
Also, it seems like the more I use menhir's macros (separated_nonempty_list etc.), the fewer distinct and useful error states I get in the messages file.
jnavila has joined #ocaml
Guest57946 has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
themsay has quit [Ping timeout: 245 seconds]
themsay has joined #ocaml
themsay has quit [Ping timeout: 268 seconds]
mk__ has joined #ocaml
<mk__>
What is the convention for OCaml modules named 'S'?
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
<octachron>
S is for signature, there are typically the main module type in a given module
Anarchos has joined #ocaml
mk__ has quit [Remote host closed the connection]
themsay has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
mk__ has joined #ocaml
gravicappa has quit [Ping timeout: 245 seconds]
thizanne has joined #ocaml
mk__ has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
sagax has quit [Ping timeout: 252 seconds]
sagax has joined #ocaml
narimiran has quit [Remote host closed the connection]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
Serpent7776 has quit [Quit: leaving]
<aecepoglu[m]>
Drup: At my office computer (ubuntu) the distro comes with camlp4 for v4.05.0 so obus when put inside a v4.07.0 switch can't work. At my home computer (archlinux) I get camlp4 for v4.07.0 from the official repos so obus also works with v4.07.0
Anarchos has joined #ocaml
rgrant has joined #ocaml
rgrant is now known as [rg]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<dmbaturin>
aecepoglu[m]: I just got straight for opam. Distro packages are so behind the time.
aubian has quit [Ping timeout: 252 seconds]
Fardale has quit [Ping timeout: 258 seconds]
aubian has joined #ocaml
Fardale has joined #ocaml
[rg] has quit [Quit: [rg]]
Fardale has quit [Ping timeout: 264 seconds]
aubian has quit [Ping timeout: 264 seconds]
aubian has joined #ocaml
Fardale has joined #ocaml
Guest57946 has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]