Questions tagged [low-level]
Questions concerning low-level aspects of a system: programming close to the underlying details and hardware.
75 questions
3 votes
3 answers
279 views
Best Practices for loading primitive data types from raw bytes
On occasion, it is very useful to reinterpret raw bytes structured data - ints, floats, etc. Eamples include reading from a mmapped file, reading some sort of in-memory data frame, or other tasks that ...
1 vote
1 answer
723 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 ...
0 votes
2 answers
786 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 ...
0 votes
2 answers
991 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<...
-1 votes
1 answer
366 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 ...
1 vote
4 answers
977 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/...
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 ...
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 ...