asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hilquias has quit [Remote host closed the connection]
dav- has quit [Ping timeout: 255 seconds]
dav has joined #ocaml
swgillespie has joined #ocaml
jabesed has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 264 seconds]
nullcat_ has joined #ocaml
nullcat_ has quit [Client Quit]
manizzle has quit [Ping timeout: 256 seconds]
jabesed has joined #ocaml
ncthom91 has joined #ocaml
jonh has joined #ocaml
manizzle has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
fyolnish has joined #ocaml
tmtwd has joined #ocaml
nullcat_ has joined #ocaml
rand000 has quit [Quit: leaving]
c74d has quit [Remote host closed the connection]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c74d has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkf has joined #ocaml
nullcat has joined #ocaml
jabesed has quit [Read error: Connection reset by peer]
jabesed has joined #ocaml
hilquias has joined #ocaml
keen_____ has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
keen____ has quit [Ping timeout: 272 seconds]
kushal has joined #ocaml
swgillespie has joined #ocaml
nullcat has joined #ocaml
dariusc93 has joined #ocaml
<dariusc93>
Im not new to ocaml, but im considering using it more but how would one compare it against languages like C/C++, D and/or Rust (Performance wise)
tnguyen has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 255 seconds]
<dmbaturin>
dariusc93: It's quite hard to compare performance of languages. It's quite safe to say 'close to C++', with a lot of buts that always appear in such comparisons.
<Denommus>
dariusc93: it's not a useful comparison. Those are systems languages, OCaml is an application language
b0mbastus has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<dmbaturin>
Well, given how many people write applications in C++, that's still valid. :)
<dariusc93>
dmbaturin, i wouldnt mind writing in C++ (I still do for some stuff) but to be more productive, I am looking for another language that suits what im developing and just want some open opinions. If the performance is good enough or even close too, I wouldnt mind using it, but does ocaml also have a compiler to compile to machine code/native?
<dariusc93>
ocamlopt i think it was?
<dmbaturin>
Yes, ocamlopt is the native code compiler, ocamlc is the bytecode compiler.
<dmbaturin>
Bytecode is many time slower (not just because of inherent overhead, the bytecode compiler doesn't even try to optimize anything AFAIR).
<dariusc93>
if i were to ever use ocamlopt, would it be completely standalone would would i need any shared libraries?
adc90 has quit [Read error: Connection reset by peer]
tnguyen has quit [Quit: tnguyen]
adc90 has joined #ocaml
<dmbaturin>
dariusc93: OCaml libs are statically linked.
<dmbaturin>
It still dynamically links to glibc, and if you are using any bindings to C libraries, to those libraries of course.
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idegen has quit [Quit: Leaving.]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
matason has joined #ocaml
adc90 has quit [Read error: Connection reset by peer]
adc90 has joined #ocaml
nullcat has joined #ocaml
marynate has joined #ocaml
psy_ has quit [Remote host closed the connection]
tnguyen has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
mahem1 has left #ocaml [#ocaml]
ncthom91 has joined #ocaml
<dariusc93>
dmbaturin, i would likely be using bindings to C libraries (most languages do anyway)
marynate has quit [Quit: Leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
nullcat__ has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
matason has quit []
ygrek has joined #ocaml
MercurialAlchemi has joined #ocaml
NSA_Agent has quit [Ping timeout: 245 seconds]
Simn has joined #ocaml
matason has joined #ocaml
n3ss3s has joined #ocaml
<n3ss3s>
I just installed a package through opam (cow), however it doesn't show up with ocamlfind query cow, nor #require "Cow" in utop
<n3ss3s>
any first checks I should do?
<n3ss3s>
eval $(opam config env) did it
<n3ss3s>
oh sweet jesus now utop is not found
<n3ss3s>
what the... opam show utop says I have installed 1.15, when i do opam upgrade utop it says utop is not installed
matason has quit []
nullcat__ has quit [Quit: gone...]
ggole has joined #ocaml
jgjl has joined #ocaml
hilquias has quit [Remote host closed the connection]
<Unhammer>
n3ss3s, all in the same terminal? (do you have that eval statement in your bashrc?)
<n3ss3s>
all in the same terminal
<n3ss3s>
so, opam install cow, then eval $(opam config env), after which cow was found, but utop disappeared
<Unhammer>
opam install utop?
ontologiae_ has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arj has joined #ocaml
b0mbastus has quit [Ping timeout: 256 seconds]
<n3ss3s>
Unhammer: I have already installed it though, I was using it five minutes prior
MercurialAlchemi has quit [Remote host closed the connection]
<n3ss3s>
I would like to fix any underlying configuration issue rather than just sweet it under the rug
<n3ss3s>
(Although opam install utop acts as if I havent installed it / would let me install it)
<Unhammer>
I know, but if it was installed prior to eval $(opam config env) it mayb have been installed to a different dir
MercurialAlchemi has joined #ocaml
<Unhammer>
opam list --installed # might be helpful
<ggole>
n3ss3s: did you opam switch at some point?
<n3ss3s>
oh yes, I did
<ggole>
That's it then
<ggole>
When you switch packages don't come with the new compiler
<n3ss3s>
Everything but utop seemed to come along
<ggole>
It's possible that opam fetched a bunch of dependencies of cow, making it seem that way?
<n3ss3s>
actually that was in a utop that I might've started before the switch
<ggole>
I'm guessing though
<n3ss3s>
yeah nvm
<ggole>
Right, or that
<ggole>
There's some way to make opam install all of the stuff you used to have in a new switch
<ggole>
...can't seem to put my finger on what it is though
<n3ss3s>
No worries, I'm just a beginner / hobbyist when it comes to OCaml and didn't have a large environment set up
<ggole>
Yeah, I just install as necessary
ontologiae_ has quit [Ping timeout: 252 seconds]
<ggole>
It's easy enough unless you have tons of packages
<ggole>
If you plan to switch often and use utop it may be worth automating installing it
<n3ss3s>
I think I was able to name everything I had off the top of my head lol
<ggole>
Otherwise just remember to do it
<n3ss3s>
oh no
<n3ss3s>
I'm doing this in a VM and it just gave me a warning that I'm about to be low on disk space
<n3ss3s>
(Not really end of the world but...)
Haudegen has quit [Ping timeout: 256 seconds]
<n3ss3s>
"Sys_error("No space left on device")
<n3ss3s>
"
<n3ss3s>
Time to call it a night
<n3ss3s>
thanks
<ggole>
:(
wildsebastian has joined #ocaml
dav- has joined #ocaml
dav has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
oscar_toro has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
n3ss3s has quit [Ping timeout: 272 seconds]
muzzle has joined #ocaml
Gama11 has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
tsumetai has joined #ocaml
ollehar has joined #ocaml
an is now known as adrien_znc
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
oscar_toro has joined #ocaml
ingsoc has joined #ocaml
muzzle has quit [Quit: Leaving.]
tsumetai has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
palomer has joined #ocaml
matason has joined #ocaml
rand000 has joined #ocaml
Algebr has quit [Ping timeout: 272 seconds]
wildsebastian has quit [Remote host closed the connection]
Submarine has quit [Remote host closed the connection]
<xificurC>
seeing how some of the questions & mistakes are being repeated I was thinking of throwing together a small github page/wiki intended for newcomers. I think it would be nice to have in 1 place stuff like: installation, recommended starting material, general tips (e.g. avoid camlp4, use utop), recommended libraries to start with etc. Does this seem to you like a good idea?
mort___ has joined #ocaml
<companion_cube>
xificurC: basically, you describe ocaml.org
<companion_cube>
or what ocaml.org should be
<xificurC>
companion_cube: ocaml.org has a lot of information (although some of what I mentioned missing). I was thinking of a short and concise document to get newcomers up and running
<ollehar>
any opinions on AOP in the OCaml community?
sepp2k has joined #ocaml
tmtwd has quit [Ping timeout: 258 seconds]
wildsebastian has quit [Quit: Konversation terminated!]
<companion_cube>
no idea what it is
<ollehar>
aspect-oriented programming
<ollehar>
code injection
<companion_cube>
oh
<companion_cube>
dependency injection, you mean?
<ollehar>
nope
<ollehar>
this _actually_ inject code before or after a function
<ollehar>
e.g.
<ollehar>
used for loggin
<ollehar>
+g
<companion_cube>
seems weird
<ollehar>
it's the next big thing, apparently
<tokenrove>
i'm surprised to see that there are in fact a few AOP extensions for caml
<companion_cube>
'the next big thing', meh
<tokenrove>
AOP is the next big thing? i thought it was "the next big thing" ten years ago, and everyone decided it didn't matter
<ollehar>
yeah, I'm late to the party ^^
<companion_cube>
bah, functional programming has been the next big thing for 20 years, AOP is weak
<tokenrove>
i expect using something like MetaOCaml and stealing heavily from The Art of the Metaobject Protocol would be the easiest path to doing AOP in OCaml, since the existing implementations look like they fizzled out and died.
<ollehar>
don't know that book - good?
<tokenrove>
it's a great book
<flux>
AOP ~~ come from
tmtwd has joined #ocaml
rgrinberg has joined #ocaml
<ollehar>
flux: ?
<tokenrove>
aop is like a "come from" statement, like in INTERCAL. it's also like defadvice in emacs.
<ollehar>
ah
<tokenrove>
it necessarily makes it harder to follow what's happening in the code, although i think once it was rebranded as AOP for the Java world, the argument was that sufficiently smart IDEs would solve this problem
<companion_cube>
"tailcall from", in Intercaml
<companion_cube>
people using containers (Drup, rgrinberg?, struktured, …): I plan to package it differently for the next version (one opam package per sub-library)
rgrinberg has quit [Ping timeout: 264 seconds]
TheLemonMan has joined #ocaml
tmtwd has quit [Quit: Leaving]
Enjolras has joined #ocaml
kushal has quit [Ping timeout: 245 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
palomer has joined #ocaml
kushal has joined #ocaml
martintrojer has quit [Ping timeout: 245 seconds]
bobry has joined #ocaml
martintrojer has joined #ocaml
thomasga has quit [Quit: Leaving.]
darkf has quit [Read error: Connection reset by peer]
<nicoo>
companion_cube: What is Intercaml ?
<nicoo>
companion_cube: I'm included in people using containers :)
darkf has joined #ocaml
<nicoo>
Also, why one opam package per sublib? Sounds heavyweight
<zozozo>
nicoo: it might be useful to not have to depend on all of the container code if you use only a small part of it
<reynir>
nicoo: I think it's a joke, like Intercal
<reynir>
IIRC Intercal has a 'come from'
<reynir>
oh, tokenrove already mentioned that
* reynir
goes to sleep
<nicoo>
zozozo: Thing is that containers isn't very big
<nicoo>
reynir: Thanks for forcing me to evaluate the backlog
* nicoo
seems to have a broken strictness analyser
<companion_cube>
nicoo: INTERCAML would be the ocaml equivalent of INTERCAL :p
<nicoo>
Yeah, I understood now
* nicoo
requires more caffeine
<companion_cube>
and yes, the point would be that depending on 'containers' would only install the core lib
<companion_cube>
installing containers-bigarray would only install one module
<nicoo>
or porhaps a powernap
<companion_cube>
etc.
idegen has joined #ocaml
rgrinberg has joined #ocaml
<companion_cube>
I really need a way to poll the containers ``crowd''
<companion_cube>
#require "containers.poll";;
<nicoo>
companion_cube: Yes, but having containers, containers-data, containers-io, containers-iter, containers-string, containers-advanced, containers-unix, containers-bigarray, containers-sexp, containers-lwt and containers-misc sounds like a lot
<companion_cube>
there would be containers-all if you prefer
<companion_cube>
I still want to keep one repo for all of them
<companion_cube>
I mean, in general, people only need 'containers', not the other ones
<Drup>
nicoo: that's not how you would split
<Drup>
you would split by dependance needed
<Drup>
rgrinberg: ok, cohttp time.
rgrinberg has quit [Ping timeout: 265 seconds]
<nicoo>
Drup: Yes, having containers and containers-{io,unix,bigarray,lwt,misc} would be more reasonable, but that's not how I understood C³'s sentence (I would love to be wrong, though)
<struktured>
companion_cube: separate github repos? or just separate libs?
<nicoo>
struktured: Separate libs
<nicoo>
if I understood correctly
<struktured>
I'm all for more smaller , better divided up libs. not a problem for me
hay207 has joined #ocaml
thomasga has joined #ocaml
<companion_cube>
one repo, several opam packages
<nicoo>
companion_cube: So, what would be the OPAM package split?
<companion_cube>
I'm not sure yet
jabesed has quit [Ping timeout: 246 seconds]
<zozozo>
companion_cube: one repo to bring them all and in the darkness bind them ?
<nicoo>
zozozo: one repo to bring them all and in the darkness >>= them, yes
<nicoo>
companion_cube: Sounds strange to have io together with stuff that doesn't do system interaction
iorivur has joined #ocaml
iorivur has quit [Remote host closed the connection]
iorivur has joined #ocaml
<zozozo>
maybe bundle io with unix ?
<zozozo>
it's more or less what is done in the stdlib
<companion_cube>
well, IO doesn't depend on unix
tsumetai has joined #ocaml
cmtptr has quit [Ping timeout: 245 seconds]
oscar_toro has joined #ocaml
wildsebastian has joined #ocaml
thomasga has quit [Quit: Leaving.]
Algebr has joined #ocaml
BitPuffin|osx has joined #ocaml
cmtptr has joined #ocaml
agarwal1975 has joined #ocaml
thomasga has joined #ocaml
Kakadu has quit [Quit: Page closed]
psy has joined #ocaml
palomer has quit [Quit: palomer]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jabesed has joined #ocaml
<Algebr>
A great tragedy has befallen me. I did an opam upgrade and now merlin doesn't provide the correct auto complete when I have open Core.Std, aka, I'm not getting core's string function on String., I get the stdlib's. I'm on OS X, anyone else have this?
rand000 has joined #ocaml
<ggole_>
Algebr: did you do the usual eval dance?
<ggole_>
(And restart emacs, from within the terminal in which you did said dance?)
<Algebr>
yep, of course usual eval dance. yep, restarted emacs
<ggole_>
Hmph.
<ggole_>
Do other completions from within Core work?
<Algebr>
nope
<Algebr>
It does work if I just do Core.Std.String and whatnot. I suspect it has something to do with module aliases?
<ggole_>
I don't know.
<Unhammer>
sort of "is it plugged in" question, but did you open Core?
<Algebr>
yes. I have open Core.Std
<Unhammer>
hm
rgrinberg has joined #ocaml
<Algebr>
I downgraded merlin with no success, now downgrading core itself.
<ggole_>
Does your .merlin have the right PKG stuff?
<Algebr>
yep, it was working fine, I did an opam upgrade and now its broken.
<ggole_>
I also wonder if core was compiled with -bin-annot before but not after.
<ggole_>
Or with whatever the option is for keeping .cmts
<ggole_>
(My memory for this stuff is really bad. :|)
<ggole_>
OPAMKEEPBUILDDIR=true?
Denommus has quit [Ping timeout: 246 seconds]
<ggole_>
Something like that.
<companion_cube>
check that core still installs .cmi ?!
<Algebr>
yep, have opamkeepbuilderdir=true
rgrinberg has quit [Ping timeout: 256 seconds]
<ggole_>
Dunno then.
ggole_ is now known as ggole
<Algebr>
yep, I'm dumbfounded as well. did one downgrade on core, no success, doing HEAD~2 downgrade now
darkf has quit [Quit: Leaving]
Denommus has joined #ocaml
<Algebr>
okay, that didn't work either. a great tragedy indeed.
<flux>
leonidas, no wonder my invite code didn't work.. let channels_invite token channel user = let%lwt channel_id = id_of_channel token channel and user_id = id_of_user token user in endpoint "channels.info".. ?-)
struktured has quit [Ping timeout: 256 seconds]
elfring has joined #ocaml
<Drup>
is last ocamlnet broken for other pople too ?
<adrien_znc>
?
<Drup>
got an error in some C code about some gnu_tls stuff :/
<xificurC>
there seem to be more people around now then when I asked the last time - does anyone have a link to some bytecode documentation? I wanted to see the primitives
<ggole>
There was a bytecode description somewhere, but iirc it was way out of date
<Drup>
oh ?
shinnya has joined #ocaml
<ggole>
Ah no, it was just a file format description
<Leonidas>
What I don't like is reinventing the wheel. Matrix might turn out better than XMPP, but still, maybe improving XMPP would have been better to start with.
<MercurialAlchemi>
XML has been misused in many cases, but sometimes it is the right tool
<dmbaturin>
Drup: Well, it defined the grammar of JSON itself. It can help with checking (in XML terms) if it's well formed, but not if it's conformant to a schema (valid).
rgrinberg has joined #ocaml
<Drup>
ah, yeah, I don't what people invented for that and I don't want to know.
<dmbaturin>
And JSON Schema RFC draft expired years ago without being agreed upon. There are some implementations, all incompatible with one another. :)
<Drup>
I just know that yaml is complete madness and that I can't even understand how to write some valid yaml without basically trying something and hopping for the best.
<MercurialAlchemi>
dmbaturin: if you have a ppx-generated serializer-deserializer, you can implement schema validation by attempting to load the file :)
<MercurialAlchemi>
(of course, if you don't know the structure in advance, good luck)
<dmbaturin>
MercurialAlchemi: True. But I can't easily communicate it to other people, which is the point of schemata.
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MercurialAlchemi>
dmbaturin: if other people use the same language, you can always librarize this part...
<dmbaturin>
Drup: This is something I have to agree with. I'm still to write valid YAML from the first time.
<MercurialAlchemi>
hm, what's so hard about it?
<MercurialAlchemi>
I have written plenty of Ansible YAML files without issue, and that mixes YAML and Jinja templates
jabesed has joined #ocaml
<Drup>
MercurialAlchemi: the file format is impossible to understand
<Drup>
I mean, sure, I can copy past some bits to form something that might be valid
<MercurialAlchemi>
Hmmm
<Drup>
or might not, I have no idea by looking at the file
<MercurialAlchemi>
I don't know... it doesn't look particularly obscure, but you definitely have corner cases
<Drup>
and composition is unclear, and some stuff that should work don't (and the reverse is true too)
<MercurialAlchemi>
what do you call composition?
<Drup>
nesting* is more appropriate
<MercurialAlchemi>
well, you indent...
<Drup>
depends what you have before/after.
NSA_Agent has joined #ocaml
badkins has quit [Read error: Connection reset by peer]
<MercurialAlchemi>
Drup: you mean if you use | or > ?
<Drup>
I'm ... not even sure what those are for
<Drup>
but I remember nesting lists and tables and getting surprising results
<dmbaturin>
Is YAML grammar even context free?
<MercurialAlchemi>
they are for preserving newlines
<MercurialAlchemi>
Drup: odd
<MercurialAlchemi>
if you run into trouble while indenting, you can always revert to the compact notation anyway
octachron has quit [Quit: Leaving]
jonludlam has quit [Ping timeout: 258 seconds]
tobiasBo1 is now known as tobiasBora
Bhavya has quit [Quit: Quit the channel]
<Drup>
MercurialAlchemi: the fact that they are a bazilions different way of representing the same thing also annoys me.
<MercurialAlchemi>
it's just two ways
<dmbaturin>
The fact that JSON is also valid YAML is the most amusing.
ollehar1 has joined #ocaml
<MercurialAlchemi>
I'm not sure how much that is used in practice
<MercurialAlchemi>
though it does sound like a bad idea to start with
pyon is now known as affine-pyon
hilquias has joined #ocaml
jonludlam has joined #ocaml
arj has quit [Quit: Leaving.]
kdef has quit [Quit: Leaving]
slash^ has joined #ocaml
yetone has joined #ocaml
yetone has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
<Algebr>
I'm finding that often times I have some redundancy in my match cases that differ in just a small but crucial way. Is a small amount of code duplication in cases a sign that I'm doing something wrong
badkins has joined #ocaml
MrScout has joined #ocaml
thomasga has quit [Quit: Leaving.]
<apache2>
either that or nested matches I guess?
ontologiae_ has joined #ocaml
<Drup>
rgrinberg: I'm enabling more compiler warnings on ocsigenserver
<Drup>
so many unused variables T__T
ygrek has joined #ocaml
<Drup>
and so many unexported functions, too
<reynir>
are unexported functions bad?
tane has joined #ocaml
<Drup>
reynir: when they are not used anywhere, it's usually a bad sign
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
manizzle has joined #ocaml
Denommus` has joined #ocaml
<companion_cube>
flux: sorry, I can't really fix the problem
<companion_cube>
it would require to rewrite half of the module
dav- has joined #ocaml
Denommus has quit [Ping timeout: 258 seconds]
penryu has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
muzzle has quit [Quit: Leaving.]
dav has quit [Ping timeout: 256 seconds]
<dmbaturin>
How do I create a channel suitable for using in Lw_log.channel?
<dmbaturin>
Alternatively, how do I use a logger made with Lwt_log.file (which produces logger Lwt.t rather than logger).
tmtwd has joined #ocaml
<Drup>
I don't really see the issue, just bind, put it inside the ref and Lwt.async the resulting unit Lwt.t
muzzle has joined #ocaml
tane has quit [Quit: Verlassend]
<dmbaturin>
Why do they even return values of different types (logger or logger Lwt.t)?
muzzle has quit [Quit: Leaving.]
badkins has joined #ocaml
matason has quit []
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ollehar1 has joined #ocaml
swgillespie has joined #ocaml
<ollehar1>
speaking of menhir, where could I traverse the AST?
<ollehar1>
ah, I'll just read the RWO tutorial
Denommus` is now known as Denommus
agarwal1975 has quit [Quit: agarwal1975]
<dmbaturin>
ollehar1: Well, usually you build it with a menhir-generated parser, then traverse it.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kakadu has quit [Remote host closed the connection]
<ollehar1>
dmbaturin: but where would I traverse it?
<ollehar1>
is there an API for that?
<ollehar1>
now I just do
<ollehar1>
Parser.main Lexer.token lexing ...
<ollehar1>
and in my case this returns a bool
amirmc has joined #ocaml
wwilly has left #ocaml ["Leaving"]
<dmbaturin>
ollehar1: So you don't have code to get the AST from the parser yet?
<ollehar1>
hm no
<Drup>
define your own datatype defining an AST. Build AST in the Parser, walk AST.
<ollehar1>
ah
<ollehar1>
makes sense
<ollehar1>
so this is manual, then.
<dmbaturin>
You may find some code for specific languages (there were ready made libs for C and something else). For your own language, no, everyone's AST is different. :)
<ollehar1>
thanks!
<dmbaturin>
Drup: Are there any good examples of using Lwt_log around?
<dmbaturin>
I really fail to understand many things, starting with channel and syslog loggers being different type.
uris77 has quit [Ping timeout: 258 seconds]
Gama11 has quit [Read error: Connection reset by peer]
asQuirreL has joined #ocaml
ygrek has joined #ocaml
dubosec has quit [Ping timeout: 265 seconds]
swgillespie has joined #ocaml
jgjl has joined #ocaml
mort___ has quit [Quit: Leaving.]
dubosec has joined #ocaml
amirmc has quit [Quit: Leaving.]
dav has joined #ocaml
dav- has quit [Ping timeout: 256 seconds]
Cyanure has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ollehar1>
are AST always printed using things like this?
<ollehar1>
type value = [
<ollehar1>
| `Bool of bool
<ollehar1>
| `Float of float
<ollehar1>
| `Assoc of (string * value) list
<ollehar1>
| `Int of int
<ollehar1>
| `List of value list
<ollehar1>
| `Null
<ollehar1>
| `String of string
<ollehar1>
]
<ollehar1>
(JSON, from RWO)
A1977494 has left #ocaml [#ocaml]
<dmbaturin>
ollehar1: Some people use normal sum types rather than polymorphic variant (you can make a pretty printer with ppx_deriving).
<ollehar1>
ok
<ollehar1>
thank you
<ollehar1>
dmbaturin: any reason to use gadt with ast?
MercurialAlchemi has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
iorivur has quit [Remote host closed the connection]
swgillespie has quit [Client Quit]
Simn has quit [Read error: Connection reset by peer]
rand000 has quit [Quit: leaving]
jgjl_ has joined #ocaml
jgjl has quit [Ping timeout: 256 seconds]
Hannibal_Smith has quit [Remote host closed the connection]
ontologiae_ has quit [Ping timeout: 265 seconds]
sepp2k has quit [Quit: Leaving.]
badkins has quit []
<q66>
hey, the channel is being publicly logged by ir2ivps4 onto http://cowboyjob.com/ocaml - which is against freenode rules - just thought i'd let you know.
<Drup>
it's against the rules to publicly log an irc channel on freenode ?
<q66>
yes
<q66>
+ this bot is worse, because it's threading the posts per-user
<q66>
tl;dr - channels should announce that they're being publicly logged on join... this is sneaky-logging, which seems wrong to me
<Drup>
well, then we don't care, look at the /topic.
<q66>
actually myself i have nothing against being logged on irc but i can imagine some users would not appreciate it
<q66>
hm, okay then
<q66>
i just thought i'd let you know that some website is logging you without anybody saying anything
<q66>
:)
<Drup>
well, in the case of #ocaml, it's already been logged and we are quite aware of it, but thanks. I must say that saying that logging in against the rule of an irc server seems a particular kind of silly, given how irc and irssi is working, but heh.
<q66>
though this guy (from another channel) has a point <CyberShadow> ketmar: How about that they're using open-source software channels as content farms so they can get more search hits and boost their SEO shit?
<q66>
just thought it's wrong and rude to log to such website without notifying the channel owners first
<Drup>
oh sure, it's rude. However that's something you should except from something like irc
<q66>
anyway, already said what i wanted to say, later