« first day (2031 days earlier)      last day (1749 days later) » 

12:00 AM
So, a crypto version would wipe first?
 
In the debug build when using C++, then array-bearing series have their value cells marked as "writable" which puts a certain pattern in the header bits of the values. This doesn't happen in strings.
I don't know that people with that kind of concern should be using Rebol at this point in time--or ever. You could be paranoid about that, but there are many ways to be paranoid if you don't trust the rigor of the system at that level (which you largely shouldn't, but valgrind and address sanitizer have made it significantly more reliable)
 
well my EMR is written in R2 ... so should I ever want to write it in R3+, then I'd want some security
 
@MarkI If you merely want a value that causes errors you can say bomb: does [fail "someone set us up the bomb"], and then :bomb. Should your purpose necessitate it, you could test for it. My reasoning is a mixture of some philosophy as well as very concrete examples, and application across an entire codebase...as well as direct toxic exposure to the consequences in the code itself. And the examples are all laid out.
Because there are known burdens to the unset! type, and void has demonstrated strong solutions, I'd say the burden is to find real world cases that are egregious under the new model.
 
12:48 AM
posted on May 23, 2016 by qtxie

FIX: regression on fix for issue #1907 by qtxie

 
12:59 AM
@HostileFork Have you considered void-by-throw? Seems a perfect application ...
 
void doesn't want or need to throw.
The only problem you have with voids is that not all functions accept them as arguments. All refinements do (though if you have more than one argument to the refinement, they must be all void or all not)
Anyway, I'll take the data point that "even after reading several long and clearly worded arguments backed up by a large body of code and experience you're still not convinced for some reason." But without concrete code samples and arguments, I'll just have to mark it as a data point, and sigh about it, and go "oh well, I tried"
At least you understand what my decision is.
 
 
5 hours later…
6:38 AM
So the premise of Ren-C and Ren-C++ was to make an embeddable form of Rebol's evaluator. I always eyed Rebol's "host kit" with suspicion and in general thought everything based on it was "not right", and spent as little time as possible in the platform-specific portion of the code.
 
7:11 AM
Decisions in this embeddable definition are trickier even than the ripple effects of making decisions in Rebol. Because where Rebol has a lot of tricks up its sleeve for adapting to changes in the guts by redefining things, a documented C API or C++ classes reflecting the evaluator itself do not have this luxury.
I am now satisfied with things being pinned down that were pretty large questions. Is there more than one type of FUNCTION!, and hence a need for a menagerie with concerns like ANY-FUNCTION!? Does Ren-Cpp need a ren::AnyFunction, ren::Closure, ren::Function? Is there such a thing as a ren::Unset and how does it work in the guts? There is no longer, there is just optional<ren::AnyValue>.
What I have called the "life support" for Rebol...the host kit, how it implements ports and the networking, those things I have kept around in order to still have a working system to try changes on. A lot of code I didn't like I reluctantly kept patching along because trying out ideas in a vacuum means you might think something works, but you don't see a good failure case. It can be subtle and thought provoking, as has building the hello.red under the old R3-Alpha port.
But the time is shortly coming, I think, to break Ren-C and Ren-C++ off from the life support so that it can actually thrive as a library. And this means basically starting from scratch on what one might call the "host kit"...so what is there goes away.
I will snapshot a branch at the current state with the <r3-legacy> support, prior to specific binding changes. I'll call this pre-specific-binding. This would be an executable that people with old Rebol2 or R3-Alpha code could use to shore it up for basic portability questions, with the legacy switches tunable one at a time. It should run most R3-Alpha code that isn't explicitly impossibly illegal.
Then the specific-binding branch will continue for a short time. I will make changes of it based on consideration of what is convenient for me, and not worry very much about what impacts it might have on usage at Atronix. I will not deliberately sabotage their interests by gutting it, but there will be known ways in which features like the FFI will break and I will either not fix them or patch them in ways that could be considered inefficient/bad.
In other words I will still be trying to glean information from the "life support" but I will stop being worried about it if I can't keep it working and feel I've learned all there is to learn.
To give a sample of the kind of decision this codebase would have, it may well eliminate the current word symbol table in favor of using the code for string series to store words, getting garbage collected symbols/etc. Prior to a "utf-8 everywhere" situation, this could mean typical ASCII words use two bytes per character for storage instead of one--for instance.
In general, I'd be switching over to full-on changes which may break things...turning COPY to COPY/DEEP by default, changing PRINT, etc. So big changes.
From my point of view, Ren Garden and taking Qt for granted would then become the new console, with the current console--as well as the rest of the hostkit--no longer part of the project. With the evaluator still using the discipline of being a C core but with host kit dead, a new bridge would be made to supply services to language constructs like PRINT or READ, where the canon implementation is done with Qt C++ code but could also be re-done with C by an interested party if they wanted.
Ren Garden would then have a very simple console mode where it didn't start the GUI. It would still require Qt DLLs to be loaded for the networking, interprocess, and other stuff.
So attn: to @rgchris and @Brett ... --^-- this would mean that the main track of development would be Ren Garden, and it's code like the Trello, S3, Etsy, altjson/altxml that I'd be moving toward for this to be supporting for starters.
To summarize: I've been blocked by knowing that the specific binding changes were code-disruptive to usage by Atronix, and have been reticent to push them to master as well as to keep pushing forward with what I knew. I will freeze the current branch prior to specific binding, but not deliberately make it the end of the line for Ren-C versions they may wish to integrate. It's just the end of the line for 'me being super careful about how life support is affected'
Focus will shift to Ren Garden as the principal Ren-C console. This means that those wishing to build a working console will need to have CMake and at least the Qt libs installed. For those who don't care about controlling their toolchain much, you should be able to use Qt Creator and have it be turnkey. The recent work on being able to use MSVC means that basically, if one is a software developer on windows you probably already have it...so it's less prescriptive than before.
A minimal C-based build may exist as a new console, but it would likely have a radically simplified I/O model...as the idea of the host kit would be built from scratch. Basically this would be putting Ren-C in some of the same situation that Red has been in with file I/O. Any new emerging I/O and port model for Ren-C would either be based on what Red did or something simpler.
re-summarizing: Ren-C and Ren-Cpp are shifting to a focus on the library form of the interpreter being the "product", with the main demo as Ren Garden where that Ren Garden needs to be able to do a list of "key apps": PARSE plus Json/HTML5, interacting with Trello, building hostilefork.com, running Rebmu, and debugging. Ren Garden may become a kind of "PARSE Studio", even. The current r3 and r3-legacy mode would be saved to help people wanting to migrate to this new world.
attn: to @giuliolunati ^-- this means the emscripten build would become much lighter and thinner, so probably a lot more useful.
attn: to @GrahamChiu ^-- this means that Ren Garden could, if it wanted to, go ahead and add some simple UI features based on Qt. I'm not interested in doing something like cloning Red's GUI right now, until it has a formal finished definition...and even then I cringe at it doing things like using the word RETURN for doing line breaks in controls (the kind of nonsense that BAR! would help with)
But if you wanted obj: simple-dialog [name: string! 100 | age: integer! 18 99 | favorite: word! [rebol r3-alpha ren red]] it would be easy to make pickers and layouts for something like that, which would look nice and run well on Windows, Linux, and OS/X.
 
8:35 AM
If people want a R2 that is enhanced, then they can use red as most have seemed to move that way anyway
But it's time to move on and make ren available to other languages as, as a standalone, it hasn't developed the traction that we all hoped.
it's still in a far better shape than it was when it existed as r3-alpha with many bugs removed
And someone else can move it on as R3 if they wish.
I guess rebolbot will remain frozen as it is too
 
@GrahamChiu Well, this is where we might disagree, in that I feel Ren-C's mission was to resolve precisely the things that it did attack...e.g. understanding if such a thing as a CLOSURE! should exist and every author of a function worry about whether they have to make something a FUNCTION! or a CLOSURE!, or getting to the bottom of the question of what all [1 (print "Hello") 2] actually should be and having an understanding of why, or being able to have RETURNs go to the right place.
Red has also downplayed the importance of getting large numbers of adoptees or doing huge evangelism pushes at a time when not ready, and not measuring its success on that metric yet, or trying to... and it's 5 years in now.
I'm less concerned about lack of traction in terms of drawing throngs of users, or even attention from the existing crowd, than I am about the things that were not really known to be big problems that have turned out to be large new questions.
 
9:11 AM
@HostileFork very well!
 
@giuliolunati When Ren-C makes the break to drop host kit, it will be losing things like IMAGE!, GOB!, STRUCT!, ROUTINE!, and the existing PORT! and network code. All that will get split out, and re-added a bit at a time. This will put Ren Garden kind of in the same boat as Red, but different because it will have Qt at its disposal.
When things like IMAGE! and PORT! come back, they will be done so via a generalized mechanism for adding user-defined types to the evaluator through a C interface, even if the actual implementation of those types is done with C++ code. This should tie into the story for how user defined types work.
@giuliolunati If you feel you've learned Rebol well enough to understand the issues, then it would be helpful if you understood how Red is doing its I/O model in Android. I'm sure they could use feedback from someone dabbling with their Android code anyway. Though I'm not sure how far along that part of things is yet.
 
 
1 hour later…
10:45 AM
posted on May 23, 2016 by hostilefork

Red, R3-Alpha, and Ren-C all believe that the value of auto-gathering "locals" by default is high, so the FUNCTION abstraction does this...where FUNC is reserved for users who want explicit control over the locals additively (e.g. without having to mention which set-words in the body specifically to omit.) In R3-Alpha and Red, does [...] behaves as function [] [...] and not func [] [...]. Wh

 
 
3 hours later…
1:41 PM
@mikeserv RE: your long "deleted information" profile thing, you might find interesting: Code Trolling, Deletionism, and String Splitting
Or in a similar vein why was hourglass deleted. Really the thing is that generally, a lot of systems which are based on "trust us" and "too big to fail" get caught up in moderation and centralization in a way that is not user-empowering.
Hopefully someday systems will decentralize again, where each user controls their information and things merely "federate" where there isn't rule by moderation, only filtering by moderation, and you can essentially "vote out" the role that certain moderators play while not needing to entirely accept or reject some giant consensus authority.
 
 
3 hours later…
4:28 PM
@HostileFork Yes, I wouldn't expect any attention from users now or in the future. Just do what you think is right to stike the best balance of power/utility/simplicity that you can. Languages like rebol are for developers who think that Javascript isn't nearly dynamic enough. :) And I don't think many devs are adventurous enough to swallow that particular pill.
 
@Edoc I am holding myself to task to explain to the Lisp people who don't understand what Rebol was trying to do what the idea is. It is a tough argument to make to people who want to hear a fully-reasoned technical answer, because that is not the mindset from which Rebol emerged. It emerged more from "gut feeling", and some people caught onto what that "gut feeling" was.
Yet a technical formalism which can conveniently box up Rebol in a way that measures and maps out the limits of the medium and what it can guarantee has been elusive--for those who have tried to think about it.
 
@HostileFork I don't think the Lisp people are all that relevant here*. I'm skeptical that there are any converts to be gained from Lisp to a rebol-like language. They invented the "one-true-language" meme! *Ask anyone under 50 yrs old if they've ever heard of Lisp, let alone studied it or use it.
 
The point isn't conversion, the point is to have an explanation
 
4:47 PM
@HostileFork Do as you must. :) Imho I don't feel like anyone needs to justify anything-- just proudly build your beautiful thing. Fly your freak-flag high. :) "Hey world, see this cool thing? Do you like it? Is it useful? No?!? :( Ok, thanks for playing, we'll consider your feedback. Hopefully it was at least an interesting trip." Lispers have been asking "But why another language?" for at least a half-century.
 
Well, I am only interested in Rebol if it works. As I find anchor points and find those interesting to study, the language is essentially dead to me without those new features.
@Edoc So without definitional RETURN, for instance, Rebol is basically dead to me. That is the start of something irreversible, that Ren-C added and now that it's in, I would basically not see being able to go back.
 
@HostileFork Forgive me if I'm missing the point. If you personally want/need a formal spec for the language, then that sounds like a challenge. But do it for your needs, not to answer to anyone else.
 
@Edoc The point isn't about a spec, the point is about nailing an example which shows not only how Rebol is different, but shows it demonstrating fitness for purpose, and can coherently say it does what it claims.
You can get in sticky trouble very quickly if you say "everything in Rebol is a function that obeys the same rules as user functions... like IF and WHILE are not keywords functions... you can make your own"
That sounds very nice on paper, but when you start realizing that IF and WHILE seemingly do something your function can't do, things start to go awry. In Haskell you can make your own IF, and it would actually work as well as its IF. But in Rebol you don't.
 
@HostileFork Ok. This might be a conversation more easily had over skype. We all probably have differing opinions about what sets rebol apart. I know I do, but I'm no academic or developer, I'm more like a "business user".
 
@RebolBot
my-if: func [condition body] [unless not condition [do body]]

test: does [if 1 < 2 [return "return ran"] "no return"]
my-test: does [my-if 1 < 2 [return "return ran"] "no return"]

print test
print my-test
 
4:59 PM
; Brought to you by: try.rebol.nl
return ran
no return
2
 
@HostileFork So it might be frustrating to get on the same level, because I'm not all that keen on other languages (I've tried a dozen) -- I was kind of 'raised on rebol'. I measure a language by how easy/difficult it is for my non-developer brain to use the language. I'm a lot more superficial than the level you're working at. :)
 
@Edoc Well I just give the above as an example of how if you try to get enthusiastic about a feature of Rebol...like say the ability to customize it, it starts to "crack" pretty quickly to where you wonder what cracks it all has. That's a good example of something in Haskell where you can make an IF which is just as good as the system's IF...but you can't be as creative with it.
It just sucks to imagine that Rebol is so weak that if it hadn't come with UNLESS, you couldn't have written it. :-/
That's why I stress these issues and their efficient addressing and design, and how to keep pushing on it without reverting to introducing keywords or anything ugly, and to still get the things in Rebol that people like.
@Edoc If you have trouble understanding the Trello, I'd welcome your feedback on how to make it more comprehensible. I do want to shore it all up. Pick anything and ask whatever you like. A lot of it makes perfect sense to me, e.g. BREAK/WITH and CONTINUE/WITH, and reasons why BREAK/RETURN is given the axe...
 
5:22 PM
@HostileFork I had read the Trello item some time ago, and celebrated the removal of an obstacle to progress, although it was too low-level for me to fully appreciate. I see your example up above, the difference between test and my-test.
 
@Edoc Good. Yes, well the nice thing to know is that it is solved for RETURN, specifically. And the hopefully nice thing to know is that it will also be solved for BREAK and CONTINUE in the near future.
So you will be able to implement custom control constructs which say while [condition] [do code] and a BREAK in the code will not be assumed as breaking that while. Well, unless code gets its hands on the BREAK which is specifically "bound to the context created by that while". And the idea that this is done efficiently...in fact with constructs like FOR-EACH and USE becoming significantly more efficient.
 
@HostileFork So will this get us reasonably closer to Haskell land, where we can write our own IF which is almost as good as the native? (Haskell is not a practical language for a person like me, but I respect their principles.)
 
@Edoc Casual uses of THROW and CATCH, or error trapping, climb the stack specifically by their nature. This means that the state of the stack where they are executed must necessarily affect what happens. You cannot take some raw material which has a THROW in it which it does not CATCH, and guarantee that passing it to someone else who runs it will contextually have the same effect.
 
I use rebol as a personal programming language. Basically a way to write shell scripts and to reduce manual tasks. I use rebol to reduce tedious tasks which would take days or weeks to do manually (e.g., in a spreadsheet or other means) and do them within an hour. So in this sense, performance is not critical-- I'm trying to do things much faster than a human can do them, I'm not trying to do them faster than Javascript or Java or Haskell can do them.
 
So it is a bad idea to pass anyone who is executing code on your behalf an unlabeled or poorly labeled THROW in a block.
But, this might suggest definitional THROW and CATCH are needed to keep them in the scope of a function.
 
5:38 PM
@HostileFork What do you need to be able to decide? Are you getting the input/feedback you need to design something which represents true progress?
 
@Edoc Well, the machinery by which definitional RETURN is solved is very different than the machinery by which the cost of closures copying their bodies on each invocation was eliminated that enabled FUNCTION and CLOSURE to unify under one much nicer FUNCTION construct. Yet the implementations of both techniques will need to be pushed forward to get "definitional break+continue+throw"...
I need some time, and motivation I guess. Yesterday I announced the "new plan" and its phasing. The current Ren-C master is being frozen in a branch that is the last "supported" drop for Atronix or those wishing to convert their Rebol2 or R3-Alpha code to Ren-C.
It is not the last drop before the "great slicing out of the Ren-C lib from host kit." Just the last one where I'm going to be too angsty about whether I'm breaking anything I don't personally care about for Ren Garden's purposes or Ren-Cpp clients.
So that means there'll be another drop with all the "specific binding" changes, which add complexity but I believe it's curated complexity. Following Occam's Razor it will be as simple as it can be to achieve fitness for purpose, but no simpler.
Having made the decision for this course, I should be able to more comfortably proceed. It will put Ren-C in a bit of a state like Red's for a while where it will have ad-hoc solutions for network and file IO. But Ren Garden will have Qt and quite a lot to draw on to fill in gaps.
The ultimate hope would be that the "cleansing" phase would make it easier for Atronix to re-uptake the cleaned up artifact in the form of a lib. If they were already using much of Ren-C as of these late drops, that would hopefully make it not too hard. But the artifact has to be removed and tidied up, as a nice embeddable lib for both C and C++ programmers.
 
5:54 PM
@HostileFork Where is the announcement?
@HostileFork Why do you need to "hope" for Atronix to do something? Can't you contact them and coordinate with actual people? Maybe I understand too little around here...
 
Well, not so much an announcement as "some stuff I said yesterday". It should be not so much considered a committed statement of what will happen, so much as "if this is not what happens, nothing will". I'll have to see how the work feels to decide its viability, or if Atronix will be the maintainers of the Ren-C based Rebol.
@Edoc Sure, but it's hard to coordinate with someone if you don't know what your own priorities are! As I mentioned, given it's not an "announcement" of anything other than "I'm going to try this plan and see how it goes" then there's not much to coordinate over yet.
 
@HostileFork Ok, it sounds like some stuff to work out with some people, as opposed to "throwing it out there" in a chat-room as a substitute for actual engagement. :)
But what do i know? :)
 
@Edoc Well, it's thinking out loud, which I do a lot. But I do not particularly want the burdens of coordination right now, because I have my own agenda. Yet I think that when someone with their own agenda sits around philosopherizing all the time and "goes dark" when people might have a stake in what they do that's not so fair, and Carl was kind of bad out that.
Anyway, I am writing up some notes for Atronix, yes.
 
6:42 PM
@HostileFork Don't get me wrong; I'm glad you're thinking out loud publicly. Thanks for taking on such challenging work.
 
@Edoc Well it's good if more people understand the issues. My hope is to show that the language itself can hold water, and that it can still be "light". If it comes together that Ren Garden demonstrates "coherence" albeit being kind of fat due to the Qt dependency, while Red demonstrates viability of a systems-level programming dialect and how small it can be, maybe someone can put 2 + 2 together and see it as best of all worlds.
Jul 12 '15 at 13:29, by rgchris
See also: Twitter, Etsy, S3...
@Edoc Have you seen those (courtesy of our Czar of Elegance) --^ I consider those to be a compass point of where we need to be headed, when Ren-C-ified they get even better. The syntax highlighting has three different themes, you pick with letter keys D, L, G. I like G best.
@rgchris Although Czar, I do still agree with ][ when on its own line to avoid the "noise" of the spaced form as ] [, but I just don't think I can get behind blah [blah blah] [blah blah][. It breaks uniformity in a way that doesn't have the "unique" status as being the only thing on the line to warrant it becoming like "one symbol".
 
7:14 PM
@HostileFork - just found this - Joe Marshall (Rebol 1.0 implementation author) talks about some R2 mistakes. Never seen it before. Then Gabriele steps-in. It is difficult for me to take sides, as those topics simply turn into being deep and having many consequences, if changed - arcanesentiment.blogspot.cz/2008/08/better-rebol-info.html
 
@pekr Joe's mechanical concerns seem he knew what he was talking about. One will indeed likely achieve unsatisfying results writing a Rebol interpreter in Lisp, with the mindset of wanting it to work like Lisp. Many of the intuitions of how Lisp "should" work is what makes it able to be compiled. But as for the mechanical problems he mentions specifically, they are resolved in Ren-C.
Gabriele pushed the conversation away from the fact that function's implementation method--prior to Ren-C--was a bit wonky because it was hard to "do the right thing" efficiently. (R3-Alpha gave up and "did the right thing" by being inefficient and introducing CLOSURE!, but still left FUNCTION! around in for the common case of the performantly-minded, leaving users with a puzzle to figure out which to use and when.)
So instead he mentions that word: use [a] ['a] is explicitly supposed to allow the word to escape its "environment". That that is the design and the point. Whether you think a language that works in this way is a good idea or not is a separate question.
Ren-C has a design ready for an unimplemented feature of "hybrid" contexts, which let you define some of a context's variables as being "contained" so they can't escape, and some so they live on. The proposal is that FUNC might perhaps default so that all its frame words die after the function call is finished, while FUNCTION defaults to them all surviving...but the idea is that each key could be turned on or off.
The working name for this is <durable>. I was thinking it might be controlled by true and false literals. So make function! [[x [integer! $true] y [integer! $false]] [return [x y]] would give back a block with two words, but only the x would be able to be looked up after the call.
@pekr In those comments I think both Joe and Gabriele are right. Gabriele is right that there is a premise that Rebol is based on that is different. Joe is right in pointing out that how this premise has been executed without rigor would suggest a lack of understanding of how to implement a viable programming language system.
 
7:44 PM
Well, Gabriele also refers to some ML thread there. It is also important to note, that Rebol 1.0 was dog slow, 10x slower than R2. When R2 came, it contained parse and networking and the exe was much smaller than 1.0. So ...
 
Good news is that Ren-C is past the issues Joe is complaining about...so really one is now down to the "is it a good idea to be able to write func [a] [return 'a] and look up that word later.
Yet we've already kind of come to saying it needs to be okay. Users should be able to write foo: function [x] [y: 10 | return function [z] [x + y + z]] It's not "environments" doing this, it's the bound words themselves, as Gabriele says.
@RebolBot
make-adder: function [x] [
   y: 10
   return function [z] [x + y + z]
]

adder: make-adder 1
print adder 20
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-not-defined.html
    *** ERROR
** Script error: x word is not bound to a context
** Where: adder
** Near: adder 20
 
@RebolBot
make-adder: closure [x] [
   y: 10
   return function [z] [x + y + z]
]

adder: make-adder 1
print adder 20
 
; Brought to you by: try.rebol.nl
31
 
9:10 PM
@HostileFork I asked you the other day if there's any advantage to use an Android C++ compiler to build on Android. It doesn't require the NDK.
 
@GrahamChiu Ren-C as a static library, no advantage. However, if the efforts I'm describing putting together happen which are likely to focus on getting cross-platform services from Qt go forward, then a C++ compiler would be necessary to build the host app if one wanted to read from networks or display images, etc. I don't know what the build dependencies are for Qt for Android compiler-wise.
 
@anyone remember how to get a particular extension supported for syntax colouring on github?
@HostileFork And for a ren-c exe?
 
@GrahamChiu The current Ren-C exe is an entirely C codebase in terms of its semantics, which gets no user-facing advantages from being built by C++.
 
@HostileFork Ok, let me rephrase. There is a C/C++ Android compiler available which does not use the NDK to build apks. Is it worthwhile to use to build android ren-c binaries
@giuliolunati I think builds all of his stuff directly on android
Seems painful to work on a phone to do development!
I think it was pygments.org that is used by github
sigh .. have to find an irc client to talk to them
 
I'm basically officially saying that I am ready to break off from the host code, which would include everything from the likes of the host-main.c REPL to all the REBREQ stuff and everything using it.
I'm giving Ren-C and Ren Garden a "fresh start" to redefine the interface through which such code might be patched back in, but I do not feel handwritten and hand-maintained code at that level is the right priority at this point in time.
Hence the interface will be re-defined and implemented via C++. This is a bit like what I had suggested with freebol.org
The difference is, the evaluator guts are a static lib in C, with some "weird methodology" behind it.
 
9:29 PM
@HostileFork Not certain I understand. You mean as opposed to: blah [blah blah] [blah blah] [ ??
 
@rgchris Yes.
 
Perhaps github is no longer using pygments after all but github.com/atom/highlights
 
If I felt okay with blah [blah blah][blah blah] then I would feel okay with blah [blah blah][blah blah][. But I require blah [blah blah] [blah blah]. Hence the pattern-maker in my mind rejects blah [blah blah] [blah blah][...
 
@HostileFork Thus Ren-C would introduce a Qt dependency for anything that required file/network io?
 
@rgchris No. Ren-C would depend on the host to provide the services, which is already the case in how the host kit works. It would be through a C hook, but once you were implementing that hook you could do it however you wanted. I'm just saying I want to tear out the existing way in which host services are attached to Ren-C entirely, and start it from scratch.
My thought has been that the "port model" and "schemes" should be the way in which host services are provided, and this has kind of been the trend people have suggested. For instance earl thought CALL should have been done as a "call scheme".
 
9:41 PM
@GrahamChiu I think this is where they store their language definitions: github.com/github/linguist
 
Which is to say: Rebol's C guts are linked to the host through C function tables, to call host services...even things like "get the current time" or whatever. These service implementations do not speak all of Rebol, they speak the "RL_Api". So if you are writing a serial port scheme, you don't have as many routines available to you for interpreting Rebol types as you would if you were writing a native.
 
@rgchris Yes, I have to create a .gitattributes file I think
 
But Ren-C flipped this all around so that the extension API is Rebol's guts. That Rebol's guts have been made better-enough that they are the API.
So basically, the RL_Api goes away. Perhaps some guts functions are marked with "more or less stable" and people avoid the unstabler ones if they can when writing extensions.
Then, what you're doing when you write a host behavior is you're just making a Rebol object. When you define its methods and pick apart the parameters inside the C, you're doing the same thing as a native.
Rebol already apparently underwent a host kit factoring. Originally we assume it had the native code for PRINT and it would say #ifdef WIN32 {call WindowsPrintString(xxx) } #elseif LINUX { call linuxprintstring(xxx) } #else ..., basically a switch statement on which OS was running.
But you don't really know what kind of host you're running on--consider something like Ren Garden that has even stranger desire to write to its own GUI widget as a terminal. If it were hardcoded what PRINT did, then Ren Garden couldn't supply a custom function for "what to do when print gets called"
So instead of linking to a fixed function (or switching on a fixed number of functions), there's a table of function pointers the host fills in. PRINT directly (or indirectly) winds up doing its work by calling functions out of that table.
But that's making the connection the "old fashioned way" via C. I'm suggesting that how even these low level things work might be done through the exchange of Rebol types, calling things that are styled as Rebol functions, which instead of being in tables of C function pointers are in objects...like a port.
 
9:59 PM
@HostileFork What does that mean on the Rebol side of development? If I were to write another interface to a web api like Twitter or Etsy, would this affect how I'd approach it?
I suppose it'd be more likely if I were to write some portions in C?
 
@rgchris Frankly, I think people are probably using a sufficiently narrow subset of READ and WRITE in practice that just hardcoding behaviors in the Ren Garden host would be enough to cover it. So READ and WRITE simply wouldn't be in Ren-C the static lib's basic natives for starters...but be natives supplied by the host.
As long as you are running your code on a host that supports the operations you need, you wouldn't change your practices.
Ren Garden's goal would be to provide the services people are actually using. The trickiest things would be stuff like webservers, but it might actually not be that tricky.
The scariest thing to me about the artifact which would emerge is all the open issues with binding and the module system and stuff like that. In other words, I can delete things that displease me and keep things that please me at this point... all the stuff like DELECT being removed from Ren-C's core...
But anyone who wants it can link it in via their host, because of how Ren-C now works.
...but there are some big things still which I can't delete and which are not "solved".
Modules being the biggest I can think of offhand.
I'm not worried about wiping out all the clipboard code to know if you say read clipboard:// in Ren Garden if it could be made to work as well. It could be made to work much better, on all platforms. With very little code. Ren-C++ combined with Qt makes short work of this sort of thing.
 
10:18 PM
I'm not sure I understand. A stripped down renc would lack a tcp stack. If you need it, you write a wrapper yourself, and implement words to use it?
But you're going to make this a lot easier then before?
 
@GrahamChiu Well that's sort of how it was already supposed to work. People think of rebol.exe as a monolithic thing even though it was structured as a library and a host, because the host kit design was not very easily composable into interesting alternative results. The API was very much just the "string in, string out" kind of processing.
So yes, it's a matter of "now it's easier to make a host and compose it differently".
 
so we would then have

needs: [ 'tcp 'smtp etc ]
like most languages do when they need essential host services
 
Something like that seems like a good idea, as opposed to just giving an error the first time you see read tcp://...
 
It would strip the binary down. We don't need all the host services often enough
 
Being able to load these from DLLs is a thought, and the idea of going through Rebol object and function calls assists with the "decoupling" needed (vs. static linking)
 
10:26 PM
Just hope it's not going to mean a lot more scripts breaking in future due to different implementation of services
 
Well the goal is not to actively encourage a lot of different implementations.
@GrahamChiu What I am describing is basically a survival tactic for the Ren-C library, to get it unhooked from all the cruft and baggage of the parts of the code that are not the evaluator, PARSE, debugger, and basic language stuff.
 
so where exactly would be the definitions of the host services come from?
and say you always wanted tcp built in, would you have the option of using TCC or whatever to build custom binaries?
 
@GrahamChiu Well note that today, what you have are "Devices". Here is a table of the devices: github.com/metaeducation/ren-c/blob/master/src/os/…
So that is the table Ren-C looks for... it is expected to be supplied by the host when the whole thing is compiled and linked together. PRINT the native knows which slot to look in for the "stdio" device, and can send data to it.
A device is just a set of C functions. PORT!s are higher level, in that they are objects which have Rebol functions in them, that can do various Rebol processing but eventually wind up at a READ or WRITE probably that talks to these Devices.
 
10:43 PM
But if the run time doesn't have those compiled in, can it load in those devices in this new way of doing things, and if so, from where
 
What I mentioned was the idea of "all is PORT!"... that basically, a Device is just another port. This would make it easier to decouple things. It means that if you have a native like PRINT it won't be able to do a bunch of processing of something down to a char* array and pass the char* and a C size_t over to the stdio device to take it from there...
Because the protocol the stdio device speaks will be to be called as if by Rebol functions, even though it's being called from within a Rebol native like PRINT.
So you will pass it Rebol-valued data, and then inside the device it will use Ren-C to pick apart that data.
In other words, it has gotten very easy + clean + efficient to call arbitrary Rebol functions from C now...and when you are in a plugin DLL it is just as easy to work with Rebol data as it would be in a native.
If you are dynamically loading your stdio device, or your DNS device, or whatever then this would happen via DLL.
 
Ok
So, we wouldn't be downloading source, compiling to C on the fly with TCC and then loading it in as a dll
 
11:00 PM
@GrahamChiu Not what I'm talking about, no, but it is important to mention that I'm not talking about ending the idea of a Rebol system like today's which is buildable with TCC. I'm just saying that when all the assets and concerns are taken into account with scheduling and willpower, that the best bet going forward to showcase the part of the work I consider to be novel and important is to use the assets of Ren-C, Ren-Cpp, and Ren Garden.
At this moment, all the Rebol host code is doing is holding back development. And that starts from the console nobody can love that is host-main.c, all the way through.
Red is doing the "write the whole world on N platforms" approach, which I think is tough even when you've got more people and willpower. In the meantime ignoring the definitional returns or function/closure issues, or binding and things things I've looked at. Still very much "Rebol2" mindset there. So we're basically at zero overlap of efforts.
I want to reduce the size of the unique maintained artifact to that which is potentially of actual interest. I do not think a lot of old C code implementing a network stack that is very difficult to understand or debug is the right unique code to be maintaining for Ren-C. It should be pared down to the working evaluator so that progress on real things--like the debugger--can be done in Ren Garden.
Anyway, there's a queue of work that needs to be tended, including going ahead and switching the indexing for the "0 hole". Speaking of which, given voids, should pick next [a b c] 0 be an error or give back void?
 
My instinct says error, but void? is less work in checking for these things
If you then want an error, you can throw one
 
11:17 PM
@GrahamChiu Interestingly, variadics make it possible to make something that checks for errors as easily as a void. This might be an interesting application of ok?, in fact. What the varaidic could do is say it takes no fixed arguments, and then sets up a trap and evaluates what comes after it from within the trap.
ok?: function [arg [any-value! <...>]] [
    trap/with [take arg | true] [false]
]

unless (ok? value: pick next [a b c] 0) [
    print "The evaluation encountered an error"
]
 
Whatever makes it easier to write in a concatenative style of passing values and functions
 
@GrahamChiu ^-- do you understand what that is doing?
 
@HostileFork I'm multitasking!
 
This is about the "generalized evaluator hooking" that earl was excited about but never came back to see implemented.
 
Just remind me, | is some sugar?
 
11:29 PM
| is the BAR! type. Dialects handle it differently, but in the default evaluator it is an "expression barrier", so that evaluates as [(take arg) (true)]
 
like a space?
 
The above actually may have broken behavior in a couple of ways, so I should study it...the ways in which it is broken can probably be mitigated. Problem is that it's trapping an error that occurs while source is being traversed at a higher stack level. It shouldn't be able to trap that error and continue if the expression was only partially processed...basically a trap during "vararg arg consumption" needs to poison the DO frame...
@GrahamChiu It has the isolating properties of putting the things to the left and right of it in parentheses. Visually speaking, it helps "space things out" so you can guide readers, it's also very cheap...
Function Changes on Rebol3 Porting Guide ("Ren-C" branch)
>> append [a b c] 'd | print "Hello" Hello >> append [a b c] | 'd print "Hello" ** Script error: Expression barrier hit while processing arguments >> append [a b c] ...
✍ 2 comments
 
oh, so used inside a block?
 
@GrahamChiu Doesn't have to be inside a block (is all code in a block?) But it really is a literal value thing. length [a | b] is 3.
 
vs console
 
11:38 PM
You can use it in the console too
It can only appear between complete expressions, and some constructs have other rules for it.
 
>> add [3 * 2 | 2 * 2]
@RebolBot delete
 
@GrahamChiu No, you can't do that. But nor could you do add [(3 * 2) (2 * 2)].
In CASE statements it can only occur between condition/body pairs. case [1 > 2 | 'bad 1 < 2 | 'good] is not legal, but case [1 > 2 'bad | 1 < 2 'good] is.
You must be at a "full stop", so maybe it's better to think of it as a period than a space.
 
>> do [add 3 * 2 | 2 * 2]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-no-arg.html
    *** ERROR
** Script error: add is missing its value2 argument
** Where: do
** Near: do [add 3 * 2 | 2 * 2]
 
| add (3 * 2) (2 * 2) would be legal, and add (3 * 2) (2 * 2) | would be legal, but not at any other position there.
RebolBot doesn't speak Ren-C.
 
11:44 PM
it's wrong anyway
 
@GrahamChiu Well it infix OR'd what you gave it. What did you expect it to add
But with expression barriers, that would not be legal because add hasn't stopped gathering arguments. It's not "between" at silence.
 
Ok, I'll need to wrap my head around |
 
Mechanically it's a thing that can't be passed as an argument, but gets skipped if it's not in an argument gathering spot.
But that's only its application during DO. Other dialects could use it for other purposes, you just can't do something like |: 100 because it's not a WORD!
So you can't redefine it, it's a literal form of its own datatype... BAR!
@GrahamChiu Clarification: add (| 3 * 2) (| 2 * 2) would be legal, but pointless in that case, as those groups are not dialected and so they have barriers implicit at the beginning, and add (3 * 2 |) (2 * 2 |) would be legal in terms of the groups evaluating but not forming legal parameters to add, because if code ends in an expression barrier it returns void...much as if it were add ((3 * 2) ()) ((2 * 2) ())
The form of ( ... |) as "evaluate but block the leak of any result" is sort of interesting, and perhaps more memorable and symmetrical as (| ... |) despite the superfluous leading BAR!. One might even imagine it as the way to stop parse from substituting in the result of an evaluation as a rule.
parse "aabb" [some "a" (| append data "thing" |) (reverse copy ["b" some])]
 

« first day (2031 days earlier)      last day (1749 days later) »