gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
Edward has quit []
sepp2k has quit [Quit: Leaving.]
iago has quit [Quit: Leaving]
Edward has joined #ocaml
Edward has quit [Read error: Connection reset by peer]
worldhlord has quit [Ping timeout: 265 seconds]
mjonsson_ has joined #ocaml
aj2009 has quit [Read error: Connection timed out]
aj2009 has joined #ocaml
Associat0r has quit [Quit: Associat0r]
iratsu` has quit [Ping timeout: 240 seconds]
aj2009 has quit [Quit: Leaving]
jeddhaberstro has joined #ocaml
eldragon has joined #ocaml
iratsu` has joined #ocaml
|marius| has quit [Ping timeout: 265 seconds]
mjonsson_ has quit [Ping timeout: 248 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
mjonsson_ has joined #ocaml
metasyntax has joined #ocaml
iNode has quit [Ping timeout: 246 seconds]
jakedouglas has quit [Quit: Leaving.]
|marius| has joined #ocaml
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
oc13 has joined #ocaml
ftrvxmtrx has joined #ocaml
ygrek_ has joined #ocaml
Yoric has joined #ocaml
valross has quit [Quit: Ex-Chat]
odobenus has joined #ocaml
odobenus has quit [Remote host closed the connection]
ftrvxmtrx has quit [Quit: Leaving]
dcolish has quit [Ping timeout: 260 seconds]
metasyntax` has joined #ocaml
Obfuscate has quit [Ping timeout: 264 seconds]
metasyntax has quit [Ping timeout: 264 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
Obfuscate has joined #ocaml
oc13 has quit [Quit: oc13]
Yoric has quit [Quit: Yoric]
oc13 has joined #ocaml
itewsh has joined #ocaml
ikaros has joined #ocaml
<oc13> hi, i am playing around with ulex and yacc
<oc13> and got an error i have got difficulties to clear
Amorphous has quit [Ping timeout: 265 seconds]
<oc13> File "main.ml", line 15, characters 31-42:
<oc13> Error: This expression has type Ulexing.lexbuf -> Parser.token
<oc13> but an expression was expected of type Lexing.lexbuf -> Parser.token
<oc13> created a small example at:
jeddhaberstro has quit [Quit: jeddhaberstro]
ftrvxmtrx has joined #ocaml
<oc13> can anybody help me out here?
<thelema> ULexing != Lexing
<oc13> yes i am aware of, but where do i declare it
dcolish has joined #ocaml
<oc13> parser.ml and lexer.ml are mostly generated
thelema_ has joined #ocaml
<oc13> used exactly this text to change from lexing to ulexing
<oc13> must have overlooked something simple
thelema has quit [Disconnected by services]
thelema_ is now known as thelema
<thelema> it looks like it's missing the instructions on how to use this in yacc - it looks like you can't use it directly
<oc13> thanks. do you know to tell yacc to use lexing?
<oc13> sorry, ulexing
<thelema> yacc defaults to using lexing, I don't know how to tell it to use ulexing. It's possible a simple "module Lexing = Ulexing" would work
<thelema> (in the header of your yacc file)
<oc13> thanks.
Amorphous has joined #ocaml
|marius| has quit [Remote host closed the connection]
<thelema> you might try putting the question to stackoverflow.com - there's some really knowledgable ocaml people that answer questions there impressively promptly
<thelema> another person says that dpygen can use ulex
<oc13> thanks, will resort to recursive descend
<thelema> yup, that seems to be the alternative. There's some example code
<thelema> good luck.
<oc13> ok, will try it, thanks for your help
yoruk has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Tianon has quit [Read error: Connection reset by peer]
Associat0r has joined #ocaml
yoruk has quit [Quit: .]
oc13 has quit [Quit: oc13]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 265 seconds]
bacam has joined #ocaml
Associat0r has quit [Quit: Associat0r]
ygrek_ has quit [Ping timeout: 245 seconds]
pikachuyann has joined #ocaml
itewsh has quit [Ping timeout: 245 seconds]
hto has quit [Quit: leaving]
hto has joined #ocaml
krankkatze is now known as krnkktz
Yoric has joined #ocaml
eldragon has quit [Read error: Connection reset by peer]
eldragon has joined #ocaml
asmanur_ has joined #ocaml
asmanur has quit [Ping timeout: 248 seconds]
Yoric has quit [Ping timeout: 258 seconds]
manual has joined #ocaml
ygrek_ has joined #ocaml
boscop_ has left #ocaml []
boscop has joined #ocaml
ztfw`` has quit [Read error: Operation timed out]
Yoric has joined #ocaml
Associat0r has joined #ocaml
ASpiwack has joined #ocaml
_andre has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
_unK has joined #ocaml
manual is now known as melba
melba is now known as manual
iratsu` has quit [Ping timeout: 240 seconds]
iratsu` has joined #ocaml
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
bzzbzz has joined #ocaml
Znudzon_ has joined #ocaml
Yoric has quit [Quit: Yoric]
Znudzon_ has quit [Read error: Connection reset by peer]
iratsu` has quit [Ping timeout: 260 seconds]
iratsu has joined #ocaml
Znudzon has joined #ocaml
<Znudzon> could anyone tell me what means unbound package ? (iam trying to compile program with Tk )
<adrien> can you quote the exact error? and which program? it has a makefile or something like that? also, where is your ocaml installation from?
<Znudzon> "Error: Unbound value require" this is the error msg
|marius| has joined #ocaml
|marius| has quit [Remote host closed the connection]
<Znudzon> I have error :Unbound module Tk... what i can do with this ?
<flux> znudzon, the compiler cannot find the corresponding .cmi-files
<flux> znudzon, in this case, tk.cmi
<flux> znudzon, to fix it, use the the switch -I +labltk (if you're not using ocamlfind)
<Znudzon> How about when i'm using ocamlfind ?
<flux> -package labltk
<Znudzon> and after this my compiler add this to his packages lib or i must to write this all the time ?
<flux> often times this kind on information is written into your build script or Makefile
<flux> if you are not familiar with make, you could just make do with build.sh that contains the line required to compile the program
<flux> then there is ocamlbuild, which is nice to use once you get a proper myocamlbuild.ml (one that has ocamlfind-support)
<Znudzon> and each time when i will write something with tk module i must add - +labltk ?
jakedouglas has joined #ocaml
<flux> yes. ocamlc doesn't save anything to some configuration file.
<Znudzon> what a pity...
<Znudzon> but is there any kind of script for emacs fir this ?
<flux> I doubt that
<flux> well, you can use M-x compile
<flux> it asks for the compilation line
<flux> M-x recompile will recompile using the same line
<flux> IIRC the line can also be embedded inside the source file, but I don't remember the syntax
<Znudzon> hmm and add it to a new shortcut ...
<Znudzon> how will look the whole campilation line with labltk inside ?
iratsu has quit [Ping timeout: 240 seconds]
<flux> ocamlfind ocamlc -package labltk -o program -linkpkg source1.ml source2.ml
<Znudzon> thank you
<Znudzon> source is the program name ? right ?
<flux> source1.ml is the file with your code in it.. "program" is the resulting executable file.
<Znudzon> se
<Znudzon> i see
<flux> znudzon, you do know what M-x means, right?
iratsu has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
<flux> znudzon, maybe the compilation line is wrong or you have a problem in the program.
rwmjones has joined #ocaml
ikaros has joined #ocaml
ygrek_ has joined #ocaml
Yoric has joined #ocaml
<Znudzon> hmm this program is from examples to caml
<Znudzon> i think that i dont have problems there
<adrien> I tried it ( http://vpaste.net/rIM1l? ) and it works fine for me
<Znudzon> Adrien: ive copy this to my emacs .. whats next ?
<adrien> 'ocamlopt -I +labltk source.ml' gives you "unbound module"? how did you install ocaml?
<adrien> have to go away a bit
<Znudzon> from with synaptic pakage menager
<thelema> Znudzon: ubuntu?
<Znudzon> yes
<Znudzon> something is wrong ?
* thelema checks if the packagers split off labltk into a different package
<thelema> you have the package ocaml-base installed?
<thelema> (not just ocaml-base-nox)
<thelema> do you have a folder /usr/lib/ocaml/labltk
_unK has quit [Remote host closed the connection]
<Znudzon> one second...
<Znudzon> yes i have it
<thelema> and and what's your error? unbound 'require'?
<Znudzon> Unboun Tk module
<Znudzon> Adrien when i use your example i have :No implementations provided for the following modules:
<Znudzon> Camltk referenced from simple.cmx
<thelema> and you have a /usr/lib/ocaml/labltk/camltk.cmi file?
<thelema> hmm, actually you might have found a packaging bug. try ocamlopt instead.
avsm has joined #ocaml
<thelema> hmm, it doesn't work for me either.
<Znudzon> this is my program :
<Znudzon> open Camltk;;
<Znudzon> let action () = print_string "Hello world!"; print_newline ();;
<Znudzon> let hello () =
<Znudzon> let main_window = openTk () in
<Znudzon> let bouton_press =
<Znudzon> Button.create main_window
<Znudzon> [Text "Press me"; Command action] in
<Znudzon> pack [bouton_press] [];
<Znudzon> mainLoop ();;
<Znudzon> if !Sys.interactive then () else begin hello (); closeTk () end;;
<Znudzon> after compiling with ocamlc i have error:Reference to undefined global `Camltk'
<thelema> I found the pastebin and am working to compile that myself
<Znudzon> thanks
<thelema> ok, it works with ocamlbuild:
<thelema> ocamlfind ocamlc -c -package labltk -o tk.cmo tk.ml
<thelema> ocamlfind ocamlc -linkpkg -package labltk tk.cmo -o tk.byte
<thelema> ah, we weren't building properly - in addition to [-I +labltk], we needed to add [labltk.cma]
<thelema> (which is why I let ocamlfind/ocamlbuild take care of these things
<Znudzon> after this i have tk.o and what now ?:)
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
<thelema> tk.o? the two ocamlfind lines I pasted work together to produce the binary in two steps, producing an intermediate tk.cmo file
<adrien> we tend to use ocamlfind as soon as additional libraries are involved: it takes cares of almost everything
<thelema> ocamlopt -I +labltk labltk.cmxa tk.ml -o tk
<Znudzon> i see
jsk is now known as jsk-away
<Znudzon> ok... then each time when i would like to build some program with tk i must write in console :
<Znudzon> ocamlfind ocamlc -c -package labltk -o tk.cmo tk.ml
<Znudzon> ocamlfind ocamlc -linkpkg -package labltk tk.cmo -o tk.byte
<Znudzon> ocamlopt -I +labltk labltk.cmxa tk.ml -o tk
<Znudzon> those 3 lines ?
sepp2k has joined #ocaml
<adrien> no: the first two *OR* the third one, and they 're not completely equivalent since the first two ones perform separate compilation (useful when you have several files) and the last one does it in one pass
<Znudzon> how about when i have several modules ?
ftrvxmtrx has quit [Quit: Leaving]
Znudzon has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
Znudzon has joined #ocaml
<adrien> Znudzon: ocamlfind ocamlc -c -package labltk -o tk1.cmo tk1.ml; ocamlfind ocamlc -c -package labltk -o tk2.cmo tk2.ml; ocamlfind ocamlc -c -package labltk -o tk3.cmo tk3.ml; ocamlfind ocamlc -linkpkg -package labltk tk1.cmo tk2.cmo tk3.cmo -o tk.byte
Znudzon has quit [Remote host closed the connection]
mjonsson_ has quit [Ping timeout: 264 seconds]
mjonsson_ has joined #ocaml
oriba has joined #ocaml
|marius| has joined #ocaml
metasyntax has joined #ocaml
metasyntax is now known as metasyntax``
ygrek_ has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
ASpiwack has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
oriba has quit [Quit: Verlassend]
avsm has quit [Quit: Leaving.]
jakedouglas has quit [Ping timeout: 240 seconds]
jakedouglas has joined #ocaml
willb has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Associat0r has quit [Quit: Associat0r]
_andre has quit [Quit: leaving]
ulfdoz has quit [Ping timeout: 276 seconds]
manual is now known as melba
willb has quit [Ping timeout: 245 seconds]
Yoric has quit [Quit: Yoric]
<pikachuyann> Bonne nuit / good night all
pikachuyann has quit [Quit: Quitte]
willb has joined #ocaml
malc_ has joined #ocaml
Anarchos has quit [Quit: time to sleep]
avsm has joined #ocaml
valross has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
philtor has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
sepp2k has joined #ocaml
|marius| has quit [Remote host closed the connection]
|marius| has joined #ocaml
aj2009 has joined #ocaml