53 karma · joined Jan 22, 2016 (10y ago) · 90 submissions
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
But the nicest feature, invisible in the syntax because it is a property of the runtime under the hood, is that when you change your mutable state, any layout that used those variables is automatically scheduled for refresh. You thus declare what is on the screen, and how it is arrange, and the system knows what to do. In this sense it more like SQL, where you give it a goal, and don't specify the ordering of how to achieve the task.
There are also mini-solvers built into the language for the common tasks of solving for rectangles and points, which are quite handy.
Please take it for a spin, you might like it!
comment 5y ago · link · parent
For example you can skip using Unix Bash and use Beads like Python as a scripting language. You can build a very nice client/server product like the "Robin Hoody" app, using the publish/subscribe functions built into the language without ever learning how to encode/decode a packet, as the runtime makes it easy to do this. So in that sense the language does offer a virtual transport layer.
Sure, you may need to drop down and encode/decode a websocket message buffer, but the point of Beads is to permit writing in a single language, without having to learn CSS and the whole pile of complexity that accompanies modern development. You can't make an easier stock quoting system (one of the examples), because it has been reduced to the absolute minimum number of lines.
The protected arithmetic of Excel is of proven utility, and i am merely imitating it. I replace #UNDEF with U, and #ERROR with ERR to make it less verbose, but protections abound in Beads both at compile time, and at runtime. In a graph database universe, you don't need scalars, tuples, lists, dictionaries, queues, hashmaps, etc., because a single more general data structure accomplishes that you need.
Graph databases are quite hot; Neo4J has grown leaps and bounds, and Oracle was forced to come out with one. I am sure that most existing systems continue to use older tech, because that is always how it goes in computers. People are still running COBOL in some places, because it is so damn fast and works perfectly at what it was built to do. I have no doubt that we will see existing tech which works fine continue to be used for another 50 years.
It makes sense to make an easier environment that is still capable, but much simpler to learn and use, and that is the goal of Beads.
As for the skepticism of crowds, my product is out there, and has no major bugs in it, and hopefully will find an audience that likes this approach.
comment 5y ago · link · parent
Probably the best liked feature of Beads is invisible in the syntax, as it follows the State-Action-Model pattern (see sam.js.org), and when a state variable changes, any layout that used that variable is automatically regenerated. This is of immense value when you have 500 things on the screen, and knowing which part of the screen to rebuild on any perturbation of the state is actually a lot of work, and the source of many under/over refresh errors.
This might be called a sprinkling of PROLOG's deduction system, where logical implication is done in the runtime. I am not aware of any top 20 language with deduction. The layout system is declarative like CSS, but includes variables, looping, and IF statements to make it more flexible.
The simplification that Beads offers is really only apparent in graphical/interactive software, and client/server programs. Otherwise people will stick to Python, etc.
comment 5y ago · link · parent
The second aspect of time control, the more simple one, is that you can jump the clock forward, and change the scaling of time at will, so that you can write tests to see if the alarm clock would ring as expected. That feature is as simple the std library functions that control the clock value and scaling. (set_clock_scale(), and set_clock()).
The ability to speed up time by a factor of 10 or 100 is a great time saver for those programs that have key sections, and slowing down time to 1/20th the normal rate (slo-motion) is wonderful for debugging animations. Many languages can set the clock, but not many have time scaling; a nicety.
Beads has a small standard library (compared to OSX or Java), but it has the key features you really need.
comment 5y ago · link · parent
But any day now the dam will break, and WebAssembly will get access to I/O and the full browser API (last time i checked web assembly runs on its own compute-only thread, and is not permitted direct access)
comment 5y ago · link · parent
They are so different that it is hard to compare. Red being a concatenative language has more in common with FORTH than Algol.
The closest thing to Beads is Elm, or visual javascript (was called Yazz) (https://yazz.com/visifile/index.html), which is another integrated product.
comment 5y ago · link · parent
comment 5y ago · link · parent
So that video is just part of 1 of 15 parts, and with some support and enthusiasm from people, we can continue the series, because it is o much nicer to watch a professional video with proper British narration. As the great George Bernard Shaw once said, "The United States and Great Britain are two countries separated by a common language."
I hope that people will overlook the homwbrew quality level of the videos, but the language for a spin, because you might like the language a lot. It has a lot of simplifications, and particularly for client/server web apps, where it is much easier to build reliable products.
comment 5y ago · link · parent
My measurement of complexity includes both the syntax of the language, and also how many library API's you have to learn.
Haxe, which has roots in an open source version of Adobe's ActionScript is an excellent product. I often consider switching to Haxe for the implementation of the transpiler as it would yield Linux support. I currently emit AS3 or JS code, but Haxe is a very strong possible direction in the future as Haxe has a lot of portability.
I don't consider C a unified language. It had no database, no drawing model, no event model, and Berkeley Sockets was a library added in to support the internet, that unfortunately did not achieve complete standardization. C is the most portable language, but it just a step above Assembler, and full of pitfalls.
Tools do wax and wane in popularity; they are all useful in certain circumstances, and the more generally useful the tool, the more it gets used. VB6 was abandoned by its owner MS, when Gates retired (Basic was his pet project, as it was the original foundation product of MS' fortune). People used it as long as they could (and some still do). VB6 didn't make the jump to the Internet, but it could have if MS hadn't tried to force everyone into .NET (which was very complex).
comment 5y ago · link · parent
``` (\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}| ```
with the Beads notation:
``` 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 ```
The Javascript version is extremely hard to read. I can't change the underlying engine that supports regular expressions as that is built in to the Browser runtime, but i can at least make notation friendlier.
Unified languages in the past like VB6 and Borland Delphi were beloved, and many people were productive in those environments, and clinged to them long after MS for example wanted to migrate people into .NET, because they were so much simpler.
The current complexity level that people have to endure is unnecessarily high. Never before in history did people write in 3 different languages in the same source code file (as they routinely do in JS + CSS + HTML), where they don't even agree on how comments are notated.
The current situation benefits the large incumbents like Google, Facebook and Amazon.
comment 5y ago · link · parent
Classic FizzBuzz is just too simple a task to show off any language features, so the task was souped up so that it draws a 10x10 grid of the results, and lets you pick one of the 100 cells to highlight.
It persists this selection for a day to show how one can save up to 1kb of state information trivially inside the browser's cookie system, which is simpler to use than the IndexDB database (which is also available to use if you wish).
1Kb is enough to store a reasonable amount of data, and since Beads has a built-in graph database (not as fancy as Neo4J), you can store a subtree into the cookie with one line, and no encoding/decoding necessary, as that is performed by the runtime library for you (a nicety).
The convenience of working with a graph database internally, instead of the typical collection of data structures that one sees in older languages such as scalars, tuples, lists, dictionaries, queues, and pointers, is an advantage that only becomes apparent after some use of the language; i encourage you to take it for a spin.
comment 5y ago · link · parent
User suggestions and bug reports are promptly followed up on. There are almost no known errors at this point, so it is very good shape.
You are correct that it has elements of JavaScript, but that is inevitable given that the primary output of the transpiler is JS code for use on the web, so some JS functions have to be present for that to work, and to inter-operate with JS, one has to use their string system.
The attempt to offer an integrated programming system, where we return to the simplicity of VB6, or Borland Delphi, is actually quite ambitious, as in order to offer such an integrated product one has to build in a database (graph in this case), a layout engine (novel, Renaissance proportion based layout model), a drawing system, and a way of coordinating between client/server (a novel subscription to a single source of truth system, with remote procedure calls).
The language is primarily based on Modula-2, which the author of Beads used for 20 years quite successfully in large commercial products. There is nothing from COBOL or Ada that i can think of (although Prof. Wirth did contribute to Ada I believe), not sure what the M language is. There are some elements of PROLOG built in that are not readily apparent, as the core programming pattern is State-Action-Model (see sam.js.org), and if you change a state variable, then any drawing code that used that variable is scheduled for refresh.
comment 5y ago · link · parent
You could express it also as an empty string, then concatenating as necessary: ''' // to those objecting to using a modulo-15 test, // we could have done the above code as follows: var ss = "" if mod(b.cell_seq, 3) == 0 "Fizz" &=> ss if mod(b.cell_seq, 5) == 0 "Buzz" &=> ss if ss == "" ss = to_str(b.cell_seq) '''
The problem with FizzBuzz as a programming language exploration is that it is far too short of a program to reveal the totality of a language, since it only consists of using the if/pattern match capability, modulo function, concatenating strings, and converting an integer to a string. The Stock market ticker program is a much better demo of the language, because it shows how to do client/server programming in a very easy way.
comment 5y ago · link · parent
``` 3 * ERR yields ERR 3 * U yields U (3 times undefined yields an undefined value) ```
The mathematical truth tables are in the appendix of the reference manual.
It is quite useful in a language to have a universal bottom value (undefined) and a universal top value (error). The key point is to avoid undefined behavior
comment 5y ago · link · parent
Most of the time one will use a loop in a very simplistic manner. Because it is so tedious and common to need the count of the loop, the key value, or a pointer to the element being looped across, we give you implied declaration capability in the loop consruct.
It is a compact notation that has gone through many polishing steps, and is very ergonomic, easy to read, and downright handy. Loops are the bread and butter of computer software, and yes, there are a fair number of options (such as going in reverse).
Please take the language for a spin, you might like it.
comment 5y ago · link · parent
There is a "blackbox_write' and 'blackbox_send" feature, which allows you to send session information sufficient to replay the user's session for debugging purposes.
This is a very powerful feature, and one that we are seeing more and more efforts to offer, because in a world with so many computers, being able to reproduce rarely occurring, data-dependent bugs, is very important.
comment 5y ago · link · parent
The entire purpose of the project is to build a world of software constructed by interchangeable parts. But to accomplish interchangeable parts, one has to make sure that there are as few external dependencies as possible, which is why the language has layout, drawing, event tracking, and database features pulled into the language, so as to not have one reaching outside, which would invariably break over time.
C proved that a standard library was a major feature of any language, and Beads has a well designed, but compact standard library, where you have a few functions, with lots of options so as to reduce the total number of functions one has to learn.
comment 5y ago · link · parent
comment 5y ago · link · parent
Elon's software is self driving tech, but he foolishly is refusing to add Lidar to his cars, when all the other companies know that Lidar is essential for vision impaired driving conditions. Once he loses the self-driving race, that is when Tesla will deflate.
comment 5y ago · link · parent
comment 5y ago · link · parent
But if Tesla gets 20% of the world market share (and it will be a minor miracle to do this, Toyota only has 10% share!) it should only be worth 2x of Toyota. Right now Tesla has 600 billion market cap at net even 1% of global share, and Toyota has 10% of global share with market cap of 250 billion. So Tesla is overvalued more than 10 times, as if they had already won the battle, when in fact, they are still a young company.
The numbers don't add up. If Ford which sells 120 billion worth of vehicles per year is valued at 30 billion, then Tesla should be selling 2400 billion worth of vehicles, which is preposterous. Is a dollar earned by Ford somehow less valuable than a dollar earned by Tesla?
Tesla may not have a vehicle to compare with the Ford Bronco for 5 more years. In that time span, Ford will have sold 200k/year at an avg price of $40k. The Bronco is incredibly well designed; the best new car from an American company in decades (only the Corvette is comparable in quality of design). Tesla isn't even that good at design.
Tesla fan boys are drinking the kool-aid IMHO.
56.
Tesla is a bubble that will slowly deflate
1 points · by magicmouse · 5y ago · 6 comments
comment 6y ago · link · parent
Also the pricing of diamonds is much less wild than he states. I think the author was not in the diamond business.
comment 6y ago · link · parent
comment 6y ago · link · parent
You first click on the folder icon to locate the source code file that needs to be scanned for localizable strings. After it finds all the localizable strings, that becomes the "base language" for the product, and you can add more localizations. You can have as many languages as you want.
Each little colored chip in the display corresponds to a message. In the example below, we have just started the Spanish translation, and the first 3 translations we did were marked as "tentative" because we are aren't sure the translation is good. The green chips mean the translation is finalized. The white cells show missing translations, that need to be done.
The utility stores the external translation phrase dictionaries in Excel-friendly tab delimited format (sometimes call CSV format, although we aren't using comma-delimited for obvious reasons). We have buttons so you can do rough translations via Google Translate, which works remarkeably well for many computer oriented phrases. There is no substutute for a native speaker, but I have found google to be correct more than 80% of the time, so it definitely helps.
This is the handy graphical interactive localization utility for Beads, but could easily be adapted to some other source language, as it only needs to be able to parse enough of your source code to extract the strings that need translation.
It allows you to visit Google translate to get your translation started, and lets you keep track of your translation progress, add new languages, etc.
It is smart enough to detect when the original phrase has changed so that you might need to re-translate strings, if the meaning of the base language changed.
60.
Show HN: A open source graphical translation management utility(github.com ↗)
2 points · by magicmouse · 6y ago · 1 comment