Iter has quit [Read error: 110 (Connection timed out)]
CosmicRay has joined #ocaml
Tarka has quit ["leaving"]
badonaway is now known as badon
mattam_ is now known as mattam
CosmicRay has quit ["Leaving"]
mfurr has quit ["leaving"]
det has quit [Remote closed the connection]
yauz_ has joined #ocaml
yauz has quit [Read error: 113 (No route to host)]
_fab has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
bk_ has joined #ocaml
lambdawar has quit [Remote closed the connection]
kinners has joined #ocaml
xolution has joined #ocaml
xolution has quit [Read error: 104 (Connection reset by peer)]
Lemmih has quit [Remote closed the connection]
Lemmih has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Axioplase has quit ["error 8.6 (Connection reset by beer)"]
kinners has quit [Read error: 110 (Connection timed out)]
mrsolo has joined #ocaml
GreyLensman has quit ["Leaving"]
monotonom has joined #ocaml
CosmicRay has joined #ocaml
cjohnson has quit [Read error: 54 (Connection reset by peer)]
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
wedman has joined #ocaml
CosmicRay has quit ["Leaving"]
bk_ has joined #ocaml
quix has joined #ocaml
<wedman>
So... Is there ever any discussion around here. :p
wedman has left #ocaml []
<Riastradh>
Only annually.
<Riastradh>
This year's conversation was a couple days ago.
<bk_>
now you violated our vow of silence
monotonom has quit ["Don't talk to those who talk to themselves."]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Herrchen_ is now known as Herrchen
<Herrchen>
moin
<Riastradh>
niom
bk_ has joined #ocaml
<mrsolo>
hmm how important is unit testing suit in ocaml?
Snark has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
det has joined #ocaml
smimou has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
dan|el has quit [Read error: 110 (Connection timed out)]
Stigmaata has joined #ocaml
Stigmaata has left #ocaml []
bk_ has joined #ocaml
smimou has quit ["?"]
smimou has joined #ocaml
<Banana>
hi.
<bk_>
hi
quix has quit ["Lost terminal"]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
bk_ has joined #ocaml
ita has joined #ocaml
<ita>
hi all
cjohnson has joined #ocaml
buggs^z is now known as buggs
vezenchio has quit ["According to [a processor for game design], you statistically have a better chance of becoming a rock star than you do of suc]
<vincenz>
mrsolo: how important is changing your tired on a ford?
<vincenz>
tires even
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Vulpyne has joined #ocaml
<Vulpyne>
Hi. This may seem like a dumb question, but I haven't been able to find the answer in the docs: How can I make a method in a class recursive?
<Vulpyne>
"method rec blah blah" doesn't work.
<Vulpyne>
Nevermind, I'm smart!
<Vulpyne>
self#blah
dobrek has joined #ocaml
<ita>
i don't know why, but coding in ocaml with vim is less pleasant than eg:c++
* ita
uses kate now
<cDlm>
c++ in vim ? i wouldnt call that pleasant :)
<ita>
cDlm: try "gg=G" and you'll see the power of it
<cDlm>
what is it meant to do ?
<ita>
try and see :)
<cDlm>
i dont have C++ code at hand :p
<cDlm>
and I won't.
<ita>
it reindents the whole file
<cDlm>
oh
<ita>
(does not work really well in caml - indenting does not work well btw)
<cDlm>
camlp4 works
<ita>
yep, but it's ugly
<cDlm>
but caml tends to have lots of nesting
<cDlm>
so indenting it nicely is not easy
<Banana>
tuareg mode for emacs is realy neat.
<ita>
yeah, if you can stand emacs :)
<Banana>
of course.
<ita>
my little finger aches everytime i use it
<cDlm>
mine too
<cDlm>
mais faute de grives...
<ita>
ctrl+meta X meta shift Y reindent true then escape three times
<cDlm>
:)
<ita>
it's so frustrating they've put a psychologist in it
<ita>
nah, i have kate now, works well enough
* cDlm
hates both vim and emacs
<ita>
cDlm: you can't - you have to choose one :)
<Banana>
nedit ?
<Banana>
funny how this kind of conversation pops up now and then...
<ita>
Banana: hehe, it's like linux vs win32 or apple vs linux or j2ee vs .net ..
<cDlm>
yes I chose emacs, but that does not mean I like it
<ita>
cDlm: :)
CosmicRay has joined #ocaml
karryall has joined #ocaml
ita has quit ["Lost terminal"]
Iter has joined #ocaml
ita has joined #ocaml
<vincenz>
Small question
<Banana>
yep ?
<vincenz>
Unix.listen expects a number )number of sockets)
<vincenz>
is the number of listening sockets? What should this number be set to typically?
<mattam>
man listen
* vincenz
still isn't quite sure.
<vincenz>
So if I use for instance: 5.... 5 people can connect at the same time. But once cnonected more can connect? Or is it the number of people that -can- be connected?
<Riastradh>
The number of people that can be waiting to be accepted.
<vincenz>
AH alright, thank you :)
<vincenz>
That clarifies
<ita>
what's the type of a mutex ? i want to make the following : type emp = { rot : int; mutx : t ..
<vincenz>
See I'm following the chapter 20 in o'reilly obok
<vincenz>
but they go all out cause they have to use ThreadUnix (And hence make their own inputline func)
<vincenz>
but if I can just use the Unix module now.. I can use the first part (where they use fork) way of reading but still use lightthreads
<mattam>
maybe there are some buffering issues they overcome in their own inputline ?
<vincenz>
nope
<vincenz>
purely cause you can't use the Unix module...and hence in_channel_of_descr is not used
<vincenz>
hmm
<monotonom>
I'll play a bit of a historian.
<monotonom>
When the book was written, the Unix module was not thread-safe.
* vincenz
nods
<monotonom>
Then they added ThreadUnix containing thread-safe replacements.
<vincenz>
(small side question...can I call the in_channel_of_descr in the thread creating the sockets, and still use it after in the thread created by the connection class?)
* vincenz
nods
<monotonom>
But the newest development is that the module Unix is now thread-safe and you no longer need ThreadUnix.
<vincenz>
What was the original reason of keeping Unix when ThreadUnix existed?
Axioplase has joined #ocaml
<mattam>
i think not all Unix functions were implemented by ThreadUnix
<vincenz>
Ah ok
<Axioplase>
Chat Lu!
Snark has quit ["Parti"]
* vincenz
wonders why he can't get Mutex.create() to work
<monotonom>
I think all functions can be called from one thread, and its result used in another thread with the first thread dead. It does not violate mutual exclusion. The only exception is Thread.self followed by Thread.id of course.
<ita>
does the garbage collector work well when threading is used in programs ?
* vincenz
curses as it won't recognize the Mutex module
<Banana>
and you can open Thread, ThreadUnix or whatever you want.
<mattam>
ha
<mrsolo>
vincenz: once a while.. the reason i asked because of strong type checking system in ocaml, it makes having extensive unit tests less important
<mrsolo>
therefore i am just wondering if people do regularly construct unit test cases when program in ocaml, or just do some ad hoc testing
<ita>
have a nice weekend everybody
ita has quit ["i'll be back"]
<GSF>
:\
<Banana>
GSF: i don't understand...
<Banana>
do you use native Win32 ocaml port or cygwin ?
<GSF>
I use native win32 port for msvc
<GSF>
but in order to compile lablgtk, I need the cygwin tools
<Banana>
hum...
<GSF>
or at least that's what the readme says
<Banana>
it will compile a cygwin version methink.
<Banana>
there are dll for the windows port.
<GSF>
yes, but if I use the dll's, I'm not able to do native compilations with ocamlopt
<GSF>
You will need either the MSVC or mingw version of ocaml 3.07,
<GSF>
and cygwin development tools.
<Banana>
if you use cygwin tools you need proper ocaml installation in cygwin too...
<vincenz>
Banana: thnx!
<Banana>
GSF: i'm not expert in windows port of ocaml though :/
<GSF>
well, thanks anyway
<vincenz>
hmm
<vincenz>
Thread 2 killed on uncaught exception Sys_error("Bad file descriptor")
<vincenz>
Seems I don't have to close a desc
<vincenz>
descr
<vincenz>
client quits...I close the in and out chans, and I don't have to close the descr?
<Banana>
GSF: but afair Win32 isn't officially supported with lablGtk2.
<Banana>
lablgtk1.2 is.
<vincenz>
Never mind, I don't have to close the in and outchans derived from the descr
<GSF>
hmmm
<vincenz>
only the descr itself
<Banana>
well, i'm going back home.
<Banana>
see you people.
<GSF>
later Banana
<vincenz>
fucking crap connection
<vincenz>
There's a badlink between brussels and newyork that sometimes acts up
<vincenz>
for some stupid reason it acts up at 6pm central-european time (GMT+1)
<vincenz>
83% packetloss
<vincenz>
ah it's the link between brussels and london
<vincenz>
5 ae-0-17.mp1.Brussels1.Level3.net (212.3.239.97) 9.382 ms 4.461 ms 7.111 ms
<vincenz>
6 * * as-0-0.mp2.London1.Level3.net (4.68.128.105) 192.797 ms
<vincenz>
Anyways...
* vincenz
is trying to build a mud framework with this code he's writing in ocaml. So everyone has their connection....Now...how to make the code work.... Parsing happens within the thread of the connection, but what about the actions? Send them into some queue to be handled by a worldthread or make all accesses to the world happen through a set of functions that are mutexed..?
karryall has quit ["tcho"]
maihem has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
basti_ has joined #ocaml
GSF has quit []
CosmicRay_ has joined #ocaml
CosmicRay_ has quit [Read error: 104 (Connection reset by peer)]
FredCods has joined #ocaml
basti_ has quit []
<jlouis>
vincenz: most mod code I have seen does not use threads at all
<jlouis>
mud even
<jlouis>
They simply walk a list of connections, seeing if there is any commands to be done
<jlouis>
and a timer controls what happens at major ticks
<vincenz>
isn't it better to use threads?
<buggs>
vincenz, select should be faster
mattam_ has joined #ocaml
<vincenz>
oh
<vincenz>
hmm
<vincenz>
I was thinking a light thread each, a parser..
<vincenz>
So it can be used as a general server, not a mud perse
<vincenz>
all the code is in this language called coldc
<vincenz>
and the server itself just accepts requests and passes it to coldc
<vincenz>
so you can make anything with it
<vincenz>
there is a standard db with lot of functionality in it, but willingly you could start from scratch
mattam has quit [Read error: 110 (Connection timed out)]
* vincenz
hmms
reltuk has joined #ocaml
<jlouis>
You could choose do it the way you want, but I would not even begin to think in threads when working on a MUD
<reltuk>
jlouis: why not? I/O at the least should probably be done on a separate thread
<vincenz>
plus
<vincenz>
I could have aech thread parse
<reltuk>
and a lot of the time you've got quite a few things happening that don't affect other areas of the world...so if you can serialize it in accordance with world boundaries, it's conceivable that you can avoid a lot of serialization headaches
<vincenz>
and only basic actions could then go to the world itself
<jlouis>
every succesful parse will yield a world action of some kind
<vincenz>
no
<jlouis>
aha
<vincenz>
an ast of actions
<reltuk>
vincenz: at the least, if you're spawning a thread per connection you can parse input and serialize messages regarding events on each separate thread...
<vincenz>
reltuk: that's what I was thinking
<vincenz>
plus I cuold have another thread 'timer' to schedule stuff
<vincenz>
the world itself being passice
<vincenz>
passive even
<vincenz>
just not sure yet how to make a clean design
* vincenz
wonders how he can do read-many, block read when write-once
<reltuk>
it seems like each thread could handle almost all game logic...
<vincenz>
except communication
<reltuk>
except propagating events and world AI
<reltuk>
so each thread has a message queue that the world is pumping as output to the user
<vincenz>
I'd like some language resting on top of the framework, and everything is implemented in that language, with some basic elements implemented in the ocaml code hooking to what lies beneath
<reltuk>
and each thread feeds a server's message queu
<vincenz>
how do you do queues?
<vincenz>
plus how do I ensure the world queue has higher priority so it has time to run through it's queue?
CosmicRay has quit ["Client exiting"]
<reltuk>
hmm...I'm sure ocaml has some sort of datatype for it...you might have to serialize insertion on the main world's queue
* reltuk
notes that most MUD servers aren't pushing 100% processor usage
<vincenz>
aha
<vincenz>
each mesasge would have a connection number and it's actions
<vincenz>
and then the world would have rules: say: send to the connection number as ewll as all the other ones in the same room
<vincenz>
(well connection would have to be something more abstract than just anumber_
<vincenz>
the driver itself only knows an internal db format and connections
<vincenz>
everything else is written in the coldc language
<vincenz>
so you can make any type of server with it you want
<vincenz>
there are few tie-ins towards the driver, but the rest is coldc code
<reltuk>
wow, looks cool
<vincenz>
I wrote my own db with many things (though it's much like the colddb they have)
<vincenz>
except I don't like the system of doing ansi they use in their db
<vincenz>
But I'm stuck with my db
<vincenz>
there's some problems with the way I implemented the parsing-system
<reltuk>
MUD servers can be interesting to write
<vincenz>
Not when doing it alone though :/
<reltuk>
*shrug*, guess it depends on how ambitious you get
<vincenz>
it's nice to bounce ideas around
<vincenz>
The idea of my server is that admins can do anything, programmers have access to the coding facilities, builders have verbs just to build, and then well players
<vincenz>
the admin already has the possibility of editing code live
<reltuk>
cool...most systems don't provide the flexibility of live code editing
<vincenz>
that's why I thought ocaml would be perfect for this
<reltuk>
ocaml is statically bound....
<vincenz>
I know but it makes for great compilers
<vincenz>
So a middle-level language could be used