« first day (1653 days earlier)      last day (2127 days later) » 
00:00 - 19:0019:00 - 22:00

12:09 AM
wow
@johnk can't install artonix builds on CentOS 6
rebol libraries are in such a pitiful state
 
@AlexanderGuo 32b or 64b?
 
@AlexanderGuo Also, a slightly less inflammatory tone would be much appreciated.
@AlexanderGuo I suppose you get some weird-looking "cannot execute" or "is not a binary" error message?
 
no
I chmod'ed it to +x alright
./r3-64-view-linux: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./r3-64-view-linux)
the problem is that CentOS 6 will never support GLIB2.14
max version is 2.12
 
Ah, even more annoying than the linker path issue I was suspecting.
 
12:12 AM
@earl "even more annoying" YES. hence the inflammatory tone
 
So the 64b builds from rebolsource.net work for you, I suppose? Which one, exactly?
 
Rebol 3.0 Alpha Test
$ /usr/bin/rebol -v
REBOL 3 2.101.0.4.2
 
Where did you get your working binary from?
 
I got Atronix's from their website
wget the links they posted.
for REBOL 3, I kinda forgot. I probably just downloaded the builds on their website
 
I thought that was the one that doesn't work?
 
12:15 AM
REBOL 3 works. Atronix's does not
 
Could you please md5sum your working binary.
(I didn't think that I was particularly careful in building the rebolsource.net experimental 64b builds on an older systems; but maybe I didn't hard-version glibc.)
 
$ md5sum r3-64-view-linux
76a59c1c98981e5a3d8fa2a4a5aa447e r3-64-view-linux
 
view?
 
That sounds more like the Atronix binary, not the one that runs for you.
1 min ago, by earl
Could you please md5sum your working binary.
 
12:16 AM
okay
$ md5sum /usr/bin/rebol
6de990dd0d6d3c61fd5c58ff730c38d1 /usr/bin/rebol
 
Ah, the 32b current mainline binary.
 
I have also tried Atronix's 32b build
which didn't work fro me
 
Same glibc version error?
 
no, acutally different
$ ./r3-32-view-linux
./r3-32-view-linux: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
is that the linking issue?
 
No, that's something else.
Any chance of installing the 32-bit compatibility version of libstdc++ on CentOS 6?
 
12:21 AM
okay
let me look into that
 
I think it's libstdc++-devel.i386 on RHEL/CentOS, IIRC.
 
i fixed it
different error now
$ ./r3-32-view-linux
./r3-32-view-linux: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
i'll try installing that lib too
 
Right.
 
so as an update, there are a million packages that my system is missing
and I am in the process of installing all of them
 
You'll get GUI support in return. But that's probably not what you want :)
 
12:31 AM
haha
so the thing finally ran and I got the shell
and read https worked
thank you for your patient support
 
You're welcome.
 
actually, there's another thing
* Access error: protocol error: "Authentication not supported yet"
I needed "https" to make an OAuth request
so it might just be easier for me to shell the https request out to curl, right?
@earl
 
I think you should be able to get that working fine, if you can create the necessary HTTP auth headers yourself.
@AlexanderGuo That error just tells you that the server requested authorization, and R3 doesn't have any particular handling for that built-in, at the moment.
Shelling out to curl is another option. With the Atronix builds you also get an improved CALL that makes that more viable.
 
okay, I think I will just go with curl for the moment
what's the improved CALL?
 
CALL is what you'll probably use to shell out.
>> help call
 
12:38 AM
; Brought to you by: try.rebol.nl
USAGE:
    CALL command /wait

DESCRIPTION:
    Run another program; return immediately.
    CALL is a native value.

ARGUMENTS:
    command -- An OS-local command line, quoted as necessary (string!)

REFINEMENTS:
    /wait -- Wait for command to terminate before returning
 
Compare that with the help output you get on your Atronix build, and you'll see what I mean.
 
the help output in Atronix looks exaclty the same
 
Ah, then maybe the improved version of CALL is only in the "development" builds at this point in time: atronixengineering.com/r3/downloads/r3-32-view-linux-dev
 
ok
is Atronix a company?
 
Yes
If you're interested in what they are doing using Rebol, watch: youtube.com/watch?v=jIw7aRP6JPU
> "David den Haring (director of Technical Development at Atronix) explains how they provide solutions to companies like Dannon yogurt for factory automation using a SCADA solutions framework which is built entirely on Rebol, for both the front and back ends."
 
12:44 AM
@earl
@earl it seemed like you worked for Atronix
 
@AlexanderGuo I don't :)
 
while rebol is a really good frontend as a language, I haven't seen what problems rebol would drastically simplify effort for, as opposed to something like AngularJS or nodejs
can anybody show me some examples?
 
 
4 hours later…
4:54 AM
@AlexanderGuo I do not know AngularJS, but Lest may be related. lest.qyz.cz/try.html
As for the status of things (module libraries, state of packaged binaries, bugfixes, general coherence...) every project is beholden to issues in how well it was planned and mapped out, the amount of attention it gets, as well as the scope of the problem they tackle.
Regarding whether Rebol can drastically simplify things in an environment that JavaScript owns, it depends. If you see the world through web-tinted glasses, it may appear that JavaScript-based systems are great for solving problems. Rebol was intended to present a resistance and alternative to the direction of large web browsers and XML.
Using languages can be like going to restaurants or anything else. People will debate about it and have reasons for liking one or the other, and maybe they don't consider the question that much. Maybe you don't go for the food at all, but because people you know will be there. Maybe you're a kid and didn't care how the food tastes at all, you just wanted the prize in the happy meal.
JavaScript and its general success, with rhetoric that "if you're not in the browser you're out of the game" is just one of the many kinds of head-spaces that people can get into. Is it true? Is it the only option and vision of the future?
At one point in time Linux was just a scrappy little effort itself. I was using RAWRITE to generate bootable images off 3.5 floppies very early on...and dealing with all the various pain of it shortly after the release. People might have asked me "what does it do that Windows doesn't?"
@AlexanderGuo Anyway, you say you understand some of the "frontend" goodness, and you've tackled some of the hard stuff by going after binding and dynamism in objects. It isn't JavaScript, Ruby, Python, or any of those...and the features are going to be different. Perhaps if you showed some code that represents your idea of "a great piece of AngularJS" we could look at that and argue for how a Rebol approach might attack the problem.
 
5:21 AM
@HostileFork I almost forgot about those days ... trying to read the clock chip details from the graphics card with a torch to hack together a work xf86config file
 
@johnk Big warning in XConfig about not setting the dot clock wrong. "You can burn up and destroy your CRT!" :-)
Good times, good times.
Mostly I wanted it to use SLIP to talk to the machines at work remotely for my summer job.
 
 
2 hours later…
7:02 AM
>> help evoke
 
; Brought to you by: try.rebol.nl
USAGE:
    EVOKE chant

DESCRIPTION:
    Special guru meditations. (Not for beginners.)
    EVOKE is a native value.

ARGUMENTS:
    chant -- Single or block of words ('? to list) (word! block! integer!)
 
Somehow I missed the "evoke chant" function :-)
 
7:29 AM
nice ... I am all for such function names ... cause-error could be fire! for example and IIRC R/S uses it :-)
 
@pekr I think I liked raise for being something that could only work on errors, as the terminology "raising an error" has been promoted as an alternative to "throwing an error", given that throw/catch are distinct from the errors. Then the concept that raise would only take error values, and that throw would refuse to accept an error value unless you said throw/only.
That would sort out some user confusions.
 
 
1 hour later…
8:58 AM
@RebolBot
foo: next [a b c]
probe type? foo
probe index? foo
 
; Brought to you by: try.rebol.nl
block!
2
== 2
 
@RebolBot
foo: next [a b c]
probe series? foo
 
; Brought to you by: try.rebol.nl
true
== true
 
The terminology is a bit dodgy here, because there is a concept that foo "is a series" when really this needs to split one of two ways. If it is a series, then we can speak of the idea that series have indices and refer to some backing store of data. If it has a series, then really it should be thought of as a series reference.
Users never interact with the backing store of data directly, so if a series-ref! were what was actually exported, it would "ugly things up" for no particularly good reason, as there isn't going to be a series! type without a position. Such a type would not be entirely useless, but likely not useful enough to warrant the complexity at the user's granularity.
Quite confusing however is that internal to the code, many variables are named "series", and it's bad enough that there is a series field of Rebol values which is actually series plus index and it contains a series. So it's value->data.series.series
It is possibly more coherent to say "series!" are actually "position!" in a series (friendier than "iterator!"). So a block! is actually a position in a block, and a string! is actually a position in a string.
Red calls the "backing store" of memory behind a series reference a "node". So a series! represents a node and an offset into that node.
It seems to me that it would be helpful to get this terminology straight from both a user perspective and an implementation perspective. Being able to say something like "Every series in Rebol contains an index position, along with a reference to the series data node" (or something like that)
foo: [a b c]
bar: next foo
; Foo and bar are two series values.
; They share the same underlying array of data, but have different index positions
We might call it the underlying data the "series array". But words are sort of running out.
The fact of the matter is--the "node" behind a series is rather complex. The one size-fits-all thing I mentioned. It's very difficult to give it any kind of meaningful name, but I think calling it "series" all over the codebase is a bad idea.
Changing this is beyond the scope of what I am currently doing, but I want to put it on the table for people to try and decide how to speak about it at a user level. There is a lot of vagueness when you might above say "both foo and bar point to the same series". ("...but I thought they were series. are they, or do they point to series? Can they point to themselves?") etc.
 
10:05 AM
>> uppercase to-char #{017F}
 
; Brought to you by: try.rebol.nl
== #"^A"
 
>> uppercase #"Å¿"
 
; Brought to you by: try.rebol.nl
== #"Å¿"
 
>> lowercase #"Å¿"
 
; Brought to you by: try.rebol.nl
== #"s"
 
10:10 AM
Wonder what the difference between "lowercase" and "small letter" are? :-/
 
@HostileFork Last time there was a lengthy public discussion about a related topic, Ladislav and I tried to establish "payload" as name for the backing store: Mathematical model of Rebol series
@HostileFork The current promoted terminology is actually "cause an error" :) (Viz cc#1491)
 
Payload is a bit odd; I think of that more in networking and messaging.
But along with backing store, "storage"?
The "storage for the series"
 
That sounds too physical.
 
"series contents"?
 
Possible.
I think payload is fine (again, having had a few lengthy discussions about this already), as it is sufficiently "uncommon" in everyday speak.
Reduces ambiguity when discussing these matters, as you are unlikely to accidentally use it to discuss something unrelated.
 
10:20 AM
Trying to think of a balance where the code doesn't say REBSER *series all over the place, and where REBSER would actually be in the class hierarchy if C++ (or pure typedef heirarchy in C) as a typed SERIES! form of REBVAL.
Not loving seeing Append_Value_To_Payload or things of that sort.
For the implementation, calling it a "Node" is pretty abstract.
 
Ah, yes. payload is not an apt name for REBSER. "payload" would just be for user discussions, basically what is REBSER's "data" field at the moment.
Only that "data" is a useless name in user perspective discussions.
One thought I had about the implementation was that it's probably best if REBSRI fields were commonly renamed to serref (or seridx, but I liked serref better), to discern from REBSER.
 
I was thinking that the REBSRI field of REBVAL would just be called "sri", and the three-letter versions would be used, except that breaks down on the likes of "int"
It could be the full lowercase name: rebsri, rebint
But if the user-level name is SERIES! then I think the tendency should go toward making that consistent inside and out
Seems val->series.node would work and line up with Red.
So imagine things like REBSER * series = (REBSER *)value; REBNOD * node = SER_NODE(series); ... where in various subroutines you could leverage type correctness to make sure a value being passed around was a SERIES! if built with C++, yet still pass that series to things that operated on any generic REBVAL.
The downcasting at the edges might be annoying sometimes, but one wouldn't have to use it if one didn't want to.
VAL_NODE could still exist as VAL_SERIES does today, and be unchecked.
In any case, that ties things up more analogously to RenCpp. There's not much point in taking a typedef'd name like REBWRD for a substructured piece of REBVAL that's only invoked once. using the structure tag Reb_Word and then invoking it as struct Reb_Word in REBVAL's union is fine.
Then, REBWRD is a subtype or alias of REBVAL as a whole, instead of some small pointless part of it. And you may use it anywhere you wish to convey "hey, I know this REBVAL is a WORD!". Even if it's only commentary, it helps.
Or more importantly, to know when you don't know. I'm tired of seeing things like REBVAL *word; and then finding out it's a word sometimes. But a path other times. Oh, maybe a string or UNSET!....
The C++ definitions could even be done completely out-of-band. Just define the aliases in sys_value.h as #define REBWRD REBVAL, then later the C++ inclusion would say #undef REBWRD and do its own definition. No one needs to even see the mechanisms for the extra checks if they don't want to.
Also: I think REBYTE needs to go. sizeof(char) = 1, that is not changing. The only thing it's buying is making characters unsigned, which if you're just using them as black-box octets is irrelevant...and all it does is cause friction with the implementation-defined choice of signed or unsigned. If you want an unsigned char for doing unsigned math, then explicitly say "unsigned char".
 
11:56 AM
I mentioned I was feeling a little uneasy about the locals-gathering story, and @MarkI suggested leaning more on the modules and outer context discipline to solve the problems that function is trying to solve today. And in looking at FUNCTION/WITH I'm feeling uneasy about the underlying reason why that can't be function [spec] with obj [body] (or IN, or something like it).
You actually could turn this sort of thing around via make function! with [spec obj] body, because MAKE FUNCTION! takes a single parameter and thus WITH could be arity 2 and return a [spec body] block as a pair. But as FUNCTION will override the binding of whatever you passed in, assignments would go to locals instead of the object fields if you try using binding as written.
WITH and IN don't feel like they belong in the spec block or as refinements. They feel like something you should be able to do to the body before you pass it to function...and before locals-gathering existed, that's what it was.
But perhaps it's something you do to a spec vs what you do to a body? If a spec is modified to consider every field in an object to not be a candidate for gathering, you could write function (with obj spec) (in obj body); maybe there's some line of attack there. I dunno.
 
12:38 PM
case becomes very difficult to read when it's not laid out in condition/block style. The lines in load-header are a good example. The case implementations are done as NONE, but it doesn't jump off the page at you.
It could well be easier to make the processing of empty blocks faster/cheaper than the processing of the word NONE.
(It has not been geared to being fast/cheap today, but it could be...and no word would have to be looked up. With the copy-on-write concept it could be memory-cheap too...if you see an empty block, alias it to a canon copy...if it's never modified, no extra series data block.)
 
1:10 PM
As asserts are conceived as debug-only things, I wonder if my hopefully naming concept might be considered? hoist.hostilefork.com
hopefully/id [blah blah] http://wherever.com/issuenumber could be a way of tagging things that become issues, so if they trigger in the field you could have a link. These links could be added automatically on projects that wanted to generate advance tracking entities, or they could be added after the fact if it represents a problem that has happened in the field (or that you suspect might)
I think that I think that to-string of a NONE! value should be an empty string literal. I guess that would solve the COMBINE problem for people who want a string in all cases and don't want to get a none back if the combine is empty. print combine [if 1 > 2 "foo"] would thus combine to NONE! and output nothing (not even a newline), while print to-string combine [if 1 > 2 "foo"] would combine to an empty string and produce a newline.
 
1:43 PM
@rgchris Er ... disappointment? In R3 functions are immutable, body-of returns a copy, so this is behaving as expected.
 
2:21 PM
@HostileFork templating is part of it. There's also the double data-binding that basically cuts the code you have have to write in half
double data-binding between GUI and application data is more of a framework/lib/runtime thing than a language thing though, I guess
one thing that Rebol could try to get into is the noBackend technology
as exemplified most clearly by Firebase
by noBackend tech, I mean /triple/ data binding. Where updating a certain path on the server like "ip_addresses.json" would update to the frontend and all other devices
noBackend tech is exciting b/c similar to AngularJS's double data binding, it cuts the code you have to write significantly
in the case of noBackend, it's basically cut by 80%, I would say
 
@AlexanderGuo The real challenge in Rebol--that I bring up very, very, often--is that it promoted the idea of dialects as a way of attacking domains. And then it wound up having arbitrary rules that made it hard to interface with those domains. It began to seem like the only domain you could really dialect effectively was the domain of Rebol programming.
 
so rebol is far from the perfect language?
 
Too many rules on what made for a legal word, or too few good examples showing how an existing tool could be morphed slowly to use more and more Rebol as time went on. (Note how C++ built success on being able to engage 90% of C codebases without modification...and then slowly features were brought in.)
 
true....rebol doesn't try to take advantage of any existing wheels. Clojure hosted itself on JVM, which might explain Lisp's recent renaissance
 
As mentioned, it depends on what you're trying to do. I can extend the metaphor to anything. Are biological human hands the perfect endpoints of evolution?
Is oil paint better than acrylics, are watercolors worse than either, etc. etc.
 
2:37 PM
yeah...though I still haven't found a compelling reason why there has to be different languages. Not as compelling as painting tools
oil paint vs acrylics -- they're different because of physical properties
you can't have some thing X that does both oil paint or acrylics simply due to their physical properties
 
Physical properties, virtual properties... everything is some kind of architecture or organization.
 
but we're talking about software?
well
software is just how something interprets some data
 
Look at the code golfing challenges.
You will see a wide spread of how different languages can pull out different abilities of expression under a variety of constraints.
 
ok
but so far, it seems to me that the main limitation of a language is how well its run
 
416
Q: Produce the number 2014 without any numbers in your source code

Joe Z. It's 2015 already, folks, go home. So, now that it's 2014, it's time for a code question involving the number 2014. Your task is to make a program that prints the number 2014, without using any of the characters 0123456789 in your code, and independently of any external variables such as th...

 
2:40 PM
for instance
the main thing about erlang is not the language itself really, but the Erlang VM + the OTP libs
^ IMO
 
Well, if you're on a quest to find the perfect language for all things... good luck. It is possible for people to convince themselves they've found it. I imagine some people in the cult-of-Haskell will tell you that it's perfect and/or nearing perfection for all purposes.
One might think a turing machine is perfection. Or the game of life. Or both.
Rebol and Red pursue some properties that bring it closer to how we think of writing. It gets in with some tradeoffs other languages aren't willing to grapple with. They're interesting enough to deserve a place in the hall of languages if everything is sorted...and I like this angle of trying to minimize dependencies and stay self-contained in an era where things are spiraling out of control. What bothers me is it hasn't been nailed down.
The "spirit of tradeoffs" had slipped into a "culture of careless/sloppy engineering". So we're trying to put things on track with clearly decided and reasoned tradeoffs--put in greater verifications and tests--and tidy up the things that fell through the cracks.
In any case, @AlexanderGuo, if you are looking for "one language to rule them all" that you can use right now... (a) I don't believe there is such a language, only people who perhaps decide to use only one. (b) If there WERE one, then being largely imperative and lacking a powerful type system...languages like Rebol, Red, JavaScript, Ruby, C, Python, etc. are quite unsuitable for systems that need critical reliability
(c) Right now is not the time where you can adopt any binary download of Rebol or Red as your one tool, unless you like to stay remarkably self-constrained in your programming and are a hobbyist. However, it's a good time to be heard and help tune and experience what's there, which has shown to me (and many others) some interesting directions and usability.
So if you can hold off on the extreme "search for the one true language", put Rebol and Red in your toolbox and use it a little here and there. Perhaps some parse vs going whole hog on the ambition of replacing vastly large deployed web/cloud Rube Goldberg Machines, on day one.
 
3:24 PM
@HostileFork with regards to the "one language to rule them all", I also don't believe it exists right now, but I'm still not convinced that the potential is not there
so I'm excited by the Red project, even though it's not quite there
I think I can agree that there has to necessarily be many different kinds of runtimes
OS, vs browser, vs Android, etc
what I don't understand is why there has to be so many different kinds of frontends
frontend -- meaning the language
perhaps all these different frontends is just a manifestation of who we are as a human race?
for instance, we don't have to have all these different human languages, but they do exist
 
@AlexanderGuo Speak for yourself, hoo-man. :-) Well I've mentioned before that there are certain factors that start to make one way vs. another better for a purpose; with writing needing to be typed or represented discretely and printed in small fonts, then suddenly the Latin alphabet looks awfully convenient for programming vs. Chinese characters.
 
lol, @HostileFork that is the first time anybody has called me hoo-man
I am honored
 
There are game changers which come along...suddenly you've got speech recognition, then you've got Hololens, then you've got an AI that just goes and does it for you. But the reason that I think this particular "layer" of control is interesting is a lot like keeping a good set of non-power tools in case the electric grid goes out. A way of staying close to the metal that has been refactored through iteration.
I'm one of those people who watches when the new things come up, they shut down the old thing, and you find your ability to control a situation has been compromised. Not every "improvement" is an improvement in every way. Many seem to be steps backward.
If someone's going to shut down the analog TV service and there are still analog TVs out there, I want at least one analog station left on that broadcasts schematics and information on how to build a digital receiver 24/7. I want Project Rosetta discs all over the world and in space. And I'd like us to keep emulator systems and languages going for old software, machines, and archives.
 
@HostileFork You still have analog TV service?
 
@rebolek "If someone's going to shut down 'an' analog TV service." No.
 
4:05 PM
Another thought is that you could possibly have argued once that you needed a watch, a small notepad, an iPod, a cell phone, etc.
but now, there is that one tool to rule them all: the smartphone
the only constraint on the smartphone is the form factor
the small screen
imo, the reason smartphone ruled them all was the malleability of software.
 
@AlexanderGuo The constraint is the size of a pocket.
 
@HostileFork yeah, similar idea I guess. fair enuogh.
so similarly, I don't want to shut the door on the "one language to rule them all" yet
unless it's as obvious as "you need a bigger screen for one, and a thing to fit in your pocket"
 
@AlexanderGuo Although I have mentioned that if you wanted to, you could build a mass-preserving pocket size phone that could be stretched up to the size of a tablet and compacted down again to phone size even with near-term nanotech. Use principles of a Hoberman sphere, but build "hobermann rectangular prisms in sheets.
Design these prisms so that they have complementary expansion patterns, where one design will (when fully expanded) leave a joint point where another design layer would have left a gap. Put light emitters on the gap. Know how far you've expanded the device and have the computer have a mathematical model of where the joints will be at that point of the expansion.
Adjust the light emitters on the structures to present the correct color and intensity to convey the pattern from the bitmap you wish to display. It will experience a kind of degradation on expansion; an unusual one. Engineer to tolerances.
@AlexanderGuo Ponder that while you wait for your one phone to rule them all. I preordered a Pomegranate phone but it still hasn't arrived for some reason.
 
4:22 PM
https://github.com/red/red/pull/1172
GitHub
Red Pull Req—Sort HELP output for strings and datatypes.
greggirwin
1431339578
 
My current pet peeve with the web ... hokum that doesn't say "hokum" anywhere.
Don't we have enough of that for reals?
 
@rebolek In Lest, you are using [throw] in function specs. Are you still targeting Rebol2? Rebol3 does nothing with that, and the notation is changing... is it a problem to remove them?
 
Took me until "makes coffee" before it hit me, like a really really bad pun, so bad there is never a place for it.
 
@MarkI Far from not saying "hokum", some of them have intense sound and fury and slick websites for things that when you dig through it wind up being absolute nonsense.
Not so much blaming the author of RequireJS there... but it does seem like kids today are being given an introduction that's so far from real engineering. "Fill your head with memorizations of random junk instead of learning to think." I'm sure in every generation it's possible to be a grump, but as everything accelerates it looks more and more like "Huxley was right"...
 
I think it's related to how much I hate practical jokes.
Other people seem to find them non-hateful, why, I don't know.
They don't even make good stories.
 
4:46 PM
@MarkI I have a slogan: "It should never be more profitable to exploit a market than to educate it." I see looking for ways to balance that as one of the purposes of society; to look for cases where that is true and find ways to make it not true.
 
@HostileFork IMO "society" needs a lot more education before it will stop violently crushing any efforts towards your slogan.
 
@earl Hm, reading up on what [catch] does in function specs, it seems like if anything should be called <transparent> it would be that. "this function isn't here, for purposes of error reporting".
@MarkI Too late, there's mind-control drugs in Brawndo...
foo: function [[attribute1 attribute2] x [type1 type2] y [type3 type4]] [...] is a very lame way of doing attributes. I never used Rebol2 so I never saw it until all this. Ugly/unmotivated.
 
5:12 PM
@HostileFork Well, it has some advantages over foo: function/plus [x [typeset] y [typeset]] [...] [attribute1 attribute2]
And you do understand why it can't be function/attribute1/attribute2, right?
 
@MarkI Er, yes. But we are looking at foo: function [x [type1 type2] y [type3 [type4] <attribute1> <attribute2>] [...], with arbitrary ordering based on what you want to emphasize.
Really the attributes just get picked up at function spec checking times and turned into bits.
 
@HostileFork (1) I don't see a big difference (2) I hate the tags because they are strings and (3) there is no semantic reason why the attribute block has to be first or only (sure, it can't be between a parameter and its block of typesets, but that's all).
 
@MarkI Blocks already have a pretty clear purpose of typesets and that confuses matters with no good visual indicator. I don't hate the tags visually. Issues wouldn't put string instances in the spec and could be compared faster as symbols, and there have been murmurs from others and you about what ISSUE!s real fate or meaning is
The thing about exposing more types is also revealing to people the nature of dialecting early on. That offers benefits to the likes of local: and return: outside of everything else--people start getting in the mindset from the get-go... instead of a defective ability to inject local values into function invocations.
 
@HostileFork If attributes are restricted to words, then I have no problem with putting them in parens if you need a visual indicator.
@HostileFork I fully understand, and agree with, your reasoning for wanting to handle locals and returns differently. I am merely trying to expand the idea range for what that "differently" may be ...
 
@MarkI Parens is a balance question of if it's of enough value to warrant interfering with COMPOSE. I'd actually say if anything did warrant interfering with COMPOSE it would be the definition of locals...so you could write generators that didn't have to work on figuring out how to put them all at the end.
foo: function [x [type1 type2] (some-local) y [type3 type4] (other-local another-local)] [...]
Locals shouldn't have typespecs
 
5:28 PM
I actually want to repurpose the block-is-first pattern in function specs to be the return type(set)s, so as to not have to use a return keyword ...
But I have no easy similar solution for locals yet. But yours looks like it's almost there!
 
@MarkI Having it be the return typeset is not a terrible idea and I also considered it, but if that's what you want to advocate for you should start putting that to Red.
 
@HostileFork Because it is still too illiterate, I am guessing?
 
Perhaps set-words could be locals?
I don't know, it's not that bad.
set-words as locals is an appealing idea, hm. And actually sort of "meaningful", even.
It is not uncommon in languages to put the return types up front as the first thing.
 
@HostileFork The only drawback would be the decorator overloading, what with lit- and get- words having a different kind of special meaning. I still like it though, despite this.
 
@MarkI <shrug> That's like saying it's difficult to program in the language as a whole where set and get have different meanings.
 
5:34 PM
@HostileFork Putting them in parentheses is at least a different kind of different :)
 
@MarkI But unnecessary, and to interfere with COMPOSE I think you need a more compelling idea.
I like the "if you do a set-word in the spec that means you're defining a local to the function" aspect. You can put them anywhere, there's no typespec. Once you've mentioned one you need another word or something before it accepts a documentation string or typespec.
 
@HostileFork I don't assume COMPOSE can not produce blocks with parens in them, do you?
 
@MarkI There's no way that can be possible!?!? What dark magic are you proposing!?!?
 
@HostileFork Yay! A challenge ... give me a sec!
 
@MarkI You don't like jokes, so I will quickly reveal: "yes I know it can be done"
 
5:37 PM
@HostileFork Thank you, I actually needed that, I am such a fish.
 
However, it's not particularly convenient or literate, and I'm liking this other idea better I think. I'm not that bothered by the leading block being a typeset. That seems meaningful... and it reclaims set-word. The set-word locals is actually interesting.
 
@HostileFork As I said, I have no objection, I do not think the "drawback" I mentioned above is even close to a deal-breaker.
 
@MarkI Okay, well even though I'd thought of it independently I had discarded the idea. So you bringing it back up as a sincere proposal that got me to think of set-words as locals gives us joint prize for most interesting idea of the day (so far...) :-)
As I've mentioned before with the whole /local => local: transition, there's nothing here that will stop you from being able to use /local as before... and you will have the behavior as before where if you specify /local as a refinement then you can pass arguments, and give them typespecs/etc.
@RebolBot
foo: func [x /local y [integer!]] [print [x y]]
foo/local "Hello" "World"
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-expect-arg.html
    *** ERROR
** Script error: foo does not allow string! for its y argument
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
That will continue to work just as today. And /local will become a documented refinement.
 
5:42 PM
@HostileFork The only difference (for now) will be what help says (doesn't say) about them.
 
One other difference. Previously /local would mask any refinements that came after it. So you could make "hidden refinements"
 
@HostileFork Oops, now someone's going to demand that that "feature" be reinstated ... :)
 
@RebolBot
foo: func [x /local y /sekrit z] [if sekrit [print z]]
help foo
foo/sekrit 10 "A sekrit refinement..."
 
; Brought to you by: try.rebol.nl
USAGE:
    FOO x

DESCRIPTION:
    (undocumented)
    FOO is a function value.

ARGUMENTS:
    x
A sekrit refinement...
 
@MarkI Doubt anyone would miss it too much, but it is a feature that has been used, so resistance would probably be more along the lines of "I don't want to deal with it going away" vs. "If the feature hadn't been there before I would have noticed and asked for it"
 
5:46 PM
@HostileFork Do I? In which function? Parts of Lest of third party code.
 
@rebolek Search for [throw], I'm just running it and not really reading why it's there... noticing a lot of repetition of things and I don't know what it's for or how it works... I could learn, but not my focus right now :-)
 
@HostileFork I found it, it's from the COMPILE-RULES function, written by Gabriele.
It adds error handling to PARSE rules and works both in R2 and R3. So that's why there's [throw]
 
@rebolek Could ignore it, but I'm liking this idea of having a block before any parameter words named being the return value, then taking set-word for locals. What do you think of that? foo: func [a [b c] d [e f] return: g [h i] local: j k l] [...] => foo: [[h i] a [b c] d [e f] j: k: l:] [...]
 
@HostileFork Sorry, but looks like mess to me. What it should do?
 
@rebolek Why does that look like a mess? Right is just an equivalent of left.
Actually, return wouldn't have a g so pretend that's not there on the left
 
5:53 PM
@HostileFork I don't understand what left means. what is [b c] ?
 
@rebolek Oops, I left the func off. foo: func [[h i]... etc.
 
[b c] are datatypes?
 
@rebolek Yes.
 
Ah, OK then.
Well I'm not sure, it saves few keystrokes, but it's too cryptic, I guess.
 
@rebolek It's not about saving keystrokes, and I don't think it's cryptic. It's bringing a few things together to get some consistency, to where blocks are always typesets for the thing that came before... but if you haven't specified any named word yet, then it is the return type.
Then it sort of distinguishes a bit between "words naming variables which are coming from the caller" vs "words owned by this function", and allows their specification in any order.
 
5:57 PM
@HostileFork If you explain it, then I can understand it, but not just by looking at it.
At least the return type (why do you need it in Rebol anyway?). Set-words as locals look kind of interesting.
 
@rebolek Why would you check argument types? What's the point?
If the arguments are all correct and the program has no mistakes or errors in understanding, it would work just as well without a typespec.
A return type spec is an optional annotation so that you can have a place to document what you return and what type, and to also give that documentation some contractual "teeth" by checking it.
@RebolBot
foo: func [a [integer!] {a comment here} b {b comment here} [string!]] []
help foo
 
; Brought to you by: try.rebol.nl
USAGE:
    FOO a b

DESCRIPTION:
    (undocumented)
    FOO is a function value.

ARGUMENTS:
    a -- a comment here (integer!)
    b -- b comment here (string!)
 
@MarkI ^-- I didn't like that flexibility, I preferred it to have the types before the remark... but the return type has a necessity of remark after typeset because if it came before it would be the function's description. So I think the pattern should not be that flexible. (Being a little more strict would ease processing of the spec, as well)
@rebolek I don't want the implementation tail to wag the language dog, but I think this is a bit more than just what's convenient for the implementation. Having locals done through something other than a refinement hack is important, and there was a notion that function specs needed to be more clever in their dialecting... so return: was an outgrowth of that. Then local:
But it seems a bit hard and unnatural to be grabbing set-words to be "keyword space" somehow, so other usages aren't jumping out of the woodwork to have more keyword-based set-words.
Using them for the locals themselves seems a more logical idea, and giving a meaning to a block prior to a word as a typeset is not un-like languages which have you state your return type up-front as the very first thing in your spec (like C)
It's a little bit tail wagging the dog, and maybe it seems like getting keywords involved would be better. Always a spectrum. Should it be foo: func [params: a b c] [...] instead of foo: func [a b c] [...] ? There is a brevity advantage, but in this case I'm not arguing so much for the brevity as for the idea that I'm not so sure the set-word-as-spec-dialect-keyword idea has shown great promise.
 
6:20 PM
@HostileFork Why it seems hard and unnatural? I like it.
 
@MarkI Yes, disappointment. Something I could do that I can no longer. Not suggesting the change is right nor wrong. Just disappointing.
@HostileFork Curious if you would have to express error! as a return type if you intentionally return them? func [foo [block!] return: bar [number!]][either number? bar: try foo [bar][bar: make error! "Not Number"]]
(not sure if that's how return is supposed to work...)
 
6:43 PM
@HostileFork I'd be inclined to make params: optional if supported at all. Indeed perhaps best to insist on params being at the beginning of the head of the spec so as not to obfuscate.
Is this a fair characterisation of your proposal (less help strings)?
type-check: [and block! into [any word!]] ; where word evaluates to datatype/typeset
argument: [[word! | lit-word!] opt type-check]
return: quote return:
return-spec: [return argument]
local: quote local:
local-spec: [local some word!]
spec: [
    any argument
    any [refinement! any argument]
    opt [
          return-spec opt local-spec
        | local-spec opt return-spec
    ]
]
Hm, perhaps return-spec would be [return word! opt type-check]
 
00:00 - 19:0019:00 - 22:00

« first day (1653 days earlier)      last day (2127 days later) »