<hongboz>
vext01: I am not sure, you may ask lemma
<hongboz>
but the link above provides a systematic way to using syntax extesion. It's worth a look.
tmaedaZ has quit [Ping timeout: 240 seconds]
testcocoon has quit [Ping timeout: 249 seconds]
testcocoon has joined #ocaml
eni has joined #ocaml
<thelema_>
vext01: you may need `-syntax camlp4o` as well for ocamlfind to engage camlp4 mode
<thelema_>
as far as I can tell, there's no way to have `-package foo` turn camlp4 pre-processing on.
<thelema_>
also, just `-package batteries.syntax` should suffice, as it depends on the `batteries` package
<thelema_>
so you shouldn't need both
<thelema_>
no harm in specifying both
hongboz has left #ocaml []
<vext01>
thelema_: yeh i figured out the -syntax part
<vext01>
now Enum is unbound
Submarine has quit [Quit: Leaving]
<vext01>
open Batteries_uni;; was needed
ankit9 has quit [Quit: Leaving]
Progster has quit [Ping timeout: 264 seconds]
<thelema_>
vext01: or build with threads
<thelema_>
but you've got it working, so good.
emmanuelux has quit [Ping timeout: 248 seconds]
vext01 has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Submarine has joined #ocaml
cago has quit [Quit: Leaving.]
mika1 has quit [Quit: Leaving.]
lamawithonel has joined #ocaml
Progster has joined #ocaml
braibant has joined #ocaml
Progster has quit [Ping timeout: 260 seconds]
silver has quit [Read error: Connection reset by peer]
ocp has quit [Ping timeout: 240 seconds]
ocp has joined #ocaml
Submarine has quit [Quit: Leaving]
ocp has quit [Ping timeout: 246 seconds]
braibant has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
err404 has quit [Remote host closed the connection]
braibant has joined #ocaml
braibant has left #ocaml []
<hcarty>
thelema_: How did the oasis-db work/testing go yesterday?
<thelema_>
hcarty: not fixed
<thelema_>
if you read the logs, you know as much as I
<hcarty>
thelema_: Ah, ok. I wasn't sure if there was something extra there.
<thelema_>
nope, I think it ended with gildor going to sleep.
Yoric has quit [Ping timeout: 245 seconds]
<adrien>
was 1am in Frane
<adrien>
France*
eni has quit [Read error: Connection reset by peer]
<thelema_>
that's more or less what I expected
mnabil has quit [Ping timeout: 265 seconds]
pangoafk is now known as pango
eni has joined #ocaml
<hcarty>
That seems reasonable
gnuvince has quit [Ping timeout: 246 seconds]
gnuvince has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
netrino has joined #ocaml
Xizor has joined #ocaml
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
ImAlsoGreg has joined #ocaml
avsm has joined #ocaml
iago has quit [Ping timeout: 265 seconds]
ftrvxmtrx has joined #ocaml
thomasga has joined #ocaml
vext01 has joined #ocaml
gnuvince has quit [Quit: Remember when men were men and regular expressions recognized regular languages?]
gnuvince has joined #ocaml
iago has joined #ocaml
<fasta>
The Hump seems rather useless, considering that more than 70% of my small sample doesn't exist anymore. What's the location of choice to see what is available?
<adrien>
depends on the project; for some projects, archive.org
<adrien>
do you have one in mind in particular?
<fasta>
adrien: I was looking for STM for OCaml.
<fasta>
adrien: or better: some kind of distributed STM.
<fasta>
I believe STM can be made to run extremely efficiently.
<fasta>
That is, just as efficient as any lock based method.
<fasta>
What I don't get is why nobody has done that yet.
<orbitz>
Maybe because it's really hard?
<fasta>
Well, what complexity class is it?
<fasta>
I don't think it is undecidable.
<fasta>
"It" being a compilation from some STM language to one with a minimal amount of locking.
<orbitz>
I dunno, I'd expect you to since you belief it can be made so fast :)
<fasta>
I think that given some more type-system tricks, you can can even make it as fast as lockless programming.
<fasta>
That is, no explicit synchonization.
<fasta>
synchronization*
<orbitz>
I doubt it
<fasta>
Which is exactly why I have been so surprised with people writing papers about how bad it works.
<orbitz>
If you have two transactions touching the same data, you clearly have to do something about htat
<fasta>
Yes, but if you already know that only one of the two will collide in the future, there is no need to try to run both to completion.
<fasta>
And that's something you could know.
ulfdoz has joined #ocaml
<orbitz>
What do you mean by lockelss programming I guess? If you have two threads accessing teh same data you are going to get nondeterministic output
<orbitz>
It will be hard for something guranteeing you detemrinsitic output to beat that in that situation
<fasta>
Only if you don't know what's happening in the threads.
<orbitz>
fasta: You can't really know it, halting problem and what not
<fasta>
orbitz: no correct business program doing these things exposes a Turing-Complete language.
<orbitz>
The post-mortem on trying to get STM in .Net is a pretty intresting read if you haven't
<orbitz>
fasta: I'm not sure what you mean?
<fasta>
For .Net it is fairly obvious as to why it's a bad idea.
<fasta>
orbitz: most people don't write undecidable programs.
<orbitz>
Actually there are a lot of reasons it's bad in .Net, the post mortem is very fascinating
<orbitz>
They don't? I think the opposite
<fasta>
orbitz: how so?
<orbitz>
Any program with a loop in it
<fasta>
orbitz: there is nothing undecidable about that.
<fasta>
orbitz: it depends on the contents of the loop.
<orbitz>
fasta: You think you can take an abritrary ocaml program and decide, before runnign the code, which variables will conflict on access?
<fasta>
orbitz: assuming that the program is correct and is not Turing-Complete, yes.
<orbitz>
Ocaml is turing complete
<fasta>
orbitz: you are not getting it.
<orbitz>
What am I not getting?
<fasta>
orbitz: it's about the program itself.
<fasta>
orbitz: not about the whole space of possible programs.
<fasta>
orbitz: and the important assumptions I listed.
<orbitz>
I'm not sure what you're trying to say. Ocaml is turing complete
<fasta>
orbitz: yes, OCaml is, but the language being processed by the machine specified in the OCaml language is not.
<orbitz>
Ah ok, so you're trying to do STM on a sublanguage?
<orbitz>
That is what I did not know.
<fasta>
orbitz: no
<fasta>
orbitz: the sublanguage is the language of all correct semi-decidable programs.
<fasta>
orbitz: I argue that this is a huge space and contains almost all practical programs.
<fasta>
orbitz: now, the efficiency for this is likely extremely low.
<fasta>
orbitz: but... I think a more simple lock based approach would be practical.
gnuvince has quit [Ping timeout: 244 seconds]
<orbitz>
I'm pretty sure that view is incorrect. even a simple Ocaml program is undecidable AFAIK
<fasta>
orbitz: so, then you have STM semantics with lock based performance.
<fasta>
orbitz: no
<orbitz>
Well, when you make that kind of convincing arguemnt..
<fasta>
orbitz: if the program loops forever, then it will loop forever.
<fasta>
orbitz: it being the compiler.
<orbitz>
How do youd etermine if it loops forever?
<fasta>
orbitz: you can't.
<orbitz>
Exactly
<mrvn>
often you can
<fasta>
orbitz: but... if the loop is of productive nature, it won't loop forever.
<orbitz>
what is "productive nature"?
<fasta>
orbitz: that you can prove via co-induction that it works.
<orbitz>
what is "productive nature"?
<fasta>
or rather that it performs useful work.
<fasta>
orbitz: consider an OS.
<fasta>
orbitz: it runs forever, but executes user commands.
<orbitz>
Can you just give me the defintion of productive nature?
<fasta>
orbitz: it's an example of 'productive nature'.
<fasta>
orbitz: a program which produces results over time in a stream like fashion.
<orbitz>
What is the defintion of "productive nature"
<orbitz>
fasta: How do you prove a loop is of "productive nature" and how does it get you any close to determining if two transactional blocks will access the same variables without running it?
<Ptival>
rixed: nice alias ocaml, stolen :)
<fasta>
orbitz: theorem provers already do the first thing.
<fasta>
orbitz: but it's just that nobody applied it on full user programs, because it would be very inefficient.
ulfdoz_ has joined #ocaml
<fasta>
Or well, not inefficient, more like very hard.
<orbitz>
Indeed, very hard.
<fasta>
Inefficient would imply that there is amore efficient way.
<orbitz>
Undecdibly hard!
<fasta>
Semi-decidably hard.
<pippijn>
decidable in special cases
<pippijn>
and theorem provers require you to use the subset of these special cases
<mcstar>
dont you need locks to actually implement an stm?
<orbitz>
Maybe, probably not
<ssbr>
fasta: oh hey you're using that notation (decidable, semidecidable, co-semidecidable)
<fasta>
mcstar: a lock is a logical construct.
<fasta>
ssbr: yes
<ssbr>
fasta: where did you learn it? Most people I know use other terms
<fasta>
ssbr: at some fairly theoretical university
<ssbr>
maybe it's just a prof's choice of textbooks, but I am intrigued
<ssbr>
fasta: was it the university of toronto?
<fasta>
ssbr: no
<ssbr>
baw.
<fasta>
ssbr: we don't use co-semidecidable.
<ssbr>
(UofT has Stephen Cook, who uses that terminology -- that's where I learned computability theory from)
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
<fasta>
Even then, we don't even have Turing machines.
<ssbr>
fasta: Oh my.
<fasta>
And will likely never have them.
<fasta>
All results regarding infinity are fantasy, imho.
<fasta>
Looks good on paper, but has little resemblance to reality.
<ssbr>
people like to play pretend even when working in reality
<fasta>
Except for statistics perhaps.
<fasta>
But statistics is just saying 'we don't know' in an elaborate way.
<mcstar>
fasta: whay is the performance bottleneck in current stms?
<mcstar>
what*
<fasta>
I'd prefer them to try to figure out how it is.
<mrvn>
fasta: the universe is a truing machine. There can be only one
<fasta>
mrvn: yeah, perhaps.
<fasta>
mrvn: it would be cool if we could get an explanation as to how it works when we die.
<fasta>
mrvn: except, I expect to just rot away.
<fasta>
mcstar: the basic problem is the rollbacks and everyone stepping on eachother's toes.
<fasta>
mcstar: imagine you are standing in front of a door with 1000 apple enthusiast and they all need to pee.
<mcstar>
iPee
<fasta>
mcstar: but only one can enter and pee for a few minutes.
<fasta>
mcstar: in the end they will all pee, but the overhead is enormous.
<fasta>
mcstar: if they would just 'see' that someone is already ahead of them in the going to pee process, they could just backoff.
<fasta>
mcstar: now, 'seeing', also takes CPU time, so, if instead you arrange for the situation to never occur, you might also not have the problems.
<pippijn>
I think some of them will starve
<fasta>
pippijn: realistic systems have enough capacity.
<fasta>
pippijn: so, while that is a fine theoretical problem, the practical solution will be to add capacity.
<mrvn>
fasta: That's why you use the right data structure for the right job. In this case a job queue with worker processes (toilets).
<orbitz>
seeing someone else is peeing doesn't help me pee though
<orbitz>
backing off is still contention
<orbitz>
(what do I do when Iback off afterall?)
<fasta>
orbitz: if there are finite resources, the faster you backoff, the better.
<orbitz>
How does that help *my* throughput though fasta?
<orbitz>
What do I do when I backoff?
<mrvn>
.oO(Pee in the bushes)
<fasta>
orbitz: well, you would pee in your pants ;)
<fasta>
orbitz: think of it like working communism.
<orbitz>
but seriously, the analogy you just made doesn't help the actual problem of contention
<fasta>
orbitz: there is less contention, because less CPU time is lost on coordination.
<orbitz>
I don't agree
<orbitz>
What does 'backing off' actually mean?
<orbitz>
My transaction still has to finish
<fasta>
I have some ideas for as to how to implement those.
<orbitz>
Implement what?
<fasta>
I just think that all STM implementations so far have been wonderfully uncreative.
<orbitz>
You're being evasive :(
<fasta>
Yes, I know.
<fasta>
Currently all STM implementations do not take into account the actual program which is being run.
<fasta>
But that's like an algorithm which needs to multiply numbers and doesn't have a special case for one argument being 2.
<orbitz>
Well, good luck.
<fasta>
I have no plans to implement it, because I don't expect anyone to pay me, even if I would succeed.
<fasta>
" In response, the authors proposed a retry command which uses the transaction log generated by the failed transaction to determine which memory cells it read, and automatically retries the transaction when one of these cells is modified, based on the logic that the transaction will not behave differently until at least one such value is changed."
<fasta>
That just screams that someone was drunk and decided to go with that.
<orbitz>
I think it's pretty arrogant to think that teh STM community is missing something you think is so obvious, especially when you don't plan on even implementing it because you won't get paid. That is a general sign of a crackpot.
<fasta>
orbitz: I have corrected people with far greater scientific contributions.
<mcstar>
i dont see how you could arrange for an access pattern for eternity
<fasta>
orbitz: and I have told the GHC developers multiple times how stupid they were in implementing things in certain ways.
<mcstar>
it would work in 1 case out of countably infinite
<fasta>
orbitz: and... they listened.
<fasta>
orbitz: GHC developers aren't as God like as you appear to believe.
<fasta>
In fact, there are lots of things in GHC which aren't really that great.
<orbitz>
I didn't saya nything about GHC developers...
<fasta>
orbitz: that's a quote from a Haskell STM paper.
<mcstar>
fasta: could you make your idea more clear? what would prevent the resources being used to detect access?
<orbitz>
fasta: Ok, I don't memorize GHC STM papers
<fasta>
orbitz: neither do I, it was on the wikipedia article, but I just remembered it.
gnuvince has joined #ocaml
<fasta>
mcstar: basically it currently looks whether a variable has changed which affects the condition.
<fasta>
mcstar: AFAIK, it doesn't take the actual logic into account for the whole transaction to fail.
<fasta>
mcstar: and since in almost all cases it has source, it could do that.
<mrvn>
fasta: because that is the halting problem already
<fasta>
mrvn: the halting problem is not an argument, because nobody writes undecidable programs for business applications unless they made a mistake.
<orbitz>
I don't see how that is true.
<mcstar>
how would you cope of nondeteminicism?
<fasta>
mrvn: I used to know a program which did something useful which had no proof of termination, but currently I don't know of any such program anymore.
<mcstar>
of -> with
<fasta>
mcstar: there is no reason to have a non-deterministic system.
<mcstar>
it is, not by choice
<fasta>
mcstar: like?
<mcstar>
well, just interface with the world
<orbitz>
a webserver
<mcstar>
if you have to listen to event that arent controlled by your software..
<mrvn>
as soon as you have input not under your control it is non-deterministic
<mcstar>
you cant predict the evolution of the simplest programs
<mcstar>
whether it is written in a deciable domain or not
<mcstar>
(sry for my typos)
<fasta>
mcstar: just because your input comes unexpectedly doesn't mean your program has to become non-deterministic.
<orbitz>
Yes it does
<fasta>
Well, this is a definition issue then.
<mrvn>
fasta: but your input it
<mrvn>
is
<fasta>
mcstar: why wouldn't you be able to do that?
<orbitz>
fasta: select() is non determinsitic
<mrvn>
so you have to proof every possible outcome and that usualy grows exponential or more till you run out of ram and/or time
<fasta>
orbitz: so, don't use select.
<orbitz>
In a program at all?
<orbitz>
That makes it rather hard to write useful software
<thelema_>
fasta: "undecidable programs" doesn't make sense to me - a collection of programs is decidable relative to a given problem or query - decidable relative to the halting problem is different from decidable whether or not the syntax is correct.
<mcstar>
i think he basically wants to hardcode the access pattern of the STM into the algorith, or similar
<orbitz>
fasta: Imagine this: You have 2 threads listening on events from the user. Based on the input from the user different paths wil lbe taken which contain STM blocks. How do you predict varaible access order?
<thelema_>
In general, non-trivial properties of the runtime behavior of programs are undecidable in across the class of all programs, but for any particular problem or query, the "decidable" inputs can depend on the algorithm
<thelema_>
so your definition seems to be recursive - we want to only handle those inputs that we can handle.
<orbitz>
feels like a taco bell night
<hcarty>
Reading the recent logs is a little surreal...
<Ptival>
is there a way to name the builtin float after it's been shadowed?
<mrvn>
no
<hcarty>
Ah, never mind. The tunes.org logs showed what I was missing.
<Ptival>
hmmm, that's unfortunate
eni has quit [Ping timeout: 255 seconds]
Yoric has joined #ocaml
gnuvince has quit [Ping timeout: 246 seconds]
eni has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
Haseo has quit [Read error: Connection reset by peer]
Haseo has joined #ocaml
_andre has quit [Quit: leaving]
lamawithonel has quit [Ping timeout: 246 seconds]
osa1 has joined #ocaml
sepp2k has quit [Ping timeout: 246 seconds]
iago has quit [Ping timeout: 265 seconds]
Submarine has quit [Remote host closed the connection]
sepp2k has quit [Remote host closed the connection]
Yoric has joined #ocaml
gnuvince has joined #ocaml
<Drakken>
I want to define (debugf = Printf.[i]fprintf stdout) polymorphically, but the typechecker keeps locking in the type based on the first use of debugf.
<thelema_>
Drakken: eta-expand; let debugf fmt = Printf.ifprintf stdout fmt
<thelema_>
Drakken: it has to look like a function for ocaml to make it fully polymorphic
<Drakken>
yep. I got it right after I posted :/
<Drakken>
thanks thelema_
<gildor>
thelema_: problem solved
<gildor>
there was a Lwt_list.rev_map_p (parallel processing)
<gildor>
change it to Lwt_list.rev_map_s (serial)
<gildor>
but I am not satisfied because it is really slower
<gildor>
diml: ping
<thelema_>
gildor: yay it's working
<thelema_>
gildor: any chance you can have it do less work?
<gildor>
diml: I have a Lwt_list.rev_map_p which opens too many file at the same time
<gildor>
thelema_: I didn't deploy the new version, so your are just lucky right now
<thelema_>
oh. ok
szbr has quit [Quit: Oh no a virUs w4t$ `s H4P&&*/{````----<z!,,,... _ .,<|\_]
<gildor>
diml: how can I limit to a "certain" level of //
ssbr has joined #ocaml
<gildor>
thelema_: do less work, well maybe -- but this is the part that compute dependencies error
<gildor>
thelema_: i.e. it is the "not trivial" part of the panel.
<thelema_>
ah, I see.
<thelema_>
well, dependencies in unstable can be recomputed when a package is uploaded
<gildor>
if i turn off the function packager_dependency_error, display is almost immediate
<gildor>
but not detection of problems
<thelema_>
and stable can be free of dep errors, so no need to check those (only need to check at promotion time)
<thelema_>
so the only hard bit is testing
<thelema_>
would it be reasonable to make a different page that shows dep errors?
<gildor>
thelema_: well I do prefer to create something more efficient ;-)
<thelema_>
then pre-computing dep errors when a repo changes seems to be the obvious solution
<gildor>
thelema_: and just looking at the code, I think I can
<gildor>
thelema_: what do you prefer, deploy now with slow deps or deploy later with fast dep
<thelema_>
for testing -> stable?
<gildor>
I mean I can deploy 0.1.0~alpha4 of oasis-db to give you a reliable access to the odb admin panel now or later
<thelema_>
oh. now w/ slow deps
<thelema_>
it'll be nice if the fast deps eventually come, but "working" counts for a lot.
<gildor>
do you think access to the panel is high priority or you can live with it ?
<thelema_>
"live without it"?
<gildor>
ok, I'll need to spend a couple of hours to fix a few stuff and you'll have it
<thelema_>
The big thing I want to do now is promote packages to testing.
<gildor>
you'll have fast deps at the end, no worries
<thelema_>
not a big rush on fast deps, at least from my perspective now; we'll see once I'm into doing promotions
<gildor>
I am not the kind of guy that think it is ok to wait 5s to have a web page
thomasga has quit [Quit: Leaving.]
<thelema_>
it might be useful to be able to change the testing version of many packages at once, if refreshing is slow
netrino has quit [Quit: Ave!]
<thelema_>
5s? hmm, that is quite slow.
<gildor>
RSN, I'll go to bed -- will work on it tomorrow
<thelema_>
now w/ no deps is probably best in that case.
<gildor>
yes, this is slow
emmanuelux has quit [Quit: @+]
<thelema_>
can you deploy the no deps version tonight?
<gildor>
...
<gildor>
fire up my build daemon
<thelema_>
or it's a bunch of work to just deploy, and it's 1:30AM local time, so you want to sleep?
<thelema_>
I'm fine with the second answer.
<thelema_>
both are reasonable.
<thelema_>
the question is: how easy is it to deploy?
<gildor>
will see how effective it was to spend time on my CI stuff
<thelema_>
:)
<thelema_>
if it takes too long, I can wait another day.