flux changed the topic of #ocaml to: 3.11.0+rc1 is out! | Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0beta1 available from http://caml.inria.fr/pub/distrib/ocaml-3.11/ | Or grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html
alexyk has quit []
fschwidom has quit [Remote closed the connection]
alexyk has joined #ocaml
<Camarade_Tux> my binding lablgtk binding generator is working :)
<Camarade_Tux> s/binding//
<Camarade_Tux> ;p
Palace_Chan has quit [Client Quit]
ulfdoz has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has quit ["Leaving"]
TaXules_ has joined #ocaml
TaXules has quit [Remote closed the connection]
<alexyk> how do you wait n seconds?
<alexyk> ah, Unix.sleep of course
Palace_Chan has joined #ocaml
<Palace_Chan> if i have a Set, say IntegerSet.t..how do i make an empty set ? As in, for a type 'a list its just [] and for arrays its Array.create...
netx has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit [Client Quit]
<Palace_Chan> nvm i got it
netx has left #ocaml []
<Palace_Chan> how can i loop something until a condition is met ? (infinite while loop with a break if there is such a thing, or do i have to throw in my break conditions into the while conditional ?)
<Palace_Chan> guess i better get used to recursion
seafood has joined #ocaml
threeve_ has joined #ocaml
<purple__> Can anyone help with doing a non blocking client connect ?
<purple__> let socket = Unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
<purple__> let _ = Unix.set_nonblock socket in
<purple__> let _ = Unix.connect socket ( Unix.ADDR_INET (server_address, 80)) in
<purple__> but the connect is throwing
<purple__> Fatal error: exception Unix.Unix_error(38, "connect", "")
<purple__> any help would be really appreciated
<purple__> i can do the connection fine in blocking mode but i would really like to use select()
struktured has quit [Read error: 145 (Connection timed out)]
<mbac> purple__: #define ENOTSOCK 38 /* Socket operation on non-socket */
<purple__> mbac, thanks
<purple__> it doesnt make sense to me though, as code works fine including reads and writes
<purple__> except when i introduce the set_nonblock,
<mbac> i got nothin'
<purple__> i found something that suggested that it could through an 'in progress' which can be ignored
<purple__> but its weird that its not regarded as a socket
<mbac> maybe the order of execution is not what you expect
<purple__> s/through/throw
Raynes has joined #ocaml
Demitar has quit [Remote closed the connection]
Demitar has joined #ocaml
<purple__> hmmm well just catching the exception and ignoring it, then feeding it into select works and i can then do reads and writes using select to wait
<purple__> but the particular error is a bit unnerving
jeddhaberstro has quit []
threeve_ has quit []
struktured has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
seafood has quit []
struktured_ has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
olgen has quit []
alexyk_ has joined #ocaml
apples` has quit ["Leaving"]
alexyk has quit [Read error: 113 (No route to host)]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
ygrek_ has joined #ocaml
glondu`` has quit [Read error: 104 (Connection reset by peer)]
glondu`` has joined #ocaml
Raynes has quit [Read error: 110 (Connection timed out)]
Palace_Chan has quit [Read error: 110 (Connection timed out)]
Raynes has joined #ocaml
Optikal__ has quit [Read error: 104 (Connection reset by peer)]
bohanlon` has joined #ocaml
purple__ has quit [kornbluth.freenode.net irc.freenode.net]
jeremiah has quit [kornbluth.freenode.net irc.freenode.net]
jdev has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
jdev has joined #ocaml
<alexyk_> how do I do conditional compilation in ocaml?
purple__ has joined #ocaml
<olegfink> alexyk_: use cpp?
<alexyk_> olegfink: is it an ocaml thing?
<olegfink> no, just a usual cpp.
<alexyk_> olegfink: do people do that?
<olegfink> I'm not sure it's the best practice, but I've seen a few projects doing that.
<alexyk_> what about one of the P's in camlp4?
<olegfink> right you are
<olegfink> pa_ifdef.cmo
<olegfink> ehm, seems on my system it's only present in metaocaml?
jeremiah has joined #ocaml
<olegfink> alexyk_: ah, it's just called pa_macro.cmo in camlp4 3.10
<olegfink> that's why
olgen has joined #ocaml
<alexyk_> olegfink: interesting...
<olegfink> it even works, althought I'd argue about IFDEF...END precedence
<alexyk_> found this examples, and amazing GUI approach with camlpy:
<alexyk_> (GUI unrelated to macros, just fun)
<olegfink> yep, separation of gui from the code is the 'right' way of doing things
<olegfink> especially given that nowadays we often works with apps on the other side of the globe
<alexyk_> btw wx seems started by Russians as well in 1996 or so, reading the contributors list and thanks to some Institute for releasing it
<olegfink> as well as what?
Raynes has left #ocaml []
sporkmonger has quit []
glondu`` has quit [Read error: 104 (Connection reset by peer)]
glondu`` has joined #ocaml
olgen has quit []
ygrek_ has quit [Remote closed the connection]
<alexyk_> olegfink: as I am :)
<alexyk_> are there good tutorials on calling C++ from ocaml? or just C from ocaml -- with examples?
<flux> well, there is the ocaml documentation, and then there are the relevant links in ocaml-tutorial.org
<alexyk_> flux: yep, found Monnier's
mishok13 has joined #ocaml
_zack has joined #ocaml
* alexyk_ reading CamlPDF literate program, lovely
<alexyk_> flux: what's David Teller's nick here, by any chance?
<flux> yoric[DT]
<alexyk_> ah, ok -- he's the one who's thanked in Real World Haskell as more than 1% commenter!
<alexyk_> so it's possible to know both in depth
jlouis has quit [Remote closed the connection]
* alexyk_ finally understood the meaning of [DT]
<flux> think, it'll come to you ;)
<flux> but, off to eat
_zack has quit ["Leaving."]
Camarade_Tux has joined #ocaml
__me has joined #ocaml
__me has left #ocaml []
__me has joined #ocaml
Kerris7 has joined #ocaml
Anarchos has joined #ocaml
Yoric[DT] has joined #ocaml
johnnowak has joined #ocaml
rwmjones has joined #ocaml
<Anarchos> is there a good tutorial on mixing threads and events ?
<flux> unfortunately I haven't seen one
<flux> anarchos, have you gotten a decent grasp on how to use events in general?
<Anarchos> flux no sorry, i just used 'send v' and 'sync receive t'
<Anarchos> i tried like this : http://pastebin.com/m704e92b7
<flux> doesn't that work?
<Anarchos> for launch yes, for launch and get, no
<Anarchos> it blocks. You can try if you want with a simple fucntion printing and returning 1.
_zack has joined #ocaml
<flux> ah, you're not synchronizing the send event
<Anarchos> i must synchronize all events ?
<flux> yes
<flux> event is nothing unless it's synchronized
<flux> similarly as functions must be called, events must be synchronized
<Anarchos> ok
Kerris7 has quit ["Who is Candlejack? Is he going to c"]
<Anarchos> so why defining events without synchonize them ?
<flux> well, there is Event.choose
<flux> why define functions without calling them?
<flux> no idea
<flux> eventually you want to call/synchronize :)
Gionne has joined #ocaml
<flux> the Event interface is actually quite cool. except the synchronous aspect, which I don't like.
<Anarchos> thanks a lot, i will try to run the modified version :)
<Anarchos> it works !!
<Anarchos> flux you are a true ocaml hacker :)
Anarchos has quit ["got dish plates..."]
Kerris7 has joined #ocaml
asabil has joined #ocaml
<Yoric[DT]> flux: actually, I've been thinking (synching?) about a modified Event, something hybrid between streams and events.
* Yoric[DT] should get down to implementing it at some point.
fschwidom has joined #ocaml
<flux> yoric[dt], I would love to see an asynchronous event module..
<flux> I've got a monadific one at work, but, it's at work ;)
<flux> (and it's great, although it's me saying it ;-))
<flux> actually I also have a non-monadific one, but it's inefficient (global lock)
<flux> (although I'm not sure how that matters in ocaml..)
<Yoric[DT]> From the look of it, it doesn't matter much in bytecode
<Yoric[DT]> I haven't checked in native, though.
asabil has quit [Remote closed the connection]
asabil has joined #ocaml
__me has quit [Read error: 104 (Connection reset by peer)]
__me has joined #ocaml
Snark has joined #ocaml
petchema__ has joined #ocaml
seafood has joined #ocaml
petchema_ has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
Kerris7 is now known as KerrisAwayGroupM
KerrisAwayGroupM has quit []
seafood has quit []
Gionne has quit ["Leaving"]
ulfdoz has joined #ocaml
Kerris7 has joined #ocaml
johnnowak has quit []
Kerris7 is now known as Kerris
Kerris is now known as Kerris7
TaXules_ is now known as TaXules
vixey has joined #ocaml
Kerris7 has quit []
Kerris7 has joined #ocaml
vpalle has joined #ocaml
Kerris7 has quit []
ikaros has joined #ocaml
Kerris7 has joined #ocaml
willb has joined #ocaml
<flux> [Caml-list] OCaml version 3.11.0 released.
flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
<flux> but I suppose we've almost seen the list before.
<flux> whoa: Language features: - Addition of lazy patterns: "lazy <pat>" matches suspensions whose values, after forcing, match the pattern <pat>.
<flux> didn't see that coming
<flux> gnh: - -dtypes renamed to -annot
<flux> I hope they have a backwards compatibility option, it sucks to be updating makefiles for that ;)
<flux> (it used to be -dannot)
Stefan_vK1 has joined #ocaml
* rwmjones wonders if the reference to esr is a joke or not ...
<Optikal_> what reference to ESR?
<Optikal_> Anybody subscribe to the OCaml journal? I ordered it yesterday and was wondering how I get access to the archives
willb has quit [Connection timed out]
<gildor> Optikal_: do you have problem with login/password of simply where to find it
<Optikal_> gildor: login\password. Never was sent to me
<Optikal_> I emailed ffconsultancy but the emails bounced
<gildor> login= email; password= payment transaction number
<Optikal_> gildor: Thank you
<Optikal_> Doesn't let me in :(
<Optikal_> Must not be set up
<Smerdyakov> Optikal_, the OCaml journal is pretty dodgy. I hope you have money to spare. :P
<Optikal_> Smerdy: I do =)
<Optikal_> How'd you get ahold of it?
Snark has quit [Read error: 113 (No route to host)]
<Smerdyakov> I've never gotten ahold of it, but the fact that all the "articles" are written by one person is a bad sign.
<vixey> you're actually paying to read some blog
<vixey> that's really.. worth it.. ?
<Optikal_> If it's well written, yes
bohanlon` is now known as bohanlon
<Optikal_> His free tutorials are pretty clear to me and the examples seem good
<Smerdyakov> It seems kind of in bad taste, when every other resource associated with functional languages is made available for free online.
<Optikal_> Smerdyakov: Most of the online functional stuff is written Ivory Tower style
<Smerdyakov> Meaning what?
<Optikal_> Meaning uses a lot of inside terminology without explanation
<Smerdyakov> You just need to read material in the right order, and then that's no problem.
<Optikal_> I don't want to have to take a course of compiler design to understand how to use ocaml for everyday coding stuff
<Smerdyakov> I have a hard time believing anything from a compiler design class would show up in treatments of using OCaml for tasks other than compiler design.
Stefan_vK has quit [Read error: 110 (Connection timed out)]
<Optikal_> What would be something comparable that is available for free?
<gildor> OCaml Journal article are quite good (easy to understand for complex task)
<gildor> but I would really liked that they are free
<gildor> ;-)
<Smerdyakov> I tend to expect that the things he presents are pretty obvious for people who understand the OCaml language and know how to read ocamldoc documentation.
acatout has quit [Read error: 60 (Operation timed out)]
acatout has joined #ocaml
<gildor> Smerdyakov: "obvious" is always something hard to define
<Smerdyakov> I don't think so. There is a clear community of functional programmers who tacitly share a common definition.
<gildor> and depends a lot on the point of view
<gildor> you can spend weeks on a problem, before understanding it
<gildor> and at this point, your "hard" problem turn to be "obvious"
<Optikal_> You also have access to much different resources than I do. I'm the only person I've ever met IRL that has used a functional language
<gildor> OCaml Journal can help you to enter some problems
<Smerdyakov> There are people who "get" functional programming and people who don't. I'm willing to believe that the OCaml Journal is valuable for people who don't get functional programming, but I'm not interested in that class of people.
<Smerdyakov> This is part of the general signs that it's important to distinguish between separate classes of programmers, as between electricians and electrical engineers.
<gildor> ... same old discussion as "only people who own a PhD do valuable things in computer science"
<Smerdyakov> No. There are plenty of high school students who get functional programming.
<gildor> there is no "classes" of programmers
<gildor> or if there are, there is a huge number of it
<Smerdyakov> What does that mean? I can define any classes I like, with reasonably objective criteria.
<Optikal_> I 'get' functional programming. I'm mainly interested to get insight into how people are using it
<Optikal_> what libraries are available, what their pitfalls are, etc..
<gildor> Optikal_: a very good way to do this, is to read other code
<Smerdyakov> Optikal_, Google search and reading library documentation should handle that.
<gildor> OCaml source is a good choice
<Optikal_> Library documentation is biased towards the library
<Smerdyakov> gildor, do you mean the source of the main OCaml distribution?
<Optikal_> You don't usually see in library documentation 'Well, this function is not done very well you might try a different library for XXX"
<gildor> Smerdyakov: yes reading the source of ocaml distribution gives you a lot of data
<Smerdyakov> gildor, I'm not a fan of that approach.
<gildor> at one point, if you really want to understand, you need to take this step
<Smerdyakov> Optikal_, you can learn for yourself, by trying the alternatives. Someone else's experience may not be relevant to your situation.
<Optikal_> Hey, you spend $30,000 a year to go to Ivy Leauge schools, I spend $30/mo on a journal
<Optikal_> bit me
<Smerdyakov> gildor, understand what, and to what end?
<Optikal_> bite
<Smerdyakov> Optikal_, I've never been a student at an Ivy League school, and I'm proud of it. :P
<gildor> Smerdyakov: in my case, i was looking to understand how to optimize my ocaml program
<Smerdyakov> gildor, I agree that 'ocamlopt' is lame enough that it's useful to read the source. No such problem with MLton. :P
<gildor> as stated in the doc "ocamlopt" is not really optimizing compiler, this is just a native compiler
<gildor> so if you want to optimize, you need to go deeper
<gildor> in particular, if you are looking to save memory
<Smerdyakov> Yup, which, to me, is a good reason not to use OCaml.
<gildor> You can really achieve great things using OCaml even with memory in mind
Anarchos has joined #ocaml
<Smerdyakov> OK, but I can achieve the same great things in SML with less work.
<gildor> (and speed of course)
<Anarchos> why can't i mix Ocaml threads and callbacks ?
<gildor> Smerdyakov: question of choice, I know better OCaml than SML, so I use OCaml
<Smerdyakov> gildor, that doesn't sound like a sound engineering reason.
<Optikal_> SML also has a smaller user community and less bindings to libraries
<vixey> what's the thing about community everyones always banging on about?
<gildor> if you are running a company called OCamlCore, that is a very "sound engineering reason"
<Smerdyakov> Optikal_, new library bindings are relatively easy to create. They round out to nothing in the long run, if you're working on halfway complex projects.
<vixey> it's like, I'm scared to use this language because a hundred other people aren't doing it too?
<Smerdyakov> gildor, OCamlCore is "a company"?
<gildor> indeed
<Smerdyakov> http://www.ocamlcore.com/ ==> 403 Forbidden
<Optikal_> vixey: Yes. When you work outside a labratory that is a very valid concern
<gildor> but the website is at alpha stage
<gildor> so please, don't use it for real (for now)
<Smerdyakov> And really slow :-(
<vixey> Optikal_, It's kind of like listening to pop music because everyone else is, even though it's crap?
<Smerdyakov> why Nokia use -> why does Nokia use
<Optikal_> No, it's nothing like that
<gildor> yes, that the image behind it
<Smerdyakov> (Free English grammar advice! :-])
<gildor> Smerdyakov: I repeat, "alpha stage" ;-)
<Smerdyakov> And don't put spaces before question marks in English.
<vixey> someone should make a typesystem for grammar.. that would probably help me
<gildor> I am not a native english speaker
<Smerdyakov> gildor, so this "company" is just a legal synonym for your work as a consultant?
<gildor> yes, almost
<gildor> If I earn money, I will try to hire more people
<Smerdyakov> The argument "I use OCaml because it's in my company's name" is not very convincing. You could have picked a different name.
<gildor> ;-)
<gildor> I am not closed to other programming languages
<gildor> but for now, I do perform better with this
<gildor> better than SML
<vixey> Optikal_, Then what is it like
<Smerdyakov> I should stop trying to convince you. The more people using inferior tools, the better my prospects. ;)
<Optikal_> You know that's not how it works =)
<gildor> Smerdyakov: really see the world as it is
<gildor> COBOL is still strongly alive
<Optikal_> and Smerdy's rails killer doesn't host a single live site yet
<gildor> and C++/Jave share the rest of the market
<gildor> JAva
<Anarchos> gildor why do you write all in english on your website if you are french ?
<gildor> my god, I should not have given this website URL
<gildor> I plan to do a french translation
<gildor> and YES the website is for sure full of mistake,
<gildor> (just write it when I have time to do it, i.e. late at night)
<Anarchos> gildor i miss french docs a lot when i began with ocaml, though it has been developed by french scientists (paid by french public funds...)
<Anarchos> gildor it is a good idea , do you plan to build it with eliom ?
<gildor> no, for now it is standard wordpress
<gildor> + apache
<gildor> (Anarchios, BTW i am the author of ocaml-gettext for i18n of ocaml program)
<gildor> (I am also missing french program that output frenc doc ;-)
ygrek_ has joined #ocaml
<Anarchos> gildor anyway it is a good idea to fund a company to advocate ocaml in the professional world. Just think to create "cooperative unions' instead of capitalist corporation ;)
<gildor> Anarchos: this is a SARL, it is not a SA (real capitalist)
<gildor> it is mainly designed to support my consultant work and allow me to pay bill for ocamlcore.org/OCaml Meeting
<Anarchos> gildor ok :)
<gildor> but maybe one day, OCaml will rule the world and I will be rich ;-)
<Anarchos> gildor you are minus rather than cortex ;)
willb has joined #ocaml
ygrek_ has quit [Remote closed the connection]
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
pango has quit [Remote closed the connection]
Kerris7_ has joined #ocaml
Kerris7 has quit [Read error: 54 (Connection reset by peer)]
pango has joined #ocaml
__me has left #ocaml []
__me has joined #ocaml
slash_ has joined #ocaml
jlouis has joined #ocaml
sporkmonger has joined #ocaml
<alexyk_> I am wrapping a C++ system's driver in C for ocaml, and it has a class parameter reference, Blah& as a parameter. I don
<alexyk_> t't want to give any (null &), how should I wrap that?
<alexyk_> meaning, still a value?
<flux> smerdyakov, presenting that SML is superior to OCaml is downplaying a few features, such as the preprocessor. and yes, the object system :-)
<Optikal_> F# is lookin pretty good to me
<Optikal_> WHat are its main drawbacks?
<gildor> F# takes a lot from OCaml
<Optikal_> Yes, I know, but has better support for concurrency I hear
<gildor> it is a good option if your are planning to use .NET features
<gildor> but if you are looking for something that can run on non-windows system, you better use OCaml
<vixey> F# looks idiotic
<Optikal_> vixey: Why is that?
<vixey> If I explained it you would still not agree with me
<gildor> F# is filling a hole that OCaml could have filled on Windows
<gildor> (OCaml on Windows is really not at the same level as OCaml on other UNIXes)
<Optikal_> vixey: Well, until you do explain it I will just assume it's a knee-jerk reaction
<vixey> It's not
__me has left #ocaml []
<flux> optikal_, f# doesn't have the ocaml module system, which is quite powerful
<flux> I don't know how its object system compares to ocaml, but I can hardly imagine it is as powerful; but, perhaps it's easier to understand and use
<flux> also while F# does support concurrency better, I don't think its single-threaded performance trounces ocaml?
<Optikal_> Probably not
<flux> I'm sort of interested in windows development too
<gildor> F# is integrated into .NET which gives you access to a lot of external libraries
<flux> just so my software gets a larger user base
<flux> but I'm hoping rwmjones' cross compiler work will help me with that :)
<gildor> which OCaml is missing
<flux> maybe an interoperability bridge could be built to ocaml
<gildor> yep, just like Alain Frishc/Lexifi CSML
<flux> that's the real ocaml for .net
<gildor> ocamlil is almost dead
<flux> but, yes, looks like dead
<gildor> I take a look at it 6 months ago
<gildor> but CSML is a real interop bridge (nice work)
<gildor> .NET gives you access to GUI, low level lib... and so much
<alexyk_> Optikal: F# has a Haskell-like syntax, a pokymorphic Set<'a> and Map<'a>, but no functors; it has dot notation for objects and easy class definition via record with members, and full .net platform behind it
<alexyk_> MSR got a beautiful thing in F#m which already sucks the minds of smart ocaml and func folk into proprietary .net
<gildor> if i have to choose a language for programming windows, F# would be ranked among first, due to its compatibility with .NET
<alexyk_> my FSF friends ardgue it's evil, and we must stop mixing with M$
* gildor has to leave for 2 hours
<gildor> bye
<alexyk_> yet an idea of using Visual Studio is enticing, amnd generally learning about .net swhows it hasa lot to offer
<vixey> bye
* alexyk_ can't type yet, drinks coffee
<alexyk_> overall, it's elitist and silly to look down on F#, but it's dangerous as it sucks you into WIndow Presentation Foundation, Silverlight, and other WhatTheF*ck stuff, all from M$, and huge fragile Mono
<flux> I wonder how ocaml+javascript-stuff is going to fly
<flux> if javascript interpreters/jits really get up to speed (performance-wise), it might actually be feasible to use that
<alexyk_> overall you quickly end up in M$-paid blogs and "codeplex" all full of paid monkeys luring you into M$ web
<alexyk_> I with there was an F# for Mac -- they have MacRuby inheriting from Objective C Object
<alexyk_> same thing for OCaml would rock... MaCaml
<flux> you're envisioning yet another single-platform language?
<Kerris7_> oh Microsoft
<alexyk_> flux: I'd rather play with my Mac than spend days staring at Mono bugs
<alexyk_> Microsoft is seriously luring people into FP, which is an evil ploy to distract them
<Optikal_> hah
<alexyk_> from seeing what it is -- a monoculture and illegal monopoly
<Optikal_> You wouldn't take an internship at MS Research?
<alexyk_> Optikal: I would, just as Dr Faust, and it pains me to admit it
<Optikal_> of course =)
<alexyk_> Optikal: the problem is, once I started looking at F# => .net, I see there's no exit
<alexyk_> you need more and more MS crap, and then you're sucked in
<Kerris7_> why not Scala -> JVM
<alexyk_> you shouldn't invest your time in proprietary stuff managed by paid managers in Redmond who live my MS project
<alexyk_> Kerris7: didn't look at Scala much... does it have {} ?
* alexyk_ has a big sugn, red circle with {} crossed with a red line
<alexyk_> sign
<Optikal_> Microsoft has been pretty good about releasing developer tools free of charge lately
<alexyk_> Optikal: sure, if you program for .net... free opium
<alexyk_> the first hit is free
<Optikal_> I dunno bout you, but I write software to make money..
<alexyk_> Optikal: I can only point to Stallman's writings :)
<Optikal_> point and laugh?
<Optikal_> =)
Kerris7_ has quit []
<alexyk_> Optikal: you can make money with free software
<alexyk_> writing in-house software is not the same as pushing closed-source tools and systems on the world
<Optikal_> Yeah I know, the biggest contributers to FOSS are corporations
<rpg_> its funny how evry1 talks shit about microsoft
<alexyk_> yep -- I worked in Amazon, it's all Linux, and gives stuff back
<rpg_> when theyre just doin theyre thing
<jonafan> *they're, their
<rpg_> yeah
<rpg_> its really eazy to hate but try doin something better..not so eazy is it
<jonafan> *it's, easy, doing, easy
<rpg_> yeah
<alexyk_> rpg: I don't hate, I even try, but I see it's a serious compromise of FSF principles for much pain in effect
<alexyk_> going with Linux and OCaml is a much safer bet than F#
<rpg_> *jonathan
<rpg_> lol!
<jonafan> haaaah
<Optikal_> much safer bet for what?
<Optikal_> FOSS cred maybe
<Optikal_> but not releasing a commercial product
<alexyk_> much safer for not suffering braindamage and having regrets
<alexyk_> as for GUI, there's a superb idea at Codegraphics, to interface with wxPython -- crossplatform on all big 3
<rpg_> alexyk_: ms's goal is to attract the avarage user not the average developer
<jonafan> I think microsoft is hollowing out and isn't really worth hating anymore
<rpg_> and the average user dont have time and patience to type ./configure ; make && make install ;
<alexyk_> rpg: MS now wants the best developers by dangling FP fruit
<rpg_> he just likes to click things
<alexyk_> it's very, very dangerous for the FSF world to succumb to it
<vixey> alexyk_, if FSF writes code like you do then I hope they all succumb
<jonafan> man rpg
<Camarade_Tux> rpg_, I type "./configure && make && make install", well ./configure --prefix=/usr but I'm the exception, fast nobody does actually
<alexyk_> instead of learning and improving free software, people are reading 1000 oage books on windows crap
<jonafan> i compile something like once a year
<rpg_> yep..i nevver do Camarade_Tux unless i install it for my user only
<rpg_> then id do --prefix=~/usr
<alexyk_> Camarade_Tux: --prefix=/usr is silly :)
<Camarade_Tux> I knew I was an alien
<Camarade_Tux> alexyk_, no, you're just a slackware user (and don't even try to say it's being silly ;) )
<alexyk_> Camarade_Tux: no, I like to compile to my own prefix, so I can rm -fr it :)
<Camarade_Tux> /usr/local is a terrible mess, have you ever had two installations of gtk ?
<rpg_> jonafan: what im tryin to say is the average user dont have time to manually fix things..he just wants to press a button and things happen..and thats what windows is doing and as long as there are more stupid people than smart in this world windows will always win
<alexyk_> Optikal: I shudder at the very mention of Gtk, I tried to compile it every 2 years or so, for 3 nights each
<alexyk_> while wxWidgets compiles at once
<jonafan> i think ubuntu does that better than microsoft does it
<Camarade_Tux> rpg_, average people are getting dissatisfied with windows, it will probably take ages before they do anything, but they often criticize it and this is increasing every day
<Optikal_> Using ubuntu for most people is like buying generic cereal
<alexyk_> here's the way to do GUIs: http://coherentpdf.com/blog/?p=5
<alexyk_> wxPython rocks, OCaml talks to it, a fantastic idea, working example which packages a Mac and Windows apps for you
<Optikal_> Also, The change from XP to Vista was too much of a change for most people to handle
<alexyk_> Bye-bye Gtk and WPF crap
<rpg_> yeah
<rpg_> the change fucked a lot of people up id say
<jonafan> so we all agree, the reason microsoft succeeds is people are used to it
<Optikal_> Well, no
<rpg_> all linux needs is some hardcore fps games or something...thats another reason why many linux users even keep a copy of windows
<Optikal_> I think they actually make some really solid products
<jonafan> ubuntu is solid
<rpg_> microsoft succeded because it is simple to operate
<jonafan> ubuntu is simpler to operate
<Camarade_Tux> I think microsoft removed some things people actually knew and used and now, those users can't do anything
<rpg_> yeah but not to manyt people know about it...
<alexyk_> I have an MS manager friend, he went to Google and back, seriously claiming Google has poor software engineering culture and MS has better one and fewer bugs; all /. laughed for days
<jonafan> which is what i said
* Camarade_Tux leaves
<Optikal_> Microsoft succeeded because they focused on selling software which spreads faster than hardware
<rpg_> yeah
<rpg_> and theyre all about graphics and shit
<rpg_> linux is more about stability
ulfdoz_ has joined #ocaml
<jonafan> uh, have you ever heard of compiz fusion?
ulfdoz_ has quit [Client Quit]
<jonafan> completely kicks the crap out of anything vista can do
<Optikal_> compiz has some issues
<alexyk_> Optikal: MS sued competitors to death, stole their chied developers, broke protocols, and was found guilty of that all; as they started by suing people, so they there sued back eventually by US and EU; that's their full circle
<rpg_> i bet u can find a windows program that can do the same thing
<alexyk_> it's not on the merits they won
<Optikal_> For example, wiggly-windows that snap to other windows
<jonafan> wiggly windows aren't default
<jonafan> and no rpg, there is no windows program that does the same thing
<rpg_> why not ?
<Optikal_> as compiz? Sure there is
<jonafan> okay, let's see the plugin architecture
<rpg_> and also note evry time u buy a pc from the store chances are its running windows
<rpg_> so if i have windows on and ll im usingf the pc for is to go on i.e. or ms word wtf would i go through all the hassle to try out linux ? for what ?
<Smerdyakov> Who buys PCs from stores?
* Optikal_ does
<Smerdyakov> Looooser :D
<Optikal_> Best thing I ever did really
<rpg_> average users do Smerdyakov
<jonafan> rpg_, you are practically incomprehensible
<Optikal_> No, seriously, HP Elite is the best machine I've ever had
<rpg_> jonafan: what do u mean
<jonafan> but yeah, that is probably a large part of why microsoft continues to succeed in selling its os
<vixey> heh
<Smerdyakov> Since I finished college, I only order machines with Linux pre-installed.
<vixey> rpg_, you aren't using words
<vixey> rpg_, and when you occasionally do they aren't spelled correctly "hassle"
<jonafan> or punctuation
<rpg_> when u want to pay your room do you follow the same procedure as an expert painter or do u just go to the home depot or something and buy primer and paint and a roller brush or something
<jonafan> or syntax
<jonafan> the longer your sentences are, the harder it is to figure out what you are saying
<vixey> rpg_, you should definitely use "you" instead of "u"
tvn has joined #ocaml
<Optikal_> Ubuntu worked out of the box for my HP system
<rpg_> paint your room
<tvn> hi, is there any parallel programming model for ocaml to take advantage of multiprocessors (or cores) ? For instance in c/c++ there's the openmp api to support that.
<rpg_> i know what you mean now
<rpg_> lol
<Optikal_> tvn: JoCaml supposidly
<rpg_> bbl
<tvn> Optikal_, I just check JoCaml and the project seems no longer maintained
<alexyk_> tvn: wrong, it is maintained
<alexyk_> tvn: check out form CVS and see
<Optikal_> tvn: Might want to check out F# for concurrency
<tvn> ah ok ic, I was looking at the old version of Jocaml -> http://moscova.inria.fr/oldjocaml/index.shtml (latest release was 2003)
<alexyk_> (and the guy borrowed ideas from Haskell and F# as well)
fschwidom has quit [Connection timed out]
<tvn> alexyk_, thanks -- that page seems useful
ulfdoz_ has joined #ocaml
Snark has joined #ocaml
vpalle has quit [Read error: 110 (Connection timed out)]
Kerris7 has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
<alexyk_> wow: in repo git bug tracker: http://github.com/kig/gitbug/tree/master
<alexyk_> written in ocaml
slash_ has quit [Client Quit]
Gionne has joined #ocaml
<Gionne> why the && doesn't work? http://pastebin.com/m7210c2c5
<Gionne> how do i write an AND?
<flux> && is logical and
<Gionne> ok that's what i need
_zack has quit ["Leaving."]
Raynes has joined #ocaml
Raynes has left #ocaml []
<Gionne> so i write: if (expr1) && (expr2) then true else false it means: if expr1 = true and expr2 = true return true else false
<Camarade_Tux> Gionne, 'expr1 && expr2' will be enough ;)
petchema_ has joined #ocaml
<Gionne> trying
<flux> let tf = [false; true] in List.iter (fun a -> List.iter (fun b -> Printf.printf "%b && %b = %b\n" a b (a && b)) tf) tf;;
<Gionne> thanx guys
<Gionne> but the problem is elsewhere
<Gionne> another check makes the prog fail but i don't understand why
fschwidom has joined #ocaml
petchema__ has quit [Read error: 110 (Connection timed out)]
glondu`` has quit [Read error: 104 (Connection reset by peer)]
glondu`` has joined #ocaml
ygrek_ has joined #ocaml
marmotine has joined #ocaml
tvn has quit ["Leaving"]
paul424 has joined #ocaml
<paul424> hi, how to handle with modules, is there any way to make some module default - equivalent of c++ namespace ???
glondu`` has quit [Read error: 104 (Connection reset by peer)]
glondu`` has joined #ocaml
<flux> open List;;
<flux> or, perhaps preferably: module L = List;;
paul424_ has joined #ocaml
<alexyk_> flux: do you know what's flyingfrog's nick here? :)
<flux> jdh30 or Guest[0-9]+
Yoric[DT] has joined #ocaml
<alexyk_> flux: thx! his email bounces
paul424__ has joined #ocaml
<alexyk_> Yoric[DT]: congrats on the honorary mention in Real World Haskell! :)
paul424 has quit [Nick collision from services.]
paul424__ is now known as paul424
<paul424> hi, how to handle with modules, is there any way to make some module default - equivalent of c++ namespace ???
Kerris7 has quit []
<Smerdyakov> paul424, I can't speak for anyone else, but I don't understand your question.
netx has joined #ocaml
<paul424> Smerdyakov: ehh I defined module Stack which implements push, pop and so forth; I don;t want to write Stack.empty, Stack.pop Stack.push and so forth but push pop empty that the interpereter knows what module I want to use as default
ikaros_ has joined #ocaml
<paul424> Smerdyakov: ????????????????
Kerris7 has joined #ocaml
paul424_ has quit [Connection timed out]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
Gionne has quit ["Leaving"]
<Yoric[DT]> alexyk_: thanks :)
<olegfink> paul424: open Stack ;;
<paul424> ok thanks
<alexyk_> Yoric[DT]: I confused you with thelema, but then flux deconfused me
<alexyk_> I wish there was a list of real people on #ocaml
* Yoric[DT] never claimed to be a real person.
<alexyk_> [DT] is really an eye-opener
<olegfink> real people live a real life, there are just nicks on irc.
<alexyk_> Yoric{DT]: so how come you didn't escape to Haskell yet? :)
<olegfink> how would you tell Gc to just stop even thinking of collecting something?
* alexyk_ wonders how people become known as then without the trailing_ again
ikaros has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> alexyk_: I still have hopes for OCaml :)
<Yoric[DT]> (plus I don't like the naming conventions of Haskell :))
<alexyk_> Yoric[DT]: how much time you spend with each? :)
<Yoric[DT]> I'm mostly using OCaml, actually.
<Yoric[DT]> I only did a few toy projects with Haskell.
<alexyk_> Yoric[DT]: so what would you say to people running to Haskell? Where the key advantage(s) of ocaml?
<paul424> olegfink: and how to close ? by close ?
<Yoric[DT]> alexyk_: first thing from the top of my mind would be Camlp4.
<olegfink> paul424: 'close'?
<olegfink> what do you mean?
<Yoric[DT]> But I'd rather not have a too complex conversation on the topic today.
* Yoric[DT] is really very tired.
<Yoric[DT]> paul424: you don't.
<alexyk_> Yoric: sure, I'm looking for sound bites only
<paul424> make the module invisible again
<olegfink> why would you want this?
<alexyk_> I need a reason to think good about ocaml now that RWH is on my desk, and it's beautiful
<Yoric[DT]> paul424: if you want to make a module visible only locally, there's a small extension to perform [open Foo in e].
<Yoric[DT]> alexyk_: I'll need to get it at some point.
<paul424> heep because I have one signacture and several modules, and I want to test them ...
* Yoric[DT] will try and convince the library to order it.
<Kerris7> alexyk_: RWH?
<Kerris7> oh, real world haskell
* Yoric[DT] will crawl back to his blanket.
<olegfink> alexyk_: well, camlp4, imperative features (no, I don't believe in The Pure Thing, at least not in the haskell way, maybe DDC gets closer to it), and not having a large culture built around it.
<olegfink> (thought I wasn't asked for a opinion)
<olegfink> s/(though)t/\1/
<flux> olegfink, you can set gc parameters so that it won't collect
<flux> I think overhead is one related concept
<alexyk_> olegfink: opinions are always welcome
jeremiah has joined #ocaml
<olegfink> well, even with heap_overhead = (1<<31) - 1 it still performs a few minor and major collections
<flux> well, minor_heap_size?
<olegfink> didn't seem to have much influence
<olegfink> if there was a way to just turn it off...
<paul424> so any solution to my problem , anyone ?
<alexyk_> for one, I love the ocaml compilation speed; GHC 6.10.1 still crawls
<flux> olegfink, do bumping all the relevant values to their maximums doesn't help?
<flux> s/do/so/
<olegfink> okay, I'll try setting all them
<Yoric[DT]> paul424: I don't quite see a problem.
<Yoric[DT]> paul424: plus I've given you one solution already.
jeremiah has quit [Read error: 104 (Connection reset by peer)]
* Yoric[DT] returns to his crawl.
<paul424> yes but I had to install it
<olegfink> whoops, (1 lsl 31) - 1 is lies.
<Yoric[DT]> paul424: in that case do [module Foo = struct open Bar (*here, everything you want to test*) end] .
<flux> olegfink, max_int?
<olegfink> yeah, rereading Pervasives is what made me check what 1 lsl 31 is.
<paul424> Yoric[DT]: ok but what should I use for Foo and for Bar
<paul424> Yoric[DT]: module -- I got syntax error
<olegfink> flux: strange, arbitrary 320M for minor_heap_size gives 20 minor collections versus 39141 for max_int. Some overflow?
<flux> perhaps
<flux> or maybe there are other deciding factors than just that
<flux> olegfink, what are you trying out?
<olegfink> (by the way, speaking of ocaml features, ghc doesn't have runtime GC control)
<flux> I mean, you will run out of memory eventually if you don't do any GC?-)
<olegfink> flux: heh, qsort
<flux> olegfink, so your idea is to bump the parameters high for the duration of the qsort?
<flux> btw, it is my understanding the traditional qsort would be in place; that is, it wouldn't allocate?
orbitz has left #ocaml []
<olegfink> for some reason it is much slower than java (ghc is 2 times slower than java, but I don't have ghc here to test, and my code is an order of magnitude slower than java)
<olegfink> flux: depends on what you call 'traditional'
<flux> olegfink, well, do you sort an array or a list
<flux> ?
<olegfink> list, using 'standard' list comprehension qsort.
<flux> olegfink, and java also sorts a list?
<olegfink> (and java, of course, uses in-place qsort)
<flux> well, there's a BIG difference right there..
<olegfink> I'm not cm that list qsort is slower than in-place qsort
<olegfink> s/cm/complaining/
<paul424> how about let module ?
<olegfink> I it just looks to be too slow (slower than ghc, for one)
apples` has joined #ocaml
<flux> olegfink, you've got the algorithms for both java and haskell, so you can easily confirm they run the ~same algorithm?
<olegfink> haskell runs the same qsort as ocaml
<flux> olegfink, you might just convert the list to an array, sort the array in-place, the convert the array back to list?-)
<olegfink> okay, I'd probably better try getting ghc here to test
<olegfink> flux: the (long missed) point in all that was to show that functional qsort may be comparable to the in-place one, given delicate GC work.
Stefan_vK has joined #ocaml
<flux> well, I have a feeling that won't happen :)
<flux> for one, the array solution has half the amount of data two shovel around..
paul424 has quit ["ChatZilla 0.9.83 [Firefox 3.0.4/2008102920]"]
jeremiah has joined #ocaml
Stefan_vK1 has quit [Read error: 110 (Connection timed out)]
asabil has quit ["Ex-Chat"]
itewsh has joined #ocaml
snhmib has joined #ocaml
Kerris7 has quit []
pumpkin_ has joined #ocaml
vpalle has joined #ocaml
vpalle_ has joined #ocaml
vpalle_ has quit [Read error: 131 (Connection reset by peer)]
<olegfink> is there anything pascal-related for ocaml?
<olegfink> ocaml to pascal compiler would be ideal :-), but at least a pascal parser would do.
<Camarade_Tux> not that I know
<Camarade_Tux> but you can translate pascal to C and then parse the C code :D
<olegfink> actually, for reasons beyond my understanding we have a pascal course at the uni, so the idea is to complete all the assignments without learning pascal...
<olegfink> first option was to inline assembly, but that doesn't look good.
ikaros_ is now known as ikaros
<alexyk_> I'm wrapping C++ in ocaml, should I exile myself to a C++ channel (which one?) or is there anybody here who knows C++ well, and perhaps others won't scream for a few lines? :)
vpalle has quit [Connection timed out]
<Optikal_> WHat other C++ channel is there than #C++?
<olegfink> anyway it'd be better than me asking for a magic ocaml-to-pascal compiler, alexyk_
<alexyk_> ok let me try there first :)
<Camarade_Tux> Optikal_, at least #webkit ;)
<alexyk_> so if you have F#, can you have a channel called #F# ?
<Optikal_> yes, but they use #fsharp
<alexyk_> nice
<Optikal_> no #fpound though
<alexyk_> well #fsharp channel is all like, why can't I click oh a list and make it zoom its tail
<alexyk_> or, why can't I inherit an object from a loop interface
<alexyk_> with Silverlight bindings
<Optikal_> silverlight is awesomez@!#
ygrek_ has quit [Remote closed the connection]
<alexyk_> you can drop guis on it like clamz
<Optikal_> it's vector based
<Optikal_> so your app can be displayed in Times Square
<Optikal_> or on a wrist watch
<Camarade_Tux> it would rather be ##fsharp due to freenode's naming policies
<alexyk_> it runs on your computer, not in a browser, right?
<Camarade_Tux> (unless microsoft creates the channell)
<Optikal_> my browser runs on a computer
<alexyk_> my security friends tell me it's a horrible idea
<Optikal_> What is?
<alexyk_> silverlight
<Optikal_> what part of it?
<alexyk_> activeX all over again
ikaros_ has joined #ocaml
<olegfink> building useless abstraction layers is always a bad idea
ikaros has quit [Read error: 104 (Connection reset by peer)]
<alexyk_> or directX, or somethin'
ikaros_ is now known as ikaros
<Optikal_> DirectX? Nothin' wrong with DirectX
<alexyk_> optikal: well I defenestrated in 1998...
<Optikal_> You threw yourself out a window?
<alexyk_> I have a vmware with F# though
<alexyk_> optikal: my laptop :)
<mbishop> neat, 3.11 is finally out
<Optikal_> and Python 3000
<alexyk_> should I recompile all my godi now?
<alexyk_> mbishop: not windows 3.11 I hope :)
<Optikal_> Isn't Godi patrick swayze's name in Point Break?
<alexyk_> optikal: dunno
<Optikal_> Ah, no. Bodhi =)
* mbishop is secretly Johnny Unitas
<Optikal_> Johnny Utah
<Optikal_> !
<mbishop> him too
<mbishop> :P
* alexyk_ studies ostringstream and assigns things with x = y.z();
<jonafan> do you guys think multicore is going to work?
Kerris7 has joined #ocaml
<Optikal_> multicore what?
<jonafan> multicore
<Optikal_> You mean in general?
<jonafan> programming
<Optikal_> It already does work
<jonafan> i'm highly skeptical that programs are going to use multiple cores effectively
<Optikal_> Not all classes of problems scale well
<Optikal_> but they have known that forever
<jonafan> some things obviously work well, but the majority of programs and algorithms seem to be pretty inherently sequential to me
<jonafan> STM in the worst case seems to give you the power of x cores to run at 1 core's speed
<Optikal_> Maybe they might do something crazy where they have thousands of nodes that do basic operations and you recompile your hardware on the fly
<jonafan> functional programming makes concurrency easy, but it also shows you why a lot of things just don't work that way
<jonafan> maybe, but that won't look much like computing as we know it, will it?
<jonafan> at least we can run multiple programs at higher speeds
* alexyk_ man it's brutal in #C++
<jonafan> in what way?
<alexyk_> people venting terrible frustrations of herding pointers all day
<jonafan> haha
<jonafan> some day, they will discover ocaml
<jonafan> when they are ready
<alexyk_> in wrapping C, is CAMLreturn0; the same as CAMLreturn (Val_unit);?
olgen has joined #ocaml
Snark has quit [Read error: 113 (No route to host)]
sporkmonger has quit []
Kerris7_ has joined #ocaml
Kerris7 has quit [Read error: 54 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
ikaros has quit [".quit"]
asabil has joined #ocaml
CoryDambach has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
itewsh has quit ["KTHXBYE"]
<alexyk_> how do you return a C string into OCaml? it's not enough to just CAMLreturn(caml_copy_string(str.c_str()));
<alexyk_> it complains, error: ‘caml__frame’ was not declared in this scope
<alexyk_> should I allocate it first and copy then?
<rwmjones> alexyk_, are you missing the corresponding CAMLparamX at the top of the function?
<rwmjones> alexyk_, and in answer to your other question, CAMLreturn0 is _not_ the same as CAMLreturn (Val_unit).
<rwmjones> CAMLreturn (Val_unit) returns unit () from the function
<alexyk_> rwmjones: should I declare the return as a param then, too?
<rwmjones> CAMLreturn0 is very rarely used and should only be used when the function never returns or only throws exceptions
<rwmjones> alexyk_, no ... use CAMLlocalX macros to declare any local parameters, including any variable holding the return value
<alexyk_> rwmjones: so I return a string; in C, I have to say something like
<alexyk_> extern "C" value myfun(value param) ...
<alexyk_> I do CAMLparamN(oaram), works fine
<rwmjones> CAMLparam1 ?
<alexyk_> yep... so I need to count with the returned one?
<rwmjones> I don't understand
<alexyk_> I mean, it takes one param and returns a string; so I need to declare them all in CAMLparam2(?,param) ? I don't have the name for the return string here?
<rwmjones> well you can only put values into CAMLparamX and CAMLlocalX statements ... those are the only things that the garbage collector cares about
<rwmjones> BTW, if you're familiar with C/C++ then you just be better off reading the macros themselves
<alexyk_> so if I have a function of one pram returning one value, do I have to declare CAMLparam2?
<rwmjones> only use CAMLparamX for the parameters, so if there's one parameter, use CAMLparam1 (param)
<rwmjones> then for any local variables, use CAMLlocalX
<rwmjones> that is to say, for any local variables which are values
<rwmjones> any other local variables don't matter
<alexyk_> rwmjones: if I return a value, which will be a string, do I have to declare an intermediate result for it via CAMLlocal, allocate, and return that?
<alexyk_> I tried to do it all at once with CAMLreturn(caml_copy_string(cstr)) but it didn't compile
<rwmjones> alexyk_, in that particular case it should work, but in general case that can fail because of a subtle interaction with memory allocation and the GC
Optikal__ has joined #ocaml
<rwmjones> what was the error?
<rwmjones> alexyk_, this is the error about caml__frame missing?
<alexyk_> yep
<rwmjones> alexyk_, I've only seen that error when you miss the corresponding call to CAMLparamX at the top of the function. Seriously though, read the macros, they're not hard to understand at all.
<alexyk_> ok...
<alexyk_> rwmjones: ah, it's the CAMLparam, you're right
olgen has quit []
alexyk_ has quit []
Camarade_Tux has quit ["Leaving"]
Kerris7_ has quit []
alexyk has joined #ocaml
netx has left #ocaml []
asabil has quit ["Ex-Chat"]
Snark has joined #ocaml
Snark has quit [Read error: 104 (Connection reset by peer)]
sporkmonger has joined #ocaml