progfix

u/progfix



r/nspire•

You can substitute a variable like this:

a+b+c|a=1                             b+c+1

I found out you can subsitute more than one variable by using parenthesis:

(a+b+c|a=1)b=2                        c+3  

Putting parenthesis around everything is annoying if you have more variables. Is there another way to substitute multiple variables?

91

r/gamedev•

I am searching for a video I saw a couple of years ago. I think it was from a gamedev conference. It was about how to add little things to a game to make it awesome.

The talker had a very simple breakout clone and added more and more effects like camera shake, particles and turned it into an awesome version.

I remember it being referenced occasionally on reddit, so I think it is a quite famous talk.

03




I am making a statically typed, general purpose hobby programming language and I want the compiler to report an error whenever something looks like it could be a mistake made by the programmer. I also want the programmer to disable those error messages with simple keywords. Those keywords should mark code as "I know this could be an error, but I can assure it is safe to execute or I want that behaviour."

Another usage of keywords would be to prevent the unnecessary call of overloaded copy-operators (which my language supports) or mechanism like array boundary checks.

For example:

// Declares x as non-zero, otherwise we would get a compiler error
x : int;
a := 100 / _nonze
78

I made a programming language that compiles to a kind of bytecode (think lua opcode for example). I run the code with a virtual machine that interprets the bytecode. A simple function call looks like this:

PushObjectPointer <local address>   // pushes 1. argument onto an operand stack
PushObjectPointer <local address>   // pushes 2. argument
Call <offset of function in the bytecode>  // pops arguments and runs code

Now I would like to call a shared library function in a similar manner:

PushObjectPointer <local address>   // pushes 1. argument
PushObjectPointer <local address>   // pushes 2. argument
SharedLibFuncCall <function
34

You've reached the end of this feed.