Click here to Skip to main content
15,880,037 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Aide pour un programme langage c Pin
trønderen14-Nov-22 8:33
trønderen14-Nov-22 8:33 
GeneralRe: Aide pour un programme langage c Pin
jschell29-Dec-22 11:48
jschell29-Dec-22 11:48 
GeneralRe: Aide pour un programme langage c Pin
trønderen30-Dec-22 6:57
trønderen30-Dec-22 6:57 
GeneralRe: Aide pour un programme langage c Pin
jschell2-Jan-23 13:14
jschell2-Jan-23 13:14 
GeneralRe: Aide pour un programme langage c Pin
trønderen3-Jan-23 14:39
trønderen3-Jan-23 14:39 
GeneralRe: Aide pour un programme langage c Pin
jschell10-Jan-23 6:17
jschell10-Jan-23 6:17 
GeneralRe: Aide pour un programme langage c Pin
jsc4211-Jan-23 4:33
professionaljsc4211-Jan-23 4:33 
GeneralRe: Aide pour un programme langage c Pin
trønderen11-Jan-23 6:23
trønderen11-Jan-23 6:23 
I guess that source code files were stored as plain text, using the selected set of word symbols, right? So you couldn't take your source file to another machine, with other concrete mappings, and have it compiled there.

(I have never seen TNEMMOC, but I have seen ERUDECORP. I suspect that it was a macro definition, though, made by someone hating IF-FI and DO-OD. Btw: It must have been in Sigplan Notices around 1980 one guy wrote an article "do-ob considered odder than do-od". The article when on to propose that a block be denoted by do ... ob in the top corners and po ... oq in the lower corners. Maybe it wasn't Sigplan Notices, but Journal of Irreproducible Results Smile | :) ).

I have come to the conclusion that a better solution is to store the parse tree, and do the mapping to word symbols only when presenting the code on the screen to the developer (with keywords indicating structure etc. read-only - you would have to create new structures by function keys or menu selections). This obviously requires a screen and 'graphic' style IDE, which wasn't available in the 1960s, and which required processing power that wasn't available in the 1960s. Today, both screens and CPU power come thirteen to the dozen.

One obvious advantage is that you can select the concrete symbols to suit your needs, mother tongue or whatever. A second advantage is that you never see any misleading indentation etc. - any such thing is handled by the IDE. This is of course closely connected to the third advantage: As all developer input is parsed and processed immediately, and rejected immediately if syntactically incorrect, there is no way to store program code with syntax errors.

Of course the immediate parsing requires more power than simply inserting keystrokes into a line buffer, but it is distributed in time: Spending 10 ms CPU for keystrokes separated at least 100 ms apart is perfectly OK (and you do it not per keystroke, but per token).

And, you save significant time when you press F5 (that is is VS!) to compile and run your program in the debugger: Some steps that are known for being time consuming are already done. Lexing and parsing are complete. F5 can go directly to the tree hugging stage, doing its optimizations at that level, and onto code generating, and the program is running before your finger is off that F5 key.

In my (pre-URL) student days, I read a survey of how various compilers spent its time. One extreme case was a CDC mainframe that spent 60% on its time fetching the next character from the source input file! Most computers (even in those days) are better at reading text input; yet, lexing and parsing (where maybe 90% of the error checking takes place) is a resource hog. The dotNet jitter is speedy much because it doesn't have to do much error checking (nor does it handle character input).

In other kinds of computer applications, such as document processing, CAD/CAM systems and lots of others, users have no problems accepting that their data are managed and stored in binary formats. Other branches in this discussion has most definitely shown that this is a tough one for software developers: Letting the 7-bit ASCII file go is like completely loosing control of their code. So I certainly do not expect the next version of VS to provide an option for storing my C# file as a parse tree!

I do that for this one project I am developing, though. We are not talking about C#, but a simplified version where (non-IT-people) specify what goes into selected action alternative, repeated actions etc. All C# red tape is hidden from the user, but the 'code' they specify is used to generate C# code inserted into a skeleton, which is then compiled behind the back of the user. The user sees everything is his mother tongue, and in a simplified manner that hides lots of details of minimal interest to the common user. So ... I know that this is a workable solution, in particular when making UIs for non-technical users. I am 100% certain that it would be equally workable for a programming language.
GeneralRe: Aide pour un programme langage c Pin
Victor Nijegorodov11-Jan-23 6:30
Victor Nijegorodov11-Jan-23 6:30 
GeneralRe: Aide pour un programme langage c Pin
trønderen11-Jan-23 7:05
trønderen11-Jan-23 7:05 
GeneralRe: Aide pour un programme langage c Pin
jsc4212-Jan-23 5:50
professionaljsc4212-Jan-23 5:50 
GeneralRe: Aide pour un programme langage c Pin
trønderen14-Nov-22 9:12
trønderen14-Nov-22 9:12 
QuestionAppropriate Algorithm for Influencers Ranking Pin
learn zhishi5-Sep-22 20:01
learn zhishi5-Sep-22 20:01 
AnswerRe: Appropriate Algorithm for Influencers Ranking Pin
Gerry Schmitz29-Oct-22 13:32
mveGerry Schmitz29-Oct-22 13:32 
GeneralWhere To Begin - Excel Manipulation Pin
(Mike) ipscone 19-May-22 12:14
(Mike) ipscone 19-May-22 12:14 
GeneralRe: Where To Begin - Excel Manipulation Pin
Richard MacCutchan19-May-22 20:53
mveRichard MacCutchan19-May-22 20:53 
GeneralRe: Where To Begin - Excel Manipulation Pin
(Mike) ipscone 20-May-22 5:22
(Mike) ipscone 20-May-22 5:22 
GeneralRe: Where To Begin - Excel Manipulation Pin
Richard MacCutchan20-May-22 5:35
mveRichard MacCutchan20-May-22 5:35 
GeneralRe: Where To Begin - Excel Manipulation Pin
(Mike) ipscone 20-May-22 10:38
(Mike) ipscone 20-May-22 10:38 
GeneralRe: Where To Begin - Excel Manipulation Pin
Gerry Schmitz20-May-22 5:18
mveGerry Schmitz20-May-22 5:18 
GeneralRe: Where To Begin - Excel Manipulation Pin
(Mike) ipscone 20-May-22 5:39
(Mike) ipscone 20-May-22 5:39 
GeneralRe: Where To Begin - Excel Manipulation Pin
Richard MacCutchan20-May-22 6:09
mveRichard MacCutchan20-May-22 6:09 
GeneralRe: Where To Begin - Excel Manipulation Pin
(Mike) ipscone 20-May-22 6:52
(Mike) ipscone 20-May-22 6:52 
GeneralRe: Where To Begin - Excel Manipulation Pin
Gerry Schmitz21-May-22 5:30
mveGerry Schmitz21-May-22 5:30 
GeneralRe: Where To Begin - Excel Manipulation Pin
Mirzakhmet Syzdykov10-Nov-22 9:34
professionalMirzakhmet Syzdykov10-Nov-22 9:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.