Archived messages from: gitter.im/red/bugs from year: 2018

9214
11:36I noticed that is, while being an op!, supports literal argument:
>> ?? is
is: make op! [[
    {Defines a reactive relation whose result is assigned to a word} 
    'field [set-word!] {Set-word which will get set to the result of the reaction} 
    reaction [block!] "Reactive relation" 
    /local words obj rule item
]]

however, user-defined op!s don't support neither get arguments nor literal ones. Can this be considered as a bug?
meijeru
12:14@9214 I have not seen the interpreter protest an op! definition with lit- or get-arguments.
9214
12:15@meijeru no protests, it just refuses to work with them :D
>> test: func [:x y][append form :x y]
== func [:x y][append form :x y]
>> test abracadabra 1
== "abracadabra1"
>> test: make op! :test
== make op! [[:x y]]
>> abracadabra test 1
*** Script Error: abracadabra has no value
*** Where: test
*** Stack:
meijeru
12:20Then it is a bug, I would say.
9214
13:30guess I'll file a ticket before I forget that I reported this ;)

luce80
10:02in R2 end-of-input/tail-of-input/empty-input/no-input is unset! in R3 and Red no. Is it by design?
>> about
REBOL/View 2.7.8.3.1 1-Jan-2011
Copyright 2000-2011 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM
>> type?
== unset!


>> about
*****************************************************
**  REBOL 3.0
**    Version:   3.0.0.3.3
**    Platform:  Windows win32-x64
**    Build:     12-May-2014/13:36:01

>> type?
** Script error: type? is missing its value argument


>> about
Red for Windows version 0.6.3 built 27-Nov-2017/19:24:27+01:00
>> type?
*** Script Error: type? is missing its value argument
*** Where: type?
*** Stack:

R2 behaviour could be useful for a function like this:
better-comment: func [a b [any-type! unset!]] [either not unset? get/any 'b [:b][()] ]

rebolek
10:05@luce80 In Red you need to quote the argument to get that behaviour:
== func ['b [any-type!]][probe type? :b]
>> f
unset!
luce80
10:09@rebolek Ok, so it becomes:
better-comment: func [a 'b [any-type!]] [:b]
x8x
23:07:point_up: [December 29, 2017 11:21 AM](https://gitter.im/red/bugs?at=5a45c2ba03838b2f2a498725) @toomasv Thank you for the position example :-)

toomasv
04:07@x8x You are welcome!
rebolek
11:44Hm :suspect:
>> stats
== -2001924096
endo64
12:0532bit boundry, you can do to-hex stats
rebolek
12:08@endo64 I understand, but I wonder why Red hadn't crashed already.
endo64
13:56I think its because the value is still fit in 32bit (unsigned)
In natives.reds file stats defined as stats*: func [ ... ] [... integer/box memory/total ... ]
13:58
>> to-hex -2001924096
== #88AD1000

Even if it doesnt, you probably see the first 4 bytes.

9214
14:32:confused: I don't get it
>> foo: func [series '?][forall series probe compose [if (?) [print "!"]]]
== func [series '?][forall series probe compose [if (?) [print "!"]]]
>> foo [1 2 3][odd? index? series]
[if odd? index? series [print "!"]]
*** Script Error: series has no value
*** Where: index?
*** Stack: foo  

>> foo: func [series '?][forall series probe compose [if odd? index? series [print "!"]]]
== func [series '?][forall series probe compose [if odd? index? series [print "!"]]]
>> foo [1 2 3][odd? index? series]
[if odd? index? series [print "!"]]
!
!
14:35somehow forall doesn't bind all words in a composed body
rebolek
14:38Why do you think it should bind?
14:38foo: func [series '?][forall series probe bind compose [if (?) [print "!"]] 'series]
9214
14:38@rebolek ooh, now I got it
14:38totally forgot that bind can accept word too
14:39:+1:

luce80
09:08
!
>> find {abc'defg} complement charset "a"
== "bc'defg" ; OK
>> find {abc'defg} complement charset "b"
== "abc'defg" ; OK
>> find {abc'defg} complement charset "z"
== "abc'defg" ; OK
>> find {abc'defg} complement charset " "
== "'defg" ; What !?
>> find {abc'defg} complement charset "^-"
== none ; What !?
09:41
>> about
Red for Windows version 0.6.3 built 7-Jan-2018/9:28:41+01:00

I think it is a recent regression since it is not present in:
Red for Windows version 0.6.3 built 27-Nov-2017/19:24:27+01:00
9214
09:44potential culprits:
* https://github.com/red/red/commit/1f08d38d4a79fecc8b96ddfb09692d5802eed5c1
* https://github.com/red/red/commit/910d79a51d652628487ca2047615bbcf638fa1d8
* https://github.com/red/red/commit/c4523a0b3805d7392151634aa99184baeb823893

9214
15:56I would expect [1 "a" 1 "b"] here, though, this behavior makes sense too (all keys in records are identical, hence only one record remained)
>> unique/skip [1 "a" 1 "b" 1 "a"] 2
== [1 "a"]
greggirwin
17:16Good to note, but not a bug. I think this makes the behavior a little clearer than the current red-by-example entry for this. @mikeparr?
9214
17:17@greggirwin how then I can apply unique to 2-element entries as a whole, not specifically to their keys?
greggirwin
17:35You can't. They would need to be sub-blocks, or map over it yourself. If we want to consider it as a design change (and it may be a lot of work, because all set ops need to work consistently, and it will surely affect their code), we need to think through the implications. e.g., knowing you can't then use extract to get a unique set of keys, or select based on a unique key.

Phryxe
08:40@9214 @greggirwin Thanks for the clarification about 2-element entries.
PeterWAWood
10:39@9214 If we consider the stated intention of the /skip refinement (from the help text) - /skip => Treat the series as fixed size records, I would also expect that each "sub-series" be treated as a single record.
>> unique/skip [1 "a" 1 "b" 1 "a"] 2
actual== [1 "a"]
expected== [1 "a" 1 "b"]


9214
10:40@PeterWAWood that was my thought also
10:41but I agree with @greggirwin that in such case it's better either to use map! or wrap records in blocks
PeterWAWood
10:41I feel that in Rebol, the "Treat the series as fixed size records" gets translated to treat the records as fixed length keyed records and process the keys.
10:41Reds' behaviour follows that of Rebol.
9214
10:42yes, I understand that some operations use blocks as small databases and that key - record structure is implied
10:44for now IMO it's reasonable to wait and see what are the most popular (and valid) use-cases and which behavior is more desired
PeterWAWood
10:44Personally, I feel that /skip is not really well thought out and may have been added as an after thought.
10:47For example, it would make sense for me to have next/skip and back/skip if the /skip refinements were meant to provide a way of processing records with a fixed number of values all held in a single block.
rebolek
10:57@PeterWAWood next/skip, back/skip :+1:
9214
10:58that's actually an interesting proposal
PeterWAWood
11:05I think that the question we should ask is should Red provide a way of treating a series of values as a series of records with a fixed number of values?

Which leads to the question "What value does treating the values of a block as a series of fixed records give over other ways of handling records (e.g. a block of blocks).
rebolek
11:06Much easier searching.
11:07Also, non-unique keys, if you need that.
PeterWAWood
11:12find/skip treats the data as keyed fixed number of item records with the key in the "first" position
11:15
text
>> sort/skip [1 a 1 b 1 a] 2
== [1 a 1 b 1 a]


11:17So in general. when the help text says "Treat the series as fixed size records." it actually means "Treats the series as a key followed by a fixed number of values. Applies the function to the keys".
rebolek
11:18sort has /compare refinement that can be used to pass index in the record. Maybe find should support it also?
9214
11:19@rebolek that would also solve issue with unique - unique/compare
11:20e.g. unique/compare [1 "aa" 1 "bb" 1 "aa"] 2 yields [1 "aa" 1 "bb"] (?)
PeterWAWood
11:21I really wonder how useful this is:
>> select/skip [1 a b c d 2 e f g h] 2 5 
== e
9214
11:21i.e. instead of treating the first value of records as a key, you pass an index of another "key-like" value
rebolek
11:22@9214 It probably would need to be unique/skip/compare block 2 2
9214
11:22@PeterWAWood I actually thought not a while ago that it may return [e f g h]
11:22@rebolek yes, correct
PeterWAWood
11:23I don't know if it is possible to come up with a quick fix. @dockimbel & @greggirwin probably understand why /skip works the way it does. Hopefully one of them has time to drop by and tell us.
9214
11:23but then, select returns *value*, not *record*
PeterWAWood
11:26For me, I feel the whole area of treating a single series as a collection of records needs to be thoroughly thought through. A magical, virtual record! type might be the answer.
11:27(@Rebolek Do you have Gitter stats for the number of posts containing alliteration? )
9214
PeterWAWood
11:28@9214 When select returns a value and not a record, it isn't really treating the series as fixed records is it?
rebolek
11:29@PeterWAWood not yet, I should add it. :pencil:
PeterWAWood
11:29:+1:
9214
11:29@PeterWAWood again, it all depends on what Rebol (and Red) means by "fixed size records"
11:30I can imagine that both behaviors are useful, and separate record! datatype (or a dialect?) should suffice
11:30which one to choose as a default one - hard to tell
PeterWAWood
11:30As I said this needs to be properly thought through.
9214
11:33meanwhile, all we can do is to take notes an collect stats :)
toomasv
11:53@9214 You mean something like:
select-record: func [series skp needle][copy/part next find/skip series needle skp skp - 1]
select-record [1 a b c 2 s d f 3 e d c] 4 2
== [s d f]
select-record [1 a b c 2 s d f 3 e d c] 4 3
== [e d c]
select-record [1 a b c 2 s d f 3 e d c] 4 1
== [a b c]
9214
11:53@toomasv yup
11:55/record refinement?
toomasv
11:56Why not
Phryxe
13:18To continue about the 2-element entries and the suggestion to use subblocks. I wonder if exclude and unique should result in this way?

x: [[1 "aa"] [2 "bb"] [3 "cc"]]
y: [[1 "aa"] [2 "bc"] [3 "bc"]]
z: exclude x y
== [[1 "aa"] [2 "bb"] [3 "cc"]]

u: union x y
== [[1 "aa"] [2 "bb"] [3 "cc"] [1 "aa"] [2 "bc"] [3 "bc"]]
>> sort u
== [[1 "aa"] [1 "aa"] [2 "bb"] [2 "bc"] [3 "bc"] [3 "cc"]]
>> unique u
== [[1 "aa"] [1 "aa"] [2 "bb"] [2 "bc"] [3 "bc"] [3 "cc"]]
9214
13:20exclude works as intended, it returns the first set minus all the elements in the second set, same for union, it creates new set which contains all elements from first and second sets
13:20sorting is okay, unique... well, idk
rebolek
13:21@Phryxe you need to use sort/compare and pass a comparator function to it
Phryxe
13:22I didn't think z should contain [1 "aa"]
13:22... but sort works!?
9214
13:23hmmm
rebolek
13:23@Phryxe
>> b: [["x" 5]["b" 13]["f" 1]]
== [["x" 5] ["b" 13] ["f" 1]]
>> comparator: func [this that][this/1 < that/1]
== func [this that][this/1 < that/1]
>> sort/compare b :comparator
== [["b" 13] ["f" 1] ["x" 5]]
>> comparator: func [this that][this/2 < that/2]
== func [this that][this/2 < that/2]
>> sort/compare b :comparator
== [["f" 1] ["x" 5] ["b" 13]]
Phryxe
13:24
>> b: [["x" 5]["b" 13]["f" 1]]
== [["x" 5] ["b" 13] ["f" 1]]
>> sort b
== [["b" 13] ["f" 1] ["x" 5]]
9214
13:26
text
>> exclude [[1 a]] [[1 a]]
== [[1 a]]
13:26hmhmhmhmhmmmm
13:26@Phryxe why won't you use map!?
rebolek
13:27because of multiple same keys
9214
13:28ah, right
Phryxe
13:28@9214 As I mentioned to @rebolek before. I don't have unique keys and I wanted to use exclude, union and unique.
9214
13:32perhaps set operations don't work as intended with sets of blocks
Phryxe
13:37I'm clueless :confused:
9214
13:37let's wait for our all-mighties :^)
greggirwin
17:24So many great thoughts. Someone make sure we extract this into a wiki, for more thorough analysis.
17:24@greggirwin don't forget to do that.
9214
17:25@rebolek can you do that with your gitter magic?
rebolek
17:25simsalabim
17:25@9214 I can, I guess.
9214
17:26@rebolek it's kreks-peks-feks actually
rebolek
17:26@9214 @greggirwin I will take a look at it and let you know
greggirwin
17:38On /skip, for consistency, then we'd end up with skip/skip, right?

The obvious use case is key-value pairs, so you can avoid values being treated as keys by find/select, so the size 2 case is optimal.

/record is a very interesting idea, but needs more thought about the ultimate value.

> "Treat the series as fixed size records." it actually means "Treats the series as a key followed by a fixed number of values. Applies the function to the keys".

Should be in red-by-example, or other docs, for sure.

The funcs in question are: [find select sort ], yes? (new-line shouldn't matter here). And I think we're all good with find/skip, and sort/skip works as expected. That leaves select/skip. The doc string for select is:

> Find a value in a series and return the next value, or NONE.

So it does what it says, and matches Peter's explanation above. As it stands, you can make the /record approach work, as @toomasv shows. If we change it, and you want the current behavior, you have to do first select/skip series value size, yes? And, if changed, you don't get the key back with the record, correct? So you say your record size is N, but you get back N-1 values, and would need to insert the key if you want the complete rec. That is, if you visualize chopping the series up into fixed size sub-blocks, the key would be the first item *inside* each one.
17:42next/skip and back/skip *do* look appealing at first glance. Then we should also have at/skip and pick/skip for consistency.
9214
17:44[skip-ba-bop-ba-dop-bop](https://www.youtube.com/watch?v=Hy8kmNEo1i8)
greggirwin
17:49Worth considering? Yes. An obvious design mistake? No.

And since I don't think (my opinion only) that it's a design mistake, I'm uneasy about changing it. Not because the new behavior wouldn't be useful in some cases, but because I don't know if we should encourage the use of flat blocks for implicit, fixed-size records. If all data did that, you wouldn't know anything about the structure by looking at it.

If you've Reboled or Reduced for any time, you've used this trick. I can't say I've ever been glad I did when I went back to it later. Short term gains.
9214
17:52@greggirwin another questions is if set operations designed to work with sets of blocks?
17:53
text
>> unique [[1][1]]
== [[1] [1]]
>> exclude [[1]][[1]]
== [[1]]
toomasv
17:55I recall that I used something like this when playing with query. If you want to build anything like db in red proper you have to have access to records. Of course, records don't need to be copy/part-ed, but appropriate part should be bound to field-words. .. Or something
9214
17:59also, blockifying flat set is (almost) trivial, with the caveat then there's one element left at the tail
>> parse [please blockify me thanks in advance !][collect some keep [3 skip | thru end]]
== [[please blockify me] [thanks in advance] !]
17:59also, why the snippet above freezes everything if I change thru to to?
greggirwin
18:03@Phryxe @9214 that looks like an unique/exclude bug. Please report it if there's not already a ticket. Good catch!
9214
18:03I feel that this one could be a separate mezzanine
toomasv
18:04s/@toomasv/@9214
greggirwin
18:05@9214 some [to end]
18:05Thanks @toomasv. :^)
9214
18:05@greggirwin aaah, of course
greggirwin
18:06I saw it right away, because that's my life. Always *almost* done.
9214
18:07A little engine that could :train:
18:16https://github.com/red/red/issues/3195
Phryxe
20:29Not sure if this result also should be mentioned in the same issue?
>> intersect [[1][2][3]][[3][4][5]]
== []
>> intersect [[1][2][3]] [[3][4][5]]
== []
>> intersect [[1] [2] [3]] [[3] [4] [5]]
== [[3]]
20:34Added it in a comment.
toomasv
20:54Interesting. For me all are empty.
Phryxe
20:55I tried again and they are all empty, but above code is copied straight from the console.
toomasv
20:56 :see_no_evil:
Phryxe
20:57:laughing:
greggirwin
21:44I get the result above the *first* time I run it. Empty result if I just do the last line again. Worth a report addition.

Phryxe
07:20@greggirwin Thanks. Glad I wan't hallucinating :relieved:
08:58wan't => wasn't
greggirwin
18:19Who doesn't "want" hallucinating? :^)
toomasv
18:21@greggirwin Me does
greggirwin
18:23I'm going to brew some more psychoactive brown liquid shortly. Pretty sure you are all voices in my head that it creates.
toomasv
18:24Nam-nam
rebolek
19:16mmmm

Phryxe
11:32It's all about C3 now, but I hope we can get a quick fix for the SET operations with subblocks as I need it :nail_care:
greggirwin
18:30Can you live with mezz solutions for now @Phryxe? I built some before Red had native set funcs, and could pull them out if it would help.
Phryxe
20:37@greggirwin Thank you, that would be great.
greggirwin
23:17@Phryxe: https://gist.github.com/greggirwin/e579c08410497b9f9ba3b9978fa45347

I removed most dead, experimental versions of the funcs, but left in some ideas about how we can approach function factories in given domains.

Phryxe
11:07@greggirwin Thanks again!
greggirwin
11:20Happy to help.

9214
13:34round's description claims "Returns the nearest **integer**"
>> round 2.0
== 2.0

either bug or docstring needs clarification
greggirwin
16:23There was a lot of chat about that when round was designed. I would prefer a true integer! result, but it's not *wrong*, because 2.0 is an integral value. "Returns the nearest multiple of 1 of the same datatype." doesn't read so well. For values like time, money, and more, we don't want an integer! result, but for plain numbers, it can be very useful, and intuitive IMO.
16:26If you give it an integer value, you do get one back, which still makes it useful for alternate scale rounding, where an integer! result is desired. It just means you can't as easily use the result directly with func (e.g. repeat) that require an integer!.

If we want to change it, we need a strong case.
9214
16:32@greggirwin I see, thanks for detailed answer!
toomasv
17:08On phone now, but I remember ‘round/to 2.0 1’ gives ‘integer!’.
greggirwin
17:10Ah, yes!

Oldes
13:29I tied to make smaller Red compiled app using the latest UPX tool and it fails... so I guess there will be something wrong in the executable..
x:\tools>upx -9 lame-gui.exe
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2017
UPX 3.94w       Markus Oberhumer, Laszlo Molnar & John Reiser   May 12th 2017

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
upx: lame-gui.exe: InternalError: should not happen

@dockimbel couldn't it be the reason why some Antivirus software don't like Red binaries?

endo64
07:10Most antivirus programs give error for upx compressed executable too.

kermitaner
22:54i'm currently playing around with the enbase/base functions and i get an error when compiling the enbase function:
Red []
probe enbase "abc"

Compiling D:\save\red\rosetta\vignere\t1.red ...
...using libRedRT built on 18-Jan-2018/23:40:21+1:00
...compilation time : 31 ms

Target: MSDOS

Compiling to native code...
*** Compilation Error: undefined symbol: red/natives/enbase*
*** in file: %/D/save/red/rosetta/vignere/t1.red
*** at line: 332
*** near: [
natives/enbase* true -1
stack/unwind
f_probe
stack/unwind #user-code
]
in release mode it is working , also no problems with the debase function. tested with latest build...
greggirwin
23:30@kermitaner, good find. It looks like red/natives/debase* needs to be added to https://github.com/red/red/blob/master/system/utils/libRedRT-exports.r. Please file a ticket.
23:41Sorry, enbase needs to be added.

kermitaner
08:55@greggirwin Done: #3203
greggirwin
21:49Great! Thanks. Already fixed.

kermitaner
10:45yes, I'm always impressed how fast things get fixed and are included in the latest build :- ) I used the function in my latest gist for vigenere encrypting
[gist](https://gist.github.com/kermitaner/adf6a77b8502fab05997280277cdbb68)
greggirwin
16:39@kermitaner, very nice! Hey, @toomasv, it's a https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher!
toomasv
17:23@greggirwin :question:
greggirwin
22:37Just thought you might like it, because of your other cypher work.

toomasv
06:43@greggirwin I see, first time I clicked your link I got the answer that the article is not in Wikipedia -- but it was the fault of the exclamation mark in the end of the link :wink:
greggirwin
07:32Ahhhhhh. :^\

Oldes
10:08@dockimbel I just noticed, that this fails to compile:
t:  (as float! (systime/data3 and FFFFh) * 3600.0)

while this is ok:
t:  (3600.0 * as float! (systime/data3 and FFFFh))

Worth ticket?
greggirwin
16:22Does this compile?
t:  ((as float! (systime/data3 and FFFFh)) * 3600.0)
9214
20:26expected?
>> f: has [x][x]
== func [/local x][x]
>> f
== none
toomasv
20:51@9214 What did you expect?
9214
20:51unset
toomasv
20:52Why?
9214
20:52well, because x wasn't set to any value?
20:52and why none?
20:54or, since /local is a refinement, all arguments of that refinement are setted to none
toomasv
20:54Because otherwise you can't do things like any [x 'b] from inside func?
9214
20:54I see
toomasv
21:01
>> f: func [/refine something][print either something ["Got it!"]["I still don't understand!"]]
== func [/refine something][print either something ["Got it!"] ["I still don't understand!"]]
>> f
I still don't understand!
>> f/refine "my understanding"
Got it!
9214
21:02why /local is a refinement anyway?
21:02oh, good question to Carl
greggirwin
21:43Local words do get initialized to none, for convenience. As for why it's a refinement, we can ask "How else would you do it?" It's one of those tricks that you don't really notice, and it took a long time for people to even consider that you could sneakily use it when calling a func.

From an implementation perspective, it's consistent with other refinements that can be followed by words, and even type specs for them.

luce80
16:53I think there is something wrong here:
>> find "abc" complement charset "a"
== "bc"
>> find "abc" complement charset "d"
== "abc"
>> find "abc" complement charset " "
== none
>> about
Red for Windows version 0.6.3 built 27-Jan-2018/15:00:13+01:00

toomasv
18:27
>> non-em: complement charset " "
== make bitset! [not #{0000000080}]
>> repeat i length? non-em [if non-em/:i [prin to-char i]]
<some control chars>
!"#$%&'(
>> find "abc" non-em
== none

Given content of non-em, its only logical. The problem arises from the mechanism of charset allocation.
luce80
18:44Therefore there is a problem...
toomasv
19:17I wonder -- is this the explanation? [red-blog](http://www.red-lang.org/search?q=bitset)

> Bitsets are auto-sized to fit the specification value(s) provided. The size is rounded to the upper byte bound.
luce80
19:47Seems so:
>> space: charset " "
== make bitset! #{0000000080}
>> non-em: make bitset! complement #{00000000800000000000000000}
== make bitset! #{FFFFFFFF7FFFFFFFFFFFFFFFFF}
>> find "abc" non-em
== "abc"
>> repeat i length? non-em [if non-em/:i [prin to-char i]]
<some ctrl chars>!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg== none
>> non-em: make bitset! complement #{000000008000000000}
== make bitset! #{FFFFFFFF7FFFFFFFFF}
>> find "abc" non-em
== none
toomasv
21:20@luce80 :+1:
endo64
22:50It works here:
>> find "abc" complement charset " "
== "abc"
>> about
Red for Windows version 0.6.3 built 21-Dec-2017/23:39:43+03:00
9214
22:55@endo64 can't find a culprit in commits :confused:
https://github.com/red/red/commits/master
endo64
23:02I just re-build Red, and now:
>> find "abc" complement charset " "
== none
23:04@9214 Could be this one?
SHA-1: c4523a0b3805d7392151634aa99184baeb823893
* FIX: issue #3159 (Uncorrect result when `find/skip` vector! with 0 and negative numbers)
9214
23:05@endo64 how did I missed that one? :+1:
endo64
23:10Should we raise another issue for this or just inform @qtxie or comment in #3159 ?
9214
23:10@endo64 all of the above? :smile:
endo64
23:18:) Done! #3214

qtxie
03:21Thanks. I'll have a look at it.

endo64
07:39I know these are most stupid parse rules ever written, but they crash, worth a ticket?
>> parse "abc" [to fail]
>> parse "abc" [some fail]
>> parse "abc" [thru fail]
>> parse "abc" [any fail]

*** Runtime Error 1: access violation
*** at: 00427815h
PeterWAWood
07:46Yes, I think so.
endo64
08:07Done, #3217
PeterWAWood
08:24Thanks

xqlab
12:32
>> help put
USAGE:
     PUT series key value

DESCRIPTION: 
     Replaces the value following a key, and returns the new value. 
     PUT is an action! value.

ARGUMENTS:
     series       [series! map! object!] 
     key          [scalar! any-string! any-word! binary!] 
     value        [any-type!] 

REFINEMENTS:
     /case        => Perform a case-sensitive search.

RETURNS:
     [series! map! object!]

>> 
>> 
>> put {1a2b3c4e5f} {2} "x"
*** Script Error: put does not allow string! for its series argument
*** Where: put
*** Stack:  

>> series? {2}
== true
>>
endo64
12:39I think put currently supports only map!
xqlab
13:47No, it works with blocks too. Maybe the help text should be changed
rebolek
13:50Right, it should probably be [any-block! map! object!]
endo64
20:33Correct, works also with object! so it could be bug or regression (if it worked before but I don't remember)

PeterWAWood
13:14I compiled this program with the -u option:

Red []

#system [
	print [string/byte-to-hex 255 lf]
]

print 100


LibRedRT was recompiled but the program compilation failed Here is he output:
-=== Red Compiler 0.6.3 ===- 

Compiling /Users/peter/VMShare/Code/Red/test.red ...
...compilation time : 908 ms

Target: Darwin 

Compiling to native code...
libRedRT-extras.r file generated, recompiling... 

Compiling /Users/peter/VMShare/Code/Red/test.red ...
...using libRedRT built on 12-Nov-2017/6:49:14+8:00
...compilation time : 24 ms

Target: Darwin 

Compiling to native code...
*** Compilation Error: undefined symbol: red/string/byte-to-hex 
*** in file: %/Users/peter/VMShare/Code/Red/test.red 
*** at line: 332

Did I misunderstand the purpose of the -u option or is it a bug?
endo64
14:41@PeterWAWood I think byte-to-hex is missing in libRedRT-exports.r file.
15:00@PeterWAWood I can compile your script:
Compiling C:\Users\endo\Documents\Red\red-endo\build\bin\test.red ...
...compilation time : 1275 ms

Target: Darwin

Compiling to native code...
libRedRT-extras.r file generated, recompiling...

Compiling C:\Users\endo\Documents\Red\red-endo\build\bin\test.red ...
Compiling libRedRT...
...compilation time : 1986 ms

Compiling to native code...
...compilation time : 58005 ms
...linking time     : 666 ms
...output file size : 962560 bytes
...output file      : C:\Users\endo\Documents\Red\red-endo\build\bin\libRedRT.dylib

...compilation time : 36 ms

Target: Darwin

Compiling to native code...
...compilation time : 1689 ms
...linking time     : 111 ms
...output file size : 73728 bytes
...output file      : C:\Users\endo\Documents\Red\red-endo\build\bin\test

I'm on Win10 x64.
toomasv
16:39I am in big trouble. No version of red console is showing up on W10. I was developing graph and something happened so that console crashed and does not open up anymore. I downloaded the latest version, it compiled, but doesn't open. Neither does the stable 0.6.3. Even after restart. :scream:
9214
16:42@toomasv have you cleared up ProgramData?
toomasv
17:04@9214 Sorry, switched off my computer meanwhile. ProgramData? Umm .. No. How?
9214
17:04IIRC there's some directory on Win there all red executable versions and crash dumps reside
toomasv
17:05I'll start searching. Thanks
9214
17:07@toomasv it should be /ProgramData/Red/
17:07just wipe it out and do a fresh install, I think it should help
toomasv
17:10@9214 :bow: You are my hero! I'll be your slave for .. err.. tonight!
17:12I noticed there were lot of crash reports in ProgramData/Red. Should I study these closer when they appear again?
9214
17:13@toomasv you can include them in bug reports if you want
17:13[![RGI7iPwqM9A.jpg](https://files.gitter.im/red/bugs/oyBJ/thumb/RGI7iPwqM9A.jpg)](https://files.gitter.im/red/bugs/oyBJ/RGI7iPwqM9A.jpg)
17:13> I'll be your slave
toomasv
17:13Who's who?
9214
17:14time will tell
toomasv
17:49@9214 BTW [That's](http://vooglaid.ee/red/graph-steps.gif) what I was working on:
![stepped (orthogonal) graphs](http://vooglaid.ee/red/graph-steps.gif)
9214
17:50@toomasv wow, and how is it performance-wise?
toomasv
17:51:-1:
17:52It doesn't work with recent builds. I use one from the end of last year.
greggirwin
19:08Temporary problems and performance aside, this is *very* cool @toomasv. It just keeps getting better.
toomasv
19:27Thanks, @greggirwin . My head is blowing up with ideas about what else to do with it.
9214
19:28@toomasv visualize blockchain?
toomasv
19:30Visualize relations in anything -- with another DSL which converts arbitrary (well, almost) structures into graph DSL.
9214
19:31I would like to see notes/tutorial of yours with regard to DSL development at some point, since you're the one who really digs into subject.
toomasv
19:34I would need help here, as I am very bad in even commenting my code, not to tell about writing a tutorial.
greggirwin
19:39We can collaborate. Someone looks at the code and asks questions, the author (who hates writing even comments ;^) answers, and the editor wordsmiths their answers into documentation.
9214
19:40and everyone get tips :red_circle:
greggirwin
19:40It could be done in an interview style. It can be very helpful to talk to others and learn how they work.
19:40@9214 of course. :^)
toomasv
19:40Wool Ya Wool
greggirwin
19:42That sounds vaguely Swedish when I read it. ;^\
BillDStrong
19:43Being forced to talk about your code can also help you reason about it better.
toomasv
19:43(Got it from urban dictionary while looking for Ya Whol, to seem knowlegeable)
greggirwin
19:44@toomasv, ah, maybe the German Ja vol!?
19:45Or maybe Jawohl? Have to look it up.
toomasv
19:45Yes, jawohl
greggirwin
19:45@BillDStrong yes, so... @toomasv TALK ABOUT YOUR CODE!! :^)
toomasv
19:46Bla-bla - bla..
greggirwin
19:46Hmmm, stubborn this one is.
toomasv
19:47First, I write some code... then I get lot of crashes. Then I cry... And then I rewrite the code ..
greggirwin
19:48LOL! Ah, I wasn't expecting that.
19:48Finally, someone uses the same methodology I do.
toomasv
19:49:hatching_chick: :chicken:
19:56I wrote once about my basic method when @9214 asked about it, but I don't remember in what room was it. Basically it is adhoc try-fail-try-again. Reflect. After some time write down some structure. Rewrite the code. New ideas. Try-fail.. again. Succeed. Puti it up somwhere. Screw it again . Restore. Go on. Go on. Get up. Fall. Get up. Go on...
9214
19:57for some reason [Autechre - Cap.IV](https://www.youtube.com/watch?v=1qkMYxt4XYs) started playing in my head
toomasv
19:59With reason..

PeterWAWood
23:16@endo64 Thanks for compiling the script with the -u option. It looks as though it is bug under macOS or when the source is not in a sub-drectory of red.
23:33I have updated to the latest master version of Red and can now compile but get a runtime crash.
23:47#3219

9214
18:25nitpicking, but changing element in a block affects new-line markers
>> b: new-line/all [1 2 3] on
== [
    1 
    2 
    3
]
>> parse b [some [change quote 2 42 | skip]]
== true
>> b
== [
    1 42 
    3
]
>> b: new-line/all [1 2 3] on
== [
    1 
    2 
    3
]
>> change at b 2 42
== [
    3
]
>> b
== [
    1 42 
    3
]

worth a ticket?
endo64
19:17But how would it work with /part and /dup refinements?
>> head change at new-line/all b: [1 2 3] true 2 4
== [
    1 4
    3
]

>> head change/dup at new-line/all b: [1 2 3] true 2 4 5
== [
    1 4 4 4 4 4
]
9214
19:18@endo64 good question

greggirwin
03:05@9214, I think this has come up before, and would be a great thing to doc. Also, good thought @endo64.

PeterWAWood
03:25Is this a "Rebol3" improvement or a bug?
>> load ["a"]
*** Script Error: load does not allow block! for its source argument
*** Where: load
*** Stack: load
greggirwin
06:25R3 doesn't error for me.
meijeru
09:27If you look at the docstring for load a block is specifically excluded. I think this is worth a wish. Implementation would not seem to be too onerous...
greggirwin
17:28What is the exact behavior of load on a block in Rebol? That is, if you already have a block, what does it do? Also, R3 behaves differently than R2. No error on this in R2, just no eval:
>> load [1 + 1]
** Script error: -apply- does not allow integer! for its source argument
** Where: apply map-each case load
** Near: apply :load [:item header all type ftype]
17:30We could say it's a no-op, but what's the point then?

9214
14:04why this doesn't work?
>> digit: charset [#"0" - #"9"]
== make bitset! #{000000000000FFC0}
>> rule: [collect into test some [keep digit | skip]]
== [collect into test some [keep digit | skip]]
>> test: ""
== ""
>> input: "ab13de412f"
== "ab13de412f"
>> probe also test parse input rule
"13412"
== "13412"
>> input: extract/into input 1 []
== [#"a" #"b" #"1" #"3" #"d" #"e" #"4" #"1" #"2" #"f"]
>> probe also clear test parse input rule
""

I expect digit to match as usual and collect into to keep matched characters into test string
14:05
text
>> rule: [collect into test some [keep skip]]
== [collect into test some [keep skip]]
>> probe also test parse input rule
"ab13de412f"
== "ab13de412f"
rebolek
14:08probe also clear test parse input rule <- clear test?
9214
14:08@rebolek to clear it after the first match
14:08it doesn't work without clear either
rebolek
14:09Right, I see.
14:09
>> parse [#"1"] [digit]
== false
9214
14:10
text
>> parse ["1"][digit]
== false
>> parse "1" [digit]
== true

:confused:
rebolek
14:10bitsets are for string parsing only
9214
14:11so I should rather construct [ #"0" | #"1" | ... | #"9"] equivalent by myself?
rebolek
14:11
>> parse ["1"] [into [digit]]
== true
9214
14:11@rebolek oh, right
rebolek
14:11but that does not work with char!, of course
9214
14:19interesting, it seems that into allows to parse vector!(although you can't match by datatype inside it)
>> parse reduce [make vector! [1 2 3]][into [skip x: (probe x)]]
make vector! [2 3]
== false

but you can't parse vector! directly
rebolek
14:21You can't have different datatypes in vector, so it doesn't make sense to parse by type there.
9214
14:21@rebolek no, I meant that into [3 integer!] will fail
rebolek
14:22of course, they are not integer!s
9214
14:23really?
>> type? first make vector! [1 2 3]
== integer!
rebolek
14:23it's complicated ;)
9214
14:24whatever, I wonder if this is a bug or a feature
rebolek
14:25Hard to say. I think it's more feature than bug,
greggirwin
19:19To match by type, the values have to be Red values in a block type. Vectors aren't block types, but currently inherit from series (indirectly, via string), which calls back into the vector type to get values (e.g. with first), and marshals values. At least that's what it looks like to me.

9214
08:15should overflow be catched in pair!s?
>> 123123123123x123123123123
== -2147483648x-2147483648
rebolek
08:19Certainly.
9214
08:21and should there be option for vector! to represent only unsigned integers?
>> make vector! [integer! 8 1 [127]]
== make vector! [integer! 8 [127]]
>> make vector! [integer! 8 1 [128]]
== make vector! [integer! 8 [-128]]
rebolek
08:22There was in R3, so I think it should be supported in Red also.
9214
08:34:sunglasses: https://github.com/red/red/issues/3228 https://github.com/red/red/issues/3229
greggirwin

toomasv
19:06DRAW push is not "pushing" line-width. Is this a bug or intentional?
view [box 300x300 draw [
   line-width 1 push [
      line-width 10 pen red line 65x75 187x166
   ] line 109x37 244x140
]]

![lines](http://vooglaid.ee/red/lines1.png)
greggirwin
19:07@qtxie would have to say.
toomasv

qtxie
02:51@toomasv Not decided. Different platforms have different pushing rules. I'll write a proposal before implement it.
toomasv
04:08@qtxie OK, thanks!
Zamlox
04:16@toomasv neither of them :) The API function in Windows responsible for this behavior saves only "transformations, clipping region, and quality settings". Perhaps
line-width
does not fall into "quality settings" category and that's why it is not saved. Which means custom logic must be implemented to achieve this.
toomasv
04:21@Zamlox I implemented it already, but restoring line-width after push block **and** then moving the push block together with restored line-width can cause unexpected changes in view. It would make sense if all the ("formatting") commands were pushed.
Zamlox
04:26@toomasv true and I agree with you. But unfortunately this feature is not provided by that API function, which means it should be designed and implemented.
toomasv
04:27OK, have to live with it for now. :)
08:09With line-join and line-cap there is different problem: pushing these doesn't restore default values after the push-block is closed, but does restore the values that were explicitly declared before the push-block:
view/no-wait [
   box 260x70 draw [
      line-width 10 push [
         line-join round line-cap round pen red 
         line 10x10 100x10 10x50 100x50
      ] line 140x10 230x10 140x50 230x50
]]

view [
   box 260x70 draw [
      line-join miter line-cap square line-width 10 push [
         line-join round line-cap round pen red 
         line 10x10 100x10 10x50 100x50
      ] line 140x10 230x10 140x50 230x50
]]

![line-join_line-cap](http://vooglaid.ee/red/join-cap1.png)
greggirwin
16:29Your future ticket tokens are adding up @toomasv. :^)
toomasv
16:30Namm!
rebolek
16:46The future will be wonderful. Unfortunately we are living in present ;)
9214
16:47hmm, @rebolek in bugs room
16:47talks about present
16:47PROTECT YOUR BEARS :bear:
rebolek
17:01MEBIR is past, present and hopefully not future.
17:04@9214 there's lot of present bugs I haven't reported just because I found some workaround. Fortunately, things can be fine in different ways.
17:04fine=done, sorry, phone

Oldes
13:08What is better result? In Red:
>> type? probe load {git@github.com:red/red.git}
[git@github.com :red/red.git]
== block!

in Rebol:
>> type? probe load {git@github.com:red/red.git}
git@github.com:red/red.git
== url!
rgchris
18:26IMO: first is bad—I think the lack of explicit space between values is likely to lead to bugs (*the exception being block delimters ()[]), the second—while kindof correct (it is intended as a path to a resource) it doesn't conform to the [URI spec](https://tools.ietf.org/html/rfc3986#section-3). Am a wee bit surprised it wasn't recognised as an [EMAIL!](https://tools.ietf.org/html/rfc2822#section-3.4.1)
Oldes
19:23If the _git_ thing is not a valid uri.. I wonder who invented it. Now it is in common use, I believe.
rgchris
19:52It's not Git, it's an SSH scheme I believe.
19:53I want to say you could just add ssh:// to it, but then you can have shorthand versions based on your config settings.
greggirwin
22:32Red seems more correct in this case. It could flag it as invalid instead. Making it a url! goes against the spec, as @rgchris said, but maybe we need to formalize that in the context of the RFC, and IPv6. The vFuture part of the spec will be harder, as it uses square brackets.

rgchris
00:35@greggirwin I think the first case is precisely the argument against implied space between 'values'. [Again: IMO] should be a syntax error.
00:36... before recognizing as two values.

rebolek
16:05I thought this was fixed already :(
>> write/info http://www.red-lang.org [POST [a: b]]

*** Runtime Error 1: access violation
*** at: 0806D54Dh
16:07https://github.com/red/red/issues/2469

greggirwin
01:06Maybe fixed only on MacOS, since that was the initial report?

toomasv
15:48Panel does not support alpha-channel:
view [base red at 10x10 panel transparent]

shows only black panel. Bug?
9214
16:53@toomasv IIRC it was reported some time back
toomasv
17:00OK, thanks.
greggirwin
18:00This one? https://github.com/red/red/issues/1823

I didn't find another in a quick search.
toomasv
20:47Not quite same, but maybe connected?

9214
06:13@toomasv just in case, I think you should leave a comment under this issue, with snippet example
toomasv
07:23@9214 OK, added to https://github.com/red/red/issues/1823
endo64
10:51I have faced a very interesting bug on R2, fortunately it's not in Red (and R3):
See the output of enbase for a long text in base 16:
>> first enbase/base "loooooooooooooooong text" 16
== #"6"
>> first enbase/base "looooooooooooooooooooooooooooooong text" 16
== #"^/"   ; where this newline comes from??!
maximvl
14:47random/seed seem to not work on wine:
>> random/seed now/precise
>> random 10
== 3
>> random 10
== 7
>> random 10
== 5
>> random 10
== 5
>> random 10
== 3
>> random 10
== 6
>> random/seed now/precise
>> random/seed now/precise
>> random 10
== 3
>> random 10
== 7
>> random 10
== 5
>> random 10
== 5
>> random 10
== 3
>> random 10
== 6
>> random/seed now/precise
>> random 10
== 3
>> random 10
== 7
>> random 10
== 5
>> random 10
== 5
>> random/seed now
>> random 10
== 3
>> random 10
== 7
>> random 10
== 5
>> random 10
== 5
>> random 10
== 3
>> random 10
== 6

14:49same on linux actually
9214
14:50@maximvl
>> random/seed now
>> collect [loop 5 [keep random 10]]
== [9 8 4 2 2]
>> random/seed now
>> collect [loop 5 [keep random 10]]
== [9 8 4 2 2]
>> random/seed now/time
>> collect [loop 5 [keep random 10]]
== [4 8 8 2 8]
>> random/seed now/time
>> collect [loop 5 [keep random 10]]
== [10 1 5 8 6]
maximvl
14:51@9214 yeah, now/time works, thanks
14:51still strange that others don't
9214
14:54@maximvl it's not a bug, but a feature, useful to test something on random input and then reproduce it with same seed
maximvl
14:54now/precise can't give you the same seed
rebolek
15:01@maximvl I agree, it looks like a bug to me.
9214
15:04maybe random uses only part of the returned date
greggirwin
22:56@endo64, enbased strings can contain whitespace, which we normally only see in large base-64 values, so it's a matter of R2 molding it that way. Certainly something to trip over.
23:15Random for time! inherits from float!, which casts to integer:
https://github.com/red/red/blob/master/runtime/datatypes/float.reds#L508

Random for date! does, indeed, use only the /date part it seems:
https://github.com/red/red/blob/master/runtime/datatypes/date.reds#L664
https://github.com/red/red/blob/master/runtime/datatypes/date.reds#L666

I have this old, ported func based on empirical research in the R2 days of yore:
randomize: func [
	"Reseed the random number generator."
	/with seed "date, time, and integer values are used directly; others are converted."
][
	random/seed either find [date! time! integer!] type?/word seed [seed] [
		to integer! checksum form any [seed now/precise] 'sha1
	]
]

Which suffers the same fate, as it just passes date! seeds through. You can avoid that by forming them first of course.

I think it would be good to open a ticket or PR for this. There may be a reason Red does what it does, and that reason may be R2 compatibility. If nobody can come up with a good reason to keep it that way, the PoLS tells me to use the /time part as well.

9214
11:15should cause-error reduce args block?
>> cause-error 'script 'no-arg [foo bar]
*** Script Error: foo has no value
*** Where: reduce
*** Stack: cause-error  

>> cause-error 'script 'no-arg ['foo 'bar]
*** Script Error: foo is missing its bar argument
*** Where: do
*** Stack: cause-error
endo64
12:15Is this a known issue or worth reporting? set object none breaks on-change*
>> o: object [a: 1 on-change*: func [w o n] []]
>> set o none
*** Script Error: invalid argument: none
>> o/a: 2
*** Script Error: invalid argument: none

>> body-of o
== [a: 2 on-change*: none]
9214
12:18@endo64 possibly https://github.com/red/red/issues/2919#issuecomment-317246798 ?
endo64
12:25@9214 I think yes, Doc says: "The object event API is a work in progress, so all the possible checks for valid definitions are not yet implemented." there, so no need another issue, but I will add comment for using set function.
9214
12:26@endo64 thanks!
greggirwin
20:24:point_up: [March 11, 2018 5:15 AM](https://gitter.im/red/bugs?at=5aa50fb4f3f6d24c686051c0) @9214, your mission, should you choose to accept it, is to write a wiki page, or section we can add to official docs, on cause-error. It seems to trip us all up at some point. So find examples of how it's used in the current source, explain it, maybe write a helper to wrap it, and ask @dockimbel to review.

9214
05:56
text
>> rejoin [<abc> <def>]
== <abc<def>>

I expected single tag :confused:
meijeru
07:22Rebol does the same! on the other hand, rejoin [ "def"] does the trick.
07:24Your expected result makes more sense, despite incompatibility with Rebol, so perhaps an issue?
9214
07:24@meijeru I'd wait for Gregg's or Doc's response.
greggirwin
08:19It boils down to what form on a tag! should return. Tags are a bit tricky, because their "user friendly" form includes the brackets, yes? Otherwise you'd get this:
>> rejoin [<abc> <def>]
== "abcdef"

Or implicitly use mold on tags when appending only to tags. This has come up in the past, and Carl added 'ajoin' to Rebol, though I never cared for it much. Rebol also has build-tag. I think the reason is wasn't changed is because the alternatives aren't clearly better, just different. Worth a REP, though, if someone wants to propose improved behavior.
meijeru
09:01Another solution is for append to use to-string instead of form on the items it appends, since to-string is "abc" ; this seems to be the only exception to to-string and form being equivalent.
9214
09:35@greggirwin cause-error is on my list :guardsman:
19:33
text
>> ? wait
...
     value        [number! time! block! none!] 

REFINEMENTS:
     /all         => Returns all in a block.

>> wait [1 2 3]
*** Script Error: invalid argument: [1 2 3]
*** Where: wait
*** Stack:  

>> wait none
*** Script Error: invalid argument: none
*** Where: wait
*** Stack:
19:34I'm not sure what wait should do with block or none, also have no idea about /all refinement.
DideC
19:54Wait for I/O to see wait on block. Then, it can be used to wait on some port! or a timeout.
For /all, I guess the sentence is wrong, see Rebol version:
>> help wait
USAGE:
    WAIT value /all

DESCRIPTION:
     Waits for a duration, port, or both.
     WAIT is a native value.

ARGUMENTS:
     value -- (Type: number time port block none)

REFINEMENTS:
     /all -- Returns all events in a block
9214
19:54@DideC yes, I thought it has something to do with I/O and parallelism, thanks!
19:55yup, misspelling in a docstring, events is missing.
19:56Can someone do a quickfix, since I'm going to bed?
rebolek
19:59we know, it's getting late in @#$%^&*().
9214
20:00@rebolek I didn't know that you speak J :)
20:00a very strange tacit recursive verb you have here
rebolek
20:00@9214 It's J? I though it's perfect Perl ;)
20:01or, god forgive me, ...regex...
9214
20:01well yeah, though it's syntactically incorrect, @ conjunction misses leftmost noun for a start, and parens are empty
rebolek
9214
20:09@rebolek I'll investigate your gibberish talk tomorrow, perhaps it's hivemind that speaks through you... :bee:
20:13ah, nope, it's not recursive, $ is Shape/Shape of
greggirwin
21:23@9214 :point_up: [March 12, 2018 1:54 PM](https://gitter.im/red/bugs?at=5aa6db0a35dd17022e4fd165) Doc string updated.

lepinekong_twitter
18:00Something really weird with call:
This function which wrap "git status" works on Windows 10 as expected within the context of dozens of script I load whereas It doesn't have any logical dependency with them
app.git:  function['.commands [word! string! unset!] /repo .repo [url!] /local ][
    switch/default type?/word get/any '.commands [
        unset! [
            print "TODO: HELP"
        ]
        word! string! [
            commands: form .commands
            out: copy ""
            call/wait/output {powershell -Command "git status"} out
            print out
        ]
    ] [
        throw-error 'script 'expect-arg varName
    ]
]
git: :app.git

proof below:
https://i.snag.gy/ahDvdf.jpg

but in the pure Red Console it doesnt because out always return ""
out: copy ""
            call/wait/output {powershell -Command "git status"} out
            print out

that's not logical at all ;)



9214
18:04what is not logical is using wait, which makes command wait for exit, and then expecting it to produce output to stdout
lepinekong_twitter
18:05I added wait to test if it could work with as it doesn't without.
9214
18:15@lepinekong_twitter how long does it take for command to complete?
lepinekong_twitter
18:41@9214 ~1 second
9214
18:46have you checked the content of out after one second?
lepinekong_twitter
19:58@9214 ok good idea . Now it works in naked console when I have nothing to commit. I'll try again when I'll some stuffs to commit.

toomasv
09:31What's that?:
>> pts: [1 2 3] forall pts [probe reduce [index? pts pts/(index? pts)]]
[1 1]
[2 3]
[3 none]

What did I miss?
maximvl
09:45@toomasv forall moves the index, so on the second run pts is [2 3] and you are accessing element number 2 which is 3
09:45on last run pts is [3] and you are trying to get third element of it ;)
toomasv
09:46@maximvl Ahh, thanks!
maximvl
09:46in short with forall you should use pts/1 for the current element
lepinekong_twitter
10:19system/options/home is correct with rebol whereas it returns none with red with this same test:
test.bat
@echo off
start "system/options/home returns none on windows" /D "c:\windows" "C:\rebol\red.exe" "c:\rebol\test.red" %1


test.red
Red []

probe rejoin ["system/options/home: " system/options/home]
probe rejoin ["system/options/path:" system/options/path]
ask "..."


Expected result:
"system/options/home: /c/windows/"
"system/options/path:/c/rebol/"
...


Actual result:
"system/options/home: none"
"system/options/path:/c/rebol/"
...

greggirwin
22:15@toomasv, it can help sometimes to include the series you're iterating over:
>> pts: [1 2 3] forall pts [probe reduce [pts  index? pts  pts/(index? pts)]]
[[1 2 3] 1 1]
[[2 3] 2 3]
[[3] 3 none]
== [[3] 3 none]
22:18@lepinekong_twitter, please file a ticket for that so we can decide if it should be supported, or the compatibility placeholder removed.

toomasv
03:58@greggirwin Yes, thanks! Actually I've used forall many times, but had a memory block in my head for some reason yesterday :)
greggirwin
05:13I have blocks in my memory all the time. ;^)
9214
10:11:sweat:
url: https://api.github.com/repos/red/red/contributors
read/info url []

*** Runtime Error 1: access violation
*** at: 080A0211h
DideC
10:23@9214 Here (Win10) :

>> url: https://api.github.com/repos/red/red/contributors
== https://api.github.com/repos/red/red/contributors
>> read url
== {[^{"login":"dockimbel","id":411393,"avatar_url":"https://avatars1.githubusercon
>> read/info url
== [200 #(
    Cache-Control: "public, max-age=60, s-maxage=60"
    Date: "Fri, 1...
9214
10:25@DideC how can you use read/info with one argument if it requires two?
10:28okay, now what? :confused:
do-thru https://raw.githubusercontent.com/rebolek/red-tools/master/json.red

*** Runtime Error 1: access violation
*** at: 080A0211h
DideC
10:29@9214 Wich second argument ?
>> help read
USAGE:
     READ source

DESCRIPTION: 
     Reads from a file, URL, or other port. 
     READ is an action! value.

ARGUMENTS:
     source       [file! url!] 

REFINEMENTS:
     /part        => Partial read a given number of units (source relative).
        length       [number!] 
     /seek        => Read from a specific position (source relative).
        index        [number!] 
     /binary      => Preserves contents exactly.
     /lines       => Convert to block of strings.
     /info        => 
     /as          => Read with the specified encoding, default is 'UTF-8.
        encoding     [word!]
10:30What build / OS do you use ?
9214
10:30@DideC ah, sorry, I mixed it up with write/info
10:30which actually works
DideC
10:30It's what I start wondering ;-)
lepinekong_twitter
21:46:point_up: [March 14, 2018 7:00 PM](https://gitter.im/red/bugs?at=5aa9633d8f1c77ef3abe9be4)

How can I wait for the value of out ? I tried this but it never gets out of the loop if out already returns "":
until [
                do-events/no-wait
                out <> ""
            ]
            print out

nedzadarek
16:25This works fine:
parse "" [any ""]
; == true

but with non-0-length string it will halt the console:
parse "str" [any ""]
16:25Red for Windows version 0.6.3 built 9-Mar-2018/0:05:59+01:00 on Win 8.1
9214
16:25@nedzadarek it's an infinite loop for me, as it should be.
nedzadarek
16:28@9214 in both cases?
It shouldn't be the infinite loop - any should take 0 or more. I'm not sure how it cases infinite loop.
9214
16:28@nedzadarek in the first case series is already at the end, so parse just returns true.
16:29In the second it'll stuck with matching an empty string at the very beginning.
nedzadarek
17:01@9214 but shouldn't it much just one empty string?
9214
17:01@nedzadarek can you tell me how many empty string are there?
nedzadarek
9214
17:01Why not 1 million?
nedzadarek
17:02because length? str < 1000000
9214
17:03And now you're applying length? to logic!.
nedzadarek
17:04We are dealing with abstract terms (so we can define them differently) but... is there case(s) when the 2nd example is helpful (matching more empty strings)?
9214
17:05Doesn't make sense to match an empty string using repetition (while, any and some), since it will make parse stuck in an infinite loop.
17:06@dockimbel have you implemented some checks for that? :point_up:

dockimbel
02:37@9214 No specific checks.
02:38@nedzadarek You created an infinite loop, because any can match the empty string against the input an infinite number of time without reaching the input end.

greggirwin
00:10@nedzadarek
>> parse "" [end]
== true

But there are some subtleties here we should outline with regard to matching and advancing. e.g.,
>> parse "str" [any pos: ""]
== false

nedzadarek
14:07@dockimbel @greggirwin interesting
Too bad we can Esc in such cases.

9214
09:27@dockimbel
https://github.com/red/red/blob/master/lexer.r#L879
;)
dockimbel
09:57@9214 Leftover from a debugging session...you can send a PR to fix that. ;-)
9214
10:00:baby:

lepinekong_twitter
07:24read-clipboard bug: doubling blank lines. Quite annoying.
ne1uno
07:56not seeing any doubling in win7 recent builds
9214
09:12@lepinekong_twitter are you sure this isn't PEBKAC?
09:12Because I checked it the first time you reported and haven't found any doubled blank lines.
toomasv
09:13Seems to be regression -- in following check's value does not change on clicking. Tried in console built on March 23rd (W10).
view [check [probe face/data]]

In build of March 17th this workes correctly.
9214
09:15@toomasv https://github.com/red/red/issues/3264 related?
toomasv
09:16Not sure. But may be something was changed that affected the normal behaviour?
9214
09:16@toomasv file a ticket anyway, good catch :+1:
toomasv
09:30Not sure if this is bug, but seems strange: Why are three events generated on change to true:
>> view [style r: radio [probe reduce [face/text face/data]] r "r1" r "r2"]
["r1" true]
["r1" true]
["r1" true]
["r1" false]
["r2" true]
["r2" true]
["r2" true]
9214
09:32@toomasv same here.
toomasv
09:32What do you think, let's wait comments?
9214
09:33Yes, I think maybe it's a leftover from https://github.com/red/red/issues/3264
09:33@toomasv can you leave a comment there?
toomasv
9214
14:44@dockimbel looks like your patch in environment/console/input.red misses terminate field in system/console context. I checked from REPL, and it's set to an empty block, so I changed patch to the following:
unless system/console [
    system/console: context [
        history: make block! 200
        size: 0x0
        terminate: []           ; <--
    ]
]

also tried to include this file and compile ask - everything works fine. Should I make a PR with this fix?

dockimbel
04:22@9214 Which patch?
9214
04:39@dockimbel https://github.com/red/red/blob/master/environment/console/input.red#L17
04:45technically, it isn't fully yours :confused:
https://github.com/red/red/blame/master/environment/console/input.red
04:52Per ask compilation:
https://github.com/red/red/wiki/Guru-Meditations#how-to-compile-ask
dockimbel
07:01@9214 Okay for the PR, will let @qtxie review it.
qtxie
09:45@9214 Thanks. There is a better fix for it. ;-) I'm pushing it.
9214
09:46@qtxie :+1:

ne1uno
07:13view [check "check" [probe face/data]] no output at all now?
toomasv
07:14I made just a comment about this on #3279
ne1uno
07:23maybe ??? could pull up the bug report
rebolek
11:29@qtxie @dockimbel When you compile latest version (2c0c05e0) on Linux, it crashes right after executing console. Works fine on Windows, I don't know about macOS.
11:37So it seems that the regression is caused by 2b9e6, that's first version that crashes, 5f9c4 works fine.
x8x
11:39@rebolek fine on macOS, confirmed crash on Linux 2c0c05e0
rebolek
11:39@x8x thanks for report.
lepinekong_twitter
14:58:point_up: [March 24, 2018 10:12 AM](https://gitter.im/red/bugs?at=5ab6167027c509a7749abac4) made a mistake: double blank problem is not with Read-Clipboard but Write-Clipboard
nedzadarek
15:03@lepinekong_twitter you mean this:
>>  write-clipboard "foo f^/f"
; == true
read-clipboard
; == "foo f^M^/f"

?
Ah ^M is new line and ^/ is carriage return - on windows it's just one symbol/code.
lepinekong_twitter
16:08@nedzadarek what I do is
test: read-clipboard
write-clipboard test
16:09@nedzadarek so if I do copy the two lines above, on Windows I'd get

test: read-clipboard

write-clipboard test


9214
17:29
text
>> read-clipboard
== "test: read-clipboard^M^/write-clipboard test"
>> print read-clipboard
test: read-clipboard
write-clipboard test
nedzadarek
23:00@lepinekong_twitter it seems that write-clipboard just insert ^M for every ^/ :
23:01
write-clipboard "test: read-clipboard^M^M^/write-clipboard test"
read-clipboard
; == "test: read-clipboard^M^M^M^/write-clipboard test"
23:20Can someone test it:
monkey: make object! [
        hp: 100 
        eat: func [] [
             print "tasty"
             return "done"
        ]
]
monkey/('hp)
; == 100
h: monkey/('hp)
; == 100
h
; == 100
a: monkey/('eat)
; tasty
; == eat
a
; == eat
a: (monkey/('eat))
; tasty
; == "done"
; a
; == "done"

https://github.com/red/red/issues/2181

23:21
about
Red for Windows version 0.6.3 built 26-Mar-2018/1:14:22+02:00


greggirwin
00:45
>> monkey: make object! [
[            hp: 100 
[            eat: func [] [
[                 print "tasty"
[                 return "done"
[            ]
[    ]
== make object! [
    hp: 100
    eat: func [][
        print "tasty" 
        return "done"
    ]
]
>> monkey/('hp)
== 100
>> h: monkey/('hp)
== 100
>> h
== 100
>> a: monkey/('eat)
tasty
== eat
>> type? :a
== word!
>> a: (monkey/('eat))
tasty
== "done"
endo64
07:35@nedzadarek Exact same result with yours. Red for Windows version 0.6.3 built 27-Mar-2018/10:27:44+03:00 Win10 x64.
nedzadarek
10:41Thank you. So it seems certain sequence causes that bug.
ne1uno
16:18v064 red-console grabs focus when you start view code then won't output any print or probe until you click back to the console. this seems like a bug, view should keep the focus like the v063 gui console

endo64
08:56[![image.png](https://files.gitter.im/red/bugs/NR3a/thumb/image.png)](https://files.gitter.im/red/bugs/NR3a/image.png)
08:56I just compiled the latest version and open the GUI console, I was reading the blog post, after a while I saw that there is an error on the console, I didn't understand how that happened because I didn't write anything on the console. I'm on Win10 x64.
08:57I opened another GUI console and waiting now to see if that happens again.
rebolek
08:57Interesting, I will try on Wine.
endo64
08:57aha! It happens when I open the "About" window from the File menü.
08:58So I didn't write anything but did something that my brain deletes completely :)
08:58And I don't see Red logo on about window
08:58[![image.png](https://files.gitter.im/red/bugs/M8My/thumb/image.png)](https://files.gitter.im/red/bugs/M8My/image.png)
08:59@qtxie & @dockimbel ^^
rebolek
09:00@endo64 I don't have the error message on Wine, but can't see logo also.
9214
09:01Possible regression related to https://github.com/red/red/issues/3267 ?
ne1uno
09:01there was an crasher opening the about reported and fixed last week? I just tried with a recent build not getting an error or a crash
endo64
09:05@9214 Could be.
09:07My mockup designer application is also crashing with *** View Error: CreateWindowEx failed! error now, but I should examine detailed to see what's wrong there.
9214
09:07*sniff-sniff*... :bear: smell.
endo64
09:07It happens just after creating a face, appending to win/pane, and show
9214
09:08@rebolek the true evil has many faces :point_up:
endo64
09:08But my face has also some draw blocks, so I don't know which part causes the crash.
ne1uno
09:09might be merge related? travis failed build
rebolek
09:09@9214 but this is View bug, so is it really ME :bear: IR related?
9214
09:10@rebolek let's say that :bear: got a View on life and things in general
rebolek
9214
09:10 and figured out what to do next
rebolek
09:11I'm looking for day when the :bear: will finally die
9214
09:11@rebolek the :bear: is in our hearts, young padawan
09:11and between our monitors and chairs
09:12it came to our world with us, and will leave it as we step away into nothing :wine_glass: :book:
rebolek
09:14just get rid of it already
9214
09:15I talk to it, but it doesn't cooperate.
rebolek
09:15go back to your cave, :bear: ! Nobody likes you!
09:17
>> 🐻
*** Script Error: 🐻 has no value
09:18see?
09:18you have no value!
9214
09:19No, it means that :bear: is unsetting.
ne1uno
09:20still not seeing a problem just built on win7
09:33new red-console also works ok so far
09:35*still has that focus problem reported above though.
rebolek
09:39@ne1uno you're able to run red-console?
ne1uno
09:39from merged in master just built. seems ok
09:40script run from run menu keeps focus on the view code. little different than if called from commandline
rebolek
09:42On wine, I got
*** Runtime Error 003a:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x41cd9a
ne1uno
09:54I can crash red-console opening a red script twice, starts the script then goes unresponsive and the windows crash resolver kicks in, which I have firewall blocked so hangs
09:55never saw the run menu before so it might be an old bug or related to multiple view
toomasv
10:16Console works fine on my W10
dockimbel
10:22@ne1uno
> I can crash red-console opening a red script twice, starts the script then goes unresponsive and the windows crash resolver kicks in, which I have firewall blocked so hangs

Which Red script?
ne1uno
10:33@dockimbel I'll see if I can simplify, it doesn't happen with every script
rebolek
11:15Wow...
>> cd %../temp
*** Access Error: cannot open: %/home/sony/Code/updater../temp/
ne1uno
13:07@dockimbel ih: load %any.jpg then in a view ix: image ih no crash first time, no crash using png
13:08total fluke I happened to pick that script to try and run a second time
13:09many scripts have some conflict and refuse to run a second time or just run without problems
16:21could be a known problem, only png officially supported? I didn't see any open or closed tickets
meijeru
18:47Four formats actually supported:
>> extract system/codecs 2
== [png jpeg bmp gif]

endo64
21:52When I execute by double clicking build.r on Win10 x64, it writes "cleaning files" and hangs forever.
I use R2.7.8.3.1, could find 2.7.6 so couldn't test with that. Also tested with 2.7.7, same result.
But if I execute build script from my text editor (it uses rebol.exe -s) then it works
21:53Weird enough, I open a rebol.exe window with -s flag and do %build.r, hangs again.
greggirwin
22:37:point_up: [March 28, 2018 5:15 AM](https://gitter.im/red/bugs?at=5abb7935458cbde55784f021) I don't get the strange path here. Are you on a very recent pull?
22:38@endo64, I can send you 2.7.6 if needed. There are known call issues in 2.7.8, but the hangs should be inconsistent in that case.

ne1uno
00:14this is v2.7.6 http://static.red-lang.org/build/rebview.exe
00:15another piece to the puzzle. I've never been able to run the tests reliably
01:01tests still random hangs.
PeterWAWood
04:55Rebol seems to randomly hang when running all the tests on Windows/10.
dockimbel
09:04@PeterWAWood Could you please try different combinations with 2.7.6/2.7.8 using native call or the custom one we provide?
rebolek
13:12I was trying to build console and got:
Compiling to native code...
*** Loading Error: file access error: %wcwidth.reds 
*** in file: %/home/sony/Code/red/environment/console/CLI/console.red 
*** at line: 546
13:18I'm able to build gui-console, but that one still crashes on Wine:
*** Runtime Error 0009:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x41cda9
dockimbel
13:51@rebolek I am not sure we can support Wine anymore in the new GUI console, though you can still compile the old GUI console (it's in %environment/console/GUI/old/gui-console.red now).
9214
13:51That's unfortunate :(
dockimbel
13:52Wine is lagging behind too much, it's XP-level IIRC.
rebolek
13:58I'm not sure what version they target, but Wine 3.0 supports Direct3D 10 and 11 which is definitely not XP-level technology.
14:31Console compiles fine again.
ne1uno
14:59this will prevent anyone using wine trying nightlies any more, or get surprise bugs if they do?
rebolek
15:03This happens very rarely, as far as I can say. Directory structure changed and that something that doesn't happen very often.
9214
16:55Anyone else faces problem with permission settings on latest build?
isheh@sam ~ $ ~/dev/red/red-063 
Compiling compression library...
Compiling Red console...
sh: 1: /home/isheh/.red/console-2018-3-29-47595: Permission denied
isheh@sam ~ $ chmod +x /home/isheh/.red/console-2018-3-29-47595
isheh@sam ~ $ ~/dev/red/red-063 
--== Red 0.6.3 ==-- 
Type HELP for starting information. 

>>
dockimbel
17:12@9214 Hmm, there's now an extra file copy in the building process for the CLI console, so that could affect the right flags. If the issue is confirmed, it needs a fix.
toomasv
18:11@dockimbel In today's build (W10)
[![blob](https://files.gitter.im/red/bugs/V4wA/thumb/blob.png)](https://files.gitter.im/red/bugs/V4wA/blob)
greggirwin
19:16Someone in the community may need to champion Wine if they want it supported and the core team can't afford the time for it. Would those who use it consider it more important than GTK, and do we know anyone who might be able to maintain it, if the Foundation could provide an ETH bounty?
9214
19:17@greggirwin personally, I use Wine as a substitute for GTK backend.
rebolek
19:19If there's fully working GTK version, I wouldn't care about Wine.
greggirwin
19:28Good to know. If your are both representative samples, GTX seems more important. But maybe we can also bounty Wine to see if someone knows an easy way to keep it working.
ne1uno
19:34anyone try wine on android?
endo64
19:43> @endo64, I can send you 2.7.6 if needed. There are known call issues in 2.7.8, but the hangs should be inconsistent in that case.

Thanks @greggirwin I found 2.7.6 on my work laptop, I pulled the latest source from git, testing with 2.7.8 and 2.7.6 now
greggirwin
19:45Cool.
endo64
19:51Ok, the problem is the ultimate call bug in 2.7.8, but it didn't happen 1 or 2 weeks ago.
19:52I found that these script hangs the rebol process:
;-- Try to get version data from git repository
save git-file do %git-version.r
19:53inside git-version.r file there is call, so if we can add call/show "" just before doing that file, it works with 2.7.8 too.
greggirwin
19:54/show is available under 2.7.6 as well, but not earlier versions. There's more to the call issue in R2 though, IIRC.
endo64
19:56We can check system/core inside git-version.r (or better inbuild.r) script and if it is 2.7.8 then do call/show ""
19:56Should I make that change and PR?
19:56So it will work with all SDK versions
greggirwin
19:57If you want, that would be great, so it's there and in a known place to be seen. It *may* not be merged if @dockimbel or @PeterWAWood jump in with more info.
endo64
20:12Ok, opened the issue #3295, fixed and made PR #3296
greggirwin
20:24Thanks!
9214
20:31@dockimbel permission issue confirmed on MacOS
https://gitter.im/red/red?at=5abd4ce5270d7d37087299a2
endo64
21:35Two small things, after executing build.r, git status says deleted: build/git.r leads the local repo modified.
Second, inside tips.red file there is a line probe event/key probes a value to console. <- @qtxie

dockimbel
03:02@x8x ^----
x8x
03:39@dockimbel https://github.com/red/red/pull/3293
hiiamboris
04:30gui console just crashes on about now (:
PeterWAWood
04:33@dockimbel I tried the four combinations of 2.7.6 and 2.7.8 with both with the builtin call and the custom one on Win/10.

All hung. Using native call, Rebol seems to hang on the first call of call. Using custom call, Rebol hangs at different times during the test.

(In the past, the tests have occasionally run to completion on Win 10).

I'm not sure when I'll have time to do enough debugging to see if I can isolate the issue with the custom call.
dockimbel
05:17@PeterWAWood Thanks, interesting results. Now I am wondering if the freezing is not caused by a file lock on one of the temporary output files.
05:17@hiiamboris Platform?
9214
05:36@dockimbel am I right that recent builds of GUI console are no longer functional on Wine?
dockimbel
06:18@9214 Can't say, we never test on Wine.
06:21@qtxie Confirmed crashing on about function call.
qtxie
06:59Ok. I thought it's about menu in gui-console.
dockimbel
08:16@9214 Permission issue should be fixed now.
PeterWAWood
08:58@dockimbel I don't think the freeze is being caused by a locked file. I waited until the tests hung and then ran a PowerShell script that lists locked files. It reported no locked files in the red/quick-test/runnable hierarchy.
dockimbel
10:21@PeterWAWood Then I have no clue what is causing it. ;-)
10:23For the about crash, it's caused by the compiled code for to-UTC-date function (the function's code is fine). Issue is caused by the internal tracking of object's owner for immediate! values. It relies on a global state that is not properly reset somewhere between the interpreted and compiled code evaluations.
PeterWAWood
11:45@dockimbel I'll try to do some debugging when I get time.
endo64
11:46ls (and list-dir obviously) prints only dots ... (in all window sizes) and prints very slowly. But print read %file.txt prints very fast.
11:47[![LS.gif](https://files.gitter.im/red/bugs/cR0j/thumb/LS.gif)](https://files.gitter.im/red/bugs/cR0j/LS.gif)
11:48And this happens only on GUI console, not in CLI.
9214
14:02@dockimbel it's just that latest build insta-crashes on Wine, I can't even launch REPL
meijeru
14:33@endo64 I can confirm the ls bug. Worth reporting an issue.
dockimbel
15:05@qtxie Could we disable the latest R/S code for filling system/platform for WinXP? I guess that's the cause of crashing on start under Wine.
qtxie
15:40I use the same code in view to get system info, should work on WinXP. I'll have a look at it tomorrow.
Phryxe
17:04The color picker in Options - Settings... doesn't work for me. Win 10 and Red 0.6.3 for Windows built 30-Mar-2018/16:55:45 commit #be7ff3a9.
endo64
22:09@Phryxe I confirm that color picker in Settings window doesn't work. Win10 x64.
22:11Another small issue, font color switches to black after changing font. When you open Settings window and click on ok, then colors comes back.
22:12Github link is not clickable on Help > About window, while red-lang.org is clickable.
22:13@qtxie Can you check above 3 points?
22:31@meijeru Done. #3298

qtxie
02:02@9214 The new console cannot be run on WinXP and Wine. We'll build the old gui console for those platforms in the next commits.
02:30@endo64 Yes. Thanks for testing.
9214
07:43@qtxie thanks!

meijeru
14:40@endo64 Help>About issue is reported by me as #3306, with link to #3300
BeardPower
15:15The font values do not change when clicking on the color boxes.
15:15Is this already reported?
Phryxe
18:27@BeardPower Do you mean this -> https://github.com/red/red/issues/3307 ?
BeardPower
18:53@Phryxe Yes! Thanks!
ne1uno
22:16red ignores everything before a valid Red header...
22:17comment {} doesn't completely protect against some constructs. but it's not going to be effective at all ahead of a Red header
22:20you start off with Red so it's going to try and parse a header
22:20maybe it's a bug or a known limitation
lepinekong_twitter
22:20@ne1uno it's not Red it's Redlang
22:21@ne1uno it's a bug compared to Rebol behavior.
22:22And it's very annoying.
22:23I'd even say It's SUPER ANNOYING in my case :smile:
ne1uno
22:24put a unicode nospace after R maybe
22:24but then you would have to have the right encoding on the file too
22:27add a keyword and make your instructions part of the header
lepinekong_twitter
22:33@ne1uno things are getting worst : it doesn't execute at all if I don't leave Redlang :-1:
22:39@ne1uno have to remove everything before header until fixed.
ne1uno
22:39you already have non aschii, °. could it be an encoding problem in the file? I always use utf8 bom incase I paste in some non aschii
22:42BTW, using the latest I just built it doesn't error
22:48@lepinekong_twitter update to latest
lepinekong_twitter
23:02@ne1uno it's VSCode UTF8 format with Red extension, never exactly know what bom or not bom is ;)
23:05@ne1uno I tried with latest build, weirdly it compiles with -r -e -t Windows but it doesn't interpret:
*** Syntax Error: invalid value at ", type in Red console: do read"
*** Where: do
*** Stack: do-file expand-directives load
23:06I mean the exe works but I cannot do script in red gui console.
23:07@ne1uno in the case I remove Redlang. if I don't remove it works.
ne1uno
23:08I'm not sure if the _latest is generated after each commit, but your .red worked ok with a v064 from last week ok too
lepinekong_twitter
23:10@ne1uno did you remove Redlang ?
ne1uno
23:11saved from your gist. maybe try that and see if there is something off in vscode encoding?
lepinekong_twitter
23:12This one is buggy https://gist.githubusercontent.com/lepinekong/034aff9e317d3e8ce575c74d778318cb/raw/37e74284f60e56e3f092fa25fd6e2f446f1a0eae/gistfile1.txt
ne1uno
23:12I don't think bom or no bom would matter
lepinekong_twitter
23:13@ne1uno no it's not bom since it works when I have redlang.
ne1uno
23:14I'm not seeing a problem with that one either interpreted
23:15I didn't try to compile either one
lepinekong_twitter
23:16@ne1uno I'm testing again ...
ne1uno
23:17also no problem with _latest from 3/12
lepinekong_twitter
23:19@ne1uno I found the error :
do read %countdown.red is OK
do %countdown.red is KO
ne1uno
23:22both work from red-console here
lepinekong_twitter
23:22@ne1uno same if I save file from github without using VSCode. Are you on Windows ?
ne1uno
23:23win7
lepinekong_twitter
23:24I'm on Windows 10
23:24Will try on Windows 7 tomorrow on a virtual machine
ne1uno
23:24maybe someone on win10 can try
23:24maybe it's a char page thing
lepinekong_twitter
23:25char page thing too technical for me :smile:
23:38@ne1uno but even with do read it creates Redlang variable and so pollute global system.
ne1uno
23:39that does seem like a bug
lepinekong_twitter
23:40@ne1uno seem only are you british ;)
PeterWAWood
23:40@qtxie When you enter code into the GUI console on macOS, the console history is hidden when you start typing. The result of the evaluation is also hidden. You have to manually scroll up to see the results:
23:41[Red Console macOS.mp4](https://files.gitter.im/red/bugs/w1bI/Red-Console-macOS.mp4)
23:42Should I raise an issue?
ne1uno
23:43@lepinekong_ it may be a known behavior of do, I don't know for sure if it's a bug
lepinekong_twitter
23:44@ne1uno for me it's a bug known or not, polluting a global namespace is a no-no :)
ne1uno
23:47@lepinekong_ when run from commandline redlang has no value
lepinekong_twitter
23:49@ne1uno what do you mean from commandline ? whatever I have a whole system which depends on Red Console.
ne1uno
23:50when you pass the filename on commandline, I guess there is some other process that runs code
lepinekong_twitter
23:53@ne1uno weird.

lepinekong_twitter
00:06@ne1uno with do read I can mitigate with comment (but with comment but I'll have to explain to people that it won't work with just do)
ne1uno
00:24I think the run menu command in the new red-console also uses do
00:34it injects do %file into history
qtxie
01:11@PeterWAWood There is an regression causes many issues, please wait until it is fixed.
PeterWAWood
03:12@qtxie Will do.
9214
03:24regression in https://doc.red-lang.org/en/reactivity.html#_dynamic_relations
03:25[![bug.gif](https://files.gitter.im/red/bugs/afmv/thumb/bug.gif)](https://files.gitter.im/red/bugs/afmv/bug.gif)
greggirwin
06:00@9214, what't the problem with that demo?
9214
06:01@greggirwin
https://4.bp.blogspot.com/-qxnBAnPFpKM/V3QqBOUVW2I/AAAAAAAAAMs/TBH3Tw7nIc4urW_xpn2KywPcGQiUUneFACLcB/s320/react4.gif
greggirwin
06:01It's not the same as the other follow balls demo, so maybe just a bad func name in there.
06:02Different demo. The first one works the same under old releases.
9214
06:02@greggirwin my bad, reporting bugs in the morning is a bad idea :^/
greggirwin
9214
06:02Maybe reactivity example should be updated?
greggirwin
06:03I like both demos, so maybe add a comment and rename follow in the newer one.
toomasv
10:13Is this reported already? Only first button is operative in console of April 1st on W10:
view [style btn: button [probe face/text] btn "b1" btn "b2"]

[![button-bug](http://vooglaid.ee/red/button-bug.gif)](http://vooglaid.ee/red/button-bug.gif)
Will someone please confirm!?
10:18Actually, this seems to be more general problem. Same behavior (or rather absence of it) here:
>> view [style btn: check [probe face/text] btn "b1" btn "b2"]
"b1"
"b1"
"b1"

Same with radio (only fist instance of style reacts), and field...
dockimbel
10:20@toomasv There's seems to be a regression on styles defining event handlers.
toomasv
10:21@dockimbel Should I file a ticket?
dockimbel
12:34@toomasv You can probably add that case in this ticket https://github.com/red/red/issues/3300, as it's probably the same cause.
toomasv
12:42@dockimbel Done
dockimbel
13:15Thanks, I should process it tomorrow.
lepinekong_twitter
18:03:point_up: [April 3, 2018 12:13 PM](https://gitter.im/red/bugs?at=5ac353b8bb1018b37a537092) April 1st on W10? I thought it was an April fool :smile:
gltewalt
20:00This seems a little strange. It doesn't recognize lack of whitespace for / and // correctly?
>> #b/#c
*** Script Error: / does not allow issue! for its value1 argument
*** Where: /
*** Stack:

>> #b//#c
*** Script Error: / operator is missing an argument
*** Where: /
*** Stack:

20:01Should it be invalid path! ?
20:04
>> 'b/#c
*** Syntax Error: invalid path! at "'b/#c"
*** Where: do
*** Stack: load

>> #b/c
== /c

nedzadarek
20:09@gltewalt shouldn't everything that starts with # be invalid issue! (if it's invalid of course)?
gltewalt
20:09I would guess that, but it's an assumption
20:09invalid path or invalid issue. Probably issue
nedzadarek
20:14btw. it seems that issue! is ok with / after it: /: make op! func [a b] [reduce [a b]] #a/#b or just refinement! after it #a/refinement1 maybe that causes that error
greggirwin
22:45Issue design isn't completely locked down, but issues are word types, and end at special characters.
>> reduce [#b/c]
== [#b /c]
>> reduce [#b[c]]
== [#b [c]]

And path's literal form doesn't allow all types, though you can create them programmatically.
>> to path! [a #b /c]
== a/#b//c

hiiamboris
07:36
>> append/only l: [1] l
== [1 [...]]
>> c: context [x: l]
== make object! [
    x: [1 [...]]
]
>> make c []

*** Runtime Error 19: stack error or overflow
*** at: 0041A38Dh

is this a bug?
07:40I have them doubly linked lists there where items reference each other, and making an object with a link to that stuff = crash
dockimbel
07:42@hiiamboris The binding process does not handle cyclic references well for now. Though, that can be easily improved as we have an internal cyclic references detection system (though that would slow down binding process significantly). You can open a ticket for it.
hiiamboris
07:43okay
dockimbel
07:44In Rebol, you get:
>> make c []
** Internal error: stack overflow

which I think is a good trade-off (catchable error) we can use in Red too.
nedzadarek
22:17I'm doing something wrong here (I have 4GB ram, and that line just took 1GB):
form make image! [10x10]
*** Internal Error: not enough memory
*** Where: form
*** Stack:
greggirwin
22:17Definitely looks like a bug to me.
22:18Please submit a ticket.
22:18to string! has the same problem.

hiiamboris
11:53can somebody test this too? I think I'm out of rounds:
>> round/to 1.1 1.0
== 1.0
>> round/to 0.9 1.0
== 1.0
>> round/to 0.1 1.0
== 0.0
>> round/to -0.1 1.0
== 0.0
>> round/to -0.9 1.0
== -1.0
>> round/to -1.1 1.0
== -1.0
>> round/to -1.9 1.0
== -2.0
>> round/to -2.1 1.0
== -2.0
>> 
>> round/to 1.1 1
== 1
>> round/to 0.9 1
== 1
>> round/to 0.1 1
== 0
>> round/to -0.1 1
== 0
>> round/to -0.9 1
== 0
>> round/to -1.1 1
== 0
>> round/to -1.9 1
== -1
>> round/to -2.1 1
== -1
9214
12:01@hiiamboris what do you expect?
hiiamboris
12:02same as 1.0 but without .0 part
12:03where I live they round -2.1 to -2
BeardPower
12:06I agree, the last 4 are incorrect.
12:07
>> round/to 1.9 1
== 2
>> round/to -1.9 1
== -1

>> round/to -2.1 1
== -1
>> round/to 2.1 1
== 2
12:07It should be -2.
12:09There is an issue with negative values.
9214
12:11https://github.com/red/red/blob/master/runtime/actions.reds#L629 ?
hiiamboris
12:14what that line is telling us?
BeardPower
12:31That the bug is adding +1 all the time :)
12:32Instead of -1 for negative numbers.
9214
12:32That's just a guess, which makes sense if you look at results.
12:32-2.1 + 1 = -1.1, which then rounds to the nearest multiple of 1 and gives us -1.
BeardPower
12:33Yep. I think it's not a guess, but a fact.
12:34Guessing? NOT on MY LAWN! ;-)
hiiamboris
12:37why not for float 1.0 ?
9214
12:39Maybe the difference of round actions for float! and integer!, or consequences of type coercion, or both.
greggirwin
12:42https://github.com/red/red/blob/master/runtime/datatypes/float.reds#L859
12:44That's a good find. Please file a ticket @hiiamboris. I should port my old rounding tests from R2.
BeardPower
12:48@hiiamboris Because floats use a fractional part of 0.5 for rounding, which integers do not.
12:49
if OPTION?(scale) [
			if TYPE_OF(scale) = TYPE_FLOAT [
				f: as red-float! value
				f/value: as-float num
				f/header: TYPE_FLOAT
				return float/round value as red-float! scale _even? down? half-down? floor? ceil? half-ceil?
			]
			sc: abs scale/value
]
12:50If the scale is an integer, its using it's absolute value.
greggirwin
12:53If you desperately need rounding, and don't desperately need performance, you can patch in round from R2.
throw-on-error: func [
    {Evaluates a block, which if it results in an error, throws that error.}
    [throw]
    blk [block!]
][
    if error? set/any 'blk try blk [throw blk]
    get/any 'blk
]

found?: func [
    "Returns TRUE if value is not NONE."
    value
][
    not none? :value
]

abs: :absolute

round: func [
    {Returns the nearest integer. Halves round up (away from zero) by default.}
    [catch]
    n [number! time!] "The value to round"
    /even "Halves round toward even results"
    /down {Round toward zero, ignoring discarded digits. (truncate)}
    /half-down "Halves round toward zero"
    /floor "Round in negative direction"
    /ceiling "Round in positive direction"
    /half-ceiling "Halves round in positive direction"
    /to "Return the nearest multiple of the scale parameter"
    scale [number! time!] "Must be a non-zero value"
    /local m
][
    throw-on-error [
        scale: abs any [scale 1]
        any [number? n scale: make n scale]
        make scale either any [even half-ceiling] [
            m: 0.5 * scale + n
            any [
                all [
                    m = m: m - mod m scale
                    even
                    positive? m - n
                    m - mod m scale + scale
                ]
                m
            ]
        ] [
            any [
                floor
                ceiling
                (ceiling: (found? half-down) xor negative? n down)
                n: add n scale * pick [-0.5 0.5] ceiling
            ]
            either ceiling [n + mod negate n scale] [n - mod n scale]
        ]
    ]
]
hiiamboris
12:56nah I just needed a simple round-to-integer, already settled upon
to-integer x + (0.5 * sign? x)
BeardPower
12:58This is the code for float and scale being an integer:
if TYPE_OF(scale) = TYPE_INTEGER [
				int: as red-integer! value
				int/value: as-integer dec + 0.5
				int/header: TYPE_INTEGER
				return integer/round value as red-integer! scale _even? down? half-down? floor? ceil? half-ceil?
]
12:58-2.1: 0.5 will be added so it will try to round -1.6
12:59Which will be rounded to -1 from the integer round action.
13:00It would need to consider the sign.
13:01Which it does not.
13:01-2.1 - 0.5 = -2.6 -> would be rounded correctly to -2.
13:02I would suggest to always use absolute values, round them and then re-apply the sign.
hiiamboris
13:02makes sense, but why then these do work correctly:
>> round/to -10.0 10
== -10
>> round/to -10.0 5
== -10
>> round/to -10.0 2
== -10
13:03looks like integer/round has a bug that compensates for this bug?
BeardPower
13:03Kind of. I guess it's because of the scale value being higher than 1.
13:05It would be the easiest to use absolute values, as the rounding has the same behavior.
13:05For positive and negative values.
13:07Or treat the fractional parts as part of a integer value, round and cut off the fractional digits.
13:08The code @greggirwin posted it just doing that: positive? m - n
13:10Maybe there is a better and performant trick to to rounding.
13:12Or can we just convert an integer scale to a float scale internally?
13:12We won't need the check, if a scale is an integer or a float.
hiiamboris
13:13the point of having integer as scale is to return integer result, I think
BeardPower
13:14Ah, right.
13:14We would not have these issues with DEC64, as it can be used as integers and floats :)
13:15One type to rule them all.
hiiamboris
13:25idk looks like it just swaps decimal rounding errors for binary rounding errors
13:25IEEE defines decimal FP too btw
BeardPower
13:28Yes, which all have their shortcomings.
13:29They give incorrect results and should have never existed ;-)
13:30DEC64 will round and divide correctly.
13:32If you need reliable division and rounding, you need a different fractional representation.
13:32That's why COBOL is used in finance.
hiiamboris
13:35so the fate of the galaxy depends on DEC64? ;)
9214
13:39Cough-cough. Chit-chat?
BeardPower
13:39And The Mill ;-)
13:40Ooops, not again!
13:40:blush:
13:41It was him! I was dragged into it by him! ;-)
9214
13:42Not on my lawn, and not in my shift. -20 points to Wyckoffindor.
BeardPower
14:01And a bonus for discussing interesting things, while being aware of risking to be penalized: +50 points to Wyckoffindor.

StephaneVeneri
15:56I tested gui-console on macOs (10.12.6), I detected 2 problems:
* 'q' or 'quit' don't work, error message:
--== Red 0.6.3 ==-- 
Type HELP for starting information. 

>> q
*** Script Error: _terminate-console has no value
*** Where: do
*** Stack: q

* 'pwd' gives this path by default after launch and not the real path
>> pwd
%/


I know there are developments going on. Do I create issues?
9214
15:56@StephaneVeneri https://github.com/red/red/issues/3313
15:58Can't find pwd-related ticket though.
StephaneVeneri
15:59@9214 I saw this issue but I’m not sure it’s the same problem
greggirwin
18:24If someone can dupe the error, it's definitely worth reporting. A lot of changes are in progress in the console right now.
StephaneVeneri
19:58There are 2 problems but my message is "a little" incomprehensible. So let me quickly summarize:
* "q" or "quit" don't work
* "pwd" does not give the current path
@greggirwin I'll wait for feedback before reporting problems but I have the impression that mac users are not very numerous :-p
greggirwin
20:00There are a few mac users out there, to be sure. We care more about quality than quantity. :^)
StephaneVeneri
20:03I agree with you. :smile:

Oldes
11:26Is this expected result?
>> trim/tail/with "aa\aa\" "\"
== "aaaa"

Rebol3 throws error:
>> trim/tail/with "aa\aa\" "\"
** Script error: incompatible or invalid refinements
** Where: trim
** Near: trim/tail/with "aa\aa\" "\"

I was expecting to get:
"aa\aa"
DideC
12:04On R2 /tail and /with can't be used at the same time too (the error message is not as clear as on R3).
rebolek
12:06Oldes' expectation makes sense to me.
DideC
12:10trim/with is hungry:
>> trim "  aa bb cc "
== "aa bb cc"
>> trim/with "  aa bb cc " #" "
== "aabbcc"
12:11It might be messing with /all:
>> trim/all "  aa bb cc "
== "aabbcc"
12:12So, look's like a R2 "bug" that propagate to R3 and Red. What could be the reason @dockimbel ?
12:20"Find the brake and stop the train" !
This is by design:
...
     /all         => Removes all whitespace.
     /with        => Same as /all, but removes characters in 'str'.
        str          [char! string! binary! integer!]`
12:21I still wonder why /with act like /all? It would have been of value to be able to use one, the other or both.
endo64
14:02On Win8.1 x64, new GUI console has some issues, can someone confirm please?
* No cursor
* No scroll with mouse wheel
* Menus don't work
14:03I just compiled from the latest source code.
ne1uno
14:50@endo64 win7-64 scroll, cursor & menu works
dockimbel
16:42@DideC IIRC, the reason was the too big number of possible combinations with other refinements, which would have resulted in a very big implementation for trim. So constraining /with to act as /all was the trade-off.
DideC
18:48@dockimbel I can understand the reason, hence it lost a usefull feature.
StephaneVeneri
19:35@endo64 None of these problems on Windows 10
20:21I created the #3322 issue for the quit function.
I found #2731 issue which corresponds to the 'pwd' problem, it concerns the console but I don't think it's necessary to create another one for gui-console.
20:54I detected a bug in gui-console on macOs and windows 10:
* change the foreground colour (Options -> settings)
* go into the "Choose Font" menu
* close the dialog (no need to modify)
The foreground color is back to the original color. If you close gui-console the selected foreground color is nevertheless saved. Can you confirmed ?
nedzadarek
23:24@StephaneVeneri win 8.1 not stable :Red for Windows version 0.6.3 built 26-Mar-2018/1:14:22+02:00 works fine.

Oldes
09:24@qtxie it looks that GUI console has problems with some unicode strings... like:
>> to-binary "🦄"
== #{F09FA68400}
>> to-string to-binary "🦄"
== "🦄^@"

Note the null char, which should not be there. It causes other issues, like invalid cursor position when editing the line, copy paste and more.
09:26Good thing is, that it can display it correctly:)
09:26[![image.png](https://files.gitter.im/red/bugs/BigZ/thumb/image.png)](https://files.gitter.im/red/bugs/BigZ/image.png)
9214
09:28@Oldes can we define a 🦄 word in the new console?
Oldes
09:28Not now, because there is the null char. Also the edit of the line with such a char is broken.
rebolek
09:29Use old console
09:29
>> 🦄: "unicorn"
== "unicorn"
>> 🦄
== "unicorn"
9214
09:30Old console doesn't display them accurately on Wine.
09:30i.e. I have boxes instead of a 🦄
Oldes
09:30I think that it is not old/new console, but which OS you use... the Windows one is broken.
rebolek
09:31Sorry, I meant CLI console.
09:31@Oldes right, I'm doing this on Linux
dockimbel
09:34@Oldes Please open a ticket for that.
Oldes
09:39I will... it is the input, which is causing problems. Because this is working:
>> x: to-word to-string #{F09FA684}
== 🦄
09:45Done: https://github.com/red/red/issues/3324
toomasv
10:08
>> to-string head remove back tail #{F09FA68400}
== "🦄"
Oldes
11:17@toomasv as written in the ticket, the problem is with the clipboard.
toomasv
11:24OK, yes:
>> to-string #{F09FA684}
== "🦄"
>> write-clipboard to-string #{F09FA684} read-clipboard
== "🦄^@"
meijeru
12:01I also made a comment, but in the issue itself, before I saw the above discussion.
endo64
12:52@ne1uno @StephaneVeneri Thanks I'll test on some other machines to be sure. But latest master cannot be compiled currently:
E:\Git\red\build\bin>red.exe
Compiling Red GUI console...
*** Compilation Error: include file not found: RTD.red
*** in file: C:\ProgramData\Red\GUI\gui-console.red
9214
12:54Bears, Unicorns, Russian Trancing Dans...
ne1uno
12:55just did, Red 0.6.3 for Windows built 11-Apr-2018/8:27:27-04:00 commit #cad2c8b
endo64
12:56@toomasv also have this issue, see help room.
12:56Interesting, RTD.red file is there, in modules/view same location with the script that includes it.
9214
12:57https://github.com/red/red/commit/cad2c8b9d23c4e714d24f42965b928354affdf8b#diff-a9024e274fd415fac6f746c45927cf71 indeed
endo64
12:58Ok, Doc added it just now, @toomasv pull the latest then it compiles.
13:02Hmm, it gets strange.
Menus work at first, but when print anything on GUI then menus don't work any more.
No cursor blinking. And about window gives *** View Error: CreateWindowEx failed! again.

Red 0.6.3 for Windows built 11-Apr-2018/15:56:31+03:00 commit #9b085fa
toomasv
13:03 :sparkles:
[![blob](https://files.gitter.im/red/bugs/RKAH/thumb/blob.png)](https://files.gitter.im/red/bugs/RKAH/blob)
rebolek
13:04136x43
9214
13:05@rebolek it's a tiny miracle!
rebolek
toomasv
13:07![rich-text](http://vooglaid.ee/red/Rich-text.png)
9214
16:22
text
rtd-layout [i "hello" /i]

Crashes on Wine (old console). I guess that's expected?
ne1uno
16:48== make object!... in win7
meijeru
16:58@neluno As it should!
greggirwin
20:17@toomasv gets tokens for the first RTD demo image!
toomasv
20:18:tada:
greggirwin
20:19@DideC, is it worth creating a trim mezz that isn't greedy? Seems like it would need more features to be worth it, but maybe is a good example.
meijeru
20:19What about tokens for finding the first issues? ;-)
greggirwin
20:19Sure. We're working on how to keep track of all this. :^)
20:20Also, has anyone noticed the new feature, not bug, that console history extends over sessions now?
meijeru
20:24Yeah, I wondered briefly, then more or less dismissed it. But it is there, in console-cfg.red in AppData alright. Very good in this debug stage, when the console sometimes gives up on you, and you can still get to your history on re-start!
endo64
22:02Is there any better way than compose to get the value inside rich-text? view compose/deep [rich-text data [i b (txt) /b /i]]
greggirwin
22:21I don't think so at this time.

nedzadarek
00:02@endo64 Win 8.1Red 0.6.3 for Windows built 11-Apr-2018/14:56:31+02:00 commit #9b085fa
I have similar issues:
simple stuffs like view [base red] - crash
no cursor/about/printing (like you)
some reach text examples crashes too
> Menus work at first, but when print anything on GUI then menus don't work any more.

type -- > you should have >> -- on the screen > mark from right to left (reverse might work) from last - to > (so --) > click just below first - (from left).
The above bug happens with other letters but - is the easiest to explain.
toomasv
03:08On Win10 nothing of this happens.
hiiamboris
07:42> Also, has anyone noticed the new feature, not bug, that console history extends over sessions now?

yep, it gave me headache of moving the config around so I peeked into it once and saw a history there
:+1:
07:44trying to compile:
Red [] probe unset? :unknown

red -c output:
*** Compilation Error: undefined word unknown
*** in file: D:\usr\redjunk\ticket13.red
*** near: [:unknown]

this compiler is hopeless so far ):
is it even worth reporting?
rebolek
07:45@hiiamboris Compiler is much stricter than interpreter
07:45so it will report things like this on compile time
hiiamboris
07:46I just wanted to include my script once, not once per #include, so I test it like this
07:47okay hello system/words then..
07:54great now I'm receiving "internal errors" :)
*** Red Compiler Internal Error: Script Error : Expected one of: word! - not: path!
*** Where: repend
*** Near:  [proto: get-prefix-func to word! pos/4]

rebolek
07:54@hiiamboris Internal error is worth reporting
hiiamboris
07:55if only I knew how to reproduce it...
07:55it's a big script...
08:04last line is the cause:
Red []

f: func [x y] [x + y]
c: context [f: get bind 'f 'system]

op1: make op! :f
op2: make op! :c/f
rebolek
08:18:clap:
PeterWAWood
08:32@hiiamboris #include only includes a file once.
dockimbel
08:34@hiiamboris You can also try using Config: [red-strict-check?: no] in your main script header.
9214
08:35@hiiamboris or encapping mode
08:38Shouldn't system be system/words?
hiiamboris
08:38@9214 it's a shortcut :)
08:50@PeterWAWood agree, with -c it's only once, in interpreted mode though it's again every time...
9214
08:51@hiiamboris #include in interpreter is substituted with do.
hiiamboris
08:51yeah I know
08:59don't you think we need some equivalent of once-only #include in interpreted mode?
I feel like I'm writing in C sometimes :) with it's #ifdef MONSTER_H things
dockimbel
09:35@hiiamboris
> don't you think we need some equivalent of once-only #include in interpreted mode?

Yes, that would be an improvement. The straighforward way would be to replace do by a custom mezz function that will hold a local cache for previously included file.
hiiamboris
11:20
Red []
c: make reactor! [x: 1]
r: context [ x: is [c/x] ]
dump-reactions

as red script.red:
*** Script Error: append does not allow none! for its series argument
*** Where: append
*** Stack: dump-reactions

as red --cli script.red (dumps empty action):
1:---
  Source: object
   Field: x
  Action:
  Target: x
2:---
  Source: object
   Field: x
  Action:
  Target: x

being copy-pasted to the GUI console window (works fine, except for formatting differences):
1
:---  Source: object [x]
   Field: x
  Action: [c/x]
  Target: x
2
:---  Source: object [x]
   Field: x
  Action: [c/x]
  Target: x

curiously, it works fine in versions ~ march 26 and before (except the stable which has some other bug), and I don't see any difference in ? :dump-reactions output
9214
11:22@hiiamboris c is not a reactive source in your case.
hiiamboris
11:22is it not?
11:24hmm okay true
9214
11:25@hiiamboris no, because it's not a reactor object.
hiiamboris
11:28@9214 I've fixed the message text of :point_up: [April 12, 2018 2:20 PM](https://gitter.im/red/bugs?at=5acf4115270d7d3708bc89f5), but the behavior stands
9214
11:32@hiiamboris wait, you get this error on old builds, right?
hiiamboris
11:32no, on the contrary, on newer ones
9214
11:34Ah, yes, I see.
11:34Just reminded me of this one https://github.com/red/red/issues/3046
hiiamboris
11:34> Just reminded me of this one https://github.com/red/red/issues/3046

that's exactly what I get with the stable :)
greggirwin
16:09Has to do with the new GUI console. If you print something before dumping reactions, it works. Please file a ticket @hiiamboris. Good catch.
Red []
print ""
c: make reactor! [x: 1]
r: context [ x: is [c/x] ]
dump-reactions
16:10Looks like the cause may be prin. Please note that in the ticket.
hiiamboris
16:54@greggirwin :) looks like you noted that already
I'm also curious as to why so many reactions (2-3)... perhaps some magical bind deduction going bananas?
greggirwin
17:05I did, once I saw the ticket.
17:15 Not magical binding in any way, but is calls react internally, and I don't remember looking at why it adds 2 relations (one in is and one at line 299 in react).

hiiamboris
11:29is react within a reactor! not working *by design*?
>> r: make reactor! [x: 1  y: 0  react [y: x * 2]]
== make object! [
    x: 1
    y: 0
]
>> r/y
== 0
>> r/x: 2
== 2
>> r/y
== 0
>> dump-reactions
>> react [r/y: r/x * 3]
== [r/y: r/x * 3]
>> dump-reactions
1
:---  Source: object [x y]
   Field: x
  Action: [r/y: r/x * 3]
>> r/y
== 6
11:38and also why won't a reactor allow locally defined words as a reaction source?
>> r1: make reactor! [x: 1  y: 0  init: does [react [y: x * 2]] ]  r1/init
== none
>> r2: make reactor! [x: 1  y: 0  init: does [react [y: r2/x * 2]] ]  r2/init
== [y: r2/x * 2]
>> ? r1
     on-change*  function!     [word old new /local srs]
     x           integer!      1
     y           integer!      0
     init        function!     []

>> ? r2
     on-change*  function!     [word old new /local srs]
     x           integer!      1
     y           integer!      2
     init        function!     []

>> r1/x: 100
== 100
>> r1/y
== 0
>> dump-reactions
1
:---  Source: object [x y init]
   Field: x
  Action: [y: r2/x * 2]
nedzadarek
13:42@hiiamboris version with is works: r1: make reactor! [x: 1 y: 0 init: is [y: x * 2] ] but with react you need self/: r1: make reactor! [x: 1 y: 0 init: does [react [y: self/x * 2]] ] r1/init
hiiamboris
13:43interesting... however is has proven itself too buggy for now, so I'm going with self/
13:49and more quirks to come....
>> r3: make reactor! [a: 1x1  b: none  react [b: self/a * 2]]
== make object! [
    a: 1x1
    b: 2x2
]
>> r3/a: r3/a + 1x1
== 2x2
>> r3/b
== 4x4
>> r3/a/x: 100
== 100
>> r3/b
== 4x4
13:50works with deep-reactor though
13:50as if pair! was a series!
dockimbel
15:56@hiiamboris react is not meant to be used from inside a reactor, that's why it only recognizes paths are possible sources of reactions.
hiiamboris
16:02@dockimbel why the limitation though? faster this way?
16:03it's just so convenient to lay out reactions right where their targets are defined
dockimbel
16:19@hiiamboris
> it's just so convenient to lay out reactions right where their targets are defined

That's what is is for. ;-)
hiiamboris
16:19mkay :)
dockimbel
16:20r3: make reactor! [a: 1x1 b: is [a * 2]]
16:21r3/a/x not reacting is a regression. There's a ticket about a related issue already IIRC... but I can't see it, so maybe better open a new one, so that we don't forget about it.
16:23Basically, use is for "internal" relations inside a reactor, and react for "external" relations (requiring path accessors).
hiiamboris
16:30@dockimbel ok I'll open a new one, and thanks for the tips :+1:
Meanwhile what *safety* strategy would you suggest to apply to reactor programming to mostly avoid their bugs? I'm having a hard time... in v0.6.3 stable even react often gives me totally insane behavior, not to mention is, and in newer versions there's a lot of other things broken
dockimbel
16:33@hiiamboris Mostly avoid circular relations, I have improved it since 0.6.3, though it can still trip you up. Another thing that can help often, is skipping the initial reaction, with a /later refinement (or react later in VID).
16:33I think the best way to debug reactive relations is to have a visual tool, to do them step-by-step. As the reactive framework is entirely written in Red, it should not be very hard to write a GUI for that (and deploy it using the upcoming "console plugin API"). ;-)
greggirwin
21:27@hiiamboris, and add notes to https://github.com/red/red/wiki/Reactivity

hiiamboris
09:37there's quite a mess about keys it seems
quoting the wiki https://doc.red-lang.org/en/view.html#_actors
> The following extra key names can be returned by event/key only for key-down and key-up messages:
left-control
right-control
left-shift
right-shift
left-menu
right-menu

code https://github.com/red/red/blob/408809998130c129ece856d73fba996605d766de/modules/view/backends/platform.red#L367 also defines left/right "alt" and this is indeed what is returned when I press left or right alt keys on windows

in MS docs they call "alt" key a "menu" key instead: https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx

moreover if you google for "what is a menu key" google will tell you that this is an alias of "apps" key (the one for showing a context menu), and I doubt this one can have left or right flavors
plus when I press it, I get event/key = 93
DideC
12:58[ALT] key is called "Menu key" by M$ because it's the one that activate the menu to navigate in it with the Keybord in Windows OS and apps. In last Windows, where menu is frequently hidden, it even show it. But it is also used in many keyboard shortcuts.

hiiamboris
16:54@9214 it seems the only difference is in the condition:
newer repend:
head either any [only not any-list? series] [
        insert/only tail series reduce :value
    ] [
        reduce/into :value tail series
    ]

older:
head either any [only not block? series] [
       insert/only tail series reduce :value
   ] [
       reduce/into :value tail series
   ]
9214
16:54@hiiamboris yeah, any-list? looked suspicious on a first glance.
16:55@hiiamboris though, maybe repend isn't *actually* a shortcut for append/reduce :confused:
hiiamboris
16:56that's what I'm thinking about too...
16:56maybe we've discovered the hidden wisdom of it :D
17:03@dockimbel are repend and append reduce supposed to be total equivalents and we've found a regression, or are they not?
17:06well it actually comes down to the question of equivalence of reduce and reduce/into I guess
9214
17:09@hiiamboris it has something to do with recursion, I'm too tired to think about it clearly :zzz:
hiiamboris
17:10@9214 wait I'll show you
greggirwin
17:12For append/insert /into is implied because you provide the series. What we need to do is show if or how the behavior is different, to document that. Using reduce/into is an optimization, so a new series doesn't have to be allocated by reduce.
hiiamboris
17:13@greggirwin @9214 look where the difference between stable and nightly occurs:
stable:
[0 [1] 1 [1] 5 4 3 2 [2]]                                                    
[0 [1] 1 [1] 5 4 3 [6] 2 [2]]                                                
[0 [1] 1 [1] 5 4 [24] 3 [6] 2 [2]]                                           
[0 [1] 1 [1] 5 [120] 4 [24] 3 [6] 2 [2]]                                     
120                                                                          
func [n /local b][switch/default n [0 [1] 1 [1] 5 [120] 4 [24] 3 [6] 2 [2]] [
    do also b: body-of context? 'b                                           
    n: also n                                                                
    probe repend select b 'n [n to-block n * (n: n - 1 do b)]                
]]

nightly:
[0 [1] 1 [1] 5 4 3 2 [2]]                                                  
[0 [1] 1 [1] 5 4 3 2 [2] [6]]                                              
[0 [1] 1 [1] 5 4 3 2 [2] [6] [8]]                                          
[0 [1] 1 [1] 5 4 3 2 [2] [6] [8] [10]]                                     
2                                                                          
func [n /local b][switch/default n [0 [1] 1 [1] 5 4 3 2 [2] [6] [8] [10]] [
    do also b: body-of context? 'b                                         
    n: also n                                                              
    probe repend select b 'n [n to-block n * (n: n - 1 do b)]              
]]
17:15so the older reduce/into evaluated its 1st item then remembered where it's going to insert the 2nd item and descended into recursive evaluation of it, and when finished - inserted it into the right position
while the newer inserts at the end somewhere
greggirwin
17:17Going to take a bit to analyze that. It's a bit dense.
hiiamboris
17:17well the logic of it is like this:
repend inserts [n part, remembers the index and goes recursively into evaluating the to-block n * (n: n - 1 do b)] part
17:18and you can see upon the exit from each recursive call what the new switch block looks like
17:20everything else is irrelevant
greggirwin
17:20I can't see anything yet. The code is very hard to follow at a glance. I'll come back to it if I can make time later. If you can narrow down the use case and question we need to answer, that will help. I know you're trying to do that here, but I'll have to tease it apart to understand it.
9214
17:21@hiiamboris can you simplify it to something more trivial?
hiiamboris
17:21if it means abandoning factorial... yep
greggirwin
17:23Quoting myself:

> What we need to do is show if or how the behavior is different, to document that.

And if it's a limitation or bug in reduce/into that's *very* important to identify.
hiiamboris
17:50ok here's the minimal version:
probe repend b: [] ["<" (append b "x"  "o") ">"]       
probe append b: [] reduce ["<" (append b "x"  "o") ">"]

stop and think for a moment: what is the order of things? is it even defined? do we want a defined order or mark it as UB and call it a day?

both versions show how different repend and append reduce are, but they themselves also behave differently

this is what stable does:
["<" "o" ">" "x"]
["x" "<" "o" ">"]

look at the 1st line (2nd is obvious anyway)
it knows it's gonna insert < then o then >, preserving the index and thus the order of provided tokens

now this is what nightly does:
["<" "x" "o" ">"]
["x" "<" "o" ">"]

looks like it just pushes the stuff into the tail
9214
17:52as if reduce/into appends, not inserts at the current index?
hiiamboris
17:52sort of, yeah
17:55maybe it internally started indexing the series from it's end?
9214
17:57
text
["<" "x" "o" ">"]

Doesn't make any sense whichever way I look at it. :confused:
hiiamboris
18:02the Zen of append/repend hehe :smiling_imp:

9214
09:31I see two Parse tests ([1](https://github.com/red/red/blob/master/tests/source/units/parse-test.red#L155) and [2](https://github.com/red/red/blob/master/tests/source/units/parse-test.red#L160)) with identical names. Is that expected?
PeterWAWood
09:44It is not expected but it does not invalidate the tests. It will just be confusing if there is a failure in one of them.
9214
09:45@PeterWAWood thanks!
dockimbel
13:00@hiiamboris
> @dockimbel are repend and append reduce supposed to be total equivalents and we've found a regression, or are they not?

There are supposed to be equivalent. I don't think that it can be achieved now without adding a new refinement to reduce, like /after, to ensure that all resulting values are appended. The current /into refinement only inserts from current position. Worth a ticket for sure.
hiiamboris
14:00submitted :)
9214
14:02@hiiamboris you're doing a good job catching all these bugs and regressions :+1:
hiiamboris
14:03@9214 thanks for your help with it ;)

9214
13:12There's this strange formatting issue with the body of an empty object. Besides, why b wasn't set to c?
>> a: context [b: context [set 'b 'c]]
== make object! [
    b: make object! [    ] ; <-- note the empty space inside
]
>> empty? body-of a/b
== true
meijeru
13:33There is a b that is set to c but that is in the global context, not that which is in the context labeled a.
9214
13:33@meijeru
>> a: context [b: context [set 'b 'c]]
== make object! [
    b: make object! [    ]
]
>> b
*** Script Error: b has no value
*** Where: catch
*** Stack:
13:35Perhaps b inside a *was* set and then re-set again to a newly created object?
hiiamboris
13:44I think set happens before context to b assignment
13:46the space is curious though
13:48look, it grows
>> context [a: context [ ] ]
== make object! [
    a: make object! [    ]
]
>> context [a: context [ b: context [ ] ] ]
== make object! [
    a: make object! [
        b: make object! [        ]
    ]
]
13:49I think it's the indentation that should be on the next line, but it doesn't jump to the next line in the absence of inner stuff
9214
13:49Ah, so it isn't specific to this case.
13:50Yes, I think it has something to do with new-line formatting of the block.
meijeru
13:51It clearly says that b has no value, but that is the bwhose context IS the global context. The question is, what is the context of the inner b? I tried to find that out as follows:
>> a: context [b: context [set 'b 'c probe context? 'b]]
make object! [
    b: 'c
]
== make object! [
    b: make object! [    ]
]

hiiamboris
13:52as expected it took 'b from 'a
9214
13:52@meijeru the context of b is a, as you can see.
13:53Because of the leftmost b:
meijeru
13:54But then a is printed wrongly! This seems worth an issue...
9214
13:57@meijeru it's not. As I said, first b is set to c inside a, then you probe the context (at this point in execution b is indeed set to c, so the output is correct), and then b is re-set to a newly created object.
meijeru
14:28In conclusion, it's all about the order in which things are done...
mikeparr
16:11The specification of the "spec-of" word says:
Returns the spec of a....
As far as I can see, it displays a spec, but does not return it. A bug in its description?

9214
16:12@mikeparr why do you think it doesn't return a spec?
16:13
text
>> spec-of func [x y z][z y x]
== [x y z]
>> type? spec-of func [x y z][z y x]
== block!
meijeru
16:18Also:
>> a: spec-of func [x y][x + y]
== [x y]
>> a
== [x y]

That is what is meant by returning: yielding a value that a word can be set to.
mikeparr
16:46My mistake - I was trying to get at the documentation strings. Thanks.
hiiamboris
21:05guess visually first: how many of these lines will succeed?
o1: make op! f1: func ['x 'y] [(get x) * (get y)]
o2: make op! f2: func [ x  y] [x       * y]
o3: make op! f3: func [ x 'y] [x       * (get y)]
o4: make op! f4: func ['x  y] [(get x) * y]
o5: make op! f5: func [ x 'y] [x       * y]
a: 2 b: 3
f3 a b
f4 a b
a o1 b
a o2 b
a o3 b
a o4 b
a o5 b
9214
21:12@hiiamboris are you on nightly or stable?
21:13https://github.com/red/red/issues/3179
hiiamboris
21:13well, nightly fails one time less than stable
9214
21:17o3 and o4 unexpectedly fail for me, as if arguments in spec are mixed up.
21:17Good catch!
hiiamboris
21:20ok there'll be a ticket... tomorrow... :sleeping: :zzz:
21:21o5 unexpectedly works btw
9214
21:23@hiiamboris right. :sleeping: here too.
meijeru
21:40Something that works but shouldn't is also subject for a ticket, isn't it?
greggirwin
21:55Good stuff all! Thanks for banging on these and finding these issues.

9214
10:23@dockimbel is this an expected behavior?
>> object skip [x: 1 y: 2] 2
== make object! [
    x: unset
    y: 2
]
rebolek
10:24Additional quirkiness:
>> make object! [a: quote b: c: d: 2]
== make object! [
    a: b:
    b: unset
    c: 2
    d: 2
]
9214
10:25
text
>> object tail [x: 1 y: 2]
== make object! [
    x: unset
    y: unset
]
rebolek
10:27All these examples support my suspicion that block at head is scanned for all set-word!s and then their value is taken from block at current position.

greggirwin
03:01Anyone want to add notes to https://github.com/red/red/wiki/Object-Notes? You could reference https://github.com/red/red/blob/master/runtime/datatypes/object.reds#L985, at a glance.
xqlab
11:20Is this intended behavior that parse does not evaluate/reduce words to parse key words
>> y:  'skip parse " "  [y]
*** Script Error: PARSE - invalid rule or usage of rule: skip
*** Where: parse
*** Stack:

while it reduces to other data types
>> parse " " [skip]
== true
>> y:  " " parse " "  [y]
== true
>> y:  'skip parse " "  reduce [y]
== true
>>
9214
11:38y: [skip]
xqlab
12:20but R2 and R3
>> x: 'skip parse/all " " [x]
== true




gltewalt
18:332147483647 * 2
9214
18:33@gltewalt Red is 32 bit as of now.
gltewalt
18:34I guess it's normal?
18:35Looks like rebview also throws the error. But if you introduce a decimal point to one of the numbers, it converts to float!
9214
18:36@gltewalt do you understand what "is 32 bit" means?
18:372147483647 is the maximum positive integer number you can represent with 32 bits
>> enbase/base to binary! to integer! 2 ** 31 - 1 2
== "01111111111111111111111111111111"
18:38Rebol2 is limited to 32 bits too.
gltewalt
18:40I'm just wondering if it should auto convert to float or wait for bignum?
9214
18:41Operation on two integers produces an integer, there's no implicit conversion. That's why you need to supply at least one float!.
gltewalt
18:42Many years ago, I was used to implicit conversion when playing with a different language
18:44I think it was a design decision / hack
greggirwin
18:53It is by design that integer does not auto convert to float on overflow. People need to be aware of that.
gltewalt
18:56Noted
hiiamboris
18:58@greggirwin @dockimbel I'd like your expert comments on :point_up: [April 25, 2018 2:03 PM](https://gitter.im/red/help?at=5ae0607d2d0e228d7bae1b6e) when you've a bit of free time
greggirwin
19:17@hiiamboris LOL! Free time. You crack me up. ;^) Yes, I'm shoveling as fast as I can, but things keep piling up.
hiiamboris

maximvl
11:53hey guys, I have an issue with wine and latest red:
~ > wine --version
wine-2.4
 ~ > wine ~/bin/red.exe 
err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider.
 ~ > fixme:dwmapi:DwmIsCompositionEnabled 0x33fdb0
fixme:dwrite:get_name_record_codepage encoding 20 not handled, platform 1.
fixme:dwrite:get_name_record_codepage encoding 20 not handled, platform 1.
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:dwrite:get_name_record_locale failed to get locale name for lcid=0x00000455
fixme:win:EnumDisplayDevicesW ((null),0,0x33f674,0x00000000), stub!
fixme:dxgi:DXGID3D10CreateDevice Ignoring flags 0x20.
fixme:dxgi:dxgi_check_feature_level_support Ignoring adapter type.
fixme:winediag:dxgi_check_feature_level_support None of the requested D3D feature levels is supported on this GPU with the current shader backend.
fixme:dwrite:dwritetextformat_SetIncrementalTabStop (0x20ddb0)->(0.000000): stub
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x41d4f6

 ~ >
 ~ >
11:54can somebody reproduce it?
9214
11:55@maximvl Wine support was dropped in the new console engine, you should compile an old one from sources.
maximvl
rebolek
11:55@9214 SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. doesn't sound like GUI problem
maximvl
11:55wine was the only way to make GUI on linux
11:56@rebolek no, this message has always been there
rebolek
11:56Ah, ok
maximvl
11:56the rest is new however
rebolek
11:56@maximvl there's now GTK branch
9214
11:56@rebolek but the rest is concerned with DirectX
11:56as far as I can see
maximvl
11:56@rebolek are there any builds available for that branch?
rebolek
11:57@maximvl I build manually
9214
11:57@maximvl nope, compile everything by hand like all big boys do :neckbeard:
maximvl
11:57like all _nerds_ do, quickfix
rebolek
11:58Maybe I can add a cron job to my stats server to do automated builds
11:58CPU is idling there most of the time anyway
maximvl
11:58hopefully stable version is old enough
rebolek
11:59stable version is too old :)
maximvl
11:59@rebolek that'd be nice
11:59yeah, I think long long time ago I asked to keep builds available
12:00apparently this doesn't bother anybody except me
rebolek
12:00@maximvl here's 2-3 days old build of GTK branch http://rebolek.com/gtkonsole
9214
12:00@maximvl if you can provide file space for that of course.
maximvl
12:00@9214 file space for 1mb files?
12:01you kidding?)
9214
12:01@maximvl for every possible build, with each new one rolled out 2-8 times per day.
maximvl
12:02once per day is enough
9214
12:02even though you can do the same by tracking commit history on github and compiling from sources.
maximvl
12:03except that it ruins the whole idea
rebolek
12:03there's ~9200 commits, so it's ~ 10000 \* 3 platforms \* 1MB = 30GB maximum.
9214
12:03@rebolek now add another 10GB for custom GTK builds.
12:03and another 30GB for pre-MEBIR ones :bear:
rebolek
12:04pre-MEBIR are in those 30GBs
12:04and GTK branch is cca 2 weeks old
maximvl
12:04and you are still not getting any close to even a tiny flash drive
9214
12:04@rebolek don't underestimate the :bear:
maximvl
12:06@rebolek
~ > ./Downloads/gtkonsole 
./Downloads/gtkonsole: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
12:06ok here it goes
rebolek
12:06@maximvl you need to install 32bit GTK libs
maximvl
12:07yeah, this is what i'm talking about
rebolek
12:08I'm not going to build all 9200 versions as it makes no sense, but I will look into automated builds on my server. I have enough disk space and free CPU to do it.
maximvl
12:08:+1:
12:09I mean, of course, nobody cares about past versions, but there were few cases already when critical bugs were in the builds for a while
12:09so it's good to keep a little history
rebolek
12:10I agree.
13:40@maximvl build script seems to be working - https://rebolek.com/builds/
13:42added to cron table. Let's hope there will be new builds tomorrow :)
maximvl
13:45@rebolek nice! :D

greggirwin
06:17We can look into keeping milestone builds, but the more we keep, the more confusing it is when you try to find something.
hiiamboris
19:12oops I broke Red again:
insert/dup "world" "order" 30%

(it's still working on it...)
9214
19:14I don't think number! should be allowed here.
hiiamboris
19:15same for append/dup, and there's magic at work: some numbers make it think hard, some return the original immediately
toomasv
19:20@qtxie The latest build (red-27apr18-4c361086.exe) tends to die with message:
[![blob](https://files.gitter.im/red/bugs/bdVJ/thumb/blob.png)](https://files.gitter.im/red/bugs/bdVJ/blob)
hiiamboris
19:22@qtxie and how about a quick-fix number! -> integer! for the above :point_up: [April 27, 2018 10:12 PM](https://gitter.im/red/bugs?at=5ae3762462316e050508e893)? this ain't worth a ticket ;)
greggirwin
21:35@hiiamboris, good find. Maybe worth a ticket, though, since it would be nice to know why it hangs. e.g. using 0 for the dup arg is fine, but there's enough logic in the action that it's not immediately clear what the problem is. It also crashes right away for blocks, which is different.
21:36I agree that changing the arg type should be done, and we can do that easily, but I'd like some RCA.
9214
23:23I guess that's expected when working with cyclic structures?
>> copy/deep append/only x: [] x
Segmentation fault

greggirwin
00:05I think Nenad has said that cycle detection is TBD.
9214
00:08@greggirwin good to know, thanks.
qtxie
00:41@toomasv How to reproduce it?
00:55@hiiamboris Yes. It shouldn't freeze the console. I'm not sure we should allow number! here. For /dup, only integer! value makes sense for me.
01:01For /part, different type of number! may be used in different way. For example, if use 50%, will insert half of the elements.
>> a: []
>> b: [1 2 3 4]
>> insert/part a b 50%
>> a
== [1 2]
toomasv
03:19@qtxie It happened several times when I played a bit with curves, as seen on above picture, and left the console unattended for a little while. Each time after coming back I found it had died.
I was playing with variations of view [box 500x300 draw [shape [move 50x150 curve 50x10 150x10 150x150 curv 250x290 250x150 move 50x150]]].
qtxie
03:49@toomasv Thanks. Maybe some memory corruption in curve function. :bug:
hiiamboris
07:11@qtxie @greggirwin talking about root causes...
Red []
foo: routine [x [value!] /local y [red-integer!]] [
  y: as red-integer! x
  print y/value
  print #"^/"
]
repeat i 10 [
  prin [0.1 * i " "]
  foo 0.1 * i
]

red -c ...
0.1  -1717986918
0.2  -1717986918
0.3  858993460  
0.4  -1717986918
0.5  0          
0.6  858993460  
0.7  1717986919 
0.8  -1717986918
0.9  -858993459 
1.0  0
07:13if there was a check around https://github.com/red/red/blob/master/runtime/datatypes/string.reds#L2153 for TYPE_INTEGER, it might have not crashed/freezed
qtxie
07:14@hiiamboris IIRC, red-integer! will auto-unwrap when passing to a routine.
hiiamboris
07:15but I pass it as red-value (struct), to reproduce the insert behavior
qtxie
07:15Ah, you mean the fix for /part issue. Yes, we should check the type there.
hiiamboris
07:16@qtxie I agree, simple change to integer! for the accepted type should be enough of a fix for /dup in my opinion
dockimbel
09:15@9214
> @dockimbel is this an expected behavior?
>> object skip [x: 1 y: 2] 2
== make object! [
    x: unset
    y: 2
]


That's a bug.
09:21@hiiamboris
> @qtxie @greggirwin talking about root causes...

Looks like a bug? If confirmed, please log it in a ticket.
meijeru
10:41The usual question: is it a bug or a feature? Take an element from a block, where the element has the newline flag set. Insert that element in another block -- the newline flag remains set. If it is a feature, it may mean extra programming to unset the newline if it is not wanted.
>> b: [1 2 3]
== [1 2 3]
>> new-line b true
== [
    1 2 3
]
>> d: make block! 10
== []
>> insert tail d b/1
== []
>> d
== [
    1
]

dockimbel
10:48@meijeru Feature. We preserve newline flags by default. If it's not desired, you can clean them up at any time using a new-line/all off call.
meijeru
10:49@dockimbel Fine! A warning to this effect in the docs needed?
dockimbel
11:01@meijeru I think that stating that newline markers are preserved when values are moved between any-lists is enough. Rebol2/3 have the same behavior.
hiiamboris
11:19
>> o: object [f: does [probe self probe :self]]
>> o/f
make object! [
    f: func [][probe self probe :self]
]
unset

why won't self work as a get-word!?
dockimbel
11:32@hiiamboris Probably missing a code branch.

nedzadarek
10:43I have checked this in red/help but to make sure:
any with block causes infinite loop, but with normal string it will be fine:
parse "foo" [any [""] "foo"]
; parse "foo" [any "" "foo"] ; infinite loop
11:23op! doesn't work with quote: quote 1 + 1 will show: Script Error: - operator is missing an argument. Is this correct behaviour?
PeterWAWood
11:37When cross-compiling the GUI console, system\build\config shows the name of the target OS but uses the host OS version number.

I compiled the GUI console for Windows under macOS 10.12:

text
>> help system/build/config
SYSTEM/BUILD/CONFIG is an object! with the following words and values:
     config-name        word!         windows
     OS                 word!         Windows
     OS-version         float!        10.12
11:39It seems like a bug.
hiiamboris
12:54> op! doesn't work with quote: quote 1 + 1 will show: Script Error: - operator is missing an argument. Is this correct behaviour?

@nedzadarek
? 1 + 1 -- same
looks like :get-words and 'lit-words in functions specs get priority over operators? weird is that + won't get the result of quote, seems like a lexer limitation to me
nedzadarek
13:20@hiiamboris hmm... but I think ? 1 + 1 is expected behaviour because ? 1 doesn't return anything (useful/integer!). quote 1 on the other hands returns 1 (q: quote 1 q).
9214
13:23This behavior is expected with get-args and lit-args, which ? and quote use.
hiiamboris
13:30@nedzadarek yeah, I agree..
13:31it works fine in R3 btw
nedzadarek
13:34@9214 why it's expected? I mean quote returns some value so it should *give* + it.
dockimbel
13:37@nedzadarek
>> (quote 1) + 1
== 2
>> 1 + quote 1
== 2
nedzadarek
13:37@dockimbel yes, but at first argument, why you need ()?
9214
13:41@nedzadarek because operators have precedence over functions.
13:44and because otherwise quoted argument is not a par of infix expression.
nedzadarek
13:46@9214 I don't mean precedence (op! vs function!). I mean why quote 1 + 1 doesn't work at all (requires parenthesis)? If op! has higher precedence over function! then it should be evaluated something like this q: (1 + 1) quote (quote 2).
9214
13:50But get-arg goes first and eats leftmost argument, leaving operator only with one at the right.
hiiamboris
13:51R3: ![](https://i.gyazo.com/bedddf2f1c842b064237b0318224d581.png)
I think it's even more wrong? what's the point of quoting a result of an expression?
I'd rather expect quote 1 + 1 = (quote 1) + 1, so the Red behavior looks better to me
although I don't see why the result of quote won't go into the + as left-expression
13:57nah, I was wrong about R3, it does all right:
![](https://i.gyazo.com/3bf44b7cfc57c6aa416acd86bf08c3ab.png)
greggirwin
22:09@nedzadarek, parse "foo" [any "" "foo"] ; infinite loop should be OK, I think, because any doesn't advance the input in this case, and so should break. If nobody corrects my view, please open a ticket for that.

9214
04:49@greggirwin that's correct.
05:53?
>> parse x: [][insert ('foo)]
== true
>> x
== [unset]
>> parse x: [][insert (quote foo)]
== true
>> x
== [unset]
dockimbel
06:09> parse "foo" [any "" "foo"] ; infinite loop

Worth a ticket, as we could add infinite loop detection for that case.
06:11@9214 Looks like a bug.
9214
06:14@dockimbel https://github.com/red/red/issues/3357 :guardsman:
dockimbel
06:19@9214 Thanks. :+1:
hiiamboris
20:14%ticket19.red:
Red [] ? value

invoked:
VALUE is a string! value: "ticket19.red"

some global context pollution?
greggirwin
20:15I believe this was a recent ticket... what build, and REPL or compiled?
hiiamboris
20:16REPL, all builds
greggirwin
20:17Just built. Seems fine here.
meijeru
20:17This was a case of leakage.
greggirwin
20:17
>> Red []  ? value
     value?          native!       Returns TRUE if the word has a value.
     values-of       function!     Returns the list of values of a value that supports reflection.
hiiamboris
20:18@greggirwin you need to put that into a file and specify the filename as an argument to red.exe
meijeru
20:18PR #3346 solved the leakage.
hiiamboris
20:19oh wow
greggirwin
20:21Thanks @meijeru, that's the one. I'm always too slow. :^)
hiiamboris
20:22yeah just updated and that fixed it, thanks!
meijeru
20:22It's just that I was one of those that thought of the probable cause when the issue was first mentioned. So I was glad to be right...
20:23And therefore I remember it!

dockimbel
08:40Can't find which room talked about the rich-text face updating issue, but it has been fixed, so the following code now works as expected:
move-color: func [face][face/data/1/x: face/data/1/x + 1]

view [
    rt: rich-text 300x50 "Jumping color" with [data: [1x1 255.0.0]] 
    return 
    button "Jump" [move-color rt probe rt/data]
]
9214
16:28@toomasv :point_up:
toomasv
16:34:point_up: [May 1, 2018 7:33 PM](https://gitter.im/red/help?at=5ae896d46d98e53e0443d342)
9214
16:34:+1:
toomasv
16:56@dockimbel The new console dies regularly, when left for some time alone, so that screen-saver switches in. When I log in again, the console has died.
gltewalt
21:16Seems to be long residing issues with consoles and ‘sleep mode’ on windows
nedzadarek
22:13@toomasv I don't remember which version it was (22.04 or 29/30.04) but after some time it took a lot of my ram.

toomasv
03:07I met with this or very similar problem first time only recently, after @qtxie made changes to bezier functions in shape dialect. But I am not sure it originated there, because I hadn't downloaded new builds regularly before that.
dockimbel
08:04I also noticed some issue with hibernation, when waking up, the console window is blank and painted only when bringing it on front.

gltewalt
17:05Yes, hibernation or 'sleep mode'
greggirwin
18:17I just had some long running GUI consoles die here, without sleep or hibernate. Had some other things go odd at the same time, so could be display/driver dependent.
gltewalt
19:00Is the memory growing over time?
greggirwin
19:32I didn't have TaskMgr up at the time. Will watch that in the future.
nedzadarek
23:00@greggirwin @gltewalt I'm on win 8.1 with 04.05.2018 build. When the task manager is opened, the cpu usage goes up to 40-60% and Ghz goes from 0,5-1GHz to full speed ~2.5GHz. Memory started to grow at that time.
23:06When I minimised, cpu % went to ~~15%. It worked few times, but at ~3rd time there is no change (40-60% cpu).
In the new console ;comment is deleted (it disappear from the screen).
23:08new-line markers in the old (26-03) and the new gui console (04.05) are not set correctly, especially after blocks:
[ a
      [b]
      c
      [d]
      z
    ]
; == [a 
;     [b] c 
;     [d] z
; ]
[[b]
    ]
; == [[b]]
[[b]
    z
    ]
; == [[b] z]
[z
    ]
; == [z]
[z
    z]
; == [z 
;     z
; ]

gltewalt
00:01Does memory grow without introducing any code? (Fresh console at idle)
nedzadarek
00:07@gltewalt yes
greggirwin
04:06@gltewalt I saw one instance where it went up, but only to 66M (still not expected), then died. There are some recent commits with console related code and even MW_ACTIVATE handling, which could be related.
gltewalt
04:08GUI console only I assume
greggirwin
04:10Yes.
gltewalt
04:11Newest daily build GUI Console is steady as she goes so far on Win7. How long usually until it "goes up"?
greggirwin
04:14I can't yet dupe it on demand.
gltewalt
greggirwin
04:15Just pulled and building fresh. Will see if it happens again.
gltewalt
04:15I see that every time you give the GUI console focus memory usage uncreases
04:15increases
04:16click away to taskmgr, click back to console. Grows
04:17By 4k
greggirwin
04:20Not the same on Win10.
gltewalt
04:25It grows when I cycle through open windows or click away and then give it back focus. If I leave it up and let it sit idle, it stays the same. So far.
ne1uno
04:27I left new clean gui running was about 6 hours before it went from 20meg to 40meg
04:28win7, the old gui must be using less than 20 and it never used more
04:29one time I unminimized it was blank, but never crashed
04:29no hibernate though it probably had a screensaver or two kick in
gltewalt
04:32Yeah, I was wrong. It slowly grows while idle.
04:33If it's in focus
05:0313, 412 K to 13, 860 K, over 12 minutes
endo64
10:06parse-trace [3] [1 2 quote 3] ; == Error: PARSE - invalid rule or usage of rule: 3 but parse [3] [1 2 quote 3] ; == true
qtxie
12:13@gltewalt I noticed that several days ago. The WM_ACTIVATE handling ease it a bit, but I didn't find the right fix yet. :bug:
nedzadarek
13:43@endo64 It works when you put it into square brackets: parse-trace [3] [1 2 [quote 3] ]. It seems that parse/trace also doesn't work (parse/trace [3] [1 2 quote 3] func [][]).
I have found similar "fix" to other bug: https://github.com/red/red/issues/3358 Maybe it's related?
greggirwin
21:02The REPL crash is interesting. I've seen it a couple more times now, after screen saver. Mem use is 60-80M when it crashes.

hiiamboris
06:47@qtxie look:
>> a: "12345678"
== "12345678"
>> copy b
== "aa"
>> a: "12345678"
== "12345678"
>> b: skip a 6
== "78"
>> c: tail a
== ""
>> remove/part a 4
== "5678"
>> b
== ""
>> copy b
== "56"
>> c
== ""
>> copy c
== "5678"
07:14ahh, filed a ticket on that..
greggirwin
17:09@hiiamboris, is b: "aa" defined before that in your session?
17:11Ah, it's all in your ticket. Thanks.
ne1uno
17:59is there a way to tell rebol to leave the console open on error? red old gui is failing to build, rebol closes before I can see errors. +q doesn't help
18:03doh, I guess can't do it from commandline
greggirwin
18:31Do you have a Red CLI console running while trying to build. Make sure any failed instances of the build (Rebol), aren't still hanging around in memory.
ne1uno
18:32I usually run a bat file to build, cli and new gui console build and run ok. old console starts to build but fails a few minutes later.
18:34no other red-console running
gltewalt
18:37Have you tried the rc way by loading red.r ?
18:38I think if it errors out it should keep Rebol console open?
ne1uno
18:42won't that run into the problem of not being able to compile from red with no sdk?

bitbegin
01:14@hiiamboris and @greggirwin After a changed, the associate b's position (var head) don't change. So I will fix this issue by adapting this position.
01:20As the reason showed above, this issue maybe exist in other series functions.
greggirwin
04:45Thanks @bitbegin !
bitbegin
06:55discussed with qtxie, no need to change b's position, just process the overflow
hiiamboris
07:16@bitbegin yeah I think tracking all series positions will be an overhead. Instead one could just do a fair amount of checks if any series argument has it's pointer past the buffer tail, and decide accordingly.
07:18Plus sometimes you might not need a change in other series:
a: "12345678"
b: skip a 4
clear a
index? b   ; or any other access - should not change b
append a "87654321"
b = "4321"   ; should be true
bitbegin
07:34You're right
07:43@hiiamboris and @qtxie about issue #3368, we only allow integer! for dump, is this will be ok?
hiiamboris
07:48@bitbegin yeah, I believe we previously agreed on that, but @qtxie was just busy enough with other stuff to fix it
bitbegin
08:03ok, i create a PR(3376) for this bug
hiiamboris
08:36@bitbegin thank you!
some automatic tests fail there though after the copy-fix
nedzadarek
11:28Should all, any etc returns none in this case all [ 1 = 2] and any [ 1 = 2]? I think it should return false (first reduce [1 = 2]; false).
hiiamboris
11:48@nedzadarek whatever the reason for that design, it's there since R2 and unlikely will be changed
nedzadarek
11:48@hiiamboris sO I shouldn't fill the thicket?
hiiamboris
11:49up to you ;) I decided not to
9214
11:52@nedzadarek read their description more carefully.
nedzadarek
11:54@9214 all: Evaluates, returning at the first that is not true. does it say that it should return none?
hiiamboris
12:01**at the first** is even more misleading then ;) one might think it returns the given series *at* that point
12:02@nedzadarek descriptions at RbE are accurate though: http://www.red-by-example.org/index.html#all http://www.red-by-example.org/index.html#any
9214
13:37@nedzadarek and why you need false, specifically? none is its logical equivalent, so I don't see much difference, not to mention the need for a ticket.
meijeru
14:21Actual semantics of all and any:
The shortcut evaluation functions any and all have a block as argument; they will evaluate the expressions one by one; any will stop at the first one whose value is not false or none and yield that as result; if there is no such expressions it will yield none; all will stop at the first one which is false or none and yield none as a result; if there is no such one it will yield the result of evaluating the last one. Note that any [ ] and all [ ] both yield none. Also: all [false] == none, any[false] == none.
toomasv
14:39Even if none is falsey value in standalone situations, it does not act as such in more complex logical formulas, e.g.
true or none ; true or any []
== *** Script Error: or does not allow none! for its value2 argument

In such cases it is better to include all conditions in any-block. Alternatively none should be converted into logic! type with make logic! or to logic!/ to-logic.
nedzadarek
20:27@9214 I haven't made anything that needs logic! (so I'm not sure if it would cause a problem) but I guess there might be cases where it matters (as @toomasv said).
greggirwin
20:52The doc strings could be improved in any case.
20:53I'll get on that.

bitbegin
03:36@hiiamboris CI tests ok
09:06i have fixed #3369, and added some test cases for it.
hiiamboris
09:24:+1:
09:30@bitbegin once I test copy on a fresh build, I suppose we need to inspect the other series functions as well, right?
like this:
>> a: "12345678"
== "12345678"
>> b: skip a 6
== "78"
>> clear skip a 4
== ""
>> a
== "1234"
>> remove b
== ""
>> a
== "123456"
>> :)
???
20:11is it normal that foreach [] [1] [] deadlocks? R3 complains when I'm asking it do the same
endo64
20:20I'm think it is a bug, you can open an issue for it.
hiiamboris
20:24alright
greggirwin
23:09@hiiamboris, you are the king on this issue. Keep breaking things.

bitbegin
01:57@hiiamboris Maybe a should be "1234" . You can open a ticket.
haolloyin
12:47It seems here 16-3: at [runtime/allocator.reds#L51-L53](https://github.com/red/red/blob/master/runtime/allocator.reds#L51-L53) should be 16-5: (change bit **3** to **5**)?
hiiamboris
17:44@bitbegin https://github.com/red/red/issues/3369
I've commented on that ticket, on the other series glitches I could find
17:46@dockimbel @greggirwin There are some question marks there I'd like you designers to have a comment on, as with some results it's not obvious what would a correct way be.
meijeru
17:55Have these bugs already been reported (they come from https://github.com/rebol/rebol-issues/issues/2286)
>> t: now/time
== 19:51:12
>> t/day
*** Script Error: cannot access day in path [script invalid-path]
*** Where: catch
*** Stack:  

>> now/time/day
== 10

First bug: wrong error message; second bug: /time is ignored and not reported
hiiamboris
18:06@meijeru what should the error message be? and how now should handle the 2nd example?
meijeru
18:46The error message should of course be cannot acces day in path t/day -- there is is a wrong parameter somewhere. The 2nd example should be either a protest to having two incompatible refinements, or to ignore the second one, and not the first one. What happens here is that programmatically /day is treated before /time, because that is the order in which they are defined, contrary to the order in which they are given in the path. My preference is for an error rather than ignoring.
hiiamboris
18:49I agree, an error makes sense.. otherwise it can become a hard to find bug
meijeru
18:53There is a problem in determining whether to make issues out of this: has somebody already made them before? How to search for those?
hiiamboris
19:02I looked up invalid-path and immediately found your issue, so I guess it's the way
meijeru
19:09OK two issues can stand
rgchris
19:09@meijeru I believe all public Red issues are in [red/red](https://github.com/red/red/issues), can search that. All issues related to the erstwhile Rebol 3 project are in [rebol/rebol-issues](https://github.com/rebol/rebol-issues/issues) (were painstakingly migrated from an older bug database). Somewhere there exists some Rebol 2 bugs, but I don't think they're public. I don't think it'd be controversial to reference a Rebol 3 issue in a Red issue if it pertains to some degree of compatibility.
hiiamboris
19:17@meijeru no I mean I found *only* the new issue ;)
meijeru
19:17@rgchris Thank you. I knew all that. In fact, I am using the R3 issues (ex Curecode) to get inspiration for new Red issues. The R3 collection very conveniently has a tag Red.has.this.too, so the only question is, have those issues not only been *detected* in Red by the R3 people, but also *reported* in the Red issues.
rgchris
19:18I figured you would, just reiterating :)
meijeru
19:18@hiiamboris Yes, that is why the new issue is not a duplicate and can stand. The one about now/time/day can also stand.
rgchris
19:18I think the red.has.this.too has not been cross-posted. Is just an observation, as I understand it.
9214
19:19@meijeru given the hostility of this tag maintainer, I doubt any of them were reported.
meijeru
19:19@rgchris It is funny, there must be ex-Curecode issues that I reported myself. Not sure how I can filter those in the Github version...
19:20But that would be mainly for nostalgia. I am not looking at R3 anymore. Too much to do in Red!
9214
19:21@greggirwin :point_up: I think it's a nice idea for a bounty - skim through R3 issues, test them in Red *and* report on our issue tracker.
rgchris
19:21@9214 Not to delve into the politics of the thing, I believe the tag is both for observational purposes and for the information of anyone on the Red side. I'm not certain the migrated issues repository is on the radar of Red devs though.
19:23Red's behaviour is a data point for the developer of, em, a certain Rebol 3 fork that shall not be mentioned.
9214
19:23Voldefork!
meijeru
19:24My two most recent issues are examples of bounty hunting. Unfortunately I lack the time to do this more systematically.
19:26@9214 :clap:
9214
19:28Additionally, if there are any noteworthy and interesting design decisions among these ticket (and even in [*humphmhmphm*](https://www.youtube.com/watch?v=rWBntJAvTmY)), they can be collected in [REP](https://github.com/red/REP) wiki/tracker for future reviews and discussions.

9214
00:20There are some issues with new GUI console and UTF, see:
* https://gitter.im/red/help?at=5af4e0eab84be71db9f9f794
* https://gitter.im/red/help?at=5af4e138862c5e33e9269521
ne1uno
15:43is nobody else having problems building old gui console? win7 seems to be after this comment, timer changed from integer to pointer/handle FIX: uses non-zero uIDEvent argument in SetTimer according to the document. #6fdf75bb
greggirwin
20:48Certainly issue research and tracking is bounty worthy.
20:49I haven't tried building the old GUI console in some time @ne1uno. What is the exact problem/error?
ne1uno
20:53I'm also having a weird problem with an atomic clock program I've been running for years, that and nobody reporting a problem in the last week has me wondering if it's just me
20:53 *** Compilation Error: argument type mismatch on calling: exec/gui/KillTimer
20:53 *** expected: [integer!], found: [pointer! [integer!]]
20:53 *** in file: %/c/c/Lang/red-lang/red/red-master/environment/console/GUI/old/windows.reds
20:54I tried a simple change back to timer: integer! but that wasn't enough
greggirwin
20:56@ne1uno I am slammed at the moment. If @qtxie (also slammed) doesn't jump in with a quick idea or fix, maybe @9214 can assist. Seems like maybe a small change, and just not caught if automated builds aren't running against the old console. @rebolek's builds might also offer clues. Thanks for narrowing it down where you have so far.
ne1uno
20:57rebolek server is on a rebuild. wasn't able to confirm or deny a problem
greggirwin
20:58Ah, right.
gltewalt
21:35is that a local variable? /local [pointer! [integer!]]
9214
22:03@greggirwin assuming that handle! is just a shortcut to integer pointer, second timer argument in two KillTimer calls should be patched to timer/value. I applied this fix and successfully compiled old console on Win7, after seeing the same error @ne1uno posted above.
22:04Should I PR a fix for @qtxie to review?
greggirwin
22:04Yes please! Thanks!
9214
22:06https://github.com/red/red/pull/3387
ne1uno
23:11thanks all*, builds ok now latest commit, some programs run, there may still be a silent exit problem if timer is used?

ne1uno
00:12not sure what it is now, only one program crashes, other programs with timers work.

9214
13:57
text
>> ? +
USAGE:
     value1 + value2

DESCRIPTION: 
     Returns the sum of the two values. 
     + is an op! value.

ARGUMENTS:
     value1       [number! char! pair! tuple! vector! time! date!] 
     value2       [number! char! pair! tuple! vector! time! date!] 

RETURNS:
     [number! char! pair! tuple! vector! time! date!]

>> ? is
*** Script Error: is operator is missing an argument
*** Where: catch
*** Stack:
hiiamboris
15:17@9214 yeah this thing caught me once too :)
when you specify an operator with a left arg type of lit-word! or get-word! the operator (is) takes precedence over func ?
9214
15:18@hiiamboris yup.
hiiamboris
21:03@greggirwin can you reopen this https://github.com/red/red/issues/3369 ?
greggirwin
21:06Done.
hiiamboris
21:06thanks
21:07@greggirwin you can decide the desired behavior there btw, as I'm not the authority to do so ;)
greggirwin
22:41I've been trying, unsuccessfully, to make time to get through more tickets. :^)
22:41Those things that take time to think about deserve deeper effort.

hiiamboris
07:10@greggirwin No problem, we'll remind you some other time :) Meanwhile @bitbegin will be able to fix all the more obvious parts.
nedzadarek
11:54With object ownership (reactors), index/part isn't set to -1 ([/red/help's discussion](https://gitter.im/red/help?at=5af97427bd10f34a68fe8752) ):
> When modifications affect several non-contiguous or all elements, index will be set to -1.

I've tried trim/all and clear but in both cases index: 0.

>When modifications affect an undetermined number of elements, part will be set to -1.

With, again, trim/all part: 0.
ps. [source](https://www.red-lang.org/2016/03/060-red-gui-system.html)
hiiamboris
19:59do you find this consistent?
>> "a" = "A"
== true
>> #"a" = #"A"
== false
9214
20:01@hiiamboris yes, because string comparison is case-insensitive, while chars represent different UTF codepoints.
20:01it's like comparing two different integers and expecting them to be the same.
greggirwin
20:02@9214 +1
hiiamboris
20:02well, to me #"a" doesn't look like an integer, but as an UTF code point
20:03which, like you said, can be compared with case in consideration
greggirwin
20:03That's what he said, simile aside.
9214
20:03
text
>> to integer! #"a"
== 97
>> to integer! #"A"
== 65
>> #"A" + 1
== #"B"
hiiamboris
20:04yeah I know the arithmetic, I'm just pointing out that == and = behavior on chars and strings is *surprisingly* different
greggirwin
20:04Only the first time. :^)
hiiamboris
20:04mkay :)
9214
20:04Uhm, what == has to do with it?
hiiamboris
20:05== is case-sensitive on strings
9214
20:05Now that's strange.
20:05@greggirwin :point_up: is it expected?
greggirwin
20:05Yes, by design.
9214
20:06@gltewalt :point_up: don't forget to note this.
hiiamboris
20:07so how do I compare strings char by char then? by uppercasing both chars? can I be *sure* it will yield the same result that string1 = string2 yields?
greggirwin
20:07One of those subjective design judgement calls. Works well in practice, but agreed that we should note it, as both case and string sub-type trigger inequality.
20:08Make each char a string with just that char in it, then they compare as strings.
hiiamboris
20:09right! :)
20:09awkward but reliable
greggirwin
20:10And you can make it pretty efficient, too, if you care. ;^)
gltewalt
20:11Are there helper funcs that handle the differences already? Like same? or equal?
9214
20:11same? is =?, equal? is =.
greggirwin
20:11== is strict-equal? already.
gltewalt
20:11(I could look, but - on mobile)
greggirwin
20:12Whew! I was slow but gave a complementary answer. ;^)
20:13String processing is worth some good docs, as you can, and may need to, do things a bit differently in Red.
gltewalt
20:13That’s fairly straightforward.
hiiamboris
20:17same-letter?: func [a [char!] b [char!]] [ (head change "" a) = (head change "" b) ] should efficient enough I guess
BeardPower
20:44Or use xor.
hiiamboris
20:50@BeardPower :confused: like how?
BeardPower
20:52@hiiamboris
a: "test"
a/1 xor a/4 = #"^@"

hiiamboris
20:53but no case-insensitivity this way?
BeardPower
20:54no, you need to change them to lowercase/uppercase first or use an additional or
hiiamboris
20:56this is too extremist! :D esp. the or-way
BeardPower
20:56
(lowercase a/1) xor (lowercase a/4) = #"^@"
20:57Sure, that's why this is enough:

(lowercase a/1) = (lowercase a/4)
hiiamboris
20:58I'm not sure though if a = b is equivalent to (lowercase a) == (lowercase b)
20:59Unicode scares me sometimes :D
BeardPower
20:59It is, because = is not a strict comparison.
20:59== is a strict comparison.
21:00= is a case-insensitive comparison, == is a case sensitive one.
21:02To get the best performance, you need to use XOR, CMP, SUB or TEST.
21:02And use the zero flag of the CPU.
hiiamboris
21:03yeah, after looking up the source of string/equal? I agree, lowercase should work
not sure if xor will matter on the Red (not R/S) level :)
BeardPower
21:04It depends if you want to prevent timing attacks of your code.
21:07Or swapping the contents of some "variable" without an intermediary.
21:10
>> a: "a"
== "a"
>> b: "b"
== "b"
>> a: a xor b
== "^C"
>> b: b xor a
== "a"
>> a: a xor b
== "b"
>> a
== "b"
>> b
== "a"
21:14You can also use or instead of the char from above (#"^@"):

b = ((a xor b) or b)
21:15Or just:
to logic! ((a xor b) or b)
21:16Or just:
to logic! a xor b
hiiamboris
21:18@BeardPower
swap1: func ['a 'b] [set a (get a) xor (get b)  set b (get b) xor (get a)  set a (get a) xor (get b)]
swap2: func ['a 'b] [set a also get b set b get a]
x: 1 y: 2
clock [swap1 x y]
clock [swap2 x y]
clock [(lowercase #"t") xor (lowercase #"T") = #"^@"]
clock [to logic! (lowercase #"t") xor (lowercase #"T")]

0:00:00.589000001 [swap1 x y]
0:00:00.287000001 [swap2 x y]
0:00:00.156000001 [(lowercase #"t") xor (lowercase #"T") = #"^@"]
0:00:00.184000001 [to logic! (lowercase #"t") xor (lowercase #"T")]

The Theory won't work on an interpreter :(
BeardPower
21:22Why would it not work on an interpreter?
hiiamboris
21:23because :point_up: of the benchmarks: the less tokens you use the better
BeardPower
21:23It works, just at different speed.
hiiamboris
21:25you mean it works in negative time scale? ;)
BeardPower
21:27No, it just works. I never was saying it's the fastest :-)
hiiamboris
21:28I see :)
BeardPower
21:29Try it with R/S :-)
21:30Do you want/need the best performance?
21:30I dont't like the set/get way. It's less readable.
hiiamboris
21:31Totally!
21:32let's go to chit-chat though :)
BeardPower
21:32Instead of a: also :b b: a
21:32Sure.

rebolek
08:45
>> do/args %red.r "-r environment/console/CLI/console.red" 
Script: "Red command-line front-end" (none)

-=== Red Compiler 0.6.3 ===- 

Compiling /home/sony/Code/red/environment/console/CLI/console.red ...
*** Red Compiler Internal Error: Script Error : repend expected series argument of type: series port 
*** Where: comp-func 
*** Near:  [repend shadow-funcs [
decorate-func/strict name 
shadow: to-context-spec symbols 
ctx 
spec
] 
bind-function body
]
PeterWAWood
08:51@rebolek The CLI console compiles on macOS
rebolek
08:52@PeterWAWood this is on Linux
08:52I was able to cross-compile GUI console for Windows on Linux, but with CLI console, I got this error
08:55When I checked out cec0793compilation works again, so it must be recent problem.
PeterWAWood
08:55I just tried on Ubuntu32 with the latest commit:
-=== Red Compiler 0.6.3 ===- 

Compiling /media/sf_VMShare/Red/red/environment/console/CLI/console.red ...
...compilation time : 1235 ms

Target: Linux 

Compiling to native code...
...compilation time : 34717 ms
...linking time     : 583 ms
...output file size : 995936 bytes
...output file      : /media/sf_VMShare/Red/red/console
08:56This commit commit 1fd3e99c516a900d562ad9a7744e0c74b5e2613d
rebolek
08:57@PeterWAWood strange, I can compile HEAD now too. I've restarted Rebol 3 times before posting this, to be sure...
Probably some Heisenbug...
PeterWAWood
08:57... worrying!
rebolek
08:58:ghost:
PeterWAWood
08:59Though perhaps it is a Heisenbug in Rebol.

9214
12:29@dockimbel I'm probably doing something stupid
r: make object! [
	a: [1 2 3]
	b: [4 5 6]

	on-deep-change*: func [owner word target action new index part][
		print ['on-deep-change* tab word]
	]

	on-change*: func [word old new][
		print ['on-change* tab word]

		modify old 'owned none
		modify new 'owned reduce [self word]
	]
]

reverse/part r/a 2
r/a: [3 2 1]
probe r

reverse/part r/a 2

*** Runtime Error 1: access violation
*** at: 0807DCF5h
dockimbel
15:35@9214 Worth a ticket for investigating.
BeardPower
15:41@9214 A great language should never throw a segfault, despite doing the most stupid things.
dockimbel
15:42Yep, native crashes from Red should be systematically reported for investigation.
9214
15:42Is that a milltalk or a moontalk, can't figure out? :smirk:
BeardPower
15:42Millmoon or Moonmill :smile:
9214
15:47@dockimbel done https://github.com/red/red/issues/3393, let me know if you need a smaller example or more details.
15:47By the way, are there any docs on modify, e.g. what fields in aggregate structure can be modifed?
15:49Its spec is a bit off though:
...
RETURNS:
     [map! file!]
dockimbel
17:25@9214 You need to look at the source code of modify action for that. It's a WIP feature. I want to use it for providing write access to some datatypes internal properties. For example, ability to set the internal encoding of a string! (to shrink it when possible).
9214
17:26I see, that would be very interesting to have.
dockimbel
17:28I would need to write a spec document about those internal properties, and their accessors. I'm waiting for ports to be implemented to do that, as they will be exposing the most properties.
BeardPower
20:42Woohoo! Ports... yummy.

gltewalt
19:58:question:
>> max 1.2.3 1.2.3.4
*** Script Error: value out of range: 1.2.3.4
*** Where: max
*** Stack:

>> max 1.2 1.2.3.4
== 1.2.3.4
meijeru
20:23max and min when applied to two tuple! arguments require tuples of the same size, in other words the comparison is not based on lexicographic ordering, in contrast to > and < for tuples. I think this is a missed opportunity and worth a WISH.
20:26On the other hand, max and min may be applied to a tuple and a float or integer, with the float converted to integer first, and then it is compared to each of the elements of the tuple. Is this useful, I wonder?
BeardPower
20:26This does not explain, why the latter is working, as the tuples are not the same size. It's more of tuples need to be a multiple of each other.
meijeru
20:28The latter is not a comparison of tuples, since 1.2 is a float, and not a tuple.
BeardPower
20:29Then it should not return the 1.2.3.4 tuple as a max.
meijeru
20:30Yes it should, because it compares each of the elements of the tuple to 1 and takes the max; all four tuple elements are >= 1
20:30I repeat: this is the way it is; whether that is useful is another question.
20:32Example: max 2 1.2.3.4 ; == 2.2.3.4
BeardPower
20:39Sure.
meijeru
20:41For the first case, I have formulated an issue rather than a wish, see #3395
hiiamboris
20:55don't you think that 1.1.1 = min 1.2.3 1 is kinda weird and unexpected? even the hypothesis that min of 2 values should return one of these values: not none? find [p q] min p q is broken by it
20:56I mean if we put aside how it's currently done for a moment and think on the rationale?
21:01and are there any other cases where r = min p q and true = all [p <> r r <> q]?
21:05okay, pairs here too, and pairs break the if p >= q then (max p q) = p logic:
>> 0x1 > 1x0
== true
>> max 0x1 1x0
== 1x1
gltewalt
21:41I think it’s weird, but I’ve been struggling and I’ve forgotten plo
21:41Plenty
greggirwin
23:42@dockimbel needs to say whether it's intentional. If we use tuples in non-traditional ways, e.g. I've used them to store dates, it might be useful. It could also just be a logic path that slipped through.

hiiamboris
08:05wow look what I've discovered:
>> 1.0 < 1.#nan
== true
>> 1.#nan > 1.0
== false
rebolek
08:08Interesting, in a slightly older console it throws an error.
bitbegin
08:24
>> a: #(b: true)
== #(
    b: true
)
>> a/b
== true
>> type? a/b
== word!
rebolek
08:25@bitbegin that's not a bug.
bitbegin
08:25type? a/b should be logic?
08:25but i want to use logic in map!
rebolek
08:26true is a word! that gets evaluated to logic! value. However when you are constructing map!, that word is not evaluated.
meijeru
08:26"It is not a bug, it is a feature". For logic, use #[true].
rebolek
08:26
>> type? true
== logic!
;; evaluated
>> type? first [true]
== word!
;; not evaluated
bitbegin
08:27
>> a: #(b: #[true])
== #(
    b: true
)
>> type? a/b
== logic!
rebolek
08:27:+1:
bitbegin
08:27@rebolek @rebolek thanks
hiiamboris
10:26:) looks like **everyone** asks this question at some point
10:27is there a wiki page for all the unexpected things?
rebolek
10:28I'm not sure. It probably depends on your definition of unexpected :smirk:
hiiamboris
10:28if everyone asks the same question, it means no one expected that, right? ;)
10:35like what kind of sorting is this:
>> sort/reverse [1.#inf 1.0 1.#nan 0.0 -1.#inf]
== [1.#INF 1.0 1.#NaN 0.0 -1.#INF]
>> sort [1.#inf 1.0 1.#nan 0.0 -1.#inf]
== [1.0 1.#INF 1.#NaN -1.#INF 0.0]
rebolek
10:37I'm not sure if there are defined rules in Red for handling comparison, sorting, etc of infinities and NaNs. You should report it, I guess.
hiiamboris
10:38yeah I get it, I just haven't set my mind on the scale of the problem and the number of tickets... still exploring, breaking things :)
14:08they have this bug since 2014!!! https://github.com/red/red/issues/847 :)
endo64
15:28@hiiamboris It is a low priority issue
9214
15:31Based on @rebolek and @qtxie comments, I'd say that it's either this or an uncaught regressions.
15:44> they have this bug since 2014

Which tells me that floats are nightmare to implement and support properly (and on multiple architectures) by a team of 2 (1?) people.
hiiamboris
16:02yeah, NaNs are tricky
I once asked Carl to implement them, he refused as it required literals (1.#nan, 1.#inf)
it's already great that we have the literals in Red, and quiet NaN arithmetic, which is a life-saver in scientific programming
9214
16:04@hiiamboris

> Carl

so you're Rebol old-timer?
hiiamboris
16:06I wasn't deeply into Rebol, just wrote some program on it at the time of it's decline
16:07I was then interested in D more, but then they invented D2 and I wasn't interested anymore ;)
rebolek
16:19@hiiamboris this is theme more related for chit-chat group, but what do you dislike about D2?
gltewalt
20:02mod and modulo should work

>> mod 1.2.3 4.5.6
*** Script Error: cannot compare 1.2.3 with 0
*** Where: <
*** Stack: mod

>> modulo 1.2.3 4.5.6
*** Script Error: absolute does not allow tuple! for its value argument
*** Where: absolute
*** Stack: modulo mod

>> help mod
USAGE:
     MOD a b

DESCRIPTION:
     Compute a nonnegative remainder of A divided by B.
     MOD is a function! value.

ARGUMENTS:
     a            [number! char! pair! tuple! vector! time!]
     b            [number! char! pair! tuple! vector! time!] "Must be nonzero."

RETURNS:
     [number! char! pair! tuple! vector! time!]

>> help modulo
USAGE:
     MODULO a b

DESCRIPTION:
     Wrapper for MOD that handles errors like REMAINDER. Negligible values (com
ared to A and B) are rounded to zero.
     MODULO is a function! value.

ARGUMENTS:
     a            [number! char! pair! tuple! vector! time!]
     b            [number! char! pair! tuple! vector! time!]
meijeru
20:31Known bug, see #2674 and #2997

bitbegin
11:04found an issue about put on map!
11:04
>> a: #()
== #()
>> put a 'b 1
== 1
>> a
== #(
    b: 1
)
>> clear a
== #()
>> put a "b" 1
== 1
>> a
== #(
    "b" 1
)
>> clear a
== #()
>> put a 'b 1
== 1
>> a
== #()
>>

rebolek
11:06@bitbegin Nice! But I think it's clear issue, I can trigger same bug without put:
>> a: #()
== #()
>> a/b: 1
== 1
>> clear a
== #()
>> a/("b"): 1
== 1
>> clear a
== #()
>> a/b: 1
== 1
>> a
== #()
bitbegin
11:33@rebolek yes. clear bug
qtxie
14:45@bitbegin Please open a ticket for it.

bitbegin
01:56done
greggirwin
21:57@hiiamboris, regarding the map! behavior, it's doc'd on https://doc.red-lang.org/en/map.html.
21:58We can't say that everyone found it unexpected, because all those who expected it didn't mention it. :^)
hiiamboris
22:15@greggirwin no I mean almost everyone confuses words *true*, *false* and *none* with their evaluated equivalents, but I myself was once confused by switch not evaluating it's key arguments (switch type? x [integer! [...]] case of mistake), which was maybe a misremembering, but still is closely related, and I've seen people trip on switch behavior and ask the same question a few times on my memory :)
greggirwin
22:16Sure. We all trip over evaluation at times. Life with Red.
hiiamboris
22:17it's not about a map!, not even about mentioning evaluation rules somewhere, but about a need to make it clearly visible for the newcomers, so they can shortly develop a *habit* of looking at these things in a proper way :)
22:19we should ask @9124 probably how many times he explained evaluation to someone
greggirwin
22:27Do you have a concrete improvement to suggest? The problem is making it clearly visible.

hiiamboris
07:08@greggirwin maybe a FAQ? link in the topic of help/welcome? the classic way, you know...
toomasv
10:57Seems to be regression in event/away?. In later builds, when mouse is moved into a face three events are generated for event/away?: false, true, false. Moving out is correct. In stable build events are correct. If face is transparent events are generated as if all-over was declared in later builds. Stable build is correct in this regard also.

Left gif shows stable build behaviour, right gif shows latest build.
[![event/away?](http://vooglaid.ee/red/event-away.gif)](http://vooglaid.ee/red/event-away.gif)
Code:
i: 0 view [size 150x150 base 100x100 on-over [prin event/away? print ["" i: i + 1]]]
11:20Ah, with transparency true and false events are generated continuously
[![event/away? 2](http://vooglaid.ee/red/event-away2.gif)](http://vooglaid.ee/red/event-away2.gif)
i: 0 view [size 150x150 box 100x100 on-over [prin event/away? print [i: i + 1]]]
endo64
14:09@toomasv Is your screen display scaled?
14:11I had a similar issue, I put a base face on a window set it loose so it can be dragged by mouse, but sometime I cannot drag it, then I realized that it happens only if my display scaled on Windows, like %125.
toomasv
14:16@endo64 It is not as far as I know. Does it mean this problem does not appear on your screen? I use W10. And if it is about scaling then why does stable build work as expected, but new one not?
hiiamboris
14:40I see the 1st issue on W7 (no aero) with both transparent and opaque color, but 2nd example does not trigger any events at all unless I specify a (non-transparent) color.
toomasv
15:58@hiiamboris But it should work like this (stable version) with box
[![event/away? 3](http://vooglaid.ee/red/event-away3.gif)](http://vooglaid.ee/red/event-away3.gif)
hiiamboris
17:11@toomasv stable: no events on W7 (again, unless I specify the color)
greggirwin
18:10@hiiamboris room topic doesn't seem like the right place to mention tech details. But feel free to add a section to https://github.com/red/red/wiki/FAQ.
18:12@toomasv please open a ticket for @qtxie, or post a note in red/gui-branch and link to your example here. Dupes here, and your example is great.
toomasv
18:17@greggirwin Ok, thanks

qtxie
07:37@toomasv I fixed the hover issue on non-transparent window.
toomasv
08:20@qtxie Thanks!
9214
16:02I have noticed that evaluating any expression in the new console that was idle for a while results in a crash. @greggirwin I believe you reported something similar recently?
greggirwin
17:40My issues with the console crashing all seem related to the system sleeping and changing display settings. Could be the same root cause. All on Windows for me.
luce80
17:41On R2 and R3
>> type? do func [][1]
== integer!

on Red
>> type? do func [][1]
== function!
greggirwin
17:47@luce, would you please add that to https://github.com/red/red/wiki/Differences-between-Red-and-Rebol ?
17:48It will probably generate a flurry of discussion in any case. :^)
luce80
17:50@greggirwin Is it really by design?
meijeru
17:50I don't think it's a feature, but a bug:
>> do func [a][1] 1
== 1
>> do func [][1]
== func [][1]

17:51As you see, do treats zero-argument functions differently from 1-argument functions
greggirwin
17:52@meijeru, I disagree:
>>  do func [a][1] 2
== 2
meijeru
17:53I stand corrected for my example, it was not discriminating enough. But the worry about feature/bug subsists.
toomasv
18:01This behaviour corresponds to the description of do

> Evaluates a value, returning the last evaluation result.
luce80
18:01A "use" case could be:
>> use: func [locals body][do has locals body]
greggirwin
18:03It is by design, from looking at the code.
18:06That is, from do passive evaluation is used for any-function! values.
toomasv
18:06
>> do [func [][1]]
== func [][1]
>> reduce [func [][1]]
== [func [][1]]
>> do reduce [func [][1]]
== 1
>> reduce reduce [func [][1]]
== [1]
greggirwin
18:10The values that get special treatment by do are: [block! path! string! url! file! error!] Everything else is evaluated passively.
meijeru
18:12Thus it is indeed a feature. One could even claim that R2/3 have it wrong...
18:13Is there a choice to be made between being right and being (backwards compatibly) wrong ?
hiiamboris
18:27:point_up: [March 21, 2018 7:15 PM](https://gitter.im/red/help?at=5ab285275f188ccc15df954b)
Doc said the reason behind this was to get rid of variable arity
greggirwin
18:29> Is there a choice to be made between being right and being (backwards compatibly) wrong ?

Always. :^)
18:29Thanks for finding that @hiiamboris ! We can add that to the wiki page.
18:31I'll edit the wiki.
meijeru
18:35I agree that the variable arity argument is the best and the easiest to remember!

gltewalt
04:33
>> type? x: to-issue "hi there"
== issue!
>> x
== #hi there
>> #hi there
*** Script Error: there has no value
*** Where: catch
*** Stack:
9214
04:34@gltewalt #hi there is a syntactically invalid issue, which can be constructed by to anyway.
gltewalt
04:35Yeah, isn't that a bug?
9214
04:36I don't think it's a bug per se, just that to's design is not casted in stone.
04:36It should get more stricter at some point.
04:36
text
>> to path! [[a b] 1]
== [a b]/1
gltewalt
04:37How about:
>> type? #HODL,42
== 0.42
>> type? #HODL:42
*** Syntax Error: invalid value at ":42"
*** Where: do
*** Stack: load
9214
04:38issue! isn't a part of any-string!, so this one is expected.
04:38I mean, there're some limitations on what characters you can and cannot use.
gltewalt
04:41It also terminates the issue if you include a ;. Should it?
9214
04:41?
>> #abc;
== #abc
04:41; is a comment
gltewalt
04:42Yeah, but should it be treated as such in an issue!
9214
04:42~~No, it shouldn't.~~ Err, I mean it should be treated as a start of a comment.
gltewalt
04:43
>> #a;bc
== #a
04:45Should issue be part of any-string! ?
9214
04:47I don't think so. It's a part of any-word! in R3 though.
toomasv
05:17@gltewalt Here your earlier nice find comes to help:
>> to-issue "HODL:42"
== #HODL:42
>> to-issue "a;bc"
== #a;bc
meijeru
09:04Together with refinement!, issue! is part of all-word!which further includes any-word!. In Red, the latter is only make typeset! [word! set-word! lit-word! get-word!]
greggirwin
23:51Issues were strings in R2. When Carl changed them to words, I argued against it. I used them as he originally intended, as identifiers (record IDs and such), while he found he used them more as keywords. Nenad followed the change, carefully weighing the tradeoffs, and went with words. There is a big win there, with the downside being that you can't modify them directly, and they will impact symbol table space more. There has also been discussion about whether they could be both. e.g. if they start with a digit, they would be a string type under the hood; otherwise a word. It gets tricky, even if the details are hidden from Red users.

Once I have free time (Hah! I make joke!) and @BeardPower tutors me on datatype creation, I'll push forward with my ref! type proposal, which can be a string type.

endo64
10:56@qtxie When I type do-events alone, on GUI console it stuck in an infinite loop.
And *** Script Error: path none is not valid for none! type on non-GUI console.
qtxie
11:37@endo64 Yes. do-events will start an infinite loop.
endo64
17:12Can anyone test GUI console on Win 8.1? I have several issues on Win 8.1 which doesn't exists on Win10.
ne1uno
17:56@endo64 could it be related to DirextX version? what does dxdiag show?
hiiamboris
18:40@endo64 what needs testing?
endo64
19:49@ne1uno I'll check dxdiag, it could be it, or may be gfx card / nvidia driver problem.
19:52@hiiamboris There is no cursor at all, so you don't see what you are typing. While type the whole window refreshes and weirdly other windows and even task bar refreshes. Scroll with mouse wheel doesn't work at all. Menus cannot opened.
ne1uno
19:52dxdiag just shows 11 in win7 so may need some registry key or look at some dll properties to get the exact version. would be useful to know what update version sp1 sp2 etc
endo64
19:59Tomorrow I'll check versions of all OS related components. And if I can, I'll update and retest. @ne1uno @hiiamboris do you use Win8.1?
hiiamboris
20:05@endo64 I have w8.1, may run some tests
endo64
20:06Great, do you see any of the above issues on your PC?
hiiamboris
20:09> There is no cursor at all
> Menus cannot opened.

yes, I believe since april it's still not fixed

> whole window refreshes and weirdly other windows and even task bar refreshes
> Scroll with mouse wheel doesn't work at all

I can't confirm this (29 may autobuild), it's working for me
20:12interesting, I can open the menu until I execute smth on the console
20:13
>> 1
== 1

menus still working
>> probe 123
123
== 123

not anymore
endo64
20:31Thanks for testing. I'll investigate further and open tickets for them. Just wanted to be sure it is not happening to me only.
hiiamboris
20:36I remember there were complaints about the caret issue so there may be some tickets open already

hiiamboris
18:36Community vote @/all, regarding https://github.com/red/red/issues/3369#issuecomment-388128962
a is a string! "5678", c is the same string! buffer at the index 7 (that is set 2 chars behind the series tail). In change/part c 99 -1 expression the starting index (-1 relative to c) is still behind the tail by 1 char. Should Red first get back to the tail, then offset by -1 (resulting index being 4), or first offset by -1 then check that it's behind the tail and move to the tail (resulting index being 5)? Should the output be "567899" or "56799". Which way is more consistent and expected?
9214
18:4256799
endo64
21:42@hiiamboris I think resulting index should be 4, Red should first get back to the tail, then offset by -1 .
And this definitely look like a bug to me:
s: "123" c: skip s 10
remove/part s 2
change c "98"
s
; == "32398"

BeardPower
11:59@endo64 It's definitely a bug. The result should be
"398"
. Somehow it's skipping back.
11:59@greggirwin What do you think?
hiiamboris
12:27indeed, it's a bug mentioned in the link 3 posts above :)
BeardPower
12:30@hiiamboris :+1:
hiiamboris
12:33@BeardPower what's your vote? :)
BeardPower
12:34@hiiamboris My vote? It's a bug.
12:35If the index is more than the amount of elements, it should stay at the tail.
12:35Like in Rebol.
hiiamboris
12:36@BeardPower regarding :point_up: [May 31, 2018 9:36 PM](https://gitter.im/red/bugs?at=5b1040cb361a950a662f019b)
56799 or 567899?
BeardPower
12:39
567899
as the index was greater than the elements of the string.
hiiamboris
12:40:+1:
12:40hopefully we'll have more than 3 votes tho :)
BeardPower
12:42But it is the question what is more intuitive, as an index > size of string would be a out of bounds, so it would also make sense to set it to the tail if there is an oob.
12:45If we treat it like an oob, it would be
56799
, if we treat it like a "memory" index with no oob, it would be
567899
.
12:47So the former would be more intuitive, the latter more strict.
toomasv
12:47"56799"
BeardPower
12:48C coder would be fine with the latter, as they are used to shoot themselves in the foot, but users of other languages with save-guards prefer the former.
12:49Is the string zero-terminated? Auto-managed? Is it's buffer bigger than the stored elements?
toomasv
12:50@BeardPower I understand that question is not about "is" but about "should".
BeardPower
12:51Sure, but C programmers have a different opinion on should ;-)
toomasv
12:52Thats fine, but question was "Should Red..."
hiiamboris
12:54I believe the 56799 answer comes from the idea that *series after the tail should be treated as if it's at the tail*, which I totally understand (or are there more arguments to support it?).
But the problem is deeper, as this also breaks some logic invariants...
Like, I can use a different logic (that supports 567899 answer):
- I can rewrite change/part c 99 -1 as change/part (at c -1) 99 1 and expect the same result
- or since #"8" = pick c -3 I might expect change/part c 99 -3 start it's changes from #"8" char
toomasv
12:57@hiiamboris How is it that "since #"8" = pick c -3"? Why not #"6" = pick c -3?
hiiamboris
12:59@toomasv it's because 7 = index? c, so (pick c -3) = first at (head c) (7 - 3)
13:00unless we root out the evil of (index? c) > length? head c there's always some source of ambiguity, but rooting it out isn't an option if you ask me
toomasv
13:02Well, if you ask about "intuitivity" then going two steps further the wall isn't very intuitive.
hiiamboris
13:07Yeah I understand, and thank you all for your votes :) Personally I favor the 567899 over 56799 but just a little bit.
I'll mention this discussion in the ticket, hopefully it'll help the team to take a decision.
toomasv
13:13You wuold like to see 011 instead?
a: "5678"
c: at a 7
append a "91011"
c
== "91011"
hiiamboris
13:18@toomasv in your case 5 = index? c, to get it past the tail you need to remove something first from a
13:19
>> a: "345678" c: tail a remove/part a 2
== "5678"
>> index? c
== 7
>> append a "91011"
== "567891011"
>> c
== "011"
toomasv
13:25But this is a silent death of console:
a: "5678"
c: at a 7
change/part a "" 4
insert c "91011"
hiiamboris
13:26@toomasv yeah, insert is bugged, and mentioned in the ticket
13:27they've been working on remove lately, but change/part is the hardest thing
toomasv
13:46There seems to be some bug in treatment of blocks also:
>> a: [1 2 3 4]
== [1 2 3 4]
>> c: at a 7
== []
>> change/part a [] 4 
== []
>> head a
== []
>> head c
== []
>> index? c
== 5
>> insert c [5 6]
== []
>> a
== [5 6]
>> c
== []
>> insert c [7 8 9]
== [5 6] ; unexpected?! Why does it insert in `head c`?
>> c
== [6] 
>> head c
== [7 8 9 5 6]
>> a
== [7 8 9 5 6]
>> index? a
== 1
>> index? c
== 5
>> c
== [6]
hiiamboris
13:49I believe these functions are common for all series, both block- and string-based.
13:49But it's curious that strings throw an exception while blocks work in a weird way.
13:51@toomasv can you add this info to the ticket? ;)
endo64
14:04@toomasv Its like index? c should fix offset of c and return 0 after change/part, but in that case all series functions should set & check a dirty? flag, which might not good performance wise.
hiiamboris
14:11let's imagine if that was the case:
>> a
== "5678"
>> index? c
== 5
>> remove a  index? c
== 4
>> insert a 123  index? c
== 4
>> append a a   clear skip a 3   index? c
== 4
>> x: copy a   append clear a x   index? c
== 1
14:19
g: func [s] [loop 4 [append s take head s]]
f: does [
   s: tail "1234"
   g s
   s
]
>> f
== "1234"
???
14:21the amount of unexpectedness would depend on how eagerly the index is "fixed" ;)
14:26or if index? doesn't change c but only returns max :
>> a
== "5678"
>> index? c
== 5
>> insert a 4  index? c
== 6
>> insert a 23  index? c
== 7
>> insert a 1  index? c
== 7
greggirwin
20:35I have this on my list to dig into and weigh in. Good questions, but I haven't had a block of time, when I was awake enough to do it.

toomasv
19:58I'm carrying this over from help room. The problem boils down to this:
>> parse [x] [collect some [collect keep ['x]]]
== [[x] []]
>> parse [x] [collect some [collect keep ['x ()]]]
== [[x]]

Also, whenever literal-rule matches last literal in collect (with no paren following it) an empty collection box is created, like this:
>> parse [x] [collect some [collect keep ['x | word!]]]
== [[x] []]
>> parse [x] [collect some [collect keep ['y | word!]]]
== [[x]]
>> parse [y] [collect some [collect keep ['x | word!]]]
== [[y]]
>> parse [y] [collect some [collect keep ['y | word!]]]
== [[y] []]
>> parse [y] [collect some [collect keep ['y () | word!]]]
== [[y]]
>> parse ["a"] [collect some [collect keep ["a" | word!]]]
== [["a"] []]
>> parse ["a"] [collect some [collect keep ["b" | string!]]]
== [["a"]]
>> parse [#"a"] [collect some [collect keep [#"a" | char!]]]
== [[#"a"] []]
>> parse [#"a"] [collect some [collect keep [#"b" | char!]]]
== [[#"a"]]
>> parse [#"a"] [collect some [collect keep [#"a" () | char!]]]
== [[#"a"]]
>> parse [1] [collect some [collect keep [quote 1 | integer!]]]
== [[1] []]
>> parse [1] [collect some [collect keep [quote 1 () | integer!]]]
== [[1]]
>> parse [1] [collect some [collect keep [quote 2 | integer!]]]
== [[1]]
endo64
21:12@toomasv It's even simpler to see the problem here, without collect

>> parse [1] [some [(print '.) integer!]]
.
>> parse [x] [some [(print '.) 'x]]
.
.

Why there is 2 pass in the second example? Might be better @dockimbel to examine this.
greggirwin
23:24
>> parse [1] [some [(print '.) quote 1]]
.
.
== true
23:25Just for clarity.

PeterWAWood
00:24@dockimbel I am tidying up some of the tests and came across this one:
--assert a = to email! #"a"
00:27It fails as written because a is word not the email a. I can make the test pass by changing it to:
--assert equal? head remove/part next a@b 2 to email! "a"
00:29However, it could be considered a bug in that it shouldn't be possible to create an email that has no literal form. Are you happy with the current behaviour or should we treat it as a bug?
00:57@dockimbel Currently it is possible to create a zero-length email!.
>> em: to email! #{}
== 
>> type? em
== email!
>> length? em
== 0

Bug?
01:05to email! [] also creates a zero-length email!.
9214
01:25@greggirwin :point_up: I think we need a 'caveats and pitfalls of unfinished to design' wiki.
bitbegin
01:34Is this a bug of split?
01:34
>> split "abc   def              asd" " "
== ["abc" "" "" "def" "" "" "" "" "" "" "" "" "" "" "" "" "" "asd"]
>>
endo64
06:17@PeterWAWood A few days ago same topic discussed: >> type? @ ;== email!
06:20@bitbegin I think no, what output do you expect? Looks correct to me, same as:
>> split "1,2,3,,,6" ","
== ["1" "2" "3" "" "" "6"]
06:24@toomasv @greggirwin I think the difference is matching by datatype and value:

>> parse [a@a.com] [some [(print '.) email!]]
.
== true

>> parse [a@a.com] [some [(print '.) a@a.com]]
.
.
== true

toomasv
06:37@bitbegin You may want this:
split trim/lines "abc   def              asd" " "
== ["abc" "def" "asd"]


> /lines => Removes all line breaks and extra spaces.
bitbegin
06:48@toomasv thanks
07:07@endo64 Maybe should add a refinement for split, like this split/all
toomasv
08:16@endo64 Yes, seems so. @bitbegin You are welcome!
9214
10:49
text
>> parse [FOO]['foo]
== false
>> parse [FOO]['FOO]
== true
>> parse/case [FOO]['FOO]
== true
>> parse/case [FOO]['foo]
== false

https://github.com/red/red/issues/3029 @qtxie @dockimbel @greggirwin :point_up: ?
gltewalt
21:05I’ve read somewhere that an email value should not start with @ and should be a minimum of two characters. Red doesn’t adhere to these restrictions, currently.
BeardPower
21:41You would need to read the RFC on that one.
21:41https://tools.ietf.org/html/rfc2822#section-3.4.1
21:43An addr-spec is a specific Internet identifier that contains a
locally interpreted string followed by the at-sign character ("@",
ASCII value 64) followed by an Internet domain. The locally
interpreted string is either a quoted-string or a dot-atom. If the
string can be represented as a dot-atom (that is, it contains no
characters other than atext characters or "." surrounded by atext
characters), then the dot-atom form SHOULD be used and the
quoted-string form SHOULD NOT be used. Comments and folding white
space SHOULD NOT be used around the "@" in the addr-spec.
greggirwin
21:48@PeterWAWood, there are a number of ways to create values that don't match their lexical (literal) form. In this case, it could be ambiguous, because where would the sigil go? I also still want a ref! type, which would be of the form @your-name-here.

For testing, I don't know if we can safely *always* use a literal form, but it will be convenient when we can. The question then is if we should normalize all of them to use more complex tests.
21:49I think email lexing is currently simple, because more wasn't needed. I'm all for making it more strict.
21:51@bitbegin, we'll have a much better split in the future, based on the Rebol version I hope. I have a bit of work done on that, but needs design review.
BeardPower
21:52Are we also gonna provide hashtags?
greggirwin
21:53@endo64 @toomasv @9214 it all seems related. Let's get all the info we can, to help @dockimbel nail it as easily as possible when he's back and has time for some tickets.
21:53Issues are hashtags @BeardPower .
BeardPower
21:55You mentioned
ref!
for
@your-name-here
, so what do you think of
#your-topic-here
?
greggirwin
22:05That's what issue! is. We have it already.
BeardPower
22:08I thought it's main usage is ISBN kind of values.

toomasv
03:11I think empty and partial emails can be handy in composition, e.g.
email: to-email ""
foreach part [tom @ global - red . com][append email part]
== tom@global-red.com

or
email: @red-global.com 
foreach guru [rebolek 9214 greggirwin][append [] head insert copy email guru]
== [rebolek@red-global.com 9214@red-global.com greggirwin@red-global.com]

Oldes
20:44Currently here is this functionality:
>> f: func['val][type? get/any :val]
== func ['val][type? get/any :val]
>> f xxx
== unset!
>> b: [a] f b/xxx
== none!

Should not be the last result also unset! instead of none!?
9214
20:47@Oldes only words can be unset, not paths.
Oldes
20:48Hm.. probably makes sense. But how to find out, that path is not existing?
20:50Or is this help result correct?
>> help b/xxx
B/XXX is a none! value: none
9214
20:51@Oldes seems legit to me, since path! accessor implements select logic:
>> select [what] 'ever
== none
Oldes
9214
20:52As for the non-existing element - I don't think there's an easy answer for that, but it's over midnight here :wink:
greggirwin
21:57
>> b: reduce ['a 'xxx ()] f b/xxx
== unset!


To find out if a key exists, use find.

endo64
06:29
>> find first [a/b/c] 'c
== c
>> find first [a/b/c] 'x
== none

greggirwin
16:50Good clarification. Thanks @endo64!

ne1uno
07:40new alert missing unview and return value? button "ok" ['ok unview]
endo64
09:48@ne1uno Correct, probably overlooked. We can fix & improve it very easily. Thanks for noting.
09:54Can someone test & confirm that after unviewing a window read-clipboard doesn't work anymore, I tested on Win8.1 x64, non-GUI console.
hiiamboris
11:34@endo64 W8.1x64
![](https://i.gyazo.com/45b8db08b9f0f95675237826aee42fa3.png)
11:36it works for me after unview... although view after print = crash :)
11:36no idea how you can use Red console under W8...
gltewalt
12:16No idea how anyone can put up with W8
endo64
15:24I use non-GUI console on Win8.1, no crash after print. But read-cliboard doesn't work after unview.
view [button "ok"] immediately crash my GUI console, but it I think my Win8 has problems with gfx card driver.
15:24Thanks for testing @hiiamboris
hiiamboris
15:32@endo64 interesting.. I tried the cli console and it didn't crash but after unview read-clipboard always returns none even though it's not empty
also, write-clipboard returns false and does nothing
endo64
15:39@hiiamboris Same for me. So we can raise an issue for this. Thanks!
dander
17:11I can't reproduce any of those view/unview clipboard issues on Win10
greggirwin
17:53Same as @dander here, no issue on Win10. Fine on Win7 as well.
endo64
23:18Interesting, I just tested on Win10 x64, and same problem occurred here as well:
>> read-clipboard
== "test"
>> view [button "ok" [unview]]
>> read-clipboard
== none
>> about
Red 0.6.3 for Windows built 11-Jun-2018/13:34:14+03:00 commit #de47b6c
23:21On GUI console it works, on non-GUI console read-clipboard returns none on Win10.
greggirwin
23:22My build is a few days old rebuilding now to test.
23:28I can dupe the none clipboard issue on Win10 here as well.
ne1uno
23:38some apps intentionally clear clipboard on exit. win7 old & new console not none, cli errors with view

toomasv
05:30OK on W10
>> read-clipboard
== "test"
>> view [button "ok" [unview]]
>> read-clipboard
== "test"
>> about
Red 0.6.3 for Windows built 12-Jun-2018/5:18:35+03:00 commit #c55a199
endo64
06:43@toomasv Thanks for testing, hope @qtxie can reproduce it so he can fix. I've submitted an issuehttps://github.com/red/red/issues/3421
qtxie
12:09Yes. I can reproduce it.

Oldes
14:11Not exactly bug... but I noticed, that Red (as Rebol2) returns none if index used for pick is 0:
>> pick b: at [1 2 3 4 5] 3 0
== none
>> b/-1
== 2

While this behaviour was changed in Rebol3 ([considered to be a bug](http://www.rebol.net/cgi-bin/r3blog.r?view=0173)):
>> pick b: at [1 2 3 4 5] 3 0
== 2
>> b/-1
== 1

@dockimbel Is it OK?
9214
14:11@Oldes yes, it's by design.
Oldes
14:12Any racional reason?
9214
14:14@Oldes R2 compatibility?
Oldes
14:15That is quite a strong reason.. right. But on the other side, BrianH was quite sure (in comments) that it should be changed.
14:16But BrianH is gone from Redbol world.
9214
14:23Personally, I see the point behind the R3 change, but R2 behavior makes more sense to me, intuitively. Maybe other old-timers have something to share on this matter?
gltewalt
15:05R2 behavior makes sense.
You’re at the third element of b, and there’s no zero, so return none. Move back one and you’re at the second element of b, which is 2
meijeru
15:08Imagine a series at its tail. The index would be 1 + length? <series>. Then the last element would have to have index one lower, rather than the same as the tail, yes? Thus the _relative_ index of the last element would be -1. This is also how it works with at and pick in Red and R2.
Oldes
16:35@meijeru good point... this in R3 really does not look correct to me:
>> b: "123"
== "123"

>> pick tail b -1
== #"2"
greggirwin
17:21IIRC there is a *lot* of other chat around this and skip. Another subtle topic, for which there are pros and cons each way, and worthy of some good docs.

dockimbel
09:35Index zero for series is considered invalid, we should return an error actually instead of none.
greggirwin
20:16I think we had that noted somewhere. Zero based pick funcs have also been discussed in the past. e.g. zpick/zpoke
gltewalt
20:41to email! appears to do nothing with 29-May-2018 build
hiiamboris
21:09works here
>> to email! ["ab" "@c"]
== ab@c
>> to email! "ab@c"
== ab@c
gltewalt
21:11
>> to url! [one two three]
== one://two/three
>> to file! [one two three]
== %onetwothree
>> to email! [one two three]
== onetwothree
21:12should it not behave like to url!?
21:12Or at least return a "@"
21:13By behave like url, I mean supply the @ for you when it converts the value
21:18Weird.
>> type? x: to-email 2 * 2
== email!
>> ?? x
x: 4
hiiamboris
21:18I guess it just forms it
21:19Adding a "@" makes sense for a block of 2 items
21:23But then it should do so for longer blocks right? For consistency? Where to add the at-sign? After the 1st item? And what of blocks of 1 item and zero?
21:37By the way, R3 doesn't add the @, so maybe it's a compatibility decision
gltewalt
21:38Are you sure R3 doesn't? It's in the docs. probe to-email [user some long domain name out there dom]
greggirwin
21:40It may just not be implemented yet. Right now, email just inherits to from string. R2 might be a better reference than R3 here.
>> to email! [a]
** Script Error: Invalid argument: a
** Near: to email! [a]
>> to email! [a b]
== a@b
>> to email! [a b c]
== a@b.c
>> to email! [a b c d]
== a@b.c.d
>> to email! [a b c d e]
== a@b.c.d.e

Find the behavior we'd change there and submit a ticket. Low priority, but worth remembering.
gltewalt
21:43I notice that to refuses point! even though point! is listed by ? datatype!. I assume it is TBD
21:44The R2 example for to email! makes sense to me
greggirwin
21:44Point! is TBD, yes.

hiiamboris
12:20hmm what am I missing?
>> parse %234 ["23" thru [end]]
== true
>> parse/part %234 ["23" thru ["4" end]] 3
== true
>> parse/part %234 ["23" thru [end]] 100
== true
>> parse/part %234 ["23" thru [end]] 3
== false
toomasv
12:31@hiiamboris Yes, interesting:
>> parse/part %234 ["23" thru [end]] 1
== true
>> parse/part %234 ["23" thru [end]] 2
== true
>> parse/part %234 ["23" thru [end]] 3
== false
>> parse/part %234 ["23" thru [end]] 4
== true
>> parse/part %234 ["23" thru end] 3
== true
>> parse/part %234 ["23" to [end]] 2
== true
>> parse/part %234 ["23" to [end]] 3
== false
>> parse/part %234 ["23" to [end]] 4
== true
>> parse/part %234 ["23" to end] 3
== true
greggirwin
19:54Something to put in a ticket and note in the wiki. Could easily be a bug.
hiiamboris
19:55@greggirwin okay, I'm choosing ticket ;)
greggirwin

nedzadarek
15:54try [ return 42] just closes the console (no error message). With /all it works as expected (Red error: cannot use return outside function). Is this a bug?
hiiamboris
17:11@nedzadarek yep https://github.com/red/red/issues/3268

gltewalt
03:42It looks like something has changed in print recently?
>> print type? "hi"
string
>> probe type? "hi"
string!
== string!
03:43I thought they both printed the datatype with the !?
9214
03:43@gltewalt it always was that way.
gltewalt
03:43Really? wow.. that's scary
9214
03:43Compare R2 behavior for sanity check.
03:43And Red's stable build.
gltewalt
03:44The uneasy sanity is my memory since april
03:44But yes, I should have checked R2 first
Oldes
10:22@gltewalt the difference is that print is using form and probe is using mold:
>> form type? "hi"
== "string"
>> mold type? "hi"
== "string!"

dander
07:21In the gui console, I'm getting a crash with the to-UTC-date function. For example: to-UTC-date now. But in the cli, it works fine. Latest build (commit 67531575), Win 10
9214
07:25@dander https://github.com/red/red/issues/3411
dander
07:26thanks, should have looked there

BeardPower
15:08The following code is not compiled, as the value: line is recognized as a return value of None:

Red/System [
]

money: context [	

    ; the exponent is too small, so it's attempted to scale it up by increasing the exponent of the DEC64 value
	pack-increase: func [
		coefficient [float!]
		exponent	[integer!]
        return:     [integer!]

		/local
			values [struct! [coefficient [float!] exponent [integer!]]]
	]
	[
	    values: as struct! [coefficient [float!] exponent [integer!]]
		
        ;values/coefficient: 1.0
        
        0
	]
]


Compiling to native code...
*** Compilation Error: wrong return type in function: money/pack-increase
*** expected: [integer!], found: [none]
*** in file: %/E/Development/red_old/test.reds
*** in function: money/pack-increase
*** at line: 16
*** near: [
    values: as struct! [coefficient [float!] exponent [integer!]]
    0
]
15:11The following code compiles, but shouldn't it complain about using an uninitialized value?

Red/System [
]

money: context [	

    ; the exponent is too small, so it's attempted to scale it up by increasing the exponent of the DEC64 value
	pack-increase: func [
		coefficient [float!]
		exponent	[integer!]
        return:     [integer!]

		/local
			values [struct! [coefficient [float!] exponent [integer!]]]
	]
	[
	    ;values: as struct! [coefficient [float!] exponent [integer!]]
		
        values/coefficient: 1.0
        
        0
	]
]
15:27Thanks to @9214, the struct must still be declared:

values: declare struct! [coefficient [float!] exponent [integer!]]
Oldes
15:59Is there any advantage that power with 2 integers sometimes returns integer and sometimes float?
9214
15:59@Oldes IIRC it was discussed at some point... @hiiamboris ?
16:00Ah, it returns a float if your number doesn't fit in 32-bit size.
16:00i.e. implicit conversion.
Oldes
16:00But is it any advantage that it is not always float, like in Rebol?
BeardPower
16:00It's because there is no int64 yet.
9214
16:01@Oldes personally I prefer Red's approach.
16:012 ** 5 => 32.0 always gives me a knee-jerk reaction.
BeardPower
16:01power for two int returning float does not make any sense to me.
Oldes
16:02but it is anyway (in some cases) :)
BeardPower
16:02Yes, because Red has no int64 type yet ;-)
16:02So it needs to use float! instead.
9214
16:02@Oldes well, what else can it do? Throw an error?
BeardPower
16:03Maybe we should cache the values ;-)
Oldes
16:03I don't know.. I'm not a mathematician, so I'm asking.
hiiamboris
16:03@Oldes advantage is - you don't have to convert it back to integer working against the Red
9214
16:04Sometimes I prefer to write large integers in base ** exponent form.
16:05A lot easier to read IMO (10 ** 7 - '1 and that many zeroes')
Oldes
16:05Ok.. that makes sense.
9214
16:05But I'm too spoiled by J so don't listen to me :P
16:05And I'm also a pedant!1!1!

hiiamboris
09:53can someone test this too?
view [base 100x100 99.99.0 focus on-key [unview]]

creates a window which is **active** and when you close it by alt-f4 it unviews itself

view [base 100x100 99.99.0.0 focus on-key [unview]]

(added alpha channel)
creates a window with **inactive** title bar and some other invisible window that accepts the keyboard input, and when you press alt-f4 the invisible window is closed and the main window becomes active
endo64
09:58Second one creates an active window for me and alt-f4 closes the window. I just can't see the windows content it gives *** View Error: CreateWindowEx failed! on my PC, but that is only me I guess.
ne1uno
10:03win7 no second window, title is active in both, it looks like the blank window flashes for a second then morphs into a regular window ok here
10:04first one any key unviews, 2nd one isn't accepting key input?
hiiamboris
10:07on the 2nd one the invisible one accepts and processes the input, and when I press alt-f4 it closes and:
- input is not accepted anymore
- the parent window that is now active does not contain the base square
- another alt-f4 hit closes this window
ne1uno
10:10only takes one F4. the second window steals focus but exits with the first
hiiamboris
10:12just tried the stable release, same thing
10:15tried W8 (that was W7 previously), same as your result @endo64 : CreateWindowEx in the CLI console, and an immediate crash in the GUI console, but no 2nd window
greggirwin
18:42The second one works fine here on Win10. Base can't get focus, but it's worth a ticket in any case, so we know what's going on.
hiiamboris
18:55okay
19:32@greggirwin btw, do you mean that base isn't supposed to be used for catching key input at all, or it just bugs on W10?
greggirwin
19:34I think it can't get focus, so shouldn't be used to get keys. It will *need to*, of course, when we roll non-native GUI bits.
hiiamboris
19:37and what is the proper way to eavesdrop on the keys then? when using only draw for instance
hopefully not insert-event-func?
endo64
19:37When I test base can get focus when you set focus on it. It can't if you click on it.
greggirwin
19:41insert-event-func isn't so bad, especially as things get more complex. In any case, I have notes for wanting to do a key-binding/key-map dialect. Maybe we can bounty that soon.
dsunanda
23:09Hello.....Small bug? LAST does not work with TUPLE!:
>> last 1.2.3.4
*** Script Error: last does not allow tuple! for its s argument

FIRST does work. Both FIRST and LAST work in R2 and R3.
greggirwin
23:53How about this change? from:
last: func [
	"Returns the last value in a series"
	s [series! tuple!]
][
	pick back tail s 1
]

to
last: func [
	"Returns the last value in a series or tuple"
	s [series! tuple!]
][
	pick s length? s
]
9214
23:53@greggirwin
>> pick spec-of :first 3
== [series! tuple! pair! time!]
greggirwin
23:54Back and tail don't work for tuples either. Likely it just wasn't needed before now.
23:55@9214, yes? First works fine because it only uses pick.
23:55It's also possible that length? didn't work for tuples in the past.
9214
23:56@greggirwin I meant that you also need to add pair! and time! into the mix.
23:56That way last will be consistent with first.
greggirwin
23:57I don't see the need for that. They are fixed length values.
23:57We could use case in last for that, but I don't see the win.
23:58Except for a generic wrapper of some kind that dispatches to last.
23:58Rebol doesn't support those either, so no compatibility argument.

greggirwin
00:14I created a PR for this. Thanks @dsunanda !
03:03I thought we had a ticket for the GUI console issue, where it dies in the latest build. Can't find it though. Pulling the latest source and the automated build both fail for me on Win10.
ne1uno
05:38about/debug new gui crasher? 16-Jun-2018/11:14:01 commit: #d298a5fc28e5472983098e
rebolek
06:0923, my favourite number
https://github.com/red/REP/issues/23
dander
07:28@ne1uno already reported #3329
Oldes
14:16Can anybody reproduce this?
>> 10%
== 10%
>> 1%
== 1%
>> 1.#NAN
== 1.#NaN
>> 1%
== 1.#NaN
>> 1%
== 1.#NaN
>> 1.#inf
== 1.#INF
>> 1%
== 1.#INF
9214
14:17@Oldes confirmed
>> 10%
== 10%
>> 1%
== 1%
>> 1.#NAN
== 1.#NaN
>> 1%
== 1.#NaN
>> 1%
== 1.#NaN
>> about
Red 0.6.3 for Windows built 18-Jun-2018/18:11:17+05:00 commit #6753157
Oldes
14:20Thanks.. https://github.com/red/red/issues/3435
toomasv
16:50Is this a bug or am I doing something wrong?
Without actors this works (drawing rectangles on image and moving these). With actors it doesn't.
Red []
context [
	start: end: 0x0 
	inside?: false 
	diff-s: diff-e: none
	view/tight [
		i: image 0.0.0.245 64x64 all-over draw []
		on-down [
			either within? event/offset start end - start [
				inside?: yes 
				diff-s: event/offset - start 
				diff-e: end - event/offset
			][
				inside?: no 
				face/draw: compose [box (start: end: event/offset) (end)]]
		] 
		on-over [
			if event/down? [
				either inside? [
					change back back tail face/draw reduce [
						start: event/offset - diff-s end: event/offset + diff-e
					]
				]
				[
					change back tail face/draw end: event/offset
				]
			]
		]
		with [
			menu: ["Cut" cut "Copy" copy "Color" color]
		]
	]
]

Now, if I include harmless actor:
with [
			menu: ["Cut" cut "Copy" copy "Color" color]
			actors: object [
				on-menu: func [face event][
					switch event/picked [
						cut [
							probe "cut"
						]
					]
				]
			]
		]

... it doesn't work anymore. :(
9214
16:51@toomasv shouldn't actors facet be a block?
toomasv
16:51actors should be object!
9214
16:52Yes, just double-checked the docs, my bad.
hiiamboris
16:58@toomasv you're overriding previously defined actors (on-down, on-over) with the actors: line
17:00try actors: make self/actors [ ... ]
toomasv
17:01@hiiamboris Got it! Thanks!
9214
17:02@hiiamboris it should work without self I believe.
hiiamboris
17:02probably, but I was lazy to try ;)
toomasv
17:11I just moved everything to with
Oldes
17:59Is this by design?
>> 1 / 0
*** Math Error: attempt to divide by zero
*** Where: /
*** Stack:  

>> 1.0  / 0
== 1.#INF
18:02(I think so)
hiiamboris
18:08it is
Oldes
20:39Although in Lua it is:
> 1 / 0
inf
hiiamboris
20:50too bad for lua I think, as doing int op int one expects to stay inside the integer space
20:50the less special cases there are the better (easier to reason)
Oldes
21:43And what about this... not a big issue, but....
>> to-binary -1.#NaN
== #{7FF8000000000000}  ;<--- would be better to have it #{FFF8000000000000}
>> to-binary 1.#NaN
== #{7FF8000000000000}


I'm aware that even the negative NaN is always molded as positive (which is fine), but still it does not look good when you convert it to binary representation like in the example above.
22:11Also I believe, this should not throw an error:
>> tangent/radians (pi / 2)
*** Math Error: math or number overflow
*** Where: tangent

It should be 1.#INF
hiiamboris
22:32@Oldes I think FFF8000000000000 is a signaling NaN
22:40no, it's not
22:44but what if it's not *molded as positive*, but Red substitutes any NaN *literal* with the same (binary) NaN value?
22:47I totally agree with your tangent/radians point, you should file a ticket for that, and for tangent 90
22:59
>> to-binary probe to-float #{FFFF800000000000}
1.#NaN
== #{FFFF800000000000}

PeterWAWood
02:05This seems a correct value for NaN according to IEEE-754.
meijeru
09:01Is the following reasonable?
>> positive? 1.#NaN
== false
>> negative? 1.#NaN
== true
>> zero? 1.#NaN
== true

hiiamboris
13:36total nonsense...
meijeru
14:31Should all three error out? What does IEEE 754 say?
greggirwin
19:58https://en.wikipedia.org/wiki/NaN#Comparison_with_NaN

Looks like < > comparisons need an extra check. Fortunately, there is a NaN? native that should make it easy. All comparisons should return false, except inequality, which should always return true. If we agree on that, lets ticket it.
hiiamboris
19:59I bet there's a ticket about < > operators already, so maybe it should be added there
greggirwin
20:12https://github.com/red/red/issues/847

meijeru
16:43I just reported a curious issue with bitsets that refuse to be set at every 128th index. #3443
hiiamboris
19:42speaking of tangents, atan has an erroneous docstring:
USAGE:
     ATAN angle

DESCRIPTION: 
     Returns the trigonometric arctangent. 
     ATAN is a function! value.

ARGUMENTS:
     angle        [float!] "Angle in radians."


angle should be number and has nothing to do with radians
almost the same for arctangent:

USAGE:
     ARCTANGENT angle

DESCRIPTION: 
     Returns the trigonometric arctangent (in degrees by default). 
     ARCTANGENT is a native! value.

ARGUMENTS:
     angle        [number!] 

REFINEMENTS:
     /radians     => Angle is specified in radians.

RETURNS:
     [float!]
22:13oh wow that's something you'll all love!
Red []
probe -10%
probe type? -10%
probe -10% * 0.1

compiled with -c or -c -e or -r -e:
#-10%-
issue!
*** Script Error: * does not allow issue! for its value1 argument
*** Where: *
*** Stack:

dockimbel
04:47@hiiamboris Good catch, looks like compiler's lexer bug, as it works fine from the console.
9214
05:06 @dockimbel https://github.com/red/red/blob/master/lexer.r#L413 ?
05:11Why is there a need for two separate lexers? Because of R2's Parse limitations?
Oldes
07:52@hiiamboris what is wrong with atan? It is shorthand for arctangent/radians, isn't it?
hiiamboris
08:09@Oldes docstrings
08:10I'll make a PR when I got time
08:10no sweat
08:10besides, R3 has them correct
Oldes
15:56Should not this return 1.#NaN instead of error?
>> arcsine/radians -3.0
*** Math Error: math or number overflow
*** Where: arcsine
16:00I believe these overflow errors are there from days when we had no 1.#INF and 1.#NaN values accessible.
16:02Btw... now the short names like sin are just shortcuts for sine/radians. I think that it would be more useful to provide these without all the conversion jumbo/mambo and rounding and map them just to libC versions to make them faster.
hiiamboris
16:15> Should not this return 1.#NaN instead of error?

makes sense I guess
greggirwin
17:44> I believe these overflow errors are there from days when we had no 1.#INF and 1.#NaN values accessible.

@Oldes that may be the best explanation, as the carry-over behavior from Rebol. Should add that to the ticket comments.
17:52@hiiamboris it looks like all the function! trig funcs, as opposed to natives, use float!. We should visit them all at once, and make sure they're consistent.

@Oldes, there is probably a reason they don't just use libC directly. @dockimbel or @qtxie would have to say.
hiiamboris
17:54@greggirwin I've nothing against float!
18:26https://github.com/red/red/pull/3447/files about the docstrings
18:26I don't need to open an issue for a PR do I?
Oldes
19:10@greggirwin there is no reason why these (radians based) should not use libc directly (the [libc is used anyway](https://github.com/red/red/blob/master/runtime/natives.reds#L1624)). The only difference with current behaviour is, that it does nicer formating... for example shows 0.0 in cases where it would show some not rounded value -> https://github.com/red/red/blob/master/runtime/natives.reds#L1625
hiiamboris
19:21now that's a pretty weird thing to do - limit precision on a native level!

Oldes
13:52What about this?
>> number? 1.#NaN
== true

I believe it should return false as NaN means _Not a Number_.
13:54But maybe it is too pedant.
13:59On the other side, number? could be a native and do also tests for NaN and we would not need nan? function.
rebolek
14:03What type then wiuld NaN be?
Oldes
14:11Hm.. good question. Don't know. It is undefined:/
14:12I think it should be float!.
14:12But still number? should return false when testing it.
rebolek
14:13I think we should be pragmatic here.
Oldes
14:13What do you mean? What I don't like is, that there is nan? and also number?.
rebolek
14:15You are the worst kind of right - technically right. NaN is not a number, but it would be IMO easier to leave it as it is.
Oldes
14:18And also that in most cases you would use if not nan?. Ok...there are more important topics.
rebolek
14:20Right. But it might be worth an issue for future reference.
endo64
16:11As long as it treated as float:
>> float? 1.#NaN
== true
>> integer? 1.#NaN
== false
>> NaN? 1.#NaN
== true
Oldes
18:28One more thing... In theory atan2 0 0 should return 1.#NaN instead of 0.0 . What do you think?
18:30Although the needed additional check would slow down the function, so probably not worth the change.
gltewalt
18:45Not A Usable Number, I think. Quiet NaNs.


https://en.wikipedia.org/wiki/NaN
Oldes
18:58I would not complicate it with qNaNs.. one NaN is enough... I just think that this code:
a: 0.0 while [a < 2.0 ][ 
    if number? n: asin a [print [a "=" n]] 
    a: a + 0.2
]

looks better than code where you would have to use not error? try now or not nan? if asin would return 1.#NaN instead of throwing error.

20:29From different topic... now there is:
>> f: func[a return: [integer!] c /local b][]
== func [a return: [integer!] c /local b][]
>> ? f
Func spec couldn't be parsed, may be malformed.
func [a return: [integer!] c /local b][]

Should not be there thrown error when the function is being defined?
endo64
22:13Shouldn't clear clear the complement flag?
>> b: complement make bitset! []
== make bitset! [not #{00}]
>> clear b
== make bitset! [not #{00}]
22:16This behavior is same with R3, but different with R2 (as there is no complemented flag in R2's bitsets)
gltewalt
22:35I don't know why clear accepts bitset!. Bitset is not part of series!
22:39Hmm

>> b: complement charset ["x"]
== make bitset! [not #{00000000000000000000000000000080}]
>> clear complement b
== make bitset! #{00000000000000000000000000000000}
endo64
22:40Bitset is not series but some of series functions work with bitsets like pick, poke, they are useful and simplifies using bitsets.
22:41But I don't see any use case for keeping complemented flag when clearing a bitset.
gltewalt
22:42I'm rebuilding my knowledge, but with the caveat that I probably don't know what I don't know, I agree.

endo64
08:02@dockimbel @greggirwin @9214 May I also ask your opinions for https://gitter.im/red/bugs?at=5b340bf0b9c2fb2557113b84
Oldes
08:49@endo64 do you have any use case for clearing bitset! generally?
nickkoro02
09:03Hi guys. Today I discovered that break doesn't work well in foreach-face:
ui: layout [ text "foo" ]

print "Starting"

foreach-face ui [ print face/type ]

print "Ended"


Works as expected, but if I add a break in the loop:
ui: layout [ text "foo" ]

print "Starting"

foreach-face ui [ print face/type break ]

print "Ended"

My program crashes without a message. The CLI console crashes, too,
but it works fine if I compile the program and then run it.

Can somebody reproduce this/should I create an issue on github?
meijeru
09:40On clearing bitsets [see above](https://gitter.im/red/bugs?at=5b340bf0b9c2fb2557113b84) here is my opinion: clear should also clear the complement flag. That is what the average user will expect from the notion implied by the use of the word "clear". The complement flag is just a device for not having to set a lot of bits explicitly, especially given the upper limit of Unicode, since bitsets are often used for character sets.
endo64
09:45@Oldes I don't have strong use cases for clearing bitsets instead of re-using them. But I think IF clear supports bitset! then it should also clear the complemented flag.
rebolek
09:48I agree.
endo64
10:38@nickkoro02 Not exactly sure but this might be the reason; foreach-face evaluate the body block with do, hence fails. If you remove do below you can see the difference:
>> f: func [b] [foreach x [1 2 3] do b]
== func [b][foreach x [1 2 3] do b]
>> f [print x break]
1
*** Throw Error: no loop to break
nickkoro02
18:20@endo64 Hm... interesting. But I don't think this is expected, right? So it's probably worth an issue.
Oldes
19:08@endo64 @nickkoro22 it is not a bug... the do is there redundant.. use just: f: func [b] [foreach x [1 2 3] b]
19:10With the do it is equivalent to:
>> f: func [b] [do b]
== func [b][do b]
>> f [print x break]
1
*** Throw Error: no loop to break

and:
>> do [print 1 break]
1
*** Throw Error: no loop to break
gltewalt
20:43I think a literal email! should adhere to this format:

One or more characters followed by an at symbol @, followed by zero or more characters.
20:46In Red right now all that is required is a @
21:05Or: one or more characters, @, one or more characters

gltewalt
01:16Illegal characters appear to be: % ( ) : "
For now.

hiiamboris
19:40@nickkoro02 I believe this is definitely worth an issue, since it's only logical that foreach* loops should accept a break
19:41plus it's quite unclear to me where the bug is:
>> ui: layout [ text "foo" ]
== make object! [
    type: 'window
    offset: none
    size: 100x44
    text: none
   ...
>> try/all [foreach-face ui [ print face/type break ]]
text
*** Script Error: catch does not allow native! for its block argument
*** Where: catch
*** Stack:

>> try/all [loop 1 [foreach-face ui [ print face/type break ]]]
text
(halted)
*** Script Error: try-do does not allow none! for its <anon> argument
*** Where: try-do
*** Stack:
19:41just what a mess is this?
gltewalt
20:01It crashes my GUI Console
hiiamboris
20:01yes, mine too
20:01I copied from the CLI
gltewalt
20:01:thumbsup:
20:19Does it work for you if you compile that example?
hiiamboris
20:41well, it doesn't crash if compiled, but as to *work* - unlikely:
Red [needs: 'view]
ui: layout [ text "foo" ]
probe try/all [foreach-face ui [ print face/type break/return 'x 'y ]]
probe try/all [loop 1 [foreach-face ui [ print face/type break/return 'x 'y ]]]

text
[]
text
[]
finished

I would expect it to return x not []
gltewalt
20:59I tried to use stack/dump and it barfed.
21:01
*** Script Error: path none is not valid for unset! type
*** Where: eval-path
*** Stack:
21:03It might be my mistake, though, because I haven't done much debug mode.
Red [Needs: View]

system/view/debug?: on

ui: layout [ text "foo" ]

stack/dump

try/all [foreach-face ui [ print face/type break/return 'x 'y ]]
21:07If I stick stack/dump afterthe try/all, it returns text, then blows up, so it must be unrelated

x8x
02:15Nice little game, but when reaching the exit it crashes (macOS) , should open an issue?
do https://gist.githubusercontent.com/maximvl/6787d6fb3382bf72399eab87b2857d86/raw/eb07d68dff6a718739d56817869dcf769d909dff/game.red

*** Runtime Error 1: access violation
*** at: A48EEF24h
02:37@rebolek Could you please test this on macOS, do the code 1 time, close window, do the code a second time without quitting red, window open, graphics shows up, but no animation and beach ball, have to ctrl-c
do https://gist.githubusercontent.com/toomasv/9c7f400a36fecec9e9b2faf567035ea5/raw/9621390243c683fe683a25f5f8b6c22186ecee87/ellipse1.red
rebolek
03:52@x8x I've built latest gui-console and tried running above code. It works without problems, I run it 3 times in row and worked each time.
x8x
03:56@rebolek Thanks! Can you please try running above than this one
do https://gist.githubusercontent.com/toomasv/b8883f41543c4b54142b4a62a5386797/raw/d0e8f00ab6b6cd3a1bb32f6ad789197955579744/spirograph.red

and a mix of firt one than the other, I don't get the beach ball all the time
rebolek
03:59I've run mix of both ~10 times. I got beach ball on first run for ~5-10 seconds, but I guess it was connection problem, because after that time, window appeared and everything run as expected.
x8x
04:01@rebolek Ok, thanks! you're on macOS 10.12 right?
rebolek
04:01@x8x 10.11.6
x8x
04:02OK, thank you! :smile:
rebolek
04:02I'm afraid of upgrading, but probably will in few weeks :)
greggirwin
23:49:point_up: [June 27, 2018 7:59 AM](https://gitter.im/red/bugs?at=5b339836a288503b3de3d7ba) I like number? being consistent with the other type checking funcs. In that sense, NaN is a number, as it's represented as a special float value.
23:51:point_up: [June 27, 2018 12:28 PM](https://gitter.im/red/bugs?at=5b33d760be98b142240e4928) if we have a choice of "fast and wrong" versus "slow and correct" we really don't have a choice. :^)
23:56:point_up: [June 27, 2018 2:29 PM](https://gitter.im/red/bugs?at=5b33f3917d3bca737a0f89d2) @Oldes , would you open a ticket for that. Help should handle that, so it's a bug.

greggirwin
00:16:point_up: [June 27, 2018 4:13 PM](https://gitter.im/red/bugs?at=5b340bf0b9c2fb2557113b84) On bitsets, I don't think clear should clear the not meta flag. https://www.red-lang.org/2013/11/041-introducing-parse.html points to http://www.rebol.com/r3/docs/datatypes/bitset.html, which clearly says

> Note that a complemented bitset remains complemented. The clear function does not reset the flag.
00:32The use case I see if outside the realm of charsets as we might normally use them with parse. If you use bitsets as a more general sparse map or index.
00:40Foreach-face with break is worth a ticket.
00:41@Oldes, how can we make the most efficient use of your time on the trig funcs, to make decisions on what results should be, and also document those decisions?
hiiamboris
13:08it seems for about a week @rebolek is the only provider of windows builds
rebolek
13:09@hiiamboris how is it so? Official download page is not working?
ne1uno
13:12no commits?
13:12how about a simple-gc build? I get a bunch of hard crashed on the gui console
13:13few of the demos the code repo, others seem to work
hiiamboris
13:14@rebolek seemingly because the appveyor gets out of it's allowed build time and blocks it
rebolek
13:14@hiiamboris interesting
13:15I'm not doing any testing of the builds, so I don't know if they are working.
ne1uno
13:16I think it just builds when there is a commit to master.
hiiamboris
13:17oh right there's also no commits for 5 days into master
rebolek
13:18That's a check I have to add to my build script yet :)
13:18Right now it just blindly builds every day.
ne1uno
13:21none of the bots showing commit logs tag the branch, makes it more difficult to track
rebolek
13:23Hm, maybe I could add commit logs by branch to my builds page, GitHub API should make it easy to track it (and if not, git log is super easy to parse).
13:34So there's total 38 Windows builds on my server (28. May - 3. July), but only 9 of them are unique.
13:35This really needs some optimization...
Oldes
14:40> :point_up: [June 27, 2018 12:28 PM](https://gitter.im/red/bugs?at=5b33d760be98b142240e4928) if we have a choice of "fast and wrong" versus "slow and correct" we really don't have a choice. :^)

Sorry @greggirwin , but I don't understand what do you mean. As atan2 is usually used to find angle from 0x0 to a cursor position, when the result is 0x0 for the input 0x0, it may break your animation or whatever you do with it. The proper calculation should detect such an input . If the result would be 1.#NaN, you could check output for such a case. With the modification to number? you could write:
if number? angle: atan2 y x [...]
14:48Also when there are now 2 almost same trigonometric functions, one can be used as a _slower but more precise_ and the second one as a _faster but without rounding results_
rebolek
14:49If by two almost same functions you mean atan2 and arctangent2, I would prefer them to follow the convention and one accept degrees, while second radians.
hiiamboris
15:58I totally agree with Gregg that number? 1.#NaN should be true because number? is a test for membership in a number! typeset which includes float! and 1.#NaN is definitely a float! and it would be quite misleading to have it otherwise
Although it is a fair observation that true = number? not-a-number is an unfortunate oxymoron we'll have to live with, but it's a naming issue, right?
16:03As to rounding atan to zero, I would myself like to know why it's even done like that. What's the reason? I would expect sin 1e-100 to be the same 1e-100, not zero (same for tan/atan obviously). Maybe I'm going to multiply it by 1e99 in the next step? Why should I suffer from the loss of precision? Why should I fight the language while it makes obstacles for me?
I bet @dockimbel knows... ;)
Oldes
16:53And do you have any real life example why number? 1.#nan returning trueis useful? With a cost that there is also nan?, which could be eliminated?
16:55The rounding is there to have nice results in console.
17:08The question is.. if this rounding should not be done in mold or form functions.. if it is needed.
hiiamboris
17:29> The rounding is there to have nice results in console.

I'm not so sure. Do you have any arguments why this rounding is done to prettify the output? As you say yourself the proper place for that is in mold/form.
It looks like this rounding goes all the way from Rebol, but then Rebol isn't as general-purpose as Red strives to be, and maybe Carl thought that the average user will only use these functions for geometry calculations, where forcefully aligning the line along the axis might even do you good. But that's a blind guess.
17:30> And do you have any real life example why number? 1.#nan returning trueis useful? With a cost that there is also nan?, which could be eliminated?

Easy. f: func [x [number! string!]] [either number? x [...][...]]
17:31why would I transform it to either any [number? x nan? x]? looks like a bloat to me, and not just bloat but also *yet another* special case to always keep in mind => source of bugs => source of headaches => less fun to code in
greggirwin
17:45The trig chat is why I asked about the best way to nail down and document the design. I agree that similar named funcs that take different value types (deg/rad) can be confusing.

- What are the behaviors today (maybe in a table)?
- What are the common use cases for each func?
- Where do those two things diverge?

The benefit of number? with NaN being like it is? Consistency. Ease of understanding. Typeset checking has very clear semantics today. If we go down the path of special value validity, where will that lead? The result of make email! "" is not going to be a valid email address, but it's still a value of that type. As @hiiamboris said, it's the IEEE name for it that's the problem here. If we call it "Not A *Usable* Number", does that help? :^)
rebolek
18:03If you think the rounding is too much, try to play with system/options/decimal-digits
hiiamboris
18:04@rebolek it's rounded by float! epsilon there, which doesn't even take exponent into account
18:05if result < epsilon [result = 0] just like that
rebolek
18:06@hiiamboris ok, it was just a guess
hiiamboris
18:08https://github.com/red/red/blob/master/runtime/natives.reds#L1625
in fact, tangent is unaffected, only sine and cosine
18:08
>> 1e100 * sin 1e-100
== 0.0
>> 1e100 * tan 1e-100
== 1.0
18:08which is even more weird to my eye
greggirwin
18:55https://github.com/red/red/wiki/Trig-Functions---Behavior-and-Design

bitbegin
01:11
>> probe make error! [user message ["tests"]]
make error! [
    code: 600
    type: 'user
    id: 'message
    arg1: none
    arg2: none
    arg3: none
    near: none
    where: none
    stack: none
]
*** User Error: none
*** Where: ??? 

>>
01:11the "tests" string not exist in error!
01:11Is this a bug?
greggirwin
05:12cause-error works, and just wraps make error!. Hmmm.
>> error? set 'err try [cause-error 'user 'message ["tests"]]
== true
>> probe err
make error! [
    code: 600
    type: 'user
    id: 'message
    arg1: "tests"
    arg2: none
    arg3: none
    near: none
    where: 'do
    stack: 41519516
]
*** User Error: "tests"
*** Where: do
*** Stack: probe
05:14It's late here, and not obvious to me right now if there's something I'm missing.
bitbegin
05:26this way is ok, but make error! not same with rebol
Oldes
07:13@hiiamboris you could write either string? instead of number? if you really expect NaN values there too (which is not much
07:14...not much likely)
07:16It would be also more efficient as it would do test just against one type and not a lookup. Still I don't consider it to be a real life example.

hiiamboris
17:42tell me if I'm doing smth wrong or it's a couple bugs in load-thru:
1. ? (load-thru https://picsum.photos/100/100?random) works 1st time, saves it but won't load it again, complaining (solved by do load-thru ...)
2. ? (load-thru https://picsum.photos/100/100/?random) (note the slash) won't save the image at all
greggirwin
20:371) loads from cache fine here, but if you want a new random image, you'll need to use exists-thru? and clear the file. For a random result, it doesn't make sense to use the cache. See also: https://github.com/red/red/pull/3124

2) https://github.com/red/red/issues/3117 added some fixes, but this is the issue.
>> path-thru https://picsum.photos/100/100/?random
== %/C/Users/Gregg/AppData/Roaming/Red/cache/picsum.photos/100/100/
hiiamboris
20:53@greggirwin hmm interesting... just updated to July 5 ver, still getting on (1):
>> ? (load-thru https://picsum.photos/100/100?random)
*** Script Error: word-is-value-str does not allow block! for its word argument
*** Where: word-is-value-str
*** Stack: ? help-string
greggirwin
21:34Interesting indeed. It's saving as a molded Red image it seems, which is not handled properly.
21:34That is, it works the first time, but errors the second time. It did work twice in a row for me before.
21:37Ah, it's help that's choking on the result.
21:38Due to the paren! it seems. Care to file a ticket?

hiiamboris
06:20@greggirwin sure, since you confirmed it
It saves as a molded image! but then loads - as a block!, so as I said previously I have to do it (which is probably not by design)
greggirwin
07:24We should consider the *-thru funcs as works in progress. We don't yet have /all for saving, for example. That's the issue at play here. I just checked, and R2 uses read-thru, which does read+write/binary rather than load/save directly.
07:25Along with the naming issue from the above ticket, it's worth revisiting in the future. e.g., if used by the module system, we'll want it to work well for that.
gltewalt
07:58Is this a bug, or the expected result?
>> 42x42 // 84x84
*** Script Error: cannot compare 42x42 with 0
*** Where: <
*** Stack: mod
08:00or mod 84x84 42x42, or mod <any-pair> <any-pair>
rebolek
08:01Both args can be pair!, so a bug IMO.
gltewalt
09:01I'll open an issue when I wake up.
...Too loopy from lack of sleep right now
hiiamboris
12:01@greggirwin I added the trailing slash problem to https://github.com/red/red/issues/3117
Perhaps it's worth to reopen it?
meijeru
16:36The issue #2674 covers the mod problem already.
greggirwin
18:15@hiiamboris, done. Thanks.
gltewalt
19:25Thanks @meijeru

hiiamboris
22:20@dockimbel once you have a minute I'd also like you to tell if this :point_up: [July 6, 2018 6:55 PM](https://gitter.im/red/help?at=5b3f90e13d8f71623d622f93) is a bug in react or what

toomasv
05:55@hiiamboris IMO this works as expected. In second version you are just clearing face/data. (You might want to use react later in first version)
hiiamboris
07:19> In second version you are just clearing face/data

@toomasv am I? ;) I'm passing this cleared block to reduce/into which is getting filled as you can see from probe output - it prints [3] when I enter 1 + 2 into the field
Moreover, face being deep reactor should see the change. dump-reactions tells that it's registered also.
toomasv
07:38 @hiiamboris YAR, face/text is not updated when face/data changes
view/no-wait [f: field text react later [face/text: form probe reduce/into f/data face/data: clear []]]
hiiamboris
07:44yes and it's curious since to me the change in code looks purely cosmetic...
toomasv
08:01@hiiamboris Interesting - this works with "delay"
view/no-wait [f: field text react later [probe reduce/into f/data clear face/data: []]]
hiiamboris
08:09I was inspecting :on-face-deep-change* and it looks like it changes data in response to a deep change of text but not the other way around, so the only data -> text mechanism lies in :on-change*
08:14explains the "delay" then: you change the text -> face/data: [] assigns it to itself and triggers on-change* which displays stuff by modifying face/text -> then face/data is modified yet modifications remain unreflected until the next face/data: [] event
08:16adding an explicit deep reaction: view [f: field text react [probe reduce/into f/data face/data: clear []] react [face/text: form face/data]] fixes it
luce80
15:56
>> about
Red 0.6.3 for Windows built 7-Jul-2018/21:53:14+02:00 commit #0db15f7
on Win 7
>> view [panel red [text "Hello" green]]

In this example the text is black in a <same-as-windows-background-color> instead of black on green. It worked on version of April 2017.
hiiamboris
16:04@luce80 https://github.com/red/red/issues/3448 it was supposed to be fixed
16:06on my build of July 5, this:
![](https://i.gyazo.com/fc346422cad119cf006dfebe5474d4a2.png)
16:11@luce80 I commented on that ticket, let's wait now for @greggirwin to reopen it.
ne1uno
16:13jun 23 simple-gc branch on win7 has green on red both old and new gui
16:29building latest source seems broken on windows.
luce80
16:58@ne1uno green on red should be the right thing since first given color should be the color of text while second color should be that of background.
ne1uno
17:03Windows built 23-Jun-2018/19:27:16-04:00 commit #978c011 works, must be some commit to master between 6/23 and 7/5 the recent simple-gc branch also still works
17:04build from master 7/5 fails here too
greggirwin
18:33@hiiamboris @toomasv, without digging into it, my first instinct was that you're running up against cycle detection in the reactive system. Add deductions and more hints to https://github.com/red/red/wiki/Reactivity if you would.
hiiamboris
18:59I think it's a bug. Why bother with documenting a bug? I say let's wait for Doc's word.
greggirwin
19:01> Why bother with documenting a bug?

So others (which means me in a month) have "Danger!" signs that keep them from falling into pits. :^)
19:01If you think it's a bug, ticket it, so we'll remember it after the 0.6.4 push is over.
hiiamboris
19:03Well, I'm not *completely* sure :) as is also the case with sine/cosine. There might be reasons...
toomasv
19:08My hypothesis was it is connected to number of changes in face/data. First time it is cleared, second time result of f/data is reduced into it. Only first change is reflected in face/text. May be completely wrong though.
hiiamboris
19:10:point_up: [July 8, 2018 11:09 AM](https://gitter.im/red/bugs?at=5b41c6b09b82c6701babb672)
toomasv

gltewalt
05:20Hmmm

>> prin append/dup [] '* 1
*** Script Error: * operator is missing an argument
*** Where: prin
*** Stack:

>> prin (append/dup [] '* 1)
*** Script Error: * operator is missing an argument
*** Where: prin
*** Stack:

>> prin [append/dup [] '* 1]
*
05:23
>> prin append [] '*
*** Script Error: * operator is missing an argument
*** Where: prin
*** Stack:

>> append [] '*
== [*]

>> prin '*
*
rebolek
05:25@gltewalt that's fine, print reduces its argument, so * gets executed
05:27
>> print head insert next [2 3] '*
6
gltewalt
05:27And prin '*?
rebolek
05:28'* is not a block!, so it's not reduced.
gltewalt
05:29The evaluator doesn't reduce? '*, to *
rebolek
05:30It's up to print how it interprets its arguments. It's native, so you need to look at R/S sources to be exactly sure.
gltewalt
05:37I can't remember right now... when was the wait issue planned to be fixed for GUI Console?
rebolek
05:38IIRC in 0.6.4? I will try to find it.
gltewalt
05:47Is this output wanted?

>> p: make path! 10
== 

>> insert p 'root
== 

>> append p 'refinement
== root/refinement
rebolek
05:50I guess so.
endo64
07:11@gltewalt insert inserts the value to the current position and returns the position just after the insert. This gives you to chain insert operations
>> p: make path! 10
>> head insert p 'root
== root
>> head insert insert p 'a 'b
== a/b/root
07:12Append is simply does head insert tail series
gltewalt
07:16I just thought it strange that there’s no representation of a return value for make path!. It’s just ==
greggirwin
08:00Do it with a block, and you'll see an empty block. Paths with a single item in them just look empty. :^)
Oldes
09:43What about using serialized form in such a case :
>> p: make path! 10
== #[path! []]
>> insert p 'root
== #[path! [root] 2]

endo64
15:30Or only when the path is empty, show it as == make path! [] in console, just like as hash values:
>> h: make hash! 0
== make hash! []
>> p: make path! 0
== make path! []  
>> form h  ; == ""
>> form p ; == ""

But mold would be different.
9214
15:39
text
>> tail 'foo/bar/baz
== 
>> append/dup/only [] make path! 0 5
== [    ]
Oldes
15:39Should be:
>> append/dup/only [] make path! 0 5
== [#[path! []] #[path! []] #[path! []] #[path! []] #[path! []]]
15:42@endo64 you must use serialized form... make path! [] is not enough in such a case:
>> empty? p: insert insert make path! 0 'root 'foo
== true
>> p
== #[path! [root foo] 3]
>> index? p
== 3
>> head p
== root/foo
gltewalt
18:19Good thoughts
hiiamboris
19:14is there a reason Red's so unfriendly to big files?
>> d: read/binary %"D:\filmz\560MB-test.mp4" 
== #{
00000018667479706D7034320000000069736F6D6D703432001C27D76D6F6F76
0000006C6D76686400000000D4...
>> d: read/binary %"D:\filmz\560MB-test.mp4" 
*** Internal Error: not enough memory
*** Where: read
*** Stack:  

>> d: read/binary %"D:\filmz\560MB-test.mp4" 
*** Access Error: cannot open: %D:\filmz\560MB-test.mp4
*** Where: read
*** Stack:
19:15(there's plenty of RAM actually, Red console doesn't even go over 1.1GB)
19:16anything over 700MB - goes right into "not enough memory" step
greggirwin
19:30Still Alpha remember. :^) I don't know the reason for the limit right now.
hiiamboris
19:32worth an issue? ;)
greggirwin
19:33Probably not. Something to note, though, as a current limitation.
hiiamboris
19:34:+1:
greggirwin
19:37Nothing complex in the code, so likely just an alloc failure trickling up.

9214
06:55In the same vein, Draw can't handle (very) large images:
*** Script Error: invalid argument: 56264x84424
*** Where: make
*** Stack: view do-events do-actor do-safe fit prettify draw
Oldes
08:28@9214 That seems to be ok as R3 has same result, just with better message:
>> make image! 56264x84424
** Script error: maximum limit reached: image!
** Where: make
** Near: make image! 56264x84424
9214
08:28Any rationale behind this limit?
Oldes
08:44I believe that image size is encoded in a 32bit integer in Rebol. That is first limit.
rebolek
08:45I believe that 56264x84424 is enough for everyone.
Oldes
08:45Same in Red:
red-image!: alias struct! [
	header 	[integer!]								;-- cell header
	head	[integer!]								;-- series's head index (zero-based)
	node	[node!]									;-- internal buffer or platform-specific handle
	size	[integer!]								;-- pair of size
]
08:47Second limit is, that with so many pixels you get array over 4GB so you could not address it using 32bit integers.
9214
08:49@Oldes thanks!
08:56@rebolek it wasn't for me. I can live with that though.
rebolek
09:37@9214 next time you're going to tell me that 640kB isn't enough for you either
9214
09:43Blasphemy!

hiiamboris
19:53is this a desired behavior?
>> bind quote (a + b) context [a: 1 b: 2]
*** Script Error: bind does not allow paren! for its word argument
*** Where: bind
*** Stack:
19:54I can add as block! no problem, but why bind can't do that itself?
endo64
21:14a word or block of words can be bound to a context, a paren cannot. why would you need it? do bind [a + b] context [a: 1 b: 2] would work.
hiiamboris
21:16> a paren cannot

since internally paren! is a block!, I don't see why limit bind, why can't it take any-block! (or at least paren! and hash!)

> why would you need it?

to evaluate expressions, akin to those in parse DSL, just in a special context
21:25come to think of, it makes sense to bind any-path! as well sometimes, i.e. if I'm constructing a path of words and going to reduce it after, before accessing

greggirwin
02:15@hiiamboris more good questions. Remember, though, that the goal is to be expressive and flexible...to a point. A change like this requires solid justification. I can see parens being trickier to reason about here, because they are evaluated by default. So now your binding code has to know if it might ever get a paren, and use quote as you do above. Same for paths.
02:16It's certainly worth some concrete examples for discussion.
hiiamboris
07:56@greggirwin quote is there just to make a short example. I was making a DSL that will among things contain blocks (that will denote loops) and parens (that akin to parse will denote expressions). So I don't get quote there, parens come naturally from foreach token expression [switch type?/name token [...]] Context for it is created on the fly where most of the words used will have meaning. It's just a first iteration, and I think I'll experiment a bit and instead of paren! [do bind as block! token] will just bind the whole expression, that will recursively bind all my parens. So, no trouble with that.

It's just that when I wrote this 1st iteration, I wrote do bind token assuming that bind being able to bind blocks - should be able to bind parens too. I didn't even check it, until I got an error. It's just logical, no? That's why my question arose here, if it's desired.

For bound paths I have no use yet, I just foresee that it can be used this way.

Hash! is a curious beast though. I've never used it, I don't know what it will be good for. But since it provides a block-like interface, I believe it's reasonable to have it also support block-like features. Otherwise it'll be quite inconvenient to use, yes? Currently hash does not support neither bind-ing it nor reduce-ing or do-ing. It sort of lives in a different world with no interface to Red features. I cannot know if it's by design or because it's a recent addition and is not *yet* integrated enough.
It should be considered:
1. if bind should be able to bind hash values
2. what will bind do if it encounters a hash inside a block - bind or skip?
3. if it makes sense to do/reduce a hash just like any block or is there arguments against that
greggirwin
15:02Bind only supports blocks, by design right now. As I said, it's a good question, and needs examples for discussion. Hash! is, indeed, a special case right now. I agree that a unified interface is a good thing, but we may need to live with some exceptions.
15:06In glancing at %hash.reds, I saw that the append action is not inherited, but hash! supports append. Early here. Must be missing something.
gltewalt
23:48trim/all causes spooky behavior here:

digits: charset ["0123456789"]

mastercard: [["51" | "52" | "53" | "54" | "55"] to end]

visa: ["2" to end]

accepted-cards: [mastercard | visa]

valid-length: [16 digits]

validate-entry: func [n][parse trim/all n valid-length]

view [
    f: field 200x20 on-change [either validate-entry f/text [f/color: green][f/color: white]]
]


Or I may be dumb.

This works if trim/all is removed:

digits: charset ["0123456789"]

mastercard: [["51" | "52" | "53" | "54" | "55"] to end]

visa: ["2" to end]

accepted-cards: [mastercard | visa]

valid-length: [16 digits]

validate-entry: func [n][parse n valid-length]

view [
    f: field 200x20 on-change [either validate-entry f/text [f/color: green][f/color: white]]
]
23:56When I include trim/all, the chars field are inserted backward. Then an overflow happens eventually.

endo64
00:00trim/all causes another on-change event trigger, and so on, until you get stack overflow.
gltewalt
00:00Or any trim it looks like
endo64
00:00On any change actually.
00:01This should work
f: field 200x20 on-change [txt: trim/all copy f/text either validate-entry txt [f/color: green][f/color: white]]
gltewalt
00:02Is that the easiest way?
endo64
00:03Or
f: field 200x20 on-change [either validate-entry trim/all copy f/text [f/color: green][f/color: white]]

00:05Worth to note somewhere, on-change can be triggered inside the on-change event if you change the value of the face and leads to stackoverflow. Not sure if should not be triggered inside the event.
gltewalt
00:08I like the second example
00:09Is it a bug or is on-change supposed to be triggered by on-change?
endo64
00:34I can't say that it is a bug, because on-change should be triggered when ever face's text change, if you change it inside the on-change event, it triggers another on-change.
But the problem trim triggers a change even if it didn't make any change on the text.
00:35See this example:
view [f: field on-change [print random 100 trim f/text]]
00:35When you type one character you'll see a bunch of random number and then stackoverflow error.
greggirwin
02:43Recursive triggers are not a bug, just something to be aware of. *However*, this does seem to trip over internal ownership checking, which is tied to reactivity. If that's not already a ticket, please write it up. You can cause problems by appending an empty string, or using remove as well. Until that's fixed, we should put a warning in a wiki somewhere about the current behavior.
02:43Good catch.
dander
06:08There seems to be some miscalculation for the width of the description column of help text for string! values. In the Red sources, VAL_FORM_LIMIT doesn't seem to take into account extra spaces between the columns, so the end of the description text flows down to the next line.
To see what I mean, try ? "series"
endo64
06:55@dander Looks OK on Win8.1 for both Red/CLI and Red/Gui console
dander
07:04Hmm, interesting. This is how it looks for me in cli:
[![image.png](https://files.gitter.im/red/bugs/LCuo/thumb/image.png)](https://files.gitter.im/red/bugs/LCuo/image.png)
07:05And gui with same build
[![image.png](https://files.gitter.im/red/bugs/yXsz/thumb/image.png)](https://files.gitter.im/red/bugs/yXsz/image.png)
endo64
07:07On which OS?
07:07I mean, Win10, 7 or 8?
rebolek
07:07Looks W10-like.
endo64
07:09Ah yes its already there. Anyone reproduce it on Win10?
toomasv
07:27@dander Both OK on my W10.
endo64
07:28I remember that I had this issue recently but don't remember when and how it disappeared.
dander
07:30it's been like this for me for a while. I wonder what is different. Does Red store default window size? Even if it did, I don't understand why the width calculation would work differently
07:32
>> system/console/size
== 76x22
>> help-ctx/VAL_FORM_LIMIT
== 44
07:32maybe it would be related to font size?
hiiamboris
07:32same bug, W7, July 5 build https://i.gyazo.com/3cea6ce81b029299e64ea9e77899e350.png
07:35Gui console is no better at this: https://i.gyazo.com/7272eb8916838ed71e388c7e0ade81e2.png
Trims the doc strings in such a way that they go to the next line
07:37stable build is affected too
endo64
07:47Can you try to change font settings of CMD?
07:47[![image.png](https://files.gitter.im/red/bugs/Ffsi/thumb/image.png)](https://files.gitter.im/red/bugs/Ffsi/image.png)
hiiamboris
07:49Yes, same thing. And tried reducing the console width to 80 chars - even worse.
endo64
07:51Can you also check the display settings, you might be using a scaled screen?
07:51I don't know if it anything related tough.
hiiamboris
07:51I have a 125% font size. But how on earth would that affect the CLI console? ;)
endo64
07:53I wouldn't be surprised if it is :)
hiiamboris
07:54well, changing it will require me to log out and I'd rather not...
endo64
07:55I'll test tonight at home with Win10 scaled display. ~10 hours later
ne1uno
12:08view/no-wait [text 50x15 yellow "text"]
12:08when you specify a size larger than the text, where is the white color comming from? should be all yellow?
12:09recent regression
hiiamboris
12:24@ne1uno https://github.com/red/red/issues/3448 probably
rebolek
12:54Shouldn't some error be raised instead of crash?
>>  b: [none] forall b [append b none]

*** Runtime Error 16: invalid virtual address
*** at: F7EE9BDFh
hiiamboris
12:59@rebolek July 5 build, W7:
>> b: [none] forall b [append b none]
*** Internal Error: not enough memory
*** Where: append
*** Stack:
12:59it was doing smth for a few seconds before the error
rebolek
12:59Yes, it takes time to fill all memory :)
13:00
>> system/build
== make object! [
    date: 30-May-2018/8:42:26+02:00
    git: none
    config: make object! [
        config-name: 'Linux
        OS: 'Linux
13:00I will build latest version to see if it's fixed already.
13:06@hiiamboris so I have same error with a build I just made using latest sources.
hiiamboris
13:06Error 16?
rebolek
13:07right, invalid virtual address
hiiamboris
13:07interesting... and what if you just allocate a huge block?
rebolek
13:08
sony@deli:~/Code/red$ red
--== Red 0.6.3 ==-- 
Type HELP for starting information. 

>> b: make binary! 2'000'000'000
== #{}
>> b: make binary! 2'000'000'000

*** Runtime Error 1: access violation
*** at: 0805B9D6h
hiiamboris
13:09wow, so bad :)
13:09so it's an allocation problem on *nix
13:10
>> make binary! 1'000'000'000
*** Internal Error: not enough memory
*** Where: make
*** Stack:
rebolek
13:30Right, I will report it and test it in the evening on macOS
endo64
15:40Same on Win8.1, I get not enough memory on my second try, but task manager show red console exe uses just a few MB
19:52Same on Win10, no crash
>> make binary! 1'000'000'000
== #{}
>> make binary! 1'000'000'000
*** Internal Error: not enough memory

greggirwin
04:34Please file a ticket for the allocation error. That's a big one.

On help, worth a ticket, to see if we can improve it. The current code, IIRC, is empirical, and getting more info on behaviors with different scaling will help. That one is on me. :^)
gltewalt
04:44Speaking of help, why are certain datatypes not listed? Like scalar!
04:49help datatype! doesn't show scalar!, but help "scalar" does.
04:51And not that someone would need it, but it also doesn't show default!.
04:51But help "default" does.
04:52Same with immediate!
hiiamboris
05:37@gltewalt ? datatype! vs ? typeset!
rebolek
05:40@greggirwin I've already did it yesterday https://github.com/red/red/issues/3471
gltewalt
05:51Ahh yeah. :smile:
05:51Time for bed
05:53Jeez...
dander
07:19Thanks @greggirwin, I opened an issue for you: red/red#3472
x8x
12:50@rebolek Could you please check this on macOS:
do https://gist.githubusercontent.com/toomasv/01817e797fdb38d277d4c01dad89b326/raw/89182eacf536b2a0ea35e78d96e2d02cb3b803e2/arc.red

I'm getting the beachball, are there known issues with the event manager on macOS, I see the beachball too often which removes the fun. :unamused:
rebolek
12:51@x8x I will let you know in the evening.
15:49@x8x no, no beach ball at all
15:4910.11.6, maybe it's different on newer versions
15:57@toomasv there’s one small problem thought, when I enter some value, I need to press Enter twice, to update the display
toomasv
17:17@rebolek Are you referring to arc.red?
rebolek
17:19@toomasv yes, the link above
17:20@toomasv Hm, now it works fine :-D
toomasv
17:21@rebolek Can't see this problem on W10
rebolek
17:21@toomasv I can’t reproduce it now on macOS also
17:21probably a Heisenbug ;)
toomasv
17:21Probably yes
18:10@rebolek If you try "Exercise" you should get visual feedback on match. There can be several ways to get the visual match, but only one way to match the code. I would love your feedback! Suggestions, ideas, critique...
rebolek
18:14@toomasv I'll certainly try it when I have some time on macOS, but I'm on Linux mostly. At least I can use it to test GTK branch.
toomasv
18:15@rebolek OK, thanks!
x8x
18:30@rebolek Thanks for checking! Then either the issue is only on 10.13.x or my system has issues, anyone else with 10.13.x who could test?

toomasv
06:29Am I missing something?
>> system/view/auto-sync?: false
== false
>> system/view/auto-sync?
== true

That's in graphic console only.
gltewalt
06:49Is there a check in the source code that sets it back to true when it notices false?
They may have wanted true for GUI console for some reason
endo64
07:47in ask function in gui-console.red file there is a line system/view/auto-sync?: yes so if GUI console use ask for prompt it might be the reason.

greggirwin
06:06That's a good one @toomasv. @endo64 nailed it. The console uses ask, which resets it.
>> system/view/auto-sync?: false  system/view/auto-sync?
== false
>> system/view/auto-sync?
== true

toomasv
07:08Thanks @endo64 ! @greggirwin But it shouldn't?!

greggirwin
02:00Well, if the GUI console is a window that then doesn't auto-sync...is it still useful?
02:00I mean, it won't show anything you're doing then, right?
02:00Seems a special case, and a fun easter egg to note somewhere.

9214
15:12Indexing with path notation evaluates function!, but not an op!. Is that expected?
>> block: reduce [:+]
== [make op! [[
    "Returns the sum of the two values" 
    value1 [number! char! pair! tuple! vector! time! date!] 
    value2 [number! char! pair! tup...
>> block/1
== make op! [[
    "Returns the sum of the two values" 
    value1 [number! char! pair! tuple! vector! time! date!] 
    value2 [number! char! pair! tupl...
>> block: reduce [:set]
== [make native! [[
    "Sets the value(s) one or more words refer to" 
    word [any-word! block! object! path!] "Word, object, map path or block of wor...
>> block/1
*** Script Error: block/1 is missing its word argument
*** Where: catch
*** Stack:  

>> first block
== make native! [[
    "Sets the value(s) one or more words refer to" 
    word [any-word! block! object! path!] "Word, object, map path or block of word...
16:10And shouldn't 'word decay to word in this case?
>> get also 'x parse x: [][change none 'word]
== ['word]

greggirwin
05:39@9214 I don't know why op doesn't complain there, and don't see at a glance the cause. @qtxie? It seems like it should behave the same as a function.
05:42And it does seem like the word should decay there, yes. Please file a ticket.
qtxie
07:37Yes. I think it's a bug.

9214
17:03Is it intentional that copying none in Parse results in an empty block?
>> parse [][copy match none (probe match)]
[]
== true

i'd prefer it to return none! value instead, as it makes checking optional values easier, e.g.:
parse [][copy match opt "a" (unless match [...])]
17:04Otherwise I usually rewrite such rules as ["a" | (no "a" here)] instead.
17:05Though, returning empty block is actually an expected behavior.
greggirwin
21:59That seems like a bug to me. R2 produces none.
9214
22:00I'll file a ticket then.
greggirwin
22:00:+1:
9214
22:03On the other hand...
>> parse [][set match none (probe match)]
none
== true
22:04Red follows R3 behavior here.
greggirwin
22:07Ooooh, good catch. So it follows R3. No ticket needed, but good to note.

meijeru
12:32Bug or feature: reduce and compose may both be applied to a non-block argument, and for arguments not of type any-function! they just yield the result of evaluation, BUT reduce :add gives the native, compose :add gives an error, since it tries to **apply** the native.

ne1uno
22:36;; · <- this bit of unicode crashes simple-gc gui if file is utf-8. other encoding it errors on load hex #B7
22:37it is part of a copy & paste from any github issue title.
22:53it may be a problem with the PSPad encoding too but earlier versions don't have problems

meijeru
10:35For lack of reaction, I have turned the above "bug or feature" into an issue, see #3489

rolandhadinger
rebolek
08:40hello
rolandhadinger
08:43Hello. I think the following should not be possible:
>> integer!: string!
== string!
>> type? 100
== percent!
>> integer!: none
== none
>> type? 100
*** Script Error: make-number does not allow none! for its type argument
*** Where: do
*** Stack: load

rebolek
08:44@rolandhadinger protect would take care of that, but is not implemented yet.
08:44see http://rebol.com/r3/docs/functions/protect.html
rolandhadinger
08:51Ah, good. Hope that this function's counterpart unprotect can be disabled, then.
greggirwin
20:40@rolandhadinger, out of curiosity, why do you think that should not be allowed?
20:42I ask because protect will help us lock some things down, but the above is just an example that shows how Red allows us to redefine pretty much anything. That is, it's not a special case in any way.
meijeru
21:14This is an old discussion, which started at [#360](https://github.com/red/red/issues/360).
endo64
21:22I checked out the branch simple-gc-free, build freshly, but when I compile red CLI or GUI console I get below error, cleaned up the %programdata%\Red folder but same result:
C:\Users\endo\Documents\Red\red\build\bin>red.exe
Compiling compression library...
Compiling Red GUI console...
*** Loading Error: file access error: %collector.reds
*** in file: %/C/Users/endo/Documents/Red/red/build/bin/inflate.reds
*** at line: 127
21:25same with simple-gc branch.
ne1uno
21:55was there a recent commit to simple-gc? last time everything built ok around 7/28
21:55never checked out simple-gc-free
21:56wish the bots would tag branch so you can see from chat when commit happens
endo64
21:59There are 5 commits in simple-gc in August. Let me try with an older commit
22:01simple-gc-free is based on simple-gc and ahead of it with 8 more commits.
22:11Yes, 07/28 can be compiled. 01/08 cannot.
Problem occurs with * Merge remote-tracking branch 'red/master' into simple-gc-fixed done by @qtxie at 2018-08-01 15:01
ne1uno
22:12just built simple-gc old-gui from a zip download looks like updated 8/2
22:13dates might be slightly different with UTC
22:15new gui console also builds and runs
endo64
22:16Are you on Win10 as well?
ne1uno
22:17win7
endo64
22:17commit f4c13fff892b5878fd536ef7a347ce6e5b169cf0 doesn't compile here, Win10.
22:18I'll test on Win8.1 tomorrow.

rolandhadinger
08:11@greggirwin First reason: If you are allowed to redefine the name of any data type, type checks in existing functions will be rendered worse than useless, because then no type check can guarantee what it was originally meant to guarantee.
08:37Secondly, name-value binding is unidirectional, i.e. no value explicitly knows by which word it is uniquely referred to. But data types somehow have to, because there has to be a way to express them (by mold, form etc.). Neither Rebol nor Red handle this correctly (see example above, also doesn't work in Rebol). The easiest solution would be to disallow redefinition of words that are used for data types.
endo64
14:34@ne1uno The problem was %collector.reds file was missing in the build/include.r file. Should be fixed in the repo then.
ne1uno
14:38I am not using anything in build directly. maybe that explains it
14:42still waiting on Carl to release command sdk

greggirwin
05:33> Neither Rebol nor Red handle this correctly (see example above, also doesn't work in Rebol). The easiest solution would be to disallow redefinition of words that are used for data types.

@rolandhadinger, when you say they don't handle it correctly, that's incorrect. There are a lot of things in Red, and Rebol langs that work differently, and people coming from other langs don't consider that, true bugs aside, things work this way by design. Some choices can be revisited, and we do that.

What you're asking for is keywords, which Red doesn't have. Datatypes don't have any more right to be keywords than if or do, do they? If you redefine certain things in Red, you can break the system. Completely. We will get protect at some point, and maybe even a default setting for the global context and standard words that will do what you want. But we can't do what you ask, the way you ask, because it is at the core of how Red works.
rolandhadinger
06:43@greggirwin I didn't ask for keywords, I was suggesting predefined constants in the global context, and only for built-in fundamental data types, not for functions, not for anything else.
06:45By the way, I'm not antagonizing. Red is overall an awesome language.
greggirwin
17:27@rolandhadinger, no offense taken here. I didn't think you were antagonizing, just coming from a position of "not knowing". These are good conversations to have, and we do. We also make people defend their suggestions. ;^) So, what makes datatype words different than any other word for you? e.g., compared to do or if. Yes, changing them breaks things, but so does changing a lot of other things.

If we do what you ask, you could no longer do this, correct:
>> o: object [number!: 0]
== make object! [
    number!: 0
]
>> type? number!
== typeset!
>> type? o/number!
== integer!

Which may also affect dialects you can design. And it relies on either a fixed set of datatypes, or the risk of your code breaking when a new datatype is added that conflicts with a word you're already using. What about custom runtimes where others have added datatypes of their own, but other libraries conflict? Same question for typesets, because you can make your own (which is enormously powerful). Next, do we also protect future user defined types? Do we make the naming convention the fixed rule? Then you can't end any words with ! or it will conflict.

All this to say that there is no easy solution here, in the context of changing things. The easiest solution is to tell people that this is how Red works. :^)
17:29All that said, when we get protect, it may be all you need.
rolandhadinger
23:27Ideally, protect would only render words immutable in their respective contexts, so they can still be defined or redefined elsewhere. As far as I know, this is how protect is implemented in Rebol 3: there, protect does not forbid polysemic shadowing; it does not downgrade words to keywords across contexts.

Why datatype words, and not other words like do or if?: at least I can imagine why it sometimes is advantageous to be able to redefine built in functions, but for changing built in fundamental data types, I can't think of any use cases (maybe I'm just unimaginative). Adding new types to existing typesets (similarly to how other languages allow you to implement existing traits on new types), yes.

greggirwin
01:31Suppose you want to disallow, or disable certain datatypes in a dialect you're writing. Say, for example that I don't want to allow set-path! values, because they open up a security hole.
>> unset 'set-path!
>> a: [b [c 1]]
== [b [c 1]]
>> a/b/c: 2
*** Script Error: set-path! has no value
*** Where: do
*** Stack: load 
>> load "a b: c/d/e e/f/g: 3"
*** Script Error: set-path! has no value
*** Where: do
*** Stack: load
rolandhadinger
07:29I'd probably disallow that type directly in the rules of my dialect:

my-dialect-value: [ ahead not set-path! any-type! ] ; takes any value except for set-path!
my-dialect-rule-x: [ ... my-dialect-value ... ]
my-dialect-rule-y: [ ... my-dialect-value ... ]
09:35Sorry, first line above should read not instead of ahead not
greggirwin
19:09Sure, I was just trying to imagine a specific use. But the general design issue stands.

toomasv
20:29Why the difference in behavior of string- and block-series?
>> x: [a] append/dup x x 4
== [a a a a a]
>> x: "a" append/dup x x 4
== "aaaaaaaaaaaaaaaa"
gltewalt
21:13
>> append/dup "a" "a" 4
== "aaaaa"
21:14
>> x: "a" append/dup copy x x 4
== "aaaaa"

21:14An implicit copy for block! ?
22:19Might need to add a few test in red/tests/source/units/series-test.red, in ===start-group=== "append"
22:30There is a difference between block/rs-append copy-cell and string/append-char, but I have to run. Don't have time to poke through it more.

greggirwin
00:19Indeed. Interesting subtlety.
>> x: [a] append/dup/only x x 4
== [a [...] [...] [...] [...]]
00:31Not as simple as it may seem. Not related to append-char, as it's a string. What we need to understand is insert for each type. That's where the meat is.
gltewalt
02:01https://github.com/red/red/blob/master/runtime/datatypes/string.reds#L2246
greggirwin
02:06Quite possible.
gltewalt
02:10
>> x: "a" append/dup "" x 4
== "aaaa"

>> x
== "a"
02:13It's duping the right amount. Buffer grows if x is used.
02:16
>> x: "a" append/dup x copy x 4
== "aaaaa"

>> x
== "aaaaa"
toomasv
09:24This behavior of strings is very welcomed and logical. One usecase is e.g. make-transparent where I had to fill alpha with 90000 values for 300x300 image.

With append/dup str str to-integer log-2 90000 it takes only 16 repetitions + 1 additional step instead of 89999 repetitions.

With block loop to-integer log-2 90000 [append blk blk] can be used, but this is not as quick as append/dup for strings.
gltewalt
14:31When in doubt, use copy, I guess

alexbaban_twitter
16:47This might not be a bug in Red, but a compiled macOS Red executable, can't read/write to files in latest Sierra. If I launch the program from console it works, but errors if is compiled. Anybody knows a workaround or any news about being fixed. Thank you. https://github.com/red/red/issues/3207
9214
16:49@alexbaban_twitter this is a known issue related to APFS compression introduced in new new macOS versions (@qtxie :point_up: is that right? I recall you saying something among these lines).
alexbaban_twitter
16:50Yes, it's a show stopper for me if my program can't read/write files on macOS latest Sierra
16:50The program I made works fine on El Capitan
9214
16:51@alexbaban_twitter can you check if it works with -r -e flags specified during compilation?
alexbaban_twitter
16:52Thank you, I'll check, I'll let you know as soon as I get the chance.
9214
16:53@alexbaban_twitter you're welcome.
alexbaban_twitter
18:39tried compilation with -r -e also -r only, it does not work, when I first tried to launch the compiled app, I got a pop-up, sent me to https://support.apple.com/en-ca/HT208436
18:39If I launch the app via Red console, no problem
18:40I'm on latest macOS High Sierra
18:40so frustrated with the stupid apple os updates
18:41the app was working fine until they started with these

qtxie
00:31That's strange. The console is also a 32bit app.

x8x
09:09@qtxie In the Terminal.app you can open binaries (not app bundle) without the 32bit warning and signing check.
alexbaban_twitter
16:12@qtxie @x8x thank you for your attention to this problem. the warning only appears first time so that's no problem, the problem is that any compiled app, even if open binaries from the terminal, won't run, crashes at start with a stack trace of some ' unsupported compressor... AppleFSCompression... ` thing
x8x
17:50@alexbaban_twitter Are you using the latest nightly builds? Could you please put a reduced example of code generating the issue in a gist?

gltewalt
01:25making an error with only the error type (single word) crashes GUI Console for red-simple-gc.

Crashes CLI with the following error:
>> make error! [math]
*** Internal Error: invalid error object field value: none
*** Where: print
*** Stack:
01:26Any single word of the type list crashes it:
throw  note syntax script math access user internal
bitbegin
02:18can you open a ticket for this issue?
gltewalt
02:18I will if it is confirmed
greggirwin
02:22Confirmed.
bitbegin
02:35https://github.com/red/red/pull/3513
02:37fixed
gltewalt

gltewalt
00:02
>> make error! 0
*** Script Error: value out of range: 0
*** Where: make
*** Stack:
00:04Should be "no loop to break"
00:04
>> help system/catalog/errors/throw
SYSTEM/CATALOG/ERRORS/THROW is an object! with the following words and values:
     code        integer!      0
     type        string!       "Throw Error"
     break       string!       "no loop to break"
     return      string!       "return or exit not in function"
     throw       block!        length: 2  ["no catch for throw:" :arg1]
     continue    string!       "no loop to continue"
     while-cond  string!       {BREAK/CONTINUE cannot be used in WHILE condition block}
00:05
>> make error! 1
*** Throw Error: return or exit not in function
*** Where: ???
00:07As seen in syntax:
>> help system/catalog/errors/syntax
SYSTEM/CATALOG/ERRORS/SYNTAX is an object! with the following words and values:
     code          integer!      200
     type          string!       "Syntax Error"
     invalid       block!        length: 4  ["invalid" :arg1 "at" :arg2]
     missing       block!        length: 4  ["missing" :arg1 "at" :arg2]
     no-header     block!        length: 2  ["script is missing a Red header:" :arg1]
     no-rs-header  block!        length: 2  ["script is missing a Red/System header:" :arg1]
     bad-header    block!        length: 2  ["script header is not valid:" :arg1]
     malconstruct  block!        length: 2  ["invalid construction spec:" :arg1]
     bad-char      block!        length: 2  ["invalid character in:" :arg1]

>> make error! 200
*** Syntax Error: invalid none at none
*** Where: ??? 

>> make error! 201
*** Syntax Error: missing none at none
*** Where: ???
00:12This is simple-gc, built from source.
00:24Does the same with latest master build
00:26For what it's worth...
#3518

gltewalt
23:30
>> 2:00:00 + 1:45:30
== 3:45:30

>> 2:00:00 - 1:45:30
== 0:14:30

>> 2:00:00 / 1:45:30
== 1.137440758293839

>> 2:00:00 // 1:45:30
== 0:14:30

>> 2:00:00 * 1:45:30
*** Script Error: incompatible argument for multiply of time!
*** Where: *
*** Stack:
greggirwin
23:48Not a bug. What should the result be? Treating everything as seconds isn't easy to reason about.
gltewalt
23:55I don’t know but it seems peculiar since / doesn’t error
23:56Should be 2:00:00
23:59It should multiply by the hour/minute/second fields?

gltewalt
00:04Addition seems to work across hour, minute, second
greggirwin
00:16Correct, but is multiplication *useful*?
00:17Note what type division returns.
gltewalt
02:44Don't know if it's useful or not, but:

>> t1: 2:00:00
== 2:00:00

>> t2: 1:45:30
== 1:45:30

>> reduce [t1/hour * t2/hour t1/minute * t2/minute t1/second * t2/second]
== [2 0 0.0]

>> to time! reduce [t1/hour * t2/hour t1/minute * t2/minute t1/second * t2/second]
== 2:00:00
meijeru
07:49To understand why time multiplication does NOT work, use a dimensional argument: time \* time would be of dimension time-squared (seconds ** 2), and that makes little sense.

lepinekong_twitter
12:21Rebol works with CNAME DNS record seems red doesn't for example
do http://www.redlang.red
on rebol I get correct answer:

>> do http://redlang.red
connecting to: redlang.red
** Syntax Error: Script is missing a REBOL header

on red I get

>> do https://www.redlang.red
*** Access Error: cannot connect: https://www.redlang.red reason: timeout


12:22Red works only without www:
do https://redlang.red
rebolek
12:23
>> read https://www.redlang.red
ERROR: SSL peer certificate or SSH remote key was not OK
*** Access Error: cannot connect: https://www.redlang.red reason: timeout
*** Where: read
*** Stack:
12:24If it works without www only, your certificate is probably set wrong.
12:36It's same from browser, Firefox warns about non-secured connection.
12:36Rebol works, because there are no certificates over HTTP.

endo64
00:03Can some one confirm this?

Save below script as test.red
view/flags [text "test" center] [modal popup]


Both red --cli test.red and red test.red works, do %test.red on GUI console also works, but do %test.red on CLI console crashes *** Runtime Error 1: access violation
00:04If I remove center then it doesn't crash.
toomasv
04:41@endo64 All tests work on my W10 (with proper header).
endo64
09:41@toomasv Thanks for testing, strange I just built fresh and it still crashes (it worked just once, I tested 15-20 times)
toomasv
09:50@endo64 I tried again. Same
[![image.png](https://files.gitter.im/red/bugs/AWiq/thumb/image.png)](https://files.gitter.im/red/bugs/AWiq/image.png)
10:02That was with build from August 15th. Now tried with latest - all your tests work.
endo64
10:27Thank you @toomasv I'll test at work tomorrow on Win8.1 and on another Win10.
toomasv
10:28@endo64 :+1:
lepinekong_twitter
11:54@rebolek ok thanks will look for certificate problem.

endo64
10:12@toomasv I tested Red [Needs: View] view/flags [text "test" center] [modal popup] on Win8.1 (x64) with both CLI and GUI console (fresh built from latest source codes), it works, didn't crash even once.
toomasv
12:09@endo64 Good! How about W10?
endo64
15:27@toomasv Tested on another W10, it works. I need to check at home to find what is wrong there :(
toomasv
17:01@endo64 Good luck! Please let us know if you'll find out!
endo64
22:09@toomasv I deleted all files in %programdata% folder, fresh built the Red, and it works both in CLI and GUI console now.

toomasv
03:14@endo64 OK, thanks! Good to know.
Oldes
21:02When making large charsets, the output is truncated as is somehow confusing, isn't it?
>> charset [#"^(251C)" - #"^(252C)"]
== make bitset! #{0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

bitbegin
02:03it's designed to be this
02:03
>> a: ""
== ""
>> append/dup a "abc" 1000
== {abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca...
>>
02:03for example
toomasv
04:09@Oldes I understand that output on screen is only indicative and truncated for any longer result. probe ... will show the full output, as you know of course :mask:
Oldes
05:52@bitbegin I know the output is truncated but as you can see in your example are at least the dots indicating the truncation.
bitbegin
06:14
>>  charset [#"^(251C)" - #"^(252C)"]
== make bitset! #{00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
>>
06:15do we have different result?
Oldes
07:23[![image.png](https://files.gitter.im/red/bugs/TR5c/thumb/image.png)](https://files.gitter.im/red/bugs/TR5c/image.png)
bitbegin
07:28do you use latest daily version?
Oldes
08:11Looks like I don't when you have different results:) Rebuilding now.
08:13[![image.png](https://files.gitter.im/red/bugs/26ab/thumb/image.png)](https://files.gitter.im/red/bugs/26ab/image.png)
08:13Looks good now.
greggirwin
20:55Does that mean https://github.com/red/red/issues/3438 can be closed?

meijeru
15:12See my final comment to that issue.
Oldes
16:13@greggirwin no :) mold is corrupted now :(

Oldes
09:33The problem is, that current console trims **output only on one line**.. **I strongly dislike it.** I was now very confused when I wanted to see a url from variable and it was truncated. If I would not know about this issue, I would be even more confused.... I really don't like to write in console probe url or print url just to see content of the url variable... and that is just an example. I prefer to have output at least a few lines before truncating.
09:33[![image.png](https://files.gitter.im/red/bugs/apDb/thumb/image.png)](https://files.gitter.im/red/bugs/apDb/image.png)
09:34On the screen above is my console.. the first line was before I re-sized the console window.
greggirwin
22:14We do need to fix the ... issue, so truncation is clear.

gltewalt
00:21
>> x: make image! 100x100
== make image! [100x100 #{
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    F

>> y: make image! 200x200
== make image! [200x200 #{
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    F

>> x = y
== false
>> x == y
== false
>> x =? y
== false
>> x <> y
== true

>> x < y

...FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}]
*** Where: <
*** Stack:
00:34That's a little weird to me, but x/size < y/size is fine
00:34I was unsure if I should post this in help or in here
00:36Alpha should be the same value, it wasn't set

>> x/alpha < y/alpha
== true
greggirwin
00:41It does show the error on comparing images, but doesn't truncate the output.
>> x < y
*** Script Error: cannot compare make image! [100x100 #{FFFFFF
...
gltewalt
00:42It can compare with =, ==, <>, =?, though
00:43I set out expecting it not to be able to compare at all though, so.. I guess it's ahead of the game
00:44I didn't realize (or remember) that they were part of series!
greggirwin
00:51Comparing for equality has meaning, but ordering images really doesn't.
gltewalt
00:53What about alpha? Shouldn’t it be the same value if not specified?
greggirwin
00:54Different length. X is shorter than Y.
gltewalt
01:30This time for sure.

img: make image! [100x100 120.20.199.200]

load form enbase/base img/alpha 2

*boom*
01:34load form enbase/base img/alpha 64 works.

load form enbase/base img/alpha 58
*** Syntax Error: invalid integer! at "9M3wUgPyR2Zan9RQA8kdh3bVYorFdp4UrsNvfb4m"


load form enbase/base img/alpha 16 works.

01:36With base of 2, both GUI Console and --cli stop working
greggirwin
02:14Interesting. Works with base 16, but fails if you try to see what type? it returns. File a ticket.
02:19More than 309 digits gives you > ~1E308, which goes to 1.#INF *normally*. See if you can narrow down exactly where it hangs.
gltewalt
03:25It's ok if the alpha value is zero.

>> img: make image! [100x100 128.24.90.0]
== make image! [100x100 #{
    80185A80185A80185A80185A80185A80185A80185A80185A80185A80185A
    80185A80185A80185A80185A80185A80185A80185A80185A80185A80185A
    8

>> type? load form enbase/base img/alpha 64
== word!

>> type? load form enbase/base img/alpha 58
== float!

>> type? load form enbase/base img/alpha 16
== integer!

>> type? load form enbase/base img/alpha 2
== integer!
>>
03:26Anything other than zero is an issue.

>> img: make image! [100x100 128.24.90.1]
== make image! [100x100 #{
    80185A80185A80185A80185A80185A80185A80185A80185A80185A80185A
    80185A80185A80185A80185A80185A80185A80185A80185A80185A80185A
    8

>> type? load form enbase/base img/alpha 64
== word!

>> type? load form enbase/base img/alpha 58
*** Syntax Error: invalid integer! at "3RNjUkKqqjDMEfyxSGb7aesbxdCxs7gsRKfqd8ZQ"
*** Where: do
*** Stack: load  

>> type? load form enbase/base img/alpha 16
== float!


And of course, using 2 blows up the consoles.
toomasv
08:10Isn't find supposed to find things according to typeset also?
find ['a a :a a:] any-word!
== none
>> find [1 2.0 3%] number!
== none
meijeru
08:24I know you can test on datatype, rather than value, in parse. Also you can use find to test for the presence of a type in a typeset. But the thing you want, I don't think it was in the design.
greggirwin
08:28@toomasv, only for datatypes, not typesets.
toomasv
08:28OK, thanks! But why not?
greggirwin
08:32Find is already a complex func, and we can do it with parse (with a bit more work), so it's a question of value. It's certainly possible.
toomasv
meijeru
20:30So find [1 2.0 3%] float! is possible !?! I have learned something :smiley:
20:37I have formulated the rule in the specs as follows :With find , if the argument is of type any-block! except hash!
and the is of type datatype! the result is the at the index of the first occurrence of a component of that type.
20:39The exception for hash! is obvious, but the coverage of paren! and any-path! is unexpectedly nice. Still, I would imagine that the extension to finding by typeset would be almost trivial.

gltewalt
00:03Haven’t narrowed down where load breaks @endo64
toomasv
03:27@meijeru I agree. Finding by typeset too would make find not only (even) more powerful but also more consistent. But I don't know the implementation, may be it isn't so trivial.
meijeru
10:09I looked at %runtime/datatypes/block.reds around line 880 , and it looks quite feasible. I will make a REP wish ticket later.
toomasv
11:02:+1:

meijeru
11:32See https://github.com/red/REP/issues/29

ericguedespinto
11:57@9214 Regarding your |> op! you posted a while back, I've come up with the following work-around:
pipe: func ['a 'b][ insert/only at c: to-block b 2 a do c]
|>: make op! :pipe

It does the following:
x |> f is equivalent to f x
x |> [f y] is equivalent to f x y
x |> f |> g |> h is equivalent to h g f x
For example:
>> [1 2 3] |> reverse |> print
3 2 1
>> [1 2 3] |> reverse |> [append 0] |> print
3 2 1 0
>> 1 |> [add 2] |> print
3
9214
12:01@ericguedespinto been there, done that :wink:
then: make op! func ['a 'b][do head insert/only next to block! b a]
12:03As an exercise, you can implement equivalent of Clojure threading macros.
ericguedespinto
12:03You're the master !!! lol

gltewalt
22:27Problem with the current GUI Console. Win7.
Doesn't redraw properly when this is entered: help datatype!
There may be more 'things'
22:28Red 0.6.3 for Windows built 15-Sep-2018/23:12:03-06:00 commit #09de884

More specifically, Scroll isn't behaving properly
ne1uno
22:29some control code, VT or something
rebolek
22:30I've reinstalled my machine and now I get this:
tankpad% red
--== Red 0.6.3 ==-- 
Type HELP for starting information. 

>> system/build
== make object! [
    date: 19-Sep-2018/20:24:49+02:00
    git: none
    config: make object! [
        config-name: 'Linux
        OS: 'Linux
        OS-version: 0
  
>> read http://www.rebolek.com

*** Runtime Error 32: segmentation fault
*** at: F7BCD947h
gltewalt
22:33:hushed:
greggirwin
22:38@gltewalt confirmed. I don't see any recent merges on master that would relate to this, but there will be some big merges coming soon. Worth a ticket, so we remember.
22:40@rebolek no segfault here on Windows. Will do a fresh build to check.
rebolek
22:41@greggirwin you don't have to, it works on Windows, it also works on Linux on different machine
22:42it's just this machine, I'm trying to find out why
22:47Hm, debug mode is not very helpful :/
>> read http://www.google.com

*** Runtime Error 32: segmentation fault
*** Cannot determine source file/line info.
9214
22:49@rebolek can you build console from source in debug mode?
rebolek
22:49@9214 that was console in debug mode
9214
22:49Huh.
gltewalt
22:52Might be easier to make a video of the GUI Console behavior?
ne1uno
22:55may be something wonky in the event! doc?
22:55worked ok in the console w/o events
23:00? datatype! weird too
rebolek
23:02If anybody's willing to try to repro it in VM, I'm on Manjaro with latest kernel: Linux tankpad 4.19.0-1-MANJARO #1 SMP PREEMPT Mon Sep 17 17:34:11 UTC 2018 x86_64 GNU/Linux
gltewalt
23:11https://imgur.com/a/6UGEbhz
23:15Will this do? #3538
23:16Even regular help is weird, but still usable
23:40@rebolek That machine have the 386 libs onboard?
rebolek
23:40@gltewalt Red wouldn't run without them.
23:41
sony@tankpad  ~/code/red   master  ldd console 
	linux-gate.so.1 (0xf7fc4000)
	libc.so.6 => /usr/lib32/libc.so.6 (0xf7daf000)
	libm.so.6 => /usr/lib32/libm.so.6 (0xf7ce2000)
	libcurl.so.4 => /usr/lib32/libcurl.so.4 (0xf7c58000)
	/lib/ld-linux.so.2 => /usr/lib/ld-linux.so.2 (0xf7fc6000)
	libidn2.so.0 => /usr/lib32/libidn2.so.0 (0xf7c3a000)
	libpsl.so.5 => /usr/lib32/libpsl.so.5 (0xf7c29000)
	libssl.so.1.1 => /usr/lib32/libssl.so.1.1 (0xf7bba000)
	libcrypto.so.1.1 => /usr/lib32/libcrypto.so.1.1 (0xf795c000)
	libgssapi_krb5.so.2 => /usr/lib32/libgssapi_krb5.so.2 (0xf7907000)
	libkrb5.so.3 => /usr/lib32/libkrb5.so.3 (0xf781e000)
	libk5crypto.so.3 => /usr/lib32/libk5crypto.so.3 (0xf77e8000)
	libcom_err.so.2 => /usr/lib32/libcom_err.so.2 (0xf77e3000)
	libz.so.1 => /usr/lib32/libz.so.1 (0xf77c8000)
	libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf77a7000)
	libunistring.so.2 => /usr/lib32/libunistring.so.2 (0xf7626000)
	libdl.so.2 => /usr/lib32/libdl.so.2 (0xf7620000)
	libkrb5support.so.0 => /usr/lib32/libkrb5support.so.0 (0xf7612000)
	libkeyutils.so.1 => /usr/lib32/libkeyutils.so.1 (0xf760c000)
	libresolv.so.2 => /usr/lib32/libresolv.so.2 (0xf75f3000)
gltewalt
23:43Revert back to libcurl3 ?

greggirwin
00:00@gltewalt that ticket is fine, but if we can narrow it down a bit, that would be even better. Recent help changes don't seem too suspect.
rebolek
00:03@gltewalt simple-io.reds needs libcurl.so.4
gltewalt
00:05Download page says that is needed for FreeBSD
rebolek
00:06Download page is wrong about libcurl3, someone should update it.
gltewalt
rebolek
00:23so the segfault happens when calling curl_easy_perform()
greggirwin
01:01I see libcurl.so.4 on the download page. Where is libcurl3 ref'd?
ne1uno
01:07Red 0.6.3 for Windows built 14-Jul-2018/22:03:36-04:00 commit #8b2db6b help datatype! seems normal
01:12ok too Red 0.6.3 for Windows built 19-Aug-2018/20:39:55-04:00 commit #318673b
gltewalt
01:31The Debian and Ubuntu section
01:31https://imgur.com/a/5pxAHUL
greggirwin
01:34Thanks! @x8x, can you make that update?
x8x
09:57Guys, I'm a bit lost. Just downloaded a fresh Debian and instructions on the download page are still relevant, Manjaro is an ArchLinux based distro and there is no ArchLinux install infos on the download page, just a link to the AUR repo. So what should I change/fix on the download page? I have some Manjaro and other Archs around, should we add infos for that platform? Thank you! :smiley:
rebolek
10:15@x8x Thanks for looking into this! That AUR isn't updated, I believe, so just ignore it. You need to enable multilib, to get 32bit support, see [here](https://wiki.archlinux.org/index.php/Official_repositories#multilib). I believe that on my system multilib was already enabled, but it's better to check it twice. So:

1. Enable multilib
2. Install 32bit libs
3. Try to build and run Red
10:16> I have some Manjaro and other Archs around, should we add infos for that platform?

Once it works, definitely ;)
x8x
10:24@rebolek I have Red running fine on Arch, we could add instructions, but I still don't get what should I fix on the download page! ;-)
rebolek
10:46@x8x Download page says libcurl3 for Debian, but it should be libcurl4 I believe. I've had Red running on Arch recently (on different machine though), so I wonder where does my problem on Manjaro comes from.
x8x
11:19Nope, libcurl3:i386 is correct for Debian.
11:33Will have to check Ubuntu and Alpine later, I remember a libcurl3 vs libcurl4 issue somewhere but can't remember where..
rebolek
12:31@x8x OK. Let me know if you can make Red work on Manjaro, because right now I'm redless :white_circle:
x8x
13:29@rebolek Which sauce of Manjaro are you running?
rebolek
14:24@x8x manjaro xfce 17.1.12
greggirwin
16:29Thanks for digging in guys.

9214
14:33Looks like react?/target recognizes target fields if they were linked with is, but not with react.

>> foo: make reactor! [a: 1 b: 2]
== make object! [
    a: 1
    b: 2
]
>> bar: object [x: 0]
== make object! [
    x: 0
]
>> react [bar/x: foo/a + foo/b]
== [bar/x: foo/a + foo/b]
>> react?/target bar 'x
== none

>> bar: object [x: is [foo/a + foo/b]]
== make object! [
    x: 3
]
>> react?/target bar 'x
== [foo/a + foo/b]
14:35I also have discovered an extemely cryptic behavior. Whenever I directly copypaste code from GUI console, some return expressions get doubled:
>> a: [
[    b
[    c
[    d]
== [
    b 
    c 
    d
== [
    b 
    c 
    d
]
>> 1 2 3
== 3
>> 4 5 6
== 6
>> 6 * 7
== 42
>>

14:57:point_up: this happend only with multi-line output, e.g:
>> [
[    a
[    b
[    c
[    ]
== [
    a 
    b 
    c ; <-- WTF? Note the missing closing bracket.
== [
    a 
    b 
    c
]
>> object []
== make object! []
>> object [x: 1 y: 2]
== make object! [
    x: 1
    y: 2
== m ;<-- WTF? Note the missing closing bracket above.
15:15@9214 happen**s***
nedzadarek
15:45https://github.com/red/red/issues/3539
source-a: make reactor! [a: 1]
source-b: make reactor! [b: 10]

obj: object [c: 0]
block: [obj/c: source-a/a * source-b/b]
react block
obj/c
; == 10

source-a/a: 2
obj/c
; == 20

; react/unlink block [source-a source-b] ; works fine
react/unlink block source-a ; freezes the console

9214
15:45@nedzadarek thanks!
greggirwin
16:58@9214, the doubling is a known issue I think. Along with the recent one @gltewalt submitted on scrolling.
9214
17:12@greggirwin I'll mention this in @gltewalt's ticket then.
greggirwin
17:29:+1:
9214
20:11@greggirwin and regarding react vs. is, worth a ticket or nay?
greggirwin
20:28Go ahead. I don't have time to look into it right now.

PeterWAWood
07:36Why does this give a script error:
>> view [
[    style my-text: text
[    title "title"
[    across
[    ]
*** Script Error: VID - invalid syntax at: [title "title" across]
*** Where: do
*** Stack: view layout cause-error

but this does not:
>> view [
[    title "title"
[    across
[    style my-text: text
[    ]
>>
toomasv
15:55@PeterWAWood Window props size, backdrop and title have to come first, then everything else.
16:22See [here](https://github.com/red/red/blob/master/modules/view/VID.red#L580)

PeterWAWood
01:07@toomasv Thanks. That's a shame because it makes for messy codes from my point of view.
greggirwin
04:33@PeterWAWood you think styles should be forced first?
PeterWAWood
07:20@greggirwin In my mind, defining the styles needed before declaring the layout seems to be a worthy separation.
toomasv
14:07Is this known limitation that on-menu actor of faces on base's pane are not invoked?
view [
	base 100x100 silver 
	on-down [probe "gray"] 
	on-menu [probe event/picked]
	with [
		menu: ["One" grayone "Two" graytwo] 
		pane: layout/only [
			base 40x40 red 
			on-menu [probe event/picked 'done] 
			on-down [probe "red" 'done]
			with [
				menu: ["One" redone "Two" redtwo]
			] 
		] 
	]
]

When panel or group-box is used instead of top base, on-menu of bottom base works.
:confused:
qtxie
21:04@toomasv Yes. I think so.
greggirwin
22:53@PeterWAWood I think the better solution is to update @rebolek's stylize, and make sure it matches how Doc wants it to work, so you can define your styles outside the layout. For me, the current approach works OK, because you declare things about the layout before what goes into it. Maybe it's something we can support either way, but Nenad can't look into it right now.

ne1uno
02:55 email: "electronic(at)gsnail.com" is a crasher in the header in latest?
05:51*thought I had isolated a problem but it's not repeatable just with the email.
qtxie
18:52@toomasv The on-menu actor works on macOS, so it's a Windows issue.
9214
21:53about/debug typed in GUI console with latest build results in a silent crash on W10. Can anyone confirm?
rebolek
21:57not here. but I get lots of random crashes with something else.
ne1uno
21:58I think there's a ticket? at least it's been reported before in red/bugs win7 too
9214
21:58Yup https://github.com/red/red/issues/3329
ne1uno
22:00maybe some stray unicode got into the output? another ticket for that crasher
22:08about/debug works in old gui

dander
06:08I'm able to get a pretty reliable access violation if I call recycle, followed by ? recycle something like 1 - 5 times or so (it randomly occurs with the help call).
9214
06:17
text
>> recycle ? recycle

*** Runtime Error 1: access violation
*** at: 00429DEAh
greggirwin
06:22@dander, please file a ticket.
dander
06:49@greggirwin, issue #3549 created. Thanks for verification @9214
rebolek
12:02Another Heisenbug...Red sometimes crashes when making an object and sometimes does not.
greggirwin
16:08@rebolek any good code for reproducing that?
9214
16:39How should I name this one? :thought_balloon:
Red [File: %bug.red]

#include %bug.red

a b [[]]
c: 0
compose/deep/only []

*** Runtime Error 1: access violation
*** at: 0042FDA7h
16:42And this one?
Red [File: %bug.red]

#include %bug.red

a b [[]]
c 0
compose/deep/only []

*** Script Error: set does not allow È       ╗ ╗  @
                                                   8`
                                                      ╗  Þ╔  ║   for its word argument
*** Where: set
*** Stack:

16:44
text
Red [File: %bug.red]
#include %bug.red
[][][]

*** Runtime Error 1: access violation
*** at: 0042FDA7h
rebolek
17:48@greggirwin I would love to, but it's hard to isolate it. The bug happens only sometimes and in complex script.

dockimbel
04:29@rebolek Try compiling your code in debug mode, and post the stack trace if any. Also, try to run your code with recycle/off to see if relates to the GC or not.
rebolek
08:12@dockimbel here's the stack trace - https://pastebin.com/3RXsEh9t
dockimbel
20:46@rebolek Great, thanks!
20:46@qtxie Please have a look at that stack trace above ^---.
qtxie
22:26@rebolek Do you use map! or hash! in your script?

rebolek
04:05@qtxie map! heavily, I think there's no hash! in this one.
dockimbel
04:12@rebolek We would need your code to track the root cause of that crash. Could you share it with @qtxie? (you can send him privately).
rebolek
05:20@dockimbel Ok, I will contact him privately.
toomasv
09:13@qtxie On Windows area/selected seems to count newlines as two chars. Bug?
09:13[![image.png](https://files.gitter.im/red/bugs/iJJd/thumb/image.png)](https://files.gitter.im/red/bugs/iJJd/image.png)
10:22Similar problem is with offset-to-caret.
Oldes
16:35Not exactly bug... but don't want to pollute the main room.... what is the best behaviour in this case :
Red:
>> x: any [all [1 2 print "yes"] 1]
yes
*** Script Error: x: needs a value
*** Where: x
*** Stack:

Rebol2:
>> x:  any [all [1 2 print "yes"] 3]
yes
** Script Error: x needs a value
** Near: x: any [all [1 2 print "yes"] 3]

Rebol3:
>> x:  any [all [1 2 print "yes"] 3]
yes
== 3

Ren-c:
>> x: any [all [1 2 print "yes"] 1]
yes
** Script Error: VOID! values are not conditionally true or false
** Where: all any _
** Near: [... 2 print "yes" ~~]
** Line: 1
16:35I prefer the Rebol2 version. Rebol3 is wrong. Red should have better error message.
9214
16:37@Oldes it depends on the treatise of unset! values. In Red and R2 they are "truthy".
Oldes
16:42I think that being _truthy_ is correct... because I was just bitten by Rebol3's behaviour.
16:45Red is clear winner in this case:
>> if all [1 2 (print "yes")][print "go"]
yes
go
16:48At least for me ;-)
16:49Especially when the only way how to debug in Redbol (for now) is using _prints_ here and there.
greggirwin
17:06An issue Red faces with the near part of the message is that, unlike R2, it can be compiled. It should be possible to add that info in interpreted mode though.
qtxie
17:37@toomasv The "^/" is converted to "^M^/" on Windows. Please open a ticket so we can fix it later.
dsunanda
19:22I'm seeing some glitches in the VID/View repainting when animating boxes so they move across a panel. Not sure I can easily simplify the code any further - it's nearly 200 lines, including comments and a test script. Can I put that on github, or would you prefer another way?
toomasv
19:24@qtxie OK, thanks, will do.
greggirwin
19:28@dsunanda a gist is fine.
dsunanda
22:33Thanks Gregg. Gist is visible in the two images [in this link](https://imgur.com/a/Oiy1TIU)
22:35The first one is how it should work. The second one is how the first one sometimes slightly glitches. The second one differs from the first in that it omits an explict SHOW - which should be unnecessary anyway.
Summary: Without SHOW of canvas/pane, it's completely broken.
Withn SHOW of canvas/pane, it glitches many 1 time in 10.
22:35/ it glitches many 1 time in 10./ --> /it glitches about 1 time in 10./

temperfugit
05:50I'm having an issue with the recent nightly builds (including the most recent 10/3 one) where "image" doesn't display anything on Windows 8.1. Console says "*** View Error: CreateWindowEx failed!" The 0.63 build works properly on my Windows 8.1 install, and the 10/3 nightly build displays images fine on my Windows 10 machine.
greggirwin
15:44There were some experiments done here recently, trying to address some other issues with the COMPOSITED flag. I don't know if they made it into nightly, but if someone can reproduce, we can look into it.
dockimbel
17:37@qtxie ^---

dsunanda
10:02More on glitches in the screen repainting....
Code below has a blue square that chases a red square when you click Do-it.
You can probably see various rendering issues, especially when the blue square starts completely off the canvas (both boxes are LOOSE, so can be repositioned by hand).
Uncommenting the SHOW fixes the glitches in *almost* every run.
10:02
;; set up display with target red box
unview/all
view/no-wait compose [
    title (rejoin [system/version " " system/build/date])
	button "Chase" [Chase]
	canvas: panel 500x500 222.222.222 [at 200x200 target: box loose 200x200 red]
	dashboard: text 100x50
	]

    ;; Create flying blue box
flier: first get in layout [box 100x100 loose blue] 'pane
flier/offset: -100x-100
append canvas/pane flier

    ;; function to move blue box closer to red box
Chase: func [][
 forever [
    if flier/offset = target/offset [break]
     wait 0.001
     flight-direction: 0x0
     if flier/offset/1 < target/offset/1 [flight-direction/1: +1]	  
     if flier/offset/2 < target/offset/2 [flight-direction/2: +1]
     if flier/offset/1 > target/offset/1 [flight-direction/1: -1]	  
     if flier/offset/2 > target/offset/2 [flight-direction/2: -1]
     flier/offset: flier/offset + flight-direction
	 dashboard/text: rejoin  ["" flier/offset "..." target/offset]
     ;;;;;;; show canvas
	]  
   'done
]  

do-events
toomasv
11:05@dsunanda Flickering will be releaved with system/view/auto-sync?: off before your code (and show uncommented).

I tried also a version making use of rate without autosync?: off. I think result was decent:
view compose [
	title (rejoin [system/version " " system/build/date])
	button "Chase" [canvas/rate: 64]
	canvas: panel 500x500 222.222.222 [
		at 200x200 
		target: box loose 200x200 red
		at -100x-100
		flier: box 100x100 loose blue
	] on-time [
		flight-direction: 0x0
		if flier/offset/1 < target/offset/1 [flight-direction/1: +1]      
		if flier/offset/2 < target/offset/2 [flight-direction/2: +1]
		if flier/offset/1 > target/offset/1 [flight-direction/1: -1]      
		if flier/offset/2 > target/offset/2 [flight-direction/2: -1]
		flier/offset: flier/offset + flight-direction
		dashboard/text: rejoin [flier/offset "..." target/offset]
		if flier/offset = target/offset [face/rate: none]
	]
	dashboard: text 100x50
]

Tovim
14:43Hi, never ever did I have a problem with running red-063.exe binary except these (three?) days: starting the mentioned binary (via double click or in cmd console), I am getting a message "Compiling Red GUI console..." - the process of which always fails (after a minute), followed by MS Windows 10 Defender´s message, that we were infected by a Trojan:Win32/Tuerboos.A!cl virus that has been encased in the quarantine and that can be easily removed.
Have read somewhere, that MS Windows 10 are so sophisticated lately, that some form of alarm can be reported for no reason.
Please, confirm me that with the Red-063.exe compilation there is no problem before I set to a long way of seeking the cause at MS Windows.
9214
14:44@Tovim that's problem with AV vendors and their poor heuristics, not Red.
Tovim
14:47Sorry? I do not understand: "AV vendors" and "poor heuristics". Please, try it in other words. Thank you.
9214
14:49@Tovim some antivirus software (Norton, Avast, Avira and Windows Defender) consistently flag Red toolchain and some compiled scripts as a "generic malware", even though binaries are not malicious or infected.
14:51The best you can do is to mark toolchain as a false-positive and whitelist all Red-related folders. Or to swith to more adequate AV.
Tovim
14:54Please, what does it mean the "AV"? Thank you.
9214
14:54Anti Virus, gee.
Tovim
14:57Mea culpa! Windows Defender is free as a part of the instalation. Till now no problems. Maybe it could work with setting less defence activities. Will try. Thank.
9214
15:01It looks like Microsoft updates their databases each month (@BeardPower ?), people report false-positives, scanners go quiet, then cycle repeats.
BeardPower
15:11@9214 Yes. The whitelist the FPs once reported and confirmed. This changes their "AI" based heuristics and their scanner is triggered again.
15:11This time with another FP of the same software.
15:12What was Trojan.Gen.Cheese last week is Trojan.Gen.Boon this week.
Tovim
15:18Well, my respective Trojans were: Win32/{Fuerbos.A!cl, Fuerbos.C!cl, Unwaders.C!ml} - in turn.
9214
15:23https://docs.microsoft.com/en-us/windows/security/threat-protection/intelligence/malware-naming
dander
17:25MS has a site for submitting binaries for false positive results
17:26https://www.microsoft.com/en-us/wdsi/filesubmission
17:27I think a real person looks at them
Tovim
18:37Hi @dander, I have visited the "/filesubmission" page and submitted my problem. Going to inform this forum. Thanks.
Oldes
18:50@dockimbel I found this difference between Red and Rebol - I wonder if it is intentional:
Rebol:
>> all []
== true

Red:
>> all []
== none

endo64
18:57Would be nice to add to https://github.com/red/red/wiki/%5BDOC%5D-Differences-between-Red-and-Rebol if it is intentional.
18:59I remember that all [] == true was intentional.

rebolek
06:21Hm, what is better?
06:23Evaluates, returning at the first that is not true. - One can argue that in empty block, no value is not true, so it shouldn't return none.
temperfugit
17:04FYI I dug out an old tablet that also runs Windows 8.1. I can confirm that trying to display an image in View with the nightly build doesn't work on either Windows 8.1 device, and also the Red console doesn't have a flashing cursor to show where you are on the line. The stable 0.63 binary displays images and the cursor just fine on these devices.
dockimbel
20:37In R3:
>> all []
== true
>> any []
== none

It's probably safer to return none in both cases as Red does.
20:38@temperfugit We'll try to find a Windows 8.1 box to reproduce that here. (@qtxie)
rebolek
20:48It's probably safer to return *same value* in both cases. If it should be true or none is other question.

dander
07:37To me, the literal all [] doesn't have much meaning to me, but when I try to imagine the kind of situation where that case would occur, I think the Rebol version makes more sense. This could come up while dynamically collecting conditions under which some action is taken. Using all implies that if any of the conditions are not met, then the action would not be taken. Eliminating all the conditions would imply that the action be taken unconditionally.
rebolek
07:39@dander Yes, I agree with that.
rcqls
08:16@dander Your explanation is certainly why julia, R and python answer respectively true and false when executing all([]) and any([]) .
9214
08:20I agree with @dockimbel, any and all on empty block should return none, because there are no expressions inside the block to base our condition. If that's desired, user can check if block is empty? in advance.
rebolek
08:20@9214 There are no expressions, so none of them returns false. Therefore, the result should be true.
9214
08:22@rebolek absence of false does not automatically means true.
rebolek
08:24Yes, but it also does not automatically mean none also. You can argue for both and what's more practical should be implemented.
9214
08:25none at least prevents condition from executing code, as in if all [][...]
08:26In edge cases like that I'd rather prevented potential error from spreading.
rebolek
08:26The question is if that's desirable. OTOH, if all[][...] can be rewritten as all [...] anyway, so from this POV, we don't lose anything when all [] returns none.
bitbegin
09:27@temperfugit @dockimbel @qtxie to modify manifest's will fix these two issues
09:27default is for win10
09:58As GetVersionEx is depcated, maybe we should use VersionHelper to get system version
Tovim
15:24Hi @dander and @9214, submitting red.exe for inspecting at microsoft.com is informative but doesn´t help. Marking it as a false-positive in Windows Defender works. Hopefully, it will not be needed in some not far future. Thank you.

9214
15:24@Tovim the issue with false-positives is a long-standing one, and unlikely to go anythere in the near future.
Tovim
15:27Maybe, but why didn´t it occur to me before?
9214
15:29@Tovim because Microsoft periodically updates their heuristics and databases, and because not all scripts you write can be mistaken for malicious software.
15:30See [here](https://github.com/red/red/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Atype.AV+)
qtxie
21:53@temperfugit Pushed a fix. The view should work fine on Win8.1 now.

temperfugit
00:32@qtxie It is working now. Thank you!
xqlab
13:29Why does Rebol anf Red offer three truth values? none is neither true nor false, so I am for none as result of empty conditions.
9214
13:31@xqlab where did you see 3 truth values?
13:31In conditional expressions, any value except false and none is counted as "truthy".
13:32> none is neither true nor false

none is false in logic sense, not in datatype sense.
xqlab
13:36sorry, just my wish
13:38If none always means the same as false, why is it existent in Rebol ?
13:40
>> none? true
== false
>> none? no
== false
9214
13:41none is not the same as false, they are values of different datatypes.
xqlab
13:45Why a different datatype, if the meaning is the same? There are already other words for false like no or off with the same type.
9214
13:47Their meaning is anything but the same.
xqlab
13:50So tell me what's the reason for none according your opinion
9214
13:56none!denotes the absence of value or result, akin to null, logic! denotes boolean values.
13:57According to Rebol and Red documentation.
xqlab
14:00So none should be neither true nor false
9214
14:02By what logic..?
xqlab
14:16null ist neither true nor false
Tovim
14:57Still wading in improper installed red.exe application. New scenery today. Trying to download fresh binary file at the Red/Downloads page, I got this FireFox message:
Your connection is not secure. The owner of static.red-lang.orh has configured their website improperly. Static.red-lang.org uses an invalid security certificate. This certificate expired on October 10, 2018, 12:33:02 PM. Error code (link): SEC_ERROR_EXPIRED_CERTIFICATE. There follows a text with the certificate chain.
This text am I able to sent as a mail attachment, when needed.
9214
15:28@xqlab I don't follow what are you trying to say and why you're saying it in /bugs room.
Tovim
19:03Back to my input at 16:57: There seems to be no problem with an invalid certificate now. Thank you.

xqlab
05:11@9214 the discussion started about
05:13
>> all []
== true
>> any []
== none
maximvl
08:49Hello, I wonder if someone can test this https://github.com/red/red/issues/3080 in the new pre-release build to check if it's fixed, thank you :)
08:49hm, let me also do it myself first
09:07ok, crash still happens on date: 11-Oct-2018/10:49:41+02:00 build
ne1uno
13:50no crash RED: [ branch: "master" tag: #v0.6.3 ahead: 1073 date: 9-Oct-2018/23:49:12 commit: #b313e166528c31c0276dfd28118d4043bc525917 ]
13:50PLATFORM: [ name: "Windows 7 Service Pack 1" OS: 'Windows arch: 'x86-64 version: 6.1.1 build: 7601 ]
13:53@maximvl
meijeru
18:55As requested by @dockimbel : here are my favorite tickets -- I have selected ones that are either relatively easy to resolve, or real obstacles to proper operation. All the other ones that I ever submitted, and that are still open, can wait a little while more (some 80 issues in all). BTW #2661 has been built and can be closed.
#2518, #2633, #2674, #2812, #3329, #3379, #3424, #3516, #3517
9214
23:24any idea why do path in the case below returns false?
>> a: [b c]
== [b c]
>> do 'a/b
== false
>> reduce 'a/b
== c
23:26and then
>> do quote a/b
== a/b
>> do quote :a/b
== c
>> do quote 'a/b
== 'a/b

dockimbel
04:07@meijeru Thank you. :+1: @greggirwin Let's put those tickets in the todo-list for the new release.
04:08@9214 Looks wrong, worth a ticket.
maximvl
08:40@ne1uno I see, but linux still has the problem :(
08:45there also was a startup issue that I can't start Red from other programs
09:29reported: https://github.com/red/red/issues/3562
09:30I understand it's coming from some Rebol hackery, but nonetheless it limits the usage
9214
09:30@maximvl citing readme:
> Note: Running the Red toolchain binary from a $PATH currently requires a wrapping shell script (see relevant tickets: #543 and #1547).
maximvl
09:34@9214 just tried, I don't get the error with a wrapper, but also no output =\
9214
09:41@maximvl shouldn't it be print 5 + 5?
maximvl
09:41I tried both ways
09:50it also works with ipython but not with python %)
09:53anyway I put all my findings into the issue
dsunanda
11:28Is this a known bug (/fix!). In R2 lines 2 and 4 invoke the function. In Red, only line 4 does:
obj: make object! [fun: does [print "--> obj/fun run"]]
do get in obj 'fun           ;; invokes 'fun in R2 only
var: get in obj 'fun
var                            ;; invokes 'fun in Red and R2
9214
11:29@dsunanda this is an intended design choice, do passively evaluates function! values.
11:29https://github.com/red/red/issues/3553
dsunanda
11:40Thanks for the quick answer. Not entirely sure I agree with the change - it seems to add more anomalies than it fixes - such as below. One line runs the function, the other one doesn't.
a: reduce [111 does [print 222]]
do pick a 2
do a/2
9214
11:41@dsunanda this has nothing to do (no pun intended) with do.
https://github.com/red/red/issues/3482
11:41If you index with path!, function will be evaluated. pick with select avoid evaluation.
dsunanda
11:46And FIND works one way while SELECT works another - so it looks to me that we're missing a chance to simplify mental models of what is going on
do find a function!
do select a 111
9214
11:47@dsunanda again, all of your examples have nothing in common with do.
11:48find returns series at position where the first value of function! datatype was found, select treats block as a key/value store and returns a value that follow the key (if any).
11:49do on block simply evaluates a block, do on function returns a function.
dsunanda
11:56Thanks for the explanations. I think I am more regretting the complications this adds in porting code from R2 to Red
obj: make object! [fun: does [print 111]]
do get in obj 'fun             ;; existing code
do reduce [get in obj 'fun]    ;; portable version of code
9214
11:58@dsunanda this two lines boil down to obj/fun.
12:07And, by the way:
>> do in obj 'fun
111
Oldes
16:49> Is this a known bug (/fix!). In R2 lines 2 and 4 invoke the function. In Red, only line 4 does:
obj: make object! [fun: does [print "--> obj/fun run"]]
do get in obj 'fun           ;; invokes 'fun in R2 only
var: get in obj 'fun
var                            ;; invokes 'fun in Red and R2


I consider it to be a bug. But I would use code as @9214 points out above.
16:51But maybe @dsunanda has reason why he used in R2 do get in obj 'fun
16:53On a deeper though, maybe it is not a bug... it can be simplified into:
>> f: does [print 1]
== func [][print 1]
>> do :f
== func [][print 1]
9214
16:54@Oldes :point_up: see my [previous message](https://gitter.im/red/bugs?at=5bc085aa82893a2f3bd03175).
dsunanda
16:59There are now some inconsistencies in handling/ignoring/throwing errors bewteen R2 and Red with code such as below (plus DOing it, and using GET/ANY). To be fair, R2 changed its behavior around version 1.6, so R2 itself has been inconsistent.....and Red is closer to the older R2 behavior.
get in system 'badword
in system 'badword
system/badword
9214
17:01Well, Red is not R2, so I don't understand why you keep comparing them. in returns none if word is not present in an object, accessing non-existend word with path will throw an error, which you can catch or suppress with try and attempt, respectively.
Oldes
17:06I would prefer to have Red behaviour like Rebol. I'm interested in Red because it is close to Rebol2.
17:07@9214 we are comparing Red and Rebol, because instead of you some of us spend years using Rebol.
dsunanda
17:08To a certain extent, R2 is a reference implementation for Red - it certainly should be possible for Red developers to explain why they have looked at the reference, anf taken a different / perhaps better path.
Otherwise we are left on the dark - for example /COMPARE is ignored when SORTing a string in Red, while honored in R2. Oversight or principled design decision? I can't know unless somone is prepared to compare the two and discuss the differences.
Oldes
17:08They don't have to be same, but if there are some design changes, it should be at least documented and explained.
9214
17:13> /COMPARE is ignored when SORTing a string in Red, while honored in R2

?
>> sort/compare "cbcaabcacc" func [x y][x < y]
== "aaabbccccc"
>> sort/compare "cbcaabcacc" func [x y][x > y]
== "cccccbbaaa"
dsunanda
17:17But......
sort/compare "cbcaabcacc" func [x y][x > y]
== "aaabbccccc"
sort/compare "cbcaabcacc" func [x y][x < y]
== "aaabbccccc"
9214
17:18What's that suppose to mean?
>> sort/compare "cbcaabcacc" func [x y][x > y]
== "cccccbbaaa"
>> sort/compare "cbcaabcacc" func [x y][x < y]
== "aaabbccccc"
>> sort/compare "cbcaabcacc" func [x y][x > y]
== "cccccbbaaa"
>> about
Red 0.6.3 for Windows built 6-Oct-2018/7:28:28+05:00 commit #dafc828

dsunanda
17:19second sort should be reverse of first. One has a "< " while the other has a ">"
9214
17:20@dsunanda okay, that's the case in both of my snippets, all susequent function have different comparators.
17:20While in your case it somehow ceases to work. Which version are you using?
dsunanda
17:23Okay, thanks -- I can see it now working on the current daily. Not working on the current public, stable release.
9214
17:25I think I already mentioned that it's better to grab updates regularly, instead of sticking to a year old build with lots of unfixed bugs.
17:26This is the second time it causes confusion, when you report a bug and it's already been fixed.
dsunanda
17:33You have mentioned that before. But I am not a developer OF Red, I am a developer IN Red - or, at least, I am evaluating it it see whether it is useful. I will routinely use what the website itself defines as the stable version. If that stable version is triggering too many bug reports, that is an issue for the development team - not us users.

And remember, I never reported the SORT issue as a bug -- It is/was a difference between R2 and Red - and you have seemingly ruled out differences as issues for discussion in Red forums ("Well, Red is not R2, so I don't understand why you keep comparing them"). Ditto some dozen or so other undocumented behavior differences that I am aware of.
9214
17:42Don't you think "stable version of _alpha_ software" is a somewhat vague term, and that you should at least consider to use nightly build when regular Red developer suggests you to do so, instead of interpreting information on the website as the ultimate truth?
Changes happen on a daily basis, and if you want a pleasant experience while evaluating Red, as a user, then I suggest to do at least semi-regular updates, which, fortunately, are two clicks away and take almost none of your time.

Initial design goals clearly stated that Red aims at least at 90% compatability with R2, not 100%, and significant changes gonna happen on the road to 2.0. Not a single promise was given about documenting or even "justifying" any deviations from Rebol, as far as I can tell. In some cases R3 behavior was chosen instead of R2, somewhere Red team implemented a change or innovation of its own. I do not agree that Red should "stick to the roots" and avoid innovation, otherwise it will just remain where R2 and R3 were left.
17:52Comparisons with Rebol are welcomed if you have a strong justification for them, and if they make a general sense. "Red should follow Rebol because I have trouble porting my code" is not a strong justification IMO. Provide concrete, specific use-cases, and we'll see what we can do.
dockimbel
21:58@dsunanda Some of your questions were answered during R3's development, and Red simply chose to follow some evolutions/fixes from R3. If you find a behavior that differs both from R2 *and* R3, then we do owe you an explanation. ;-)
22:00One evolution that R3 started and that Red is continuing is the elimination of variable-arity behaviors. R3 eliminated it in make and Red pushed the consistency by forbidding it from do too. So, the cases where do could consume an arbitrary number of argument values following it are forbidden. The goal was to make R3/Red more easily statically analyzable.
endo64
22:48draw changes it block! argument If I don't copy, it looks like a bug;

d: [box 0x0 10x10 box 20x20 10x10]
c: copy d
view [base 100x100 green draw d]
probe d
probe c = d

== [box 0x0 10x10 box 10x10 20x20] (d changed)
== false

22:51But strangely, if I execute same line view [base 100x100 green draw d] with the changed block, it still draws the original block.
9214
22:52@endo64 because, technically, it's the same box, just with two coordinates swapped around.
endo64
22:53@9214 correct, 2 AM is a bit late to think :)
9214
22:54Tell me about it
>> now/time
== 3:53:49

It looks like normalization of some sort.
BeardPower
22:56@9214 Huh? Since when are two boxes with different edge points the same box?
9214
22:58@BeardPower how many boxes do you see here?
? (draw 500x500 [box 100x100 200x200 box 200x200 100x100])
22:59The differ only in order of drawing commands, but the geometric shape itself is the same.
BeardPower
22:59Two.
22:59But the edge point is different.
22:59Top left and bottom right.
9214
23:00@BeardPower so, how many boxes do you _see_? :wink:
BeardPower
23:00It should not draw it like that.
23:01Because box one starts at 100x100 and box two at 200x200.
23:01So how can it be the same.
9214
23:01[![изображение.png](https://files.gitter.im/red/bugs/OOqJ/thumb/___________.png)](https://files.gitter.im/red/bugs/OOqJ/___________.png)
BeardPower
23:01It's a bug.
23:02Why should one box be drawn from bottom right to top left?
23:02And box one from top left to bottom right?
9214
23:02Ah, yes, you're right.
BeardPower
23:02It makes no sense.
9214
23:03top-left / bottom-right coordinates. Definitely not the best time for thinking :confused:
BeardPower
23:03It seems that it switches drawing order if the second edge has coordinates less than the first edge.
9214
23:04@BeardPower yes.
23:05@endo64 sorry, I confused you. Worth to file a ticket in such case.
BeardPower
23:06Is it a feature or a bug? :smile:
9214
23:06... unless @BeardPower is way over midnight here too.
endo64
23:06@9214 No problem, I'll do it.
9214
23:06Reminds me of the tale about 3 blind men and an elephant.
BeardPower
23:0601:06
23:07@9214 lol :+1:
endo64
23:21It doesn't just re-order, it mixes the coordinates:
>> view [base 100x100 green draw x: [box 20x20 10x10 box 15x5 0x10]]
>> x
== [box 10x10 20x20 box 0x5 15x10]

Where did 0x5 and 15x10 comes from?
23:23#3564
BeardPower
23:24A box cannot have an offset of 0.
23:24Definitely some bonanza going on.

toomasv
04:23@BeardPower Why not? Draw-coordinates are 0-based. E.g. if you want to draw border for panel:
view [panel with [draw: compose [box 0x0 (size - 1)]]]
04:25@endo64 It is very convienient. To ensure box is drawn it seems to take min coord1 coord2 max coord1 coord2 for coordinates.
endo64
07:52@toomasv Yes. The issue is draw modifies its argument. If this is expected, we should always copy before giving our block to draw.
BeardPower
10:12@toomasv That would not be a border, because of the 0x0 edge. It would need to be 1x1 for an inside and -1x-1 for an outside border. But I was not talking about 0x0 as the starting edge but 0x0 as the opposite edge. 10x10 0x0 would draw nothing as it's dimension would be zero.
10:14 So it's neither a box nor a line or even a single pixel.

endo64
19:20Is this a bug?
>> type? 1:2:-3
>>       ; no output

>> d: type? 1:2:-3
>> d
== time!

>> 1:2:3
== 1:02:03
>> 1:2:-3
>>    ;no output

rebolek
19:21@endo64 try probe d
9214
19:21@endo64 Huh
>> [1:2:-3]
== [1:02:00 :-3]
rebolek
19:21:mouse:
9214
19:21@endo64 what you're getting is unset! from :-3.
19:21Kawaii! Sugoi-sugoi desu ne :^3
endo64
19:22Yes, I just saw:
>> probe reduce [ 1:2:-3]
[1:02:00 unset]
19:22So desu ne :)
meijeru
19:25In time! literals, there can only be a minus sign in front, not in the other parts. What is wrong here IMO is that there is no good error handling/message. Worth a ticket?
9214
19:25@rebolek will you DJ ID&T set at RedCon?
19:25You know what track should come first :mouse: :rocket:
19:26@meijeru but it lexes correctly, sort of.
meijeru
19:28No it does not, since 1:2: is not a legal time literal, not even for 1:02:00 and even it it were acceptable, then -3 should not become unset.
9214
19:28@meijeru but 1:2 *is* a legal time literal.
19:28And :-3 is a legal get-word!.
rebolek
19:30@9214 this is an interesting idea but I'm afraid there won't be an opportunity.
meijeru
19:31@9214 Yes, that is the way the lexer looks at it. So the trouble (if it is considered trouble) is in the fact that there need not be a space between the two lexical items. Perhaps there should be a requirement in this case...
19:33Because this can surely be considered a "gotcha"
rebolek
19:38@meijeru I agree that the space should be required. Red is not a can of sardines or Hong Kong flat. More space is good.
19:40But :-3 being legal get-word! is very problematic IMO.
meijeru
19:59One could indeed argue that, since -3 is not a word, :-3 should not be a get-word. Apparently the lexer grammar has not been so exhaustively tested.
9214
20:01
text
>> foreach x probe reduce [-3 '-3][probe type? x]
[-3 -3]
integer!
word!
== word!
rebolek
20:02This is certainly a problem.
dockimbel
20:41Please log that :-3 issue in a ticket.
9214
20:50https://github.com/red/red/issues/3569
dockimbel
21:30:+1:

x8x
21:39Is Red CLI supposed to work in Cygwin Terminal on Windows (7 here) ? CLI Console starts but I don't get a prompt:
21:40[![Screenshot 2018-10-23 at 04.37.53.png](https://files.gitter.im/red/bugs/iVvm/thumb/Screenshot-2018-10-23-at-04.37.53.png)](https://files.gitter.im/red/bugs/iVvm/Screenshot-2018-10-23-at-04.37.53.png)
21:41And btw, what is the latest/best more linux like Console that can be installed on Windows 7 ?
BeardPower
21:43@x8x http://babun.github.io/
ne1uno
21:43mintty?
x8x
21:46Wired, after a CTRL-C to exit the Red CLI Console, I get this:
21:47[![Screenshot 2018-10-23 at 04.43.28.png](https://files.gitter.im/red/bugs/BtfP/thumb/Screenshot-2018-10-23-at-04.43.28.png)](https://files.gitter.im/red/bugs/BtfP/Screenshot-2018-10-23-at-04.43.28.png)
BeardPower
21:55Seems like the return value.
x8x
21:59Thanks @BeardPower and @ne1uno ! :smiley:
21:59I get the same with babun, no Red prompt. Any ideas?
ne1uno
22:00old gui still has Xp support?
22:02or maybe Xp code isn't in cli? maybe build cli local from R2 see if that works
x8x
22:28@BeardPower Does it work for you? You get a Red prompt?
BeardPower
22:44@x8x I run Win10, not Win7.
x8x
22:53@BeardPower Ok thanks! Anyone on Win7 could test?
ne1uno
22:56what is in this thing for 225meg ziped? electron?
x8x
22:57@ne1uno I thought the same... actually it includes all cygwin
ne1uno
22:59uses mintty anyway
23:02won't the red cli console just pop open its own window on windows?
x8x
23:02Yea, should have gone with mintty as I had cygwin installed already, but less time I spend in Windows the better.. The good think is you click the dot bat file and it does all the magik and you get a Console up and running when it's done.
23:04@ne1uno Yea but I was testing ASCII colors in a red.exe --cli console.
ne1uno
23:14x8x: I get silent exit with any version of cli, your latest colors.red, runs in gui but just shows ansi codes
23:15win7
x8x
23:16Yea, no ANSI colors in GUI that way I was trying on a normal console..

ne1uno
00:36an older version of colors or copied from chat did turn prompt red, but otherwise shows debugging output
03:01x8x: seems like cli console blocked for me too in babun zsh in win7, shows header but no prompt. I'll see if search has any help
03:30plain minGW mintty acts the same as on cygwin.
05:14you can run something in its own window, cygstart /path/console.exe path\prog.red
05:14but the path gets translated to forward slashes. is it possible console is getting hung trying to find the cfg file?
05:15when run from inside the terminal
06:52python -i sort of works, not sure what else -interactive mode is good for
07:34https://code.google.com/archive/p/mintty/issues/56 it's a known issue, https://github.com/rprichard/winpty a tool for Cygwin and MSYS for running Windows console program
x8x
12:26@BeardPower So this works on Win10 but not on Win7? I had the old Console work in Cygwin IIRC about a year ago.
BeardPower
14:24@x8x In bambu and Win10 it has the same behavior as yours. gui-console.exe opens the GUI REPL but also a console, so what you type in the GUI-console is replicated in the console. Starting console.exe will not eval anything until you exit it.
x8x
15:58@BeardPower console.ext you mean same asred.exe --cli ?
BeardPower
16:03@x8x Yes, the compiled REPL.
Oldes
20:10Checking REBOL vs Red again and found that in Rebol2:
>> select/part (skip [1 2 1 2 1 2] 2) 1 2
== 2
>> select/part (skip [1 2 1 2 1 2] 2) 2 2
== 1

While in Red:
>> select/part (skip [1 2 1 2 1 2] 2) 1 2
== 2
>> select/part (skip [1 2 1 2 1 2] 2) 2 2
== none

@dockimbel which one is correct? I would say that Red's result. Right?
20:25But it seems to be inconsistent with:
>> select/part  [1 2 1 2 1 2] 2 2
== 1
dockimbel
22:06@Oldes On first look, it should work like in Rebol. /part limits the search for the key, but should not affect the reachability of the value. So the following case should be considered a bug:
>> select/part (skip [1 2 1 2 1 2] 2) 2 2
== none
Oldes
22:21Hm... I'm not sure if reaching value out of the part range is the good one.
greggirwin
23:37If /part limits the same for select and find, it's then a matter of documenting this subtle behavior.
23:39Instinctively, I thought the same as @Oldes but technically, R2's behavior seems easier to reason about.

dockimbel
00:41This is what the docstring says for select/part:
/part        => Limit the length of the search.

It only applies to the searching of the key, not to the value retrieval.
Oldes
07:48I still think the value should not be selected out of bounds. I imagine the /part as a feature where I don't have to cut the series to do actions on it. Selecting out of the given range seems to be odd to me. I wonder if someone have a real use case.
dockimbel
19:16@Oldes Remember that select ... is just a shortcut for all [pos: find ... pos/2], so select/part ... needs to behave like all [pos: find/part ... pos/2], or that would create a new consistency issue.
Oldes
19:18In my head select/part [1 2 3] 2 2 should be same as select copy/part [1 2 3] 2 2
19:22And if I should use your case, I would say: all [pos: find/part ... (part - 1) pos/2] else it is really selecting out of part bound.
19:24I don't say it is big issue for me... I'm using rebol many years and noticed it just now, because I was hunting issues.
19:27Btw... if I would need current functionality, I could use your way using find/part :) But somehow I feel, that more useful is to be able to do select in given _range_ without need to copy/part the series.
endo64
19:30This still looks like a bug:
>> select/part (probe skip [1 2 3 4 5 6] 2) 4 2
[3 4 5 6]
== none
>> select/part [3 4 5 6] 4 2
== 5
dockimbel
20:23@Oldes
> And if I should use your case, I would say: all [pos: find/part ... (part - 1) pos/2] else it is really selecting out of part bound.

You are still missing it, /part doesn't apply on selecting, but on finding. If you change that, select becomes inconsistent with find.
20:25Let me rephrase it in a simpler way: select = second find. That is the meaning of select and how it is implemented both in Rebol and Red.
Oldes
20:26I'm not missing it... I would just prefer smarter select and not select to be just a shortcut for second find
dockimbel
20:27@Oldes
> Btw... if I would need current functionality, I could use your way using find/part :) But somehow I feel, that more useful is to be able to do select in given _range_ without need to copy/part the series.

That's a job for a new feature we are thinking about (slices). We won't break select consistency with find just for one rare use-case.
Oldes
20:28Ok... than you should at least fix the skip case.
dockimbel
20:29If you are referring to the none result, that's a bug that need to be logged in a ticket.
20:30@Oldes BTW, any chance you can come to Prague on 3rd or 4th at least, or you're definitely not available?
Oldes
20:32Unfortunately I'm not available... we have an Amanita's meeting once a year and it will be exactly 1.-4.11. in Orické mountains.
20:37Here it is: https://github.com/red/red/issues/3577
dockimbel
20:45Thanks!

Oldes
08:34@dockimbel is it by design, that default image color in Red is white while in Rebol it was black?
rebolek
08:36Also, why it's not red? ;-)
dockimbel
21:53@Oldes Yes, same as for web pages, background defaults to white.
endo64
22:14Built-in replace behaves different than newly created one
>> replace [a] 'a does ["x"]
== [func []["x"]]
>> rep: do mold :replace
>> rep [a] 'a does ["x"]
== ["x"]
9214
22:15@endo64 https://github.com/red/red/wiki/[DOC]-Guru-Meditations#compiled-versus-interpreted-behaviors
endo64
22:16@9214 Thanks. Its also different compiled vs. REPL.
22:22Also,
>> replace [a] 'a does ["x"]
== [func []["x"]]
>> replace/deep [a] 'a does ["x"]
== ["x"]


dockimbel
22:50@endo64 On a quick look, the replace body cannot handle safely a function for its value argument, as it would need to refer to it using :value to keep it inactive (otherwise the function would be called). I just tried such fix here and the results are then identical.
9214
22:51@dockimbel but :value suppresses any evaluation.
endo64
23:41@9214 , yes, and I think it is the desired behavior, not the below one.
>> replace/deep/all [a a a] 'a does [random 100]
== [53 81 67]
9214
23:45@endo64 I don't think it really is.
>> foo: func [x y z][replace x y z]
== func [x y z][replace x y z]
>> foo [a b c] 'b (to word! "x")
== [a x c]
>> foo [a b c] 'b 1 + 2
== [a 3 c]

>> foo: func [x y :z][replace x y z]
== func [x y :z][replace x y z]
>> foo [a b c] 'b (to word! "x")
== [a to word! "x" c]
>> foo [a b c] 'b 1 + 2
*** Script Error: + operator is missing an argument
*** Where: catch
*** Stack:
23:54Referring to does [...] with :value will yield does word, not the function.
23:56Besides, if you really want to replace something with a function! value:
>> type? second probe replace [a b c] 'b reduce [does ['x]]
[a func []['x] c]
== function!

rebolek
00:16What...
>> replace [a b c] 'a 'x
*** Script Error: a has no value
*** Where: find
*** Stack: replace
dockimbel
00:34@9214 I meant using :value in the replace body, not in its spec block.
9214
00:34@dockimbel ah, that makes sense.
dockimbel
00:35@rebolek Works fine here.
rebolek
00:36@dockimbel ok, I will try to rebuild and see if it's better
00:38Fine now, thanks.
endo64
06:19@rebolek it was a regression after adding /case refinement fixed recently.
rebolek
07:14@endo64 Ah, ok. Thanks!

x8x
20:57@rebolek Looks like @qtxie fixed the issue with Arch and read http.., latest nightly runs fine on Manjaro.
rebolek
20:58@x8x yes, he fixed it two or three weeks ago, IIRC.
20:5916.10 exactly :)

dander
07:12I can't get the clock demo to run from the current GUI console on Win 10
07:28This snippet seems to be enough to cause the console to crash
clock-demo: {
    base rate 1 now
}

view [
    title "test"

    source: area 410x300 clock-demo 

    panel 200x300 react [
        attempt/safer [face/pane: layout/tight/only load source/text]
    ]
]

Commenting the base rate 1 now part will allow it to come up, and then it can be un-commented and won't crash any longer (the whole demo will work by that point as well). So it appears to be related to the initial load.
07:29I'm heading to bed, but maybe someone can confirm whether they see this as well?
rebolek
07:30@dander crash confirmed
toomasv
08:03@dander With latest build it crashes. With my older Sep 28 build it works. Somewhere regression crept in.
endo64
10:52Crash confirmed on W10, only on GUI console
dockimbel
15:34Confirmed here too on W10. @qtxie that one is for you. ;-)
greggirwin
15:52Confirmed here too. Is that enough to consider it mined?
dander
17:35:smile: thanks all. Issue #3580 reported
endo64
18:59probably @qtxie will solve it in 5 minutes :)
rebolek
21:23Should all accept unset! as truthy value? My guess is that it shouldn't, but:
>> all [get/any first [sfsafsa] "no"]
== "no"
endo64
21:39@rebolek It wasn't before, but I remember Carl decided to relax it for some use cases in Rebol. Red follows that decision.
A simpler example isall [print 1 "no"]
rebolek
21:40I see, I can live with it.

hiiamboris
11:01Script:
Red []
? system/script/args
? system/options/args
? system/options/path

Command:
D:\torrents\musick\2014.07.16 - Kalafina THE BEST ''Red''>d:\gear\red2 ticket26.red "Kalafina - THE
BEST ''Red''.mkv"

Those '' inbetween are actually two apostrophes
Ironically, Red sees THE BEST prefix as too much flattery ;)
Output:
SYSTEM/SCRIPT/ARGS is a string! value: {"Kalafina - THE BEST {}Red{}.mkv"}

SYSTEM/OPTIONS/ARGS is a block! value.  length: 1  ["Kalafina - THE BEST {}Red{}.mkv"]

SYSTEM/OPTIONS/PATH is a file! value: %/D/torrents/musick/2014.07.16%20-%20Kalafina%20THE%20BEST%20''Red''/

Note how '' becomes {}. W7 x64 latest. Anyone can confirm on other platforms?
endo64
13:39Confirmed on Win10, though the last one looks different, there is no double ' char:
SYSTEM/SCRIPT/ARGS is a string! value: {"Kalafina - THE BEST {}Red{}.mkv"}
SYSTEM/OPTIONS/ARGS is a block! value.  length: 1  ["Kalafina - THE BEST {}Red{}.mkv"]
SYSTEM/OPTIONS/PATH is a file! value: %/C/Users/endo/Documents/2014.07.16%20-%20Kalafina%20THE%20BEST%20'Red'/
hiiamboris
13:50@endo64 thanks. And I thought at least options/path is reliable... ;)
14:06https://github.com/red/red/issues/3581
meijeru
22:13Discovered something that is either a bug or a feature:
>> b: [1 2 3]
== [1 2 3]
>> b/(#"^B")
== none
>> pick b (#"^B")
== 2

What does the community think?
22:17For me, the none result makes sense, but the fact that pick allows characters instead of integers as index is an unexpected extension.
22:18Neither Rebol 2 nor Rebol 3 allow this.

toomasv
05:15@meijeru Also
>> b/(to-integer #"^B")
== 2
>> pick b #"^B"
== 2
endo64
05:56pick's index argument is scalar and it converts it to integer. We need to use select for that case. R2 and R3 returns error or none?

novvorto_twitter
05:41@9214 Strangely,
>> to get-word! "-3"
*** Syntax Error: invalid character in: "-3"
*** Where: to
*** Stack:

Is there a way to check the datatype of :-3 alone?
05:43I thought all literals cannot be turned into a get-word!. Then how come 1reduce [1:1:-1] gets and unset?
05:47
>> to get-word! "peter@yahoo.com"
*** Syntax Error: invalid character in: "peter@yahoo.com"
*** Where: to
*** Stack:

>> to get-word! {#"a"}
*** Syntax Error: invalid character in: {#"a"}
*** Where: to
*** Stack:

>> to get-word! "1:1:1"
*** Syntax Error: invalid character in: "1:1:1"
*** Where: to
*** Stack:

>> to get-word! "1"
*** Syntax Error: invalid character in: "1"
*** Where: to
*** Stack:

gltewalt
23:29
>> type? first [:-3]
== get-word!
23:57
>> type? quote :-3
== get-word!

23:59
>> type? quote print
== word!

>> type? quote true
== word!

>> type? quote #[true]
== logic!

meijeru
10:05@endo64 R2 returns error, since the pick argument is number! logic! pair! . Red's pick argument is of a wider typeset, which supposedly has good reasons. But this particular case could still be caught. Shall I make an issue?
endo64
11:20@meijeru It might be worth a ticket with your example:
b: [1 2 3] s: "123"
pick b #"^B" ; == 2
pick s #"^B" ; == #"2"
pick s 1.9 ; == none

It doesn't explicitly convert its index argument to integer. It happens only for char! type.
Oldes
11:58The [char!](https://github.com/red/red/blob/master/runtime/datatypes/structures.reds#L203) value has internaly same structure like [integer!](https://github.com/red/red/blob/master/runtime/datatypes/structures.reds#L155) so no need for conversion.
12:08You can see how the index is received here: https://github.com/red/red/blob/master/runtime/actions.reds#L94-L109
12:13I'm personally quite not sure, if picking using char! index is useful enough.
endo64
14:57Picking using char! doesn't look useful to me, just confusing.
toomasv
16:30It would be interesting to see use-cases for all types allowed as indexes:
>> ? pick
USAGE:
     PICK series index
;...
ARGUMENTS:
     series       [series! bitset! pair! tuple! date! time!] 
     index        [scalar! any-string! any-word! block! logic! time!] 

>> ? scalar!
SCALAR! is a typeset! value: make typeset! [char! integer! float! pair! percent! tuple! time! date!]

>> ? any-string!
ANY-STRING! is a typeset! value: make typeset! [string! file! url! tag! email!]

>> ? any-word!
ANY-WORD! is a typeset! value: make typeset! [word! set-word! lit-word! get-word!]
rebolek
16:37And it would be great to add path as index, as I mentioned on Red Devcon.
9214
17:08@rebolek wouldn't they clash with date! values?
>> 06/11/18
== 6-Nov-2018
rebolek
18:40@9214 when written as make path! [6 11 18], then no. Yes they can't be loaded, but they are not forgotten also.

hiiamboris
13:51
>> i: make image! [1x1 0.0.0.0]
== make image! [1x1 #{000000}]
>> i/(1x1)
== 0.0.0.0
>> i/(1x1): 1
== 1
>> i/(1x1)
== 9.0.0.0
>> i/(1x1): 10000
== 10000
>> i/(1x1)
== 9.0.0.0

shouldn't it tell me I'm doing nonsense instead? or there's a meaning?
meijeru
17:45See issue #2883. The integer is supposed to be used as a four-byte quantity, but apparently, there is a programming mistake. A new issue should be raised.
hiiamboris
meijeru
17:57It is even more curious that poke gives another result than path expression:
>> i: make image! [1x1 0.0.0.0]
== make image! [1x1 #{000000}]
>> poke i 1x1 1
== 1
>> i
== make image! [1x1 #{0B0000}]
hiiamboris
18:03noted that in https://github.com/red/red/issues/3582

endo64
21:52to integer! on a unicode char returns incorrect result?
>> to binary! #"Ü"
== #{C39C}
>> to integer! #"Ü"
== 220
>> to integer! to binary! #"Ü"
== 50076

21:53220 is the ANSI code for Ü char in Turkish-1254 (or 8859-9)
hiiamboris
22:51
>> to binary! #"☺"
== #{E298BA}
>> to binary! to integer! #"☺"
== #{0000263A}
22:54brings us here https://www.utf8-chartable.de/unicode-utf8-table.pl?start=9728&names=-
and then my guess is to binary! ... encodes into utf8, while to integer! ... into utf32
22:56and #"Ü" is also 220 in latin-1, so is in utf-32...

meijeru
08:53Your guess is correct.
11:35However, it would perhaps be better if to-binary on a character yielded the Unicode Point number, just as to-integer does, and the UTF-8 encoding would only be used for strings. What does the community think?
hiiamboris
11:49methinks it's more uniform the way it is now:
>> a: b: #"♥"
>> rejoin [to-binary a to-binary b]
== #{E299A5E299A5}
>> to-binary rejoin [a b]
== #{E299A5E299A5}
11:53otherwise I'll have to convert every char to string first... which is an extra action (suppose I'm processing strings and work on single chars)
meijeru
12:22It is true that one can always do to-binary to-integer to get the other result.

Rebol2Red
11:09Why do i get 16 times the character -?
loop 5 [ prin {-} ] print []

When i execute the code directly into the console (0.6.3) i get 5
If i put the code into a red file ex. testing.red
Place it into the same map as my red-exe.exe
Execute it with: red-exe.exe testing.red
I get 16 in the opened console window
Strange, because when i put the code into that opened console window, i get 5???

Nedzadarek:
@Rebol2Red You are right (at least on the new console). Can you post it into [/bug room](https://gitter.im/red/bugs) as well? Maybe it was fixed.
ps. new console: Red 0.6.3 for Windows built 22-Oct-2018/18:39:48+01:00 commit #d3c8c4f
old: Red for Windows version 0.6.3 built 26-Mar-2018/1:14:22+02:00

I tested it with the latest build:
Red 0.6.3 for Windows built 8-Nov-2018/8:26:02+01:00 commit #06ddce9
Not fixed.
hiiamboris
11:21I confirm though only GUI console seems to be affected
11:23the count of -s being output with loop N [...]is 2^(N-1) for some reason
11:25maybe it modifies (corrupts) the initial {-} string and then adds it to itself?
11:26
Red []
loop 10 [ prin s: {-} ] print []
? s

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
S is a string! value: {--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------}

>>
11:28@Rebol2Red please ticket this ☺
ne1uno
11:50old gui ok too
lepinekong_twitter
21:32Red has regressed: this doesn't return empty string instead of final url:

command: {"C:\Windows\System32\curl.exe"  -Ls -o /dev/null -w %{url_effective} https://aka.ms/win32-x64-user-stable}
    url>: copy ""
    err: copy ""
    call/shell/output/error command url> err

hiiamboris
22:46wine?
9214
22:46@hiiamboris PEBKAC
hiiamboris

greggirwin
22:12Picking on char values doesn't seem too useful to me. As others said, it may be more confusing, and you can be explicit about it.

Similar for the binary encoding of chars, as @hiiamboris noted.

We should doc both points.
22:22@lepinekong_twitter do you have an example of old and new behavior? Not sure what you mean, but call always returns an integer value.

rebolek
06:13I got some ridiculous errors, unfortunately it's not in simple code, so it's hard to isolate. Example:
*** Script Error: empty? does not allow string! for its block argument                        
*** Where: rejoin
ne1uno
06:22can you increase trace size? system/state/trace: 22 it's way too easy to get stuck with un-runnable errors
rebolek
06:25I haven't pasted the stack as it's not the point. The point is that the error should say rejoin does not allow string! for its block argument. empty? 1) allows string!, 2) has no block argument.
9214
06:26@rebolek perhaps you accidentally redefined something?
rebolek
06:27@9214 when I look at source of empty? and rejoin, they're fine.
9214
06:28And the error persists on a fresh run?
rebolek
06:28yes, it's on fresh run
9214
06:29Well, idk, if it appeared after some change in code - try to locate the culprit . Otherwise try to track down specific Red version which introduced the regression.
rebolek
06:31Of course. I was just curious if anybody has seen similar problem.
9214
06:32@rebolek how big is your code, by the way?
rebolek
06:33~45kB, it's Values script.
9214
06:34https://gitter.im/red/help?at=5be8a9303102f145218828d9

Starts to look suspicious.
06:35And, as a very wild guess, try it with GC turned off.
rebolek
09:20I've fixed the source of the error in my code, but I'd like to get back to it and see where the problem can be.
meijeru
10:33Unfortunately, I too have some unexplainable malfunctions (view does not show anything, or a draw block is not rendered after a change) that cropped up after GC was introduced. Again, it is in fairly large programs and difficult to isolate.
lepinekong_twitter
10:45@greggirwin I'm not talking about return value, I'm talking about url> output var which should contained the final redirected url.
toomasv
10:55@meijeru Have you tried system/view/platform/redraw ?
meijeru
11:04@toomasv I have now. Doesn't work. I checked that the draw-block was changed, but the change does not appear even with redraw.
11:07It does occur after an unview followed by a view, with a recalculated layout.
11:22I have also tried to turn GC off, but there is no difference.
toomasv
12:19@meijeru Did you try also /draw: /draw ? This has always worked for me.
meijeru
12:29Thanks a lot! This works. But it is a kludge, and there must be an underlying issue. Has that been reported?
12:31Namely, it is not necessary after the first call of view.
toomasv
12:33I haven't researched it but I suspect it has something to do with subseries in draw. I may be totally wrong though. May be intial show would also help?
meijeru
14:17It is true that the changes in the draw block are performed by poke on individual elements. So it could be a bug in the reactivity mechanism...
toomasv
14:28Does anyone confirm that alert "msg" does not close on clicking "ok"?
meijeru
14:34Yes - I just tried it with the latest W10.
14:35Looking at the source, there is no [quit] on the button!
greggirwin
14:39Should maybe just be unview, rather than quit, but that's an easy fix for someone. Make a ticket if you want.
meijeru
14:39Also, the argument may be a block! but that should be refused by the VID. Is this a recent addition to the view facilities?
greggirwin
14:40@lepinekong_twitter can you post results with working an non-working Red versions, noting their build dates?
14:41@rebolek can you patch rejoin to see what it's getting when that error happens? Odd indeed.
14:44It gets composed @meijeru, but I agree that there should be a reform there if we want to support blocks, as not all blocks will work directly.
rebolek
14:45@greggirwin it's getting right data, just the error message is wrong.
greggirwin
14:46On the subject of requesters: https://gist.github.com/greggirwin/9cd640ca42bdfd56c5ff4432c4765d2c

Any thoughts or comments are welcome, especially on naming, code structure, and how best to do the images (which are currently very crude).
14:47@rebolek but you shouldn't get that error passing a string to empty?.
meijeru
14:49The alert issue is #3586.
greggirwin
14:52Thanks.
rebolek
14:53@greggirwin but it's not empty? that is causing this error, it's rejoin. There was error in my code, I was passing string! to rejoin, that error got caught, but the function is reported incorrectly as empty?.
greggirwin
14:57Ahhhh.
meijeru
16:17@greggirwin Saw your PR for 3586. What is ^O?
greggirwin
16:20ctrl+o. We should have someone look at accelerator key subsystems, as we don't catch those today. That plays into the UI side as well, as Windows uses & in a caption to underline the hot key.
16:21I don't know what other OSs do in that regard.
meijeru
16:21Why should ^O be used to close the alert? Is it because "OK" starts with an O? Seems far-fetched.
greggirwin
16:24I would prefer Alt+O, with a true accelerator key on Windows, but we can't do that today. It should map to Command+O on MacOS, which I think is the standard. A mac user would have to verify that though.
meijeru
16:33You seem to assume that an accelerator key is necessary at all.
greggirwin
16:42Not necessary, but often nice.
toomasv
19:06It seems that Red lexer is too eager to reckognize Red program.
file try.txt:
Hello Red probe "try"
Red [] probe "Hoi!"

>> do %try.txt
"try"
"Hoi!"
== "Hoi!"

file try1.txt
"Hello Red probe try"
Red [] probe "Hoi!"

>> do %try1.txt
*** Syntax Error: invalid value at {"Red [] probe "Hoi!"}

file %try2.txt
"Hello Reb probe try"
Red [] probe "Hoi!"

>> do %try2.txt
"Hoi!"

It doesn't wait for brackets.

greggirwin
01:11Definitely worth a ticket.
22:02@meijeru, do you want me to remove the ^O shortcut in my PR?
meijeru
22:10Why should you? It is supplementary. The only thing is, one should remember to align it in future to a policy on short-cut keys yet to be decided.
greggirwin
23:14Yes, we need a cross-platform-enabled UI/UX lead.

gltewalt
03:29Generally the Enter Key fires the default button. “OK”
With MacOS Enter would click OK, and by default, Esc would click Cancel.
03:31Also with MacOS, if you use Tab to navigate to a different button, the space bar fires the button event
03:34Inconsistently, Command+First Letter On Button works
03:35Command+. also fires off Cancel
03:38Control+O on windows is equivalent to Command+O on mac, so you had it right
03:39https://support.microsoft.com/en-us/help/970299/keyboard-mappings-using-a-pc-keyboard-on-a-macintosh
greggirwin
17:04Thanks @gltewalt!

dsunanda
09:23Any one else seeing this under Windows? (happens on 0.6.3 stable release, and latest nightly):
Create a simple VID window, eg: view [box 200x200 red].
Now grab the title bar and move it around rapidly - the console window will soon minimize.
toomasv
09:47@dsunanda Yep! ALL my open applications got minimized!
9214
10:54Specifications of native!s support nested definitions of function! (any-function!s ?) in typesets, e.g. parse specifies callbacks signature:
>> probe spec-of :parse
[
    "Process a series using dialected grammar rules" 
    input [binary! any-block! any-string!] 
    rules [block!] 
    /case "Uses case-sensitive comparison" 
    /part "Limit to a length or position" 
    length [number! series!] 
    /trace 
    callback [function! [
        event [word!] 
        match? [logic!] 
        rule [block!] 
        input [series!] 
        stack [block!] 
        return: [logic!]
    ]] 
    return: [logic! block!]
]

However, if I try to create such specification myself:
>> foo: func [a [function! [a [word!]]]][]
*** Script Error: invalid type specifier: [a [word!]]
*** Where: func
*** Stack: foo


Bug / feature / not implemented?
dsunanda
14:47@toomasv Thanks -- I'll add unexpected minimization it as a github issue
toomasv
14:48:+1:
greggirwin
17:16@dsunanda I can't dupe under Win10. Commented on the ticket. What OS are you on?
17:22@9214 it's an expected limitation at this time. There's no plan to add that feature, but it's something that could be part of a dependent types experiment.
dsunanda
18:18@greggirwin Thanks for trying. Strange. Fully patched Win10. Toomas (above) has seen the same issue - don't know what version he's on.
hiiamboris
18:18@dsunanda nope, nothing on W7x64, aero off
greggirwin
18:27@dsunanda do you have any display settings, e.g. scaling, or anything else special in your setup?
dsunanda
18:27 @greggirwin Nothing I can think of - very standard set up, with no other obvious display quirks.
greggirwin
18:29Let's hope @qtxie can dupe then.
dsunanda
18:47Having just spent way too long jiggling random windows around -- it's looking like a quirk of my set up, not one specific to having a Red window running. (Odd, because I explicitly don't have mouse gestures activated). So sorry - very probably a false alarm re Red issues.
toomasv
19:51Yes, not Red's problem. Moving around other apps would do same.
qtxie
23:54> Any one else seeing this under Windows? (happens on 0.6.3 stable release, and latest nightly):
Create a simple VID window, eg: view [box 200x200 red].
Now grab the title bar and move it around rapidly - the console window will soon minimize.

It's a feature of Windows.

dander
06:03it's called [Aero shake](https://www.howtogeek.com/howto/windows-7/disable-aero-shake-in-windows-7/), and can be disabled in the registry. I find it to be pretty annoying.
endo64
12:45Yes it is a feature of Windows sincw Win7 no need an issue. @dsunanda @greggirwin
greggirwin
18:47I closed the ticket.
18:48And thanks for the research @dander .

rebolek
08:05There seems to be problem with help in latest Red, it always returns
Func spec couldn't be parsed, may be malformed.
endo64
12:49Don't we have tests for help function? @greggirwin 's latest commits, making some global words local, may cause this regression, need to check them.
meijeru
15:47See #3593
greggirwin
19:27@endo64 I thought so too, which is how the regression got it. The comment in the help test file says:
; help-string tests pass with quick-test, but full automated tests fail
; when trying to include %help.red. May require -r or -u compilation.
; #include with a relative path for it fails, but `help-string` also 
; doesn't exist if an absolute path is used for the #include.
19:29And my local test must have been against a different build, because I did test help before committing. My fault.
20:33Seems the compiler has an issue, when trying to capture a func the way I did. Interpreted is fine. In help, the inner stack value used by parse-func-spec is fine if we don't capture parse-func-spec in help-ctx. If we do, though, stack (from the inner func-spec-ctx) is then bound to help-ctx it seems, but there's no stack word there. It evals to 12, which is one of the config options. Here's a small test you can run, though the capture version just doesn't show anything when compiled, so I'm not sure what's going on.
Red []

print "Capture test"
outer: object [
    o-slot-1: 1
    o-slot-2: 2
    o-slot-3: 3
    o-slot-4: 4
    o-slot-5: 5
    o-slot-6: 6
    exported-func: none
    inner: object [
        stack: copy []
        set 'exported-func func [][
        	print "In Func"
            ; Calling this func now makes 'stack appear bound to
            ; the outer context, and accessing it returns a value
            ; from that context, but not in this little test. :^(
            print mold stack
            print mold context? 'stack
            true
        ]
    ]
]
outer2: object [
    inner: object [
        stack: copy []
        set 'exported-func func [][
        	print "In globally exported Func"
            print mold stack
            print mold context? 'stack
            true
        ]
    ]
]
outer/exported-func
exported-func
20:34If someone (maybe @9214) wants to dig in more, that would be great. I don't have time to pursue it right now.
endo64
20:52@greggirwin I changed your script to this:
Red []

print "Capture test"
outer: object [
    o-slot-1: 1
    o-slot-2: 2
    o-slot-3: 3
    o-slot-4: 4
    o-slot-5: 5
    o-slot-6: 6
    exported-func: does [
		print "Original"
    ]
    inner: object [
        stack: copy []
        set 'exported-func func [][
            print "In Func"
            ; Calling this func now makes 'stack appear bound to
            ; the outer context, and accessing it returns a value
            ; from that context, but not in this little test. :^(
            print mold stack
            print mold context? 'stack
            true
        ]
    ]
]
outer2: object [
    inner: object [
        stack: copy []
        set 'exported-func func [][
            print "In globally exported Func"
            print mold stack
            print mold context? 'stack
            true
        ]
    ]
]
outer/exported-func
exported-func
probe get 'outer/exported-func
outer/exported-func

and the output is
Capture test
Original
In globally exported Func
[]
make object! [
    stack: []
]
func [][
    print "In Func"
    print mold stack
    print mold context? 'stack
    true
]
Original


So outer/exported-func doesn't change by set 'exported-func but it looks like it changed when I probe it.
greggirwin
20:58Thanks @endo64. Would you open a ticket for this?
endo64
21:01Sure.
21:30@greggirwin See #3597, please update its title as I could find a good explanation.
21:34https://github.com/red/red/issues/1748 and https://github.com/red/red/issues/1977 explains the issue, it might be closed then.
dander
22:58I don't know if it would be considered a bug, but I noticed that for functions which specify a return type, reflect ... 'spec displays return: in the returned spec, which is invalid when defining a function, because the colon is not allowed. It is somewhat helpful that it's differentiated from the other arguments, but on the other hand, it's nice to have source produce code which is valid without any modifications.

greggirwin
02:23@dander can you give a specific example? I just wrote a ticket about the interpreter having an issue with return: and doc strings, but seems unrelated to what you're saying. I just used source on a func with a return:, and doing it worked fine.
dander
04:30@greggirwin my mistake. Maybe I corrupted something in my environment before, but now I can't reproduce it at all 🤔
06:19@greggirwin okay, I don't really understand what is happening, but this reproduces what I was seeing before
spec: reflect :on-parse-event 'spec
body: reflect :on-parse-event 'body
func spec body
rebolek
06:48@dander @greggirwin
>> func [x return: [integer!]][x + 1]
== func [x return: [integer!]][x + 1]
>> func [x return: [integer!] "this is problem"][x + 1]
*** Script Error: invalid function definition: return:
*** Where: func
*** Stack:
07:13@greggirwin is there complementary function to parse-func-spec that will turn the object into spec dialect?
dander
07:45thanks for clarifying that, @rebolek !
Tovim
19:54Strange behaviour: both help vid and help div return the same info: divide action! Returns the quotient of two values.
Tried to get an info about VID.
meijeru
20:29This is because HELP works only on defined words, i.e. words that occur in system/words, and there is no such word as VID defined.
20:31When HELP does not find the word, it searches for other words that contain the same letters.
greggirwin
20:31@dander @rebolek that is the ticket I just opened, so we're all on track.

@rebolek, no, there no counterpart to it currently. Could be useful for code generators, but I haven't had a need for it yet.

@Tovim, @meijeru beat me to it. :^)
rebolek
20:34@greggirwin I do, I am using similar function in Values (with different format, but that can be adopted), so I may take a look at doing it. Then I can use parse-func-spec instead of my own function and save some bytes.
greggirwin
20:39Sounds good. Parse-func-spec lives in the help code right now, as that's where it was needed, but it could move to more general meta programming or reflection libs if we add those.
rebolek
20:42It's not a high priority for me, but I would like to use some standard instead of my own design, it makes code simpler.
greggirwin
21:28Agreed. Please report any issues you find.

dsunanda
01:06Anyone else seeing this? Strings assigned to VID TEXT styles result in considerable bloating of SYSTEM/WORDS, eg:

layout [t: h1]  
t/text: "aaa bbb ccc. ddd, eee"
back back back back tail words-of system/words
== [aaa bbb ccc. ddd]
greggirwin
01:12Indeed. Likely a load in there for /data.
>> t/text: "100"
== "100"
>> t/data
== 100
01:13Is there a ticket for that? Chances are it's known and expected that modules will alleviate the issue.
dsunanda
01:32Thanks Gregg. Can't see an obvious ticket - though it may be there under another set of keywords.

There seems no obvious point in automatically initiating /data for a text style. (It doesn't get populated for other styles - say. LAYOUT [F: BOX} F/text: "AAA BBB"). And the populating is somewhat defective (EEE gets missed in the original example - presumable because DDD, EEE triggers an error).
greggirwin
04:46It's tied to the reactive system, and the behavior is an unintended side effect of load in this case.
dsunanda
10:20Thanks again. Not sure it's a welcome side-effect. I'll add an issue so the devs can at least look at it and decide whether it's a bug or a feature.
Pity Red does not have R2's ability to create words without adding them to SYSTEM/WORDS, eg to-block "aaa bbb cccc" - in R2 creates a block with 3 words, but does not update SYSTEM/WORDS. That might allow the reactive stuff without the side-effect of bloating SYSTEM/WORDS.
endo64
14:58@dsunanda better file a ticket to not forget this. If we put a huge text into a text face we fill the system/words.
greggirwin
17:16I don't know if it's by design or not. In this example, data is not set for the face, because the entire text can't be loaded. But if it could, data would then refer to the block of words.
>> t/text: "aaa bbb ccc ddd eee"
== "aaa bbb ccc ddd eee"
>> t/data/1
== aaa
dsunanda
18:30Thanks guys - it's now issue #3606
If Rebol and Red were more highly secure by design, there'd be information leak issues here too - simply moving a string to a VID text style leaves a trace in SYSTEM/WORDS
greggirwin
19:40Given Red's flexibility, and Red/System's total control capability, that kind of leak is way down on the list of bad things that could happen. :^) I am really excited by the security side, and how people will build dialects for that. Also, this note may be of interest to @ddsec, whose team audited the Wallet code.

x8x
10:43Not sure if it's a feature or a bug to include the %:
json/encode %path
;   {"%path"}

Me think one should mold if he wants to keep the % from a path! value
rebolek
11:29@x8x encode-into molds every non-JSON value. This way you can encode Red values to make sure that json/decode json/encode whatever would always work. Maybe it's one of those little things that should be user-configurable.
x8x
12:01Just thinking laud, what about having json/save and json/load? I get the benefit of molding, but not sure is a good default at least in above case, % has meaning only inside Red, in a JSON value that could be consumed by any other tool, that would have no meaning. Is it more logic to need to form %file to pass a file path to a javascript code thru JSON?
rebolek
12:07No, it's just a question of changing mold to form on one line. Or preferably adding one either so user can switch between both modes. There are some other switches in JSON module already (for none value and for automatic loading of numbers/unix time stamps , IIRC), so it's one minute change. I just need some good name for that switch. mold? or form? seems to vague to me and preserve-red-values? is too long OTOH :)
12:08Of course I am talking about JSON version in my repo, I can't talk for Fullstack if they decide to adopt this change or not.
x8x
12:11The other way around, any other language/tool would pass a file path as a string in JSON format, on the Red side I would have to to file! JSON-string-field and for JSON coming from Red I would have to load JSON-string-field.
rebolek
12:13I understand. I'm not against changing it, I just need good name for the switch and also we need to decide if it should be turned on or off by default.
x8x
12:14Why switches instead of refinements? Maybe having both?
rebolek
12:15Both. You can build to-json and load-json with refinements on top of json object!.
x8x
12:17Ok, thank you!
greggirwin
19:18We will have an official JSON code, for load/as and save/as, I hope in 0.6.5. It's close but depends on the map! behavior for none to change. Much chat has been made over that. In any case, we have to balance interop with round-tripping, and not automatically do things that are hard to undo. Writing a simple preprocessor, to form any-string! values shouldn't be hard.
rebolek
21:10What chat and where? I am really interested in it, I know that I am just an outsider, but I've implemented few JSON based APIs for Red (like Github, Gitter and so on) and would be really interested in such conversation, even if I don't have much to add to it.
greggirwin
21:41You're not an outsider. It was just to facilitate work and design, which @giesse did, based on a number of Redbol JSON libs. We'll probably make it public soon, as it's part of the C3 work underdevelopment now.

Oldes
21:14@dockimbel :point_up: [regarding our previous select/part discussion](https://gitter.im/red/bugs?at=5bd0d5cb82893a2f3b345e80) I believe, that find/part is also wrong. Example:
>> find/part s: "abcd" "ab" e: next s
== "abcd" ;<-- wrong
>> index? e
== 2 ;<-- Red is looking for "ab" in 2 bytes, but should be looking only in 1

In Rebol2 it was correct, because it counts with one-based series' index:
>> find/part s: "abcd" "ab" next s
== none

And Rebol3 is also wrong, as it limits the start of the find, but not the tail:
>> find/part s: "abcd" "ab" next s
== "abcd" ;<-- wrong
>> find/part "abcd" "bc" 2
== "bcd" ;<-- wrong, because there is no "bc" in "ab"

toomasv
09:01@Oldes I see this:
>> find/part s: "abcd" "ab" next s
== none
>> about
Red 0.6.4 for Windows built 24-Nov-2018/3:38:06+02:00 commit #3b0a577
Oldes
19:27Ah... than it is good for Red :-) And I should rebuild my Red console before posting something next time :-(

hiiamboris
20:11When I write probe read %// it shows me the contents of the C: drive. Should it?
dander
20:37@hiiamboris it seems to be interpreting that as launching \, and that is how explorer or the run dialog would behave. I guess it chops off the first slash, because usually you have a drive letter after that. Looks like it won't work with more than two slashes though. I think it seems like it's up to the OS behavior in this case.
>> to-local-file %//
== "\"
hiiamboris
20:39Ah! Good thinking @dander :)
dsunanda
21:19It's what R2 does as well. Try experimenting with:
print clean-path %/
probe read clean-path %/

And append an extra / each time. What happens makes sense - at least for Windows.
ne1uno
21:29isn't // a net share? seems like it should be bad path
dsunanda
21:39I think it's a case of Rebol's opsys-independent notation clashing with some opsys specifics - and (at least so far) Red has adopted the same convention.

The official Rebol statement on the issue says: [If the first directory name is absent, and the path begins with double forward slashes , then the file path is relative to the current volume](http://www.rebol.com/docs/core23/rebolcore-12.html#section-2.2)
hiiamboris
21:42
>> print clean-path %///
/C/Users/

Interesting feature. I wonder what are the applications of it.
dsunanda
21:46Remember it is relative to your current directory, so if you were in (say) d:\data\apps\rebol\ you'd see /D/data/ in that case.
Read %/ -- is a good way to get a list of all current drives.
endo64
21:51[![autocomplete.gif](https://files.gitter.im/red/bugs/XDWn/thumb/autocomplete.gif)](https://files.gitter.im/red/bugs/XDWn/autocomplete.gif)
9214
21:52@endo64 can't reproduce.
endo64
21:53@9214 on 0.6.3 autocomplete was working even if there are other texts after the word
21:53Actually, it was working a few weeks (or 1 or 2 months ago) but not anymore. It was very useful.
hiiamboris
21:53@endo64 I have that bug too on W7
9214
21:5422 Nov build, everything works fine, W10.
endo64
21:54@qtxie Can you look at this please?
21:55Both CLI and GUI console.
21:56Let me check with 22 Nov build
22:04One of these two commits breaks it (both on 2018-11-17)

SHA-1: 780e7d0d9fd5a59d6ce81b002318f566b2eec9ad
* FIX: some local variables are leaking in global space.

SHA-1: 2d6c75ff99d0432aed12b6bc99c1bba2a5cdcca1
* FEAT: put auto-completion functions into a context.
9214
22:12Rather:
* https://github.com/red/red/commit/2d6c75ff99d0432aed12b6bc99c1bba2a5cdcca1
* https://github.com/red/red/commit/277a4399bb8bdb4e4f5105a3d43a72730b3dfe2b

rebolek
06:25@greggirwin

> You're not an outsider.

Of course I am. I'm not part of any JSON conversation, I know nothing about solution to JSON's null, nothing about latest map! changes, so all my comments about JSON are just comments from a person that relies on public information only.
hiiamboris
12:21I have GUI console saving history when I close it by Alt+F4 but never when I close it by typing q or quit. Is this supposed to be this way?
Oldes
12:52@hiiamboris quit is just a simple function which you may redefine for your needs:
>> source quit
quit: func ["Stops evaluation and exits the program" 
    /return status [integer!] "Return an exit status"
][
    quit-return any [status 0]
]
hiiamboris
12:58@Oldes sure, but what about the history?
Oldes
13:29I don't know... I even didn't know, that console saves history.. but I think the console code can modify the quit to save it like with Alt+F4.
endo64
13:32yes there is that issue, if you close the window is saves the configuration and the history, if you quit it does not.
hiiamboris
13:53Didn't see this one reported, so I opened https://github.com/red/REP/issues/33
endo64
15:02@hiiamboris This could go to the main repo instead of REP.
hiiamboris
15:38Maybe.
greggirwin
17:15@rebolek, I mean you're not an "outsider" in any negative way. We just can't make all conversations public, or even open to a significant number of people. Without a stake in the ground, that process creates too much churn in most cases.
rebolek
18:05@greggirwin I didn't took it in negative way, I'm just just stating that I am an outsider who doesn't know what is going with JSON in Red, that's all.
18:06I understand that if everyone who wrote their own JSON parser and encoder in Red would be involved, it would create too much noise.
gltewalt
20:27Shouldn't Alpha be 255? spec indicates that the default should be fully opaque.


>> i: make image! 1x1
== make image! [1x1 #{FFFFFF}]

>> i/rgb
== #{FFFFFF}

>> i/alpha
== #{00}

>> i/argb
== #{FFFFFFFF}
20:31Nevermind. #2812
toomasv
21:05@gltewalt Opaque in Red is 0. 255 is fully transparent.
gltewalt
21:15Zero is fully transparent in argb
toomasv
21:22But in Red it is the way around:
view [
    b: box 255.0.0.0 
    slider 20x80 [
        b/color/4: to-integer 255 * face/data 
        t/offset/y: to-integer 73 - (60.0 / 255 * b/color/4)  
        t/text: to-string b/color/4] 
    at 120x73 t: text "0" 30x25
]

meijeru
09:45There is recent discussion on this in issue #2812
9214
15:42
text
view [
    panel
        with [menu: ["a"]] ; note the missing menu element ID
        on-menu [probe event/picked]
]

Once I click on a from contextual menu, I get
*** Runtime Error 1: access violation
*** at: 0042F984h


Can anyone else confirm that? W10.
bitbegin
15:44[![图片.png](https://files.gitter.im/red/bugs/v1ks/thumb/__.png)](https://files.gitter.im/red/bugs/v1ks/__.png)
15:44work right for me
9214
15:45@bitbegin have you tried to right-click on an empty panel to bring up contextual menu, and then to click on a entry?
bitbegin
15:46click on a will print select-all
select-all
9214
15:48Hmm...
hiiamboris
15:51Prints about-msg for me (W7)
9214
15:52Looks like out of boundaries read.
15:54What about this?
view/options [
    on-menu [probe event/picked]
][
    menu: ["a"]
]

I still experience the crash.
16:08https://github.com/red/red/issues/3619
ne1uno
16:23win7 I get select-all for both.
9214
16:26I get about-msg from GUI console, but CLI crashes. Both are unexpected.
16:28Interestingly, from GUI console, if I add ID word!, check the snippet, and then remove it, it will still print the old ID despite it being removed.
toomasv
16:33@9214 On GUI console both versions return about-msg on W10. (And word! is still printed after removing)
9214
16:35It seems that even/picked carries some arbitrarily selected value from memory. In my case, on the first try it printed b. No idea where it came from.
hiiamboris
17:24@9214
> What about this?

Again, no crash. about-msg. GUI console
17:26Confirmed crash on CLI console:
*** Runtime Error 1: access violation
*** at: 0042F984h

endo64
12:25@9214 No crash on my W10 for both CLI & GUI, Red 0.6.4 for Windows built 24-Nov-2018/4:38:06+03:00 commit #3b0a577
hiiamboris
21:50So we have these 3 functions now, very useful:
>> offset-to-caret system/view/screens/1 1x1

*** Runtime Error 1: access violation
*** at: 004BF041h

>> caret-to-offset system/view/screens/1 1

*** Runtime Error 1: access violation
*** at: 004BF041h

>> offset-to-char system/view/screens/1 1x1

*** Runtime Error 1: access violation
*** at: 004BF041h

gltewalt
02:39Fix it
02:40I believe you’re feeding it none so that should narrow it down.
toomasv
05:13
view [ar: area "Something" below 
    button "caret-to-offset" [probe caret-to-offset ar 3] 
    button "offset-to-caret" [probe offset-to-caret ar 40x10] 
    button "offset-to-char" [probe offset-to-char ar 40x10] 
    button "selected" [ar/selected: as-pair offset-to-caret ar 40x10 offset-to-char ar 40x10 set-focus ar]]
hiiamboris
08:18@toomasv and if you remove "Something"?
08:20@gltewalt thanks, I'll try
toomasv
08:35You mean if I try to ask for caret or offset from none?
hiiamboris
08:39Empty string works, unspecified string crashes :)
9214
14:19@hiiamboris it's good to see you ramping up on issue triaging, keep pumping :+1:
hiiamboris
14:38@9214 thanks ☺ Glad to be of help
Oldes
20:55@dockimbel In Rebol2&3 input from ask function is automatically _trimed_:
>> ask "name: "
name:     foo
== "foo"

while not in Red:
>> ask "name: "
name:     foo    
== "    foo    "

Is it by design?
hiiamboris
22:34@rebolek what's the history behind https://github.com/red/red/pull/2191 ? There are some regressions crying for a fix...

rebolek
06:32@hiiamboris what can I say? I went thru all ~2100 bugs and if it was possible to write test for that bug, I did it.
hiiamboris
09:44@rebolek but why wasn't it merged in 2 years?
rebolek
10:27I don't know, probably because not all tests passed, as there were some unfixed regressions. I would be good to expand it with tests for ~1300 new issues.
10:30@hiiamboris You should ask @dockimbel , not me.
hiiamboris
10:36@rebolek I see. Well, better late than never, right? (: As you apparently have had no time to do so, you wouldn't mind if I refactor that branch for the current test suite, push a new PR, raise the issues for regressions caught, maybe fix some? I think there's a lot of value in that PR and it should be included in the master repo.
rebolek
10:38@hiiamboris feel free to update it as you want, if you have the time. You're unfortunately right that I don't. Also it may get merged if it won't be from me, who knows.
hiiamboris
10:50:+1:

PeterWAWood
13:46This somewhat excessive code:
Red[]
s: ""
loop 2147483647 [
	append s #"a"
]

compiles but crashes the Red runtime when executed:
Compiling to native code...
...compilation time : 1241 ms
...linking time     : 51 ms
...output file size : 77824 bytes
...output file      :./test 

./test
*** Internal Error: not enough memory
*** Where: append
*** Stack:


Is this behaviour reasonable or should the runtime trap the out of memory condition?
hiiamboris
14:00@PeterWAWood see https://github.com/red/red/issues/3261#issuecomment-373342437
I think Nenad was working on some handler for that but didn't finish it, so it's expected for now. Last time I checked even the read of an 1GB file crashed it.
greggirwin
20:13Just saw checksum die with 'adler32 if the input *ends in* any of ^A ^B ^C ^D ^E ^G. Just spot checks, so there may be others. Can someone confirm and write up a ticket?
hiiamboris
20:41
>> checksum "^A" 'adler32
== 131074
>> checksum "qwerty^A" 'adler32
== 541197258
>> checksum "qwerty^B" 'adler32
== 847643866
greggirwin
20:44Interesting. I'll pull and build fresh. Thanks.
dsunanda
20:46I'm seeing 0.6.4 Win10 crash on some values - simplest is
checksum "X^A" 'adler32
hiiamboris
20:47Interesting indeed!
dsunanda
20:48No obvious pattern
hiiamboris
20:48It crashes when I start a new console. But I have one running for a few days already - and that one doesn't crash when I paste it there. Same commit, Nov 29.
meijeru
20:52I see checksum "X^A" 'adler32 crashing also -- W10.
greggirwin
20:53The adler code is entirely R/S, not calling OS libs. Would someone please write up a ticket for it?
hiiamboris
20:54sure
greggirwin
20:54Thanks.
hiiamboris
21:01https://github.com/red/red/issues/3631
21:06I think @PeterWAWood forgot to comment out the failing test https://github.com/red/red/blob/master/tests/source/units/replace-test.red#L91 (mentioned in https://github.com/red/red/issues/3624) so we have all builds failing right now. Someone with the access should fix that.
greggirwin
21:33One of our upcoming goals is to not just comment out failing tests.
21:34I'll let Peter speak to this case though.
PeterWAWood
22:36@hiiamboris I didn't comment out the failing test as a first step towards not simply commenting out failing tests. I should have let you know, sorry.
23:09I believe that for Red to be widely adopted, especially by commercial developers, one of the things we need to achieve high levels of reliability and robustness, much higher than Rebol did.

I feel the practice of commenting out failing tests is no longer appropriate and fear that it will become so deeply engrained in the project psyche that it will be almost impossible to change.
hiiamboris
23:22Then you're planning to fix it soon? OK
PeterWAWood
23:43No. I didn't write the code, I didn't write the tests.
23:47Whilst I understand the quality of the code can be considered a collective responsibility, we need contributors to take ownership for the quality of their submissions.
23:50Is everybody who reports an issue responsible to supply a fix?
23:52I feel that another barrier to improving the quality (robustness and reliability) of Red is the practice of accepting code without tests.

greggirwin
01:09> Is everybody who reports an issue responsible to supply a fix?

Not sure how we can enforce that. It means only skilled devs can report issues.

> I feel that another barrier to improving the quality (robustness and reliability) of Red is the practice of accepting code without tests.

We're getting better about that. If there are FOSS projects that handle this particularly well, what can we learn from them? Beyond that, we would love to sponsor QA work.
PeterWAWood
01:09On reflection, I will comment out the failing test as it was obviously premature to do so.
rebolek
07:36> Is everybody who reports an issue responsible to supply a fix?

Enforcing that some like a really bad idea to me.

Requiring that PRs will come with tests OTOH is good idea.
11:42What is this error? I've never seen it:
*** stack smashing detected ***: <unknown> terminated
9214
12:37@rebolek :bear: :beer: :question:
rebolek
12:42@9214 Don't think so. I've triggered it only once on VPS. I probably won't be able to reproduce it.
Oldes
21:28Another compatibility question... Rebol3's forall function resets series position on break and throw but not on error:
>> data: [1 2 3 4] forall data [if data/1 = 3 [break]] data
== [1 2 3 4]
>> data: [1 2 3 4] catch [forall data [if data/1 = 3 [throw true]]] data
== [1 2 3 4]
>> data: [1 2 3 4] try [forall data [if data/1 = 3 [do make error! "?"]]] data
== [3 4]

Rebol2 and Red are consistent:
>> data: [1 2 3 4] forall data [if data/1 = 3 [break]] data
== [3 4]
>> data: [1 2 3 4] catch [forall data [if data/1 = 3 [throw 1]]] data
== [3 4]
>> data: [1 2 3 4] try [forall data [if data/1 = 3 [do make error! "?"]]] data
== [3 4]

Which version we should consider to be the correct? Is automatic position reset a feature?
9214
21:29@Oldes Red's choice to not reset series position is an intended one.
Oldes
21:30I'm also inclined to this variant.
21:33On the other side, if I would need result as in Red, I could use this in Rebol3:
>> data: [1 2 3 4] forall data [if data/1 = 3 [break/return data]]
== [3 4]
21:34I quite don't believe that this change in Rebol3 was not intended.
21:57Hm... but when I look at it... it is really just a stupid R3's bug.
22:27Or maybe it was intended, as it looks in R3 the position is reseted not like in R2 & Red:
>> data: [1 2 3 4] forall data [] data
== [1 2 3 4]

22:27Still probably prefer the old R2 version... any other opinion?
hiiamboris
22:36I would keep side effects to a minimum. That said I'd always reset the head, even with do make error.
Oldes
22:36The thing is, that Rebol2 and Red never resets. Which is something what old _Rebolers_ were used to.
hiiamboris
22:45Well, Red is at least consistent in it's actions. I wouldn't want to bother myself with the consideration of all the options when it does or does not reset.
Oldes
22:50Of course.
gltewalt
23:28It does reset if you make it through the forall normally
Oldes
23:32Ah... really... I overlook that :/ Maybe I should be sleeping instead.
gltewalt
23:37At one point R2 must not have reset, because it indicates that it does not in the Rebol/Core Guide
23:38But my version of R2 does.
>>     chars: "abcdef"
== "abcdef"
>>     forall chars [print first chars]
a
b
c
d
e
f
>>     probe chars
"abcdef"
== "abcdef"
23:39http://www.rebol.com/docs/words/wforall.html

greggirwin
00:57Forall in R2 is a mezz, built on forskip (also a mezz), so you can see exactly how it works.
01:00The Red R/S version requires a bit more thought to understand, but I believe it's modeled on the same behavior.
gltewalt
22:30
>> to integer! #{2A}
== 42

>> to float! #{2A}
== 0.0
greggirwin
22:34
>> to binary! 1.234
== #{3FF3BE76C8B43958}
>> to float! to binary! 1.234
== 1.234

hiiamboris
15:47@9214 I tried to repro your image issue but it worked ok for me
9214
15:48@hiiamboris can you check it in CLI console?
15:48I'll update to nightly and give it another spin.
hiiamboris
15:48@9214 yes, both are ok
15:49if that matters, I was using it on red\tests\source\units\button.gif from the Red sources
9214
15:49@hiiamboris I checked with PNG file.
hiiamboris
15:52works for me on small and big pngs
9214
15:53Nope, still the case with the latest build.
hiiamboris
15:54with different pngs or just one particular?
9214
15:54Different images, different formats.

greggirwin
06:04On Win10 here, it works fine, with a 1600x900 PNG that saves as an 8MB %.red file. This is from the GUI console.
06:06I can then load and reduce the %.red file and the image is intact.

hiiamboris
20:12Can anyone on linux reproduce what I'm having on a VM? I've no idea how you catch bugs like this. Everything I change, even the loop count from 12 to anything else, and it starts working.
Red []

;recycle/off
probe rb4-bb: copy [1 2 3 4 5 6 7 8 9 10]
loop 12 [append rb4-bb rb4-bb]
probe length? rb4-b: copy rb4-bb
probe o: make object! [a: 1 b: 7 c: 13]
probe try [o/("c")]

Outputs:
[1 2 3 4 5 6 7 8 9 10]
40960
make object! [
    a: 1
    b: 7
    c: 13
]

*** Runtime Error 1: access violation
*** at: B7EE3C1Ch
20:14P.S. When compiled only
9214
20:18@hiiamboris can't reproduce with 20 Nov build.
[1 2 3 4 5 6 7 8 9 10]
40960
make object! [
    a: 1
    b: 7
    c: 13
]
make error! [
    code: 328
    type: 'script
    id: 'invalid-path
    arg1: o/("c")
    arg2: "c"
    arg3: none
    near: none
    where: 'body
    stack: -161881984
]
20:19Should recycle/off be commented out though?
hiiamboris
20:21yes, when it's really off, it's okay
20:21I'm using Dec 7 build btw
9214
20:22Will check with nightly shortly.
20:47Nope, no crash with the latest build.
hiiamboris
21:20@9214 can you also please try this?
Red []

;recycle/off
repeat i 10 [
	append/dup b: copy [1 2 3] 1 i * 10000
	print mold/flat stats/info
	length? copy b
	print mold/flat stats/info
	recycle
	print mold/flat stats/info
	o: make object! []
	probe type? try [o/()]
	print "^/"
]
9214
21:26@hiiamboris nope, no crash.
hiiamboris
21:27You compiled it, right?
9214
21:27Yes, in release mode.
hiiamboris
21:28Right! So it's ok in release mode for me too...
21:30But -c or -c -u not okay. Now it's really weird...
9214
21:31I confirm the crash in development mode, with both of your examples.
hiiamboris
21:31Great! Thank you.
9214

dockimbel
10:48@hiiamboris Crash fixed.
hiiamboris
12:58@dockimbel thanks! It's a great help. If you could also find the time to fix https://github.com/red/red/issues/2207 and https://github.com/red/red/issues/3637 that will be awesome. Problem currently is that if you change the order of some 2 tests in the suite, there's a huge chance one of these bugs will remind you of themselves and demand time to isolate them and circumvent. The only way to find out what code is triggering these bugs is to comment out the test parts until you find a particular sequence of lines. It's *very* annoying.

9214
08:56@hiiamboris kudos for https://github.com/red/red/issues/3502 !
dockimbel
09:51Indeed, @hiiamboris well done! :+1:
hiiamboris
12:18You're welcome ☺ Glad it was that simple. Still, the fix is based on the assumption that Windows flushes the pipe buffer in one go. I don't really know that, so.. just keep that in mind - if you ever see a truncated output from a call, then the assumption was wrong.
16:11Interesting. 2GB RAM is not enough on a Linux VM to compile run-all-comp* tests.
AlexanderBaggett
22:31Hi guys, I believe I found a bug on windows 10. It may also be a bug on other windows OS's.
22:32This code
Red [Needs 'View]

sidePanel: [

    nodeTypes:  Text-list 100x250 data [
        "Generate"
    ] 
    on-change [
        t:  to string! nodeTypes/data/(nodeTypes/selected) 
        switch t [
            "Generate" [ p/pane: layout generate]
        ]
    ]
    return
    p: Panel 300x600  155.155.155 [

    ]
]

generate: [
        box 75x75 red
]
view sidePanel

22:33Instead of throwing an error of some kind, it instead just kills the window when you click on the text, AND the red console.
22:33This is a simplified reproduction. The actual code I am using in my project is a bit more complex.
22:33Let me know if you guys can produce the issue too.
22:34and Yes I understand
layout generate
should be
layout/only generate
22:34but it still should not crash the console altogether, it should throw an error like normal.
22:36I am using 0.6.4 , not the latest automated build.
ne1uno
22:41crashes win7 just built

ne1uno
00:33older 063 traps error, *** Script Error: cannot MAKE/TO string! from: none
gltewalt
00:47"PROGRAM ERROR: Invalid encapsulated data." is still an issue, and I'd rather not make .bat to work around it. Will it remain an issue until Red is self hosted? #543
dander
08:10@gltewalt if you download red using [Scoop](https://github.com/red/scoop-bucket) it shims the exe for you. The other nice thing is it makes it easy to update too. Just scoop update red-latest -f
AlexanderBaggett
16:25@dockimbel , Have you had a chance to look at this yet? Would you like me to create a github issue for this code? Never filed a bug directly myself before for Red, but would be glad to do it.
9214
16:44@AlexanderBaggett ever heard of [SSCCE](http://sscce.org/)?
Red [Needs: View]

view [button [face/pane: 'boom]]
ne1uno
17:24nice. taking tips from browser bug reports? does that mean it's not a bug?
17:27>9214 opened an issue in red/red: access violation on setting PANE facet to non-SERIES! value https://github.com/red/red/issues/3656
AlexanderBaggett
17:32@9214 I have heard of [MVCE](https://stackoverflow.com/help/mcve) . So I get the essence of what you are saying. I feel my example is simple enough that someone more experienced than myself can reduce it further. I feel my example would have been good enough for stackoverflow or other programming forums for people to easily reproduce the issue. And quite frankly I don't know how to reduce it further myself. I will leave that to the experts like you. Thanks
17:43Perhaps you can teach me how your code example is effectively doing the same as mine. Because I don't understand it. I thought the issue was related to the use of the
layout
command and
pane
not handling it well.
9214
17:47@AlexanderBaggett it's not a rocket science, just start throwing pieces away and see if error persists. If it disappeared - return throwed piece back and start anew. Rinse and repeat until there remain a bare minimum.
AlexanderBaggett
17:47I already did that. But I see there is more I could have done.
17:48throwing away piece is not what you did, you changed them outright. I never had a button in my example.
17:56This is about as far as I can reduce it. How did you go further?
Red [Needs 'View]
sidePanel: [
    p: Panel  []
    Text-list data [
        "Generate"
    ] 
    on-change [
            p/pane: layout generate
        ]
    ]
]
generate: []
view sidePanel
9214
17:56First I removed redutant values, like size and color:
sidePanel: [

    nodeTypes:  Text-list data [
        "Generate"
    ] 
    on-change [
        t:  to string! nodeTypes/data/(nodeTypes/selected) 
        switch t [
            "Generate" [ p/pane: layout generate]
        ]
    ]
    return
    p: Panel [

    ]
]

generate: [
        box 75x75 red
]
view sidePanel

Then I squeezed code a bit:
sidePanel: [
    nodeTypes:  Text-list data ["a"] on-change [
        t:  to string! nodeTypes/data/(nodeTypes/selected) 
        switch t [
            "a" [ p/pane: layout [box 75x75 red]]
        ]
    ]

    p: Panel []
]

view sidePanel


Then I figured that to string! none conversion error is not the culprit and removed it entirely together with switch.
sidePanel: [
    nodeTypes:  Text-list data ["a"] on-change [
            p/pane: layout [box 75x75 red]
        ]
    ]

    p: Panel []
]

view sidePanel


At this point text-list functionally was identical to a button, so I changed it to a button:
sidePanel: [
     button [p/pane: layout [box 75x75 red]]
    p: Panel []
]

view sidePanel


Then I realised that layout can eat an empty block:
sidePanel: [
     button [p/pane: layout []]
    p: Panel []
]

view sidePanel


And that panel face is not related to the issue - that is, it can be any face, even button itself:
sidePanel: [
     button [face/pane: layout []]
]

view sidePanel

Final touch:
view [button [face/pane: layout []]]

At this point layout was the only moving piece under observation, so I tried to substitute it for an arbitrary value:
view [button [face/pane: 'boom]]

Then I just played around and figured out that it doesn't error out on most of series! values, e.g. paren! or even vector!.


AlexanderBaggett
18:01Man, that's crazy. You really know Red very well. I'm still learning. I would have never guessed to test layout with an empty block.
greggirwin
21:13@AlexanderBaggett, @9214 is on a different level. :^) @9214, that's worth a little write-up somewhere, even on the wiki if that's easiest.
21:14And thanks for digging into it. Detective stories make for good reading.

9214
08:01@greggirwin not quite sure what deserves a write-up here.
greggirwin
08:02Your answer to "How did you go further?" The mindset and process of debugging in Red, which has different facets to it, as we think in terms of datatypes and their attributes.
9214
08:37When you ask a hound how did it catch a squirrel, all it can say is "woof".

Oldes
17:20When reviewing date syntax, I noticed, that there is in Rebol:
>> 1/1/9999/23:59:59-
== 1-Jan-9999/23:59:59
>> 1/1/9999/23:59:59-2
== 1-Jan-9999/23:59:59
>> 1/1/9999/23:59:59-20
== 1-Jan-9999/23:59:59
>> 1/1/9999/23:59:59-200
== 1-Jan-9999/23:59:59-2:00
>> 1/1/9999/23:59:59-2000
** Syntax Error: Invalid date -- 1/1/9999/23:59:59-2000
** Near: (line 1) 1/1/9999/23:59:59-2000

while in Red it is:
>> 1/1/9999/23:59:59-
*** Syntax Error: invalid time! at ""
*** Where: do
*** Stack: load 
>> 1/1/9999/23:59:59-2
== 1-Jan-9999/23:59:59-02:00
>> 1/1/9999/23:59:59-200
*** Syntax Error: invalid time! at "200"
*** Where: do
*** Stack: load
>> 1/1/9999/23:59:59-20
== 1-Jan-9999/23:59:59-04:00 
>> 1/1/9999/23:59:59-2000
== 1-Jan-9999/23:59:59-04:00

Which results are bad and which are good? At least the last one in Red seems to be strange. Any explanation?
17:29Ok... looks like Red is normalizing the zone using reminder... 24 // 20 == 4. I'm not sure I like it.
rebolek
17:34Timezones are tricky stuff...
Oldes
17:49It looks that [Carl implemented](https://github.com/rebol/rebol-issues/issues/1608#issuecomment-170911426) a single number in a timezone to be a number of minutes in R3:
>> 1-1-2000/2:0+60
== 1-Jan-2000/2:00+1:00

I think it was not good decision. Red give very unexpected result in this case:
>>  1-1-2000/2:0+60
== 1-Jan-2000/2:00:00-12:00
17:58On the second though... [Carl's decision](https://github.com/rebol/rebol-issues/issues/1411#issuecomment-170907151) maybe makes a sense... as the number is simply padded to HHMM
18:02So if one use +200, it is like using +0200, which should be +02:00. So I now think, that Red is somehow strange. Any other opinion? @dockimbel is above _by design_?
18:12Maybe it would be better to throw error instead of doing such a modifications? For example SQLite does not recognize 00:60 as a valid time zone. But it does not recognize many current valid formats which are loadable from Red.
rebolek
18:55 SQLite may not recognize 00:60 as valid timezone, but some mad dictator may. Timezones are not mathematical or time-keeping stuff, but strictly political one. So they should be open to all possibilities.
greggirwin
19:34@Oldes, it's by design. Both https://doc.red-lang.org/en/datatypes/date.html#__zone and https://doc.red-lang.org/en/datatypes/date.html#__timezone note that:

> Timezones are returned as time! values between -16:00 and +15:00. ...Out of range argument values will result in a normalized date.

And that your -2000 example means hhmm, which equates to the same as -20, which is just hh.
Oldes
19:35@greggirwin I have problem with this:
>> 1-1-2000/2:0+60
== 1-Jan-2000/2:00:00-12:00
19:38I wonder if it makes sense to do some kind of normalizations.
greggirwin
19:38Do you want it to throw an error, rather than normalizing, or do you want it to normalize using a different algorithm?
19:39And where will these bad numbers come from?
Oldes
19:40I'm not timezone specialist so for me it is unexpected result and I have no idea if someone may find some of these normalizations to be useful.
greggirwin
19:40In a case like this, I don't know that Red can always do the right thing for everyone. One man's normalization is another's garbage output.
19:41Given bad input, we can't always produce useful results.
Oldes
19:42I don't say it should be changed. I'm just trying to understand reasons. So far there is big difference between Red and Rebol. That is for sure.
greggirwin
19:44The reason is...can you come up with something definitively better? My gut says that R3's approach isn't good.
>> 1-1-2000/2:0+60
== 1-Jan-2000/2:00+1:00

Especially in Red, where we clearly state that 2 digits means hour. If that suddenly becomes minutes because of normalizing, that seems worse to me.
Oldes
19:45Rebol clearly state, that the 2 digit number are minutes.
greggirwin
19:45So that's just a different design choice.
Oldes
19:46Isn't it a bug when you exceed the zone limit? Because you are doying zone normalizations without modifying the date.
greggirwin
19:47Red's date formats encompass some ISO8601 compatibility, which Rebol does not, including hh as a zone value.
Oldes
19:48I don't think there is any normalization in the ISO
rebolek
19:49That's because ISO defines valid data and doesn't deal with invalid data. That's up to implementation.
greggirwin
19:52> Isn't it a bug when you exceed the zone limit?

That's why I asked if you wanted an error, or different normalizing.

ISO8601 doesn't have to normalize, because ...what @rebolek said.
19:52@Oldes, so let me ask again: Where is this bad data coming from? Red tells you the rules. If you break them, what should it do?
rebolek
19:52@Oldes @greggirwin
>> d: now
== 17-Dec-2018/20:51:52+01:00
>> d/hour: 28
== 28
>> d
== 18-Dec-2018/4:51:52+01:00
>> d/month: 257
== 257
>> d
== 18-May-2039/4:51:52+01:00
19:53So zone is doing the same as other fields.
Oldes
19:54@greggirwin the data are from my playing in console.
19:55@rebolek sorry.. don't understand what you mean... there is no zone used in your example.
greggirwin
19:55@Oldes, right. I get that. You can type anything you want in the console. But in production use, if bad data like that shows up, there's no way Red can make sense of it, and get it right for everyone, is there?
rebolek
19:56@Oldes no, but as you can see, I can set month to 257. There's no 257th month in a year, is there?
Oldes
19:57But in your example the date value is modified while if you set zone to something not existent, it is normalized and the date is same
rebolek
19:58Right and I think that's the best outcome. Seconds can overflow to minutes, minutes to hours, etc...to years, but timezones are abstract and shouldn't change the date unless you explicitly want them to do it.
greggirwin
19:58Because, circling back, timezones are political, so normal math rules don't really apply.
Oldes
19:59@rebolek check this:
>> 1-1-2000/0:0:0+47 = 1-1-2000/0:0:0+15
== true
greggirwin
19:59If you set the zone to 2'000'000, and imagine circling the Earth to find out where to stop, are you ~200 years in the future?
Oldes
20:00Ok... I think, that there should be an error instead.
rebolek
20:00@Oldes I see your point.
greggirwin
20:00Now, we *could* also apply that logic to other date fields, which is a bigger design question.
rebolek
20:02Ok, maybe if the docs say that zones are values between -16:00 and +15:00, maybe Red should throw error for other values and leave the overflow logic for real time values like seconds to years.
20:04Maybe it shouldn't convert 47 to 15.
greggirwin
20:04@Oldes feel free to open a REP ticket, to change lexing of OOB zone values to throw errors.
20:04Good chat guys.
Oldes
20:24Btw... why it is -16:00 to +15:00? [According Wikipedia](https://en.wikipedia.org/wiki/List_of_UTC_time_offsets) it is (UTC−12 to UTC+14)
rebolek
20:2632 hours?
20:27It's good there's some margin. At least Red's date! is prepared for some other crazy island that decides they should be first to celebrate New Year.
greggirwin
20:39@Oldes the current limits are an artifact of the implementation.
Oldes
21:42@greggirwin here is another reason why not to normalize the timestamp -> https://tools.ietf.org/html/rfc3339#section-5.8

1937-01-01T12:00:27.87+00:20

This represents the same instant of time as noon, January 1, 1937,
Netherlands time. Standard time in the Netherlands was exactly 19
minutes and 32.13 seconds ahead of UTC by law from 1909-05-01 through
1937-06-30. This time zone cannot be represented exactly using the
HH:MM format, and this timestamp uses the closest representable UTC
offset.
21:44It looks some people may need the timezone to be not touched.
rebolek
21:44@Oldes Timezones and summer time are minefield you don't want to walk on.
Oldes
21:45Yes... I'm ending.
rebolek
21:45Just imagine that there's an hour every year, that happens twice.
21:46You can be in Brno at 2:30 and in Adamov at 2:30 at the same day, in the same timezone.
21:47Does it make sense? It doesn't. How can you represent that time? Without UTC, you can't. Yet, we use it and pretend like it's totally normal and it makes sense. It doesn't, OMG!

rgchris
00:26Any reason this isn't a bug?
>> to string! <a href="^">
== {a href=""}
ne1uno
00:51to-tag to string! round trip?
greggirwin
04:21
>> <a href="^">
== <a href="">
>> <a href="^^>
== <a href="^>

@rgchris, it's not a bug, because the escape just escapes the double quote that follows it.
Oldes
11:13@greggirwin and is it good that Red allows ** Syntax Error: Missing " at <a href="^^> ** Near: halt
11:19On the other side, one can construct invalid tags using other methods in Rebol, so Red's behaviour is probably ok.
>> append <a> { href="}
== <a href=">
dockimbel
11:20@Oldes
> @rebolek check this:
>
> >> 1-1-2000/0:0:0+47 = 1-1-2000/0:0:0+15
> == true
>


A modulo is applied to the out-of-range timezones. There is no standard rule for handling such cases, so it's up to us to figure out what is the most useful behavior for users in such case. As the TZ are circling around the globe, there's only one valid range of TZ, so using a modulo to normalize seemed fitting. I am fine with changing that rule to something better, but we need some empirical data to identify the most helpful behavior, and I haven't found any so far.
Oldes
11:21Cannot we just keep the TZ untouched? And throw error in out of range?
hiiamboris
11:22we have to pack it into a certain number of bits, which we can use for other purposes
Oldes
11:24(but there are more important things to do now)
dockimbel
11:25@rgchris
> Any reason this isn't a bug?
>
lisp
> >> to string! <a href="^">
> == {a href=""}
>


R2:
>> {"^"}
== {""}
>> <"^">
** Syntax Error: Missing " at <"^">

R3:
>> {"^"}
== {""}
>> <"^">
== <"^">
>> <a"^">
== <a"^">

Red:
>> {"^"}
== {""}
>> <"^">
*** Syntax Error: invalid value at {"^^">}
*** Where: do
*** Stack: load 
>> <a"^">
== <a"">
11:27Notice that Red does require a valid character after the < in order for the literal form to qualify as a tag!.
Oldes
11:29@dockimbel above Red's results looks good to me, but not this one:
>> <a href="^>
== <a href=">
dockimbel
11:29@Oldes
> Cannot we just keep the TZ untouched? And throw error in out of range?

Why would that be a more helpful behavior? We normalize all the other fields for out-of-range values, but would error out on TZ field? That's not consistent.
Oldes
11:30Which values? In datetime when you normalize, you don't loose the info like with TZ
dockimbel
11:31@Oldes
> @dockimbel above Red's results looks good to me, but not this one:
>
> >> <a href="^>
> == <a href=">
>


Indeed, worth a ticket.
11:35@Oldes The point is normalizing vs erroring out. TZ field has specific rules, like 15min steps:
>> a: now
== 18-Dec-2018/19:34:39+08:00
>> a/zone: a/zone + 0:12
== 8:12:00
>> a
== 18-Dec-2018/19:34:39+08:00
>> a/zone: a/zone + 0:17
== 8:17:00
>> a
== 18-Dec-2018/19:34:39+08:15
Oldes
11:36Regarding TZ, I don't want to continue as it is really not so important now. But I was really surprised when I've seen this:
>> 1-1-2000/2:0+60
== 1-Jan-2000/2:00:00-12:00

Without studying the documentation, where is defined some range, which even is not same like current time-zones in use. (sorry.. I don't think there will be any new island with own new TZ like Rebolek predicts)
dockimbel
11:38@Oldes You know that some countries are building artificial islands to claim sea territories? ;-) So an island can be built pretty much anywhere, and Red is ready to be used on those new lands. ;-)
Oldes
11:39And I have posted example, when is used TZ with value +0:20 for existent reason (for someone), so the rounding to steps is also not too friendly.
dockimbel
11:41> so the rounding to steps is also not too friendly.

TZ have a 15mn granularity, it's not about being friendly, but having TZ that match the real world.
11:43@Oldes
> Regarding TZ, I don't want to continue as it is really not so important now. But I was really surprised when I've seen this:
>
> >> 1-1-2000/2:0+60
> == 1-Jan-2000/2:00:00-12:00
>


If it errored out, you (or someone else) would have said also that the error is surprising, as it's not consistent with how other fields behave for out-of-range values... I don't see a clear winner there, so that's why I prefer to wait until someone stumbles upon that with a real use-case, so that we can change the rule to something better.
hiiamboris
11:47@dockimbel can you please look at https://github.com/red/red/issues/3581 and have your say? It's about some curious commandline processing syntax you made for the console launcher
dockimbel
11:51@hiiamboris Have you checked if that case conforms or not with the command-line processing rules of Windows? (IIRC, there's a page about that somewhere in MSDN, I might have left a link inn the source code for that). Windows has some different rules than Unix systems for that.
hiiamboris
11:53@dockimbel on Windows there are 2 conventions in use:
- simply extract anything between paired double quotes (pathname-friendly syntax)
- same, but also escape \" as " and \\ as \ (not pathname-friendly, but standard in MSVC)

And the short answer is no. I mean I've checked and it's not compatible with neither Windows or Unix.
11:57I think this https://docs.microsoft.com/en-us/previous-versions//17w5ykft%28v=vs.85%29 is the page you are referring to
dockimbel
11:58@hiiamboris I think so, yes. Thanks for digging it out.
12:00Here is an interesting in-depth analysis of those rules:
http://www.windowsinspired.com/how-a-windows-programs-splits-its-command-line-into-individual-arguments/
12:01@hiiamboris Once you've confirmed the proper behavior, you can submit a PR to fix it, in case it's not conforming.
hiiamboris
12:02@dockimbel Thanks, I'll read that.
I favor the 1st and simple solution over all this escaping business, as I very often pass filenames as arguments. When we need strings passed as part of the script (like rebol --do), we can simply use {..} on Windows instead of "..". You will be okay if we choose that behavior?
12:07I asked in the first place because of this:
> test-args.exe { 1 2 }             ;-- compiled Red script
system/script/args = "{ 1 2 }"
system/options/args = [" 1 2 "]

which seemed strange and I didn't know if you made this for a reason
12:07In Windows this is 5 arguments normally.
dockimbel
12:09From what I remember {} was used internally as an escape mechanism for passing arguments to the console executable, to workaround some annoyances on Windows.
hiiamboris
12:09I see.
dockimbel
12:11But, a global clean-up of arguments handling would be welcome. I think some of the implementation decisions were made for sake of performances and lower memory usage on start-up. Though, probably those concerns are misplaced wrt conformity to platform's rules.
12:13From your ticket: "I'd like to let OS routines do the job of argument splitting and joining as this is the most reliable way, also forward-compatible."

IIRC, some of those OS API would be quite memory-consuming?
hiiamboris
12:18@dockimbel Disregard that. After some more research I discovered that CommandLineToArgv destroys pathnames suffix ("c:\" becomes c:", "c:\" "d:\" becomes c:" d:\ etc) and IIRC on Unix arguments come to us already being split. So it will be simpler and more efficient to do it by hand.
Oldes
13:12@dockimbel Is there any documentation when is used conversion between CRLF, CR and LF? Or any consensus when it should be used and when not? This does not look good to me:
>> write %xxx CRLF read %xxx
== "^/^/"

While this is ok:
>> to-string probe to-binary probe to-string crlf
"^M^/"
#{0D0A}
== "^M^/"
dockimbel
13:18@Oldes The conversions should happen only on file I/O read/write, like in R2.

On Windows:
>> write %xxx CRLF read %xxx
== "^/^/"
>> write/binary %xxx CRLF read %xxx
== "^/"
Oldes
13:25Hm... at least it is compatible with R2... but still quite don't like how the CR is converted to LF
dockimbel
13:27
lisp
>> write %xxx CRLF read/binary %xxx
== #{0D0D0A}

It's not the CR which is converted to LF, but the LF that gets converted to CRLF on writing. :-D
13:30CRLF has no special meaning in Redbol, as LF is the standard end-of-line marker, so CR is treated separately of LF in the Redbol environment. Hence you should only have strings with LF as markers, if you have CRLF in Redbol strings, you should normalize them before doing any I/O writing.
hiiamboris
14:29@dockimbel is this a known limitation atm that I can't pass a function into a function?
Red/System []
foo!: alias function! [n [integer!] return: [integer!]]
inc: func [n [integer!] return: [integer!]] [n + 1]
call: func [f [foo!] return: [integer!]][ f 2 ]
print call :inc

Outputs:
*** Compilation Error: undefined symbol: f
*** in file: %/D/devel/red/red-src/red/2.reds
*** in function: call
*** at line: 4
*** near: [f 2]
14:38I can still pass it as an integer!.. but that's ugly
dockimbel
14:53Yes, it was limited on purpose, as I didn't want to push R/S into the functional programming territory (mostly because R/S was supposed to stay minimal until Red 2.0). Though, I agree that the workaround for that specific use-case is ugly and even possibly harmful.
hiiamboris
14:56Should I rather duplicate the code than use this pattern then?
dockimbel
14:56If the code is not too big, yes.
hiiamboris
14:56Okay.
dockimbel
14:58BTW, we probably will need to implement that feature anyway if we want to support both 32 and 64-bit from same codebase.
hiiamboris
21:16@dockimbel is it by design that structures on the stack are not zero-filled? I don't remember R/S docs mentioning that...
Red/System []
s!: alias struct! [a [integer!] b [integer!] c [integer!]]
f: func [/local x [s! value]] [
	print-wide [x/a x/b x/c]
]
f

outputs:
0 1638252 1

dockimbel
05:03@hiiamboris None of the local variables are zero-filled, for sake of performance. Though, in order to balance that, the compiler is supposed to check that you've assigned a variable before using it. Though, for structs references, the compiler can't accurately determine that.
05:03
lisp
Red/System []
f: func [/local x [integer!]] [print x]
f

results in compilation error:
*** Compilation Error: local variable x used before being initialized!
*** in file: %/c/dev/Red/system/tests/test2.reds
*** in function: f
*** at line: 2
*** near: [x]
05:05Since we introduced "structs by value" support, I haven't checked if the compiler could properly infer that such structs have been initialized or not, but cases like filling the struct with a memcpy() would still escape the compiler's detection.
05:08The compiler could emit some warning though, but we would need to add a compilation option for suppressing the warnings selectively then.
gltewalt
06:57Expected
*** Syntax Error: invalid binary! at "64#{2A}"
*** Where: do
*** Stack: load

Expected
>> 64#{2A+}
*** Syntax Error: invalid binary! at "64#{2A+}"
*** Where: do
*** Stack: load


Issue...
>> 64#{2A+/}
== #{D80FBF}
>> 64#{2A+/+}
== #{D80FBF}
>> 64#{2A+/+/}
== #{D80FBF}
>> 64#{2A+/+//}
== #{D80FBF}
>> 64#{2A+/+///}
== #{D80FBFFBFFFF}
07:00Should be 4 characters or groups of 4 characters, or - error
Oldes
08:56Are you sure that it is an issue?
08:56[![image.png](https://files.gitter.im/red/bugs/udNJ/thumb/image.png)](https://files.gitter.im/red/bugs/udNJ/image.png)
08:56https://cryptii.com/pipes/base64-to-hex
08:59actually according the web, 64#{2A+} and 64#{2A} could be valid.
09:03Just 2A+/+ is reported as invalid.
endo64
09:15For R2 & R3:
>> 64#{2A+/+///}
== #{D80FBFFBFFFF}
>> 64#{2A+/+//}
** Syntax Error: Invalid binary -- 64#{2A+/+//}
>> 64#{2A+/+/}
** Syntax Error: Invalid binary -- 64#{2A+/+/}
>> 64#{2A+/+}
** Syntax Error: Invalid binary -- 64#{2A+/+}
>> 64#{2A+/}
== #{D80FBF}
>> 64#{2A+}
** Syntax Error: Invalid binary -- 64#{2A+}
>> 64#{2A}
** Syntax Error: Invalid binary -- 64#{2A}
rebolek
09:39Should empty block in func specs mean that the argument can't have any type? What's the use for this?
>> f: func [x []][x]
== func [x []][x]
>> f 1
*** Script Error: f does not allow integer! for its x argument
*** Where: f
*** Stack: f  

>> f "asd"
*** Script Error: f does not allow string! for its x argument
*** Where: f
*** Stack: f
09:39I would prefer it empty block would be same as no block.
Oldes
09:50Heh... it's same in Rebol... the use of it is to be able to write useless functions.
rebolek
09:51:smile:
hiiamboris
09:57and what will be the use of using an empty block instead of no block?
rebolek
09:58It would be the same.
dockimbel
10:00It's a side-effect of the function spec dialect. An empty block as type spec means that none of the existing types are allowed. We could emit an error on that, but that would be adding code to remove a possible feature. Less is more.
hiiamboris
10:01@dockimbel should I raise an issue about compiler not complaining about non initialized structs in the stack?
dockimbel
10:02One usage of that could be to dynamically enable/disable access to a given function (it's probably not the best way, but it's efficient ;-)).
10:05@hiiamboris I would prefer a wish ticket (or is there a wiki page for that now?), to propose that the compiler emits a warning for that, and a proposition about handling warnings through a compilation option.
rebolek
10:06> One usage of that could be to dynamically enable/disable access to a given function (it's probably not the best way, but it's efficient ;-)).

Ok then :smile:
Oldes
10:08But it would work only with functions, which have some argument.
dockimbel
10:10Insert a fake argument with empty type spec to disable access to any function. ;-) It wouldn't work for compiled functions though. Anyway this behavior seems harmless, so we would not add code to block it.
hiiamboris
10:16what about this (compiling any script w/o header at all):
*** Red Compiler Internal Error: Script Error : copy expected value argument of type: series port bitset
*** Where: rejoin
*** Near:  [mold copy/part pos 40]
rebolek
10:17I agree it 's harmless, but when left in Red, I believe it should be documented.
dockimbel
10:19@hiiamboris The compiler should produce a proper error instead of choking on it.
hiiamboris
10:40ok wish here the way I see it: https://github.com/red/REP/issues/38
rebolek
10:49I can understand that using strings in binary parsing shouldn't work, but this seems inconsistent:
>> text: to binary! crlf
== #{0D0A}
>> parse text [crlf]
== false
>> parse text [to crlf]
*** Script Error: PARSE - invalid rule or usage of rule: "^M^/"
*** Where: parse
*** Stack:
endo64
11:20parse text compose [(to binary! crlf)] ; ==true because text is not a string but a binary value, hence your rule should be as well.
>> parse #{65} [#"e"]
== true
>> parse #{65} ["e"]
>> parse #{65} compose [(to binary! "e")]
== true
11:21Ah, you already mentioned that.
11:21But still crlf is a string, not a char or binary.
rebolek
11:22No problem, so it fails. But once it returns false and in second case error!.
11:22If string rule in binary is invalid, both cases should throw error, no?
dockimbel
11:23It's not inconsistent, the matching operation is different in those two rules.
11:24The first one is equivalent to a crlf = #{0D0A} while the second one is similar to find #{0D0A} crlf.
rebolek
11:27I see.
dockimbel
11:27I see that Rebol does a stricter checking when the input is of any-string!:
>> parse "hello" ['abc]
** Script error: PARSE - invalid rule or usage of rule: 'abc
** Where: parse
** Near: parse "hello" ['abc]
rebolek
11:28In R3, you can use strings when parsing binary.
dockimbel
11:29@rebolek Isn't R3 encoding its strings in UTF-8 internally? If so, then that's understandable, as it costs nothing to allow such matching. If not, I wonder how R3 manages on-the-fly UTF-8 conversions then, the overhead must be very big.
rebolek
11:31@dockimbel I think it does, @Oldes should know about R3 internals better.
dockimbel
11:35@rebolek If so, then it can do such matching in Parse, but Red cannot, it needs an explicit conversion to UTF-8. Though, you could use macros if you really want to embed strings in rules when parsing binary series in Red. For example, prefix the strings with #utf8 and write a short macro that will preprocess those nested strings.
Oldes
11:37R3 does not have UTF-8 internally... just ANSI and UTF-16... I guess that parsing binary with not ANSI string would fail.
rebolek
11:38@dockimbel I'm fine with using binary directly in such case, I noticed it just because converting some R3 code to Red.
Oldes
11:38In R3:
>> parse to-binary "Škoda" ["Škoda"]
== false

>> parse to-binary "Skoda" ["Skoda"]
== true
11:39So it does not do any conversion. Just uses the internal data structure in parse.
11:44Which may be useful in some cases, when one know its limitations, as this should be safe:
>> parse to-binary "<a>Škoda</a>" [thru "<a>" copy x to #"<" to end] to-string probe x
#{C5A06B6F6461}
== "Škoda"
11:58On the other side, R3 does not allow find #{0D0A} crlf as Red does.
>> find #{0D0A} crlf
** Script error: values must be of the same type
** Where: find
** Near: find #{0D0A} crlf
dockimbel
12:04@Oldes We could allow the same feature in Parse in Red, but that looks quite sloppy and error-prone for the user. Though, Internet protocols rely on ASCII strings, so it's quite tempting to allow it...
Oldes
12:07But useful... it is up to you:) The thing is, that in R3, the default result from read is binary and so one can for example parse page's title without need to convert all the content into string and still use human-friendly tag names.
dockimbel
12:08@Oldes You can use read/binary in Red for getting the raw binary instead of the human-friendly default string. Yeah, for HTML tags parsing it could be useful too.
Oldes
12:09Yes, but the human-friendly tags is what is important.
>> parse to-binary "<a>Škoda</a>" [thru <a> copy x to </a> to end]
== true
12:11I think it was me who changed Carl's mind in this case btw. I think he had same arguments like you :-)
dockimbel
12:12@Oldes
> Yes, but the human-friendly tags is what is important.

Red handles that already:
>> parse "<a>Škoda</a>" [thru <a> copy x to </a> to end]
== true

Allowing binary parsing to match strings is just an optimization, but I agree that it can be a useful one.
Oldes
12:13I know... but we were talking about binary input parsing.
dockimbel
12:13@Oldes You can open a wish ticket for it.
Oldes
12:14I was not the one who requested it... it was @rebolek :) And actually he didn't like that in one case it does not throw an error.
dockimbel
12:17I think we can allow it, as we do already for find. Though, it's still a borderline semantic rule which will need to be properly documented.
gltewalt
19:06So in other Redbols, Base 64 binary follows the rule I mentioned. 4 characters or groups of 4 characters- anything else is an error.
19:07Red doesn’t error for Base 64, currently

greggirwin
04:22@rebolek @oldes, we can add notes about this to https://github.com/red/red/wiki/%5BDOC%5D-Parse
04:29@gltewalt https://en.wikipedia.org/wiki/Base64#Decoding_Base64_without_padding
>> to string! 64#{YW55IGNhcm5hbCBwbGVhcw}
== "any carnal plea"
>> to string! 64#{YW55IGNhcm5hbCBwbGVhc3U}
== "any carnal plea"
>> to string! 64#{YW55IGNhcm5hbCBwbGVhc3Vy}
== "any carnal pleasur"

Looks like Red could do better, as the first two cases there don't look correct. Should be the same as
>> to string! 64#{YW55IGNhcm5hbCBwbGVhcw==}
== "any carnal pleas"
>> to string! 64#{YW55IGNhcm5hbCBwbGVhc3U=}
== "any carnal pleasu"

Or we say we don't support unpadded data.
gltewalt
04:32I think padding works with enbase and debase
04:36
>> enbase/base "any carnal pleasure" 64
== "YW55IGNhcm5hbCBwbGVhc3VyZQ=="

04:38
>> b: enbase/base "any carnal pleasure" 64
== "YW55IGNhcm5hbCBwbGVhc3VyZQ=="

>> to-string debase/base b 64
== "any carnal pleasure"
04:45
>> enbase/base "any carnal pleas" 64
== "YW55IGNhcm5hbCBwbGVhcw=="

>> enbase/base "any carnal pleasu" 64
== "YW55IGNhcm5hbCBwbGVhc3U="

>> enbase/base "any carnal pleasur" 64
== "YW55IGNhcm5hbCBwbGVhc3Vy"
dockimbel
15:19@rebolek Feature added to Parse:
--== Red 0.6.4 ==-- 
Type HELP for starting information. 

>> parse to-binary "<a>Škoda</a>" [thru "<a>" copy x to #"<" to end] to-string probe x
#{C5A06B6F6461}
== "Škoda"
rebolek
15:20@dockimbel Nice, thanks!
greggirwin
17:49@rebolek, @dockimbel is devious you know. This feature now puts the pressure on the rest of us to write protocols when 0.7.0 is available. "See how easy it is!" ;^)
hiiamboris
17:55@dockimbel shouldn't declare zero-fill the struct?
Red/System []
s!: alias struct! [x [integer!]]
f: func [/local x [s!]] [
	x: declare s!
	print x/x
	x/x: x/x + 1
]
f f f

gives me: 012
17:58at least that's how I interpreted https://static.red-lang.org/red-system-specs.html#section-4.7 ...
rebolek
17:58@greggirwin :smile:
hiiamboris
17:58also: is declare a dynamic allocation? probably not, but to be sure

dockimbel
03:06 @hiiamboris declared is a static zero-filled allocation. So you have to be cautious if you are using it from a local variable.
hiiamboris
10:42@dockimbel hmm.. I find it semantically misguiding then. It *looks like it does something*, occurring in the midst of code, while in reality it only tells the compiler to leave some zeroes at some place when it generates that code.
Even so,
1) how do I zero fill the struct properly? I can = 0 2 members, but if there's more it becomes annoying. And memset seems like an overkill for the task. No?
2) I take it /local x [s! value] stores that struct data in the code segment before the function, right? Where /local x [s!] (accessed by reference) stores the data?
3) what's even the point of declare? isn't /local x [s!] a declaration in it's own right?
endo64
11:23@hiiamboris important questions indeed, but better fit to red/system room instead of /bugs.
hiiamboris
11:27@endo64 right! sorry ☻
endo64
11:28@hiiamboris No problem! Just for later references it would be better this conversation to be there.
dockimbel
11:35@endo64 Should I answer his questions here or in R/S, I'm lost. ;-)
endo64
13:16Can someone confirm that this is a bug?
I have some files with similar names, test1, test2, when I type %te and press tab key CLI and GUI console auto-completes to %test.
But if I have one more file with uppercase, TEST3, then when I press tab auto complete makes %te to %
dsunanda
13:36@endo64 I can see that too - Red 0.6.4 Win10. If I create a file called TEST, then %te in console autocompletes to %.

If I delete the fiie TEST, it goes back to autocompleting the names of previous files that begin %te - including the rather mysterious file name %test-render.red - which does not exist on my drive(s).
endo64
14:29Thanks @dsunanda opened #3674
gltewalt
21:43@dander I forgot to thank you for the Scoop link.
Thanks.

hiiamboris
18:10I'm wondering, is this order for a reason?
>> view [backdrop white origin 0x0]
>> view [origin 0x0 backdrop white]
*** Script Error: VID - invalid syntax at: [backdrop white]
*** Where: do
*** Stack: view layout layout cause-error
toomasv
18:59It's clearly intended, as seen from doc.
hiiamboris
19:05oh I see.. it's because one can change both origin and space at a whim, but not backdrop
toomasv
19:35All window props (i.e. size and title too) and actors. But you can set up layout block without these and include these with view/options.

bitbegin
07:48write %abc.txt system/words crash console, should be a bug
endo64
10:39@bitbegin Confirmed on W10.
Additionally, I couldn't make a copy of system/words to test.
>> o: make system/words []
*** Script Error: cannot set on-change* field to unset! datatype
>> o: make system/words [on-change*: none]
*** Script Error: cannot set on-change* field to none! datatype
hiiamboris
11:46more info:
>> write %nul system/words
root size: 3451, root max: 4878, cycles: 0
root size: 3451, root max: 4878, cycles: 1

*** Runtime Error 101: no value matched in SWITCH
*** in file: /d/devel/red/red-src/red/runtime/datatypes/string.reds
*** at line: 377
***
***   stack: red/string/get-char 00000065h 4393006
***   stack: red/string/get-char 02C2A50Ch 16
***   stack: red/file/to-local-path 02980404h 02980434h false
***   stack: red/file/to-OS-path 02980404h
***   stack: red/simple-io/write 02980404h 02980414h 029803F4h 029803F4h false false false
***   stack: red/file/write 02980404h 02980414h false false false false 029803F4h 029803F4h 029803F4h 029803F4h
***   stack: red/actions/write 02980404h 02980414h false false false false 029803F4h 029803F4h 029803F4h 029803F4h
***   stack: red/actions/write* -1 -1 -1 -1 -1 -1 -1 -1
***   stack: red/interpreter/eval-arguments 02B80244h 02E23EB8h 02E23EB8h 00000000h 00000000h
***   stack: red/interpreter/eval-code 02B80244h 02E23E98h 02E23EB8h false 00000000h 00000000h 02B80244h
***   stack: red/interpreter/eval-expression 02E23E98h 02E23EB8h false false false
***   stack: red/interpreter/eval 029803D4h true
***   stack: red/natives/catch* true 1
***   stack: ctx473~try-do 003A1E00h
***   stack: ctx473~do-command 003A1E00h
***   stack: ctx473~eval-command 003A1E00h
***   stack: ctx473~run 003A1E00h
***   stack: ctx473~launch 003A1E00h
14:21is this a necessary limitation that paths can't swallow pairs as they appear?
>> i: make image! 2x2
>> i/1x1
*** Syntax Error: invalid integer! at "i/1x1"
*** Where: do
*** Stack: load 
>> i/(1x1)
== 255.255.255.0
meijeru
16:53It is a lexical restriction

amreus
20:39Here's a Rich Text anomaly. Rich Text doesn't like having a single character between tags when the single character is another tag, unless the single char is the same as the tag:
view [rich-text data [i "u" /i] ; error
view [rich-text data [s "i" /s] ; error
view [rich-text data [b "s" /b] ; error
view [rich-text data [u "u" /u] ; OK
20:45Leading or trailing text makes no difference
view [rich-text data [ "begin " u "s" /u " end" ]] ; error

Using red-26dec18-7369fa2e.exe on WIndows 10 Home
hiiamboris
20:46@amreus there's an extra [ in your examples. You're right though, quite a bug there. Can you raise an issue on the issue tracker?
amreus
20:47@hiiamboris I see. In the examples but there's an error without them. I fixed the examples posted here. I'll try filing an issue.
hiiamboris
20:47Yeah. I also found some more just now: view [rich-text data ["u" i "x" /i]] doubles the x
amreus
20:49Dang - messed up the examples again and now can't edit them.
ne1uno
20:50no preview! can't waste buttons?
20:53can someone add a preview button to the new issue template?

toomasv
10:10@amreus @hiiamboris First, as here the problem seems to be with one-letter strings, which somehow get wrongly interpreted, I experimented a bit and came up with this solution: to avoid this I put a check on [style, line 32](https://github.com/red/red/blob/master/modules/view/RTD.red#L31): ahead [word! | tag! | tuple! | path!] and it worked. (Could be made into typeset! style!: make typeset [word! tag! tuple! path!]) Additionally I allowed char! along with string! on [line 52](https://github.com/red/red/blob/master/modules/view/RTD.red#L52), which seems to cause no harm, but allows also spec like [#"u" b #"s" /b i [#"b"]].

Second, there was problem with colors. Colors are supposed to be closed with this syntax: red ["aaa"] blue ["bbb"] green ["ccc"], otherwise they have scope to the end of input text. If they "stand alone" as in [red "aaa" blue "bbb" green "ccc"], it is ok, because they are stored in data block in this order. But if they are united with some other style, they may get transferred to some earlier position and can be "overwritten" by later colors. But closing syntax doesn't work due to bug(s) in pop-color func on [line 60](https://github.com/red/red/blob/master/modules/view/RTD.red#L60). Here is correction:
pop-color: has [entry pos][
		;close-colors
		;entry: back back tail color-stk
		entry: skip tail color-stk -3
		append append out as-pair entry/1 tail-idx? - entry/1 entry/3
		clear skip tail color-stk -3
	]


Third, there is also problem with styles in path - if color is included in path it is not closed. Correction in the end of [pop-all func](https://github.com/red/red/blob/master/modules/view/RTD.red#L101):
pop-all: function [mark [block!]][
		first?: yes
		while [mark <> tail stack][
			pop last stack
			either first? [first?: no][remove skip tail out -2]
		]
		if v [pop-color] ; <- this was lacking
	]
10:24^ Instead of append append out ...:
reduce/into [as-pair entry/1 tail-idx? - entry/1 entry/3] tail out
10:36Or rather :flushed:
repend out [as-pair entry/1 tail-idx? - entry/1 entry/3]
10:43The bug in first case appears from the parsing:
>> parse ["i"][<i>]
== true

Strings "u", "i", "s" and "b" are initially interpreted as style tags.
endo64
12:29@toomasv Great analysis! Why don't you make a PR with your fixes?
toomasv
12:30@endo64 Thanks! Done already!
9214
12:30
text
>> parse ["i"][<i>]
== true
>> parse [user@domain]["user@domain"]
== true
>> parse [%file]["file"]
== true
>> parse [http://site.com]["http://site.com"]
== true


This deserves a separate issue. Seems that any-string! values can be parsed with any other any-string! value.
toomasv
12:31Ok, will do.
12:46Is the problem [here](https://github.com/red/red/blob/master/runtime/parse.reds#L65)?
9214
12:48Hard to say, but it boils down to equal? vs. strict-equal? comparison. Culprit might be [here](https://github.com/red/red/blob/master/runtime/parse.reds#L345).
12:48
text
>> parse/case ["user@domain"][user@domain]
== false
12:49Something to do with comp-op.
toomasv
13:21@9214 Indeed, parse/case on [line 137](https://github.com/red/red/blob/master/modules/view/RTD.red#L137) would have fixed the first case also.
13:34@dockimbel Might it actually be intended result (for performance?), and to avoid it we have just to use case or additional check on type?
dockimbel
14:33@toomasv Yes, it was intended, along with a /strict extra refinement, which is currently merged in /case for implementation reasons. We probably need to revisit those choices, if they cause more issues than help.
14:36There is a bunch of changes/addition that are waiting in the pipe to be applied to Parse, so we should cover those all together in a single upgrade pass over Parse's code.
toomasv
14:56@dockimbel Ok, thanks!

toomasv
08:23Is this a bug in block find?:
>> index? find/tail [a b c d e f] [c d e]
== 4
>> index? find/tail "abcdef" "cde"
== 6

In REBOL:
>> index? find/tail [a b c d e f] [c d e]
== 6
dockimbel
08:31@toomasv Looks like a bug yes, please log it in a ticket, should be a quick fix.
toomasv
08:31OK, thanks. #3686
luce80
19:56I downloaded Red 0.6.4 for Windows built 25-Dec-2018/12:56:39+01:00 commit #67a6bffon Win7 and freshly compiled libRED.dll and then mandelbrot.red does not draw.
9214
20:03@luce80 compile in release mode instead.

hiiamboris
14:32@xqlab shouldn't you somehow check against going upwards in the tree?
9214
14:35 @xqlab I'd suggest to use /help room instead, unless you are really confident (and if you are, then try to narrow it down a bit further) that there's a bug somewhere in your snippet.
amreus
18:15@toomasv Since your analysis, do issues still need to be filed for these two rich-text bugs?
9214
18:17@amreus https://github.com/red/red/pull/3684
18:19These issues pointed out a caveat in how Parse handles any-string! matching, so there is a pending design decision to be made in that regard.
amreus
18:20@9214 Ok good. I was looking for them in the issues. Thanks.
9214
18:20No problem. Thanks for finding them in the first place :wink:

toomasv
08:35@amreus My fix is merged in new build and it works. However, I see some other problems, which need fixing. One concerns s and u in style path with color, e.g. u/red ["xxx"]or s/b/green/i ["xxx"]. In these cases, i.e. when s or u start the path, the color is not rendered, although it is included in data, e.g. 1x3 underline 255.0.0 and 1x3 italic bold strike 0.255.0 for cases above. These are exactly the cases where strike or underlineappear immediately before the color tuple in data. The problem can be overcome with e.g. u red ["xxx"] /u or changing the order of styles in longer path, e.g. i/s/b/green ["xxx"]. In both cases the order of styles in data will be different -- in first case color appears before strike or underline, in second case italic or bold appear immediately before color tuple. I can't say where is the source of the problem though.

Another problem is also with paths -- when color-word does not end the path, but appears somewhere earlier, and this path is not the last element to be processed, then color is not integrated with other styles in path, and similar problem appears as earlier -- some things get overwritten with wrong colors. This bug concerns my fix to pop-all.
09:27^ This is on W10. Don’t know about other.
15:04OK, most of this would be cleared with following changes:

1) To prevent underline or strike to be positioned immediately before color-tuple, let's transfer color-setting before other styles in [pop-all](https://github.com/red/red/blob/master/modules/view/RTD.red#L101).
pop-all: function [mark [block!]][
		first?: yes 
		if col [pop-color] ; <-- TO HERE
		while [mark <> tail stack][
			pop last stack
			either first? [first?: no][remove skip tail out -2]
		]
		;if v [pop-color] FROM HERE --^
	]


2) Notice that v is changed to col above. That's because v is set to none on each style in path (line 46 below) and so color was not added if it appeared in earlier places in path. To fix it I introduced new marker col, which is set to none just once while entering path ([line 45](https://github.com/red/red/blob/master/modules/view/RTD.red#L45)), and to yes if color is seen in the styles path ([line 48](https://github.com/red/red/blob/master/modules/view/RTD.red#L48)).
| ahead path!
		  into [
			(col: none mark: tail stack) some [ ; <-- LINE 45
				(v: none) ; <-- LINE 46
				s: ['b | 'i | 'u | 's | word! if (tuple? attempt [v: get s/1])]
				(either v [col: yes push-color v][push s/1]) ; <-- LINE 48
			]
		  ]
		  nested (pop-all mark)


3) optimize func which is meant to join styles with same indexes, actually worked on first one only and ignored further cases because of miscalculated jump on [line 117](https://github.com/red/red/blob/master/modules/view/RTD.red#L117). My proposal is to replace next there with skip:
; e: next move/part s pos offset? s back e ; CURRENT
e: skip move/part s pos l: offset? s back e l ; PROPOSED

In my expereiments this works well.

4) A readability problem -- while popping colors new-line was not set. I propose to insert one on [line 64](https://github.com/red/red/blob/master/modules/view/RTD.red#L64):
pop-color: has [entry pos][
		entry: skip tail color-stk -3
		repend out [as-pair entry/1 tail-idx? - entry/1 entry/3]
		new-line skip tail out -2 on ; <-- HERE
		clear entry
	]

These fixes correct the second problem mentioned in previous post and circumvent the first one without removing the root cause, which is above my head. If ever strike or underline will appear immediately before color-tuple in data, color is not rendered, e.g. after introducing above fixes, the bug will still affect cases like this:
view [rich-text data [s [red "bbb"]]]
;But not this
view [rich-text data [s [red ["bbb"]]]]
15:18That's because in first case color is closed in the end of processing only, and is then united to strike in optimization phase, but on second case color is closed immediately, and strike is united to it.
hiiamboris
15:46@toomasv You seem to have dismantled that RTD to bits already ☺ Nice job! I expect soon it will become reliable enough for even the most complex of tasks.
toomasv
15:56@hiiamboris Long way to go still! We need nice scrolling-bars handling and automatic key events for it. :)
hiiamboris
19:36Is this not a bug?
>> arctangent 0.1
== 5.710593137499643
>> arctangent 10%
== -89.99999996664947
>> arctangent 10.0
== 84.28940686250037

>> arcsine 0.1
== 5.739170477266787
>> arcsine 10%
*** Math Error: math or number overflow
*** Where: arcsine
*** Stack:
19:37I expected percent be treated same as float, but I can't make any sense of it at all.
toomasv
20:00Hmm
>> arctangent -1717986737.680019
== -89.99999996664947

hiiamboris
00:20I require a volunteer for GC bug safari.
Here's a snippet with instructions https://gitlab.com/snippets/1793901
Can anyone confirm that?
9214
01:11@hiiamboris no crash on Linux (both with old Dec 8 build and the latest one). Index table is formed and printed out without a fuss.
hiiamboris
01:29Hmm... elusive, this one. I tried 6-7 different builds, all of them crash. It looks like compiling the console with Needs: View enabled and -d flag makes it crash sooner (25kB output only, of the whole 12MB):
*** Runtime Error 1: access violation
*** in file: /D/devel/red/red-src/red/runtime/parse.reds
*** at line: 499
***
***   stack: red/parser/loop-bitset 02D416BCh 02D5BC64h 0 -1 0018F750h 0
***   stack: red/parser/loop-token 02D416BCh 02D5BC64h 0 -1 0018F750h 0 0
***   stack: red/parser/process 02D416BCh 02A804E4h 0 0 02A804C4h
***   stack: red/natives/parse* false -1 0 -1
***   stack: red/interpreter/eval-arguments 02B805C4h 02D5C81Ch 02D5C81Ch 00000000h 00000000h
***   stack: red/interpreter/eval-code 02B805C4h 02D5C7FCh 02D5C81Ch false 00000000h 00000000h 02B805C4h
***   stack: red/interpreter/eval-expression 02D5C7FCh 02D5C81Ch false false false
***   stack: red/interpreter/eval 02A80494h false
***   stack: red/natives/forall* false
***   stack: red/interpreter/eval-arguments 02B80364h 02D5C4CCh 02D5C4CCh 00000000h 00000000h
***   stack: red/interpreter/eval-code 02B80364h 02D5C4ACh 02D5C4CCh false 00000000h 00000000h 02B80364h
***   stack: red/interpreter/eval-expression 02D5C4ACh 02D5C4CCh false false false
***   stack: red/interpreter/eval 02D5C3C8h true
***   stack: red/interpreter/eval-function 02A803F4h 02D5C3C8h
***   stack: red/_function/call 02A803F4h 00393884h
***   stack: red/interpreter/eval-code 02A803F4h 02D5C258h 02D5C258h false 00000000h 00000000h 02B86E54h
***   stack: red/interpreter/eval-expression 02D5C248h 02D5C258h false false false
***   stack: red/interpreter/eval 02A803C4h false
***   stack: red/natives/foreach* false
***   stack: red/interpreter/eval-arguments 02B80354h 02D5C114h 02D5C114h 00000000h 00000000h
***   stack: red/interpreter/eval-code 02B80354h 02D5C0E4h 02D5C114h false 00000000h 00000000h 02B80354h
***   stack: red/interpreter/eval-expression 02D5C0E4h 02D5C114h false false false
***   stack: red/interpreter/eval 02D5BFE0h true
***   stack: red/interpreter/eval-function 02A80354h 02D5BFE0h
***   stack: red/_function/call 02A80354h 00393884h
***   stack: red/interpreter/eval-code 02A80354h 02D408E0h 02D40910h false 00000000h 00000000h 02B86E24h
***   stack: red/interpreter/eval-expression 02D408E0h 02D40910h false false false
***   stack: red/interpreter/eval 02A80334h true
***   stack: red/natives/catch* true 1
***   stack: ctx473~try-do 003B1DF0h
***   stack: ctx473~launch 003B1DF0h
9214
01:36And it works as expected with recycle/off?
hiiamboris
01:46Yep.
01:48I need to somehow make a smaller snippet, but I grew bored with it today ;) Better luck tomorrow maybe. Thanks for testing it @9214
dockimbel
03:58@toomasv Great work on reverse-engineering RTD and fixing issues! :+1:
toomasv
04:04:smile:
14:16Some thoughts more on RTD.

Currently, if colors which where open in the beginning are closed in the end then other colors which where inserted in between are overwritten. Like this:

view [rich-text data [
    "black " red "red " green ["green " blue ["blue "]] "red"
]]


[![rt-colors1](http://vooglaid.ee/red/rt-colors1-1.png)](http://vooglaid.ee/red/rt-colors1-1.png)

To prevent this, unclosed colors should be inserted in the begenning of the out block in [close-colors](https://github.com/red/red/blob/master/modules/view/RTD.red#L67):
close-colors: has [pos][
		pos: tail color-stk
		while [pos: find/reverse pos '_][
			pos/1: tail-idx?
			insert out as-pair pos/-1 tail-idx? - pos/-1
			insert next out pos/2
			new-line skip out 2 on
			pos: remove/part skip pos -1 3
		]
	]


[![rt-colors2](http://vooglaid.ee/red/rt-colors2-1.png)](http://vooglaid.ee/red/rt-colors2-1.png)

The above rich-text will be better with this change, but not perfect, because, similar problem affects colors, which are immediately closed, but nested. To fix this, [optimize](https://github.com/red/red/blob/master/modules/view/RTD.red#L110) func may be made to sort styles:

optimize: function [][								;-- combine same ranges together
		parse out [
			any [
				cur: pos: pair! (range: pos/1) [to pair! e: pos: | to end e:]
				any [
					to range s: skip [to pair! | to end] e: (
						s: remove s
						e: skip move/part s pos l: offset? s back e l ;!!! tom 30.12.2018
					) :e
				]( 
					pos: :cur mov: no
					while [pos: find/reverse pos pair!][
						case [
							any [
								pos/1/1 > cur/1/1
								all [pos/1/1 = cur/1/1 pos/1/2 > pos/1/2]
							][
								mov: yes 
								pos1: :pos
								if head? pos1 [
									move/part cur pos1 offset? cur e
									break
								]
							]
							any [mov head? pos] [
								move/part cur pos1 offset? cur e
								break
							]
							'else [break]
						]
					]
				)
			]
		]
	]


With this the above view snippet will show perfectly.

[![rt-colors3](http://vooglaid.ee/red/rt-colors3-1.png)](http://vooglaid.ee/red/rt-colors3-1.png)
hiiamboris
17:54https://github.com/red/red/issues/3692 on the GC/parse crash
I have cast in stone the set of files that lead to the bug appearing, but that's as far as I can get it. Hopefully @dockimbel will be lucky enough to reproduce it.
greggirwin
20:06More good research @toomasv and @hiiamboris. Thanks for that.