time's recent activity

  1. Comment on Rust takes a major step forward as Linux's second official language in ~tech

    time
    (edited )
    Link Parent
    There's been some significant progress on a gcc backend being added to rust. You can find out the current state of things in this blog and this repo. They've been making quite a bit of progress to...

    it would require a GCC backend

    There's been some significant progress on a gcc backend being added to rust. You can find out the current state of things in this blog and this repo. They've been making quite a bit of progress to being able to use gcc as an alternate backend over the last year, though they do still have a ways to go.

    3 votes
  2. Comment on The coming firmware revolution in ~comp

    time
    Link Parent
    There's a very good chance that the compiler is smart enough to remove some checks, but I haven't really looked into it very thoroughly. It's been a while since I was working on something where...

    for the C implementation if you're setting those pins at compile time anyways are you sure the compiler isn't just doing away with those runtime checks? Or does your HAL interface require you to set everything up at runtime?

    There's a very good chance that the compiler is smart enough to remove some checks, but I haven't really looked into it very thoroughly. It's been a while since I was working on something where the timing of digital pin switching mattered, so my memory is a bit fuzzy. The last time I remember running quantifiable tests, I think it was on an Teensy 3.1 or 3.2 board (can't remember which), and using a library with set_high(pin_number) or set_low(pin_number) functions in some platformio library, it came out to be about 5 times slower than just manually setting the register bit. It has been a while, so I may be recalling things a bit off, but that was the gist of it.

    The main takeaway, for me at least, is that while it is possible to make things work the same way in C/C++, it's nice that the default way in rust's embedded-hal is also the way with the least overhead.

    3 votes
  3. Comment on The coming firmware revolution in ~comp

    time
    Link Parent
    Based on the embedded developers I know and interact with, I can definitely agree that it's going to be an uphill battle to get them to change how they do just about anything. Using C++ features...

    One area that I can see being hard for Rust to break into is replacing embedded C.

    Based on the embedded developers I know and interact with, I can definitely agree that it's going to be an uphill battle to get them to change how they do just about anything. Using C++ features in embedded development is still frowned upon by most of the embedded developers I know despite widespread support, and almost no downsides provided you use an appropriate subset of C++ that is embedded-friendly (i.e., no major standard libraries, nothing that heavily makes use of the heap, etc.). While I personally love rust for embedded development, trying to convince the embedded world at large to move away from C is going to take a great deal of effort.

    The subset of C they're working in -- no heap allocations and linted to the MISRA C standard -- already eliminates large classes of bugs rust addresses. I don't know if the large jump in language complexity and features is going to be an added benefit for them.

    I've actually been getting very into embedded rust programming of late, and I find that while things like avoiding the heap are indeed helpful in avoiding bugs, the greatest benefit of embedded rust is to practically guarantee that race conditions and other memory issues are not possible at compile time, with no run-time overhead. In my past embedded C/C++ projects, debugging race conditions has been extremely difficult and time consuming, due to their intermittent, ephemeral nature. I'll gladly trade a bit of language complexity to avoid the possibility of these types of bugs being possible in the first place.

    I also feel, as someone coming from a programming background of mostly embedded C/C++ and getting into rust, that people with the embedded C mindset are uniquely suited to understanding the memory safety features of rust such as the borrow checker. Embedded C programmers are already intimately familiar with having to manage memory at a low level, and the rust compiler just enforces an explicit, rigid framework to allow this to happen. I work with a local hackerspace to teach people programming, and the ones who already know C have been most receptive to learning rust concepts, as opposed to those who are more familiar with languages like javascript and python, that abstract away low level memory management to a much greater extent.

    Another reason that I feel rust is well suited to embedded development is that one of its big selling points is its zero-cost abstraction model. This allows for syntax used in higher level, more abstracted languages, but it doesn't cost anything in terms of processing time or memory.

    A good example of this being an advantage for embedded programming is setting a pin as an output, and toggling it. In a typical embedded C hal, there would usually be a function that has to check if a pin is configured as an output before setting it at runtime. This costs a small bit of time every time the pin is toggled.

    With embedded rust's model, each pin exists as a single entity in a peripheral struct, so due to the borrow-checker and compiler guarantees, there can only ever be one reference to that pin in use at any given time. When you want to configure a generic pin as an output, the pin is returned as a new type that has implemented a trait with functions to allow you to toggle the pin on and off. Since the pin is a singleton, and it's been transformed into an output pin type, it is impossible for it to be configured as an input now, and therefore you no longer need to check if it's valid to toggle the pin at runtime.

    While it is possible to explicitly configure embedded C to work in the same manner, it would require you to explicitly code your own compile-time types and checks, instead of using the standard tools provided by a typical manufacturer's HAL libraries. With embedded rust, there's a generally an agreed upon standard way of doing things as outlined in the embedded rust book, so changing architectures is also made simpler, and still results in the same zero-cost abstraction model working on every architecture.

    I will readily admit that the embedded rust ecosystem is still a long way from being a ready replacement for C, especially on less-popular architectures. Rust's default use of LLVM instead of gcc for compiling binaries immediately precludes many architectures not supported by LLVM. A rust gcc backend which will allow support for every architecture gcc supports is in the works but it's still a fair ways off. Even once the gcc backend is implemented, it will still be a while before embedded-hal libraries can be implemented for architectures not currently supported by LLVM.

    As part of my current project linked above, I found that the rust hal for the chip I am using is far from complete, and I've been working alongside my project to help implement the hal as I go. Many other embedded ecosystems are in a similar state of not-yet-complete-or-stable. This is definitely a valid reason that commercial embedded shops would want to avoid rust at this time.

    Overall, I feel that rust offers significant advantages in the embedded space, as the memory safety problems rust is fundamentally trying to solve as a language are the same problems that embedded C developers have had to manually address up to this point. The embedded rust ecosystem is still in its infancy, but it is growing rapidly, and I feel that eventually it will be a popular alternative to embedded C development.

    Disclaimer: I haven't had time to watch the video yet, so this is all only in response to the comments. Sorry if the video already covers these ideas.

    4 votes
  4. Comment on Take a look inside Steam Deck in ~tech

    time
    Link Parent
    Well, I guess I missed that video when it was released, but good on Sony for the same reasons as Valve. The trend of making it possible for end users to repair and maintain their hardware is one I...

    Well, I guess I missed that video when it was released, but good on Sony for the same reasons as Valve. The trend of making it possible for end users to repair and maintain their hardware is one I am very much in favor of, so any progress towards that end is good in my book.

  5. Comment on Take a look inside Steam Deck in ~tech

    time
    Link
    When I clicked on this video, I expected some developer that got a demo version of the steam deck breaking their NDA and doing a tear-down anyways. I was pleasantly surprised to find out that the...

    When I clicked on this video, I expected some developer that got a demo version of the steam deck breaking their NDA and doing a tear-down anyways. I was pleasantly surprised to find out that the video came directly from Valve. This just makes me even more excited about this product, as I saw nothing but normal fillips head screws, and nothing unnecessarily glued down inside the device.

    Sure, it's not the easiest thing to perform maintenance on, but it's at least possible. not only that, the company making it had produced the video going over potential pitfalls and issues that may occur when taking one apart. That's practically unheard of for almost any other gaming devices that have existed in my lifetime. Props to Valve for backing up their 'it's yours, you can do anything you want with it' statements.

    18 votes
  6. Comment on Advice on colorful programmable LED lights in ~tech

    time
    Link Parent
    I believe that when I was making my decision on which bulbs to buy, I was highly influenced by this review video. I haven't ever used Hue bulbs myself, so I don't know about their shortcomings /...

    To that end; would you recommend the sengled zigbee rgb bulbs you mentioned over hue bulbs?

    I believe that when I was making my decision on which bulbs to buy, I was highly influenced by this review video. I haven't ever used Hue bulbs myself, so I don't know about their shortcomings / advantages outside of other people's reviews on the internet. I initially bought a couple of the sengled bulbs to test, and I was happy with the results, so I've stuck with them for my whole house. If you've already bought some hue bulbs and a hub, you can integrate the bulbs you already have into Home Assistant, and then either get more hue bulbs or another brand, and control them all together from one interface.

    1 vote
  7. Comment on Advice on colorful programmable LED lights in ~tech

    time
    Link Parent
    I've gone down the Home Assistant path for RGB lighting throughout my house. I've got Home Assistant OS Installed on a Raspberry Pi 4 with an SSD. I use a HUSBZB-1 dongle which allows...

    Or if you want complete control, you can invest some time and get Home Assistant up and running. You can completely customize it, but it is a lot of up front time investment.

    I've gone down the Home Assistant path for RGB lighting throughout my house. I've got Home Assistant OS Installed on a Raspberry Pi 4 with an SSD. I use a HUSBZB-1 dongle which allows communication with Z-Wave and Zigbee devices. All the bulbs in my house are Sengled Zigbee RGB Bulbs (make sure not to get the bluetooth only ones that only work with Alexa devices, you need the more expensive zigbee bulbs), and I've had no issues with responsiveness or disconnecting bulbs. On the same Zigbee network I've got some Ikea Fyrtur roller shades, and on Z-Wave I have several Inovelli smart switches as well, all running off the one HUSBZB-1 dongle. All in all I've currently got about 16 Z-Wave devices and 45 zigbee devices.

    With HomeAssistant you can do lots of neat things like set up scenes and toggle them with switches from a web interface or phone app. One scene I particularly like is 'theater mode' for my living room, which will close the curtains and dim the all the lights in the room at the flip of a switch. I've also got scenes set up to turn all the lights off completely when I'm leaving the house or going to bed, or to turn them all on at full brightness when I'm cleaning.

    As @JXM mentioned, it can be pretty technically complex to get everything set up the way you want. I've got a fair bit of networking, system administration, and general programming experience so it definitely made sense for me to go with this route, as I highly value the flexibility, ability to combine different technologies, and complete local control over my devices.

    If you feel you're up to the technical challenge of setting up a Home Assistant server, I highly recommend it. It won't be the fastest or easiest way to control light bulbs, but it'd definitely among the most versatile and customizable.

    3 votes
  8. Comment on What games have you been playing, and what's your opinion on them? in ~games

    time
    Link
    I picked up the Halo Master Chief Collection on steamrecently, and I have now played the Halo Reach campaign for the first time, and I'm making my way through Halo CE this week. Reach was a pretty...

    I picked up the Halo Master Chief Collection on steamrecently, and I have now played the Halo Reach campaign for the first time, and I'm making my way through Halo CE this week.

    Reach was a pretty solid game in terms of gameplay, especially since prior to playing reach, I had only played the original Halo back on the xbox. The story wasn't the most engaging for me, and it felt like they were referring to a bunch people and things I didn't know about with little to no explanation. Hopefully the other games in the series will fill in the gaps in my knowledge and may make me like the story more in hindsight.

    The original Halo has been fun and somewhat nostalgic for me, but as I play through the later missions for the first time in over15 years, I'm finding the game much more repetitive and uninteresting than I remember. It feels like every room and hallway is the same as the previous one, and the only way to tell I'm still moving forward is if new enemies are spawning when I enter the same room full of the same few enemies for the 15th time this level. I've honestly forgotten how the game ends, so I don't know how much longer the backtracking and repetitiveness will continue, but hopefully the end game will at least take me to somewhere new.

    All things considered, I'm glad I am able to play reach and the original game again on a PC with updated graphics, and I look forward to seeing what happens in the future entries in the series as they are released.

    2 votes
  9. Comment on LDS Church suspends all worship services worldwide due to coronavirus in ~health.coronavirus

    time
    Link
    This honestly seems like a good move. Hopefully other churches will follow suit and help to slow down the spread of COVID-19.

    This honestly seems like a good move. Hopefully other churches will follow suit and help to slow down the spread of COVID-19.

    7 votes
  10. Comment on No Man's Sky - Beyond update patch notes in ~games

    time
    Link Parent
    You might want to wait a bit before pulling the trigger on VR. Looks like lots of people are having trouble with frame rate and stuttering unless the settings are really low. Probably worth at...

    You might want to wait a bit before pulling the trigger on VR. Looks like lots of people are having trouble with frame rate and stuttering unless the settings are really low.

    Probably worth at least waiting until they know if it's a bug, or if it's a a problem with the game itself.

    1 vote
  11. Comment on Teensy 4.0 Released. in ~comp

    time
    Link
    I love the Teensy platform, and I've used many in my personal projects over the years. This new one seems like a massive improvement in terms of hardware functionality. Looks like a great step,...

    I love the Teensy platform, and I've used many in my personal projects over the years. This new one seems like a massive improvement in terms of hardware functionality. Looks like a great step, and I look forward to seeing how people use it. Now I just need to come up with a project that would be able to use these features...

    1 vote
  12. Comment on More people need to talk about having fewer children in ~life

    time
    Link Parent
    I don't see it this way at all. I'm a human, sharing a planet with a bunch of other humans. I will never have children, but that doesn't mean I'm willing to be shitty for personal gain even though...

    I don't see it this way at all. I'm a human, sharing a planet with a bunch of other humans. I will never have children, but that doesn't mean I'm willing to be shitty for personal gain even though I don't have any children that may be effected by it. I will be effected by that shitty behavior, as will my friends, and family, and their children.

    I've got empathy for the other life on this planet, and I want to see life, including humanity, be able to thrive and continue to exist. Ideally it would be in a sustainable way, where people voluntarily limit the population to a number that the world can support indefinitely. This can be accomplished by educating more people on the costs of having children, and working to make sure that the children that are born are taught what is needed to keep the world sustainable to life.

    As a fellow human living on this planet, I am as responsible for the future of this planet as anyone with children of their own, and having been educated myself I know that even if I am not personally effected, my actions effect the future of the world for everyone I care about, and all those that will come after them. We need to work towards a society where people who think it's okay to be shitty because it doesn't effect them personally can be taught empathy for their fellow humans. Everyone has a stake in the future of this planet, whether they have kids or not, and that responsibility has to be impressed upon us all if we're going to be able to continue to live on this planet.

    20 votes
  13. Comment on What was your most memorable gaming moment? in ~games

    time
    Link
    For me it was when I was 10-11 and my friend got this fancy new game 'Myst' that had just come out. He had me come over, and we went down into the basement and turned off all the lights, and and...

    For me it was when I was 10-11 and my friend got this fancy new game 'Myst' that had just come out. He had me come over, and we went down into the basement and turned off all the lights, and and cranked the volume on the speakers, and it was like we were actually transported to an entirely new world. I'll always remember how much my mind was blown by the amazing graphics and lifelike sounds. It was such a huge step up from my Sega Genesis and old DOS computer at home in terms of graphics and audio. When his mom came down to check on us and let the light in, I had actually forgotten that we were in his house. I've never quite been that entranced or immersed in a game since.

    2 votes
  14. Comment on What creative projects are you working on? (June 2019 edition) in ~creative

    time
    Link
    I've been working on a project I call the oMIDItone. I took a silly 'instrument' from Japan called an otamatone and decided I would turn it into a MIDI synth. I first made a prototype with just a...

    I've been working on a project I call the oMIDItone. I took a silly 'instrument' from Japan called an otamatone and decided I would turn it into a MIDI synth. I first made a prototype with just a single otamatone head and realized the range was too limited to make a functional synth that could play a recognizable song. I ended up hacking together a newer version that uses 6 heads at once to allow for it to play music somewhat coherently.

    Here's a direct link to a video of the oMIDItone playing a song for those of you who don't want to read through the whole blog post to get to it.

    This month I just finished designing and ordered a new PCB for controlling all 6 heads without all the wires and hacking-it-together of the current version. I'm hoping that if this new PCB works well, I will be able to add servos to control the mouths and make them open and close in time with the music as well.

    2 votes
  15. Comment on What is your personal preference and why: vim or emacs? in ~comp

    time
    Link Parent
    I've recently switched from Vim to VSCode with vim keybindings. Best of both worlds, in my opinion. I get the macros, navigation, and editing features of vim combined with the plugins, version...

    I've recently switched from Vim to VSCode with vim keybindings. Best of both worlds, in my opinion. I get the macros, navigation, and editing features of vim combined with the plugins, version control, and better UI of VSCode.

    5 votes
  16. Comment on Maine Senate endorses bill to elect president by popular vote in ~news

    time
    Link
    If this passes in Maine, that gets them from 189 to 217 of the required 270 votes to make the interstate voting compact take effect. This seems like a step in a good direction in my opinion, as I...

    If this passes in Maine, that gets them from 189 to 217 of the required 270 votes to make the interstate voting compact take effect. This seems like a step in a good direction in my opinion, as I feel the electoral college is an outdated institution and that a national popular vote is more appropriate for electing the president.

    9 votes
  17. Comment on Any hams around? in ~hobbies

    time
    Link
    General here. I got into things a few years ago, mostly on UHF/VHF with a Baofeng HT, but my interest has waned a fair bit. I much prefer using SDR stuff and decoding digital data signals to...

    General here. I got into things a few years ago, mostly on UHF/VHF with a Baofeng HT, but my interest has waned a fair bit. I much prefer using SDR stuff and decoding digital data signals to talking with the old folks on the local repeaters over voice.

    I recently built a uBitX so I could try and work HF, but my antenna broke last fall and I haven't gotten around to fixing it yet now that things are warming up. My eventual goal is to figure out JT8 and see what I can hit with 5W and a dipole.

    1 vote
  18. Comment on “Myst” at 25: How it changed gaming, created addicts, and made enemies in ~games

    time
    Link
    I've always loved the Myst games, and played them all several times over the 23 years since I became aware of them. For me, this was pretty true. My first exposure to Myst, I was at a friend's...

    I've always loved the Myst games, and played them all several times over the 23 years since I became aware of them.

    Despite its largely static nature, its groundbreaking pre-rendered visuals (which many people called photorealistic at the time) made Myst feel like the first convincing virtual reality experience, at least in the sense of feeling physically present in a fictional world.

    For me, this was pretty true. My first exposure to Myst, I was at a friend's house, and he led me to his dad's office where the computer was, turned out all the lights, turned the volume up, and it was like we really did get sucked into the linking book and transported to another world. It wasn't just the visuals, but the sound design for the game was amazing in it's time as well. Ever since that day, I was hooked.

    Even now, I still look back fondly remembering how the game was able to do such a good job of making me feel like I had left the real world behind and gone somewhere completely new. It was an experience unlike any my young self has ever had, and that level of immersion has rarely been duplicated.

    10 votes
  19. Comment on Do any of you have blogs? in ~talk

    time
    Link
    I've got a blog with writeups for the various projects I've made over the years. I lost some projects when the places I used to host them were taken down, so I wanted to make sure I had control...

    I've got a blog with writeups for the various projects I've made over the years. I lost some projects when the places I used to host them were taken down, so I wanted to make sure I had control over my stuff going forward, in addition to posting on places like github and imgur.

    3 votes
  20. Comment on <deleted topic> in ~tech

    time
    Link Parent
    This is why end-to-end encryption is so important for all online communications. They might be able to know which IP address is talking to which, but they won't have any means of intercepting data...

    This is why end-to-end encryption is so important for all online communications. They might be able to know which IP address is talking to which, but they won't have any means of intercepting data is everything is using encrypted communication channels.

    2 votes