AltME: REBOL3

Messages

Josh
One example of the bug:
rebol3> union/skip [1 1 2 2 2 2] [] 2
== [1 1 2 2 2 2]
red>> union/skip [1 1 2 2 2 2] [] 2
== [1 1 2 2]
PeterWood
I'm not sure what causes the bug in your example but its seems that there are bugs in both union and intersect when used with the /skip refinement:
>> union [1 2 3][]
== [1 2 3]
>> union/skip [1 1 2 2 2 2 3 3][] 2
== [1 1 2 2 2 2]
>> union/skip [1 1 1 2 2 2 2 2 2 3 3 3][] 3
== [1 1 1 2 2 2 3 3 3]
>> union/skip [1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3][] 4
== [1 1 1 1 2 2 2 2 2 2 2 2]
>> intersect [1 2 3][2]
== [2]
>> intersect/skip [1 1 2 2 3 3][2 2] 2
== []
>> intersect/skip [1 1 1 2 2 2 3 3 3][2 2 2] 3
== []
>> intersect/skip [1 1 1 1 2 2 2 2 3 3 3 3][2 2 2 2] 4
== []
Ladislav
Hi, Gregg! You wrote: "Wouldn't it make more sense for the first example to return 1?" - that is certainly an interesting idea, but I am not sure if may be popular.
The first disadvantage is that it would introduce a new incompatibility with older interpreter versions (R2),
and the second one is transparency. It would mean that the TRUE-BRANCH argument would not be normally evaluated, i.e., the programmer would not be allowed to calculate it somehow "just in time".
Gabriele: "Personally I don't think CASE should evaluate" - yes, that is another alternative. However, I do not think the current behaviour is correct in that case.
Josh
Here's a fix for the other hash issue in /skip (intersect/skip examples above don't work for this reason)
https://github.com/metaeducation/ren-c/commit/5e2fa93b66b6d372b6564e4bda1d4fe5a7d87eed
Gregg
Good points Ladislav. For your original question, the help for CASE says that what follows a condition is only evaluated if the condition is true, which seems OK to me.

Ladislav
Hi, Gregg. Unfortunately, "only evaluated if the condition is true" does not specifiy the behaviour as precisely as one may think. The examples below demonstrate the problem.
blk: [1 +]
case [
    true append blk 2
]
versus
blk: [1 +]
case [
    false append blk 2
]
, or similarblk: [1 +]
case [
    true append blk 2
]
blk: [1 +]
case [
    true append blk 2
]
sorry, copy and paste problem
ignore the text following the comma, please
Gregg
So what is the actual behavior? That is, what does get evaluated and what doesn't? Clearly stating how each is intended to work seems to be the first step. For example, should CASE enforce that values following conditions must be block types?
I can see the problem, with free-ranging evaluation, so constructs like your latest example seem like a bad idea in any case.

Ladislav
Well, the first example (preceding the "versus" word) yields 3 in Rebol 3, as well as in Rebol 2, and I dare to guess that it was intended.
Ladislav
The behaviour looks as inspired by IF. However, the behaviour of the second example (following the "versus" word) does not look reasonable, and I dare to say that it is a design (or implementation) flaw.
Gregg
So, in the latter case 'blk should be [1 + 2] and CASE should return none.
What was the reason for allowing non-block values for the cases, for both IF and CASE? Your examples tell me that it can be abused and hurt readability. Are there scenarios where it helps?

GiuseppeC
MARCO:
How should I use the EAN 128 font in REBOL 3 ?

GiuseppeC
What is blocking me to fully integrate REBOL in a company:
ODBC driver with some errors
No BARCODE support
No way to print a label using it
No way to rapresent a sheet of data using a report and print it or send it as PDF
Maybe since the last time I have used REBOL 3 things have changed.
Have you some solution, even integrating rebol with other technologies/libraries ?
Henrik
Regarding printing, there was some fairly functional and fast postscript output for REBOL2, which I used a lot between 2007 and 2013. Then I used adobe's virtual postscript printer, which then generates a file for the printer. I think also it can generate PDFs. It's also possible to generate postscript directly for the printer, but then the output becomes printer dependent and much harder to work with.
I had written a dialect on top of the postscript dialect, so I could output VID layouts as postscript.
Maybe there should be some work done on porting the postscript dialect to R3, and then you can use the above to support the rest.
GiuseppeC
Henrik, I don't have the skill for such high profile modification.
I could propose a bounty for it.
I don't want also do any work on REBOL2 because we must concentrate all of our forces on R3
I (we) need the following:
Printing on any size of paper (from A4 to rectangular labels) arranged with images and barcodes.
This would unblock a whole new opprtunities for REBOL3 to be used in companies.
Henrik
I believe it can be done. However I wish also it to make sense in a larger printing tool-chain, from authoring to printing.

GiuseppeC
Next week I'll propose a bounty.
Henrik
I hope there will be someone available to do it. :-)

Last message posted 161 weeks ago.