« first day (1363 days earlier)      last day (2417 days later) » 

12:41 AM
@user3530715 Welcome! Your Rebol question didn't show up in our feed automatically because it wasn't tagged "rebol" (just rebol2). Our feed will pick it up, and you can get to 20 points shortly. In the meantime while the 20 points waits to kick in for chat--check out the room FAQ and perhaps something like the rebol bookmarks trello
 
1
Q: Retrieving function arguments programatically in Rebol

user3530715This works at the shell level: >> a: "hello" == "hello" >> get to-lit-word "a" == "hello" But within a function like this: f: func [ arg1 ] [ v1: get 'arg1 ? v1 v2: get to-lit-word "arg1" ? v2 ] >> f "goodbye" V1 is a string of value: "goodbye" ** Script Error: arg1 has no v...

 
1:04 AM
@earl ^-- ? Is this possible?
>> foo: func [x] [probe bind? 'x]
 
; Brought to you by: tryrebol.esperconsultancy.nl
== make function! [[x][probe bind? 'x]]
 
@RebolBot
foo: func [x] [probe bind? 'x]
foo "test"
 
; Brought to you by: tryrebol.esperconsultancy.nl
true
== true
 
Can't do much with "true" as an answer, there.
 
1:45 AM
@HostileFork In R2 yes, if you have one known word in the function's context. In R3, I think it's not possible, but I'd have to think about it (or defer to Ladislav, Brian, etc).
@RebolBot do/2
f: func [x] [get bind to-lit-word "x" bound? 'x]
f 42
 
; Brought to you by: tryrebol.esperconsultancy.nl
== 42
 
Of course, in both it's possible when you use closures:
>> f: clos [x] [get bind to-lit-word "x" bind? 'x]
f 42
 
; Brought to you by: tryrebol.esperconsultancy.nl
== 42
 
Gotta run.
 
2:40 AM
>> help get
 
; Brought to you by: tryrebol.esperconsultancy.nl
USAGE:
    GET word /any

DESCRIPTION:
    Gets the value of a word or path, or values of an object.
    GET is a native value.

ARGUMENTS:
    word -- Word, path, object to get

REFINEMENTS:
    /any -- Allows word to have no value (allows unset)
 
>> get "hello"
 
; Brought to you by: tryrebol.esperconsultancy.nl
== "hello"
 
Seems that should be more narrowly typed
 
0
A: Retrieving function arguments programatically in Rebol

HostileForkFor starters, I'll mention that when you use v1 and v2 in a FUNC like that, you are writing them into the enclosing context. So they'll act like "global variables". To suppress that you'd put in your FUNC-spec func [arg1 /local v1 v2]. (Note: Rebol3 has FUNCTION which scans for locals automati...

 
 
2 hours later…
4:57 AM
@graph I looked at it, you've still got some German in there... I still think you might want to focus more on motivating it. An animation of some kind that works through "this would be good, this would be bad, now YOU try..."
 
For the Rebol gurus:
 
Short notice
 
Well, I just saw it in the Rust lang subreddit...
 
Dunno that taking on the pool of the world and teams of any size is terribly viable to get ready for in 6 hours.
But problems might be interesting to look at.
 
5:56 AM
@HostileFork I don't agree. Having one unified character to access file-paths, objects, etc. is not weak spot but a strength of Rebol.
 
6:33 AM
@rgchris Is there a way in StyleTalk to specify child ( > in CSS)? I see in, but that's not exactly it.
 
7:33 AM
@HostileFork thanks will give it a go
 
 
2 hours later…
10:03 AM
any reason why use that version?
and not the latest?
 
10:14 AM
@rebolek I think you can actually start a task but don't think they are that safe
 
@HappySpoon I tried it only in some early alpha version and it did not do anything and have never tested them again, so I may be wrong here
 
I ttied it ages ago and it worked for me.
 
Hm. It would be great to have it working.
 
 
1 hour later…
11:52 AM
Greetings @SunnyRGupta
 
 
2 hours later…
1:25 PM
Hi
 
2:15 PM
0
A: Retrieving function arguments programatically in Rebol

sqlabFor what it is good for, this can be a little bit shorter >> f: func [ arg1] [ [ get bind to-word "arg1" 'arg1 [ ] >> f "goodbye" == "goodbye"

 
 
4 hours later…
5:49 PM
@rebolek Don't think so. Need to revisit selectors—not only are they longer than their CSS counterparts, but they don't support child selectors or (crucially) media queries.
 
@rgchris I see. Why not just using same syntax as CSS? It's not the best thing under the sun, but it works.
Of course, if you have some ideas how to improve it, it would be great.
 
@rebolek Don't think it'd be possible without enclosing it in a string, but it's certainly an option. Would ideally like to find a cleaner way to do media queries though.
 
@rgchris Some things are possible as not-string, style:after is parsed as url!
>> type? style:after
 
; Brought to you by: tryrebol.esperconsultancy.nl
== url!
 
Yep.
I do like this about selectors though:
>> do reb4.me/r/styletalk
to-css [<pre> <code> with .rebol in #main red]
 
6:03 PM
; Brought to you by: tryrebol.esperconsultancy.nl
== {/* StyleTalk Output */

/** StyleTalk Output Begin */


#main pre.rebol,
#main code.rebol {
^-color: red;
}


/* StyleTalk Output End **/
}
 
It can shorten great lists of selectors...
 
I like how StyleTalk does it, I just miss child :)
 
>> do reb4.me/r/styletalk
print to-css [<b> <i> <tt> <code> <foo> <bar> with .something red]
 
; Brought to you by: tryrebol.esperconsultancy.nl
/* StyleTalk Output */

/** StyleTalk Output Begin */


b.something,
i.something,
tt.something,
code.something,
foo.something,
bar.something {
    color: red;
}


/* StyleTalk Output End **/
 
@rebolek Perhaps just need another word to make this happen?
<b> <i> child of <p>
Or something.
 
6:07 PM
@rgchris That's what I though I could add, but it seems too long.
 
<div> with .column under <div> with .main
 
under is probably better, if cannot come with something even better
 
Can you open an issue?
 
will do right now
 
I just opened one for media queries—any thoughts welcome :)
 
Hm, thought GitHub issues oneboxed.
I do like that <b> under <p> red is still shorter than p > b {color: red} :)
 
6:47 PM
:)
I'm trying to translate ~700 lines of CSS to (pre)StyleTalk, it's great way to find out what's missing :)
 
 
4 hours later…
10:32 PM
posted on July 25, 2014 by CarlRead

See... https://www.openhub.net/p?query=rebol&sort=activity_level :) -- Carl Read.

 

« first day (1363 days earlier)      last day (2417 days later) »