3 ms·
I see. The language spec explicitly talks about the machine. That's not nothing. In practice, though, when I have some piece of memory-mapped hardware attach
by AnimalMuppet 4y ago
I see. The language spec explicitly talks about the machine. That's not nothing.
In practice, though, when I have some piece of memory-mapped hardware attached, and I want to talk to it, in C I can say:
*(uint32_t*)0xF00BA4 = 0x0102ABCD;
or whatever I need to flip the bits. C lets me actually control the whole machine. Whereas Haskell... I don't know, but I suspect it lets me actually use the physical machine a lot less.
- tome 4y ago> C lets me actually control the whole machine Really? Can you run micro-ops?
- yakshaving_jgt 4y agoYou know you can write C inside Haskell, right? Like, there's literally nothing stopping you. You can use FFI, and you can also write C inline. You can have the best of both, if you want.
- dllthomas 4y agoThere might be a cleaner way of doing it, but do let ptr :: Ptr Word32 = nullPtr `plusPtr` 0xF00BA4 poke ptr 0x0102ABCD should have you covered.