Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 24 21:21
    hiiamboris commented #4923
  • Jul 24 21:21
    hiiamboris commented #4923
  • Jul 24 20:59
    greggirwin commented #4923
  • Jul 24 20:25
    hiiamboris commented #4923
  • Jul 24 20:13
    greggirwin commented #4923
  • Jul 24 14:57
    dockimbel unlabeled #4880
  • Jul 24 14:57
    dockimbel labeled #4880
  • Jul 24 14:57
    dockimbel unlabeled #4880
  • Jul 24 14:57
    dockimbel commented #4880
  • Jul 24 14:56
    dockimbel reopened #4880
  • Jul 24 14:25
    dockimbel closed #4879
  • Jul 24 14:25
    dockimbel milestoned #4879
  • Jul 24 14:25
    dockimbel labeled #4879
  • Jul 24 14:25
    dockimbel labeled #4879
  • Jul 24 14:25
    dockimbel labeled #4879
  • Jul 24 14:25

    dockimbel on master

    FIX: issue #4879 (MOLD & FORM g… (compare)

  • Jul 24 14:11
    hiiamboris commented #4880
  • Jul 24 14:07
    dockimbel closed #4880
  • Jul 24 14:07
    dockimbel milestoned #4880
  • Jul 24 14:07
    dockimbel labeled #4880
karthik
@kskarthik:poddery.com
[m]
@hiiamboris: i got it https://github.com/red/web-red
hiiamboris
@hiiamboris
But it's actually live at some address.
And that page links to the current (old) site.
karthik
@kskarthik:poddery.com
[m]
oh
let me know the link
hiiamboris
@hiiamboris
5 replies
karthik
@kskarthik:poddery.com
[m]
BTW i get this err in latest red linux snapshot inside docker

```
root@92ab33b581b8:/# red
Compiling compression library...
Compiling Red console...
Unable to init server: Could not connect: Connection refused

(console-2021-6-19-58594:10): Gtk-WARNING **: 12:51:21.774: cannot open display:

i think it's looking to fireup the GUI
hiiamboris
@hiiamboris
Do you have $DISPLAY defined and accessible? GTK requires it yes.
1 reply
karthik
@kskarthik:poddery.com
[m]
what should i set it ?
2 replies
oh
any way to run cli only?
any flags ?
hiiamboris
@hiiamboris
No, I think you'll have to compile a CLI-only build for that.
karthik
@kskarthik:poddery.com
[m]
Thanks! I will try
karthik
@kskarthik:poddery.com
[m]
@greggirwin: is there source code repo of the beta website? Regarding porting the old blog, blogspot exporters exists. We can experiment once you can export to xml format
Gregg Irwin
@greggirwin
@hiiamboris noted that it's at https://github.com/red/web-red. @x8x manages our servers, and also did the progress site and another variant that is more dev oriented. I don't know how far he got on R&D for blog transfer, but all help is welcome.
karthik
@kskarthik:poddery.com
[m]
@x8x ping!
Can you share the blogspot XML format?
karthik
@kskarthik:poddery.com
[m]
@gtzip: blogspot has option to export entire blog to XML. We could use that to migrate
gltewalt (The other Greg)
@gltewalt:matrix.org
[m]
Is that the only format? Can it export to json?
karthik
@kskarthik:poddery.com
[m]
gltewalt (The other Greg): no, only to XML file AFAIK
karthik
@kskarthik:poddery.com
[m]
Raghu Ranganathan
@razetime
what is the equivalent of found? in Red other than not-equal? NONE?
hiiamboris
@hiiamboris
if find ..., found?: none <> find ..., found?: not none? find ...
Raghu Ranganathan
@razetime
thanks a lot
none <> is the shortest approach, which I'll use
hiiamboris
@hiiamboris
yeah there's also to logic! find ... but again a bit longer ;)
not not find .. - not recommended, too cryptic
Raghu Ranganathan
@razetime
I'll note those down
I did try not not before you showed none <> :P
after all, unreadability is one of the more fun parts in golf
hiiamboris
@hiiamboris
haha
karthik
@kskarthik:poddery.com
[m]
@razetime: you're working on any program in Red or exploring?
1 reply
karthik
@kskarthik:poddery.com
[m]
BTW Any there any real world programs in Red?
Galen Ivanov
@GalenIvanov
@razetime to logic! find ... can be shortened to to on find... (or any one of true false on off yes no instead no)
11 replies
gltewalt (The other Greg)
@gltewalt:matrix.org
[m]

Small advantage to that weird naming style where the first letter is a type hint.
sHeadings
fVerify-headings

Or something like that

Hard to find one word verbs for functions.
Which probably means in a perfect world that my functions are doing too much
Gregg Irwin
@greggirwin
I used Hungarian Notation a lot in the 90s. If you only have 6 types, starting with unique letters, it works much better than it would in Red. Also why you end up with things like sz as prefixes for "C string", because that makes sense. Well, it does if you're a C programmer. But it's also onerous to maintain, and often hints at leaking details through large systems. If you have a rich, strong type system, it's less helpful.
hardkorebob
@hardkorebob
Wow. Amazing work. Truly what the future has to be more like. I'm truly blown away at this. Im glad I started to research new languages. Looking forward in having some hands-on. Will build latest from source on a Devuan 3 amd64.
hiiamboris
@hiiamboris
We all share the feeling. Welcome @hardkorebob
hardkorebob
@hardkorebob
I'm here to help too. I am fluent in Spanish as well.
Thank you hiiamboris
hiiamboris
@hiiamboris
In the topic of https://gitter.im/red/red/welcome room you'll find learning resources we're usually advising. There's a huge lot of work ahead in Red, so I'm sure everyone willing to help will find a way that he likes best ;)
hardkorebob
@hardkorebob
I was about to ask. :)
Gregg Irwin
@greggirwin
Welcome @hardkorebob !
hiiamboris
@hiiamboris

We were discussing string interpolation with Gregg, and would like others input.

Preliminary design was #composite macro and composite function. Both are described here, but TL;DR is #composite turns a string into a rejoin with block and composite does it internally and returns rejoined string:

>> probe expand-directives [#composite {"(player)" "(vfile)" --audio-file "(afile)"}]
[rejoin [{"} (player) {" "} (vfile) {" --audio-file "} (afile) {"}]]

The latter as you can see gets very ugly at times. So first purpose of it is readability. Second purpose is localization (see on the same page).

There are however some issues.

  • #composite is a long thing to type. I found myself writing macro wrappers around it: #print for print #composite, ERROR for do make error! #composite and so on.
  • #composite can't accept strings indirectly (being a macro), e.g. strings conditionally fetched or built at runtime.
  • composite (func) requires runtime binding, and that we provide it every time (see the above page for details). Which is a bag of gotchas for everyone not deeply familiar with Red.
  • What escape syntax should be preferred? Current implementation uses (\ to denote literal (, which is backwards ☻

My stats so far are:

  • ERROR is a very common use case, probably 50-70% of my use of composite.
  • #print is most of the rest.
  • other #composite uses are present (e.g. composing file content) but not very numerous.
  • composite (function) I only used once.

Some recent ideas:

  • Replace #composite "value=(v)" with a shorter macro, e.g. `"value=(v)"` . Backtick does not stick to strings and tags, but stick to files and raw-strings (though it can be fixed). No need for wrappers anymore. Such triple quotes are harder to count visually though.
  • Most languages reserve some quotation format for this (very common) use. We could code backticks directly in the lexer to transform strings like `value=(v)` into rejoin ["value=" (v)] (or just into blocks?) on load. That however harms localization, as we don't get the string form anymore and need some kludges to extract it.
  • We can build and expand macros at runtime as shown above, so there really is no strict need for composite function and we may even abandon it, or make it a wrapper around the macro: build the macro pattern, expand, bind and evaluate.

What do you guys think? Any ideas on how to best support interpolation? Have you used it (or wanted to use) in your code?