« first day (1208 days earlier)      last day (2572 days later) » 
00:00 - 06:0006:00 - 00:00

12:20 AM
@giuliolunati Did you see my "static" implementation? I'm pretty sure its a bad idea but I think it led to a better one :)
 
@HostileFork I've been thinking about the protect function trick and had some ideas.
 
It's only a good idea if copy-on-write is properly implemented. I am still mulling over how that would be done efficiently for deeply copied blocks. Came up with a theory.
 
With the module precedence change, it can be a good idea even without copy-on-write.
 
@BrianH I was referring to the copy-by-default on set-words followed by series literals. That needs copy-on-write. The protect thing doesn't seem like it does.
 
Let's say you make a named private module with a set of function generators that protect the spec and code bodies of their functions after the function is created, but before the function is returned. This module could be imported into any module or script for which you want to make its functions more secure and recursion/multitasking safe. Basically, these new generators would take precedence over the original ones, and harden the functions they create.
If we do this right it will have no externally visible change to closures, because of the bind/copy they do each time before they run. However, for regular functions, it would make any references to series or structures in the source of the function that wouldn't be recursion-safe into errors. People would be forced to write recursion-safe code just to avoid the errors.
Then if you want "static local variables" you'd use function/with or closure/with.
 
12:36 AM
It might take me a little bit to catch up with your thinking, as I'm still looking at some basic questions and "what-ifs"
 
We could add the hardening pass to the startup func to increase the security of the built-in functions as well, though I've already been over all of them for these kinds of vulnerabilities. Still, if we combine protection with copy-on-write and task-sharing, we might get some other advantages.
 
@BrianH there are two definitions of INTERN. One in base-files.r and another in sys-load.r
 
@HostileFork The stuff in sys-load overrides the stuff in base-files, but if they're identical in this case we may be able to get rid of the one in sys-load. The stuff in sys-load gets added to the sys object. I need to take another look at the startup process anyways, there is stuff to do and room for improvement.
 
@BrianH Identical except for description string (and a comment)
 
@HostileFork we also need to split up the startup process to a pre-mezz stage and a post-mezz stage, so built-in extensions can be loaded at the appropriate time, and we need proper multi-script support finalized so we can bundle modules better.
 
12:48 AM
@BrianH Hold off on fixing that one, I'm looking at some larger issues. :-)
 
@HostileFork I'm looking at other stuff at the moment, but you've brought up heterogeneous multi-script stuff in CureCode a lot recently, so it's still on my mind.
 
@BrianH "WATCH OUT: for ALL and NEXT words! They are local." In the time it takes to add the warning, isn't it easier to pick other words? :-)
So what do ALL and NEXT mean exactly in headers?
 
@HostileFork those are a reminder to future developers to pick other words when they write code for that function.
@RebolBot do help load
 
; Brought to you by: tryrebol.esperconsultancy.nl
USAGE:
    LOAD source /header /all /type ftype /next

DESCRIPTION:
    Loads code or data from a file, URL, string, or binary.
    LOAD is a function value.

ARGUMENTS:
    source -- Source or block of sources (file! url! string! binary! block!)

REFINEMENTS:
    /header -- Result includes REBOL header object (preempts /all)
    /all -- Load all values (does not evaluate REBOL header)
    /type -- Override default file-type; use NONE to always load as code
 
RebolBot needs an upgrade. The /next option should be gone.
 
12:55 AM
How about "load/unevaluated"?
 
We already have that, it's called load. Or if you only want the header parsed, sys/load-header.
 
Well just trying to find a better name for /ALL
Sucks to be in a function and not have ALL.
 
There's not a problem with /all, it makes sense in context and you can just use not any.
 
Welcome to the Rebol and Red room. See our FAQ. Cool, you have a reputation score of 1819 so chat away!
 
@SeanConnolly Hey, wait. The Sean Connolly? The cool guy? Here? Really?
@RebolBot
print [{Red/Rebol were already cool, but if} (reverse "yllonnoCnaeS") {used them...wow! :-)}]
 
12:59 AM
; Brought to you by: tryrebol.esperconsultancy.nl
Red/Rebol were already cool, but if SeanConnolly used them...wow!  :-)
 
my reputation precedes me
cheers =)
 
@SeanConnolly Just stopping in a chat room, or did you see the Red ad?
 
latter
been perusing through the site
looks interesting
..though i don't think ive been in a chat room since 1999
 
Red is an evolution of another language called Rebol, which has an interpreter written in ANSI-C
@SeanConnolly SO chat is pretty good, geared toward mixing things up with the site. You can edit your messages for 2 minutes (hover and there's a drop-down triangle). You can permalink individual chat messages. It does a decent inline summary of question or answer links from the site. It supports some markdown
5
A: MouseListener/KeyListener not working (JPanel)

Sean ConnollyHave a look at Java KeyListener for JFrame is being unresponsive?. You need to register your KeyListener and MouseListener for every JComponent you want to listen to: public Hello() { addKeyListener(this); addMouseListener(this); panel.addKeyListener(this); panel.addMouseListene...

1 min ago, by Sean Connolly
..though i don't think ive been in a chat room since 1999
We like it. Except for the not-written-in-Rebol-or-Red and not-open-source part.
@SeanConnolly Know any Lisp, by chance?
 
I know a guy with one, thats it =\
learning Scala these days
 
1:05 AM
Red is taking some inspiration from Scala
Well, so Rebol is "homoiconic", meaning that code is data, and data is code.
 
I'm a bit curious how the whole project is managed? Seems like an undertaking.
 
@RebolBot
code: [print 1 + 2]
print [{The length of code is:} length? code]
foreach symbol code [
    print [{The type of symbol} mold symbol {is} mold type? symbol]
]
print {About to run the code...!}
do code
append code [+ 3]
print [{The new length of code is:} length? code]
print {About to do the new code...}
do code
 
; Brought to you by: tryrebol.esperconsultancy.nl
The length of code is: 4
The type of symbol print is word!
The type of symbol 1 is integer!
The type of symbol + is word!
The type of symbol 2 is integer!
About to run the code...!
3
The new length of code is: 6
About to do the new code...
6
 
@SeanConnolly That make sense?
 
the length of code is 4 b/c of the 4 expressions/operators?
print, 1, +, 2
?
 
1:10 AM
@SeanConnolly Yup. 4 elements/symbols, of differing types. There are a lot of symbol types, and some very cool ones.
 
what about "1+2"
 
@SeanConnolly That's invalid at the moment, not a good number. You put spaces between things. Which creates some good opportunities... such as...
@RebolBot
copy/part (to string! read seaniscool.com) 80
 
; Brought to you by: tryrebol.esperconsultancy.nl
== {<html>
    <head>
        <title>sean is cool</title>
        <link href='http:/}
 
If we said a/b was the same as a / b, for instance, we wouldn't be able to create the separate subclass of string we call URL!
@RebolBot
type? <div>
 
; Brought to you by: tryrebol.esperconsultancy.nl
== tag!
 
1:12 AM
fair enough
 
Or if we said that a<b was the same as a < b, we wouldn't have our nice tag type. Also, I think 1 + 2 is more readable than 1+2 anyway. :-) It's a tradeoff, but we like our angle on it.
 
what are these length? and string! thing owned by?
 
The user. There are no keywords... just a default binding of what the words mean that you get when you boot up the interpreter. You can redefine them (unless you protect them)
 
hmmmm
 
@RebolBot
source length?
 
1:14 AM
sounds scary
=P
 
Computers are scary. They... do things.
 
lol, so are there classes and scope and whatnot?
 
@RebolBot delete
 
or is it a Matlab free for all?
 
@RebolBot delete
@RebolBot
length?: func [
    {Prints parameter plus one}
    x {the parameter}
] [
    x + 1
]

source length?

length? 10
@SeanConnolly Yes, there are contexts and objects.
 
1:16 AM
; Brought to you by: tryrebol.esperconsultancy.nl
length?: make function! [["Prints parameter plus one" x "the parameter"][x + 1]]
== 11

** Script error: cannot use add on block! value
** Where: + length? do either either either -apply-
** Near: + 1

>>
 
Dangit, I keep messing up.
Wait, I don't think that last one was my fault. I think it's RebolBot's fault.
 
I still see the syntax, its interesting.
 
@RebolBot
x: 10
y: context [x: 20 print x]
print x
print y/x
 
; Brought to you by: tryrebol.esperconsultancy.nl
20
10
20
 
So yes, there are contexts and objects.
@RebolBot
parse "But an interesting thing is [Dialecting], such as parse..." [
    thru "["
    copy bracketed to "]"
]
print bracketed
 
1:19 AM
; Brought to you by: tryrebol.esperconsultancy.nl
Dialecting
 
@SeanConnolly So since the syntax lets you pass blocks of "code" around as if it were data, it only becomes alive in the evaluator if you DO it. Otherwise you can use it to be a specification for your own little mini-languages. That one is called parse. Does it make sense by inspection?
 
it actually does
..i think
how does this move toward a full stack solution
 
@SeanConnolly So change it using only those words, to include the brackets...
Well let's start with some basics first. :-)
The "why are you bothering to build your full stack solution on these language principles" answer requires a motivation.
Another chat note: SHIFT-ENTER makes a newline without sending. So to talk to RebolBot you say "@RebolBot" then shift enter, and more shift-enters for each line.
 
@RebolBot
parse "But an interesting thing is [Dialecting], such as parse..." [
    thru to "["
    copy bracketed to ","
]
print bracketed
@RebolBot
parse "But an interesting thing is [Dialecting], such as parse..." [
thru to "["
copy bracketed to ","
]
print bracketed
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-no-value.html
    *** ERROR
** Script error: bracketed has no value
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
1:25 AM
@RebolBot
parse "But an interesting thing is [Dialecting], such as parse..." [
thru "["
copy bracketed to "]"
]
print bracketed
 
; Brought to you by: tryrebol.esperconsultancy.nl
Dialecting
 
@RebolBot
parse "But an interesting thing is [Dialecting], such as parse..." [
    to "["
    copy bracketed thru "]"
]
print bracketed
 
; Brought to you by: tryrebol.esperconsultancy.nl
[Dialecting]
 
hmmmmm
 
The TO is an instruction to advance the parse position up to (but not including) the rule following it. The THRU is an instruction to advance the parse position up THRU (so right past) the symbol
 
1:28 AM
but what are parse, copy, bracketed, and print lol
 
@RebolBot
parse "It gets more interesting with [Rebol] and [Red] being [Cool]" [
     some [
          thru "["
          copy bracketed to "]"
          (print bracketed)
     ]
     to end
]
 
; Brought to you by: tryrebol.esperconsultancy.nl
Rebol
Red
Cool
== true
 
@SeanConnolly PARSE is a function, it takes two parameters. The first is the data to parse. The second is a block of "parse rules" that are expressed in the "parse dialect". You see things used there like words, strings, code in parentheses... those parentheses would be used for precedence in the default evaluator, but PARSE sees them as a signal of code to run when that point in the rule is matched.
THRU and COPY and TO are words that the PARSE function recognizes.
bracketed is a word that is used to indicate a variable to be set, so that when code is run that references that word, the value is retrieved.
@SeanConnolly It's a "language construction set". And it's elegant looking, powerful, and the Rebol interpreter is cross-platform, one executable with no installation process, and half a megabyte
 
so is parse responsible for interpreting it's own syntax: thru, to, etc.?
 
@SeanConnolly Yes. In a sense, that block it is passed is like it received a big block of XML or JSON. Except Rebol's source "data" format is nicer, richer, more readable, etc... has things like dates, currency...
@RebolBot
12-Dec-2012 + 60
 
1:32 AM
; Brought to you by: tryrebol.esperconsultancy.nl
== 10-Feb-2013
 
@RebolBot
$10.00 + $0.35
 
; Brought to you by: tryrebol.esperconsultancy.nl
== $10.35
 
@RebolBot
type? 10x20
 
; Brought to you by: tryrebol.esperconsultancy.nl
== pair!
 
@HostileFork Hello! Yes, I seen. But also I am now more comfortable with a:[ ] etc...
 
1:32 AM
@RebolBot
reverse #{DECAFBAD}
 
@RebolBot
6' + 10"
 
; Brought to you by: tryrebol.esperconsultancy.nl
== #{ADFBCADE}
@SeanConnolly Can you elaborate on that?
 
It doesn't know that one. :-)
 
only metric?
=P
 
Well, the choices of what types to include were based on the most common things we see over and over again, like 10x20 being a size of a two dimensional thing... you find that coming up a lot. It's not fully general, there's no 10x20x30 for instance. It's about the common things.
 
1:34 AM
so what's the root? parse leans on Red to easily parse it's own language syntax, what is Red?
 
So what is Red, exactly? Red is a Rebol-like language that can do much of what it can do, but it is compiled... and it's compiled into a dialect called Red/System which is very C like but fits these syntax rules.
 
Red is a syntax parsing & DOing system?
 
So its version of if isn't if (condition) {code}, it's if condition [code] like in Rebol.
 
but that seems like a syntactic sugar thing, I get the gist there
 
Rebol is the stable precursor of Red, but it's interpreted. PARSE-like-things (dialects) tend to lean on the bootstrap language of Rebol itself... although PARSE is so heavily used it's actually built in for optimality.
 
1:36 AM
there's a bigger different afoot here
 
Well, one of the big differences of Red is no dependencies on any other toolchain.
No LLVM, no GCC, nothing. It really has code generators for all the architectures and packagers that it supports. It can turn Red/System code into a Mach-O executable for MacOS, and turn around and target that for ARM and package it into an .APK for Android.
Because Rebol is interpreted, any system that has a C compiler can run it. But it's going to be interpreted, which won't give you the native performance a compiler can give you.
 
interesting
 
Red is a hybrid. It compiles what it can, JIT-compiles what it can't know ahead of time, and embeds a running interpreter into the executables it produces for those cases where you really need an interpreter for metaprogramming.
The "three layers" of the tower. :-)
 
does it provide access to the depth of 'dialect' that PARSE has? or is that a built-in thing only?
 
@SeanConnolly Red has Parse, and it has some additional features in Parse that Rebol doesn't have.
 
1:41 AM
but if i want to, say, write my own kind of PARSE, is that doable in Red?
 
Though Red is not as far as Rebol (yet!), Red's parse is actually, currently better than Rebol's.
 
posted on February 19, 2014 by Jacob

Hey Brian, if I were to try and do the asm.js from red/system transpiler, what would you recommend I do to get a good start? Would this course be a good start? https://www.coursera.org/course/compilers

 
@SeanConnolly It is doable in both Rebol and Red. In Rebol, you couldn't write a parse that was as fast, because you would be writing it in interpreted code...but you have everything you need to write it. Red is different, because you can dig down and write your code in Red/System if you want to match its parse speed... you can also write it in Red as a higher-level language and much of it would probably be compilable.
 
interesting
so this Red/System alludes to the full stack business
 
@johnk RebolBot seems to be slipping since the Atronix update... :-/
We just updated the interpreter to a new version today, RebolBot is having some issues. :-(
@SeanConnolly Yes, Red/System is integral to it. It even has a sort of inline assembly ability to go "lower" than C for some processor functions.
 
1:47 AM
@HostileFork sorry - lunch break so I was just switching the runtime to the atronix build for the next 30 min to see if I can spot the issue I saw last night.
 
@SeanConnolly "What is Red" is a good video to watch, and we would welcome any translation to Spanish!
 
1:58 AM
@HostileFork running again now on the atronix build. I am capturing logs now so I can see what goes wrong. Every time I watch she behaves impeccably.
 
2:10 AM
Ok, problem seems to be that the atronix build hangs on to stdin differently to the rebolsource build. All that was happening was that when I dropped my ssh it was upset that stdin had gone. Need to have a play with the redirection on my launch-rebolbot script and that should solve it. In the mean time I will leave her running on the old rebolsource build and disable the tweet command again.
I am assuming that redbot is male to address equality issues in the room fairly in terms of bot demographics
TTYL end of lunch
 
@johnk Sounds fair enough. :-) Well, good to help test the Atronix build for them in any case...
 
2:37 AM
Does anyone know ( ? earl ) if the current builds have fixed the bug that appeared to cause tcp issue?
 
@GrahamChiu Yes, PR 161 should have fixed it.
 
@HostileFork Thanks.
 
Going to try your R3-GUI chat client again?
Does the Atronix build bring in any of the missing UI fixes you were needing?
(They appear to have pulled the fix as well)
 
2:55 AM
@HostileFork yes, if I have some spare cycles. Like today at the airport where I was fog bound for 7 hours and had to return home
 
3:11 AM
Cross-posting from AltME:
I have a modification request for 'set-face. I believe 'set-face should return the object it is setting so it can be used in-line like 'probe.
So if I use:

set-face a "some text"

Then 'some text' should be returned by set-face.
Also, variables set in 'on-action blocks are local by default, right? How do I set a global variable in an 'on-action block?
 
@Respectech Is it based on FUNCTION/CLOSURE? Those have /EXTERN blocks for external words. I kind of feel like the /EXTERN should be in the function spec. @BrianH: why isn't /extern done as an extra parameter instead of an "add-on" to the spec block?
foo: function [x /extern y z] [ ... ] is more readable than foo: function/extern [x] [ ... ] [y z] (especially if the function body is long, you have to go to the end to find it). It means if you build on top of function for something you don't wind up needing to come up with a refinement, you just pass the one block through.
/with is a bit less obvious, but I might almost say it would be better in the spec too.
foo: function [
    x {Some parameter}
    /extern
        y z
    /with [
        counter: 0
    ]
] [
    ...
]
 
@HostileFork that is what Maxim proposed, and I was going to make a ticket for that. The option in the spec block should be called external: since set-words in function specs are special. Maxim proposed that the option in the spec block be /external but no refinement option will work.
 
@HostileFork Here's an example:
>> file: 0 view [button "Test" on-action [print file: 1]] print file
;Click the button
1
;Now, close the window
0
 
@BrianH Ah, in case you wanted a refinement called /external. Hmmm. Then shouldn't it be local: also in case you wanted to have a /local refinement?
 
@HostileFork putting /with in the spec means that we would have to evaluate DO code in specs, which is bad.
 
3:24 AM
(That one wouldn't even break existing code, as you just don't use the /local refinement...)
@BrianH But it's copied. Can't you take it out?
again, with: making more sense, yes?
Basically you're paring this stuff that only FUNCTION and CLOSURE understand off before passing to make function!
And paring it off of a copy, so you're not messing with what the user passed in
 
@HostileFork the problem is getting it in there in the first place. The argument to /with is almost always the result of an expression, so if you put the option in the spec you'd have to evaluate an expression to get the argument. The argument to /extern is always a literal block, so it can be moved in the spec.
 
But the FUNCTION generator runs in the same evaluative context, what's wrong with it doing the eval?
 
@HostileFork it would be a good idea to reserve the local: option for real local variables, as opposed to a function option not specified.
@HostileFork the FUNCTION generator doesn't evaluate the spec, it just treats it as data. That makes specs safe.
 
Again, I'm not seeing what's wrong with the COPY and TAKE strategy. Don't evaluate anything but the WITH: stuff you took out.
You get in: [x external: y with: z] as a spec. You copy it, rip out the external and grab y. Rip out the with: and grab z. Evaluate z. What's the difference?
By the time make function! gets it, it's down to [x].
 
You would need to do/next the expression after the with:, so if that's OK we can do that.
 
3:32 AM
Right. It just seems to tidy things a bit, especially for people building function-derived handlers.
They don't have to work very hard to get all the functionality.
Also, I feel putting stuff after the body block looks bad and is easy to forget. Hard to find when conceptually it "feels" like it should be up top
local: is a lot neater than /local; it really starts to show off dialecting early on.
 
One of the main problems is that you don't necessarily have the spec next to the function body. If you move /with into the spec, you can't make derived functions with /with because the retrieved spec won't have any of these options.
For that matter, you can't even assume that the spec is bound.
 
When are specs not bound?
And can't you do the combination as easily as an APPEND? foo: function (append base-spec with-spec) body
 
function spec-of some-other-function [code]
 
But spec-of will never get the WITH: or EXTERNAL: because they're higher order.
 
Right. But that means you need to add it.
 
3:36 AM
Yes, but where are you adding it from that isn't bound?
(Which was what we were discussing in the first place)
It was code you were going to evaluate in the /WITH case anyway
 
On another note, function and closure assume that /local is the last function option. It doesn't have to be. Another ticket needed.
 
@Respectech file: 0 view [button "Test" on-action [print set 'file 1]] print file
 
@kealist I just saw that trick to set out of a function. Should have thought of that!
 
@HostileFork Yeah, I had forgotten what I had done before in my emulator, but just checked it and saw that
 
@kealist Thanks! That makes sense.
I'm modifying some of NickA's samples for the magazine, but I want to make sure they are the best and easiest examples to use. Where would be the best place to post them for review?
 
3:42 AM
Hm, I don't know about the flexibility of that approach there of not saying something more like file: 0 view [button "Test" on-action does [print set 'file 1]] print file. Haven't looked at the dialect to criticize it.
But that would at least give you more options w.r.t. specifying externals and stuff if you needed to.
You wouldn't even have to disable the current behavior, just notice if it's a block or not I guess. Is it a block? Make it a "does" (function-style does, apparently). If not? Eval to get a function. on-action function [external: file] [file: 1]
x: does [print "Hello"]
view [button "Test" on-action :x]
 
@Respectech Github repo? Not sure
 
+1 for GitHub repo
 
You guys are determined to get me to use GitHub, aren't you?
 
@Respectech Yup! Download SourceTree and be happy. :-)
 
<elbow to Hostilefork>It would be a piece of cake in AltME.</elbow to Hostilefork>
 
3:50 AM
@Respectech It would be a nice place for people who read the magazine to download the sample scripts
 
@kealist Good point.
 
@Respectech Yes, AltMe let you have conversations on lines in diffs of distributed version control code twenty years ago. (It was only removed to streamline the system once it was realized that AltMe was the pinnacle of software evolution, thus no more lines of software need be written or discussed!)
 
@HostileFork You know I'm just messing with you, right?
 
Some things just can't be joked about. :-)
I'm pretty pleased about the prospect of this local: instead of /local thing. That's a definite one for the list. Best part is that it doesn't even break anything... all the old /local instances just make a refinement, and it will be the same unless you call it as /local. The difference would be help functions on un-touched up funcs should show /local as a valid refinement.
I think that would be pretty much the only side-effect.
@RebolBot
foo: func [x /local y /bar z] []
help foo
 
; Brought to you by: tryrebol.esperconsultancy.nl
USAGE:
    FOO x

DESCRIPTION:
    (undocumented)
    FOO is a function value.

ARGUMENTS:
    x
 
3:57 AM
So would local: do the same thing? Any refinements afterward are hidden?
So local: and return: understood by the core FUNC/CLOS, external: and with: picked off and handled by FUNCTION/CLOSURE.
local/external aren't opposites, that would be internal/external or local/global. But global doesn't fit.
foo: function [x internal: y z] [ ... ] Blah, no, that's ugly.
foo: function [x local: y z] [ ... ] looks better.
 
posted on February 19, 2014 by BrianH

[Wish] FUNCTION and CLOSURE both have /with and /extern options, which take arguments. Those arguments end up appearing after the code block, which is often quite far away from the beginning of the function definition. Both these options affect the function's semantics quite a bit, so if either are specified you have to go down to read the argument, then back up to read the start of the code.

 
@RebolBot
func [/local x /local y] []
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-dup-vars.html
    *** ERROR
** Script error: duplicate variable specified: /local
** Where: make func
** Near: make function! copy/deep reduce [spec body]
 
@BrianH If local: accepts multiple instances, then with: and external: should too. It is helpful for code generation.
Refinements didn't and still shouldn't allow multiple specification. But I can see enough practical uses for multiple local: clauses to think they might be worth building in support for.
 
@HostileFork local: shouldn't accept multiple instances, you should just add to the list of words. Code clarity.
 
4:07 AM
Making it easier for code generators keeps them from having to work too hard to collect things together, when it could be coalesced. I'd say it's more a performance argument than anything, although the time it takes to prohibit duplication is probably about the same as the time it takes to coalesce.
 
@HostileFork if we did local: then any non-words afterwards should be an error, at least until the next set-word.
@HostileFork remember the source, Fork. We want the code generated to be understandable.
 
I heard the hiding refinements trick was intentional. I don't know if it's a great idea or not, but using the appearance of local: as that crossover seems like a better idea than coming up with some other way of hiding them
 
@HostileFork I don't think it was intentional, but I know that I've taken advantage of it. Before I did that trick noone seemed to have thought of it before, and I'm not aware of anyone else who does that.
 
@RebolBot
x: func [/local z] [if local [print z]]
x/local "silly..."
 
; Brought to you by: tryrebol.esperconsultancy.nl
silly...
 
4:13 AM
The only reason we would change /local to local: is if we decided to add real local variables. Until the semantics supports that, there's no point. Another advantage would be cutting down on locals injection though.
 
@BrianH Hm, what is a "real local variable" besides something that acts like the current local but doesn't allow you to do the above?
 
@HostileFork with our current model, it would have to be, since functions use the stack frame as their value slots.
 
@BrianH Sounds good enough to me. Just treat it like a refinement but don't allow you to call it, and you can have a refinement called /local shown in help, but don't show local: in help. Seems easy enough...
 
As it is, if you ever see functions with something like assert/type [local none!] at the top, that's why.
 
@BrianH Hm, three instances in core to "prevent local injection". Well, I'm making a ticket; just make it local: and don't allow it to be called as a refinement, and you don't have to worry unless you haven't updated your function spec from /local to local:
 
4:20 AM
Given the process we'd have to go through to check typespecs, it would only make sense to make the "real" locals be specified after all of the function options, so the interpreter can tell them apart. The clause would also have to go after all of the refinement clauses, wouldn't be duplicated, and wouldn't turn local into a local variable.
And it would not conflict with a /local function option or local parameter.
 
@BrianH Well, I don't know about order enforcement, we've had some of those dialect questions coming up. Chris's MATCH in QuarterMaster is really about "any order goes". It's easiest to process if you demand an order. I'm agnostic on it because I do think it probably reads best if you put your refinements first and locals last.
Only trying to think about making code generators easier by allowing multiple local: or other orders.
 
The locals would need to go last because all of the refinements are arguments, whether they are specified or not.
Other set-word options could go afterwards though, no need to have an order to those.
I'm trying to find the action function for the handle! datatype. No luck so far.
The other types have action dispatch functions, but this one doesn't seem to. Anyone know where that's set?
Just realized that this might be a bad idea though, since the internal values of handles might be the same but the handles themselves might mean unrelated things. Tradeoff?
Never mind, the operation isn't an action.
 
@BrianH I have yet to use HANDLE! so I don't know what it is. :-)
 
4:37 AM
@HostileFork it's an opaque type to hold a pointer-sized value of unknown meaning.
 
foo: func [x /bar y local: [x y z]] [ ... ]
 
posted on February 19, 2014 by fork

[Wish] Right now "local variables" are produced through a sort of trick of a refinement that no one is supposed to use, whose arguments are therefore in local scope. Despite that, it really is just a refinement: >> x: func [/local z] [if local [print z]] >> x/local "silly..." silly... To prevent this from being used intentionally or accidentally to cause problems, there are curr

 
@BrianH Wondering if requiring a block might call it out more visually. return: takes a block. I guess it just might be easier to see with a block. Dunno, thinking out loud.
I like the editors that make the SET-WORD instances bold.
It's just that the difference between foo: func [x /bar y local x y z] [ ... ] and foo: func [x /bar y local: x y z] [ ... ] is a little hard to see without that highlight callout. Although I guess, welcome to Rebol. There's two dots difference between a: and a but they're very different.
Usually you put locals on their own line anyway. Eh. Just something to think about.
 
4:58 AM
@GrahamChiu Opinion? Is foo: func [x /bar y local: x y z] [ ... ] too subtle visually compared to foo: func [x /bar y /local x y z] [ ... ]? Is foo: func [x /bar y local: [x y z]] [ ... ] better?
Should we be using ISSUE instead for return/local/with/external**? foo: func [x /bar y #local x y z] [ ... ]
Set-word in Rebol connotes "setting". Issue is a little more... value neutral.
The pound sign is a little bit "louder" like a slash is.
So you more actively would notice "this is not just another parameter to bar called local". Same would go for return:
 
I'd prefer /local myself
 
@GrahamChiu Do you want /return ?
And /with and /external ?
The problem is these things are colliding in namespace with refinements. The way to go on a new axis is to use a different word type.
I don't think you're going to convince people it should be /return ... so given that, what is the word-type for a non-refinement?
 
Carl has in the past expressed the interest in having nonparameter function options be expressed with set-words.
 
(Note: Just 40 clicks away from being the #1 ad of the batch, we should be #1 by this time tomorrow. :-P)
@BrianH Was that before ISSUE was a word?
 
After. This is why I suggested set-worda in the first place.
 
5:08 AM
I didn't like the issue-word thing at first. Now I do. Word types were scarce. I just argue it means there needs to be corresponding path types; wasting token space otherwise.
Colors expressed as hex should use binary!. #{FF00FF} or #{FFF}. Limits to hex anyway.
We must solve the hex integer literal problem and get that sync'd on Rebol and Red.
 
Most of the complaints about issue words would be made moot by retrofitting the issue type with series like functions, like the tuple type.
Most could apply to other word types too.
 
?? How would that work? You can't do next 'print or next #foo. :-/
 
You can't do next 1.2.3 either, but you can do first 1.2.3. Getting rid of pick reflection makes a lot possible.
Everything but position And real mutation stuff is possible.
 
Hmm.
 
Even path operations.
 
5:14 AM
"y" = second quote xyz
 
Yup.
 
Hrrrm. I dunno if I like that.
Seems like it would cause more problems than it solves. I'd rather that TO STRING! give you just the spelling of the word, without the markup. Takes care of most of the problems.
 
Characters though, not a string from that expression.
 
Then you have all the series operations and Bob's your Uncle, as they say.
 
What problems would it cause? Doing the same thing to tuples worked out OK.
Barring a couple bugs, of course. But it didn't screw up user code. Many people don't even realize tuples are neither series nor really mutable.
 
5:19 AM
Reading code and wondering what it's doing, then trying to modify it and not being able to get it to do other series stuff... just learnability/readability. Might encourage people to pass words around when they meant strings in interfaces.
 
Protected strings can be very like unbound words. They are in Ruby.
The only advantage to the current restrictions are the errors. Are those errors your friends? If so, let's keep them.
 
Seems there are better things to do than let people hack letters out of unconverted words.
The tuple and pair stuff, it seems that they should have a series interface... and I should be able to say 10x20x30x40x50x60 if I wanted to
dimensions?
But those are sort of on the fringe of concerns relatively speaking, to me, as I almost never use either.
 
Well, we probably don't want to fake mutability like we do with tuples. Changing a letter would probably require us to unbind the result. Pure functions might be OK though.
 
@johnk Well, that just makes RebolBot more special :-)
 
5:31 AM
Darn. This chat could use some work on phones.
At least it works at all.
 
Yeah the mobile site leaves things to be desired. The SO app is pretty good for the rest of it.
As we've observed, chat is the red-headed stepchild of StackOverflow... I think the last new feature it got was oneboxing Trello cards. :-/
 
Half the time I'm here on the train to and from work.
 
Feb 12 at 2:03, by johnk
@hostilefork I wonder if the slow updates to SO chat are related Jeff A leaving SO and recently setting up http://www.discourse.org - maybe it was a pet project for him before he left?
 
@BrianH Graham has an in-progress chat client in R3-GUI, and so maybe there'll be a Rebol powered alternative client if he gets back to it with the new builds...
The TCP bug got him to give up, so I went and fixed it. I asked him what I'd get if I did, and he said he'd nominate me for Reboler of the Year. So where's my nomination? Yeah, that's what I thought. :-P
 
@johnk wow that site looks like ass on mobile.
 
5:36 AM
@johnk I dunno if it's related. Does anyone use Discourse? :-/ I don't hear much about it.
I dislike the logo.
The StackOverflow logo is cute.
 
I can't even see the logo.
 
It looks like it's called "iscourse"
 
@HostileFork Looked at it, seems to be a slightly revised forum engine.
 
I think Jeff shouldn't have abandoned his design team and gone off on his own. :-)
 
Better than the usual PHP forum software, I guess.
 
5:39 AM
Try try.discourse.org flat, but works well in my phone
 
"\\\\asdfasdf kiss my parrot"
I think that is going to become one of my sayings. Like "kiss my grits". Except it's "backslash backslash backslash backslash a s d f a s d f KISS MY PARROT!"
 
Can't get the try link to finish loading.
Speaking of stuff in R3-GUI, has anyone ported that to OSX yet?
 
@BrianH We only just got Linux. So I think the answer is... no. :-)
 
Also, a buddy of mine was talking about seeing what we can do to get Rebol into homebrew.
 
@HostileFork And we just got Linux-ARM. :-) My pet project at present. (Not porting Rebol to Linux-ARM, but just Linux-ARM in general.)
 
5:55 AM
I'm a little curious to see if I can install Rebol on my phone from source, from my phone.
 
00:00 - 06:0006:00 - 00:00

« first day (1208 days earlier)      last day (2572 days later) »