News for hackers. Stuff that matters.
Re:Ask HN: What is the most beautiful piece of code you've e... by greggirwin on Monday October 28, 2019 @04:22PM (#21381207)
Nice to see Rebol and Red mentioned!

Here's a Red version of the calculator: https://github.com/red/code/blob/master/Showcase/calculator.... You can see the syntax is very close. We strive for compatibility with Rebol, but are also changing things that we feel could be improved.

A small twist on the UI can use a `panel`, which supports a divider option to make grid layout easier. e.g., for 4 items across, you can do this:

  view [
     style b: button 50x50 bold
     panel 4 [
          b "1"  b "2"  b "3"  b "+"
          b "4"  b "5"  b "6"  b "-"
          b "7"  b "8"  b "9"  b "*"
          b "0"  b "."  b "/"  b "=" 
     ] 
  ]
Red is fully open source, and can be compiled. Most code anyway. You can write code that is too dynamic to compile until we go JIT. Red is bootstrapped in Rebol, but will be self hosted next year. It is also its own, entire, toolchain. Red compiles to Red/System, a low (C) level dialect/EDSL, which compiles directly to machine code. You can mix and match the two in apps as well.

We're still alpha, and have a lot of work ahead: https://www.red-lang.org/

If you liked Rebol, check us out, and help create the future.

Re:Ask HN: What is the most beautiful piece of code you've e... by greggirwin on Monday October 28, 2019 @04:37PM (#21381366)
Our main chat is at https://gitter.im/red/red
Re:Ask HN: What is the most beautiful piece of code you've e... by 7thaccount on Tuesday October 29, 2019 @07:10AM (#21385812)
Thanks for taking the time to format and preach about Red. I am cheering for y'all!