companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
eh_eff has quit [Ping timeout: 255 seconds]
jbrown has quit [Ping timeout: 252 seconds]
mfp__ has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 252 seconds]
Soni has quit [Ping timeout: 260 seconds]
Soni has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
jacobian has quit [Ping timeout: 252 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
nullifidian_ is now known as nullifidian
Algebr has quit [Ping timeout: 255 seconds]
enterprisey has quit [Remote host closed the connection]
keep_learning has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
keep_learning has joined #ocaml
enterprisey has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
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]
mnemem has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
jao has quit [Ping timeout: 248 seconds]
tane has joined #ocaml
<copy_> opam is a package manager, you need that anyway. Regarding jbuilder, have a look at https://jbuilder.readthedocs.io/en/latest/quick-start.html#building-a-hello-world-program
<copy_> Oh, I didn't see the earlier replies
sepp2k1 has joined #ocaml
sepp2k has quit [Disconnected by services]
wll has joined #ocaml
sepp2k1 has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
mbuf has quit [Excess Flood]
ygrek has joined #ocaml
alphor has joined #ocaml
wll has left #ocaml [#ocaml]
mbuf has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
sepp2k has joined #ocaml
argent_smith has quit [Quit: Leaving.]
AltGr has left #ocaml [#ocaml]
hjshf has joined #ocaml
fraggle_ has quit [Ping timeout: 264 seconds]
Guest24 has joined #ocaml
mnemem has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
jacobian has quit [Ping timeout: 248 seconds]
ziyourenxiang has quit [Ping timeout: 240 seconds]
kakadu has quit [Quit: Konversation terminated!]
al-damiri has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
ShalokShalom_ is now known as ShalokShalom
eh_eff has joined #ocaml
bennofs has quit [Read error: Connection reset by peer]
jacobian has joined #ocaml
_andre has quit [Quit: leaving]
jnavila has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
sh0t has quit [Ping timeout: 246 seconds]
kakadu has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
samrat_ has joined #ocaml
_andre has joined #ocaml
sh0t has joined #ocaml
jnavila has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
sepp2k has quit [Ping timeout: 246 seconds]
enterprisey has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
slash^ has quit [Read error: Connection reset by peer]
mbuf has quit [Quit: Leaving]
jnavila has quit [Ping timeout: 240 seconds]
mnemem_ has joined #ocaml
pmetzger has joined #ocaml
sepp2k has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
mnemem has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
Accidus has joined #ocaml
Guest87067 has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
eh_eff has quit [Ping timeout: 240 seconds]
enterprisey has quit [Remote host closed the connection]
zv has quit [Ping timeout: 240 seconds]
Denommus has joined #ocaml
jbrown has quit [Ping timeout: 240 seconds]
samrat_ has quit [Ping timeout: 255 seconds]
zv has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
ygrek has joined #ocaml
zv has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
Guest24 has quit [Read error: Connection reset by peer]
eh_eff has joined #ocaml
mengu has joined #ocaml
Guest87067 is now known as Algebr
johnelse has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 248 seconds]
jnavila has quit [Ping timeout: 252 seconds]
Simn has joined #ocaml
rdavison has joined #ocaml
struktured has joined #ocaml
eh_eff has quit [Ping timeout: 264 seconds]
bennofs has joined #ocaml
dh_work has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 255 seconds]
argent_smith has joined #ocaml
Denommus` is now known as Denommus
tane has quit [Quit: Leaving]
kakadu has quit [Remote host closed the connection]
zv has joined #ocaml
bennofs has quit [Ping timeout: 248 seconds]
zv has quit [Ping timeout: 240 seconds]
<etchasaurus> Hi - is there a way to make utop NOT truncate the output - I would really like to see all the parts of a variable
jnavila has quit [Remote host closed the connection]
zv has joined #ocaml
eh_eff has joined #ocaml
kolko has joined #ocaml
zv has quit [Ping timeout: 248 seconds]
bennofs has joined #ocaml
butterthebuddha has quit [Max SendQ exceeded]
zv has joined #ocaml
jacobian has quit [Remote host closed the connection]
butterthebuddha has joined #ocaml
copy_ has quit [Quit: Connection closed for inactivity]
argent_smith has quit [Quit: Leaving.]
bennofs has quit [Read error: Connection reset by peer]
<lyxia> etchasaurus: set #print_depth and #print_length
_andre has quit [Quit: leaving]
<etchasaurus> Awesome - where did you find these settings?
<etchasaurus> The help text in utop_help doesn't mention this at all
<lyxia> utop inherits many commands from the ocaml toplevel documented here http://caml.inria.fr/pub/docs/manual-ocaml/toplevel.html
<etchasaurus> Ok - great - thank you!!!!
<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