10 ms·
While programming language theorists have been speculating about “goto”’s more powerful cousin “comefrom” since the 80s, it was only implemented in intercal. In
by QuadmasterXLII 2y ago
While programming language theorists have been speculating about “goto”’s more powerful cousin “comefrom” since the 80s, it was only implemented in intercal. Intercal, while clearly superior in safety, performance, and ergonomics to languages like C, has struggled to break into the commercial market (likely because worse is better). It’s exciting to see javascript integrate this feature from intercal- hopefully this leads to a surge in polite programming, analogous to how javascript’s embrace of closure based objects has driven functiOOPnal programming into the mainstream
- alterom 2y ago>hopefully this leads to a surge in polite programming But not too polite. The compiler wouldn't like that.
- SAI_Peregrinus 2y agoOf course not. Sycophantic code is quite grating.
- fuzztester 2y agowhat's the download site for the psycho-fantic language? gimme! puhleeze.
- esafak 2y agoDemure is the fashion these days, I'm told.
- mock-possum 2y agoVery.
- BobbyTables2 2y agoSpoken like a bussin’ sigma that eats - no cap.
- krapp 2y agoWord to your mother.
- fuzztester 2y agoWell, at least the Boo compiler would not. https://en.m.wikipedia.org/wiki/Boo_(programming_language) https://en.m.wikipedia.org/wiki/Boo_(programming_language)
- DonHopkins 2y agoNot to mention reversible computing's "gofrom" and "cometo".
- toomim 2y agocomehither
- deleted 2y ago[deleted]
- edoceo 2y agoFromYonder
- yellowapple 2y agowhence
- vonunov 2y agoAfter y'all've had such great success with the Stacked Contractions movement starting in 2017 -- which I would like to take credit for independently spearheading on the Neopets forums in the mid-2000s, but I'dn't've been able to do it all myself of course -- I'd like to propose our next campaign. Let's bring back pronominal adverbs! You may already be familiar with such classics as "therefore" or "whereas". Why not revive all of them? No longer are "hereunder" and "thereinafter" the sole domain of lawyers. That alone would be an epic meme indeed, but we must go therebeyond. It is difficult to believe that anyone ever actually used words like "therethroughout" or "wherewithin", but we can make sure someone does. You can even make up your own! Just take any demonstrative (this/that/these/those), interrogative (what/which/who/where), or third-person personal pronoun, and turn it into the corresponding locative adverb, depending on whether you want to indicate being at, coming from, or going to something: This -> Here/Hence/Hither; That -> There/Thence/Thither; What/who/which -> Where/Whence/Whither; Him/Her/Them -> There/Thence/Thither; etc. Makes sense? No questions? Great! Now pick your favorite preposition and stick it on the end. Don't forget to experiment with some archaic prepositions like "anighst", "overthwart", and -- here's a really good one -- "withinside". That one means "within / inside" and I'm sure you can already see the potential. "What place should I go into?" Nope! "Whitherwithinside should I go?" Now we're talking.
- jayd16 2y agoMaybe I'm lost about the greater theory here. As a non-js dev it looks like they're just adding some OO sugar to events. I hesitate to call it sugar because it seems a lot more verbose than "my-menu.show-popover()" but its better than a global listeners I suppose.
- gmueckl 2y agoCOMEFROM is one of the many great jokes that form the Intercal language. I recommend reading the language specification. Of course, COMEFROM's grown up (and very real) sibling is ALTER GOTO in COBOL.
- Voultapher 2y agoSo I tracked down this programming manual for intercal https://3e8.org/pub/intercal.pdf https://3e8.org/pub/intercal.pdf and can't locate any mention to comefrom.
- mannykannot 2y agoIt is from a dialect called C-INTERCAL and is written with a space: 'COME FROM' https://www.cs.virginia.edu/~asb/teaching/cs415-fall05/docs/intercal.pdf https://www.cs.virginia.edu/~asb/teaching/cs415-fall05/docs/...
- gmueckl 2y agoThanks for that correction! I had memorized COME FROM as part of the original Intercal. My mistake.
- twic 2y agoIt's also foundational in Threaded INTERCAL, where "multiple COME FROM statements with the same label cause the program to fork separate threads at each COME FROM": https://esolangs.org/wiki/Threaded_INTERCAL https://esolangs.org/wiki/Threaded_INTERCAL
- eyelidlessness 2y ago
- bunderbunder 2y agoHaha, I had completely forgotten about intercal and "comefrom". Such genius. It anticipates and neatly summarizes the problems I've had maintaining and supporting code written using reactive programming design patterns by a good 40 years.
- deleted 2y ago[deleted]
- stonogo 2y agoPerl has supported comefrom for decades! https://metacpan.org/pod/Acme::ComeFrom https://metacpan.org/pod/Acme::ComeFrom
- fuzztester 2y agob-b-but ... does Perl support Sanskrit? if not, I hope at least Raku does. with its grammar feature, it well might, or might as well. https://en.m.wikipedia.org/wiki/Raku_(programming_language) https://en.m.wikipedia.org/wiki/Raku_(programming_language) https://en.m.wikipedia.org/wiki/Sanskrit https://en.m.wikipedia.org/wiki/Sanskrit
- chuckadams 2y agoSanskrit is written in Devanagari script which is used by nearly a billion people, so any language that groks Unicode identifiers should handle it fine. You want to pose a challenge, maybe try something like Rongorongo or Klingon. Me, I want to write my code in actual hieroglyphics.
- fuzztester 2y ago[flagged]
- shakna 2y agoTeX will allow you to rewrite the parser (ala TeXInfo), and using a unicode engine will allow you to use UTF. TeX will also allow you to embed and force fonts. Final step: Use something like Lyx, that will let you write and see the embedded font.
- fuzztester 2y agowow. what a number of errors in your comment: intro: you are talking to an Indian who lives in India, and who knows Hindi (a language derived from Sanskrit) fluently (and has been complimented multiple times for his Hindi speaking ability by native Hindi speakers), and who has studied Sanskrit for 3 years in high school and then 2 years in college, and Hindi for 4 years in high school, including grammar, vocabulary and literature (both poetry and prose) in both languages), and also essay-writing in Hindi. and got a high score in class in both those languages, over all the years that he studied them. and who has spoken Hindi for much of his adult life. both those languages are written in Devanagari. >Sanskrit is written in Devanagari script which is used by nearly a billion people, so any language that groks Unicode identifiers should handle it fine. whether the (programming) language can grok Unicode, has nothing to do with the number of people who use either Sanskrit or Devanagari, so your statement lacks logic, overall. you said: >Sanskrit is written in Devanagari script which is used by nearly a billion people that statement shows ignorance of actual facts. here is why: I had an idea about these points informally, already, being an Indian who lives in India, but I still did a few quick googles, to verify: List of languages by number of native speakers in India: https://en.m.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers_in_India https://en.m.wikipedia.org/wiki/List_of_languages_by_number_... Demographics of India: https://en.m.wikipedia.org/wiki/Demographics_of_India https://en.m.wikipedia.org/wiki/Demographics_of_India https://www.google.com/search?q=number+of+people+who+use+devanagari https://www.google.com/search?q=number+of+people+who+use+dev... top paragraph of the results of the above search: >Today, the Devanagari script is used to write three major languages: Hindi (over 520 million speakers), Marathi (over 83 million speakers) and Nepali (over 14 million speakers). even if you add the number of people in the Indian diaspora, such as in Fiji, the Caribbean, etc., you will not come to nearly a billion. you made a wrong assumption: > You want to pose a challenge, maybe try something like Rongorongo or Klingon. you assumed that I was posing a challenge. I was not. you seem to have not recognised that my comment was made in jest: >b-b-but ... does Perl support Sanskrit?
- fuzztester 2y agocough I hereby propose two new language constructs and corresponding keywords, which can be applied (sounds more functional than implemented,) widely across many languages, at least procedural / imperative ones: goto and comefrom with optional synonyms: leave to and return from the above can be shortened to as little as two letters each: go and co le and re for fans of succinctness / conciseness. PRs are open.
- fc417fc802 2y ago> with optional synonyms Leave I follow, but doesn't "return from" rightly describe a continuation as opposed to "come from" which is a nonlocal goto?
- fuzztester 2y agoI stopped understanding continuations before I even started.
- fc417fc802 2y agoI can't quite tell if you're serious. Continuations are fun, so I'll post this on the off chance it helps someone. They are perplexing until they aren't. Model stack frames as independent state. When you return from a function the stack frame can stick around. Now later, place your stack pointer back in the frame that you returned from earlier. Add a convention for passing arguments when you update the stack pointer as above. Now you have continuations.
- bryanrasmussen 2y agoso you can place your stack pointer back in the frame that you returned from earlier? that's probably the point at which they stopped understanding continuations before even starting.
- cyco130 2y ago
- zaphirplane 2y agoThat’s funny i read it as a dead pan joke Til
- ncr100 2y agoYeah, agreed. It is dripping heavily with nerd.
- harrison_clarke 2y agoC# has COMEFROM, too: https://github.com/dotnet/roslyn/blob/main/docs/features/interceptors.md https://github.com/dotnet/roslyn/blob/main/docs/features/int... they make it cumbersome to use by hand, but not impossible
- weeksie 2y agoThis is beautiful.
- Thorrez 2y agoHow are command and commandfor similar to comefrom? They seem similar to goto to me. With goto, the trigger specifies what to do. That's what command and commandfor do. With comefrom, what to do specifies the trigger. That seems similar to the existing document.addEventListener() in Javascript.
- ancyrweb 2y agoI don't see either. It's not even similar to goto. It's nothing more than method invocation, which is nothing like goto.
- btown 2y agoPython implementation (not mine) for comefrom and goto, so old it predates a pypy package - and very much for good reason! https://entrian.com/goto/ https://entrian.com/goto/