Iter has quit [Read error: 110 (Connection timed out)]
mfurr has quit ["Client exiting"]
JaffaCake has quit [zelazny.freenode.net irc.freenode.net]
Banana has quit [Read error: 60 (Operation timed out)]
benja has quit [Remote closed the connection]
JaffaCake has joined #ocaml
Banana has joined #ocaml
vegai has quit [Read error: 113 (No route to host)]
vegai has joined #ocaml
Anvil_Vapre has quit [Read error: 110 (Connection timed out)]
kinners has joined #ocaml
kinners has quit ["leaving"]
Snark has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
Snark has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
mrsolo_ has joined #ocaml
dobrek has joined #ocaml
Snark has joined #ocaml
<
sundeep>
should compounds statements in match-with clauses be enclosed in parenthesis or begin-with?
<
Submarine>
these are equivalent
<
Submarine>
do you ask about style or about conformance to the grammar?
kosmikus|away is now known as kosmikus
_fab has joined #ocaml
gim has joined #ocaml
<
sundeep>
Submarine: i want to know of either form is needed at all
<
sundeep>
even for the last clause?
<
Submarine>
Well, if you want to avoid that the usual practice is to wrap the whole match clause in () or begin end.
<
Submarine>
begin match foo with A -> ... | B -> ... end
bk_ has joined #ocaml
Iter has joined #ocaml
<
sundeep>
is that usual practice for if-else statements too?
<
sundeep>
i am not sure how a surrounding begin-end can help the compiler determine whether a statement is part of the else clause or outside it
<
Submarine>
sundeep: Well, if it's outside the begin...end then it's not in the else clause.
<
sundeep>
aah, i thought you meant that the whole if-else statement must be parenthesized (coz thats what you said for the match-with statement)
<
Submarine>
Well, that's what I meant: (if foobar then foo1 else foo2)
__DL__ has joined #ocaml
<
sundeep>
i don't see how '(if e then s else s1; s2)' is the same as 'if e then s else (s1; s2)'
sundeep has quit [Client Quit]
<
simon->
(s1; s2) returns the same as (s2) which returns the same as s2
<
Submarine>
it's not
<
Submarine>
if e then s else (s1; s2)'; s3 is afaik equivalent to if e then s else (s1; s2; s3)
<
Banana>
i dont think so.
<
simon->
I thought ; took precedence
<
Banana>
in the first case s3 is exectued anyway.
<
Banana>
else as to take precedence (imho) or you have problem to parse if .. then if ... then ... else ...
<
Submarine>
Oh you're right.
sundeep has joined #ocaml
sundeep has quit [Remote closed the connection]
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
noss has joined #ocaml
mattam_ is now known as mattam
Submarine has left #ocaml []
sundeep has joined #ocaml
Iter has quit ["Leaving"]
karryall_ has joined #ocaml
phj has joined #ocaml
<
phj>
Is there anybody here used ocamlfind ?
<
phj>
ocamlfind ocamlopt -package sqlite -linkpkg -o test test.ml
<
phj>
I'm using sqlite.
<
phj>
but I don't know why it emit messages: /usr/local/lib/ocaml/site-lib/sqlite/libsqlite.a(sqlite_stubs.o): In function `raise_sqlite_error':
<
phj>
- /home/phj/ocaml/ocaml-sqlite-0.3.5/sqlite_stubs.c:170: undefined reference to `sqlite_freemem'
<
phj>
and some error msgs like above
<
Banana>
did you try without -linkpkg ?
<
Banana>
and are you sure there is no version mismatch ?
<
Banana>
(old sqlite or something).
<
phj>
without -linkpkg,error msg: No implementations provided for the following modules:
<
phj>
Sqlite referenced from test.cmx
<
Banana>
are you the installation of sqlite is ok ?
<
phj>
yes,it's installed ok.
<
phj>
this command work correctly: ocamlfind ocamlc -package sqlite -linkpkg -o test test.ml
<
Banana>
are you sure the native version of sqlite is installed...
<
Banana>
seems to me that you have the bytecode version only...
<
phj>
wait,let me check it.
<
phj>
but how to check it ?
<
Banana>
did sqlite build/install .cmx files ?
<
phj>
there are four files of sqlite: /usr/local/lib/libsqlite.a /usr/local/lib/libsqlite.la /usr/local/lib/libsqlite.so /usr/local/lib/libsqlite.so.8
<
phj>
yes,there are two files: sqlite.cmx sqlite.cmxa in /usr/local/lib/ocaml/site-lib/sqlite/
<
phj>
-rw-r--r-- 1 root wheel 1111 May 27 04:56 sqlite.cma
<
phj>
-rw-r--r-- 1 root wheel 2159 May 27 04:56 sqlite.cmi
<
phj>
-rw-r--r-- 1 root wheel 195 May 27 04:56 sqlite.cmx
<
phj>
-rw-r--r-- 1 root wheel 254 May 27 04:56 sqlite.cmxa
<
phj>
a little strange
<
Banana>
did you try to compile "by hand" without ocamlfind ?
<
phj>
command: ocamlc -I +site-lib/sqlite sqlite.cma test.ml -o test , work correctly
<
phj>
command: ocamlopt -I +site-lib/sqlite sqlite.cmxa test.ml -o test emit errors.
<
phj>
test.o: In function `Test__print_colnames_90':
<
phj>
test.o(.text+0x104): undefined reference to `caml_sqlite_column_names'
<
phj>
is there any error in the second compile command?
<
Banana>
try to add -cclib -lsqlite
<
phj>
ocamlopt -I +site-lib/sqlite sqlite.cmxa test.ml -o test -cclib -lsqlite ?
<
phj>
error happened again.
<
Banana>
according to the doc, ocamlfind ocamlopt -package sqlite -linkpkg test.ml should work...
<
Banana>
is ocamlfind installed via your distro or from sources ?
<
phj>
I'm using freebsd,there is no port of ocamlfind
* Banana
write "no, I will not blame your OS", 100 times on the blackboard.
<
phj>
ocamlmklib -o sqlite sqlite.cmx sqlite_stubs.o -L/usr/local/lib -lsqlite -linkall
<
phj>
maybe the above command should use static lib
<
phj>
ocamlmklib -o sqlite sqlite.cmx sqlite_stubs.o /usr/local/lib/libsqlite.a
<
phj>
the above command generate the correct lib
seg|startrek is now known as segphault
lowks_ has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
lam__ has quit [Read error: 60 (Operation timed out)]
noss has quit ["Leaving"]
vezenchio has quit ["look at you, hacker, a pathetic creature of meat and bone, panting and sweating as you run through my corridors; how can you ]
phj has quit [Read error: 110 (Connection timed out)]
karryall_ has quit ["tcho"]
bk_ has joined #ocaml
kosmikus is now known as kosmikus|away
skylan has quit [Read error: 113 (No route to host)]
UserXP9 has joined #ocaml
UserXP9 has quit [Remote closed the connection]
UserXP9 has joined #ocaml
fariseo has quit [Client Quit]
fariseo has joined #ocaml
kosmikus|away is now known as kosmikus
farizeo has joined #ocaml
fariseo has quit [Client Quit]
lowks_ has quit [Read error: 60 (Operation timed out)]
JPL-Justin_ has quit [Remote closed the connection]
Anvil_Vapre has joined #ocaml
UserXP9 has quit [Remote closed the connection]
Snark has quit ["Parti"]
UserXP9 has joined #ocaml
cjohnson has joined #ocaml
monotonom has joined #ocaml
mrsolo_ has quit [Read error: 110 (Connection timed out)]
__DL__ has quit [Remote closed the connection]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
UserXP9 has quit [Remote closed the connection]
cjohnson has quit [Read error: 60 (Operation timed out)]
UserXP9 has joined #ocaml
gim has quit ["pouf"]
cjohnson has joined #ocaml
kosmikus is now known as kosmikus|away
skylan has joined #ocaml
skylan_ has joined #ocaml