Hi, I'm the author of the article. Feel free to ask any questions you may have. I have to go to bed, I have work in about 4 hours, so I'll reply when I can.
Long live Holden, long live the ute!! Thanks for keeping your VZ alive
Driving with D
171–180 of 186 posts
Re: Driving with D
#172Earlier quoted context omitted.
If your suggestion is, "GC languages can be used to write anything so long as whatever parts can't be written in a GC language are written in a non GC language," then yes that's true. But it's also a tautology.
If you need to stay away from the GC because of some practical reason, you can always write C/C++/Rust. You implied that this is a frequent situation when it isn't. Your example of "anything with a UI" was quite a bad one. Most projects are better off written in a GC language because the productivity benefits outweigh the performance costs.
My anecdotal, unscientific experience shows that GC is a double-edged sword that maybe makes writing simple programs slightly faster, at the expense of a much worse maintainability once the code base gets big. And non-memory resource management in GCed languages without RAII is a really huge PITA that kills all productivity gains.
GC allowed memory safety until Rust happened, and that was a big gain, but now that point is moot.
Re: Driving with D
#173Earlier quoted context omitted.
Hi, Firstly, Congratulations. This is no trivial accomplishment. Here are the questions I have. 1. Normally, cars come with their own ECUs for the engine. Interfacing with them requires knowledge about the underlying firmware used afaik. Did you happen to reverse engineer the firmware so that you could interface your own electronics with the provided ECU ? 2. How did you make the car believe that your 6 speed automat…
1. I don't interface to my car's electronics over serial or CAN bus. Instead, I interface by emulating actuators and sensors the 4 speed gearbox computer expects. 2. I'd like to introduce you to "manualisation" [0]. It's where the solenoids of the 4 speed are wired directly to the gear selector switch. The 4 speed computer is surprisingly tolerant of this, and it forms the basis of my interface. My interface provides…
1. So based on my understanding, engine speed sensor readings are sent to the TCU which in turn regulates the solenoids(There might be other sensors as well but for my question, I think they aren't that important). So in order for your modification to work, you have to get these CAN frames, understand the reading, regulate your 6 speed auto gearbox and then create a CAN frame that would imitate the sensors of the 4 speed auto gearbox(to basically tell the TCU that the gearbox has been regulated correctly). You can in principle neglect the actuator commands that are sent by the TCU to the solenoids since you are regulating it on your own. However, in order to do this, you have to understand the CAN frames being used and also the protocol used(address based or message based). How did you figure this out ? Or is my understanding wrong here ?
2. Did you use FreeRTOS for your STM32F407 component ?
I really appreciate you taking the time to answer the questions :)
Re: Driving with D
#174Earlier quoted context omitted.
How does that matter? You said "game development", not "writing a game engine". You said "data analysis", not "writing linalg algorithms", in which case we'd all have to bow to Fortran anyway. Your argument also doesn't apply to GUI apps, anyway. C# and Java amount to a huge number of such apps, and they're self-hosted. GC languages are vastly more productive that manual-memory languages, and for the vast majority of…
If your suggestion is, "GC languages can be used to write anything so long as whatever parts can't be written in a GC language are written in a non GC language," then yes that's true. But it's also a tautology.
Re: Driving with D
#175Any reasons D never caught on more? No big tech company anchor behind it?
While this makes D a deeply pleasant language to use, it also makes it tough to sell. It doesn't have any whizz bang features you can get across in an elevator pitch.
Re: Driving with D
#176Earlier quoted context omitted.
Maybe something changed, but I thought array concatenation with ~, associative and dynamic arrays as well as exceptions rely on the GC as well. It's a short list, for sure, but thats not the point: Anyone looking into using D without GC will see that there are some language features that require special care. At that point it becomes a valid question why one should learn about the pitfalls of GC free D, when one alre…
> array concatenation with ~, associative and dynamic arrays as well Yes. Walter was referring to the operator itself. Strings are arrays. > as well as exceptions It's not exceptions themselves, but the `new` operator. It directly allocates from the GC. That said, there is a plan to enable @nogc exceptions. > At that point it becomes a valid question why one should learn about the pitfalls of GC free D, when one alre…
Exists as a preview switch
Re: Driving with D
#177Earlier quoted context omitted.
What are the legal hurdles you had to jump to get this hack approved for street use? As car modders know all too well, this can often be the hardest task.
I follow the car modding scene and to be honest, in the U.S. there don't seem to be anything preventing this from being street legal. Even in California, something like this being a non-engine mod I don't see it being an issue.
Re: Driving with D
#178Earlier quoted context omitted.
1. I don't interface to my car's electronics over serial or CAN bus. Instead, I interface by emulating actuators and sensors the 4 speed gearbox computer expects. 2. I'd like to introduce you to "manualisation" [0]. It's where the solenoids of the 4 speed are wired directly to the gear selector switch. The 4 speed computer is surprisingly tolerant of this, and it forms the basis of my interface. My interface provides…
Thank you for your reply. That is quite enlightening. I am quite surprised that the Transmission Control Unit(TCU) is tolerant of the solenoid modification. However, I have two questions though. 1. So based on my understanding, engine speed sensor readings are sent to the TCU which in turn regulates the solenoids(There might be other sensors as well but for my question, I think they aren't that important). So in orde…
1. My apologies, I've confused you. CAN communications are purely internal for my system, it doesn't communicate via CAN to the car's computers.
The sensors and actuators give or accept voltage signals, and my controller inputs or outputs those accordingly. For example, the 4 speed has some pressure sensors to monitor the valve body behaviour, and I send some HI or LO voltage signals in emulation of it.
2. I do use FreeRTOS for the 407. I don't need to, since I use a super loop and all my memory is either static or allocated on the stack.
Re: Driving with D
#179I like D and could pick it up easily. It feels a lot like C without memory management overhead, Ada-inspired safety and lots of productivity feats. However, where D really shines is the amount of time between learning the language and starting doing something useful in it.
Re: Driving with D
#180Earlier quoted context omitted.
Thank you for your reply. That is quite enlightening. I am quite surprised that the Transmission Control Unit(TCU) is tolerant of the solenoid modification. However, I have two questions though. 1. So based on my understanding, engine speed sensor readings are sent to the TCU which in turn regulates the solenoids(There might be other sensors as well but for my question, I think they aren't that important). So in orde…
I was quite surprised, too. Maybe it was a little gift from Holden to the burnout bogans? 1. My apologies, I've confused you. CAN communications are purely internal for my system, it doesn't communicate via CAN to the car's computers. The sensors and actuators give or accept voltage signals, and my controller inputs or outputs those accordingly. For example, the 4 speed has some pressure sensors to monitor the valve…