zackradisic / aussieplusplus

Programming language from down under
aussieplusplus.vercel.app
610 stars 15 forks source link

Io #12

Open sdm900 opened 2 years ago

sdm900 commented 2 years ago

Crack a tinne (...) returns an open tinnie/file Swig tinnie to read a line Sip tinnie to get a character Wif tinnie to find out where the file Pointer is at

sdm900 commented 2 years ago

Chuck tinnie to close Skull tinnie to read to eof

bbrk24 commented 2 years ago

Somewhat relatedly, GIMME always prints a newline after whatever you give it. Is there any way to write without a trailing newline?

zackradisic commented 2 years ago

@sdm900 love the analogy of file handle <-> beer 😂, what about writing to a file? That would answer @bbrk24's question, then we can give an ability to write to stdout without making a new line.

Right now the only thing I can think of that aligns with the analogy of beer is TOP UP.

Also should we make this a part of the syntax or a built-in?

Part of the syntax:

I RECKON stdout = CRACK A TINNIE "stdout";
TOP UP stdout "message without a new line"

Standard library:

IMPOHT ME FUNC TopUp
TopUp(stdout, "message without a new line")
sdm900 commented 2 years ago

Shotgun tinnie for non blocking io

sdm900 commented 2 years ago

Funnel tinnie for buffered io

sdm900 commented 2 years ago

Carton is the file system.

Gander carton for statfs Gander tinnie for stat

sdm900 commented 2 years ago

Somewhere in this io stuff there has to be a Bob Hawke reference.

roblogic commented 2 years ago

Need to use BOOFHEAD or DRONGO for something as well