programming-languages

Shorter alternative for 'lambda' keyword?

一个人想着一个人 提交于 2020-07-14 17:33:59
问题 Background: Python is about simple and readable code. It got better over the versions and I am a huge fan! However, typing l a m b d a everytime I have to define a lambda is not fun (you may disagree). The problem is, these 6 characters l a m b d a makes my statement longer when I nest a couple of lambdas inside map s and filter s (I am not nesting more than 2 or three, because it takes away the readability of python - no arguments here!) The actual question (in comments): # How to rename

Shorter alternative for 'lambda' keyword?

孤街醉人 提交于 2020-07-14 17:31:50
问题 Background: Python is about simple and readable code. It got better over the versions and I am a huge fan! However, typing l a m b d a everytime I have to define a lambda is not fun (you may disagree). The problem is, these 6 characters l a m b d a makes my statement longer when I nest a couple of lambdas inside map s and filter s (I am not nesting more than 2 or three, because it takes away the readability of python - no arguments here!) The actual question (in comments): # How to rename

Why are special characters not allowed in variable names?

会有一股神秘感。 提交于 2020-07-05 09:54:15
问题 Why special character( except underscore) are not allowed in variable name of programming language ? Is there are any reason related to computer architecture or organisation. 回答1: Most languages have long histories, using ASCII character sets. Those languages tend to have simple identifier descriptions (e.g., starts with A-Z, followed by A-Z,0-9, maybe underscore; COBOL allows "-" as part of a name). When all you had was an 029 keypunch or a teletype, you didn't have many other characters,

Recursion overhead — how serious is it? [duplicate]

扶醉桌前 提交于 2020-06-24 22:26:50
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Is recursion ever faster than looping? I was first trained to program seriously in C, about 15 years ago. My employer wanted highly optimized code for computationally difficult tasks. I remember being advised more than once to rewrite recursions as loops, even at the expensive of readability, in order to avoid "recursion overhead." As I understood it then, recursion overhead was the extra effort required to push

Decoding a Roblox backdoor

不羁岁月 提交于 2020-05-16 02:32:26
问题 I am working on a Roblox lua script that I found when searching for backdoors into a game I moderate. The backdoor loaded an external script that I got the source code for and I am working on decoding and reverse engineering it. The line that I am having trouble with is local varname = #{6133} This is really confusing me because I have never encountered it before. I do very little Lua programming but I am experience in Java and C++, but even after research I don't know what the #{number} does

Difference between compiled and interpreted languages?

浪子不回头ぞ 提交于 2020-04-07 11:02:12
问题 What are the relative strenghts and weaknesses of compiled and interpreted languages? Why? 回答1: Neither approach has a clear advantage over the other - if one approach was always better, chances are that we'd start using it everywhere! Generally speaking , compilers offer the following advantages: Because they can see all the code up-front, they can perform a number of analyses and optimizations when generating code that makes the final version of the code executed faster than just

Is it possible to know in what language an exe file is written?

老子叫甜甜 提交于 2020-03-12 17:59:23
问题 I have an exe file and I decompiled it with Ida. I was told the program coded in Delphi, so I tried to decompile with DeDe but it failed, no output and no error. And I'm wondering is it possible to find language used in creating exe by trying different decompilers written specifically for a programming language? Or can they fail for some other reason? 回答1: In many cases it is possible to identify the compiler used to compile the code, and from that, the original language. Most language

Is it possible to know in what language an exe file is written?

▼魔方 西西 提交于 2020-03-12 17:44:56
问题 I have an exe file and I decompiled it with Ida. I was told the program coded in Delphi, so I tried to decompile with DeDe but it failed, no output and no error. And I'm wondering is it possible to find language used in creating exe by trying different decompilers written specifically for a programming language? Or can they fail for some other reason? 回答1: In many cases it is possible to identify the compiler used to compile the code, and from that, the original language. Most language

Is it possible to know in what language an exe file is written?

帅比萌擦擦* 提交于 2020-03-12 17:40:54
问题 I have an exe file and I decompiled it with Ida. I was told the program coded in Delphi, so I tried to decompile with DeDe but it failed, no output and no error. And I'm wondering is it possible to find language used in creating exe by trying different decompilers written specifically for a programming language? Or can they fail for some other reason? 回答1: In many cases it is possible to identify the compiler used to compile the code, and from that, the original language. Most language

Can somebody walk me through what this question is trying to ask of me?

◇◆丶佛笑我妖孽 提交于 2020-02-25 16:58:00
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that