<aklt>
I'm #using topfind and am #requiring some things. When I then want to compile using ocamlc I get a syntax error for lines beginning with #'s
<aklt>
How can I avoid this?
<sgnb>
aklt: don't use #'s directives in files to be compiled with ocaml{c,opt}
<aklt>
I'm currently commenting the #'s oyt each time I compile, but thats silly. I need the #'s there for when I'm loading my script into the ocaml toplevel during development.
<kaustuv>
aklt: put directives in a file named .ocamlinit in the same directory you run the toplevel from.
<aklt>
Ah, I'll try that!
<kaustuv>
Another option is to use ocamlmktop to make yourself a custom toplevel with all your code preloaded
<aklt>
Ah, great that works fine!
<aklt>
Thanks, now I can get down with some nice coding ...
<kaustuv>
bon hacking
<aklt>
thanks :-)
aklt_ has joined #ocaml
aklt_ has quit [Client Quit]
aklt has quit ["See you"]
aklt has joined #ocaml
aklt has quit ["leaving"]
ztfw has joined #ocaml
ztfw has left #ocaml []
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: 54 (Connection reset by peer)]
jdrake has quit []
Associat0r has quit []
travisbrady_ has quit []
travisbrady has joined #ocaml
jeddhaberstro has quit [Client Quit]
jeddhaberstro has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Read error: 110 (Connection timed out)]
rwmjones has quit [Read error: 113 (No route to host)]
jeddhaberstro has quit [Client Quit]
mishok13 has quit [Read error: 110 (Connection timed out)]
schme has joined #ocaml
smimou has joined #ocaml
Jedai has joined #ocaml
Associat0r has joined #ocaml
rwmjones has joined #ocaml
smimou has quit ["bli"]
smimou has joined #ocaml
sramsay has joined #ocaml
tautrimas has joined #ocaml
<tautrimas>
Hello, everyone. For a few days I was trying to use Allegro and SDL libraries. I'm sucessful with launching them but there is one problem: those libraries doesn't detect any hardware accelerated video output. I'm using linux system with nvidia proprietary drivers and some time ago I was quite successful at using OpenGL with c++ using same computer. Is this an OCaml problem, that hw acceleration is not detected?
<tautrimas>
oh, thank you! Now I see the point. But if I use OpenGL with SDL, will it be accelerated?
<mfp>
AFAICS using SDL from OCaml shouldn't affect acceleration, as long as you're using the API correctly (and assuming the stubs are complete enough), so the pb shouldn't be how to get HW accel with SDL+OCaml, it's just a matter of getting SDL to work
<mfp>
"Basically: SDL with no OpenGL -> no acceleration SDL with OpenGL -> acceleration, if available, to the point that 2D games can be much faster if programmed using OpenGL calls instead of SDL ones."
<tautrimas>
mfp: perfect! What I'm trying to achieve is a game under OCaml. As far as I have searched, no engine exists of simplifying a process of creating user interface (like buttons). Nothing similar to Ogre3d right? At least ocaml hump refers to outdated projects
maxote has quit [Read error: 110 (Connection timed out)]
<mfp>
sorry, haven't done any graphics stuff with OCaml, hopefully somebody else will know here :-|
maxote has joined #ocaml
<Camarade_Tux>
TaXules: I know FreeCiv has an SDL backend and uses buttons so you might want to see FreeCiv's code
<Camarade_Tux>
(that would probably require bindings though)
<tautrimas>
thank you guys! Worms Ultimate is quite an interesting find. Thank you for putting me on the right tracks.
LeCamarade|Away has quit ["Gone."]
<flux>
mfp, looks quite nice, too bad the name also is copied, and I do wonder if the graphics are original either
<flux>
(..or copied with permission, which feels doubtful)
LeCamarade has joined #ocaml
<flux>
the code looks decent. there are mli-files, and the mli-files have documentation. in french.
<flux>
fortunately the function names themselves are in english ;-)
<Camarade_Tux>
bah : wget tells me "cannot write to `worms_martani-fayssal.zip?................' (File name too long)." ><
<flux>
hehheh, it's superfast for me
<Camarade_Tux>
flux: considering how map1.png is ugly, I don't think there isn't any copyright problem there ;p
<flux>
but hey, the main menu picture even has team17 logo in it..
<flux>
the png isn't something you see directly anyway, it is used as a mask
<flux>
looks much better afte rthat ;)
<flux>
I wonder if the author really has that much slower machine, or is the speed a bug
<flux>
it takes 50% here
<Camarade_Tux>
flux: where is this speed problem mentionned?
<Camarade_Tux>
and graphic drivers can have a real impact ;)
<flux>
camarade_tux, it's not mentioned, I'm experiencing it myself
<Camarade_Tux>
flux: you mean it takes as much cpu power as possible?
<flux>
camarade_tux, maybe
<flux>
but it only manages to take 50%, could be that some synchronization issue slows it down slightly
<flux>
but the main loop looks like it's going at full blast
* Camarade_Tux
tries
* Camarade_Tux
installs sdl for ocaml
<flux>
no Unix.select in the source anywhere (for delaying purposes)
<flux>
but it does make use of time of day for timing purposes, hmm..
<flux>
but not for controlling the worm speed or main loop rate
<Camarade_Tux>
bah, ocamlsdl already installed
<flux>
also the worm coordinates are integers, so it's difficult to support subpixel positions
<flux>
it may look like I'm only critisizing, but overall it looks neat even if unfinished :)
<flux>
IOW, it's a good start - and it's only 1.5kLOC
* Camarade_Tux
gets "Unboud module Sdlvideo" =/
<flux>
should come with ocamlsdl
<flux>
camarade_tux, how have you installed ocamlsdl?
<Camarade_Tux>
no, I think the problem is rather compilation :
<Camarade_Tux>
ocamlc -c -I +sdl draw.ml
<flux>
works for me (TM)
<Camarade_Tux>
(* /me using godi *)
<flux>
I have distribution-installed sdl here
<flux>
maybe you can ocamlfindify the Makefile
<Camarade_Tux>
just did that and that works
<Camarade_Tux>
well, I just changed "-I +sdl" to "-I /full/path/sdl" ;)
<Camarade_Tux>
but the game uses a full cpu here
<mfp>
.oO(wow, latest spam to pass through the net Subject: Stop being an asshole coming from China)
<Camarade_Tux>
><
<Camarade_Tux>
the ones I like most are the "personal" emails on public mailing-lists :)
<Camarade_Tux>
flux: it's pretty common to have a continuous loop to get events in sdl
<flux>
camarade_tux, sure, but you should use time for something..
<Camarade_Tux>
yep, I agree :)
<Camarade_Tux>
plus such loops usually makes it hard for sdl to get keyboard/mouse events
* Camarade_Tux
stupid
Amorphous has quit [Read error: 113 (No route to host)]
Amorphous has joined #ocaml
ulfdoz has joined #ocaml
komar_ has joined #ocaml
delroth has quit [Read error: 110 (Connection timed out)]
X-Scale has joined #ocaml
hkBst has joined #ocaml
tautrimas has quit [Remote closed the connection]
BiDOrD has quit [Read error: 104 (Connection reset by peer)]
Snark_ has joined #ocaml
Snark_ is now known as Snark
LeCamarade is now known as LeCamarade|Away
smimou has quit ["bli"]
_andre has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD has quit [Read error: 104 (Connection reset by peer)]
bombshelter13_ has joined #ocaml
_andre has quit ["Lost terminal"]
LeCamarade|Away is now known as LeCamarade
LeCamarade is now known as LeCamarade|Away
ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz has joined #ocaml
ppsmimou has quit [Remote closed the connection]
Lomono has joined #ocaml
ppsmimou has joined #ocaml
Amorphous has quit [hubbard.freenode.net irc.freenode.net]
bartiosze has quit [hubbard.freenode.net irc.freenode.net]
mellum has quit [hubbard.freenode.net irc.freenode.net]
Amorphous has joined #ocaml
mellum has joined #ocaml
bartiosze has joined #ocaml
Amorphous has quit [SendQ exceeded]
Modius_ has joined #ocaml
Amorphous has joined #ocaml
Modius_ has quit [Client Quit]
Modius has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
<Modius>
This question may pi** people off - I'm mostly on Windows platform - will using F# teach the essence of OCaml, or am I missing out by learning on F# vs OCaml?
<schme>
Modius: I don't think you will be missing out on very much. But I am curious as to why you're not using ocaml :)
BiDOrD has joined #ocaml
<Camarade_Tux>
ocaml is annoying to install on windows :)
<Camarade_Tux>
a virtual machine is probably one of the way to go actually ;)
<Modius>
I was just wondering if the differences obscured some of the essence of OCaml - I can't comment as I don't know OCaml: Say: "Functors, OCaml-style objects, labels and optional arguments are not supported. Some common functors like Set.Make and Hashtbl.Make are simulated by returning records of functions.
<Modius>
" <-- something allegedly not present in F#, are Functors and OCaml objects a defining facet of the language?
jeddhaberstro has joined #ocaml
<Camarade_Tux>
Modius: they play a role (and a quite important one) but they aren't for beginners
<Camarade_Tux>
they aren't hard but they add to the syntax
<Camarade_Tux>
first get used to the most usual aspects and then try functors and objects :)
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
* Camarade_Tux
's plan is to make nice virtual machine disk [instead of a livecd]
th5 has quit []
amuck_ has joined #ocaml
<kaustuv>
re: Oleg Kiseylov's post about GADTs to the list, isn't there a paper at the ML workshop this year that adds native GADTs to Ocaml? Or am I misremembering?
<kaustuv>
Ah, yes I was misremembering. It was about adding explicit foralls to the type system.
jeddhaberstro has quit [Client Quit]
sporkmonger has joined #ocaml
ulfdoz has joined #ocaml
psnively has joined #ocaml
psnively has left #ocaml []
marmottine has joined #ocaml
travisbrady_ has quit []
mpwd has joined #ocaml
sporkmonger has quit []
<Associat0r>
Modius: row types and functors
shazam has joined #ocaml
* shazam
wonders if camomile has any functions for pretty printing control characters
<Associat0r>
Modius: if formality and abstraction is a concern then it can be a big miss not to have functors
shazam is now known as palomer
<Associat0r>
Modius: F# has optional and named args on methods, not on free functions yet but they will be added
jeddhaberstro has joined #ocaml
<Modius>
Associat0r: Yeah, it's annoying, seems to me that the essence of OCaml (yes, the advanced stuff) is lost in F#, whereas F# is easier for a Windows user to use.
<kaustuv>
The essence of any ML is the Hindley-Milner type system based on principal typing and type inference. In that respect, F# leaves a lot to be desired.
<Camarade_Tux>
kaustuv, right, I had forgotten about that
<Camarade_Tux>
that's probably the only aspect that would be annoying for a beginner
tautrimas has joined #ocaml
<Modius>
That's what bugs me about investing effort in F# - I can learn the core OCaml syntax but not really "grok" anything other than shorthand for the functional C# I'm writing anyway.
travisbrady has joined #ocaml
<Associat0r>
kaustuv: if you stick to the FP in F# you won't have to annotate
<Associat0r>
Modius: you can learn a lot of functional with F#, continuations, recursion currying and what not
<Modius>
Associat0r: What I'm doing anyway in C# and other languages.
<Modius>
I'll give OCaml proper a shot.
<tautrimas>
Hello again. A while ago I was talking about writing a game in ocaml and SDL. What should I use for widget drawing? I mean, I can program a custom animated button or menu entry myself, but how should I handle user text input? I can't write text input widget of my own. Is there any libraries for just input widget? I know that such things as GLUI and PUI exists, but are they usefull for such purpose?
<Modius>
I mean, OCaml ("proper" sounds loaded) - thanks.
<Associat0r>
Modius: I don't think you do currying as easily in C# and it also has no proper TCO
<Modius>
Associat0r: I've used those concepts elsewhere (long story). I know what they are. I would like to learn what the type system itself gives.
<flux>
btw, does F# have TCO?
<Camarade_Tux>
Total Cost of Ownership? :D
<Associat0r>
flux: yes
<flux>
I'm thinking it must, it being such an essential part of ocaml
<flux>
well, atleast that would be an essential part of functional (well, atleast non-lazy) programming which you can learn there
<flux>
I doubt it's that useful in C#. does C# have TCO?
<Associat0r>
flux: no
<Modius>
flux: C# does not have TCO. IMHO, it WOULD be useful, as you can write functional-ish code that has very deep "stacks"
<flux>
tautrimas, why can't you write your own input widget?
<Camarade_Tux>
ok, tail-call optimization :)
<flux>
in any case, I have an attempt of a widget set for SDL in ocaml embedded in goba (modeemi.fi/~flux/goba/)
<Camarade_Tux>
tautrimas: do you want multi-line input widgets?
<tautrimas>
flux: because it is already written. And it is quite difficult to deal with all that cursor position, text, tab, enter, and so on.
<tautrimas>
Camarade_Tux: no, just for login and password
<tautrimas>
this is crazy. I just figured out, that I don't really have to have a widget for text input!
<flux>
:-)
<flux>
maybe I could publish the text entry and menu system for ocaml/sdl independently of goba (it is actually in its own directory with its own Makefile already)
palomer has quit ["Leaving"]
<Associat0r>
kaustuv: what's your problem with F#'s type inference?
acer` has joined #ocaml
sramsay has joined #ocaml
ChristopheT has joined #ocaml
ChristopheT has left #ocaml []
tautrimas has quit [Remote closed the connection]
Submarine has joined #ocaml
Lomono has quit ["Don't even think about saying Candlejack or else you wi"]
acer` has left #ocaml []
<det>
Im sure F# must have TCO
<det>
I have been playing with C# this week
<det>
must better than I thought it woul dbe
<det>
has closures, generics, etc
<Associat0r>
det: I already said it has TCO
<det>
I apologize for supporting you!
Pepe__ has joined #ocaml
<flux>
;-)
Pepe___ has joined #ocaml
Pepe_ has quit [Nick collision from services.]
Pepe___ is now known as Pepe
Pepe is now known as Pepe_
Pepe__ has quit [Read error: 60 (Operation timed out)]
sporkmonger has joined #ocaml
Submarine has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
hein091 has joined #ocaml
oriba has joined #ocaml
hein091 has left #ocaml []
holgr1 has joined #ocaml
holgr1 has left #ocaml []
Snark has quit ["Ex-Chat"]
shazam has joined #ocaml
<shazam>
anyone wanna see a cool video?
komar_ has quit [Read error: 60 (Operation timed out)]