New answers tagged

0

For non embedded system but something I was doing in C# was SCADA system. There were many events linked to what was happening in the warehouse when load was unloaded part of system generated event and other part was writing new state to the database. We of course had some GUI client but it was just to show state of the database which was reflecting state of ...


-2

I can tell you that by personal experience, because at our school, we had to create our own language, own compiler and own interpreter. I suppose you know, what the language and compiler is, so I will skip that. The compiler will create some structure from source code, that is executable by interpreter. It is up to you, how the structure looks like and how ...


4

Your question is too broad to be answered in a few paragraphs. And actually interpreters do not mean much: the BASIC interpreter of the ZX80 (in 1980) is really different from today's Guile, Lua, Ruby, or Python interpreters on most Linux systems. Knowing several programming languages, e.g. by reading Scott's Programming Language Pragmatics, is worthwhile. ...


2

An interpreter is feed a program represented as a data structure, then it steps through each of the tasks in the data structure and performs the tasks as it goes. The data structure can be a abstract syntax tree of the code you wish to interpret, or it can even be a byte-code if you wish. Interpreters may also hold on to a table (hash map) of variable names ...


0

Joachim Sauer already did a good job answering you question but only hinted at something I regard as important. Since Lambdas are no classes they are also not compiled as such. All anonymous inner classes result in the creation of a .class file which in turn has to be loaded by the ClassLoader. So using Lambdas instead does not only make your code more ...


4

A language based around how it constrains the developer is dependent on the assumption that the language developer understands the needs of each programmer better than the programmer understands those needs themselves. There are cases where this is actually valid. For example, the constraints on multithreaded programming requiring synchronization using ...


7

I've been spending some time these last few weeks attempting to learn the J computer language. In J, pretty much everything is an operator, so you only get "monads" (functions that have only one argument) and "dyads" (functions with exactly two arguments). If you need to more arguments, you have to either provide them in an array, or provide them in "boxes"...


1

You will need two things: Closure Composite data type I will add a mathematical example to explain the answer written by Jörg W Mittag. Consider the Gaussian function. A Gaussian function has two parameters for its shape, namely the mean (center position of the curve) and the variance (related to the pulse width of the curve). In addition to the two ...


38

There are lots of languages which already work this way, e.g. Haskell. In Haskell, every function takes exactly one argument and returns exactly one value. It is always possible to replace a function that takes n arguments with a function that takes n-1 arguments and returns a function that takes the ultimate argument. Applying this recursively, it is ...


37

Robert C. Martin in his book "Clean Code" recommends heavily the use of functions with 0, 1 or 2 parameters at maximum, so at least there is one experienced book author who thinks code becomes cleaner by using this style (however, he is surely not the ultimative authority here, and his opinions are debatable). Where Bob Martin is IMHO correct is that ...


0

The headline asks about the CLR, the Common Language Runtime. The question text itself is about the CIL, The Common Intermediate Language. They are different things! CLR. Yes, any .net developer needs a good understanding of the CLR. CIL. No, a typical developer does not need to know CIL in any depth. If you need to write a compiler or perform some low ...


5

Embedded systems are almost always inherently event-driven, even if they are not programmed explicitly as such. These events come from things like hardware interrupts, button presses, period analog-to-digital readings, timer expirations, etc. Low-power embedded systems are even more likely to be event-driven; they spend most of their time sleeping (CPU ...


0

In embedded systems, events occur during interrupts. There are many sources of interrupts, from timers to I/O. Also, RTOS can have events too. One example is waiting for a message from another task.


9

Events are also heavily used in network programming (e.g. Nginx) to avoid expensive busy-wait loops and instead provide a clean interface to know exactly when a certain operation is available(I/O, urgent data etc). This is also a solution to the C10k problem. The basic idea is to provide the OS a set of sockets (i.e. network connections) to monitor for ...


28

Event-based programming is actually also used for highly performant server programming. At a typical server workload, much of the time processing a result actually comes from I/O. For example, pulling data off a (7200 RPM) hard disk drive can take up to 8.3 ms. For a modern GHz processor, that would equate to ~1 million clock cycles. If a CPU were ...


101

Nope. They're really handy for implementing Observers and making sure that classes are closed to modification. Let's say we have a method that registers new users. public void Register(user) { db.Save(user); } Then someone decides that an email should be sent. We could do this: public void Register(user) { db.Save(user); emailClient.Send(...


3

Event Messages Gregor Hohpe. Event Driven Architectures Gregor Hohpe. SEDA architecture, Welsh, Culler, Brewer. how do you handle in normal backend programming when something happens do this other thing? Finite State Machine is one common approach Given(State.A) When(Event.B) Then(State.C) .and(Consequences.D)


52

Nope. A classic example of events being used in non-GUI logic are database triggers. Triggers are code that gets executed when a given event happen (INSERT,DELETE, etc). Seems like an event to me. This is the Wikipedia definition of event: In computing, an event is an action or occurrence recognized by software that may be handled by the software. ...


2

I know more than 30 programming languages and yet I agree with your prof. It's better to invest your time in the algorithms and approaches than in the languages per se. If Azure seems shallow to you, invest in something else. Dynamic programming, databases, machine learning, high availability, etc etc. For resume it's more important to show that you're ...


1

Many years ago I read about this topic in a JavaScript book, I cannot remember which one it is. But I can still remember the discussion about whether JavaScript should be considered as an OOP language, the author's answer is yes, coz it meets the four criteria for a language to be object oriented: Encapsulation, which allows you to combine data and ...


4

Jeff Bezanson's PhD thesis on Julia, "Abstraction in Technical Computing" discusses this question at length, reaching only partial answers. Here are key quotes. We propose that technical users crave the flexibility to pick notation for their problems, and language design — the highest level of abstraction — is where you go when you need this level of ...


5

Steve Yegge wrote a great blog post that, somewhat indirectly, addresses this. Big point #1: compilers encompass pretty much every aspect of computer science. They're an upper-level course because you need to know all the other things you learn in the computer science curriculum just to get started. Data structures, searching and sorting, asymptotic ...


0

The real answer is Money. There's not enough perceived benefit of a high level language OS to justify spending the resources to build one and then push it into the mainstream. There's massive cost involved in building a new driver for each piece of hardware it needs to support, for example. There are various OSes written in high level languages, with the ...


0

A big thing to consider is that once a language is "settled" a lot of it comes set in stone. A lot of time and resources are spent making software in that language. And in a lot of cases, once software is done, it's done and only small maintenance remains to be done. You can't sell: "hey you need to change all the software you made because we introduced ...


5

Generally when someone refers to a programming language as scientific it is either because there are useful libraries for use in that field or the syntax of the language makes it easy to write the required algorithms. However, just because one field considers a particular language as a scientific does not mean that a different field considers it the same. ...


2

Money. Cheaper developers, faster development speeds, and less bugs equal more money. Portability. Many high level languages allow you to target different platforms out of the box. Low level languages like C require significant efforts run on multiple platforms. Training. You can train a developer in Python in a day, while something like C++ takes ...


24

"Besides the fact that a higher level language is easier to code in and therefore less error prone" I really think this is a good enough reason all by itself. If you have no compelling reason to work in a low level of abstraction (such as performance, knowledge in the team, etc), then there is no reason to do it. If all you want is a coffee, then you want ...


1

Higher lever languages are by definition easier to learn, they take away a lot of the complexities of lower level programming such as memory management. Besides that since the explosion of hardware power it is much cheaper to get a faster processor or more RAM into a machine that paying the developer hours that'd come with a more complex programming language....


6

Are there any general-purpose programming languages with classes, objects, methods, interfaces, and so on, which disallow class-based inheritance? This reads very much like a description of VBA - Visual Basic for Applications, embedded in Microsoft Office and other VBA-enabled hosts (e.g. AutoCAD, Sage 300 ERP, etc.), or even VB6. The "A" of "Basic" stands ...


0

I want to focus on the strict definition of both terms Iterable is to iterate things, and get access to the element one by one. I think that the term Enumerable was originated from the turning machine. It's about the ability to list out the element one by one in a proper order. The things can be listed out one by one has to be countable, each one has a ...


0

What is it that you are trying to do? The way that you are trying to do it is possible in lexical languages, but not pascal. You can though look-up an array by name. This is sort of the opposite of what you asked, but in some ways very similar. type MonthType = (January, February, March, April, May, June, July, August, September, ...


0

As others have pointed out, the language name won't work as a key. Another thing to be careful of is that you will run into non-alphanumeric characters. Examples: C vs C++ vs C-- vs C# E, E#, F, F#, J, J#, etc. ><>, also known as Fish, is unrelated to the shell Fish


6

Not only are there such languages, there are even languages whose names do not differ at all, i.e. homonyms. (Have a look here.) This simply means that you cannot use the language name as a primary key, which makes the question moot.


4

The Wake Programming language is designed to use dependency injection. Basically, it has the equivalent of a dependency injection framework baked into the language itself. Classes define the parameters they need and provide and the compiler hooks everything up.


2

There are companies that specialise in exactly this kind of problem. They use proprietary code to decompile native code into a high level language, then apply human expertise to make it useful (e.g. giving variables appropriate names). Some years ago my employer used this to migrate some native S/390 mainframe code onto Linux servers. We gave them a binary, ...


0

Write some tests that exercise as many cases as possible on the old code. Find corner cases, test wrong input, and test correct input. Pin down what is correct output given various cases, and then try to write an implementation that satisfies the same tests. I wouldn't go down the reverse engineering route. It's incredibly complicated to reverse machine ...


2

Write a simple wrapper around the program, capturing its output. It is not complex to do as many languages (Java, C++, Python, .NET, for instance) have means for this. Parse the output and generate another, in the desired form. The user will call your new program. The old executable will stay next to it, or even can be automatically extracted from resource, ...


1

F# It's a functional language, statically/strongly typed but with type inference. You can use OO-style if you wish. Has a REPL for quick prototyping/scripting, type providers to access all kinds of data, pattern matching, easy async, parallel, and agent based computations.


1

First of all I thank all the members who answered this question, especially Robert Harvey whose answer seems very close to mine. I have been researching on concurrency concepts for two years and according to my findings, no language provide guarantee that its concurrency constructs are composable. A perfectly good running code using immutable data ...


0

Node.js supports C++ addons. With the attention REST and microservices have been getting lately Node.js and JavaScript would be great addition to the language arsenal of a C++ programmer (if you don't like dynamic languages, there's a superset of JavaScript offering type checking called TypeScript. Although C++ is not used very often in combination with ...


69

Ask the original programmer, if possible. A few weeks ago i've been contacted by a firm I used to work for 10 years ago with the very same question about an mdb file developed mid 90s.


0

Try to reverse engineer the exe. Only for the purpose of finding the computation logic or at-least to get a fair hint of what it actually does and if your reverse engineering can get you to that point, you can write new application based on that computation logic. Apart from that, I don't see other wayout. Easier said than done, reverse engineer an exe ...


111

In addition to the already given answers by Doc Brown and Telastyn, I would like to suggest an alternative approach (under the assumption it's mission critical). If you do not know the computations it performs and the calculations are (somewhat) mission-critical: Deduce the original logic in the .exe file by any means necessary. Decode it using a decompiler/...


228

Reverse engineering can become very hard, even more if you do not just want to understand the program's logic, but change and recompile it. So first thing I would try is to look for a different solution. I want to modify the columns, spacing format and add VBA logic etc. on the Excel spreadsheet If that is the only thing you want, and the calculation ...


52

Any suggestions what options I have to deal with such kind of problems? If all you're looking to do is modify the output, then why not simply use composition? Instead of modifying the black box you can't easily access, you create a new program that takes the Excel output, and does your formatting/column changes too. Then you could make a new exe/script ...



Top 50 recent answers are included