« first day (1433 days earlier)      last day (2347 days later) » 

12:52 AM
@ShixinZeng Just noticed there are two png libraries /core/u-png.c and /codecs/png/lodepng.c. Seems they are both being used. Just poking around--one's for the file interface and the other GUI usage?
 
1:31 AM
I just found a slightly dissatisfying case for my /+ merging refinement. :-(
When you're using COMBINE to make something path like, it is distracting. combine [exe-name {/theres/a/space/before/this/but} /+ {/dont/want/space/here/or/slash/}]
It's a little hard in that sequence of slashy things to think "oh, this slashy thing is not slash related"
 
2:05 AM
When is Doc's next presentation on Red does anyone know?
 
@JacobGood1 Sounds like he's going to have to be a bit guerilla style at the mobile conference, giving demos to people he meets there; he didn't make it onto the formal schedule. Still planning to have a new demo for it.
 
Oh wait he is actually here.
@DocKimbel Hey! Do you have a rough ETA of when you might be making another Red presentation?
 
2:25 AM
Sigh. Simple is difficult.
 
2:48 AM
@JacobGood1 Nothing scheduled yet, but I'd like to make a big one once we reach beta state, so around new year, if all goes according to the plan.
 
3:15 AM
@DocKimbel Chinese New Year?
 
@HappySpoon Between western and Chinese New Year. ;-)
 
@DocKimbel public holidays now?
 
@HappySpoon Right, all offices are closed until monday.
 
@DocKimbel oh well, have to put my Aliexpress purchases off until then :(
 
@HappySpoon It probably doesn't not affect much online shops.
 
3:19 AM
Hmm, wonder if you can set yourself up as a vendor on Aliexpress?
and get donations that way?
alibaba and aliexpress supposed to be worlds largest ecommerce sites
 
@HappySpoon Get donations from Chinese people? I already have a Chinese bank account for that but received none.
 
@DocKimbel from anywhere.
 
@HappySpoon Maybe I'll try that if Paypal becomes non-usable for me.
 
@earl and others, here is my first very rough stab at a structure for Rebmake, as told through a translation of the CMake work-in-progress for building Rebol: gist.github.com/hostilefork/c086c1549cfccae7fc92
2
The gist contains the original CMake file as well as my attempt at coming up with a starting notation for it in a Rebol-based system.
I decided I would sacrifice parentheses to mean COMBINE. So that addresses the embedded environment variables.
I'm sure it can be thought out better, but as a starting point, that's something that can directly spit out CMake code if it needed to. If it can also spit out a plain makefile if it needed to that did not depend on CMake in any way...at least for core builds... that might allow it to be a small Rebol solution to replace make make.
It at least starts to address some of the expressive problems such as those caused by the string substitutions.
 
4:16 AM
Eventually, it could serve as the basis for replacing CMake with a smaller/better Rebol or Red based tool. Currently CMake is about 4MB on Ubuntu; I don't know even what it depends on you to have installed on what platform.
 
 
8 hours later…
12:22 PM
Ruby motion can compile Ruby to Android or iOS devices. Might be worth taking a look to see what we can learn from them
Looks like they compile to native code for Android and use JNI to access the GUI functions
 
1:16 PM
@kealist I haven't looked into png files yet
 
1:51 PM
@johnk Is that an open source project?
 
@DocKimbel "parts are open source" github.com/HipByte/RubyMotion
It looks like when they say "native" they don't mean "native code". I think they just mean they compile to the code of the machine, probably JVM
 
@HostileFork Looks like just the build scripts and config files are open source...useless for us.
 
So when they say access to the "native APIs" they mean being able to call Java routines on Android, or Cocoa routines on OS/X and Android (or whatever).
Not "availability to exploit native processor instructions". Anyway hard to tell, and probably useless.
 
 
3 hours later…
5:03 PM
This could be a bit off-topic, but has anyone else here looked at MoSync?
 
Yea it is off-topic, we were having a riveting debate about...
 
This is off-topic, but I really kind of hate a lot of StackOverflow high rep moderators.
In that, I don't think I would ever possibly like knowing them in person.
Shog9 seems a nice guy. Need more like him. Less like... others who I won't directly name. But they know who they are.
 
Meh, I doubt they act that way in reality... anonymity has a way of making us jerks; it has made me a jerk a time or two
But now that I have this water bottle screen shot, ive gotta be a good 'ol boy
 
5:18 PM
Eh, I tried Facebook and such. Where everyone posts everything about themselves. And people still suck.
 
@HostileFork lol, good point
I do not even have a facebook account
well, I do, but it is fake only so that I can sign in to certain sites that require such things
Joe Biillbow is the name I chose, which ironically, is a real name. I did not know at the time of creation that it was real but I decided to look and see, sure enough, someone out there has this name
@HostileFork did the original rebol have stack unwinding(aka fix and continue) for errors?
 
@WiseGenius Just had a quick look, MoSync relies on third-party packagers, so Eclipse/Java, XCode, VisualStudio,...
 
@DocKimbel Ah, I see.
 
5:36 PM
I have to complete a project by the end of this year. It will be an educational game, do you guys think it would be feasible to use Red for this? I would like objects to be accessible soon(most games I have made involve objects, though I could use maps) and I would need access to opengl(on android I suppose). If not, I will just use clojure(I do not like clojures perf for games, but I love Lisp)
 
@JacobGood1 There is some technical barrier to near-term OpenGL access on Android.
OpenGL for Embedded Systems (OpenGL ES or GLES) is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accelerated using a graphics processing unit (GPU). It is designed for embedded systems like smartphones, computer tablets, video game consoles and PDAs. The API is cross-language and multi-platform. The libraries GLUT and GLU are not available for OpenGL ES. OpenGL ES is managed by the non-profit technology consortium Khronos Group. == Versions == Several versions...
OpenGL ES is different from OpenGL I guess.
 
Yea
 
What is your project being graded on the basis of?
 
Hehe, user experience mostly
 
I wouldn't use any unproven technology then.
 
5:40 PM
but...the..wait...so...long
 
Anything that gets in the way of keeping your focus on the user experience and being able to adjust it, but technical twiddling and dealing with debugging headaches, won't show up in what gets graded.
Like in movie making "be sure every dollar shows up on screen"
Don't let the costume department spend a lot of money on pants for the news anchor character if you only see them from the desk up.
 
Well, just go and kill my enthusiasm then Hostile
=)
 
I'm good at that.
 
I'd say opengl access is very important nowadays. If Red users really want to customize the look of their apps on the android they will need opengl.
 
Certainly important, though with dialecting a lot of the goal is to get in there and show some "new ways" of doing things.
It would be like saying "regular expressions are very important these days"... and Rebol/Red have other ideas of what to put in the box. So it may be that Red introduces something new vs. being just another way to write C-like OpenGL code, which people can do already
 
5:52 PM
I understand that with a dsl Red could make it perty
 
It may be the little blobby thing that Red builds on is an abstraction of OpenGL wrapped up somehow and Red never really exposes OpenGL functions directly...unless you break through to Red/System and call them yourself.
 
@HostileFork Looks very interesting, at first glance. Will check it out.
 
Hello @JavaD. We're discussing the Red language at the moment.
 
@HostileFork Also, the parens decision looks reasonable at first glance. Hopefully we won't need them for eval later.
 
@earl Was thinking that if it came up, there'd be EXPR inside which the dialect rules don't apply.
Because people might want the EXPR precedence rules anyway.
 
5:56 PM
@HostileFork yea, for example, in java I covered over the opengl calls with macros using clojure. I understand the power of dsls or dialects, that is the main reason I am excited for Red. I would love to have things like reader macros and such that one can get from common lisp
 
Rebol3 made a mistake, which Red is not making, and hopefully we can reverse in Rebol3
 
As far as I understand parse, it does its work at run time and there is no way to specify if you would like to invoke it during read/compile time
 
Its the sort of thing that's "in the plan" but I wouldn't be holding my breath too hard. Although one of the reasons for trying to get the basic scaffolding up and running without worrying terribly about some of the sort of details that bug me is to not "sweat the small stuff" in order to map out the territory of how the not-100%-known-how-to-solve problems are to be done.
 
@HostileFork The flags fields (such as CMAKE_C_FLAGS) could probably made blocks instead. That would simplify some stuff to simple APPEND.
 
@earl Was trying to keep it line for line in this, to the original.
 
6:00 PM
For example:
http://blog.getprismatic.com/the-magic-of-macros-lighting-fast-templating-in-clojurescript/
One can see how powerful it can be to have some abstractions get worked out at compile time, nice perf boost here
 
@earl One thing I initially thought was that I would use the COMBINE/WITH SPACE for the parentheses blocks, and then use /+ for sticking together things without a space. But these are a lot of directory paths. I found it somewhat displeasing
Which got me down a bit, because I really liked that idea.
 
@HostileFork I don't like /+ anyway (it is abysmally ugly), so that is fine with me :)
Also, the reasoning you gave above makes sense (irrespective of questions of taste). Can't see the /+ for the forest of /.
 
@DocKimbel we need a compile time parse for Red.
http://blog.getprismatic.com/the-magic-of-macros-lighting-fast-templating-in-clojurescript/
lol
 
Sigh, Clojure is ugly.
 
Not to me
ol doc left as soon as I sent him that message lol
 
6:04 PM
Just too many parentheses.
 
guess hes trying to get work done
The parantheses are where Lisp obtains its power
 
Homoiconicity is the power, not having your hands tied to have your code always looking like that.
Rebol's SET-WORD! is a great thing.
 
Having all your code in a list is def a powerful thing
 
(defmacro compile-simple-element
   "only accepts vectors of the form [:a {:href \"http://somelink\"} \"Hello\"]"
   [[node-key literal-attrs text]]
   (let [dom-symbol (gensym "dom")]
     `(let [~dom-symbol (.createElement js/document ~(name node-key))]
        ~@(for [[k v] literal-attrs]
            `(.setAttribute ~dom-symbol ~(name k) ~v))
        (set! (.-innerText ~dom-symbol) ~text)
        ~dom-symbol)))
That is ugly.
 
lol not to me
 
6:08 PM
Well, that's quasiquote for you.
Alternatives tend to not be much better.
 
I would love to see Red/rebol get compile time expansions/abstractions
 
@earl Anyway, so my thought here is that Rebmake be a little tool, written in Rebol, that spits out either a makefile not requiring CMake, or a CMake file. Tweak it in such a way that it's good for that and possibly general enough to be expanded in the syntax to support all CMake features; even those not trivial to reimplement in the non-CMake-driven makefile version. Replace make.r with rebmake.reb and rebol.rmk, or somesuch.
 
6:29 PM
Maybe it could be given a better name than Rebmake so that it could apply to Red too. remake and rmake are taken. Eventually it might be adapted as a CMake replacement and be smaller. CMake binaries are 4MB or so.
 
@HostileFork Some fixes and additional ideas: gist.github.com/earl/dda1a9e3357b6e9f581f (diff).
Basically, fix some ${variable} expansion leftovers. And make more pervasive use of file! where possible.
Switched refinements to lowercase.
Also called the file .reb with a Rebol header (including a Dialect field) to allow Gist syntax highlighting.
 
It's a dialect, and () aren't being interpreted the same way. I don't think languages that aren't Rebol should have Rebol in the header. (For instance, Rebmu programs start with "Rebmu", Draem pages start with "Draem"...)
Ah, ok
@earl I was deliberately not using FILE!
 
@HostileFork Well, you are using it in some places, but not in others.
 
Well, accidentally then.
I was looking into CMake and apparently they just use whatever path separator you use, which is supposed to be forward slash. And I read something saying that most Windows APIs accept forward slashes.
 
Fair enough. Checked again: only in one place, but at the very top.
 
6:34 PM
Should Rebol still be in the business of doing a per-platform translation on that for FILE! ? Is the variance in behavior worth it?
 
It only does if you ask it to.
(I think, at least.)
 
What I read says it does it unless you ask it not to, by starting the file string with some sequence
 
I don't see a good reason to not use file! instead of strings for things that are ultimately file paths.
Globs is a more difficult question. But * and ? work, so for this basic globbing, we could also use file!.
 
Well it will be optional either way. I wouldn't throw that in if trying to convince a Cmake user that this was a better syntax, would confuse.
I was looking to make something that was arguably 100% better, and contemplating that.
 
I think the file! paths are a big improvement.
 
6:38 PM
Still wondering a bit about the /WITH SPACE on the parens doing the COMBINE.
<shrug> Well if it makes you happy, I wasn't going to disallow them.
But strings will be legal as well
I really wish there was a good way to say "stitch these things together without a space". I don't like using a word that would be evaluated otherwise for that.
 
Nice thing about file! is that it could make these things much easier:
@RebolBot Ping?
 
@earl Please continue.
@earl That's very interesting.
 
@RebolBot do
base: %foo
sub: %bar
print base/:sub/baz
 
; Brought to you by: try.rebol.nl
foo/bar/baz
 
Are you suggesting allowing PATH! to specify file paths? :-/ I wasn't intending to go that route.
 
6:44 PM
Could be a possibility.
 
Restricted syntactic space, directories named 11 and such.
>> print ["Hello"          "World"]
 
; Brought to you by: try.rebol.nl
Hello World
 
>> base: %11   base/12/13
 
; Brought to you by: try.rebol.nl
== %11/12/13
 
well base can't mean both the name and do a substitution
You'd have to use PAREN or ISSUE or something.
>> load "(a)/b/c"
 
6:48 PM
; Brought to you by: try.rebol.nl
== [(a) /b /c]
 
And that particular thorn in my side which should be fixed should be fixed
 
For paths, first component would always be a substitution.
Otherwise: file! or paren! (combine).
But in this particular example, we almost always have base directories in variables.
(I'm just trying out how that'd look.)
 
Well... perhaps we can try not doing that to start with.
Anyway, see any problems with the general plan?
I'm hoping rebmake.reb would not be too large.
 
I think more powerful file path assembly would be a very welcome improvement over CMake's "strings for everything" approach.
No problem with the general plan.
The only somewhat funny part, is that we'd add another generator stage.
 
Well, not if you're building with normal make.
 
6:55 PM
So you use rebmake to generate from *.rmake to CMakeLists.txt; then you use CMake to generate to your real target build.
 
Anyone using CMake is willing to go "extra steps", including the extra step of loading CMake, and presumably the extra step of loading a built IDE project or somesuch
 
Yeah, sure. But letting CMake do the heavy lifting seems like the lower hanging fruit.
Not anyone using CMake is actually using CMake because of a free choice.
 
I think to get everyone on the same page it has to make the makefile too, and when people do updates they edit and check in one file. That's the idea.
Well I talked about this idea enough to the point that if I'd spent the time doing it instead of talking about it then it would have been done a long time ago, so I figured yesterday I'd look into doing it.
 
Mhm. I think it's a good idea.
 
All right, well, I guess I'll take a shot at it. I was thinking that if you run it in make-a-makefile mode, it would actually be running this as Rebol code, after doing a sweep on the parens to replace them with COMBINE of an ordinary block.
Whereas the cmake generator would be parse driven
 
6:59 PM
Paths improve this a lot.
Now it's only the things that really want to be blocks left that look strange.
 
Color me a big skeptic of PATH! for file paths, especially with presumed substitutions...I want a clear way of seeing what's a string and what's a variable. If paths are treated as strings then I'd want a :foo or (foo) or something on the evaluated things. I don't want to guess what's a variable and what's a literal string.
 
Can't use casing because many file systems are case-sensitive
 
You don't have to guess.
 
Add it on the base and I'd say it could slide.
 
7:02 PM
First component of a bath always is a variable.
Other than that, every get-word component is a variable.
 
That doesn't fit my logic. I'd rather it be a get-path to denote that.
 
That's just how paths for file! base works.
 
Because this is a dialect, there's no reason to disallow non-variable roots of paths
 
You don't have to.
%foo/bar/baz has foo as a non-variable base.
If you need to mix a literal base with substitution somewhere, then you have to resort to combine syntax (parens).
 
Why not just foo/bar/baz.c and then stay consistent with :VAR/bar/baz.c ?
Then you don't need the %
 
7:04 PM
That's just not how paths work.
 
This is a dialect.
 
Ah, sorry, now I get what you want.
Yeah, get-path! is a good idea as well.
 
I suppose in theory it doesn't hurt to allow it.
I think the problem I see is that if you do it, then people who aren't equipped to understand why it breaks would be confused.
 
Not just in theory, I think that's a rather good idea. And use it by default.
Let me update the Gist.
Would also make the conventional uppercasing of variables somewhat obsolete.
 
But part of this sort of puts pressure on something we want better, which is for construction syntax to be relatively painless and not something to fear.
 
7:07 PM
Well, but it introduces some additional visual noise :)
Well, the spec without get-path!s looks better.
 
Needs them.
 
Not necessarily, no.
 
Don't like the % rule, not a good trade.
Hm, random thought
What if PATH! really should be used for file paths
And % was some kind of construction syntax primitive that changed the rules for how that PATH! would be processed?
%foo/11/1bar.txt => PATH of [foo 11 1bar.txt] with 11 and 1bar.txt being WORD!
 
I'm not sure I get it?
Also, take a look at the file: there's not a single path with a non-variable base in there.
 
In one file, written by you? :-)
 
7:14 PM
Yep :)
 
Isn't a more desirable construction to have an abstraction so you're not repeating the base over and over but say it only once, so none of them would have it?
 
Absolutely.
Regular CMake projects typically look a bit different.
With CMakeLists.txt files in each source subdirectory, listing the containing files. That way, you get the path stuff automatically.
I decided against this in the original CMake-ification of R3, because of the relatively small source base we have.
Later, I switched it again to do it in the more standard way: github.com/earl/r3/blob/wip-cmake/src/core/CMakeLists.txt
Needs more work :)
Other projects do this now with custom functions: github.com/llvm-mirror/llvm/blob/master/lib/IR/CMakeLists.txt
@HostileFork So how would that expand?
Literal base, but everything else variable?
 
7:57 PM
@earl It works better, but colons are legal in filenames too, so this does make me uncomfortable for all the reasons that I like seeing things mapping properly and completely to the substrate they touch.
 
@HostileFork In some OSs yes, in others no. But I think that for these special cases, fallback to strings and combine is fine.
 
Well under this philosophy, you start to get to the point where it does something I was attempting to avoid, which is decoration of variables you want substituted. Now sometimes you are wanting a naked word to be a filename in a string sense, and sometimes you are wanting it to be substituted
So that would mean switching other things to get words and assuming strings as well (out of ordinary words)
Otherwise it really gets that "hodge podge" feeling.
 
I don't see where it would get to that. You just have two different ways of creating filepaths.
Question is mainly if you want to leverage/re-use basic Rebol behaviour that can be useful here. So if you want the dialect to be more Rebol-like, or rather more independent.
 
Is there any precedent of using PATH! for filenames?
 
As shown above, Rebol does that.
So yes, in the main dialect.
 
8:09 PM
As shown above...as in, in this example we're making? I mean how many Rebol codebases have code that converts PATH! into a FILE! used to read from the file system, with users typing in the paths with word elements...before this proposal?
 
As shown above as in:
1 hour ago, by earl
@RebolBot do
base: %foo
sub: %bar
print base/:sub/baz
 
@RebolBot do
base: %foo
sub: %bar
probe type? base/:sub/baz
print to-file base/:sub/baz
 
; Brought to you by: try.rebol.nl
file!
foo/bar/baz
 
I see, that is something I did not understand was in the evaluator.
Missed the implication.
Hmmmm. So people are aware of this and use it? That if you "path select" a FILE! it appends to it? :-( I never knew.
@RebolBot do
base: "foo"
sub: "bar"
probe type? base/:sub/baz
print to-string base/:sub/baz
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-invalid-path.html
    *** ERROR
** Script error: cannot access :sub in path base/:sub/baz
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
8:13 PM
Yes, that's used. It's very useful.
 
I'll say again Hmmmmmmmmm.
 
Path behaviour is polymorphic over the type of the base component.
 
Well that explains where you were coming from earlier.
I don't care for the implicit word-to-string conversion in the path.
 
Makes for a very nice way to compose filepaths.
 
>> print [(quote baz)]
 
8:21 PM
; Brought to you by: try.rebol.nl
baz
 
I have not been a fan of that. I wanted to eliminate that stringification from COMBINE and PRINT.
 
Not sure if printing it as a lit-word would be better. But, well.
 
Well I didn't want it to print any-word! unless you said what you wanted to do with it. MOLD or what.
Because it seemed it's usually an accident, and if it's not an accident you can say what you want
 
>> print ['foo]
 
; Brought to you by: try.rebol.nl
foo
 
8:23 PM
>> print [quote 'foo]
 
; Brought to you by: try.rebol.nl
'foo
 
>> print 'foo
 
; Brought to you by: try.rebol.nl
foo
 
But I've been known to rewire my opinions. I'm pretty certain you should be able to have a word backed by any string, when created programmatically. Which starts to make the "foundational" differences between an ANY-STRING! and ANY-WORD! seem not as foundational; you in theory cover the full range of printable strings.
But I felt not printing symbols unless you molded them would catch accidentally non-reduced data cases more easily.
@RebolBot
base: foo.com
sub: "bar"
probe type? base/:sub/baz
print to-string base/:sub/baz
@RebolBot delete
 
; Brought to you by: try.rebol.nl
url!
foo.com/bar/baz
 
8:29 PM
Grumble grumble hmmm.
Besides the Red/System concept of evaluating /index instead of /:index on c-strings, are there any path evaluators that don't just look at the word-as-a-word and actually dereference it?
 
8:42 PM
@HostileFork I don't think so, no.
 
@earl I get your earlier argument, but this is very weird, because suddenly when you prefix a FILE! with a % to get a literal base path, suddenly you can't use :VAR for variable substitution later in the path
At least, it's a different codebase that's looking at a string instead of a structure to do that, and not very appealing from an implementation standpoint.
Which is sort of in line with my question of why % might not just produce a PATH! whose first element was a FILE! and then maybe lexically looser rules for what's legal in the words.
%foo/:bar/11.baz => path! of [%foo :bar 11.baz] with 11.baz being a word! with that text.
If it was in an evaluative context, apparently you'd still get a file, right?
@RebolBot
sub: "bar"
x: reduce to-path [%foo :sub baz]
probe type? x
probe x
 
; Brought to you by: try.rebol.nl
path!
%foo/:sub/baz
== %foo/:sub/baz
 
@RebolBot
base: %foo
sub: "bar"
x: reduce to-path [base :sub baz]
probe type? x
probe x
 
; Brought to you by: try.rebol.nl
path!
base/:sub/baz
== base/:sub/baz
 
Okay I'm missing something here.
 
8:51 PM
DO doesn't evaluate paths, it seems.
@RebolBot delete
do compose [(to-path [base :sub baz])]
get to-path [base :sub baz]
 
>> reduce 'a/b/c
 
; Brought to you by: try.rebol.nl
== a/b/c
 
>> reduce [a/b/c]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-no-value.html
    *** ERROR
** Script error: a has no value
** Where: reduce
** Near: reduce [a/b/c]
 
Hm, I seem to remember a discussion about this.
Well I'd be more in favor of it, I guess, if there wasn't this total switch between foo/bar/baz and %foo/bar/baz in terms of the effects on interpretation of bar and baz. It feels misshapen to have the properties change so radically if you want to have a variable supply the base vs. a literal and have that change the whole dynamic and implementation.
This seems like perhaps, indeed, what is missing is construction syntax for FILE!
If %foo/bar/baz was just [%foo bar baz] by default in path form, and it obeyed the general Rebol rules, that would be fine. No slashes in FILE! by default, you need construction syntax to get them... or to put that PATH! in an evaluative context where it evaluates and you get a FILE!
%[foo/bar/baz] could--for instance, be construction syntax for a FILE! that actually had slashes in it. Or maybe %#[foo/bar/baz]. anyway, something like that.
You become a bit more prescriptive about the rules, maybe life gets harder for people who put numbers in their filenames and violate the idea of "nice words". You have to start using parens, e.g. %foo/baz/("11.html")
Paths that drop off to nothing end in NONE. So %foo/baz/ is actually [%foo baz #[none]] while %foo/baz is just [%foo baz] as a path.
This wouldn't affect dialects in which FILE! was used as a simple string without path characters... but if they wanted to support FILE! that might be a path, the data entered would either have to use construction syntax to get those characters or the dialect be updated to check for PATH! and look at the first element (or evaluate it)
#:[4chan rules] => :4chan rules (single get-word!), #:[4^]chan] => :4]chan (escapes used on bracket)
#[4chan rules]: => **4chan rules: (single set-word!), #[4[c]han]: => 4[c]chan: (paired bracket rule)
Putting the colon on the tail is tricky but may make it hard to tell from binary.
Anyway, point being, maybe instead of being hung up on how words limit things, getting it to be less painless if you need to break the mold is a better idea. Parens are available on paths.
But it suggests the routines that break apart filenames into component parts should be producing PATH!, not BLOCK!.
 
9:42 PM
Hmmm. #w[4chan] for WORD!, #:w[4chan] for GET-WORD!, #w:[4chan] for SET-WORD!, #'w[4chan] for LIT-WORD!, #%[4chan] for FILE!, #/[4chan] for REFINEMENT!, ##[4chan] for ISSUE!... #u[moc.krofelitsoh//:ptth] for URL!, the other ANY-STRING! types have delimiter pairs and don't need construction syntaxes right?
Maybe that's too cute, and it should be #w, #g, #s, #l, #f, #r, #i, #u
Or maybe #w is assumed and just #[4chan] is a word. That might make a lot of this less ugly/painful
#{ is binary, #[ is construction, is #( anything? #<? The thing is bringing in some kind of delimiter to express something that doesn't generally have paired delimiters to get it to cover a greater expressive range.
 
@HostileFork I've in the last few years come to think that #( would most likely be the best syntax for literal maps we'll be able to backwards-compatibly come up with.
 
@earl So I think that...with great mental turnabout...I may be willing get on board with the % vs. non-% led variants of path. It begins to make sense if you start "Reboling up your file system" and thinking about these escape cases as edge cases. But the plan above for rethinking how %foo/:baz/bar is read would be part of that.
But this would also likely shift my thinking in general about words and PRINT, etc.
>> x: reduce [(to path! [%foo baz])] probe type? x probe x
 
9:58 PM
; Brought to you by: try.rebol.nl
block!
[%foo/baz]
== [%foo/baz]
 
>> x: reduce [(to path! [%foo baz])] probe type? first x probe first x
 
; Brought to you by: try.rebol.nl
path!
%foo/baz
== %foo/baz
 
>> x: reduce [(reduce to path! [%foo baz])] probe type? first x probe first x
 
; Brought to you by: try.rebol.nl
path!
%foo/baz
== %foo/baz
 
Jeez, right.
>> x: reduce reduce [(to path! [%foo baz])] probe type? first x probe first x
 
10:00 PM
; Brought to you by: try.rebol.nl
file!
%foo/baz
== %foo/baz
 
Modulo "I don't remember why reduce won't reduce non-blocks", it starts to make sense.
Edge cases, though.
@RebolBot
base: %foo
bar: 2
probe type? base/:bar
 
; Brought to you by: try.rebol.nl
file!
== file!
 
integer! should pick #"o", it's a string type.
@RebolBot
base: %foo
bar: 2
probe type? base/(bar)
 
; Brought to you by: try.rebol.nl
file!
== file!
 
Same.
Path selecting a string out of a string type, that's different. A word? Different.
 
 
2 hours later…
11:44 PM
posted on October 04, 2014 by fork

[Wish] In discussions with @earl I discovered something that I did not know about. That is: the evaluator for URL! and FILE! types as the base of a PATH! does an append, with a slash, of words and strings. >> base: %foo >> sub: "bar" >> type? base/:sub/baz.html == file! >> probe base/:sub/baz.html %foo/bar/baz.html I was not aware of this. I mentioned it to @GrahamChiu and he was not aware

 

« first day (1433 days earlier)      last day (2347 days later) »