dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
<jacobolus> _ita_: any way to just two times and take the difference?
<_ita_> jacobolus: code with your brain, not with interpolation dude
<jacobolus> ?
<jacobolus> I don't need a profiler
<jacobolus> I just need the time at two points
* _ita_ looks in his old sources
<malc_> jacobolus: Unix.gettimeofday
<jacobolus> malc_: thanks
<_ita_> ah yes, the unix module
<jacobolus> pango: thanks for the link. i'm fine with the unix module
<_ita_> http://freehackers.org/~tnagy/eqchem.png <- much better in colors
tristram has quit [Read error: 110 (Connection timed out)]
asbeta has quit []
xjjk has quit [Remote closed the connection]
<_ita_> one of the problem with linking caml and c apps is the build system
<dylan> _ita_: try omake.
<_ita_> dylan: i have
<dylan> then what's the problem?
<_ita_> omake has several problems hehe
<dylan> ooh! List them, I'm writing my own make replacement in ocaml, but lately it seems omake is perfect
<_ita_> look at this picture - look at the extensions of the files especially http://freehackers.org/~tnagy/eqchem-config.png http://freehackers.org/~tnagy/eqchem-run.png
<dylan> wjat
<dylan> *what's waf?
<_ita_> a scons derivate
<dylan> interesting.
<dylan> _ita_: what do you find wrong with omake?
<_ita_> hehe there are many things
<_ita_> from a theoretical point of view, it is still a make-like tool, with its own language
<_ita_> the natural way of extending a piece of software is by using composition, inheritance and such tricks - with a language one basically rewrites the compiler everytime
<dylan> I'm thinking of making my build tool just be a camlp4 front end
<_ita_> now in practice .. the omake syntax is terrible, .. etc - this is a joke
<dylan> yes. omake looks like monkey butt
<_ita_> dylan: before making a build tool, make sure you know the assumptions it needs to address
<dylan> _ita_: well, my build tool is very small. it's mostly an exercise in writing a language interpreter. :)
<dylan> it has a lot less features than omake.
<dylan> (in fact, I didn't know omake's existence when I started it)
<_ita_> writing a language interpreter, how cool
Amorphous has quit ["arg... must... shutdown... computer burnin..."]
<dylan> I've used autoconf/automake/libtool, ant, rake, cons, scons, cmake, jam, bjam..
<_ita_> dylan: make something useful, write something like this -> http://freehackers/~tnagy/preproc.py
<dylan> _ita_: my build tool actually builds itself right now, and I sort of use it for lots of things. XD
<dylan> _ita_: that link redirects to the index page
<_ita_> the link above pops up a text file
<dylan> that's what I use to build my web page.
<dylan> I'm considering translating it to omake
<dylan> as omake, other than syntax, seems to work really well
cabi_ has joined #ocaml
<dylan> but, I'm having second thoughts as to using a domain specific language for a build tool
<dylan> At least, a simple dynamic one.
<_ita_> writing compilers is certainly a bad idea - if you write something in ocaml, please make a dynamic program
<dylan> hmm?
<dylan> well, this language is just a simple parse -> AST -> run ast.
<_ita_> yes, and this is exactly what i do not like about that
<_ita_> you think a simple parse is sufficient
<dylan> yeah
<_ita_> it is not
<dylan> actually, it's a parse -> parse tree -> ast, but anyway
<dylan> the AST is about as complicated as scheme
<_ita_> does your parser handle errors ? does it print explicit error messages ? is it easy to debug ?
<dylan> Not in the current version. :)
<_ita_> yeah yeah
<_ita_> in no version at all
<mikeX> lol
<dylan> which is why I'm considering rewriting it to use camlp4
<_ita_> you will simply never do it
<dylan> well, I wrote it only for my use
<mikeX> I really hate omakes status/error report messages
<_ita_> writing compilers is the stupidest idea ever
* mikeX is also writing a compiler atm
<_ita_> for build systems
<mikeX> school assignment
<dylan> it only has a web page and a public svn because a friend wanted to see the source
<dylan> it's only intended audience is *me*.
<dylan> Anyway, I think writing a build rule in ocaml, with camlp4 syntax sugar, would be very nice.
<_ita_> how egoistic :-)
<dylan> egoistic?
<dylan> I tried make, jam, bjam, ant (ugh), cons, scons, and some other things I forget. None were capable of building my webpage in a nice way
<_ita_> selfish hum
<dylan> So, I wrote my own tool. It was fun.
<_ita_> dylan: try jsp
<dylan> _ita_: that doesn't schedule build actions
<dylan> My page is built from static templates.
<dylan> Also, config files in /etc/ are built from templates, so I use my build tool there as well
<dylan> But as mentioned, it has a lot of limitations. it's obviously a toy, even if very useful for me. :)
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
<_ita_> dylan: if you are curious about the syntax in use, have a look -> http://freehackers.org/~tnagy/eqchem-0.5.0.tar.bz2 (this is the hybrid program c++/kde/caml i was talking about)
<_ita_> the wscript are python modules
<dylan> I've been reading the demos.
<dylan> I'm glad to know waf is seemingly more simple to use than scons
<dylan> I've actually been working on a autoconf replacement myself.
<dylan> It requires only perl to be installed on the host system.
<dylan> (perl because it's installed on darn near everything)
<dylan> Currently I'm trying to write a hack that helps it... confiscate.. autoconf configure.in files into valid configure.pl scripts. XD
<_ita_> cool
<dylan> you can also run checks without writing a configure.pl
<_ita_> perl offers fewer feature than python though
<_ita_> like parallel builds
<dylan> threads or fork work just fine
<_ita_> err, not really
<dylan> but my autoconf replacement doesn't do make stuff.
<_ita_> ok :-)
<dylan> it only detects system settings
<dylan> % shake check endian
<dylan> % shake check endianchecking for a C compiler... /usr/bin/gcc
<dylan> checking endianness... little
<dylan> err, hmm.
<_ita_> separating the configuration from the tool is a flawed design tho
<dylan> Not in my opinion
<_ita_> because some checks require a compilation for example
<dylan> I need to check things which don't need to be built.
<dylan> it compiles things too.
<_ita_> of course
<dylan> I could perhaps add 'make-like' features to it, but I'm more interested in a 'system probe'
pango has quit [Remote closed the connection]
<dylan> it maintains a database of system features, y'see.
<_ita_> dylan: the latest waf is in eqchem (svn snapshot) - so it contains the c preprocessor, the self-compiling code (Action.py) and a lot of refactoring ||; look in _build_/_cache_/default.cache.py for all the variables in use
<dylan> _ita_: I will take a look at that.
<dylan> _ita_: Can you override the value of any checkTool thingy?
<_ita_> no, but the configure class can be extended
<_ita_> the checks are not finished
<dylan> Ah.
<_ita_> one thing i would like to add is checking for endianness, size of int, .. all in one step
<_ita_> (compile a c program which outputs what it knows about itself)
<dylan> to get openc2e (project that my configure.pl is being used for) to compile on freebsd, one needs to --with program.sdl-config=sdl11-config, as there is no 'sdl-config' on freebsd.
<dylan> I just use multiple small C programs for that and cache them
<_ita_> yep, autoconf replacement
<dylan> Yep.
mikeX has quit ["zzz"]
<dylan> with a system-global database of features, and the ability to override any of them
<_ita_> i currently do not care about autoconf as much as i did in the past - now kde uses cmake and i prefer adding cool features to waf
<dylan> also no external dependencies.
<dylan> 'shake dist' puts any classes used in ~/.shake/lib
<dylan> err
<dylan> 'shake dist' puts any classes used in $PROJECT/.shake/lib
<dylan> Perhaps you can steal the caching of features from my wee script and put it in waf?
<_ita_> i am using a similar system, but i will have a look
<dylan> it's not pretty, but it works. Each check is a class.
<_ita_> for now .. it is 5am and i have to sleep :-)
<dylan> g'night.
<dylan> I warn you, I might steal ideas from waf for something written in ugly, ugly perl. ;)
<_ita_> dylan: both languages are ugly .. too many bugs caught at runtime
<dylan> _ita_: Aye.
<_ita_> as long as it is not autotools or custom languages, that's fine for me
_ita_ is now known as ita|zzz
<dylan> build scripts in ocaml!
<ita|zzz> heh
<ita|zzz> good night
ita|zzz has quit [Remote closed the connection]
jacobolus has quit [Read error: 104 (Connection reset by peer)]
malc_ has quit ["leaving"]
jacobolus has joined #ocaml
Smerdyakov has quit ["Leaving"]
jcreigh has joined #ocaml
jcreigh has quit ["while(1) { fork(); }"]
pango has joined #ocaml
jacobolus has quit [Read error: 104 (Connection reset by peer)]
jacobolus has joined #ocaml
dark_light has joined #ocaml
pango has quit [Remote closed the connection]
jacobolus has left #ocaml []
pango has joined #ocaml
Revision17 has joined #ocaml
revision17_ has quit [Read error: 110 (Connection timed out)]
tristram has joined #ocaml
smimou has joined #ocaml
love-pingoo has joined #ocaml
_jol_ has joined #ocaml
mnemonic has joined #ocaml
<mnemonic> yo
mnemonic has quit [Read error: 104 (Connection reset by peer)]
mnemonic has joined #ocaml
_JusSx_ has joined #ocaml
_jol_ has quit ["leaving"]
mikeX has joined #ocaml
mikeX_ has joined #ocaml
mnemonic has quit [Read error: 104 (Connection reset by peer)]
mikeX has quit [Read error: 110 (Connection timed out)]
_jol_ has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
dark_light has quit ["Ex-Chat"]
_jol_ has quit ["leaving"]
_jol_ has joined #ocaml
<love-pingoo> argh, Unix.time returns a GMT time
<love-pingoo> I want the Unix time + timezone difference :(
<love-pingoo> is there any simple way to get it, or should I use localtime on a dummy time to get it ?
lmbdwr has joined #ocaml
<lmbdwr> hi
<descender> love-pingoo, Unix.localtime (Unix.time ()) is simple enough to me
_jol_ has quit ["leaving"]
<love-pingoo> descender: but it doesn't immediately give you a number of seconds since the epoch
<love-pingoo> however, that's what I did in the end cause I don't really want a time since the epoch but only a number of seconds since the beginning of the week, localtime is much better for that actually
<lmbdwr> anyone familiar with the lambda-mu calculus ?
<lmbdwr> typed LM-calculus
<descender> love-pingoo, oh you want that - well I don't think I know of a way, even in C
<love-pingoo> I did it, it's OK
<love-pingoo> I summed seconds, minutes hours and weekdays
<love-pingoo> I didn't need more, happily
<lmbdwr> Im desperately looking for good lambda-mu-mu calculus references but google/scholar gives me only 3 results heh
<pango> love-pingoo: the description of Unix.time looks furiously like epoch time definition...
<love-pingoo> pango: sorry, my problem wasn't well formulated, I need time since epoch _in the local timezone_
<love-pingoo> anyway, after a little thinking about what I really needed, I wrote it in a simple way using localtime
asbeta has joined #ocaml
<pango> ("time since epoch _in the local timezone_" doesn't really make sense, since it's a number of seconds since a time t0 GMT)
<pango> epoch time has the same value everywhere (according to Newton, at least ;) )
finelemon has joined #ocaml
<love-pingoo> I already said it wasn't well formulated... I wanted time in seconds since t0 localzone
<love-pingoo> don't tell me you didn't understand
<pango> well, I find it a bit weird to mix epoch with timezones, but I don't really mind either, if it works ;)
cabi_ has quit [Remote closed the connection]
cabi_ has joined #ocaml
cabi_ has quit [Client Quit]
finelemo1 has quit [Read error: 110 (Connection timed out)]
pango has quit ["Leaving"]
pango has joined #ocaml
Mothermisery666 has joined #ocaml
Mothermisery666 is now known as maayhme
lmbdwr has quit [Read error: 110 (Connection timed out)]
maayhme is now known as lmbdwr
Itkovian has joined #ocaml
Itkovian has quit [Client Quit]
lmbdwr is now known as MfromAmerica
Itkovian has joined #ocaml
Itkovian has quit [Client Quit]
<asbeta> hmm.. does anyone like revised ocaml syntax?
<asbeta> except creators of camlp4 :)
MfromAmerica has quit []
gribozavr has quit [Remote closed the connection]
bzzbzz has joined #ocaml
finelemo1 has joined #ocaml
finelemon has quit [Read error: 113 (No route to host)]
kuribas has joined #ocaml
love-pingoo has quit ["++"]
shekmalhen has joined #ocaml
AI_coder has joined #ocaml
tristram has quit [Read error: 110 (Connection timed out)]