mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
evn_ has quit []
postalchris has quit [Read error: 113 (No route to host)]
hsuh has quit [Read error: 104 (Connection reset by peer)]
kopophex has joined #ocaml
det has quit [Read error: 110 (Connection timed out)]
postalchris has joined #ocaml
postalchris has quit ["Leaving."]
znutar has quit [Read error: 104 (Connection reset by peer)]
saml has left #ocaml []
znutar has joined #ocaml
rodge_ has joined #ocaml
ozzloy has left #ocaml []
sporkmonger has joined #ocaml
kopophex has quit [Remote closed the connection]
sporkmonger has quit []
ikaros has joined #ocaml
rodge_ has quit [Read error: 110 (Connection timed out)]
kopophex has joined #ocaml
det has joined #ocaml
schme has joined #ocaml
Tetsuo has joined #ocaml
l_a_m has joined #ocaml
prince has joined #ocaml
|Catch22| has quit ["To the best of my knowledge, I guess that I'm fresh"]
smimou has joined #ocaml
bluestorm has joined #ocaml
filp has joined #ocaml
petchema has quit [Remote closed the connection]
OChameau has joined #ocaml
<kig> anyone familiar with Ocsigen? why do handlers registered with Xhtml.register use text/html as content-type instead of the correct application/xhtml+xml? i worked around it with Text.register, xhtml_print and setting my own content-type
<flux> a bug?-)
LordMetroid has joined #ocaml
<kig> yeah, just wanting to make sure it's not something i did
<flux> (I haven't really used ocsigen)
<flux> is it any good?
<kig> but apparently eliom does explicitly set the content-type to text/html
<kig> i don't know
Linktim has joined #ocaml
<kig> you register a service (some sort of argument-validating thing?) + handler function for an uri, then somehow generate content (e.g. with XHTML.M (which is very verbose, make helpers instead)), and i hope you can edit the response headers too
kopophex has quit [Read error: 110 (Connection timed out)]
<kig> XHTML.M is slow (150ms for a page with a couple thousand elements)
<kig> so probably want to cache fragments
<kig> i haven't used ocsigen very much, though
<flux> huh, that sounds quite slow
<flux> how can that be?
det has quit [Read error: 104 (Connection reset by peer)]
<flux> could it have some nasty O(n^2) constructs..
<flux> (it could be fixable)
<bluestorm> :p
<bluestorm> the ocsigen sources i have on my computer is ocsigen-0.5.1
<bluestorm> looks like it's time for an update
<kig> hmm, the 150ms was timed with ab though, better time the xhtml generation and printing times too
<bluestorm> it could be interesting to compare with the ocamlduce output too
<kig> generation 50ms, printing 80ms
<flux> even 50 ms sounds big to me, but maybe I have unrealistic expectations
<flux> it is pure cpu bound, right?
<kig> yeah
<kig> mock data
<flux> I wonder if it scales linearly
<flux> can you double the amount of data?
<kig> sure
<kig> 115ms, 165ms
<bluestorm> i suppose Ocsigen has not been optimized for speed yet
<flux> aha, so it's worse than linear
<flux> I wonder how that compares to php, python or.. ruby. I suppose it atleast beats ruby ;)
<kig> i think it's linear, the difference between 50->115 and 80->165 could be attributed to noise / more gc
<kig> i'll double once more
<kig> 245ms, 465ms
<flux> how much data are we talking about?
<kig> 390k now
<flux> oh, I thought we were talking about a few lines
<flux> it's not that bad then
<flux> how come I ready you mentioned something about thousands of elements
<flux> s/ready/read/
<kig> repeated banging made 210ms, 330ms for the quadruple data
<flux> those points are very linear
<kig> it has thousands of elements, but they have very little inside them
<kig> page links for a few hundred pages and such
<flux> argh, I somehow interpreted you said "390k elements", but it was 390k file
hkBst has joined #ocaml
<kig> 8005 <a>s, 3212 divs
<kig> it escapes the html in each of those (which again is a bit wtf, isn't pcdata supposed to be passed raw)
Tetsuo has quit [Read error: 104 (Connection reset by peer)]
<kig> a, maybe not
Demitar has quit [Read error: 110 (Connection timed out)]
bluestorm has quit ["Konversation terminated!"]
yangsx has quit [Read error: 110 (Connection timed out)]
kAworu has quit ["leaving"]
coucou747 has joined #ocaml
LordMetroid has quit [Read error: 110 (Connection timed out)]
schme has quit [Remote closed the connection]
sporkmonger has joined #ocaml
bluestorm has joined #ocaml
sporkmonger has quit []
sporkmonger has joined #ocaml
det has joined #ocaml
naufraghi has joined #ocaml
<orbitz> morning
LordMetroid has joined #ocaml
lordmetroid_ has joined #ocaml
lordmetroid__ has joined #ocaml
lordmetroid__ has quit ["Leaving"]
lordmetroid__ has joined #ocaml
LordMetroid has quit [Read error: 110 (Connection timed out)]
lordmetroid__ is now known as LordMetroid
lordmetroid_ has quit [Connection timed out]
mikeX has joined #ocaml
<mikeX> hello, are -cc-opt and -O3 valid ocaml compiler flags? this paper mentions them but I don't see them anywhere else http://mlton.org/pages/References/attachments/060916-mlton.pdf
<flux> there is -ccopt
<flux> and it would accept an argument it passes to the C compiler
<flux> so -ccopt -O3 is valid, but -O3 isn't an ocaml flag
<mikeX> oh I see, but where exactly is the C compiler used? does ocamlopt translate to C?
<flux> no, but ocamlopt can compile c files too
<flux> as can ocamlc
<flux> it obviously calls cc to do that :)
<mikeX> so, when compiling pure ocaml code, the -ccopt flag is useless
<flux> yes
<mikeX> thanks a lot flux
lordmetroid_ has joined #ocaml
kopophex has joined #ocaml
lordmetroid_ has quit [Client Quit]
lordmetroid_ has joined #ocaml
<jlouis> mikeX, mlton is not an ocaml compiler ;)
Tetsuo has joined #ocaml
<orbitz> it's what Tron runs in
<mikeX> I know, but at some point, while referencing some benchmarks, it gave the command line I mentioned for ocaml
<jlouis> ah, I see
LordMetroid has quit [Success]
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
LordMetroid has joined #ocaml
pango_ has quit [Remote closed the connection]
lordmetroid_ has quit [Read error: 110 (Connection timed out)]
pango_ has joined #ocaml
kopophex has quit [Success]
<acatout> Hello. I'm discovering Ocsigen (1.0.0) and I don't know how to call some random function (int -> int) in a non-blocking way.
<acatout> In the tutorial http://ocsigen.org/tutorial1.0.0-1 there is an example service looong2. I wrote a similar service but I want to use a function which takes time (CPU intensive) and returns an integer.
<acatout> I would like to display this integer on the web page. Whatever I try, the Ocsigen server is blocked until the function has returned.
<acatout> How should I approach this task?
<bluestorm> hm
<bluestorm> acatout: http://www.ocsigen.org/lwt
<bluestorm> "What if my function is not implemented in cooperative way?"
<bluestorm> (if the long function is yours, you could try to rewrite it with cooperative multi-threading in mind)
<kig> c exts, do i need a CAMLreturn after calling caml_failwith("foo") ?
<acatout> bluestorm: I'm not too familiar with threading and don't see how to do this.
<acatout> Also, I was hoping to use some generic way, maybe with Lwt_preemptive.detach.
<bluestorm> yes, this should be practicable
<bluestorm> i'm not familiar with the Lwt threading model either
<bluestorm> but i think it's mostly a matter of adding >>= at some places
<bluestorm> then Lwt will be able to interleave your function execution with other cooperative threads
<acatout> Yes I tried using >>= but it did not solve my problem.
<bluestorm> hm.
<acatout> This is for testing purposes.
<bluestorm> i guess i should actually try to use Lwt before giving advice :p
<acatout> Thanks anyway. :-)
Morphous has quit [Read error: 110 (Connection timed out)]
Morphous_ has joined #ocaml
<acatout> I wish there were more Eliom examples available to read.
<bluestorm> don't hesitate to post yours :-'
<acatout> The tutorial is great, but it lacks precisely an example like I described.
postalchris has joined #ocaml
kotarak has joined #ocaml
LordMetroid has quit ["Leaving"]
magthe has joined #ocaml
RobertFischer has joined #ocaml
* RobertFischer checks to see that his client works.
LordMetroid has joined #ocaml
LordMetroid has quit [Read error: 104 (Connection reset by peer)]
OChameau has quit ["Leaving"]
magthe has quit ["Ex-Chat"]
Linktim has quit [Remote closed the connection]
Linktim has joined #ocaml
postalchris has quit [Read error: 113 (No route to host)]
filp has quit ["Bye"]
kotarak_ has joined #ocaml
Linktim has quit [Remote closed the connection]
Linktim has joined #ocaml
ygrek has joined #ocaml
kotarak has quit [Read error: 110 (Connection timed out)]
RobertFischer_ has joined #ocaml
RobertFischer has quit [Read error: 104 (Connection reset by peer)]
Poulet has joined #ocaml
RobertFischer_ has quit [Client Quit]
RobertFischer has joined #ocaml
<RobertFischer> It's nice to be able to set up aliases for my account: "dev.slicehost", "mysf.slicehost", etc., etc.
<RobertFischer> Instead of the stupid IP addrs.
visof has joined #ocaml
<RobertFischer> Whoops. Wrong room.
<hcarty> kig: Not sure, you may want to look at the caml_failwith source to find out
<hcarty> I think CAMLreturn has to come at the end of a function, but I may be wrong about that
<kig> it does CAMLnoreturn;
kotarak_ is now known as kotarak
<kig> i guess needs CAMLreturn to make compiler not complain
naufraghi has quit [Read error: 110 (Connection timed out)]
|Catch22| has joined #ocaml
<RobertFischer> Anyone know which ubuntu package provides the "file" executable?
<qwr> RobertFischer: file
<qwr> (on debian at least, and ubuntu probably is same)
<RobertFischer> Clever.
<RobertFischer> I'm trying to generate a good minimal AMI for mod_caml.
<bluestorm> Automatic ... Inference ?
<bluestorm> Modification ?
<RobertFischer> Amazon Machine Image: http://www.amazon.com/ec2
<bluestorm> :D
<bluestorm> not that close :-'
<RobertFischer> EC2 is pretty exciting, once you grok it.
<RobertFischer> Particularly for developers.
<bluestorm> hm
naufraghi has joined #ocaml
<orbitz> off topic: but anyone suggest a good cheap colo? possibly purchase a virtualized linux machine?
<orbitz> not looking for much
<RobertFischer> orbitz: If you find out, let me know.
<orbitz> hah
<RobertFischer> SliceHost is a good place, but a bit pricey.
<orbitz> all i want to do is run a few forums for my self and friends and maybe some shells
<RobertFischer> And they really give you a bare bones Linux install without a whole lot of support.
<RobertFischer> I've been using DreamHost for little, non-critical apps. That's been nice, although they don't let you hack the Apache install directly.
<orbitz> i'd like a virtualization of a linux install so I can hack the crap out of it and they won't really care
<orbitz> i don't need much CPU or antyhign
<RobertFischer> orbitz: Then I'd look pretty carefully at SliceHost.
<RobertFischer> It's the best I've found.
<Smerdyakov> orbitz, www.tech.coop has been good so far.
<orbitz> wow tech.coop seems really cheap
<RobertFischer> Is it a one-time buy-in?
<orbitz> to be a memebr is 50 i think then services are 7.50/mo
<Smerdyakov> orbitz, BTW, if you would be satisfied by shared server hosting run by people with a clue, see http://hcoop.net/ . (I'm the founder and CTO of sorts.)
<orbitz> Smerdyakov: i don't mind sharing a physical machine, but i'd like my stuff to be on a virtualization or whatever so it's like my own box
<orbitz> i can explode it and nobody will care, just reimage it
<Smerdyakov> orbitz, for running a few forums, HCoop is probably (IMO) the best option, but giving out shells wouldn't work. The other folks would have to join HCoop.
<orbitz> Smerdyakov: it'll probably be me and one other perosn that require a shell
<Smerdyakov> orbitz, we try to set our stuff up so that you can't explode other people's stuff, even in a traditional, non-virtualized environment.
<orbitz> Smerdyakov: what about running my own services? like if i want to run a yaws app?
<orbitz> i just ask you guys to setup a mod_proxy or whatever?
<Smerdyakov> orbitz, I designed and implemented a DSL for configuring shared daemons. It uses a static type system to rule out unsafe configurations.
<orbitz> ohh can i see it?
<Smerdyakov> We have mod_proxy set up. You can run your own daemons and proxy to them using the DSL I just mentioned.
<orbitz> so i need to ask someone to set tha tup for me or do I simply edit a file that gets sycned back in and it tells me if i goofed?
<Smerdyakov> orbitz, http://wiki.hcoop.net/DomTool
<Smerdyakov> You don't need to ask anyone. You run a command line tool on your DomTool program.
<Smerdyakov> Eventually, you'll need to request permission to have a program listen on a particular local port, but we're not there yet. (Just settling into a new set of servers)
<orbitz> cool
<orbitz> i kind of like tech.coop but if we needs are simple this sems pretty cheap
<orbitz> thanks
postalchris has joined #ocaml
<hcarty> vpsvillage.com is decent and cheap from my limited experience with them
<Smerdyakov> HCoop will do VPS eventually, too. ;)
<orbitz> that doens't help anyone now :)
<Smerdyakov> A lot of people think they want VPSes just because they have accepted the crappyness of shared hosting services. I think HCoop can change most of their minds.
<Smerdyakov> As in, I prefer shared hosting at HCoop over having to maintain my own set of daemons.
<orbitz> what do you guys think of the prediction that peopel will soon become discontent with the slowness of things liek ruby and python for web apps and ocaml might be able to fill that niche?
<Smerdyakov> OCaml will try, and will be a better choice than Ruby and Python, but I'm betting on my language, Laconic/Web. :-)
<RobertFischer> orbitz: The Ruby/Rails slowness problem is pretty much solved by JRuby -- or, at least, mitigated enough that DB and communication slowness outweighs the problem for most people. So I disbelieve that'll be a winning angle.
<RobertFischer> The winning angle is going to be leveraging safety and providing error recovery while maintaining ease-of-use.
<orbitz> JRuby is much slower than current ruby impl last i saw. has it improved significantly?
<RobertFischer> Are you comparing raw scripting through JRuby, or compiled JRuby?
<Smerdyakov> The next version of Laconic/Web is going to compile to native code with no garbage collection.
<RobertFischer> Compiled JRuby running on Tomcat is the de facto standard solution for Ruby/Rails scalability issues. It's pretty fast.
<Smerdyakov> It should be approximately optimal, subject to the constraint of working in OSes like Linux with 1970's designs.
<orbitz> i don't know, i took a ruby program that solved sodoku and ran it how the documentation described in both jruby and vanilla ruby and it was far slower
<RobertFischer> You must have been scripting it, or in a beta of JRuby. JRuby is crazy fast compared to CRuby these days.
<RobertFischer> When compiled, of course.
<orbitz> Smerdyakov: doe no GC mean it simply doesn't need it or you'll have to manage memory yourself?
<Smerdyakov> orbitz, the first.
<orbitz> RobertFischer: is jruby a complete implementation of ruby?
<RobertFischer> Yes.
<orbitz> nice
<RobertFischer> There are just a few corner cases where JRuby's impl details differs from CRuby, and that causes a library to hiccup. But they're solving that regularly -- follow Headius's blog: http://headius.blogspot.com/
<RobertFischer> Now, Rails is ripe for the take-over, because it really sucks for any kind of safety, and you spend a lot of your time chasing down configuration/naming problems. Unfortunately, those things which are trying to knock it out aren't providing the same ease-of-development, which means they're not even being considered by the unwashed hordes.
* RobertFischer adds "Laconic/Web" to his list of things to check out.
<orbitz> Arc!
<orbitz> what do you think of the continuation based system, like seaside?
<RobertFischer> I dunno. I haven't played with it much, although the sheer amount of information that needs to be stored in the session-equivalent makes me wary. I'm not sure if that's a solved problem (I can envision a few hacks to help it), but it's a point of concern coming from my totally naive position.
<orbitz> apapretly seaside is heavy
<RobertFischer> Yeah, that's what I've heard, too.
<orbitz> not usre how well it scales though, you need all connections to go back to whoever is holding the continuatino though (unless you can serialize continuations?)
<RobertFischer> And bookmark-ability in a CPS-based framework is odd.
<RobertFischer> It's just a weird paradigm for web development.
<RobertFischer> This is not to say that it's bad. Just weird.
<orbitz> well bookmarkability in ajax isn't much better is it?
<RobertFischer> No, and that's one of the reason that AJAX-heavy pages were flash in the pan.
<RobertFischer> It's one thing if you're a web application like Google Maps or Google Reader, but for content-driven web (which is 90%), it's too much pain for too little return.
<RobertFischer> Now, Yahoo!'s UI framework is supposed to help bookmarking for AJAX, so maybe it's not a lost cause after all.
<RobertFischer> I have to run: my wife caught something while we were flying home yesterday, and she's sick.
<RobertFischer> See you later.
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
filp has joined #ocaml
vfdfdfvd has joined #ocaml
Jeff_123 has joined #ocaml
schme has joined #ocaml
filp has quit ["Bye"]
<orbitz> is ther eany equivalent to C's ctypes functions in standard ocaml?
<bluestorm> what are ctype functions ?
<bluestorm> int_of_string ?
<Smerdyakov> orbitz, check [Char]
<orbitz> Char doesnt' sem eto hav eit
<orbitz> intersted in things like isspace, isalpha, etc
<orbitz> those character categorization functions
<bluestorm> there isn't
<orbitz> can i de'end on 'a' - 'z', 'A' - 'Z' having consecutive interger values?
<bluestorm> there is a standard way to do that
<bluestorm> let foo = function 'a'..'z' | 'A'..'Z' | '0'..'9' -> true | _ -> false
ygrek has quit [Remote closed the connection]
<orbitz> thanks
<bluestorm> « where c1, c2, …, cn are the characters that occur between c and d in the ASCII character set. For instance, the pattern '0'..'9' matches all characters that are digits. »
<bluestorm> so it seems the manula assumes consecutive values
<Jeff_123> you can also express ascii values as eg '\255'
<orbitz> thank you
visof has quit [Remote closed the connection]
naufraghi_ has joined #ocaml
Linktim has quit [Remote closed the connection]
naufraghi has quit [Read error: 104 (Connection reset by peer)]
naufraghi__ has joined #ocaml
middayc has joined #ocaml
naufraghi__ has quit [Read error: 104 (Connection reset by peer)]
naufraghi__ has joined #ocaml
naufraghi_ has quit [Read error: 113 (No route to host)]
kotarak has quit ["Xaide, leka nosht."]
erg has joined #ocaml
ikaros has quit ["segfault"]
sporkmonger has quit [Read error: 110 (Connection timed out)]
TychoBrahe has joined #ocaml
<coucou747> hi
<TychoBrahe> PliP ^^
<qwr>
bluestorm has quit ["Konversation terminated!"]
hkBst has quit ["Konversation terminated!"]
vfdfdfvd has left #ocaml []
piggybox has joined #ocaml
piggybox has left #ocaml []
RobertFischer has joined #ocaml
RobertFischer has left #ocaml []
RobertFischer has joined #ocaml
schme has quit [Connection timed out]
Demitar has joined #ocaml
Tetsuo has quit ["Leaving"]
Poulet has quit []
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
middayc has quit [Read error: 110 (Connection timed out)]
sporkmonger has joined #ocaml
naufraghi__ has quit [Read error: 113 (No route to host)]
naufraghi has joined #ocaml
yangsx has joined #ocaml