flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
subconscious has quit [Read error: 113 (No route to host)]
struktured has quit ["Konversation terminated!"]
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
jeddhaberstro has quit []
jeddhaberstro has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Connection reset by peer]
threeve has quit []
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
threeve has joined #ocaml
bzzbzz has quit ["leaving"]
seafood has joined #ocaml
threeve has quit []
seafood_ has quit [Connection reset by peer]
r0bbyarrr is now known as r0bby
threeve has joined #ocaml
lecas has joined #ocaml
lecas has left #ocaml []
threeve has quit []
jeddhaberstro has quit []
bpadalino has left #ocaml []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
<MachinShin> so i was reading about jane street using o'caml (on reddit) and it got me curious, whhat's a good place to start learning o'caml?
<ozy`> I just started learning last week
<MachinShin> sweet. danke
<MachinShin> what do you thin kof it?
<ozy`> it's pretty cool
<MachinShin> you know any other functional langs? like haskell/erlang or a lisp?
<ozy`> I learned a bit of scheme at one point
<ozy`> haskell was too baffling but I might go back to it someday... OCaml is easier to comprehend
<MachinShin> yah, the haskell syntax both confuses & scares me
<ozy`> the other functional languages floating around pretty much all seem to be variations on a theme of either ML or lisp
<MachinShin> ocaml isn't?
<ozy`> and most of those are internally inconsistent in weird ways
<ozy`> well, OCaml is :p but still....
<thelema> other functional languages leave the ML sweet spot of power vs convenience
seafood has quit []
seafood has joined #ocaml
<MachinShin> are there many companies other than jane street using ocaml?
<thelema> not many known. Lexifi and Dassault Aviation
<thelema> Richard does some good stuff at RedHat
<MachinShin> both of those are french companies.. so., it's known in france then?waht about outside there?
<thelema> The code is still maintained by a team at INRIA, a french research team.
<MachinShin> sounds like it's one of those psuedo-opensource implementation/languages? (like Lua or erlang)?
<thelema> yes, it's opensource, but not a product of the community.
<ozy`> MachinShin: it's a cathedral, not a bazaar.
<MachinShin> just an opensource one.. yup. like Lua or Erlang :)
<MachinShin> two other langs i love for different reasons :)
<thelema> good nite all.
<ozy`> don't forget emacs...
<ozy`> peace
<MachinShin> night thelema, tahnks for the info
<Associat0r> MachinShin : you could look into F#
<MachinShin> oh right. that's ocaml for .net right?
<MachinShin> not sure that's any better, in some ways it's worse :)
<Associat0r> the syntax is kinda cleaned up
<Associat0r> and it has op overloading
<MachinShin> Associat0r: wow dude, you're in a lot of language chans :P
<MachinShin> so.. how do you compare ocaml to erlang? i note you're in there :)
<Associat0r> what do you want todo?
<MachinShin> i have no specific plans, i'm just curious and learning.. the jane street thing i read recently from reddit intrigued me
<Associat0r> erlang is mostly famous for it's built in message passing concurrency and hot swapping of code
<Associat0r> but it is dynamically typed
<Associat0r> it's message passing can easily be simulated in other languages
seafood has quit []
Palace_Chan has quit ["Palace goes to sleep"]
MachinShin has quit [Client Quit]
seafood has joined #ocaml
filp has joined #ocaml
ahamsandwich has joined #ocaml
mishok13 has joined #ocaml
ahamsandwich has left #ocaml []
seafood has quit []
Mr_Awesome has joined #ocaml
Snark_ has joined #ocaml
Yoric[DT] has joined #ocaml
electronx has joined #ocaml
OChameau has joined #ocaml
ppsmimou has quit [Remote closed the connection]
rby has joined #ocaml
Snark_ has quit ["Ex-Chat"]
ppsmimou has joined #ocaml
electronx has quit []
Yoric[DT] has quit ["Ex-Chat"]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
seafood has quit [Connection reset by peer]
seafood has joined #ocaml
seafood has quit [Read error: 54 (Connection reset by peer)]
seafood has joined #ocaml
rwmjones_ has joined #ocaml
seafood has quit []
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
mbishop_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
electronx has joined #ocaml
det has quit [Remote closed the connection]
det has joined #ocaml
sporkmonger has quit []
seafood has quit [Read error: 104 (Connection reset by peer)]
electronx has quit []
seafood has joined #ocaml
mbishop has quit [Read error: 110 (Connection timed out)]
sporkmonger has joined #ocaml
sporkmonger_ has joined #ocaml
sporkmonger_ has quit [Client Quit]
sporkmonger_ has joined #ocaml
sporkmonger has quit [Read error: 110 (Connection timed out)]
sporkmonger_ has quit [Read error: 104 (Connection reset by peer)]
sporkmonger has joined #ocaml
seafood has quit []
rmns has joined #ocaml
ppsmimou has quit ["Leaving"]
lde has quit [Remote closed the connection]
rwmjones_ has joined #ocaml
ppsmimou has joined #ocaml
rwmjones_ has quit [Read error: 110 (Connection timed out)]
mbishop_ has quit [Read error: 104 (Connection reset by peer)]
mbishop_ has joined #ocaml
marmotine has joined #ocaml
sporkmonger_ has joined #ocaml
sporkmonger has quit [Read error: 110 (Connection timed out)]
rmns has left #ocaml []
sporkmonger has joined #ocaml
lde has joined #ocaml
sporkmonger_ has quit [Read error: 110 (Connection timed out)]
rmns has joined #ocaml
rmns has left #ocaml []
mishok13 has quit [Read error: 110 (Connection timed out)]
olegfink has joined #ocaml
<olegfink> hi
<olegfink> is there a syntax extension (or any other way) to cast 'a to unit -> 'a or 'a -> 'a?
<olegfink> what I need is fun _ -> x, a funny form of suspension, but I would like it to be written something like \x
<olegfink> I know there's Lazy, but I don't quite need it
<flux> yes, there is Obj.magic. however, you need to be extra, extra careful when using that..
<flux> how would 'a be compatible with 'a -> 'a?
<olegfink> why should it be compatible? All I want is probably an elegant way to have this:
<olegfink> let rec loop n x = if n>0 then begin x (); loop (n-1) x end
<olegfink> loop 10 \print_endline "hello"
<olegfink> for now I write that as (fun _ -> print_endline "hello"), what I want is some syntactic sugar
<flux> well, there's pa_hole
<flux> I believe it would make that look like loop 10 \(print_endline "hello")
<flux> or (\print_endline "hello")
Linktim has joined #ocaml
<flux> pa_hole appears to be quite difficult to find, however :)
<flux> maybe I don't remember its name properly
<olegfink> heh, two links google knows about are both irc logs with your sentences about pa_hole
<flux> _ pa_holes _
<flux> there was discusison on how to handle the case of lambda function having no parameters, but I don't know how the implementation ended up
<olegfink> thanks, that seems to be what I wanted
<flux> it looks like it might not handle the case of zero arguments in a useful way
filp has quit ["Bye"]
<olegfink> yeah, I'm currently trying to understand what is it doing to figure out what I need for my unit -> 'a case
<flux> perhaps you could just patch it to support (\() -> ..) :)
<flux> or is that again too verbose
<flux> not many letters spared there
<olegfink> heh, seems I should read a camlp4 reference
<olegfink> I have all the code I need (because what I want is much simpler than holes) and yet I can't adapt it
Snark has joined #ocaml
|Jedai| has joined #ocaml
Yoric[DT] has joined #ocaml
rmns has joined #ocaml
|Jedai| has quit [No route to host]
Waleee has joined #ocaml
Walee has joined #ocaml
Waleee has quit [Read error: 110 (Connection timed out)]
<flux> I wonder if camlp4 documentation and tutorials are up to date these days
<Yoric[DT]> I believe that the ocaml-tutorial version of camlp4 is up-to-date.
<flux> indeed, atleast the url very much suggests that (/camlp4_3.10)
<flux> "Warning: this page contains advanced material." :-)
<flux> putting too much information in wrong hands can have dangerous consequences!
<Yoric[DT]> :)
subconscious has joined #ocaml
OChameau has quit [Read error: 113 (No route to host)]
tomh_-_ has joined #ocaml
Linktim_ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
mgodshall has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
Linktim_ has joined #ocaml
sporkmonger_ has joined #ocaml
Walee has quit [Connection timed out]
Linktim has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit [Read error: 110 (Connection timed out)]
blue_prawn has joined #ocaml
itewsh has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
DroneZilla has joined #ocaml
DroneZilla has quit ["ChatZilla 0.9.83 [Firefox 3.0.1/2008070206]"]
rmns has left #ocaml []
DroneZilla has joined #ocaml
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
_JusSx_ has joined #ocaml
_JusSx_ has left #ocaml []
tomh_-_ has joined #ocaml
<kig> let loop n f x = for i=0 to (n-1) do f x done ?
<kig> 1 to n, even
<DroneZilla> dirty code
<kig> code is dirty, religion is clean
<DroneZilla> :D
<kig> let rec loop n f x = if n < 1 then () else (f x; loop (n-1) f x)
<flux> so, the advantage is that we get a function that is much easier to understand and more succinct to boot?
<flux> ;-)
_JusSx__ has joined #ocaml
<kig> let rec foR i j f = if i > j then () else (f i; foR (i+1) j f)
<_JusSx__> how do i create a window in a new container/
<_JusSx__> how do i create a window in a new container?
_JusSx__ has left #ocaml []
<kig> let loop n f x = foR 1 n (fun _ -> f x);;
Associat0r has quit [Excess Flood]
Associat0r has joined #ocaml
Associat0r has quit [Excess Flood]
Associat0r has joined #ocaml
<kig> rewriting the stdlib in combinators is good fun
<kig> surprising how many things can be made incomprehensible with a small dose of unfoldr
Linktim has joined #ocaml
<Yoric[DT]> :)
<subconscious> does ocaml complied map (fun x -> x) y into y ?
<flux> hm, harrop's says to have some information on the progress of parallel gc, I wonder if there really is progress on the front
<Yoric[DT]> subconscious: no
<subconscious> does parallel gc have a good effect?
<flux> subconscious, apparently only harrop knows, I haven't heard anything else :)
<Yoric[DT]> Well, it would be nice to have that option.
Snark has quit ["Ex-Chat"]
<gildor> I am really not sure they were able to create a really good parallel GC in some months of time
<kig> subconscious: doesn't compile
<subconscious> kig, who doesn't
<gildor> (I mean people working on the project during OSP)
<kig> subconscious: i mean, doesn't compile map (fun x -> x) y into y
<subconscious> oh I see
<flux> hm, couldn't that particular case be handled by inlining, if definition of map is accessible?
<flux> oh, I was thinking simple let map f a = f a
<subconscious> let rec map f = function
<subconscious> | Nil -> Nil
<subconscious> | Cons (a, t) -> Cons ((f a), (map f t))
<Yoric[DT]> gildor: yeah, success would be surprising.
<Yoric[DT]> Still, if it works, I'll be happy.
<flux> yoric[dt], doubly so if it gives any performance boost - or did you mean that?
<Yoric[DT]> flux: I don't count on a performance boost for a first version.
<Yoric[DT]> Just having something which doesn't segfault will be a good start.
<flux> :)
hkBst has joined #ocaml
<Yoric[DT]> As a side-note, Batteries has passed 300 downloads yesterday.
<Yoric[DT]> For a project which hasn't reached 0.1, I think that's nice :)
<flux> keep up the good work!
<gildor> Yoric[DT]: well, the problem is that they will need to find the worforce to continue the project after the end of OSP
<flux> but, sleep ->
<Yoric[DT]> 'night flux
<Yoric[DT]> gildor: true
<gildor> Yoric[DT]: if they don't, the // GC will just disappear
<Yoric[DT]> Still, having a first working draft is a good start.
<gildor> Yoric[DT]: i was thinking YOU download batteries every night for backup
<Yoric[DT]> gildor: :)
* Yoric[DT] wonders if he could put students on the // GC.
* Yoric[DT] probably doesn't know enough about // GC.
<gildor> Yoric[DT]: i think GC in general is quite hard to enter
<gildor> creating a good GC is something that require a very good skill
<gildor> (not saying that student is lacking it, but that it is hard to find)
<gildor> Yoric[DT]: not kidding, they are really 300 download not from you for batteries ?
<Yoric[DT]> True.
<DroneZilla> what is batteries ?
<Yoric[DT]> A candidate replacement for the standard library.
<DroneZilla> replace the standard library why ?
<Yoric[DT]> With something much bigger.
<DroneZilla> it's almost perfect (except two or three devil functions)
itewsh has quit ["KTHXBYE"]
<Yoric[DT]> Essentially, the standard library is incomplete and can't be modified by anyone outside of the Inria.
<DroneZilla> add some librarires okay but replace why ?
<Yoric[DT]> Have you looked at, say, streams?
<DroneZilla> what do you think it's missing in it ?
itewsh has joined #ocaml
<Yoric[DT]> Constructors.
<Yoric[DT]> Duplication.
<DroneZilla> Yes stream it's complicated but complete no ?
<Yoric[DT]> Nope.
<DroneZilla> Duplication what is it ?
<Yoric[DT]> Essentially, there are plenty of things which are very difficult to put in streams.
<Yoric[DT]> You have a stream a.
<DroneZilla> like what ?
<Yoric[DT]> You want to back it up before reading it.
<Yoric[DT]> You can't do that.
<DroneZilla> back it up (you mean save it ?)
<Yoric[DT]> Yep.
<Yoric[DT]> Not to disk.
<Yoric[DT]> But for backtracking purposes.
<DroneZilla> Of course you can't, the datas could come from a network socket, if you wanna save it you must read it and store it by yourself
<Yoric[DT]> Which you can't do with streams.
itewsh has quit [Client Quit]
itewsh has joined #ocaml
<DroneZilla> why you can read it if you really need.
<Yoric[DT]> Well, let's assume you're writing a parser based on streams.
<DroneZilla> yes
<Yoric[DT]> In order to be able to handle alternatives, you need backtracking.
<Yoric[DT]> Just exactly how do you plan to implement that backtracking?
Linktim has quit ["Quitte"]
<DroneZilla> I rememer do that with the stream in caml-light and in ocaml using a special syntax which come from something like camlp4
<DroneZilla> but if you want to backtrack in a stream you can, but it cost in memory
<Yoric[DT]> Sure, it's Camlp4.
<DroneZilla> if you read 1GO you have to store 1GO, that's why it's not a simple function in the library, OCaml it's not a magic language, you're near your CPU and understand all the complexity behing eah algo
<Yoric[DT]> Let me find you the underlying API...
<DroneZilla> I know this library, and i use it sometime, but rarely
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
<DroneZilla> and if I need parse there is lexx and yacc
<DroneZilla> (ocamllex and ocamlyacc of course)
<Yoric[DT]> That's one way of parsing.
<Yoric[DT]> Now, they can't parse everything (e.g. JavaScript).
<DroneZilla> And personnaly I try to create language which doesn't need backtracking, it's simpler
<Yoric[DT]> For parsing JavaScript, you need unlimited backtracking (which is awful, I grant you, but still).
<DroneZilla> You can't write it with ocamllex and ocamlyacc ?
<Yoric[DT]> If you're not convinced by my backtracking example, let's try a second one.
<Yoric[DT]> How to you serialize (lazily) a tree to a stream?
<DroneZilla> lazily ?
sporkmonger has joined #ocaml
<DroneZilla> and a stream, you're talking about a Stream, or a channel ?
<Yoric[DT]> Well, without building the whole stream before it is consumed.
<Yoric[DT]> Stream
<Yoric[DT]> Channels are another issue, as you can create a stream from a channel but not a channel from a stream.
<DroneZilla> didn't the function Stream.from do what you want ?
<Yoric[DT]> Which is rather dumb.
<Yoric[DT]> No.
<DroneZilla> why ?
<Yoric[DT]> Well, I need a function int -> 'a option.
<Yoric[DT]> That int is pretty annoying.
<Yoric[DT]> This means that I need to be able to perform random-access in my data structure to be able to build a stream.
<DroneZilla> I know it's a dirty thing in this function (there are many dirty functions in the ocaml library that I hope will disappeared in future)
<Yoric[DT]> Well, this one disappears :)
<DroneZilla> no this int doesn't mean it
<DroneZilla> it's just here to help you
<DroneZilla> you can ignore it with goog skill
<Yoric[DT]> Nothing guarantees that the function will be called in the right order.
<Yoric[DT]> ...
<Yoric[DT]> or without skipping elements
<Yoric[DT]> So yeah, you *can* ignore it.
<DroneZilla> no the function will be called in the Stream (if you don't publish it) and it will be ok
<Yoric[DT]> I beg your pardon?
<DroneZilla> If you ask for the second element of a Stream, the first and the second are rode (I'm almost sure) and stroe in memory
<Yoric[DT]> Well, that's what the implementation says.
<Yoric[DT]> Not what the documentation says.
<Yoric[DT]> Assuming that the implementation doesn't change, yes, you could do that.
<Yoric[DT]> Of course, these streams are run-time incompatible with the camlp4-provided streams, which is more than strange.
<Yoric[DT]> And you still can't convert a stream to a channel.
<Yoric[DT]> Or map on a stream, or fold on a stream, ...
<DroneZilla> you're right, but I don(t think implementation will change, because many streams can't be read with random access
<DroneZilla> why convert a stream to a channel it's a dirty concept
<DroneZilla> of ourse you can't map on a stream, it's not a lazy list it's a fucking state object from the iterative world
<Yoric[DT]> So?
<DroneZilla> map from a stream means destroy the stream
<Yoric[DT]> So?
<Yoric[DT]> Sometimes, it's exactly what you want.
<DroneZilla> you could use Stream.iter to map it or fold it or...
<DroneZilla> it's perfect
<Yoric[DT]> Yeah, you could reinvent the wheel.
<Yoric[DT]> How exactly do you plan to implement map from Stream.iter?
<Yoric[DT]> (technically, you can, but using hidden APIs)
<Yoric[DT]> And as a matter of fact, streams can be used for quite nice functional-style programming, once you have the correct set of combinators.
<Yoric[DT]> (of course, it's not lambda-calculus, it's stream-calculus)
<Yoric[DT]> Although you need that stream replication to do that in the first place :)
<Yoric[DT]> Now, could you please tell me exactly why converting a stream to a channel is dirty?
<DroneZilla> no it's dirty if you hope to be magic, but you can give to Stream.iter a conversion function between bytes and you're object
<DroneZilla> you're => your
<DroneZilla> sorry
<DroneZilla> the interface of stream are poor and I think it's a wish
<DroneZilla> it's for developpers to know what they're doing
<DroneZilla> I saw many developpers ignore many complexity problem, with OCaml you can't you have to know
<Yoric[DT]> That's unrelated.
<Yoric[DT]> When you use OCaml for building big stuff, you need consistent APIs and more muscle.
<DroneZilla> OCaml for building big stuff, you could with no problems
<Yoric[DT]> Yes, but with more standard libraries.
<DroneZilla> of course you will reinvent the wheel, but once in your life (you keep your function during all your life)
sporkmonger_ has quit [Connection timed out]
<kig> so move the function to a library :)
<Yoric[DT]> Yeah, it's called putting that function into a library :)
<DroneZilla> yes
<DroneZilla> you could, but I never find something missing in the standard libarry
<DroneZilla> all I want is there
<Yoric[DT]> Well, I always find something missing in the standard library.
<Yoric[DT]> And I'm obviously not the only one.
<Yoric[DT]> Now, other stuff that's missing:
<Yoric[DT]> * Unicode
<Yoric[DT]> * general-purpose IO
<Yoric[DT]> * operations on characters
<Yoric[DT]> * plenty of utilities.
<Yoric[DT]> (not to mention UI stuff, xml, etc.)
sporkmonger_ has joined #ocaml
sporkmonger has quit [Read error: 104 (Connection reset by peer)]
<kig> consistent module sigs for enumerables (lists, strings, arrays)
<DroneZilla> UTF-8 is missing, yes but it's a very hard subject because the character hav varable size
<DroneZilla> IO are complete, you could write and read what you want
<Yoric[DT]> kig: yet
<Yoric[DT]> DroneZilla: no
<kig> combinators for exceptions and options
<DroneZilla> what ?
<DroneZilla> combinators ?
<Yoric[DT]> kig: that's planned, but not for version 0.1
<kig> e.g. maybe 10 (fun x -> x * 2) (Some 2) -> 4
marmotine has quit [Remote closed the connection]
<subconscious> "failure is an option"" lol
<DroneZilla> the modulefor enumerable doesn't have all the same inteface, what's the problem, in OCaml you write an adapater in ten seconds
<kig> let maybe d f o = match o with None -> d | Some x -> f x
<Yoric[DT]> DroneZilla: just compare http://batteries.forge.ocamlcore.org/doc.preview/batteries/html/api/System.IO.html and the current I/O API.
<Yoric[DT]> DroneZilla: btw, Unicode support has been around for OCaml for years.
<DroneZilla> I saw, nothing usefull, just function I wrote in past in one minute
<Yoric[DT]> It's just not included in the standard library, hence not usable.
<Yoric[DT]> DroneZilla: including the constructors?
* Yoric[DT] extremely seriously doubts that.
<DroneZilla> which one ?
<Yoric[DT]> create_in and create_out
<Yoric[DT]> And then you'll tell me exactly how you implement [pipe] in one minute.
<Yoric[DT]> (or at all)
<DroneZilla> oh it's difficult to in OCaml to write type input = (unit -> char) * (string -> int -> int -> int) * (unit -> unit)
<kig> exceptions feel hacky, on any larger bit of code you'll be wrapping excepting functions inside a try-with anyhow, so the compiler not requiring that is a source of runtime errors
itewsh has quit [Connection timed out]
<DroneZilla> and always use input in your cde
<Yoric[DT]> DroneZilla: you're missing the point.
itewsh has joined #ocaml
<DroneZilla> explain
<Yoric[DT]> The point is that you can't use the standard library functions with your new type input.
<Yoric[DT]> Essentially, you have to rewrite all the I/O functions for use with this input.
<Yoric[DT]> Oh, and Printf.
<Yoric[DT]> And Scanf.
<Yoric[DT]> And parts of Unix.
<DroneZilla> oh it's difficult
<DroneZilla> but OCaml is a low language (one step from the C)
* Yoric[DT] fails to understand whether DroneZilla is being sarcastic.
<subconscious> above C level
<subconscious> lol
* Yoric[DT] will probably just stop answering DroneZilla, sounds too much like trolling.
<DroneZilla> you want complex function, but OCaml is minimal, it's the goal of this language
<DroneZilla> not to provide library you coul write, but complet set of primitives (plus some additional modules)
<Yoric[DT]> Have you ever written a large app?
<DroneZilla> yes, and never need complex function
<DroneZilla> on this I didn't find useful, function
<Yoric[DT]> You never needed a complex function?
jlouis has joined #ocaml
<Yoric[DT]> Well, good for you.
<Yoric[DT]> I've never seen an application which didn't require a complex function.
<mbishop_> the goal of ocaml is to be MINIMAL? news to me
<DroneZilla> 95% time of a developper it's write adaptaters
<Yoric[DT]> But if you program OCaml as if were C, I guess I can understand.
<DroneZilla> mbishop_: in fact OCaml is minimal
<gildor> w
<DroneZilla> I program OCaml, like I program in ASM
<DroneZilla> exceptI got the functions
<Yoric[DT]> Well, I rest my case.
<DroneZilla> I'm near my computer and the complexity is very important
rby_ has joined #ocaml
<DroneZilla> In other language, the programmers doesn't understant what is the danger of each fiunction
<DroneZilla> in C, OCaml or ASM, i knowthe that time matters (not like in fifth element)
<DroneZilla> my loop are fast (very fast)
<DroneZilla> my memory access are duirect, doesn't use three pointers (like in OO)
<Yoric[DT]> Well, I'm afraid you're missing most of the point of OCaml.
sporkmonger_ has quit [Read error: 110 (Connection timed out)]
<subconscious> We can use ocaml differently
<subconscious> writing batteries is cool, it can be very useful to someone I'm sure
<DroneZilla> I don't miss the point of OCaml, I love this language because it's like C or ASM, you know what you do
* Yoric[DT] suspects it will be useful for everyone but DroneZilla.
<DroneZilla> I don't say batteries is not cool, but for me it's useless
<subconscious> It's not like you are revising the ocaml standard and completely ruining the language
<subconscious> DroneZilla: just be happy they aren't making Ocaml^6
<kig> how do you get around the boxed values (re: memory access) ?
<kig> that's still black magic to me
<DroneZilla> get arount the boxed ? sorry I'm not english, could you explain
<Yoric[DT]> boxed values
<DroneZilla> boxed values like pointer on structure ?
<Yoric[DT]> How do you know how long your memory accesses take.
<Yoric[DT]> Indeed.
<kig> floats and ints represented by pointers to floats and ints
<DroneZilla> what, float are float and not pointer to float, perhaps today OCaml manage them with pointer in list or array but I hope one day not
<DroneZilla> and caml will have 4 list types, one for the one byte size, one for the two bytes, one for the four bytes ad one for the eight bytes
<DroneZilla> int are direct in OCaml no ?
<DroneZilla> the are indirect value ?
<kig> i think ints are bit-tagged for the gc, direct yeah. but i don't know
<DroneZilla> direct and the first bit for the GC
<DroneZilla> but perhaps in a list they are boxed
<DroneZilla> today but not tomorrow
<kig> how do lists work anyhow, are they internally like arrays or linked lists or whah (guess i should read the source)
<Yoric[DT]> Linked lists.
<Yoric[DT]> Er... actually, I assume they're linked lists, I never bothered to check.
itewsh has quit [Read error: 110 (Connection timed out)]
<DroneZilla> they say floats are boxed for the GC (sad story)
<DroneZilla> say => said
itewsh has joined #ocaml
<DroneZilla> mabe one day GC will disappear (no I know they will never disapear, and bad programmers will continue to think they kno program)
<Associat0r> DroneZilla : in languages like bit-c you can disable the GC altogheter
<DroneZilla> bit-c what's that ?
<subconscious> DroneZilla: Am I a bad programming if I never used a language that doesn't have a GC?
<DroneZilla> if you can't use a language with no GC, yes you're a bad programmer, but if you never have used one it doesn't mena you can't use one
rby has quit [Read error: 110 (Connection timed out)]
<subconscious> oh ok
<subconscious> I guess that is a fair point
<Associat0r> DroneZilla : I don't think you are bad per se
<Associat0r> I mean subconscious
<Associat0r> there are different levels of programming
<DroneZilla> no there are one level of programming , you say to the compurter waht you want and it obey
<Associat0r> there are plenty of bad programmers who never used a GC language
<Associat0r> and vice versa
<DroneZilla> of course
<Associat0r> programming isn't about the computer
<DroneZilla> programming isn't about the computer => and what is it ?
<Associat0r> well I mean it isn't about von neumann machines
<DroneZilla> it's the science that the greecs develop, the the arabs develop, that the french develop, and wich concern the ways to compute
<DroneZilla> that the german developp, the chines dev.. (you can complete)
<DroneZilla> it was created by mathematicancs for mathematicians with time in minds
<subconscious> I thought most of computing was invented by high school kids
<subconscious> that's why we have stuff like unit tests and PHP
<Associat0r> what if computers had GC's in hardware?
<DroneZilla> subconscious: you know the jistory of computing ?
<subconscious> I know about the software crisis
<DroneZilla> Associat0r: the problem doesn't change
sporkmonger has joined #ocaml
<Associat0r> I can also say you are a bad programmer if you have never dealt with microcode
<DroneZilla> you got the same complexity problem, with or without GC
<Associat0r> which is absurd
itewsh has quit ["KTHXBYE"]
<DroneZilla> Associat0r: no not if you never have, only if you can't deal with
<Associat0r> remember that the machines that we have today are just 1 possible kind of machine out of many
<DroneZilla> no you can't change the complexity model
<subconscious> what about quantum computers?
<DroneZilla> or you gonna be a god
<subconscious> Don't they have very different complexities
<subconscious> I don't know about the physics though so I can't be affirmative
<DroneZilla> quantum computers ? if you think that it change the complexity model, it means that you could have the quantity of memory you wan in an isolated space (not 1 MO, 1GO). Which it's impossible
<DroneZilla> They could just gain a great mutliplicative coefficient, but O(n ln(n)) will stay O (n ln (n))
<kig> has anyone tried to move allocations into the type system? (is that even possible?) i mean, gc exists because manually calling free() is error-prone
<subconscious> DroneZilla: I don't know the physics of it
<subconscious> kig, doesn't ATS use linear types for this?
<DroneZilla> only god could overpass the complexity system of the universe
<DroneZilla> :D
<subconscious> kig, The whole section on linear types is missing from the manual so I couldn't be sure
<subconscious> DroneZilla: I don't think god could factorize large numbers in linear time
<Yoric[DT]> kig: well, there are linear type systems and region-based memory management.
<kig> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.12.6558 "A type theory for memory allocation and data layout"
<Associat0r> speaking of ATS what do you guys think of it?
<subconscious> All I know is the #ATS channel is really quiet
<subconscious> which is a shame
<Yoric[DT]> kig: the question being what you plan to do if you lift allocations into the type system?
<Associat0r> nice someone is there now
<subconscious> there have been a couple others in there
<Yoric[DT]> Chances are that you will still need dynamic allocation, for computations for which you can't predict size.
<subconscious> but not back today
<Associat0r> subconscious : what do you think of F#?
<Associat0r> and DroneZilla
<DroneZilla> what ?
<Associat0r> F#
<subconscious> I'm not at all interested in F#
<subconscious> If there was anything unique or interesting about it I would know
<kig> you could check frees with the compiler and maybe thread space-complexity stats through a program to prove upper limits to memory use? the latter would be nice for embedded systems, might be possible to turn some subset of programs into statically allocated ones as well
<Yoric[DT]> kig: well, thread space-complexity sounds like some of my research :)
<Yoric[DT]> (and one of the foci of the Hume language)
<subconscious> Hume
<subconscious> Higher-order Unified Meta-Environment
<subconscious> these guys watch star trek
<DroneZilla> what is hume precisely ?
<subconscious> It's a Higher-order Unified Meta-Environment
<DroneZilla> could you explain
<subconscious> :)))
<kig> and hmm, maybe get a more hardware-friendly memory layout for data, and easier parallelism
<DroneZilla> i'm downloading th emanual
<subconscious> I'm looking at examples
<DroneZilla> i love to discover new languges
<subconscious> me too!
<Yoric[DT]> A language with functional-style resource-bounded computing and concurrent resource-bounded computing.
<Yoric[DT]> Quite experimental.
<DroneZilla> I think
<kig> optimizing out a float div saves a dozen cycles, optimizing out an uncached memory load saves a couple hundred
<DroneZilla> but very hard to read (it remonds me co$oft languages)
<DroneZilla> co$oft => cro$soft
<Associat0r> which language?
<DroneZilla> VB, and F#
<DroneZilla> exspecially
<subconscious> Hume reminds me of haskell
<Associat0r> which langauge are we talking about?
<subconscious> which is obviously the real influence
<Associat0r> o hume
<DroneZilla> when I rode "r"c it takes me many minutes to understand
<Associat0r> DroneZilla : F# is as readable as ocaml
<DroneZilla> f |> x | | y > 2
<DroneZilla> whoua
<Associat0r> I don't get the VB and F# connection
<DroneZilla> VB is unreadable and in F# there aro many operators which makes it difficult to read
<DroneZilla> like the |>
<DroneZilla> which is just (fun x y -> f y x)
<Associat0r> that is just forward pipe
<DroneZilla> what is is in OCaml ?
<DroneZilla> it not the f -> (fun y x -> f x y) ?
<Associat0r> you can define it yourself
<DroneZilla> but when you read it and doesn'tknow it you cry
<DroneZilla> of course you can
<DroneZilla> define it, but I don't like languages with 45 operators in it
<Associat0r> I don't see what is so unreadable about it
<DroneZilla> what is |> in F# ?
<Yoric[DT]> I actually use it from time to time, but this ends up being write-only code.
<DroneZilla> I don't know, and there wasmany things that I don't understant
<Associat0r> well it got operator overloading
<Yoric[DT]> So, yeah, while it helps with concision, I agree that it's rather bad for readability.
<Associat0r> that is 1 thing I like about it
<DroneZilla> today when I rode something I understand it, except the F# and the VB (now I read th VB, it's my job, but before no)
<DroneZilla> it was the same with $ in haskell (that I love today)
<Associat0r> I also couldn't read VB
<DroneZilla> in fact it's a very simple language except the "r"c
<DroneZilla> whic is unreadable if you don't know
<Associat0r> well everything is unreadable if you are not trained for it
<DroneZilla> I could read many languages I don't know
<DroneZilla> hume was unreadable with the first files, but now I begin to understand
<subconscious> It's because so many languages designed are pointless grey mush made from the last 3 uninspiring languages the author used
<DroneZilla> you just have to don't read the unecessary words (like in VB)
<subconscious> look at python ruby .. etc
<subconscious> arc F#
<DroneZilla> in fact it's just that all languages do the same
<DroneZilla> examples :
<Associat0r> what is uninspiring about F#?
<DroneZilla> dim i as INteger = 3
<DroneZilla> int i = 3
<DroneZilla> i :: Int
<Associat0r> python and arc
<DroneZilla> i = 3
hkBst has quit [Read error: 104 (Connection reset by peer)]
<DroneZilla> i =3
<subconscious> they are just grey paste
<DroneZilla> you remove the unusefull word and you understand
<subconscious> you take a few concepts that make you feel comfortable and make a language out of them
<Associat0r> F# is very well designed
<subconscious> no it's not
<subconscious> ocaml, SML and such are well designed
<DroneZilla> yes, but I think it's just that you must offer the same primitives if you want your language to be powerfull (Turing powerfull) and the primitives all always the same, read a variable, and assigne a variable, and call a function with variables (the three primitives of lambda calculus)
<subconscious> F# is just a copy -- there is no design left to be done
<Associat0r> it is no copy
<Associat0r> it has view patterns, op overloading, a usefull object system
<im_alone> subconscious, rm -fr F#
<subconscious> Associat0r: So does it predecessors
<Associat0r> ocaml doesn't have view patterns
<DroneZilla> it has a very powerfull library system, .NET
<Associat0r> no op overloading
<subconscious> none of these (or anything in F#) is original
<im_alone> M$ doesn't think in the improvement of the performance of its products
<Yoric[DT]> Associat0r: well, OCaml *nearly* has had view patterns for some time.
<subconscious> Like I said, you take a few features you like and mush them together
<Yoric[DT]> (with Camlp4)
<Associat0r> it fixes the inconsistencies of boxed floats
<DroneZilla> op overloading in OCaml would be boring
<Yoric[DT]> As for op overloading and objects, well, that's quite useful but hardly original.
<DroneZilla> becaus you couldn't write (+)
<Associat0r> ocaml is designed for different reasons
<Yoric[DT]> I'm more interested by the units.
<DroneZilla> you have to precise which one you want
<Associat0r> so is F#
<Associat0r> stuff doesn't need to be original to be usefull
<subconscious> Associat0r: I see what you mean, it's new and fixes problems, but do you agree with my point -- nothing is _original_
<im_alone> F# lacks polymorphism
<subconscious> they would have been better to improve existing languages than be control freaks and invent from scratch
<Associat0r> it has polymorphism just not polymorphic variants
<DroneZilla> what is polymorphic variants ?
<subconscious> progress is really slow because of these things and it's a shame
<Associat0r> they didn't really invent from scratch they took a lot of caml
<subconscious> You have all these languages that can't interoperate, everyone writes a new regex library and a blog engine once a week
<im_alone> M$ only is interested in selling .Net products
<im_alone> with 0% of current development
<Associat0r> if they were they would have released F# years ago
<Associat0r> remember it is in dev since early 2000's
<Associat0r> they could have rushed it out if they wanted to
<Associat0r> but didn't
<subconscious> in any case, you should admit F# is boring
<subconscious> (unless you never heard of SML and ocaml)
<subconscious> (... and haskell and whatever else the paste has been made of)
<DroneZilla> LISP maybe ?
<Yoric[DT]> I actually think that F# is interesting.
<Associat0r> it is usefull for numerical computing for me it has a ncie IDE and good libs that is what counts
<Yoric[DT]> Working on the good libs :)
<Associat0r> subconscious : why don't you design your own language?
<Yoric[DT]> I was wondering how hard it would be to have a type system with an equational theory (or whatever is behind F#'s unit types).
<im_alone> i recommend you to design your own p-code-like's pascal-like from C scratch as in 197x
<subconscious> Associat0r: There is no possible way I could improve what already exists
<subconscious> Associat0r: The problem is that other people haven't realized this, or are control freaks that want to define their own language
<Associat0r> subconscious : ATS and bit-c are interesting IMO
<subconscious> (or they actually have a good idea, that happens to but is rare)
<dobblego> haha, so true
<DroneZilla> they're still things that doesn't exit in actual languages
<Yoric[DT]> Plenty things remain to be done.
<Yoric[DT]> Now, the problem is that the barrier is getting steeper.
<Yoric[DT]> Any new high-level language should have at least ML's polymorphism, Haskell's type-classes, OCaml's Camlp4 and .Net's libraries.
<Yoric[DT]> And that's just for starters:)
<DroneZilla> there is no parallel language (something in which there are two kinds of expression : the sequence and the parallel)
<Yoric[DT]> DroneZilla: yes there are.
<DroneZilla> like ?
<Yoric[DT]> Concurrent Haskell, for one.
<Associat0r> IMO it should have low level capabilities and performance comparable to C++
<Yoric[DT]> BSML, in the OCaml world.
<DroneZilla> what is it ? I just know hakell since two weeks
<subconscious> Concurrent Haskell/pH is a really disappointing story
<Associat0r> .NET is optionally IMO
<Yoric[DT]> Associat0r: oh, yeah, that, too :)
<Associat0r> there should be something to replace C++'s niche
<subconscious> If you read the book they have a really grand vision about implicit parallel programming
<Yoric[DT]> Associat0r: yeah, the JDK's libraries would be sufficient :)
<subconscious> all this research later you end up with `pseq`
<Yoric[DT]> subconscious: never tried it, I'm afraid.
<Yoric[DT]> I just read papers.
<DroneZilla> no no concurrent haskell is not what I need
<Yoric[DT]> But yeah, pseq is a little disappointing.
<Associat0r> http://felix-lang.org/ also interesting
<subconscious> I am really disappointed with it
<Yoric[DT]> Associat0r: in addition to which we have the designer somewhere around the OCaml mailing-list.
<subconscious> Just because the book was so good I guess
<im_alone> andorra prolog does parallelism
<Yoric[DT]> im_alone: does it?
<Yoric[DT]> Interesting.
<Associat0r> Yoric[DT] : I know
<subconscious> im_alone: What I find really interesting is Peter Van Roys comment about implicit parallelism
<subconscious> he said that actually, he gave up on it, because the way to make things work is have the parallelism explicit
<im_alone> pure lambda calculus can do implicit parallelism too
<subconscious> It's not what I'd want to belive but I kind of trust that guy :P
<DroneZilla> an assertion language is still needed
<subconscious> regarding programming language concepts
<subconscious> DroneZillla: Something to write logical statements about programs?
<DroneZilla> where you say by example, that the content of this cell must be the value of this memory and doesn't care about update
<DroneZilla> all is magic
<DroneZilla> to devlopp GUI it would be nice
<subconscious> oh
<subconscious> it sounds like the work conal did on reactive guis
<subconscious> DroneZilla: this sort of thing http://www.youtube.com/watch?v=faJ8N0giqzw
<Yoric[DT]> subconscious: interesting.
<subconscious> ?
<Yoric[DT]> DroneZilla: sounds like functional reactive programming.
<DroneZilla> ???
<DroneZilla> I don't undersatnd functional ractive programming ?
<Yoric[DT]> <DroneZilla> where you say by example, that the content of this cell must be the value of this memory and doesn't care about update
<Yoric[DT]> all is magic
<Yoric[DT]> to devlopp GUI it would be nice <= That's the idea behind functional reactive programming.
<subconscious> there is a video about it
<DroneZilla> 56' it's too many time
<DroneZilla> but perhaps it's that
<DroneZilla> but it's just a concept to developp GUI and sell it to customers and earn money
<DroneZilla> just write easily adaptaters
<DroneZilla> in my job (with my job I can feed my wife and my child) I just write adaptaters(like many programmers who are paid for that)
struktured has joined #ocaml
<Yoric[DT]> Well, have fun writing adapters.
<Yoric[DT]> I'm going to wish you all a pleasant night.
<Yoric[DT]> Cheers.
<kig> night
Yoric[DT] has quit ["Ex-Chat"]
<Associat0r> night
<DroneZilla> night
<Associat0r> subconscious : you should really create your own language man
<DroneZilla> :D
<DroneZilla> what kind of language must he create ?
<Associat0r> the language he wants to create
<Associat0r> something new and innovative
<Associat0r> I guess
<Associat0r> DroneZilla : what do you think of F#'s light syntax?
<Associat0r> the indentation aware syntax
<DroneZilla> like inhaskell ?
<Associat0r> yeah and like python
<DroneZilla> before I think that it was better, but using haskell, I understand that I don't link it
<DroneZilla> i rather like open a block with { and closing it with }
<Associat0r> you should look at nemerle
<im_alone> the archaic algol-68 was disappeared
<subconscious> It's ok, we still have ALGOL 60
<subconscious> if you like ALGOL (and you must!) and have somehow not encounted it: http://ftp.cwi.nl/CWIreports/SEN/SEN-N0301.pdf
<im_alone> ocaml hasn't the same orthogonality of algol-68
<subconscious> that's a really great paper about ALGOL which is a must read
<subconscious> im_alone: How do you measure orthogonality?
<DroneZilla> what does it offer compared to langugaes I know
<subconscious> DroneZilla: Nothing, It's only important because of its place in history
<im_alone> the orthogonality is useful for math expressions
<DroneZilla> yeah but i want discover new things
<subconscious> DroneZilla: such as?
<DroneZilla> recently I discover haskell and fell in love, but it's rare that a langugae offer me new tings
<im_alone> e.g., manipulating arrays without lateral effects
<subconscious> DroneZilla: oh, do you know Prolog?
<DroneZilla> yes
<subconscious> aw you already had the best one :)
<DroneZilla> with OCaml I do the same thing than prolog with no more lines
<Associat0r> I think they mean othogonal design as in few overlapping primitives
<subconscious> No you don't
<Associat0r> like C++
<DroneZilla> like what ?
<subconscious> (unless you were bad at Prolog)
<DroneZilla> I don't know prolog I just read some papers, and doesn't see what it could give me more than OCaml
<subconscious> see you~
<DroneZilla> yes it can solve equation but it's dangerous in complexity
<im_alone> the big problem of Algol-68 is that it's non-cfg grammar, it requires a 2-levels grammar.
<subconscious> im_alone: ALGOL 60 has a BNF of the syntax
<subconscious> im_alone: BNF was invented for this
<im_alone> 2-levels grammar was invented in 197x for Algol-68
<subconscious> You must study the great 60, not 68
<DroneZilla> subconscious: it's like in catechism
<subconscious> DroneZilla: exactly :p
<DroneZilla> :D
<DroneZilla> is Algol efficient ?
<im_alone> DroneZilla, in the sense of writing lesser code, Algol-68 is very efficient
<DroneZilla> could you write Labda expression ?
<im_alone> i'm not, sorry
<DroneZilla> lambda expression is a powerfull tool to write few lines
<DroneZilla> (a tool rarely understand in OO)
<DroneZilla> but a dangerous tool
<im_alone> instead, Algol-68 can use passing the name of the procedure as parameter
<DroneZilla> like in C, but you don't have parital evaluation
<DroneZilla> parital => partial
blue_prawn has quit ["Client exiting"]
<ozy`> partial evaluation is syntactic sugar for certain types of lambda expressions
<DroneZilla> it's more, in OCaml you make by example ( +) 4
<DroneZilla> and you got a function who add 4
<ozy`> I don't see how that couldn't be done with a lambda expression
<DroneZilla> it's very difficult to di that in C
<ozy`> well, C doesn't have lambdas.... :p
<DroneZilla> sorry when i'm agrre with you
<DroneZilla> it's just I need lambda expression not just pointer to function (like in C)
<ozy`> of course
Associat0r has quit []
DroneZilla has left #ocaml []
<mbishop_> You could always make an object in C, that just the apply method
<mbishop_> I believe they did that in Modula-3, called them closure objects
<ozy`> IIRC, a certain Apple compiler extension is allowing for the use of lambdas in C
<ozy`> but that's just something I heard.....
struktured_ has joined #ocaml