« first day (2360 days earlier)      last day (1420 days later) » 

2:26 AM
On the other hand it's good to get anything done!
 
 
5 hours later…
7:06 AM
So R3-Alpha supported APPEND on a FILE! port. This has an arguable usage in terms of a polymorphism of where you can have a PORT! or a STRING!, and not have to worry about deciding whether to WRITE/APPEND vs. APPEND to it.
But I think this is kind of junky, because as a port operation, APPEND doesn't naturally fit in... e.g. you can't append %some-file.txt "data-to-append-to-file" because you'll get %some-file.txtdata-to-append-to-file.
 
7:21 AM
But this would be true of PICK and other things. I'm not sure what to think about it. With this "automatic conversion to a port", exactly what operations do this and what ones don't? What's the philosophy?
 
7:38 AM
This leads me to an odd thought. What if FILE! and URL! are not mutable through standard operations, and instead are interpreted in their port meanings, e.g. they are not ANY-STRING!, but can be aliased to strings? e.g. AS STRING! gives you access to their underlying representations, yet they are seen as "hardened" such that the interpretation of appending to them or picking from them is interpreted as speaking about what they refer to?
 
8:07 AM
The other way of thinking would be, if you have a FILE! or URL! in your hand, and try to do an operation on it that does not take a FILE! or URL! but does take a PORT!, then it is willing to do the conversion automatically...run the operation, then close. It wouldn't be worse than how it's done today.
 
8:44 AM
well, write on a url! does that
It opens the url as a port, writes to it, and then closes the port
 
@GrahamChiu But not under any generic rule. There's pretty literally an if (action == SYM_WRITE && !IS_PORT(thing)) { open port }. Just a short list of things that will do this.
 
@HostileFork well, yes. In the url, it's because Gabriele wrote it that way in Rebol and not C code
 
@GrahamChiu There may be more code that does it, possibly redundantly, but it's in the C code as well.
 
@HostileFork maybe that's for a file!
I haven't seen the code for WRITE on a file
 
@HostileFork Yes that would be a good thing to do. I'm already keeping a count(er) so storing history with this really makes sense.
Also this should then allow us to look at be able to edit multi-line entries as if one line.
 
8:57 AM
@draegtun Ideally there'd be some kind of console port where you get translated key press notifications as events... but I think it's just a slow process of one feature moved at a time.
The host-repl function knows what code it's giving back, so it can keep a log, but the C code needs to ask for it, so there'll have to be another callback.
 
 
4 hours later…
12:50 PM
I've created a new blog for image processing with Red: http://redlcv.blogspot.fr. You'll find basic examples of using… https://twitter.com/i/web/status/853945888804360193
 
 
3 hours later…
3:24 PM
@HostileFork Best way to eat an elephant is a nibble at a time :)
While on small nibbles... Regarding ~/.rebol which was briefly discussed with @rgchris recently. I noticed in boot/sysobj.r there is a USER construct commented out of the SYSTEM object. This looks the right place to define what we need here?
So for now I've uncommented it and added system/user/rebol. In host-start function I then populate these if directories exist - github.com/draegtun/ren-c/blob/add-repl-skin/src/os/…
So this is what I see....
>> system/user
== make object! [
[self: name email home rebol words]
[
name: _
email: _
home: %/Users/barry/
rebol: %/Users/barry/.rebol/
words: _
]
]
So I can now use system/user/rebol to pick up my REPL config file (%repl-skin.reb)
 
3:42 PM
@draegtun Sounds like a plan... hopefully people will chime in with improvements if they find something's not working for them. There was some debate on how get-env and set-env should handle variables that aren't there... I also kind of was thinking that it would be neat if it were done with environment/var and environment/var: as a kind of extension that looked like an object and could be enumerated like one, but was an interface to the OS environment.
 
4:30 PM
@HostileFork I assume system/user is part of %user.r but wasn't finished for Rebol3? Anyway this seems right place to put local Rebol stuff. As I've never used %user.r% on Rebol2 then anyone got any thoughts on this please shout :)
So system/user and ~/.rebol seem good place to also put local modules (ie. libraries). However I've noticed there is a system/locale/library as well?
re: ENV - Thats a bit like Perl then, it has a $ENV{} hash variable. So $ENV{HOME} would return what's in $HOME. Blank if empty. If you wanted to test if $HOME is set then its exists $ENV{HOME}
 
@draegtun I'll try not to have too many thoughts about it, if I can. :-) The technical question I have is regarding how the interpreter services can be used to build something like a module system in userspace, to have the decisions on what look like it could only be a baked in syntax done with C code, instead done via (hopefully) code that most users of the higher-level language can read and understand.
It's still far from being "real", the R3-Alpha module system relies heavily on routines for binding that don't feel that generic, and while it had a lot of code in it, I feel it spent more time on compression and checksums than it did on fundamental questions of dependencies and how the binding actually worked in the large.
And it created a new baked-in type MODULE! without totally explaining what the motivations were for this new type beyond OBJECT!, exactly.
@draegtun I had a philosophical remark the other day that foo/bar should be thought of as eval :foo/bar, and that :foo/bar should be thought of as pick* foo 'bar...where PICK* is the core version of pick that returns void if the thing is not there, and PICK is a wrapper over that which turns voids to blanks for convenience.
Which then, caused me to decide that eval () should be an error, which seems sensible enough...e.g. the evaluator does not know how to evaluate a void, because it will never see one in a block.
So if something is not there, I think it is a unified interface for a/b to be an error, and for :a/b to be void. If one wants the "blankification" then use PICK a 'b. This would apply to maps, objects, fake-environment things, blocks...
 
5:00 PM
posted on April 14, 2017 by hostilefork

This is the start of work on improving encapping, by removing it from the C code and putting it into the host, such that the encap tool and the encap checks are done by platform-independent Rebol code. Hence a Windows Rebol executable could encap a Linux Rebol executable that was acquired from somewhere else. Though this commit only contains code for ELF, @ShixinZeng is working on a Wind

posted on April 16, 2017 by gchiu

** Version: 2.102.0.3.40 ** ** Platform: Windows win32-x64 ** ** Build: 15-Apr-2017/4:17:49 ** ** Commit: 6d69673 ** a: make object! [b: 1] == make object! [ [self: b] [ b: 1 ] ] construct [config: 1] a Assertion failed! Progr

posted on April 16, 2017 by hostilefork

The current implementation of IF considers it to be a standalone, arity-1 operation, which either allows you to keep processing or fail: >> parse "" [if (true)] == true >> parse "" [if (false)] == false This is quite counter-intuitive, and as a pattern is not extensible to allow for things like EITHER. It would line up better with the expectations of users and the behaviors of t

2
 
 
2 hours later…
6:34 PM
@giuliolunati , I spoke privately to @angellom1 who was interested in Rebol on Android (in the Red Spanish chat) and told him you're the one who added support for that. He said he would like to know more. You can message him privately if you don't want to write in the Spanish group.
 
7:07 PM
@Adrian ok, thank you. He needs my email address? giuliolunati/gmail/com. Or better @angellom1 would join to this chat?
 
7:18 PM
@GrahamChiu Bit late to party on this but how about rebol/user/library instead? See my comments above.
The change will be part of my current REPL additions (hopefully be in a PR will soon!). Also in future we could bring back %user.r which could be used to update rebol/users object with custom changes (though I would prefer %user.r to live under HOME)
@HostileFork Module system in userspace would be best. Do check out Include (github.com/saphirion/include) in case this could be handy to use? (certainly be handy to have that pre-processor!)
@HostileFork Overall I've liked our the Rebol 3 module system has worked... so if it works along same lines that thats good :)
 
@draegtun It would be helpful if someone following the pros and cons of Red's preprocessor, who's seen that and "prebol", and knows a bit of the module system...to come up with a theory of preprocessing. I realized the other day that it would take macros to write something like return-if-true: func [x] [if x [return x]] that did what people intended, and I have a couple other motivating examples for why macros help out in light of Rebol's inability to pass implicit "definitional" parameters
I still don't understand if you can build a function from source dynamically and use macros in it, or what... do the macros expand at MAKE FUNCTION! time? What times are these expansions done?
 
I've not used Red much and not touched it's pre-processor / macros at all. However I can appreciate they could be useful. And prebol (or include) is definitely handy when you don't have a module system at all !!
 
@draegtun If you ever found a moment to write up a "here's what I like", "here's what I don't like", "here's what I can't do that I should be able to", "here's what's probably impossible" kind of essay that would be helpful. I kind of want the same thing for ports from those who use them.
The core code is now pretty resilient to change, we can make drastic changes and be on top of what's going on
So it should be possible to move the code at the speed at which we can define what it should be doing.
 
7:34 PM
@HostileFork I think its the fact that a pre-processor phase is built in is whats important. Otherwise you have to expand it in code yourself
 
@giuliolunati I think if you go to the Spanish chat and click on his avatar to talk to him privately, it would be easier
 
This would be triggered by a --switch command line switch OR something in the Rebol [] header
(or both)
Obviously include would expand automatically
 
@draegtun Well, if I come up with a convenience macro like return-if-true that I don't have to pass the return I mean, I'd like to be able to use it in w: 'return-if-true | foo does compose [(w) 1]
If I only get macros as a pass over during the first wave of module loading, then subsequent dynamic functions can't use them
And as I say, I don't know what the granularity would be. Every time you MAKE?
 
Not sure how Red does it... but probably it does macro expand on LOAD ??
 
I really have no idea, but for almost all these things, I imagine them to be kind of "sketchy"
 
7:38 PM
probably a refinement to switch on/off?
 
Well it's just this notion of being able to say x: 1 | add-10-to-x and have that work, despite not saying x: 1 | add-10-to-x 'x
How well can that be made to work, and in Rebol's world, when binding happens, the macro has to be "effectively expanded"
Because if the expansion happens at some later time, add-10-to-x cannot remember what x its expansion should refer to.
Doing one big expansion at load time isn't a generic solution to the desire.
 
Well if we go down the Red macro route then we do have to plan carefully! At moment just having (some|all) of the features that prebol/include has is good I think.... even if its just part of include %file-with-pre-processor-stuff-in.reb
 
Having that instance of add-10-to-x be able to be walked into by BIND, as if it were expanded at all times, and leave the add-10-to-x node there... is technically possible, and with the way Ren-C works there's even infrastructure and places to put annotations for that.
We could call that "expansion binding" :-)
Well, anyway, this is what I'm talking about when I talk about thinking about what the need actually is... and how to solve the actual need. I'm not that terribly worried about performance, so much as expressivity.
Hence seeing use cases and saying "this is a good use of a preprocessor because..." with a strong motivation is important
 
7:55 PM
I would have thought one strong motivation for a pre-processor would be to use to load files you want to encap? ie. load an image which then get distributed with with exe
 
@draegtun We are doing that just with plain old zip and a virtual filesystem, encap://images/thing.png
 
ic... but I assume Rebol2 used prebol?
 
Dunno, spent little time with Rebol2 and never had a version that could encap
 
Me neither! Just think I read something that showed that.
If there was a pre-processor hook then you could do something like.... Rebol [dialect: rebmu] nOwSomeRebMu dode
 
@draegtun We're trying to do it better, in userspace
If you strip red's executable, you'll notice the encap breaks.
 
8:00 PM
and pre-processor would automatically run %rebmu.reb, parse over code, and then run it.
 
Well, there are ways to do that specifically without preprocessing
 
Or even at command line r3 --dialect "rebmu"
I know
 
But we do want to do that, and I even want Rebmu [] thIStoWOrk
 
but its all about some extra phase that could be triggered
@HostileFork Yes both ways will be good.
but it needs to be some automatic standard... which triggers the necessary module to parse the code, change it and then run it
 
And that reminds me I need to do my Rebmu updates, but it would be neat to have encapped downloadable rebmu executables.
 
8:03 PM
@HostileFork Yep
 
Having looked at some of the meaner competitors on Code Golf, I still think it's possible to rival them with a standard library that steals their tricks
Especially when you think of all these Jelly-like function compositions, assigned into unicode characters, using variadics with quoting
Just steal a little of every code golf language's tricks
 
I still do Rebol CodeGolf on occasions. Spent more time on Reddit DailyProgrammer lately.
However for RebMu... I need a Rebol > RebMu convertor :)
 
@draegtun You're missing the fun. :-)
 
Hahah..
 
What's nice is that lowercase Rebol is legal Rebmu
You can just slip right into it for debugging
I actually do enjoy the sort of meditative act of programming directly in it, and thinking about the "Q"uality with a capital Q of it.
 
8:06 PM
To really up-the-ante on Rebmu it needs some extra version where it does, things like, a LOOP [READLINE | process READLINE]
 
And several of the realizations from working that way have made it back into making the language itself better.
Well, getting to the point of userspace REPL, an encapped version can have a custom REPL
 
Lots of the golfing languages do that to save lots of space on data munging exercises
 
I do need to go over all the examples, bring things up to date. I am trying to think about the relevance of ELSE and if that should be E
 
Always wondered if first part of Rebmu code describes... i) What version of Rebmu it is & ii) what modules or sub-dialects are to be loaded
you can then tailor Rebmu for lots of specific golf challenges :)
 
@draegtun Yea, needs something like that. I was experimenting with abbreviator tools too, like .AbCdE.mmmNNNoooPPPqqq to at the heading abbreviate anything you use frequently
I don't remember exactly, but something like that, except designed to save space of some kind
Just being able to switch modes fast
 
8:10 PM
yep.. that would be really useful for golfing!
Have to dash now, but will be back tomorrow. Hopefully I can finish off REPL stuff (it's all working fine but there's some more things I want to look into)
 
@draegtun Did I ever tell you about the crazy self-dissolving variadic trick, where your parameters are varargs but the function generator turns them into functions that take the variadic once, then on subsequent references give back the same value? I'll have to show you if not.
 
@HostileFork No you didn't! But you can tomorrow! Tatty bye for now :)
 
Cool, looking forward to it. And yeah, I think becoming a real demon of a code golf language would be a way to get some popularity for Rebol's tricks.
L8r
Though I guess I wonder how much languages like J are getting extra exposure from it. Maybe some. (I wouldn't know about it)
 
8:24 PM
@draegtun the locale/library was a quick fix to remove the definitions for user contributed modules and scripts out of the binary distribution.
My experience so far is that if you're developing code, you want a location to pull up your own scripts as well as pull code from remotely. So, it pays to have two locations for this.
@giuliolunati wants to use the modules path to do this, and have it fall back to locale/library if it can't be found locally
 
@HostileFork Um. Here you mean item to be item ::= inactive-value | active-value-of-arity-0 | active-value-of-arity-N item-1 item-2 ... item-N | ( item ) which I would call an "expression tree" and is what Carl only calls "what DO/next does".
Seems like "item" is a little to ... singular ... to encompass the entire concept.
 
So, the proposal is that we import <library> directly and we do it indirectly by import 'library
Now do we really need a third location? And if so, how to access it?
 
@HostileFork There is a similar issue with the lexical item defitions. You want to recognize an input pattern by removing irrelevant formatting, but you would like the spec of that formatting to be available to the output formatter.
But there is no way in PARSE to specify the pattern without also specifying that it is being ignored or converted somehow.
 
the fall back above only applies to modules, as you can't do a word. So, would rebol/user/library be the primary source for scripts with fall back to locale/library ??
 
I am considering a two-level approach, that is, a DSL that can be parsed one way to produce an input validation ruleset and parsed another way into an output formatting template.
@HostileFork If it helps, I have not seen anything yet that I am jumping up and down hurrying to disagree with.
I still hate keywords though, fair warning.
 
8:42 PM
@MarkI Good news. But eval isn't a keyword, I'm using the word for the function!
 
@giuliolunati :) Yes, I have a personal dislike of foo and bar and baz nonsense functions. They always confuse me too. I like concrete examples much better.
 
A metasyntactic variable is a meaningless word used as a placeholder in computer science, intended to be substituted by some objects pertaining to the context where it is used. The word foo as used in IETF Requests for Comments is a good example. By mathematical analogy, a metasyntactic variable is a word that is a variable for other words, just as in algebra letters are used as variables for numbers. "A standard convention is that any file with 'foo' in its name is temporary and can be deleted on sight." The names of these consecrated "metasyntactic variables" are also commonly used as actual...
 
@HostileFork do we need our own metasyntactic variables? :)
I guess we have some already .. send carls@rebol.com "howzat!" where carls@rebol.com is a metasyntactic email address
 
You know it's metasyntactic because it doesn't reply.
 
My problem is often that I may grasp what it does, but not why or when you need it. That is why I like practical examples.
 
8:49 PM
@HostileFork yep
 
@iArnold Sometimes one can see an abstract problem before a concrete instance of when it would come up has occurred to you. Programming languages are systems where people compose the parts in ways the creators didn't specifically anticipate, so the burden of proof on a composition that is possible to construct is to say why someone shouldn't/wouldn't need it...rather than you can specifically imagine a case where they do.
And sometimes it's easier to just solve the abstract problem correctly, than to take your time figuring out an excuse of why no legitimate use case ever could exist...and figuring out what kind of error to give.
As the article says, foo and bar are really just the CS analogues of x and y in math. "What is x?" => "Shouldn't matter, we're just describing a relationship." But it helps to name things more for what role they play in your example, e.g. in C++ base, derived1, derived2 for classes that have a relationship to each other.
 
9:12 PM
@MarkI so long as we're discussing the scanner, I want finer grained errors than there are currently. Currently there's basically two. here's one point and here's another point
In particular, what I want is to know when an error during LOAD is one that could be resolved by more input, in order to keep taking new lines from the REPL.
Ideally, we'd know the current "stack" of what brackets, parentheses, curly braces, quotes was currently open--lacking that, whatever the next thing needing closing was.
The "relax" option gets in the way of just having the sites that have problems fail (), because what that would imply would be that each stack level had to do its own setjmp in order to trap that.
 
 
2 hours later…
11:33 PM
@GrahamChiu FYI I just stopped the bot as it seems to be failing to login for some reason - I'll try and have a look later to see if I can fix the issue
 
Check to see if there's a redirect
 

« first day (2360 days earlier)      last day (1420 days later) »