<cygwinports>
Is there any way to test if an executable contains OCaml bytecode or not?
<ita>
cygwinports: yes, there is a magic string at the beginning of the file
<cygwinports>
googling...
<cygwinports>
is that "Caml1999X008"?
<cygwinports>
but that string seems to be present in ocamopt execs as well
<ita>
cygwinports: a file compiled with ocamlc begins with #!/usr/local/bin/ocamlrun
<ita>
cygwinports: what are you porting ?
<cygwinports>
ocaml, what else? :-)
<cygwinports>
what I'm trying to figure out is how to detect bytecode exes in order to avoid strip(1)ing them
middayc has joined #ocaml
<cygwinports>
ita: and what about 'ocamlc -custom' compiled code? that also must not be stripped, right?
<ita>
cygwinports: you evil
<cygwinports>
?
junis has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
middayc has left #ocaml []
ita has quit [Remote closed the connection]
leo037 has quit ["Leaving"]
piggybox has joined #ocaml
yminsky_ has joined #ocaml
nashdj has joined #ocaml
cygwinports has left #ocaml []
dramsay has joined #ocaml
dramsay has quit [Client Quit]
piggybo1 has joined #ocaml
thermoplyae has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
yminsky_ has quit []
jlouis has joined #ocaml
thunderbolt has joined #ocaml
thermoplyae has quit ["daddy's in space"]
jlouis_ has quit [Read error: 110 (Connection timed out)]
dibblego has quit [Remote closed the connection]
dbueno has quit ["This computer has gone to sleep"]
<thunderbolt>
I have a good background in imperative and object-oriented languages, would O'Caml be a good choice for an introduction to functional programming? Or should I learn something like scheme first?
dibblego has joined #ocaml
mordaunt has joined #ocaml
thermoplyae has joined #ocaml
thunderbolt has left #ocaml []
piggybox has joined #ocaml
dobblego has joined #ocaml
jlouis_ has joined #ocaml
Associat0r has quit []
piggybo1 has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Read error: 110 (Connection timed out)]
nashdj has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
ttamttam has joined #ocaml
thermoplyae has quit ["daddy's in space"]
zmdkrbou has quit [Read error: 110 (Connection timed out)]
jlouis_ has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
Yoric[DT] has joined #ocaml
<tsuyoshi>
ocaml is a bit harder to learn than scheme
<tsuyoshi>
not sure if that means you should learn scheme first or not
jlouis has quit [Read error: 110 (Connection timed out)]
zmdkrbou has joined #ocaml
filp has joined #ocaml
<flux>
I was thinking of responding too, but the guy's gone?
<tsuyoshi>
oh
<tsuyoshi>
I have all joins/parts on ignore..
<flux>
the same :)
<flux>
but if the message is old, I use [tab] to verify :)
<flux>
(except sometimes I forget.. and be ridiculed by others!)
<flux>
;)
<pango_>
he left after an hour
nashdj has joined #ocaml
hkBst has joined #ocaml
mordaunt has quit ["Konversation terminated!"]
seafood_ has quit []
olleolleolle has joined #ocaml
rwmjones has joined #ocaml
<Yoric[DT]>
Back to debugging lazy pattern-matching.
leo037 has joined #ocaml
robyonrails has joined #ocaml
bla has joined #ocaml
<bla>
Hi.
<Yoric[DT]>
Okay, the countdown problem now works.
<Yoric[DT]>
With lazy lists and lazy pattern-matching.
<Yoric[DT]>
And without warnings.
asmanur has joined #ocaml
<bla>
Any option of splitting modules into files so they work as pervasive/standard ones? Not File.Module.func but Module.func. Without using "open File".
<petchema>
don't know if/where it's documented more "officially"
<bla>
Hm.
<bla>
I guess I'm just coding it wrong.
<bla>
I've got a file which contains two modules module = struct ... end.
<bla>
Everything is compiled and linked; In external files I can access this modules by: File.Module.func. After open File I can Module.func; and after open File open Module i can just do 'func'.
<bla>
The proper way would be to either open file somewhere automatically... Or place it in two different files.
<bla>
Without 'module' definitions.
<bla>
They would just act like modules then.
<bla>
Probably.
<bla>
As the file is named after the module it looks strange: Pipe.Pipe.func and open Pipe x2. (-;
<bla>
Hm. Yeah, mine sheer stupidity.
<bla>
Albeit I see no option for having two modules in one file behaving like this.
<petchema>
behaving like what?
<bla>
Like they where placed without 'module = ' definition in two different files.
<petchema>
writing one module per file is the standard and simplest way, I wonder how you came to your current solution
<bla>
How? Simple. They where once classes. I've rewritten them to modules.
<bla>
And this one 'module' will be tiny. But it's ok. I'll split them.
<petchema>
I've yet to use OCaml objects, after 5 years ;)
piggybox has quit [Read error: 110 (Connection timed out)]
<petchema>
and no, there's no way to make separate compiled file not look like modules, that's how separate compilation is handled
<petchema>
'open' can make it almost transparent however, I don't really see the need
<bla>
I was just puzzled. But now I understand it.
<bla>
;)
NokyDaOne has joined #ocaml
marmottine has joined #ocaml
NokyDaOne has left #ocaml []
<Yoric[DT]>
Okay, now works with boththe original and the revised syntax.
<Yoric[DT]>
Pattern-matching on lazy lists seems to work :)
olleolleolle has left #ocaml []
Yoric[DT] has quit [Remote closed the connection]
sergez has joined #ocaml
robyonrails has quit ["Leaving"]
yminsky has quit [Read error: 104 (Connection reset by peer)]
piggybox has joined #ocaml
sergez has quit [Read error: 113 (No route to host)]
yminsky has joined #ocaml
piggybo1 has quit [Read error: 110 (Connection timed out)]
__suri has joined #ocaml
Snark has joined #ocaml
__suri_ has quit [Read error: 110 (Connection timed out)]
sergez has joined #ocaml
sergez has quit [Read error: 113 (No route to host)]
Jedai has joined #ocaml
RobertFischer has joined #ocaml
mordaunt has joined #ocaml
sergez has joined #ocaml
Associat0r has joined #ocaml
dbueno has joined #ocaml
dramsay has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
piggybo1 has joined #ocaml
Morphous_ has quit [Read error: 110 (Connection timed out)]
dbueno has quit ["This computer has gone to sleep"]
piggybox has quit [Read error: 110 (Connection timed out)]
mordaunt has quit [Read error: 104 (Connection reset by peer)]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
dramsay has quit [Read error: 104 (Connection reset by peer)]
filp has quit ["Bye"]
middayc has joined #ocaml
buluca has joined #ocaml
dramsay has joined #ocaml
sergez has joined #ocaml
ttamttam has left #ocaml []
sergez has quit [Read error: 113 (No route to host)]
robyonrails has joined #ocaml
piggybox has joined #ocaml
dbueno has joined #ocaml
smimou has joined #ocaml
nashdj has quit [Read error: 110 (Connection timed out)]
piggybo1 has quit [Read error: 110 (Connection timed out)]
sergez has joined #ocaml
ita has joined #ocaml
<middayc>
did anyone work with mod_caml or ocsige?
<middayc>
ocsige = ocsigen
<middayc>
or any other ocaml web-app solution that I don't know fo
<rwmjones>
mod_caml is only appropriate if you want to do cgi-scripting on Apache (specifically)
<rwmjones>
ocamlnet is comprehensive, uses FastCGI-like mechanisms, but (IME) is rather poorly documented
<rwmjones>
ocsigen looks interesting
_JusSx_ has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
<middayc>
o.. I didn't see you replies
bluestorm has quit [Remote closed the connection]
bluestorm has joined #ocaml
<middayc>
thanks for the links, yes I am interested straight cgi with apache (php like) scripting ... ok fastcgi would maybe also be an option ...
mattam has quit [Remote closed the connection]
mattam has joined #ocaml
<pango_>
php is usually not straight cgi...
buluca has quit [Read error: 113 (No route to host)]
<middayc>
yes I know ussually it's mod_php :) that's why I imagined mod_caml will have similar properties ... by "straight cgi" I meant http server, script produces a html page kind of web-programming, not anything like custom protocols, custom servers
piggybox has quit [Read error: 110 (Connection timed out)]
<middayc>
aha .. I see there are more ocaml web libs/frameworks on those links
Tetsuo has joined #ocaml
<hcarty>
middayc: There are a few examples using the ocamlnet CGI library in the ocamlnet svn repository
yminsky_ has joined #ocaml
<middayc>
aha thanks .. I am web developer working sadly with php most of the time... I want to just check around what are the options to make solid web-apps with ocaml instead... now that VPSs are more common, there is more chance to go with something else than just the most typical language
yminsky has quit [Connection reset by peer]
<middayc>
but it would need to be somewhat stabile and tested thing, my customers don't care what it's programmed in as long as it works good
<pango_>
I'd really like to see good alternatives to php too... It's used heavily where I work, and it just look atrocious
leo037_ has joined #ocaml
leo037 has quit [Read error: 110 (Connection timed out)]
<middayc>
yes ... it would need not to be some fancy framework but something more low level which would with few additional libs enable work on somewhat similar level as php and up
<RobertFischer>
The good alternative to PHP is Ruby on Rails.
<flux>
language-wise that may be true, but apparently people aren't always satisfied with the implementation..
<RobertFischer>
The Ruby on Rails implementation?
<middayc>
well ruby on rails is a framework (with a lot of helpers and not so free hands) and you have to do it it's way
<flux>
ruby implementation, performance-wise :). and some discussion on stability has been around too..
<middayc>
like django on python, and symphony on php for example
<RobertFischer>
JRuby on Rails solves the performance problem, if you're hardcore.
<RobertFischer>
But usually running a few (3~5) mongrels and offloading the static stuff to Nginx solves the problem plenty.
<RobertFischer>
This is from someone who knows.
<RobertFischer>
As for doing thing its way -- I haven't found any better way to write a web framework. Particularly if you consider HAML, it's pretty nice.
<RobertFischer>
I'd love to know a yet better way, but I haven't found one.
<hcarty>
There are always Perl and Python low(er)-level CGI libraries as well
<RobertFischer>
My only major complaint is that it treats the database like a dumb store and doesn't deal well with data enforcement.
<flux>
perhaps RoR is worth studying just for that reason; to see how a liked framework does it
<flux>
hcarty, nothing beats use CGI for simple stuff :)
<RobertFischer>
That is true.
<middayc>
I have (over few years) developed my own way of doing web-apps and I am not persuaded with the way ROR and similar way of doing it(MVC, active record, scaffolding.. and other things)
<RobertFischer>
Perl is still my favorite way to write a one-page script, or a small "do it" form handler.
<flux>
I've done my share of web apps too, but I'm thinking my ways aren't quite optimal
<hcarty>
I worked for a web app place for a while who ran some very large sites with Perl. I personally really like the language, but it definitely has its weak points
<flux>
I've played around with mechanisms for embedding components (in self-written framework), but I'm not yet quite satisfied with them
<middayc>
my can be improved too for sure and I keep improving them :)
<flux>
does RoR provide such components?
<flux>
(I guess it doesn't)
<RobertFischer>
What components?
<RobertFischer>
What kind of components?
<flux>
let's say you want to embed a search of displayed elements to the page
<RobertFischer>
It's got gems (which are like CPAN libraries), plugins (which provide new functionality), and engines (which provide whole segments of the website).
<flux>
a generic mechanism for providing communication between elements you embed t othe page
<RobertFischer>
Are you thinking of an AJAX-y kinda of thing, or just having one part hand off to another to generate a segment of the page?
<RobertFischer>
In the first case, it's got RJS. In the second, it's got partials.
<flux>
ajax could perhaps be provided by come component :)
<RobertFischer>
And it leverages the Prototype JS library.
<flux>
sort of simply composing the page of segments (but that can be done simply anyway), but with knowledge of the other segments
<RobertFischer>
My concern about big Perl websites is maintainability and testability. It's a hard enough language to read without having to have all kinds of weird session stuff going on...
<flux>
for example how to pass compatible cgi-parameters to them
<flux>
oh, never mind, perhaps I'll take a look at some point
middayc_ has joined #ocaml
<RobertFischer>
Yes. That's done through having actions reside in the same controller, or by providing some kind of handling in "ApplicationController" (which all controllers inherit from).
<middayc_>
(aha I see - I got disconnected)
<RobertFischer>
And there's always rocaml to go from Ruby to OCaml. :-D
<middayc>
because it shows a webserver holding that many connections that do nothing. It would be good to see a benchmark when tehy serve some files or dynamic content
<bluestorm>
the whole point is that apache use native process, and yaws virtual machine ones, isn't it ?
<bluestorm>
i'm not sure "4000 parallel sessions" is the ultimate goal of any web framework
ser_ has quit [Connection timed out]
<bluestorm>
but i'd be quite interested in Erlyweb anyway
<middayc>
yes .. that's why this benchmark is not what a webdev would want to see really
<bluestorm>
i think they're interested in "nice web framework with decent performances"
<middayc>
earlyweb has some more webdev related benchmarks and it shows it is 6x faster than RoR (at a very simple app)
<bluestorm>
Rail get some success, and Rail performances are not that decent, to what i heard
<ita>
ruby is very slow
<bluestorm>
so i guess the framework comes first
<bluestorm>
what i'd be interested in is a showcase of how Erlang message-passing philosophy applies to web programming
<middayc>
yes RoR is know to be slow
<ita>
ruby is very slow, but who cares ! if the site can be made in 10 minutes the rest of time can be spent on buying hardware
<middayc>
:) interesting view
<ita>
not counting the maintainability of ruby code
<ita>
middayc: corporate view
<pango_>
well, it's only true within some bounds
mbishop_ has quit [Read error: 110 (Connection timed out)]
<pango_>
if you need 60 servers instead of 10, it starts to show
<bluestorm>
hm
<ita>
upgrade the servers :-)
<bluestorm>
but most of websites are not so big
<middayc>
yes :) .. I am sure then you would rather see that you wrote code 60 minutes than 10
<bluestorm>
i guess 99% of the web devs work for 1-server websites
<bluestorm>
so they don't care that much
<ita>
on win server 2008 it will run faster and be more secure anyway haha
<ita>
(that's what they say)
<Yoric[DT]>
hi
<pango_>
bluestorm: that's why I said the 'it doesn't matter' approach is only true within some bounds
<bluestorm>
but seeing erlang
* Yoric[DT]
find Erlang quite interesting indeed.
<bluestorm>
i think it may be possible to create a nice-and-easy web framework with it
<Yoric[DT]>
s/find/finds/
<bluestorm>
(i haven't looked at Erlyweb yet. perhaps it is)
<Yoric[DT]>
One of our objectives with Chalk (when I worked on that) was to design a concurrent web framework.
<middayc>
yes.. most sites reach no boundaries with any lang... but if you wan't to build a comunity or service you must build for scalability
<Yoric[DT]>
(turned out Chalk was nowhere near ready enough for that kind of purpose)
<middayc>
I might have to make some app I have in php scale to 200.000 users (possibly concurrent).. thats why I am asking about ocaml web options , and looking at erlang and other stuff
<middayc>
what is Chalk
<ita>
middayc: do it in java
<mbishop>
a mineral
<mbishop>
it's white and...chalky
<mbishop>
:)
<middayc>
yes, yava is one option :) ... ok I know that chalk ... but Yoric said Chalk :)
<middayc>
yava = java
<ita>
mbishop: you are so punny
<ita>
middayc: if you have to work with people, java
<middayc>
you mean with other coders?
<ita>
middayc: the db is usually the problem : modelling tables is easy, but modelling them so they survive spec changes is challenging
<ita>
middayc: yes
<middayc>
yes ... it's harder to get a programmer that even knows what is ocaml or erlang than the one who can hack up some php
<mbishop>
well a fancy website is important for a good program :P
<pango_>
yup, the main argument for using php is "everybody can code in php"... After the fact, I think the best answer is "that's neat, that's about the number of people you'll need"
<jonafan>
it's also an argument against php
<ita>
middayc: the problems are separating the contents from the presentation (no sql in the pages), maintaining the apps, changing the specs .. it is just easier to use j2ee if you have to work with people
<Yoric[DT]>
middayc: a concurrent/distributed language built with OCaml.
<bluestorm>
"most of php programmers are ugly everybodies"
<Yoric[DT]>
(quite experimental)
<middayc>
I have it all separated now .. you can write ok code in a not the greatest language too if you try..
<ita>
middayc: if you want to have fun while making web apps .. the only solution is to make javascript code, the rest is really boring
<middayc>
uh... I have to go to dinner .. and just when it got really interesting here
<middayc>
:) spidermonkey engine is very very resource consuming .. I am not sure if there are any others OS
<middayc>
(just look at the Firefox if you want to see it in action)
<middayc>
bye
<middayc>
(spidermonkey = js interpreter)
<Yoric[DT]>
I know people who use spidermonkey server-side and who seem quite happy with it.
<Yoric[DT]>
Especially since they added multi-threading :)