« first day (3249 days earlier)      last day (531 days later) » 

7:16 AM
posted on September 23, 2019 by IngoHohmann

Example: >> g: func[a][a] == make action! [[a] [...]] >> hijack 'func 'g PANIC ACTION! called (explicitly or by rebPanic() API) and in the webconsole I get the following in the log: 2libr3-dca6265.js:1558 fail() @ ../src/include/datatypes/sys-frame.h 907

 
 
1 hour later…
8:16 AM
posted on September 23, 2019 by IngoHohmann

>> f: function[val <static> accum ([])][] == make action! [[val] [...]] >> f: func[val <static> accum ([])][] ** Script Error: invalid function definition: <static> ** Where: func console ** Near: [... func [val <static> accum ...] [] ~~] ** Line: 1

 
9:12 AM
@HostileFork I like the functionality, notationwise it looks a bit weird on first look, but I can get accustomed to it, and don't really have any better ideas.
 
@ingo I'm trying to think about this progressive levels of types (where from one point of view, you might think of 'x as a QUOTED! just like 'x/y is quoted, as [x] is a BLOCK! just like [x/y] is a BLOCK!). Yet from another point of view, you don't want the type of 'x to be the same as that of 'x/y
And also, wanting to push Rebol back into more concretized representations. DATATYPE! as some kind of weird thing gets you these bad situations like rebol2> type? 10 coming back as == integer! which looks just like a WORD!. So then you try (first [integer!]) = (type? 10) and it says it isn't a match.
So it is appealing to me to have type of 10 be @[integer], and then to say (first [@[integer]]) = (type of 10) and have that work. And I'm thinking the idea that this concrete part can be applied for other things when you don't need your dialect to talk about types is good.
Question is how much trouble you get in by saying the TYPE OF comes back with something that doesn't expressly identify itself as a datatype. It means that some old ideas like make [1 2 3] 4 being a synonym for make block! 4 won't work out...because make @[integer] 4 would give you (if anything) an integer with value of 4, not an empty @[] with preallocated capacity 4.
 
9:47 AM
So
    type of 'a/[b]/c
would be quoted! and
    type/1 of 'a/[b]/c
would be path!
    type/2 of 'a/b/c
would be word!

How would I know how deep I have to drill in cases like
    type of '''''a/b/c
 
@ingo Note that type of 'a/[b]/c will still be PATH!, as the evaluator would take off one quote level before passing it as an ordinary parameter to OF. Hence why I always say type of first ['a/[b]/c], in order to avoid any latent confusion people have about how LIT is now what QUOTE was, and QUOTE adds quoting levels...
You always in Rebol have to sort of know the spectrum of what you might have in your hands to deal with it. I really am just in the formative stages of thinking about what a little pattern dialect for types might look like which goes more than one level deep.
 
@HostileFork Ahh, yes, didn't pay attention to this, because my main point was the difference between quoting levels vs path/block position.
 
Other languages have pretty good pattern matching and wildcarding on structure, but they are generally much more constrained.
You are limited in what kinds of types can plug into other types at what places.
 
 
1 hour later…
11:23 AM
Is it possible to get rid of the need to set 'v in this case?

>> trap [v: 3 * 4] then [v: system/state/last-error] v
== 12

‌>> trap [v: 3 * 'b] then [v: system/state/last-error] v
== make error! [
‌ type: 'Script
‌ id: 'no-value
‌ message: [:arg1 "has no value"]
‌ near: [last-error ~~]
‌ where: [main]
‌ file: _
‌ line: 1
‌ arg1: 'last-error
‌]

I am using this in a js-native, and I don't want to pollute word-space, and I actually don't know how this would be handled in js-natives.
 
 
3 hours later…
2:46 PM
posted on September 23, 2019 by Oldes

Now: >> mold/flat make event! [type: 'lookup] == "make event! [^/type: 'lookup^/]" It should be: == "make event! [type: 'lookup]" Related to: #2357

 
3:16 PM
posted on September 23, 2019 by Oldes

As with: #2357 and #2387 b: [ 1 2 3 4 ] mold/flat b ;== "[1 2^/3 4^/]" but should be: "[1 2 3 4]"

 
 
2 hours later…
5:17 PM
As a selling point for VSCode, the GitLens extension is pretty neat. When you click on a line you have a little bit of feedback telling you which commit it came from--an instant "blame" view.
 
 
1 hour later…
6:19 PM
@ingo trap [3 * 'b] then (func [e] [e]) should work, also achievable with trap [3 * 'b] then (e => e). If I can figure out a bit of quoting mechanics then trap [3 * 'b] then e => [e] should also be an option.
@ingo Oh, not quite...you want the value out. Hm. Well actually, that may be a job for reb.Sink()
@ingo I'm afraid for the moment the easiest solution there might be use [v] [...] wrapping the whole thing, which would be nicer perhaps as let v | ...
 

« first day (3249 days earlier)      last day (531 days later) »