Live data from Hacker News

Beads: Computer language and toolchain

beadslang.org

121–130 of 235 posts

Re: Beads: Computer language and toolchain

#121

Earlier quoted context omitted.

Not 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…

I 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…

comparisons 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.

Re: Beads: Computer language and toolchain

#122
post #22
post #5

Is the beadslang website made in beads?

Since I saw the "replace the entire stack" image, I expect no less than that the website should be made in Beads, hosted on a server running Beads OS, and the frontend should be WebAssembly compiled from Beads.

Beads was going to be recoded in Web Assembly, however, the many restrictions on I/O to the user's hard drive inside the browser make it very to build a compiler inside a browser. Hopefully in the near future Web Assembly will become a fully capable virtual machine, that will unify all the different hardware and operating systems, effectively becoming a universal virtual OS.

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)

Re: Beads: Computer language and toolchain

#123
post #33

Beads is an excellent language I feel, but the killer feature in the works is being able to travel "back" in time

I have been using it to travel forward in time, but am currently getting a 1:1 ratio with normal time so the forward time travel is not extremely apparent yet.

There are two aspects of time travel. The fancier one is time travel debugging. To use TTD, you run a program inside another. The outer program is called the monitor, and the monitor can freeze the inner program, and rewind the time back to some point. There is an API to do this, and examples showing how you have your own debugger. When you rewind, you can truncate the history and start fresh from that point onward. This is very useful for testing.

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.

Re: Beads: Computer language and toolchain

#124

Earlier quoted context omitted.

You weren't richer but the worl might be. Sometimes clean sheets and first principles discover assumptions that have changed. Either in how people use software, how the domain itself works, or the constraints of computing.

I think that depends a lot on whether the failed startup produced any code, papers, conference talks, even podcast episodes, etc. If not, and everything was just buried in the person's head, then no, the world is not richer for it. This kind of thing is why I'm so grateful to the founders of startups like Starsky, who are obviously still immensely passionate about the domain they were in. That even in the wake of the…

My startup idea was to recognize objects by their shape. I got it to the point where I was able to setup an elasticsearch index that looked at point clouds uploaded and performed feature extraction on what was ingested. I haven't open sourced by code because I probably had committed API keys (but I should make it public now since all those keys stopped existing). The biggest issue was a large amount of debt and lost opportunity cost.

But it gave me a new perspective and at times it was really fun learning so much. I think it has made me a better developer because I made so many complicated mistakes and now I can simplify things.

Re: Beads: Computer language and toolchain

#125
post #94
post #81

Earlier quoted context omitted.

I don't understand your objection.

I think he's saying that inside of the loop in FizzBuzz, it should look like something like this (Python-esque pseudocode, assuming for a second print() doesn't add a newline automatically): if x % 3 == 0: print("Fizz") if x % 5 == 0: print("Buzz") if x % 3 != 0 and x % 5 != 0: print(x) print("\n") i.e. no special "FizzBuzz" case for when it's divisible by 15, it just naturally falls out of the first two if's. It's a…

as I learned above you can use the "end" kwarg to avoid the newline:

    print("Fizz", end="")

Re: Beads: Computer language and toolchain

#126

Earlier quoted context omitted.

The thing that really bothered me was the FizzBuzz example [0]. The core logic is: cell // this routine will be called 100 times, and the implied block variable // b will hold values, like the sequence number b.cell_seq var ss : str case mod(b.cell_seq, 15) | 0 ss = "FizzBuzz" draw_rect(fill:LIGHT_SKY_BLUE) | 3, 6, 9, 12 ss = "Fizz" draw_rect(fill:LIGHT_GREEN) | 5, 10 ss = "Buzz" draw_rect(fill:YELLOW) else ss = to_s…

I agree that I hate this solution. However, are you saying that this is a bad FizzBuzz solution to you? (Python) nums = list(range(100)) def fizzbuzz(n): if n % 15 == 0: return "FizzBuzz" elif n % 3 == 0: return "Fizz" elif n % 5 == 0: return "Buzz" else: return str(n) print(" ".join(map(fizzbuzz, nums))) I think it's far better than: nums = list(range(100)) for num in nums: if num % 3 == 0: print("Fizz", end="") if…

At the risk of the classic "no here's the fizzbuzz code" while then getting it wrong, the typical case you're trying to draw out is like the second but:

Not printing in the middle, return a string and afterwards print it.

Each step adds to the string, and if it's still empty by the end you just put the number in.

The next stages are often to add another number, then something more complex (if it's a prime number). As you do this, the concatenation version grows slowly while the first approach explodes in combinations.

Re: Beads: Computer language and toolchain

#127
post #61
post #12

Ah, youth.

Funnily enough; the last time I tried something like that I was 25, had barely 6 months of experience, and somehow convinced a friend I had introduced to programming not more than two months earlier. Waaay in over our heads. Since then, I’ve realised it’s been tried and is being tried an inordinate number of times and seems to usually fail for some reason or another. Kind of a wild goose chase for some (supposed) hol…

> Since then, I’ve realised it’s been tried and is being tried an inordinate number of times and seems to usually fail for some reason or another.

That describes the state of things before every innovation in history.

Re: Beads: Computer language and toolchain

#129

I like it, but also recoil at the thought of using it. And I think that's a "professional programmer's instinct" talking, saying that I shouldn't settle for this one large dependency that boasts about being the future and has made room for so many little batteries-included features, I should be a big boy and use the most powerful library for every task...in JavaScript, a language that was, mind, designed in a few day…

I have the exact same reaction. You never want to shit on somebody's ambition, after all they might be a revolutionary, but at the same time the whole batteries-included thing is just setup to fail. You have an embedded graph database? Why? This is just a symptom of developers general disrespect for the depth and complexity of databases. There's a reason we have so many different different databases, those difference…

> This is just a symptom of developers general disrespect for the depth and complexity of databases.

The entire Beads project is a symptom of the developer's disrespect for the depth and complexity of every other programming tool in existence.

Re: Beads: Computer language and toolchain

#130
post #30

It looks interesting. The reference card immediately made me think of the J vocab reference card (the old one, not the Nuvoc one!). I do like the declarative nature of beads, and it does remind me of Red or Rebol in a way as someone has already commented here.

Where do I need to look for declarative examples? This: https://github.com/magicmouse/beads-examples/blob/master/Exa... looks like good old imperative Basic.

There are more examples in the SDK, and the larger projects which have complex drawing going on, show the declarative layout system to its full advantage.

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.

Post reply on HN