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
polin8 has quit ["Lost terminal"]
polin8 has joined #ocaml
polin8 has quit [Read error: 104 (Connection reset by peer)]
asquii has joined #ocaml
clx has left #ocaml []
asqui has quit [Read error: 110 (Connection timed out)]
asquii is now known as asqui
Smerdyakov has quit []
polin8 has joined #ocaml
Verbed has quit []
Verbed has joined #ocaml
Smerdyakov has joined #ocaml
Kinners has joined #ocaml
baader has quit ["I'll be back"]
<iusris> anyone up?
<Kinners> I am
<iusris> :) got a problem I've been beating my head about for a bit; feel like helping?
<Kinners> I'll try
<iusris> not hard, I'm sure-- I'm fairly new to ocaml
<iusris> I have this type- type distance = Kilometer of float | Mile of float;;
<iusris> what I'd like to do is write a function that will accept a constructor (Mile/Kilometer) and then output a result using that constructor
<iusris> the problem I've run into is that I can't seem to pass the constructor-- is it even possible?
<iusris> or would it be more viable to pass a string, match off that, and apply the appropriate constructor ?
<iusris> that make sense?
<Kinners> you're doing something like 'convert Mile(1.)' ? you need to put parenthesis around Mile(1.)
<Kinners> can you paste the line that is giving you trouble?
<iusris> well, the main drift is:
<iusris> let great_circle_dist lat1 lon1 lat2 lon2 output_form =
<iusris> (some lines here)
<iusris> in match output_form with
<iusris> Kilometer -> kilometer_of_radian result
<iusris> |Mile -> mile_of_radian result;;
<iusris> that Kilometer match is the issue, because I guess I thought I could pass in the Kilometer constructor in as output_form, and I can't
<iusris> I could pass in a dummy Kilometer(1.) or whatever, but I thought there was a cleaner way
<Kinners> you can use _ as a dummy, Kilometer _ -> ...
* iusris nods
<iusris> I'd, of course, hav to pass in a dummy float value as well
<iusris> but if that's what I have to do, then that's what I'll do
<iusris> thanks for the help :)
<Kinners> you could use a different type as well
<Kinners> type measure = K | M
<Kinners> type distance = measure * float
<iusris> ahh- then I could pass K/M directly b/c it wouldn't need an argument, right?
<Kinners> let conv (m,d) = match m with Kilometer -> Mile, (d /. 1.61) | Mile -> Kilometer, (d *. 1.61);;
<Kinners> or something like that
<Kinners> yes
<iusris> nice-- yes, that's the most elegant solution-- thanks :)
lament has quit ["heh"]
osmin626 has joined #ocaml
lament has joined #ocaml
lus|wazze has joined #ocaml
Kinners has left #ocaml []
foxster has quit []
osmin626 has quit ["Client Exiting"]
lus|wazze has quit ["\o/ *liephab* \o/"]
lus|wazze has joined #ocaml
foxster has joined #ocaml
lament has quit ["heh"]
karryall has quit ["bye"]
gene9 has joined #ocaml
<seth_> I'm using the input_line method, on a socket. It reads one line and then never returns from the next call to input_line. I did a network trace and there are more lines available to read. Anyone know about this problem?
<seth_> it isn't just with input_line. the same thing happens with input_char, except of course that it only reads one character instead of reading one line.
<seth_> it appears it discards all the additional input.
<reltuk> what's the best way to learn functional programming? I mean...I think so procedurally right now
<reltuk> well really, I think objects...but functional is way out there when I read code
<reltuk> gene9 : thanks
gene9 has quit []
systems has joined #ocaml
systems has quit [Read error: 110 (Connection timed out)]
gene9 has joined #ocaml
Yurik has joined #ocaml
<reltuk> I think my routing to france is seriously messed up
<reltuk> like the ocaml site doesn't work, teh o'rielly book site in the topic hardly works...
<reltuk> so I can't find caml-mode for emacs
mattam has joined #ocaml
TachYon has joined #ocaml
bartek has joined #ocaml
TachYon has quit ["Client Exiting"]
gene9 has quit []
__DL__ has joined #ocaml
bartek has quit [Read error: 110 (Connection timed out)]
lus|wazze has quit ["\o/ *liephab* \o/"]
xmkl has quit [Read error: 104 (Connection reset by peer)]
smklsmkl has joined #ocaml
smklsmkl has quit [Remote closed the connection]
smklsmkl has joined #ocaml
coolduck has joined #ocaml
coolduck has quit ["Client Exiting"]
<seth_> reltuk: still here?
foxster has quit [Read error: 104 (Connection reset by peer)]
foxster has joined #ocaml
TachYon has joined #ocaml
<seth_> I'm having a problem with the debugger. When I debug my program, the debugger always stops at two places, even though I haven't set any breakpoints. Does that sound familiar to anyone?
* Yurik is drinking cheap and wonderful (for that price) wine
<seth_> Yurik: that cheap wine will come back to haunt you.
<Yurik> seth_: it seems that not
<Yurik> seth_: it's a Crimea's wine
<seth_> Yurik: ok, then it isn't cheap wine, it is inexpensive wine. :)
<Yurik> and it is a sovignion (or how it is writes?)
<seth_> Yurik: not sure, french isn't one of my languages.
<Yurik> seth_: well, it costs about 1EU per liter, in paper Tetra-Pak... it's cheaper 3 times than bottled one
<Yurik> seth_: sovignion is just a sort of wine, however a french wine coz
<seth_> Yurik: yes, I know, but the word is french. There is an old joke, "look for the bottle shaped like a brown paper bag"
<Yurik> but /me is pretty happy with this wine. it's a third liter of it; pretty drunk but ok
<seth_> Yurik: sounds interesting. It is the middle of the day here, so too early for wine.
<Yurik> of coz it is better to buy a moldovian wine here, but it costs as minimum as about 3,2EU for 0,7l for 1987
<Yurik> seth_: it is 9PM now here
<seth_> Yurik: Eastern europe? Or Russia?
<Yurik> seth_: Ukraine
<Yurik> seth_: so, Eastern europe
<Yurik> thinking to go for the forth liter.. :) that shop is in few minutes from here
<Yurik> as I understand, Ukraine, Russia and Bielorussia has the cheapest alcohol over the world and that is pretty good
* emu thinks Yurik has blown his stack
<Yurik> btw, sorry for my absolute total dummies' English
* Yurik thinks to continue OCamlBDB... And OCamlGettext seems to be more or less complete.. just saw my topic there :)
<seth_> Yurik: anything you buy here for $1 (which is about 1 euro) is poison
* Yurik is also thinking whether he wants to present some lecture on a next osdn.org.ua conference. three (really two) days left for abstracts
<emu> you can get a handle of Crowne Russe vodka for $12
<Yurik> seth_: and it isn't true here :)) imagine our average salary... :)
<emu> poison, imho
<Yurik> emu: good ukranian or russian vodka costs here for 1,5EU-3EU now
<Yurik> and it is not poison. it's pretty good
<emu> what's the best vodka?
<Yurik> I think that Hetman's vodka is the best. It is manufactured in Ukraine only, however
<Yurik> it is inexpensive and hangover is little if you don't drink vodka by liters
<emu> the best you can get around here is probably grey goose
* Yurik seems to be talkative this evening
<emu> and it costs a shitload
<Yurik> what is grey goose?
<emu> french
<emu> vodka
<Yurik> french vodka?... it's an absourd
<emu> I once tried Russian Standard, that was pretty good, but I was pretty drunk. they're only beginning to import it now though.
<Yurik> the only one vodka that is reasonable is slavic one
<Yurik> :)
<emu> I like grey goose better than stoli, for what it's worth
<Yurik> stoli is stolichnaya?
<emu> at least what they bring to the states
<emu> yes
<Yurik> stolichnaya of any company here is the most cheapest vodka here, as I can understand
<Yurik> it is for alcohol-addicted people
<Yurik> i drink it sometimes only i have no money :)
<Yurik> s/only i/only if I/s
<Yurik> not /s at the end, but /g :)) seems that I got my portion of first drinking today
<Yurik> :)
* docelic bought Russian Standard for his friend once... I was attracted by the ticket that was on the bottle: "for future and prosperity" :))
<Yurik> docelic: :))
Smerdyakov has quit []
<reltuk> there's some pretty suprising $15 USD and under bottles out there
<reltuk> you just gotta find them
<reltuk> or read from people who have already spent the time...
<Yurik> how much sosts beer in U.S. now?
<Yurik> just curious
<seth_> Yurik: depends on the beer.
<Yurik> for 0.5l bottled (or can)
<Yurik> i meen average beer
<Yurik> s/meen/mean/g
<seth_> Yurik: anywhere from $0.75 to $2.00, depending on the quality
<Yurik> sorry for my sucked english again
<Yurik> is Budwaiser (or how it is wrtten again :)) a good beer?
<seth_> Yurik: no, Budweiser is awful.
<Yurik> ok, so I'll continue w/ ukranian and european (austrian,deutsch) beer :)
<reltuk> smart American's drink imported beer...
* Yurik is a fan of the very good beer
<seth_> Yurik: there are some good local beers, but they aren't exported.
<seth_> Yurik: I think the main difference among beers is how old they are. Factory beer that sits in a can for months is never good.
<Yurik> seth_: the equal situation is here. Ukraine manufactures a lot of different beer (in different traditions - slavic, west europenean and so on) but it is distributed mostly in Ukraine, Russia, Bielorussia and may be Poland and around
Smerdyakov has joined #ocaml
<Yurik> seth_: beer in glass rules, coz!
* Yurik is going to buy on emore liter
<Yurik> s/on e/one/g
<Yurik> anyone wanna wine? :))
Vincenz has joined #ocaml
systems has joined #ocaml
Smerdyakov has quit ["reboot"]
asquii has joined #ocaml
Smerdyakov has joined #ocaml
asqui has quit [Read error: 110 (Connection timed out)]
asquii is now known as asqui
systems has left #ocaml []
TachYon has quit ["Client Exiting"]
foxster has quit [Read error: 104 (Connection reset by peer)]
foxster has joined #ocaml
<reltuk> what's the best caml-mode for emacs?
* Riastradh likes the Tuareg mode.
<reltuk> I don't seem to be able to get it
<seth_> reltuk: what do you mean by not able to get it?
<reltuk> forbidden access for it's website
<reltuk> at least what google returns as it's news source
<reltuk> website I mean...
<seth_> reltuk: maybe the site is still down, it was having trouble all weekend. I could email it to you.
<reltuk> thanks for sending it...what's an out file?
<seth_> reltuk: I'm not sure I understand the question.
<reltuk> yeah, for some reason my archiver extracted a .out file instead of .tar
<reltuk> but it still untarred
<seth_> ok. you normally just do "tar xvjf name.bz2"
<reltuk> yeah, 'cept I'm on windows
<seth_> reltuk: still works. use cygwin
<reltuk> well, yeah...but I don't use cygwin much
<reltuk> sweet, totally works awesome
<reltuk> wow...really awesome mode...
__DL__ has quit [Remote closed the connection]
Vincenz has quit [Read error: 104 (Connection reset by peer)]
polin8 has quit [Read error: 104 (Connection reset by peer)]
polin8 has joined #ocaml