flux__ changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
uogl has joined #ocaml
woggle has quit [Nick collision from services.]
uogl is now known as woggle
shawn has quit [Connection timed out]
mikeX has joined #ocaml
mikeX has quit [Remote closed the connection]
mikeX has joined #ocaml
cmeme has joined #ocaml
mikeX has quit ["leaving"]
CosmicRay has joined #ocaml
woggle has quit [Read error: 104 (Connection reset by peer)]
woggle has joined #ocaml
ramza3 has left #ocaml []
coder_ has joined #ocaml
<coder_> Arrrrrgh
<coder_> Arrrgh
<coder_> What is wrong here?
<coder_> It runs in ocaml but not ocamlc
<coder_> Unbound value List.map
<coder_> :o(((((((((((((((((((((
dark_light has quit [Read error: 110 (Connection timed out)]
<coder_> *cough*Helpme*cough*http://pastebin.com/754883*cough*
<coder_> :::::oooo((((((((((((((((((((((((((((((((((((((((((
<dylan> please don't do that.
<dylan> your code doesn't have any problems here
<dylan> Ah
<dylan> you need to make it not be named list.ml
<dylan> try naming it bob.ml
<coder_> Why?
<dylan> it should work then
<dylan> because list.ml defines a module named List for ocamlc
<coder_> -_- That's lame
<dylan> No, it's just the way ocaml works.
<dylan> Name it lusty_ferret.ml or something and you'll have no problems.
<coder_> Yeh..
<coder_> -_- XD
CosmicRay has quit [Read error: 110 (Connection timed out)]
coder_ has left #ocaml []
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Try something fresh"]
jcreigh has joined #ocaml
Smerdyakov has quit ["Leaving"]
jcreigh has quit ["Do androids dream of electric sheep?"]
<flux__> jer, /usr/share/doc/ocaml-doc/camlp4-tutorial.html/tutorial002.html
<jer> flux__, nice except i don't have it =]
<flux__> well, try getting it ;)
<flux__> finding it for non-debian doesn't turn out to be trivial..
<flux__> there's always packages.debian.org, there you can find the source package for ocaml-doc
<jer> flux__, yeah, i found that already ... streams aren't what i'm after
<flux__> jer, I guess you noticed that they are evaluated lazily?
<jer> flux__, yes i did see that
<flux__> ok
<flux__> well, then threads are the other way, atleast they,with message passing, should be able to do what you want
<flux__> Event-module provides that
<flux__> the documentation might not make it clear how the module is supposed to be used, though, you might want to search on concurrent ml for some examples
<jer> sure they can, but threads are heavy weight; i need lightweight threading... which is why i'm thinking coroutines. using streams as you suggest, i wouldn't be able to arbitrarily return from a function for example, and then go back into that function from the point i left (at least, from what i've read)
<flux__> jer, how about other functional programming techniques, such as returning continuations?
<jer> i could probably simulate them with continuations (though i'm very much using ocaml as a bridge into functional programming, so i'm not terribly experienced in FP)
<flux__> type retval = Value int | Continue (unit -> retval) let f n = if n = 10 then Value 42 else Continue (fun () -> f (n + 1))
<flux__> +a couple of 'of' words
<flux__> and 'rec'
__DL__ has joined #ocaml
__DL__ has quit [Client Quit]
piggybox has quit [Connection timed out]
piggybox has joined #ocaml
shawn has joined #ocaml
Snark has joined #ocaml
WhatTheDeuce has left #ocaml []
WhatTheDeuc1 has joined #ocaml
WhatTheDeuc1 has quit [Client Quit]
pango is now known as pangoafk
cmeme has quit [Read error: 110 (Connection timed out)]
pangoafk is now known as pango
<ski> jer : what kind of things do you want to do ?
piggybox has quit [Read error: 110 (Connection timed out)]
piggybox has joined #ocaml
smimou has joined #ocaml
cmeme has joined #ocaml
Schmurtz has joined #ocaml
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
bohanlon has quit ["leaving"]
CosmicRay has joined #ocaml
mattam has quit ["ciao"]
uogl has joined #ocaml
woggle has quit [Nick collision from services.]
uogl is now known as woggle
love-pingoo has joined #ocaml
CosmicRay has quit [Read error: 113 (No route to host)]
love-pingoo has quit ["Connection reset by by pear"]
CosmicRay has joined #ocaml
cyyoung has joined #ocaml
Smerdyakov has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
jcreigh has joined #ocaml
pango is now known as pangoafk
|Lupin| has joined #ocaml
<|Lupin|> Hello, folks.
<|Lupin|> Does someone know a Cam function to make the PC speaker beep with a given frequency (an perhaps also a given duration) ?
<ketty> |Lupin|: i don't know such a function...
<zmdkrbou> |Lupin|: maybe using ocamlsdl or something like that
<ketty> oh.. there is such a function
<ketty> Graphics.sound
<ketty> sound freq dur plays a sound at frequency freq (in hertz) for a duration dur (in milliseconds).
<|Lupin|> ketty: wow ! Thanks a lot !
<ketty> :)
<|Lupin|> ketty: too bad it's in Graph, tough :)
<ketty> why?
<|Lupin|> I suspect thi requires some Additional library to be present ?
<ketty> yes..
<|Lupin|> Gtk or so ?
<ketty> no, it comes with the standard distrobution...
<|Lupin|> ah great
<ketty> you just have to link with graphics.cma
<|Lupin|> thanks very very much ketty, anyway
pangoafk is now known as pango
<|Lupin|> oops, seems I %on't havthis file...
<|Lupin|> (I installed the Debianpackage ocaml-nox, I suspect this is theproblem...)
<|Lupin|> # Graphics.sound 440 10;;
<|Lupin|> Exception: Graphics.Graphic_failure "graphic screen not opened".
<|Lupin|> Hmm, this doesn't work underThe console...
<|Lupin|> too bad... :(
<ketty> :(
<ketty> |Lupin|: are you on unix?
<ketty> then you could wrap calls to the "beep"-command
<|Lupin|> ketty: Yep I'm under Linux. I thought about beep, indeed, but I findThissolution rather clumsy, giventhat my purpose is to write a metronum program...
<ketty> hmm.. yes, clumsy, but it works :)
<|Lupin|> ketty: In fact if nothing better exists, I think I'll have a look to the beep program and re-write it in Caml...
<jer> ski, i need to be able to launch a new coroutine/thread/whatever, yield from it to another coroutine/thread/whatever (with a value); and when i return to the original coroutine/thread/whatever continue execution from where i yielded from last time. now to add to this, i need to be able to do this while creating about 100 thousand coroutines/threads/whatever. operating system threading is just too heavy weight
<ketty> |Lupin|: you could look at the source of Graphics.sound
<|Lupin|> ketty: Yes, yes... but I'd rathertry to have a "clean" solution. In the end it shouldn't be much more difficult than an ioctl or so...
<|Lupin|> ketty: I could, indeed. I'm a bit hesitating, cause my guess is they use some special capability provided by a graphical terminalorSo...
<|Lupin|> ketty: Well, just posted toThe list. Let's see what this brings and decide after that. Thanks anyway for your help, it was precious.
<ketty> ok :)
<|Lupin|> C U all,
<|Lupin|> bye
|Lupin| has left #ocaml []
jcreigh has quit ["Do androids dream of electric sheep?"]
_fab has joined #ocaml
Ali` has quit [Read error: 110 (Connection timed out)]
finelemon has joined #ocaml
<pango> jer: if you don't mind CPS, they're very dumb solutions... http://www.pastebin.be/538/
<jer> pango, yeah i'm using something similar right now, after talking last night with flux__ ... thanks for the example though nonetheless =]
<pango> my job3 example isn't that great ;)
<flux__> jer, btw, ocaml also has non-operatingsystemthreading, which can be very light
<flux__> dunno if it is 100k threads light, though; but you might want to benchmark it anyway ;)
<pango> but can it be used with native ? (I think to remember it's possible...)
<flux__> hm, I'm not sure..
<jer> flux__, first thing i looked at =] googling showed lots of results that were less than exciting =/
<jer> which is why i got the idea to bind a coro lib to ocaml and came in here to ask instead
mikeX has joined #ocaml
finelemo1 has joined #ocaml
<pango> (http://www.pastebin.be/539/ better third example ;) )
finelemo2 has quit [Read error: 110 (Connection timed out)]
finelemon has quit [Read error: 110 (Connection timed out)]
mikeX has quit ["leaving"]
CosmicRay has quit ["Client exiting"]
_exsisonek has joined #ocaml
chessguy has joined #ocaml
cyyoung has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
_exsisonek has quit ["Leaving"]
chessguy has quit [" Like VS.net's GUI? Then try HydraIRC -> http://www.hydrairc.com <-"]
CosmicRay has joined #ocaml
<flux__> is there an easy way to get C-c C-t working in debian unstable's xemacs?
<flux__> caml-types seems to be missing, which apparenlty incorporates the type retrieval code..
<pango> tuareg-mode ?
<flux__> tuareg-mode apparently uses the caml-mode, or caml-types, to do that
<pango> ic... I'll stick with stable then ;)
<flux__> caml-types used to come in ocaml-nox
<flux__> but nowadays it doesn't
<pango> ocaml hump has a strange look today :)
<pango> "An error occured when post-processing the result page (0)." ahem
<flux__> hmh.. let's say I have a compiler, where I build an abstract syntax tree with symbols as strings, and then convert that into a representation where the strings are replaced with references to the actual values.. how should I go about doing that?-)
<flux__> one way would be to have a type (for example) ident_info = { .. } and identifier = IdentName of string | IdentInfo of ident_info
<flux__> but it doesn't sound very nice, because I would have to consider both the cases at all points, even though I know that it has been converted into the resolved form
<flux__> another option I considered was type 'value identifier = 'value
<flux__> so I could write a function 'string identifier -> 'ident_info identifier
<flux__> that is nice, but as such values need to be written in the type definition, I end up with type ('var, 'state, 'input) file = ('var, 'state, 'input) sm list etc
<flux__> so I considered a third alternative, with the ocaml module system
<flux__> I have module type SYMTYPES = sig type ident end and module Sym = functor (Types : SYMTYPES) = struct type identifier = Types.ident end
<flux__> hmm.. actually my problem may not be quite clear this way, maybe I'll put one file to the web
<flux__> the problem is that how would I write module Symbol, similarly to module Name? I mean, I would like it to be something like module Symbol = Sym ( struct type state_ref = Sym.state ) but I obviously (??) can't write that
<flux__> sigh.. I'll just replace all lists with Map instances and just always look up the stuff
CosmicRay has quit ["Client exiting"]
Schmurtz has quit ["Plouf !"]
descender has joined #ocaml
dvorak has joined #ocaml
_fab has quit []
chessguy has joined #ocaml
<smimou> flux__: what is caml-types ?
chessguy2 has joined #ocaml
chessguy2 has quit [Client Quit]
chessguy has quit [Connection timed out]
chessguy has joined #ocaml
chessguy has quit [Client Quit]
chessguy has joined #ocaml