HNHacker News
TopNewBestAskShowJobs

AnyTimeTraveler

234 karma · joined January 9, 2019

submissionscomments
AnyTimeTraveler··on Visualizing Rust's Vtables: How dyn Trait Works In Memory
This can be done reliably, though. You can just do

if a == b { ...

Just that the check will be replaced at compiletime with a constant, since the borrow-checker tracks all objects lifetimes and can use that information to optimize the check away.

The objects themselves don't make it into the compiled binary, since they have no size, but all the required information about them will make it in. So you can treat them like ordinary objects and do all the usual operations on it, without wasting any memory during runtime.

AnyTimeTraveler··on Async Rust vs RTOS showdown (2022)
In my experience, it is pretty rare to run much actual work on a microcontroller. Testing at effectively idle represents most of my usecases.

For the times where there is a background load: RTIC has task priorities and pre-emption, so you can run your compute-intensive task with a lower priority and react to interrupts in a timely manner.

AnyTimeTraveler··on Consumer Rights Wiki
Each one reads to me as:

User is lead to believe X, if they don't read the fineprint.

X is not the case. Instead you get Y.

That sounds perfectly fitting into a consumer rights wiki to me.

Also, Clinton the cat is the much beloved cat of the persom who started the wiki.

AnyTimeTraveler··on London Underground begins scanning passengers' faces
Take the train instead. It's much better here in europe.
AnyTimeTraveler··on Show HN: Continue? Y/N: A 60-second game about AI agent permission fatigue
In that AES encrypted file.

It's a shellscript that they encrypted. They decrypt it and feed the decrypted output immediately into the shell, to be sourced.

That encrypted secrets file could contain any shellscript, so the aliases are stored in there, together with the API-Keys and passwords.

AnyTimeTraveler··on Origin of the rule that swap size should be 2x of the physical memory
My work laptop currently has 96GB of RAM. 32 of it is allocated to the graphics portion of the APU. I have 128GB (2x) of SWAP allocated, since I sometimes do big FPGA Synthesizations, which take up 50GB of RAM on its own. Add another two IDEs and a browser, and my 64GB or remaining RAM is full.
AnyTimeTraveler··on The struggle of resizing windows on macOS Tahoe
Many Linux display managers let you chose what to do, when a window requests focus. For me on Sway, it just turns the border red.

I chose what happens after. Can recommend. I wasn't even aware of my privilege.

AnyTimeTraveler··on Learning music with Strudel
Weird. My android phone is 3+ years old and was not a flagship when I got it. It had a little problem with stuttering on more complex examples. It sounded like it was running out of things that can play at the same time, but scrolling was still smooth. It didn't feel like it was pinning my phone's cpu. On my laptop, it didn't break a sweat with firefox and pipewire. Are you sure it's not a config issue?
AnyTimeTraveler··on The Programmer Identity Crisis
What?

This website

1. reacts well to my system preference of a dark theme in my news-reader

2. has a toggle at the top for dark theme

3. works flawlessly with DarkReader in my browser

Until I saw your comment, I didn't even know the website had a light version.

Again: What?

AnyTimeTraveler··on Arenas in Rust
Have you thought about just not making the variable global and instead adding it as a parameter to the functions that actually need it?

You can also create a struct, put your "global" variable inside it and then put all the functions that need the variable into an Impl block of that struct. If you then add the parameter `&self` to these functions, you can access the "global"variable any time via `self.global_variable`.

If that is not enough, then you can always make an actual global variable by first wrapping it in a Mutex, to prevent simultaneous access and then wrapping that in an Arc for Atomic Reference Counting. That allows you to pass "copies" of that variable around anywhere, satisfying the borrow-checker (since the variable is now reference-counted in a thread-safe way).

If you need a lot of parallel reading, replacing the Mutex with an RwLock is a good idea, since it allows locking from multiple threads, if you want to read it in most cases.

AnyTimeTraveler··on Wild performance tricks
Rust's number types have functions like "wrapping_add" or "overflowing_add", which do not panic when overflowing and instead explicitly wrap around or return a result that must be checked.

You can easily write code that does not contain any possible panic points, if you want.

AnyTimeTraveler··on Git: Introduce Rust and announce it will become mandatory in the build system
That's Anubis. A proof-of-work based protection against AI-Crawlers.

https://github.com/TecharoHQ/anubis

AnyTimeTraveler··on Show HN: LightCycle, a FOSS game in Rust based on Tron
This readme could really benefit from a screenshot.
AnyTimeTraveler··on Linux Performance Analysis (2015)
I'm pretty sure that that didn't exist in 2015 ;)
AnyTimeTraveler··on Open source and self hostable/private file converter
My common sense tells me: "If you aren't paying for the product, you are the product." Am I the only one who finds it a bit weird, that they are hosting a the video conversion part of server with graphics cards etc. for free? I see no way to support that long term, unless they are doing something more than the data gathering with Plausible that they have on their page.

Anything I missed, that explains this?

AnyTimeTraveler··on Ask HN: Why some languages use 1 byte for boolean type
Take a look at the Intel 8052 Microcontroller. It has a part of its internal RAM that can be addressed as bytes with normal instructions, but also has special bit-instructions. You could set and clear a bit and jump if is was set or not set. I used this feature a lot when making a little tetris game for the processor, but it was not essential.
AnyTimeTraveler··on Show HN: Back to one-time end-to-end encrypted anonymous chats in 2025
My ID says D for "diverse". Equivalent to X in the US.

What now?

AnyTimeTraveler··on Show HN: Back to one-time end-to-end encrypted anonymous chats in 2025
I genuinely have no idea what to chose in the gender-screen (since neither option applies) and can't just say "You don't get to know that".

Why is this needed?

Edit: clarification

AnyTimeTraveler··on US added to international watchlist for rapid decline in civic freedoms
And what about the active hostilities towards trans people, who often can't get passports anymore (I personally know one person who has this problem) and can't update their names and gender entries anymore.

What about the demolishing of government agencies that DOGE is trying (and sometimes succeding) in? You call it "termination of employees", but don't seem to consider that they tried to fire jugdes who restrained their power. This looks to me like a plain powergrab. I hope I don't need to tell you where something like this leads, but I am certain it's not going to be democratic or respectful of civic freedoms.

As a non-straight non-binary (neither cis-male or -female) person, the US is currently just about the last place I want to be. If the current trend continues, then I genuinely fear for the lives of some of my friends.

AnyTimeTraveler··on FFmpeg School of Assembly Language
I learned 8086 (not x86) assembly in a university course during my bachelors degree and won a contest to create the first correct implementation that would play "Jingle Bells" on the PC-Speaker[0] attached to the custom built computer. That was very fun and I kept playing around with assembly a bit afterwards, but never got around to learning any of the extensions made in x86 assembler and beyond.

In my masters degree, there was another course, where one built their own computer PCB in Eagle, got it fabbed and then had to make a game for the 8052 CPU on there. 8052 assembly is very fun! The processor has a few bytes of ram where every bit is individually addressable and testable. I built the game Tetris on three attached persistence of vision LED-Matrices[1]. Unfortunately, the repository isn't very clean, but I used expressive variable names, so it should be readable. I did create my own calling convention for performance reasons and calculated how many cpu cycles were available for game logic between screen refreshes. Those were all very fun things to think about :)

Reading assembly now has me look up instruction names here and there, but mostly I can understand what's going on.

[0] https://github.com/AnyTimeTraveler/HardwareNaheProgrammierun... [1] https://github.com/AnyTimeTraveler/HardwarenaheSystementwick...

AnyTimeTraveler··on Automat
From the Github Readme[1]:

Automat's objective is to be able to semi-autonomously play a variety of games. It's the first step towards a more general environment for interacting with computers.

Currently Automat's functionality is limited to keyboard macro recording & playback. It's fairly unstable but if you're lucky and it runs on your machine, it can be useful for automating some basic actions.

[1] https://github.com/mafik/automat

AnyTimeTraveler··on The xz attack shell script
What they meant was probably, that you have the option to rely entirely on using git repositories for your dependencies or even just paths to other projects on your disk.

You can also setup your own dependency registry and only work with that.

AnyTimeTraveler··on Talc – A fast and flexible allocator for no_std and WebAssembly
In a no_std Rust environment, there is no allocator. There is no heap. So an allocator is needed to use things like Vectors or Strings.

This is very common in embedded contexts, where you can take nothing for granted.

AnyTimeTraveler··on Wddbfs – Mount a SQLite database as a filesystem
I really like the idea of running a watch on an sqlite table with my common cli tools. If I understand correctly, it is being re-read on every request. Does that mean that changes to the sqlite database will be visible on the next read of a csv file?
AnyTimeTraveler··on Spark – A web micro framework for Java and Kotlin
I've used Javalin as well and now I understand why it all looked pretty familiar, but I kept thinking "Javalin did x better". I can recommend Javalin as well! Having used the Spring Framework, this is a delight in comparison. Especially the setup is infinitely easier. (I know Spring Boot exists, but that's just a preselected pile of software that I have to understand)
AnyTimeTraveler··on Show HN: Atopile – Design circuit boards with code
This reminds me of writing VHDL in the Sigasi IDE. You could write the description for a component, have it's syntax checked and get autocomplete while typing and once you were done, you could click a button and see an overview of your component and how its signals were connected to other components, kind of like a schematic. It helped me learn and find bugs quickly and I was really missing that when I got started with KiCAD.

I am very excited to use this!

My optimal workflow would be, to use code for describing the netlist using components, then use a combination of graphical and code editor to layout the PCB, like how the UI editor in Android studio used to work. (I don't know if it still works this way) I'd love to layout my components using UI like in the CAD program "Onshape", which let's you set your constraints visually and the program visualizes conflicting constraints.

I would love to start working on a project in code and then make an export into KiCAD to make final changes and send it off. Then, as the project gets further along, the point where I would switch to KiCAD would gradually shift further and further towards production. If I see this correctly, you are already aiming for that and I commend you for that approach :)

AnyTimeTraveler··on LoaderShip – CSS-Only Loaders
These are absolutely beautiful. I can't seem to find a license anywhere. Are they public domain?
AnyTimeTraveler··on Show HN: An open-source, self-hostable synced narration platform for ebooks
You mean a system like Audiobookshelf[0]? I can highly recommend this, by the way. Works more reliably than any paid service I've ever tried.

[0] https://www.audiobookshelf.org/

AnyTimeTraveler··on Show HN: Inshellisense – IDE style shell autocomplete
I set up hourly borg backups instead. That resulted in me aliasing rm='rm -rf' without a worry in the world. So far, I made about ten recoveries and have never lost important data.
AnyTimeTraveler··on Effect of perceptual load on performance within IDE in people with ADHD symptoms
I have been diagnosed with ADHD and got an especially bad score for working memory.

I find myself tired out really quickly by a lack of syntax highlighting.

With syntax highlighting, I feel like I am not really reading the code anymore, but instead just registering the patterns and parsing the color tokens.

I think the most important aspect for me, is that I don't spend time reading where a token starts and ends. Ex.: If I wanna check the function name, I just have to read the only yellow thing in around this area.

I can register the tokens on a whole page in seconds, if the code isn't too dense. I just tried the same with syntax highlighting disabled and would say that I took about twice as long to parse the entire page. (I used a different, but similar file from a microcontroller HAL)

Page 1 of 3Next →