« first day (1509 days earlier)      last day (2271 days later) » 

3:30 AM
So Rebol's cell size is 96 bits, and Red's 128
 
4:28 AM
I really like C++, and I like Haskell as well, but sometimes you use them and appreciate why one might want something that's more fluid.
I do think, that the hackish interpreter world...the existence of things like JavaScript and such, and seeing the academic failures of more rigorous formal methods...is about the expression of a desire that people have. Trying to communicate with an overbearing system that requires everything to be formal, you might want to say "My kingdom for a pencil!"
 
 
4 hours later…
8:28 AM
Okay, oops, no including header Rebol is 128 too. Scratch that. I was just looking at the sub-structure. Okay. Makes more sense.
 
9:07 AM
@HostileFork They are in Rebmu now with Parse and Pre-Parse though!
Could get closer to the hole that way...
 
@rgchris Rebmu: still the vanguard of innovation in Rebol/Red. Truly, it is the future of programming...
"You laugh. They laughed at Einstein, too. Wait... did they? I don't know."
So... it seems words are not garbage collected. I didn't know that, or think about it.
Regardless of NewPath, I think they should be. But certainly, anything that would lead to large numbers of word usages would introduce a need to GC them.
That could happen today if you have some server that is LOADing arbitrary data, and it just sits there running over time. Every word used, if not used again, gets a symbol entry and it is not reclaimed.
It's not any harder to GC them, but perhaps GC'ing words could be secondary to GCing series...you do it more rarely, or as a last resort.
I suppose the harder thing is just that right now, the symbol table is a number with a maximum. This would mean there'd need to be a "free" marker in the symbol table, and when you allocated a new one you would have to reuse a number that might be in the middle instead of just incrementing.
And general questions of if the GC would ever "compact" that table, rewriting symbol numbers in references to be smaller.
 
9:35 AM
9
A: How can I typedef a function pointer that takes a function of its own type as an argument?

DaveYou can wrap the function pointer in a struct: struct fnptr_struct; typedef void (*fnptr)(struct fnptr_struct *); struct fnptr_struct { fnptr fp; }; I'm not sure if this is an improvement on casting. I suspect that it's impossible without the struct because C requires types to be defined bef...

Seriously? <sigh>
This it the thing about being forward-thinking in language design.
That should be the first thing you try, not the last, and certainly not something you don't ever try before shipping.
Hitting your system with pathological cases is the cornerstone of design--and that one is not terribly imaginative.
Of course, we can cut Dennis a lot of slack, given the time. But the times have changed...if you're pushing a language out with decades of design time, no such mistakes should be in it.
 
9:50 AM
@WiseGenius Any news?
 
@HostileFork Not just now, no.
 
10:22 AM
@WiseGenius Sounds like red 0.5.0 coming out soonish.
And a new version of Rebol 2 (?) Hm.
 
@HostileFork Yes. All the news seems to belong to others ATM. And you have something coming too?
 
@WiseGenius Yes, and another announcement from earl, sometime.
 
If we had combine, would join and rejoin be redundant or still useful?
 
@WiseGenius JOIN is all right. I've gone through various lines of argumentation as I sorted out what was what, and trying to say "well hey why not call REJOIN, JOIN, because no one uses JOIN..." It turns out JOIN is used and it's not so bad. I'm okay with REJOIN existing just as long as COMBINE exists. They are different. If you want a refresher, the blog
No tutorial for anyone who isn't writing mezzanine-style code would ever mention REJOIN, and probably not mention JOIN either
 
10:49 AM
@rebolbot
source rejoin
 
; Brought to you by: try.rebol.nl
rejoin: make function! [[
    "Reduces and joins a block of values."
    block [block!] "Values to reduce and join"
][
    if empty? block: reduce block [return block]
    append either series? first block [copy first block] [
        form first block
    ] next block
]]
 
Surely that's simple enough to write if one wanted that behaviour?
@HostileFork Have you written combine for Red too?
 
@WiseGenius I'd agree that omitting it from the box would be fine by me. No, haven't written COMBINE for Red, but it wouldn't be hard.
I've debated several questions in the design over time, so it's okay that it isn't happening straightaway, as I have added things and later thought better of it, and it has sort of cut to the core of some philosophical issues.
>> help remold
 
; Brought to you by: try.rebol.nl
USAGE:
    REMOLD value /only /all /flat

DESCRIPTION:
    Reduces and converts a value to a REBOL-readable string.
    REMOLD is a function value.

ARGUMENTS:
    value -- The value to reduce and mold

REFINEMENTS:
    /only -- For a block value, mold only its contents, no outer []
    /all -- Mold in serialized format
    /flat -- No indentation
 
>> help repend
 
10:57 AM
; Brought to you by: try.rebol.nl
USAGE:
    REPEND series value /part length /only /dup count

DESCRIPTION:
    Appends a reduced value to a series and returns the series head.
    REPEND is a function value.

ARGUMENTS:
    series -- Series at point to insert (modified) (series! port! map! gob! object! bitset!)
    value -- The value to insert

REFINEMENTS:
    /part -- Limits to a given length or position
        length (number! series! pair!)
    /only -- Inserts a series as a series
 
These are more words I consider "unfit" for the box.
And, even worse, REPEND performance is terrible: #2162
>> help reform
 
; Brought to you by: try.rebol.nl
USAGE:
    REFORM value

DESCRIPTION:
    Forms a reduced block and returns a string.
    REFORM is a function value.

ARGUMENTS:
    value -- Value to reduce and form
 
That one is just funny.
>> reform 'Rebol
 
; Brought to you by: try.rebol.nl
== "Rebol"
 
I see, Rebol just isn't willing to change. :-P
 
11:00 AM
@RebolBot
source reform
 
; Brought to you by: try.rebol.nl
reform: make function! [[
    "Forms a reduced block and returns a string."
    value "Value to reduce and form"
][
    form reduce :value
]]
 
Pointless word, huh?
 
There's a hit list for all this tidying
REJOIN is just the bugaboo because it's so entrenched; these others are mostly unused
 
@HostileFork Where is it?
 
11:03 AM
@WiseGenius In my head and in CureCode :-)
I try to keep my head as empty as possible. :-P
@WiseGenius some things take time... and years later they are picked up... it's good to remember that: youtube.com/watch?v=zF3IkPNHYCo#t=868
 
@HostileFork By the link (I've watched the video already), you're referring to the Rebol and Red icons?
BTW, is there a version of that Rebol logo with a transparent background?
 
@WiseGenius I think I've made one at some point, don't know the link exactly. But my thoughts are more abstract... maybe something doesn't get today, it might be done tomorrow. It applies to the icons, to the functions, to the artifact etc.
If you need a transparent Rebol I can look for it
 
11:22 AM
@HostileFork No, I don't really need it for anything important just now, thanks. I imagine it would be quite useful for Rebol's app icon though, on a system which didn't use flat ones?
 
Yes, well what is needed is a new model for it; it's not that complex, I just had that done by someone who had 3ds max or whatever. I'm sure people who work in the medium of 3D have better tools and could whip up something quickly more appropriate for icons. It was only a proof of concept.
 
@HostileFork Would you change the angle? Would it need to match the OS (I wouldn't know. I'm still using XP.)?
 
11:42 AM
Let's say I make an object:
x: 1
o: make object! [x: 2]
Here's a trivial question about Rebol I'm curious about:
I can do this:
o2: make o [print x]
But is there a simple way to do code in “scope” of o without making another object or having already written a function in the object?
Something like:
o/do [print x] ; (which of course won't work)
(“without making another object” is so I can return the value from my code block instead of returning an object.)
 
@WiseGenius You'd have to bind your code to the object for it to find definitions inside it.
>> help bind
 
; Brought to you by: try.rebol.nl
USAGE:
    BIND word context /copy /only /new /set

DESCRIPTION:
    Binds words to the specified context.
    BIND is a native value.

ARGUMENTS:
    word -- A word or block (modified) (returned) (block! any-word!)
    context -- A reference to the target context (any-word! any-object!)

REFINEMENTS:
    /copy -- Bind and return a deep copy of a block, don't modify original
    /only -- Bind only first block (not deep)
    /new -- Add to context any new words found
 
11:57 AM
So:
do bind [print x] o
 
@WiseGenius Works for that case, yes.
But it is what it is.
 
What I'm sort of thinking (though not very hard yet), is what if:
o/(print x)
did this?
What does this notation already do, anyhow?
I get:
** Script error: cannot access (x) in path o/(x)
Then o/(x) would be the same as o/x.
Oh, I see what it does.
So currently, o/('x) is the same as o/x
 
@WiseGenius That would maybe be a case of o/[print x] meaning in NewPath...as you've noted, the paren notation will evaluate and use the result... so if it came back with a word, that's the word you're looking up.
I've still been debating what, if anything, /[...] should mean in NewPath, so that's an interesting suggestion to put in the list.
The idea of it running a COMBINE for string types seems sensible.
But I hadn't thought about objects. So far, the meaning is allowed to be different dispatched on the type. Parens are consistent however, meaning evaluate.
 
12:23 PM
@HostileFork I think if I had seen an object with /[...] for the first time, I would have expected my suggested behaviour. It's hard to tell if I'm being objective (no pun intended) since I was already thinking about it when you suggested the notation, but... I think so.
 
@WiseGenius I'll add it to the NewPath idea list.
 
 
1 hour later…
1:44 PM
@WiseGenius Alternatively: do in o [print x].
 
>> b: [print x]
== [print x]

>> do b
1
>> do in o b
2
>> do b
2
@earl Interesting. It seems in still changes the binding of the block? Is there any difference?
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-no-value.html
    *** ERROR
** Script error: >> has no value
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
2:48 PM
@WiseGenius Order of arguments :))
BIND and IN are closely related.
BIND is the basic primitive, IN optimises for a few common usage scenarios.
 
3:11 PM
@earl Where can I read more about in?
 
Here's the docs: Rebol 3 Functions: in
And one pertaining SO Q&A question:
3
A: How to use IN with a block instead of an object?

BrianHThe IN function isn't primarily meant for searching an object for a word, it is for returning a word or block of words that are in the object, or in Rebol terms bound to the object. It's a variant of the BIND function that is useful in different circumstances than BIND. If there is no word of th...

This answer also mentions one particular functionality of IN:
@RebolBot do
a: context [x: 1 u: 7]
b: context [y: 2 u: 8]
c: context [z: 3 u: 9]
print [quote x:  get in [a b c] 'x]
print [quote y:  get in [a b c] 'y]
print [quote z:  get in [a b c] 'z]
print [quote u:  get in [a b c] 'u]
 
; Brought to you by: try.rebol.nl
x: 1
y: 2
z: 3
u: 7
 
3:45 PM
@earl Interesting! Thanks.
 
 
2 hours later…
5:19 PM
posted on December 18, 2014 by Kaj

If you like to be bleeding edge, you can now access our web sites, including Try REBOL and our Red and REBOL sites and Fossil repositories, through the HTTP 2 protocol, the successor to HTTP 1.1 and Google's SPDY protocol.

posted on December 18, 2014 by Kaj

You may have to enable HTTP 2 in your browser or other client.

 
5:45 PM
0
A: 'Sort By' Function for Rebol

draegtunAny reason you can't use the SORTs /COMPARE refinement here? Here is a working example of sort-by that uses it: sort-by: function [ series [block!] comparator [block! word!] ][ sort/compare series func [`a `b] either word? comparator [ [`a/:comparator < `b/:comparator]...

 

« first day (1509 days earlier)      last day (2271 days later) »