News for hackers. Stuff that matters.
Re:JsonLogic by jchw on Thursday May 27, 2021 @03:39PM (#27307246)
I am not saying that you are wrong. Not at all.

However, something I’ve come to learn is that some ideas I thought were bad were actually not bad. They were poorly executed and the exact reasoning why they did not work well in a given application was not well-understood.

So I can see an argument for “this was horrible back when it was done in the early 2000s” simultaneously with “this could actually still be a good idea for some use cases.”

Re:JsonLogic by janderland on Thursday May 27, 2021 @03:58PM (#27307493)
Currently reading about agriculture throughout human history. It made me wonder how many people failed to domesticate a single kind of crop and assumed crop domestication as a whole isn’t a good idea.

I realize that people need to make decisions based on their personal experience, and I don’t have a good rule-of-thumb for when to try a variation of a “bad” idea.

Re:JsonLogic by marksbrown on Thursday May 27, 2021 @04:49PM (#27308334)
‘Many of life’s failures are people who did not realise how close they were to success when they gave up' -- Thomas Edison.
Re:JsonLogic by burnished on Thursday May 27, 2021 @05:09PM (#27308583)
said the man who tested something like 6000 different kinds of plant materials as filaments for a light bulb
Re:JsonLogic by smitty1e on Friday May 28, 2021 @05:55AM (#27313487)
Three cheers for brute force methods.

Sometimes you need the BFH to get to the elegant solution.

Re:JsonLogic by craftinator on Thursday May 27, 2021 @08:45PM (#27310478)
Said the man who lied, cheated, and stole his way to fortune and historical fame.
Re:JsonLogic by fruityrudy on Friday May 28, 2021 @04:55AM (#27313145)
You’re just jealous
Re:JsonLogic by samus on Friday May 28, 2021 @08:29AM (#27314568)
Agriculture is difficult because it is literally a fight against nature/entropy. And it still has to be proven that it is a viable way to drive human civilization in the long term.

In nature, species populations compete with each other and are kept in a dynamic equilibrium. If population size of a species increases, then its predators will have more opportunities to predate, and their population size increases as well. This leads to more predation pressure, which should negate the population increase and decreases opportunities for predators as well. "Predators" is to be understood in a very general way. It can also apply to fungi and other microbial forms of life.

Changes to this equilibrium arise when prey species evolve to resist the predation pressure by predators. And vice versa if the predators improve. Then, ecosystems change, and these changes can be very disruptive.

Agriculture is a rebellion against this dynamic equilibrium because it creates irresistible opportunities for predators. They have to be held in check either by brute force (hunting, pesticides, containment) or by hacking the ecosystem (for lack of a better term) to ensure that helpful predators are around. The former is probably unsustainable in the long term as it is not at all clear that we will forever be able to outsmart the evolutionary potential of predator species. The latter is difficult as well.

Apart from predation, the other challenge to agriculture is that it depletes the soil in the long term. Fertile soil arises as a result of a ecosystem where the decomposers cannot keep up. Most forms of agriculture interrupt such ecosystems and thus deplete the soil in various ways.

To keep this in check, different methods were evolved, such as slash-and-burn, crop rotation and artificial fertilization. But it is not at all sure that we will always be able to stop depletion of our soils just in time to prevent civilizational collapse. Currently, availability of phosphorus is a looming danger because most of it is mined. Once we hit peak phosphorus, we better have solutions in place to get it from somewhere else.

Re:JsonLogic by healsjnr1 on Thursday May 27, 2021 @10:38PM (#27311165)
I think the key point on this is `some use cases`.

For people who've spent a lot of time with ANT, you might be familiar with this article from its creator: https://web.archive.org/web/20041217023752///x180.net/Journa...

It was possible and even made sense to use XML as the format for a build tool, however, it got stretched way to far. The idea was applied in use cases that were less and less appropraite, as a result years later you end up with something that is unwieldy and doesn't make sense and, generally, thought of as "terrible".

There are use cases were JsonLogic might make a lot of sense, and for those that is great.

Generally, I'm sceptical as there is high risk of increasing couplings in a way that will make change much harder. This will be particularly true if it is applied to use cases that don't truly warrent this kind of solution.

Re:JsonLogic by valenterry on Thursday May 27, 2021 @07:52PM (#27310088)
Sharing code between frontend and backend isn't a bad idea, yes. However, using Json for it is. And the problems and limitations with json can't be "fixed" in any way.
Re:JsonLogic by dragonwriter on Thursday May 27, 2021 @10:27PM (#27311102)
> Sharing code between frontend and backend isn't a bad idea, yes. However, using Json for it is.

I don't see why serializing close to JSON is any worse than doin so to, say, S-expressions, or Algol-style syntax, or WASM.

If you aren't manually coding it, but generating it, the capabilities matter, the syntax matters a lot less.

Re:JsonLogic by valenterry on Thursday May 27, 2021 @11:00PM (#27311271)
I think there are very good reasons why languages have their own custom formats and none of them ever decided to serialize into json, even when just "generating it".
Re:JsonLogic by dragonwriter on Friday May 28, 2021 @09:44AM (#27315232)
> I think there are very good reasons

But what reasons and are they relevant to this use? For instance, I can think of one really good reason (actually several different ones justifying different formats getting used depending on the actual use case, but they can all be summarized the same way when it comes to not using JSON): Shipping an AST between endpoints one of which is a web page and therefore has JSON as its best supported generic object serialization format isn’t the use case.

Re:JsonLogic by gnulinux on Friday May 28, 2021 @03:08AM (#27312548)
No I don't think there is a good reason. You're completely missing that programming language syntax is designed for humans. You can still serialize all languages to json syntax trees, just like you can do so with lisp notation, Polish notation etc.
Re:JsonLogic by valenterry on Friday May 28, 2021 @03:50AM (#27312764)
I'm not saying that you _cannot_ do it. But tell me: why has no programming-language done that? They all could have chosen to serialize their code or AST into json but they didn't. (except JsonLogic I guess)
Re:JsonLogic by gnulinux on Monday May 31, 2021 @06:50PM (#27348962)
People did do it (JsonLogic by your own admission) and similar things (every single Lisp based language every) so if your only argument is "people didn't do it before, therefore it cannot be a good idea" it doesn't work.
Re:JsonLogic by andyana on Sunday May 30, 2021 @09:08PM (#27338784)
Because someone didn't have the time to do it? Or they didn't think of it? Just because nobody has had success at an idea, doesnt mean that the idea can't work.

Or do you think we are at our peak?

Re:JsonLogic by valenterry on Monday May 31, 2021 @02:49AM (#27341000)
I mean, you are not wrong. But I think the chance for all these people just missing out or not having the idea seems quite low to me.
Re:JsonLogic by gnulinux on Monday May 31, 2021 @06:51PM (#27348980)
> all these people just missing out or not having the idea seems quite low to me.

You mean like every single idea/project/etc that ever existed before their invention?

Re:JsonLogic by andyana on Monday May 31, 2021 @09:00PM (#27349740)
Unfortunately, it has taken me 40 years to learn that most people have no clue about innovation. I mean, imagine believing there are no good ideas left, all the good songs have been written.

From now on, when someone tells me something is a bad idea, I'll take it mean that I should examine it further.