ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
rand000 has quit [Quit: leaving]
shinnya has quit [Ping timeout: 248 seconds]
asdewsw has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
ollehar has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
<asdewsw> why is the line after the first else expected to be of type 'a? (the part that says "a::hd")
johnf_ has quit [Read error: Connection reset by peer]
lordkryss has quit [Quit: Connection closed for inactivity]
stevensonmd has joined #ocaml
BitPuffin|osx has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
kdef has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 244 seconds]
<asdewsw> why is h unbound in line 15? http://pastie.org/10255657#15
rgrinberg has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnf_ has joined #ocaml
nowprovision has joined #ocaml
ghostpl has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
SGrondin has joined #ocaml
ghostpl has quit [Ping timeout: 256 seconds]
struktured has quit [Ping timeout: 248 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
MrScout has quit [Ping timeout: 248 seconds]
BitPuffin|osx has quit [Ping timeout: 255 seconds]
jabesed has quit [Quit: Konversation terminated!]
rgrinberg has joined #ocaml
systmkor has quit [Ping timeout: 244 seconds]
stevensonmd has quit [Remote host closed the connection]
struktured has joined #ocaml
SGrondin1 has joined #ocaml
SGrondin1 has left #ocaml [#ocaml]
SGrondin has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
darkf has joined #ocaml
chris2 has quit [Ping timeout: 246 seconds]
<asdewsw> why is the interpreter expecting a type of 'a in the marked line? http://pastie.org/10255789 would anyone be able to help me?
ghostpl has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
walter|r has quit [Remote host closed the connection]
ghostpl has quit [Ping timeout: 246 seconds]
idegen has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 256 seconds]
tjscanlon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
waneck has quit [Read error: Connection reset by peer]
matason has joined #ocaml
keen___________1 has joined #ocaml
MercurialAlchemi has joined #ocaml
keen___________0 has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
djellemah has quit [Ping timeout: 265 seconds]
tmtwd has joined #ocaml
obadz- has joined #ocaml
AdmWiggin has joined #ocaml
obadz has quit [Ping timeout: 265 seconds]
tianon has quit [Ping timeout: 265 seconds]
djellemah has joined #ocaml
yomimono has joined #ocaml
tjscanlon has joined #ocaml
nowprovision has quit [Quit: Page closed]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
<Algebr> A bit off the wall, but has anyone here ever successfully replaced a screen on a laptop?
tmtwd has quit [Quit: Leaving]
struktured has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
chris2 has joined #ocaml
ghostpl has joined #ocaml
ghostpl has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
tmtwd has joined #ocaml
psy_ has quit [Ping timeout: 256 seconds]
kushal has joined #ocaml
tmtwd has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 248 seconds]
psy_ has joined #ocaml
kushal has quit [Ping timeout: 248 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matason has quit []
swgillespie has joined #ocaml
psy_ has quit [Client Quit]
psy_ has joined #ocaml
<dmbaturin> Algebr: Yep. Experience with one laptop is not directly applicable to other laptops though. :)
psy_ has quit [Max SendQ exceeded]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy_ has joined #ocaml
<Algebr> Heh, I'm using debian as my primary machine now instead of OS X and damn do I miss the nice screen.
<dmbaturin> Wait, I thought you meant physical LCD screen.
<Algebr> yea, I want to replace the physical lcd screen on a thinkpad to one with a higher resolution
<Algebr> I'm wondering if its worth bumbling with or paying someone to do it...
kushal has joined #ocaml
<flux> asdewsw, I guess you found the 'rec' keyword
<flux> gotta love the succinctness though, let h l n v a = match l with ..
sh0t has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
sh0t has quit [Ping timeout: 276 seconds]
tmtwd has joined #ocaml
Bhavya has joined #ocaml
thomasga has joined #ocaml
ghostpl has joined #ocaml
sh0t has joined #ocaml
ghostpl has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
sepp2k has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
matason has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
obadz has joined #ocaml
Haudegen has joined #ocaml
srenatus has joined #ocaml
obadz- has quit [Ping timeout: 246 seconds]
tmtwd has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
tmtwd has joined #ocaml
toolslive has joined #ocaml
Bhavya has quit [Ping timeout: 246 seconds]
Bhavya has joined #ocaml
Simn has joined #ocaml
ghostpl_ has joined #ocaml
ygrek has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 256 seconds]
creichert has quit [Quit: Leaving]
rand000 has joined #ocaml
creichert has joined #ocaml
creichert has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
tmtwd has quit [Remote host closed the connection]
ghostpl has joined #ocaml
avsm has joined #ocaml
tjscanlon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Ping timeout: 265 seconds]
mort___ has quit [Quit: Leaving.]
amnn has joined #ocaml
mort___ has joined #ocaml
lordkryss has joined #ocaml
milosn has quit [Quit: leaving]
tjscanlon has joined #ocaml
zpe has joined #ocaml
Sorella has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
nullcat_ has joined #ocaml
rgrinberg has joined #ocaml
tjscanlon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 246 seconds]
bezirg has joined #ocaml
amnn has quit [Quit: Textual IRC Client: www.textualapp.com]
amnn has joined #ocaml
emanuelz has joined #ocaml
amnn has quit [Quit: Textual IRC Client: www.textualapp.com]
dsheets has joined #ocaml
siddharthv_away is now known as siddharthv
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
siddharthv is now known as siddharthv_away
thomasga has quit [Quit: Leaving.]
amnn has joined #ocaml
amnn has quit [Client Quit]
jonludlam has joined #ocaml
amnn has joined #ocaml
fraggle-boate_ is now known as fraggle-boate
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
thomasga has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
srenatus has left #ocaml [#ocaml]
emanuelz has quit [Quit: emanuelz]
thomasga has quit [Quit: Leaving.]
bezirg has quit [Ping timeout: 276 seconds]
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
_andre has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
<ousado> thomasga: hi!
<ousado> I'm looking at irmin
amnn has joined #ocaml
bezirg has joined #ocaml
<asdewsw> @flux what is the idiomatic way to do this then? and did you see the source of the type error?
psy_ has quit [Ping timeout: 250 seconds]
walter|r has joined #ocaml
octachron has joined #ocaml
<flux> asdewsw, so 'a' is supposed to be a list?
<flux> asdewsw, and then you make a new list by putting the 'a' list in front of the 'v' list? making 'v' a list of lists?
<flux> maybe you mean v::a?
<flux> or some form of a @ [v]
<asdewsw> well i want to append one value to the end of a list
<asdewsw> i though @ was for two lists
<asdewsw> v should be of type 'a
<asdewsw> a is a list
<asdewsw> it says the expression has type 'a list, which i would expect, but why is it expecting type 'a?
<flux> well, a more recent compile apparently tells a better error
<flux> but the problem here is that 'a list list is also a form of 'a list
<flux> the ::-operator takes two arguments: a value, and a list and it returns a list with that single value prepended at the beginning of the list
<flux> now it looks like you are giving it a list and a value, and trying to put that list in front of that value: this cannot work
<asdewsw> i'm not sure about that. the compiler has told me it expected type 'a list list so it knows the difference between the types
<asdewsw> okay i'll try using the other operator
jeffmo has quit [Read error: Connection reset by peer]
<octachron> line 7: a::v implies that v is a list of object of type (type a)
<flux> the thing here is this can never work: ([]::4)
jeffmo has joined #ocaml
<flux> asdewsw, an approach that will help you pinpoint the problem better:
<octachron> Sorry, the error is: line 15: (a= a::v) implies that the parameter a is list of object of (type a)
<flux> asdewsw, replace the first line in the definition with: let set_n : type t. t list -> int -> t -> t list = fun x n v ->
<flux> and then replace all 'a with t in the code
<flux> this will enforce the compiler will not suddenly find out that 'a list is an instance of 'a
walter|r has quit [Remote host closed the connection]
<asdewsw> okay i'll try that thank you
walter|r has joined #ocaml
bezirg has quit [Quit: Leaving.]
<flux> asdewsw, btw, there was an issue I inadvertently fixed.. your original code: let set_n x n v : 'a list -> int -> 'a -> 'a list = does not mean what you probably think it means
<flux> the type after the : is the return type of the function
<flux> so in this case, it would return a 3-argument function that returns a list
jeffmo_ has joined #ocaml
<flux> it didn't yet matter regarding your problem, though, but it would have eventually turned up :)
jeffmo has quit [Ping timeout: 248 seconds]
jeffmo_ is now known as jeffmo
<asdewsw> so what return type do i want rather?
<asdewsw> i want to pass a list of 'a, an index, and a value 'a to replace the prior value at index n
<asdewsw> and get the resulting list back
<flux> for example _ list is fine if you don't want to annotate other types of the function
<flux> or the definition I gave works as well
<asdewsw> okay thanks
<flux> good luck!
walter|r has quit [Remote host closed the connection]
<asdewsw> thanks =/ oh actually the sig the assignment lists uses the definition i was enforcing
<asdewsw> so i guess somehow the type has to work out. the type system is still nearly a black box to me.
rgrinberg has joined #ocaml
tmtwd has joined #ocaml
<flux> so did you get a new error?
<flux> just for reference, this is what I meant: http://pastie.org/10256471
<flux> you should get an error at the topmost a::v, and for a good reason
<asdewsw> i'll try this out in a bit. i have been getting ready for work, sorry
<asdewsw> thanks for the time
rgrinberg has quit [Ping timeout: 256 seconds]
huza has joined #ocaml
jeffmo has quit [Ping timeout: 250 seconds]
<reynir> hm, opam wants to remove some 50 packages because of a conflict with uri>1.3.12
<reynir> or rather "No package matches uri>1.3.12"
<flux> reynir, do you have aspcud?
<flux> #1 basic question when opam does funny dependency resolving ;)
<reynir> Yes, I do
<reynir> I have opam 1.2.0, though
Hannibal_Smith has joined #ocaml
Kakadu has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
<reynir> (it's the latest version in debian unstable, unfortunately)
ggole has joined #ocaml
zeRusski has joined #ocaml
jonludlam has quit [Ping timeout: 244 seconds]
jeffmo has joined #ocaml
walter|r has joined #ocaml
walter|r has quit [Read error: Connection reset by peer]
walter|r has joined #ocaml
jeffmo has quit [Ping timeout: 252 seconds]
idegen has joined #ocaml
walter|r has quit [Ping timeout: 264 seconds]
badkins has joined #ocaml
jeffmo has joined #ocaml
rgrinberg has joined #ocaml
milosn has joined #ocaml
antegallya has joined #ocaml
srax2 is now known as srax
ollehar has quit [Remote host closed the connection]
<flux> asdewsw, I forgot to mention the simpler way to debug types: just replace the 'a in your function signature with a concrete type, such as int
<flux> ..and once it works, revert the change
ollehar has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
tmtwd has quit [Remote host closed the connection]
tmtwd has joined #ocaml
milosn_ is now known as milosn
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
antegallya has quit [Client Quit]
dsheets has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 246 seconds]
yomimono has quit [Ping timeout: 264 seconds]
darkf has quit [Quit: Leaving]
kdas_ has joined #ocaml
kushal has quit [Ping timeout: 265 seconds]
kdas_ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
QuanticPotato has joined #ocaml
AlexRussia has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 250 seconds]
psy_ has joined #ocaml
AlexRussia has joined #ocaml
rgrinberg has joined #ocaml
kushal has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
johnf_ has joined #ocaml
slash^ has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
jeffmo has quit [Quit: jeffmo]
walter|r has joined #ocaml
emias has quit [Ping timeout: 264 seconds]
kdef has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
walter|r has quit [Ping timeout: 246 seconds]
emias has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
<j0sh> findlib warns when i have a file with the same name as another file in a dependency... is there a workaround short of re-naming the file?
<j0sh> findlib: [WARNING] Interface auth.cmi occurs in several directories: ., /home/josh/.opam/4.02.1-vri/lib/swt
<j0sh> hmm, looks like swt needs to be a packed module
badkins has quit []
kdef has quit [Quit: Leaving]
tane has joined #ocaml
ygrek has joined #ocaml
emias has quit [Quit: Bye]
toolslive has quit [Ping timeout: 252 seconds]
ollehar1 has joined #ocaml
emias has joined #ocaml
zeRusski_ has joined #ocaml
zeRusski has quit [Ping timeout: 252 seconds]
emias has quit [Client Quit]
emias has joined #ocaml
creichert has joined #ocaml
<flux> sometimes packages are misbuilt
<flux> they do packed modules
<flux> but then forget the original .cmi-files there as well
Algebr has joined #ocaml
<Algebr> Can merlin show me where an arbitary function is called.
<flux> maybe not where it's called, but maybe where it's referenced?
<Algebr> you mean where its defined?
<flux> no, where it's referenced.
<Algebr> how is that different than where its called?
<flux> let a = b -> does not call 'b'
<flux> but yes, it has merlin-occurrences
<flux> I believe it finds the instance, not just any strings that match
<Algebr> ah, I see. Okay, those will overlap a lot of the time anything
<flux> otherwise, what would be the point :)
<Algebr> anyway*
<flux> later on, if a is called, it won't find it either, but that's of course understandable
<Algebr> ah, merlin-occurences only does it for the current buffer, not a directory wide search
<Algebr> might be a good feature to add.
<flux> right, that would be a nice addition - probably not hard to add either
johnf_ has joined #ocaml
ollehar1 has quit [Ping timeout: 264 seconds]
kushal has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
rand000 has quit [Quit: leaving]
dhil has joined #ocaml
walter|r has joined #ocaml
Hannibal_Smith has joined #ocaml
sh0t has joined #ocaml
walter|r has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
kushal has quit [Ping timeout: 244 seconds]
kdef has joined #ocaml
Haudegen has joined #ocaml
QuanticPotato has quit [Ping timeout: 272 seconds]
kdef has quit [Ping timeout: 264 seconds]
kushal has joined #ocaml
octachron has quit [Quit: Leaving]
MrScout has joined #ocaml
mort___1 has quit [Ping timeout: 256 seconds]
dhil has quit [Ping timeout: 252 seconds]
<flux> drup, hello :). is there some patent approach to ensuring keepalive with Eliom bus?
sepp2k has quit [Quit: Leaving.]
kdef has joined #ocaml
<Drup> ensuring ?
<Drup> (I don't know Eliom bus all that well)
<Drup> I'm not sure to get your question.
mort___ has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
zeRusski_ has quit [Ping timeout: 252 seconds]
emanuelz has joined #ocaml
shinnya has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
<flux> well, I have a page that reacts to Eliom_bus.write %bus "hello"
<flux> if I restart ocsigen, the updates no longer go through
<flux> neither do rpcs from the page
<flux> so at that point the client code should somehow revive the connection..
kushal has quit [Ping timeout: 248 seconds]
<Drup> Oh.
<Drup> the other way will work, but that way, it's more complicated
<Drup> I'm not sure you can do that
<j0sh> flux: re: mis-built package, in this case the offending dependency is a package that i built myself, looks like all the .cmis are in place (via oasis/ocamlbuild)... i think it just needs to be packed (it isn't atm), only problem with packing is the package name is the same as a module name (swt package exposing a swt.mli module) and i'm too lazy to figure out a workaround at the moment
zpe has quit [Remote host closed the connection]
<flux> I don't have one either, sorry :)
<flux> drup, I guess it would be enough for me to reload the page
<flux> maybe I can detect the situation with a heartbeat and timeouts and issue a refresh
<flux> sadly I will lose all page-related state in that case.. unless I use local storage
<Drup> flux: so, you need to give a name (using the ~name optional argument)
<flux> but I would like Eliom to solve this particular problem for me in the future 8--)
<flux> drup, ~name? to the bus?
<Drup> yes
<Drup> the reason is that busses are really non-attached coservices
<Drup> if you don't give them name, they have horribly long PRNGed addresses
<Drup> which will not persist through reboot of the server
<Drup> give it a name, it will fix the address and it should work
<Drup> flux: in the documentation: "The ?name argument allow one to make bus's persistent over server restart." :D
<flux> amazing, useful documentation ;)
<flux> ok, so now the bus works, but the rpc doesn't. I guess there's a similar solution.
<Drup> exactly the same reason, an rpc is really a nonattached coservice of type OCaml
<flux> just by luck I guessed server_function takes ~name as well ;)
<Drup> actually, it doesn't, because you can create an attached coservice of type OCaml yourself
<flux> cool, works perfectly!
<Drup> oh, hum, it does
<Drup> nevermind
<Drup> to many arguments, missed it
<flux> now if I need to account for version changes I just need to carry some version message or something, but that seems easy
<flux> for example: on server start, send the new version number to the bus
jeffmo has quit [Read error: Connection reset by peer]
<flux> and clients check that and refresh if needed
Anarchos has joined #ocaml
<Drup> I guess you can do that, yeah
jeffmo has joined #ocaml
zpe has joined #ocaml
<Drup> (the good way to refresh is to use "Eliom_client.exit_to")
<flux> it takes an url as an argument I suppose. I could pass information via that.
<Drup> a service
<flux> even better.
<Drup> It will ensure that the javascript is indeed realoded, which is not the case with change_page
<flux> oh, there's something like that
<flux> I just dance with the display:-stuff and internal state machine :)
<Drup> you don't need to, eliom will do that for you
<flux> a book on eliom would be in order :)
<flux> it's seriously a bigger topic than most any other program for ocaml.. with the exception of Coq :)
<Drup> If you use the Eliom_registration.App functor to create your services, the javascript will be shared and not realoded each time
<flux> I do, per the tutorial
<flux> but here's something I've been wondering. my app is registered with path ["BailaGW"]
<Drup> Yes, the behavior is described in the tutorial
<flux> and there's another service I've called ["backlog"]
<flux> it seems I cannot register it as ["BailaGW"; "backlog"], as that would be two registrations for BailaGW?
<flux> so I would need do use some composition registration perhaps?
<Drup> huum
<Drup> You mean that you can't register a service to the path ["BailaGW"] and one on the path ["BailaGW"; "backlog"] ?
<flux> yes
<Drup> try ["BailaGW"; ""] on the first one
<Drup> ("BailaGW" vs "BailaGW/" ...)
<flux> right, that explains why BailaGW/ didn't work in the first place..
<flux> in the browser that is
<Drup> yeah
<flux> you are really a gold mine of information ;). so I understand it you are an Eliom developer. do you also write services that make use of it?
ghostpl has quit [Ping timeout: 276 seconds]
<Drup> I don't
<Drup> lack of time, mostly
<flux> you witness other people stru..developing apps with it?-)
<Drup> I did a bit, but really, no time :/
<Drup> yeah
<flux> it is sad how days only have 24 hours
<Drup> and I'm doing too many different things that, if I was reasonable, I wouldn't do.
<flux> what would life be if you were always reasonable, though?
<flux> happier?-)
<Drup> because I'm supposed to write an thesis in the remaining two years ? :D
<flux> just copy paste these irc logs.. oh isn't that enough..
ggole has quit []
sh0t has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
<dmbaturin> Drup: What are you doing for the PhD?
<flux> my guess is.. "Social aspects of blogging on PHP?"
<flux> sorry, couldn't guess a topic farther from the truth ;-)
zeRusski_ has joined #ocaml
<Drup> right now, a formal semantic for eliom which doesn't involve voodoo
thomasga has quit [Quit: Leaving.]
<dmbaturin> Do you have any papers/preprints about its formal semantics?
Submarine has joined #ocaml
Submarine has joined #ocaml
<Drup> not reasonably presentable ones at the moment, soon enough
yomimono has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjscanlon has joined #ocaml
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sh0t has joined #ocaml
Kakadu has quit [Quit: Page closed]
kushal has joined #ocaml
Algebr has quit [Remote host closed the connection]
johnf__ has joined #ocaml
kushal has left #ocaml ["Leaving"]
tjscanlon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hannibal_Smith has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
|jbrown| has joined #ocaml
Kakadu has joined #ocaml
johnf__ has quit [Read error: Connection reset by peer]
tjscanlon has joined #ocaml
<flux> hmm, is Re natively UTF8?
<Drup> re doesn't handle utf8
<flux> ok, so when I have Pcre.regexp ~flags:[`UTF8], it probably doesn't have a replacement yet?
manizzle has joined #ocaml
<Drup> https://github.com/ocaml/ocaml-re/pull/48 if you want to make it move
<flux> I began to give ocaml-re more value when I decided it would be nice to have decent system in the ocsigen client as well.. :)
<Drup> flux: not when you realized it was one order of magnitude faster than pcre ? :3
<flux> haven't done anything performance sensitive with it. but is that so? nice
<flux> I should retry the benchmark of a guy doing log processing in ruby and it toasting OCaml ;-)
<Drup> well, it's easy to be fast with regex, there is mostly one criteria: not doing pcres (re is also doing a lot of magic :p)
<flux> I thought pcre was fast by the virtue of perl being fast :) (when it's doable in plain dfa)
<flux> but I suppose pcre isn't then particularly performance oriented?
tane has quit [Quit: Verlassend]
<flux> next up! ocaml multicore for faster log processing :-o
<Drup> flux: not really
<flux> ..well metaocaml then?-)
<Drup> pcre is supposed to be perf oriented, but really, it's just not the right complexity most of the time
<Drup> because pcres
hbar has quit [Ping timeout: 252 seconds]
<flux> my irc-oriented url regexp: (?<!!)\\b((?:[a-z]{2,})://(?:[^ .,:;>]|[,.:;>](?! ))*)
<flux> I don't even remember what it all means.. ;-)
<Drup> "(?<!!)" wtf is that
<flux> I think it's negative lookbehind. maybe.
zeRusski_ has quit [Ping timeout: 244 seconds]
<Drup> urk
<Drup> why ?!
<flux> you mean why!!! or why the "?!" at the end?-)
<Drup> I mean WHY?!?§
<flux> you know yuo're doing well when a regexp fragment causes noises of exasperation indistinguishable from regular expressions
<flux> (also: finally a place to use the word I picked from some book)
<flux> it works..
<Drup> anyway, that's not handled by re
<flux> isn't too strict about it and works for urls like "here's the url ftpzap://bar, whatcha like it?"
<flux> oh, sadness
tmtwd has joined #ocaml
<flux> I guess I'll do the splitting server side then
<flux> not sure if all that is required for it to function though, but I would rather not touch it.. :)
<Drup> you do realize that matching on "http://" and "www." is enough for 99% of the time ?
<Drup> (ok, https too)
<flux> but this is maintenance free!
<flux> works for gopher!
<flux> and for any future schemas!
<flux> most any at least
<Drup> but need a look to the server to know if it's a url =')
Submarine has quit [Quit: Leaving]
<flux> decidedly it doesn't even support www., because hey, that's NOT an url, that's a host name with slashes near the end at best ;)
tjscanlon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjscanlon has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
seanmcl has joined #ocaml
nullcat has joined #ocaml
thomasga has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat has joined #ocaml
thomasga has quit [Quit: Leaving.]
johnf__ has joined #ocaml
_andre has quit [Quit: leaving]
slash^ has quit [Read error: Connection reset by peer]
nullcat has quit [Ping timeout: 244 seconds]
sh0t has joined #ocaml
dmiles_afk has joined #ocaml
<dmiles_afk> do most Ocaml programmers use Poplog?
<flux> probably not, I've never heard of that..
<dmiles_afk> what is a big motivation to learn Ocaml?
<flux> well, depends perhaps where one is coming from
<flux> if one is coming from the dynamic side of languages, then it's interesting to see how the compiler can assist in ensuring the program is correct
<flux> if one is coming from the C++ side then it's nice to how expressive can a language be ;-)
<dmiles_afk> i come froma very dynamic side
<dmiles_afk> my motivation is to implment a theorem prover that will run faster than one i write in prolog but also able to write first order logica and mix it with proceedural code
<flux> well, symbolic manipulation is certainly popular in OCaml
<flux> ie: compilers, theorem provers, interpreters
<flux> should be a decent performer as well in those areas
<dmiles_afk> is it very simple to write an interpreter in?
<companion_cube> ocaml is certainly used for first-order theorem provers
<dmiles_afk> (as compare to prolog)
<flux> I haven't actually written an interpret in prolog, and not much anything else either ;), but I'm still going to say "yes"
<dmiles_afk> i know my question is a little tooo vague there
<companion_cube> prolog is quite different: untyped, relies on reflection, provides backtracking and unification out of the box
<dmiles_afk> the fact you can say "yes" there gives me confidence.. if this was C .. they'd think i was out of my head asking
<companion_cube> otoh it's more difficult to do non-backtracking stuff with prolog
<companion_cube> dmiles_afk: there are several theorem provers in OCaml
<companion_cube> it's certainly doable
<dmiles_afk> companion_cube: why i am considering i ocaml as a replacement language :)
Haudegen has quit [Ping timeout: 248 seconds]
<companion_cube> I think there is a book on automated theorem proving with simple examples
malc_ has joined #ocaml
<companion_cube> might be this one!
<dmiles_afk> ok yes .. i realtyl be trying to find that book for under 40$
<dmiles_afk> actualyl for arround 20$
<dmiles_afk> some books seem to be so hard to find cheap
<fds> It's hardback-only and relatively academic, so it's not cheap.
zpe has quit [Remote host closed the connection]
lobo_ has joined #ocaml
yomimono has joined #ocaml
<dmiles_afk> i made a discovery in automaterd theorm proving.. it's actualy not my discxovery since i had hand typed someone theorem prover in..
lobo_ is now known as lobo
ygrek has quit [Ping timeout: 252 seconds]
<dmiles_afk> but this guy had at the point of CNF.. decied you renamne his negated litterals
Hannibal_Smith has joined #ocaml
<dmiles_afk> so if the expession was ~ p(X) v q(X).. to rename not_(P) v q(X).
<dmiles_afk> so if the expession was ~ p(X) v q(X).. to rename not_p(X) v q(X).
<dmiles_afk> then from there keep playing by the standard theories
<dmiles_afk> (of automated theorem proving)
<dmiles_afk> and some insanely amazing stuff happens
<companion_cube> renaming formulas in CNF is useful, yes
<dmiles_afk> the speed increase is as exponential as the combinitorixs
<companion_cube> it avoids exponential blowup
<dmiles_afk> oh this actualyl increases exponential blowup
<dmiles_afk> but! .. the exponential blowup is on unbound unification
Simn has quit [Ping timeout: 252 seconds]
<dmiles_afk> meaning for example not_isa(fido,human) will succedd 8-16 times faster
<companion_cube> huu....
<Hannibal_Smith> Usually you want to use encoding like Tseitin to frasform a formula to CNF
<dmiles_afk> instead of isa(fido,human) taking 20 times longer to fail
* dmiles_afk googling Tseitin to frasform
<dmiles_afk> becasue i cant belive Mark Stickle was the only one to discover what i am sayingh
Haudegen has joined #ocaml
<companion_cube> part of the handbook of automated reasoning, contains all the useful stuff for advanced CNF
<companion_cube> Stickel?
<dmiles_afk> yes
<dmiles_afk> oops ..
<companion_cube> I don't remember well, is he the author of mace4 ?
<dmiles_afk> PTTP
nullcat_ has joined #ocaml
<dmiles_afk> i think maceX some version was based on it
<dmiles_afk> but then everyone freaks on the combinitorics as "fixes" it
<dmiles_afk> and dont realize they lose a secret edge they could have gained
<dmiles_afk> but then everyone freaks on the combinitorics and "fixes" it .. and loses some secret power
<dmiles_afk> (some not fully realized power)
<dmiles_afk> METEOR, SETHEO, XRAY, MOTEL are did a so-called fix for the combintitorics
<companion_cube> I don't think there is a "secret edge" regarding CNF
<dmiles_afk> actually i know .. even Stickel "suspected this edge but said he wanted to investigate
<dmiles_afk> when it has to do with is a non elimination strategy
<dmiles_afk> instead of eliminating possible silly tautolgies.. to instead realize those as errors in a model db form
<dmiles_afk> and to correct those tautogies not by removing them.. but by verbosifying them
<companion_cube> I'm not following
<dmiles_afk> sorry to try to talk about this in this context.. i need to write soemnthing out to explain
<companion_cube> removing tautologies is never a problem
<dmiles_afk> "removing tautologies is never a problem" is because it's legal
<dmiles_afk> just cuz its legal dont make it good ;)
<dmiles_afk> (sorry to resort to cliche)
<companion_cube> well, it's legal and it prunes the search space
<companion_cube> so it's pretty good
<dmiles_afk> until i actually write out (not on irc) it would be hard to follow.. i guess what i am saying is there might be something to closing search space without pruniung.. but using the unpruned to help ultra-prune
<companion_cube> hmmmm.
<dmiles_afk> i cant untra-prune at query time if i spent too much time pruning at assert time
<dmiles_afk> untra-prune
<dmiles_afk> ultra-prune*
<companion_cube> hmmm.
<dmiles_afk> what there is is much much overlap between assertions
<dmiles_afk> this overlap is annoying and we prune it away ussually
<dmiles_afk> sounds like i have your ear but i have to putline it better than i would be about toi :(
<companion_cube> I'll wait to see your implementation :)
<dmiles_afk> ok.. if i dont get anyhtijng done today i will have at least powerpointed this with the impl
<dmiles_afk> since i somehow otherwsie will keep mucking about and 1/2 arse exmplaining
<dmiles_afk> hehe
<dmiles_afk> sorry i am getting use to center button
<dmiles_afk> god yes.. this paper is perfect.. its the antitheis
<dmiles_afk> its the antithesis :)
sh0t has quit [Ping timeout: 256 seconds]
obadz has quit [Ping timeout: 256 seconds]
obadz has joined #ocaml
mcclurmc has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
<dmiles_afk> ah yes this is the exact paper that explains WHY everyone should freaks on the combinitorics and fix it.. and how
<dmiles_afk> they pick on "Standard CNF-Translation " .. and outline a new standard which is now is the new standard
<companion_cube> more or less, yes
Simn has joined #ocaml
hay207 has joined #ocaml
<dmiles_afk> do i have it correct that their way of doing it is pretty much now the only way people bother to do it anymore?
nullcat_ has quit [Ping timeout: 255 seconds]
nullcat_ has joined #ocaml
<dmiles_afk> (I've looked t several systems and so far i see that)
<companion_cube> mostly yes, for systems using CNF
<dmiles_afk> something i cant seem to find is any systems using DNF (or is that not a valid thing i can find?)
<dmiles_afk> (i just heard a few times.. some ssytems ussing CNF .. if they used the DNF they world's cobiitorical happen in the opposite)
<companion_cube> DNF, hmmm, I don't think anyone uses that
<dmiles_afk> like "sometimes the CNF will grow but not the DNF.. or visa versa) so wheter thats true or not i dunno.. so i am thinkinm ghtere must be a DNF prooofing method
<companion_cube> maybe connection tableaux, I'm not sure
badkins has joined #ocaml
matason has quit []
ygrek has joined #ocaml
<dmiles_afk> ok.. another question is there a form that moves modal operators inwards close to litterals?
<dmiles_afk> (most forms are not said to do anything with modals)
<companion_cube> modal operators? tough
<companion_cube> for modal logic, proof techniques are different
<companion_cube> (mostly tableaux)
<nullcat_> good evening everyone
<dmiles_afk> i've been trying to convert Exists X p(X) to (All possible ~p(X))
<dmiles_afk> Exists X p(X) to (All X ~possible ~p(X))
<nullcat_> the first program fails while the second type checks
<nullcat_> i thought compiler could be smarter..
<dmiles_afk> (steps i use top avoid skolemizations)
<dmiles_afk> (but it'd be nice to be nice to not totally have left the ranch)
<companion_cube> nullcat_: GADTs are hard
hbar has joined #ocaml
<nullcat_> yeah i remember one maintainer said GADT type inference is notoriously hard, something like that
<companion_cube> undecidable, indeed
<nullcat_> well, then i hope I can know more errors and i'll have enough experience
<companion_cube> same, you need all cases to be handlded separately
<nullcat_> oh really.. in my "fail.ml"?
<companion_cube> I mean, whne you pattern match a GADT
<nullcat_> on line 10, a programmer know here ``m'' is confined to ``Failure int''
<companion_cube> yes
<nullcat_> the whole pattern matching should type check
<nullcat_> but compiler cannot decide?
toolslive has joined #ocaml
<nullcat_> so in line 10 of pass.ml, we have explicitly write Failure x..
<nullcat_> i see
<companion_cube> the compiler must treat all branches separatly I think
<companion_cube> it's a problem of generalization
<nullcat_> um..
<nullcat_> first time i feel i am smarter than compiler...
zpe has joined #ocaml
<Drup> but, hum, the gadt is useless here
<Drup> type 'a result = Success of 'a | Failure of int is equivalent
<dmiles_afk> i think a verifiier needs to have explicit rules of what true means and even more expplicit rules of what inccorect means
<Drup> nullcat_: is your real example more complicated/interesting ?
zpe has quit [Ping timeout: 244 seconds]
<dmiles_afk> we could if we wanted to have even more explicit rules about what incorrect looks like.
<dmiles_afk> (and should have.. so we have less intractibility)
nullcat_ has quit [Ping timeout: 272 seconds]
hay207 has quit [Quit: Leaving]
badkins has quit [Ping timeout: 272 seconds]
badkins has joined #ocaml
nullcat_ has joined #ocaml
Simn has quit [Quit: Leaving]
thomasga has joined #ocaml
<nullcat_> Drup: yes. Success can give us a pair of char, or a single char
<nullcat_> e.g parser combinator
<nullcat_> x ~ y gives us both x and y, if it succeeeds
<Drup> ?
<Drup> show the real type :p
thomasga has quit [Quit: Leaving.]
<nullcat_> i mean a user can write a parser combinator. this parser can return a success result, or failure
<Drup> if it's really the type, as I said, no need for a gadt
<Drup> the type I gave is strictly equivalent to the one you wrote
<nullcat_> this success result can have anything, maybe user writes this parser so finally it gives us a pair of char
<nullcat_> for example, use 'h
<Drup> yeah, so does the one I wrote
<nullcat_> use 'h' ~ 'i' parses "hi". we have Success ('h', 'i')
<nullcat_> so i need GADT
<nullcat_> i am sure i need GADT here.. or maybe not......
<nullcat_> use 'h
<nullcat_> use 'h' to parse a single character input 'h' will succeed and give us Success 'h'
felipealmeida has joined #ocaml
<felipealmeida> hello, is there a way to link to asmrun and have a certain ml string be executed without calling camlc?
<nullcat_> i can show you my code.. hold on
<Drup> nullcat_: ok, so let me rephrase in one complete sentence not intersperse in the discussion
<nullcat_> i understand what you said
<Drup> ok, show me :)
mcclurmc has quit [Remote host closed the connection]
seanmcl has quit [Ping timeout: 256 seconds]
mcclurmc_ has joined #ocaml
<nullcat_> don't ask me why I need to write in such a weird way... it's just some sketch of idea...
<nullcat_> anyway, compile with ``metaocamlc staging_parser.ml''
<Drup> still no need for a gadt
<nullcat_> ok....
mcclurmc_ has quit [Remote host closed the connection]
<Drup> gadts are here to introduce relations between the type of an expression and the constructor used
<Drup> but here, consider an expression of type "t parse_result" for some t
<nullcat_> um...
<Drup> can you etablish a link between t and the constructor used ?
<Drup> The answer is no, whatever t is, you could create a value of this type with either constructor
<nullcat_> yeah there is not link..
<Drup> (assuming t is inhabited, but that's a detail really)
<nullcat_> my bad :(.......
<Drup> Don't feel bad, gadt are complicated
<Drup> gotta start somewhere :D
<nullcat_> let me see... i am not sure if in the future i need it
<nullcat_> i should observe that.. i got confused
<nullcat_> it's pretty clear to me now
<Drup> (btw, if you consider Result.t as added in the stdlib recently, type 'a parse_result = ('a * pos, pos) Result.t
<nullcat_> already? in 4.02.2?
<Drup> No
<nullcat_> ok..
<Drup> just pointing out the relation :)
Kakadu has quit [Remote host closed the connection]
<nullcat_> ok..
<nullcat_> actually i went gadt first without even trying normal type..
<nullcat_> (* facepalm *)
<Drup> Every problem can be solved by adding more gadts :D
<nullcat_> lol
<Drup> (might also work with functors)
zpe has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
kdef has quit [Quit: Leaving]
zpe has quit [Ping timeout: 256 seconds]
andrewalker has joined #ocaml
lobo has quit [Quit: leaving]
AdmWiggin is now known as tianon
segmond has joined #ocaml
rgrinberg has quit [Ping timeout: 248 seconds]
badkins has quit []
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has joined #ocaml
walter|r has joined #ocaml
<l1x> :D
<l1x> Drup: so true
sh0t has joined #ocaml
toolslive has quit [Ping timeout: 252 seconds]
Hannibal_Smith has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
MrScout_ has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has quit [Ping timeout: 248 seconds]
milosn has quit [Ping timeout: 255 seconds]
milosn has joined #ocaml
mcclurmc has quit [Ping timeout: 276 seconds]
nullcat_ has joined #ocaml
nullcat_ has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
MrScout_ has quit [Remote host closed the connection]
madroach has joined #ocaml
MrScout has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
badon has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo_ has joined #ocaml
swgillespie has joined #ocaml
creichert has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 252 seconds]
sh0t has quit [Ping timeout: 283 seconds]