« first day (1610 days earlier)      last day (2170 days later) » 

12:15 AM
@kealist Temporarily deferred until after the web reboot, but the main thing was coming up with the plan. I wanted to get a bit of feedback on the article and my Doxygen stackoverflow questions before investing in the approach. Reminds me that I need to send that article to the Doxygen mailing list or somesuch and see what people have to say.
 
12:46 AM
posted on March 29, 2015 by Malko

Hello, A year ago, I asked about a a simple 'rebol only' way to know the 'bpp' of an image (colour depth). Recently, I found this interesting article : http://www.hsc.csu.edu.au/ipt/mm_systems/3289/image_file_size.htm Based on that article, it is possible to estimate the bpp of an image like : img: load %image.png sze: size? %image.png x: img/size/x y: img/size/y bpp: ((sze * (8 * 1024)) /

 
1:20 AM
0
Q: Find arity of a rebol function

TorbjørnI needed a way to find the number of arguments a function or operation in Rebol accepts (the functions arity). I could not find any direct support for this in the language, so I made my own arity function: arity: func [ "Returns the arity of a function, disregarding refinements." :f [fun...

 
 
3 hours later…
4:15 AM
0
A: Find arity of a rebol function

HostileFork Are there really no easier, built in way of getting the arity? That exact function is not in the box. But the most important thing most people want to do with arity (a single-step evaluation) is covered by do/next. Usually you can't really look past the refinements, so a function that skip...

 
@earl Did you catch my observation on the Rebmu fix for Plan Minus Four? I sat down trying to figure out something complicated and then realized all I needed to do was turn a [...] into a[...] and a[...] into a [...]. Make a few exceptions for # and @ and that's it.
(and parens too, of course)
 
4:36 AM
@HostileFork Yep, saw that. Quite pleasing :)
 
>> find [a b c 10 d e f] integer!
 
; Brought to you by: try.rebol.nl
== [10 d e f]
 
I did not know you could do that. Useful.
>> select [a b c 10 d e f] integer!
 
; Brought to you by: try.rebol.nl
== d
 
3
A: Find arity of a rebol function

earl Finally: Can you suggest any improvements to my code? Fair warning ahead: I've only tried the following with Rebol 3. That said: going into a different direction than the improvements suggested by @HostileFork, here's an alternative approach: arity: func [ "Returns the arity of a functi...

2
 
4:49 AM
@HostileFork If one couldn't, I'd have had to build it just for this answer :)
 
5:28 AM
@JacobGood1 You might find earl's answer above interesting, I don't recall if he mentioned such a solution when you were trying that before
 
 
3 hours later…
7:59 AM
@HostileFork Not necessarily. You can define template for it: mylist: data block! [list print << data] and then you write mylist [{item1} {item2}] as you are used to.
 
 
1 hour later…
9:21 AM
All the hour of summertime is good for is shorten the long long long week they have in China...
 
9:52 AM
posted on March 29, 2015 by fork

[Comment] I've experimented with this and found that though I like the idea, I do not like dot (or by extension, comma) for it. >> .: does [exit] >> if all [1 + . 4] [print "Confusing."] ** Script error: + does not allow unset! for its value2 argument ** Where: all ** Near: all [1 + . 4] [print "Confusing."] Too close to the baseline, too hard to see, too likely to get perceptually stuck to

 
 
7 hours later…
4:37 PM
posted on March 29, 2015 by MarkI

[Comment] I'd love to hear the reasoning behind why this was not also changed at the same time: >> [ ( > [(

 
4:56 PM
posted on March 29, 2015 by MarkI

[Comment] If non-word characters close a word token, no syntax extensions that begin with a word would ever be backward-compatible.

 
5:20 PM
Which would be less disruptive?
a) Disallowing tags in paths - you'll have to put them in parens: .../path/(<tag>)/path
b) Disallowing arrow-words in paths - same but quoted: .../path/(quote <)/path
 
@MarkI Less disruptive: b, in all likelihood.
 
I just think we need to have the discussion. Allowing both seems too confusing, does anyone disagree?
@earl Thanks. Your opinion, or do you have some enlightening example?
 
@MarkI Opinion, mainly. path/<tag> is conceivably useful, in some cases; path/< et al hardly ever are (or only is in far fewer conceivable cases).
 
@earl Agreed. But that may change if we expand allowable words to include <===========> et cetera.
Wouldn't necessarily make them more useful than tags, so your point would still be valid though.
For clarity, the detail I am trying to clean up is this: path/</>/path. It currently has two readings.
I am also keeping in mind not making it impossible to write a syntax highlighter.
 
5:39 PM
@MarkI I suggest that nothing starting with < and ending with > be a "natural word", and only created with construction syntax
 
That last bit may be asking too much though -- syntax is so much a part of the language that any code containing a syntax error will most likely cause the syntax highlighter to lose its mind :)
@HostileFork Thanks for the input, HF, should I assume you mean to choose option (b)? Or are you suggesting some hybrid (c) ...
@HostileFork And sorry to say, you unfortunately are ruling out <>, but that one I know was intentional!
 
@MarkI I would say that it's all right to punt on the issue, and fall back on construction syntax where necessary. If it somehow falls out, at some point, to be possible to write a/</>/b because </> is a non-legal natural tag or symbol, and a/<div/>/b is known to be a natural tag, then it might come up as "falling out" of the design. Until then, a/tag!{</>}/b and a/word!{</>}/b are fine.
Yup, death to <>
With Plan Minus Four, so far I'm thinking the type followed by no space is looking like the most sensible/pleasing construction syntax yet. It really depends on getting out of the habit of reading type![...] as type! [...] but I think that can happen.
 
5:56 PM
@HostileFork Great. You do see that you are guaranteeing that a syntax highlighter cannot be written except in Rebol, right?
@HostileFork You are not helping anything by clinging to this impossible position. Please consider loosening up on that one, please.
@HostileFork Agree totally on this point.
 
@MarkI Knowing what the right thing is helps, even in explaining why a wrong thing was done. But certainly there are always opportunities for redesign. Just because DocKimbel isn't going to be likely to take a whole lot of those opportunities doesn't mean no one will in 10, 100, 1000 years...
Of course the argument for != for inequality is a different one from whether <> is a natural word vs. a natural tag vs a parsing error.
 
 
2 hours later…
7:39 PM
Speaking of applications of <>, what about type!<...> when what's being chosen from is not structural nor a "spelling"? So logic!<true> for instance, and maybe unset!<> and none!<>
The reason that makes sense is because that's kind of the understanding of what a tag is; that you're picking out of a finite set of available tags (at least in HTML). So that would contrast to word!{arbitrary spelling}
 
 
2 hours later…
9:19 PM
posted on March 29, 2015 by fork

[Wish] One thing that has arisen out of viewing code on the web is to emphasize a point that is true about viewing it on paper: you can't really tell where the invisible whitespace is. {This line has no spaces after the period. This line has a bunch of them.     Did this line start with a tab or spaces? } In working with the domain of UTF-8 input for progra

 
10:13 PM
posted on March 30, 2015 by fork

[Issue] It is often the case that one wishes to use a multi-line string in indented code. What *looks* the best would be:     list [         item {             This is multi-line content             For this particu

 
10:49 PM
@MarkI I just noticed GitHub syntax highlighting flagging what it thinks are likely problems in strings...even when they're not actually strings.
 
11:25 PM
@HostileFork Different, perhaps. Unrelated, perhaps not. If <> is not-equal, then it had better be a natural word.
 
@MarkI Would seem a bit iffy for it to be a natural tag, and the evaluator make an exception and hardcode it as not equal... yes...
 
@HostileFork I think we are going to give syntax highlighters conniptions. How many languages even have multiline non-strings?
@HostileFork How about </>? Clearly tag? Iffy? Clearly word? Obviously syntax error?
 
Someday there will be a language database with attribute tracking to answer that question.
 
Sorry for asking you all the toughies Brian.
 
@MarkI Clearly not word; no slashes in natural words. We're forced to allow them in tags because we have to. I'd consider it to be something that should probably be legal if <> were a legal tag, because you might say e.g. close-tag: copy </> then insert close-tag tag-name (for instance).
If <> is illegal, then it should probably be illegal too. If <> remains a natural word that is sad, and </> should still be illegal to keep the problem from spreading
 
11:33 PM
@HostileFork Thanks, that does help me. I've had another possibly lame idea though.
 
@MarkI Someone has to ask the hard questions... because a lot of people like to wish they weren't important!
 
Since Rebol tags can begin with space and/or carriage return, force tags that begin with non-alpha to begin with one.
So </fred> is syntax error while < /fred> is fine. Could even FORM without the space, but must MOLD with it.
 
@MarkI < /fred> should mold as <^_/fred>
 
@HostileFork Also acceptable; we could allow tags to begin with Rebol "word" chars like hat. Needs more thinking.
 
@MarkI Not sure what you mean (or above). </fred> needs to be a legal tag. < /fred> would be illegal under the rules I've proposed for using < or > in natural words... namely not taking advantage of the fact that a> can work if you don't have a tag open but <a can't not open a tag.
 
11:39 PM
The important thing is that it mold into a loadable string, obviously.
@HostileFork What I have been talking about is the scanner. What does the scanner see as word versus tag, what is used by the scanner to indicate such.
For the record, I will always be against introducing wholesale changes when simple, clear, understandable, and logical ones would do.
 
@MarkI I wrote up the tag rules curecode.org/rebol3/ticket.rsp?id=2206
It would be easy enough to say <^_/fred> if you want to load a tag with a leading space.
There'd also be tag!{ /fred}, which brings up the question of when mold should go to construction syntax vs. using caret escaping.
Caret escaping seems to make more sense for tags, for visual reasons.
 
@HostileFork I have not summoned up enough courage to comment on that one yet HF, sorry :)
But you do raise a topic that we should talk about more, namely, if we have several ways to "construct" otherwise-erroring input forms, which one should mold/all use? I know the answer, "the one that is the most literal", but ... that's actually not an answer :(
I will write up my space-tag proposal and put it in CureCode I guess. I mean, what else can I do?
-----------------------------
PS I know everyone is wondering, I'm almost finished my bug list. Expect me to post something significant early this week. Hopefully!
Oog, I meant "literate" not "literal" above. Sorry.
 

« first day (1610 days earlier)      last day (2170 days later) »