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

The Problem is not with C alone however.

Speculative Execution, branch prediction and look ahead to the next 25 instructions, wasting huge amounts of power,...I mean, what?

The article even mentions that there is another way:

> In contrast, GPUs achieve very high performance without any of this logic, at the expense of requiring explicitly parallel programs.

Yes, C doesn't support that very well. But it could, and other languages, namely Rust, Go & Julia already can. So maybe it's time to do in CPU design what Go did in language design, and hit the brakes on complexity?

We don't need smarter processors, we need processors that can do high throughput on many execution units, and languages that support that well.

comment 4y ago · link · parent

> Guns are only one variable

So? It's one variable that can be changed.

comment 4y ago · link · parent

And now lets quickly check how many billions of $$$ the world spends on totally pointless military expenditures, and how much we could improve life for people in underserved communities if we just re-tasked 10% of that money.

comment 4y ago · link · parent

The difference:

SO provides solutions to problems.

Experimenting, playing around and "throwing spaghetti at the wall" can lead to an understanding of the problem.

SO will tell me to use DISTINCT, and that is correct.

But why? Why is this the better? Is it really? Why is the home-brewed reduce slower? How could it be improved? Oh hey, but if I did this to the data upstream I could prevent non.distinct records from being in the DB in the first place, etc. etc.

Software Engineering is, among many other things, a craft. Just like carpenting or stone carving or smithing, it must be honed, and mastery can only be achieved if one plays, trys and experiments.

----

Of course, reading about the solutions to a problem can also help in its understanding. For me personally, if I do not understand a problem, I like to do both: Experiment, and read what the "canonical" way to solve it is.

comment 4y ago · link · parent

Lower gun violence is a benefit.

Nonexistent GV would be better of course, and one of the steps to achieve that, is to have as few privatly owned guns as possible.

comment 4y ago · link · parent

This is actually an area of research, "releasing" the locks of the epigenetic code and getting differentiated somatic cells to behave like pluripotent stem cells again, in order to use them to recreate damaged tissue.

However, while that would be fine in a test.tube, it would be very bad if it happened inside the bodys existing differentiated tissue.

comment 4y ago · link · parent

>DNA is not like C source but more like byte-compiled code for a virtual machine called ‘the nucleus’.

I think a comparison to source code would also have merit.

The DNA gets transcribed into mRNA in the nucleus, these are transported into the cytoplasm, where the Ribosomes then translate that information into Polypeptide chains, which are then folded by Chaperones and the Machinery of the Endoplasmic Reticulum. The end result are Proteins, the biochemical "actors" and building blocks. These steps are comparable to compiling source code into opcode.

Also, the DNA itself is just half the story.

Which parts of the DNA can be transcribed, and how often, is encoded in the histone modifications (the histones are "packaging molecules" in the nucleus around which the DNA is partially "wound up") and the Methylation modifications to it. This is known as the epigenetic code, and its just as vital for the biochemical machinery to function as the DNA itself;

eg. It would be very very bad if, say, muscle cells suddenly started behaving like liver cells. Since both have the same DNA (in one organism), it's the epigenetic code that controls which parts of the DNA they "express", and thus what functional identity the cells have.

comment 4y ago · link · parent

Almost the same can be achieved in vim even without plugins

    :tabnew | r ! shopt -o globstar && grep -sn STRING **
This opens a new tab with the grepped output. I simply navigate to the line so my cursor is on the filename, then

    C-w gf
That's [Ctrl-W] followed by [g] and [f]

And just like that, the file is open in yet another tab. The best part? Since the grep output is just another vim buffer, I can search it as well, just like any other buffer.

And yes, ofc the above can be put into a custom command, just by putting this in the .vimrc:

    command -nargs=1 Gr :tabnew | r !  shopt -s globstar && grep -sn <args> **
Then the whole thing can be used like

    :Gr STRING

comment 4y ago · link · parent

Whoops, my bad.

Thanks for pointing it out, this brightened my day :D

comment 4y ago · link · parent

> What benefit is there to owning or using a weapon?

That's a good question.

https://en.wikipedia.org/wiki/List_of_countries_by_firearm-r...

Just looking at this table, I'd say: None whatsoever.

> If we collectively prohibited all countries worldwide from producing weapons like tanks, rocket launchers, etc...

There is an important difference between PRIVATE gun ownership and the military. Problem is, yes, ideally we would live in a violence free utopia, but if only ONE country doesn't agree to this, then pretty much everyone else has to equip an army as well.

comment 4y ago · link · parent

The west had literally DECADES to build up a stronger silicon-industry, and all the money and brainpower to do so.

Problem is, if spending for education and public investments in "future" technology stagnates, well...

comment 4y ago · link · parent

What people "take it as", and what facts are, are sometimes 2 very different things.

The baby box is a blessing for many families, and it's also much more than the box (which btw. is not a cheap piece of cardboard but comes complete with an insulated mattress and bedding made of high quality materials): there are clothes, diapers, hygienic goods, etc.

And last but not least, it's also a strong symbolic gesture: Society saying: "Don't worry, we got your back. You're not alone, we are all in this together, and we help each other."

comment 4y ago · link · parent

Plus, the human body radiates off a lot of thermal energy, warm gases rise, so purely by thermal convection enough mixing occurs.

comment 4y ago · link · parent

>The problem is that it is hard to express in C what exactly you want it to do.

The problem is: its very very very hard to translate what we WANT into instructions a machine can understand, aka. that are unambiguous.

This is an unsolved problem, and one I believe is unsolveable, because we express our needs in the constantly self-updating fuzzy-logic system that is biological organisms, which our language (and thus our thoughts) reflect. This system is inherently incompatible with the precision of a machine and it requires extreme care to get it right.

If it were otherwise, we would have long since figured out a way to turn natural language into code.

comment 4y ago · link · parent

2 things:

1. Yes, kate is a fantastic text editor as far as GUID editors go. Why? Because its simple and doesn't overload itself with needless cruft.

2. Please don't put anime girls on blog-pages that people may open in the workplace ;-)

comment 4y ago · link · parent

> I don’t think that the German society broadly shares the value of privacy to a level that warrants such excessive restrictions.

Even if that is the case, it would still not be an argument against such regulations.

If someone else is okay with the data transfer, he can opt-in if he wants to. I should not carry the burden of having to opt-out of it.

comment 4y ago · link · parent

>easy and fast access to financial instruments

Stable financial instruments.

>it's not hard to see how cryptocurrencies can help in this situation: faster easier and cheaper transactions

Transactions speed can vary and/or be tied into the transaction fees one is willing to pay.

How does that make the life of people who already don't have enough disposable income easier?

comment 4y ago · link · parent

>Are most of us secretly lying about how much we are working?

Short answer: No.

Long answer: Coders, Developers, Software Engineers, etc. (use whatever term you want) don't function like most "working" people. We don't work by filling in spreadsheets, shuffling papers and sorting cards, we also don't fix screws or talk a lot or cut hair.

A lot of our work is a) absorbing knowledge b) experimenting with things c) thinking about things. This then culminates in short but productive bursts of what non-coders would perceive as "actual work", aka. punching code into a keyboard. This btw. is the reason why hackers and "it guys" are always portrayed in movies frantically typing on a keyboard...its the only way of telling the vast majority of mankind "this person is doing stuff".

comment 4y ago · link · parent

One is a programming language, the other is an IDE, so my answer would be "no".

comment 4y ago · link · parent

"President" is not exclusively the title of the head of state of the US.

comment 4y ago · link · parent

Depends: President of what country exactly?

comment 4y ago · link · parent

> the way cryptocurrency is changing lives in the developing world.

I wonder, if people in the developing world could decide between using this enormous amount of electricity for "crypto", or using it to power desalination plants (facilities that turn seawater into drinking water) which one would they chose?

Just FYI: 25% of the worlds population, that's almost 2 BILLION people, do not have access to safe drinking water.

comment 4y ago · link · parent

In this screencast we look at one method for crossing this divide. We review a Twitter client whose core is functional: managing tweets, syncing timelines to incoming Twitter API data, remembering cursor positions within the tweet list, and rendering tweets to text for display. This functional core is surrounded by a shell of imperative code: it manipulates stdin, stdout, the database, and the network, all based on values produced by the functional core.

To me, that sounds how basically every procedural codebase operates: You have an interface, eg. ORM layer & connection handlers to connect a core of functions between which data flows on its way in or out.

So yes to all 3 questions as far as I'm concerned. Almost every program before and after the OOP hype was and is written in this manner.

The reason why I think this seems like a new concept to many people, is because the world is still coming down from the aforementioned hype when everything and the kitchen sink was supposed to be an object, and handling things by passing data between freestanding functions was seen as a big nono for some reason.

comment 4y ago · link · parent

Why mammoths?

Since we started measuring things scientifically, we have recorded literally hundreds of species that we wiped out...and there are probably many many more that we haven't measured.

These are species we know could exist in todays ecosystems (were it not for our recklessnes). Some of them had a valuable role in their environment that is sorely missed.

So, if we focused on bringing back extinct species, wouldn't it make more sense to start with one of them, instead of a giant mammal that has no natural habitat on todays earth, and went extinct long before we started to mess up the planet?

comment 4y ago · link · parent

I kinda feel like a bad person now for disabling the blink-cursor setting of my term emulator...

comment 4y ago · link · parent

Meh...it lacks the cruelty of BOFH and is nowhere near the sarcasm of Dilbert.

comment 4y ago · link · parent

BOFH is probably the best comical criticism of corporate "culture", with "Dilbert" as a close second.

comment 4y ago · link · parent

I really hope this is based on a per-page user-given permission, same as access to audio/video capturing...

Because if it isn't, any piece of adware code that loads onto the phone, would be able to run the tiny rotational-unbalance based mechanism within the phone for however long and in whatever fashion it sees fit.

As if phone batteries didn't run down fast enough already...

comment 4y ago · link · parent

> demanding that I install an "agent" from a company named "Drata"* on my laptop.

If a company sends me decidated hardware, including an LTE or 5G modem to connect to the internet, they can install on that whatever they want.

Their hardware, their rules.

My hardware, my rules.

1
525354
57