gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
groves has joined #ocaml
Smerdyakov has quit [Quit: Leaving]
dnolen has quit [Quit: dnolen]
sepp2k has joined #ocaml
gildor_ has quit [Ping timeout: 264 seconds]
gildor has joined #ocaml
<wagle> "open" imports a module? what keyword defines one?
lopex has quit []
Modius has joined #ocaml
Modius_ has quit [Ping timeout: 252 seconds]
lamawithonel has joined #ocaml
Associat0r has quit [Quit: Associat0r]
sepp2k has quit [Quit: Leaving.]
philtor has joined #ocaml
<thelema> wagle: module Foo = struct ... end
<thelema> wagle: each file foo.ml is implicitly wrapped with this text
ymasory has quit [Remote host closed the connection]
ymasory has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
ymasory has quit [Remote host closed the connection]
vivanov has quit [Ping timeout: 248 seconds]
vivanov has joined #ocaml
philtor has joined #ocaml
arubin has quit [Quit: arubin]
ymasory has joined #ocaml
emmanuelux has quit [Ping timeout: 248 seconds]
ymasory has quit [Quit: Leaving]
philtor has quit [Ping timeout: 258 seconds]
<wagle> thelema: or anyone: how do you make the module findable by another file? the app does -I <dir> where <dir> contains printf2.ml and printf2.mli
<wagle> on a ocamlopt
<wagle> and the open Printf2 fails with "unbound module Printf2"
<gildor> adrien: I didn't deliver anythning for 3.12, will do it when I have time
jld has quit [Ping timeout: 248 seconds]
jld has joined #ocaml
ygrek has joined #ocaml
edwin has joined #ocaml
edwin has left #ocaml []
Snark has joined #ocaml
dnolen has joined #ocaml
BiDOrD has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
dnolen has quit [Quit: dnolen]
boscop has quit [Ping timeout: 246 seconds]
boscop_ has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
avsm has quit [Quit: Leaving.]
ikaros has joined #ocaml
jderque has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
boscop has quit [Excess Flood]
boscop has joined #ocaml
boscop has quit [Ping timeout: 260 seconds]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Excess Flood]
jderque has left #ocaml []
Cyanure has joined #ocaml
ulfdoz has quit [Quit: kernel-update]
ulfdoz has joined #ocaml
Vinnipeg has joined #ocaml
Associat0r has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
sepp2k has joined #ocaml
Yoric has joined #ocaml
lamawithonel has quit [Ping timeout: 248 seconds]
lopex has joined #ocaml
jderque has joined #ocaml
jderque has quit [Quit: leaving]
SoftTimur has joined #ocaml
<SoftTimur> hello all, I just run a small compiler which generates a "exemple1" given "exemple1.miniml"
<SoftTimur> the output file "exemple1" is a binary file, however, when I launch "./exemple1" from the terminal, it says "./exemple1: Command not found."
<SoftTimur> could anyone tell me how to run the "./exemple1"?
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
<ygrek> strace and see what is not found, probably some bytecode interpreter
<SoftTimur> execve("./exemple1", ["./exemple1"], [/* 62 vars */]) = -1 ENOENT (No such file or directory)
<SoftTimur> dup(2) = 3
<SoftTimur> fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
<SoftTimur> fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
<SoftTimur> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7fe2307000
<SoftTimur> lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
<SoftTimur> write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
<SoftTimur> ) = 40
<SoftTimur> close(3) = 0
<SoftTimur> munmap(0x7f7fe2307000, 4096) = 0
<SoftTimur> exit_group(1) = ?
StepanKuzmin has joined #ocaml
<ygrek> obviously there is no such file "./exemple1"
<ygrek> your shell didn't expand "./"
<SoftTimur> ygrek: but if I do "ls", I do see "exemple1".
ztfw has joined #ocaml
<ygrek> what is your shell?
<SoftTimur> ygrek: sorry, how to know that?
<ygrek> echo $SHELL
<SoftTimur> ygrek: /usr/local/bin/tcsh
<ygrek> hm, I was wrong, execve resolves ./ by itself
<ygrek> file ./exemple1
yezariaely has joined #ocaml
<SoftTimur> ygrek: sorry, what do you mean?
yezariaely has left #ocaml []
<SoftTimur> "file ./exemple1" returns "./exemple1: data"
boscop has joined #ocaml
lopexx has joined #ocaml
<thelema> SoftTimur: chmod 755 exemple1
<SoftTimur> thelema: still does not work
<thelema> wagle: Modules are found through the module path for compilation and through beng listed on the command line for linking.
<thelema> so you have produced a file exemple1 that you think is an executable but which the file command thinks is data?
<thelema> SoftTimur: ^^
lopex has quit [Ping timeout: 252 seconds]
<SoftTimur> thelema: I guess it is a problem of "PATH" or "SHELL"
<thelema> of you give the full path (or relative path) to the file, PATH doesn't matter
<thelema> and I don't see what SHELL would do here
<SoftTimur> thelema: but I have already done "PATH = $PATH:.", but it still does not work
lopexx has quit [Client Quit]
<thelema> doing that to your PATH should take care of the "./" requirement.
lopex has joined #ocaml
<thelema> Is it possible the file you want to execute isn't a valid program?
<thelema> you can't just execute any file
<SoftTimur> thelema: I have no way to check if it is a valid program...
<thelema> you've run 'file' on it - it would identify if it's an ELF program or Shell script
<thelema> since it doesn't identify as either, it's probably not a valid program
<thelema> at least as far as your shell is concerned
<SoftTimur> "file ./exemple1" returns "./exemple1: data"
<thelema> well, shell and program loader
<thelema> yes, so it's not a program to be executed by linux.
<thelema> it could be a program to be executed by another program
<thelema> and that other program executed by the kernel
<thelema> how did you get this file again?
<thelema> you compiled it by miniml?
<SoftTimur> a compiler generates it from "exemple1.miniml":
<SoftTimur> let rec fact n =
<SoftTimur> if n=0 then 1 else (fact (n - 1)) * n ;;
<SoftTimur> do
<SoftTimur> print "6! = "; print (fact 6)
<SoftTimur> return print "\n" ;;
<thelema> what compiler?
<SoftTimur> it is a compiler project from a master programes, this is the answer of the project given by the professor
<thelema> so your professor wrote the compiler and gave it to you?
Vinnipeg has quit [Read error: Connection reset by peer]
<SoftTimur> it was a old project (10 years ago), so he put the answer on his web site
<thelema> but you're missing the instructions for running the compiled programs
<SoftTimur> Pour essayer les exemples:
<SoftTimur> faire par exemple "make EXEMPLES-SCHEME/exemple1" ou bien "make EXEMPLES-MINIML/exemple1". L'executable se trouvera alors dans ce repertoire.
<SoftTimur> that is all what he wrote about the running...
<thelema> link?
<SoftTimur> thelema, I think I got it...
<thelema> well, it looks like there's a interpreter as well
<thelema> and a "lanceur" - launcher?
<SoftTimur> yes, that is the point...
<SoftTimur> "lanceur ../EXEMPLES-MINIML/exemple1" works
<thelema> ok, it doesn't make valid executables (which is actually difficult)
<SoftTimur> I see...
<SoftTimur> thelema: do you mind we chat a little bit in private?
emmanuelux has joined #ocaml
lopex has quit [Ping timeout: 260 seconds]
lopex has joined #ocaml
lamawithonel has joined #ocaml
iago has joined #ocaml
avsm has joined #ocaml
dnolen has joined #ocaml
<SoftTimur> Hello all, does anyone know what "$<" means in "ocamllex $<"?
<avsm> it's a Makefile rule, a builtin variable that represents the first dependency of the rule
<SoftTimur> avsm: I see... thank you
jderque has joined #ocaml
<orbitz> Sweet, ocaml doesn't make the tupel when it doesn' tneed to! http://ocaml.janestreet.com/?q=node/90
<thelema> orbitz: yes, I'm happy about that too, I was worried the tupling and destructuring would happen
<orbitz> Yeah i recall it coming up her ea few times, great to have evidence to hte contrary
Znudzon has joined #ocaml
<mrvn> Didn't know ocaml would optimize let f (x, y) = into a non tupled version.
<mrvn> Does that work across compilation units?
<thelema> mrvn: the function thing is mentioned in the faq, iirc
<orbitz> I wish the compiler would treat _foo the same as _
<orbitz> If I have a few things i want ot ignore in a pattern match it's nice to be clear wha ti'm ignorin
<thelema> what's the problem with _foo?
<orbitz> doesn't i treatit like an actual character bind?
<orbitz> variable*
<thelema> it binds a variable, and can't be used in | a | b?
<thelema> sure, but there's no warning generated for not using it later
<orbitz> # match [1; 2] with | [] | _foo::_bar -> false;;
<orbitz> Error: Variable _bar must occur on both sides of this | pattern
<thelema> orbitz: yes, they can't be used in shared clauses
<thelema> how often do you really use shared clauses?
<orbitz> but i can do _::_
<orbitz> does the compiler optimize the actual variable bind away in the end?
<thelema> most likely, but ther higher levels don't know that you won't use _foo
<thelema> and they give the error
Znudzon has left #ocaml []
groves has quit [*.net *.split]
mal`` has quit [*.net *.split]
fx_ has quit [*.net *.split]
haelix has quit [*.net *.split]
groves has joined #ocaml
mal`` has joined #ocaml
fx_ has joined #ocaml
haelix has joined #ocaml
srcerer has quit [Ping timeout: 258 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
lamawithonel has quit [Ping timeout: 246 seconds]
lamawithonel has joined #ocaml
iago has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 246 seconds]
Rickasaurus has quit [Ping timeout: 246 seconds]
lamawithonel has quit [Ping timeout: 246 seconds]
Rickasaurus has joined #ocaml
edwin1 has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
boscop_ has joined #ocaml
ski has quit [Ping timeout: 246 seconds]
Rickasaurus has quit [Read error: Connection reset by peer]
Rickasaurus has joined #ocaml
boscop_ is now known as boscop
Yoric has quit [Quit: Yoric]
joewilliams has quit [Ping timeout: 240 seconds]
iago has joined #ocaml
StepanKuzmin has quit [Ping timeout: 240 seconds]
StepanKuzmin has joined #ocaml
joewilliams_away has joined #ocaml
ski has joined #ocaml
ygrek has joined #ocaml
dnolen has quit [Quit: dnolen]
groves has quit [Read error: Operation timed out]
Associat0r has quit [Ping timeout: 246 seconds]
groves has joined #ocaml
Associat0r has joined #ocaml
enthymeme has joined #ocaml
lamawithonel_ has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ski has quit [Ping timeout: 246 seconds]
joewilliams_away has quit [Ping timeout: 246 seconds]
edwin1 has quit [Ping timeout: 246 seconds]
ski has joined #ocaml
[1]Rickasaurus has joined #ocaml
edwin has joined #ocaml
lamawithonel has quit [Ping timeout: 246 seconds]
joewilliz has joined #ocaml
Rickasaurus has quit [Ping timeout: 246 seconds]
rwmjones has quit [Ping timeout: 246 seconds]
[1]Rickasaurus is now known as Rickasaurus
mfp has quit [Ping timeout: 246 seconds]
mfp has joined #ocaml
ygrek has joined #ocaml
Derander has quit [Ping timeout: 240 seconds]
ikaros has joined #ocaml
Derander has joined #ocaml
rwmjones has joined #ocaml
philtor has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
StepanKuzmin has joined #ocaml
lopex has quit [Ping timeout: 260 seconds]
Smerdyakov has joined #ocaml
StepanKuzmin has quit [Remote host closed the connection]
lopex has joined #ocaml
ymasory has joined #ocaml
StepanKuzmin has joined #ocaml
Rickasaurus has quit [Ping timeout: 246 seconds]
Rickasaurus has joined #ocaml
Smerdyakov has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 246 seconds]
ymasory has quit [Ping timeout: 246 seconds]
ymasory has joined #ocaml
Asmadeus has quit [Ping timeout: 246 seconds]
Smerdyakov has joined #ocaml
Asmadeus has joined #ocaml
ygrek has joined #ocaml
rwmjones has quit [Ping timeout: 246 seconds]
dnolen has joined #ocaml
rwmjones has joined #ocaml
ztfw` has joined #ocaml
ztfw has quit [Ping timeout: 258 seconds]
<SoftTimur> hello all, a very basic question... what is the difference between = and == for integer comparison?
<adrien> none
<adrien> I don't know if that applies to Int32, Int64 (doubt it)
<adrien> gildor: ok, thanks
<adrien> (for your godi changes for 3.12)
<SoftTimur> adrien: thank you
Znudzon has joined #ocaml
Znudzon has left #ocaml []
Atol has joined #ocaml
<Atol> Hi, what are the things introduced by ~. I thought it was a kind of signature but by exemple in the framework ocsigen, i've found this.
<Atol> ~path:["coucou"]
<Atol> ~get_params:unit
<gildor> named params
<Atol> Ok thx u.
ymasory has quit [Remote host closed the connection]
ymasory has joined #ocaml
Yoric has joined #ocaml
arubin has joined #ocaml
ymasory has quit [Remote host closed the connection]
<orbitz> also called labels
<orbitz> I <3 labels
<orbitz> I also really like how most thing sin Core take labels
<adrien> I'm using them more and more
<adrien> (plus the corresponding colour for arguments is nice :P )
<orbitz> Yeah
<orbitz> Core's general style for collection APIs is all parameters but hte actual collection you wan tto operate are done via labels
Atol has quit [Quit: WeeChat 0.3.2]
Smerdyakov has quit [Quit: Leaving]
ymasory has joined #ocaml
clog has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
smerz has joined #ocaml
myu2 has quit [Remote host closed the connection]
dnolen has quit [Quit: dnolen]
Amorphous has quit [Ping timeout: 260 seconds]
Amorphous has joined #ocaml
dnolen has joined #ocaml
iago has quit [Quit: Leaving]
khia0 has joined #ocaml
khia0 has left #ocaml []
sepp2k has quit [Quit: Leaving.]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 258 seconds]
ulfdoz_ is now known as ulfdoz