5 ms·
"Some people, when confronted with a problem, think 'I know, I'll u̵s̵e̵ ̵r̵e̵g̵u̵l̵a̵r̵ ̵e̵x̵p̵r̵e̵s̵s̵i̵o̵n̵s̵ invent a new programming language that will uni
by vogon_laureate 5y ago
"Some people, when confronted with a problem, think 'I know, I'll u̵s̵e̵ ̵r̵e̵g̵u̵l̵a̵r̵ ̵e̵x̵p̵r̵e̵s̵s̵i̵o̵n̵s̵ invent a new programming language that will unify everything.' Now they have two problems."
- jackcviers3 5y agoNot to mention not researching your problem space seems to be an afterthought for these types of people. It's not a novel problem or solution. Haxe already exists [1] to unify everything, similar to beads' claims. It doesn't. Unifying has been done better before with it, C (it does run almost everywhere!), Java, Flash/Flex, and JS+HTML. Many have entered. Few win for a little while, and eventually everything loses. 1. https://haxe.org/ https://haxe.org/
- magicmouse 5y agoI consider the unified languages of the past to be VB6 and Borland Delphi as two successful environments that had many happy users who preferred to live inside that world and get things done without a lot of fuss. I know my friends when VB6 started to be disfavored by MS and they felt pressure to learn .NET refused to use .NET as it was just too hard compared to VB6. The reference manuals for .NET are 1000's of pages when you print them all out. 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).
- zem 5y agocomparisons with vb6 and delphi add a lot more context to the philosophy and design of the language. i would consider making that point prominently on the home page.
- deleted 5y ago[deleted]
- magicmouse 5y agoFunny you should mention Regular Expressions. In Beads there is a complete rewrite of the syntax for regular expressions, replacing the meta characters with a more readable vertical format that facilitates comments, and offers subroutines. For example, compare the IPv4 address regular expression as done in JS: ``` (\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.
- IanCal 5y agoI've got to be honest I can read the regex example even without the comments you added in your example, I can't read the example. "Group or digit" matches 0-9? I dont think it helps that you're missing newlines. Try putting four spaces at the start of every line.
- magicmouse 5y agoOkay, 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.