903 karma · joined Sep 12, 2022 (4y ago) · 316 submissions
comment 2y ago · link · parent
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
[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
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
Do you have an example?
comment 2y ago · link · parent
> 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
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
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
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
comment 2y ago · link · parent
comment 2y ago · link · parent
(bit of trial and error from https://github.com/zedeus/nitter/wiki/Instances)
comment 2y ago · link · parent
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
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
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
145.
Tachiyomi – It's Joever(tachiyomi.org ↗)
241 points · by f_devd · 2y ago · 72 comments
comment 2y ago · link · parent
[0]: https://en.m.wikipedia.org/wiki/Radix_economy[1]: https://www.youtube.com/watch?v=rDDaEVcwIJM
comment 2y ago · link · parent
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
> 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