Better HN
topnewbestaskshowjobs
Log inSign up

usrbinbash

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

Submissions

comment 3y ago · link · parent

> that provide no actual insight into the question

Mind elaborating on that?

Because there is no biochemical reason why DNA could not have incorporated, say, a third pairing pair, so while base-3 (which I don't specifically mention in my post btw.) wouldn't work, base 6 or 8 would have been possible. "Unnatural Base Pairs" are even known to work in laboratory settings.

There is also no biochemical reason why base2 life wouldn't work. Expand the reading frame of the translation machinery to 5 instead of three, and you have enough coding space for polypeptides.

My answer adresses the question completely, because the only reason behind these "decisions" is an ancient system that simply got "frozen", and now cannot change any more.

comment 3y ago · link · parent

> Base 3 wouldn’t work in that sense.

That's true, but a) not the point I am making, and b) I am pretty sure it says nowhere in my post that it would.

comment 3y ago · link · parent

> Like, why didn't DNA end up as base 3?

Why did we end up with only 20 proteinogenic amino acids? Why are vertebrate neural architectures inverted (cell bodies on the inside, connections on the outside, even though the other way round way (eg. like a squids brain is organised) is easier and less inhibitive to growth?

2 Reasons:

a) Because nature and evolution cannot engineer. Random mutation, recombination and natural selection are the only mechanisms available. Things get selected if they outcompete existing alternatives, they don't need to be the best solutions.

b) All solutions have to be built by modifying what already exists. Evolution doesn't get to do greenfield projects, because anything that has to start from scratch is so disadvantaged in natural selection compared to already evolved complex life, it will fail.

This leads to systems that, from an engineering point of view, don't always make a lot of sense.

Eg. the architecture of the vertebrate neural system creates a lot of issues (eg. our light sensitive cells point in the wrong direction). The only way this makes any sense if when one looks at how the neural tube (the precursor to the backbone) is formed by the endodermis folding in on itself. This process is so deeply at the root of the Chordata, and so many other things depend on it, that it simply cannot change any more.

Many many biological systems are "legacy systems" in the truest sense of the word: Solutions produced a long time ago that may have many problems, but are simply too deeply enmeshed with everything that came after, that they are now impossible to change.

comment 3y ago · link · parent

> one gram of dried DNA can store 455 exabytes of data

Yes, and half a gram of Hydrogen could produce ~500 Megawatts of power in a fusion reactor. However, that theoretical value will remain irrelevant, as long as we cannot build a practically useful fusion reactor. And even if we could build one, it still has to compete with all other forms of producing power for scalability, reliability, efficiency and cost.

The fact that there is a very high theoretical number that seems really impressive, isn't a use case.

So, with that being said: how long does it take to write these 455EiB? How long does it take to read them? How error prone are both processes? And how much does it cost to write/read them?

> "18TiB ought to be enough for everyone" really doensn't cut it.

Pretty sure I never said that.

Also pretty sure common crawl can be compressed. Even assuming only a 2:1 compression rate, that means it fits comfortably on 11 LTO-9's. Now, a quick google-search churned out tape prices of about 110-140 $ per LTO-9. Let's say ~150$ per tape, that means the whole thing fit's on 1650 $ worth of storage. About 5000 bucks with 2 backups included. Double that for uncompressed storage.

Alright, so how does that compare to DNA storage?

https://www.nanalyze.com/2023/03/dna-data-storage-solution/

quote:

These days, it costs $600 to sequence a complete genome which contains around 200 gigabytes of data or about $3 per gig. Today, magnetic tape technology offers the lowest purchase price of raw storage capacity at around two cents per gigabyte

end quote.

So just reading the 380 TiB back from uncompressed storage ONCE, would cost ~1,140,000 dollars.

And that's just for reading. At a price differential that is measured in multiple orders of magnitude, a technology better offer some REALLY good, REALLY tangible advantages to compete.

comment 3y ago · link · parent

I don't see how.

Golang has first class support for bundling state and behavior: Receiver-Functions, often called methods. This means exactly 2 things; a) That for a type `Foo` I can do this:

    f := Foo{}
    f.funcThatUsesFoo()
instead of this:

    f := Foo()
    funcThatTakesFooAsFirstArgument(f)
and b) that Foo implements all interfaces whos method signatures it's receiver functions satisfy.

It doesn't mean that I now have to suddenly drown my code in over-architectured patterns just to satisfy some OOP sense of code-aesthetic. It doesn't mean that I have to try and hide state from code in the same module. It doesn't mean that I have to bundle things that could be free-standing functions into some type just because. It doesn't mean I have to make any of the mistakes OOP popularized over the years.

comment 3y ago · link · parent

Yes? I said so in my above post?

> Rust, which is also meant to implement system code with

comment 3y ago · link · parent

> DNA synthesis remains a bottleneck in the adoption of DNA as a data storage medium.

Yes, one of many.

Another one is a simple question: What exactly is the use case again? Because, storage isn't something we lack. Especially when talking about storage where, obviously, fast random access isn't a requirement, aka. data archiving.

We have good solutions for that; an LTO-9 tape can hold 18TiB of data native and up to 45 TiB of data compressed, with denser capacities planned: https://en.wikipedia.org/wiki/Linear_Tape-Open

comment 3y ago · link · parent

> Sure, but my point is, if the code is not well designed, the result of a ground-up rewrite will not be well-design either,

That doesn't follow for me, sorry.

A rewrite, as I understand and use the term, doesn't mean transpiling what exist to, say another language or to another framework. The old version is essentially just a very detailed and testable list of functional requirements; everything the old thing can do (as long as that functionality is still actually useful), the new thing must be able to do as well.

How this functionality is implemented in the rewritten version, and how it's internals are designed, is entirely up to the rebuild. The way functionality is implemented in the predecessor does not necessarily determine how it is implemented in the new version.

comment 3y ago · link · parent

I think this is less a case of

"don't use new tech if you don't have to"

and more a case of

"These are highly specialized weaving machines that were build decades ago around using punched cards, and whatever benefit by speedup in process we would get from replacing their ancient control system with a modern one, would be dwarfed by the cost of modifying them to use that control system."

Or to say this with slightly less words:

Replacing software and a couple of computers is cheap, compared to replacing room-sized industrial machinery.

comment 3y ago · link · parent

> Multithreading in C, however, is left as an exercise to the coder.

Well, it is a systems implementation language, so it cannot, and should not, impose too many guardrails.

And yes, sometimes systems implementations need to do things that even all the checks built into Rust would scream loudly about. Rust, which is also meant to implement system code with, acknowledges this duality, that's why the `unsafe` keyword exists.

And while the complexity of avoiding race conditions does exist, we have good solutions for it. One such solution is CSP. Passing state and synchronizing via messages is an incredibly natural and logical way to think about the structure of concurrent codebases.

comment 3y ago · link · parent

> A substantial rewrite is developers asking for a do-over, which is infantile behavior

That depends entirely on the reasons why they ask for a rewrite.

"I like this tech better", "I don't want to work with this tech", "This new tech is shinier": I agree with you, those are not solid engineering reasons.

"This doesn't interface well with the rest of the system because...", "This is going to cost us in the future because, ...", "This won't scale well because..."; I strongly disagree.

You may notice that the operative difference here is the term "because". If someone can give a quantifieable, technical, verifieable reason for a rebuild, then management should at least hear the guy out. They can still say no. But then the engineer did his job, and if the whole show goes haywire later because the 14 year old Java backend fails to scale up and the company loses money over that, nobody can say he didn't warn them.

comment 3y ago · link · parent

> If the code is well designed with separation of concerns,

"If" is the operative term here. "If" it is well designed, then there is usually not alot of reason to scrap it in the first place.

comment 3y ago · link · parent

> If the developers are not competent enough to write maintainable code or maintain existing code

Or if the old system simply doesn't work with modern environments.

Or if it depends on long abandoned frameworks.

Or if the business grows but the old implementation scales badly or not at all.

Or if it depends on components that incur licensing fees that become prohibitively expensive when it's scaled up.

Or if there are other legacy systems on different technical baselines that it could work with better after being rebuilt on the same base.

Or if its tech simply requires more maintenance than an alternative, thus binding dev resources the company could otherwise use more productively.

There are alot of reasons why maintaining an old system may be an undesireable move in the long run, that have exactly zero to do with the competence of the developers involved.

comment 3y ago · link · parent

> Python is a single-threaded language. That’s part of its DNA.

If the changes proposed in this PEP go through, that will no longer be the case. So library authors pretty much will have to either update, or see their modules wither the same way they would if they weren't updated as new Python 3.x versions come along.

> rather the people who want that should be forced to rewrite their code in a language that is more suitable for the problem they want to solve

The vast majority of the Python developer community WANT Python to support true multithreading and being able to solve these problems. We expend inordinate amounts of time and skill trying to make Python work around the GIL, eg. by utilizing multiprocessing.

We want Python to stay relevant long-term. In an age of abundant multi-core platforms, and workloads that can utilize them, the GIL is a major obstacle to that desire.

comment 3y ago · link · parent

> Python is like Perl,

Perl never had anywhere near the wealth of libraries and community support Python enjoys today. The language is used nearly everywhere, from utility-scripts to build piplines, desktop applications, webservice backends, all the way up to scientific computing and AI.

Python shines because of it's ecosystem and community support, which I'd guess (without having any numbers to back this up) may very well be unmatched among programming languages today. Maybe Java and C/C++ come somewhat close, but I'd doubt even these behemoths would stand a chance in a 1:1 comparison for sheer size and versatility of what for Python is just a quick `pip install` away.

Any language that want's to replace Python, even internally at a company, will either have to deal with the fallout of leaving all that behind, OR be compatible with Python to an extend that it doesn't matter. And that's a really tall order.

comment 3y ago · link · parent

The problem is, code that uses on a lot of 3rd party libraries that throws the ON-switch for nogil, will suddenly depend on all these libraries maintainers having worried about this.

comment 3y ago · link · parent

That's a very good point you make there, and I should have mentioned that in my post.

Yes, the cost of the rebuild itself, PLUS it's own maintenance, fit with the rest of the codebase, extensibility and so on, must be considered in that equation.

I glanced over that, because usually the rationale for a good rebuild is an improvement regarding exactly these metrics.

comment 3y ago · link · parent

> Don't write new code when you can use, improve or fix what already exists. If you must write new code, write only what you need to get the job done.

While the article resonates with me alot, I would like to, in the best spirit of the article, propose an addendum to that line:

When modifying existing code, do a very careful cost-benefit analysis; On the one side is the cost of a rebuild. On the other side is the projected cost of keeping this thing and maintaining it, not just for this change, but for changes in the forseeable future.

I realise that this is essentially an impossible requirement. We cannot forsee the future. But: We can make predictions. And when the predictions say, that, forseeably, the company will lose money down the line because we waited to long for a rebuild, it may be time to pitch that to whoever allocates resources.

Because, dragging a legacy-system along incurs it's own set of costs. This is especially true when it's not just maintained, but modified and extended. And many of those costs have a nasty tendency to remain hidden until they suddenly don't, and at that point, people often already expended inordinate amounts of resources on them.

So yeah, the first instinct should be: Use what already exists. But check the costs of doing so. Premature rebuilds are a waste of resources. And so is holding on to legacy systems past their expiration date.

comment 3y ago · link · parent

> But this mostly applies to JS which has a kickass implementation of async/await.

The fact that JS simply has no other options for doing anything concurrently, might have something to do with that.

comment 3y ago · link · parent

> Which would mean working in a controlled environment

Yes, such as an office setting, or the office setting of a contractor. Which are both options.

comment 3y ago · link · parent

Well, there is a very simple solution to that problem:

Pay people extra money for the privilege of having them fulfill the tasks the way you want them to.

comment 3y ago · link · parent

> It's “easier” because it lies to you

No, it really doesn't. If I make the wrong assumption that "everything is sequential", then it's not the paradigm lying to me.

Pretty much the first thing I learned about threads: I have to assume that my code can, and will, be interrupted at arbitrary points.

As long as I keep that in mind, there is very little that can surprise me. Because the other side of that coin reads: "Unless it branches into more threads of execution, each block itself will run sequentially, no matter what", which makes it very easy to reason about each block.

The rest is a matter of synchronizing these interruptions to a useful outcome, which, as stated elsewhere, CSP and modern languages integrating the primitives for that natively, make really easy.

comment 3y ago · link · parent

Allow me to clarify:

Event Loops are an old technique and not a hype. I am aware of that. One of my earliest C experiments as a kid was writing a snake-implementation for the terminal. I still have that code, and it uses an event loop to process the input.

The hype I am talking about, is an assertion currently "en vogue", that asynchronous should be the default method of doing concurrency.

This hype, imho, started with the ubiquitous use of JS as a backend implementation language. JS couldn't work another way, so this is what all these JS programmers used, and JS is super popular. So, it must be cool and great. And that's how a workaround for a language limitation became a popular paradigm.

comment 3y ago · link · parent

When I opened the comment section, it said "404 Comments".

Now, I am not superstitious, but...

comment 3y ago · link · parent

This is a solved problem.

I can run millions of goroutines on a laptop. These get mapped to a relatively small number (number of available CPU cores with default settings) by the runtime.

comment 3y ago · link · parent

> mind expanding on this part?

Certainly. That part is a sentence written to be short and catchy. It sacrifices precision for reasons of brevity and style. It also doesnt mention either concurrency or parallelism, it just uses the word "parallel".

This is acceptable, because the post goes on to more precise statements later on, quote:

    It works for both i/o bound concurrency and cpu bound parallel computing.
End Quote.

comment 3y ago · link · parent

Exactly like that, but using blocking functions. Then I run the code in a worker pool or in a greenlet runtime. The kernel and runtime take care of putting threads to sleep when they hit blocking IO.

comment 3y ago · link · parent

> I'm curious, what reason?

In days gone by, processes who got to run on the single core that contemporary CPU had available, had to actively relinquish control of the core back to the kernel.

If a single process refused to do so, e.g. because the program hang, there was nothing the kernel could do about it, and the entire OS was blocked. The scheduler never ran, no other process would get CPU time, the whole thing was dead in the water, and all you could do was kick the "Reset" button (if present) or pull the power cord and reboot.

Obviously, this is a very bad situation for an OS, which runs many processes from many sources. And because of that, we ditched this system, and went on to preemptive multitasking, where control is relinquished back to the scheduler after a time whether the process is okay with that or not.

Async basically re-invented that system in userspace. We have an event loop, and we have processes that actively yield control to it. What happens if a subroutine refuses to do so? There is nothing the event loop can do about that.

And it's really easy for this to happen. All it needs is a single synchronous call, say, to an external datastore, somewhere deep down in the callstack, and the awesome throughput of async goes bye bye.

1
222324
57