« first day (1613 days earlier)      last day (2167 days later) » 
00:00 - 20:0020:00 - 00:00

12:28 AM
@GreggIrwin I had that thought, but then make takes two arguments—with alt-construct, the resultant value would be determined solely by the content (and validity) of the construction dialect...
 
12:54 AM
posted on April 01, 2015 by Gregg

[Comment] -4 +1 New thoughts about atomicity +1 error? any [word[] word{} word()] (until we know what to do with it) +.75 `` and `{foo}{bar}` being disallowed -1 This is tough. We have parts of speech, and we have punctuation. I also want quite a bit of freedom in formatting in order to communicate my thoughts and intent. Not having seen the SO chat on this, it would be great if ther

 
 
2 hours later…
2:25 AM
@rgchris Argh, see upcoming, please.
>> do join "#" mold [string! "Foo" 2]
 
; Brought to you by: try.rebol.nl
== "oo"
 
All right! I'm ready to start posting my fixes now.
But first, one or two questions for the group.
(1) I'd like to push up my fixes to a third location as a testbed; would that be OK @HostileFork?
(2) How long would you estimate it should take me to get R3 building from a git tarball with tcc?
I am hoping I won't have to put up anything tcc-specific, but that might be necessary.
I am using a Windows 64-bit system with a tiny disk and one-eighth of a core, if that helps.
 
2:41 AM
@MarkI Was hoping to have a cleaner alternative to that.
 
@rgchris What's dirty about it (just curious)?
The string conversions, of course, but am I missing something else?
 
Just that.
Shouldn't be necessary.
 
@rgchris You cannot have any idea of the difficulty of even finding out how difficult that would be.
 
@MarkI I cannot?
 
@rgchris Yep. Because I can :)
 
2:53 AM
@MarkI What you got?
If it's that difficult, then it's done wrong.
'You can't get there from here'
 
@rgchris Just to start with:
(1) Construction syntax goes through Make_Dispatch()
(2) Make_Dispatch() is generated during the build magic
(3) You want to wrap Make_Dispatch, a polymorphic call, in a standard non-polymorphic wrapper.
And I still haven't gotten to the point of figuring out how difficult figuring out how difficult that would be would be.
There are times when yes, you actually can't get there from here, and the design is not at fault.
I am not saying it's impossible. Just that it being difficult is not necessarily a sign of a mistake.
I don't even know how to get MAKE to perform the construction syntax, and I know it's the action that gets called.
So, magic, hence, difficult.
Any chance you can help me build R3 with tcc, @rgchris?
 
3:12 AM
@MarkI Hm, it looks like TCC development has some people back on it, I seem to recall it died for a while: repo.or.cz/w/tinycc.git/commit/HEAD
@MarkI The best thing to do with any change you're working on is to always make it a branch, and push it to your own github repo. People can pull the branch into their clone, and branches are the way to make pull requests in GitHub. If you have questions on the process or haven't done it all before, feel free to ask.
I don't think anyone has bothered to build Rebol with TCC, but as codebases go, it really isn't a user of anything fancy. It has things like the sequence point issues I've pointed out. I imagine compiling it wouldn't be the hard part but the code might mysteriously not work... would be good to check.
I don't know how compatible TCC's command line options are with the ones GCC and CLANG obey but I'd hope it doesn't deviate too much
 
@HostileFork I have my own github repo now?
Hint: clearly I have never done anything with git before.
I actually don't even have a compiler.
 
@MarkI That's a tough way to work with code!
 
I was going to d/l a tcc.exe and use it to build tcc, which I would then use to build R3 ...
@HostileFork I'm nothing if not old-school, that's for sure.
I suppose I could skip a step, and just use the downloaded tcc.exe, but that feels too ... murky?
There. I have built my first C executable with tcc. Easy peasy!
 
@MarkI Well getting your hands on version control would be good in any and all cases, and since you said .exe we'll assume at least you're not running on a PDP-11 (or at least one with a DOS/Windows emulator). I'd advise just taking the MSYS build as-is: msysgit.github.io
Building TCC from source sounds interesting and presumably a first good sanity check on using it
 
3:29 AM
@HostileFork Thanks, though I'm a command-line guy.
 
@MarkI I don't know if the main download is command line only or what: git-scm.com/download/win
Presumably
I'd clone TCC from the link above. Their last commit was yesterday. The GitHub version has a last commit from 2013
I'd also keep a notepad (or virtual console, or pen and paper, or however you keep notes as you read this chat in lynx) and write down the steps as you go...so you have the makings of a good blog article on building TCC with TCC and then Rebol with the TCC you built, if you manage to do it
 
@HostileFork Love your confidence :) How hard can it be?
 
@MarkI "'It's easier said than done.' ... and if you don't believe it, try proving that it's easier done than said, and you'll see that 'it's easier said that 'it's easier done than said' than it is done', which really proves that 'it's easier said than done'."
@MarkI I'm not sure how ANSI-strict TCC is, but there are two obvious non-pure ANSI-C things (at least) I've seen in the Rebol code... it uses declarations at the beginnings of blocks here and there so if (condition) { int nonAnsiCdecl = 10; ...}. It also uses // comments here and there.
Most C compilers tolerate it, even odd ones on the Amiga and such...but TCC being so small may take the spec more literally. I have never used it.
 
@HostileFork Those will have to be expunged ASAP, even if they work :)
 
@MarkI I would rather that they be kept, and in fact, used more often. Putting declarations closer to and scoped with their usage is a far better practice. Carl's opinion on it is that although ANSI-C is a good baseline and he didn't want to do use C++ constructs, in the realm of supported compilers he was willing to give leeway to a couple of helpful things if they all support it.
So long as it's possible to preprocess the source to produce the ANSI-C equivalent, I wouldn't worry about using those two things. That would be easy, to just scan for declarations and put their definitions at the lead of the function and convert the initializations to assignments at the point of declaration.
The advantage in maintenance and safety by using the feature is extremely high.
Of course it's nothing compared to actual safety in code. But... well
I guess the time to worry about writing that preprocessor is when and if a compiler that doesn't like them is encountered. No platform has yet lacked an option for those.
@MarkI I'm not sure where the best place to learn Git is, but it's critical these days to know at least a little. There are many working models but the key thing to know is that Git repositories are all "clones" of each other. A clone may exchange DNA in the form of "commits" (patches in a version tree) with other clones. Commit IDs are not random but built from a composite hash that cascades the hashes of its contents along with the hashes of its ancestral versions.
The working model for GitHub (one of many possible) is that they host repositories and clones of those repositories. You then make yet another clone of that clone locally on your machine. As a first step you would pick a repository to clone (rebolsource/r3 or rebol/rebol, I'd suggest the former at this point in time) and you would get mark-i/rebol hosted and browsable on GitHub. Then you would give your local url the github url of mark-i/rebol and it would clone to your local machine.
So at the start, before doing anything, there would be three clones you're dealing with...all identical at the outset. Then the preferred working model is to pick a commit in the history to start working from (perhaps the commit reflecting the last change Carl integrated on GitHub, if you were using rebolsource/r3, which has commits since. working from that commit means that your pull requests are easier to send against rebol/rebol without doing additional work)
You start a branch and name it. It's important to always start a branch before you work in this model. Each branch you make should reflect an independent track of work. You wouldn't (for instance) do fixes for two unreleated curecode tickets into the same branch, because you want to be able to send two "pull requests later". One may be accepted, one rejected, or integrated on different timelines.
 
3:58 AM
Thanks for all that, @HostileFork. I am currently totally bummed out though.
 
@MarkI ...because?
 
Apparently tcc can be built -- but the instructions only say how to do it with gcc. ARGH!
 
@MarkI I thought it could build itself.
 
@HostileFork That is known to be true, I have some threads even discussing how to do it.
Disappointing that it's not supported at the head, though.
Oh well, two steps forward and one step back, it's progress :)
 
@MarkI Not everyone's goal is purity...they may want to just get a tiny C compiler and have it optimized and possible to build on as many platforms as possible vs. the abstract theoretic bootstrap goal.
I've told DocKimbel that bootstrapping Red and having Red be its own first "big project" is a terrible idea.
It should have several working non-Red projects to feed back into the design. Bootstrap is not a public-facing goal; and it ties things up.
 
4:04 AM
@HostileFork I will still get it done, even if I have to manually replace all occurences of gcc with tcc in the makefiles.
Annoying though; you would think that people who needed a tiny compiler, would need a tiny compiler to build it with.
But I understand your cross-platform view @HostileFork.
 
@MarkI Even better if you tweak the makefiles to have options. If RenCpp can have a conditional makefile...t‌​hen so can tcc.
 
@HostileFork Er ... I'm talking about the tcc makefiles, you mean I should contribute those back to that community too?
 
@MarkI It was a thought. If someone doesn't do a thing, it usually doesn't get done.
 
@HostileFork Nice thought. Wish me luck ... again.
 
The absence of existing instructions presumably comes from the fact that for some period of development TCC could not build itself...and other compilers had to be used. The people working on it wrote documentation for the build at that time. That is today--we assume--how the prebuilt binaries are made, which will be more optimized and can be built for more targets than TCC codegen supports (although on those targets, you can only cross compile...)
You've observed the only time TCC builds itself is when someone sits down and does it and writes directions on a newsgroup. And that just means the conditionality and documentation hasn't become a priority. The project looks like it was abandoned by the original author, picked up by some other people for a while for a project, abandoned again, and then picked up for active development again. I doubt anyone's taken the time to get the build and docs updated.
@MarkI Hope it works, I've actually been interested in TCC myself, never got around to it. I thought it might be ported to Red (codename "CRED")...browsed the source a little to see how hard a translation would be.
This one supports C11: github.com/rui314/8cc
 
4:20 AM
PS @HostileFork, that git-scm.com link auto-downloaded an executable to my chrome downloads folder and now I can't delete it. WTF?
 
@MarkI Is the file held open by a lock like perhaps running an installer in the background you clicked on? Look at processes in task manager
 
Good idea.
 
If you can move the file but not delete it, that's likely the culprit
 
No I can't move it either.
 
I don't use much windows, so I'm not going to be much help
 
4:24 AM
@HostileFork Lucky you.
Bye-bye, have to reboot now. Thanks Bill!
That file is gone now. Chrome was stuck downloading it and refused to give up its lock even when killed. Gotta love windows.
Why can't every OS unlink files while they are being written to like UNIX can? :)
 
@MarkI One way or another though, get a git. It'll be the best way to acquire TCC source too.
 
@HostileFork Does cygwin have a git? I've got that ...
 
4:52 AM
Why do we not have a git in Rebol? Betcha it'd be five lines of code, not the hundreds of gigs that cygwin is currently forcing down my throat.
 
@MarkI There were in the early days, several alternative Git implementations. It was not very complicated at first, and was actually sort of a bag of shell scripts and a bit of C. Eventually people C-ified more of it. There are alternate implementations. The complexity level has grown to support all the features however.
 
Git needs lynx? Git needs perl? Gimme a break.
 
I did suggest it as a candidate for one of the "apples-to-apples" comparison projects that I say are lacking.
Though that's a rather ambitious one at this point. For a later date.
@MarkI If you build from source it does not need such, that is probably the packager's problem.
 
@MarkI You can use Fossil. It is a simple, high-reliability, distributed software configuration management system with integrated web server and the most confusing UI the world has ever seen.
 
A depends on B, B depends on C, etc. They built it and packed it up and if you use the packaged version you get your problems.
 
4:57 AM
@HostileFork Really. But I need it to get the source to build it. Yay.
 
@MarkI I think if you're running Cygwin on top of Windows you sort of have to choose your battles. The fun battle you've chosen is TCC built by TCC building Rebol. If you are going to the level of your Windows/System32 directory and needing to excise that... I think it's time to put the computer down and have a meditation moment.
 
@rebolek You mean, exactly like every other SCCS out there.
 
@MarkI No, I mean its web interface and it's something words cannot describe.
 
@HostileFork Of course. But I now have no disk space, so there's that.
 
@MarkI Youcan have a look here for example. red.esperconsultancy.nl/Red-C-library/tree?ci=trunk&expand
Try to download all files in one archive. It's possible.
 
5:06 AM
@MarkI Fossil may or may not be interesting, but the current contribution environment is Git-based in general. Learning Fossil will allow you to collaborate with exactly one person--Kaj. Regardless of our differences in general, he's not super interested in new users or project expansion
 
I now have git, and all my bash customizations are gone. Thanks cygwin!
How to drive a car: first, you've got to get yourself a hot-water bottle.
 
Git is how to collaborate in the current milieu with anyone interested in collaboration. For what it is, it is good/fast/logical. There may be a time to use something else, but right now the advantages of anything else are outweighed by the sheer ubiquity -- unless, as I said, you really are going to challenge everything down to the metal in your system and write your own OS too.
 
@HostileFork I am not challenging the metal. It is challenging me.
"Warning: you need at least 15% free disk space in order to free up any more disk space." What a load.
 
Although there's no arguing that DaisyDisk has the better ergonomic: daisydiskapp.com
But, same thing.
 
5:24 AM
@MarkI, I've wondered before - how come you're so short on disk space?
is it purposeful austerity?
 
@Adrian I am a teacher, a (very) frustrated writer, and a packrat. Nuff said?
@Adrian I would not ascribe any saintly motives to myself :)
 
these days the library of congress could probably fit on a consumer grade disk, so I suppose it's the hoarding aspect that is mostly to blame
what's the size of your hdd?
 
My disks are mostly eaten with virtual machines and video editing files for screencasts
And photoshop files
 
@Adrian Always. But I do purposefully avoid buying big disks, then I'd really never be able to find anything.
 
@MarkI well, I recommend Everything for that problem
 
5:30 AM
Most of the space on my disk holds scanned papers I'll never read or even see again probably.
 
way faster than Windows' file search for searching files (but it's not for content search)
 
But I still can't throw them out, it's a problem.
 
No need to throw them out, but is that where the bulk of the disk use lies?
 
	print-args: func [label list /extra /local str] [
		if empty? list [exit]
		print label
		foreach arg list [
			str: ajoin [tab arg/1]
			if all [extra word? arg/1] [insert str tab]
			if arg/2 [append append str " -- " arg/2]
			if all [arg/3 not refinement? arg/1] [
				repend str [" (" arg/3 ")"]
			]
			print str
		]
	]
 
@kealist Thanks!
 
5:31 AM
Aside: I've brought this up before...
Question is: which is more comprehensible, that or:
print-parameters: function [label list /extra] [
    if empty? list [return void]
    print label
    for-each param list [
        print/only [
            (if all [extra | word? param/1] ^-)
            ^- param/1
            if param/2 [
                [^_ "--" ^_ param/2]
            ]
            if all [param/3 | not refinement? param/1] [
                [^_ "(" param/3 ")"]
            ]
            ^|
        ]
    ]
 
@MarkI, can I ask what you use Cygwin for?
 
@Adrian Bash.
 
that's it?
 
@HostileFork the first
 
@Adrian Well, the usual support tools, of course, sed and awk and et al.
 
5:33 AM
@rebolek How so? I think the first is gibberish for comprehension.
It's very difficult to say what the code does.
 
@MarkI I used to use it as well, but I've removed it in favour of Msys2 (a better Cygwin) and Mingw-64
 
But even when I'm writing awk code it's all in bash.
@Adrian I've heard of them.
 
@HostileFork I don't think so. The second one is full of strange clutter. What does ^| do? Its almost like Perl.
 
Also, performance-wise, it will be slower.
 
would you be willing to have me walk you through setting that up?
 
5:35 AM
@Adrian Er ... I thought it was huge too?
 
@rebolek Equivalent to ^/ except it's not a path conflict. Think of it as the new ^/.
 
how much is your current Cygwin (plus cached archives) taking up?
 
@Adrian 268M.
 
@HostileFork How is "^/" path conflict?
 
If all you need is Bash, awk, grep, git and a whole slew of the common command line tools, it's about 450 MB
 
5:37 AM
@Adrian That agrees with what I remember when I researched it.
 
@rebolek Well today it's simply technically not a legal word. It could be made one, if escaping were adjusted. But I think that in general picking a newline escape that does not involve a path character has an advantage.
foo/^//bar might be possible to make legal, but should it be?
 
well, once installed, the package system it uses, pacman (from ArchLinux) is a great tool for adding/removing/updating packages from the command line
 
foo/^|/bar at least doesn't have that problem.
 
anyhow, I'd recommend it over Cygwin
 
Also, what is | doing in ALL block?
 
5:38 AM
the guys maintaining it are really doing a great job
 
@Adrian May I respectfully inquire as to your reasoning?
Oh. I do agree cygwin support is ... less than stellar.
 
the way it works in conjunction with mingw-64 (the dev tools for which can be installed in whole or in part) is really nice
I always found that Cygwin's packages were always lagging behind
anyhow, think about it and let me know if you want a step-by-step
but there really aren't many steps
 
@Adrian Thanks a lot @Adrian, I will keep it in mind.
 
print-parameters: function [label list /extra] [
    if empty? list [return void]
    print label
    for-each arg list [
        print/only [
            (if all [extra | word? arg/1] tab)
            tab arg/1
            if arg/2 [
                [{ -- } arg/2]
            ]
            if all [arg/3 | not refinement? arg/1] [
                [space "(" arg/3 ")"]
            ]
            newline
        ]
    ]
@rebolek If you prefer, there's a fairer "apples to apples" comparison.
I've been looking at the impact of the death of SP, CR, and LF which I do not like. I also don't care much for strings with leading or trailing spaces, and if they are to be used they must use curly braces at least. But it's hard to look at something like { (}
 
@MarkI, keep in mind that if you're installing git under windows, that basically includes msys (a good set of the tools anyhow) - so you're incurring disk waste for no real reason
 
5:48 AM
@Adrian It doesn't if you use cygwin.
 
if you install git under msys2, you'll just have one copy bash and associated gnu tools not two
 
They have their own packaging system
 
yeah, well the git under cygwin was pretty far behind last I looked
the question I have to ask is - what does Cygwin offer you that you don't have in better form under msys2?
well, I'll answer myself - it does have a larger number of overall packages - but you indicated you don't use but a small set
 
@MarkI I personally suggest forgetting about all of it, using a disk sweeping tool to free up enough space for a VM with a dynamically growable disk you start at about 16GB, and just work in 64-bit Debian/Ubuntu and toss all the Cygwin stuff.
Or 32-bit, if you're old school, I guess.
 
@HostileFork, on a memory constrained machine, I wouldn't really recommend a VM
 
5:53 AM
I've run VirtualBox just fine on an Acer pseudo-netbook-class machine that I bought for about $700 four or so years ago.
 
@HostileFork But CR and LF are great.
 
4GB?
 
You won't be playing any high framerate games, but if you're building TCC and Rebol you don't need super fancy things.
 
I have to say that your language looks lot like Rebol, but I'll stick with Rebol, it's much cleaner. The PRINT/ONLY thing to ignore NONE is nice though.
 
@rebolek There's no going back on that one, or the consistency in handling of nested blocks.
It's just too good.
 
5:55 AM
@HostileFork, just to use the gnu tools (if you're a Windows user mainly), I don't think you need Linux anymore. You used to, in order to get a decent setup, but now, with msys2 + mingw-64, it's pretty sweet.
Of course if you want to ditch Windows altogether, then fine.
 
@Adrian It's also kind of fringe when you need things; creates more work in order to cater to Windows, which you shouldn't be catering to in the first place.
 
But escapes in code instead of words, pipe in ALL block...why?
 
@HostileFork You actually don't really need to cater to Windows (in any significant way) with the setup I mentioned.
you've got all the build tools, compilers, shells, version control, etc.
 
@rebolek Expression barriers help readability tremendously. You can realize that extra isn't something taking word? as a parameter instantly. It's especially important when taking in or modifying code written by others--a rarity in Rebol culture, I know.
 
To be clear, it wasn't so great not too long ago.
 
5:59 AM
@Adrian Well my Cygwin/MSYS/MINGW/etc experience is all from fairly long ago, except for some of this recent Ren Garden token participation.
 
it was quite a mess
different now with msys2
 
I still don't know what people like about Windows in the first place. Apple has built success on the fact that Microsoft fumbled the ball and lost a decade of opportunity to do anything worthwhile.
It's not that OS/X is so brilliant, it's that Windows just didn't take out any of the cruft and added more nonsense.
 
For me it's the graphical apps that make me keep using Windows as a primary OS.
 
@HostileFork How do I know that | is not something that is taking word?
 
But if you don't have that need (as well as the need for compatibility with the greatest number of devices out there), then sure, look at Linux, OS X
 
6:03 AM
@rebolek Convention, because that's one of the things in the box that people won't generally redefine in the DO dialect. Of course, for linguistic freedom you can. You can redefine append or anything else too, you just probably shouldn't if you want to be on the boat.
 
@HostileFork Well, I'm not going to redefine |. You're the one who wants to give it new meaning.
 
It takes some getting used to, and this is why I experiment with ideas. I experimented with . to see how that worked out because it seemed less disruptive. Then I hated it.
My experiments with | are such that I am, by contrast, now loving it despite initially thinking it had some properties I didn't like. ("too big, looks close to being a number one or a capital I or a lowercase L...")
It turns out that stuff is not in practice an issue.
Some of these changes are things each person can (and should) be able to define/redefine for themselves. The fact that Rebol has stagnated in a design sense for Mezzanine and other practices, and that DocKimbel seems happy to run ahead REMOLDing and REFORMing and writing things in a system that won't correct the edges shouldn't guide what clients of the system accept when given new alternatives.
They have to see the options and decide for themselves. And I have to run through tests of ideas because there is no testing lab for new ideas in the language besides me.
I'm it.
@rebolek There are things we can ask about...the contrast of LF NL NEWLINE ^| are four options for words that could represent the escape. If we assume that inside of strings people are used to seeing "Line One^|Line Two" and understand what that means, it begins to ask exactly why being accustomed to that wouldn't let one equally accept "Line One" ^| "Line Two" and if the ability to write N ^| X is better than N NL X or L LF M
It's a question and an investigation.
Having something that doesn't look like a variable name begins to push the newlines, tabs, and spaces you want to throw in "out of band" of word space.
And ties into existing accepted practice that can be used in places that aren't words. I find the options opened up by this, and the ability to see the L and M and take the newline for granted to be a benefit.
 
@HostileFork I fear both are really rather ugly. If you rewrite the latter (as you did later) to not use plain words instead of the visually very noisy ^-escapes, it might have a slight edge.
 
6:19 AM
@earl Getting "non ugly" involves separating your control variables from the abstract template for the print so you can see the print pattern more clearly.
And that's a dialect design thing, which this is not tackling.
I'm saying "within the constraint of it being this kind of code" the latter, if you prefer #3, is a "portrait of reform"
 
That's one of my main problems left with your COMBINE. It still strikes me as a rather bad templating dialect, when what you really seem to want, is precisely that: a good, integrated templating dialect.
Someone should one day tackle that as well :)
 
@earl One step at a time, and it would probably use COMBINE in its implementation somewhere...
 
@HostileFork I tend to agree, in theory. However, in practice, all you now see are the newlines, the rest of the structure (arguably the more important part) is lost in visual noise.
Also, I wouldn't go as far to say that just because people are used to seeing "Line One^/Line Two" that they should use that syntax. Quite to the contrary, I generally recommend trying to avoid escapes when possible, for improved clarity.
 
 magic [(:foo tab) tab arg/1 (:bar {--} arg/2) (:baz space "(" arg/3 ")") newline] [
    foo: all [extra | word? arg/1]
    bar: arg/2
    baz: all [arg/3 | not refinement? arg/1]
]
Or something to that extent.
A small transformation on top of COMBINE, the original code being unfit for the transformation.
 
@HostileFork I think we have a few quick shots to that extent already (one thing that comes to my mind immediately is Ladislav's BUILD). But this needs to be more than a quick hack, it needs careful and attentive design.
 
6:31 AM
@earl Well, rebol-proposals just got MATH. I don't have a problem with putting BUILD in, or anything else that is necessary in some form even if the current form is hackish
You have to start reviewing and using and testing to figure out what's good or not.
@earl We've discussed perceptual plasticity, and how you might begin learning something one way and have something look ugly at first but then think "hm, this is totally readable". Just because you're used to something doesn't mean you know how it's going to seem after you've used it for a while. Whether something "jumps out" at you or "fades into the background" is very much experience based
I cited the period barrier as something I thought "well, this might be good, it's not disruptive" and tried for a while and absolutely hated. Still wanted the feature so gave vertical pipe a shot...and began to really dig it. Would I have known I would think that way? Not if I hadn't been trying it a while.
 
@HostileFork Absolutely, you don't have to argue on that with a person who is perfectly fine and happy with reading and processing (and, writing ...) +/\(2-/\-D*xs)#N*(ys%&(2-/\-)xs)%D.
But I don't think that's what Rebol wants to be, or that's what people want Rebol to be in general. For lots of visual noise, it's relatively easy to find suitable candidates.
 
@earl You need to wait. With all the ^|^_ we soon should get there.
 
I'm, as you well know, psyched to get proper word escapes. But just because we can have them, doesn't mean that we should become careless about using them.
 
@rebolek The question is not whether to eliminate [foo space bar newline baz]. It's whether when-and-if you cross into "abbreviation land" if [foo sp bar lf baz] is proper, as it starts to encroach on non-legible low-character-count-space, or if [foo ^_ bar ^| baz] becomes the more readable alternative.
"I'm the type of person who likes abbreviating things". "Okay, abbreviate using the uniform character escapes then. SP is not a literate English (or other written language) word. It's a good variable to store a stack pointer in."
@rebolek Those are supposed to be exceptional cases.
 
@HostileFork On the other hand, by that reasoning, LF is a good variable to store a line feed in.
 
6:42 AM
@earl Taken by Laminar Flow.
Rebol's in-the-box eating out of what should be variable space is just incorrect. It's like DT. It's like LS. It's wrong to have them in "the language".
 
@HostileFork That's why they are in "the console". Just that differentiation between the two has historically been difficult.
 
Nothing will stop you from defining SP: SPACE if you want it. But putting it in the box is not right. Putting ^_: space in the box is not taking a variable anyone would use. It puts the responsibility to say SP: SPACE on those who insist upon that, and will never make it into examples or tutorials.
 
@HostileFork That's like your opinion, man.
 
If some example writer uses ^_ as space, that's their prerogative. They didn't introduce any idea to you that won't serve you elsewhere.
You might go "why'd you use ^_? I think it's ugly. The language has SPACE"
 
@HostileFork Oh, it sure will. Just like all your experiments are littered all over the place in examples and tutorials. If people like something enough, it'll show up in tutorials.
 
6:45 AM
But you won't say "why'd you use ^_? I think it's ugly. The language has SP."
SP should not be in the box. SPACE should. That's like, my opinion, man.
What makes SP right and SPC wrong?
 
print-parameters: func [label list /extra] [
    if empty? list [exit]
    rejoin collect [
        keep label
        foreach arg list [
            if all [extra  word? arg/1] keep tab
            keep tab
            keep arg/1
            if arg/1 [keep { -- } keep arg/2]
            if all [arg/2  not refinement? arg/1] [
                keep " (" keep arg/2 keep ")"
            ]
            keep newline
        ]
    ]
]
 
Why not AP for APPEND. Why not all of Rebmu come standard? I've got the most extreme and (as I've said, most exhaustive) study of "the box" ever done.
 
A third variant. (Untested)
 
@earl You can't say if all [extra word? arg/1] keep tab can you? Haven't looked at the implementation but hard to imagine COLLECT being able to do that.
 
@HostileFork Right, needs a [].
Lazy transliterator ...
Now imagine if we had a REKEEP ...
/me ducks
 
6:52 AM
Using the COMBINE-based PRINT ("NewPrint") has an advantage in terms of being able to imagine an efficient implementation. Not that the current one is; it's non-native. But it could be.
 
Ah, yes, missed a PRINT as well :)
Or a PRIN, rather.
 
The original version I was messing with (from the source code for HELP) has many problems, but it also cannot be made efficient as it's not "declarative enough". Something can't be grinding through it building the string up.
It's manual, out of order, and bad enough that I had bugs when translating it to be one PRINT.
We may debate what's "in the box" with me demanding "no SP", and I think this says more about philosophy of what to put in the box vs. not. I remember my first LEGO set and it was the greatest thing I'd ever seen. More thought in packaging and the experience than I'd ever seen. That made all the difference. And today, I still am impressed when that thought has been put in. So...that is the thing that inspires me.
But beyond philosophies of different kinds of "utopian visions", perhaps we could focus on a more relevant-in-the-moment question. I mentioned that rebol-proposals is now its own independent repo, so @rebolek and @earl and anyone else...maybe instead of the SP argument we could have some PRs and thoughts on what you'd like to see changed or what's not-in-the-box-that-should-be
I mentioned above that by inclusion of Gabrielle's "EVAL" as "MATH" I'm willing to put in placeholders just to say "this is a thing that represents a thing that must be in there." What else?
Is there anything you would kill or change?
 
I would kill bugs.
 
@rebolek Learn C. :-/
 
 
3 hours later…
9:41 AM
posted on April 01, 2015 by fork

[Comment] As we debate questions like "Plan Minus Four" and other issues... ...going to agree with @Ladislav and others saying that not being able to write effective loop wrappers is blocking. This problem is a fundamental challenge to the basic premises of the language. Looking for BREAK and CONTINUE is something that functions that wish to consider themselves looping constructs must active

 
 
4 hours later…
1:56 PM
So let's assume we have implemented words run on until space or EOF, and it is a syntax error if the result is not recognizable.
For consistency, then, we should probably treat set-, get-, and lit- words the same way, as far as spacing goes.
But, and here's the question, should we rule out such not-word run-ons ever not being a syntax error?
That is, even if word[block] has a meaning, should we say 'word[block] or word:[block] will never have a meaning?
In case you are wondering, I'm in the yes camp on this question. It's also not a trivial question.
NB: I'm not saying they should auto-separate. I am saying they should always be errors.
 
2:16 PM
This is similar to what (I am suggesting) should happen to pseudo-constructs like scheme://site:[block] or 'fred@jimbo[block].
To start you thinking about my upcoming bug post(s), here's a typical nugget:
>> error? try [load {#[path! [now]]:}]
 
; Brought to you by: try.rebol.nl
== set-path!
; Brought to you by: try.rebol.nl
== true
 
Woops, edited my "good" RebolBot input string, sorry. Here it is again:
>> type? quote a/#[path! [now]]:
 
; Brought to you by: try.rebol.nl
== set-path!
 
So, to summarize, the final colon is parsed if the path is scanned, but not if it is constructed.
Bug or not?
 
3:10 PM
Makes sense to me, if you wanted the latter behaviour you would do this:
>> type? quote #[set-path! [now]]
 
; Brought to you by: try.rebol.nl
== set-word!
 
That's a bug in RebolBot's R3. Mine prints set-path!, so sorry.
 
4:00 PM
@MarkI construction syntax should not support posfix semicolon like that
@MarkI That one seems right.
 
@HostileFork Just a quick remark on the RETURN/EXIT capture comment:
There's two separate issues here, which are probably better discussed in separate.
Handling the capture of BREAK/CONTINUE might well deserve some convenience wrappers, but is in general a non-issue.
Just write your wrapper appropriately, and you'll be fine.
Capturing RETURN/EXIT, on the other hand, is an issue. Because there is no way to write a wrapper without using a function in the first place.
That's why the only problem this ticket is concerned with is RETURN/EXIT capture in functions.
 
@earl If a function can define locals like func [x y /local z] [...] and have z be something that binds, is there any way functions could bind return to the site where it was written?
 
@HostileFork Yes, if RETURN would follow definitional scoping rules. Currently it doesn't.
The "most agreed upon" proposal towards solving the RETURN/EXIT capture problem includes introducing a definitional RETURN in one way or another.
 
@HostileFork Thanks HF.
 
In R2, what you could do, is create a function and say that it is completely transparent to RETURN/EXIT.
 
4:15 PM
Any opinions on my other Q yet?
 
The attribute that triggered that behaviour was called [throw] in R2.
One way forward for R3 would be to simply mimic that exact behaviour as well, although the attribute would probably be written "throw:" (similar to a "return:" function attribute).
@RebolBot do/2
f: func [[throw]] [return 42]
f
 
; Brought to you by: try.rebol.nl
** Throw Error: Return or exit not in function
** Where: f
** Near: return 42
>>
 
@MarkI If the scanner encounters something that it knows is bad, it can stop scanning as soon as it knows it's bad... I don't exactly know the implementation details.
 
However, consensus so far has been that we want to improve on some serious drawbacks this approach entails.
 
@earl I will join that consensus, as the example suggests.
 
4:18 PM
One thing we really need is a good name for an attribute to completely disable capture of RETURN/EXIT.
So far, "throw:", "no-local-return:", and "fallthrough:" have been suggested, among others.
Wide-spread happiness about any one of them has eluded us, so far.
Re-reading what I wrote above, however, suggests that "transparent:" may be a more acceptable alternative.
 
@earl Why not have a way to throw a return past the function, and just define return as that in the body of the function? func [x] [return: does [return-past] ...]
 
@HostileFork Because you'd just shift the problem one level higher to RETURN-PAST.
 
@earl You'll need magic at some point or another, why put the magic in the spec?
 
@HostileFork Because that's where the magic is needed.
 
@earl In a language with constructs like THROW and CATCH that you obviously can't write yourself, I'm not understanding the logic of that argument.
 
4:26 PM
I'm not sure I understand what you are proposing here, then?
RETURN-PAST being a keyword?
The words THROW and CATCH are not magic in any way.
 
@earl Hm, I guess if the RETURN was definitionally scoped by the caller you can't change it
 
Currently, RETURN is dynamically scoped.
Definitionally scoped RETURN, would, alone, already solve most of the problem.
If you want to catch the RETURN in a foreign block you executed, you'd rebind RETURN inside that block to your wrapper's RETURN.
 
Perhaps what you actually need is RETURN/REALLY, which says ignore this spec attribute
 
If you don't want to catch the RETURN, you wouldn't have to do anything. It would already be bound to return to somewhere else.
 
I'm just trying to make sure that putting this attribute on doesn't mess up being able to do both.
 
4:30 PM
For basic definitional return, you don't need an attribute at all.
On top of that basic proposal, however, there's a a few alternatives which try to balance some tradeoffs.
 
Well it sounds like it would be a good start just to see a definitional return for starters
Get some experience with that and see what happens.
 
With pure definitional return, RETURN would always be bound inside a function's body. What if you don't want to do that? (Because, for example, you constructed the body via code in the first place, and can't be 100% sure what's in it.)
So hence we add an attribute that disables rebinding for definitional RETURN inside functions completely.
Now one question remains: what to do about our existing dynamic RETURN and EXIT? Get rid of them? Keep them and integrate them into the definitional model?
 
I maintain that EXIT is a deceptive and confusing name, which doesn't mean to any of the current world "return no value from this function" but rather "exit to operating system", and like RETURN VOID, which at least reduces the word set.
void: does [] or equivalent
 
@HostileFork Only to those parts of the current world using a particular set of operating systems.
Also, irrelevant to the capturing discussion.
 
@earl Also known as: the world.
With definitional return, why wouldn't you get rid of the current one?
 
4:37 PM
I most likely would. But the idea is, that some cases definitional maybe wouldn't pick up a useful RETURN that would still work if we kept the dynamic one.
IIRC, @BrianH has some PARSE wrappers in mind re that use case.
 
Well it sounds like you have a pretty good picture of it, and said you were thinking you'd work on it. How long do you think it would take for a basic implementation of the definitional return?
An interesting thing about wrapping break and continue that you didn't do, if you have control over calling code that might do it and you're inside a loop yourself, is you can mark a variable as "going to execute code" and then check it on entry to loop body and after the loop and take action on it.
@RebolBot
x: 1
while [x < 10] [
    print x
    do [break]
    ++ x
]
 
; Brought to you by: try.rebol.nl
1
 
Hm, I had a problem with DO the other day where it wasn't working inside a loop. Wonder what that problem was, looks to work there.
 
@HostileFork No idea yet. Requires some deeper changes which are slightly hard to predict. Overall, it shouldn't be too hard.
 
posted on April 01, 2015 by abolka

[Comment] There's an extensive write-up (examples included) that distils down even more extensive discussions of this issue over the years: http://rebol.net/wiki/Exceptions#RETURN_and_EXIT In my perception, we have reached something looking like consensus over using one of the last two options (that is: "Definitional return only, with an option to not redefine RETURN and EXIT" or "Definition

posted on April 01, 2015 by abolka

[Comment] Based on some recent attempts of explaining the issue and the proposed fixes, I propose a new name for a "disabling" attribute (for solutions which need it): transparent:

 
5:17 PM
posted on April 01, 2015 by Joshua

Surname: Ulasi, Other Name: Joshua. Email: editizites@gmail.com. desired username: joshuaike2002

 
5:59 PM
Y'know, I've been thinking about it...and I've been on the wrong track here. The words used in Rebol don't really matter. Really, it's the programmer's job to adapt to the tool--if you can make it work, what does it matter what the words are or the parts fit together?
2
If the tool is small enough, and dependencies are controlled, and a task is is possible to do with the language--that's what counts.
There's already plenty of formalism out there, and languages like Lisp and Haskell. The really unique properties of Rebol are what's driven the interest--not formalism.
 
@HostileFork A tool must be practical else it will stay inside the toolbox.
 
April Fools' Day (sometimes called April Fool's Day or All Fools' Day) is celebrated every year on the first day of April as a day when people play practical jokes and hoaxes on each other. The jokes and their victims are known as "April fools". Hoax stories may be reported by the press and other media on this day and explained on subsequent days. Popular since the 19th century, the day is not a national holiday in any country, but it is well known in India, Canada, Europe, Australia, Brazil and the United States. The earliest recorded association between 1 April and foolishness can be found in...
 
6:19 PM
@HostileFork Javascript in a nutshell!
 
Looking right now at some kind of nasty memory bug that Lest has exposed.
 
 
1 hour later…
7:35 PM
...and I believe I have found it.
 
@HostileFork :)
 
item is a Rebol value pointer into the series data for the rule.
Imagine for the moment that parse has been made "safe" with respect to rules being modified by code during execution of that rule (it appears to have been, I'm looking into how that can be possible).
But... this pointer to the value in the data block is just sort of incremented along. What if the code actually expands the series, triggering a realloc so that the data pointer is into stale memory?
That's my current belief as to what's going wrong.
@RebolBot
rule: ["a" "b" (insert find rule "^(64)" "c" probe rule) "d" "e"]
parse "abcde" rule
 
; Brought to you by: try.rebol.nl
["a" "b" (insert find rule "d" "c" probe rule) "c" "d" "e"]
== false
 
@RebolBot
rule: ["a" "b" (clear rule probe rule) "d" "e"]
parse "abcde" rule
 
; Brought to you by: try.rebol.nl
[]
== false
 
7:44 PM
Given the implementation here, I'm puzzled as to why it doesn't just crash, unless it's also still pointing into the old memory and so it still sees the image of the rule as it was...but if so, wouldn't Valgrind be going nuts?
I'll ask a question in case this is already known territory somewhere to someone, and send it to BrianH
Oh. Valgrind isn't going nuts, because there's no free.
The memory is still allocated and good, it just set the series size.
If you reduce the series size, the rule will just keep running on the values that are there until it hits the (old, irrelevant) END! marker.
 
I believe that I both understand and agree with your analysis so far.
Curiously, this happens in l-scan.c as well, but the code used is slightly different:
 
The reason @rebolek got a crash is because he hit the one case that actually does screw you.
 
value = BLK_TAIL(emitbuf);
 
That is if a free does end up needing to happen
 
If you change to that code all should be well.
Well, change emitbuf to series, of course.
 
7:56 PM
It won't happen due to a garbage collection, but it will happen if what you do triggers Expand_Block and a realloc. Then you get freed memory. Then valgrind will complain.
The rest of the time you'll just get kind of unpredictable odd behavior
But no crash.
It's only "perfectly safe" to modify a parse rule if it's not in the current stack of rules being executed.
 
00:00 - 20:0020:00 - 00:00

« first day (1613 days earlier)      last day (2167 days later) »