mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
aminorex has joined #ocaml
rwmjones has joined #ocaml
psnively has quit []
EliasAmaral has joined #ocaml
mbishop has quit [Remote closed the connection]
martin_ has joined #ocaml
martin_ has quit ["Konversation terminated!"]
martin_ has joined #ocaml
martin_ is now known as mbishop
threeve has quit []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
G has joined #ocaml
<G> rwmjones: can you poke me when your around?
thesoko has joined #ocaml
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
netx has quit [Read error: 110 (Connection timed out)]
netx has joined #ocaml
netx has quit [Connection timed out]
olegfink has quit [Read error: 104 (Connection reset by peer)]
olegfink has joined #ocaml
netx has joined #ocaml
piggybox_ has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
schme has quit [Connection timed out]
bluestorm has joined #ocaml
thesoko has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
thermoplyae has joined #ocaml
<thermoplyae> can vals in objects be made private, or otherwise hidden from outside view?
<thermoplyae> based on the grammar there isn't even a keyword that would make it possible, but i'll stop by again tomorrow just in case i missed someone
<thermoplyae> it's a bit late, i suppose
thermoplyae has left #ocaml []
kelaouchi has quit [Remote closed the connection]
buluca has joined #ocaml
ita has joined #ocaml
pants1 has joined #ocaml
Abo-Marwan47 has quit [Remote closed the connection]
screwt846 has quit [Remote closed the connection]
Abo-Marwan47 has joined #ocaml
pierpa has joined #ocaml
screwt846 has joined #ocaml
skal has joined #ocaml
kelaouchi has joined #ocaml
seafoodX has joined #ocaml
seafoodX has quit []
bluestorm has quit [Remote closed the connection]
hagman has joined #ocaml
hagman has quit [Client Quit]
ygrek has joined #ocaml
pierpa has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has joined #ocaml
seafoodX has joined #ocaml
mm_aa has joined #ocaml
<mm_aa> Hello everyone!
<mm_aa> I'm trying to switch to ocaml from Haskell, and can't get the simplies module work.
<mm_aa> Can you help me here?
<Smerdyakov> Never heard of "simplies."
<mm_aa> simpliest :)
<Smerdyakov> "Simplest"?
<mm_aa> yep
<Smerdyakov> Would actual be "most simple" in English
<Smerdyakov> Anyway, always remember the first rule of IRC: don't ask to ask.
<mm_aa> Ok. Here I go. I've got: board.mli:
<mm_aa> module type Board =
<mm_aa> sig type t val create : unit -> t
<mm_aa> end;;
<mm_aa> board.ml:
<mm_aa> module Board =
<mm_aa> struct type t = int array let create () = [|0; 1; 3 |]
<mm_aa> end;;
<mm_aa> and mail.ml:
<mm_aa> let b = Board.create();;
<Smerdyakov> Too much.
<Smerdyakov> Assume only 3 lines of code at once allowed in any channel.
<Smerdyakov> Give a URL to the code if you need more.
<Smerdyakov> If that's all of your code, then we'd might as well continue from here without your giving a URL. Is that all the code?
<mm_aa> yep
<mm_aa> If I do 'ocamlbuild main.byte' it says 'Unbound value Board.create'
<Smerdyakov> You have two problems.
<Smerdyakov> First, you haven't defined any value 'Board.create'.
<Smerdyakov> You've defined a module 'Board.Board' which has a 'create' member.
<Smerdyakov> Every .ml file is a module in OCaml.
<mm_aa> so I don't need to write module Board? Just sig .... ?
<Smerdyakov> I don't know what you mean.
<mm_aa> I would like to define module's interface & implementation
<Smerdyakov> First, it's pretty clear you haven't read the manual if you're writing it this way. Would have you been using to learn OCaml?
<mm_aa> thanks a lot. You're extremly helpfull today
<mm_aa> chao
mm_aa has quit ["leaving"]
kelaouchi has quit ["leaving"]
ita has quit [Remote closed the connection]
kelaouchi has joined #ocaml
skal has quit [Remote closed the connection]
skal has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
seafoodX has quit []
pango has quit [Remote closed the connection]
pango has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
bluestorm has joined #ocaml
skal has quit [Read error: 104 (Connection reset by peer)]
kelaouchi has quit ["leaving"]
threeve has joined #ocaml
ita has joined #ocaml
jussx has joined #ocaml
jussx has quit ["leaving"]
buluca has quit [Read error: 113 (No route to host)]
essiene has joined #ocaml
<essiene> hiya... running thru some ocaml tutorial exercises and there's one where i need to do a reverse curry or something
<ita> reverse curry ?
<essiene> the b part... for the life of me... i can't bend my brain to think of how to do that
<bluestorm> hum
<bluestorm> you could just cheat
<bluestorm> and change f :-'
<bluestorm> hm
<essiene> bluestorm: i didn't get that... sorry :)
<ita> essiene: you want f(x)=y, then make g such as g(x) = 0
<essiene> but how does g relate to y? (slow brain syndrome sory :) )
<bluestorm> hm
<ita> bluestorm: hm
<bluestorm> do you want us to give you the solution ?
<bluestorm> ita: :)
<essiene> bluestorm: i'm learning ocaml... new language... any pointers you give i'll appreciate... i'm _not_ in school ;)
<bluestorm> yes of course
jlouis has quit [Remote closed the connection]
<bluestorm> but this is not really an ocaml question
<ita> essiene: these exercises are silly, if you want to learn to code, take something and code it - do you need objectives ?
<bluestorm> hm
jlouis has joined #ocaml
<ita> bluestorm: (semantik 0.5.6)
<bluestorm> essiene:
<essiene> well... its just i think solving those problems will give me some theoritical insite i may not see otherwise... but yeah.. i get your point ita
<bluestorm> when f is around y you want g around 0
<bluestorm> so let g x = f x - y may be what you're looking for
<essiene> bluestorm: ok... thnx :) the statement on reverse specialization is what got me side tracked
<bluestorm> :p
<bluestorm> the "ugly" way to do this, wich is more a "reverse specialization" thing, is to paste your dicho_0 code while replacing each "0" with a "y"
<essiene> lol
<bluestorm> let dicho_0 = dicho_y 0 is essentialy doing the reverse transformation
<essiene> btw, what is that freemind drawing? :)
<essiene> yeah... i kept wondering why they didn't ask b first and ask me to build a from b :)
<ita> essiene: a tool to help you students to do your homework
<essiene> ita: i really am not a student :)
<ita> essiene: sorry, it just looked like it
<bluestorm> hm
<essiene> http://simpleweb.essienitaessien.com, http://essiene.blogspot.com (don't update that blog any more)
<essiene> ita: np
<essiene> :)
<bluestorm> is saying "i'm not in school" a studentic activity ? :p
<essiene> lol
<ita> essiene: it is an experimental tool part caml, part c++
jlouis has quit [Remote closed the connection]
jlouis has joined #ocaml
iratsu has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
ygrek has quit [Remote closed the connection]
jdavis_ has joined #ocaml
<essiene> what library can i use for networking/sockets? i want to build YAIB (yet another irc bot) in ocaml... i think i've read enough tutorials to take on a real task
<bluestorm> hm
<bluestorm> you can use the "low-level" socket interface of the Unix module
<bluestorm> but there a some IRC libraries around, if you don't want to parse it yourself and do all the plumbing
smimou has joined #ocaml
<essiene> bluestorm: at this stage i'll like to do both... build the low level one and use some higher level stuff... just to keep getting my fingers dirty and get used to how ocaml code looks like and works
<essiene> bluestorm: cool... i just saw the Unix module now... thnx... any pointers to the IRC libraries you talked about up there?
<essiene> thnx
<bluestorm> btw, this library uses advanced ocaml features
<bluestorm> when you'll understand the library code, you'll have made great progress
<jdavis_> Is there a centralized place to search for OCaml modules?
<essiene> bluestorm: many many thnx
<ita> humps
<jdavis_> ita, bluestorm: wow, cool. I've never seen that before
<ita> jdavis_: not too fast, there is a shitload on crappy code there
<jdavis_> Oh, ok
<ita> jdavis_: on the other hand, there are gems such as libfacile
<bluestorm> hm
<mbishop> there's also the "Ocaml Link Database" but I believe that is slightly out of date
<bluestorm> some of the humps links are a bit out of date too
<jdavis_> If a good module exists, would it probably be in humps?
<pango> mbishop: and a bit redundant... but anyway, http://funlinks.camlcity.org/
* mbishop nods
<jdavis_> Oh, ok
<bluestorm> hm
<bluestorm> the whole ocaml -> JVM suite seeems interesting
<jdavis_> I'm a novice with OCaml. What kind of apps do people normally write in ocaml? Are there some links to some cool stuff that might be inspiring?
<bluestorm> hm
<bluestorm> compilers :-'
<bluestorm> what kind of apps are you interested in ?
<Smerdyakov> jdavis_, http://www.janestcapital.com/ :-)
<mbishop> Speaking of, started there yet Smerdyakov? (I know I asked this before...but I don't remember the answer)
<jdavis_> well, aside from normal sysadmin and web stuff, I'd like a language that I can use for better integration between applications. I was thinking OCaml might be good for data transformations, etc.
<Smerdyakov> mbishop, yes.
<mbishop> Smerdyakov: neat!
<jdavis_> I suppose that integration is usually a question of access to the necessary APIs more than anything else.
<bluestorm> hm
<bluestorm> i suppose that depends heavily on your system, actually
<bluestorm> (and i don't think scripting is the bright side of ocaml)
<jdavis_> bluestorm: yeah. I am a DBA, and I use relational math for pretty much all my data transformations right now, after I can get at the data.
<Smerdyakov> bluestorm, I think the language is equipped just fine for that, mostly; just a matter of writing the proper libraries.
<jdavis_> Smerdyakov: that looks like an interesting company. What do they use OCaml for?
<bluestorm> making money :)
<Smerdyakov> jdavis_, the quantitative group is committed to 100% OCaml whenever there isn't some nasty legacy restriction requiring otherwise.
<ita> evil capitalists
<Smerdyakov> jdavis_, so, the answer is "what you expect proprietary trading operations to write," I think.
<mbishop> Doesn't sweeks work there too?
<Smerdyakov> mbishop, yup.
<ita> jdavis_: you wouldnt like going there, they rtfm the employees all day long
* ita runs
<Smerdyakov> ita, sounds accurate. :-)
<Smerdyakov> No one tells you the rules at a place like Jane Street!
<bluestorm> were you involved in the "ocaml summer of code" thing ?
<Smerdyakov> If you want to write OCaml professionally in an existing company, it's approximately your only choice!
<Smerdyakov> bluestorm, no.
<bluestorm> i have looked for a website for some of the projects
<bluestorm> but it looks like the more accurate place to look is the janestreet svn
<bluestorm> wich is strange
<aminorex> the other choices would be to (1) use ocaml because its the right thing to do in a specific case, at your current job, or (2) start a new company that develops in ocaml.
<aminorex> i'm working on (1)
<Smerdyakov> aminorex, yes, both riskier choices. :)
<bluestorm> (3) stay in the academic part of life
<aminorex> (3) is a subset of (1)
<jdavis_> aminorex, what is the nature of the project that matches #1
<bluestorm> hm
<aminorex> state machine generation system, from natural language documents to domain models
<bluestorm> iirc Microsoft is looking for a F#/OCaml guy to hire
<aminorex> it's not easy, but the ocaml is making it less unpossible
<ita> bluestorm: for device drivers :-/
<bluestorm> :p
<ita> bluestorm: no one would ever want to go there
<jdavis_> I have a job guys, I'm just looking for some inspiration to get me to learn ocaml :)
<ita> let's face it, that's a suicide
<bluestorm> ita: looked like device driver _verification_ or something more formal
<Smerdyakov> ita, why do you say that?
<Smerdyakov> Microsoft is one of the undisputed coolest functional programming supporters among for-profit corporations now.
<bluestorm> hm
<ita> Smerdyakov: complicated job, low level problems and management constraints
<bluestorm> you mean Microsoft Research, right ?
<ita> sounds like a hell to me
<Smerdyakov> ita, uncomplicated jobs tend not to be fulfilling.
<ita> jobs with political conflicts tend not to be fulfilling either
<Smerdyakov> What political conflict are you anticipating?
<ita> i have a very complicated job right now, it is not fulfilling at all
<Smerdyakov> It's a necessary, not sufficient, condition. :P
<ita> Smerdyakov: unclear objectives, wishful thinking on features, backward compatibility
<ita> the "do not touch this piece of code it is for compatibility with dos" syndrome
<ita> then for functional programming it is not a silver bullet
<ita> fp applies well for stateless stuff, but for device drivers the modelling may be really complicated
<Smerdyakov> No, it's all done functionally.
skal has joined #ocaml
<Smerdyakov> They're not hiring someone to write device drivers in OCaml.
<ita> creativity under constraints tends not to be fulfilling
<aminorex> that's in-the-box ita. if you aren't working on Windows, there's a lot more liberty than that. my own objections to microsoft as an employer are different: i like the possibility of organizational expansive success, and becoming a useful influence. microsoft is likely to be less successful over time, and the influential role of a new individual contributor has a pretty small probability of significance. i'd have to be much cocki
<aminorex> the stock options are pretty worthless, in other words, even if you can get them.
<Smerdyakov> If you care about such things, then you should be in the finance industry.
<aminorex> i am
<Smerdyakov> There ya go. :)
<aminorex> nice call
<ita> the finance field is usually very cold to technological innovations
<Smerdyakov> ita, depends on what technology you mean.
* aminorex disagrees
<Smerdyakov> ita, innovations in financial math are pretty welcome, I think.
<aminorex> running accounts on as/400s, yeah, that's pretty averse to innovation
<aminorex> but i'd rather rip my lungs out with a toothpick than be in that domain, personally
<ita> not only this, but using recent software such as oracle 10 for datamining features may be out of question (too risky)
<ita> cobol is fine, keep on using it
<ita> not every finance company is yours Smerdyakov
<Smerdyakov> Still, if it's material success that is at the top of your priorities, then there's not much other choice without taking on considerable risk.
<ita> i suggested treemaps for improving the visualization of data (instead of using stupid excel files) : rejected, too innovative
<ita> and another dozen of good ideas were thrown to the garbage
<aminorex> ita, sounds like you had a hard life. i hope you take out your frustrations in wildly successful entrepreneurship.
<ita> we had to do ajax (no applets), but without ever talking about
<ita> aminorex: a first experience in spain
<ita> banks are very shy at new technologies, and backward compatibility is very important
<ita> at least in france and in spain
<Smerdyakov> ita, ah, I see your problem. You thought I was talking about banks when I said "finance." :-)
<ita> maybe i should go to the us, but i am afraid i will find the same thing there too
<Smerdyakov> I'm talking about proprietary trading, as hedge-fund-y as possible.
<ita> finance ? cleaning the data is usually too hard
<ita> Smerdyakov: just say "wall street" instead of finance
<Smerdyakov> OK..
<Smerdyakov> But aren't investment banks "Wall Street"?
<ita> Smerdyakov: in the environments i have seen they do not have manuals
<ita> performance is not a problem, so worse than java is possible
<ita> and for the mathematical models, they do not go much further as chi-square
skal has quit [Read error: 104 (Connection reset by peer)]
buluca has joined #ocaml
<piggybox_> I wish ocaml had a built-in prelude as haskell has
<ita> pervasives?
<essiene> how do i create a string buffer? i'm doing some socket stuff (yay!) and it seems Unix.recv takes a string buffer as an argument... uhh... i've not reached a point in my tutorials where there's a talk on string buffers or what not :)
<piggybox_> pervasive is far smaller than prelude, though it's good not to pollute name space, a lot of handy helper functions are missing in ocaml.
<bluestorm> essiene: recv use a Unix.file_descr
<bluestorm> a Unix abstract type you can only get with Unix.socket
<essiene> bluestorm: yeah... i've gotten thru the rest... i have created my socket... connect'd i just want to recv, so i can point my proggie at an SMTP server and see a banner :)
<bluestorm> hm
<pango> essiene: it uses a string ("buffer" is its role, not its type); There's also a Buffer module, but that's something different
<essiene> bluestorm: recv is defined as file_descr -> string -> int -> int -> msg_flag list -> int
nuncanada has joined #ocaml
<pango> essiene: check String.create in String module
<bluestorm> you could use higher-level functions of the Unix module, that use the standard channels for i/o
<bluestorm> ( Unix.open_connection and the like )
<essiene> bluestorm: ohhh... didn't know about that... thnx
<essiene> pango: thnx
<essiene> bluestorm: argh!!! didn't know that existed! :) thnx
kelaouchi has joined #ocaml
<pango> (strings contents are mutable in OCaml)
Mr_Awesome has joined #ocaml
<essiene> how do i get my compiler to find my unix lib... i have the following /usr/lib/ocaml/unix.{a,cma,cmi,cmx,cmxa,mli}
<essiene> i guess a flag to ocamlopt/ocamlc. no?
<essiene> i get "No implementations provided for the following modules: Unix referenced from socket.cmx" when compiling my proggie "socket.ml"
<piggybox_> ocamlfind ocamlc -package unix -c your_program.ml
<bluestorm> hm
<bluestorm> ocamlc unix.cma ... will work too
<essiene> hmmm... my program just hangs :)
<essiene> any ocaml pastebin i can paste this code to?
<essiene> really small but just incase :)
<bluestorm> http://pastebin.be ?
<essiene> thnx
magius_pendragon has quit [Nick collision from services.]
<essiene> i suspect it just hangs on recv and never returns.
jlouis has quit ["leaving"]
jlouis has joined #ocaml
<pango> works just fine with Unix.read instead of Unix.recv
essiene_ has joined #ocaml
essiene has quit [Nick collision from services.]
essiene_ is now known as essiene
<essiene> argh! did i miss anything? :-/
<aminorex> 9 seconds of john cage music
<aminorex> and pango: works just fine with Unix.read instead of Unix.recv
<essiene> hehe... ok... thnx
<essiene> read huh? hmmm... ok... lemme try
<pango> (but it works for me with recv too...)
essiene_ has joined #ocaml
essiene has quit [Nick collision from services.]
essiene_ is now known as essiene
nuncanada has quit ["Leaving"]
aminorex has left #ocaml []
bluestorm has quit [Remote closed the connection]