Better HN
topnewbestaskshowjobs
Log inSign up

f_devd

903 karma · joined Sep 12, 2022 (4y ago) · 316 submissions

Submissions

comment 2y ago · link · parent

> Conversely, your brain does not contain infinite storage.

But you can address it and use it, you can think of a system which can make use of infinite memory and then execute that system.

LLMs they cannot use something like `set(0x8080, "ABC")` and later retrieve that with `get(0x8080)` without keeping the initial command in it's context therefore it's memory is not expandable. Likewise LLMs can call a external function but the input of the LLM is a fixed context on which it's trained, and it has a fixed amount of time to use that context so it's not expandable.

Now this is not necessarily a limitation of the architecture, but rather how we train NNs. It's also not a necessity to do something useful but the efficient/optimal solution for many problems are often turing-complete and are thus not findable or even searchable by NNs.

The video goes into more depth everything metioned, and on the distinction between turing machines and NN limitations.

comment 2y ago · link · parent

The argument isn't finite memory but rather the lack of it being expandable memory; as in it cannot learn to read/write to a hypothetical infinite tape. (Although I'm maybe not the right person to word it, I recommend the prior linked video)

comment 2y ago · link · parent

Interesting, I thought it was proven Transformers cannot do recursion[0] and aren't actually able to be equivalent to a turing machine due to lack of expandable memory, and are rather finite state automata.

[0]: https://youtu.be/rie-9AEhYdY?si=5p0QCxAFovGUHFRb&t=1744

124.

"App Store Levels Playing Field and Supports Developers"(boehs.org ↗)

3 points · by f_devd · 2y ago · discuss

comment 2y ago · link · parent

I'm not too familiar with SHARP but I've implemented SophiaH before, it is effectively mSGD but with the momentum being scaled by inverse of a separate hessian moment with some additional clipping. It works surprisingly well if you can afford the additional memory/compute.

It seems like SHARP directly incorporates the hessian directly into the SGD momentum, and increases the 'alpha' or momentum contribution over time.

comment 2y ago · link · parent

I'm unfamiliar with a bare-metal thread model that doesn't do preemption outside of a Runtime. I imagine you'd need to effectively inject code to do a cooperative switch as there aren't many ways for a cpu to exit it's current 'task' outside of an interrupt (pre-emption) or a defer call (cooroutines/async). For Runtimes it usually also means you effectively have a cooperative switch but it's hidden away in runtime code.

Do you have an example?

comment 2y ago · link · parent

I think you might be confusing Runtime, OS and bare-metal primitives. Java virtual threads are possible because there is always the runtime which code will return to, and since it's already executing in a VM the concept of Stack/Heap Store/Loads don't really matter for performance.

> Compared to saving the stack which is just saving two registers: stack base and stack pointer.

In embedded you might not have a stack base, just a stack pointer, this means in order to switch to a different stack you need to copy 2 stacks. (I might be wrong here; I know some processors have linear stacks, but this might be more uncommon).

On bare metal this dynamic changes significantly, in order to "switch contexts" with preemption the following steps are needed (omitting the kernel switch ops):

- Receive interrupt

- Mask interrupts

- Store registers to heap

- Store stack to heap

- Calculate next preemption time (scheduler)

- Set interrupt for next preemption time

- Load stack from heap

- Load registers from heap

- Unmask interrupts

- Continue execution using program counter

While for async/await everything already in place on the stack/heap so a context switch is:

- Call Future.poll function

- If Poll::Ready, make parent task new Future and (if it exists) call it

- If Poll::Pending, go to next Future in Waker queue

Async/await (in rust) is without a runtime, and without copies or register stores/loads; it can be implemented on any cpu. On embedded tasks can also decide how they want to be woke, so if you want to do low-power operation you can make an interrupt which calls `wake(future)` and it will only poll that task after the interrupt has hit, meaning any time the Waker queue is empty it knows it can sleep with interrupts enabled.

> so register values of previously blocked async function need to be saved somehow

The difference is that we know exactly which values are needed instead of not knowing what we need from the stack/registers.

User-space interrupts would make it easier to do preemption in user-space but this is yet another feature you can't make assumptions about (especially since there has been only a single gen of processors which support it).

comment 2y ago · link · parent

Preemptive is safer for liveliness since it avoids 'starvation' (one task's poll taking too long), however it in practice almost always more expensive in memory and time due to the implicit state.

In async, only the values required to do a poll need to be held (often only references), while for threads the entire stack & registers needs to be stored at all times, since at any moment it could be interrupted and it will need to know where to continue from. And since it needs to save/overwrite all registers at each context switch (+ scheduler/kernel handling), it takes more time overall.

In general threads are a good option if you can afford the overhead, but assuming threads as a default can significantly hinder performance (or make near impossible to even run) where Rust needs to.

comment 2y ago · link · parent

> So why not drop this special word `async`?

You can drop the special word in Rust it's just sugar for 'returns a poll-able function with state'; however threads and async/await are not the same.

You can implement concurrency any way you like, you can run it in separate processes or separate nodes if you are willing to put in the work, that does not mean they equivalent for most purposes.

Threads are almost always implemented preemptively while async is typically cooperative. Threads are heavy/costly in time and memory, while async is almost zero-cost. Threads are handed over to the kernel scheduler, while async is entirely controlled by the program('s executor).

Purely from a merit perspective threads are simply a different trade-off. Just like multi-processing and distributed actor model is.

comment 2y ago · link · parent

> When timeout is implemented in async/await variant of the solution, using the `driver.race(timeout).await`, what happens to the client socket after the `race` signals the timeout error?

Any internal race() values will be `Drop`ed and driver itself will remain (although rust will complain you are not handling the Result if you type it 'as is'), if a new socket was created local to the future it will be cleaned up.

The niceness of futures (in Rust) is that all the behavior around it can be defined, while "all functions are blocking." as you state in a sibling comment, Rust allows you to specify when to defer execution to the next task in the task queue, meaning it will poll tasks arbitrarily quickly with an explicitly held state (the Future struct). This makes it both very fast (compared to threads which need to sleep() in order to defer) and easy to reason about.

Java's Thread.interrupt is also just a sleep loop, which is fine for most applications to be fair. Rust is a system language, you can't have that in embedded systems, and it's not desirable for kernels or low-latency applications.

comment 2y ago · link · parent

We have been running RKE2 for a few years now never had any major issues or anything missing that wasn't possible to add with a helm chart. The only thing we changed with the most recent cluster is disabled the built-in CNI/kube-proxy and installed cillium instead, since calico very occasionally gave kube-proxy issues.

comment 2y ago · link · parent

It's not acceptable that's why it's news.

As to why it's advantages, lead is really cheap and really effective. In material science there are 2 groups, those making amazing new materials, and those trying to match them without using lead or cadmium

comment 2y ago · link · parent

Steam games are removed all the time, why are you confident they won't be removed?

comment 2y ago · link · parent

Javascript has native BigInts, and there is already an RSA implementation using them: https://github.com/i404788/tiny-rsa

comment 2y ago · link · parent

https://nitter.esmailelbob.xyz/liuzhuang1234/status/17601959...

(bit of trial and error from https://github.com/zedeus/nitter/wiki/Instances)

comment 2y ago · link · parent

Consistently 1-10 percentage points down is not great.

Unrelated does anyone have an intuition on why home ownership is higher for 21 y/o than 24 in millenials/gens category?

comment 2y ago · link · parent

The basic algorithm for the 2-enum case from the commit seems to just be `enum { A = rand(), B = ~A}`.

Although I'm not sure if it's optimal, the many case seems to be the same as the 2-case but repeated for every 2 items. I expect they double checked that the amount of bitflips is still pretty high.

Maybe a better algorithm for the many case would be something like the popcnt parallel patterns:

* 0b0101010101010101

* 0b0011001100110011

* 0b0000111100001111

* 0b0000000011111111

Since they would all have equal hamming distance between each of the entries.

comment 2y ago · link · parent

Yes it's possible, but it's not desirable. It wouldn't be backwards compatible, and not safe for shared libraries. It's better suited for a linter-type error/warning.

comment 2y ago · link · parent

> I spent a lot of time implementing v6

Maybe I have a significantly different setup, but on the SaaS side this only requires binding to to ipv6 and adding an AAA record on your ingress usually.

comment 2y ago · link · parent

While these technologies definitely seem to have a future, it's important to remember that, in order to create fuel from CO2 it requires at least as much energy as burning fuel creates (at 100% efficiency), so in the long term this is more of a "way to compress excess energy from the grid for light-weight applications" rather than a replacement for all our current fuel consumption. It seems that they know that as well since they are targeting aviation.

comment 2y ago · link · parent

You should check out MoE-Mamba (https://arxiv.org/abs/2401.04081), it's faster and more accurate than Transformer-MoE. Of course only time will tell if it's better when scaled up further than the paper goes.

comment 2y ago · link · parent

Hmm looking at the architecture it seems like it would be though to create performant tooling quickly (especially if it needs reverse engineering), the VLIW/RISC ISA along with a CUDA-like threading model, and the tensor-flow (pun intended) for efficient cascading of neighboring AIE. On the other hand this arch does give it a very high ceiling so I get why they would go for it.

comment 2y ago · link · parent

> Someone has estimations about effort estimation on number of people and required time for bootstraping this project

A small team of systems programmers for months, or a dedicated teenager a week. More seriously it highly depends on how they decided to implement it, if it's a custom instruction set extension it could be relatively easy

comment 2y ago · link · parent

I think the "joever" has been detached somewhat from it's original meaning (I for one did not know where it came from until right now)

145.

Tachiyomi – It's Joever(tachiyomi.org ↗)

241 points · by f_devd · 2y ago · 72 comments

comment 2y ago · link · parent

It's likely a reference to the radix economy [0], however it's actually very minor for the cases where it works. And in "the best way to count"[1] there compelling arguments as to why the formulation used on Wikipedia is not necessarily correct for arbitrary precision numbers as well as being bad for human notation compared to binary.

[0]: https://en.m.wikipedia.org/wiki/Radix_economy[1]: https://www.youtube.com/watch?v=rDDaEVcwIJM

comment 2y ago · link · parent

You can technically distribute patches, a good example of what is possible is SNES ROM hacks, where only the deltas are be distributed, and the end-user provides their own 'legal' copy; this avoids the issue of redistributing copyrighted content.

However in the EU you aren't allowed to use information obtained through "decompilation" for the purpose development/production of a substantially similar program. Which means you cannot patch any program (exception exists for the purpose of interoperability), without risking some legal liability.

2009/24/EC Article 6 for anyone interested.

comment 2y ago · link · parent

From personal experience it seems relatively common in the embedded-esque software space, although not always quite as sophisticated as seen here.

> Is there some kind of whistleblower law that would allow someone with knowledge to come forward?

Depends on where you live, unfortunately anywhere with 'stong' IP laws you aren't allowed to patch anything. Usually reverse engineering analysis is still fine, although if there is a contract saying you're not allowed to you could be screwed anyway.

In the train case the locks were specifically for anti-competitive purposes, and so they can whistle-blow for that; and I think in the general case you can sue for misleading dealings/false advertising/etc but not for anything specific to the software locks/traps.

149.

the best way to count [video](youtube.com ↗)

1 points · by f_devd · 2y ago · discuss

comment 2y ago · link · parent

Not sure where the quote is from but EU has always been a political alliance, maybe you/they mean the EEA?
1
456
11