companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Tuplanolla has quit [Quit: Leaving.]
<companion_cube> ah well, you can't
<companion_cube> look at the open PR "modular explicit" that would allow it
<companion_cube> (the kind of thing you were talking about in the first place)
hackinghorn has joined #ocaml
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
vicfred has quit [Quit: Leaving]
<d_bot> <EduardoRFS> Yeah I know about explicits, just trying to think differently, still didn't accept that a Tfunctor is not an arrow
vicfred has joined #ocaml
malc_ has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
malc_ has quit [Ping timeout: 260 seconds]
osa1_ has joined #ocaml
osa1 has quit [Ping timeout: 268 seconds]
zebrag has joined #ocaml
nicoo has joined #ocaml
sleepydog has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
curtosis has joined #ocaml
hackinghorn has quit [Quit: Leaving]
<d_bot> <darrenldl> @salt rock lamp do you think `to_rfc3339` should default to smallest number of fractional digits for second that is lossless, or default to 0 fractional digits?
<d_bot> <darrenldl> (seen both in different libs, former seems nicer in terms of ergonomics)
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mxns has quit [Ping timeout: 258 seconds]
zebrag has quit [Quit: Konversation terminated!]
mbuf has joined #ocaml
bjorkintosh has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 252 seconds]
mxns has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
Coldfusion[m] has joined #ocaml
mxns has quit [Ping timeout: 258 seconds]
malc_ has joined #ocaml
wonko7 has joined #ocaml
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
landonf has quit [Excess Flood]
landonf has joined #ocaml
mfp has joined #ocaml
olle has joined #ocaml
vicfred has quit [Quit: Leaving]
gahr has quit [Quit: leaving]
gahr has joined #ocaml
Haudegen has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 246 seconds]
<malc_> octachron: the other day you said "<octachron> Hm, but it can be simplified here. Using < _ arg; .. > is a tad simpler." mind elaborating, i don't understand what you've meant
benc_ has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
osa1_ is now known as osa1
<octachron> malc_, I had updated the gist at the time: notice that the last version is using "val coe: < _ arg; .. > -> ..." rather than `_ arg -> ...`. Moving the ".." at the value declaration means one less type variable in the type declaration.
<malc_> octachron: give me a moment to check it out
<malc_> octachron: aha, thanks, still way over my head :(
<malc_> octachron: turns out that it saves nothing as type arg has to be replicated in the implementation :(
<octachron> Yeah, if the type is used only twice this is not that interesting. This is why I was proposing to use a local type substitution "type _ arg := ..." but they don't work with constrained types.
<malc_> octachron: thanks. and the coe arg can not be class type(d) in any way?
bartholin has joined #ocaml
<octachron> malc_, now that you mention it. Yes, using a class type is an alternative.
<octachron> (I have updated the gist once again to reflect that)
<malc_> octachron: thanks, looking
<malc_> octachron: this results in: https://tpaste.us/ZEBg
benc_ has quit [Remote host closed the connection]
benc_ has joined #ocaml
<malc_> octachron: https://tpaste.us/lERY works, but is in fact 15 lines longer
<octachron> malc_, sorry I was misreading the quantifications on the class type. #arg2 is empty, using _ arg is the way to go.
<malc_> octachron: and in practical terms? what do i have to do to make it work?
<octachron> The class type? Or the type declaration?
mbuf has quit [Quit: Leaving]
benc_ has quit []
<malc_> octachron: class type
<malc_> octachron: even though it's already working here...
<octachron> You would need to add the type parameters to the class type "class type ['a,'b,'c,'d,'e,'f] arg2" in the same was as in the type declaration
<malc_> octachron: i'm confused, give that the last tpaste snippet just works without any type parameters
<malc_> octachron: and by works i mean, compiles and produces working binary
<octachron> Ah sorry, I missed the version that works and the tpaste link is just a diff stat?
<malc_> octachron: whoops.. https://tpaste.us/MQnk
<octachron> Ok, that interface is slightly less general: it doesn't allow the method of the argument to return any subtypes of Config.uioh but only precisely a Config.uioh.
<octachron> In other words, the user may need to do more explicit casts, but yes the interface is simpler to write
<malc_> octachron: i think some background would be useful, the source base is full of "let o = object ..." and those o's are used as an argument to setuioh and whatnot
<octachron> If the slightly more limited type is sufficient, I think it is a good idea to start with that. Note that this is also the case where the type substitution works.
Haudegen has quit [Quit: Bin weg.]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
olle has joined #ocaml
Haudegen has joined #ocaml
mxns has joined #ocaml
jbrown has quit [Quit: Leaving]
mxns has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
jbrown has quit [Ping timeout: 260 seconds]
mro_name has joined #ocaml
olle has quit [Read error: Connection reset by peer]
jbrown has joined #ocaml
olle has joined #ocaml
waleee-cl has joined #ocaml
mro_name has quit [Remote host closed the connection]
<astronavt> @darrenldl: what about `to_rfc3339 ~fractional:false t'
<astronavt> i dont think it matters which one is the default as long as the user can do either/or as desired
<astronavt> or you can do `to_rfc3339` and `to_rfc3339_ns` - the latter being "nanoseconds" as opposed to "seconds" - i've seen this convention in some places e.g. the pandas datetime type of `datetime64[ns]` vs `datetime64[s]`
<astronavt> yet another possibility would be to allow the user to specify a precision, either in terms of seconds, nanoseconds, etc. or a number of decimal places
<astronavt> which would still be easier than manually writing out an "strftime" expression
<astronavt> i suspect that keeping the fractional part by default is a _safer_ default, in that a careless user is less likely to lose information in round-tripping between textual and structured formats
wonko7 has quit [Ping timeout: 260 seconds]
wonko7 has joined #ocaml
mro_name has joined #ocaml
mro_name has quit [Ping timeout: 260 seconds]
<d_bot> <darrenldl> astronavt: right now we have `to_rfc3339 : ?frac_s:int -> Date_time.t -> string`, and `to_rfc3339_milli`, `_micro` and `_nano`
mro_name has joined #ocaml
<astronavt> there you go
<d_bot> <darrenldl> so yeah, a matter of whether the safer default is nicer (current default is 0), which does seem to be
<d_bot> <darrenldl> better to avoid "oh oop, now i need to redo all my export cause i forgot to change default : D" i suppose
<astronavt> one question: do other "rfc3339" parsers in other programming languages handle fractional seconds?
<astronavt> considering that not all languages have parsers specifically for that case and expect you to use strptime
<astronavt> (or something strptime-like)
<d_bot> <darrenldl> they do, but recall some only support up to microsecond precision (so 6 fractional digits), and not sure if they round trip even when within their supported precision
<astronavt> so maybe default to 4 or 6 digits :P
<astronavt> which i think most users would find reasonable subjectively
<d_bot> <darrenldl> hm...
<d_bot> <darrenldl> i'm gonna make it deduce lossless number of digits automatically - if the user never deals with sub microsecond precision timestamps then it'll just be at most 6 digits as a result anyway : D
<d_bot> <darrenldl> now onto leap second...
divyanka has joined #ocaml
mxns has joined #ocaml
jbrown has quit [Quit: Leaving]
jbrown has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
malc_ has joined #ocaml
mro_name has quit [Remote host closed the connection]
mro_name has joined #ocaml
jbrown has quit [Ping timeout: 260 seconds]
mro_name has quit [Ping timeout: 240 seconds]
Haudegen has quit [Quit: Bin weg.]
jbrown has joined #ocaml
tane has joined #ocaml
mro_name has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
mro_name has quit [Ping timeout: 240 seconds]
bartholin has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
mro_name has joined #ocaml
TheLemonMan has joined #ocaml
mxns has quit [Ping timeout: 248 seconds]
Haudegen has joined #ocaml
Geekingfrog has quit [Quit: ZNC 1.8.2 - https://znc.in]
olle has joined #ocaml
Geekingfrog has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
vicfred has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
divyanka has quit [Quit: Connection closed]
Haudegen has quit [Quit: Bin weg.]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Haudegen has joined #ocaml
mro_name has quit [Remote host closed the connection]
mro_name has joined #ocaml
mro_name has quit [Remote host closed the connection]
mro_name has joined #ocaml
vicfred has quit [Quit: Leaving]
mro_name has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
angerman has quit [Ping timeout: 250 seconds]
metadave has quit [Read error: Connection reset by peer]
cbarrett has quit [Ping timeout: 245 seconds]
jeroud has quit [Ping timeout: 245 seconds]
bytesighs has quit [Ping timeout: 258 seconds]
pmonson has quit [Ping timeout: 258 seconds]
adrianbrink has quit [Read error: Connection reset by peer]
adi__________ has quit [Read error: Connection reset by peer]
conjunctive has quit [Ping timeout: 258 seconds]
higherorder__ has quit [Ping timeout: 260 seconds]
rfv has quit [Ping timeout: 260 seconds]
chewbranca has quit [Ping timeout: 248 seconds]
jeroud has joined #ocaml
metadave has joined #ocaml
terabit has quit [Ping timeout: 246 seconds]
caasih has quit [Ping timeout: 246 seconds]
adi__________ has joined #ocaml
wildsebastian has quit [Ping timeout: 245 seconds]
adrianbrink has joined #ocaml
angerman has joined #ocaml
b20n has quit [Ping timeout: 246 seconds]
stephe has quit [Ping timeout: 260 seconds]
b20n has joined #ocaml
cbarrett has joined #ocaml
rfv has joined #ocaml
higherorder__ has joined #ocaml
wildsebastian has joined #ocaml
conjunctive has joined #ocaml
caasih has joined #ocaml
bytesighs has joined #ocaml
stephe has joined #ocaml
pmonson has joined #ocaml
chewbranca has joined #ocaml
terabit has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
malc_ has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Leaving]
st8less has joined #ocaml
<d_bot> <sgrove> @dinosaure Do you know if ocaml-tar supports creating tar files in memory via the cstruct backend? I'm having a difficult time finding any examples
<d_bot> <sgrove> Figured it's the sort of thing you tend to know about
<d_bot> <dinosaure> Hmmhm I can not really help you :( I don't have enough time to look into this old projects, sorry :/
<d_bot> <sgrove> No worries!
st8less has quit [Ping timeout: 260 seconds]
st8less has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
vicfred has joined #ocaml
<Tardigreat[m]> is delimcc the go-to library if you want reset/shift?
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Haudegen has quit [Ping timeout: 240 seconds]
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 265 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml