Better HN
topnewbestaskshowjobs
Log inSign up

usrbinbash

4,687 karma · joined Dec 4, 2021 (4y ago) · 1,693 submissions

Submissions

comment 4y ago · link · parent

Are they expected, or are the required?

Because, serializing db access through a single process only becomes a problem when the number of reads/writes get so large, that the process becomes a bottlenec.

And judging by the test the author of the linked article did, that would have to be a HUGE number.

comment 4y ago · link · parent

> and yet modern web applications tend to demand a dramatic distributed architecture

The dirty secret is: Most of them don't really need that architecture. Most, and I mean +95% of websites would run just fine on a single box, running the websrv, db and whatever script-interpreter the backend runs on.

Sure, it may be a bit slower if its not hooked up to a global CDN, and if the box goes down the user gets 404. But its also alot easier for an admin to simply give the one box a good wallop and put it back online, since it so simple.

https://idlewords.com/talks/website_obesity.htm#heavyclouds

comment 4y ago · link · parent

If only there was a type of electric vehicle with a lot of passenger capacity (which would make it efficient in terms of energy usage and operating cost) that could run on a regular schedule through major urban areas, with stops at or near sites people want to get to or depart from.

Oh wait, there is: Trains, and their inner-city little brothers: Trams.

So here is a crazy idea: How about we rely more on this tried and tested technology (the concept of elecric trams dates back to 1875) instead of building more car-esque vehicles which demand a HUGE amount of our urban living space to operate and store?

comment 4y ago · link · parent

Manjaro does, not 100% sure about Arch, but I think its symlinked there as well.

comment 4y ago · link · parent

> So why the focus on beef? Can you explain?

To make a stronger argument. Beef production is by far the most inefficient method of converting resources (feed, water, land, energy) into meat, so its the one commonly used when argueing about resource requirements. One could say it's a rethorical tactic.

Taking water as an example, the required amounts (litres) for 1kg of meat are: (beef:~15500, mutton:~10500, pork:~6000, chicken:~4300)

However, the arguments would still work if we took chicken as the measurement...1kg of insect protein requires 5l of water, 3 orders of magnitude less than the most efficent classic meat production

comment 4y ago · link · parent

If it is not an engineering problem, then engineers should not be bothered with it, simple as that. Not because we cannot do it, but because we can do things others cannot. And these things take time and focus to do well. And without them, all the talking and planning and strategizing and wearing suits, becomes pointless, because there is no product to sell.

I am a coder. It is not my responsibility to sell our product, convince someone to see a demo, or do "market research" into what features we require.

"division of labour" exists for a reason. If I am supposed to be doing the job of the guys in suits&ties, in addition to be able to write, read and test code, then I have to ask the question why we should pay these guys in the first place.

comment 4y ago · link · parent

Until it suddenly isn't in either of these paths, maybe because its required to run in some quirky setup.

Hrdcoded paths for things a program doesn't bring with itself, should be avoided in general. There is a reason $PATH exists and is easily extended. It is the users/admins responsibility to make sure envvars are set correctly, and it's the programs responsibility to give a useful error message when it cannot locate the programs it expects in $PATH

comment 4y ago · link · parent

>The solution is not one that may involve code or even engineering in general, but rather, a clear understanding of the problem, its constraints

Problem is: The only way to really understand a problem in engineering, is trying to engineer a solution for it.

comment 4y ago · link · parent

I understand how and where they are installed.

The question is, when 2 packages, pkgA & pkgB bring in the same library, call it "thelib.so" into the system, logically, only 1 of them can be refered to by the symlink in System/Index/lib.

So we have both

    /Programs/pkgA/1.0/lib/thelib.so
    /Programs/pkgB/1.0/lib/thelib.so
And lets say the symlink points to the file of pkgA:

    /System/Index/lib/thelib.so  ->  /Programs/pkgA/1.0/lib/thelib.so
What happens now if I remove pkgA? If nothing changes, the symlink would be dangling, and pkgB would no longer function because the libraries are looked up in the index.

My question is: how is the pkg management system resolving this?

comment 4y ago · link · parent

But if BOTH packA & packB come with the same libs, one of them HAS TO get symlinked in the system index. And they do not depend on one another, as each has to bring the same lib to the system, so logically, they can both be removed without breaking a dependency.

But since there can be only ne symlink to the library (because the lib is searched by name in the index) the question remains: How is the package manager handling this for Gobolinux?

comment 4y ago · link · parent

Go

Simple in a good way, fast, excellent toolchain, great libraries, great Documentation and easy to learn, read and explain. A pragmatic language that I can simply get sh* done with.

comment 4y ago · link · parent

How is this the "explanation of a goal"?

I issue an imperative command to apt-get, and it tries to execute it.

It has no knowledge of why I want foo bar and baz installed, nor can it decide if these 3 programs make sense for what I am trying to do, or if there is a better way to do it (maybe there is a package "bazinga", that can replace the foo-bar-baz stack?).

A goal-aware package manager would look like this:

   super-apt "i need the system ready to function as a webserver, with a high availability database and backup capabilities"

comment 4y ago · link · parent

>here are existing groups that eat insects but I think they would have to be excluded from the studies as their gut biome will have adapted over a longer period of time.

The "gut biome" is not a genetically fixed factor. It is a collection of acquired microorganisms and changes as we change what we eat, how much, how physically active we are, what substances the organism comes in contact with. etc.

And yes, there is scientific literature on the subject, lots of it:

https://scholar.google.com/scholar?start=10&q=insects+human+...

> Fat content does vary from 5% to 45% on different species of insects so I think that does actually matter

Fat content also varies wildly in classical meat, and in plants, so what about it? Just as with all other food sources, someone living on an insect-based diet must take care to balance required nutritients.

comment 4y ago · link · parent

This is actually a neat idea, and I am saying that as the archetypical, grumpy "I like my sys the way it is, thank you very much!" - kinda guy.

A lot of the directory structure of POSIX systems is completely obsolete in the 21st century. The difference between sbin and bin? Historical, for the most part, and irrelevant in the age of rescue systems.

One question that is nagging at my mind with this: What if two programs require the same lib, how is this resolved?

Because, when I install progA, the lib is symlinked into the index, so when I now install progB, the lib is installed again if I understood correctly. Storage is irrelevant, the pkg manager sees there is a symlink, so it stays in place, all is well.

But now I remove progA, so what happens? progB is still present, still requires the lib, it is also still installed, but now the symlink, which refered to /Programs/progA/libs/thelib.so is broken. How is this situation handled?

comment 4y ago · link · parent

> there would have to be peer reviewed studies

There are.

https://link.springer.com/article/10.1007/s13593-017-0452-8

The science is pretty much clear on the topic; Insects beat "classic" meat production methods in every efficiency metric.

1kg of insect protein requires: 1.7kg of feed and 5l of water

1kg of beef protein requires: 20-25kg of feed and 15500l of water

Most of the food used as animal feed has to be grown on arable land. A lot of it (soy, corn, ...) is actually edible for humans. Insects on the other hand, can consume what essentially amounts to waste-products such as spent grain from breweries.

> Not all proteins are equal in protein and fat content. Fat is required to release bile from the gallbladder.

Insects protein consists of the same 20 proteinogenic amino-acids as those of other animals. And there are more than enough sources of fat available, even if one completely abandons meat.

> Putting certain insects near crops in large amounts are a high risk to those farm owners.

The insects used in meat production are not crop-pests. And I would be alot more worried about naturally ocurring pests, which benefit from the huge mono-cultured plants we use to produce animal feed.

comment 4y ago · link · parent

No it isn't.

We already have an economically efficient food source. It's called plants. And if we stopped wasting 25kg of edible produce (like soy) to make 1kg of beef, and cared more about effective distribution and solving logistic problems than pleasing the stock market, we could easily feed the the worlds population without dooming our planet.

Insects are a viable addition, as they are capable of converting otherwise inedible plant material into material fit for human consumption. But they are not required.

comment 4y ago · link · parent

This is pure gold :D

>Communicate the status of your work-in-progress to your manager in a way that both reflects your uncertainty and is useful for your manager.

"Well, sir, let me put it this way: Can 9 women give birth to a child in one month? If so, then yes, you can have the feature next week!"

comment 4y ago · link · parent

>4th level language receives plain text explanation of a goal and produces code in a 3rd level language.

Such an explanation would read like this:

    I require some glue code so the system our company uses to pass messages between our services, can talk to the system of the company we talked to 2 days ago. Also, there should be a web interface or something to monitor it.
Not like this:

    A function that queries the user from the database by its surname

comment 4y ago · link · parent

> the synchronization overhead is an order of magnitude more than the actual work being done.

Yes, this is a common pitfall of concurrent programming applied incorrectly. I am aware of this. I am also aware that this is something that can be measured in an appropriate benchmarks.

Just like the thread-explosion problem of unchecked worker-pools, it isn't solved, but made alot easier to handle, by baking the capability to map logical execution threads onto OS threads right into the language.

> Writing concurrent code is hard.

Writing really good concurrent code is hard. But not harder than writing good abstractions, or writing performant code, or writing maintainable code.

comment 4y ago · link · parent

If we discover electric accumulators with a better energy-density than Li-Ion then yes, it is possible.

comment 4y ago · link · parent

The same thing was said decades ago when the first "4th Generation Development" platforms arose. The concept even predates the GUI era: "Application Development without Programmers" was published in 1981/82-ish.

Were we still coding in the late 80s? The 90s? The 00s? The 10s? The 20s?

Yes we were.

And we will still be coding when the next cycle of "low/nocode" platforms will be announced, and probably several such cycles after that one.

And the reason is simple: Complexity can be hidden and/or displaced. But it cannot be eliminated, unless the system itself becomes less complex.

comment 4y ago · link · parent

> uses barely less CPU% in a 2020 computer than in a 2011 one and it is extremely frustrating.

But if that's the case, what's the point in all that extra-complexity in the CPU, if in the end the benefits seem to be miniscule?

comment 4y ago · link · parent

    go doSomethingWith(x)

    Threads.@threads for x = 1:42

    thread::spawn    
How is that difficult? The problem is that people are taught that concurrency and the capacity for parallell execution is somehow difficult. It really isn't.

> It is still the case that most code the end-user is waiting for is JITted Javascript

That's a problem with JavaScript, not with language design. JS is simply not a very good language, and its lack of support of parallell processing is just one of its many problems.

comment 4y ago · link · parent

I could have, if I knew that it was him who said it. Thanks for the info.

comment 4y ago · link · parent

Erm...Copilot still writes procedures and data types, most of which I have to describe one by one.

And I still have to review all of them.

How is that "4th level abstraction" whatever the current usage of the term?

comment 4y ago · link · parent

Better question, do we need them?

Maybe someone with better eyesight than me would spot something, but I really cannot tell the difference between a 4k monitor and a 1080. Likewise with a refresh rate that is twice what my current monitors use.

I mean, if someone wants that sure, why not, but wouldn't that extra power be better spent to eke out more battery life? Because I wasn't annoyed with how things look on my monitors for...at least 15 years. What I AM annoyed with however, constantly, is how quickly batterys go flat.

comment 4y ago · link · parent

Languages never die from bad PR.

Languages die when no one uses them.

There are only 2 kinds of programming languages: The ones people complain about, and the ones no one cares about.

comment 4y ago · link · parent

Was any of the tens of thousands of buffer-overflow bugs the end of C?

comment 4y ago · link · parent

These movies are among the greatest treasures of cinema.
1
515253
57