- if cargo blocks - 1 Update
- if cargo blocks - 16 Updates
- Add integer value 38 operator ~..~ - 4 Updates
- Multi-channel rand() - 3 Updates
- Range-aware modulo operator -% - 1 Update
ram@zedat.fu-berlin.de (Stefan Ram): Dec 30 09:44PM >heard about that damnation only rather recently. Does that mean you are >not supposed to say "What are you looking for?" but should say "For what >are you looking?" instead? "Although I have been using networks for quite a while now, it never occured to me to type 'ending a sentence with a preposition' into a Web search engine or to ask questions about English in the newsgroup 'alt.usage.english', where they are on-topic. Instead, I prefer to ask about English prepositions using a cross post into two programming-language newsgroups." - SCNR |
Bart <bc@freeuk.com>: Dec 29 11:49PM On 29/12/2018 17:34, Rick C. Hodgin wrote: > their action when encountered, so in this example "gotest zlabel" > and "gotest last" would never be executed. They are just examples > showing how branching could work from one place to another. You've just reinvented spaghetti code I think. And loops. But you don't need new features for that. I assume 'nexttest' and 'prevtest' and 'gotest' are special kinds of gotos? How does it work with nested if/else statements? Never mind; this is too much of a crazy idea to pursue further. BTW here's how you can express your example in current C: if (x) { goto ylabel; // Continues with the "else if (y)" test goto zlabel; // Go to the "else if (z)" test } else ylabel: if (y) { // Code here goto ylabel; // Retest "else if (y)" block goto last; // Go to the else block } else zlabel: if (z) { if (whatever) goto out; // Leave the if-block } else last: { // Code here } out:; |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 29 06:52PM -0500 On 12/29/2018 6:49 PM, Bart wrote: >> and "gotest last" would never be executed. They are just examples >> showing how branching could work from one place to another. > You've just reinvented spaghetti code I think. And loops. The spaghetti code exists when you don't have in, out, and enter. The features I've added to CAlive, including flow {..} blocks, and now the cargo blocks, remove spaghetti code, and place a direct type of flow control to one's code without using gotos, without using anything other than structured programming. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Dec 30 12:12AM On 29/12/2018 23:52, Rick C. Hodgin wrote: > cargo blocks, remove spaghetti code, and place a direct type of flow > control to one's code without using gotos, without using anything other > than structured programming. Structured programming? Structured obfuscation more like. Again a totally batshit crazy idea that serves no useful purpose whatsoever. /Flibble -- "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
rbowman <bowman@montana.com>: Dec 29 07:04PM -0700 On 12/29/2018 04:52 PM, Rick C. Hodgin wrote: > cargo blocks, remove spaghetti code, and place a direct type of flow > control to one's code without using gotos, without using anything other > than structured programming. I lived through the era when you had to place your hand over your heart and swear eternal allegiance to top down structured programming and promise to never use the evil GOTO. Rather like the grammarian's damnation of ending a sentence with a preposition it resulted in some of the most convoluted messes I've ever seen. The programming example is a bit more hypocritical since in most cases you want the compiler to do the dirty work. |
Bart <bc@freeuk.com>: Dec 30 02:07AM On 29/12/2018 23:52, Rick C. Hodgin wrote: > cargo blocks, remove spaghetti code, and place a direct type of flow > control to one's code without using gotos, without using anything other > than structured programming. 'gotest' is not a kind of goto? Without goto, then with the form of if-else chain above, exactly one branch is expected to be executed each time you enter the first 'if'. And it will continue execution (subject to break, continue, return, exit() or longjmp()) following the final }. As for the execution path of your example, it's anyone's guess. After 'if' is entered, more than one block could be executed, and a block could be executed multiple times. Structured programming it isn't. -- bart |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 29 06:15PM -0500 On 12/29/2018 6:06 PM, rbowman wrote: >> you use in your writing? > Ask me if I give a ... Well, you get the idea. I'm old, grumpy, and I don't > suffer fools gladly. People don't have to remain that way (grumpy). There is a way to be as new again ... one filled with love, hope, peace, and overflowing joy. It's the one I teach you about, the one you call me a fool for. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 29 09:59PM -0500 On 12/29/2018 9:07 PM, Bart wrote: >>>> // Code here >>>> } > 'gotest' is not a kind of goto? nexttest, pretest, and gotest all signify new abilities that didn't previously exist. They allow flow control into the middle of an existing flow controlled portion of program flow, such as re-entering an if..else if..else statement at an arbitrary point on the test cond- itions, not just to the intervening logic. The syntax above is also incorrect for zlabel. It should be: } else if zlabel (z) { if (whatever) out; // Leave the if-block > is expected to be executed each time you enter the first 'if'. > And it will continue execution (subject to break, continue, return, exit() or > longjmp()) following the final }. Correct. The new keywords introduce new abilities to re-enter the conditional test portion of the flow control. > As for the execution path of your example, it's anyone's guess. After 'if' is > entered, more than one block could be executed, and a block could be executed > multiple times. The keywords re-enter flow-control at the testing level, and will pro- ceed normally at that point. > Structured programming it isn't. It's a structured way to enter those portions. No arbitrary code lo- cation labels, but rather labels on existing flow control members. They simply operate similar to break and continue, but do so in the middle of the flow control stream used for if..else if..else. -- Rick C. Hodgin |
Ralf Goertz <me@myprovider.invalid>: Dec 30 06:12AM +0100 Am Sat, 29 Dec 2018 19:04:28 -0700 > Rather like the grammarian's damnation of ending a sentence with a > preposition it resulted in some of the most convoluted messes I've > ever seen. Although I have been communicating in English for quite a while now, I heard about that damnation only rather recently. Does that mean you are not supposed to say "What are you looking for?" but should say "For what are you looking?" instead? The former /feels/ correct because I hear it very often, I guess more often than the latter. But then I also very often hear "What do you got?" in American TV shows which feels like a horrible abuse of language… |
David Brown <david.brown@hesbynett.no>: Dec 30 03:23PM +0100 On 30/12/2018 06:12, Ralf Goertz wrote: > heard about that damnation only rather recently. Does that mean you are > not supposed to say "What are you looking for?" but should say "For what > are you looking?" instead? Yes, that is correct. > very often, I guess more often than the latter. But then I also very > often hear "What do you got?" in American TV shows which feels like a > horrible abuse of language… It is a matter of philosophical debate whether the kind of grammatical abuse found on American TV shows is ignorance, laziness, or the evolution of language. "To boldly go where no man has gone before" - is it bad grammar, or has it changed the language? |
gazelle@shell.xmission.com (Kenny McCormack): Dec 30 03:39PM In article <q0akdp$74k$1@dont-email.me>, David Brown <david.brown@hesbynett.no> wrote: ... >It is a matter of philosophical debate whether the kind of grammatical >abuse found on American TV shows is ignorance, laziness, or the >evolution of language. All of the above. It's a race to the bottom. >"To boldly go where no man has gone before" - is it bad grammar, or has >it changed the language? Both. All of the above. -- If it seems like I'm not responding to some moronic criticism that you've posted in response to one of my posts, be aware that I do not debate with idiots. It doesn't mean you've won anything... |
rbowman <bowman@montana.com>: Dec 30 11:09AM -0700 On 12/29/2018 10:12 PM, Ralf Goertz wrote: > very often, I guess more often than the latter. But then I also very > often hear "What do you got?" in American TV shows which feels like a > horrible abuse of language… At least when I was a kid teachers drummed it into your head, along with not splitting infinitives and starting a sentence with a conjunction. Structuring the sentence 'correctly' usually results in a stilted, pedantic phrase seldom found outside of an old book. 'What do you got?' sounds ignorant to me, but I don't know what a grammarian would say. 'Do you have a pen?' and 'Have you got a pen?' both sound right to me but mixing 'do' and 'got' doesn't. Languages change and the rules slowly follow. I'm sure my German, what I remember of it, would be unbearably quaint. In high school we were still chewing our way through Fraktur although the Antiqua-Fraktur war was over. |
rbowman <bowman@montana.com>: Dec 30 11:23AM -0700 On 12/30/2018 08:39 AM, Kenny McCormack wrote: >> abuse found on American TV shows is ignorance, laziness, or the >> evolution of language. > All of the above. I doubt if it is limited to American TV. Besides, most of our actors are Brits or Aussies :) |
Siri Cruise <chine.bleu@yahoo.com>: Dec 30 01:00PM -0800 In article <q084io$qe1$1@dont-email.me>, > in { setup_for_test1 } > out { cleanup_for_test1 } > enter { related_code_if_block_entered1 } If you have GNU extensions, if (({ setup_for_test1 bool test = some_test1 if (test) related_code_if_block_entered1 cleanup_for_test1; test; })) { ... } -- :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @ 'I desire mercy, not sacrifice.' /|\ The first law of discordiamism: The more energy This post / \ to make order is nore energy made into entropy. insults Islam. Mohammed |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 30 04:12PM -0500 On 12/30/2018 4:00 PM, Siri Cruise wrote: > })) { > ... > } So the general concept of encapsulation of this code is not such a bad idea ... GNU added similar features. Good to know. -- Rick C. Hodgin |
Siri Cruise <chine.bleu@yahoo.com>: Dec 30 01:31PM -0800 In article <q0bc9c$qln$1@dont-email.me>, > > } > So the general concept of encapsulation of this code is not such a bad > idea ... GNU added similar features. Good to know. In 1968 you could've done if setup_for_test1; bool test = some_test1; if test then related_code_if_block_entered1 fi; cleanup_for_test1; test then ... fi -- :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @ 'I desire mercy, not sacrifice.' /|\ The first law of discordiamism: The more energy This post / \ to make order is nore energy made into entropy. insults Islam. Mohammed |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 30 04:45PM -0500 On 12/30/2018 4:31 PM, Siri Cruise wrote: > then > ... > fi It only makes sense. It is another of those fundamental operations that is not easily provided for in C/C++ today (without extensions like those seen in GNU). CAlive's goal is to provide for fundamental abilities. None of the atypical ones have to be used by anyone. But, if you want to use them in certain cases ... they'll be there. I probably won't use many of the new features I'm adding most of the time, but I will probably use most of them some of the time. -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Dec 29 03:48PM -0800 On 12/28/2018 8:35 AM, Mr Flibble wrote: > I propose the addition of the following operator to C++ (and also for my > own amazing C/C++-like language I am working on due to mental illness): > Add integer value 38 operator: ~..~ Amazing! > (~..~-(~..~/~..~))n; // 37 + n > With the help of the one true god (The Flying Spaghetti Monster) I hope > this important proposal is ratified by the C++ ISO committee. Does ((~..~/~..~)*80 - ~..~) = 42? ;^) |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Dec 30 06:00PM On Fri, 2018-12-28, Mr Flibble wrote: > I propose the addition of the following operator to C++ (and also for my > own amazing C/C++-like language I am working on due to mental illness): > Add integer value 38 operator: ~..~ [snip] That was funny, but I liked part of your .sig better: > "You won't burn in hell. But be nice anyway." Ricky Gervais /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Dec 30 01:16PM -0800 On 12/30/2018 10:00 AM, Jorgen Grahn wrote: > [snip] > That was funny, but I liked part of your .sig better: >> "You won't burn in hell. But be nice anyway." Ricky Gervais Yeah. If people choose to live a good life, everything would be much better. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 30 01:41PM -0800 On Sunday, December 30, 2018 at 4:16:55 PM UTC-5, Chris M. Thomasson wrote: > On 12/30/2018 10:00 AM, Jorgen Grahn wrote: > >> "You won't burn in hell. But be nice anyway." Ricky Gervais > Yeah. If people choose to live a good life, everything would be much better. There is no way for men and women to live a "good life" without having a foundation which teaches them what good is, and why it is good compared alongside other things. In addition, the world's view of what is good is different from God's view. The Bible teaches people the difference. It's why I teach you to go to the Bible and read for yourself what God has in mind for us to be and do, rather than what Ricky Gervais believes we should do. God has it right. Ricky Gervais has it incom- plete and misleading. -- Rick C. Hodgin |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Dec 30 08:10PM On Thu, 2018-12-27, Keith Thompson wrote: > POSIX.1-2001, POSIX.1-2008, 4.3BS > It's defined by POSIX, but not by ISO C (which is what Bart > presumably meant by "standard library"). Also, the "multi-channel" aspect is a bit inconvenient: it's still global state, but you can switch it. Not good for e.g. threaded use, or for people like me who like objects. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
James Kuyper <jameskuyper@alumni.caltech.edu>: Dec 30 04:10PM -0500 On 12/30/18 15:10, Jorgen Grahn wrote: > On Thu, 2018-12-27, Keith Thompson wrote: ... > global state, but you can switch it. Not good for e.g. threaded > use, or for people like me who like objects. > /Jorgen The page in the POSIX specification for random() says "Threaded applications should use erand48(), nrand48(), or jrand48() instead of random() when an independent random number sequence in multiple threads is required." |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Dec 30 01:19PM -0800 On 12/30/2018 12:10 PM, Jorgen Grahn wrote: > Also, the "multi-channel" aspect is a bit inconvenient: it's still > global state, but you can switch it. Not good for e.g. threaded > use, or for people like me who like objects. It would become a huge bottleneck if all threads had to fight for a single global state. However, if each thread had it own personal PRNG with its own unique seed, then each thread would produce a unique stream without any synchronization whatsoever. Much better. |
Richard Damon <Richard@Damon-Family.org>: Dec 29 07:13PM -0500 On 12/29/18 4:04 PM, James Kuyper wrote: > C90 allowed -1/10 to be either 0 or -1. C99 and later requires -1/10 to > be 0. In all versions of the standard, the values returned by the % > operator are defined by requiring that (a/b)*b + (a%b) == a. My comment meant that for -1 % 10 to be 9 required that -1/10 to be -1, if -1/10 was 0 then -1 % 10 wouild need to be -1 (giving an example of liking / and % ) |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment