Live data from Hacker News

Red programming language 0.6.2: LibRed and Macros

red-lang.org

61–70 of 86 posts

Re: Red programming language 0.6.2: LibRed and Macros

#61

Earlier quoted context omitted.

One of the things that initially excited me was being able to write code like Python for parsing and automating office tasks and then dropping down to RedSystem for numerical work like matrices and various algorithms and perhaps some embedded work like talking to an arduino. If it could truly do that, I'd give up needing to know 9 languages depending on what I'm doing.

That is exactly its goal.

Awesome. That's why I hope the System code is fairly fast, because compilation won't matter if it is still super slow. If y'all do a version on the JVM you get fast, but also a bloated dependency and then you're not much different than anything else with a JVM backend (Scala, Clojure, Groovy, Perl6, PicoLisp...etc). I really am excited by Red btw. Hopefully performance can be a thing at some point before 1.0. The Perl6 people released their 6.0c (basically 1.0) where the language is mostly frozen, and are now spending 90% of development time on optimizations (honestly I pulled that number out of my butt, but the ratio is in that favor) because it is so slow for most things currently. I'm not sure if that was smart as now people are thinking"I waited 15 years for this?". Overall another great language I'd happily throw away Python for, but it has some work to do before I can really use it. I hope Red doesn't fall into the same trap.

Re: Red programming language 0.6.2: LibRed and Macros

#62
post #51

Earlier quoted context omitted.

When will it optimize, or will it? I'd like to see some benchmarks on the main page for a couple of algorithms like Fibbonaci in both Red & Red System compared to a popular scripting language like Python and a popular office language like Java. I would hope Red is close to Python in speed and Red System to Java. Obviously it won't be yet, but performance is important and if it isn't a priority, I'll look elsewhere (n…

I am not a profi coder, mostly a self community coordinator, but am with Rebol and Red since its beginning, so I do remember, what was said, and what not. As for the optimisation, recently a generated exe is kind of cca 4 times slower than C, if I remember correctly. With optimisations, it was said we should get into 1.5-2 territory, whereas anything below such numbers, would require quite extensive work. Please Red…

I could easily live with 1/2 C's speed with Red's power. That is reasonable.

Re: Red programming language 0.6.2: LibRed and Macros

#63

Earlier quoted context omitted.

When will it optimize, or will it? I'd like to see some benchmarks on the main page for a couple of algorithms like Fibbonaci in both Red & Red System compared to a popular scripting language like Python and a popular office language like Java. I would hope Red is close to Python in speed and Red System to Java. Obviously it won't be yet, but performance is important and if it isn't a priority, I'll look elsewhere (n…

Per Nick's comment, above, Red likely won't generate C, because that would add a dependency on a C toolchain. Red is completely self-contained, and would like to stay that way. However, you could write those tight bits in C and put them in a DLL or something, to call from Red.

Also very nice. If I added a C dependency like GSL as a DDL, Red could compile a binary using it?

Re: Red programming language 0.6.2: LibRed and Macros

#64

Earlier quoted context omitted.

When will it optimize, or will it? I'd like to see some benchmarks on the main page for a couple of algorithms like Fibbonaci in both Red & Red System compared to a popular scripting language like Python and a popular office language like Java. I would hope Red is close to Python in speed and Red System to Java. Obviously it won't be yet, but performance is important and if it isn't a priority, I'll look elsewhere (n…

You're focing a lot on just one point. Many people will sacrifice ultra-optimization or even optimization itself for productivity and flexibility. There's whole industries dedicated to it. A cheat, though, would be extracting lowest-level form to C to leverage their compilers. Lots of languages did that.

Agreed, but those languages aren't trying to be a "Full-Stack" language. With great power...blah blah you get the point ;)

Re: Red programming language 0.6.2: LibRed and Macros

#65

Earlier quoted context omitted.

What does a type being built-in do for you extra? In ES6 you can define a template string builder which you could name, for instance, ipv4, and then when you want an IPv4 address literal you say ipv4`192.168.0.1` and get your object. Are there other benefits besides a literal syntax? (Not to slag on Red. One advantage I can see is avoiding the call at runtime to the ipv4 function.)

I'll add to my reply, because this is a really good question. Red doesn't have all types in place yet (e.g. date! is coming, and maybe an @ref type, among others), but can still load the following: at 10:00 send gregg@host.dom a link to http://red-lang.org (216.239.32.21) delete %/c/temp/junk.dat assign #DECAFBAD-7337 to John make the main window 800x600 with a color of 255.0.0 answer: yes Here's a quick console sess…

What are the chances of authors getting the types like email and uri incorrect?

Oh, very high I would say

Re: Red programming language 0.6.2: LibRed and Macros

#66

Earlier quoted context omitted.

You're focing a lot on just one point. Many people will sacrifice ultra-optimization or even optimization itself for productivity and flexibility. There's whole industries dedicated to it. A cheat, though, would be extracting lowest-level form to C to leverage their compilers. Lots of languages did that.

Agreed, but those languages aren't trying to be a "Full-Stack" language. With great power...blah blah you get the point ;)

PreScheme, Nim... Very powerful. Compiled to C for performance.

Re: Red programming language 0.6.2: LibRed and Macros

#67
post #30

Earlier quoted context omitted.

Circa 1999 REBOL was our language of choice at our tiny company. It allowed our small team to develop faster than our competitors. We still did a ton of PHP and Java because our clients required it but lots of our internal tools were REBOL based and were quite pleasant to use and extend. I have been following Red from a distance waiting for it to be ready for the kind of usage I want to put it through (mostly small d…

Is Brazilian CompSci culture relatively oriented towards embeddable languages? Lua and Céu come from there too. Might explain the adoption rate of Red.

I don't think we can say that Brazilian CompSci is oriented towards embedding. I studied at the university where Lua and Céu were created, so my personal experience is biased towards such languages and yet, I don't remember us focusing on the embedding part.

Our REBOL experience was also not related to embedding but towards expressiveness and quick prototyping.

I think I expressed myself badly, when I said "Brazilian, not Czech", I was just referring to myself, as a new non-Czech datapoint :-D, Red is not Brazilian.

Re: Red programming language 0.6.2: LibRed and Macros

#68

Earlier quoted context omitted.

What does a type being built-in do for you extra? In ES6 you can define a template string builder which you could name, for instance, ipv4, and then when you want an IPv4 address literal you say ipv4`192.168.0.1` and get your object. Are there other benefits besides a literal syntax? (Not to slag on Red. One advantage I can see is avoiding the call at runtime to the ipv4 function.)

I'll add to my reply, because this is a really good question. Red doesn't have all types in place yet (e.g. date! is coming, and maybe an @ref type, among others), but can still load the following: at 10:00 send gregg@host.dom a link to http://red-lang.org (216.239.32.21) delete %/c/temp/junk.dat assign #DECAFBAD-7337 to John make the main window 800x600 with a color of 255.0.0 answer: yes Here's a quick console sess…

No need to apologize, that was a good example :)

I liked this big:

>> unique collect [foreach val blk [keep type? val]] == [word! time! email! url! paren! file! issue! pair! tuple! set-word!]

I think it could almost be read and understood by a person who does not know REBOL or Red.

Re: Red programming language 0.6.2: LibRed and Macros

#69
post #44

This is definitely a neat release. Red seems to be coming along great, and am interested in what a 1.0 release might look like. Checking their "Roadmap" they have some very interesting (great?) goals. They seem to be heading towards a sort-of "runtime purity" by (at least aiming for) targeting: - Native (bridging to Obj-C) - JVM - CLR While also supporting shared objects so my assumption is that dynamically linking i…

> 1. Any reason for not wanting to target WebAssembly/JavaScript (and in conjunction node.js [I understand that this isn't trivial])? Wasm will likely be the browser target. > 2. Any reason targeting QT isn't on the roadmap? [targets for KDE, Sailfish, ect..] They wanted to go native to start. QT is GPL licensed. Not a good fit for Red. Their "small" installer, which downloads the big stuff, is 18M. Red, with self-co…

> QT is GPL licensed

Wrong. It is triple-licensed (GPL, LGPL and commercial).

Re: Red programming language 0.6.2: LibRed and Macros

#70

Earlier quoted context omitted.

That is exactly its goal.

Awesome. That's why I hope the System code is fairly fast, because compilation won't matter if it is still super slow. If y'all do a version on the JVM you get fast, but also a bloated dependency and then you're not much different than anything else with a JVM backend (Scala, Clojure, Groovy, Perl6, PicoLisp...etc). I really am excited by Red btw. Hopefully performance can be a thing at some point before 1.0. The Per…

One of the nice things about Red is the low barrier of entry, for experimenting and getting a taste. If you can drop an EXE somewhere, you can run it and try things. If you can run "red -c ..." you can compile and include Red/System code.
Post reply on HN