Beads is an excellent language I feel, but the killer feature in the works is being able to travel "back" in time
Beads: Computer language and toolchain
91–100 of 235 posts
Re: Beads: Computer language and toolchain
#92It seems that after years of trying to develop programming languages and architectures to have separation of concerns, with the business logic, the presentation logic, and the data storage separated (or even going to full-blown microservices), this just... bunches everything together? I get the appeal for a small program that fits in your head, but for anything more complex I don't want the code to take care of every…
Re: Beads: Computer language and toolchain
#93- promises far fewer bugs - promises to replace entire stack - ...and Excel - "declarative languages have almost no bugs" - built-in database Yeah color me skeptical. I love experiments, but I prefer those that under-promise and over-deliver. People have been promising unification languages since there were only two languages. People have been promising cross-platform since there were two platforms. And people have b…
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…
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 num % 5 == 0:
print("Buzz", end="")
if num % 3 != 0 and num % 5 != 0:
print(num, end="")
print(" ")
EDIT: Formatting, typoRe: Beads: Computer language and toolchain
#94Earlier 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 don't understand your objection.
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 bit of a silly objection though, the it's fine to write it as the author did.Re: Beads: Computer language and toolchain
#95It looks like a functional(ish) reactive programming language, with an embedded database, and an SDK for compiling to JS and cross-platform binaries. Do I have that right?
Re: Beads: Computer language and toolchain
#96It seems that after years of trying to develop programming languages and architectures to have separation of concerns, with the business logic, the presentation logic, and the data storage separated (or even going to full-blown microservices), this just... bunches everything together? I get the appeal for a small program that fits in your head, but for anything more complex I don't want the code to take care of every…
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.
Re: Beads: Computer language and toolchain
#97Beads is an excellent language I feel, but the killer feature in the works is being able to travel "back" in time
Is this like a time-travelling debugger like rr[0]? 0. https://rr-project.org/
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.
Re: Beads: Computer language and toolchain
#98However, the design of the language feels like it's a imperative language with a few a few additional features (declarative solver) bolted on to facilitate sub-problems within its use case: well within the paradigm, but lacking real coherent design, or an innovation that would merit non-trivial adoption.
That said, I would be interested at pursuing the source code: it's an interesting hobby language.
Re: Beads: Computer language and toolchain
#99their loop syntax looks a bit crazy... [0]. [0] http://www.beadslang.com/downloads/refcard.pdf
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.