HN user

magicmouse

53 karma

long time programmer. inventor of Beads programming language, great at making graphical interactive web apps. See more at www.beadslang.org

Posts7
Comments82
View on HN

Although the language i have been working on includes time travel as a built-in feature, i find that i almost never use it, because in a deductive language, it is not that easy to create a bug.

Time travel is great for understanding someone else's large program, so that you can see where it goes as it is running. In large projects the instruction pointer is hop around madly throughout the code, and seeing where it goes like the path of a bird is rather handy.

Most of his predictions are nonsense, and show a lack of understanding of the logical foundations of modern computing. His assertion that instruction sets are "obsolete" is absurd. The Turing/Von Neumann computer uses an instruction set and RAM to do computing. He is proposing some nebulous jelly computer that would be unprogrammable.

The idea that ordinary people can write their own OS is laughable. There are several million lines of code in every OS related to just drawing and responding to a text entry field. There aren't even 100 people who know the TrueType language which underlies all font rendering. The last small team generated OS of any accomplishment was the Oberon project at ETH, and that was decades ago, before the web, and his team of very smart people were not ordinary.

Hardware has to evolve with software. Intel cross-point memory tech, which was marketed under the Optane name, failed because people didn't know how to use it properly. New hardware will easily be stunted if it can't get traction. Look at the failure of the Adapteva Epiphany chip. It was a 10X improvement in computation per watt, but nobody knows how to program/debug a chip with thousands of independent cores.

The underlying mathematics that we all use originates from linear, sequential, Greek Proof, and we have no parallel logic math developed yet.

no, there is a typo in the video. The SDK is the best authority for Beads examples, as those are checked on each build for any errors. We have about 20 sample programs, some large enough to show most of the language features.

Excel achieves its robustness (and it hardly ever crashes) by protecting the user against arithmetic errors, and circular reasoning. Excel doesn't offer infinite precision arithmetic, that is rarely needed in practice.

Null pointers are something that plagues Java, which are primarily caused by having some computation out of sequence. By using the State-Action-Model pattern, most of Beads code will be devoted to rendering the model on the screen, and that one-way transfer of information can be made very robust, provided you have a closed arithmetic, which it does.

Meteor has a lot of users, and is still around. The problem with Meteor is that it uses JS, and that language has a lot of problems. Typescript has clobbered meteor, as people have realized that JS makes it far too easy to make a typographical error that crashes at runtime.

if i can find a better cross platform delivery mechanism than AIR that isn't too far away from JS, i will switch, as there are a fair number of Linux-based programmers out there. Sorry for the current inconvenience of requiring Wine. But it does run okay according to some of my users.

The problem with both Swift and Kotlin, is that you must use libraries to draw and handle events, which typically makes it tied to a single OS (Swift only really being used in OSX at present). Kotlin might rely on the very extensive JVM libraries, which are horrendously complicated.

I don't know what you mean by a step backwards. This a batteries-included environment like VB6 and Borland Delphi, but emits to the current web app universe we live in, so it is definitely in the now.

I don't find Red particularly readable, it is a bit too dense for my taste. But some people will love it, and they have a very active Gitter group, and they are very nice people.

Red is the best funded language that i know of. Nenad did an initial coin offering (ICO) that was successful, and by my estimates will never have to work again. He has a good-sized team, and is building a very powerful product. Don't confuse his frugality with the financial independence he possesses due to his good timing at jumping onto the crypto bandwagon.

I don't know how you describe Rebol/Red. It a language made out of various subdomain specific languages, with a very unique syntax. It is very brief, and to me looking at it from a distance it more resembles FORTH or Postscript than any Algol derivative language.

Red has not prioritized graphical interactive products. I think its best subsystem is its amazing PARSE module, which is second only to Icon in text processing power.

There are other interesting projects like Enso, but they will probably run out of money, but i will wager Red will still be going strong 10 years from now.

many people, myself included, view Web Assembly has a future virtual machine that is universally available across hardware, ending the hassle of making specific executables for each operating system. A kind of improved P-Code system, if you are familiar with how UCSD Pascal worked (another brilliant Prof. Wirth project).

Neo4J has a souped SQL language they call Cypher to perform queries. But since Beads data structures are typically arranged in tree form, one typically uses the loop construct to interate across them, as one is often drawing them. To that end, Beads has a fairly elaborate loop construct, with the ability to traverse 1 or 2 dimensions at once, or do a recursive descent traversal.

In a graphical programming environment one is really listing and drawing the content for editing, versus making a list of something.

You can send subtrees across the wire conveniently, subscribe to a remote machine's subtree, etc. and you can write to the hard drive the trees.

However concurrency is not really present in the system as i am emitting JS which is a single threaded system for the most part. So Beads has almost zero concurrency support at present.

I was kicked out of the future of coding chat group by Ivan Reese, who exercised his cancel culture powers to permanently ban someone for daring to say that Steve Jobs had cojones for ordering hundreds of millions of dollars in parts for his products before they even shipped and knew if people liked them, unlikes the cowards at HP who only bought 10k Idea Pads (which preceded the iPad). It is ridiculous to equate a colorful, and accurate, word "cojones" with a descent into madness. Steve Jobs by most personal accounts had a bad temper, but he was amazing, and I for one miss his great designs and inventions that he brought forth. To me, Steve Jobs is the most exciting inventor of my lifetime, an incredible example of masculine energy focused in a constructive and creative manner.

The community didn't vote on it, Ivan exercised his power, because has a personal dislike for me. I met a few nice people on that discord group, but didn't enjoy being followed around by word police.

I just updated the program to allow arbitrary arrays of words and factors for division, so now it is a fizz-buzz-jazz version of the program, and it gets even shorter once you go to table driven data.

    var ss = ""
    var color = ALICE_BLUE

    loop across:WORDS index:wordx
     if mod(b.cell_seq, PRIMES[wordx]) == 0
      WORDS[wordx] &=> ss
      color = COLORS[wordx]
    if ss == ""
     //  plain cell
     ss = to_str(b.cell_seq)

Okay, i didn't know you had to put in spaces in HN comments to get it to format, here is the regular expression in classic Unix style versus Beads style for the IPv4 address (1.2.3.4):

JS style: (\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]){3}

Beads style:

     pattern octet 
     group or
      digit         //  matches 0..9
      set:'1-9' digit   //  matches 10 .. 99
      '1' digit digit   //  matches 100 .. 199
      '2' set:'0-4' digit  //  matches 200 .. 249
      '25' set:'0-5'   //  matches 250 ..255

    pattern IPv4
       octet '.' octet '.' octet '.' octet
As you can see the Beads pattern notation allow subroutines, uses keywords like 'digit' instead of \d, and is far more readable. There are plenty of examples, and the more complex the expression the more favorable the comparison.

Compared to HTML/CSS/JS, Beads is much simpler. You can learn Beads in probably under 10 hours, while CSS takes at least 100 hours to master.

Most of the older popular languages like C, C++, Java, have huge external libraries you have to learn to make graphical interactive software.

So for the target application area, which is graphical interactive software, Beads is far simpler, and has many features to avoid error at compile time, and keep running with fault tolerance at execution time.

I don't see similarities with COBOL other than Beads has a low percentage of punctuation, but that is from imitating Python's indent-significant code structure style.

COBOL generated a lot of billable hours. I did early years in my career as a consultant-for-hire in a SF body shop, and occasionally would have to fix some COBOL thing. I sure hated it. Woke up one day in a puddle of drool from passing out because of boredom, and then switched jobs.

Beads is from a word-count metric, is probably within 20% of the minimum word count for the sample programs i presented, if you exclude techniques that greatly obfuscate the logic such as those used in Oscar Toledo's famous chess program.

Substitution and concatenative languages like FORTH regularly win code-length contests, but they aren't very readable. Beads tries to find a happy medium between brevity and clarity. I think people writing it will enjoy the careful balance that was struck.

Beads does not replace Excel, but it can close the gap between Excel and the popular programming languages, which have a great deal of unnecessary complexity in them. For example, in HTML/CSS/JS, the comment syntax varies between the 3 languages. Why are there 3 distinct languages in one source file? When in history was this ever done? I can remember mixing 2 languages, but 3? that's just ridiculous.

Code which doesn't execute has very few bugs in it in my experience. And those bugs tend to be easier to fix, than say a register clobberation bug in assembly language which i have had to wrestle with before. Telling the computer what to do, but not telling it how, does cut out a lot of effort (and potential errors).

You have every right to be skeptical, but i hope you can overcome your initial skepticism to at least take it for a test drive.

In practice any JS programmer will find that the use of the undefined value is very familiar. In Beads it is abbreviated to U as it is used constantly, because the default value of something in the graph data structures is U.

For symmetry reasons, the error and undefined values work across all types, which cleans up one of the messes in JS, where you have undefined, NaN, null, and goodness knows what else. That we have a uniform error value for nodes is a very minor point; it is almost impossible to generate an error value in the protected arithmetic world of Beads. Square root of -1 is one of the only ways I can think of.

There is no try/except in Beads, there are no exceptions as all functions are total, and all arithmetic closed (like Excel).

PDF prints well, and has nice search features, and has a nice zoom feature to accommodate people of different visual acuities, which the web does not always do well. This is the first time i have ever seen anyone prefer the web. Maybe if i put a table of contents in the PDF that would help.

There are some people reporting that the Windows .EXE runs okay under Wine in Linux, but yes it would be nice to support Linux desktop natively.

There is Elm, and Yazz Pilot (now called visual javascript), and the Red project can generate web stuff as well (but is at the moment fairly focused on Crypto contracts).

Beads can generate desktop and mobile, however 99% of the users so far are just wanting to make web apps so i spend 99% of the time working on improving the web side and client/server output mode.

Have you read any of the reference manual? Why do you suggest the product is incoherent? it has been highly polished, and have written tens of thousands of lines of code in the language, and it works very well. A nice balance of concise vs. readable.

What indoctrination are you referring exactly? I don't understand the motivation for personal attacks on the author of a product you haven't even tried yet.

For those people who would prefer not to have to waste 100 hours of their time mastering CSS, the 10 hours it takes to learn Beads might be a better bargain.

I take exception to that inflammatory comment. You have never met me, so how could you possibly know what I do and do not respect? The integration of the database is so i can deliver time travel debugging properly, which i believe will be a mainstream feature within 5 years in almost every language, as the productivity improvement is just too great to ignore.

Please refrain from personal attacks, and take Beads for a spin, and let the work speak for itself.

It has very few errors at this point, is quite usable, compiles very quickly, and makes a great web app that stretches like rubber. There are a few products like Beads, such as Elm, and Yazz Pilot (now called visual javascript). but they are all sufficiently different to be an interesting avenue of study.

Beads follows the State-Action-Model pattern (SAM, see sam.js.org) very closely.

Beads is targeting web apps, mobile and desktop graphical applications.

You didn't mention time travel debugging, even on software running on remote customer machines. That's a neat idea.

I would describe the syntax as a mixture of Python and Modula2, which both contributed major features. But has deductive elements as well, which can be traced back to PROLOG.

There are also physical units of measurement such as 3 Newtons * 4 seconds / 3 meter * 2 ergs / 12 kg. I followed the spec from Van Snyder at JPL, who asked the FORTRAN committee to add it decades ago. Only Frink has a stronger unit system.

There are about 70 new things in Beads all told.

I hope that people take it for a spin. If people aren't willing to try new things, how are we going to move forward? You can learn the entire Beads product from soup to nuts in less time than to get half way through a CSS book. Simplicity is a virtue, and thankfully Beads has zero category theory, with no Functors and Monads or Java method factories, etc.

If you use an external database you are not going to get time travel debugging, nor will you have a perfectly uniform internal representation of values. Beads has a primitive type of physical units of measure, so you can store 3 Newtons which internally will be stored as the magnitude 3 plus an array of fundamental units with their exponents. This datatype is not found in MySQL, so external databases work okay as long as you aren't trying to time travel, and either limit yourself to very traditional COBOL era datatypes, or convert everything into string form like JSON has to do.

Beads also has addresses that can be written to the hard drive, because addresses in Beads are not pointers to RAM. How can you store a traditional C pointer into a MySQL database? You can't, you have use a key. which creates baggage.

The virtues of having a simple database inside the language, and a layout/drawing/event model are myriad, and I invite you folks to take it for a spin.

Some of the batteries-included integrated environments like VB6 and Borland Delphi are beloved by their users. Simplicity is wonderful, and i have tried so hard to make Beads simplify the very difficult task of making graphical interactive software.