[HN Gopher] BANCStar (2000)
___________________________________________________________________
BANCStar (2000)
Author : jasonhansel
Score : 172 points
Date : 2021-07-18 04:48 UTC (18 hours ago)
(HTM) web link (web.archive.org)
(TXT) w3m dump (web.archive.org)
| nightfly wrote:
| So they created a virtual machine and made the worst assembly
| language ever
| Closi wrote:
| More like, one company created a drag-and-drop editor for their
| enterprise software, and the customer decided to edit the byte
| code it output.
|
| It's a little unfair that people are referring to this as a
| _bad programming language_ where it's actually effectively a
| save-file that has been reverse engineered to edit it beyond
| its original scope and functionality.
|
| Compiled java bytecode is also not the best programming
| language, albeit admittedly much better than this!
| taneq wrote:
| Agreed, this is like editing .swf files with a hex editor and
| calling it "the worst programming language".
| laumars wrote:
| I would have agreed with you if it weren't for the other
| limitations, like the hard limit of 2000 variables and
| constants and lack of scoping forcing larger projects to
| reuse variables in multiple unrelated places.
| mjw1007 wrote:
| The limit doesn't seem unreasonable given the intended
| purpose: very likely if someone ran into the limit using
| the "screen generator" (and was paying for support) it
| could be fixed with a simple recompile of the interpreter.
|
| Similarly I don't think there's anything wrong with
| generated code not having a notion of scope.
| laumars wrote:
| You might be right but your argument rests on an awful
| lot of assumptions that weren't detailed in the article.
|
| It's just as likely it was intended to scale the way it
| had and it was just poorly implemented from the outset.
| I've seen this happen plenty of times in the past where
| an extremely rudimentary POC is rushed into production
| and the official workaround is a scary chain of kludges.
| It was especially common in the era this BANCStar
| originates because compute time was expensive so it was
| often cheaper to code by hand and then hire typists who'd
| input your code and compile it, passing you a print out
| of any errors raised. Starting again from scratch if your
| basic premise sucked often wasn't an option. Man do I not
| miss those days.
| Closi wrote:
| Agreed - in fact I bet the original creators thought they
| were being generous allowing for 2000 variables for their
| gui editor!
|
| Vendor Engineers: "Who would possibly need more than 2000
| variables to make a few custom screens in our new drag
| and drop screen editor feature?"
|
| Customer Engineers: "Hey we can exploit this new custom
| screen editor to inject our own arbitrary code! Why have
| they only allowed for 2000 variables? Idiots!"
| masklinn wrote:
| None of these is relevant under the original concept /
| assumption of this basically being the description file for
| a UI-generated system, though.
|
| The hard limit of 2000 variables / constants is little
| different from the hard limit of <some amounts of kbytes>
| of memory you get in various systems.
| laumars wrote:
| I've developed on those systems and that's a hardware
| imposed limit due to the, then current, technology. Which
| this 2000 var limit is not.
| josephcsible wrote:
| > More like, one company created a drag-and-drop editor for
| their enterprise software, and the customer decided to edit
| the byte code it output.
|
| You make it sound like they decided to do that for fun. They
| decided to do that because the drag-and-drop editor was unfit
| for purpose.
| danmur wrote:
| BA's can write this though :). It's a spreadsheet after all.
| dmitryminkovsky wrote:
| > Everything in the system is global. New projects always started
| off with the programmer searching for a handful of working
| storage numbers that could be "borrowed" long enough to complete
| the calculation, then restored to their original values before
| the rightful owner noticed that they were gone.
| xunn0026 wrote:
| Waiting for the blog post that annotates that code and explains
| what it does.
| imglorp wrote:
| Many more details on Esolang including full (?) list of opcodes.
|
| https://esolangs.org/wiki/BANCStar
| jbverschoor wrote:
| This is as far as I got.. It seems to display some question and
| waits for a key input. Check if it's N, then it executes some dos
| command. If it was Y it seems to return from this subroutine.
| 8607,,,1 ; deactivate F7
| 11547,15475,22002,22002 ; clear pause flag # var1547 is the
| pause flag 1316,1629,1,1649 ; var1316 =
| displayPromptAndGetInput(loc: [29,16], numChars: 1, cursorLoc:
| [49,16]) 3001,1316,3,30078 ; if var1316 == 'N'
| 11528,22052,22002,22002 ; var1528 = 5
| 9301,0,1528,1528 ; ??? put to data model, prompt1:
| var1528, prompt2: var1528 31568,10001,800,107 ;
| var1568 = tableTransfer(800, 10).item ? 8560,,,1568
| ; execDOSCommand(var1568) 8550,210,, ;
| ??? Combination goto 3001,,, ; end if
| 3100,1316,3,30089 ; proceedIf var1316 == 'Y'
| 11547,15475,22002,22002 ; clear pause flag
| 3001,1316,3,30089 ; if var1316 == 'Y'
| 3001,1317,3,10000 ; and if len(var1317) == 0
| 8400,,, ; save address # for return
| 8550,700,801, ; ??? Combination goto
| 3001,,, ; end 9301,0,522,522
| ; ??? put to data model, prompt1: var522, prompt2: var522
| 3000,1284,3,10001 ; if var1284 == -1 8500,,3,
| ; goto label3 8500,,5, ; goto label5
| 1547,,1,-2301 ; ??? pauseFlag = getInput(numChars:
| -2301?)
| azalemeth wrote:
| Whilst I genuflect and doff my metaphorical hat to you, O great
| nerd, _how_ do you know this? Was this language wide-spread and
| used a lot in banking (?). Please can you tell us how you came
| to understand this arcana! What on _earth_ led to its
| longevity? Virtually any raw assembly code is easier to read
| (for me).
|
| What on earth is going on with the commas? For example, the
| line 11528,22052,22002,22002 ;
| var1528 = 5
|
| The only pert of this I can vaguely get is that the 11528
| refers to a variable #1528. It's the only variable assignment
| in the above snippet, but 22002 appears several times, twice as
| the last argument. I don't quite get why; the two lines are
| doing very different things.
|
| Enlighten us!
|
| ------- Edit -------
|
| From the Esolang wiki (https://esolangs.org/wiki/BANCStar) it
| transpires that, for the example given above, we can actually
| understand the opcode above. BANCStar is fairly similar to an
| assembly language of the form (opcode, arg1, arg2, arg3) where
| not all opcodes require arguments (leading to blank commas) and
| the numerical form of each opcode is sometimes parsed
| characterwise (and sometimes not). So, for the 'add 5' example
| that the OP correctly provides above, the "rules" seem to be:
| The most complicated type of instruction seems to be arithmetic
| instructions. Here, the first number is 10000+d, where d is the
| address of one of the 2000 variable cells ("prompts") as the
| destination operand. The other three numbers are
| of the form (10v+p) or (22000+10n+p) where p is an operation
| code, v is a variable cell in the range [1, 2000], and n is a
| constant literal integer. When a parameter is
| unneeded, it is usually set to 22002 (i.e. "add 0").
|
| In this case, I _think_ we 're literally doing the following:
| 11528, ^variable 1528 = 2205
| ^ (int)5 is the argument of the forthcoming operation
| 2, ^ ... and that operation is "+"
| 22002,22002 ^ +0, +0
|
| Malboge has a more human friendly syntax.
| jbverschoor wrote:
| Haha. I found https://esolangs.org/wiki/BANCStar
|
| But not everything is documented. I also found some GitHub
| page with more code. Maybe it's fun to create something that
| can actually parse this.
|
| According to that info, 22002 is add 0 (essentially noop).
| Not sure why all operands are required instead of leaving
| them blank. The 22052 means set to 5.
| masklinn wrote:
| > Malboge has a more human friendly syntax.
|
| Probably because Malbolge was kinda sorta expected to be
| written by humans.
|
| BANCStar "code" is really IL/bytecode, it just happened to be
| ASCII bytecode (initially anyway, according to the wiki it
| became binary with BANCStar 10).
| eurasiantiger wrote:
| So we're one plugin away from writing it in TS?
| tibbydudeza wrote:
| I would go mad.
| ctrlp wrote:
| Seems like a good candidate for a transpiler.
| zarzavat wrote:
| I've seen Integer Programming used in many optimisation problems
| but this is the first time I've seen it used to maximise job
| security.
| masklinn wrote:
| I guess the "program" makes sense as it was apparently supposed
| to be a 4GL (or is it 5GL?) where the entire thing would be
| designed through a UI:
|
| > BANCStar actually came with a "screen generator" that was
| supposed to be used to construct applications. But the 5.1c
| version of the generator was so limited that experienced
| programmers soon began to pry off the covers and modify
| directly the intermediate code that the run-time module
| actually executed.
|
| In that sense, they're basically editing the raw bytecode
| files, for something with less than great semantics but those
| semantics wouldn't really be visible / a concern if a generator
| program would be managing them.
| ashleyn wrote:
| I was wondering how on earth anything like this could've been
| developed - now it's making more sense. BANCstar probably was
| intended to be something like Visual Basic or Hypercard,
| where the bulk of the development was done using a high-level
| visual designer, but for whatever reason the suite ended up
| half-baked. Devs then get forced to use the intermediate
| language directly, and no budget is ever allocated to finish
| the product because they actually seem to be managing with
| the half-baked version just fine.
| masklinn wrote:
| > and no budget is ever allocated to finish the product
| because they actually seem to be managing with the half-
| baked version just fine.
|
| TFA talks about BANKStar 5.1c but the wikipedia article
| mentions that BANCStar 10 switched the screencode
| (bytecode) to binary, so it looks like the thing kept on
| trucking for a while.
|
| And the programmer kept stretching the thing for purposes
| it was not really intended to (possibly because it was
| difficult to get approval for better techs), as reading
| between the line and other articles on the subject it looks
| like BancSTAR was really a glorified forms creator /
| manager, which makes some of the limitations make more
| sense e.g. 2000 labels, choices and fields in a single form
| (even across multiple screens) seems like a pretty generous
| limit at first glance.
| failrate wrote:
| It would be a weekend project in this day and age to write a
| simple human readable to number compiler. Why were the developers
| so willing to continue working without improving their toolset?
| tinus_hn wrote:
| For one they were in their day and age, not the one we are in
| now. Also, using a toolset means throwing away everything you
| already have and starting over. Probably not an option in this
| kind of 'enterprise' system.
| omnibrain wrote:
| Reminds of MUMPS, of which I first learned on The Daily WTF:
| https://thedailywtf.com/articles/a_case_of_the_mumps
| mrjin wrote:
| Well, this thing is almost as good as BrainF*ck.
|
| If anyone has to use this, why not simply use assembly? Learnt
| COBOL and S360 Assembly which are obviously not great but widely
| used by almost all banks. COBOL is way too chatty, S360 Assembly
| is just like any other assembly language. But even S360 Assembly
| is much more readable than this. So it would be incredible that
| someone really completed a core banking application with it.
| max-ibel wrote:
| Jeez, and I thought 1990s DataFlex/Btrieve was some sort of
| torture.
|
| Condolences to the poor souls who had to maintain that system...
| YesThatTom2 wrote:
| I won't use this language until they add generics!!! (GoLang
| joke)
| [deleted]
| tluyben2 wrote:
| I made far worse things than this in the past for intermediate
| files (kind of a VM, but in the past we made these to 'obfuscate'
| dynamic code, not for performance or other reasons). For
| instance, we made a lot of software for DOS/Windows used by
| (most) schools in my country and my uncle, who made the content,
| was rolling out versions for different subjects quite fast, so I
| made this intermediate format which came from content with 'tags'
| (like [IF x<y THEN ...] inside the content) which did not look
| unlike what is in this article; indeed also representing all text
| and images are integers. This was done to make it unreadable for
| the average person who tried. Then, based on the school license
| key, that file was encrypted (badly) to make it even harder.
|
| I suppose there were and are many of these kinds of things going
| around in save files etc. You just would never predict or hope
| that people go and reverse engineer it to write directly in it.
| daanvd wrote:
| > a three-ring binder called the Prompt File, stuffed with
| printouts of the dozens of tables in the system, and religiously
| updated anytime anyone changed anything of significance.
|
| Hey, at least they had documentation.
| choeger wrote:
| And a backup.
| redis_mlc wrote:
| Well, as a DBA, I periodically use a 3rd party tool to print
| out the schema. It's mainly for new hires to learn from.
|
| But sometimes I'll flip through it and notice:
|
| - mis-spelled table names, usually duplicate tables
|
| - missing FKs
|
| - missing unique keys, most commonly for early RoR apps
|
| - developer-specific EAV tables with 1 row.
|
| The benefit always outweighs the dead trees, but printing once
| a year is typical. Back in the day, more frequenctly on 25-line
| terminals where there was too much scrolling.
| praptak wrote:
| I don't get why this post got into [dead]. Anybody care to
| explain their reasoning?
| wizzwizz4 wrote:
| The user got shadowbanned (apparently automatically).
| [deleted]
| bmn__ wrote:
| User redis_mlc has been shadowbanned for eight months which
| is an abhorrent practice. He is a prolific contributor, but
| most readers will never see his comments. Occasionally, a
| reader with showdead:yes in the options and sufficient
| karma will "vouch" a post back into general visibility.
|
| Note that the verdict by HN moderator dang talks of a
| regular ban: https://news.ycombinator.com/item?id=25011268
| praptak wrote:
| I learned to program on programmable calculators. I don't think
| I have ever reached the ratio of documentation to code that
| I've had back then.
|
| Necessity is the mother of documentation.
| taneq wrote:
| Pretty hard to write self documenting code when all you have
| are single letter variables and the language doesn't support
| comments.
| praptak wrote:
| Letter variables? Luxury! One of the calculator had ops
| like STO, RCL, PAU, GTO, GSB and some numbered "cells",
| where you could store the result of the calculation.
|
| The other had ops like '74' which were coordinates of the
| key which activated the given function.
|
| Getting the full screen of the ZX Spectrum surely spoiled
| me :)
| code_duck wrote:
| I'd probably have a parallel file with comments.
| avmich wrote:
| Yeah, that's why math doesn't have self-documenting
| theorems, right?
| taneq wrote:
| _Does_ maths have self-documenting theorems? O.o
| eurasiantiger wrote:
| Geometrical proofs could be construed as such, even with
| some propositional logic given that someone comes up with
| a solid, universal way of expressing it (cf. The Golden
| Record)
| msravi wrote:
| When I got my Bachelor's degree, we had a microprocessor lab that
| had a microprocessor kit with a keyboard that had hex numbers
| 0-9,A-F, and a few control keys such as load, reset, etc. To
| program the device, we wrote the program in assembly, looked up
| the corresponding hex opcodes and operands and basically did an
| assembler's job. The result was a bunch of hex codes that we
| loaded and executed. I'm guessing these codes are similar, and
| there's a lookup table of codes somewhere?
| pdw wrote:
| I still can't decide if this is real of not, but the author now
| has a Github repo with more BANCStar artifacts:
| https://github.com/jloughry/BANCStar
| tebbers wrote:
| > "Comments are strictly prohibited."
|
| Excellent.
| dirkt wrote:
| I hope this is meant sarcastically...
| rasz wrote:
| Looks like run of the mill Mount & Blade: Warband code:
|
| On_your_orders_your_troops_sack_the_village,_pillaging_everything
| _of_any_value,_and_then_put_the_buildings_to_the_torch._From_the_
| coins_and_valuables_that_are_found,_you_get_your_share_of_{reg1}_
| denars. none 37 370 3 1224979098644774912 30 0 370 3
| 1224979098644774913 30 1 2105 2 1224979098644774912 1 371 3 30 0
| 1224979098644774912 4 0 30 2 1224979098644774912 3 30 2
| 1224979098644774913 3 372 1 30 3 0 521 3 1224979098644774914
| 144115188075856213 7 4 0 32 2 1224979098644774914 0 1 3
| 936748722493063439 1224979098644774914 -5 3 0 2136 3
| 1224979098644774915 -35 -25 1 3 936748722493063440
| 144115188075856213 1224979098644774915 2204 2 1224979098644774916
| 144115188075856213 2190 3 1224979098644774917 1224979098644774916
| 432345564227567630 4 0 2147483678 2 1224979098644774917 0 1 3
| 936748722493063441 1224979098644774916 -3 3 0 2133 2
| 1224979098644774918 50 521 3 1224979098644774919
| 144115188075856213 50 2122 3 1224979098644774920
| 1224979098644774919 5 2105 2 1224979098644774918
| 1224979098644774920 1 3 936748722493063602 360287970189639680
| 1224979098644774918 2133 2 1224979098644774921 3 2123 3
| 1224979098644774922 1224979098644774918 100 2105 2
| 1224979098644774921 1224979098644774922 1 2 936748722493063447
| 1224979098644774921 522 3 1224979098644774923 1224979098644774916
| 99 2122 3 1224979098644774924 1224979098644774921 200 2106 2
| 1224979098644774923 1224979098644774924 502 3 1224979098644774916
| 99 1224979098644774923 1 3 936748722493063604 3
| 216172782113784226 2133 2 72057594037927937 1224979098644774918 1
| twelvechairs wrote:
| Author's github repo on the language
| https://github.com/jloughry/BANCStar
| weinzierl wrote:
| Back in the late nineties, I worked with a software called
| Origin. It had a BASIC like programming language where variable
| names consisted of single letters. If you now think 26 variable
| names should be enough: Some letters, like X and Y, had special
| predefined meaning, and you couldn't change that. If you used
| them, you encountered strange behavior, like values changing
| behind your back. To add insult to injury I could never find
| documentation about which variables were special, so I stuck with
| the few I knew were safe, which were not many...
| api wrote:
| I guess there was no Unicode or you would have had at least
| 65536 variables.
| Jare wrote:
| Takes me back to the (very early) 80s learning machine code
| before I had an assembler program.
| bitwize wrote:
| Back in the day there was a business graphics program called
| Zenographics Mirage. Think a very primitive PowerPoint that you
| could use to print to actual slides, as in the things you loaded
| into a slide projector.
|
| Mirage had three major components: Chart, Ego, and Autumn. Chart
| was a menu-driven business chart package. Bar charts, pie charts,
| bullet lists, standard stuff. Notably, it made it very easy to
| add gradients, which Mirage called "sweeps", to your chart,
| because it was the style at the time. Ego stood for "Edit Graphic
| Objects" and was menu- or command-driven, like AutoCAD, and
| served as a general vector graphics editor. I forgot what Autumn
| did, something about importing data? Like from spreadsheets and
| stuff?
|
| One of the features of Ego was that it could be scripted.
| Zenographics provided some example scripts, and some of them had
| really odd commands, just DO with numbers after them.
|
| It turns out that "Mirage" was the runtime and abstract machine,
| and Chart, Ego, and Autumn were applications running on it. The
| numbers in the DO commands were opcodes for their VM's
| instruction set, which was called "MAD" for Mirage Application
| Development. MAD had primitives for doing stuff like picking
| stuff from the screen with the mouse, menus, and so on. Mirage
| could be put into a debug mode that flashed the opcodes as they
| were being executed. Using the information that provided, as well
| as the numbers from the example scripts, I was able to figure out
| what some of the opcodes did and use that to write new commands.
| Like I added a rectangle command to Ego that worked much like the
| built-in rectangle command, but it created a rectangle that could
| be rotated. (It created a four-segment polyline rather than a
| rectangle object defined by diagonally opposite corners.)
|
| Mirage was a fascinating program but it is little known today.
| Zenographics got out of the application software business to
| focus on printer drivers a long time ago. Today they are a
| subsidiary of Marvell, the chip company.
| a3n wrote:
| I know this is unfair and untrue, and I am ignorant in the
| history of programming languages, and ignorant in the history of
| bank infrastructure, but ...
|
| My actual first thought was that this was a language designed by
| someone who didn't know that programming languages exist.
|
| My second actual thought, after reading over my first actual
| thought, was that it could be a language designed by someone who
| decided to take that programming languages assignment from back
| in school and this time do it _right_.
| ricohboy wrote:
| Speaking of bank infrastructure, where can I find more
| information about it? I remember an HN thread from a while ago
| that led me into a rabbit hole about how ACH works and it was
| fascinating. I'm not even sure which keywords to search that
| would get me started...
| a3n wrote:
| Here's one part of it:
|
| https://en.m.wikipedia.org/wiki/Society_for_Worldwide_Interb.
| ..
|
| Besides that article's subject, it has enough links to keep
| you busy for months. Be sure to read the "Security" section.
|
| "Banking" is a huge subject. If you really want to learn
| (part of) it, best would be to find an area that interests
| you, and work in it. That's one of the best parts of
| programming, it's not really about programming, it's about
| the industries that use it.
|
| As for "key words," I think better is to follow links, and
| soak in any keywords that gradually come from what you find
| that's interesting.
| indigodaddy wrote:
| Nothing like this is still actually in production is it?
| Vanit wrote:
| Funnily enough the description reminded me of the limitations
| using the RPG Maker 2000 event language.
| photon-torpedo wrote:
| Well that settles the theme for the next Advent of Code. :)
| genewitch wrote:
| It looks similar to 2019, except this is an alleged IL instead
| of ASM, right?
| neilv wrote:
| To write a translator, for migrating a legacy code base from this
| to a higher-level source language and libraries, seems like it
| would be fun.
|
| It could be for incrementally building onto and evolving the
| legacy system in a higher-level language.
|
| Or it could be used for reverse-engineering the legacy system, as
| reference documentation for developing new implementations from
| scratch.
| omgwtfbyobbq wrote:
| I think it would be. Even writing something to translate source
| between different versions can be fairly interesting.
| fistynuts wrote:
| The LIST utility would probably help here
| https://github.com/jloughry/BANCStar#the-list-utility
___________________________________________________________________
(page generated 2021-07-18 23:02 UTC)