mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
avsm has joined #ocaml
travisbrady_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
travisbrady has quit [Ping timeout: 252 seconds]
travisbrady_ is now known as travisbrady
travisbrady has quit [Ping timeout: 252 seconds]
pad has quit [Remote host closed the connection]
yakischloba has quit [Ping timeout: 265 seconds]
yakischloba has joined #ocaml
yakischloba has quit [Ping timeout: 264 seconds]
yakischloba has joined #ocaml
ramenboy has joined #ocaml
Drk-Sd has quit [Read error: Connection reset by peer]
Drk-Sd has joined #ocaml
ramenboy has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
Drk-Sd has quit [Quit: dodolost]
maelcoluim has quit [Ping timeout: 256 seconds]
maskd has quit [Quit: foo]
Modius has quit [Quit: I'm big in Japan]
yakischloba has quit [Quit: Leaving.]
joewilliams_away is now known as joewilliams
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
boscop_ has quit [Client Quit]
CcSsNET has joined #ocaml
mal`` has quit [Ping timeout: 246 seconds]
mal`` has joined #ocaml
_unK has quit [Remote host closed the connection]
CcSsNET has quit [Read error: Connection reset by peer]
Associat0r has quit [Quit: Associat0r]
gwynddyllyd has joined #ocaml
gwynddyllyd has quit [Quit: Lost terminal]
bzzbzz has quit [Quit: leaving]
joewilliams is now known as joewilliams_away
Amorphous has quit [Ping timeout: 276 seconds]
Amorphous has joined #ocaml
yakischloba has joined #ocaml
yakischloba has quit [Client Quit]
yakischloba has joined #ocaml
travisbrady has joined #ocaml
yakischloba has quit [Quit: Leaving.]
infoe- has left #ocaml []
ninegrid has joined #ocaml
<travisbrady> I'd like to build a simple in memory queue server in Ocaml not unlike Redis, anyone have any pointers? should I be using LWT?
mutew has joined #ocaml
mutew has quit [Client Quit]
travisbrady has quit [Quit: travisbrady]
ulfdoz has joined #ocaml
tmaeda is now known as tmaedaZ
Submarine has joined #ocaml
pimmhogeling has joined #ocaml
Yoric has joined #ocaml
avsm1 has joined #ocaml
thrasibule has quit [Ping timeout: 246 seconds]
yakischloba has joined #ocaml
yakischloba has quit [Client Quit]
ski_ has joined #ocaml
jonafan_ has joined #ocaml
derdon has joined #ocaml
jonafan has quit [Ping timeout: 264 seconds]
cataska has quit [Quit: leaving]
slash_ has joined #ocaml
avsm1 has quit [Quit: Leaving.]
hyperboreean has quit [Ping timeout: 260 seconds]
Drk-Sd has joined #ocaml
maskd has joined #ocaml
bluestorm has joined #ocaml
ikaros has joined #ocaml
hyperboreean has joined #ocaml
pimmhogeling has quit [Ping timeout: 256 seconds]
bluestorm has quit [Quit: Leaving]
ikaros has quit [Ping timeout: 256 seconds]
ikaros has joined #ocaml
Smerdyakov has joined #ocaml
<Smerdyakov> Is anyone interested in helping me test a platform for hosting web applications written in Ur/Web, my programming language which supports type-level computation in an ML-ish setting?
boscop_ has joined #ocaml
tmaedaZ is now known as tmaeda
elehack has joined #ocaml
Submarine has quit [Quit: Leaving]
Drk-Sd has quit [Quit: aw]
gareth_0 has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
Drk-Sd has joined #ocaml
Yoric has quit [Quit: Yoric]
thrasibule has joined #ocaml
Yoric has joined #ocaml
Submarine has joined #ocaml
* Smerdyakov tries to figure out why two French guys he knows in person joined within seconds of each other. :)
<orbitz> stalking you
_zack has joined #ocaml
_zack has quit [Quit: Leaving.]
<Camarade_Tux> don't you know we're all plotting behind your backs? =)
<Drk-Sd> o/
<Smerdyakov> Well, at least, no one wants to help me test my web site. :(
<Camarade_Tux> busy coding right now
<Camarade_Tux> errr, I mean, *should* *be* busy coding ;-)
* Smerdyakov wonders why the OCaml Meeting isn't colocated with ICFP.
gwynddyllyd has joined #ocaml
Waleee has joined #ocaml
derdon has quit [Quit: derdon]
joewilliams_away is now known as joewilliams
tmaeda is now known as tmaedaZ
gareth_000 has joined #ocaml
gareth_0 has quit [Ping timeout: 246 seconds]
gwynddyllyd has quit [Quit: Lost terminal]
lokydor has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
gareth_000 has quit [Remote host closed the connection]
gareth_000 has joined #ocaml
joewilliams is now known as joewilliams_away
sshc has quit [Quit: leaving]
derdon has joined #ocaml
gareth_000 has quit [Remote host closed the connection]
gareth_000 has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
lokydor has quit [Ping timeout: 252 seconds]
gareth_000 has quit [Remote host closed the connection]
gareth_000 has joined #ocaml
gareth_000 has quit [Ping timeout: 260 seconds]
Associat0r has joined #ocaml
lokydor has joined #ocaml
gareth_0 has joined #ocaml
yakischloba has joined #ocaml
thrasibule has quit [Ping timeout: 265 seconds]
<derdon> huray, I made it to wrote ``all`` in ocaml: http://paste.pocoo.org/show/174650/
<derdon> now my question is: is it tail-recursive?
<derdon> I think so, because in line 4 is the function call to all as the last expression/statement
<flux> it is
<flux> derdon, your [x] case is superfluous
<derdon> flux: I think that makes the function a bit faster for lists containing only one element
<flux> derdon, well, on the other hand it makes it slower for all other cases?
<derdon> right
<flux> derdon, perhaps you would like to have two functions: one without the special case
<flux> derdon, you could continue the recursion to the non-special-case function
<flux> on the other hand maybe this kind of micro-optimization isn't worth it :)
thrasibule has joined #ocaml
<flux> unless you expect very large number of one-element lists perhaps
<derdon> readability counts :)
<Smerdyakov> BTW, you should never write [if foo then true else false].
<Smerdyakov> This has the same meaning as just [foo].
<Smerdyakov> Similarly, [if foo then false else bar] should always be written [not foo && bar].
<derdon> Smerdyakov: but if foo is a string and not a boolean value, foo returns the string itself, doesn't it?
thrasibule has quit [Read error: Connection reset by peer]
<derdon> oh, I see. ocaml notices that all and any take *bool* lists
<Smerdyakov> derdon, if [foo] were a string, the expression wouldn't type-check in the first place.
thrasibule has joined #ocaml
<derdon> so is there anything to improve in #174656 ?
<flux> derdon, well, the same, using && or ||
<derdon> ok
<flux> derdon, you could also use: | hd::_ when not hd -> false | _::tl -> all tl
<derdon> flux: but then there's one more case to check
gareth_0 has quit [Ping timeout: 252 seconds]
thrasibule has quit [Quit: No Ping reply in 180 seconds.]
sshc has joined #ocaml
thrasibule has joined #ocaml
<flux> gaah, ocsigen doesn't support style-attribute
seanmcl has joined #ocaml
<Smerdyakov> Duuuude, use Ur/Web instead! It has an even better way of not supporting the "style" attribute! :D
<flux> smerdyakov, well, I'm writing a web service doing ajax/comet with a long life time span without a db, does that work in Ur/Web?-)
<Smerdyakov> Yes, and it works very well, in fact. :)
<flux> darn :)
<flux> I thought Ur/Web didn't have GC
<flux> or something to that effect
<Smerdyakov> That's certainly true, but what does that have to do with this?
<flux> a long-lived process doesn't ring well with that?
<Smerdyakov> Region-based memory management....
Submarine has quit [Ping timeout: 246 seconds]
<Smerdyakov> All the demo services I have running are long-lived processes.
<Smerdyakov> The main demo has gone for months at a time, at least.
<flux> do they keep data between requests?
<Smerdyakov> Persistent data has to be in a database, but you can use a super-lightweight SQLite DB if you want.
<derdon> I rewrote these functions: http://paste.pocoo.org/show/174673/
<derdon> can you give me any style hints?
<derdon> should I make the list test_cases local and put it in _?
<flux> for such a small program I don't think it makes any difference
<flux> maybe it's more useful this way: if you're testing in the toplevel, you have still access to it
<derdon> ok
<flux> looks fine to me, except for the funny indentation differences between let write_headline and the following let _
<derdon> flux: already detected and fixed :)
<derdon> flux: I prefer an indentation of 2 spaces in ocaml. I think they're enough
ski_ has quit [Quit: Lost terminal]
itewsh has joined #ocaml
yakischloba has quit [Quit: Leaving.]
tunefish has joined #ocaml
itewsh has quit [Quit: There are only 10 kinds of people: those who understand binary and those who don't]
Submarine has joined #ocaml
Waleee has quit [Ping timeout: 252 seconds]
MissPiggy has joined #ocaml
<MissPiggy> hi I just installed ocaml and it says "dyld: unknown required load command 0x80000022
<MissPiggy> when you try to run it in the command line
<MissPiggy> I don't know what to do then.. should I uninstall it somehow?
<flux> well, I can only say that doesn't sound normal :)
Waleee has joined #ocaml
<threeve> Are you running Mac OS X 10.5?
<MissPiggy> ahh
<MissPiggy> yes I am
<MissPiggy> I just installed 3.11.1 instead of 3.11.2 and that one works
<threeve> Yea, that sounds like an issue when an app is built on 10.6.x with incorrect flags for 10.5 support.
<MissPiggy> oh great now I have to install camlp5
<MissPiggy> hah
<threeve> Perhaps the 3.11.2 build is not properly 10.5 compatible. FYI, I'm a complete ocaml newbie, I just recognize that error from other Mac development.
_Jedai_ has joined #ocaml
<derdon> what is the best way of printing lists?
<Smerdyakov> If you're just getting started with OCaml, you shouldn't be printing anything.
<Smerdyakov> Use the toplevel's printing of expression values.
ikaros has joined #ocaml
<derdon> Smerdyakov: I want to test a function I wrote within an *.ml file
<derdon> Smerdyakov: or should I use the toplevel and use that function there?
<Smerdyakov> Yes.
<derdon> ok
<orbitz> toplevel is the tits
<orbitz> Smerdyakov: how is the ocmpany going? still in boston?
<derdon> orbitz: no tits yet, before that I want to write some scripts ;)
<Smerdyakov> orbitz, that's what I asked for your help with. ;)
<orbitz> Smerdyakov: Hopefully i can find osme tiem this week
<derdon> Smerdyakov: the toplevel says "Error: Reference to undefined global `Utils'"
<derdon> Smerdyakov: opening the module worked fine
<derdon> Smerdyakov: but not accessing a function of it
<orbitz> what does module M = Utils;; show you for functions?
<derdon> orbitz: the same error message
<Smerdyakov> derdon, and how did you "open the module"?
<derdon> Smerdyakov: open Utils;;
<Smerdyakov> derdon, [open] has no effect on which code is available.
<Smerdyakov> derdon, it just introduces shorthands.
<derdon> Smerdyakov: oh!
<Smerdyakov> derdon, have you read the manual page on the OCaml toplevel?
<derdon> Smerdyakov: no, I didn't
<orbitz> did you do ocaml Utils.cmx (or .cmo)?
<Smerdyakov> deavid, check out 9.2.
<Smerdyakov> Er, derdon, "
<derdon> Smerdyakov: so I need #load
<Smerdyakov> deavid, only if you compiled that file.
<derdon> Smerdyakov: thanks, now it works :)
tunefish has left #ocaml []
<Submarine> Smerdyakov, yow
<Smerdyakov> Submarine, KAPOW!
seanmcl has quit [Quit: seanmcl]
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
Drk-Sd has quit [Quit: {'EXIT', Drk-Sd, "bye"}]
seanmcl has joined #ocaml
Waleee has quit []
seanmcl has quit [Client Quit]
Associat0r has quit [Quit: Associat0r]
lokydor has quit [Ping timeout: 252 seconds]
EliasAmaral has joined #ocaml
Submarine has quit [Ping timeout: 264 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
pimmhogeling has joined #ocaml
sshc has quit [Quit: leaving]
<derdon> ``int_of_char '1'`` gives me 49, because its the representation in the ASCII table
<derdon> but I want 1 in this case (i.e. the number which is seen)
<derdon> how can I do it?
<olegfink> int_of_string "1"
<olegfink> or int_of_char '1' - int_of_char '0'
<derdon> oh, really clever :)
Smerdyakov has left #ocaml []
thrasibule has quit [Ping timeout: 240 seconds]