Live data from Hacker News

10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

10print.org

31–40 of 62 posts

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#31
post #30

Is there anyone here who still writes code in BASIC? If so which interpreter/compiler do you use?

I do so professionally. Our 35+ year old application is written in what was once VAX BASIC running on OpenVMS (Now on Integrity and called HP BASIC).

Wow! Can you share your story more? What does your application do? Why did you choose BASIC 35 years ago? Did the question about rewriting it another language come up anytime? How did such discussions go? Do you enjoy writing BASIC code?

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#32
post #30

Is there anyone here who still writes code in BASIC? If so which interpreter/compiler do you use?

I do so professionally. Our 35+ year old application is written in what was once VAX BASIC running on OpenVMS (Now on Integrity and called HP BASIC).

I tried it in HP BASIC. (Played with a few terminal emulator settings and this is the best I got) https://imgur.com/a/N6QSkXB

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#33
post #23
post #11

You can recreate the magic in bash: while true; do printf "\u$((2571 + ($RANDOM & 1)))"; done

Doesn't quite work on my mac :/

Got it! This works on macOS. It encodes the same characters in hex UTF-8:

   while true; do printf "\xe2\x95\xb$((1 + ($RANDOM & 1)))"; done

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#34
post #29
post #17

This Maze Does Not Exist: an AI-powered labyrinth generator

I snickered at first but couldn't stop imagining ways to implement this. Thanks for giving me something to kickstart my brain today.

I'd start with https://github.com/mxgmn/WaveFunctionCollapse

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#35
post #30

Earlier quoted context omitted.

I do so professionally. Our 35+ year old application is written in what was once VAX BASIC running on OpenVMS (Now on Integrity and called HP BASIC).

Wow! Can you share your story more? What does your application do? Why did you choose BASIC 35 years ago? Did the question about rewriting it another language come up anytime? How did such discussions go? Do you enjoy writing BASIC code?

I've been with the company 20 years so wasn't involved in the original decision. I believe the company started out on PDP's before moving to MicroVAX (and later Alpha and Integrity). BASIC will likely have been the best fit at the time. It is business software for the Agri industry, originally a terminal text entry system. Now we also have a web front end (running on Windows IIS, communicating to VMS/BASIC via Apache Tomcat/WSIT webservices). We did try converting to VB6 back when it was a thing, but then .NET happened so we abandoned it as conversion to VB.NET wasn't so straight forward. A rewrite in C# was briefly considered before finally going for the web front end/web services option to avoid rewriting the BASIC business/data layer. Sadly the application will go end of life in a couple of years, as we're now part of a larger corporation who have similar applications. Ours lost out due to the OpenVMS layer being a hard sell to new customers. I've never really thought about when I enjoy it! It's mostly a data entry / reporting application, so generally not very exciting :)

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#37
It bothers me way more than it should that this line of code has become known as "10print". Like, 95% of BASIC oneliners out there start with "10 PRINT". It's like calling a McDonald's Super Size Big Tasty Meal With Diet Coke And A Side Salad a "Mac".

It should've been called 205.5+RND or something. Grmbl.

Re: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012)

#38
post #25

Love it! Brings up so much nostalgia from the days of programming on my old TRS-80. But is it really a maze? Once you start, you don't seem to get much choice of path...

Of course not, there is no logic behind it, save for printing "walls" that line up with each other. It's a (neat) graphic trick.

My maze generator at http://tromp.github.io/pearls.html#maze produces arbitrarily long proper mazes on the fly. After compiling and running, enter -1 as the requested height.
Post reply on HN