<det>
I really miss ADTs in traditional OOP languages :<
seanmcl has quit []
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
tmaeda is now known as tmaedaZ
onigiri has quit []
seanmcl has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
_unK has quit [Remote closed the connection]
verte has joined #ocaml
verte is now known as verte-work
Amorphous has quit [Connection timed out]
Amorphous has joined #ocaml
Amorphous has quit [calvino.freenode.net irc.freenode.net]
rwmjones has quit [calvino.freenode.net irc.freenode.net]
tarbo2 has quit [calvino.freenode.net irc.freenode.net]
tarbo2 has joined #ocaml
Amorphous has joined #ocaml
rwmjones has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Read error: 110 (Connection timed out)]
<orbitz>
det: scala's is such a pita to write
<det>
At least with scala you can do pattern matching, I think
<orbitz>
yeah, it's pretty weak in my limited experience
<det>
Well, I wanted something simple in C#
<det>
something like: A of a | B of B | C of c
<det>
and: match x with A a -> ... | B b -> ... | C c -> ...
<orbitz>
yeah you can't do that in C# AFAIK. best ou got is instanceof
<det>
right
<det>
so I have to do class per type
<det>
and dispatch within that class back to main class
<orbitz>
better off not even trying to do it
<det>
it's probably some recognized pattern within OOP that I just described
<det>
C# is pretty decent otherwise
<orbitz>
Yeah I've heard positive things about it
<orbitz>
I liked meijers JVM summit talk, despite that he was talking abotu C# stuff
<orbitz>
i think
<orbitz>
he is trying to turn an even tloop into a container you iterate over
<det>
infinite blocking container ?
<orbitz>
i'm unsure on the specifics
<det>
foreach (Event e in SomeContainer) { ... } ?
<orbitz>
it was all in LINQ
<orbitz>
he did drag and drop where oen LINQ select was on mouse events
<det>
LINQ hasnt really impressed me much, but that is probably because I have never used it with databases
<orbitz>
then another where it was a select on mouse events, but dropping the first element
<orbitz>
then another linq select on both streams, doing the diff on them
<det>
otherwise it seems like typical functional high order functions
<orbitz>
then final drag and drop component walked that final select
<orbitz>
yeah, most of C# seems unoriginal if you come from functional world, but it's cool to see those ideas making it into a, hopefully, mainstream langauge
<det>
ya, true
<det>
F# might be neat if they open source it as promised and mono fixes its bugs
<det>
the latter point might just be FUD that isnt true, Im not sure
<orbitz>
F# seemed to have some annoyign qualities
<orbitz>
but if you are on .net, seems livable
<orbitz>
i wish java/c#/f# woudl get rid of damn null poitner exception
<det>
ya...
seanmcl has quit []
thrasibule has joined #ocaml
mbac has joined #ocaml
lutter has joined #ocaml
jzmer has quit [Ping timeout: 180 seconds]
thrasibule has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
authentic has quit [Read error: 60 (Operation timed out)]
authentic has joined #ocaml
chahibi has quit [Read error: 60 (Operation timed out)]
tmaedaZ has quit [Read error: 110 (Connection timed out)]
det has quit [Read error: 104 (Connection reset by peer)]
tmaedaZ has joined #ocaml
konr has quit [Read error: 104 (Connection reset by peer)]
verte-work has quit ["~~~ Crash in JIT!"]
Yoric[DT] has joined #ocaml
chahibi has joined #ocaml
tonyIII_ has quit [Read error: 104 (Connection reset by peer)]
tonyIII_ has joined #ocaml
f[x] has joined #ocaml
lutter has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
ttamttam has joined #ocaml
verte has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
ski_ has joined #ocaml
_zack has quit ["Leaving."]
julm_ has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
_zack has joined #ocaml
munga has joined #ocaml
th5 has joined #ocaml
<flux>
when using ocamlbuild, how do I make it not remove foo.byte, when I build foo.native, other than listing both targets in the command line?
<flux>
-no-hygiene or -no-sanitize don't appear to do that
<Camarade_Tux>
precious? but I don't know if it would remove the deps anyway (break the symlink for instance)
<Camarade_Tux>
hmmm, doesn't work
<Camarade_Tux>
but you only lose the symlink, you keep the files in _build
<flux>
yes
<flux>
but let's say I want to provide a 'makefile'-feeling to the user with a makefile
<flux>
I want make foo.byte foo.native to work as expected
<flux>
(too bad make -j would likely break stuff)
<flux>
I suppose I could always tell ocamlbuild not to do symbolic links and copy the binaries to some bin-directory
<rwmjones>
use make?
ua has joined #ocaml
<flux>
well, ocamlbuild is nice too
<flux>
this particular case is so simple that the makefile would not be that large
<flux>
but in general the makefile for ocaml projects is slightly complicated due to .cmi-files which can be compiled from .mli-files if they exist, or if they don't, from the .ml-files
<flux>
I've used OCamlMakefile on many small programs with great success, though
_unK has joined #ocaml
kaustuv_ has quit [Read error: 60 (Operation timed out)]
kaustuv_ has joined #ocaml
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
* rwmjones
would say that caml-list is down ...
<Camarade_Tux>
hmmm, last mail 2 hours 40 minutes ago
Alpounet has joined #ocaml
<ttamttam>
Hello
<ttamttam>
About build systems…
<ttamttam>
I tried OCamlMakefile. But it is very difficult to use when anything does not work
<ttamttam>
Example : I'm fighting with it to have bin-prot compiled under mingw
<ttamttam>
I succedeed without problem with ocamlbuild
<ttamttam>
Didn't tried yet with OMake. But I used to use it a lot
<ttamttam>
and it should work.
<ttamttam>
Really, my preferred is ocamlbuild.
<flux>
I understand mingw in general isn't quite easy/solid
<ttamttam>
Would only need some improvement in order to allow sharing compilation instructions
<flux>
so I'm not sure if OCamlMakefile is the sole party to be blamed
<Camarade_Tux>
well, mingw is always a bit special, during the first days of ocamlbuild, it was a real pain on msys/mingw
<flux>
(I meant mingw/ocaml, or ocaml/win32)
<ttamttam>
Well. The problem I'm facing with OCamlMakefile is that
<ttamttam>
there are non portable instructions inside files
<ttamttam>
like `ocamlfind query …`
<Camarade_Tux>
ttamttam: are you using msys, cygwin or msvc?
<ttamttam>
And mingw versions tries to transmit this to 'cmd'
<ttamttam>
cygwin + mingw godi flavour
<Camarade_Tux>
imho the problem is more with mingw/* trying to translate too much
<Camarade_Tux>
maybe it would prefer the $(...) syntax
<Camarade_Tux>
(instead of `...`)
<ttamttam>
Mmm. The problem is that it will be passed to cmd…
<ttamttam>
For example, I had to sed $VARS in order to transform them into %VARS% inside OCamlMakefile
<Camarade_Tux>
I'm a bit surprised cygwin does that actually, well not really surprised but I think it shouldn't
<ttamttam>
Not cygwin : mingw flavour of ocaml*
<Camarade_Tux>
mingw is just a compiler, it can't live on its own
<Camarade_Tux>
if you use "make", it's probably cygwin's
<Camarade_Tux>
(mingw has a mingw32-make but that's it, I don't know if it even exists when you install mingw through cygwin)
<Camarade_Tux>
rwmjones: crap, it wasn't from the caml mailing-list actually, sorry
* Camarade_Tux
had started to think the CWN wasn't from the caml mailing-list
<ttamttam>
under cmd or cygwin shell: no mater
<ttamttam>
This is mingw flavour of ocamlc that is using 'cmd'
<Camarade_Tux>
ttamttam: I'm not on windows right now but I'll be later on today, I'll check
<ttamttam>
Maybe I will post a summary of my progress on Caml-list
<Camarade_Tux>
ttamttam: and without the quotes? ocamlc -pp $CAMLP4
<Camarade_Tux>
?
<Camarade_Tux>
s/quotes/double quotes/
<ttamttam>
Mmm. I dont remember
<ttamttam>
But I have not a lot of choice : the pp command is extracted from the first line of .ml file by OCamlMakefile.
<Camarade_Tux>
it'll likely work
<ttamttam>
And Markus does not want to switch to OMake or ocamlbuild.
akappa has quit ["Leaving"]
<flux>
how about fixing OCamlMakefile then?
<Camarade_Tux>
I guess ocaml just does: Sys.command (String.concat " " [ param; ml_file ])
<flux>
pretty sure mingw could be supported
<Camarade_Tux>
(or something similar that is interpreted by the shell)
<ttamttam>
Patching OCamlMakefile: that is what I began to do
<flux>
I admit it can fell daunting, it's not your average Makefile :)
<ttamttam>
I solved the environment variables one with one more sed rule to transform them
<Camarade_Tux>
only 1231 lines :)
<ttamttam>
Still have to solve the antiquotation instructions problem
<ttamttam>
s/antiquotation/backtics/ (I think ;-) )
<Camarade_Tux>
what do you do exactly for this one?
<ttamttam>
Experiments…
<ttamttam>
:-)
<Camarade_Tux>
he :P
<ttamttam>
There is a -pp instruction embeded in the first line of some .ml files.
<ttamttam>
which contains a path detection : `ocamlfind query some-module`
<ttamttam>
The game is (for a bad bash/sed/makefile programmer) to detect that there is such an instruction
f[x] has quit [Read error: 145 (Connection timed out)]
<ttamttam>
in order to have make replace it before sending the command to ocaml* compilers
rwmjones is now known as rwmjones__
<Camarade_Tux>
ttamttam: are the files .ml or .mlp? and do they look like valid ocaml?
<ttamttam>
I don't understand why I have to do such contorsions : ocamlbuild solves the problem. And should work everywhere.
<Camarade_Tux>
ocamlbuild isn't perfect yet when you have C too
<ttamttam>
I think .mlp are files that have to be preprocessed by cpp.
<ttamttam>
OCamlMakefile has sed instructions. Files beginning with (* pp ... *) are the remaining problematic ones.
<Camarade_Tux>
I don't know if it's by cpp but there are preprocessed and that's usually where there are such shell commands/environment variables
<ttamttam>
In the example directory (the library itself is ok)
<ttamttam>
I will post a summary : i solved a lot of small problems before reaching this last one.
<ttamttam>
Thanks
<ttamttam>
My only goal is to have batteries compile under godi + mingw… and this is the first dependency that fails…
<Camarade_Tux>
ttamttam: when working on that (and other problems on windows), try to use a version control system, that'll give you nice patches
<ttamttam>
I use git and/or svn
<Camarade_Tux>
ttamttam: I tried a bit (although on msys/cygwin) and thelema has started batteries aaa which is meant to be smaller and should compile more easily
<ttamttam>
Nice ;-)
rjones has joined #ocaml
<ttamttam>
The problem is not really technical, though.
rjones is now known as rwmjones
munga has quit [Read error: 113 (No route to host)]
<Camarade_Tux>
yeah, I know
<ttamttam>
Only that Markus finds OCamlMakefile more "portable" than omake or ocamlbuild for some reason
<Camarade_Tux>
it probably works better on other unices
<ttamttam>
certainly…
<ttamttam>
I may try to call ocamlbuild from make if mingw is detected…
<flux>
:)
<flux>
I doubt you'll get that working, but good luck :)
<flux>
I think OCamlMakefile's support for ocamlfind packages is superior to ocamlbuild's, btw (which has no support until you add a custom myocamlbuild)
<ttamttam>
I have an ocamlbuild version working
<ttamttam>
with a very long myocamlbuild.ml
<ttamttam>
The only problem with ocamlbuild is that it can't use other modules than myocamlbuild (need to copy everything in it)
<Camarade_Tux>
yeah, was too greedy, but you only have to make the + less greedy
<Camarade_Tux>
btw, the mikmatch version: RE re = upper+ Lazy (lower|digit)* <((upper (lower|digit))|eos)>
<Camarade_Tux>
thelema: everything seems to be working now :)
* Camarade_Tux
now has to fix more ccp/gcc errors/warnings than what can fit in his xterm backlog
<orbitz>
first one is teh most improtant!
<Camarade_Tux>
1000 lines in the .h files and 4700 lines in the .c ones...
<Camarade_Tux>
orbitz: definitely, now I don't get why it complains about "void ml_GstCollectDataDestroyNotify (GstCollectData*);" ;-)
julm_ has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
ok, orphaned header (the top-most header doesn't include it)
<Camarade_Tux>
what I don't like with ocaml-gir is that I find bugs in the libraries
flux has quit [Remote closed the connection]
flux has joined #ocaml
julm_ has joined #ocaml
Vecklock has joined #ocaml
ikaros has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
<Camarade_Tux>
thelema: of course, there is no rule so GObject sometimes have to be [ "g"; "object" ] and sometimes have to be [ "gobject" ]
<Camarade_Tux>
(it's the first one more than the other)
julm has joined #ocaml
julm_ has quit [Read error: 54 (Connection reset by peer)]
<Camarade_Tux>
api question: I make `TEXT, `LINK, `LINE... out of POPPLER_ANNOT_TEXT, POPPLER_ANNOT_LINK..., but there is also POPPLER_ANNOT_3D which would give `3D which isn't valid, how would you like it to be transformed?
NYNix_ has joined #ocaml
<mfp>
Camarade_Tux: `ANNOT_TEXT ... `ANNOT_3D ?
<Camarade_Tux>
mfp: would you also apply that to POPPLER_BACKEND_SPLASH and POPPLER_BACKEND_CAIRO, making them `BACKEND_SPLASH and `BACKEND_CAIRO (making everything consistent even when there would be no problem) or not apply it, making them `SPLASH and `CAIRO (making is shorter when there is no problem)
<mfp>
probably apply for consistency
<Camarade_Tux>
even for ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED?
<mfp>
searching the docs takes more time than typing B + CTRL-n ni vim
<Camarade_Tux>
true
<mfp>
ugh, are there many constants sharing the same prefix? < ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED
NYNix has quit [Read error: 113 (No route to host)]
<mfp>
seems to be combining several opts into one, right? in that case a option list would be more idiomatic
<mfp>
harder to generate code for, I suppose
<Camarade_Tux>
there is a tool named varcc in lablgtk that generates that code
<Camarade_Tux>
so it isn't a concern
<Camarade_Tux>
the only thing is naming: ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED vs. RIGHT_JUSTIFIED
<Camarade_Tux>
the other option was to rename 3D to THREE_D
<mfp>
is there also, say, ANNOT_FREE_TEXT_XXXXX_RIGHT_JUSTIFIED?
<Camarade_Tux>
no
<mfp>
hmm you could also accept both `RIGHT_JUSTIFIED and `ANNOT_FREE_TEXT..
NYNix has joined #ocaml
<mfp>
longer types though
<Camarade_Tux>
not sure I could actually
<Camarade_Tux>
(since I'm relying on lablgtk2's varcc to be consistent with lablgtk2 itself)
valross has quit ["Ex-Chat"]
NYNix_ has quit [Read error: 113 (No route to host)]
_unK has joined #ocaml
smimou has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
<thelema>
Hmm, I wonder what's causing my emacs wierd behavior on insertion of ','
<thelema>
It jumps to the end of the previous keyword and inserts it there.
<thelema>
hmm, not just ','
willb has quit [Read error: 110 (Connection timed out)]
peddie has joined #ocaml
ttamttam has quit ["Leaving."]
_zack has quit ["Leaving."]
tmaeda is now known as tmaedaZ
ski_ has quit ["Lost terminal"]
onigiri has joined #ocaml
Spiwack has quit ["Leaving"]
willb has joined #ocaml
ua has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
Yoric[DT] has joined #ocaml
nb has joined #ocaml
<nb>
rwmjones, ok im here
<rwmjones>
nb hi
<rwmjones>
so as I was saying
<rwmjones>
try adding -verbose, and let's see the full gcc command
<rwmjones>
also try doing:
<rwmjones>
ldd /path/to/libbdb.so
<rwmjones>
is libbdb a system library?
<rwmjones>
oh I see, it's berkeley db
<rwmjones>
yminsky, nb above is trying to package sks for fedora
<rwmjones_>
(eg. from /usr/lib/ocaml or from the current directory)
<rwmjones_>
and then look for -ldb-4
<rwmjones_>
in the output
<rwmjones_>
I don't see anything on my machine
<rwmjones_>
but that's where the linker option is likely to come from
<rwmjones_>
eg:
<rwmjones_>
File ./netsys/netsys.cma
<rwmjones_>
Force custom: no
<rwmjones_>
Extra C object files: -lrt -lnetsys
<rwmjones_>
[...]
<rwmjones_>
means that whenever you link with netsys.cma, those extra C options are added to the command line
<nb>
nothing found in the sks-1.1.1 directory
<rwmjones_>
how about /usr/lib/ocaml?
* nb
will cehck in the /usr/lib/ocaml
<nb>
no
<rwmjones_>
hmm that's pretty strange
* nb
grep'ed the output for db-4 and nothing showed up
<rwmjones_>
nb, ah right, are you compiling only native code for sks?
<nb>
native code?
<rwmjones_>
as in, not compiling for byte code?
<rwmjones_>
you probably have make targets like 'make byte' 'make opt'
<nb>
i think so, i am doing make all
<nb>
it says do make all.bc for byte code
<nb>
it says do make dep and then make all
<rwmjones_>
are there any *.cma files at all in the sks directory?
<rwmjones_>
anyway, do 'make all.bc' and then run the find command above again
<nb>
bdb.cma does
<nb>
Extra C object files: -ldb-4.7 -lbdb -lbdb
<rwmjones_>
that's real odd ... it should add -ldb-4.7 (not 4.6) to the final link
<nb>
and all.bc finished without any errors
albacker has joined #ocaml
<nb>
but all comes up using 4.6
<rwmjones_>
try: rm libbdb.cmxa
<rwmjones_>
sorry
<rwmjones_>
rm bdb.cmxa
<rwmjones_>
and then make all
<nb>
aha
<nb>
i think i may need to make cleanall
* nb
just looked at the makefile
<rwmjones_>
yeah, so it's a dependency problem by the looks of it ... bdb.cmxa doesn't get rebuilt when you change Makefile.local
<rwmjones_>
so it wasn't rebuilding that with the new -ldb-4.7 linking option
<nb>
trying now
<nb>
appears to have worked
<nb>
apparently that is why, because i didn't make cleanall
<rwmjones_>
ok I have to go
<rwmjones_>
yminsky is in this channel if there's any further questions
<nb>
thanks for your help
<nb>
now just to package it :)
rwmjones has quit [Read error: 113 (No route to host)]
<rwmjones_>
nb, if you file a fedora package please cc me in on the bug (rjones at redhat.com)
<nb>
ok
authentic has left #ocaml []
jimt has quit [Read error: 60 (Operation timed out)]
rwmjones_ is now known as rwmjones
Narrenschiff has joined #ocaml
jimt has joined #ocaml
Narrenschiff has quit []
munga has joined #ocaml
lutter has joined #ocaml
seanmcl has quit []
det has joined #ocaml
seanmcl has joined #ocaml
lutter has quit ["Leaving."]
ygrek has joined #ocaml
f[x] has quit ["Leaving"]
ygrek has quit [Client Quit]
ygrek has joined #ocaml
lutter has joined #ocaml
Narrenschiff has joined #ocaml
infoe has quit [Read error: 110 (Connection timed out)]
Narrenschiff has quit [Remote closed the connection]
Narrenschiff has joined #ocaml
_JusSx_ has joined #ocaml
ygrek has quit [Remote closed the connection]
<_JusSx_>
do you know a lib for managing sys logging?
_andre has quit ["leaving"]
Narrenschiff_ has joined #ocaml
<rwmjones>
_JusSx_, in the past I piped stuff into an external 'logger' program (it's in most Linux distros) ... I believe there is a syslog binding for ocaml though