4 ms·
Let's suppose it's a really easy problem to solve. Why the hell would anyone want to program in a natural language? Suppose you could write a kernel in such a
by hasenj 16y ago
Let's suppose it's a really easy problem to solve.
Why the hell would anyone want to program in a natural language?
Suppose you could write a kernel in such a language, and one of the instructions was:
"Load the first 5 bits at address 0x323abc into the last 5 bits after address 0x89bbca"
Now, wouldn't it be easier to say 'shuffle_bits(5, 0x232abc, 0x89bbca);' where you control precisely what 'shuffle_bits' does?
- mlinsey 16y agoObviously you wouldn't write kernels. You would write the equivalent of shell scripts for ordinary users. Imagine if ordinary users could automate their daily workflow or customize MS Word as much as vim or emacs users do with their editors.
- noglorp 16y agocopy the time field from cpuinfo to temp_time' backup the low 5 bits of goodnameformemorylocation' locA's low 5 to locb's low 5' Seems like there are a fair number of nice representations. Context is obviously important though: in a kernel, you probably want fairly implicit ways of referring to bits.
- gaius 16y agoThat is basically what COBOL looks like.
- DougBTX 16y agoOr even: load_first_five_bits_into(0x323abc) load_last_five_bits_into(0x89bbca) Or if you do mappings a lot, I'm sure I saw an IP packet parser based on syntax like this: [----5----|----n----|----5----] [0x323abc |void |0x89bbca ]
- cracki 16y agoyou're actively trying to destroy the idea of natural language programming. you'll succeed because the idea itself means nothing unless someone implements it. natural language programming means that you, as the human, concentrate on high-level aspects while the machine fills in the blanks (stuff you don't care about). natural language programming... it's supposed to be a dialogue, not a specification. you say a few words and the machine creates a formal representation of that. then you're free to alter the assumptions made by the machine. you're shaping something in broad strokes. you're designing something. you don't actually code something. you get your own private code monkey, you get to talk to him, explain your design, let him do the typing, and intervene when needed. now, that code monkey could be a machine. i guess it takes a certain mindset to accept and rely on others (also machines) to do the grunt work. i certainly don't want to be doing repetitive grunt work if i could help it. it's fun now and then, when i have the choice. it stops being fun if i have to do it.