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/
appleby has joined #ocaml
thomasga has quit [Ping timeout: 272 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
keithflower has quit [Quit: keithflower]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
appleby has quit [Quit: appleby]
keithflower has joined #ocaml
csakatoku has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
tobiasBora has quit [Quit: Konversation terminated!]
appleby has joined #ocaml
lovethroat has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
coke0 has joined #ocaml
coke0_ has quit [Ping timeout: 245 seconds]
lovethroat has quit [Ping timeout: 260 seconds]
kyrylo has quit [Ping timeout: 272 seconds]
wolfnn has quit [Ping timeout: 245 seconds]
appleby has quit [Quit: appleby]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
watermind has quit [Client Quit]
watermind has joined #ocaml
comacat has quit [Quit: leaving]
tlockney_away is now known as tlockney
Yoric has joined #ocaml
csakatoku has quit [Remote host closed the connection]
cdidd has quit [Ping timeout: 260 seconds]
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ocaml
cdidd has joined #ocaml
Yoric has quit [Ping timeout: 265 seconds]
Yoric has joined #ocaml
kyrylo has joined #ocaml
kyrylo has quit [Client Quit]
kyrylo has joined #ocaml
mye has quit [Quit: mye]
ollehar has quit [Ping timeout: 246 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
philtor has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 250 seconds]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
yacks has joined #ocaml
kyrylo has quit [Ping timeout: 272 seconds]
appleby has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
Eyyub has quit [Ping timeout: 260 seconds]
gambogi has joined #ocaml
Yoric has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
appleby has quit [Quit: appleby]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ggole has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
nikki93 has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 248 seconds]
appleby has joined #ocaml
ggole has quit [Read error: Connection timed out]
ggole has joined #ocaml
csakatoku has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
csakatoku has quit [Ping timeout: 260 seconds]
contempt has joined #ocaml
appleby has quit [Quit: appleby]
nikki93 has joined #ocaml
mcclurmc has quit []
ggole has quit [Read error: Connection timed out]
ggole has joined #ocaml
appleby has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest70571
appleby has quit [Quit: appleby]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
zpe has joined #ocaml
csakatoku has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
axiles has joined #ocaml
lovethroat has joined #ocaml
nikki93 has quit [Remote host closed the connection]
talzeus has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
Simn has joined #ocaml
csakatoku has quit [Remote host closed the connection]
Guest70571 has quit [Remote host closed the connection]
csakatoku has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
appleby has joined #ocaml
nikki93 has joined #ocaml
<appleby> Drup: hey
<appleby> you linked me to this lablgtk tutorial
<appleby> bt
<appleby> but it won't load anymore for some reason?
nikki93 has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 260 seconds]
philtor has quit [Ping timeout: 245 seconds]
<adrien> bluh
<adrien> crap
<adrien> I don't have time to handle it
<adrien> (I have no idea what the copyrights aer)
ulfdoz has joined #ocaml
<adrien> appleby: my wip quick tutorial: http://notk.org/~adrien/lablgtk_tutorial/tutorial.html
<appleby> wip?
<adrien> work-in-progress
<adrien> although it's mostly done; I need to remove the pony images from the screenshots mostly
<appleby> is that archive the same as the link i posted?
<adrien> yes
ygrek has joined #ocaml
<appleby> nice, thx
yacks has quit [Ping timeout: 260 seconds]
<appleby> if I find a reference to a module
<appleby> for example
<appleby> Arg.parse options
<appleby> why is it that I can't find the file arg or Arg.ml ?
<Drup> where are you looking ?
<adrien> Arg is from the standard library
<appleby> like Core?
<adrien> no, Core is a replacement for the standard library
<appleby> k
<appleby> so is it like
<appleby> in files
<appleby> somewhere?
<appleby> is there anyway someone can help me with my huge ass project
<adrien> "man Arg" should give you some doc
<appleby> I have < 3 months to develop this huge project to fly a drone
<appleby> I have 8 other people on my team
<appleby> only 2 software
<adrien> only 2 software, you're lucky then
<appleby> hell no
<appleby> like 80% of the project is software
<appleby> so say there is a reference to a module in a .ml file
nikki93 has joined #ocaml
<appleby> what possible places can I find that ml file
<ggole> The stdlib source is sitting in /usr/lib/ocaml/ on my machine
<appleby> i mean the module
<appleby> oh okay
<appleby> so it's either in the ocaml thing
<appleby> or in a local directly
<appleby> directory*
<adrien> appleby: but why are you after the .ml file?
<ggole> You can direct the compiler to look in other directories, too
<appleby> well it's jsut easier to reverse engineerthat way
<ggole> Much like C compilers
<adrien> appleby: huh, why?
<adrien> there is documentation in the .mli which then gets into the manpage and on the website
<appleby> k
<appleby> then in that case maybe i'm looking for the mli file
<appleby> haha
<ggole> (The .mli is in the same place, so...)
<appleby> what's a good
<appleby> what's a good ocaml editor for mac
<appleby> i'm using eclipse right now
<ggole> I think most people use emacs or vim.
<ggole> Any good editor will suffice.
<adrien> and on my laptop I can directly access file:///usr/doc/ocaml-4.02.0/ocaml-refman.html and file:///usr/doc/ocaml-4.02.0/ocaml-refman.html#htoc299 for the standard library in particular (which contains Arg) [ of course, you're not running 4.02 ]
<appleby> like do those have syntax highlighting
<ggole> Yep.
<ggole> Well, you might need to install some stuff for the editor: depends
<Drup> actually; emacs/vim have far more than syntax highlighting, thanks to merlin
<appleby> what stuff
<Drup> I think there is an experimental merlin support for textmate too
<ggole> Merlin does completion, jump to definition, shows you types of things, etc
<ggole> Can be handy.
<Drup> and inline typechecking while editing
<appleby> niceee
<appleby> how can i make emacs highlight
<appleby> merlin?
<Drup> just use the tuareg mode for that
<appleby> how
<appleby> ok
<appleby> do you know where to find emacs config file on mac?
<Drup> don't ask me any help about mac
<Drup> I don't know anything about it and I hope that it stay that way
ulfdoz has quit [Ping timeout: 248 seconds]
<appleby> haha
lovethroat has quit [Ping timeout: 260 seconds]
mort___ has joined #ocaml
mort___ has quit [Client Quit]
zpe has joined #ocaml
tlockney is now known as tlockney_away
<appleby> Drup
<appleby> in emacs what is C-x C-f
zpe has quit [Ping timeout: 250 seconds]
<Drup> appleby, I like to help, but I'm not a proxy to google =)
<adrien> appleby: you should look for a tutorial/introduction to emacs
<appleby> like i don't know how to execute it
<adrien> and to the caml-mode/tuareg for emacs
<flux> appleby, C-h k (somekeybinding) will tell you the function
<flux> and for me it's ido-find-file, but I may have customized it
talzeus has quit [Remote host closed the connection]
<appleby> why when I created a ~./emacs file and put this into it:
<appleby> (add-to-list 'load-path "~/.elisp/tuareg-mode")
<appleby> (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
<appleby> (autoload 'camldebug "camldebug" "Run the Caml debugger" t)
<appleby> (autoload 'tuareg-imenu-set-imenu "tuareg-imenu"
<appleby> "Configuration of imenu for tuareg" t)
<appleby> I do not get tuareg mode?
<appleby> I put the tuareg files in the right directory i think
yacks has joined #ocaml
<ggole> You need an auto-mode-alist entry for tuareg mode, probably
<ggole> Does M-x tuareg-mode work?
<appleby> says symbol's definition is void
<ggole> Sometime didn't work then.
<ggole> *Something
sagotch has joined #ocaml
<ggole> Check that the .emacs is running: you can probably just put (message "test!") in it and see if it turns up
<appleby> k
<appleby> and where would it turn up
<ggole> In the *Messages* buffer, see it with C-h e
<appleby> okay
<appleby> I see the test!
<ggole> Hmm :/
<ggole> Double check that the files are in the same place mentioned in the .emacs, I guess
vpit3833 has joined #ocaml
talzeus has joined #ocaml
<ggole> You could try loading it manually with M-: (require 'tuareg)
<ggole> If that fails, then it means emacs cannot find the mode.
<appleby> so when I type
<appleby> /Users/appleby/.elisp/tuareg-mode:
<appleby> total used in directory 352 available 3730169
<appleby> drwxr-xr-x 5 appleby staff 170 Feb 12 01:05 .
<appleby> drwxr-xr-x 4 appleby staff 136 Feb 12 01:05 ..
<appleby> -rw-r--r--@ 1 appleby staff 29234 Apr 22 2010 camldebug.el
<appleby> -rw-r--r--@ 1 appleby staff 12996 Apr 23 2010 sym-lock.el
<appleby> -rw-r--r--@ 1 appleby staff 128778 Apr 23 2010 tuareg.el
<appleby> thats what I get when I do C-x C-f ~/.elisp/tuareg-mode/
<appleby> (add-to-list 'load-path "~/.elisp/tuareg-mode")
<appleby> (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
<appleby> (autoload 'camldebug "camldebug" "Run the Caml debugger" t)
<appleby> (autoload 'tuareg-imenu-set-imenu "tuareg-imenu"
<appleby> "Configuration of imenu for tuareg" t)
<appleby> (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu)
<appleby> (setq auto-mode-alist
<appleby> (append '(("\\.ml[ily]?$" . tuareg-mode)
<appleby> ("\\.topml$" . tuareg-mode))
<appleby> auto-mode-alist))
<appleby> (message "test!")
<appleby> and that is my .emacs file
<flux> appleby, have you confirmed your .emacs file is actually executed?
<appleby> the test message works
<flux> appleby, if you go into that buffer and select 'evaluate buffer' from the elisp menu, does it work after that?
<appleby> I see no evaluate button
<ggole> I don't see any mistake :(
<appleby> damn
<flux> you don't have menus in emacs?
<appleby> k
<appleby> I used it
<appleby> and of course I see "test"
<flux> and it still doesn't work?
<flux> I suppose not
<flux> btw, if the 'test' was at the beginning of the file, an error could have stopped its evaluation
Kakadu has joined #ocaml
<flux> but I think if there was an error, at least now you should see it..
<appleby> so wtf ;(
<flux> M-x eval-expression auto-mode-alist
<flux> is tuareg mode there?
<flux> btw, when you open an .ml file does it go just in the fundamental mode or ocaml mode?
<appleby> fundamental
<appleby> when I type M-x eval-expession
<appleby> then I type space
<appleby> it says [Sole completion]
<flux> well actually you need to press enter
<appleby> k
<appleby> (("\\.ml[ily]?$" . tuareg-mode) ("\\.topml$" . tuareg-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . emacs-lisp-byte-code-mode) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ...)
<flux> ok, so that seems to be fine
<flux> though curiously it's mentioned there only once, I would have expected it would be there twice (once after startup, second time after manually evaluating the buffer)
Thooms has joined #ocaml
<flux> if you enter M-x tuareg-mode, does it work?
<appleby> says symbol's definition is void
<flux> how about M-x eval-expression (require 'tuareg-mode) ?
lovethroat has joined #ocaml
<appleby> says
<appleby> let: Invalid read syntax: ")"
<flux> hmm
<flux> that sounds.. weird..
<flux> does your tuareg-mode.el look like it should?
<flux> btw, my tuareg-mode is over 200 kilobytes
<ggole> Huh? Are you getting the prompt down the bottom when you do M-x?
<flux> though it's possibly more recent than one -from 2010-
<flux> maybe you could upgrade it as well :)
<appleby> Wait
<appleby> so when I did
<appleby> M-x eval-expression (require 'tuareg-mode)
<appleby> I was doing M-x eval-expression (require 'tuareg-mode')
sagotch has quit [Ping timeout: 245 seconds]
<appleby> and now when I do M-x eval-expression (require 'tuareg-mode), it says debugger entered--Lisp error
<appleby> my tuareg.el is 129 kb
<appleby> no tuareg-mode.el
mchqwerty has joined #ocaml
<flux> what are the topmost errors? or you can put the whole shebang at a paste site
<flux> oh, I meant tuareg.el alright
<ggole> It might be (require 'tuareg)
vpit3833` has joined #ocaml
<ggole> But that's what you'd expect if emacs can't find the code.
<flux> and that as well :)
<flux> I just read the autoload command and and mistakenly chose the wrong name
<flux> so, next step, (require 'tuareg) :-)
<appleby> Debugger entered--Lisp error: (file-error "Cannot open load file" "tuareg-mode")
<appleby> require(tuareg-mode)
<appleby> eval((require (quote tuareg-mode)) nil)
<appleby> eval-expression((require (quote tuareg-mode)) nil)
<appleby> call-interactively(eval-expression record nil)
<appleby> command-execute(eval-expression record)
<appleby> execute-extended-command(nil "eval-expression")
<appleby> call-interactively(execute-extended-command nil nil)
<flux> yes, the topmost line would have done juust fine..
<ggole> Yep, emacs can't find the code.
<ggole> It's not clear why.
<flux> it is clear, the name was wrong
<flux> it should have been (require 'tuareg) in my instructions
<ggole> Didn't he just get a backtrace from that?
<ggole> (If not, forget what I said.)
<flux> "(file-error "Cannot open load file" "tuareg-mode")" looks like 'no'
<appleby> so then...
<ggole> Oh, it's there on the second line. Indeed.
<ggole> Sorry. :)
<appleby> if this is my emacs file
<appleby> (add-to-list 'load-path "~/.elisp/tuareg-mode")
<appleby> (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
<appleby> (autoload 'camldebug "camldebug" "Run the Caml debugger" t)
<appleby> (autoload 'tuareg-imenu-set-imenu "tuareg-imenu"
<appleby> "Configuration of imenu for tuareg" t)
<appleby> (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu)
<appleby> (setq auto-mode-alist
<appleby> (append '(("\\.ml[ily]?$" . tuareg-mode)
<appleby> ("\\.topml$" . tuareg-mode))
<appleby> auto-mode-alist))
<appleby> (message "test!")
<appleby> what's wrong
<flux> (you know, people often don't like it when people paste line after another to irc, and rather have it put to a paste site instead)
<appleby> yea, sorry
<flux> you should try if (require 'tuareg) works
<flux> with M-x eval-expression
<appleby> same thing
vpit3833 has quit [Ping timeout: 250 seconds]
<appleby> function symbol void
<flux> ok, how about (load-file "~/.elisp/tuareg-mode/tuareg.el") ?
<appleby> with M-x eval?
<flux> yes
<ggole> You can shortcut that with M-:, btw
<appleby> wtf void
<flux> it should return 't'
<flux> well, next step: open tuareg.el in emacs
<flux> and evaluate that buffer
vpit3833` is now known as vpit3833
<flux> (also I would remind you that you tuareg.el looks curiously small and old, maybe it has an issue with your emacs that has been solved in a more recent version)
<appleby> for some very weird reason
<appleby> my 2 tuareg files are different
<flux> 2 tuareg files?
<appleby> one which I copied over from another directory
<flux> out of disk space?
<appleby> i downloaded it to my desktop
<appleby> and copied it to the elisp folder
<appleby> ok nvm nvm
<appleby> sorry
<appleby> was scrolled down in one
<appleby> for some reason when I open my tuareg.el in my elisp directory
<appleby> the title of my emacs editor says tuareg.el<2>
<appleby> whatever that means
<flux> you have two different tuareg.el files open in your emacs
<appleby> okay when I evaluate buffer
<appleby> of tuareg.el
<appleby> it says symbol's function def is void
<flux> so maybe there's something wrong in it and that's the ultimate reason why nothing earlier has worked?
<ggole> So the void-function error was tuareg.el all along -_-
<ggole> ...presumably. Which symbol is named in the error?
<appleby> can I get a link to a site
<appleby> doesn't say any symbol
<appleby> I was using this
<appleby> with version 1.45.7
<ggole> You should see something like Symbol's function definition is void: foo in *Messages*
<appleby> ok
<appleby> from that link
<appleby> which files do I need
<appleby> after unzipping
<appleby> just tuareg.el?
<flux> it probably has installation instructions.. I would take all, if it has many .el files they may depend on each other
yacks has quit [Ping timeout: 260 seconds]
cago has joined #ocaml
<appleby> so it says to put this in my emacs file
<appleby> (load "/where/ever/you/put/tuareg-mode/tuareg-site-file")
<appleby> but I have tuareg-site-file.el
<appleby> do I add the .el?
<flux> documentation for load says "Execute a file of Lisp code named FILE. First try FILE with `.elc' appended, then try with `.el',"
<flux> so: no need to add .el
<flux> (btw, documentation for functions can be reached with C-h f functionname)
<appleby> IT WORKED
<flux> congratulations!
<flux> now you can try installing merlin and wondering why it doesn't work.. ;-)
<appleby> lol
appleby has quit [Quit: appleby]
xaimus has quit [Ping timeout: 248 seconds]
yacks has joined #ocaml
xaimus has joined #ocaml
talzeus has quit [Remote host closed the connection]
<rgrinberg> Drup: marshal should be easy. why bencode however? it's not a very useful protocol outside of reading torrent files imo
<Drup> curiosity :p
lovethroat has quit [Ping timeout: 248 seconds]
<Drup> ( companion_cube has talked too much about it, I'm contaminated )
<rgrinberg> sexplib/binprot might also be interesting
<rgrinberg> P.S. how is the raw ocsigen http stuff? Is there anything I can pillage for cohttp?
<rgrinberg> or is it ocamlnet based?
<Drup> not sure to understand the question
<Drup> ocsigen is not ocamlnet based
avsm has joined #ocaml
avsm has quit [Client Quit]
<rgrinberg> i mean request/response read/write, cookies, auth, etc.
<Drup> oh, you mean, could you steal feature from ocsigen for cohttp ?
<Drup> yes, you can, that would be desirable actually
<rgrinberg> yeah cohttp has its own but it's not very optimized currently
<rgrinberg> i've looked at what else is there and both ocsigen and ocamlnet have this functionality as a subset as well i believe
<Drup> vincent talked to me a few time about the fact it would be good to make ocsigen more modular, and one way was to use cohttp as base, but, according to what he told me, ocsigen is using stuff that are not in cohttp
<Drup> performance wise, ocsigen is good, probably not fantastic, but quite good
AltGr has joined #ocaml
<rgrinberg> yeah I see, that woudl make sense because cohttp is still not nearly as mature
<Drup> the big issue with ocsigen is clearly not feature or performances, it's just the fact that the core is quite in one piece
<Drup> on the other hand, the extension mechanic is nice
<Drup> rgrinberg: if you are interested by this, ask vincent about it, he will tell you far more than I could
<rgrinberg> Drup: thanks, let me do some homework on this first. What I'm interested in should be in: ocsigen/ocsigenserver, correct?
<Drup> yes
<Drup> the code is a bit ... rough on the edge
<rgrinberg> I'm not sure about the code yet but I did try using ocsigen as an http client before
<rgrinberg> the interface was a little... strange
<Drup> oh yeah
<Drup> the http client is a bit weird, since you need to bring the server with it
<Drup> that's one of the "come in one piece" issue I was talking about :)
<Drup> (and this module is admittedly a bit experimental, since it's not used a lot)
sagotch has joined #ocaml
<sagotch> I apologize if I alreayd asked, but connection is not good and I think my message did not passed.
<sagotch> How to put an unicode char in a string ? writing "中国" is OK, "\u00E9" is not
<Drup> (can confirm your messages did not reach us)
<sagotch> (trying to avoid the use of extern library to handle utf8, cause I just need to parse it, not to make operations on it)
WraithM has quit [Ping timeout: 245 seconds]
<sagotch> Is there a special character to represent this \u ?
hto__ has quit [Quit: leaving]
hto___ has quit [Quit: leaving]
hto_ has quit [Quit: leaving]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
ontologiae has joined #ocaml
nikki93 has quit [Remote host closed the connection]
sagotch has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
sagotch has joined #ocaml
talzeus has joined #ocaml
ontologiae has joined #ocaml
jonludlam has joined #ocaml
talzeus has quit [Remote host closed the connection]
lovethroat has joined #ocaml
talzeus has joined #ocaml
sagotch has quit [Ping timeout: 245 seconds]
sagotch has joined #ocaml
sagotch_ has joined #ocaml
sagotch has quit [Ping timeout: 245 seconds]
Yoric has joined #ocaml
csakatoku has quit [Remote host closed the connection]
nikki93 has joined #ocaml
zxqdms has joined #ocaml
<Kakadu> Can you explain me shortly what is Centre National de la Recherche Scientifique? Is it related to INRIA or OCaml somehow?
venk has quit [Ping timeout: 248 seconds]
<adrien_oww> both INRIA and CNRS are government stuff (mostly)
<adrien_oww> and both are large
ollehar has joined #ocaml
<jpdeplaix> CNRS is larger
<jpdeplaix> and not really related to OCaml
talzeus has quit [Read error: Connection reset by peer]
lovethroat has quit [Ping timeout: 272 seconds]
dsheets has quit [Ping timeout: 245 seconds]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
nikki93 has quit [Ping timeout: 250 seconds]
dsheets has joined #ocaml
kyrylo has joined #ocaml
rand000 has joined #ocaml
sagotch_ has quit [Quit: Page closed]
rand000 has quit [Quit: leaving]
mchqwerty has quit [Remote host closed the connection]
mchqwerty has joined #ocaml
<gasche> Kakadu: CNRS and INRIA are French national bodies that pay full-time researchers without teaching obligation
nikki93 has joined #ocaml
watermind has joined #ocaml
ygrek has joined #ocaml
watermind has quit [Ping timeout: 272 seconds]
watermind has joined #ocaml
<gasche> def-lkb, rks_: I regret you implement those syntax extensions in Merlin
<rks_> what do you mean?
<gasche> if you said "no", people would have to use -ppx instead, which is easier to support and probably better in the long run
<rks_> well, I think they will
<gasche> currently people conveniently avoid changing their infrastructure, because they can rely on the tooling people to take the burden of non-standard-ism
<rks_> once 4.02 is out, that is
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
nikki93 has quit [Ping timeout: 248 seconds]
<companion_cube> o/
sagotch has joined #ocaml
thomasga has joined #ocaml
avsm has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
yacks has quit [Quit: Leaving]
r0b1 has quit [Ping timeout: 260 seconds]
darkf has quit [Quit: Leaving]
shinnya has joined #ocaml
<sagotch> http://pastebin.com/mhTkEdvJ >> Why do you have to `open Unix` or ask for `d.Unix.tm_year` to avoid the warning?
<sagotch> (btw, I already opened a module in this file which explicitly `open Unix`)
<ggole> open is not recursive
<ggole> I think the the warning is new, and that the code would not compile in previous versions of OCaml
<sagotch> ok, but I specified Unix.tm type in function signature
<ggole> Until very recently, field access was insensitive to type
<ggole> So you had to either open the module or qualify the name.
<sagotch> hum... did not know that
<sagotch> thank you
<sagotch> but what does `d.Unix.tm_year` means?
<flux> the module Unix defines record tm that has field tm_year, and d has type Unix.tm
<flux> actually, ocaml 4.x brings a feature that allows to elide that .Unix from that expression
<flux> though it is considered fragile, so you probably want to disable the associated warning 40 if you are going to use it
<flux> (I'm testing the feature on a couple small projects of mine ;))
<flux> so to answer you question: it returns the tm_year field of the value d :)
<ggole> sagotch: that's the qualification that allows you to use several modules which define records using the same field names
li6 has joined #ocaml
<flux> btw, the feature I mentioned probably requires that the compiler already knows the type of d
<ggole> Basically it's there because type inference isn't precise enough.
<flux> type inference works like this: it sees you have expression d.Unix.tm_year, ok, so d's type must be Unix.tm
<flux> unless it (in 4.x) happens to already know that d is Unix.tm (for example, you have defined that d is a parameter of that type)
<flux> in that case it can realize that ok d.tm_year, well d is Unix.tm so the field comes from there as well
<flux> AFAIK the compiler does not try to search all available modules for records with field tm_year
<flux> nor can a value be polymorphic so that it could have tm_year field of module A or B depending on how the function is called
<sagotch> I understand that, but why isn't `let string_of_date (d : Unix.tm) : string ` enough to infer type? (for what I understood, old compiler where unable to avoid the `.Unix`)
<li6> but… but…
<li6> ÇA NE FAIT PAS SENS
nikki93 has joined #ocaml
li6 has quit [Client Quit]
appleby has joined #ocaml
<flux> it is enough to infer type in current ocaml versions
<ggole> It is enough to infer the type of d
<ggole> But in previous OCaml versions, field access was not sensitive to type.
<sagotch> you mean there was no way to tell the compiler which type it was?
<flux> it was possible to tell the type of 'd'
<flux> but it was not used for finding out what fields it has
<flux> when a record field was being accessed in format x.y, the record with field y must have existed in current scope
<flux> so nowadays this works: let f (d : Unix.tm) = d.tm_year - earlier it did not work
<sagotch> I see
<sagotch> thanks again
<gasche> (to sum up: record fields live in a precise scope, unless you disable this warning and they become attached to their types)
<flux> in some cases, though, you might be happy if your type-inferred code actually read foo.ModuleName.bar
<flux> because in that case you, the person reading the code, can easily infer the type in your head
<flux> but I suppose in many cases it doesn't matter, especially if you are already familiar with the code base, or you have tools such as Merlin available
<flux> actually probably normal ocaml mode is able to tell the type of 'd' precisely in that case..
yacks has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
appleby has quit [Quit: appleby]
appleby has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
nikki93 has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
coke0 has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
Eyyub has joined #ocaml
coke0 has joined #ocaml
appleby has quit [Quit: appleby]
metasyntax has quit [Quit: Leaving]
<rks_> gasche: https://github.com/the-lambda-church/merlin/issues/152 I'll close if you don't answer :)
oriba has joined #ocaml
coke0_ has joined #ocaml
<gasche> rks_: I don't really know, I'll try to answer by the end of the week
<gasche> installing merlin through OPAM means that I never quite know which version I'm using, as it depends on which switch was enabled when emacs started
coke0 has quit [Ping timeout: 252 seconds]
mch has joined #ocaml
mch has quit [Read error: Connection reset by peer]
r0b1 has joined #ocaml
kaustuv has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
<troydm> can i get a value out of option without using match expression
<troydm> is there a function that extracts value from option?
nikki93 has joined #ocaml
<kaustuv> Option.get in batteries
<kaustuv> nothing in the standard library as far as I know
<kaustuv> My recommendation would be not to avoid match though. It forces you to think about failure conditions and makes your code more robust.
cago has quit [Quit: Leaving.]
<troydm> kaustuv: k, thx
totimkopf has joined #ocaml
ocp has joined #ocaml
Kakadu has quit [Quit: Page closed]
appleby has joined #ocaml
lostcuaz has joined #ocaml
appleby has quit [Client Quit]
nikki93 has quit [Remote host closed the connection]
kaustuv_ has joined #ocaml
ousado_ has joined #ocaml
rom1504_ has joined #ocaml
xaimus_ has joined #ocaml
d2biG has joined #ocaml
kaustuv has quit [*.net *.split]
AltGr has quit [*.net *.split]
xaimus has quit [*.net *.split]
ousado has quit [*.net *.split]
dRbiG has quit [*.net *.split]
thizanne has quit [*.net *.split]
rom1504 has quit [*.net *.split]
WraithM has joined #ocaml
mchqwerty has quit [Quit: Odcházím]
thizanne has joined #ocaml
sagotch has quit [Quit: Page closed]
rand000 has joined #ocaml
rand000 has quit [Client Quit]
nikki93 has joined #ocaml
avsm has quit [Quit: Leaving.]
lovethroat has joined #ocaml
amirmc has joined #ocaml
<rks_> gasche: ok, thanks!
shinnya has quit [Ping timeout: 250 seconds]
talzeus has joined #ocaml
rand000 has joined #ocaml
talzeus has quit [Remote host closed the connection]
mreca has joined #ocaml
Kakadu has joined #ocaml
Eyyub has quit [Ping timeout: 272 seconds]
kaustuv_ has left #ocaml []
rand000 has quit [Read error: Connection reset by peer]
jwatzman|work has joined #ocaml
lovethroat has quit [Ping timeout: 272 seconds]
Yoric has quit [Ping timeout: 265 seconds]
nikki93 has quit [Remote host closed the connection]
angerman has joined #ocaml
tlockney_away is now known as tlockney
appleby has joined #ocaml
amirmc has quit [Quit: Leaving.]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
jonludlam has quit [Remote host closed the connection]
amirmc has joined #ocaml
ocp has quit [Ping timeout: 245 seconds]
<flux> is this a sufficient bug report to submit on merlin? http://www.modeemi.fi/~flux/ocaml/ocamlmerlin-whitespace.png
<rks_> flux: what's going on?
<flux> the tabs break the location of the error
<rks_> which editor?
<flux> emacs
<rks_> oh.
<rks_> well sure then, report :)
<ggole> But in previous OCaml versions, field access was not sensitive to type.
<ggole> Oops, sorry
thomasga has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
skchrko has quit [Quit: Leaving]
<flux> hmm, so does the threading support of merlin work for people?
amirmc has quit [Quit: Leaving.]
<flux> or is there actual support.. I just found three instances of threads from the github search..
<flux> a few more with git grep, but still not convinced..
<flux> shall file an issue :)
Eyyub has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
nlucaroni has joined #ocaml
<flux> but then I have this mysterious case where a let open Vector in .. is singled out by merlin as Vector being a non-existing module..
<flux> dunno why exactly that module, others work. well Batteries' Option is also a similar case..
<flux> can I debug in some useful manner?
gereedy has quit [Ping timeout: 265 seconds]
<flux> +it
gereedy has joined #ocaml
<companion_cube> flux: even with :Use batteries or the emacs equivalent
<flux> I put PKG batteries to .merlin
<flux> seems to work with other packages and modules
<flux> not sure what :Use batteries does in vim?
<companion_cube> the same
<companion_cube> so it's something else, don't know what
<flux> actually, it could be related to the threads problem
tizoc has quit [Quit: Coyote finally caught me]
<flux> because AFAIK batteries now requires threads?
<companion_cube> no, there is batteries.thread or something like this
AltGr has joined #ocaml
<flux> funny how my small reproductions don't seem to work the same as the original cases..
<companion_cube> hmmmmm, I may talk too fast
<companion_cube> #require only shows batteries
<companion_cube> but you need to open BatteriesThread in addition to Batteries
lostcuaz has quit [Ping timeout: 260 seconds]
tizoc has joined #ocaml
AltGr has left #ocaml []
AltGr has joined #ocaml
lostcuaz has joined #ocaml
yacks has quit [Read error: Operation timed out]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
tlockney is now known as tlockney_away
Eyyub has quit [Ping timeout: 260 seconds]
Eyyub has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
Thooms has quit [Quit: WeeChat 0.3.8]
appleby has quit [Quit: appleby]
nikki93 has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasga has joined #ocaml
rand000 has joined #ocaml
cyanure__ has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Ping timeout: 250 seconds]
dsheets has quit [Ping timeout: 245 seconds]
<troydm> is using a tuple a good idea to match two values at the same time?
<nlucaroni> you bet.
<troydm> like match (a,b) with (1,2) -> true | _ -> false
<nlucaroni> you can drop the parens if you want.
<ggole> That's a very common pattern.
manizzle has joined #ocaml
zurgl has joined #ocaml
zurgl has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<flux> also related, binding multiple values at once: let x_abs, y_abs = abs_float x, abs_float y in ..
NoNNaN has joined #ocaml
Eyyub has quit [Ping timeout: 260 seconds]
<seliopou> any ocaml thrift contributors around?
zurgl has joined #ocaml
<flux> hmph, somewhat annoying that Cairo2's matrix interface
<flux> you cannot duplicate a matrix.. well, you maybe can by setting and getting it to/from the cairo context, but..
Eyyub has joined #ocaml
<flux> nevermind :) it's actually an ocaml record :-)
<flux> though this does look a bit stupid.. let dup_matrix (m : Cairo.matrix) = { m with Cairo.xx = m.Cairo.xx }
lovethroat has joined #ocaml
Eyyub has quit [Read error: Operation timed out]
Eyyub has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz_ has joined #ocaml
tobiasBora has joined #ocaml
Eyyub has quit [Ping timeout: 250 seconds]
Eyyub has joined #ocaml
dsheets has joined #ocaml
Eyyub has quit [Read error: Operation timed out]
Eyyub has joined #ocaml
yastero has joined #ocaml
watermind has joined #ocaml
watermind has quit [Client Quit]
manizzle has quit [Quit: Leaving]
<troydm> can i have function with the same name but with different types of arguments
<bitbckt> that would be overloading. no.
<troydm> so i can have let's say a function called f that takes a pair of tuples
<troydm> that i think is the only thing i'm missing right now
<troydm> and it makes me rly rly sad
ggole has quit []
<troydm> because now i need to come up with different function names for same logical operations :(
<bitbckt> if you must, you could put them in different modules and use local opens to achieve that effect.
zpe has joined #ocaml
syntropy has joined #ocaml
_andre has quit [Quit: leaving]
syntropy has quit [Client Quit]
Yoric has joined #ocaml
Eyyub has quit [Ping timeout: 250 seconds]
Eyyub has joined #ocaml
lovethroat has quit [Ping timeout: 260 seconds]
contempt has quit [Ping timeout: 260 seconds]
contempt has joined #ocaml
zurgl has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mreca has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
rainbyte has quit [Ping timeout: 260 seconds]
rainbyte has joined #ocaml
ulfdoz has joined #ocaml
rainbyte has quit [Ping timeout: 250 seconds]
contempt has quit [Ping timeout: 260 seconds]
zxqdms has quit [Quit: leaving]
contempt has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
Yoric1 has joined #ocaml
<nlucaroni> +1 bitbckt. i'd do that troydm. or append each with a type description (_float/_int). or figure out how to make it polymorphic if possible.
Eyyub has quit [Ping timeout: 245 seconds]
Eyyub has joined #ocaml
malo has joined #ocaml
<troydm> nlucaroni: ic
thomasga has quit [Quit: Leaving.]
rand000 has quit [Quit: leaving]
n0v has quit [Quit: !]
n0v has joined #ocaml
pyon has joined #ocaml
axiles has quit [Remote host closed the connection]
Kakadu has quit [Quit: Konversation terminated!]
cyanure__ has quit [Remote host closed the connection]
ocp has joined #ocaml
travisby has joined #ocaml
Eyyub has quit [Read error: Operation timed out]
pyon has quit []
Eyyub has joined #ocaml
<travisby> Hi guys. I'm new to ocaml, coming from a little of a haskell background. Is there a way to clean up my simple tokenizer implementation (the part at line 47). In Haskell, I would have used guards. Is there a better way than nested if-else blocks in vanilla ocaml? http://pastebin.com/AYuGFaR7
pyon has joined #ocaml
<travisby> I figured ocaml would be fun to learn for my compilers class this semester ^.^
<nlucaroni> there are guards in ocaml: | str when Str.string_match id_regex str 0 ->
<travisby> nlucaroni: thanks! A quick google had showed me an extension library. Glad to see there was something builtin
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lovethroat has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lovethroat has quit [Ping timeout: 250 seconds]
Yoric1 has quit [Ping timeout: 246 seconds]
appleby has joined #ocaml
nikki93 has quit [Remote host closed the connection]
gereedy has quit [Ping timeout: 265 seconds]
<seliopou> Has anybody used thrift with an jane street's async as is? Seems like they're a bit incompatible...
_habnabit has quit [Remote host closed the connection]
gereedy has joined #ocaml
_habnabit has joined #ocaml
appleby has quit [Quit: appleby]
d2biG is now known as dRbiG
angerman has quit [Quit: Gone]
tlockney_away is now known as tlockney
Thooms has joined #ocaml
<orbitz> seliopou: i have not, does thrift have its own event loop/blocking?
<seliopou> orbitz: yeah, a while loop :P
<seliopou> I think they're fundamentally incompatible
<seliopou> but just wanted to see if anybody would contradict that
WraithM has quit [Quit: leaving]
<orbitz> seliopou: what's the while loop looping on?
<seliopou> orbitz: true
<orbitz> how is it getting input?
<seliopou> ah i see what you're asking
<seliopou> blocking on accept
<orbitz> that's wkward
<seliopou> yeah i don't think there's a way for the scheduler to actually maintain control there
<orbitz> is that the rpc layer? my protobufs implemenation lets the user figure out how to get the bytes and just handles parsing them
WraithM has joined #ocaml
<orbitz> seliopou: there aren't functions for just doing the parsing?
<seliopou> orbitz: yeah I think I'm going to create an async submodule and just implement it myself
<seliopou> sending the result upstream once it works
<orbitz> why does thrift even have to care about the socket layer?
<orbitz> how do you write thrift stuff to files, for example?
<seliopou> orbitz: thrift was originally conceived as an rpc layer, not just a serialization library
<orbitz> sure, but rpc is built on top of serialziatio
<orbitz> so you can't just access teh serialization?
<seliopou> so you write down what a service looks like in an IDL, and it handles the serialization, protocol, generates client library, and stub server code
lilred has joined #ocaml
<seliopou> the point is that it was intended as an end-to-end, out of the box solution to writing services using custom rpc interface
<seliopou> that's the historical story
<seliopou> not saying it's right or wrong
<seliopou> but it's what they made
<orbitz> yeah i get you, i'm just asking if they expose the underlying layers
<seliopou> now of course under the hood, there are different modules for all of this
<lilred> Anyone here using OMake? The documentation isn't very clear about what I should do if my project includes multiple executables, and sometimes I only want to build one or a few
<seliopou> or rather classes
<seliopou> and those classes can't be polymorphic
<seliopou> so you can't just write a Async-based Transport and throw it in there
<seliopou> you have to write an Async-based transport and everything above it in the stack
<seliopou> sad
<seliopou> :/
<seliopou> meh, this might be more trouble than it's worth
<seliopou> orbitz you use protobufs?
lilred has quit [Client Quit]
nikki93 has joined #ocaml
ocp has quit [Ping timeout: 250 seconds]
ulfdoz has quit [Ping timeout: 245 seconds]
<orbitz> seliopou: not for anything serious, but yes
pyon` has joined #ocaml
pyon is now known as Guest54526
Simn has quit [Quit: Leaving]
pyon` is now known as pyon
pyon has quit [Changing host]
pyon has joined #ocaml
<orbitz> seliopou: my protobuf library is in opam if you want to use it. i plan on doing some fixing up this weekend though, there are some bugs i think. i want to add some prop testing
Guest54526 has quit [Ping timeout: 260 seconds]
ikaros has joined #ocaml
ikaros has quit [Client Quit]
AltGr has left #ocaml []
ikaros has joined #ocaml
ikaros has quit [Remote host closed the connection]
ikaros has joined #ocaml
saml has quit [Quit: Leaving]
jao has quit [Ping timeout: 260 seconds]
lostcuaz has joined #ocaml
totimkopf has quit [Quit: leaving]
ikaros has quit [Quit: Ex-Chat]
zpe has quit [Remote host closed the connection]
tobiasBora has quit [Quit: Konversation terminated!]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
Eyyub has quit [Ping timeout: 272 seconds]
acieroid` has joined #ocaml
Eyyub has joined #ocaml
acieroid has quit [Ping timeout: 264 seconds]
pyon has quit [Quit: restart]
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
pippijn has quit [Ping timeout: 252 seconds]
zxqdms has joined #ocaml
pippijn has joined #ocaml
Thooms has quit [Read error: Operation timed out]
patronus_ has joined #ocaml
patronus has quit [Ping timeout: 245 seconds]
shinnya has joined #ocaml
pyon has joined #ocaml
coke0_ has quit [Read error: Connection reset by peer]
coke0 has joined #ocaml
darkf has joined #ocaml
coke0 has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
natrium1970 has joined #ocaml
oriba_ has joined #ocaml
rom1504_ has quit [Ping timeout: 272 seconds]
coke0 has joined #ocaml
rom1504 has joined #ocaml
oriba has quit [Ping timeout: 272 seconds]
natrium1970 has quit [Quit: natrium1970]
thomasga has joined #ocaml
coke0 has quit [Read error: Connection reset by peer]
coke0 has joined #ocaml
coke0_ has joined #ocaml
coke0 has quit [Ping timeout: 260 seconds]
ollehar has quit [Ping timeout: 246 seconds]
ollehar has joined #ocaml
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
coke0 has joined #ocaml
oriba_ has quit [Quit: oriba_]
coke0__ has joined #ocaml
Eyyub has quit [Read error: Operation timed out]
coke0 has quit [Read error: No route to host]
coke0 has joined #ocaml
lovethroat has joined #ocaml
coke0_ has quit [Ping timeout: 260 seconds]
tianon has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
coke0__ has quit [Ping timeout: 272 seconds]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
lovethroat has quit [Ping timeout: 260 seconds]
zxqdms has quit [Quit: leaving]
dsheets has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 250 seconds]