adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
jao has joined #ocaml
copy` has joined #ocaml
copy` has quit [Changing host]
copy` has joined #ocaml
agravier has quit [Excess Flood]
whoman has quit [Remote host closed the connection]
agravier has joined #ocaml
moei has quit [Quit: Leaving...]
_whitelogger has joined #ocaml
KeyJoo has quit [Ping timeout: 255 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
silver has quit [Read error: Connection reset by peer]
moei has joined #ocaml
ansiwen has quit [Ping timeout: 240 seconds]
kamog has quit [Remote host closed the connection]
ansiwen has joined #ocaml
infinity0 has joined #ocaml
ziyourenxiang has joined #ocaml
shinnya has quit [Quit: ZNC - http://znc.in]
shinnya has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
justicefries has left #ocaml [#ocaml]
ygrek__ has joined #ocaml
ansiwen has quit [Ping timeout: 260 seconds]
agravier has quit [Quit: agravier]
ansiwen has joined #ocaml
pierpa has quit [Quit: Page closed]
oschwald has quit [Ping timeout: 255 seconds]
segmond has joined #ocaml
alexelcu has joined #ocaml
seangrove has quit [Ping timeout: 255 seconds]
copy` has quit [Quit: Connection closed for inactivity]
olibjerd has joined #ocaml
seangrove has joined #ocaml
<qmm> Foo ::= sum (Bar) | sub (Bar; Bar) | Foo ; Foo <-- does anyone understand what this is?
nore has quit [Quit: WeeChat 1.8]
FreeBirdLjj has joined #ocaml
nore has joined #ocaml
_whitelogger has joined #ocaml
govg has joined #ocaml
madroach has joined #ocaml
<companion_cube> qmm: this looks like a description of a grammar
dtornabene has joined #ocaml
raphaelss has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
ziyourenxiang has quit [Ping timeout: 245 seconds]
govg has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ocaml
govg has joined #ocaml
kakadu has joined #ocaml
jnavila has joined #ocaml
ansiwen has quit [Ping timeout: 240 seconds]
ygrek__ has quit [Ping timeout: 260 seconds]
ansiwen has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
raphaelss has joined #ocaml
cbot_ has quit [Quit: Leaving]
Harzilein has quit [Ping timeout: 240 seconds]
kmerz has quit [Read error: Connection reset by peer]
kmerz has joined #ocaml
hashpuppy has quit [Quit: Connection closed for inactivity]
kmerz has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 255 seconds]
raphaelss has quit [Ping timeout: 240 seconds]
dtornabene has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
dtornabene has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
govg has joined #ocaml
ontologiae has joined #ocaml
kakadu has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
raphaelss has joined #ocaml
seangrove has joined #ocaml
rpg has joined #ocaml
andreas_ has joined #ocaml
johnelse_ has quit [Ping timeout: 258 seconds]
rpg has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 268 seconds]
ziyourenxiang has joined #ocaml
olibjerd has quit [Ping timeout: 260 seconds]
agravier has joined #ocaml
dtornabene has quit [Read error: Connection reset by peer]
dtornabene has joined #ocaml
johnelse has joined #ocaml
oschwald has joined #ocaml
ncthom91 has joined #ocaml
agravier has quit [Quit: agravier]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
hashpuppy has joined #ocaml
jao has joined #ocaml
dtornabene has quit [Remote host closed the connection]
dtornabene has joined #ocaml
<jerith> Leonidas: Ping?
<Leonidas> jerith: pong.
<jerith> Leonidas: I finally updated that PR that I said I would do a week ago. :-P
<Leonidas> saw the email notification about your PR, will look at it today.
<Leonidas> thanks :)
<jerith> But what I wanted to talk about, if you have some time, is file uploads.
<Leonidas> in an hour or so?
<jerith> Sure, I'll be around then. Just ping me when you're free.
<Leonidas> i just returned from an ill-advised bike ride in the rain, so I'd love to dry a little bit ;)
<jerith> The context is that I'm tired of clicking on a bunch of buttons and menu items to make a snippet out of a diff or a script or whatever, so I'm writing a little slackobot module to do it from the command line.
agravier has joined #ocaml
govg has joined #ocaml
KeyJoo has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
<Leonidas> jerith: Ok, I'm happy to merge #20 now, unless you have something you want to push on top of this
<jerith> Nope, #20 is good to go.
dtornabene has quit [Read error: Connection reset by peer]
<jerith> Then I'll merge master into #14, reactivate the remaining tests, and #14 will be more or less good to go.
dtornabene has joined #ocaml
<jerith> I was thinking we could merge #14 sooner rather than later and open a new PR for the next batch of tests.
<Leonidas> jerith: agreed!
<Leonidas> jerith: #20 is merged
govg has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 255 seconds]
<Leonidas> jerith: oh wow, it broke on travis. Software is hard -__-
<Leonidas> it's travis' fault too.
<jerith> Did you restart the job?
<jerith> (If not, Travis is hiding the broken one from me.)
<Leonidas> jerith: yes. Since it is a connection failure, I've restarted it.
<jerith> Cool.
<Leonidas> there we go, all green
<jerith> Just in time for my updates to #14. :-)
<jerith> So, the file upload thing I wanted to talk about.
<jerith> As with all things slack, it's more complicated than it at first appears.
<jerith> https://api.slack.com/methods/files.upload documents both a 'file' parameter and a 'content' parameter.
<Leonidas> yep, one of them seems to be required
<jerith> 'file' requires 'Content-Type: multipart/form-data' and all the MIME horribleness, but lets you upload things like images or whatever.
<Leonidas> (as always great API design, one is required but both optional)
<Leonidas> jerith: content does not?
<jerith> 'content' requires 'Content-Type: application/x-www-form-urlencoded' and a URL-encoded "content" POST variable in the body.
<jerith> The idea seems to be that you'd use 'content' for snippets and posts (which are basically text) and 'file' for everything else.
<Leonidas> jerith: yeah, seems that in the file case it tries to infer whether it is editable
<Leonidas> jerith: I suppose we'd need to support both since neither is really a superset of the other.
<jerith> In my experimentation, a filename is required in the form-data part of the 'file' thing, which makes it annoying to use for snippets where you often want the filename to be provided based on the filetype.
<jerith> Also, cohttp doesn't provide helpers for the header and body things that needs.
<Leonidas> jerith: you mean for creating multipart/form-data?
<jerith> Yes.
olibjerd has joined #ocaml
<jerith> Also, you probably want to be able to use a stream or something for that if you're uploading big files.
<jerith> (Where "big" mostly means "we don't want to potentially have multiple copies of this in memory".)
<Leonidas> yes, something like Lwt_stream.t
<Leonidas> just looked at the current files_upload signature and it's basically "screw you"
<jerith> It kind of makes sense for Slacko.files_upload to accept a Cohttp_lwt_body for the "file content", but in my hacking this afternoon I ended up turning that into a string or Lwt_stream.t depending on whether I was using 'content' or 'file'.
<Leonidas> jerith: I think by the time it was written, there was only one possibility
<jerith> But it would be better to explicitly have that be some kind of "file upload" type.
<Leonidas> jerith: I think it should just take the input as whatever stream type we decide upon (Lwt_stream.of_string can also be used) and then present an option to pick between file and content
<jerith> (In slackobot, I already have a "message" type that holds the text and an optional list of attachements so I can separate building a message from sending it.)
<Leonidas> ~method:`File/`Content or something like this I would imagine.
<jerith> We want Lwt_stream.of_list with a list of string(s). Lwt_strem.of_string returns a stream of chars. :-P
<Leonidas> ok, yeah, that's most likely what we want :-)
<jerith> Maybe [`File of string Lwt_stream.t | `Content of string]?
<jerith> Although the `File option is likely an image or something.
<Leonidas> and ?channels:string is also awful, should be a `chat list` probably
<Leonidas> jerith: is there a case where you'd want to post a large `Content?
<jerith> You can very conveniently provide channel names as well.
dtornabene has quit [Remote host closed the connection]
<Leonidas> where using a string would be problematic?
dtornabene has joined #ocaml
<jerith> The docs say there's a limit of 1MB for snippets, which I'm assuming is 'content'.
<Leonidas> if not, then your proposal sounds very good to me.
<Leonidas> 1MB is ok for a string :D
<Leonidas> The other concern is whether this should be `Content of bytes
<Leonidas> also, can you post only to channels using this API? What about conversations with users?
<jerith> It needs to be URL-encoded, and is kind of assumed to be text.
<Leonidas> good, then string is fine.
MK__ has joined #ocaml
<jerith> The 'channels' param seems to be just for channels, but I haven't tested that.
<Leonidas> jerith: #14 built successfully, I'd merge that now.
<jerith> I guess you're supposed to "share" the file after uploading it in other cases.
<jerith> Leonidas: Merging #14 sounds good to me. :-)
<MK__> How is it possible to define a cstruct for a variable-length UDP payload?
slash^ has joined #ocaml
<Leonidas> jerith: I could totally see this working for other cases as well, if you specify another type of ID there
<octachron> MK__, write the cstruct without the payload field and write manually the getter/setter pair for the payload?
slash^ has quit [Remote host closed the connection]
slash^ has joined #ocaml
<MK__> octachron: Yes, looks like that is a reasonable trick, I was looking at some tcp/udp stack implementation and it uses similar technique
<MK__> Problem was, I was using lwt_cstruct for reading/writing udp data
average has quit [Ping timeout: 245 seconds]
<MK__> which accepts a cstruct as argument
<MK__> I may need to use another library
average has joined #ocaml
johnelse has quit [Ping timeout: 272 seconds]
malc_ has joined #ocaml
jlam_ has quit [Ping timeout: 246 seconds]
jlam__ has joined #ocaml
jlam_ has joined #ocaml
jlam__ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
zv has quit [Ping timeout: 268 seconds]
johnelse has joined #ocaml
ski has joined #ocaml
argent_smith has joined #ocaml
jao has joined #ocaml
dtornabene has quit [Remote host closed the connection]
dtornabene has joined #ocaml
madroach has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
KeyJoo has joined #ocaml
MK__ has quit [Remote host closed the connection]
zv has joined #ocaml
kamog has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
jlam has quit [Quit: Leaving]
jlam has joined #ocaml
ygrek__ has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
jlam has quit [Read error: Connection reset by peer]
jlam has joined #ocaml
SpiceGuid has joined #ocaml
tane has joined #ocaml
shortCircuit__ has joined #ocaml
oschwald has quit [Ping timeout: 255 seconds]
slash^ has quit [Read error: Connection reset by peer]
kakadu has joined #ocaml
mengu has joined #ocaml
shinnya has joined #ocaml
shortCircuit__ has quit [Ping timeout: 260 seconds]
jlam_ has joined #ocaml
jlam_ is now known as jlam
jlam is now known as Guest30253
TheLemonMan has joined #ocaml
olibjerd has quit [Quit: olibjerd]
argent_smith has quit [Quit: Leaving.]
shortCircuit__ has joined #ocaml
jlam_ has joined #ocaml
jacobian has joined #ocaml
<jacobian> Is there an exhaustive case-split in merlin-emacs
<jacobian> that magically looks up the constructors and makes the appropriate match with holes?
<flux> hmm, I think there is?
<Drup> jacobian: merlin-destruct
<Drup> it's not bound to any shortcut though. I use M-x M-d
<Drup> s/M/C/
MercurialAlchemi has quit [Ping timeout: 240 seconds]
oschwald has joined #ocaml
jlam_ has quit [Quit: Leaving]
shortCircuit__ has quit [Ping timeout: 260 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jlam has joined #ocaml
Guest30253 has quit [Ping timeout: 255 seconds]
seangrove has quit [Ping timeout: 260 seconds]
jlam_ has joined #ocaml
ygrek__ has quit [Ping timeout: 255 seconds]
jlam has quit [Ping timeout: 268 seconds]
dmbaturin_ has joined #ocaml
Ptival_ has joined #ocaml
oschwald has left #ocaml [#ocaml]
<hashpuppy> i see utop has autosuggest on the bottom. is there (1) a way to get that working with tab completion? and (2) a way to press something similar to enter and have it use the highlighted value
iZsh has joined #ocaml
mfp has quit [*.net *.split]
iZsh_ has quit [*.net *.split]
andreypopp has quit [*.net *.split]
rfv has quit [*.net *.split]
yetanotherion[m] has quit [*.net *.split]
M-martinklepsch has quit [*.net *.split]
srenatus[m] has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
Ptival has quit [*.net *.split]
rpip has quit [*.net *.split]
jmct has quit [*.net *.split]
hdnc2_ has quit [*.net *.split]
chenglou has quit [*.net *.split]
stephe has quit [*.net *.split]
yminsky has quit [*.net *.split]
metadave has quit [*.net *.split]
<Drup> utop uses rather baroque shortcuts. It's alt arrow to navigate and alt down to complete.
srenatus[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
M-martinklepsch has joined #ocaml
andreypopp has joined #ocaml
chenglou has joined #ocaml
hdnc2_ has joined #ocaml
jmct has joined #ocaml
stephe has joined #ocaml
mfp has joined #ocaml
yminsky has joined #ocaml
metadave has joined #ocaml
<Drup> well, alt down to use* compilation up to first ambiguity is still tab
jack5638 has quit [Ping timeout: 240 seconds]
mars0i[m] has quit [Ping timeout: 240 seconds]
jlam has joined #ocaml
tcc[m] has quit [Ping timeout: 240 seconds]
regnat[m] has quit [Ping timeout: 240 seconds]
M-jimt has quit [Ping timeout: 240 seconds]
isaachodes[m] has quit [Ping timeout: 264 seconds]
M-Illandan has quit [Ping timeout: 246 seconds]
Bluddy[m] has quit [Ping timeout: 255 seconds]
yetanotherion[m] has quit [Ping timeout: 272 seconds]
M-martinklepsch has quit [Ping timeout: 272 seconds]
srenatus[m] has quit [Ping timeout: 272 seconds]
rfv has joined #ocaml
smondet[m] has quit [Ping timeout: 240 seconds]
rpip has joined #ocaml
orbifx[m] has quit [Ping timeout: 258 seconds]
timclassic has quit [Ping timeout: 276 seconds]
ktosiek[m] has quit [Ping timeout: 255 seconds]
aspiwack[m] has quit [Ping timeout: 276 seconds]
hpd_m has quit [Ping timeout: 276 seconds]
<hashpuppy> Drup: thanks a bunch
SpiceGuid_ has joined #ocaml
SpiceGuid has quit [Ping timeout: 240 seconds]
seangrove has joined #ocaml
SpiceGuid_ is now known as SpiceGuid
jack5638 has joined #ocaml
tane has quit [Quit: Leaving]
<jacobian> <Drup> jacobian: merlin-destruct
<jacobian> Thanks!
ktosiek[m] has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
aspiwack[m] has joined #ocaml
timclassic has joined #ocaml
srenatus[m] has joined #ocaml
M-Illandan has joined #ocaml
M-jimt has joined #ocaml
M-martinklepsch has joined #ocaml
smondet[m] has joined #ocaml
hpd_m has joined #ocaml
isaachodes[m] has joined #ocaml
tcc[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
mars0i[m] has joined #ocaml
regnat[m] has joined #ocaml
orbifx[m] has joined #ocaml
Bluddy[m] has joined #ocaml
jnavila has quit [Remote host closed the connection]
spew has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
kamog has quit [Ping timeout: 240 seconds]
dtornabene has quit [Read error: Connection reset by peer]
jacobian has quit [Ping timeout: 260 seconds]
rpg_ has joined #ocaml
FreeBirdLjj has joined #ocaml
spew has quit [Ping timeout: 240 seconds]
jacobian has joined #ocaml
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
dmbaturin_ is now known as dmbaturin
jao has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.46/20161213183751]]
jao has quit [Ping timeout: 255 seconds]
jacobian has quit [Ping timeout: 255 seconds]
KeyJoo has quit [Ping timeout: 255 seconds]
jacobian has joined #ocaml
kamog has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
rpg_ has quit [Ping timeout: 240 seconds]
kakadu has quit [Remote host closed the connection]