Preferences

AnyTimeTraveler
Joined 212 karma

  1. 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?
  2. 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?

  3. 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.

  4. 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.

  5. That's Anubis. A proof-of-work based protection against AI-Crawlers.

    https://github.com/TecharoHQ/anubis

  6. This readme could really benefit from a screenshot.
  7. I'm pretty sure that that didn't exist in 2015 ;)
  8. 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?

  9. 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.
  10. My ID says D for "diverse". Equivalent to X in the US.

    What now?

  11. 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

  12. 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.

  13. 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...

  14. 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

  15. 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.

  16. 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.

  17. 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?
  18. 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)
  19. 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 :)

  20. These are absolutely beautiful. I can't seem to find a license anywhere. Are they public domain?
  21. 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/

  22. 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.
  23. 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)

  24. Is that why I find embedded programming the most fun?

    I have been diagnosed with ADHD and had a really bad score on working memory. With embedded programming, there are usually few to no libraries and all I have to do is write certain values into certain hardware register addresses to get stuff done. All the relevant information is always on my screens, allowing my working memory to be occupied only by the problem or task I am working on.

    I also find myself building everything in little modules that have interfaces that make it hard to misuse them, because I WILL forget how to use them and just let my IDE remind me of what functions a module has.

  25. Hi, I'm playing with a 8051 right now. I found your comment on another thread, and it made me curious about your implementation. You mentioned that the code was available per request. I am writing you here, because I couldn't find any contact info for you and the thread was too old to allow any new comments. If you read this and are still willing to share the code, shoot me a mail at: simon at simonscode . org
  26. I wrote pipes-and-paper[1] which sort of shares your screen without any cloud. Getting to what the display puts out is difficult, but recording the pen strokes isn't. So what I wrote is a small webserver that runs on the reMarkable (1 and 2) that sends the penstrokes to the webbrowser via Websockets. It draws all penstrokes on a camvas in the browser and also deletes strokes when the eraser is used.

    [1] https://github.com/AnyTimeTraveler/pipes-and-rust

  27. I am currently working with the ATTiny85 and the stripped blinky binary is 275 bytes. I was worried that the ATTiny85 wouldn't have enough flash space (6K) for Rust and now I don't know what to do with all that free space :)
  28. I just tried a few queries related to rust and it's library rocket. I got only useless results on the first page and didn't check further.

    I'm guessing that's because it doesn't index docs.rs and the rust forum. Both incredibly important for Rust development.

    So as long as this engine doesn't also index most programming related forums, I won't be able to use it effectively, even though I really would like to.

    The concept of limiting the scope to just a few websites sounds really interesting, though. I think I will take this idea and build a little thing on top of google to implement that site filtering on my queries.

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal