mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
eh_eff has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
eh_eff has quit [Ping timeout: 248 seconds]
jimmyrcom_ has joined #ocaml
shinnya has joined #ocaml
danieli has quit [Changing host]
danieli has joined #ocaml
slash^1 has joined #ocaml
slash^1 has left #ocaml [#ocaml]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
mael has joined #ocaml
mael is now known as maelkum
chelfi has joined #ocaml
_andre has joined #ocaml
wklm has quit [Remote host closed the connection]
jbrown has joined #ocaml
jimmyrcom_ has quit [Remote host closed the connection]
mbuf has quit [Quit: rcirc on GNU Emacs 25.3.1]
eh_eff has joined #ocaml
eh_eff has quit [Ping timeout: 248 seconds]
sh0t has joined #ocaml
bennofs has joined #ocaml
dhil has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
bennofs has quit [Ping timeout: 240 seconds]
bennofs has joined #ocaml
Accidus has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
al-damiri has joined #ocaml
elfring has joined #ocaml
jacobian has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
yomimono has joined #ocaml
<reynir>
I'm writing a parser for openssh public keys...
<reynir>
I'm using angstrom. I made a Angstrom.t for getting { key_type; key_data; key_comment }. The key_data is just the base64 decoded string. I also wrote a Angstrom.t that parses RSA keys from the base64-decoded key_data. I'm wondering how I should combine these
pmetzger has joined #ocaml
<pmetzger>
What does this type signature mean? "type +'a t" ?
<pmetzger>
That "+" is very weird to me.
<pmetzger>
(Pardon me if this is a beginner question.)
<octachron>
pmetzger, it means that 'a is covariant/positive type variable
<thizanne>
(it's not a beginner question, and this post would explain it better than irc)
emias has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
<pmetzger>
Oooh. Subtyping! Subtyping always makes my head hurt once you treat it formally. :)
rdavison has joined #ocaml
aciniglio has joined #ocaml
rdavison has quit [Quit: rdavison]
sz0 has joined #ocaml
eh_eff has joined #ocaml
mbuf has joined #ocaml
emias has joined #ocaml
<emias>
:c/cl
<emias>
Oops.
eh_eff has quit [Ping timeout: 246 seconds]
<pmetzger>
thizanne: Thank you. That was quite helpful.
Accidus has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
Accidus has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
eh_eff has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
pmetzger has quit []
jacobian has quit [Ping timeout: 264 seconds]
Simn has quit [Ping timeout: 246 seconds]
Accidus has joined #ocaml
bennofs has quit [Read error: Connection reset by peer]
sz0 has quit [Quit: Connection closed for inactivity]
jbrown has quit [Ping timeout: 255 seconds]
mbuf has quit [Remote host closed the connection]
Simn has joined #ocaml
mbuf has joined #ocaml
pmetzger has joined #ocaml
dhil has joined #ocaml
tonyhb has joined #ocaml
bennofs has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
jacobian has joined #ocaml
Accidus has quit [Ping timeout: 240 seconds]
nior has joined #ocaml
<nior>
i'm trying to write a simple makefile for using batteries but i'm getting "No implementations provided" errors. does anyone know why that might be?
<nior>
i just have a _tags with "package(batteries)" and using ocamlbuild
FreeBirdLjj has quit [Remote host closed the connection]
slash^ has quit [Quit: Leaving]
mbuf has quit [Quit: rcirc on GNU Emacs 25.3.1]
<companion_cube>
you need -use-ocamlfind when you invoke ocamlbuild
<pmetzger>
BTW, as a new OCaml'er, let me say that the best part of OCaml for a beginner is the language itself, and the worst part are the build tools. You have to learn too much about how to build things to be productive.
<pmetzger>
I got unexpectedly productive in the language in only two weeks, but I find myself hitting issues with the myriad of build systems quite frequently.
<nior>
companion_cube: i am doing that
<nior>
pmetzger: :/
<companion_cube>
-linkpkg needs to be called somewhere, probably
kakadu has quit [Quit: Konversation terminated!]
<mrvn>
I found oasis has very little you need to know.
<nior>
if you could tell me how to use batteries with oasis i would be extremely grateful
jbrown has joined #ocaml
Algebr` has joined #ocaml
<pmetzger>
ocamlbuild, oasis, jbuilder and the rest all have too much mystery behavior. Makefiles are straightforward to build for an ocaml project but become insanely, tediously long and complicated.
yomimono has quit [Ping timeout: 240 seconds]
<octachron>
nior, you need to add "main.native:package(batteries)" in order to tell to ocamlfind to link the batteries implementation
jnavila has joined #ocaml
<nior>
to my _tags ?
<octachron>
yes
<nior>
that's an "invalid globbing pattern". if i wrap it in <> it doesn't help.
<nior>
thanks for the help anyways, all
nior has quit [Quit: /thread]
<octachron>
sorry, I forget the "" quotes: '"main.native":…'
<ayxih>
It's jusr sintactic sugar? Is it really useful?
jnavila has quit [Remote host closed the connection]
<kakadu>
Nope, I don't think that is easy to implement (in presense of guards) with syntax extension. I expect troubles with scopes
argent_smith2 has quit [Quit: Leaving.]
<kakadu>
Well, they can make code easier to read. Sometimes I really want them
<octachron>
kakadu, aren't active patterns completely different than with guard ?
<kakadu>
octachron: I don't think that `completely different` are right words
<kakadu>
both of them introduce new values that were not in the term that is being matched
<octachron>
I agree that it is a common point. Thinking about it, with guards look like they can be implemented with active patterns, but not the reverse. Or am I mistaken?
<octachron>
They are also the difference than with guard and active pattern have quite different implication on pattern compilation, isn't it?
<inr>
-b 21
<inr>
sorry that was supposed to be a /
<kakadu>
Yeah, it seems that active patterns are more smarter
<kakadu>
I don't really get the point about implications with compilation. Both of them suppose that before examining two match cases arbitrary functions can be called
<kakadu>
I does't play well with famous algorithm about compiling pattern matching using matrix-like simplifications
<kakadu>
(I remember this paper in ocaml.org website)
<kakadu>
but it seems that this algorithm doesn't play well with guards anyway
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
troydm has joined #ocaml
tane has quit [Quit: Leaving]
AltGr has left #ocaml [#ocaml]
<pmetzger>
Hrm. Is there a big difference in the behavior of the standard library Hashtbl and the Core Hashtbl? I naively assumed commonly named functions were the same, but "find" for the former seems to return an exception if something is not found, and for the latter it returns an option.
<pmetzger>
I can't find the documentation for the Core version of Hashtbl it seems...
Denommus has joined #ocaml
<kakadu>
It's a naming convention
<kakadu>
in core same (-ish) functions return _ option
<kakadu>
blablah_exn behave as exceptionful
Denommus has quit [Client Quit]
<pmetzger>
where do I find docs on that? (or on the Core version of Hashtbl?)
<kakadu>
you needed to follow some links because included modules are on the another HTML page
<pmetzger>
I hate the OCaml world's documentation. Still, even reading OCaml source to figure out what I'm doing beats touching C++ on the best of days. I'm really loving OCaml in spite of these problems.
<ayxih>
pmetzger, there is the OCaml documentation. It's good.
<pmetzger>
kakadu: To a user of that library, esp. a beginner, that wasn't really obvious. :)
<pmetzger>
ayxih: so far I've found myself scratching my head a lot of the time. But the type signatures help a lot, and tuareg+merlin helps a lot, and it is often pretty easy to read sources, unlike in many other languages.
<pmetzger>
So so far, I'm reasonably happy.
<kakadu>
you can send some suggestions on discourse server
<pmetzger>
The OCaml manual itself is sometimes great and sometimes you really want examples.
<pmetzger>
kakadu: Discourse server?
<ayxih>
pmetzger, I dunno. WHen I want to know something I open the .mli files and read the documentation. It rarely deceive me.
<pmetzger>
ayxih: being deceived isn't my problem. lacking understanding is my problem. :)
<ayxih>
pmetzger, hashtbl doc is complete.
<pmetzger>
ayxih: even what kakadu just found me is largely empty. for much of it, it contains function signatures but no explanation of what the function does. For somethings (say set vs add) I can guess, but what does Hashtbl.mem do?
<octachron>
pmetzger, if you ever have the time to list the points in the manual where you would have liked more examples, I am all ears
<ayxih>
pmetzger, Hashtbl.mem tbl x] checks if [x] is bound in [tbl]
<pmetzger>
ayxih: thanks. But it would be nice if it said that. :)
<ayxih>
pmetzger, it says that, I just paste it from the documentation
<pmetzger>
not on the Core version it certainly doesn't.
<kakadu>
pmetzger: What other reasonable function could me with signature like ('a, _) t ‑> 'a key ‑> bool ?
<ayxih>
pmetzger, there is only one Hashtbl module in OCaml distribution? No?
<pmetzger>
and I needed hash tables.
<kakadu>
I think that it is not possible to put documentation there. I mean that you can't use the word "hashtable" there because it is a module with generic accessors
<pmetzger>
kakadu: there is documentation for other functions in that page.
<pmetzger>
kakadu: like for add_multi there's documentation.
<pmetzger>
and for map
<pmetzger>
but not for mem.
<kakadu>
I think that they are wrong
<kakadu>
:)
<ayxih>
Which module are you talking about?
<pmetzger>
Anyway, I don't want to give the impression I'm not really having a good time using OCaml. I am. It's a very nice language.
<pmetzger>
ayxih: See the link above. I gave it.
<kakadu>
ayxih: include Accessors with type (a, b) t := (a, b) t with type a key := a key
<pmetzger>
If you click on the triangles it expands the docs for each of those.
shepi has joined #ocaml
<ayxih>
pmetzger, *** is it? It's in standard OCaml?
<shepi>
Hello!
<pmetzger>
I've gotten more done in two weeks working with OCaml than I would get done normally in two months working with C++. But I do wish the documentation was a bit nicer and more user friendly.
<pmetzger>
ayxih: Core is from Jane Street. It isn't in the standard library. I said that.
<ayxih>
pmetzger, ho. Sorry, didn't get it.
<pmetzger>
octachron: what is it written in? (The manual.) I could just submit patches I suppose if I understand well enough to add them.
<octachron>
pmetzger, latex essentially (with quite a bit of moving part)
<pmetzger>
I grok latex. :)
<octachron>
nice ;), I know that it is not exactly a low entry barrier outside of academia
<pmetzger>
octachron: ah, but I'm an academic, so... :)
<kakadu>
There is a joke in my university
<kakadu>
What is the difference between a physicist and an astronomer? The first one is using MsWord. The 2nd one -- latex
<pmetzger>
the physicists I know use latex. :)
<pmetzger>
almost universally.
<Leonidas>
maybe you know astronomers?
<Leonidas>
Or elastomers?
<pmetzger>
if you look at ArXiv, most of the physics stuff is LaTeX...
<kakadu>
okay, okay, no offense
<pmetzger>
Leonidas: mentioning elastomers is quite a stretch here.
<pmetzger>
but I'm sure we can all spring back from it
* Leonidas
:D
<octachron>
it depends on the subfield, optics seems to like quite MSWord quite a lot
<reynir>
maybe you could make the joke s/physicists/physicians/
<shepi>
@octachron, I plan to use olivine to produce a Vulkan binding. Is it usable, would you recommend it and do you have any indications if I go down this path?
<kakadu>
I don't really get a joke. Is an elastomer an euphimism for something?
<pmetzger>
kakadu: latex, the compound and not the formatting system, is elastomeric.
<pmetzger>
kakadu: it is a kind of rubber.
<kakadu>
Ah
<kakadu>
yes
<octachron>
shepi, let me check the current Vulkan version. Normally the produced bindings works, i.e. the examples works on my test systems
<reynir>
There's a supermarket near the CS dept. called Føtex, but of course it's known as FøTeX among the students :)
<kakadu>
In Russia we usually pronounce these two words differently
<shepi>
ok, I was just worried about the WSL note, but this is specific to MS Windows right?
<shepi>
I was a bit confused by "Windows system" and the reference to the X server just after ^^
<pmetzger>
kakadu: LaTeX is pronounced quite differently from latex in english. but written, the pun works.
<pmetzger>
"lah-tekh" vs "lateks".
<shepi>
leslie lamport explicitely said that latex was to be pronounced the way you like, unlike TeX where the last letter is a greek "chi", to be pronounced "ki" :-)
<kakadu>
okay :) thanks
<shepi>
(because latex is also a joke about the compound, I guess ^^)
<octachron>
shepi, more precisely the current sdl-vulkan bridge works only on linux-X windows system
<octachron>
shepi, and since SDL 2.06 is out, I should take the time to port the vulkan system to tsdl
<shepi>
octachron, ok, I will have a closer look at it :-) Thank you very much for the olivine project! :-)
<octachron>
shepi, ok; the current version of the vulkan spec did not get even crazier than before; so the generated bindings works
<shepi>
\o/ :-)
<octachron>
Note that I am not committed to any stability to the generated bindings at this point; since I have still work to do to track down sum types lost in the midst of the spec
<shepi>
Okay, for now I just want to take a grip on the Vulkan system so it is not really an issue :P Do you plan adding the generated bindings to OPAM in some way?
<shepi>
I have to leave, thank you for your answers! I'll come back here when I have more questions :-)
<octachron>
that is on the road map; sure, questions are very welcome at this point
Simn has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
jacobian has joined #ocaml
pierpa has joined #ocaml
cbot has joined #ocaml
ayxih has quit [Quit: Leaving]
<octachron>
shepi: I spoke too fast, the vulkan spec has changed its convention on extension type and functions name…
lukky513 has quit [Ping timeout: 255 seconds]
shinnya has joined #ocaml
kerrhau has joined #ocaml
<octachron>
shepi: fixed (who thought that adding an "_extension_name" suffix to extension names which are inside a xml tag named extension was a good idea???)
jbrown has quit [Read error: Connection reset by peer]
pmetzger has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
pmetzger has joined #ocaml
johnelse has quit [Ping timeout: 255 seconds]
kassens has joined #ocaml
kassens has quit [Client Quit]
kassens has joined #ocaml
kassens has quit [Client Quit]
johnelse has joined #ocaml
Denommus has quit [Ping timeout: 240 seconds]
johnelse has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 252 seconds]
kakadu has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 240 seconds]
demonimin has joined #ocaml
enterprisey has joined #ocaml
ristos has quit [Quit: Connection closed for inactivity]
demonimin has quit [Ping timeout: 248 seconds]
demonimin has joined #ocaml
demonimin has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]