mnemem has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
pierpa has quit [Quit: Page closed]
Soni has quit [Ping timeout: 240 seconds]
Soni has joined #ocaml
aphprentice has quit [Quit: Connection closed for inactivity]
jbrown has joined #ocaml
mengu has joined #ocaml
enterprisey has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 248 seconds]
samrat_ has joined #ocaml
demonimin has quit [Ping timeout: 248 seconds]
Algebr has joined #ocaml
Algebr is now known as Guest87067
jbrown has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
ooooooohwhatchu- has joined #ocaml
Accidus has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
ooooooohwhatchu- has quit [Quit: leaving]
samrat_ has quit [Ping timeout: 260 seconds]
eh_eff has joined #ocaml
Accidus has quit [Ping timeout: 252 seconds]
eh_eff has quit [Ping timeout: 240 seconds]
samrat_ has joined #ocaml
enterprisey has joined #ocaml
mbuf has joined #ocaml
govg has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 is now known as Guest85949
Guest85949 has quit [Ping timeout: 240 seconds]
xvilka has quit [Quit: leaving]
sgnb has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
eh_eff has joined #ocaml
mnemem has quit [Ping timeout: 252 seconds]
TheLemonMan has joined #ocaml
Simn has joined #ocaml
eh_eff has quit [Ping timeout: 246 seconds]
slash^ has joined #ocaml
enterprisey has quit [Remote host closed the connection]
cbot_ has quit [Quit: Leaving]
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
dakk has joined #ocaml
Guest87067 has quit [Ping timeout: 240 seconds]
mnemem has joined #ocaml
mengu has joined #ocaml
AltGr has joined #ocaml
samrat_ has quit [Ping timeout: 240 seconds]
samrat_ has joined #ocaml
eh_eff has joined #ocaml
mfp__ has joined #ocaml
eh_eff has quit [Ping timeout: 260 seconds]
johnelse has quit [Ping timeout: 248 seconds]
mengu has quit [Remote host closed the connection]
argent_smith has joined #ocaml
xpinguin has joined #ocaml
xpinguin has left #ocaml [#ocaml]
kakadu has joined #ocaml
dhil has joined #ocaml
demonimin has joined #ocaml
demonimin has joined #ocaml
demonimin has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
ziyourenxiang has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
ski has quit [Ping timeout: 240 seconds]
Soni has quit [Ping timeout: 240 seconds]
Soni has joined #ocaml
samrat_ has quit [Ping timeout: 248 seconds]
johnelse is now known as johnel_away
johnel_away is now known as johnelse
copy_ has joined #ocaml
jao has joined #ocaml
_andre has joined #ocaml
dhil has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
mbuf has quit [Quit: Later!]
demonimin has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
jbrown has joined #ocaml
eh_eff has joined #ocaml
sepp2k has joined #ocaml
eh_eff has quit [Ping timeout: 248 seconds]
bennofs has joined #ocaml
<bennofs>
Hi, I just got started looking at ocaml tooling but I am a little overwhelmed. Say, I just want to create a new project for a simple executable (or library as well) and build & run it. What should I use for that? There is jbuilder, oasis and opam and I am a little confused
<bennofs>
also, I would like to depend on opam packages easily
<bennofs>
Basically, the equavilent of `cargo new`/`cargo build` from rust or `cabal init`/`cabal build`
<companion_cube>
hi! you can start with jbuilder, I think
<companion_cube>
there is not really such a simple initial setup yet, though, I'm afraid
<companion_cube>
jbuilder is recent and the community isn't stabilized around it yet
<bennofs>
btw, what's up with the focus on S-Expressions in OCaml? I thought that was a Lisp thing, but I've seen a few OCaml projects use them as well (and haven't seen them used outside lisp before at all)
<bennofs>
Not that that's a bad thing, I like S-Exps :)
<companion_cube>
it's kjust convenient to parse, I guess
ziyourenxiang has joined #ocaml
<flux>
it has less rules than json, so maybe a better fit to ocaml?-)
zaquest has quit [Quit: Leaving]
sz0 has joined #ocaml
<companion_cube>
it's also that janestreet used S-exprs even before json became widly popular, I think
zaquest has joined #ocaml
shinnya has joined #ocaml
jacobian has joined #ocaml
sh0t has joined #ocaml
jimmyrcom_ has quit [Remote host closed the connection]
<bennofs>
is there a way to get jbuilder configs from oasis? or is oasis just not made for that?
<companion_cube>
it's not made for that
<companion_cube>
you only need to use one of them anyway
<bennofs>
but i probably need to learn all of them, because they will always be projects still using oasis
<octachron>
bennofs, this would only matter if you end up contributing to these projects; learning one build system at a time is fine
<bennofs>
i don't envy the people maintaining editor integrations for ocaml :D having to deal with one build system in an editor is trouble enough IME
<companion_cube>
ah, on this side it's nice, because build systems produce some special files (.cmt, .cmti) that merlin can consume
<companion_cube>
and merlin works in most editors
<bennofs>
hmm do these files contain build flags? or how does the editor know which flags to pass the compiler for live error checkinf for example?
<Leonidas>
why is function | () -> "yay" | exception foo -> raise foo invalid
<Leonidas>
whereas fun x -> match x with | () -> "yay" | exception foo -> raise foo is valid
<thizanne>
because "Exception patterns must be at the top level of a match case"
<theblatte>
bennofs: jbuilder generates the .merlin config file that describes the compiler flags, and merlin does live error checking (without even calling the compiler btw)
<bennofs>
ok so it seems that merlin requires some sort of config file where i need to list all dependencies again
<bennofs>
theblatte: oh that is nices
slash^1 has joined #ocaml
<Leonidas>
thizanne: but they are.
slash^1 has left #ocaml [#ocaml]
<lyxia>
Leonidas: there's no point in exception patterns in function because the exception will be propagated without applying the function
<def`>
Leonidas: a function argument is already a value, it makes no sense to catch an exception there
<def`>
in the match case, you can put an arbitrary expression, that's where catching exception can be useful (though it could be worth emitting a warning when catching an exception on a syntactic value)
<Leonidas>
ah, right. What I am doing in this match is also completely nonsensical
<bennofs>
how do I install a package from a local source checkout with opam?
<flux>
it could even be considered an error that match x with _ -> .. | exception Foo -> is valid, given x is exatcly that, an identifier..
<flux>
seems like a warning worthy at least ;-)
<bennofs>
oh, opam pin add is what i want
<flux>
oh cool opam 2.0.0~beta4 has builtin solver. is it comparable to aspcud in workingness?
<flux>
will I be in a world of hurt if I try opam2?-)
<theblatte>
flux: predictions vary :p
<flux>
magic eight ball says: maybe?
<theblatte>
"concentrate and ask again"
MercurialAlchemi has quit [Ping timeout: 248 seconds]
ShalokShalom_ has joined #ocaml
<Leonidas>
flux: I'm pretty happy with it
ShalokShalom has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
nicoo has quit [Read error: Connection reset by peer]
<pmetzger>
Is there any way to get Menhir to give you more information than simply raising "Error" which has no content when it hits a syntax error?
<pmetzger>
Bison will give you a string with a bunch of context, which is useful to feed back to the user...
jacobian has joined #ocaml
<companion_cube>
you can add `error` rules in the grammar, that can take custom actions
Accidus has quit [Ping timeout: 264 seconds]
<pmetzger>
yah but right now I don't need _that_ friendly. However, I think I have an idea from looking at an example in "real world ocaml"...
struktured has quit [Quit: Page closed]
<Drup>
pmetzger: the menhir manual actually has some informations about how to have richer error handling
<pmetzger>
I'll have to read it more seriously then.
<orbifx[m]>
which switch would 4.06.0+dev refer to?
<orbifx[m]>
There isn't one with that name
<orbifx[m]>
4.06.0+trunk?
shinnya has joined #ocaml
jbrown has joined #ocaml
zlsyx has joined #ocaml
enterprisey has joined #ocaml
sz0 has joined #ocaml
Denommus has quit [Quit: going home]
enterprisey has quit [Ping timeout: 248 seconds]
zlsyx has quit [Quit: Leaving...]
enterprisey has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
jimmyrcom has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
jimmyrcom has joined #ocaml
<sh0t>
Hi guys. How do I activate the profiling option for a project managed with oasis that compiles in native code?
jimmyrcom has quit [Ping timeout: 248 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
<companion_cube>
./configure --enable-profile or sth like that, I think
jimmyrcom has joined #ocaml
<sh0t>
i wil ltry thanks
ocamlweirdo has joined #ocaml
<ocamlweirdo>
Hello - I'm new to ocaml and a little bit dumbfounded.
<ocamlweirdo>
I am trying to turn an hexadecimal string into an ASCII encoded one.
<ocamlweirdo>
But, to my great surprise... I haven't found even a simple way to do so
enterprisey has joined #ocaml
<ocamlweirdo>
Can someone help? I found this package (https://github.com/mirage/ocaml-hex) , but it doesn't address my issue because it cannot decode an hex string of type string
<ocamlweirdo>
only an hex string of the package's special type (Hex.t)
mengu has quit [Remote host closed the connection]
<ocamlweirdo>
What I'd like to have is a function like this: to_ascii :: string -> string, or to_ascii :: Hex -> String with a method that allows me to convert an hexadecimal string of type String to an hexadecimal string of type Hex
<ocamlweirdo>
:'(
mengu has joined #ocaml
<sh0t>
thanks companion_cube
enterprisey_ has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
<ocamlweirdo>
pls halp
sh0t has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 252 seconds]
<ocamlweirdo>
:-*
<ocamlweirdo>
no one ever needed to decode an hexadecimal string of type String
<ocamlweirdo>
? can't be!
<lyxia>
ocamlweirdo: just deconstruct Hex.t
<ocamlweirdo>
lyxia: Sorry what do you mean by that?
<lyxia>
actually it's the other way around, you can wrap a hex string in the constructor `Hex. So to_ascii = fun x -> Hex.to_string (`Hex x)
pmetzger has quit [Remote host closed the connection]
<ocamlweirdo>
holy shit
<ocamlweirdo>
thanks
<ocamlweirdo>
spent two hours trying to figure that stuff out
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
<ocamlweirdo>
lyxia: how come I don't need to precise the module when "casting" (is that the correct word for this?) x to Hex.Hex