FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
ygrek_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
AlexDenisov has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
blackfry has quit [Ping timeout: 246 seconds]
blackfry has joined #ocaml
_13h has joined #ocaml
mcspud has quit [Ping timeout: 246 seconds]
blackfry has quit [Ping timeout: 246 seconds]
larhat has joined #ocaml
blackfry has joined #ocaml
wazntmi has joined #ocaml
p_nathan has joined #ocaml
mcspud has joined #ocaml
rossberg has quit [Ping timeout: 264 seconds]
<vtomole>
I'm trying to compile this:https://raw.githubusercontent.com/llvm-mirror/llvm/master/examples/OCaml-Kaleidoscope/Chapter3/lexer.ml, but i'm getting a syntax error "File "lexer.ml", line 7, characters 2-3: Error: Syntax error"
rossberg has joined #ocaml
freusque has joined #ocaml
cheater has quit [Ping timeout: 260 seconds]
cheater has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
jimt_ is now known as jimt
cheater has quit [Ping timeout: 268 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
argent_smith has joined #ocaml
Simn has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
jnavila has joined #ocaml
mengu has joined #ocaml
alfredo has joined #ocaml
raphinou has joined #ocaml
<rgrinberg>
@vtomole that's a camlp4 lexer I believe. Something that's relatively obsolete at this point.
elfring has joined #ocaml
zpe has joined #ocaml
foo30303 has joined #ocaml
alfredo has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
govg has joined #ocaml
<vtomole>
rgrinberg: Looks like they haven't updated that part of the repo or the llvm website. Is there anywhere i can turn to? Or do i have to fix the errors myself? I am an ocaml newbie.
<rgrinberg>
Hmm, I was gonna say to just port the lexer to pure ocaml or even ocamllex
<rgrinberg>
but if you're a newbie you're out of luck then
<Leonidas>
gjaldon__: that looks like it is just a library. i use patdiff specifically as diff tool and show it to other, not-yet ocaml programmers :)
<flux>
vtomole, well, the lexer and parser parts of the tutorial seem to use camlp4, but then when it starts to create IR it doesn't..
mrnugget has joined #ocaml
<Leonidas>
should be decamlp4ified, I guess.
<Leonidas>
vtomole: i mean, you can still use camlp4
<flux>
I guess doing that would involve adding another library dependency
<flux>
right, if you just want to go through the tutorial, it should be possible. however, if you want to go forward with other modern syntax extensions, you cannot combine camlp4 programs with ppx-using programs. (also I have my doubts if campl4 supports all the new language constructs)
ollehar has left #ocaml [#ocaml]
<Leonidas>
as long as you don't use them in the lexer (which tend to be rather straightforward) it can be combined with pure ml modules without issues
<Leonidas>
maybe whitequark could update the tutorial ^^
<vtomole>
How is it supposed to be compiled with the code?
<Leonidas>
_tags is a control file for ocamlbuild
<Leonidas>
so it should call camlp4 by itself
blackfry has joined #ocaml
mrnugget has quit [Remote host closed the connection]
tg has quit [Excess Flood]
blackfry has quit [Ping timeout: 246 seconds]
blackfry has joined #ocaml
tg has joined #ocaml
sepp2k has joined #ocaml
AlexDenisov has joined #ocaml
AltGr has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
wazntmi has quit [Ping timeout: 240 seconds]
orbifx-m has joined #ocaml
mfp has joined #ocaml
kakadu has joined #ocaml
<p_nathan>
Stupid Ocamlbuild question: when I break up a program into separate files, do I need to have a .mli file paired with each .ml file if I want that code to be includeable?
kakadu has quit [Client Quit]
kakadu has joined #ocaml
<vtomole>
I'm getting "Error: Unbound module Llvm" I already did "opam install llvm.3.8"
argent_smith has quit [Quit: Leaving.]
octachron has joined #ocaml
argent_smith has joined #ocaml
<flux>
vtomole, how do you get it? installing a module doesn't make it part of your project
<flux>
ocamlbuild says that?
<octachron>
p_nathan, it shouldn't be needed; even if having .mli file is a good idea in the long term
argent_smith has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
TarVanim_ has joined #ocaml
<vtomole>
flux: Yup specifically with the codegen.ml file. I thought it did cause i just installed camlp4 and i'm not getting that lexer error anymore.
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
argent_smith has joined #ocaml
<def`>
kakadu: which version of merlin are you using?
<kakadu>
from repo
<def`>
ok, it fixed the problem with merlin.hole?
<kakadu>
I have some issues with reproducing it....
<def`>
it is easy to achieve with released 4.04 version
<def`>
"let _ = ??" should trigger it
<kakadu>
Yeah, merlin.hole seems to be fixed
<kakadu>
but cmxs serarch path doesn't
<kakadu>
also, it seems that you renamed to `ocamlmerlin-server` ?
<def`>
cmxs search has to do with deriving
<def`>
kakadu: no, there are two binaries now, ocamlmerlin & ocamlmerlin-server
<def`>
ocamlmerlin is a thin wrapper that redirects calls to an appropriate server instance
<kakadu>
can this change brake IDE integration?
<def`>
which IDE?
<def`>
emacs & vim have been ported, for other editors the protocol was designed to be backward compatible. However, the wrapper needs some heuristics to determine the path of the binary (this is not a well defined concept in unix ...)
<kakadu>
I use atom plugin
<kakadu>
I strace ocamlmerlin-server and it seems taht mesages from atom are not reach it
<def`>
Do you have any backtrace from atom?
silver has joined #ocaml
<kakadu>
not really, no
<def`>
hmm, let me try something and update after :)
<kakadu>
wait
<kakadu>
it seems that after a few restarts it strated to work again
<kakadu>
weird
<kakadu>
sorry for the noise
<kakadu>
I probably did something wrong
<kakadu>
oh, crap
blackfry has quit [Ping timeout: 246 seconds]
<def`>
?
blackfry has joined #ocaml
<kakadu>
I do a few edits, it works
<kakadu>
but a little bit later it stops sending messages to ocamlmerlin
<def`>
(this version output log information on stderr, some editor modes merge stdout and stderr and cannot parse some answers!)
<def`>
(I pushed a fix to disable that in compatibility mode on master)
<kakadu>
when did you push it?
<def`>
a minute ago
<kakadu>
nope
<kakadu>
which branch should I pin merlin ?
<kakadu>
Also, everyhting seems to die After I see in the strace this string
<def`>
this is the debug information, output on stderr
<def`>
which atom parses as a normal answer (on stdout)
<def`>
the patch I pushed (Mon Mar 13 12:04:27 2017 +0100) fixes that
<def`>
....
<def`>
which I commited but didn't push :D
<kakadu>
okay
<def`>
done now :)
kakadu has left #ocaml ["Konversation terminated!"]
kakadu has joined #ocaml
<def`>
arg wait a minute
<def`>
you can try
<kakadu>
It works
<kakadu>
thanks
<def`>
cool, thanks for your investigation & patience
TarVanim_ has quit [Quit: TarVanim_]
_13h has left #ocaml [#ocaml]
vtomole has quit [Ping timeout: 260 seconds]
_andre has joined #ocaml
tane has quit [Quit: Leaving]
ethanpmorgan has joined #ocaml
<ethanpmorgan>
What are the best resources to learn Ocaml. I have experience i more C like languages like C itslef. Plus php, Golang and so on
nomicflux has joined #ocaml
<mengu>
ethanpmorgan: books & this channel
<mengu>
unfortunately there are not much video resources
<ethanpmorgan>
Damn okay, I've never touched a function language before and really want to expose myself to it. I've followed very little with Haskell and I understand that it has a better community on documentation but Ocaml seems more enjoyable
<ethanpmorgan>
I'll look around for what I can find :D
<mengu>
ethanpmorgan: there's actually a great free book, if you're interested in
<smondet`>
*** smondet` has changed mode for smondet` to +i
<smondet`>
(ugh sorry for the emacs IRC mess)
<flux>
interesting, but I wonder if it's a feature useful enough to warrant the work.
tane has joined #ocaml
copy` has joined #ocaml
snowcrshd has joined #ocaml
<infinity0>
what were you planning for it? would be good if all languages could agree on operators like $ for function application ¬.¬
neversaynever has quit [Ping timeout: 260 seconds]
<Drup>
flux: macros are certainly useful enough
<Drup>
the choice of operator, that's a different question
<reynir>
embrace unicode and use € as the operator \o/
* reynir
ducks and hides
<flux>
drup, do macros (as in that repo) bring more than performance to the table?
<flux>
for example the example of printf is compelling, but in the end it "only" shifts some runtime work to compile time
<flux>
in principle a good enough compiler could do that by itself ;)
profan has joined #ocaml
jnavila has quit [Quit: It was time]
govg has quit [Quit: leaving]
<Drup>
the argument "there exists a good enough compiler" is absurd, and pretty much everyone that look at this question careful knows it
<Drup>
there is no such compiler, despise the fact that this argument has been used for decades, and there never will be
<Drup>
Explicit staging directives are more expressive and much much easier to control
ryanartecona has quit [Quit: ryanartecona]
<Drup>
flux: you should read the POPL paper "stream fusion to completeness" (or watch their talk), they make a good case for explicit staging annotations
<Drup>
(to answer your question, for me it's more about semantics, but yes, it's mostly a question of "when stuff are computed")
<flux>
can those macros inspect the compiling environment, ie. environment variables or databases ala pgocaml?
<Drup>
I'm not sure about that particular implementation
<flux>
they would be a bit more interesting to me if they could be used for converting ie. numbers to types, but it seems that's outside the scope as well
<flux>
c++ templates are pretty cool.. ;-)
<flux>
of course that would be even more complicated, type-directed macro invocation
<Drup>
well, you can do interesting things if you combine macros/metaocaml+implicits ...
<flux>
yeah, I can do something nobody on earth is going to understand ;-)
<Drup>
Actually :p
<flux>
"When I wrote this code, there were only two who understood it: I, and God. Now only God understands it."
<shon_>
thanks smondet`. Looks to be a bit more light-weight than Calendar.
spew_ has joined #ocaml
<shon_>
I like this idiom a lot: let d = Date.From.string parseR d_string in
<shon_>
Sorry,I meant to pull out the Date.From.string bit.
spew has quit [Ping timeout: 256 seconds]
spew_ is now known as spew
<shon_>
Hmm. that `Should` module the project uses for testing looks interesting.
marsam has joined #ocaml
<shon_>
But I don't see any results in the first couple pages of searching for a module by that name on google... do you know where that comes from, smondet`?