gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
Mnabil has joined #ocaml
pango has joined #ocaml
ontologiae has joined #ocaml
<help2man> whats the main purpose of ocaml / caml languages
<help2man> is there a reason to uses this over the others in anyway
hongboz has joined #ocaml
<ssbr-> help2man: Fast, easy, safe
<ssbr-> help2man: it offers a good jump in all three of those. Most languages sacrifice a corner of the triangle to boost the other two, or sacrifice two corners to satisfy one
<ssbr-> e.g. python is easy, but not safe or fast. And C++ is fast, but not safe or easy.
<ssbr-> (that said I bet many ocaml programmers use c++ and python ;)
<ssbr-> p.s. obviously, that's just my opinion, and other ocaml programmers might give entirely different reasons. I'm not even that experienced in ocaml :(
ulfdoz_ has joined #ocaml
<help2man> I here you but here is a 4th side how portable :)
<ssbr-> help2man: portability is pretty orthogonal to those things. You don't ever have to sacrifice portability for anything (except maybe speed)
<ssbr-> But I don't know anything about the platforms ocaml runs on, sorry
<ssbr-> (other than x86 linux ;)
<help2man> you do if a compiler doesn't exist on an arch ... is ocaml available on windows , linux , ...and the rest
<help2man> I am assuming it is compiled as its standard choices or uses
<help2man> not interpreted by default or maybe I am wrong
<ssbr-> help2man: by default it compiles to bytecode, but you can target machine code too
<ssbr-> help2man: take a look at http://caml.inria.fr/ocaml/release.en.html
<ssbr-> as far as OSes go, it's got unix and windows totally covered (even supports OS X and Solaris)
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
<ssbr-> help2man: and from the release notes, it certainly supports x86, x86-64, and ARM
<ssbr-> maybe others too
<ssbr-> help2man: btw, it might help to mention your goals. OCaml isn't necessarily the right choice for everything :)
<ssbr-> For example, if you want to learn FP, maybe haskell would be a better introduction
<help2man> great so by default it is a hybrid like java between compiled and interpreted ... has its own VM to run the bytecode I would imagine and also always you to compile the whole thing down to the arch :)
<ssbr-> help2man: well, pretty much every "interpreted" language (Java, Python, Ruby) compiles to a VM
<ssbr-> AFAIK ocaml's VM doesn't have a JIT compiler (like Java does)
<ssbr-> but it does have a separate offline compiler
<help2man> FP you have many choices and I would just normally do c programing .... and really all the object orientated languages or above can be restricted to be a FP based language any how
<ssbr-> help2man: just because they can be restricted to that doesn't mean they help you understand functional programming
<help2man> correct
<ssbr-> help2man: in fact, they din't help much at all
<hongboz> help2man: I prefer ocaml to haskell since it's much easier to understand the whole technology stack.
<ssbr-> you only learn when you endure hardship
<ssbr-> in ocaml or python or whatever, whenever functional programming becomes hard and requires thought, you can skip it and program imperatively
<ssbr-> this doesn't teach you enough
<ssbr-> (but ocaml will teach you more than Python about it, and Python will teach you more than C about it, so, there is that)
<help2man> if you want to know everything learn asm , c/c++ , and a higher level language like java for the vm aspect hybrid , as well bash for the sensitivity aspect .... all else falls easy after you fully understand those
<ssbr-> help2man: none of those will teach you the programming model used in, say, prolog
<ssbr-> or haskell
<help2man> no but it gives one the ability to learn programming languages of all type very fast
<ssbr-> help2man: why do you believe that?
<help2man> in terms of syntax's
<ssbr-> help2man: Sure. Syntax is a trivial thing after the first few languages.
<help2man> and ways of programmatical thought
<ssbr-> Well. Not all programming thought is similar.
<ssbr-> They all share rigor and self-consistency (except malbolge), so definitely it will help you there
<help2man> the majority is covered in the ones I had listed
<ssbr-> help2man: How do you know?
<help2man> regexp , vm's , extern /inline compiler switches make ... , ...etc
<ssbr-> Anyway, I doubt.
<help2man> I know because I know a ton of languages and all seem pretty start forward that is after you fully understand the list I meantioned well at least for me
<ssbr-> help2man: sure, but maybe you don't know the right languages.
<ssbr-> help2man: none of those that you mentioned will help you understand Agda
<ssbr-> not really.
<help2man> that could be true and there definitely could be language maybe ocaml being one of them that I find harder then others
<ssbr-> help2man: I genuinely don't think ocaml will give you trouble :)
<ssbr-> I mean, bits here and there might, but it mostly fits right in with the mindset of, say, Java
<help2man> Agda you mean Ada or is that another lang I am not aware of :)
<ssbr-> help2man: Nah, Ada is easy
<ssbr-> Agda
<ssbr-> help2man: it's a little like Haskell, but with a more intricate type system
* ssbr- does not actually know agda
<ssbr-> I know a little ATS, which is a little like a merger of agda and ocaml (ish)
<ssbr-> help2man: and Epigram is right out there.
<ssbr-> try reading the epigram tutorial :P
<help2man> I see the only ones that I have found to give me trouble sofar is exotic languages like sed scripts ,awk scripts , brainfuck ,...etc I know I know sed , awk are really useful script wise but they take some time to become an expert at
<help2man> and they aren't really exotic well depends on your point of view :)
<ssbr-> help2man: I think that ocaml might be a step in a fresh direction, for you
<ssbr-> and that you should definitely try exploring haskell and so on
<ssbr-> I never _really_ learned haskell until after ocaml, I think it gives a really nice taste of what that's like, while staying close to the familiar of imperative programming. So don't really feel pressured to go straight to the weird zone. But yeah, I think it'd help broaden your horizons, in a good way :B
<help2man> great glad to try it should be fun... curious is it used in a business setting do they hire ocaml / caml programmers anywhere :)
<ssbr-> help2man: Not very often, no
<help2man> how about haskell
<ssbr-> help2man: haskell is more popular among hobbyists, I don't know about businesses
<help2man> is haskell is it close to ocaml or totally different....
<ssbr-> ocaml might well be more popular in the professional world. Certainly it's used for some scientific research stuff, etc.
<ssbr-> help2man: Very close.
<ssbr-> help2man: they have the same underlying type system, but they implement OOP in different ways, for example
<help2man> so would you say once you know ocaml/caml you pretty much can learn haskell in a short time completely
<ssbr-> help2man: no
<ssbr-> but the reverse is true
<ssbr-> help2man: haskell is a bigger language, with harder material
<help2man> so then maybe I should start with haskell then :)
<ssbr-> help2man: If you like. But it might be less pleasant :P
<help2man> to know them both
<ssbr-> help2man: haskell is, IMO, a prettier language, it's just not as easy to program in coming from an imperative perspective
<help2man> O I won't say it would be any more unpleasant then having to go thru and learn asm , c/c++ , bash
<ssbr-> help2man: I found all of those to be easier than learning haskell
<ssbr-> and easier to program in, as well
<help2man> infact I haven't seen any programming language stack up to harder then thoses other then variants of them c shell , ....etc etc
<ssbr-> (but I am definitely still new to haskell)
madroach has quit [Ping timeout: 265 seconds]
<ssbr-> C++ might be a strange exception, it's hard in a different way
<help2man> no way are you serious wow then I am really interested in haskell and whats harder then learning that :) probably english
<ssbr-> help2man: Well, what haskell does (at points), is it takes fundamental programming concepts from Java and says, "these no longer exist"
madroach has joined #ocaml
<ssbr-> help2man: instead, you get a bunch of syntax and semantic sugar that emulates some concept from Java using a multitude of simple lower-level concepts
<ssbr-> help2man: And, to a beginner, this is very frightening. The set of basic primitives is tiny, and it's unclear where to draw the line as to what you should think of as basic, and what you should think of as a composition of lower level basics
<ssbr-> help2man: and many times when doing what would be trivial in C, at least at first, you will find yourself reasoning through the code in a lot of detail, to make sure the lower-level primitives are doing what you want
<ssbr-> because you still aren't quite sure what they are yet
<help2man> Well, what haskell does (at points), is it takes fundamental programming concepts from Java and says, "these no longer exist" well moving from c to asm you short of start opening the big picture feeling ... I would think that would be the feeling with haskell
<ssbr-> help2man: nah, it's different. in asm you just lose them, that's it
<ssbr-> help2man: in haskell, you get them _back_
<ssbr-> but they no longer work the same way as they used to
<ssbr-> not quite.
<ssbr-> help2man: but that wouldn't be so bad if it weren't for the fact that you can _take them apart_ and reorganize them, or rebuild them yourself. At any time.
<ssbr-> But maybe that's just my experience
<ssbr-> anyway dealing through monadic logic is not really trivial, even though monads continue to seem trivial
<help2man> and why would people want to do that to a language other then for fun or fooling around.
<ssbr-> help2man: because the fact that they can be taken apart means that you can put them back together any which way you want, to do anything
<ssbr-> help2man: haskell has the most flexible primitives of any language I have ever used.
<ssbr-> help2man: and this is basically why haskellers love it, as far as I can tell
<help2man> changeing print to add numbers is not really going to help you in anyway so fundmentally making haskell stuff different must gain you something
<ssbr-> help2man: it's not that kind of thing.
<ssbr-> help2man: you'll see when you use it.
<help2man> cool is there anything you think harder then haskell out there apart from an exotic languages
<ssbr-> help2man: Agda ;)
<help2man> other then that
<help2man> hard then that
<ssbr-> I don't know. epigram?
<help2man> and not english :)
<ssbr-> I can't actually learn epigram
<ssbr-> so after epigram I can't judge the difficulty of languages
<help2man> something harder then haskell and Agda
<ssbr-> help2man: epigram is as high as I know
<help2man> is there anything in between that and haskell ,Agda
<ssbr-> that might have more to do with its authors not knowing how to write tutorials, than with the language itself
<ssbr-> help2man: probably not
<ssbr-> not trivially, anyway. difficulty is hard to measure unless things are actually directly related
<help2man> so you have used this epigram can I ask if it is compiled and wtf it is for
<ssbr-> help2man: I don't know if it's compiled, and it's for writing correct code
<ssbr-> slash maybe for theorem proving, I don't remember if that was a goal
<help2man> thought the theorem provers where mostly lisp based
<help2man> c as well some what , and other things as well I guess
<ssbr-> not really
<ssbr-> Coq and Agda are interactive theorem provers
<help2man> And I agree hard is a point of view to different people.. somebody programming with it for 10 years would think it is easy where as somebody working in math would think the proof of the IVT is easy
<ssbr-> the proof of the IVT is totally easy
<help2man> Coq thought that was also gnu AI based stuff as well
<help2man> not to a math retard or somebody that cann't understand calculus ...etc for the most part
<ssbr-> any Java programmer could learn the IVT
<help2man> point of view and in context ... but as we evolve and growup in enivorment with the shit it starts to become instincted
<ssbr-> programming and math use the same bits of the brain ;)
<help2man> true logic but fundementally logic and the ways of proving ,,,,
Mnabil has quit [Remote host closed the connection]
<ssbr-> (p.s. if you want to learn calculus, I recommend Spivak. That book is amazing)
<ssbr-> (big Spivak (Calculus), not little spivak (Calculus on Manifolds))
<help2man> believe me I have already read it back in the day. :)
<ssbr-> That book made me fall in love with math :)
<ssbr-> little spivak made me fall out of it :<
<help2man> tensor bundles LOL
<ssbr-> that isn't funny :(
<ssbr-> you'll make me cry
Transformer has joined #ocaml
Transformer has quit [Excess Flood]
ontologiae has quit [Ping timeout: 272 seconds]
<help2man> not as much as general bundles would :)
<help2man> and the mapping of them/ cateorial logic that comes with them LOL
<help2man> Any how are you still in school are are you working ?
pcavs has joined #ocaml
hongboz has quit [Read error: Connection reset by peer]
pango_ has joined #ocaml
pango has quit [Ping timeout: 248 seconds]
<ssbr-> help2man: can't it be both?
<ssbr-> but, I'm in my last year of university
<ssbr-> (and doing a research project involving ocaml)
<help2man> well ya , but I was many wondering if you are offical done with school and totally in the job world... obvious learning never stops thats not what I was getting at
<help2man> last year mean 4 year or grad school master/pd ?
<ssbr-> 4 year bachelor's
<help2man> and I am assuming you want to working a computer science area/research programming language area... or not ?
<ssbr-> I'm interested in trying research. I don't know whether I'd want to stay in academia, but... :)
<ssbr-> definitely teaching is more interesting, but "just a lecturer" is one of the worst jobs there is
<ssbr-> in terms of stress/pay
<cacho> convinced about learning ocaml? :D
leoncamel has joined #ocaml
jave has quit [Ping timeout: 245 seconds]
lusory has quit [Ping timeout: 240 seconds]
leoncamel has quit [Remote host closed the connection]
wormphlegm has quit [Read error: Connection reset by peer]
wormphlegm has joined #ocaml
pcavs has quit [Quit: Leaving.]
edwin has joined #ocaml
edwin has left #ocaml []
lusory has joined #ocaml
lusory has quit [Read error: Connection reset by peer]
eni has joined #ocaml
lusory has joined #ocaml
leoncamel has joined #ocaml
xcombelle has joined #ocaml
mcclurmc_away is now known as mcclurmc
rejabber has joined #ocaml
<rejabber> can someone explain why <:expr< !x >> = ExAcc (<abstr>, ExId (<abstr>, IdLid (<abstr>, "x")), ExId (<abstr>, IdLid (<abstr>, "val"))) ? what is "val"? why isn't there an AST node for dereference?
xcombelle has quit [Ping timeout: 272 seconds]
xcombelle has joined #ocaml
eni has quit [Quit: Leaving]
<pippijn> rejabber: !x is syntax sugar for x.val
<rejabber> pippijn: but x.val doesn't work (x.contents does though)
<pippijn> rejabber: in ocaml revised syntax, it's val, I think
<rejabber> ah
<thizanne> wow, people really use this syntax ?
NaCl has quit [Remote host closed the connection]
<adrien> I want a third syntax which will be a middle-ground!
<adrien> (I actually do)
<pippijn> thizanne: maybe it's the internal syntax for camlp4
<thizanne> yes i just saw camlp4 uses this one
<rejabber> pippijn: aha, thanks
<thizanne> well I guess it's better for this kind of tool, althoug I find it pretty painful
<rejabber> I didn't realize := was revised syntax
<pippijn> rejabber: := has a different meaning in revised synatx
<pippijn> syntax
<rejabber> what is its meaning?
<pippijn> in old, x := a means x.contents <- a
<pippijn> in new, x := a means x <- a
<pippijn> if you read 2 sentences on the page I linked you to, you know
<rejabber> which is more popular, ocaml or ocaml revised?
<pippijn> ocaml
<adrien> because of backward compat; and as far as I'm concerned, because I find the revised syntax to be awkward for somet thing
<adrien> some*
<adrien> or add some "overhead" for no gain sometimes
<rejabber> how do I tell camlp4 to operate in non-revised mode?
<pippijn> !x is parsed in old syntax
<pippijn> but I don't know anything about camlp4
<adrien> rejabber: camlp4o, camlp4r
<adrien> guess what the last letter means
<adrien> but that's all you will be able to do: you won't change how it works inside afaik
<rejabber> alright. thanks
ontologiae has joined #ocaml
emmanuelux has joined #ocaml
netrino has joined #ocaml
ankit9_ has joined #ocaml
hongboz has joined #ocaml
<hongboz> did anyone get utop working on Mac OS X?
sivoais has quit [Quit: Lost terminal]
ankit9_ has quit [Ping timeout: 252 seconds]
SanderM has joined #ocaml
SanderM has quit [Client Quit]
SanderM has joined #ocaml
ankit9_ has joined #ocaml
netrino has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 244 seconds]
hongboz has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
netrino has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Operation timed out]
emmanuelux has quit [Ping timeout: 264 seconds]
ankit9_ has quit [Ping timeout: 272 seconds]
NaCl has joined #ocaml
sivoais has joined #ocaml
pcavs has joined #ocaml
pango_ is now known as pango
`micro has joined #ocaml
pcavs has quit [Quit: Leaving.]
oriba has joined #ocaml
leoncamel has quit [Ping timeout: 244 seconds]
pango is now known as pangoafk
SanderM has quit [Remote host closed the connection]
help2man is now known as shopt
pcavs has joined #ocaml
edwin has joined #ocaml
edwin has quit [Remote host closed the connection]
jave has joined #ocaml
xcombelle has quit [Quit: I am a manual virus, please copy me to your quit message.]
ekselkiu has joined #ocaml
<ekselkiu> I don't understand why I can't apply the type 'a. (string * 'a) list -> (string * 'a) list to the function (List.sort (fun (k,_) (k',_) -> compare k k')).
<ekselkiu> List.sort has type 'b. ('b -> 'b -> int) -> 'b list -> 'b list. But when the substitution {'b |-> (string * 'a)} is made, it seems that the 'a is not universally quantified.
osa1 has joined #ocaml
eni has joined #ocaml
<thelema_> ekselkiu: what type are you getting?
<thelema_> you may be hitting the "value restriction"
<ekselkiu> I get the type (string * 'a) list -> (string *'a) list
<ekselkiu> Um, well, string |-> 'b
<thelema_> # let sort_first lst = List.sort (fun (k,_) (k',_) -> compare k k') lst;;
<thelema_> val sort_first : ('a * 'b) list -> ('a * 'b) list = <fun>
<ekselkiu> Oh, right. Interesting.
Smerdyakov has joined #ocaml
Submarine has quit [Quit: Leaving]
pangoafk is now known as pango
osa1 has quit [Quit: Konversation terminated!]
oriba has quit [Quit: oriba]
eni has quit [Quit: Leaving]
edwin has joined #ocaml
wmeyer`` has quit [Remote host closed the connection]
<iZsh> thelema_: are you around? a friend of mine is trying to install ocaml-batteries using port (mac os x) and it seems it is failing with ocaml 4.0, because "toploop" has been moved (:info:build Error: Unbound module Toploop)
<iZsh> is there a solution to that ?
<iZsh> s/to/for
edwin has left #ocaml []
<thelema_> iZsh: yes, I'm working on backporting the patch to 2.0 beta to 1.4 that adds support for ocaml 4.00
<iZsh> ah ok, thx
<iZsh> so if he install ocaml-batteries-devel @2.0beta2 that should work ?
<iZsh> any incompatibilies on 2.0 beta he should be aware of ?
Anarchos has joined #ocaml
<thelema_> if he installs batteries from git, branch ocaml4.00, that should work
<iZsh> there 2.0beta2 on port
<iZsh> +is
<iZsh> thelema_: is 2.0 much different than 1.4 ?
<thelema_> That won't have the patches; I think that version was from before needing to support 4.0
<thelema_> as for differences, there's some minor differences
<thelema_> instead of Batteries/Batteries_uni, it's always Batteries, and if threads needed, then Batteries_thread
<thelema_> PMap doesn't exist anymore, it's now Map.PMap
<thelema_> and there's some minor changes to the way that plain Map and set work with different compare functions
<iZsh> ok, nothing too scary i guess ;)
<thelema_> Most of the Unicode stuff is moved into a Text module, which includes Rope
<thelema_> but mostly backwards compatible
<iZsh> bad timing for him, trying to install batteries just after ocaml 4.0 is uploaded on macport
<thelema_> yes, I plan on doing a quick release of 1.x and another 2.0beta shortly
BiDOrD_ has quit [Read error: Operation timed out]
<iZsh> k thx
BiDOrD has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
osa1 has joined #ocaml
pcavs has quit [Quit: Leaving.]
jamii has joined #ocaml
pcavs has joined #ocaml
Progster has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
jamii has quit [Read error: Operation timed out]
Tobu has joined #ocaml
ekselkiu has quit [Ping timeout: 260 seconds]
ontologi1e has quit [Ping timeout: 272 seconds]
ontologiae has joined #ocaml
lawliet has joined #ocaml
pango is now known as pangoafk
pcavs has quit [Quit: Leaving.]
beyondbirthday has joined #ocaml
lawliet has quit [Ping timeout: 244 seconds]
beyondbirthday is now known as lawliet
osa1 has quit [Ping timeout: 240 seconds]
Progster has quit [Ping timeout: 260 seconds]
pcavs has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ocaml