adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
sz0 has joined #ocaml
yegods has quit [Remote host closed the connection]
bobry has quit [Quit: Connection closed for inactivity]
badon has quit [Ping timeout: 246 seconds]
badon has joined #ocaml
seangrove has joined #ocaml
yegods has joined #ocaml
Algebr`` has quit [Ping timeout: 248 seconds]
pierpa has joined #ocaml
Vintila has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
therac25 has joined #ocaml
mysiticity has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
zv has joined #ocaml
thomasga has quit [Quit: Leaving.]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
thomasga has joined #ocaml
<please_help> Trying to add a form to a page with ocsigen. Examples looks like what I'm trying to do but I get the error: "this expression has type 'a -> [> Html5_types.form] elt but an expression was expected of type [< Html5_types.div_content_fun ] elt". Reduced example is: "let make_it s = div ~a:[a_class ["test"]] [Form.post_form ~service:s (fun (name) -> [pcdata "hello"; Form.input ~name:name ~input_type:`Text Form.string])]"
<please_help> Form is a valid field inside div so that shouldn't be the issue.
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Druup> You are missing an argument
<Druup> Form.post_form tkaes the service, the function and the get parameters
<Druup> So you need () at least, if you have no get parameters
<Druup> (If you look closely at the two types in the error message, you can see that one is a function and the other is not)
Druup is now known as Drup
hnagamin has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 240 seconds]
therac25 has quit [Quit: therac25]
<seangrove> Is there a way to have a positional, optional argument?
therac25 has joined #ocaml
<Drup> a nonlabeled optional argument ? no
<seangrove> Thanks!
<Drup> I like this kind of question, it's easy to answer :D
<seangrove> Drup: Just to make sure I understand, `let el tag ?props ?children = ...`, I'd like to be able to invoke el either as `el img`, `el 'div' {className = 'bla'}`, or `el 'div' {className = 'bla'} [(el 'div')]`
<Drup> That won't work
<seangrove> Got it, just making sure!
<Drup> read that section
<Drup> (This is the kind of situation where the official manual gives the right level of details)
hxegon has quit [Quit: BRB]
thomasga has quit [Quit: Leaving.]
therac25 has quit [Quit: therac25]
<jyc> is there any way to bake in the -I flag for utop at compile-time?
<aantron> mrvn: i understand about wrapping the function. what i meant with the signature is you could make one signature with a type constructor (like you had before with PolymorphicExternal), then for the named signature you added to your code, it could look like "module type Make = PolymorphicExternal with type 'a e := .... whatever you need", and then you could reference those signatures
<aantron> it would save you 2 lines :)
yunxing has quit [Remote host closed the connection]
mysiticity has quit [Read error: Connection reset by peer]
mysiticity has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
yegods has quit []
struk|desk|away is now known as struk|desk2
<jyc> is there a good way to build myself a custom toplevel including that has some libraries linked in?
<jyc> I'm trying to write some short scripts, but it looks like -init doesn't work with script mode
<Drup> ocamlmktop
<Drup> (which is a bash script, btw, you can look at the sources, it's quite trivial)
<please_help> With ocsigen, if I have a post_coservice applied to a service that uses path suffix (thus, get parameters), I need to preapply the get arguments to the coservice (or dump them), and declare the parameter types to be Eliom_parameter.list rather than e.g. pair, is that right?
<seangrove> Drup: Is there something I can add in here https://github.com/sgrove/microscope/blob/master/src/.merlin to get merlin to support jsoo's `Html.window##.location##.href` ## syntax? Right now it complains: Error: '##.' is not a valid value identifier.
<Drup> seangrove: just need to add PKG js_of_ocaml.ppx
<Drup> (why are people surprised that merlin just works with ppx ? :D)
<Drup> please_help: I'm sorry, I'm a bit rusty with the service system, if you can't figure it out, just send an email to the mailing list
<seangrove> Drup: As always, thank
<seangrove> (s)
shinnya has quit [Ping timeout: 244 seconds]
yunxing has joined #ocaml
yunxing has quit [Ping timeout: 246 seconds]
therac25 has joined #ocaml
therac25 has quit [Client Quit]
therac25 has joined #ocaml
therac25 has quit [Client Quit]
<Vintila> Is there a way to avoid repeating the type signatures in the implementation of a module when they are defined in the sig?
hxegon has joined #ocaml
<please_help> vintila: what do you mean?
<Vintila> Well say I define a module signature M with a type t and some functions that work with that type, It seems like I need to repeat the type definition in the module implementation
oxcsh_ has quit [Remote host closed the connection]
oxcsh has joined #ocaml
<jyc> Drup: thanks for the tip!
<jyc> is there something in particular I have to do to get ppx extensions like ppx_deriving_yojson to work in custom top-levels?
<jyc> If I enter something like type t = { x : int} [@@deriving yojson], I don't get any errors, but I don't get functions defined
<jyc> In fact, it seems like I can even do [@@ojifjwo], everything is just ignored
johnelse has quit [Ping timeout: 244 seconds]
rwmjones_hols has quit [Ping timeout: 244 seconds]
seangrove has quit [Ping timeout: 268 seconds]
johnelse has joined #ocaml
whitequark has joined #ocaml
<whitequark> the distinction between Makefile and Makefile.nt in the ocaml buildsystem is stupid.
atsampso1 has quit [Ping timeout: 264 seconds]
atsampson has joined #ocaml
rwmjones has joined #ocaml
struk|desk2 is now known as struk|desk|away
pierpa has quit [Ping timeout: 240 seconds]
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
oxcsh has quit [Remote host closed the connection]
hxegon has quit [Quit: BRB]
<please_help> Is there a way to know how many (name) parameters a service attached to a form receives? It seems to me that it's impossible to destructure the deep pairs without at least that information.
IbnFirnas has joined #ocaml
xaimus has quit [Remote host closed the connection]
<please_help> Nevermind, it seems to me like it's impossible to iteratively destructure the tuple at all. So it's not possible to write a function that dynamically generates forms based on a list of parameter, for example.
tennix has quit [Ping timeout: 264 seconds]
<please_help> As an alternative, is it possible to convert strings to Eliom_parameter.param_name?
gustav___ has quit [Ping timeout: 244 seconds]
gustav___ has joined #ocaml
Vintila has quit [Ping timeout: 244 seconds]
deko-pyon has quit [Quit: restart]
struk|desk|away is now known as struk|desk2
apluke has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
deko-pyon has joined #ocaml
<please_help> I've been trying for the past 30 minutes to find the raw_input, etc. that is referenced in one of the links. I can't find a single existing version of these; not in Html5.F, not in Html5.D, or the Raw modules of these modules. The only reference that points to a module that might still exist beside that is the functor mkforms but I don't know if there's a class applied to it somewhere. What happened to the raw_* and why are
<please_help> they completely gone?
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
apluke has quit [Ping timeout: 248 seconds]
xaimus has joined #ocaml
keep_learning has joined #ocaml
struk|desk2 is now known as struk|desk|away
oxcsh has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
slash^ has joined #ocaml
oxcsh has quit [Remote host closed the connection]
yunxing has joined #ocaml
govg has joined #ocaml
govg is now known as Guest27423
FreeBirdLjj has joined #ocaml
ggole has joined #ocaml
therac25 has joined #ocaml
ggole_ has joined #ocaml
oxcsh has joined #ocaml
ggole has quit [Ping timeout: 244 seconds]
oxcsh has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
therac25 has quit [Quit: therac25]
hxegon has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
yunxing has quit [Remote host closed the connection]
ggole__ has joined #ocaml
nuuit has joined #ocaml
therac25 has joined #ocaml
ggole_ has quit [Ping timeout: 248 seconds]
malc_ has joined #ocaml
FreeBirdLjj has joined #ocaml
Simn has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
manizzle has quit [Ping timeout: 250 seconds]
manizzle has joined #ocaml
tane has quit [Quit: Verlassend]
larhat has joined #ocaml
hxegon has quit [Quit: BRB]
tane has joined #ocaml
yunxing has joined #ocaml
apache2_ has joined #ocaml
yunxing has quit [Ping timeout: 268 seconds]
bbc has quit [Ping timeout: 246 seconds]
Maxdamantus has quit [Ping timeout: 246 seconds]
bbc has joined #ocaml
TheAuGingembre has quit [Ping timeout: 246 seconds]
jpdeplaix1 has quit [Ping timeout: 246 seconds]
polaron has quit [Ping timeout: 246 seconds]
jpdeplaix2 has joined #ocaml
octopus1 has joined #ocaml
theo has joined #ocaml
fraggle_ has quit [Ping timeout: 246 seconds]
apache2 has quit [Ping timeout: 246 seconds]
Maxdamantus has joined #ocaml
fraggle_ has joined #ocaml
orbifx1 has joined #ocaml
larhat has quit [Quit: Leaving.]
Guest27423 has quit [Quit: leaving]
govg has joined #ocaml
BitPuffin|osx has joined #ocaml
govg is now known as Guest68598
Guest68598 has quit [Client Quit]
govg_ has joined #ocaml
govg_ has quit [Client Quit]
govg has joined #ocaml
govg is now known as Guest44372
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
yomimono has joined #ocaml
Guest44372 has quit [Quit: leaving]
govg_ has joined #ocaml
therac25 has quit [Quit: therac25]
govg_ is now known as govg
mettekou has joined #ocaml
govg has quit [Quit: leaving]
govg has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
govg has quit [Quit: leaving]
govg has joined #ocaml
mettekou has joined #ocaml
Anarchos has joined #ocaml
silver has joined #ocaml
oxcsh has joined #ocaml
oxcsh has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 268 seconds]
silver has quit [Quit: rakede]
silver has joined #ocaml
orbifx1 has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
zv has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 244 seconds]
darkf has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 246 seconds]
Reventlov has quit [Ping timeout: 276 seconds]
Reventlov has joined #ocaml
<Nazral> I have trouble understanding how to use Str.matched_group
<flux> nazral, I don't recall how to use it, but personally I would look outside the standard library for pattern matching needs
<Nazral> well, it's really one fairly simple use so I didn't want to go that way but yes, I might have too
IbnFirnas has quit [Quit: Connection closed for inactivity]
<flux> I've used the pcre package to great effect, but I hear the re package or possibly the wrapper human-re to it might be great alternatives
<flux> nazral, so what's your problem with Str.matched_group?
<flux> it seems pretty simple according to the documentation :)
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Nazral> (I want to match c_[0-9]+_[0-9]+ and send it to int
<Nazral> int*int
<Nazral> say I have let str = "c_1_0" I want to get (1,0)
julien_t has joined #ocaml
<flux> so first you need to have groups
<flux> let re = Str.regexp "c_\\([0-9]+\\)_\\([0-9]+\\)"
<Nazral> ahhh so you need to double escape
<flux> well, the ocaml compiler will tell you if you use \(
mettekou has joined #ocaml
<flux> because that's an invalid string escape sequence
<Nazral> I used \( and it was indeed wrong but I didn't think of double escaping
<Nazral> ok
<Nazral> also my problem is that I have to use, for example search_forward without actually using the output, is it ok to do Str.search_forward r s |> ignore; ?
<flux> yes
<Nazral> ok perfect, it works now thanks
<flux> you can also this syntax to avoid double quoting: {re|c_\([0-9]+\)_\([0-9]+\)|re}
<flux> re is an arbitrarily chosen sequence
<flux> well, could just be {||} apparently, I hadn't noticed that before :)
<Nazral> indeed
<Nazral> thanks !
<flux> happy matching :)
FreeBirdLjj has quit [Remote host closed the connection]
Haudegen has joined #ocaml
larhat has joined #ocaml
cic has quit [Quit: WeeChat 1.3]
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheLemonMan has joined #ocaml
mysiticity has quit [Ping timeout: 252 seconds]
mysiticity has joined #ocaml
nicholasf has joined #ocaml
Khady_ is now known as Khady
SHODAN has quit [Remote host closed the connection]
SHODAN has joined #ocaml
thomasga has joined #ocaml
jgjl has joined #ocaml
larhat has quit [Quit: Leaving.]
hexhaxtron has joined #ocaml
<hexhaxtron> Any solution for this? opam: "tcgetattr" failed: Inappropriate ioctl for device
Anarchos has quit [Ping timeout: 276 seconds]
<flux> well, is it a tty?
<flux> or how is that a problem. does it crash?
sternenseemann has left #ocaml [#ocaml]
yunxing has joined #ocaml
mettekou has joined #ocaml
jgjl_ has joined #ocaml
thomasga1 has joined #ocaml
yunxing has quit [Ping timeout: 264 seconds]
thomasga has quit [Ping timeout: 244 seconds]
jgjl has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
jgjl has joined #ocaml
nicholasf has quit [Remote host closed the connection]
foocraft has joined #ocaml
foocraft has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
jgjl_ has quit [Ping timeout: 268 seconds]
thomasga1 has quit [Ping timeout: 276 seconds]
foocraft has quit [Remote host closed the connection]
thomasga has quit [Ping timeout: 250 seconds]
foocraft has joined #ocaml
jgjl has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
oxcsh has joined #ocaml
foocraft has quit [Remote host closed the connection]
foocraft has joined #ocaml
foocraft has joined #ocaml
<orbitz> Is there any way to convert a [Unix.file_descr] to an int?
martintrojer has quit [Ping timeout: 248 seconds]
<flux> yes, C or Obj.magic
<flux> (or %identity)
<orbitz> That kinda sucks. Weird that the Unix module hides that a file_descr is just an int ha
<mrvn> orbitz: only on unix, windows FDs aren't ints
jgjl has joined #ocaml
<flux> if you're going to use the ints, chances are you're doing something platform-specific anyway
<orbitz> mrvn: Yes, and the modules is caleld Unix
<hexhaxtron> flux: actually that happens in a for loop such as: while read pkg; do yes|opam install "$pkg"; echo "$pkg" >> opam.last;done < opam
<hexhaxtron> flux: the file 'opam' contains 990 packages.
<mrvn> orbitz: no. the Unix modul exists on windows too
<flux> hexhaxtron, how about using the opam switch export -format instead?-)
<flux> though I think it's an interesting issue that opam doesn't really work without a tty?
<orbitz> flux: opam does a lot of weird cutsie things
<orbitz> mrvn: that's odd
<flux> hexhaxtron, have you considered using the -y -siwtch?
<flux> hexhaxtron, and third, you should install them in one go unless you have special requirements
<flux> hexhaxtron, and have exportOPAM_JOBS=$number_of_cpu_cores before that
<flux> hexhaxtron, then opam does all the stuff efficiently and produces a nice report what it has and hasn't done afterwards
<flux> (afterwards, now that's a nice word to write)
<hexhaxtron> flux: -y seems to do the trick, thanks!
<flux> hexhaxtron, you get points for using 'yes', however ;-)
jgjl has quit [Ping timeout: 276 seconds]
govg has quit [Quit: leaving]
Vintila has joined #ocaml
fs4lv1n1 has joined #ocaml
jgjl has joined #ocaml
mettekou has joined #ocaml
jgjl_ has joined #ocaml
jgjl has quit [Ping timeout: 240 seconds]
jgjl_ has quit [Client Quit]
<mrvn> In this code (http://paste.debian.net/414778/) when should app and win become unreachable and can be removed by the GC? After line 11 or after line 15?
jgjl has joined #ocaml
<ggole__> I think the story is that a value is collectible at the next safe point (function call or allocation) at which it is dead
<mrvn> but is it dead when it is no used later in the scope or only at the end of the scope?
<ggole__> The former
<pierpa> it is dead when there are no later uses
oxcsh has quit [Remote host closed the connection]
<ggole__> Bytecode *might* be different... I should test that some time
ggole__ is now known as ggole
<Drup> please_help: raw_input is the normal input now
<Drup> and the special inputs were moved to Form.
oxcsh has joined #ocaml
silver has quit [Quit: rakede]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
foocraft has quit [Ping timeout: 248 seconds]
aaronelkins has joined #ocaml
Vintila has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
<Anarchos> aantron Did you work on oml ?
oxcsh has quit [Remote host closed the connection]
aaronelkins has left #ocaml [#ocaml]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mysiticity has quit [Quit: WeeChat 1.4]
keep_learning has quit [Quit: This computer has gone to sleep]
oxcsh has joined #ocaml
oxcsh has quit [Remote host closed the connection]
aaronelkins has joined #ocaml
struk|desk|away is now known as struk|desk2
FreeBirdLjj has joined #ocaml
Anarchos has quit [Remote host closed the connection]
aaronelkins has quit [Ping timeout: 276 seconds]
aaronelkins has joined #ocaml
jgjl has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
Anarchos has joined #ocaml
NingaLeaf has quit [Quit: Leaving]
oxcsh has joined #ocaml
NingaLeaf has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
oxcsh has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jgjl has quit [Ping timeout: 248 seconds]
jgjl has joined #ocaml
riaqn has joined #ocaml
<riaqn> Hello, how can I match all remaining cases? i.e. 'ELSE'
struk|desk2 is now known as struk|desk|away
<companion_cube> _ -> ... ?
<riaqn> companion_cube: https://bpaste.net/show/377b1198eaaf then it told me that it's not exhaustive and some case is unused.
<pierpa> the indentation is wrong
<pierpa> and it is confusing you
aaronelkins has quit [Quit: aaronelkins]
<zozozo> riaqn: enclose the inner match with a begin ... end
<zozozo> else the last case is considered as a patterfor the inner 'match'
<pierpa> the last line belongs to the inner match
<please_help> drup: I see... but the last reference to the normal input I see has been removed as of 5.0
<riaqn> zozozo: thanks, I 've solved it.
<riaqn> The problem is that my editor does recognize _ -> as the end of pattern match, and keeps making the outer _-> inner indented.
<Drup> please_help: You sure ? it's just through tyxml's usual things
<riaqn> so I manually indent the outer _->, and maybe that's the problem. tabs and spaces, etc.
<zozozo> riaqn: you can use ocp-indent to have correct indentation for ocaml
<riaqn> zozozo: thanks, will try.
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sorella has joined #ocaml
jgjl has joined #ocaml
<mrvn> C stubs returning void or unaligned C pointers are completly broken in ocaml: https://github.com/mrvn/ocam-problems/tree/false-exception
struk|desk|away is now known as struk|desk2
<please_help> Drup: the only reference I see for input in the value index for tyxml is in Html5_sigs.T, and it doesn't seem to be the right type at first sight (moreover I can't tell which module uses this signature).
NingaLeaf has quit [Quit: Textual IRC Client: www.textualapp.com]
<aantron> Anarchos: no, why?
<Drup> please_help: D and F use this signature
<Drup> and it really should be the same as Raw used to be
<Drup> Just remove the Raw and it will have the same behavior as before
dhil has joined #ocaml
<Drup> The only exception is "a"
<Drup> (which still has a raw version)
<please_help> Well, it's completely different from previous interfaces, but I'll see if it works.
tane has quit [Quit: Verlassend]
<Drup> please_help: wait, are you talking about raw_input or Raw.input ?
NingaLeaf has joined #ocaml
sh0t has joined #ocaml
<please_help> I'm talking about the input field that is supposed to take a string as a name, as well as value and input_type parameters
<please_help> the thing that was supposed to be raw_input at least
<please_help> although it was also supposed to be Html5.D.input until 4.0
<Drup> Hum, I'm not sure what we made of that one, You might have a better answer on the mailing list, vasilis did that change
NingaLeaf has quit [Client Quit]
<Drup> But the new input should be sufficient/equivalent, with the right attributes
<please_help> As long as I have access to something that generates <input> and <textarea> fields and its interface while taking a plain string for the name, I'm good to go.
<please_help> the input you pointed me to I can't find the reference for.
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> D.input / F.input ?
<please_help> as for the new input that uses [< string setoneradio] bla, there is no string [+ other info] -> that format converter, and because names are given in nested pairs instead of a list of variants, it's not usable without knowing at programing-time the exact shape of names.
NingaLeaf has joined #ocaml
<please_help> yeah, D.input/F.input are the ones I can't find the reference for. The value index only points to the Forms version, I only any other reference in the signature
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
riaqn has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
<please_help> The best I can gather is that it takes a ~a with attribute fields, but there's something missing as a mandatory parameter that I can't figure out.
<Drup> () at the end.
<please_help> Err, right
<please_help> actually for the textarea. () gives: expected [<Html5_types.text_area_content_fun ] Eliom_content.Html5.elt
<Drup> because a textarea has children
<Drup> an input doesn't
tennix has joined #ocaml
nicholasf has quit [Remote host closed the connection]
orbifx1 has joined #ocaml
jgjl has joined #ocaml
NingaLeaf has quit [Quit: Leaving.]
oxcsh has joined #ocaml
NingaLeaf has joined #ocaml
yomimono has joined #ocaml
jgjl has quit [Client Quit]
struk|desk2 is now known as struk|desk|away
jgjl has joined #ocaml
martintrojer has joined #ocaml
mmin has joined #ocaml
hxegon has joined #ocaml
martintrojer has quit [Ping timeout: 246 seconds]
<mmin> Is there a better way to update a binding in a map (stdlib) than just rebinding the key after getting its value? I'm looking through the documentation for something like Haskell's Data.Map.adjust or Data.Map.insertWith, but not finding much.
<Drup> Unfortunatly no, that would be nice though
<Enjolras> mmin: no. You can wrap the values into ref but...
<Enjolras> that wouldn't be immutable anymore
<Enjolras> (and probably slower)
<mmin> That's unfortunate, and I'd rather not introduce refs everywhere :D
<Enjolras> yeah, i wasn't actually saying you should
<mmin> Right, I was agreeing with you
<mrvn> mmin: changing the key or the value the key refers to?
seangrove has joined #ocaml
<companion_cube> there are things like `update` in alternative stdlibs
<mrvn> not for a functional map
<mmin> Changing the value a key refers to, since changing the key would require inserting it again anyways.
martintrojer has joined #ocaml
martintrojer has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 248 seconds]
<mrvn> mmin: So you need a "replace : key -> 'a -> 'a t -> 'a t". No idea if core or batteries have that
<Enjolras> mmin: "would require inserting it again anyways." You might want to changethe key even if they compare the same
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mrvn> Enjolras: why?
<Enjolras> not much interest doing that though in ocaml, as far as i can tell
<Enjolras> mrvn: for COW, for instance
<Enjolras> or rather, deduplication through hashing, or stuffs like that
<mrvn> Enjolras: where you wouldn't want to have 2 copies of keys comparing equal at all.
mettekou has joined #ocaml
<Enjolras> yeah probably you would dedup at an upper layer
<Enjolras> not sure, just saying there *might* be a reason to do that
<mrvn> anyway, replacing the key or not is irelevant. A replace function would only travel the tree once and do the remove + insert in one go.
<mrvn> no rebalancing or temporary smaller map needed
<Enjolras> that's the point of the replace function indeed :)
<mmin> Yeah. On the other hand, removes and lookups are relatively cheap, so doing both isn't so bad.
<mrvn> it's a factor 2
<pierpa> at least
<mmin> right
<mrvn> no, exactly, in O() notation
<please_help> I have a non-attached coservice that is the endpoint of a form, the post parameters are described as nested pairs. However, the expected 'pn type is unit instead of the type-description I built using the pair combinator. The form is made by Form.post_form. Why is it expecting no post parameters?
<whitequark> constant factors are eliminated in big-O notation...
<mmin> Well, then you can drop the constant factors.
<mrvn> real time wise it might be a lot faster because rebalancing is costly.
<Enjolras> it's also a factor 2 in alloc
<Enjolras> which is the biggest issue
<mrvn> minor heap. cheap.
<Enjolras> unless it doesn't fit.
<pierpa> no heap. stil cheaper :)
<mrvn> it's log(n). you need a huge map to exceed the minor heap.
<companion_cube> too bad it requires reimplementing the stdlib map to make replace/update efficient
<mrvn> unless you call replace a billion times I would just implement it as remove + insert and don't worry about it for now.
martintrojer has joined #ocaml
martintrojer has quit [Ping timeout: 244 seconds]
darkf has joined #ocaml
martintrojer has joined #ocaml
Smerdyakov has joined #ocaml
<Smerdyakov> In the toplevel, is there any way to get #use not to output the signature of the loaded code? I have a case where the signature is so long that it's impractical to wait for it all to print.
mettekou has quit [Read error: Connection reset by peer]
<malc_> Smerdyakov: there's a way
<malc_> redirect stdout
<Smerdyakov> And then I can get stdout back again afterward, for the usual interactive mode?
<whitequark> alternatively, but camlp4 into the dumpster fire where it belongs
<whitequark> put*
<malc_> Smerdyakov: aye
<Smerdyakov> Well, here's another question whose answer would also help: can I use 'ocaml' to run multiple .ml files in sequence, with a single command-line invocation?
<malc_> Smerdyakov: someone asked me about SML vs ocaml information, the best thing i could come up with was your (slightly) biased home page, perhaps you know of something else?
<Smerdyakov> malc_, I don't have anything else to suggest, and I'm also not aware of any way in which that comparison is unfair or not objective. It might be out of date, though.
<malc_> cat *mlfiles | ocaml -stdin
<malc_> Smerdyakov: did i say unfair?
<malc_> i said biased
<seangrove> Does the sexplib require camlp4?
Algebr` has joined #ocaml
<Smerdyakov> malc_, what in particular are you thinking of, to justify that categorization?
<seangrove> I can't tell, does *.syntax imply camlp4 or ppx?
<whitequark> seangrove: not anymore
<malc_> Smerdyakov: there are more people in lab coats on the SML side?
<Drup> seangrove: .syntax implies camlp4
<Drup> always
<seangrove> Drup: Good, a useful heuristic
<Smerdyakov> malc_, and you don't think that's accurate, on a case-by-case basis?
<pierpa> malc_, Smerdyakov: are you talking about http://adam.chlipala.net/mlcomp/ or something else?
<Smerdyakov> pierpa, that's the one.
<pierpa> k
<malc_> pierpa: yep
<seangrove> whitequark: Meaning I can use sexplib without camlp4? Is there a tutorial for that somewhere?
<malc_> More syntactic sugar clutters the language definition. Arrays and strings show up infrequently in traditional functional programming applications, and many new ML programmers accustomed to array-based work could quite profitably switch to datatype-based solutions instead.
<malc_> erm.. that's an opinion
<pierpa> I found it informative. Don't give to much weight to the figurines
<malc_> pierpa: i'm not denying informativeness
<pierpa> ok
<Drup> it's very out of date, though, but Smerdyakov knows that
<pierpa> (and if requested, I couldn't say which way it's supposed to be biased)
yomimono_ has joined #ocaml
<malc_> yeah, it is
<malc_> who would even dare to mention Mlton these days
<Drup> (Hey, but it's not out of date for the SML side ! /troll)
<malc_> Drup: nice one :)
<Drup> (Sorry, I couldn't resist)
<pierpa> :)
<pierpa> people, don't fight SML, it is on the same side of Ocaml
yomimono has quit [Ping timeout: 268 seconds]
<seangrove> Hrm, any quick examples of de/serializing custom types with Sexplib without camlp4?
<seangrove> RWO seems to use camlp4
<Drup> seangrove: use sexplib's ppx ?
NingaLeaf has quit [Quit: Leaving.]
<Drup> that one
arquebus has joined #ocaml
<seangrove> Drup: How did you find that? I didn't see it linked anywhere, and I have ~12 tabs open on anything googled from "ocaml sexplib ppx"
<please_help> I have a non-attached coservice that is the endpoint of a form, the post parameters are described as nested pairs. However, the expected 'pn type is unit instead of the type-description I built using the pair combinator. The form is made by Form.post_form. Why is it expecting no post parameters? (Or should I ask in the mailing list?)
<Drup> "opam search sexp"
<Drup> please_help: Yes, I told you yesterday, mailing list :)
<Drup> (the ocsigen one)
<please_help> How fast is it, and is there a higher response rate for posts in French?
<Drup> Reasonably fast, no
<malc_> Drup: oh c'mon! "Voulez-vous coucher avec moi?" will be answered instantaneously
arquebus has quit [Quit: Textual IRC Client: www.textualapp.com]
thomasga has joined #ocaml
<whitequark> uh
<adrien> gah, memories of english-speaking people only knowing that when the Moulin Rouge movie was released and I was abroad
<malc_> whitequark: aversion to smut?
<whitequark> everything has its place, and a PL mailing list is not one for sex jokes
<malc_> well, this is IRC, lewd language is not frowned upon as much
<malc_> one would hope
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<malc_> besides given the traffic level on caml-devel...
<adrien> Smerdyakov: have you seen https://github.com/mjambon/tophide ?
<Smerdyakov> adrien, interesting! I solved my problem another way.
<adrien> seangrove: the ppx support in sexplib is fairly new; that's also why you didn't find anything
<seangrove> adrien: Ah, ok, that makes sense then.
d0nn1e has quit [Ping timeout: 248 seconds]
hxegon is now known as hxegon_AFK
d0nn1e has joined #ocaml
<please_help> I was about to post to the mailing list and then I realized the issue was in the form-generation function definition rather than the coservice registration.
<please_help> rubber duck debugging truly is the best.
hxegon_AFK has quit [Quit: BRB]
<seangrove> What's the relationship between sexplib and weak.js? And what does weak.js add in terms of size/runtime overhead?
<Drup> weak.js is just an emulation of weak pointers as strict pointers, since javascript doesn't have them.
<seangrove> Drup: Yeah, so I'm a bit surprised that Sexp needs it
* seangrove sighs
<seangrove> I seem to be in some sort of huge package conflict - trying to get irmin, jsoo, sexp to all install, and the opam changelist is huge
keep_learning has joined #ocaml
keep_learning has quit [Max SendQ exceeded]
hxegon has joined #ocaml
keep_learning has joined #ocaml
keep_learning has quit [Max SendQ exceeded]
keep_learning has joined #ocaml
<whitequark> do you have aspcud
<Algebr`> seangrove: doing jsoo a lot now?
<seangrove> Algebr`: Wanted to talk to you about it later today if you have time, actually
<seangrove> Bah, how did this happen? https://gist.github.com/sgrove/bee8c3d3159f6999161f
NingaLeaf has joined #ocaml
<Algebr`> will be hard to do, I am in morocoo
<seangrove> Well, just chatting ;)
<Algebr`> ah of course :)
<Drup> seangrove: you have irmin pinned to the dev version, so probably a version mismatch with some other dep.
<seangrove> Nah, doesn't seem to be: https://gist.github.com/sgrove/61d342e5c7f5cfd9f54f
<seangrove> (or rather, unpinning didn't help, heh)
<seangrove> Ah, some logging dep is probably also broken
<adrien> whitequark: because of companion_cube, I was going through your twitter history
<adrien> whitequark: the -posix and -win32 suffixes for tools built for mingw-w64 are actually distribution things
<adrien> whitequark: they are meant to differentiate between toolchains that feature C++11 threading (-posix) and those that don't (-win32)
<whitequark> why can't you add -mc++11-threading
<whitequark> or -f
<adrien> the perceived drawback of the ones with the threading is that they depend on winpthread, a library that weighs a few kilobytes
<adrien> whitequark: don't ask me, ask your distribution :)
<adrien> took me a while to find out some were doing that
<whitequark> really though my main complaint is that the triple isn't i686-windows-gnu
<whitequark> *maybe* i686-w64-windows-gnu but even that is questionable
<adrien> and as far as I know, it isn't because of GCC developers but binutils ones :)
<adrien> moreover it's not gnu at all
<whitequark> pretty sure it uses the gnu abi
<mrvn> isn't using the unix compatibility dll for windows?
<whitequark> exception handling and maybe a few other things
<mrvn> +it
<whitequark> mrvn: no, that's msys
<whitequark> mingw is just a cross-compiler
<adrien> it uses the closest-to-MSVC-we-can-get-considering-the-platform-is-not-fully-documented
<adrien> ABI
<whitequark> no, I don't think so.
<adrien> msys or cygwin
<adrien> C ABI is definitely fully the same as MSVC
thomasga has quit [Quit: Leaving.]
<adrien> C++ is very close but not completely
<whitequark> yes. but the C++ toolchain uses DWARF EH instead of SEH
<adrien> nope
<whitequark> since when?
<adrien> for i686 it uses either SJLJ or dwarf2 (which is not really supported)
<adrien> for x86_64 it uses SEH
<adrien> part of the reason the i686 one doesn't use x86 SEH is that there was a patent on it that expired not so long ago and prevented any work for two decades
<whitequark> hrm
<adrien> default for i686 is sjlj btw
<whitequark> alright then you are correct and it's not gnu
<seangrove> Hrm, I'm lost, I've totally borked my setup trying to install sexp stuff
pierpa has quit [Ping timeout: 260 seconds]
yomimono_ has quit [Ping timeout: 244 seconds]
* mrvn still has 2 issues with patches from 2013 in mantis. Should I generate pull requests for the git for them to get them moving again or something?
orbifx1 has quit [Ping timeout: 244 seconds]
deko-pyon has quit [Quit: cleanup]
pyon has joined #ocaml
hexhaxtron has quit [Quit: leaving]
<please_help> I'm trying to register a kind of fallback on a path which causes a redirection when parameters are missing. While using a clean path works, using that path already served by another service doesn't, regardless of priority (at best, I get a 404 instead of a redirect).
govg has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<seangrove> Is there a "opam new project" command?
mettekou has joined #ocaml
<seangrove> And is there a way to get the package version when doing e.g. `opam search irmin`?
<seangrove> And is there a way to define all the deps for my local project (not necessarily meant to be an opam package), like a rubygems bundle fine or a maven pom file?
<smondet> seangrove: Does `opam info irmin` do what you want?
<smondet> for the other question there is this: https://github.com/ygrek/opam-bundle
<smondet> also have a script in your project that creates a fresh opan-switch and does a bunch of `opam pin add` to library version does what maven does
<smondet> except that maven would call `opam update && opam upgrade && sleep 4200` every time you hit `make` :)
<malc_> smondet: why 70 hours?
struk|desk|away is now known as struk|desk2
<smondet> malc_: I was kidding about the `sleep`, just some painful experience with a couple of scala/maven projects
<malc_> smondet: still.. why 70? don't keep me in suspense!
<smondet> actually 4200 s is 1.16 hours, why 70?
<malc_> because i divided by 60 and not 3600
<malc_> stoopid ruskie.. s'ry
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
copy` has joined #ocaml
maker has quit [Quit: = ""]
Smerdyakov has quit [Quit: Leaving]
Algebr` has quit [Ping timeout: 252 seconds]
dwwoelfel has joined #ocaml
<seangrove> Why does Core.Std.List.find take a named argument ~f?
<seangrove> (wondering what the advantage/design decision is there vs Pervasive's List.find's signature)
<malc_> core is devoid of logic, spawn of capitalists
<flux> seangrove, for partial application in user-chosen order
<malc_> flux: is that a guess or officially endorsed rationale?
<ggole> Core loves them some named arguments
* seangrove sighs
<seangrove> Now I'm running into errors with Opium https://gist.github.com/sgrove/f5844cbb3a23a559e3ed
<smondet> there was a blog post for the design rationale of Core_*
<smondet> yes labelled arguments are nice for partial application and they make the code more readable
pyon has quit [Quit: cleanup]
deko-pyon has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
thomasga has joined #ocaml
trix has quit [Ping timeout: 244 seconds]
thomasga has quit [Remote host closed the connection]
thomasga has joined #ocaml
<flux> malc_, I don't remember if that's been explicitly mentioned for core, but it's been discussed as the benefit of named arguments in general
johnf has quit [Read error: Connection reset by peer]
<malc_> flux: i see, thanks
butts_butts has joined #ocaml
<companion_cube> Core seems well designed, and more consistent than the stdlib
<companion_cube> the only problem is that it's huge and monolythic :/
Kakadu has joined #ocaml
wolfcore has joined #ocaml
ygrek has joined #ocaml
jgjl has joined #ocaml
seangrove has quit [Remote host closed the connection]
mmin has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Algebr` has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Haudegen has quit [Ping timeout: 240 seconds]
<struk|desk2> companion_cube: supposedly that is being worked on
struk|desk2 is now known as struk|desk
<companion_cube> well it's deeply ingrained
<companion_cube> good luck to them :)
seangrove has joined #ocaml
<seangrove> Does sexplib work with js_of_ocaml? Running into a ton of "missing primitives" errors and a 18MB js file
mmin has joined #ocaml
<companion_cube> oO
julien_t has quit [Ping timeout: 250 seconds]
orbifx1 has joined #ocaml
<orbifx1> hello all
<companion_cube> yo
therac25 has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
orbifx1 is now known as orbifx
<orbifx> how is it going companion_cube ?
<companion_cube> good, and you?
<seangrove> Bah, is there a straightforward way to use sexplib + sexp_of_custom_type in jsoo?
<companion_cube> no idea, I'm surprised there are primitives for this
Haudegen has joined #ocaml
<orbifx> Good, writing documentation
<companion_cube> always a good thing
<malc_> question is - because or despite of
<seangrove> Ok, backing up because my head is about to explode: I want to serialize a custom type automatically to store in Irmin, and want to be able to automatically deserialize them as well.
yunxing has joined #ocaml
<seangrove> What is the best way to do this when using both normal OCaml, mirage OCaml (no unix), and jsoo?
<companion_cube> hmmmm, give a try to ppx_deriving_yojson?
yomimono_ has joined #ocaml
struk|desk is now known as struk|desk|away
<seangrove> companion_cube: Yeah, that could be a good idea
Anarchos has joined #ocaml
zxqdms has quit [Quit: leaving]
<aantron> orbifx: what are you documenting?
julien_t has joined #ocaml
<orbifx> Yamado
jgjl has joined #ocaml
<orbifx> Documenting yamaddo aantron
govg has quit [Ping timeout: 240 seconds]
pela has joined #ocaml
<dwwoelfel> After installing websocket from opam, my utop crashes when I try to require it: https://gist.github.com/dwwoelfel/3846a6de80227995d67c
jgjl has quit [Client Quit]
thomasga has joined #ocaml
govg has joined #ocaml
oxcsh has quit [Remote host closed the connection]
oxcsh has joined #ocaml
pela has quit [Ping timeout: 252 seconds]
<seangrove> companion_cube: Is this what you meant? https://github.com/hhugo/deriving-yojson
<seangrove> Is that syntax some kind of old ppx?
<companion_cube> I meant this
<seangrove> Thanks :)
mettekou has joined #ocaml
jgjl has joined #ocaml
oxcsh has quit [Remote host closed the connection]
oxcsh has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody> Hey, so I have a functor that requires an interface
<SomeDamnBody> and I have another module that is defined as in module Mine = struct include RequiredInterface end
<SomeDamnBody> how do I demonstrate to the compiler that if I pass Mine to the functor, that it will indeed suffice?
<companion_cube> just apply the functor, it will fail if the compiler is unhappy
<companion_cube> or you can write module Mine : RequiredInterface = struct include ImplemOfInterface end
<SomeDamnBody> the compiler says: the module RequiredInterface is required but not provided
<companion_cube> (or just module Mine : RequiredInterface = ImplemOfInterface)
<companion_cube> can you paste the signature and code?
<companion_cube> (not on the chan ofc)
<SomeDamnBody> ... one second, let me make it repeatable
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oxcsh has quit [Remote host closed the connection]
oxcsh has joined #ocaml
<Leonidas> dwwoelfel: let me see if it crashes for me as well
SomeDamn_ has joined #ocaml
SomeDamn_ is now known as SomeDamnBody_
foocraft has joined #ocaml
foocraft has quit [Changing host]
foocraft has joined #ocaml
SomeDamnBody has quit [Ping timeout: 264 seconds]
mettekou has quit [Read error: Connection reset by peer]
jgjl has joined #ocaml
hxegon has quit [Quit: BRB]
hxegon has joined #ocaml
foocraft has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 240 seconds]
ggole has quit []
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nichola__ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
hxegon is now known as hxegon_AFK
BitPuffin|osx has quit [Ping timeout: 264 seconds]
Anarchos has quit [Ping timeout: 276 seconds]
julien_t has quit [Ping timeout: 250 seconds]
hxegon_AFK is now known as hxegon
butts_butts has quit [Ping timeout: 240 seconds]
mettekou has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<seangrove> I did `opam install irmin-indexeddb`, worked fine - but I can't figure out how to pass it to ocamlfind. irmin-indexeddb doesn't work, nor irmin_indexeddb, nor irmin.indexeddb
<seangrove> Nevermind, I may not have installed it on this switch, trying...
adarqui has quit [Quit: leaving]
<flux> seangrove, what do you plan on doing with irmin?
nichola__ has quit [Ping timeout: 240 seconds]
zv has joined #ocaml
nicholasf has joined #ocaml
orbifx has quit [Ping timeout: 244 seconds]
silver has joined #ocaml
malc_ has quit [Read error: Connection reset by peer]
nichola__ has joined #ocaml
zv has quit [Ping timeout: 252 seconds]
SomeDamnBody_ has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 244 seconds]
Reventlov has quit [Ping timeout: 252 seconds]
jpdeplaix2 has quit [Ping timeout: 252 seconds]
jpdeplaix2 has joined #ocaml
mmin has quit [Ping timeout: 252 seconds]
Reventlov has joined #ocaml
nicholasf has quit [Ping timeout: 248 seconds]
mahem1_ is now known as mahem1
Simn has quit [Quit: Leaving]
zv has joined #ocaml
mmin has joined #ocaml
Anarchos has joined #ocaml
hxegon has quit [Quit: BRB]
<seangrove> flux: Building an example app right now, a hacker news clone
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
antkong has joined #ocaml
<seangrove> Can I use Lwt_main in jsoo? I obviously don't want to pull in lwt.unix I think
mettekou has quit [Read error: Connection reset by peer]
<seangrove> Very nice!
johnf has joined #ocaml
sh0t has quit [Quit: Leaving]
<seangrove> In jsoo, what's the equivalent of Lwt_main.run ?
Kakadu has quit [Remote host closed the connection]
<Drup> seangrove: there isn't one
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
aantron has quit [Remote host closed the connection]
aantron has joined #ocaml
seangrov` has joined #ocaml
seangrove has quit [Remote host closed the connection]
jpdeplaix2 is now known as jpdeplaix
keep_learning has quit [Quit: This computer has gone to sleep]
aantron has quit [Remote host closed the connection]
seangrov` has quit [Ping timeout: 248 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
seangrov` has joined #ocaml
<seangrov`> Drup: Lwt.async is what I was looking for, otherwise exceptions are swallowed
mmin has quit [Ping timeout: 244 seconds]
zv has quit [Ping timeout: 268 seconds]