by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 2019 22:59
    @dockimbel banned @SmackMacDougal
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
BeardPower
@BeardPower
cell!: alias struct! [
    header    [integer!]                        ;-- cell's header flags
    data1    [integer!]                        ;-- placeholders to make a 128-bit cell
    data2    [integer!]
    data3    [integer!]
]
Vladimir Vasilyev
@9214
@BeardPower 1 header (32 bits) and 3 placeholders (96 bit payload) = 1 cell (128 bits total).
BeardPower
@BeardPower
So the "cell" moved onto the stack is then called a slot :)
Vladimir Vasilyev
@9214
:mortar_board:
BeardPower
@BeardPower
The cell is in the stack's slot.
Vladimir Vasilyev
@9214
Very slot, should allocate.
BeardPower
@BeardPower
:smile:
@9214 Are your notes online? Doing double work is :older_man:
Trying to siphon every info to prepare for Red 2.0 ;-)
Vladimir Vasilyev
@9214
@BeardPower don't siphon - mediate.
Inhale, exhale, do the "ohhhmmmm" sound, stare at the sources and slowly whirl your pinky finger around the belly button.
Counter-clockwise!
BeardPower
@BeardPower
Feeling :dizzy_face: Seems to work ;-)
redredwine
@redredwine

@9214 Thanks for the parse rule. it works. I was trying to use OPT, but could not figure how to use OPT.

collect [
some [
keep["tid=" to ". "]
keep[to "startTime:" ]
keep[ to ", "]
opt [to "endTime:"]
opt[ keep [to ", "]]
[thru newline]
]

the above is what i was trying to get working, as soon as I added the OPT lines, it messed up everything.
nedzadarek
@nedzadarek

@lepinekong_twitter wait... print doesn't print?!
@9214 I disagree about some stuffs but I don't want to argue. Thank you for your time.

stick to our conventions and wordings

Pun intended, right?

Alexander Baggett
@AlexanderBaggett
Hey guys, I am trying to get some code that doc gave me to work. Latest automated build doesn't take it. Am I doing something wrong, or has Rich text not been merged into master yet?
view [rich-text data [i b "Hello" /b font 24 red " Red " /font blue "World!" /i]]
Alexander Baggett
@AlexanderBaggett
nm it looks like the rich-text branch is still active and not yet merged into master
ne1uno
@ne1uno
AlexanderBaggett it's still in the rich-text branch, it's not hard to build the console
Alexander Baggett
@AlexanderBaggett
Honestly I have never tried to build the console. What's involved?
ne1uno
@ne1uno
grab rebol2 view from rebol.org. I think the instructions are in the readme displayed on the github page
you can get the source of the branch from github as a zip or use some git client
Vladimir Vasilyev
@9214
@redredwine opt either matches the rules or not, but advances the parsing in any case. However, in your example missing endTime won't be substituted by none and you'll stuck with variable-length of tokens per line.
Vladimir Vasilyev
@9214

@nedzadarek so, now you disagree with technical details and objective facts? Whatever.
https://www.youtube.com/watch?v=b47wP_yMCf4

Words and variables are different both in their implementations and at conceptual level. Words can serve as variables in a very, very special sense (to the degree that you can't just call them "variables" without wasting your breath on 1-2 hour explanation of difference between the two) , but they are not variables, neither technically (they differ in implementations) nor conceptually (we use "words" and "bindings" for a reason!).

Vladimir Vasilyev
@9214
@redredwine or maybe your rule will keep something that is not a timestamp, can't remember the details of log format now.
hiiamboris
@hiiamboris
@9214 I've found your explanation of words vs variables enlightening.. esp. that graph :+1:
Vladimir Vasilyev
@9214
@hiiamboris you're welcome! I hope I didn't spread any BS or misinformation here. :)
hiiamboris
@hiiamboris
@9214 can a word have absolutely no context? not even refer to system/words?
as an illustration:
>> system/words = context? first [pewpew]
== true
Boleslav Březovský
@rebolek
it can in Rebol3, not sure about Red
Vladimir Vasilyev
@9214
@hiiamboris it cannot in Red, at least for now, but that might change with modules.
All any-word!s are bound to system/words ("global context") on load phase and are unset (there's no value associated with them). Then, at run-time, words are rebound by functions to other contexts, change their values in the available conexts, or remain untouched.
Basically, this is how Redbol fakes lexical scoping - nesting round of redbindings create an illusions of scopes, while in fact it's just a bunch of words, each and every referring to its context.
Vladimir Vasilyev
@9214
@hiiamboris a common case is when a word has a context, but it is not available anymore.
hiiamboris
@hiiamboris
but only function contexts can become unavailable, right?
Vladimir Vasilyev
@9214
@hiiamboris correct, because once function leaves the call stack its context disappears too.
>> foo: has [x][x: 42 'x]
== func [/local x][x: 42 'x]
>> foo
== x
>> get foo
*** Script Error: context for x is not available
*** Where: get
*** Stack:
Vladimir Vasilyev
@9214
"redbindings", huh, nice typo.
Toomas Vooglaid
@toomasv
Just teasing
>> x: 'whatever rebind :foo system/words get foo
== 42
>> rebind :foo :foo get foo
*** Script Error: context for x is not available
*** Where: get
*** Stack:
Boleslav Březovský
@rebolek
Ha, so it's possible!
Toomas Vooglaid
@toomasv
Ah, yes
>> x
== 42
Vladimir Vasilyev
@9214
Shouldn't foo rebind its local words on each function call?
Toomas Vooglaid
@toomasv

Seems not

>> x: 'whatever rebind :foo system/words get foo
== 42
>> foo
== x
>> get foo
== 42

It binds on creation only

Vladimir Vasilyev
@9214
R2 is even weirder in this regard:
>> foo: has [x][x: 42 'x]
>> get foo
== 42
>> x
** Script Error: x has no value
** Where: halt-view
** Near: x
Uh-huh...
>> probe bind? foo
make object! [
    x: 42
]
@toomasv I'm not sure whenever it's by design or not :confused:
Probably by design, rebinding on each call induces too much overhead.
DideC
@DideC
What I found funny is that I'm using Rebol / red since nearly 20 years. I understand the "basic" of binding. But I nether have to torture things as you do in my programs :smile:. I have sometime to rebind things, but it does not go far.
lepinekong
@lepinekong_twitter
@9214 when you are underaverage you have to use crutches :smile:
Read preprocessor doc https://doc.red-lang.org/en/preprocessor.html but seems I failed to understand how it works :
>> #do [simulate-external?: true]
== [simulate-external?: true]
>> #either simulate-external? [true][false]
*** Script Error: simulate-external? has no value
*** Where: catch
*** Stack:
hiiamboris
@hiiamboris
you forgot expand