Better HN
topnewbestaskshowjobs
Log inSign up

srivastm

26 karma · joined Aug 24, 2020 (6y ago) · 13 submissions

Mayur Srivastava - Programmer
Submissions

comment 6y ago · link · parent

I worked on gwbasic in early 90s and I turned lack of Docs/resources to my advantage. I used to spend time thinking about different ways to solve a problem. Basic does teach some bad habits, but it also teaches basic control structures, debugging skills and problem solving. Later, when I switched to C/Java/C++, the old programming habits changed quickly. In modern times, I would recommend Python as a beginner’s language.

comment 6y ago · link · parent

I agree. I had access to no other language in early 90s. I made tons of graphics games in gwbasic back then. I recently wrote a game in PuffinBASIC as well to relive old days: https://github.com/mayuropensource/PuffinBASIC/blob/master/s...

In modern languages, python is an excellent beginner’s language.

comment 6y ago · link · parent

Line numbers are optional in PuffinBASIC now, introduced labels, e.g. https://github.com/mayuropensource/PuffinBASIC/blob/master/s...

comment 6y ago · link · parent

For teaching in present time, I would start with Python, and may be for CS oriented students go to functional languages, e.g. scheme.

comment 6y ago · link · parent

LOGO is very easy to implement. My son loves secret coders books and they are full of turtle graphics code. I myself never used logo. If I get more spare time, I will go for it.

comment 6y ago · link · parent

After writing the PuffinBASIC interpreter and a game, here are my initial comments on the BASIC language: 1. Drop line numbers and use Labels 2. Needs multi-line IF-THEN 3. Needs switch 4. Needs named subroutines with local scope, much like functions 5. Needs references (not pointers) 6. Drop variable suffix

comment 6y ago · link · parent

BASIC was my first programming language. Back in 90s I made tons on graphics game in it. It is also very close to assembly and can be made really fast. As a programming language, I agree it is not a good choice anymore. I was learning antlr4 and wanted to take it all they way to a working programming language. BASIC is an easy language to implement and I am familiar with it. Hence the choice. For my second language implementation, I would probably pick a better language. My goal is to make it feature complete: add sound support, more functions, array processing, may be add a few modern features like references, and then call it done. Then I want to focus on improving the IR and runtime machine.

comment 6y ago · link · parent

I learned gwbasic as my first programming language in 90s. After that I switched to C. So, I never made the transition to qbasic. The main reasons for this choice are love and familiarity. Now, that I look back at the language, I would clearly make a lots of changes to it. May be, the next language I implement will be much more modern!

comment 6y ago · link · parent

I wasn’t aware if this. I will do. Thanks!

comment 6y ago · link · parent

:)

comment 6y ago · link · parent

Btw, I totally agree with you. I should have said a minor improvement to gwbasic data types. Your comments made me also think about adding a few data types, specially decimal, dict and set.

comment 6y ago · link · parent

I am comparing with gwbasic types which was limited to in16, float, double and string. The only type from gwbasic I did not implement is decimal. This is an active project and I plan to add dict/set types soon. I may also add decimal type. Stay tuned. I don’t plan to add complex types in PuffinBASIC. If I do another language, then I might add these.

13.

Show HN: PuffinBASIC – A cross-platform modern BASIC interpreter written in Java

36 points · by srivastm · 6y ago · 28 comments