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
Associat0r has quit [Quit: Associat0r]
thelema has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
smerz has quit [Remote host closed the connection]
avsm1 has quit [Quit: Leaving.]
Modius has joined #ocaml
avsm has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
ftrvxmtrx_ has quit [Ping timeout: 260 seconds]
ztfw has quit [Read error: Connection reset by peer]
arubin has quit [Quit: arubin]
<flux> adrien, Event would be nice, but supporting Unix.fd-events and timeout events seems so complicted/threadful with it that I've ended up not using it
<adrien> ok, good to know
<flux> but its interface is the best :)
<adrien> also, I've been trying to define a class type "tab_citizen" with two methods and then write a .mli mentionning a function taking (unit -> tab_citizen) as argument; but when I pass a function returning an object which has the right two methods but also others, it complains
<adrien> if I remove the other methods, it works
<adrien> I thought that would work without using :> ; am I missing something?
<adrien> flux: have you ever used react?
<flux> nope. played with it a bit quite some time ago.
<flux> didn't quite figure out how to do complicated stuff with it :)
<adrien> oh, it's actually easy to do complicated stuff ;-)
<flux> would a reactive network server module make sense?
<adrien> I don't think you can really play: you'll probably need a full actual task to do
<adrien> it could make sense, yes
<adrien> what I'm doing with lablgtk and react right now is that I create a state and manipulate it in a functional way (copy instead of modify)
<adrien> if that's how you want to do your network servor, it makes sense
ttamttam has joined #ocaml
penryu has quit [Ping timeout: 252 seconds]
penryu has joined #ocaml
penryu has quit [Quit: WeeChat 0.3.5]
ttamttam has quit [Remote host closed the connection]
dnolen has quit [Quit: dnolen]
avsm has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
bobry1 has joined #ocaml
explodus has quit [Ping timeout: 260 seconds]
explodus has joined #ocaml
<flux> ooh, the new ocsigen site is pretty
ikaros has joined #ocaml
bobry1 has quit [Ping timeout: 260 seconds]
ankit9 has joined #ocaml
ankit9 has quit [Client Quit]
bobry1 has joined #ocaml
ankit9 has joined #ocaml
as has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
asmanur_ has joined #ocaml
asmanur has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 240 seconds]
goncalog has joined #ocaml
goncalog is now known as goncalo
lopex has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ttamttam has joined #ocaml
ikaros has joined #ocaml
<ttamttam> test.
ttamttam has left #ocaml []
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ttamttam has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 252 seconds]
everyonemines has joined #ocaml
<everyonemines> When might inria people be around here?
ttamttam has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
ttamttam has joined #ocaml
<flux> (..never?)
_andre has joined #ocaml
<everyonemines> I see.
<everyonemines> Understandable.
<flux> yes. irc is a time sink :-)
everyonemines has quit [Quit: Leaving.]
<zorun> bobry1: ping
<zorun> bobI get a missing dlllwt-unix.so when running utop
as has quit [Ping timeout: 260 seconds]
<zorun> I just installed everything cleanly from the AUR)
as has joined #ocaml
<zorun> bobry1: maybe a missing dep? or something that doesn't get installed ?
<zorun> bobry1: utop apprently doesn't want to run without this dlllwt-unix.so
<bobry1> zorun: yeah, i have the same -- even though #require "lwt.unix" works just fine
ulfdoz has joined #ocaml
<bobry1> and dllwtunix is there
<bobry1> $ sudo pacman -Ql ocaml-lwt | grep so
<bobry1> ...
<bobry1> ocaml-lwt /usr/lib/ocaml/lwt/dlllwt-unix.so
ulfdoz has quit [Ping timeout: 260 seconds]
<zorun> err
<zorun> maybe a hard-coded site-lib path?
<bobry1> hardcoded? where?
<zorun> in utop?
<zorun> this is weird, I successfully used utop a few weeks ago
as has quit [Read error: Connection reset by peer]
as has joined #ocaml
ag4ve has quit [Ping timeout: 258 seconds]
<diml> bobry1, zorun: does your /usr/lib/ocaml/ld.conf contains /usr/lib/ocaml/lwt ?
bobry1 has quit [Remote host closed the connection]
avsm has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
as has quit [Quit: leaving]
eb4890 has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
<f[x]> adrien, actually lwt is using Event :)
<adrien> ah :-)
ag4ve has joined #ocaml
<thelema> adrien: you probably need :>
<thelema> adrien: oops, was scrolled up in history -- late answer
<adrien> I would like to avoid :>
<adrien> I know that sometimes you don't need it, with < foo; bar; .. > but I can't get that effect
<thelema> adrien: If you can build :> into helper functions, that'll hide it.
<adrien> true
<adrien> that would already be nicer
Anarchos has joined #ocaml
DimitryKakadu has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
<adrien> ok, contrary to what I thought, subtyping is never implicit, but now I wish I could write the same as < coerce : GObj.widget; label : Label.label; ... >, but in two steps (in order to make the function declaration lighter to read)
<adrien> (and not cram all parameters in a few lines)
lopex has quit []
lopex has joined #ocaml
metasyntax|work has joined #ocaml
ikaros has joined #ocaml
lopex has quit []
Modius has quit [Read error: Connection reset by peer]
lopex has joined #ocaml
Reaganomicon has joined #ocaml
emmanuelux has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
goncalo has quit [Ping timeout: 260 seconds]
jonathandav has quit [Ping timeout: 260 seconds]
penryu has joined #ocaml
joewilliams_away is now known as joewilliams
ftrvxmtrx has joined #ocaml
mdelaney has joined #ocaml
yezariaely has joined #ocaml
ttamttam has left #ocaml []
yezariaely has left #ocaml []
dcolish has quit [Ping timeout: 240 seconds]
menace has joined #ocaml
<menace> hi, i want to create binary structures with ocaml, how do i do that?
<thelema> menace: like binary tree or like reading in a non-text file?
<menace> like reading/write a non-text file
<menace> or incoming data over a socket
<thelema> look up ocaml-bitstring
<menace> ah, thx
ttamttam has joined #ocaml
ttamttam has left #ocaml []
<adrien> menace: there are also a number of libraries for existing binary protocols if you want to use already existing ones
mdelaney has quit [Quit: mdelaney]
ztfw has joined #ocaml
dcolish has joined #ocaml
<bobry> zorun: okay, seems like it was an ld.conf issue -- i'll update the PKGBUILD in a minute
<zorun> oh, cool
<zorun> why was it working before?
<bobry> no idea, really :)
<zorun> :)
<zorun> hmm, are you sure it's an ld.conf issue?
<bobry> yup, utop worked once i've added /usr/lib/ocaml/lwt to ld.conf
<zorun> I see only /usr/lib/ocaml and /usr/lib/ocaml/stublibs
<zorun> oh
<bobry> you need to remove ocaml-lwt and install it manually
<bobry> since ld.conf is altered in a post_install hook
<bobry> which isn't executed for upgraded / reinstalled packages
<bobry> as far as i know, at least :)
<zorun> you could still use a post_upgrade hook that calls the post_install one ;)
<bobry> well, that makes sense actually :)
<zorun> oh, what's the " export OCAMLFIND_LDCONF="ignore"" in the PKGBUILD for?
<menace> adrien: i would be interested in dns-libs... but i would write them myself, too ^^
<bobry> zorun: otherwise ocamlfind prints a warning that there's no ldconf in fakeroot
<metasyntax|work> zorun, bobry: more troubles with the ocaml-utop package?
<zorun> hey metasyntax|work :)
<zorun> bobry: I se
<zorun> metasyntax|work: actually, it's lwt-related
<metasyntax|work> Ah, OK.
milosn has joined #ocaml
<bobry> zorun: should work now
<metasyntax|work> Hm, I think with OCAMLFIND_LDCONF='ignore' you don't get the .so files in stublibs.
<zorun> bobry: oh, and there was a m that wasn't supposed to be there, too :)
<bobry> yup, removed it as well :)
<zorun> bobry: actually, maybe this was the reason of the failure ;)
<zorun> I mean, metasyntax|work's remark
<metasyntax|work> It works fine without post_install hook if you don't set OCAMLFIND_LDCONF='ignore'.
<metasyntax|work> I've always just ignored that warning when packaging... though I'm not sure if that's the right thing to do or not. Seems to have worked so far. :-)
ttamttam has joined #ocaml
<zorun> oh, cool :-)
<bobry> metasyntax|work: how would pacman merge two ldconfs then?
<bobry> i mean you already have one in your /usr/lib and findlib (afaik) creates a new one in fakeroot, during install()
<zorun> bobry: that's the point, you don't need a ld.conf !
<bobry> hrm hrm, i need to check this
<zorun> bobry: I guess it just copies the .so to /stublibs
<zorun> which is already in the ld.conf
<metasyntax|work> zorun: Correct.
<thelema> umm, if the library being installed links with C code, you'll want that code linked in to build an executable
<bobry> cool
<zorun> and this is more robust, as you don't have to edit a file owned by another packag e;)
<thelema> the search path for these stub libraries is ocaml's ld.conf
<zorun> thelema: right
<zorun> the point is only to package things well ;)
<bobry> metasyntax|work: ocamlfind tries to edit my systemwide ld.conf if i remove OCAMLFIND_LDCONF="ignore". are you sure it works for you?
<adrien> menace: heheh :-)
<metasyntax|work> bobry: I've been using this PKGBUILD without problems - https://bitbucket.org/taylor_venable/aur/src/tip/ocaml-lwt/PKGBUILD
<metasyntax|work> bobry: Sorry, you also must make the stublibs directory.
<metasyntax|work> Then it won't try to do it in your /usr/lib/ocaml directory.
<bobry> metasyntax|work: thanks, it works! finally :)
<zorun> \o/
<metasyntax|work> \o/
<zorun> bobry: thanks for taking time :)
<bobry> np :)
<metasyntax|work> Dunno if that's the "right" way to do it or not, but it seems easier to me to add those files to stublibs/ than to modify ld.conf in the install/uninstall hooks.
<zorun> yup
<zorun> and more robust
<metasyntax|work> Hopefully Arch will become quite a nice Linux environment to use for OCaml programming, it seems there is quite a lot of activity there lately. :-)
<zorun> :)
<bobry> would be nice to have oasis as part of Arch OCaml Packaging Guideline
zorun has quit [Read error: Connection reset by peer]
zorun has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ulfdoz has joined #ocaml
Tianon has quit [Quit: brb]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
lopex has quit [Ping timeout: 260 seconds]
lopex has joined #ocaml
ttamttam has left #ocaml []
menace has left #ocaml []
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ikaros has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx_ has joined #ocaml
eb4890 has quit [Ping timeout: 258 seconds]
ftrvxmtrx has quit [Ping timeout: 252 seconds]
ftrvxmtrx_ has quit [Ping timeout: 240 seconds]
DimitryKakadu has quit [Quit: Konversation terminated!]
_andre has quit [Quit: leaving]
ztfw has quit [Remote host closed the connection]
Tianon has quit [Ping timeout: 260 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ikaros has quit [Quit: Ex-Chat]
Amorphous has quit [Ping timeout: 260 seconds]
Associat0r has quit [Quit: Associat0r]
metasyntax has joined #ocaml
Amorphous has joined #ocaml
foocraft has quit [Ping timeout: 240 seconds]
neeeebiw has joined #ocaml
foocraft has joined #ocaml
<neeeebiw> how do i get the arrow keys to work in the ocaml shell
<neeeebiw> so like, i don't have to just hit backspace if i make a type
<mfp> neeeebiw: you can use rlwrap
* penryu uses tuareg-mode for emacs
<neeeebiw> rlwrap it is. screw emac :P
<penryu> as you will
<neeeebiw> can you do ssh with emacs
<neeeebiw> or how does that work
<penryu> most likely, depending on what you want to do.
<penryu> don't get me wrong. I don't spin up emacs every time I want an ocaml repl. but as it's usually open, it's a matter of opening a new buffer.
<penryu> rlwrap is a much easier solution to do exactly what you want.
<neeeebiw> actually no
<neeeebiw> because the machine i am ssh'ed to won't let me install it
<neeeebiw> damn school computers
<penryu> ah. build from source? I did that on my univ account
<penryu> just watch quotas.
<neeeebiw> yeah i can't do that
<neeeebiw> this is all like, ad integradted and stuff
<neeeebiw> also, if i could i don't have the time
<neeeebiw> also i am terrible with computers
<penryu> if you don't already know emacs, that would be even more prohibitively time-consuming :)
<neeeebiw> i am so bad with computers, i someone made my ubuntu installation inoperable and I had to reinstall it
<neeeebiw> *somehow
<penryu> (not that it can't be done. I went from scratch buffers full of ":q :q :q" to productive in emacs in about a semester)
<neeeebiw> meh, i hate being a computer science major, so i have no incentive to learn emacs
<penryu> may I ask why you are a CS major if you hate it?
<neeeebiw> too late to change
<neeeebiw> i am 3 classes away from a degree
mfp has quit [Ping timeout: 260 seconds]
<neeeebiw> so it pointless to change now
<penryu> man. I'm a CS major by choice and I couldn't get ocaml in the curriculum if I bribed half the dept.
<neeeebiw> we have to make a compiler with it
<neeeebiw> you can take the class for me
<penryu> if I can get the credit, sure.
<neeeebiw> you don't get to do any functional programming?
<penryu> we have one course, "Programming Languages" that deals with a handfull of other langs in a couple other paradigms.
<penryu> the only languages the dept really takes seriously is C++ and some Java.
<neeeebiw> see i don't any language courses. they just epect us to learn as we go
<penryu> no, this is just a single course that acts as a survey of "other languages that exist in the world, just so you can tell companies in your interviews that you've actually seen a lisp and know what a closure is"
<penryu> all the 100-200 level courses are exclusively C++
everyonemines has joined #ocaml
<neeeebiw> for me it was, java, c++, mips, c, php, ocaml, and sql if you cound that as a language
Derander_ has quit [Read error: Operation timed out]
mfp has joined #ocaml
<neeeebiw> in that order
<penryu> ewww. php.
<everyonemines> mips assembly??
Derander has joined #ocaml
<neeeebiw> everyonemines: yes
<neeeebiw> penryu: i love php now that I use cakephp
<neeeebiw> love is a relative word though
<penryu> it offends me on a daily basis.
<everyonemines> well obviously you should be using ocsigen :-)
<neeeebiw> cakephp is nice though
zsparks has quit [Remote host closed the connection]
zsparks has joined #ocaml
<neeeebiw> benifits of ssh: I can program with no clothes on
<penryu> neeeebiw: you might have better luck with ledit; it's effectively rlwrap, but written in ocaml.
<penryu> and if you can't compile ocaml in an environment where you're asked to write ocaml programs...
<bitbckt> neeeebiw: utop is the latest of the readline-enabled REPLs.
<neeeebiw> yeah but do i have to install it on the macine in am sshing to?
<bitbckt> yes, if that's a deal breaker.
<penryu> ledit compiled from ocaml source to about 300-400KB. you could copy the binary alone to ~/bin/ and extend your $PATH
<penryu> bitbckt: link for utop?
<everyonemines> Does ocaml strip unused functions when compiling?
<bitbckt> I don't think so.
<neeeebiw> don't hvae permission to write to bin
<neeeebiw> i might as well just install the correct ocaml version on my machine
<everyonemines> Even so, binaries are a lot smaller than python. I guess I can't complain too much as if they're <1mb.
<neeeebiw> o wait, i can't
<neeeebiw> i hvae to compile ocaml 3.12 from source and it had errors on my x64 machine
<everyonemines> godi?
<penryu> neeeebiw: you can't write to your $HOME?
<neeeebiw> i can't write to ~/bin
<everyonemines> neeeebiw: was it sudo?
<neeeebiw> wait is it ~/bin or just /bin
<penryu> you most likely don't have write access to /bin; or probably much of anything except for your own $HOME
<neeeebiw> well the only way i can do my assignmet on my machine is to have ocaml version 3.12.1 otherwise their grading program wont compile
<neeeebiw> i tried to compile it from source for my machine and i didn't work
<everyonemines> What errors?
<neeeebiw> i would have to run it again, but i don't hvae time right now unfortuately
<bitbckt> everyonemines: you can enable warning 26 to warn on unused functions, btw.
<everyonemines> bitbckt: Unused stuff in libraries is a bigger issue than stuff in my code.
<everyonemines> bitbckt: But I don't need super-small executables so much, just curious.
<bitbckt> everyonemines: ok. well, no elimination.
<neeeebiw> is continuation passing style useful for anything
<bitbckt> haha
<neeeebiw> i assume you are laughing because its not?
<everyonemines> in ocaml?
<neeeebiw> yeah]
<bitbckt> You assume incorrectly.
<neeeebiw> damnit
<everyonemines> Well, passing functions is sort of like CPS...
<neeeebiw> like strict cps though
<everyonemines> and how would you do that in ocaml?
zsparks_ has joined #ocaml
zsparks is now known as zsporks
zsparks_ is now known as zsparks
<everyonemines> bitbckt: Is eliminating unused functions from libs harder to implement in a compiler than I was thinking.
<everyonemines> ?
zsporks has quit [Quit: leaving]
<bitbckt> Generally speaking, ocaml does only straightforward optimizations. Dead code analysis isn't really straightforward.
<bitbckt> It does some, but not much.
<everyonemines> straightforward optimization is pretty subjective :-) unrolling loops for example
<bitbckt> for instance, dead code elimination plays poorly with dynamic linking.
<bitbckt> there isn't an objective measure to apply here.
<everyonemines> So it's more difficult because of the 2 stage compilation process?
<everyonemines> hmm, I guess I thought of it as being similar to the type inference process
<bitbckt> it seems saner to me to avoid elimination, where binary size isn't a problem.
<bitbckt> that's what ocamlclean is for.
<bitbckt> it has the pleasant side-effect of keeping the compiler snappy.
<neeeebiw> everyonemines: http://www.copypastecode.com/78873/
<everyonemines> oh wow, it shrinks the binary executable? That seems way harder than dead code elimination.
<neeeebiw> does some partial sum thing.
<neeeebiw> everyonemines: run it with a list of floats to see what it does
<neeeebiw> but that is strict cps i think
<neeeebiw> everyonemines: i have the none cps version too
<neeeebiw> *non
<bitbckt> it shrinks the executable by doing reach analysis on the bytecode.
<everyonemines> That's just tail recursion isn't it? Maybe your prof is using some different terms than I do.
<neeeebiw> it is tail but continuation is speical
<everyonemines> bitbckt: And that's _easier_ than looking at the source code???
<neeeebiw> the result from the tail call is like, a function
<bitbckt> everyonemines: doubtful.
everyonemines has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 240 seconds]
arubin has joined #ocaml
neeeebiw has left #ocaml []
neeeewbi has joined #ocaml
<neeeewbi> penryu: you get my msg?
mfp has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz