gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
<thelema> == is different from =, of course.
tufisi has joined #ocaml
tufisi has quit [Changing host]
tufisi has joined #ocaml
dsheets1 has quit [Remote host closed the connection]
dsheets has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
ftrvxmtrx has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Read error: Connection reset by peer]
iago has quit [Quit: Leaving]
KDr2 has joined #ocaml
Modius has joined #ocaml
<Modius> What's the best Emacs/flymakey thing for OCaml?
<thelema> flymakey? typerex supports flymake, but I've not figured out how to set it up
KDr2 has quit [Remote host closed the connection]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
cdidd has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
andreypopp has joined #ocaml
ftrvxmtrx has joined #ocaml
dsheets has quit [Quit: Leaving.]
lihaitao has joined #ocaml
kerneis has joined #ocaml
kerneis has left #ocaml []
pango is now known as pangoafk
ftrvxmtrx has quit [Quit: Leaving]
<f[x]> > is a GC root never moved?
<f[x]> thelema, adrien: of course values registered as roots can be moved by GC, the only difference is that the pointer registered as root is updated to reflect the new value address
lihaitao has quit [Remote host closed the connection]
abdallah has joined #ocaml
<abdallah> how come Hashtbl.hash is not consistent over functional values which are (==) ?
<abdallah> never mind the functional values were not (==)...
<abdallah> is it possible that the address two equal functional values differ?
<abdallah> For instance I do let f = ..., then later let l1 = [f], then even later let l2 = [f]. Is it guaranteed that List.hd l1 == List.hd l2?
<abdallah> (f being a function)
ankit9 has joined #ocaml
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mal`` has joined #ocaml
andreypopp has quit [Quit: Quit]
ftrvxmtrx has joined #ocaml
thomasga has joined #ocaml
silver has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
thomasga has quit [Ping timeout: 244 seconds]
djcoin has joined #ocaml
thomasga has joined #ocaml
everyonemines has joined #ocaml
<everyonemines> hey, is there k-means done in ocaml somewhere
<everyonemines> or do i need to port a c version
lihaitao has joined #ocaml
thomasga has quit [Ping timeout: 244 seconds]
<adrien> everyonemines: shootout.alioth.debian.org has one :-)
<adrien> it should be pretty fast (but maybe hard to read)
<everyonemines> i know that site!
<everyonemines> google, you have failed me
<everyonemines> they actually have all submitted versions
<everyonemines> :-)
<everyonemines> i don't see k-means on there...
thomasga has joined #ocaml
<adrien> arf, maybe I mixed up the names with n-body and k-nucleotide =/
<adrien> NaCl: you mentionned you felt like implementing k-means in ocaml; have you done it?
lihaitao has quit [Quit: Ex-Chat]
lihaitao has joined #ocaml
Snark has joined #ocaml
avsm has joined #ocaml
ztfw has joined #ocaml
gildor has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 272 seconds]
gildor has joined #ocaml
thomasga has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
othiym23 has quit [Ping timeout: 246 seconds]
othiym23 has joined #ocaml
iratsu has joined #ocaml
probst has joined #ocaml
Tobu has joined #ocaml
eikke has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
Submarine has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
thomasga has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
thomasga has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
_andre has joined #ocaml
Kakadu has joined #ocaml
<Kakadu> hi all
<Kakadu> for this META http://paste.in.ua/4151/ is execute ocamlfind install test1 a.cmo b.cmo c.cmo META
<Kakadu> why ocamlfind doesn't know about both subpackages?
<Kakadu> sorry, my stupid mistake
thomasga has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
<adrien> license question: when statically linking against an LGPL library *without* the ocaml exception, isn't the license of the library pretty much like GPL?
Tobu has joined #ocaml
thomasga has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
xlq has joined #ocaml
oriba has joined #ocaml
<mfp> adrien: you're theoretically compliant as long as you distribute the objects and allow the user to link himself
<adrien> mfp: ok; but that's definitely not the easiest thing to manage
<mfp> another workaround would be dynlink
avsm has joined #ocaml
<mfp> adrien: reading the fine print, there's another option: you can just accompany the work with a written offer to provide the object code, so at the very least you're not forced to distribute the .o, .cmx and friends with the product
<adrien> I'm not looking for workarounds: I was talking with Maxence Guesdon about that because he has some LGPL-licensed things and I think he thought LGPL was fine
thomasga has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
<NaCl> adrien: no
<thelema> f[x]: ah, thanks
<djcoin> I have a question for french folks: in which masters/university may you be taught functional programming (whether OCaml, Erlang, Haskell, etc.) ? I ask myself this questions a few times because it seems there are relly few.
<djcoin> I mean, not a few courses, but rather as the main paradigm/tool used throughout the study
<djcoin> Like say, hm, Java :)
<_andre> i have a trivial ocamlnet program: let () = Unixqueue.run (Unixqueue.create_unix_event_system ()). when i compile it with ocaml 3.12.1 the binary is linked to libpthread, which doesn't happen on 3.12.0. does anyone know what could be the reason?
<thelema> _andre: how were your two ocaml installations created?
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<_andre> thelema: 3.12.0 from the ubuntu package, 3.12.1 tested with an ocamlbrew install and from a newer ubuntu package
<_andre> compiling with ocamlfind ocamlopt -o test -package equeue test.ml -linkpkg
<thelema> _andre: I guess that somehow the 3.12.0 package wasn't compiled with native threads support.
<thelema> There's nothing in the changelog that immediately suggests a difference in ocaml's use of pthread
<_andre> well ldd on /usr/bin/ocamlc.opt shows libpthread.so
Tobu has quit [Ping timeout: 272 seconds]
Znudzon_ has joined #ocaml
<thelema> same here on my ocamlc.opt, but not on my ocamlopt.opt
snearch has joined #ocaml
<_andre> yeah
<_andre> but 3.12.1 is like that too
<_andre> no pthreads on ocamlopt.opt
<thelema> OCaml supports two threading backends, its own and a system thread modal (pthreads on unix)
thomasga has quit [Ping timeout: 265 seconds]
thomasga has joined #ocaml
<thelema> I guess if a program is compiled with threads, and it's using the system threads, it adds a pthreads dep
<_andre> in 3.12.1 it adds netsys_oothr.cmxa when compiling
<_andre> maybe it's actually the way ocamlnet was compiled...
<thelema> hmm, actually, I realize that there's no -thread or package threads in your command line... hmmm...
<thelema> so it shouldn't be compiled with threads
<thelema> can you compile with -verbose so ocamlfind prints the ocamlopt command line it uses?
<_andre> that's how i found out about netsys_oothr.cmxa. let me paste the output somewhere
snearch has quit [Quit: Verlassend]
<_andre> the 3.12.1 install uses ocamlnet 3.x while 3.12.0 uses 2.x so this could be it
<thelema> could be - apparently ocamlnet 3.x is linked with pthread, so pthread gets linked into the final executable even though ocamlopt isn't compiling with threads
mononofu has joined #ocaml
Tobu has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
<adrien> thomasga: hi, how should I send a "pull request" for ocaml-lang.org.git? I don't use github and I've put my changes at http://cgit.notk.org/adrien/ocaml-lang.org.git/log/?h=adrien/small
fraggle_laptop has joined #ocaml
<thomasga> adrien: you can send me the patches if you want
<thomasga> or I can simply get them from your repo
<thomasga> I'll look at that, thx!
<adrien> thanks for the website :-)
<adrien> it's probably better if you get them from the repo as I'll probably do other changes in the future
<thomasga> sure, I've added your repo as a remote of fine, so would be easy to merge future changes
<thomasga> "of mine"
<adrien> :-)
<mononofu> So I just did "sudo aptitude install libplplot-ocaml" but "open Plplot" still returns "Error: Unbound module Plplot"
<mononofu> what am I missing?
<mononofu> I'm on ubuntu 12.04
<_andre> libplplot-ocaml-dev
<thomasga> adrien: your changes are online, thx!
<mononofu> _andre: that package doesn't exist, I'll try libplplot-dev
<adrien> thanks! :-)
<thomasga> (if you make some new changes, please ping me here or by email to be sure that I don't miss it)
<mononofu> hm, libplplot-dev didn't help either :S
<adrien> sure
Submarine has quit [Quit: Leaving]
<_andre> mononofu: did you load the module before trying to open it?
<mononofu> _andre: I just started using ocaml a few hours ago - how do I load a module?
<_andre> easiest way is to type '#use "topfind";;' and then '#require "plplot";;' on the toplevel
<_andre> this requires libfindlib-ocaml-dev to be installed
<thelema> _andre is right assuming that the plplot module is setup for findlib - the lack of a -dev module indicates nonstandard packaging
<mononofu> nice, this works
<_andre> and you can put the '#use "topfind";;' line in a ~/.ocamlinit file to avoid typing it every time
<mononofu> so I need to put the '#require "plplot";;' directive in my .ml file when compiling?
<thelema> mononofu: no, that won't work, sadly
<thelema> mononofu: only in the toplevel does that work
<thelema> mononofu: for compiling, use ocamlfind ocamlc -package plplot <rest of compile command>
<thelema> mononofu: or use ocamlbuild with the tag package(plplot) and execute as ocamlbuild -use-ocamlfind myproj.native
<mononofu> thank you, now it compiles :D
<mononofu> though it fails when linking with: The external function `camlidl_plplot_core_c_pladv' is not available
<thelema> -linkpkg
<thelema> sorry
<thelema> sorry that the ocaml build system is junky
<mononofu> thank you very much, now it works :D
xlq has left #ocaml []
Znudzon_ has quit [Ping timeout: 246 seconds]
<hcarty> mononofu: If you have any OCaml/PLplot usage questions or suggestions for improvements please let me know. I don't have a lot of time for it these days, but I'll do what I can.
mcstar has joined #ocaml
mcstar has left #ocaml []
ankit9 has quit [Read error: Connection reset by peer]
iago has joined #ocaml
lihaitao has quit [Quit: home]
spanner has joined #ocaml
thomasga has quit [Ping timeout: 272 seconds]
ftrvxmtrx has quit [Quit: Leaving]
thomasga has joined #ocaml
<mononofu> is it possible to refer to a record from itself? something like a this-pointer in c++ ?
<thelema> mononofu: let rec foo = {next: foo} ?
<thelema> type 'a r = {data: 'a; next: 'a r}
<thelema> let rec r1 = {data=3; next=r1}
<thelema> or
<thelema> type 'a r = {data: 'a; mutable next: 'a r option}
<mononofu> but when I do {r1 with data = 4}, how do I update next?
<thelema> let r2 = {data=3; next = None}; r2.next <- Some r2;
<mononofu> without mutable
<thelema> without mutable, can't update.
<thelema> gotta go, back in a couple hours
<mononofu> I'm trying to write a dictonary with records in a pure style
<mononofu> np
<mononofu> it's an exercise in Jason Hickey's book, so I assume it's possible
Juzor has joined #ocaml
skchrko has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
<adrien> mononofu: "this" <- use objects maybe
<adrien> unless you do as thelema first pointed out; it depends on what you can do and what you want to do
<adrien> but I don't understand your need for that for a dictionary
silver has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
mononofu has quit [Quit: Leaving]
fraggle_laptop has quit [Remote host closed the connection]
pangoafk is now known as pango
<mrvn> thelema: why not let rec r2 = { r1 with next = r2; }?
ftrvxmtrx has joined #ocaml
thomasga has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
andreypopp has joined #ocaml
<thelema> mrvn: yes, that looks like it'd work
Anarchos has joined #ocaml
eikke has joined #ocaml
<Drakken> Where's a good place to ask about programming languages in general? (mostly functional) The only place I know about is comp.lang.functional.
<thelema> LtU?
<Drakken> maybe so
pango has quit [Ping timeout: 252 seconds]
<jonafan> did you guys see that php thing?
<jonafan> if you like ocaml, you're probably a language nerd and will enjoy reading about the many mistakes of php
<thelema> the fractal mistakes article?
<jonafan> yes
* pippijn is a language nerd
* pippijn read only half of that article
<thelema> I stopped reading part-way in; not too interesting to me
<jonafan> i've successfully avoided actually using php so i was blown away by a lot of this stuff
<pippijn> thelema: dito
<thelema> It was amusing to start, but I'm not that interested in knowing all the gory details - it's nice that it's there and I can point people who (think they) like PHP to it, I guess.
pango has joined #ocaml
<pippijn> doesn't really matter.. I know people who write PHP for a living and they are good at it. they know the pitfalls and they are doing fine
<pippijn> I wouldn't want to change positions with them, but they are quite happy doing it
<thelema> I agree with one point made somewhere in the discussion - even though one can write COBOL in any language, one can solve people's problems in any language too.
<adrien> Drakken: for LtU, fasten your seat belt first ;-)
<Drakken> adrien :)
thomasga has quit [Quit: Leaving.]
<mrvn> and the author doesn't quite know what fractal means
<thelema> mrvn: "broken/complex at many levels" is kind-of related to fractals
<mrvn> thelema: not any language, most problems need a turing complete one and some peoples prolems can't be solved.
<mrvn> thelema: no, that is just complex. Where is the selfsimilarity?
<thelema> mrvn: similar in brokenness
<thelema> not really similar in structure, you're right.
<thelema> and I agree that my statement is not strictly correct even within the class of turing complete programming languages, see brainf*ck
<mrvn> lets define the fractal dimension as ugly things per screen full of code. That doesn't realy work as you zoom (change font size). At least only for a very small bit.
<mrvn> thelema: well, you can solve problems in brainfuck, but would you want to? :)
<thelema> move the metaphor to examining the language itself...
<thelema> PHP source code isn't broken, the language itself is broken
<thelema> and it's not just broken in a few places, but in many places at different levels of abstraction
<mrvn> obviously. :)
<mrvn> I'm missing the part where it is broken the same way on different levels => self similarity
<mrvn> and thats just one aspect of fractals. For me php ist just a clusterfuck.
eikke has quit [Ping timeout: 250 seconds]
<thelema> fair enough.
<mrvn> fractals are supposed to be beautifull. :))
thomasga has joined #ocaml
<mrvn> which reminds me that I still need a shaded renderer for (sparse) height fields in ocaml.
snearch has joined #ocaml
<mrvn> something that includes soft shadows.
Flatlander has joined #ocaml
<pippijn> mrvn: those are cool
<pippijn> I like them
<pippijn> snowy mountains
mfp has quit [Read error: Connection reset by peer]
Snark has quit [Quit: Quitte]
eikke has joined #ocaml
<Drakken> The self-similarity of PHP is that it has poorly designed systems inside larger poorly designed systems.
emmanuelux has joined #ocaml
<mrvn> The difference between php and brainfuck: php is broken design, brainfuck is brocken BY design. :)
mfp has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
<ousado> where's the php thing?
<ousado> ah nice
<flux> mrvn, any chance you could generate STL models? I have a 3d printer and been thinking printing fractals would be nice :)
<ousado> thanks
<flux> although I suppose meshlab could generate those given point clouds
<flux> (directly generating STL from fractals might be a bit challenging)
<flux> (stl is a 3d triangle data format)
Anarchos has quit [Ping timeout: 252 seconds]
_andre has quit [Quit: leaving]
<pippijn> mrvn: why do you think brainfuck is broken?
<pippijn> mrvn: brainfuck is genius design
<adrien> ssh root@pippijn
<adrien> /etc/rc.d/rc.humord restart
<adrien> ^D
<adrien> done
<adrien> :P
<pippijn> heh :)
<adrien> I think that mrvn was simply saying that BF's goal was to _look_ broken and still be properly "designed"
<pippijn> ah
<pippijn> brainfuck is the result of computer science genius
<adrien> URISC ;-)
thomasga has quit [Quit: Leaving.]
<pippijn> it's not original design, but the turing machine is genius
Flatlander has quit [Quit: Leaving]
<adrien> URISC is pretty nice in its minimalism too; that's probably all it has for it
<pippijn> I've seen a stack machine built on top of brainfuck and then object orientation built on that
<thelema> ick
<pippijn> that's how you recognise if someone really understood turing machines :)
<pippijn> if they can write things like that
<adrien> you also recognize crazy people =)
<pippijn> an additional bonus ;)
ulfdoz has quit [Read error: Operation timed out]
Juzor has quit [Remote host closed the connection]
Juzor has joined #ocaml
Zedrikov has joined #ocaml
skchrko has quit [Quit: ChatZilla 0.9.88.2 [Firefox 11.0/20120401163544]]
cdidd has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
snearch has quit [Quit: Verlassend]
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
Submarine has quit [Ping timeout: 248 seconds]
brontosaurus has joined #ocaml
Anarchos has joined #ocaml
_habnabit has joined #ocaml
Zedrikov is now known as Dakkon
iratsu has quit [Read error: Connection reset by peer]
brontosaurus has quit [Quit: Leaving]
Kakadu has quit [Quit: Konversation terminated!]
andreypopp has quit [Quit: Computer has gone to sleep.]
eikke has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
iago has quit [Read error: Operation timed out]
jave has quit [Ping timeout: 252 seconds]
jave has joined #ocaml
lamawithonel has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Dakkon has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
<mrvn> flux: generating triangles from a height field should be simple. You can even make it adaptive so it splits triangles that are too scewed into smaller triangles by computing midpoints.
Zedrikov has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
vext01 has joined #ocaml