Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 2018 17:34
    @greggirwin banned @BIjeuca_twitter
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:20
    @PeterWAWood banned @TimeSeriesLord
GiuseppeChillemi
@GiuseppeChillemi
:(((
Michael
@michaeldesu
agree - that link probably should be required reading by any newcomer
Nenad Rakocevic
@dockimbel
A fundamental cause is that there is no distinction between "code" and "data" in Redbol. word: [] is data, which eventually gets evaluated. In JS, v=[]; is just code.
Michael
@michaeldesu
wow - did rebol.com recently die?
Gregg Irwin
@greggirwin
There are just some domain expirations going on.
Michael
@michaeldesu
"there are no "variables" in Red" - wow. Yeah may as well check all the preconceived notions about other languages at the door :-)
Nenad Rakocevic
@dockimbel
"variable" is a convenient approximation we use, but we know that the meaning behind it, is different in Redbol.
Golden rule of learning Red/Rebol: forget about the programming languages you already know, that knowledge will get in the way (unless it's Lisp ;-)), start with a fresh mindset.
Michael
@michaeldesu
GiuseppeChillemi
@GiuseppeChillemi
Noooo, it makes me feel strange reading you using "Redbol" word....
I am just reading the first link
Michael
@michaeldesu
so I guess an analog for 'variables' is like a key: value pairing? where words are like the keys? and value is the actual data (or function). I guess it doesn't matter. So I can see there really are no variables, it's all just data (and even the labels).
Gregg Irwin
@greggirwin
Redbol is our word to encompass all rebol-like languages.
@michaeldesu, right, with each pairing being unique to a context.
A context (and objects are contexts) can be viewed as 2 columns, the first being the words and the second being the values they refer to.
Nenad Rakocevic
@dockimbel
@michaeldesu That R3 doc is to be taken with a grain of salt, as it tries to fit the concept of "variable" into Rebol, to ease the learning process, but I think a clear cut would be better, to avoid newcomers building a wrong mental model of how words and binding work.
PeterWAWood
@PeterWAWood
@dockimbel @greggirwin @GiuseppeChillemi Correction - The rebol.com domain name has not yet expired. I can access the homepage only. My ISP has probably cached the page.
Unfortunately this trick only seems to regain access to the Rebol.com homepage.
GiuseppeChillemi
@GiuseppeChillemi

@dockimbel The last 5 lines of the documentation cleared everything:

One more thing. The colon (:) suffix in a word is not an assignment operator (as in other languages), it's part of the set-word! datatype literal syntax. When evaluated, it binds the word to the result of next expression. It doesn't do anything more than that. So a: "" does not "reset" or "reinitialize" the "variable" a. That is an incorrect interpretation, it just makes the word a refer to the literal string "" which follows it.

It is time I read the Bindology article from Ladislav....
@dockimbel > but I think a clear cut would be better, to avoid newcomers building a wrong mental model of how words and binding work.
In fact I have a wrong mental model of this.
Gregg Irwin
@greggirwin
https://gist.github.com/9214/1dd30a88383a3e46edf45e33e9def3a7 if you want to melt your brain, or a spoon, a bit.
GiuseppeChillemi
@GiuseppeChillemi
I would like to see how code/data is structured underneath in a structured manner. Is there any graph/table
Nenad Rakocevic
@dockimbel
Variables in most other languages are just labels on memory storage spaces. The variable type is the type of the value stored into that memory place. In Redbol, a word is a first-class datatype, of type word! and that never changes. A word can exist and be manipulated, without referring to any other value. A word can refer to values of any type. Making a word refer to a value (let's say a string), does not change the type of the word, it is still word!. So, in Redbol, you have two distinct entities: word and the referred value. Such distinction does not exist in most other languages, which just have "variables", that's why such term can be misleading in Redbol.
Petr Krenzelok
@pekr
@greggirwin Is REPL doing an implicit copy of the series a correct behaviour? Don't remember, how it was in R2 and can't check right now, typing on a phone ...
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin I am not able to translate correctly the english word SPOON.
The volcabulary say it is "cucchiaio", the food table companion tool of a FORK
Gregg Irwin
@greggirwin
That's the funny thing @GiuseppeChillemi, if you look at Red you can see the structure.
@pekr, it is a convenience when working in the REPL.
GiuseppeChillemi
@GiuseppeChillemi
:(
REPL stands for ?
Petr Krenzelok
@pekr
@GiuseppeChillemi "There is no spoon" might be a famous message from the Matrix movie :-)
Gregg Irwin
@greggirwin
Read Eval Print Loop. The console bascially.
GiuseppeChillemi
@GiuseppeChillemi
Thanks !
Gregg Irwin
@greggirwin
@GiuseppeChillemi, the translation is correct. It refers to this: https://www.youtube.com/watch?v=uAXtO5dMqEI
Nenad Rakocevic
@dockimbel

@GiuseppeChillemi

I would like to see how code/data is structured underneath in a structured manner. Is there any graph/table

As Gregg said, just look at the "code" in front of you, that's the structure, blocks, values, words, ... Underneath, it's just the encoding of those values in memory in binary format (using 128-bit cells, you can see blocks as arrays of cells).

GiuseppeChillemi
@GiuseppeChillemi
Thanks, now it is time to have a meal for me... I'll complete my study later.
Gregg Irwin
@greggirwin
@GiuseppeChillemi, in Lisp, there is an outer set of parens that makes it clear everything lives inside that "list". In Red, that outer block is implicit, so you don't see it. But if you imagine it there, then everything you see is just a series of values inside that block.
GiuseppeChillemi
@GiuseppeChillemi
I hate you. I have headache ! I am just revisiting the topic and the spoon script... it will take some more question from me.
Gregg Irwin
@greggirwin
:^)
The thing is, many people can use Red effectively without ever knowing anything about how it works internally.
Senenmut
@Senenmut
Hi GuiseppeChillemi , many people sometimes hate thing in their occupation activities. Just remember captain trump who became manytimes a little bit angry about Sledge Hammer and the 45er Magnum. Finally they wordked together on the new project...............
Ghost
@ghost~5680c5f416b6c7089cc058a5
it is a convenience when working in the REPL.
Wouldn't it lead to confusions? Something works in the console differently than when the same code is compiled.
For newbies like me, it is sure confusion. I would like consistent behaviour between repl, interpreter and compiler (dyn-stack branch)
Differences between the behaviour will lead to gotcha moments. Either all these gotcha moments need to be documented or behaviour made consistent.
Gregg Irwin
@greggirwin

@nc-x, the question is how to make that work. In the console, Red takes a string input (what you type) and has to load that, then do it. In a script, the entire thing gets loaded once, and you are operating on a block of red values after that. That is, running a script looks like this (using @michaeldesu's example from above):

do load {
test-me: function [str [string!]] [
    my-series: []
    print [">" my-series]
    foreach x str [append my-series to-integer to-string x]
]

test-me "123"
test-me "456"
test-me "789"
}

Where running in the console is like this:

str: {function [str [string!]] [
    my-series: []
    print [">" my-series]
    foreach x str [append my-series to-integer to-string x]
]}

test-me: do load str
do load {test-me "123"}
test-me: do load str
do load {test-me "456"}
test-me: do load str
do load {test-me "789"}

Does that make sense?

Nenad Rakocevic
@dockimbel
@nc-x I'm not sure what @greggirwin meant by "implicit copy", but there is no difference in how the REPL and the compiler handle series (unless there's a bug I'm not aware of).