Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
sh0t has quit [Remote host closed the connection]
gtrak has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
gtrak has joined #ocaml
clog has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
maattdd_ has joined #ocaml
gtrak has quit [Ping timeout: 256 seconds]
gtrak has joined #ocaml
maattdd_ has quit [Ping timeout: 256 seconds]
maattdd_ has joined #ocaml
pierpa has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
andreas_ has quit [Quit: Connection closed for inactivity]
sh0t has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
sh0t has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 252 seconds]
spew has joined #ocaml
spew has quit [Read error: Connection reset by peer]
clog has joined #ocaml
yaewa has quit [Quit: Leaving...]
VermillionAzure has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
spew has joined #ocaml
spew has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 264 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 264 seconds]
pierpa has quit [Quit: Page closed]
zv has joined #ocaml
BitPuffin has joined #ocaml
keep_learning has joined #ocaml
dh_work has quit [Quit: poof]
dedgrant has quit [Read error: Connection reset by peer]
_whitelogger has joined #ocaml
argent_smith has joined #ocaml
tarptaeya has joined #ocaml
slash^ has joined #ocaml
zpe has joined #ocaml
VermillionAzure has joined #ocaml
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 260 seconds]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
cbot has quit [Ping timeout: 264 seconds]
orbifx has joined #ocaml
VermillionAzure has quit [Ping timeout: 252 seconds]
tarptaeya has quit [Read error: Connection reset by peer]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest21286
infinity0 has joined #ocaml
jimmyrcom has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
<remix2000>
Do Batteries have a function that splits array into chunks of equal size (Like Core's List.chunks_of; `'a list -> length:int -> 'a list list`)?
<remix2000>
I'm just wondering which one library has more functions I used to write on my own...
nullifidian__ has quit [Ping timeout: 264 seconds]
keep_learning has quit [Ping timeout: 264 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
seliopou_ has quit [Ping timeout: 264 seconds]
troydm1 has joined #ocaml
zolk3ri has quit [Ping timeout: 264 seconds]
troydm has quit [Ping timeout: 264 seconds]
aegray has quit [Ping timeout: 264 seconds]
maker has quit [Ping timeout: 264 seconds]
reynir has joined #ocaml
antismap has joined #ocaml
nullifidian__ has joined #ocaml
maker has joined #ocaml
aegray has joined #ocaml
nullifidian__ has quit [Ping timeout: 264 seconds]
reynir has quit [Ping timeout: 264 seconds]
nullifidian__ has joined #ocaml
reynir has joined #ocaml
<rgr[m]>
remix2000: i think you can safely rule out batteries
<thizanne>
:(
* Haudegen
likes Batteries.
<rgr[m]>
batteries isn't bad, but containers is basically superious in every way
<rgr[m]>
batteries isn't bad, but containers is basically superiour in every way
<Haudegen>
rgr[m]: AFAIK there are no modules for logging and command line parsing.
<Haudegen>
rgr[m]: In containers.
<rgr[m]>
Good! There are much better alternatives for those elsewhere
spew has joined #ocaml
<Drup>
Haudegen: use cmdliner and logs
<Haudegen>
rgr[m]: Which one has to find, to understand, to install and to maintain. It's all included in Batteries.
<rgr[m]>
The alternatives mentioned are more ubiquitous, better documented, and hence easier to understand.
<thizanne>
yeah I'm not sure Cmdliner is "easier to understand" than batArgs
<thizanne>
(yet it is indeed better)
<rgr[m]>
what does batoptparse buy over Arg again? I had a brief look at it once and it looked like it was an extended version of Arg.
<Haudegen>
rgr[m]: While this may be true for cmdliner and logs, I find the Batteries documentation much better than Core's.
<Haudegen>
rgr[m]: I found useable example code for BatOptParse. That did it for me.
<Drup>
Haudegen: if we were still in an ecosystem where batteries and core are the only two choices (which was more or less the case 6/7 years ago), I would agree with you
<Drup>
Fortunately, opam happened :D
<rgr[m]>
Haudegen: That's arguable. But anyway, containers is just as well documented.
<thizanne>
rgr[m]: no idea, it is probably just an extended version indeed
<rgr[m]>
By all means, keep your working code. There's no shortage of usable example code for cmdliner
<thizanne>
Haudegen: what do you use batteries for ?
<Haudegen>
So you all recommend containers? I tried it, the monomorphic operators bit me in the a**. While that's a good change for sure, it wasn't a pleasant experience to find the "problem". I tried to port some code from battiers to containers...
<Haudegen>
thizanne: For my daily standard library needs. :)
<thizanne>
no, I recommend batteries in a selfish way because I'm trying to figure how we should make it evolve
<Haudegen>
thizanne: I'm porting some code over from Python. Batteries has a lot of things I'm used to finding in a standard library.
<rgr[m]>
I think base is a valid alternative as well. It depends on whether you value compat. with the stdlib.
<rgr[m]>
If you do, then use containers. Otherwise, base is there
<thizanne>
maybe we should just maintain it and encourage people to migrate to containers
<thizanne>
maybe we should aim at improving and dusting it into a batteries 3 major release
<Haudegen>
What's wrong with Batteries?
<thizanne>
it's old
<thizanne>
and some things should be changed
<thizanne>
like io or enum
<thizanne>
but it will break code so I'm not sure it's worth upgrading
<thizanne>
there seem to be some users, but very few publish their final code on opam so it's hard to know how and why it is used
<rgr[m]>
Yup...
<rgr[m]>
And the major driver behind making these big, painful, improvements to batteries ended up quitting and creating containers
<rgr[m]>
so in a way, containers is basically batteries 3.0
<thizanne>
maybe
<thizanne>
but then why are people still using batteries ?
<thizanne>
if it's just because they don't want to migrate, it's probably not worth the hassle of major-releasing
<Haudegen>
thizanne: It has a lot of useful modules, the documentation is good and you'll stumble over it when entering the OCaml realm.
<rgr[m]>
containers:batteries is base:core
<thizanne>
ok but why isnt all of this true of containers
<rgr[m]>
I'm not sure that companion_cube will appreciate this comparison though :P
<rgr[m]>
Yeah, but I find that line of thinking isn't necessarily productive
<rgr[m]>
We could also, why do people use extlib?
<thizanne>
well batteries does have an advantage : we redefine the stdlib structures instead of building over them, so we can actually access their internals, which is needed for efficiently providing some functions
<thizanne>
people don't use extlib
zolk3ri_ is now known as zolk3ri
<thizanne>
or if they do, it's simply because they never wanted to change
<Haudegen>
thizanne: Containers looks very small if you're used to Python's standard library. With Batteries, I don't have to look for a lot of small projects for logging etc. That's very convenient for beginners.
<thizanne>
maybe, but then I don't think batteries is the solution
<rgr[m]>
thizanne: opam uses extlib...
<thizanne>
the solution is some meta-package which depends on a curated list of blessed packages, each one being maintained separately
<Haudegen>
thizanne: That sounds very nice.
<Drup>
that solution doesn't happen in practice because for each package, someone, somewhere, will fight to replace package X by Y in a misguided attempt to improve the quality of the ecosystem :>
<rgr[m]>
I can actually see the appeal of logging batteries provides though. Logs is really nice, but it's a bit raw for beginners
<rgr[m]>
And the docs immediately start dumping Format on unsuspecting beginners
spew has quit [Ping timeout: 248 seconds]
<Drup>
beginners should learn format anyway
<Haudegen>
rgr[m]: The appeal is that it's right there in the lib I already have installed. And it works.
<Haudegen>
rgr[m]: Good enough.
<Haudegen>
Drup: Do you have URL handy?
<thizanne>
g hnt7
<thizanne>
(don't mind me, i'm cleaning my keyboard)
<rgr[m]>
Haudegen: everything else works too. Even better might I add. Also you did manage to do that installation process once. Can we dare to repeat a couple of more times perhaps?
<rgr[m]>
You'll need a build system, unit testing, json, etc. eventually
<rgr[m]>
You could actually get pretty far with just the python stdlib. I don't think that's the case with batteries.
<Haudegen>
rgr[m]: If you are new to OCaml you have a lot of things to learn. I'm sure I'll get to your point of view eventually but now I want to get some OCaml code into production. I know that my choices might not be perfect from a seasoned OCamler's point of view.
<rgr[m]>
I get it. I just don't think that using batteries is the part of least resistance for beginners
<rgr[m]>
s/part/path/
<Haudegen>
rgr[m]: But I'll take another look at Containers. Thank you for your input.
<Haudegen>
rgr[m]: It was the first path I found. :)
<rgr[m]>
Haudegen: this channel is usually a great place to find quick support for containers as well. A nice little side benefit :P
<Haudegen>
rgr[m]: OK, thank you. :) Another thing: everything regarding Containers seems to come from this Mr. c-cube. This isn't a one-man project which could disappear in a year, is it?
jnavila has joined #ocaml
<rgr[m]>
It's been around for a while so I don't think it's a big risk. The only risk is that the project does evolve faster than batteries. For example the preference towards monomorphic comparison wasn't always there.
<rgr[m]>
Batteries is a lot more static in comparison
<Drup>
the bus factor is indeed not very good on that one, but on the other hand, virtually nobody works on batteries, and 1 > 0
<rgr[m]>
Didn't batteries activity pick up lately? Anyway, I think all the old problems still stand
<Haudegen>
rgr[m]: I see. OK, I think I shouldn't start out with "old" tech. So I'll try to switch over to Containers.
<Haudegen>
rgr[m]: But one thing I'm quite sure of: I don't like Core.
<rgr[m]>
haha. well aren't we lucky to have so much choice
<Haudegen>
rgr[m]: Choice is only a good thing when combined with a friendly IRC channel. :)
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
gtrak has quit [Ping timeout: 256 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
dtornabene has joined #ocaml
nullifidian_ has joined #ocaml
nullifidian__ has quit [Ping timeout: 252 seconds]
<orbifx>
remix2000: for starters don't inline it :)
<dinosaure>
not yet, I did a PR on opam-repository, but not yet merged
<orbifx>
remix2000: (1) take that function out of there, (2) deconstruct a in fun (x', y', el) ->.. (3) rewrite yrel and xrel as a single function (4) I woudn't mix `match` and `if` in that case
<companion_cube>
remix2000: don't hesitate to `let pred a = big predicate code in`
<companion_cube>
also, indentation is… weird :D
<remix2000>
IDE indents code for me B-)
<orbifx>
dinosaure: will the package name be emile? also did you use ocaml-publish or did you manually apply the changes on opam's tree?
<zolk3ri>
indentation is for plebs
<zolk3ri>
waste of space!
<companion_cube>
better than a waste of tabs
<companion_cube>
if you ask me
<remix2000>
orbifx: (0) What do you mean by "rewrite yrel and xrel as a single function"? (1) How should I check that condition then?
mrgrieves has quit [Ping timeout: 260 seconds]
<zolk3ri>
:D
<remix2000>
orbifx: Ok, understood the 1st.
<remix2000>
orbifx: But that still doesn't make sense IMO, as I should pass 2 args then.. :(
<orbifx>
remix2000: what's wrong with two args?
<remix2000>
Maybe it's just me who is wrong... Now, how about that `if` and `match` mixture?
FreeBirdLjj has joined #ocaml
<TheLemonMan>
is there a way to create an opam switch for a locally modified version of the compiler? My google-fu is failing me
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<reynir>
maybe on opam 2, don't think it's possible for 1.2
<orbifx>
TheLemonMan: are you pinning locally? of switches work like other packages, then maybe you can pin with a different name
<orbifx>
remix2000: you can use a "guarded" match rather than using an if statement which makes the logic harder to read.
<TheLemonMan>
aha, it looks like opam-compiler-conf is what I need
FreeBirdLjj has joined #ocaml
<jpdeplaix>
companion_cube: I'd be glad. As you wish :)
spew has joined #ocaml
<companion_cube>
with great powers come great github notifications!
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<jpdeplaix>
I already have opam-repository :'D
<jpdeplaix>
nothing can be worst
<companion_cube>
there you go then!
<jpdeplaix>
Thx!
spew has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
nomicflux has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
TheLemonMan has quit [Read error: Connection reset by peer]
dtornabene has quit [Quit: Leaving]
<orbifx>
Is opam's `dev-repo` meant to be the source code repository generally or the dev branch?
FreeBirdLjj has joined #ocaml
TheLemonMan has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
gentauro42 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
reynir has quit [Ping timeout: 260 seconds]
gentauro has joined #ocaml
jack5638 has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
tg has joined #ocaml
<orbifx>
dinosaure: am I getting this right, in Emile one should do string -> Emile.t list? There is no string -> Emile.t? (because a string can have multiple addresses?)
<jpdeplaix>
orbifx: mmh the dev branch I would say. I mean the branch should be stable to be able to compile it but otherwise yeah.
jack5638 has joined #ocaml
<jpdeplaix>
it's mostly to use with « opam pin add pkg --dev »
<jpdeplaix>
so it depends on the state of your repository and how confident you are in making people testing for your "dev branch"
<orbifx>
jpdeplaix: hmm ok, need to consider
FreeBirdLjj has joined #ocaml
kamog has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
shinnya has joined #ocaml
Haudegen has quit [Remote host closed the connection]
sh0t has joined #ocaml
FreeBirdLjj has joined #ocaml
spew has joined #ocaml
average_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<rgr[m]>
jpdeplaix: the reason why all of those alpine builds are failing is strange :O
<rgr[m]>
The CI scripts require you to have ocamlfind, which requires m4, which needs depext to be ran
<rgr[m]>
but of course this won't work b/c the ci script itself will run depext
FreeBirdLjj has joined #ocaml
cbot_ has joined #ocaml
<jpdeplaix>
rgr[m]: yeah, ignore those failures
<jpdeplaix>
it's temporary
FreeBirdLjj has quit [Ping timeout: 248 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
reynir has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
slash^ has quit [Quit: Leaving]
Haudegen has joined #ocaml
spew has quit [Quit: Leaving]
orbifx has quit [Quit: WeeChat 2.0.1]
orbifx has joined #ocaml
<orbifx>
any reasons why I should avoid using array in an API?
<orbifx>
It's more compact and possibly faster because of that
argent_smith has quit [Quit: Leaving.]
<jpdeplaix>
orbifx: as an external API ?
<jpdeplaix>
I guess it mainly depends on what you are doing (it always does ^^")
<orbifx>
jpdeplaix: I have a list of authors in Logarion. So I either store it as list or array. There aren't any additions or removals expected.
jimmyrcom has joined #ocaml
average_ has quit [Remote host closed the connection]
sapristi has joined #ocaml
<orbifx>
how about that jpdeplaix ?
<orbifx>
Also, what would the super-type of List and Array be?
<orbifx>
companion_cube: you might know the answer to that
nomicflux has quit [Quit: nomicflux]
sapristi has quit [Remote host closed the connection]
<companion_cube>
I have an IArray type somewhere
<companion_cube>
(immutable array)
sapristi has joined #ocaml
<companion_cube>
but it's a restricted subset of the API of Array, + some append, flat_map etc
<companion_cube>
only useful in very specific circumstances
<companion_cube>
orbifx: why not just a list?
<companion_cube>
it's going to be small anyway, isn't it?
<orbifx>
I think each element is 3 times bigger something like that. I guess you are right, it will usually be max 2-3 folk writing
<companion_cube>
:D
<companion_cube>
are you trying to save 6 memory words?
<companion_cube>
in a blogging system? :D
<orbifx>
every little helps :)
<orbifx>
this module is used in the server too, which can hypothetically and hopefully cache thousands of entries one day
<octachron>
orbifx, are you planning to have CERN amongs your users?
<orbifx>
octachron: haha definitely :_)
<orbifx>
oops, :)
nicoo has quit [Ping timeout: 255 seconds]
<thizanne>
orbifx: it's the usual open door stuff, but you're doing it wrong
<thizanne>
every little helps, sure, but that means you have a finite development time and every little time not spent in useless optimisations will help you
<companion_cube>
make the list of authors private, with a few functions on it
<companion_cube>
and start by just implementing it as a list
<companion_cube>
if you have 10M users, you can switch to a set :D
<thizanne>
when you reach a point where having the authors in an array rather than a list, you'll know it (and you'll have benchmarked your program to know it's the bottleneck, no point in improving something that's not the slow part)
<orbifx>
companion_cube: you are write, and I need to look into compacting duplicates, so sets make sense. Btw do you know what is the supertype of list and array?
<thizanne>
there is none
<thizanne>
or maybe you mean something else by "supertype"
<orbifx>
thizanne: I get your point and I wouldn't be spending time thinking about this, except that I want to solidify the API. Implementing Array or List is no trouble at this stage, just making the correct choice.
<orbifx>
By supertype I mean a type whose morphisms they both share
<orbifx>
thizanne: also what do you mean by "open door stuff"? Not heard the expression before
<companion_cube>
the only thing list and array share, is `length` and `get/nth`
<companion_cube>
and `iter` and `fold` ofc
<companion_cube>
so if that's what you need, abstract it in a nice little `Authors.t` type and voilà
<orbifx>
:)
nicoo has joined #ocaml
<thizanne>
orbifx: it's a french expression, a fast lookup made me think it was also used in english
FreeBirdLjj has joined #ocaml
<companion_cube>
tu laisses la porte ouverte à toutes les fenêtres, thizanne
<thizanne>
"breaking down open doors" means saying obvious things
<thizanne>
:)
<orbifx>
Ah. There is another expression "leaning on open doors", so got a bit mixed up :P
FreeBirdLjj has quit [Ping timeout: 260 seconds]
isd has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
jao has joined #ocaml
FreeBirdLjj has joined #ocaml
jnavila has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
FreeBirdLjj has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
FreeBirdLjj has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
kakadu has quit [Remote host closed the connection]