« first day (1733 days earlier)      last day (2047 days later) » 

12:48 AM
posted on July 30, 2015 by hostilefork

This attempts to kill several birds with one stone. The original motivator was that IS_BLOCK_SERIES would test a series to see if it contained REBVALs by seeing if its element width was 'sizeof(REBVAL)', as opposed to having a series flag for that purpose. As series are used for many other data types (pointers, REBYTE, REBUNI, etc) it always struck me as sketchy because you might want to

 
@ShixinZeng Okay, I think that probably ties up the issue nicely, if you can review --^
 
1:13 AM
> "I actually am not a big fan of making a separate function for something that is called exactly once. Length of a routine does not bother me if that's how long it actually is. Breaking a piece of one-off code into a function can effectively make things longer and more confusing, under the mere "appearance" of modularity and manageability." -- me
When we had automatic code lifting tools based on graph structure, we had the idea to write an automatic algorithm that would do mutations until each function besides main was called exactly three times. :-)
 
 
3 hours later…
4:01 AM
posted on July 30, 2015 by fork

[Bug] If an assertion fails, the resulting error message attempts to capture the failing expression that it detected. For some reason it only takes up to 3 elements of that expression. >> assert [true 1 + 3 = 2 true] ** Script error: assertion failed for: [1 + 3] ; > conditions: [true true (clear conditions false) true] == [true true (clear conditions false) true] >> assert conditions ** Scr

 
^-- That's actually a little bit of a puzzle on how to fix efficiently, because it's not even enough to copy/deep the block before running it. The ability to modify the block as you go means you'd have to copy/deep the remainder of the block on each Do_Next.
I think we probably should have a locking mechanism to prevent these kinds of modifications, in parse rules and in Do. One reason for doing so is that you can effectively make self-modifying rules by putting a series in that rule in advance, and then adding to that series. It just imposes a bit more order.
Not that it helps assert here really, because locking the topmost level won't help it report the /deep rendering of its condition once elements inside have been shuffled just because the top level was locked.
 
 
2 hours later…
6:31 AM
I wonder if all [] returning TRUE is the best choice. It's almost as if returning something like <empty all [] evaluated to true> would be better, because it's "truthy" and doesn't give the illusion that ALL is an operation that returns LOGIC!
 
And what it should return?
From the doc: "Evaluates and returns at the first FALSE or NONE."
 
Well, my suggestion there is something a little more customized. If it's going to pick a truthy thing out of the blue, why not pick a truthy thing that mentions "all []"?
It can be cheap, it could just be some global locked value initialized at boot time, so there's no performance difference.
 
Evaluates and returns at the first FALSE or NONE. - so when there's nothing to evaluate, there's no FALSE or NONE to return, so it returns TRUE. Fine by me.
 
I'm just speaking about having the base cases of things guide people a little more towards understanding it's not a function that returns a LOGIC!.
(Unless you feed it a logic, and that's the last evaluative result)
Or it's a false.
Anyway, getting close to committing the "TOS1" elimination, and things will hopefully speed up soon.
TOS1 being the stack protocol where Rebol would pop the data stack, and then have a big "WARNING! VOLATILE! USE RESULT QUICKLY!" you had to pay attention to, because you were reading past the valid positions on the stack, so any pushes would overwrite it.
Not a good invariant, it's a bit like doing a malloc() and then a free(), and then saying you "know the data is still good until another malloc() is done" so you reuse that pointer.
"Just be sure to use the data before another malloc() gets called somewhere, by somebody"
>> while [true] [break]
>> foreach x [] [break]
== none
@rebolek Given my newfound affinity for "break with no /with means unset", I want foreach to return unset too.
Hm, I guess it probably does if the loop runs...
Yes, it does, but that's an odd one, hm.
 
6:54 AM
Hm, I don't like functions that return unset!.
 
You can break/with none if it's important.
Probably most of the time it won't matter.
 
Probably not, I don' usually break from foreach
 
I was wondering, since continue could have an associated value also, if there was any interesting continue parameterization
Random example you might be able to continue a certain number of steps... continue/skip 3
Not necessarily a good idea, just pointing out that it's a possibility if there are good ideas
What might be useful would be a continue/until, which took a block.
Then it would advance the loop condition to the next thing, but wouldn't run the body until that condition was satisfied or the loop ended.
    >> for [x: 1] [x < 8] [x++] [
        print x
        if x = 2 [continue/until [x = 5]]
    ]

    1
    2
    5
    6
    7
That could be useful... while and until refinements on continue.
@rebolek ^-- neat idea?
substitute ++ x for x++ (perhaps obviously, looking at a lot of C atm)
The problem with such variations is that everyone has to support them, because if you make a looping construct people will expect it to handle break and continue. With break/with you also have to handle that, and then this would create more cases. How do you ensure that someone who supports continue supports all the variations?
 
7:21 AM
@HostileFork Looks interesting.
 
It could keep you from overcomplicating loop conditions and how advancement is done
 
OTOH it could make overcomplicating much easier in different ways ;-)
 
The other way you could attack the problem would be filtering the thing driving the loop, but it may be that you want something more imperatively reactive to conditions in the body that happen as you go.
 
 
1 hour later…
8:24 AM
Hmm. Is there a particularly good reason why in PARSE not to use refinements for things like insert/only (instead of writing it as insert only)? There's a slight locality benefit, but I don't know if that outweighs not being able to see the parameterization more clearly.
Hm... Red's PARSE documentation says "break : break out of a matching loop, returning success." Yet in Red as in Rebol, BREAK returns an UNSET! when leaving while loops/etc.
That sounds more like "accept", to pair with "reject": "break out of a matching loop, returning failure.".
I understand the premise of re-using keywords to avoid trampling on new space, but it seems the accessibility needs to be cleaned up.
I also think GET-WORD!/SET-WORD! were used incorrectly. To this day I can get confused about pos: vs. :pos. You have two things... the variable and the parse position. What intuitively about this tells you if the thing being "set" is or "got" is the variable -or- the parse position? That's why I liked MARK and SEEK better, as well as allowing you to mark a non-locals-gathered word, like mark pos vs. mark pos:
Then, with seek pos being how you get to a position, it frees up :pos to mean "I don't mean this as a keyword, I mean actually look up this word as a variable". So if you had a rule called accept you could write accept :accept.
I thought this might be a good pattern to lay out as a "dialect survival skill", where tending to use GET-WORD! for this purpose (when speaking about things looked up as variables) would mean people don't have to rename everything just to insert a usage of some dialect X. Similarly, keeping the locals-gathering capability for any variable setting forms of meaning for the word and set-word versions.
This would not mean you couldn't do weird things with GET-WORD! and SET-WORD! if you weren't using them to mean Rebol variable references. It would just be a convention if that was what you were doing with them.
Anyway, if the parse keywords were going to reuse language keywords, they should be BREAK for reject the rule and CONTINUE for accept it.
 
8:57 AM
"To this day I can get confused about pos: vs. :pos. You have two things... the variable and the parse position." Actually, it's just because SET-WORD! has been added as argument for SET which was BAD IDEA™. Before it was much simpler - set-word! stores position, get-word! sets it. Nothing complicated. But someone though that FUNCTION should collect words in PARSE too and we got set-word as an argument for SET. Now it's a mess.
 
9:16 AM
posted on July 30, 2015 by qtxie

FEAT: preliminary support for CAMERA widget by qtxie

 
9:27 AM
>> while [do make error! "This isn't a bug"] [print "Good."]
** User error: "This isn't a bug"

>> while [make error! "But this is a bug"] [print "Bad."]
** User error: "But this is a bug"
 
posted on July 30, 2015 by fork

[Bug] See example code.

 
9:50 AM
False alarm on that, actually... tested in an old interpreter before the change I made where errors that are returned by value are MOLDed, while if something raises an actual error via invocation the console FORMs them.
Which is a very helpful change, by the way.
 
10:48 AM
Hmmmm. Rebol's CRC value calculation internally generates an unsigned 32-bit number, but the generated value is signed. Presumably because Rebol2 had signed 32-bit integers only, and no way to return a 32-bit unsigned.
 
 
2 hours later…
12:47 PM
World seems to have a 'lit-string type. Geomol explains: "lit-string! is like a nil-terminated string found in other languages, as in ANSI C. So it's not a series! in World, like you have string!, binary!, etc., and you can't manipulate it like those. It's fast and use less ressources, so good for strings, that don't change."
Would you find it being a usefull type for Rebol too?
 
1:08 PM
I don't think that it would make much difference in Rebol.
 
2:00 PM
@pekr If such a thing existed, it wouldn't need a REBSER, so it would be slightly lighter weight, at the cost of not being able to treat it like a series or modify it.
But when you are getting to the bit-level optimization questions, that's probably part of a bigger need...the kind of boundary to where you shouldn't be using Rebol, but a database or Redis or something of that nature. Rebol should focus on being good at its core competency, not in being a native bit-twiddling optimization factory.
Our inching toward being able to generate and link in bits of ANSI C code with embedded TCC is a much wiser pursuit IMO, because that's what opens real potential for getting performance when you need it.
 
@HostileFork I think this generates CRC values in Rebol 3 (was for working with PNGs): gist.github.com/rgchris/d981107b44741cb63eca
 
@rgchris Cool, well if it lines up to one of the /METHODs then that would be helpful to have around.
Gotta run, back later...
 
Not sure how efficient it is, I was looking for something that worked...
 
@rebolek That part, the second sentence of the doc string, is fine. The first sentence is not fine though.
all may shortcut, but what it is shortcutting is certainly not AND.
 
@MarkI "Shortcut AND" ?
Yeah, I see.
 
2:17 PM
I don't think it needs to be there at all, the second sentence covers everything nicely.
Provided you understand "evaluate" as "run the do dialect consecutively" or some such, that is.
Hmm, does that mean there are four evaluation dialects now, DO, REDUCE, ALL, and "standard"?
Worm. Can. Opening.
 
aren't they all basically just one?
there's also COMPOSE and ANY
 
@rebolek I agree, in theory. It's just that formalizing the "basically" is tripping me up for some reason.
I think I understand now why LISP unifies "complete list" and "evaluable expression".
When you separate them, you get these sequencing variations, without anything syntactical to mark the differentiation.
 
2:35 PM
Maybe they can all be formalized in terms of a "DO_NEXT" dialect. Let me think about it.
Hehe. ALSO is a variation also.
 
3:13 PM
@HostileFork Been tied up since last chat with work & holiday so only just been able to try your new make -f makefile.boot
Worked a treat :) However I am now getting problem with http:// :(
For eg:
>> read draegtun.com
** Access error: protocol error: "Timeout"
@rgchris - You getting same problem above on your Mac?
 
3:40 PM
@draegtun Also been travelling, will try and check when I get a chance...
 
 
4 hours later…
7:48 PM
@draegtun Cool, thanks for building, I will look into this now.
 
8:11 PM
In the "file under @earl was right" category, fine-grained commits are valuable for bisecting down which change broke something. That broke in ea26f4a.
 
8:26 PM
@draegtun Fix'd, thanks for the report... it is very helpful if people can use it and report any strangeness (though it will be some time before there's a stringent updating process in place).
One irritation I have is that the code I'm trying to integrate is formed differently, because in addition to not using TOS1 to return values, it doesn't use TOS either. You always provide the address of the cell you want to write into, which can be anywhere (C stack variable, etc) and the way it works is that the garbage collector knows about that pointer because it's in the non-data-stack call stack frame.
So you don't even need to do the data stack balance most of the time...nothing gets pushed. The only things really using the data stack are REDUCE and COMPOSE, and even that's just an optimization.
Anyway, it's hard to look at it side-by-side, so I'm moving along on a branch trying to make that easier sooner rather than later.
 
9:12 PM
posted on July 30, 2015 by fork

[Issue] Consider the following: >> code: [path: 'foo/bar] == [path: 'foo/bar] >> result: do code == foo/bar >> same? result second code == false >> append result 'baz == foo/bar/baz >> code == [path: 'foo/bar/baz] Something unsettling is that you now have a single series "backing store" of data being aliased as two different types. In one place, that data is a LIT-PATH!, and in another p

 
10:06 PM
@iceflow19 Yo. What's new? Following along with the process? The stable-stack branch is where I've been working lately... waiting on some more testing with error-handling-overhaul. And patching things in master as they get found.
 
@HostileFork Hi. Ya I'm keeping up to date with what all is going on. Haven't been doing much except work and summer classes. Doc, @pekr, and I were chatting two days ago about how to get Red into Windows Universal Apps and to be able to use the WinRT API. I'd prefer ECMA 335 bytecode as a backend for Red, but for right now we may just have to settle for a bridge. WinRT components kind of weren't an option because of the COM ancestry.
 
Hm. Don't know much about WinRT. Something you can target with basic C easily?
 
I think you can link plain C in (so Red - when it gets there - or Rebol would work). Since Rebol now builds as C++ I figure we could wrap it in in a WinRT component (.winmd) if we wanted to, and it could be included in Windows Universal Apps
 
10:22 PM
You can always wrap C in C++, but it just might be easier if you find yourself needing to throw hook points into the source files themselves to get it to work.
 
WinRT is essentially COM with .NET metadata.
 
Building Rebol on WinRT could be interesting if you feel so inclined, it would likely be easier to get to a demoable and usable state. I generally feel that showing the benefit for one language shows it for the other.
 
The only caveat I think is that all IO has to use the WinRT library. So support would have to be added.
Talk to you later, Im about to run an errand. :)
 
Does anyone know if there is a Rebol/View capable version of R3 for the Raspberry Pi compiled yet?
 
10:39 PM
@Respectech You might ask @ShixinZeng...building Rebol/View is a bit different from Rebol3. I did it once, quite a while ago.
I'd imagine there's not any really good reason why it wouldn't work.
 
From inside Rebol 3: read file:///C/x works, read file:///C:/x doesn't.
From inside Chrome: file:///C:/x works, file:///C/x doesn't.
What a world ...
I guess I should be grateful they both still let me try both things, which, upon thinking about it, I am.
 
Among things I'm grateful for, I don't know if URIs make it on the list.
So I think that when used as a verb, queue can mean "put into a list" even if it's not a FIFO list.
 
@HostileFork But they're so ... uniform! How could you not like that!
 
Oh I like that part. I just hate resources.
 
Good thing we can do so much without them!
 
10:46 PM
Precisely
Is there a better word than "queue" for a generic kind of deferment into a processing implementation that perhaps is implemented with a stack, but that's not really of much relevance to the caller? "Defer_XXX" doesn't quite work. Submit? Post?
 
Sequence? Order? Anybody have any JCL expertise?
@HostileFork Hey, found it, from Unix. Spool.
 
I think I still like "queue", as in "queue that up".
> 1. a line of people, vehicles, etc, waiting for something: a queue at the theatre.
2. (Computer Science) computing a list in which entries are deleted from one end and inserted at the other
3. (Hairdressing & Grooming) a pigtail
4. jump the queue See queue-jump
vb, queues, queuing, queueing or queued
5. (often foll by: up) to form or remain in a line while waiting
6. (Computer Science) computing to arrange (a number of programs) in a predetermined order for accessing by a computer
queue the noun in CS is specific, the verb less so
 
11:19 PM
@MarkI So one thing we need sooner rather than later is some nice symboly things to use with the custom OP!s.
My knownst-leaning is that we get cool things like >>= and => and -->
And my also knownst leaning is that we get there by being less generous with TAG! in terms of what naturals are allowed, e.g. { this is a string } but < this is not a tag >
< and > can file a complaint at the office, but I'll just repeat what issue! had to say on the matter: #goodluckwiththat
I believe the state of compromise is such that <! and <? be taken out of the running for things you can use as natural word prefixes, and that they be read as starting tags.
It's a little bit unfortunate that said tags may legally end with --> which would be a legal word standing on its own if a tag weren't open, but let's say for @rgchris's sake we are cool with that.
But we do need the arrows for words in the language. <<, <=, <-, ->, =>, >>, =>>, >>=, and variants.
There perhaps should be consideration in the Plan -4 world that if foo<bar> could have some kind of meaning as a syntax, that <<foo> could reasonably be thought of as a word modifying a tag for a similar purpose. So if there's any contention there it should be reasoned through.
People should be drawing and justifying any interesting shape, because it may wind up just being "the arrow reclamation" and giving most everything else up to TAG!
is =|> actually useful? What about >*>?
 
11:35 PM
@HostileFork The only half-good thing about this deal is that it only applies to things beginning with <.
So right-arrow thingies are fine but left arrows are questionable.
 
I want a symmetry rule, so all word naturals you can make you can also make the reverse.
If you can make x>y you can make y<x, for any x and y including them being empty
In this world, <?> is an okay TAG! as is <!!!>
<- and -> are non-negotiable WORD!
 
I was going to say it's an asymmetrical "benefit".
 
<<<< and >>>> are non-negotiable, at any number of < or >, including one.
 
Hrm, I thought <- was one of @rgchris's reserved ones.
 
<!-- was a sticking point, mostly because it pairs with -->
 
11:40 PM
At the very least, 1-or-more-<s followed by 0-or-more=s, just because, yah.
 
@MarkI Don't recall—OTOMH <!, <? and <% are more important.
 
%, that's the one I was misremembering :)
 
%> and <% are too problematic to be words anyway, the former contentious with file.
Which means <@ and @> under NewPath would be similarly not options for words.
 
I was trying to go for something more generic than just '=', like "vertically symmetric", so explicit =-+ and not much else.
 
And |. Hm. Interesting.
Capacitor charge words: +||- and -||+
We're needing tildes though. ~=, ~>
 
11:45 PM
I like tilde as well, but some fonts have it up high, and that's, right out. But, under pressure, I would cave and let tildes in.
 
In any case, what we need is a controlled patch that doesn't break any sensible existing code and gets some options in for these arrows and operator words.
We've slogged through the debates enough, given up on the idea of --!> as an important symbol (use --|>, it looks better anyway)
 
I am sure at some point I will be creating and "arrow words" page, and handling the ... feedback.
@HostileFork Agreed, and well said.
 
It looks like the list is creeping down to =, +, -, |, *, ~, and maybe that is pretty much it.
 
But if they begin with anything other than <, of course, all word chars are allowed again: =<?! will be AOK, or even >=<?!.
So still a slight asymmetry, but a bearable one, just switched on the first character.
 
Hm. Should a<b be a word! ?
 
11:51 PM
@HostileFork I think so. And I like a->b for converter functions.
 
I don't think so, because aaa<b c> is more useful as a construction syntax.
 
Er, yah, wait a sec.
But do we really want to disallow a<b and allow a>b. Hm.
 
And calling a function a->b might seem cute, but it seems like it would be a case of intentionally trying to confuse people. There are enough problems when not trying to do it on purpose.
I think < and > are okay being illegal when mixed up with letters and numbers
That's tag's territory
This really is just the arrow reclamation, at the end of the day.
 
replace/all {people} {non-lispers} :)
If =0 is a word, which it is, then I see no inherent problem with >0 being a word.
 

« first day (1733 days earlier)      last day (2047 days later) »