Live data from Hacker News

Red programming language 0.6.2: LibRed and Macros

red-lang.org

51–60 of 86 posts

Re: Red programming language 0.6.2: LibRed and Macros

#51

Earlier quoted context omitted.

The compiler doesn't optimize at all right now, but aims for simplicity. There was an article some time back about the best switches to use for most C compilers: compile for size. It often gave some of the best performance IIRC, the rationale being better cache use on chips.

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 gurus correct me, if I remember it incorrectly ...

Re: Red programming language 0.6.2: LibRed and Macros

#52

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

One of the key reasons for having a lot of literal forms is because REBOL was designed as a messaging language. You can think of it as a data format as much as anything. Template literals in ES6 help with DSL support, which is fundamental in Red's design. It doesn't mean you can just include anything in Red, but the wide array of native forms lets you build a lot of embedded DSLs without resorting to string parsing.…

Yes, a message format. What I would add is, that today ppl are using JSON, not realising, that it is de-facto a Rebol, or at least strongly inspired by Rebol. Well - who wants to use cryptic formats anyway, right? :-)

Re: Red programming language 0.6.2: LibRed and Macros

#53
post #13

Earlier quoted context omitted.

No need to go anywhere :) >> words: keys-of system/words >> types: collect [forall words [if datatype! = type? get/any words/1 [keep words/1]]] >> probe types [datatype! unset! none! logic! block! paren! string! file! url! char! integer! float! word! set-word! lit-word! get-word! refinement! issue! native! action! op! function! path! lit-path! set-path! get-path! routine! bitset! point! object! typeset! error! vector…

Even easier: help datatype!

It can't be that easy, or can it? :-)

Re: Red programming language 0.6.2: LibRed and Macros

#54

I know a lot of you may like case insensitive languages, but it just feels weird for me. And there is the "nim" language which makes no distinction between CamelCase and snake_case.

I consider Nim's approach an advantage since it prevents nasty confusion by accidental typos, in particular in big projects with many modules.

Re: Red programming language 0.6.2: LibRed and Macros

#55

I know a lot of you may like case insensitive languages, but it just feels weird for me. And there is the "nim" language which makes no distinction between CamelCase and snake_case.

At least it doesn't force any casing on you, as some languages do. Another thing to get used to is the ability to include characters in names that you normally can't, e.g., - and ?.

> At least it doesn't force any casing on you, as some languages do.

I'm not convinced that is actually a good thing. It really annoys me when two libraries for the same language use different naming conventions, and so far I haven't had any trouble with the strict casing rules in Haskell, or the casing conventions in Rust where the compiler emits warnings when you don't follow them (that you can disable with an annotation if you really need to).

Re: Red programming language 0.6.2: LibRed and Macros

#56

Earlier quoted context omitted.

As you know, benchmarks are often fun but just as often meaningless. And premature optimization being the root of...anyway. ;) It may come. JIT is planned. I don't know of any language that wants to be slow, and I can only speak for myself, but I think Red's goal is one of overall performance. In 1991, people told me I couldn't use VB, because it was too slow. I countered that my app would be 12-18 weeks faster than…

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.

Except for the embedding part, Julia is pretty good for all other purposes already, isn't it? And I say this as someone who is excited by both Red and Julia.

Re: Red programming language 0.6.2: LibRed and Macros

#58
post #30
post #2

I've noticed that Red shows up on HN with some regularity, and it sounds interesting. But I don't really understand where it comes from or who it's meant for. The Red / REBOL community seems more than usually self-contained, although it's possible that it's because almost everybody involved is Czech, and I am not. It seems like most of the English-language resources for Rebol were written by one guy with a thing for…

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.

Re: Red programming language 0.6.2: LibRed and Macros

#59
post #22

I think Red is a language to watch. It has a lot of potential. But my understanding is that Linux support is still immature. Currently the focus is Windows. Is that a correct assessment?

So far Linux lacking only GUI backend support, everything else should work fine. You can still play with guy crosscompiling (as easy as `red -t Windows file.red`) and running on Wine, while GTK backend is in progress

Sadly, the GUI stuff is what has me most excited for playing with in in private projects ;)

But I can wait. It's open source and free, gift horse mouth and all that. Can't fault the developers for prioritising either areas for which they currently can get funding, or scratching itches in their own dev environment.

Re: Red programming language 0.6.2: LibRed and Macros

#60

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.

Except for the embedding part, Julia is pretty good for all other purposes already, isn't it? And I say this as someone who is excited by both Red and Julia.

Julia is pretty cool,especially on the numerical side and it does have macros although I bet Red's are more powerful being homoiconic. Julia has a JIT using LLVM which is fast & neat, but it doesn't compile down to a binary exe to my knowledge.
Post reply on HN