Hacker News new | ask | show | jobs
by sgtnoodle 1948 days ago
I actually suggest keeping the parentheses, and updating the system functions to also use them. That way, you can potentially more easily support nesting of compound expressions in function calls.

Re: naming for IO functions, it's really up to you. I personally try to avoid abbreviations for readability, except for incredibly common ones.

One idea:

init_pin(index, mode) get_pin(index) get_pin_mode(index) set_pin_mode(index, mode)

Or CamelCase, InitPin, GetPin, etc.

Mode is an enum with values for input, input_pullup, input_pulldown, output_low, output_high.

For getting timestamps:

milliseconds() microseconds()

For computing deltas in time between two timestamps correctly with rollover (Provided by the system in case the data type is unsigned. Returns 0 if t2 > t1):

time_left(t1, t2)

1 comments

I really need some help on real-time operative systems, the interface for windows is more or less ready, and the code should work on win out of the box, it should be rather simple to create a console program that can:

BIPLAN compile program.txt (compiles in program.bp/bip/bipl)

BIPLAN run program.bp/bip/bipl

would be helpful and fun to have it running on windows or linux.