Skip to main content

Questions tagged [low-level]

Questions concerning low-level aspects of a system: programming close to the underlying details and hardware.

Filter by
Sorted by
Tagged with
1 vote
3 answers
244 views

What is the standard for heap allocators in bare metal programs?

What is the standard for heap allocation systems in bare metal programs? If there is no standard, what is the most popular one? Is it a free list? If so, are there heuristics that use a hash table of ...
nicholasbelotserkovskiy's user avatar
1 vote
1 answer
486 views

Tagged pointers vs. fat pointers

I'm writing my own dynamic programming language. So far I've been using a tagged union for all values. Since this boxes primitive types needlessly, I've begun researching tagged pointers which seem to ...
Matheus Moreira's user avatar
3 votes
1 answer
417 views

Is C usually a last resort?

I've been learning C recently. I've completed a number of coding challenges on websites like codewars in C, and I always find myself wishing I had something like Python's flexible data structures. In ...
Connor's user avatar
  • 159
0 votes
2 answers
678 views

Payment Processor using polymorphism?

I am writing a payment Processor class, then will take different payment objects in input and talks to external services to process payment.My class is designed using polymorphism as follow: public ...
user124's user avatar
  • 111
1 vote
4 answers
845 views

Using Enum to represent VehicleType in cab Booking system

I am working on low level design of cab booking type of system and feeling stuck at modelling Vehicle in Booking class.I came up with following design. Class Vehicle { } ...
stkUser's user avatar
  • 81
0 votes
2 answers
780 views

Object Oriented Design for chess

Recently I came across some article on Chess OOPS design.Following is some snippet from it: public class Chess { ChessBoard chessBoard; Player[] player; Player currentPlayer; List<...
rahul sharma's user avatar
2 votes
3 answers
565 views

Enums or Multiple Inherited Classes

I am reading about OOD and came across Parking lot design problem.Parking lot has parking floors which has parking spots.The parking spot class looks as follow: public enum ParkingSpotType { ...
rahul sharma's user avatar
-1 votes
1 answer
348 views

Do other languages have variables shared between threads?

I guess it would be too complex for Node.js / JavaScript to leverage, but I've been working with clusters in node to break big tasks down so all cores can work at once but the inter-process messaging ...
J.Todd's user avatar
  • 3,823
5 votes
1 answer
674 views

How exactly are drivers developed, distributed, & utilized?

If operating systems use 'drivers' to communicate with external devices, does that then mean that OS's (like windows, linux, & osx) have to come prepackaged with drivers for every single external ...
Stavsen's user avatar
  • 81
1 vote
4 answers
883 views

Why do many programming languages and applications use integer instead of floating point to represent time?

In my experience, the value of time mostly is represented by integer number, by programming languages (C/Java/Golang/Javascript(*)...), and by databases (MySQL, Postgres...), exceptions maybe some GUI/...
Yoshi's user avatar
  • 767
17 votes
5 answers
2k views

How to comprehend abstraction in code?

When looking at a new codebase I like to start from a bottom-up approach. Where I comprehend one file and then move up to the next abstraction. But often times I find myself forgetting what the ...
John DeBord's user avatar
7 votes
3 answers
2k views

How can arithmetic, like a bit shift, avoid branching?

I'm learning to program the Game Boy Advanced (an old Nintendo console.) I was reading one of the best tutorials about it and it said this about how branching can be done with arithmetic. [To ...
user avatar
60 votes
6 answers
40k views

Why do many functions that return structures in C, actually return pointers to structures?

What is the advantage of returning a pointer to a structure as opposed to returning the whole structure in the return statement of the function? I am talking about functions like fopen and other low ...
yoyo_fun's user avatar
  • 2,297
83 votes
7 answers
17k views

Why are bit masks called "masks" and what purpose do they serve?

Why are "bit masks" called like this? I know that they are mainly used for bitwise operations and the usage of bit masks is more efficient than the usage of separate variables. However my question ...
yoyo_fun's user avatar
  • 2,297
12 votes
3 answers
2k views

Why do compilers typically only generate executables for the platform they are installed on?

I'm a C++ developer and in an attempt to better understand cross-platform development, I'm trying to get a better understanding of some implementation details of compilers and how exactly they create ...
Jason's user avatar
  • 469
0 votes
2 answers
246 views

Where to start when creating a programming language? [closed]

I'm actually a programmer on a few languages, but I realized I really didn't know much how the computer works on a deeper level. So I thought a good idea to discover and learn how does it work was to ...
user avatar
5 votes
1 answer
4k views

Is OpenGL just badly designed?

I have been using OpenGL and OpenGL ES for a long time, and I know them pretty well. They're also really, really annoying to use, and I haven't really seen this discussed anywhere. Here are some ...
nukeop's user avatar
  • 99
4 votes
4 answers
4k views

Learning languages: high-level first, or low-level first? [closed]

Whenever I learn about a high-level language I want to learn about, part of me says, "I should probably learn the lower-level language it's built upon to really master it". For example, Ruby => ...
ivan's user avatar
  • 319
11 votes
7 answers
929 views

What principles are learned from C that can't be learned in higher level languages? [closed]

I believe C is a good language to learn the principles behind programming. What do you stand to learn in lower level languages that are "magicked" away from high level ones, such as Ruby?
Andrew's user avatar
  • 231
4 votes
5 answers
641 views

How are mixed, sizeless lists implemented in higher level languages?

Most higher level (or scripting) languages out there have data structures that can hold different types of data (like numbers, strings and even functions) in the same structure, and you can also add ...
user6245072's user avatar
1 vote
4 answers
3k views

Why use a higher level language? [closed]

A question that gets asked a lot is "Why use low level languages if you can code in high level languages more easily (and often tersely)?". I think the answers are fairly straight forward here, being ...
Daniel Porteous's user avatar
9 votes
5 answers
10k views

What does it mean to declare a volatile variable?

Many low level programs use the volatile keyword for types for memory mapping and such, however I'm sort of confused as to what it REALLY does in the background. In other words, what does it mean ...
Vikaton's user avatar
  • 255
57 votes
4 answers
7k views

Development process used for the code on Apollo 11 missions?

The Apollo missions had technology no more complicated than a pocket calculator. From link here, there's an information about Apollo Guidance Computer (AGC) The on-board Apollo Guidance Computer (...
Josip Ivic's user avatar
  • 1,667
4 votes
1 answer
55k views

Is C programming language low level or high level? [duplicate]

What do you think, is C programming language low or high level? There are some information, in one is said that C is low level, and another C is high level? When I read book of Dennis Ritchie and ...
Maxam's user avatar
  • 163
8 votes
4 answers
5k views

What are the key differences between low-level C development and higher level OOP development? [duplicate]

I have been using high-level OOP language (like C# and/or Java) for quite some time. I know patterns like the gang of four, can read and write code reasonably well and am considered a senior by his ...
Max Yankov's user avatar
2 votes
1 answer
144 views

Does grouping threads by task improve performance?

This is kind of a lazy question on my part, since I gave up after trying only a few google terms. But when I read about multi-threaded performance, I read about context switching being bad for ...
Bwmat's user avatar
  • 788
5 votes
6 answers
8k views

What are memory addresses? [closed]

I have more or less 0 knowledge in low-level topics, so forgive my possible ignorance. I know that in languages such as C, pointers hold 'memory addresses', i.e. strings (or binary data?) written in ...
Aviv Cohn's user avatar
  • 21.5k
12 votes
4 answers
3k views

Is there any danger in writing raw bytes to a file? [closed]

I'm working through a problem in Programming Pearls -- specifically, the implementation of a program which sorts a file containing, at most, 10,000,000 integers (Column 1, Problem 3). Since the book ...
Drake Sobania's user avatar
1 vote
1 answer
197 views

Is my 'variable-storing area' basically a 'heap'?

I'm planning to implement a simple VM/interpreter kind of thing for a simple language I'm making. The compiler of the language emits mostly stack-oriented instructions to be executed by the VM. The ...
Aviv Cohn's user avatar
  • 21.5k
0 votes
3 answers
2k views

How does a stack VM manage with only one stack?

Lately I've been asking a lot of questions here about VMs. Here's another one: I understand that often stack based VMs use only one stack - the call stack - for everything. E.g. it is also used for ...
Aviv Cohn's user avatar
  • 21.5k
6 votes
3 answers
2k views

What would the register-machine bytecode for this code look like?

I hope this kind of question isn't off-topic on this site. I'm finally getting the hang of what a stack based machine is, and how to compile code for it. For example, the following code: 2 * 5 + 1 ...
Aviv Cohn's user avatar
  • 21.5k
3 votes
2 answers
486 views

Do VMs use one stack for everything? [duplicate]

Most VMs have a "call stack" to keep track of where to return from each function that was called. This is often simply regarded as "the stack". However often a stack is needed for operations that ...
Aviv Cohn's user avatar
  • 21.5k
6 votes
1 answer
3k views

How do VMs implement function calling?

I'm reading a compiler textbook that compiles to some form of assembly. Since I don't know this assembly language I decided to invent my own simple "assembly language" and implement a basic "virtual ...
Aviv Cohn's user avatar
  • 21.5k
25 votes
3 answers
18k views

Why do executables depend on the OS but not on the CPU?

If I write a C program and compile it to an .exe file, the .exe file contains raw machine instructions to the CPU. (I think). If so, how is it possible for me to run the compiled file on any computer ...
Aviv Cohn's user avatar
  • 21.5k
-1 votes
2 answers
254 views

What interface does python use to implement sockets?

When I programmed in python, I believe I interfaced with the transport layer using sockets. If python was programmed by humans, they must have used an interface that was "lower" than sockets, to ...
user2738698's user avatar
41 votes
5 answers
30k views

What is the absolute minimum set of instructions required to build a Turing complete processor

I have a general idea of how the processor handles instructions but spend my time working in mostly high level languages. Maybe somebody who works closer to the iron can provide some valuable insight. ...
Evan Plaice's user avatar
  • 5,795
-1 votes
2 answers
973 views

Difference between a pointer and a reference? [duplicate]

In Java and other high-level languages, a reference leads to an object. In C++, as far as I know, a pointer can also lead to an object. So what's the difference between a reference leading to an ...
user3150201's user avatar
  • 1,207
2 votes
1 answer
948 views

Next power of 2 for a number (in search for better "bit-twiddling" way)

I just wonder if there exists better (i.e. faster?) way to get the next power of 2 for a given number than the following one (maybe some better sort of "bit-twiddling" hack is possible?) ... static ...
mjf's user avatar
  • 151
1 vote
3 answers
3k views

Question about moving to embedded systems [closed]

I currently work as a .net developer and have coming up to 3 years experience in the industry as well as a degree in computer science specifically software engineering (I know that means nothing but ...
Ankou's user avatar
  • 23
43 votes
10 answers
16k views

Why not have a High Level Language based OS? Are Low Level Languages more efficient?

Without being presumptuous, I would like you to consider the possibility of this. Most OS today are based on pretty low level languages (mainly C/C++) Even the new ones such as Android uses JNI & ...
rtindru's user avatar
  • 549
17 votes
4 answers
8k views

Why do some programmers categorize C, Python, C++ differently? - regarding level

I am taking an introductory course on python and the instructor says that python is a high level language and C and C++ are low level languages. It's just confusing. I thought that C, C++, Python, ...
atheistlearner's user avatar
3 votes
1 answer
413 views

Books/sources on inner workings of JavaScript [duplicate]

When I started studying C++ a couple of years ago, a lot of the books and texts I read did a very thorough job of explaining, how the code written would translate into concrete operations in the ...
acrmuui's user avatar
  • 149
10 votes
4 answers
5k views

Memory management for fast message passing between threads in C++

Suppose there are two threads, which communicate by asynchronously sending data messages to each other. Each thread has some kind of message queue. My question is very low level: What can be expected ...
Philipp Claßen's user avatar
11 votes
3 answers
26k views

How would one go about reading memory from a process? Is it different by OS?

As an experienced web-developer, but a novice "low level" programmer, this stuff is sort of voodoo to me still. I'm curious about how one would even begin to go about finding a memory block, and then ...
Eva's user avatar
  • 547
10 votes
4 answers
9k views

A good interpreted language for a small embedded project [closed]

I have an mbed microcontroller which has a small ARM Cortex M3 on it. Basically, my effective resources for the project are ~25 KB of RAM and ~400 KB of Flash. For I/O I'll have a PS/2 ...
Earlz's user avatar
  • 23k
75 votes
11 answers
11k views

Why are cryptic short identifiers still so common in low-level programming?

There used to be very good reasons for keeping instruction / register names short. Those reasons no longer apply, but short cryptic names are still very common in low-level programming. Why is this? ...
Roman Starkov's user avatar
15 votes
8 answers
7k views

Reverse engineering: what is it really good for? [closed]

I have some innocent/beginner questions: What is reverse engineering good for? As a programmer, should I learn the art of reverse engineering? What are the benefits to a programmer who is ...
socksocket's user avatar
2 votes
1 answer
2k views

How to start embedded development for developing a handheld game console? [closed]

I work as a iPhone app developer now, so I know a bit of c, c++ and objective c. Also have fiddled with Java and many other. All of them have been just high level application/games development. My ...
Rajavanya Subramaniyan's user avatar
1 vote
5 answers
1k views

What kinds of low level knowledge matter? [closed]

I realize that this question is similar to Low level programming - what's in it for me, but the answers didn't really address my question well. Part from just an understanding, how exactly does your ...
Peter Smith's user avatar
  • 2,577
17 votes
7 answers
68k views

What Are Some Advantages/Disadvantages of Using C over Assembly? [closed]

I'm currently studying engineering in Telecommunications and Electronics and we have migrated from assembler to C in microprocessor programming. I have doubts that this is a good idea. What are some ...
Daniel Conde Marin's user avatar