<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.
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…]
<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
<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>
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