cjeris changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
postalchris has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Read error: 104 (Connection reset by peer)]
david_koontz has left #ocaml []
mikeX has quit ["leaving"]
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
mattam has quit [zelazny.freenode.net irc.freenode.net]
oscarh has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
joshcryer has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
postalchris has joined #ocaml
joshcryer has quit [Read error: 131 (Connection reset by peer)]
joshcryer has joined #ocaml
postalchris has quit [Read error: 145 (Connection timed out)]
postalchris has joined #ocaml
zarvok has joined #ocaml
Submarine has joined #ocaml
a-priori__ has joined #ocaml
cmvjk has quit [zelazny.freenode.net irc.freenode.net]
a-priori_ has quit [zelazny.freenode.net irc.freenode.net]
mbishop has quit [zelazny.freenode.net irc.freenode.net]
tsuyoshi has quit [zelazny.freenode.net irc.freenode.net]
gunark has quit [zelazny.freenode.net irc.freenode.net]
Smerdyakov has quit [zelazny.freenode.net irc.freenode.net]
Smerdyakov has joined #ocaml
mbishop has joined #ocaml
a-priori_ has joined #ocaml
gunark has joined #ocaml
cmvjk has joined #ocaml
tsuyoshi has joined #ocaml
mattam has joined #ocaml
a-priori_ has quit [Connection timed out]
postalchris has quit [Read error: 148 (No route to host)]
Smerdyakov has quit ["Leaving"]
<flux> I wonder how nicely .NET/Mono supports types like 'a foo -> ('a bar * 'a).. I suppose the signatures should only matter during type checking, though
Z4rd0Z has joined #ocaml
zarvok has quit ["My damn controlling terminal disappeared!"]
Z4rd0Z has quit []
pango has quit ["I shouldn't really be here - dircproxy 1.0.5"]
pango has joined #ocaml
jeberle has joined #ocaml
jeberle has quit ["leaving"]
benny has joined #ocaml
bluestorm_ has joined #ocaml
benny_ has quit [Read error: 60 (Operation timed out)]
smimou has joined #ocaml
Submarine has quit ["Leaving"]
bluestorm_ has quit ["Konversation terminated!"]
bluestorm_ has joined #ocaml
love-pingoo has joined #ocaml
eradman has quit [zelazny.freenode.net irc.freenode.net]
eradman has joined #ocaml
smimou has quit ["bli"]
Mr_Awesome has quit ["...and the Awesome level drops"]
ppsmimou has joined #ocaml
gim has joined #ocaml
ppsmimou has quit [zelazny.freenode.net irc.freenode.net]
eradman has quit [zelazny.freenode.net irc.freenode.net]
ppsmimou has joined #ocaml
eradman has joined #ocaml
jlouis has quit [Remote closed the connection]
<love-pingoo> is Thread.delay always guaranteed to offer millisecond precision ?
ppsmimram has joined #ocaml
ppsmimou has quit [Connection timed out]
<flux> doubtfully, that would be an operating-system dependant guarantee, namely it would require a real-time operating system?
<love-pingoo> millisec is not that much
<flux> linux used to have operating system timer running at 100Hz
<flux> I think nowadays it runs at 1000, though
<love-pingoo> but I don't really need milliseconds.. I just want to be sure that I won't end up with seconds
<flux> I don't see how can you get a guarantee (without rtos) that the delay between any two cpu-instructions in your program won't be seconds..
<flux> but I suppose usually Thread.delay should be enough
<love-pingoo> in other words I want to be sure that float here means that you have at least 10th or 100th of seconds available, and not that it is here only for the machines which easily allow that
<love-pingoo> flux: I'm doing quasi-realtime in ocaml so I have more serious guarantee breakers anyway :)
<flux> love-pingoo, how about garbage collection, btw?-)
<flux> real-time gc for ocaml could be nice
<flux> (..not to mention, multi-threaded..)
<love-pingoo> flux: it's the main thing that prevents me from being really realtime
<love-pingoo> the fact that it is not parallel is already pretty bad (in theory only, though)
<love-pingoo> I don't even know if it could be realtime..
<flux> there are realtime gc's
<love-pingoo> and actually, I don't care, I'm happy with the current state
<love-pingoo> flux: wow
<flux> or atleast white papers on that :)
<flux> there were some parameters though
<flux> and basically the gc got a certain fraction of your cpu time
<love-pingoo> that's really impressive
<flux> with the downside that you had a certain amount of excess allocated memory
bluestorm_ has quit [Remote closed the connection]
Oyd1111_ has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
oscar_h has joined #ocaml
eradman has quit [zelazny.freenode.net irc.freenode.net]
Oyd1111_ has quit [Read error: 110 (Connection timed out)]
pingoo has joined #ocaml
love-pingoo has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Read error: 131 (Connection reset by peer)]
slipstream-- has joined #ocaml
Z4rd0Z has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
<pingoo> would you consider it a bug if Thread.delay raised Unix.errors ?
<flux> hmm.. maybe.. is someone using the Thread-module expected to care about the Unix-module too?
pattern has quit [zelazny.freenode.net irc.freenode.net]
<flux> it's raiding Unix.Unix_error (Unix.EINTR, _, _) ?
<flux> raising even
pattern has joined #ocaml
smimou has joined #ocaml
bsmith has joined #ocaml
bluestorm_ has joined #ocaml
<pingoo> flux: yes it's raising Unix.Unix_error
<pingoo> that's ok for me (but surprising) but it may be really troublesome on some arch where the Unix module isn't even available
<flux> surely it must be available if it's throwing exceptions from it?
<flux> but atleast it should be documented. maybe other behavior would be better. one can always use Unix.select [] [] [] 0.42 (but that looks hackish too..)
<flux> ((and here's a thing about Unix.select that's always annoyed me: why is the time argument 'negative or non-negative float' and not 'float option'))
<pingoo> flux: I used to use select and moved to delay in order to avoid Unix_error (Unix.EINTR,_,_)
<flux> :-)
<flux> well, there's really no good solution
<flux> you need to keep track of the time you want still want to sleep
<flux> which is nearly impossible considering the possibility someone can change the system time
<flux> so to be bullet-proof you need some heuristics for time warps
<pingoo> that's annoying yes
<flux> which sucks.
postalchris has joined #ocaml
angeltt has joined #ocaml
angeltt has left #ocaml []
angeltt has joined #ocaml
angeltt has left #ocaml []
eradman has joined #ocaml
eradman has quit [zelazny.freenode.net irc.freenode.net]
eradman has joined #ocaml
postalchris has quit [Read error: 148 (No route to host)]
pingoo has quit ["Leaving"]
gim has quit [Read error: 145 (Connection timed out)]
gim has joined #ocaml
pstickne__ has joined #ocaml
pstickne_ has quit [Connection timed out]
gim has quit [Read error: 60 (Operation timed out)]
gim has joined #ocaml
pango has quit [Remote closed the connection]
gim has quit [Read error: 145 (Connection timed out)]
Smerdyakov has joined #ocaml
<bsmith> is the value of a let expression defined when there is no 'in' clause?
<bsmith> the language reference doesn't even show 'in' to be optional, which is confusing
<Smerdyakov> It's not optional.
<Smerdyakov> There are 'let' declarations and 'let' expressions.
<Smerdyakov> Different syntax and semantics
<bsmith> ah, my mistake
<bsmith> the declaration is the statement without 'in'?
<Smerdyakov> Yes
<bsmith> great, is the value of a let declaration defined?
<bsmith> looking harder in the reference now
pango has joined #ocaml
<Smerdyakov> Declarations don't have values.
<Smerdyakov> BTW, I'm using SML terminology. I don't know how the OCaml manual describes the difference.
gim has joined #ocaml
<bsmith> okay, thanks
<bsmith> does that mean that the value is defined to be nothing, or that the value is undefined?
<Smerdyakov> That means that it is completely nonsensical to talk about values of declarations.
<Smerdyakov> Like talking about the value of the sky
<Smerdyakov> Or the weight of the number 5
<bsmith> by let declarations, we're talking about statements such as 'let a = 5;;', right?
<Smerdyakov> I don't know if that's called a "statement" in OCaml, but yes.
<bsmith> why would it be nonsensical for the statement as a whole to evaluate to 5?
<Smerdyakov> BTW, if you include that code in a source file, you shouldn't use the semicolons.
<bsmith> (i don't know the terminology either, i'm just choosing a neutral term)
<Smerdyakov> Why would it be nonsensical for 5 to have a weight? This is just the way OCaml is defined.
<bsmith> i'm sorry? why are you referring to weights?
<bsmith> i was asking why it would be nonsensical for (let a = 5) to evaluate to 5
<Smerdyakov> Think of it this way: declarations implement an interface that has no method for asking for a value.
<Smerdyakov> Maybe even better: Ask yourself why there would be any benefit to anyone to saying that any declaration had a value.
<bsmith> the benefit would be simple convenience
<bsmith> i'm not arguing that ml is flawed, i was just wondering what the standard said
<bsmith> i can't think of any drawbacks, so it's not clear why the declaration shouldn't have a value
<Smerdyakov> Convenience how?
<Smerdyakov> (P.S.: OCaml has no standard.)
<bsmith> sorry, by standard i meant reference
meithal has joined #ocaml
<meithal> hello, does the caml language implement the "exec" statement ?
<Smerdyakov> meithal, there is no multi-language standard of what "an exec statement" is, so you'll need to be more specific.
<Smerdyakov> bsmith, I'd still like to see one example of how declarations-with-values is "convenient."
<Smerdyakov> meithal, then the answer is no./
<meithal> ok, ocaml isn't semi interpreted ?
<meithal> (compiled languages can't allow such statements)
<Smerdyakov> There's no such thing as "compiled languages."
<Smerdyakov> But the answer you're probably looking for is "you're right."
<meithal> i see on wikipedia that it *is* semi-interpreted (ie works with bytecode) so it can potentialy implement something like exec
<bsmith> i'm not thinking of anything deep
<bsmith> but declarations-with-values could save a little typing on the toplevel
<Smerdyakov> bsmith, I can't think of anything _shallow_ that argues your point, either.
<meithal> ok thanks
meithal has left #ocaml []
<Smerdyakov> bsmith, please, just one concrete code example in your proposed alternate language.
<bsmith> i'm just beginning to learn the language
<bsmith> i'll let you know if i come up with a convenient example
<Smerdyakov> Maybe you think I'm just trying to give you trouble, but I really can't think of any example where it even _makes_sense_ for a declaration to have a value, let alone provides some objective value to the programmer.
<haelix> Smerdyakov: what difference do you make between a declaration and binding a name to an object ?
<bsmith> sure, you're probably right about the lack of objective value
<haelix> (I'm thinking lisp, right now)
<bsmith> but i don't see why it wouldn't make sense
<Smerdyakov> bsmith, I would still like to see it making sense, e.g., having any effect on the observable language semantics.
<Smerdyakov> haelix, in ML, it's syntactic.
<bsmith> oh, would it not make sense to say (let a = 1) + (let b = 2) ?
<bsmith> (i don't claim this is at all useful)
<bsmith> but wouldn't a and b subsequently be bound at the toplevel?
<Smerdyakov> bsmith, no. The OCaml syntax doesn't allow that. You are proposing syntax changes, too?
<bsmith> and the expression itself would be able to compute the answer 3
<bsmith> what's the syntax change?
<Smerdyakov> Declarations can only be nested inside module/module type declarations.
<Smerdyakov> They can never be nested inside expressions.
<haelix> I thought "proposed alternate language" meant "free for all syntax" :)
<bsmith> but isn't it really the same issue we are discussing?
<bsmith> the example i typed was very simple; would you say that it shouldn't make sense?
<Smerdyakov> bsmith, no, unless I misunderstood and you meant to be allowed to change the grammar.
<Smerdyakov> bsmith, the example you typed is invalid because it doesn't parse.
<bsmith> since i'm unfamiliar with ocaml, i'm not sure what to suggest here :)
<bsmith> is the implied grammar modification a big deal?
<Smerdyakov> Yes.
<bsmith> would it have substantial implications?
cjeris has joined #ocaml
<Smerdyakov> You seem to be thinking of declarations imperatively.
<Smerdyakov> All variable definitions are lexically scoped in ML.
<Smerdyakov> You are suggesting a way to make declarations that escape local scopes.
<Smerdyakov> That is a fundamental change.
<bsmith> fine, and what about declarations at the toplevel?
<Smerdyakov> What about them?
<bsmith> would my proposed statement declare the variables a and b at the top level scope, in addition to performing my computation?
<Smerdyakov> That would be an example of a fundamental change.
<Smerdyakov> No language construct exists to define anything in anywhere but the narrowest possible local scope.
<bsmith> so are you saying that the bindings for a and b in my expression should expire along with the scope of the expression?
love-pingoo has joined #ocaml
<Smerdyakov> The binding for 'a' should expire along with (let a = 1), and the binding for 'b' should expire along with (let b = 2).
<bsmith> okay, i assume you're talking about language properties at a level i don't understand yet
<bsmith> so i should continue this conversation later
<bsmith> but suppose i run ocaml, which presents me with a toplevel
<bsmith> i type let a = 1;;
<bsmith> let b = 2;;
<bsmith> the bindings for a and b now live in the scope of the toplevel
<Smerdyakov> No.
<Smerdyakov> They are in scope for only the declarations/expressions that follow.
<bsmith> i see, that i don't understand
<bsmith> do you mean as opposed to declarations/expressions that preceded it?
<cjeris> The effect of "let a = 1;;" is that the toplevel behaves as if everything you type after that is in the interior of a "let a = 1 in <...> end", where the "end" does not appear until you terminate the toplevel.
<bsmith> perfect, thanks
<Smerdyakov> This all calls out for a formal semantics.
postalchris has joined #ocaml
<postalchris> Does anyone know of a emacs mode for omake? It's just different enough from make to, er, make makefile-mode annoying...
descender has quit ["Elegance has the disadvantage that hard work is needed to achieve it and a good education to appreciate it. - E. W. Dijkstra"]
jacobian has joined #ocaml
<jacobian> what kind of performance can one expect from ocsigen as compared to apache and fastcgi
Mr_Awesome has joined #ocaml
david_koontz has joined #ocaml
<bluestorm_> jacobian: if you were to test it, i'd be interested in the results
Submarine has joined #ocaml
pstickne__ has quit [Read error: 104 (Connection reset by peer)]
pstickne__ has joined #ocaml
jlouis has joined #ocaml
descender has joined #ocaml
malc_ has joined #ocaml
pstickne__ has quit [Read error: 60 (Operation timed out)]
pstickne__ has joined #ocaml
<jacobian> what solutions are popular on channel for web development in ocaml?
mikeX has joined #ocaml
Z4rd0Z has quit []
<tsuyoshi> I haven't done any yet.. I was thinking of just porting rails to ocaml
<tsuyoshi> wouldn't be hard, since the ruby type system is not too different from the way objects work in ocaml
mnemonic has joined #ocaml
<mbishop> jacobian: ocsigen?
<jacobian> mbishop: http://www.ocsigen.org/
<mnemonic> hi
<mbishop> actually I was suggesting it for you :P
a-priori__ has quit [Read error: 54 (Connection reset by peer)]
a-priori__ has joined #ocaml
a-priori__ has quit [Connection reset by peer]
a-priori__ has joined #ocaml
a-priori__ has quit [Connection reset by peer]
a-priori__ has joined #ocaml
<jacobian> mbishop: ah, sorry
<jacobian> Do you like it?
<jacobian> I'm curious about it, but I wasn't sure how well it works compared to the LAMP stack that I'm used to
<mbishop> I've never used it, but from looking at it, it seems ok...a little weird with all the anonymous functions but *shrug*
<jacobian> I'm willing to suffer quite a lot to jettison PHP though
love-pingoo has quit ["Connection reset by pear"]
<jacobian> I mean, chewing glass sounds better to me at this point
<jacobian> My first thought was just fastcgi+ocaml should work fairly well
david_koontz has quit [Connection reset by peer]
david_koontz has joined #ocaml
arieler_ has left #ocaml []
dark_light has joined #ocaml
pstickne_ has joined #ocaml
smimou has quit ["bli"]
pstickne_ has quit [Operation timed out]
pstickne_ has joined #ocaml
pstickne__ has quit [Connection timed out]
scruffie has joined #ocaml
mnemonic has quit ["leaving"]
cjeris has quit [Read error: 104 (Connection reset by peer)]
bluestorm_ has quit ["Konversation terminated!"]
joshcryer has joined #ocaml
malc_ has quit ["leaving"]