adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.08 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.08/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Hrundi_V_Bakshi has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 244 seconds]
jao has quit [Ping timeout: 248 seconds]
mfp has quit [Ping timeout: 268 seconds]
Jeanne-Kamikaze has joined #ocaml
AtumT has quit [Quit: AtumT]
ziyourenxiang_ has joined #ocaml
ziyourenxiang has quit [Ping timeout: 272 seconds]
cantstanya has quit [Ping timeout: 260 seconds]
cantstanya has joined #ocaml
amiloradovsky has joined #ocaml
ggole has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
_whitelogger has joined #ocaml
gravicappa has joined #ocaml
_whitelogger has joined #ocaml
Jeanne-Kamikaze has quit [Quit: Leaving]
zolk3ri has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
narimiran has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger_ has joined #ocaml
zolk3ri has quit [*.net *.split]
cantstanya has quit [*.net *.split]
andreas303 has quit [*.net *.split]
klntsky has quit [*.net *.split]
ggole has quit [*.net *.split]
nicoo has quit [*.net *.split]
_whitelogger has quit [*.net *.split]
stan[m] has quit [*.net *.split]
isaachodes[m] has quit [*.net *.split]
thizanne has quit [*.net *.split]
aubian has quit [*.net *.split]
SrPx has quit [*.net *.split]
mehdib_ has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
rntz2 has quit [*.net *.split]
kalio has quit [*.net *.split]
ayberkt has quit [*.net *.split]
rwmjones has quit [*.net *.split]
wagle has quit [*.net *.split]
CcxWrk has quit [*.net *.split]
gaze__ has quit [*.net *.split]
Madars_ has quit [*.net *.split]
vinoski has quit [*.net *.split]
theblatte has quit [*.net *.split]
lobo has quit [*.net *.split]
rks` has quit [*.net *.split]
ec has quit [*.net *.split]
Leonidas has quit [*.net *.split]
bartholin has quit [*.net *.split]
averell has quit [*.net *.split]
tizoc has quit [*.net *.split]
cthuluh has quit [*.net *.split]
mal`` has quit [*.net *.split]
tsani has quit [*.net *.split]
sheijk has quit [*.net *.split]
louisg has quit [*.net *.split]
troydm has quit [*.net *.split]
kini has quit [*.net *.split]
chindy_ has quit [*.net *.split]
lyxia has quit [*.net *.split]
jgkamat has quit [*.net *.split]
reynir has quit [*.net *.split]
cross has quit [*.net *.split]
nopf has quit [*.net *.split]
so has quit [*.net *.split]
ohama has quit [*.net *.split]
iZsh has quit [*.net *.split]
amiloradovsky has quit [*.net *.split]
mgsk has quit [*.net *.split]
jmiven has quit [*.net *.split]
keep_learning_M has quit [*.net *.split]
TC01 has quit [*.net *.split]
notnotdan has quit [*.net *.split]
Exagone313 has quit [*.net *.split]
rdivyanshu has quit [*.net *.split]
Khady has quit [*.net *.split]
Ptival has quit [*.net *.split]
tobiasBo1 has quit [*.net *.split]
vodkaInferno has quit [*.net *.split]
bacam has quit [*.net *.split]
anton-trunov has quit [*.net *.split]
artart78 has quit [*.net *.split]
c4rc4s has quit [*.net *.split]
gikiam has quit [*.net *.split]
hio has quit [*.net *.split]
interruptinuse has quit [*.net *.split]
rgr[m] has quit [*.net *.split]
hdurer[m] has quit [*.net *.split]
iorivur_ has quit [*.net *.split]
angerman has quit [*.net *.split]
jerme_ has quit [*.net *.split]
mjvoge02 has quit [*.net *.split]
adi________ has quit [*.net *.split]
narimiran has quit [*.net *.split]
gravicappa has quit [*.net *.split]
oni-on-ion has quit [*.net *.split]
hannes has quit [*.net *.split]
keep_learning has quit [*.net *.split]
emias has quit [*.net *.split]
rpcope has quit [*.net *.split]
leah2 has quit [*.net *.split]
jave has quit [*.net *.split]
jimt has quit [*.net *.split]
philtor has quit [*.net *.split]
kakekongen has quit [*.net *.split]
zapashcanon has quit [*.net *.split]
hfjvjffju has quit [*.net *.split]
Plazma has quit [*.net *.split]
mrallen1 has quit [*.net *.split]
infinity0_ has quit [*.net *.split]
ziyourenxiang_ has quit [*.net *.split]
Cypi_ has quit [*.net *.split]
nullifidian has quit [*.net *.split]
erwanou has quit [*.net *.split]
ski has quit [*.net *.split]
andrewalker has quit [*.net *.split]
dmiles has quit [*.net *.split]
Redfoxmoon has quit [*.net *.split]
adrien has quit [*.net *.split]
h11 has quit [*.net *.split]
seliopou has quit [*.net *.split]
engil has quit [*.net *.split]
iAmerika1 has quit [*.net *.split]
jun has quit [*.net *.split]
kark has quit [*.net *.split]
JSharp has quit [*.net *.split]
_habnabit has quit [*.net *.split]
psacrifi- has quit [*.net *.split]
diginet has quit [*.net *.split]
thegameg has quit [*.net *.split]
def` has quit [*.net *.split]
pippijn has quit [*.net *.split]
profan has quit [*.net *.split]
shakalaka has quit [*.net *.split]
kandu has quit [*.net *.split]
runciter has quit [*.net *.split]
eagleflo has quit [*.net *.split]
vsiles has quit [*.net *.split]
cemerick has quit [*.net *.split]
timeless has quit [*.net *.split]
robmyers has quit [*.net *.split]
bytesighs has quit [*.net *.split]
niceplace has quit [*.net *.split]
monad_cat has quit [*.net *.split]
adrianbrink has quit [*.net *.split]
igitoor has quit [*.net *.split]
stux|RC has quit [*.net *.split]
rfv has quit [*.net *.split]
jyc has quit [*.net *.split]
flux has quit [*.net *.split]
clockish has quit [*.net *.split]
quarters has quit [*.net *.split]
lopex has quit [*.net *.split]
stephe has quit [*.net *.split]
alexelcu has quit [*.net *.split]
lynn has quit [*.net *.split]
andreypopp has quit [*.net *.split]
rjungemann has quit [*.net *.split]
l1x has quit [*.net *.split]
Xizor has quit [*.net *.split]
bjs has quit [*.net *.split]
sspi__ has quit [*.net *.split]
ehirdoy has quit [*.net *.split]
micro has quit [*.net *.split]
tristero has quit [*.net *.split]
catern has quit [*.net *.split]
Ankhers has quit [*.net *.split]
tg has quit [*.net *.split]
octarin has quit [*.net *.split]
nahra has quit [*.net *.split]
bitonic has quit [*.net *.split]
freusque has quit [*.net *.split]
Niamkik has quit [*.net *.split]
seastack has quit [*.net *.split]
stylewarning has quit [*.net *.split]
jrslepak has quit [*.net *.split]
jacobian has quit [*.net *.split]
xorpse has quit [*.net *.split]
octachron has quit [*.net *.split]
recj has quit [*.net *.split]
_whitelogger has joined #ocaml
tsani has quit [Ping timeout: 272 seconds]
asm89 has joined #ocaml
tsani has joined #ocaml
isaachodes[m] has joined #ocaml
ggole has joined #ocaml
rntz2 has joined #ocaml
thizanne has joined #ocaml
dmbaturin has joined #ocaml
aubian has joined #ocaml
SrPx has joined #ocaml
stan[m] has joined #ocaml
mehdib_ has joined #ocaml
webshinra has joined #ocaml
flux[m] has joined #ocaml
gahr has joined #ocaml
aspiwack[m] has joined #ocaml
Kitambi has joined #ocaml
sunil has joined #ocaml
banjiewen has joined #ocaml
jerith has joined #ocaml
Geekingfrog has joined #ocaml
SrPx has quit [Ping timeout: 249 seconds]
mgsk has quit [Ping timeout: 272 seconds]
mgsk has joined #ocaml
SrPx has joined #ocaml
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
narimiran has quit [Ping timeout: 258 seconds]
Vikfret has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
jnavila has joined #ocaml
stan[m] has quit [Remote host closed the connection]
isaachodes[m] has quit [Remote host closed the connection]
hdurer[m] has quit [Read error: Connection reset by peer]
rgr[m] has quit [Read error: Connection reset by peer]
Virgile[m] has quit [Remote host closed the connection]
jimt[m] has quit [Write error: Connection reset by peer]
aspiwack[m] has quit [Remote host closed the connection]
flux[m] has quit [Write error: Connection reset by peer]
regnat[m] has quit [Write error: Connection reset by peer]
Haudegen[m] has quit [Remote host closed the connection]
copy` has quit [Write error: Connection reset by peer]
smondet[m] has quit [Remote host closed the connection]
aecepoglu[m] has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
dl3br[m] has quit [Write error: Connection reset by peer]
otini has quit [Write error: Connection reset by peer]
peddie has quit [Write error: Connection reset by peer]
aspiwack[m] has joined #ocaml
jeroud has quit [Ping timeout: 250 seconds]
jeroud has joined #ocaml
chenglou has quit [Ping timeout: 250 seconds]
chenglou has joined #ocaml
mgsk has quit [Ping timeout: 252 seconds]
mgsk has joined #ocaml
Haudegen[m] has joined #ocaml
dl3br[m] has joined #ocaml
copy` has joined #ocaml
flux[m] has joined #ocaml
hdurer[m] has joined #ocaml
smondet[m] has joined #ocaml
jimt[m] has joined #ocaml
aecepoglu[m] has joined #ocaml
peddie has joined #ocaml
isaachodes[m] has joined #ocaml
stan[m] has joined #ocaml
regnat[m] has joined #ocaml
rgr[m] has joined #ocaml
otini has joined #ocaml
sepp2k has joined #ocaml
Virgile[m] has joined #ocaml
kakekongen has quit [Ping timeout: 258 seconds]
wilfredh has quit [Ping timeout: 250 seconds]
wildsebastian has quit [Ping timeout: 250 seconds]
wildsebastian has joined #ocaml
strmpnk has quit [Ping timeout: 250 seconds]
wilfredh has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
strmpnk has joined #ocaml
Vikfret has quit [Quit: Leaving]
kakekongen has joined #ocaml
mfp has joined #ocaml
jnavila has joined #ocaml
Haudegen has joined #ocaml
AtumT has joined #ocaml
amiloradovsky has quit [Ping timeout: 244 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
FreeBirdLjj has joined #ocaml
Vikfret has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
SpiceGuid has joined #ocaml
narimiran has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
SpiceGuid has joined #ocaml
FreeBirdLjj has joined #ocaml
ohama has quit [Ping timeout: 272 seconds]
SpiceGuid has quit [Ping timeout: 248 seconds]
RaycatWhoDat has joined #ocaml
<RaycatWhoDat> Hello.
jao has joined #ocaml
ohama has joined #ocaml
<dmbaturin> Hi RaycatWhoDat!
<RaycatWhoDat> Discovered OCaml a while back, but didn't really experiment with it until now. Been wandering between languages and nothing has stuck.
<RaycatWhoDat> So far, OCaml is fitting the bill but I have a few questions about the tooling, specifically dealing with the ecosystem?
iovec has joined #ocaml
<dmbaturin> What part of the ecosystem?
<RaycatWhoDat> For starters, I suppose what is the relationship of the different REPLs? Utop and such? Also, how to resolve simple errors in said REPL?
<RaycatWhoDat> I would imagine it's a path or environment variable issue
<RaycatWhoDat> But I don't know how the ecosystem works yet
<dmbaturin> They are all using the same interpreter inside. If that's what you are asking.
<dmbaturin> It's just a UI improvement, and utop also loads a bunch of libs by default that any reasonable person would load anyway (the default REPL loads nothing but the prelude).
<dmbaturin> In fact, it's very easy to build a custom toplevel (that's the ocaml for REPL), you can make a REPL that loads your module with just a few compiler switches.
<dmbaturin> And distribute it as a standalone program.
<dmbaturin> By the libs any reasonable person I mean findlib first of all. That's the lib that implements library path lookup so that you can do #require "somepackage" (one OPAM package is _usually_ also one findlib package, though some provide more than one).
<dmbaturin> * any reasonable person would load
<RaycatWhoDat> Ah, okay, that's interesting.
<RaycatWhoDat> So, part of the problem is that my module isn't being require'd beforehand
<Armael> you typically #require a "findlib library", which provides one or several OCaml modules
<Armael> (you can run "ocamlfind list" to list all the findlib libraries currently installed)
<dmbaturin> Let me rephrase. In the default REPL, #require isn't available initially because that directive is a library function, not a built-in. You need #use "topfind";; then it becomes available. utop does it for you on startup.
<Armael> and as dmbaturin mentioned, an opam package typically installs one or several "findlib libraries"...
<dmbaturin> RaycatWhoDat: It's quite easy to add your own directives in fact: https://baturin.org/code/ocaml-toplevel-directive/
<RaycatWhoDat> Ah, okay. Looking at my `.ocamlinit`, I did add a line for `topfind` but it looks like Core is having an issue
<dmbaturin> #require "core-flamewar";; ;)
<dmbaturin> RaycatWhoDat: If you are reading RWO v1, you should know that it hasn't aged well. A lot of it doesn't work anymore.
<dmbaturin> If they used the standard library, it would be a non-issue. ;)
ziyourenxiang_ has quit [Ping timeout: 268 seconds]
<Armael> you can read the dev version http://dev.realworldocaml.org/
<RaycatWhoDat> From the looks of it, it seems like Batteries is the better way to go?
<dmbaturin> If you want a non-invasive standard library extensions, batteries and/or containers is a good choice.
<Armael> meh, nowadays I would consider "containers" to be a better version of batteries
<RaycatWhoDat> What's invasive about the other ones?
<RaycatWhoDat> Do they override built-ins?
<dmbaturin> There are things in batteries that are not in containers, though perhaps they should. It's just a question whether companion_cube wants to include them or not. If there was number-aware string sort in containers, I would get rid of batteries in one my project.
<dmbaturin> RaycatWhoDat: Core generally expects you to open it, which shadows the standard library functions with functions that often have different type/argument order.
<companion_cube> you mean CCstring.compare_natural?
<Armael> :^)
<companion_cube> (not sure if it's exactly the same as in batteries)
<dmbaturin> It got somewhat more granular since RWOv1.
<dmbaturin> companion_cube: Could you please add some kind of ToC to the docs? It's so easy to miss things. :)
<dmbaturin> Yeah, I've found it already. From a quick test, it does exactly what I need.
<companion_cube> if you do more thorough tests, please add them ;)
<dmbaturin> My first test for such things is "192.0.2.10" > "192.0.2.5"
<companion_cube> if you look in the .ml file, there are similar tests, it's easy to add new ones (one line each typically)
<dmbaturin> Then "www1.example.com" > "www.example.com"
<dmbaturin> Indeed, I'll take a look.
<dmbaturin> companion_cube: By the way, would you be open to adding a bind alias to >>= where one exists?
<Armael> isn't it already the case
<companion_cube> yeah, I would. I know it's useful to people that like ppx magic
<dmbaturin> I'll make a PR then.
<dmbaturin> I'm definitely enjoying ppx_monadic, but it wants non-infix bind, and other libs do that too I think. Trivial, but less trivial than just module open. :)
<dmbaturin> In other news, I've discovered support for Mac OS 9 in fileutils while fixing some bugs.
<Armael> ppx_let wants a bind with a labeled argument
<Armael> isn't it simpler to just let people define their bind themselves
<dmbaturin> Bind with a labeled argument? Which argument is labeled?
FreeBirdLjj has quit [Remote host closed the connection]
* dmbaturin has a complicated relationship with labeled arguments
<Armael> the function
<dmbaturin> ...with thoses fixes, fileutils plausibly works on win32 again.
<dmbaturin> My playing with building windows binaries without actually touching windows has gone too far maybe.
<RaycatWhoDat> Hey, uh... weird question
<RaycatWhoDat> How hard would it be to make a game using OCaml?
<RaycatWhoDat> I like Haxe but it's so... fragmented with its integrations with other frameworks that aren't OpenFL?
<RaycatWhoDat> .*
SpiceGuid has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
shenghi has quit [Ping timeout: 246 seconds]
<dmbaturin> RaycatWhoDat: There are some SDL bindings I believe. There may be bindings fot HTML5 canvas for JS targets.
<dmbaturin> * WebGL, rather
<RaycatWhoDat> Good deal. Thank you.
<dmbaturin> Then again, writing a game from scratch by now probably isn't either, unless you are doing something very simple or highly innovative.
<RaycatWhoDat> Well, I'm not a terrible fan of the game engines these days
<RaycatWhoDat> An aside: my first snippet of real OCaml is complete. Could I bother you all with a code review? Anything to improve or if you flat-out hate it, all are welcome.
shenghi has joined #ocaml
<dmbaturin> Sure.
<dmbaturin> RaycatWhoDat: Why not use Array.iter?
<RaycatWhoDat> 'Cause I didn't know it existed, haha.
<octachron> the `generate_indent` function is accidentally quadratic, you could use Buffer rather than string concatenation
<RaycatWhoDat> By 'quadratic', you're referring to time complexity?
<octachron> The ignored_paths could be a set rather than a list.
<dmbaturin> let rec duplicate num str acc = if num = 0 then acc else duplicate (num-1) str (str ^ acc) (* tail recursive *)
<dmbaturin> Combine with octachron's advice for best performance. :)
<octachron> Space complexity: you are allocating 1+ 2 +3 + ... + n bytes when generating a string of length n
<RaycatWhoDat> Ohhh~
<RaycatWhoDat> Got it.
<octachron> In your case, you could also use Format to do the pretty printing
jnavila has joined #ocaml
narimiran has quit [Ping timeout: 258 seconds]
<dmbaturin> https://baturin.org/projects/soupault Now with actual docs (sort of).
Jeanne-Kamikaze has joined #ocaml
<RaycatWhoDat> Sets are a bit weird to use
<RaycatWhoDat> Why does it want me to make a whole other module for one instance of it?
<oni-on-ion> parametric modules ? Set.Make(xyz) ?
<oni-on-ion> so you can have sets of whatever, without Set actually knowing or caring what it is. also, because types
<oni-on-ion> in this context sort of ala C++ templates, haskell type classes, traits n protocols
<oni-on-ion> also Set.Make(Set.Make(Set.Make ....
<RaycatWhoDat> Ah. I don't quite grok the specific caveats but I can glean a little bit of insight from that.
<RaycatWhoDat> Thanks.
<dmbaturin> RaycatWhoDat: Since it can be a set of _anything_, the alternative would be to ask you to pass a whole bunch of functions for handling the items as arguments.
<oni-on-ion> first-class modules are quite a thing
<dmbaturin> Since there's no ad hoc polymorphism, there's no way the same function can work for different types.
<RaycatWhoDat> Ah, okay.
<dmbaturin> * function with the same name
<dmbaturin> If it has to care about that type, that is.
<dmbaturin> List.length : 'a list -> int can work for a list of anything because it doesn't even look at elements, but a set addition function needs to know how to compare them at the very least.
<dmbaturin> Built-in cmp is 'a -> 'a -> int, but it's magical.
<RaycatWhoDat> All right. I gotta go. Thanks for all the help, again.
<RaycatWhoDat> What a terrifying parting gift.
RaycatWhoDat has left #ocaml ["ERC (IRC client for Emacs 26.1)"]
<oni-on-ion> aha
<dmbaturin> If you see an 'a -> 'b function, you know it's either useless or dangerous.
<Armael> :D
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
<dmbaturin> Where's a working ocamloscope finally?
<dmbaturin> Is there anything keeping anyone from resurrecting it?
iorivur_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
<Drup> apart from the fact that the code is fundamentally broken ? :)
<dmbaturin> Drup: How exactly it's broken?
<Drup> pretty much all the algorithmic and design decisions are wrong
<Drup> the ideas are not bad, but the implementation is really awful
<dmbaturin> I haven't read it, to be fair. I just remember that at some point it was working passably well.
<Drup> the research by type never really did
iorivur has joined #ocaml
<dmbaturin> Are there any fundamental difficulties with getting it right?
<Drup> Yes.
<Drup> research by type is pretty hard. It's basically a choice of how much approximation you do
<dmbaturin> Is hoogle less broken?
<Drup> Hoogle's search by type is pretty terrible. It's more a grep than anything else
iorivur has quit [Remote host closed the connection]
<dmbaturin> I still think _some_ search is better than no search. :)
<Drup> that's fair, but ocamlscope's implementation is still horrible
gravicappa has quit [Ping timeout: 258 seconds]
ggole has quit [Quit: Leaving]
AtumT has quit [Ping timeout: 268 seconds]
AtumT has joined #ocaml
SpiceGuid has joined #ocaml
AtumT_ has joined #ocaml
AtumT has quit [Ping timeout: 245 seconds]
uzuki has joined #ocaml
iovec has quit [Quit: Connection closed for inactivity]
maiste has joined #ocaml
maiste has left #ocaml [#ocaml]
andreas303 has quit [Remote host closed the connection]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
andreas303 has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
jnavila has quit [Ping timeout: 268 seconds]
iovec has joined #ocaml
jerith has quit [Ping timeout: 252 seconds]
jerith has joined #ocaml
narimiran has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
uzuki has quit [Quit: Fix config.]
uzuki has joined #ocaml
narimiran has quit [Ping timeout: 272 seconds]
sagax has joined #ocaml
Haudegen has joined #ocaml
Serpent7776 has quit [Quit: leaving]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
sagax has quit [Read error: Connection reset by peer]
amiloradovsky has joined #ocaml
averell has quit [Ping timeout: 272 seconds]
iovec has quit [Quit: Connection closed for inactivity]
ziyourenxiang_ has joined #ocaml
ygrek has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
Haudegen has quit [Quit: Bin weg.]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]