News for hackers. Stuff that matters.
Re:What can be learned from studying long gone development p... by thaumasiotes on Sunday August 15, 2021 @10:45PM (#28194500)
Aesthetically, it bothers me that you compute x by calling remdr two extra times, as opposed to computing it as the sum of y and z... or the bitwise OR of y and z...

What's the difference between :(label) / :s(label) / :f(label) / :s(label1)f(label2) ?

Re:What can be learned from studying long gone development p... by masklinn on Monday August 16, 2021 @06:28AM (#28196601)
> What's the difference between :(label) / :s(label) / :f(label) / :s(label1)f(label2) ?

Looks like it’s unconditional, conditional (success), and conditional (failure) jumps.

:s(A)f(B) is how you tell it to jump to A on success and B on failure.

Re:What can be learned from studying long gone development p... by 1vuio0pswjnm7 on Monday August 16, 2021 @09:45PM (#28205165)
There is also an "indirect goto" where B is a variable to be appended to string A to compute a label that is defined somewhere else in the program.

   :($('A' B))
Re:What can be learned from studying long gone development p... by 1vuio0pswjnm7 on Sunday August 15, 2021 @11:11PM (#28194617)

   s and f are different conditions
   s=success
   f=failure
   default is unconditional
Is bitwise OR a built-in or would it require writing a separate function.
Re:What can be learned from studying long gone development p... by thaumasiotes on Monday August 16, 2021 @02:21AM (#28195438)
Based on the documentation, there do not appear to be any bitwise operations available in SNOBOL.

It looks like computing x as remdr(3) + remdr(5) is a pure mistake. You only care about the case where remdr(15) is 0, and it's true that remdr(3) + remdr(5) is 0 if and only if remdr(15) is 0. But you're calling remdr twice where you should only be calling it once.

(Or, really, you can keep the weird calculation of remdr(3) + remdr(5), which is conceptually incorrect but correct in every case that matters, but stop computing it with two extra calls to remdr. You're already calculating those values and storing them in the variables y and z; compute x as y + z, which must be much faster than calling remdr two additional times.)

As a side note, why do you want to use "a language for non-numeric computation" for this purely numeric problem?

Re:What can be learned from studying long gone development p... by 1vuio0pswjnm7 on Monday August 16, 2021 @02:56AM (#28195607)
I think the term "non-numeric" probably refers to another popular language of the era from which SNOBOL comes called FORTRAN. The purpose of fizzbuzz as I understand it is to test a person's aptitude for programming, but not necessarily a person's ability to select the "right" programming language.

If the purpose of fizbuzz is to test for programming language selection, and fizzbuzz is a "purely numeric problem", then should the proper choice be FORTRAN.