lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
clan has quit [Quit: clan]
Submarine has quit [Quit: Leaving]
tristero has quit [Quit: tristero]
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
travisbrady has quit [Quit: travisbrady]
WraithM has joined #ocaml
nikki93 has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 255 seconds]
travisbrady has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
tautologico has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
shinnya has joined #ocaml
travisbrady has joined #ocaml
ousado has quit [Ping timeout: 240 seconds]
ousado has joined #ocaml
<tautologico> can I have specific configuration switches for opam packages? e.g. opam install pkg --with-tests and this would change dependencies (with tests requires ounit, without tests it's not required, etc)
<Drup> I'm not sure about tests
<Drup> but you can variables in your build script that depends on the available packages
<Drup> can have*
q66 has quit [Ping timeout: 252 seconds]
<tautologico> not necessarily tests
<tautologico> I'd like to do opam install mypkg --with-X
<tautologico> and then the package would have a dependency on X, otherwise it wouldn't... but testing is another good case, a package user it not necessarily interested in tests
<tautologico> and this switch would have to be defined by the package, of course
<Drup> you can't add a command line option
<Drup> but you can specify in your package that you have an optionnal dependency on X, and you may access a variable describing if X is installed or not
<tautologico> that's good
<tautologico> I think this covers what I want
<tautologico> thanks
<Drup> cairo2 depends optionnaly on lablgtk
<tautologico> it would be better if the user could override this with a cmd line switch, such that if the dependency is missing it is then installed by the system
<tautologico> but this will do
<Drup> well
<Drup> just do "opam install X mypkg" in this case :)
<tautologico> yes, but it may not be obvious to the user that mypkg can depend on X
<Drup> "opam show mypkg" will answer that
<tautologico> opam info doesn't say
<tautologico> yes, kinda
<tautologico> it says "depends" but not "optionally depends on"
<Drup> it does, there is a "depopts" line
<tautologico> yes, in the opam file, but not in the output of the tool
<tautologico> anyway, that's a minor thing
<Drup> in the output too
<tautologico> I see only "depends" here
<tautologico> package: cairo
<Drup> it's only there if there are depopts
<tautologico> depends: ocamlfind & lablgtk
<Drup> yes, try "cairo2"
<tautologico> oh I see
<Drup> (the .opam I shown was for cairo2)
<tautologico> true
<tautologico> so yeah, that's ok
<Drup> also
<Drup> if X depends optionnaly on Y
<Drup> and X is installed but not Y, then latter Y is installed, then X will be recompiled
<tautologico> very good
<Drup> or very terrible, when it recompiles coq when you install lablgtk in order to compile coqide :D
<tautologico> indeed :)
shinnya has quit [Ping timeout: 255 seconds]
travisbrady has quit [Quit: travisbrady]
ollehar has joined #ocaml
zpe has joined #ocaml
<Drup> tautologico: if you are using oasis as build system, there is a very nice tool called oasis2opam
<tautologico> I'm not using it right now, what's the advantages of using oasis instead of creating a package directly with opam?
<Drup> oasis is a nice tool all around, not only when you want to create your opam package
zpe has quit [Ping timeout: 252 seconds]
<tautologico> I know it can help with builds and so on
<Drup> it will generate a portable build system and will handle a good amount of boring stuff, like configuring, instalation and so on
yacks has quit [Read error: Operation timed out]
BiDOrD has quit [Read error: Connection reset by peer]
ollehar has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
travisbrady has quit [Quit: travisbrady]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
tidren has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
clan has joined #ocaml
nikki93 has joined #ocaml
ggole has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
tidren has quit [Remote host closed the connection]
maattdd_ has joined #ocaml
tidren has joined #ocaml
tidren has quit [Remote host closed the connection]
<ruzu> o caml, my caml! <3
maattdd_ has quit [Ping timeout: 240 seconds]
axiles has joined #ocaml
tautologico has quit [Quit: Connection closed for inactivity]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
Kakadu has joined #ocaml
tidren has joined #ocaml
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
elfring has joined #ocaml
willy_ has joined #ocaml
<willy_> bonjour
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
ygrek has joined #ocaml
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ocaml
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ocaml
<adrien> % git rm otherlibs/bigarray/Makefile.nt
<adrien> :)
maattdd_ has joined #ocaml
zpe has joined #ocaml
maattdd_ has quit [Ping timeout: 268 seconds]
zpe has quit [Ping timeout: 255 seconds]
Simn has joined #ocaml
zpe has joined #ocaml
Hannibal_Smith has joined #ocaml
neo007 has joined #ocaml
<neo007> Hi,hackers!
maattdd_ has joined #ocaml
<neo007> Recently I have a peek into the Real World OCaml, and find a strange thing in ocaml. That is , when ocaml get compiled, the code transform to lisp ,but the book do not like to say so, it just say that is the list s-exp.
<companion_cube> o/ neo007
<companion_cube> neo007: the book uses the Core library, which uses a lot of S-expressions for printing things
<companion_cube> but ocaml itself isn't related to lisp
<neo007> so I suspect ,if the versatile of ocaml is actrually the ability of lisp.
<neo007> No, ocaml 's compiler do use lisp too.
<companion_cube> certainly not :)
<companion_cube> (well there might be a s-expression-like intermediate format somewhere, but it's not lisp)
<neo007> then why do the book draw that graph?
<companion_cube> isn't it a historical description?
<companion_cube> (do you have a link?)
<companion_cube> 20 years ago, or something like this, the first Caml interpreter was in lisp
<neo007> yes,that is right. this is what I can not understand. whatever it called list or s-exp, it is some format of lisp, it is a middle language in the compile step.
<companion_cube> s-expressions are a simple serialization (text) format, which looks like lisp
<companion_cube> ie, it's (parenthesis (to delimit) the (structure))
<neo007> I can draw that graph here: text->abstract grammer tree -> type tree-> lambda-> bytecode or native code.
<companion_cube> ah, this
<companion_cube> yes, some of those formats are printed as s-expressions
<companion_cube> because it's very simple to print and parse
<companion_cube> it doesn't mean they have a lisp-like semantics
<neo007> yes, sometimes it is just a serialization. but when in the compiler it is actually a lisp but it is named a lambda.
<companion_cube> it's the serialized form of the AST (the program that is compiled)
<companion_cube> therefore, yes, it represents code, with anonymous functions; etc.
<neo007> yes. it is actually a lisp for compiler. it is just hidden under the ocaml grammer
<companion_cube> if you call "lisp" every piece of S-expression that contains code, then yes :)
<neo007> haha
<neo007> but is the s-expression come first or the lisp come first?
<neo007> or they occured the same time?
<adrien> in the 70s? we're not old enough to tell
<adrien> but afaiu, sexps were first a way to store intermediate compiler data
<adrien> and then people found out it was a nice enough way to code too
<adrien> which wouuld mean sexps first
<nicoo> neo007: Well, I could claim that all algebraic datatypes are S-expressions, once types get erased
<neo007> according to my knowledge about the history of lisp. it is in 60's, when lisp emerged with list processing.
<adrien> 60s and 70s are the same: hippies with long hair and LSD
<neo007> yes, you are right. may be lisp is nothing but a feature of list or s-exp
<neo007> when compare the OCaml's compiler to the Chez scheme's, which will win?
<companion_cube> I think lisp was among the first uses of S-expressions (although initially it was to also contain "M-expressions")
<companion_cube> but then people also used the format for other purposes
pminten has joined #ocaml
<neo007> yes,it make sense.
<neo007> ocaml, common lisp, chez scheme, are all succeed based on the compiler.but which is the best of this three?
<companion_cube> they are quite different languages
<companion_cube> ocaml isn't a lisp at all
<neo007> yes, but they all deal with the s-exp and compiler.
<companion_cube> that's totally irrelevant
<companion_cube> what matters is the language itself, not its intermediate forms
<companion_cube> because hopefully that's what you read/write
<adrien> hmm
<adrien> otherlibs/{num,str}/Makefile.nt do the following:
<adrien> depend:
<adrien> gcc -MM $(CFLAGS) *.c > .depend
<adrien> ../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
<adrien> rrr, no, sorry
<adrien> depend:
<adrien> sed -e 's/\.o/.$(O)/g' .depend > .depend.nt
<adrien> the first one is what the non-nt variant do
<adrien> does*
<adrien> actually actually that would be because the msvc port uses ".obj" as an extension instead of ".o"
<adrien> but that is not done for everything in otherlibs/
<ggole> neo007: ocaml's internal lambda form isn't s-expressions, it's a variant
<ggole> s-expressions are just used to print it
<neo007> well, but it still have some relation with the s-exp.
<ggole> I think the relation is that the universe of Lisp data structures forms a variant
<ggole> But its a different one to the internals of the compiler.
<companion_cube> neo007: you could use S-expressions to print intermediate representations in a C compiler
<companion_cube> that wouldn't make C a lisp variant
<ggole> And you can, of course, encode sums into lists + symbols + atoms easily enough
<neo007> oh, it seems so.
<adrien> hmm, I think bigarray can avoid the .depend file because the only dependencies are "%.o: %.c" and no other .c file
<adrien> but that means that the msvc port probably doesn't rebuild the .obj files when .h files change
<ggole> So if you have type term = Int of int | Add of term * term, you could encode that as a s-exp that is either (int <n>) or (add <l> <r>). And if you printed the s-exp, it would look a lot like -dlambda.
<ggole> That doesn't make term an s-expression.
ollehar has joined #ocaml
<neo007> yes. it is.
<companion_cube> everything is an S-expression then...
<companion_cube> so everything's a lisp, even cobol
<neo007> well, if follow the view.
<neo007> :)
<neo007> Thank you hackers! for telling me so much. I have something to deal, so see you. may you have a good day!
neo007 has quit [Ping timeout: 245 seconds]
tobiasBora has joined #ocaml
<tobiasBora> Hello !
<tobiasBora> I would like to get a web page from an API (in json) but I don't know what is the best way to download it with Ocaml (And I think that doing Sys.command "wget..." is ugly because it is OS dependent)
<adrien> ocamlnet has code to do it fairly easily
<adrien> cohttp might suit you too but I've never tried it
<tobiasBora> Thank you. Is it this module (Nethttp) I'm suppose to use ?
<adrien> it's more ... convenient :P
<tobiasBora> Yes, but I today a convenient solution is fine for me ^^ But Nethttp is supposed to be able to do the same thing as Http_client ?
rand000 has joined #ocaml
jbrown has quit [Remote host closed the connection]
<adrien> dunno
<adrien> but there's Http_client which should be easier than Nethttp
<adrien> Nethttp is probably fairly low-level
<tobiasBora> Ok. But I've installed ocamlnet with opam, no error, but I can't find it in "ocamlfind list"
Thooms has joined #ocaml
Submarine has joined #ocaml
<tobiasBora> adrien: Should it appear with the name "ocamlnet" ?
ollehar has quit [Ping timeout: 240 seconds]
<adrien> it's in netclient
<gasche> adrien: physical access is generally on tuesday
<gasche> which revision were you talking about? git log trunk can't find 14402
<adrien> it's in the 4.01 branch
<gasche> ok
<adrien> from roughly one month ago
<adrien> I'll probably have time to check mantis and the windows spec by tuesday (I hope)
<gasche> I'd be glad to commit good stuff if you have some
<gasche> on an unrelated note, I'm actively conflicting with you right now, implementing DESTDIR support
<gasche> (it's done, I just have to test it and I'll probably send a PR)
<tobiasBora> adrien: Great thank you
<adrien> heh
<adrien> Makefile.nt is so far very simple
<gasche> if per chance you knew about that stuff, could you tell me whether it's a problem to have $(DESTDIR) all over the place when DESTDIR is not set?
<adrien> partly because of some of the changes that went in for cross-compilation
<adrien> no it's not an issue at all
<gasche> (I mean, should I implement some sort of "default to ''" logic or is crappy unfound variable defaults an idiom in shell programming?)
<adrien> DESTDIR is to be used as: cp foo $(DESTDIR)$(PREFIX)
<gasche> I got that part
<gasche> hm
<adrien> that way, when DESTDIR is not set, you get back to PREFIX and everything works as expected
<gasche> I uese $(DESTDIR)/$(PREFIX), is that a problem?
<adrien> :)
<adrien> it is
<gasche> ok
<gasche> found that form on some BSD manual, I guess they don't care about Windows
<adrien> I need to check to be 100% sure but iirc it should be without /
<gasche> both should work on Unix at least
<gasche> so I'm fine with )$(
keen__ has joined #ocaml
keen_ has quit [Ping timeout: 240 seconds]
<tobiasBora> I need to use the Https extension but here : http://projects.camlcity.org/projects/dl/ocamlnet-3.3.2/doc/html-main/Https_client.html they explain that I must load "Ssl.init()".
<tobiasBora> Where could I find this package ? Is it inside Ocamlnet or I must install an other library ?
<flux> hmm, typicall ocamlnet-modules start with 'net'
<flux> maybe this opam package: ssl 0.4.6 Bindings for the libssl
<flux> it atleast comes with the Ssl module
<tobiasBora> flux: Ok, then I'll try to install it thank you
<tobiasBora> !
<tobiasBora> (and when I install it, it rebuild ocamlnet with the good options, so you must be right
keen__ is now known as keen_
keen_ has left #ocaml []
<flux> great. happy hacking :)
<tobiasBora> Thank you !
<orbitz> hey hey
<gasche> adrien: how can you check whether $(DESTDIR)$( or )/$( should be preferred?
<adrien> but the windows support is never mentionned
<adrien> and ocaml is always built from a posix environment
<adrien> posix-ish at least
<gasche> fair enough
<adrien> I don't think DESTDIR can be handled with windows paths
flixr has joined #ocaml
<gasche> you may be interested in the first cosmetic patch
ygrek has quit [Ping timeout: 240 seconds]
<gasche> (I didn't know you were working on it at the same time)
<adrien> I started this morning :P
<adrien> I'm still only in otherlibraries/
<adrien> systhreads/ is not fun to do
<adrien> hmm
<pippijn> this iocamljs looks nice
<pippijn> like mathematica
<gasche> iocaml is the bomb
<adrien> Makefiles have a SO variable; I now think it means "statis object", not ".so"
<gasche> IPython is the future
<gasche> IOCaml means we'll be part of it
<adrien> and DO would be for dynamic objects, not debug
<gasche> IOCaml-server means we might supersede Python in actually running it, if enough benefits can be demonstrated
<gasche> adrien: my morning fun was the difference between the MANODIR and the MANDIR variables
<gasche> but I left an explanatory comment when I understood, so the puzzle isn't fun anymore
<adrien> MANODIR clearly derives from the band "Manowar"
<adrien> heh :)
<pippijn> it would be great if you could insert lines in the middle
<gasche> it sucks to have "band name" as reference for "manowar"
<pippijn> like in mathematica, and then optionally recompute everything that came after it
<adrien> I think github could be nice with a few minor changes
<adrien> 1- get rid of the current UI
<gasche> Manowar is the name that huge warships had during the eighteenth century
<gasche> pippijn: can't you already? I thought this was provided by IPython
<adrien> Manowar is not really a band I'd listen to a lot; it's "fun" but in an ironic way
<pippijn> ah yes, insert cell above
steshaw has joined #ocaml
<pippijn> nice
<pippijn> excellent, it's really cool
<gasche> pippijn: I'd like to start an IOCaml fanclub, feel free to join
<pippijn> gasche: does it run in the browser or on the server?
<gasche> both
<gasche> IOCaml runs on the server, IOCamlJS runs in the browser
<pippijn> what parts are on the server?
<pippijn> I see, so IOCamlJS is fully independent of a server?
<gasche> I'm not quite sure
<pippijn> (except for perhaps serving javascript files)
<gasche> but I do know that the OCaml code is run in the client's browser
<pippijn> gasche: always?
<gasche> when using IOCamlJS
<pippijn> okay
<gasche> I haven't looked at it thoroughly yet
<gasche> there is also IOCaml-server, which is a server implemented in OCaml
<gasche> it's supposed to support arbitrary "kernels" (language modules), so in theory it should also be able to run IPython notebooks
<gasche> (but I don't think this has been tried yet)
tidren has quit [Read error: Connection reset by peer]
<pippijn> that's nice
<pippijn> I want to look into this more
<gasche> I wanted too, but I have no idea what my excuse would be
<gasche> right now I have absolutely no need for it
<pippijn> because I still have this aldor language I'm playing with
<gasche> on the other hand, I think this project is of strategic importance
<gasche> pippijn: on a related note, have you seen Jonathan's Mezzo-in-the-browser?
<pippijn> not yet
<adrien> $(O), $(A), $(SO), $(EXT_OBJ), $(EXT_LIB), $(EXT_DLL)
<pippijn> gasche: that looks nice
<pippijn> Type-checked and interpreted successfully (in about 1s)
steshaw has quit [Quit: Leaving.]
<gasche> yeah the performances aren't crazy
<pippijn> Type-checked and interpreted successfully (in about 15s)
<pippijn> well
<pippijn> yeah
<pippijn> but it's something :)
lostcuaz has joined #ocaml
<pippijn> gasche: I'll join your fanclub
<pippijn> I have always liked mathematica
<pippijn> after etaps, I'll look into making an aldor kernel for iocaml-server
<gasche> the Istuff has disruptive potential I think
<pippijn> and maybe a node.js one
<pippijn> there is a tutorial for that already
<gasche> it could replace the severly undertooled programs we use as terminals
ikaros has joined #ocaml
<gasche> with an IOCaml-like shell we could display pictures in the terminal, come back to edit lines, etc.
<pippijn> yeah
<gasche> what I'm wondering about is whether this change will also incorporate a change in the shell *languages* themselves
<gasche> (eg. start using Python instead of Bash, which could be an improvement)
<gasche> but then none of the popular languages, even the scripting ones, are as good as shells to do shell
<pippijn> because you want to execute programs most of the time
<bernardofpc> well, pipes and dirs are faster to use in shell than in programs
<pippijn> scripting is just an add-on you use sometimes
<pippijn> microsoft powershell is quite nice, because it's not string-based like sh
<bernardofpc> this IOCaml will force people to display datastructures in better ways
<bernardofpc> (say a Tree like a tree, not like an S-expression)
<mrvn> in 2D?
<gasche> there was an almost interesting new shell language on reddit last week
<pippijn> mrvn: maybe
<gasche> can't find it anymore
<pippijn> using graphviz
<pippijn> produce svg and output it
<adrien> gasche: shok.io?
<gasche> indeed, thanks
<gasche> shok.io
<adrien> it's mostly because companion_cube is set on reinventing yet another thing :P
<adrien> I mean: I had the link because of that
<pippijn> nice
q66 has joined #ocaml
<pippijn> adrien: what is he reinventing?
<adrien> the world :D
<adrien> so...
<pippijn> is he a mouse?
<adrien> heheh :)
<adrien> he's a bit too tall for that
<adrien> noone has "threads.cmxs", right?
steshaw has joined #ocaml
<pippijn> no
<pippijn> ocaml-mingw-w64-x86-64: /usr/x86_64-w64-mingw32/lib/ocaml/threads/threads.cmxs
<adrien> yeah
<adrien> apparently
<adrien> the explanation could be from this comment:
<adrien> # Dynamic linking with -lpthread is risky on many platforms, so
<adrien> # do not create a shared object for libthreadsnat.
<pippijn> but really
<pippijn> terminals should have ways to display pictures
<pippijn> terminal emulators, that is
<adrien> you should take a look at terminology
<pippijn> there is one, yes
<adrien> it can even display nyancats
<pippijn> cat some.png # displays the picture
Hannibal_Smith has quit [Read error: No route to host]
<adrien> it works by using escape codes
<pippijn> why aren't more people using it?
<adrien> fairly recen
<adrien> t
<adrien> inertia
<pippijn> okay
<adrien> not yet completely stable
<adrien> well
<pippijn> have you tried it?
<adrien> it is mostly stable but it hasn't been tested as much as, say, xterm
<pippijn> of course
<adrien> haven't installed it but I've seen it run
<adrien> lots of inertia on my hand
<adrien> partly because the todo list is very very deep
<bernardofpc> xterm or bash ? or it replaces both ?
<adrien> xterm
<pippijn> it needs enlightenment
<adrien> it needs EFLs
<adrien> which is not something very big
<pippijn> ah ok
<pippijn> good
q66 has quit [Ping timeout: 252 seconds]
<pippijn> still, I don't have them, apparently
<pippijn> No package 'ethumb_client' found
<bernardofpc> nobody has them
<bernardofpc> (usually)
<pippijn> there are some of these in debian
<pippijn> but not ethumb_client
<pippijn> and not emotion
<bernardofpc> I mean, almost nobody has any EFL installed
<adrien> which version does it say it requires?
<pippijn> 1.7.0
<pippijn> configure: error: Package requirements ( elementary >= 1.7.0 eina >= 1.7.0 eet >= 1.7.0 evas >= 1.7.0 ecore >= 1.7.0 ecore-evas >= 1.7.0 ecore-file >= 1.7.0 edje >= 1.7.0 emotion >= 1.7.0 ecore-input >= 1.7.0 ecore-imf >= 1.7.0 ecore-imf-evas >= 1.7.0 ecore-ipc >= 1.7.0 efreet >= 1.7.0 ethumb_client >= 1.7.0 ) were not met:
<pippijn> all of these
<adrien> iirc debian has more packages but in unstable or something like that
<pippijn> ah
<adrien> look for "efl", not "eina" or similar
<pippijn> eina is there
<pippijn> and I was using apt-file to search
q66 has joined #ocaml
<pippijn> You have searched for packages that names contain ethumb_client in all suites, all sections, and all architectures.
<pippijn> well, it ends here, I'm not going to try it :)
<pippijn> it does look nice from the video
<adrien> packaging in debian has been quite slow indeed
<pippijn> maybe there is a ppa
<pippijn> there is
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adrien> don't miss your train! :P
<pippijn> I'm already in grenoble
<pippijn> ok, found the first bug, which is really not very serious
<adrien> :)
<pippijn> if you increase the font size, it thinks that its window also scaled
<pippijn> so it's drawing the rest of the terminal (to the right and bottom) into a clipped off area
<pippijn> which means I can't see it
<pippijn> well
<pippijn> cat some.jpg doesn't work :P
<pippijn> I thought it did
<pippijn> vim with 256 colours doesn't work, it's all grey
<adrien> try
<adrien> tycat
<adrien> iirc
<mrvn> but 256 kinds of grey
<pippijn> mrvn: more than 50!
<pippijn> but no, just 3
<pippijn> black, grey, and white
<pippijn> or, white-ish
<pippijn> ah, maybe because of $TERM
<pippijn> which is xterm
steshaw has quit [Quit: Leaving.]
<pippijn> there we go :) xterm-256color fixes it
<gasche> it's very hard to guess how adoption will go
<pippijn> but everything is bold
<pippijn> terminology: https://paste.xinu.at/TAubL/
<gasche> but my prediction would be that terminal marginally enhanced to display pictures using ugly hacks (escape codes etc.), like terminology, will not get much traction in the future
<adrien> well, there are bold oclours
<adrien> colours*
<adrien> like bold yellow is brown
<adrien> in xterm at least
<gasche> that people will only jump towards tool that provide radical change
<adrien> gasche: I don't think that was terminology's goal
<gasche> TermKit was such a tool, but apparently hard to design/maintain
q66 has quit [Ping timeout: 252 seconds]
<adrien> that's one feature but not the whole thing
<gasche> I think that IPython and related notebooks have a chance to become such a tool
<adrien> terminology should be very fast
<gasche> they have the opportunity to bring much more than just "images" to what terminals are
<adrien> iirc termkits had its dead corpses in closets and ugly things
<gasche> of course
<gasche> it was a hack
<gasche> on the other hand
<gasche> notebooks naturally run on web interfaces
<gasche> and that's a big plus
Anarchos has joined #ocaml
<gasche> I don't want only images / films
<gasche> I want animations, etc.
q66 has joined #ocaml
<pippijn> animations?
<ggole> Terminal + pics isn't all that interesting imho
<ggole> I'd like a cross between a terminal and a spreadsheet though
<ggole> With graphing tools and a bunch of functionality built in
<gasche> I think we agree
<gasche> and I don't believe much in incremental evolution of today's terminal
<gasche> I think notebook are more likely to be adopted for this purpose
<ggole> No, it's mired in history.
<gasche> because they have less graybeards with strong opinions on how it should behave
<Anarchos> gasche ;)
travisbrady has joined #ocaml
<ggole> I wonder how you'd do tabular data in a non-language specific way, though
<gasche> if you like spreadsheets
<gasche> you should have a look at the recent paper by Sean McDirmid and Jonathan Edwards
<adrien> systhreads/Makefile{,.nt} are awful; they're completely different
shinnya has joined #ocaml
<ggole> It's not so much that I like spreadsheets as it is that I hate the command line :)
<nicoo> adrien, pippijn : Which video were you mentionning, in relation with EFLs ?
<adrien> nyancat?
<ggole> Spending mental effort on how to extract the second field of some stream of text is just so daft
<adrien> awk!
<pippijn> yes, awk
<pippijn> I think that is not the main problem
<pippijn> the main problem is that it's text
<ggole> Text in an inevitably poorly specified format
<pippijn> "ls" just outputs text
flixr has left #ocaml []
<pippijn> processing the output of "ls" is generally unsafe
<pippijn> in powershell, "ls" outputs a data structure
<adrien> use find :P
<adrien> but yeah
<adrien> the issue is that windows has APIs for everything
<adrien> but it has way too many of them
<pippijn> that when not piped into some other tool, is stringified in a way that "ls" is expected to be output
<pippijn> I don't care about windows
<pippijn> but powershell is nice
<adrien> you should
<pippijn> yes, I should
<pippijn> eventually I will
<pippijn> but at the moment I don't
<adrien> you misunderstand
<adrien> unix is "everything is a file" and process chaining
<adrien> windows is APIs
<adrien> if you want to avoid strings and pipes and so on, you should take a look at what others do
<pippijn> ah
<pippijn> right
<pippijn> true, powershell works the way it does because it unifies all those apis
<adrien> gasche: for the "clean" rules in Makefile, I'm tempted to replace "rm -f *.(O)" with "rm -f *.o *.obj"; do you see any objection to that?
<adrien> gasche: basically, it means it will always work even when variables haven't been bound yet and it makes it easier to understand (right now I'm unable to tell you which of $(SO) or $(DO) or $(EXT_DLL) I would have to use)
<adrien> pippijn: it also means the tools have to be built into the shell and not third-party
<pippijn> no
<pippijn> though in powershell I guess it is
<adrien> if you don't want to parse strings you need tools to return data through an API
<adrien> or at least serialize
<pippijn> if, instead of outputting a list of files, "ls" would output a serialised data structure containing all its data
q66 has quit [Ping timeout: 252 seconds]
<pippijn> you could filter and select from that table and then output it
<ggole> You could do half-structured things like having one fd for each column
<ggole> And then a metadata fd to indicate how many columns, data formats of each, names, etc
<adrien> pippijn: then you need _all_ tools to do that
<pippijn> no
<pippijn> strings by default
<ggole> That'd be structured in a more or less language-independent way
<ggole> And it would actually run on Unix machines today, too
<adrien> and how do you tell the two output apart?
<pippijn> possibly by magic
<adrien> :)
<ggole> ...are you asking me, or pippijn?
<pippijn> imagine ls being an ocaml program
<pippijn> and it outputs a serialised data structure
<gasche> I think adding more structure has already been done
<ggole> In the limit case you reinvent a Lisp machine
<ggole> And "process output" is an arbitrary full-blown, GCed data structure
<ggole> That did not go over well last time.
<pippijn> hmm
<pippijn> why not?
<ggole> All the hardware and software was too specific
<ggole> So it all died when another approach ended up delivering faster
<pippijn> you could output a binary json kind of format
<ggole> That's what TermKit did, iirc
<ggole> Well, probably just textual json
<ggole> Standard self-structured formats would be nice though
<ggole> You could imagine specifying variants, lists, arrays, etc
<gasche> I remember a reimplementation of some Unix tools with more robust handling of delimiters
<gasche> can't find it again, though
<ggole> Doing things in band is inherently problematic
<ggole> Because you can't encapsulate nicely
<pippijn> gasche: some tools use \0 as delimiter
<pippijn> find+xargs
<ggole> You soon end up wanting to delimit something containing your delimiter
<pippijn> yes
<ggole> And Unix just punts on that entirely :/
<ggole> The \0 thing is particularly sad
<ggole> Since basically every tool has its own strange way of saying "use \0"
<ggole> Or doesn't support that.
<adrien> well, I got a bit stuck on systhreads/Makefile.nt
q66 has joined #ocaml
<adrien> and why isn't code review directly in version control systems?
<adrien> I'm making changes which are too small to deserve dedicated commits but I'd like a way to store an explanation as to why I make them
<pippijn> yeah
<adrien> and that should be visible when doing both code review and when checking the history
<pippijn> I do that in github :\
<pippijn> line comments on my own commits
<pippijn> I'd like that integrated in git
<adrien> and I cannot add comments because I'm making changes to a file I'm removing
darkf has quit [Quit: Leaving]
<Anarchos> adrien comment a void commit on the folder with a comment in the commit comment ?
<adrien> two many times words several time
<adrien> s
* adrien stack overflows
<Anarchos> adrien sorry :)
<pippijn> also, I still want full code auditing software
<gasche> adrien: just make small commits?
<gasche> I don't see the problem with that
<gasche> we can always squash together later if someone complains
<adrien> what made me complain was this stuff in Makefile.nt:
<adrien> OBJS=a1 a2 a3 baz a4 a5
<adrien> foo: bar baz
<adrien> bar: $(OBJS)
<adrien> and in Makefile, "foo: bar"
struktured has quit [Read error: Operation timed out]
<adrien> and I'd probably have to do a few "small commits" per file I'm changing and so far: 24 files changed, 281 insertions(+), 587 deletions(-)
<pippijn> how do you get these statistics?
<gasche> git diff --stats?
<pippijn> ah
<gasche> --shortstat in this case
<pippijn> okay
<gasche> (and it's --stat, not --stats)
<gasche> adrien: again, I don't see the problem with having many small commits
<adrien> I don't think I'd like to see such commits in the logs if I had to check the history
<adrien> they make no sense on their own
<mrvn> put them into a branch and then merge the branch as a whole.
<mrvn> That way bisect will also skip all the little patches unless the error is in them.
<gasche> mrvn: remember that the final VCS will be SVN, which may or may not handle that well
<gasche> but in any case, for review, small git patches are fine
<gasche> again again, we can always squash them later
<mrvn> well, svn sucks for that.
<mrvn> squash them
<rom1504> why would you use svn ?
<gasche> historical reasons
bjorkintosh has quit [Quit: Leaving]
<mrvn> you can migrate to git
<Anarchos> where can i find an example of mutually recursive modules ?
<gasche> in the OCaml manual?
<Anarchos> gasche ...
<gasche> "..." ?
<mrvn> module rec M : sig end = struct end and N : sig end = struct end;;
<Anarchos> gasche i know what they are and i read the doc, but i want samples of code more stuffed
elfring has quit [Quit: Konversation terminated!]
<gasche> what do you need?
<Anarchos> gasche i am writing a software similar to agda . I wonder if recursive modules are the good solution to the evaluate/typing mutually defined functions.
bjorkintosh has joined #ocaml
<mrvn> why not just use "let rec"?
<Anarchos> mrvn i want to separate them in two files for clarity, and not having this file too long (in coq they decided to separate them, and couldn't use recursive modules)
<mrvn> you can't have recursive modules in 2 files
<gasche> but you could define functors and then tie the knot
<Anarchos> gasche but i think they decided not to use this solution in coq, right ?
<gasche> just as you could define "let eval typecheck = ...", "let typecheck eval = ...", and then tie the knot
<mrvn> or pass a closure of the first function to the second instead of having a recusion.
<gasche> this
<mrvn> or pass the first module as argument to the second
<gasche> recursive modules make sense when you also need to export private types along the way
<gasche> if you only have values, value recursion is simpler
<gasche> Anarchos: I'm not familiar with Coq's implementation
<Anarchos> gasche there is an article of JC Filliatre (design of a proof assistant : coq version 7)
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
<ggole> Aargh, I do so wish that modules could mutually refer across files :(
<ggole> Aargh, I do so wish that modules could mutually refer across files :(
<ggole> Oops
<ggole> That was meant to be "Makes it artificially difficult to split things up when they happen to recurse"
<adrien> oh a gun
<adrien> which shoots both ways
<adrien> (afk)
<mrvn> you can hack it by disabling cross module inlining.
pminten has quit [Quit: Leaving]
Simn has quit [Ping timeout: 246 seconds]
<ggole> "Artificially difficult" indeed. :)
<mrvn> If they are that closely dependent that they recurse then how is splitting them into 2 files going to make it easier to understand?
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
<ggole> The same way that splitting anything into two independent parts makes it easier to understand?
<ggole> Do you put all your source code in one file because it is all one project?
ygrek has joined #ocaml
<mrvn> I split them into independent units.
<Drup> ggole: if they contain mutually recursive modules, I'm not sure where the "independent" come from ...
<ggole> Mutually recurring modules are independent in exactly the same way that mutually recurring functions and data structures are independent
<ggole> They refer to each other as wholes without needing to know about the bits
<ggole> That's a perfectly natural thing to want :/
<mrvn> but they are mutually dependend on each other
kakadu_ has joined #ocaml
<ggole> That's why they should mutually recur naturally instead of using some silly hack
Kakadu has quit [Ping timeout: 268 seconds]
<pyon> Structural subtyping for objects is in a sense "dual" to coercing variants to larger ones, right?
<Drup> yes
<Drup> ggole: you can't have cycle in the module dependency graph anyway
<Drup> (I'm not exactly sure where this restriction come from, though)
<pyon> Is there a reason why OCaml has both records and objects? Don't these features overlap?
<Drup> pyon: object also have other uses, like open recursion
<mrvn> Error: This expression has type Ras.points = Ras.MAKE(M).points but an expression was expected of type ('a, 'b, 'c) Bigarray.Array1.t
<mrvn> But I have type points = private (int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
<mrvn> What do I have to specify for the functor so the points type keeps its private infos?
<Drup> mrvn: could you show the whole code ?
<ggole> Drup: that's what I'm complaining about :E
<Drup> pyon: also, the fact that is dual doesn't make them easily interchangeable
<Drup> (I should wikify this at some point, because I keep linking it)
<ousado> pippijn: how do I build cparser?
<ggole> Drup: to make it work I imagine that you'd need to require that mutually recurring modules be presented to the compiler at the same time, and fix build tools to know about it
<ggole> But I don't think there's any conceptual problem there, just a SMOP
<pyon> Drup: Normally I want structural subtyping but not classes and inheritance... For that, I still end up having to use objects anyway.
Simn has joined #ocaml
<ousado> pippijn: you mention obuild there, so I installed it via opam, but it doesn't find an obuild file
<Drup> pyon: sure, that's normal
<Drup> pyon: that's the main use of objects, structural subtyping :p
<Drup> mrvn: didn't you just forget to project along the second component ?
<mrvn> meaning what?
<Drup> that I don't know how to read, nevermind
<Drup> It should be exported correctly
yacks has joined #ocaml
<Drup> mrvn: oh, of course, silly me
yacks has quit [Read error: Connection reset by peer]
<Drup> you need to explicitly coerce
shinnya has quit [Ping timeout: 240 seconds]
<mrvn> Drup: where?
<Drup> when you want to transform a point into a Bigarray.Array1.t
<mrvn> let res = Ras.points_create () in
<mrvn> let r = (res : ('a, 'b, 'c) Bigarray.Array1.t)
<mrvn> Error: This expression has type Ras.points = Ras.MAKE(M).points but an expression was expected of type ('a, 'b, 'c) Bigarray.Array1.t
<Drup> don't put the private inside the module
<Drup> just in the signature
tane has joined #ocaml
<mrvn> It is only in the signature
<mrvn> The error is in line 25
<Drup> :> is the coercion operator
<Drup> : is just for type constraint
<mrvn> Error: This expression cannot be coerced to type
<mrvn> ('a, 'b, 'c) Bigarray.Array1.t;
<mrvn> it has type Ras.points = Ras.MAKE(M).points but is here used with type
<mrvn> ('a, 'b, 'c) Bigarray.Array1.t
<Drup> that's ... interesting
<mrvn> ocamopt -i shows me that in the result of the functor the type points is abstract instead of private.
<Drup> mrvn: remove the type variable in your coerction
<Drup> use concrete types instead
<mrvn> Drup: ok. Now 1) why do I have to do that and 2) why does that even work?
<Drup> define "that" in your sentence :D
<mrvn> the coercion
<Drup> you have to do the coercion because that's how ocaml work with private types
<Drup> it's possible to transform x into it's private definition, but you have to be explicit about it
<mrvn> but ocamopt -i shows the type as abstract
<Drup> weakness of the -i option, I suppose
<Drup> huum
<Drup> I just checked, it's not abstract when I do it
<mrvn> module M = struct let count = 4 end
<mrvn> module R = Ras.MAKE(M)?
<Drup> yep, it's not abstract
<Drup> type points = MAKE(M).points
<Drup> MAKE being the signature of the functor and M the signature of the argument.
<Drup> which is ocamlopt's convoluted way of saying S
tianon has quit [Ping timeout: 255 seconds]
zzing has joined #ocaml
travisbrady has quit [Quit: travisbrady]
tianon has joined #ocaml
<ousado> pippijn: omake fails with: has-ocaml-package: command not found
<mrvn> somehow I was under the impression that with private types the coercion would happen implicitly sometimes.
struktured has joined #ocaml
<mrvn> Like type t = private int and then doing M.x + 1
Hannibal_Smith has joined #ocaml
<Drup> I'm not sure why it's done this way
<Drup> gasche: If you can provide insights about that, I'm interested
manizzle has quit [Read error: No route to host]
<mrvn> strings have .[], arrays have .(), bigarrays have .{}. How can I define my own?
<mrvn> or pass through the existing one for the private type.
<Drup> I'm not sure about bigarrays
tianon has quit [Remote host closed the connection]
<Drup> but there is an ugly hack :)
<Drup> .() desugarize to Array.get
<Drup> if you overwrite it, it will call your function
tianon has joined #ocaml
<Drup> (don't do that x)
<Drup> mrvn: why do you want a private type ?
<mrvn> Drup: because I want easy access to the data
<Drup> but you don't want the user the possibility to create an element ? right
tianon has quit [Ping timeout: 255 seconds]
<mrvn> Drup: elements are fine. The only requirement is the array size.
<Drup> by element, I mean "member of your type"
<Drup> not element of the array
<mrvn> The array must be private so only arrays of the right size can be created. But the elements should be easily accessible.
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
tianon has joined #ocaml
travisbrady has joined #ocaml
<Drup> indeed, that's not a terrible solution
<Drup> (it deserve a huge warning note in the documentation, though)
amirmc has joined #ocaml
amirmc has quit [Client Quit]
<mrvn> Drup: problem is I have blocks and points and both need .{}
<Drup> yep
<mrvn> block, blocks and points actually
<gasche> Drup: I need context about your question, didn't follow the discussion
<gasche> where's the code being discussed?
<Drup> gasche: if I have "type t = private int" and a value of type t, I can coerce to int
<Drup> but the coercion is explicit
<Drup> the question was : why does it has to be explicit ?
<gasche> for principality
<gasche> (of type inference)
<Drup> ok
<Drup> that's what I though
<mrvn> "A principality (or princedom) can either be a monarchical feudatory or a sovereign state, ruled or reigned over by a monarch with the title of prince or by a monarch with another title within the generic use of the term prince." I think that is the wrong page
<mrvn> gasche: why can't private int not be unified with int?
<gasche> they're distinct types, that's the point
<mrvn> so is [> `Foo] and [> `Foo | `Bar]
<gasche> those are polymorphic type schemes that have common instances
travisbrady has quit [Quit: travisbrady]
<mrvn> Isn't the point of private to only block the creation of the type but allow all other operations?
<gasche> type t = private int creates a fresh type t with a subtyping relation (t <= int)
<mrvn> I know
<gasche> if you could unify t and int, you could create t's by providing int's
<mrvn> it should only go one way
<gasche> unification is bidirectional
<Drup> There would be no problem with typeclasses ! (wink wink companion_cube)
<Drup> (sorry, that was random)
<mrvn> gasche: so any idea how to ensure Bigarrays are only created with a certain size without making access to the elements a pain?
<gasche> you could overload the Bigarray module
<Drup> that was my proposition
<mrvn> gasche: I have points and block types that both are bigarrays.
<gasche> Alain has a branch where coercions are implicitly inserted whenever that helps the type-checker accept the program -- or at least sometimes
<gasche> you could provide "get" and "set" functions and ask users to use them
<gasche> I agree overloadable syntactic sugar would be nice
<Drup> gasche: the syntactic sugar for array access is overloadable
<Drup> well, overwritable, at least
<Drup> mrvn: In your place, I would provide some one letter module P and B with overwritten BigArray module
<gasche> I'd like to be able to use get/set notation for Hashtable as well for example
<gasche> also (::) for Map and Set
<Drup> gasche: how would the typing work in ocaml ?
<mrvn> Maybe I will provide an operator.
<mrvn> But how do I get it to allow both get and set functionality?
elfring has joined #ocaml
<mrvn> would be nice if one could do: let (.{}) = (Array.get, Array.set)
travisbrady has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Remote host closed the connection]
struktured has quit [Read error: Operation timed out]
rand000 has quit [Ping timeout: 252 seconds]
jbrown has joined #ocaml
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jbrown has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
pawelbx has quit [Ping timeout: 240 seconds]
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
clan has quit [Quit: clan]
ollehar has joined #ocaml
tobiasBora has quit [Ping timeout: 268 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
clan has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
<mrvn> should a libraries .cmo file be in the lib or the -dev package in Debian?
tobiasBora has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
tobiasBora has quit [Client Quit]
<pippijn> gasche: oh :)
<pippijn> ousado: you need my obuild
<pippijn> ousado: I didn't know there was something called obuild when I made my obuild
<pippijn> ousado: after etaps, I'll make opam packages
<adrien> mrvn: cmo? what is that useful for?
<mrvn> adrien: bytecode
<adrien> I meant, compared to cma
ygrek has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<mrvn> adrien: no idea
<adrien> are you going to dynlink it?
<adrien> but actually, I think I've never understood how debian split ocaml packages
<mrvn> I have no idea what users might or might not do
<mrvn> looks like lintian complains (about the -dev) when I put the cmo in the lib package.
rand000 has joined #ocaml
imortalk has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 240 seconds]
imortalk has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
struktured has joined #ocaml
Thooms has joined #ocaml
ggole has quit [Ping timeout: 255 seconds]
termos has joined #ocaml
rand000 has quit [Quit: leaving]
travisbrady has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
acieroid has joined #ocaml
michel_mno_afk has joined #ocaml
clan_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
talzeus has joined #ocaml
julm_ has joined #ocaml
siddhart1v_away has joined #ocaml
maurer_ has joined #ocaml
Valda has joined #ocaml
amiller_ has joined #ocaml
asmanur_ has joined #ocaml
clan_ has quit [Read error: Connection reset by peer]
alex_nx_ has joined #ocaml
struktured has quit [*.net *.split]
asmanur has quit [*.net *.split]
Valdo has quit [*.net *.split]
thorsten` has quit [*.net *.split]
acieroid` has quit [*.net *.split]
maurer has quit [*.net *.split]
cthuluh has quit [*.net *.split]
julm has quit [*.net *.split]
alex_nx has quit [*.net *.split]
amiller has quit [*.net *.split]
Valda is now known as Valdo
clan has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
Submarine has quit [*.net *.split]
michel_mno has quit [*.net *.split]
talzeus_ has quit [*.net *.split]
pyon has quit [*.net *.split]
siddharthv_away has quit [*.net *.split]
michel_mno_afk is now known as michel_mno
cthuluh has joined #ocaml
axiles has quit [Remote host closed the connection]
travisbrady has joined #ocaml
thorsten` has joined #ocaml
Submarine has joined #ocaml
bjorkintosh has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Submarine has quit [*.net *.split]
Submarine has joined #ocaml
Yoric has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
travisbrady has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Instantbird 1.5a1pre -- http://www.instantbird.com]
jbrown has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Submarine has quit [Quit: Leaving]
tane has quit [Quit: Verlassend]
kakadu_ has quit [Quit: Konversation terminated!]
zpe has joined #ocaml
<bernardofpc> I have some type I want to display
Averell has quit [Read error: Connection reset by peer]
<bernardofpc> should I build two functions for Format.fprintf and Printf.fprintf, or define one in terms of the other (and in this case, is there any recommendation as to which is the base one, and which is just a "wrapper" ?)
nikki93 has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
averell has joined #ocaml
willy_ has quit [Quit: This computer has gone to sleep]
averell is now known as Averell
nikki93 has joined #ocaml
watermind has joined #ocaml
<watermind> I just noticed Batteries has list comprehensions
<watermind> is anything of the sort also available in core?
travisbrady has joined #ocaml
Thooms has quit [Read error: Operation timed out]
ollehar has joined #ocaml
travisbrady has quit [Quit: travisbrady]
jbrown has quit [Remote host closed the connection]
maattdd_ has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
darkf has joined #ocaml
nikki93 has quit [Remote host closed the connection]
travisbrady has joined #ocaml
nikki93 has joined #ocaml
travisbrady has quit [Quit: travisbrady]
lostcuaz has joined #ocaml
amiller_ is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
interstatus has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
Simn has quit [Quit: Leaving]