|
Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language. Everyone's getting a Pony!
|
|
|
|
|
Quote: In other words, given a = b, in most languages, the value of that is the value of b. But in Pony, the value of that is the old value of a. And in the "why?" answer: Quote: We’ll talk about that later. If you're going to completely upend what gets returned after an assignment, you damn well need to talk about it now.
|
|
|
|
|
I tried - without success - to find the source for your quote, but didn't want to spend all evening searching
You make it sound as if you ask "why the h...". For a few years, I was programming in Planc, a (proprietary) system language that provided this behavior, through the :=: assignment operator. This language was read left-to-right, with =: as the 'normal' assignment operator, so b =: a =: c would store b into c, while b :=: a =: c would store the (old) value of a into c.
We used :=: so frequently that I have missed it in all languages I have been working in since then. If you want to propagate any value at all from an assignment operation, it is far more likely to be the old value before it disappears than the new one, which remains available in the variable. E.g. a full swap is b :=: a =: b. Linking in an object at the head of the list is newobject :=: headptr =: newobject.next, unlinking the head object is head.next :=: head =: unlinkedobject. Especially in list/pointer handling, it was a very convenient operator. Also, we used it all the time when writing logs, such as writelog("Time for this step: ", 0 :=: timer). Or you could see if a new value is actually a modification: newvalue :=: oldval <> oldval =: valuehaschanged.
Having both alternatives =: and :=: available was of course very convenient. If I had to make a choice of one, I'd go for the :=: semantics. You could easily 'simulate'=: by b :=: a; b := c, and the compiler should have no problems generating just as good code as for b =: a =: c.
The machines programmed in this language always had (thread safe) SWAP machine instructions for all data types, so =: generated a STOre instruction, while :=: generated a SWAP, not requiring any intermediate location. In other words: Providing :=: had minimal effect on the compiler.
(Edit: Corrected typo in the 'full swap' example)
Bonus 'Weird and Wonderful':
A rather complex use of expression value propagation, from another language (MARY) that also is read left-to-right, and also has the :=: operator:
IF A :=: C > B THEN VECT1
ELSE VECT2
FI (INDEX)
=: CASE J IN
1: X :- REF INT,
2: Y
OUT Z
ESAC; Here, A is stored in C, and if the old value of C is larger than B, then you pick a value from the array VECT1, otherwise you pick a value from array VECT2. In either case, you select the element by INDEX. Where you put the value of the selected array element depends on J: If J = 1, it goes into whatever location the X pointer refers to. If J = 2, it goes into the plain variable Y. For all other values, it goes into Z.
I am definitely not saying that this code is "readable" - I guess the authors of 'Mary Textbook' just wanted to show off ...
modified 30-Dec-22 9:56am.
|
|
|
|
|
It was Classes - Pony Tutorial[^]
And thank you for the explanation and a peek into a couple other programming languages. Very interesting!
|
|
|
|
|
LastPass has claimed that it would take millions of years to crack a user's master password, but a rival company claims that the process won't take nearly that long, and could be done for a mere $100. Never let an opponents mistake go unnoticed
|
|
|
|
|
If it were not for sources like Quanta, I would never survive the New Year holidays when Kent will likely have the nerve to take a day off !
Has some very tasty news stories re computer science, AI, and algorithmic breakthroughs: ^].
Will Transformers Take Over Artificial Intelligence?
By STEPHEN ORNES
A simple algorithm that revolutionized how neural networks approach language is now taking on vision as well. It may not stop there.
How to Write Software With Mathematical Perfection
By SHEON HAN
Leslie Lamport revolutionized how computers talk to each other. Now he’s working on how engineers talk to machines.
Researchers Find ‘Master Problem’ Underlying All Cryptography
By ERICA KLARREICH
The existence of secure cryptography depends on one of the oldest questions in computational complexity.
Researchers Achieve ‘Absurdly Fast’ Algorithm for Network Flow
By ERICA KLARREICH
Computer scientists can now solve a decades-old problem in practically the time it takes to write it down.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
A new smart skin developed at Stanford University might foretell a day when people type on invisible keyboards, identify objects by touch alone, or allow users to communicate by hand gestures with apps in immersive environments. I have some hand gestures for AI to understand
|
|
|
|
|
Kent Sharkey wrote: I have some hand gestures for AI to understand ..i. ?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Exactly!
TTFN - Kent
|
|
|
|
|
While those end users may never think about all the work necessary to have a site load instantly, back end developers are obsessed with ensuring servers, applications, and databases can handle anything. I'm always amazed at how little I know of stuff I "need to know"
Awkward sentence sorry I am for
|
|
|
|
|
I only know, that I know nothing...
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
The saga of Microsoft's attempt to acquire Activision Blizzard will no doubt continue into 2023 as another response to the FTC lawsuit from Microsoft (this one 37 pages in length) has been uncovered. We the corporations, in order to form larger conglomerates, establish monopolies, and insure shareholders profits...
I give up after that. Little Tommy J I am not.
|
|
|
|
|
Since CP linked to this article, Microsoft's claims of unconstitutionality strike at the very heart of the US's administrative state.
17: Whether or not this is valid depends on the wording of the Law that created the Federal Trade Commission. Congress may very well have granted this authority to the Executive branch for enforcement, I don't know.
18: True - the entire concept of Administrative Judges in the Executive branch is a violation of Article III of the US Constitution.
19: My opinion only here: The US Supreme Court screwed up big time when they granted corporations the same rights as individuals. That was a more liberal court and the current textualist court may very well overturn that previous ruling on the basis that the Constitution doesn't recognize corporations.
20 & 21: True - again this is a violation of Article III of the US Constitution.
For our members not in the US:
Article I - Congress shall be the sole legislative authority
Article II - The President shall create, with Congressional approval, the bureaucracy to enforce the Laws passed by Congress
Article III - The Judiciary shall consist of the US Supreme Court and such subordinate Courts as Congress creates.
A big part of Microsoft's claims are that the FTC is using Administrative Judges, who work for the FTC. Because the FTC is part of the Article II Presidental enforcement authority, their Administrative Law Judges are part of the Executive Branch and therefore in violation of Article III of the US Constitution.
|
|
|
|
|
I totally agree that administrative judges are unconstitutional. I also believe not a single court will rule in Microsoft's favor.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Kent Sharkey wrote: We the corporations, in order to form larger conglomerates, establish monopolies, and insure shareholders profits... do hereby band together our considerable capital to form a more perfectly equitable to us Supreme Court...
Too political? Sorry. This has my disgust today.
|
|
|
|
|
As AI assumes more software development work, developers may eventually be working with training models more than they do with coding tools. And that's empowering. "History never repeats itself, but it does often rhyme"
|
|
|
|
|
Despite its benefits, shifting left can actually make developers' jobs more difficult. Here's how to ensure shift-left doesn't become a drain on developer productivity. Use the shift key on both sides of the keyboard so it wears evenly
|
|
|
|
|
I'd never even heard of the phrase "shift-left" until now. Now I'm trying to forget that I heard it!
|
|
|
|
|
I always thought Shift-Left was an assembler/machine language trick to double numbers without going through the multiplier or adder on the processor.
|
|
|
|
|
Is he referring to the Programmer's Cheer?
Quote: Shift to the left! Shift to the right! Pop up, push down! Byte! Byte! Byte!
This joke was old when ENIAC was the latest hardware.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
79% of recently hired tech workers who were previously laid off say they found a new job within three months of beginning their job hunt. "You never get free, everybody wants you"
|
|
|
|
|
The company is adding some handy automation features to its web-based spreadsheet software. It looks like you're trying to add a few numbers. Would you like help with that?
|
|
|
|
|
|
The 2022 Christmas Challenge features seven fiendish puzzles based on the seven disciplines of languages, engineering, codebreaking, analysis, maths, coding and cyber security - all key skills needed at GCHQ to help keep the country safe. On His Majesty's puzzle service
edit: Fixed gender for the blurb. I always get it wrong the first decade after changing the head of state. It's worse than cheques in January.
For those too young to know what a cheque is, get off my lawn!
modified 27-Dec-22 16:45pm.
|
|
|
|
|
Grand Canyon Headquarters? 
|
|
|
|