Yurik changed the topic of #ocaml to: http://icfpcontest.cse.ogi.edu/ -- OCaml wins | http://www.ocaml.org/ | http://caml.inria.fr/oreilly-book/ | http://icfp2002.cs.brown.edu/ | SWIG now supports OCaml| Early releases of OCamlBDB and OCamlGettext are available
lament has joined #ocaml
mattam has quit ["leaving"]
clog has quit [^C]
clog has joined #ocaml
* nkoza is away: I'm busy
graydon has quit [brunner.freenode.net irc.freenode.net]
Zadeh_ has quit [brunner.freenode.net irc.freenode.net]
skylan has quit [brunner.freenode.net irc.freenode.net]
emu has quit [brunner.freenode.net irc.freenode.net]
Torquema1a has quit [brunner.freenode.net irc.freenode.net]
Segora has quit [brunner.freenode.net irc.freenode.net]
xkb has quit [brunner.freenode.net irc.freenode.net]
nkoza has quit [brunner.freenode.net irc.freenode.net]
lindril has quit [brunner.freenode.net irc.freenode.net]
lam has quit [brunner.freenode.net irc.freenode.net]
merriam has quit [brunner.freenode.net irc.freenode.net]
lam has joined #ocaml
lindril has joined #ocaml
Segora has joined #ocaml
nkoza has joined #ocaml
xkb has joined #ocaml
Torquema1a has joined #ocaml
emu has joined #ocaml
skylan has joined #ocaml
Zadeh_ has joined #ocaml
graydon has joined #ocaml
merriam has joined #ocaml
lindril has quit [brunner.freenode.net irc.freenode.net]
lam has quit [brunner.freenode.net irc.freenode.net]
lindril has joined #ocaml
lam has joined #ocaml
lindril has quit [brunner.freenode.net irc.freenode.net]
lam has quit [brunner.freenode.net irc.freenode.net]
Zadeh_ has quit [brunner.freenode.net irc.freenode.net]
Torquema1a has quit [brunner.freenode.net irc.freenode.net]
Segora has quit [brunner.freenode.net irc.freenode.net]
graydon has quit [brunner.freenode.net irc.freenode.net]
xkb has quit [brunner.freenode.net irc.freenode.net]
nkoza has quit [brunner.freenode.net irc.freenode.net]
skylan has quit [brunner.freenode.net irc.freenode.net]
emu has quit [brunner.freenode.net irc.freenode.net]
graydon has joined #ocaml
Zadeh_ has joined #ocaml
skylan has joined #ocaml
emu has joined #ocaml
Torquema1a has joined #ocaml
xkb has joined #ocaml
nkoza has joined #ocaml
Segora has joined #ocaml
merriam has quit [brunner.freenode.net irc.freenode.net]
Segora has quit [brunner.freenode.net irc.freenode.net]
xkb has quit [brunner.freenode.net irc.freenode.net]
Torquema1a has quit [brunner.freenode.net irc.freenode.net]
Zadeh_ has quit [brunner.freenode.net irc.freenode.net]
graydon has quit [brunner.freenode.net irc.freenode.net]
emu has quit [brunner.freenode.net irc.freenode.net]
nkoza has quit [brunner.freenode.net irc.freenode.net]
skylan has quit [brunner.freenode.net irc.freenode.net]
graydon has joined #ocaml
Zadeh_ has joined #ocaml
skylan has joined #ocaml
emu has joined #ocaml
Torquema1a has joined #ocaml
xkb has joined #ocaml
nkoza has joined #ocaml
Segora has joined #ocaml
lindril has joined #ocaml
lam has joined #ocaml
merriam has joined #ocaml
stepcut has joined #ocaml
<stepcut> I have a program that reads "/etc/passwd", then calls useradd, and then re-reads "/etc/passwd" -- only it does not seem to be re-reading "/etc/passwd" ... is there some sort of caching going on or something I need to know about?
<stepcut> after I call useradd and re-read the file I still get the original contents
<whee> closing the file and reopening and all?
<stepcut> let ichan = open_in "/etc/passwd" in
<stepcut> let result = (Passwdparser.passwd Passwdlexer.item) (Lexing.from_channel ichan) in
<stepcut> close_in ichan;
<stepcut> result
<stepcut> result is a list of Unix.passwd_entry
<stepcut> oh wait
<stepcut> I friggin figured it out
<stepcut> i have "let parse_passwd = " instead of "let parse_passwd () ="
<stepcut> :p
<whee> heh
<whee> bad photoshopping there :)
<whee> I hope, anyway. heh
stepcut has quit [Remote closed the connection]
aca has joined #ocaml
aca is now known as ping
ping is now known as aca
aca is now known as w00t
w00t is now known as stfu
stfu is now known as you_suck
you_suck is now known as aca
aca has left #ocaml []
carbon has joined #ocaml
carbon has left #ocaml []
<whee> :\
<whee> I'm getting the urge to do cocoa bindings for ocaml
Kinners has left #ocaml []
<mrvn> I rather cath an urge to make hot coco.
<mrvn> catch even
skylan has quit [Read error: 54 (Connection reset by peer)]
skylan has joined #ocaml
Zadeh has joined #ocaml
Zadeh_ has quit [Read error: 54 (Connection reset by peer)]
lament has quit ["<Liam> cocks || <Liam> gigantic cocks || <Liam> slapping me in the face"]
lament has joined #ocaml
graydon has left #ocaml []
docelic|away is now known as docelic
mattam has joined #ocaml
whee has quit ["Leaving"]
docelic has quit ["Client Exiting"]
docelic has joined #ocaml
two-face has joined #ocaml
docelic is now known as docelic|away
<two-face> hi
* two-face is away: I'm busy
* two-face is back (gone 01:26:20)
intero has joined #ocaml
<intero> hi all
systems has joined #ocaml
* intero is away: I'll answer as I come back, I am away now, sorry =(
systems has left #ocaml []
asqui has joined #ocaml
mattam_ has joined #ocaml
* two-face is away: I'm busy
mattam has quit [Read error: 60 (Operation timed out)]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
polin8 has quit [Read error: 113 (No route to host)]
* two-face is back (gone 00:37:27)
polin8 has joined #ocaml
lament has quit ["<Liam> cocks || <Liam> gigantic cocks || <Liam> slapping me in the face"]
<intero> what are the boolean operators in ocaml? not or & ? is | equal to or?
<gehel> || is equal to "or", not is the negation, "and" = & = &&
<gehel> "|" does not exist
<gehel> but "and", in ocaml is not the logical operator
systems has joined #ocaml
<gehel> cf. let x = 1 and y = 2
<gehel> multiple declarations, intero
<intero> yes like in mutual recursion
<intero> thanks alot
<intero> so & = &&
<gehel> ye
<intero> i'll remember that
<intero> thanks
<gehel> np
<mattam_> gehel: is && lazy and & not like in C ?
mattam_ is now known as mattam
<intero> i thought they all were lazy
<mattam> why have two operators then ?
<intero> no idea
<intero> then also or and ||
<intero> but i am sure gehel is better informed
<mattam> maybe historical reasons. I don't know other ML languages...
systems has left #ocaml []
<gehel> the two are lazy
<gehel> dunno why there are two notations
<gehel> see SML, maybe :)
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
* intero is back (gone 03:43:25)
whee has joined #ocaml
<dash> hey, is it possible to define C types from ocaml?
<dash> structs and so forth
<whee> using the FFI, sure
<dash> excellent
<intero> where can i find out more about ffi?
<intero> thanks alot
<intero> is it an hard thing to do?
<whee> depends on how much you need to integrate the two, but it's not that hard
<intero> would it be possible to port some C libs into ocaml?
<dash> yes.
<intero> whee: forgive the question but.. was it you who did the physics programs?
<dash> i'm looking at extending pycaml to allow defining new python types :)
<intero> dash: and is it doable?
<dash> not sure yet
<dash> but it can already call python/c api functions
<intero> cool
<whee> intero: what physics programs? heh
<intero> whee: dont remember, probably for school/uni
<whee> probably not :)
<whee> dash: it might be worthwhile to look into using camlp4 for that
<whee> specifically for generating things at compile time instead of explicitly doing every one by hand
<dash> whee: Hmm. How so?
* dash hasn't messed with camlp4 yet.
<whee> I don't know how well it'd work with this particular interface, but (for example) there's a haskell interface using template haskell (which is basically haskell's camlp4 at this point) that would generate the actual bindings at compile time
<whee> so you just declare what you want to use and the preprocessor expands that into all you need to use it
<whee> haskell interface for cocoa, is what I wanted to say
<dash> hmm
<whee> I thought it was a great idea; the complete cocoa bindings fit in a 16kb tar.bz
<dash> i'll have to study a bit more :)
<whee> and then there's _nothing_ to do if one of the api changes or a new class is added
<dash> interesting
<whee> I compared it to the ruby bindings which were packaged in a relatively huge 300kb tar that'll be a pain to maintain as well
<whee> since each class is explicitly handled
<dash> wwell, i'm currently looking at rewriting a python DOM implementation in ocaml
<dash> mostly to see how feasible using ocaml as an optimization for our python system is
<dash> whee: do you know where i can find that cocoa binding?
<dash> i'd like to see how they used camlp4
<whee> there are no cocoa bindings for ocaml :\
<whee> I was referring to the haskell bindings
<dash> oh, haskell, heh
<dash> okay
<whee> the haskell bindings use a preprocessor much like camlp4 in its abilities
* dash nods.
<whee> camlp4 is easy to learn, go for it if it helps :P
<dash> heh
<whee> I don't know how well it would help
<whee> but if you find yourself writing a lot of repetitive code with just a few things different each time, it might be worth looking into
* dash nods.
<dash> hmm.
<dash> whee: i dont see stuff here on defining C structs. am i missing something obvious?
<whee> what are you looking to do?
<dash> well, to create a new python type from C, you create a PyTypeObject struct
<dash> can i do that from ocaml, or does that need to be part of my C glue?
<dash> (pycaml already has some :)
<whee> yeah, you'll need to do that from C
<dash> oh well :)
<whee> mmm I hope gtk2 bindings are being worked on
<whee> I'm also tempted to see if I can do cocoa bindings for ocaml now :\
<whee> oh, great
<whee> since I installed apple's X11 a week or so ago, ocamlbrowser gets compiled :))
docelic|away has quit [Read error: 110 (Connection timed out)]
<intero> anyone
<intero> ?
<intero> i have a little let.. in prob
docelic|away has joined #ocaml
<whee> intero: hi~
<intero> hi whee :P
<whee> what's the problem? heh
<intero> heh
<intero> okay i have a graph
<intero> and i can calculate the in_grade of each node
<intero> (how many arcs enter a node)
<intero> i have to calculate tha max in_grade in the graph
<intero> having problems though, even if i know it's simple
<intero> so i have 3 functions
<whee> have some structure that contains all the nodes?
<intero> yes
<intero> type 'a graph = Gr of ('a * 'a) list;;
<intero> pretty huh
<whee> heh
<whee> how about a fold_left on that list of nodes
<intero> hell whee sorry i have to leave now
<whee> List.fold_left max 0 [1; 2; 3; 4; 5];
<whee> hokay~
<intero> but those are couples
<whee> yeah, replace max with a function to compare your nodes and replace 0 with a node with 0 connections
<whee> and of course the list with the list of nodes
<intero> i'll think of it
<intero> thanks alot
<intero> letting you know if i was able to do that
<intero> :)
<intero> later
<intero> and thanks
* intero is away: I'll answer as I come back, I am away now, sorry =(
<whee> bye
asqui has quit [Read error: 104 (Connection reset by peer)]
asqui has joined #ocaml
polin8_ has joined #ocaml
polin8 has quit [Read error: 113 (No route to host)]
polin8_ is now known as polin8
systems has joined #ocaml
systems has quit ["Client Exiting"]
two-face has quit ["Client Exiting"]
Kinners has joined #ocaml
Kinners has left #ocaml []
Kinners has joined #ocaml