Fork me on GitHub
#off-topic
<
2020-02-15
>
Ahmed Hassan09:02:08

Should Table name be plural or singular in database? For example user or users? what are conventions behind this naming?

p-himik09:02:16

The best answer I've ever seen on the topic: https://stackoverflow.com/a/5841297/564509

4
p-himik10:02:06

Suppose we have a bunch of N-dimensional shapes. Each shape is composed of amorphous building blocks of a particular size, so there's no true continuity - all shapes are discrete. The task is, among a set of such shapes, find all pairs that can interlock with each other. This got me thinking - is there a way to encode a shape in such a way so that checking if two shapes could be interlocked would be really easy?

Vincent Cantin18:02:42

how are defined the shapes?

Vincent Cantin18:02:32

how would be defined interlock? like complementary shapes on different building blocks?

p-himik18:02:16

Let's go with 2D for now. A shape is anything that has a surface area. Interlock is harder to define, and its definition can change depending on whether it makes the task any easier. For the simplicity, let's say that we require the shapes to touch each other, there must be only single continuous line where they touch, and that line has some minimum length.

Vincent Cantin18:02:59

does interlocking between 2 blocks imply that the blocks don’t intersect?

Vincent Cantin18:02:07

are the blocks convex ?

p-himik18:02:02

Nothing intersects - it's just like a physical object. No, they can be concave. They can even have holes in them.

p-himik18:02:32

But again - if you can think of some constraint or simplification that makes solving this task simpler - by all means.

Vincent Cantin18:02:35

holes like donut or like a U?

p-himik18:02:59

What is "hole like a U"?

p-himik18:02:15

A horseshoe does not have a hole, if that's what you mean.

Vincent Cantin18:02:47

I was referring to 2D shapes

Vincent Cantin18:02:13

the U shape is concave

Vincent Cantin18:02:24

the O shape has a hole

p-himik18:02:38

Can be concave, can have holes.

Vincent Cantin19:02:16

I would approach the problem by looking for what makes 2 shapes not interlock, then define your solution as the complementary set of pairs.

Vincent Cantin19:02:07

(sorry if it sounds abstract, I can’t do better at that point)

p-himik19:02:24

That does sound too abstract. :)

Vincent Cantin19:02:37

are the shapes made of straight segments?

p-himik19:02:58

Not sure what "straight segments" means. Given what I've told about the shapes being discrete, let's imagine that they're composed of quanta, where each quantum is just a teeny-tiny square. That's it. So no smooth perimeter is possible, unless it's a straight line. But the quanta are so tiny, that we can approximate, just like with pixels on your screen, although without antialiasing.

Vincent Cantin19:02:13

In 2D: I would model each shape by a set of its edges (including absolute positioning), Then I would look for which shapes share the same edges.

Vincent Cantin19:02:15

You might use a quadtree to rule out most pairs of shapes efficiently.

Vincent Cantin19:02:42

Does it make sense to you?

p-himik19:02:13

Using a quadtree sounds interesting. I've never dealt with this data structure before.

Vincent Cantin19:02:06

I’m glad that my gamedev background could still be useful 🙂

p-himik19:02:03

Oh for sure. Gamedev has a lot of stuff that can be used elsewhere.

3Jane12:02:12

Personal preference: singular (for data tables), because it makes join table names clearer. Compare: user_report - 1-to-1, one user, one report about the user user_orders - 1-to-N, one user may have multiple orders classes_students - M-to-N, one class has many students, one student attends many classes

3Jane12:02:14

then again, often it makes sense to denorm data these days, so you'll end up with a medley of names anyway

borkdude12:02:56

Enjoyed this interview with DHH. If you want to hear some contrarian opinions to popular agile, static typing and microservices trends, listen to this 🙂 https://twitter.com/corecursive/status/1223733771834462210

👍 8
borkdude12:02:35

I'm not saying that I agree with everything, just an interesting interview.

borkdude13:02:11

Maybe he should be invited to some Clojure conference as the keynote speaker 😉

mloughlin13:02:48

DHH has some interesting opinions that seem really close to Clojure, but seems to disagree with the priority of "decomplect"

borkdude13:02:27

One of his points in that podcast is that programming languages attract people with different preferences which do not have to agree and that's totally fine 🙂

dominicm13:02:36

Oh wait, we're supposed to agree.

3Jane13:02:35

new predicate in library polite-clj: (def agree? (constantly true))

😂 4
dominicm14:02:36

Have you seen manners?

dominicm14:02:59

It's rather fantastic

dominicm14:02:03

Really well designed

Conor15:02:32

It's no INTERCAL

3Jane17:02:36

> The compiler, appropriately named "ick"

Conor15:02:43

Now there's a language that teaches you to be polite

3Jane16:02:22

I love it XD

3Jane16:02:25

so victorian

3Jane16:02:22

> The `manners.really` defines two public macros, `really` and `verily`. 😂

p-himik16:02:29

Also need: indubitably.

borkdude16:02:18

I love the off-topic-ness today

Marcus Pemer17:02:13

Indubitably off topic.

hindol19:02:44

Wondering how many of you are also a fan of ProjectEuler? This is my favourite passtime. I am currently solving my 119th problem.

3Jane19:02:23

if you run which someutil and the util is found, exit code is 0. if the util is not found, exit code is 1

p-himik20:02:05

But have you heard of the high elves where? Available only in Zsh though, not in Bash.

borkdude20:02:21

This command is also called where on Windows I believe (I came across it when porting something)

3Jane20:02:22

wiki says there is a which on windows

3Jane20:02:55

in any case, this is for an automated build pipeline

3Jane20:02:34

the less I have to install, the better 🙂

borkdude20:02:43

yes, a lot of unix commands give useful exit codes

hindol20:02:24

In the world of shell scripting, 0 always means success.

p-himik20:02:51

Or a failure to report about an error.

hindol20:02:09

This is one of those UNIX-y conventions that leaked into C/C++ where main() returns an int and a program returns 0 upon success. Don't quote me on this though.

3Jane20:02:47

thank you, I know

3Jane20:02:26

on the other hand, I do not assume that every tool is going to behave in a nice way. so "which behaves like a sane tool, returning 0 when expected" was a good thing to share.

3Jane20:02:10

why did you assume I needed to be told about 0 means success etc?

hindol20:02:06

Why did you assume I said that in a demeaning way? I was trying to be helpful in general. This convention, once known, can be applied broadly to other things.

hindol20:02:58

0 = success and 1 = failure is a little unconventional in the way that most languages coerce 0 to false and 1 to true.

3Jane20:02:13

you imagined the "demeaning"

3Jane20:02:42

it is not unconventional for people who have grown up using unix

3Jane20:02:01

but it looks like it is unconventional to you and you wanted to help me 🙂 so, cool: I'm guessing I'm way older than you and it doesn't translate.

p-himik20:02:15

It is also logical. There can only be one success case. But there can be a various amount of reasons for something to fail.

hindol20:02:14

Did you just assume my age though? Not saying you are wrong, but we can play this game forever.

hindol20:02:43

But peace.

dominicm20:02:59

When I look this up, I feel like I'm told command -v is more portable or something

3Jane20:02:09

:thinking_face: how little memory can I give lein before it chokes?

p-himik20:02:39

There's also #leiningen channel.

3Jane20:02:16

thinking out loud / sharing misery, sorry 😄

borkdude20:02:37

@lady3janepl what do you want to do actually?

3Jane20:02:36

make it so circleci automatically runs the static site generator, pushes to a different github pages repo, and publishes my blog

borkdude20:02:58

circleci has 4gb, should be sufficient? 😉

3Jane20:02:09

you'd think, but the build breaks on one specific command (`lein sass` from yogthos' lein-sass plugin)

3Jane20:02:39

so I'm now breaking the build locally by choking memory, to see which settings need to be updated

3Jane20:02:53

poster child for "it's annoying if you need to install a separate util to build your thing"; I really don't want to use a sidecar image just to have sass

3Jane20:02:40

LEIN_JVM_OPTS was needed in circleci options, rather than JVM_OPTS.

didibus21:02:09

> Like, let's make software that we really enjoy making. Where the art of creating the software is a pleasurable experience in and of itself that can supersede and be more important than all these other attributes we keep talking about

didibus21:02:24

I think this is an understated point

didibus21:02:19

The developer is actually the number 1 factor of influence over both the speed of delivery and the correctness of the program

didibus21:02:56

Somewhere along the way, this idea came out that the developer is just this static constant. Any one dev can replace another. And their output is always jsut the same. A function of their tools and environment

didibus21:02:48

But the data shows differently. Turns out all these other things are much more a static constant with barely any influence on the outcome

didibus21:02:39

Static types, unit tests, functional, oop, tla+, etc. They're mostly interchangeable and barely affect the output if you replace one for the other

didibus21:02:06

But the developers can make or break software. Try the same project with a different team and it might result in something that's much better or worse.

didibus21:02:06

What that means is you need to focus on things that make the devs perform to their fullest. A good team culture, flexible hours, an insistence on craftsmanship and respect for their work, passion, dedication, getting appropriate rest, no overtime, good vacation policies, encourage exercise and healthy habits, and letting them use a language they truly enjoy and have fun with, and that doesn't limit their expressivity

hindol22:02:10

I think with time we should keep zooming out. Forget the little things to be able to focus on the bigger things. C/C++ have its purpose but the vast majority of developers should now move on to higher and still higher levels of abstractions. But tell this to the managers!

didibus21:02:32

That's why Clojure is my favourite language. Simply because it makes programming a fun, joyful and interesting experience, it doesn't limit my creativity, it enables me to express myself in even more ways. That in turn means that my focus, passion, effort, concentration towards the project I'm working on is maximized. This actually leads to real concrete benefits, the code I write is more correct, I'm done much sooner, the performance is better, etc.

👍 4
hindol21:02:53

Are you writing Clojure professionally? Guess you are among the few lucky ones then.

didibus21:02:46

I am 😋, for 3 years now. Feel very lucky that I am.

hindol21:02:20

I was offered a Clojure position in Toronto. The very high COL deterred me. Someday...

didibus21:02:09

What's COL ?

hindol21:02:35

Sorry, COL = cost of living

seancorfield21:02:38

Toronto's not bad compared to where I live 🙂

seancorfield21:02:53

SF Bay Area $$$ 💵

didibus22:02:11

With high COL places, if salary matches. You need to think about retirement opportunity too. Saving 10% of a high salary will get you much further when you retire and move to a low COL city

didibus22:02:19

Though its true that while you are there, you might accept that your living in a smaller appartment, and can't nexessarily afford a nice car or other luxuries that the salary would make you think you would if it weren't for high COL

hindol22:02:30

Yeah, savings in absolute terms would be roughly the same. I did calculate those things.

didibus21:02:42

This is the magic behind all Lisp. This is the reason for Beating the avg: http://www.paulgraham.com/avg.html Ruby is arguably a Lisp in disguise. People are trained on these languages that dont focus on developer creativity, joy, interactivity, expressiveness. So the curve to re-learn a language that does is higher, Ruby takes a middle of the road approach, one foot in what is familiar, one foot in the world of art and wonders.

seancorfield21:02:27

I agree: I'm happier writing Clojure than any other language I've ever used (and I've used a lot in production over the decades!).

seancorfield21:02:54

Before Clojure I had used Scala, Groovy, Java, CFML (ColdFusion), C++, C, COBOL, several assemblers. Some Perl in there too. Plus little bits of other stuff.

seancorfield21:02:20

Modern CFML is kind of interesting, to be honest: it's run on the JVM since around 2001, it's mostly JS-style syntax, but Java's class model. It had closures before Java, it has metaprogramming capability. Classes can respond to unknown method calls, like Smalltalk/Ruby. Fully compiled (to JVM bytecode on the fly, like Clojure).

borkdude22:02:00

How does it compare to JRuby for example?

seancorfield22:02:35

Well, I'm kinda biased because I don't like Ruby's syntax. I prefer CFML's script syntax.

seancorfield22:02:28

The main "downfall" with CFML is that the templating language is also a full tag-based implementation of the language and a lot of (self-taught) devs tend to put way too much logic into their HTML page templates.

seancorfield22:02:11

(but if anyone thinks Clojure is a "niche" language, then the small industry footprint of CFML these days would horrify them 🙂 )

didibus22:02:42

Haha, I hate Ruby's syntax too 😋 Can't stand word delimited blocks

seancorfield22:02:16

It's the preponderance of punctuation -- makes me think I'd reading/writing Perl. Ugh!

hindol22:02:36

I see a pattern! It's the syntax of Ruby that turns me off too.

didibus22:02:17

:rolling_on_the_floor_laughing:

Lennart Buit22:02:31

I dislike ruby’s idea of using a different names for things that are common in other languages

seancorfield22:02:44

There's a lot of the semantics of Ruby to like. But having all the (system) classes open for extension is... nasty... IMO.

☝️ 4
Lennart Buit22:02:45

its not try/`catch`, its begin/`rescue`

Lennart Buit22:02:17

its not filter, its select. By choosing a different name for those things I cannot leverage my knowledge of other languages in Ruby

didibus22:02:19

That's why I'm so happy Clojure went with first and rest instead of car and cdr 😋. Though there's still a few names I think could have been better

borkdude22:02:44

at least Ruby can be auto-indented. don't get me started on Python or Haskell.. or YAML's whitespaced based indentation

seancorfield22:02:47

I actually rather like Python and it's significant whitespace 🙂

borkdude22:02:57

each their own 😉

seancorfield22:02:00

If Python 3 had been adopted much faster, I think we'd be using it for infrastructure at work. I went to PyCon 2013 to evaluate Python and the big 2.7/3.x split was what put me off -- but I liked a lot of what I saw in Python 3.

didibus22:02:07

I feel it depends. At first it feels nice, but then you get into all the edge cases, copy/pasting, command line, tab vs spaces, etc.

borkdude22:02:03

even Scala introduced significant whitespace now with version 3. huge mistake if you ask me

💯 8
borkdude22:02:18

and a total waste of time

💯 8
hindol22:02:46

Complex codes in Python are very hard to wrap your head around. It's anything can happen territory. And the class system feels monkey patched (pun intended.)

💯 8
☝️ 4
seancorfield22:02:26

I'd argue that's a fairer criticism of Ruby -- and part of why I prefer Python over Ruby. The __weird__ way to specify special methods in classes is certainly... weird... and I don't like that much in Python.

didibus22:02:26

Anyone tried aggressive indent mode in Clojure? It was a game changer for me when it came to indentation. And not having to think about it at all

p-himik22:02:32

I have grown to dislike Python after a few years. It allows you to do too much, and libraries overuse it. The whole ecosystem now feels... rotten. Celery - at some point, there was not even a single test for some crucial core functionality. An update has broken the whole app. Everything is dynamic to the core - incredibly hard to debug. Pandas - breaks. All. The. Time. I now hate this library, but I still have to use it. Django - ooohhhh, don't get me started. The list goes on, but these are the main offenders.

💯 4
☝️ 4
4
p-himik22:02:20

And now with pip and conda separation. Still no preferred way to create reproducible setups. Pipenv sounds great in theory, garbage in practice.

😂 4
☝️ 4
didibus22:02:20

Pretty happy that I can now use Sci or Joker instead of Python for scripting 😊

didibus22:02:22

Just miss HEREDOC

hindol22:02:54

And doctest.

seancorfield22:02:35

@p-himik It seems like every single env management thing for every language is pretty much garbage...

p-himik22:02:13

I'm not so sure. NPM itself is garbage, but w.r.t. envs it's pretty good! And with Maven or deps.edn you don't even needs envs! Which is even better.

p-himik22:02:32

This particular XKCD issue kinda scratches the surface.

dominicm22:02:48

Well, node is good, which makes npm good

p-himik22:02:39

How can you say such vile things.

dominicm22:02:33

Node is good about how it loads packages

p-himik22:02:26

Oh, I'm talking about that "which makes". And "npm is good". :)

dominicm22:02:02

Sorry. I mean. I'm clarifying what I mean.

👍 4
dominicm22:02:23

😩 I'm sleepy.

p-himik22:02:58

Same. But not enough. :(

seancorfield22:02:06

I can't get past how awful JS is as a language 😐

p-himik22:02:34

Oh, that's a given.

p-himik22:02:44

In any conversation. :D

dominicm22:02:31

@p-himik your timezones makes the gap bad :(

dominicm22:02:07

JS ecosystem seems worse than the language.

dominicm22:02:25

Es7 semicolon cancer notwithstanding.

p-himik22:02:53

> Es7 semicolon cancer First time I hear about it, and cannot find anything that looks interesting. Have a link?

dominicm22:02:00

> Alan Perlis, "Syntactic sugar causes cancer of the semicolon.''

p-himik22:02:13

I have read that one like a week ago. :) But I thought you meant something particular because of the mention of ES7.

dominicm22:02:57

No, no. Just the crazy amount of syntactic sugar is getting too much. I did js back when es6 was cool with babel and all that. I think some of ES6 is great. Just too much ()=>{}

p-himik22:02:37

Still not even close to C++'s level. :D Actually, now that I think about it, I don't know what I'd rather choose nowadays - JS or C++.

dominicm22:02:13

I stand by K&R ansi C. It's not many things. I like that.

p-himik23:02:38

Continued to write SuperHexagon bot I started writing 6 years ago or so in C++. Such. A. Slog. Even the simplest "find the min value in array" or "multiply every value by N". Think for 10 minutes not about how to solve the task at hand but about how to avoid typing all those .begin()/`.end()` without devolving to manual loops. C is nice, when macros and bit magic like 0x5F3759DF are used sparingly.

dominicm23:02:40

Yes. I find on clojure an element of C.

dominicm23:02:05

C is a small book. Not like C++. Clojure is really a small book.

dominicm23:02:25

I have a small palette in clojure, and much I can do with that.

seancorfield23:02:11

As someone who spent eight years on the ANSI C++ Standards Committee (J16) -- and was secretary of it for three years! -- I totally understand any and all complaints folks have about the complexity of the syntax etc in C++ 🙂

👏 8
hindol06:02:39

The cleaner, more elegant language hidden within C++ is called C, 😛

dominicm22:02:15

Pip is almost good. All it needs to do is track explicit vs transitive.

p-himik22:02:55

It also needs a support for virtual environments. It's not good by itself because it's nothing more than a way to install a package.

dominicm22:02:37

Yes. But virtualenv was good in my day

p-himik22:02:32

The point is, it's a separate tool, with its own convention. And its started as an unofficial wrapper, which made many things worse because we now have an unmanageable zoo out there.

dominicm22:02:25

I always forget it's in core now. Why is it a zoo, or virtual env is the standard?

p-himik22:02:28

This is how my notes on it look like. I didn't even do any proper research to get to that point - just heard stuff around. I stopped updating them long ago.

dominicm22:02:05

When I did this, there was strong consensus

dominicm22:02:37

This was before it was in core

p-himik22:02:29

Back then there was not enough concern, let alone talk, about reproducible setups. But then all hell broke loose and opinions started to appear at an alarming pace, with the core team not paying it due attention.

☝️ 4
andy.fingerhut23:02:18

I may be projecting my preferences onto a larger population of developers as a whole, but are perhaps most developers like me where as long as they can "get by" with a build system / dependency management system / test infrastructure that someone else set up, and you know enough to incrementally tweak it for small changes, but go to the expert for help when you need something more complex, and let them argue about it to their heart's delight?

dominicm23:02:29

I don't understand how language creators aren't more obsessed with this. I'm crazy about having a setup that I can reinstall later without problems.

borkdude23:02:18

we're constantly having trouble with python dependencies at work, (almost) never with those from the java/maven/clojure ecosystem

andy.fingerhut23:02:52

I'm not sure whether it is the ones like me who don't pay much attention as long as it usually "just works", or the ones who obsess about it, who make them complex 🙂 (the former group only doing so by adding in occasional hacks to "get something new done")

dominicm23:02:36

@U0CMVHBL2 the problem is that sometimes the best install instructions are a bunch of Ubuntu packages, and they conflict with another project on your machine which has to pin at an older version because breaking changes

dominicm23:02:56

Oh, and you run windows so no instructions for you.

andy.fingerhut23:02:31

I have made instructions for a collection of open source tools that are mostly "sudo apt", "git clone", "make" and "make install", across about 6 or 7 packages. I test them once a month on 3 Ubuntu versions, and they usually keep working 🙂

andy.fingerhut23:02:05

Granted, that is probably a small enough number of software packages that I am not seeing the pain others do with much larger collections of packages

andy.fingerhut23:02:49

I mean, who wants to write the Windows install instructions? 🙂 (if you do not commonly use Windows yourself, there is a perfectly good reason not to be motivated to write them)

p-himik23:02:44

> I'm not sure whether it is the ones [...] It's everybody who wants to attempt to solve any problem in "the correct" way, put the solution out there, and market it a bit. Or quite a lot, in some cases.

borkdude23:02:01

I see supporting Windows as a technical challenge, so I actually take (masochistic?) joy in it

dominicm23:02:13

Exactly. But poor Sean has to figure it out himself .

dominicm23:02:32

I'm on a different Linux, so I have to translate the packages to my machine.

p-himik23:02:08

Different package names are fun.

👍 4
andy.fingerhut23:02:22

"I see supporting Windows as a technical challenge, so I actually take (masochistic?) joy in it". I've sometimes gone to those lengths before, too. Cool. More power to you. I would not be surprised if your preferences change 20 years from now.

borkdude23:02:45

@U0CMVHBL2 what's your age if I may ask?

andy.fingerhut23:02:53

50 years young!

andy.fingerhut23:02:09

I'm hoping the current crisis is a mid-life one -- bodes well for longevity 🙂

borkdude23:02:09

just turned 39 last week

p-himik23:02:27

Preferences in 20 years: "Finally, these are the instructions on how to run it on TI-84."

borkdude23:02:30

compared to @U09LZR36F we're all old I guess

borkdude23:02:46

I learned his age at ClojuTRE, I was really surprised 🙂

dominicm23:02:16

Hold on, my mum says it's past my bedtime.

😄 12
dominicm23:02:43

You guys all surprise me more. How do you manage all the grown up stuff and be awesome on here?

p-himik23:02:08

I'm 29, but I'm balding and have quite a few gray hairs in my beard that I just started growing (can't be bothered with shaving anymore). So I at least appear to be in the majority camp. :)

andy.fingerhut23:02:08

Big inheritance.

andy.fingerhut23:02:34

That was a joke, by the way. I spend more time than is sane on line, for my own enjoyment.

borkdude23:02:19

@U09LZR36F This is like a pub, but with Clojure people, what is not to like?

dominicm23:02:46

I see it as a win all round :)

p-himik23:02:07

> How do you manage all the grown up stuff Listening to podcasts while doing chores helps. Can definitely recommend https://fs.blog/the-knowledge-project/ Listening to DOOM 2016 soundtrack when having to deal with JS also helps.

didibus22:02:31

Ya, I'm surprised not more languages go the route of Java and have some classpath instead of relying on implicit environments

dominicm22:02:05

What's the temperature on hierarchical dependencies?

p-himik22:02:35

Isn't it a problem in principle, and not specific to Java in any way?

dominicm22:02:56

All that typing though!

dominicm22:02:24

What does rust do? Has it tied it's fate to cargo now? How much?

andy.fingerhut23:02:36

What are hierarchical dependencies?

dominicm23:02:42

Your dependencies can have different versions than you

dominicm23:02:52

They have their own dependency on X

dominicm23:02:03

Allows for breaking changes.

dominicm23:02:37

The problem is that the types don't match up

andy.fingerhut23:02:03

I know "we are not there yet", but isn't being much more strict as a community on backwards compatibility one way to avoid a lot of those problems?

p-himik23:02:44

Rich had an interesting talk about dependencies. It mentioned an idea about understanding the reason something depends on something. E.g. if packages A and B depend on different versions of C just for the function f where f does not differ between the versions, then the conflict resolution is pretty trivial.

andy.fingerhut23:02:38

I have tried taking the idea of backwards compatibility into other areas of software/protocol/standards-writing, and even some people who pay lip service to semantic versioning are OK with backwards-incompatible changes from 1.0.x to 1.1.y, if they feel 1.0.x just had a bug.

andy.fingerhut23:02:16

This after lots of discussion about when to or not to bump up the major version number, and pointing at the https://semver.org web page, etc.

p-himik23:02:41

Semantic versioning is a very well marketed myth, it seems.

❤️ 4
andy.fingerhut23:02:57

You mean, you see people paying it lip service, and breaking its own rules, too?

andy.fingerhut23:02:53

I don't have any hard data collected, but I wouldn't be surprised if lots and lots of standards/APIs/libraries actually followed semver, we would see more version numbers like Firefox web browser.

p-himik23:02:04

Oh for sure! But there are other concerns. This is a good short read about them: https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md

p-himik23:02:13

Well, Firefox as a browser is a bit different because it's not a dependency of something. Using semver for apps just doesn't make sense IMO since it's hard to even describe what a "breaking change" would be in that case.

andy.fingerhut23:02:46

That document you linked seems to say they want to adopt something that is just like semantic versioning, except they want to make x.y.z allowed to have breaking versions when they go to x.(y+1). They just added one to the number of decimal points where changes indicate a breaking version. Either that, or they actually have nuances I didn't catch on a quick read.

andy.fingerhut23:02:22

They don't seem to be saying "throw out semantic versioning", but "let's tweak it"

p-himik23:02:19

Also, it allows increasing any version part even if you don't have breaking changes. But yes, the gist is correct.

littleli22:02:11

in that respect, Elm is interesting, they statically check breaking changes and enforce semver based on change of types (interfaces) during libraries publication. Probably the most solid approach out there.

andy.fingerhut23:02:54

Does "official semantic versioning" say you cannot increase the major version number, if the later version is backwards compatible?

andy.fingerhut23:02:12

I would think it is allowed, just you might be implying breakage where there actually isn't any.

andy.fingerhut23:02:51

I mean, he criticizes semver for not recognizing psychological/marketing pressures about version numbers of later releases. His doesn't either, if people widely adopted it.

andy.fingerhut23:02:38

The psychological/marketing pressures just move a decimal point over

p-himik23:02:47

Items 7 and 8 of the spec are not really precise about it, but make it sound like you should not update the major version when you have some non-breaking major change. BreakVer doesn't just move it to a different decimal point though. It completely removes the pressures if the changes are not huge. With SemVer you have to wait till major update before removing some deprecated rarely used stuff. With BreakVer you can just just remove it and release a new minor version without thinking about it.

andy.fingerhut23:02:50

But BreakVer minor version = Semver major version, so if people widely used BreakVer, wouldn't they be just as much disliking of updating the minor version in BreakVer, as they dislike updating the major version in Semver?

andy.fingerhut23:02:57

It is just giving you some vague wiggle room in categorizing breaking changes as "small" versus "big", which seems just as likely to turn into wailing and gnashing of teeth over what is "small" versus what is "large", which would differ from project to project.

p-himik23:02:29

No, because in SemVer the major version change implies a lot of work for someone that wants to update a dependency because all the changes will be packed tight in there. In BreakVer, a minor update will still require you to look at the changelog, but it will be a small one. You have an ability to update little by little. I think it capitalizes on the psychological effect the major version change has.

andy.fingerhut23:02:05

Doesn't the difference between a lot of work versus a little work to handle a breaking change, depend a lot upon how you used that library/artifact? The same minor breaking change for 50% of library users could be a "I won't update, ever, because it is too expensive for me to do so" change to the other 50%

andy.fingerhut23:02:27

A library provider can guess/hope/have-usage-data-statistics on what they think are minor breaking changes, but knowledge of invariants of how things currently work have a way of spreading into other parts of a consumer code, given time.

p-himik23:02:08

Yes, maybe. Sorry, I'm not mentally prepared to have an in depth conversation on it right now - it's almost 2AM here. :) And after all, the only reason I linked the BreakVer page initially was that it outlined the issues in SemVer, not because it attempted to provide for a viable alternative.

andy.fingerhut23:02:24

Sure, no problem. Sorry, not trying to put you on the spot here.

andy.fingerhut23:02:58

It does make some sense to me that BreakVer's recommendation of having two ways to indicate a breaking change, versus Semver's one way, might help reduce the psychological/marketing pressures that make SemVer not actually followed. It does have an uphill battle of becoming widely known and adopted, and even then, it would remain to be seen if it got the same "not actually followed enough to mean anything" reputation that SemVer does.

didibus23:02:39

Allowing versioned modules is one way. The argument against that is that sometimes, you want to force updates to your dependencies as well, for bug fixes, performance and especially security

andy.fingerhut23:02:47

I have no history of putting out a widely used bit of code that was gradually evolved over 10 or 20 years of time, but I have a lot of respect for things like the Linux kernel, Java, and Clojure, that have done a better job of it than many other things. Not saying they have 0 exceptions -- just that the effort to avoid breaking changes really shows, if you look.

didibus23:02:54

That's why Java still resist versioned modules

didibus23:02:23

Its to push people to patch their dependencies