HackerLangs
TopNewTrendsCommentsPastAskShowJobs

rq1

809 karmajoined 10 ปีที่แล้ว

Submissions

Efficient biosorption of nanoplastics by food-derived lactic acid bacterium

sciencedirect.com
2 points·by rq1·3 เดือนที่ผ่านมา·0 comments

comments

rq1
·เมื่อวานซืน·discuss
I wouldn't disaree on the ergonomics: a powerful but unusable tool is... useless!

Though ignoring all the PL lessons for the sake of "pragmatism" is just plain ignorance.

Rust has a quite solid theory backing. Zig has nothing interesting really: it's "vibe coded" by someone who was doing game dev or something like that.
rq1
·เมื่อวานซืน·discuss
From a PL Theory perspective, Zig is vibe-coded.

Not sure why people use it.
rq1
·6 วันที่ผ่านมา·discuss
I was wondering WTF was happening.

This was past month:

   516 + 518*n
   516  n=0  count=4454
  1034  n=1  count=318
  1552  n=2  count=129
  2070  n=3  count=56
  2588  n=4  count=35
  3106  n=5  count=14
  3624  n=6  count=6
  4142  n=7  count=4
  4660  n=8  count=6
rq1
·7 วันที่ผ่านมา·discuss
Because it’s supposedly open?
rq1
·8 วันที่ผ่านมา·discuss
The main advantage of PeerTube and alike is that they keep the “professional content creators” and their crappy content away.

Because of their unique monetisation feature.
rq1
·9 วันที่ผ่านมา·discuss
The Pi compression algorithm is better.
rq1
·19 วันที่ผ่านมา·discuss
The important properties of the logarithm are structural: we usually do not care about units or bases, except when carrying out an actual numerical computation.

As developed in the article, informally, but somewhat sufficiently, the change of base formula shows that the choice of base is largely irrelevant: different bases give equivalent logarithms up to a constant factor.

The Taylor expansion of exp gives a more intrinsic and general definition of the exponential function. This allows exp to be generalised structurally to many algebraic settings, provided the relevant convergence conditions are met: for example, the complex exponential and its many possible logs, the matrix exponential, and so on…
rq1
·เดือนที่แล้ว·discuss
I think sooner rather than later, AI will replace CEOs.
rq1
·เดือนที่แล้ว·discuss
You’re absolutely right to push back on this.

Sometimes it’s not just about the Ys but also the Qs.
rq1
·2 เดือนที่ผ่านมา·discuss
Enterprise programs*
rq1
·2 เดือนที่ผ่านมา·discuss
Photoshop?! Where we’re going, we don’t need photoshop.
rq1
·5 เดือนที่ผ่านมา·discuss
I assumed new projects but I just realised that I didn’t write it.

But still disagree: we have cbindgen.
rq1
·5 เดือนที่ผ่านมา·discuss
> I would say modern c++ written by someone already familiar with rust will probably be structured in a way that's extremely easy to port because you end up modeling the borrow checker in your brain.

I can't stress out how much important this sentence is. I would even remove the "familiar with rust" part.

Anyone who still thinks it's good to use C/CPP on modern hardware where Rust support is available and good: please print the sentence above and post it all over your place.
rq1
·5 เดือนที่ผ่านมา·discuss
Imagine you read a value from stdin and parse it as:

Maybe Int

So your program splits into two branches:

1. Nothing branch: you failed to obtain an Int.

There is no integer to use as an index, so you can’t even attempt a safe lookup into something like Vect n a.

2. Just i branch: you do have an Int called i.

But an Int is not automatically a valid index for Vect n a, because vectors are indexed by Fin n (a proof carrying “bounded natural”).

So inside the Just i branch, you refine further:

3. Try to turn the runtime integer i into a value of type Fin n.

There are two typical shapes of this step:

* Checked conversion returning Maybe (Fin n)

If the integer is in range, you get Just (fin : Fin n). Otherwise Nothing.

Checked conversion returning evidence (proof) that it’s in range

For example: produce k : Nat plus a proof like k < n (or LTE (S k) n), and then you can construct Fin n from that evidence.

(But it’s the same basically, you end up with a “Maybe LTE…”

Now if you also have a vector: xs : Vect n a

… the n in Fin n and the n in Vect n a are the same n (that’s what “unifies” means here: the types line up), so you can do: index fin xs : a

And crucially:

there is no branch in which you can call index without having constructed the Fin n first, so out-of-bounds access is unrepresentable (it’s not “checked later”, it’s “cannot be expressed”).

And within _that_ branch of the program, you have a proof of Fin n.

Said differently: you don’t get “compile-time knowledge of i”; you get a compile-time guarantee that whatever value you ended up with satisfies a predicate.

Concretely: you run a runtime check i < n. _ONCE_

If it fails, you’re in a branch where you do not have Fin n.

If it succeeds, you construct fin : Fin n at runtime (it’s a value, you can’t get around that), but its type encodes the invariant “in bounds”/check was done somewhere in this branch.
rq1
·7 เดือนที่ผ่านมา·discuss
Well I never advocated the latter, so please. And my logic is very sound, better than yours. :)

I was replying to "the US does not get to decide who can have a nuclear weapon and who does not". As much as I agree with that... my previous comment.

We're not talking about a nuclear program.
rq1
·7 เดือนที่ผ่านมา·discuss
As much as I agree with you. Iran is signatory of the NPT with all its consequences.

Instead of letting more countries develop these weapons, we should work on denuclearizing all countries, starting with the US and Russia and their insane arsenals! And maybe build a unified international legal framework for civilian nuclear developments and applications from energy to medical outside of the "security council's" ferule!

A nuclear war cannot be won, thus never fought!
rq1
·8 เดือนที่ผ่านมา·discuss
The next generation will include another processor to offload the inference from the RISC V processors used to offload inference from the host machine.
rq1
·7 ปีที่แล้ว·discuss
Real and Complex Analysis by Walter Rudin.