« first day (1635 days earlier)      last day (2145 days later) » 

12:20 AM
@MarkI Given that Rebol does not coherently use INLINE, at all, should the current incarnation-as-macro just be deleted? Optimizing compilers don't generally need to be told, and also it considers it just a "hint" anyway.
@MarkI My intention is that SYMBOL! be the new superclass to replace ANY-WORD!
I don't care for the ANY-XXX? tests where XXX is both instance and class.
Found a problem in the C++ build that warnings could have caught, so biting the bullet and turning on -Wall to get more warnings and going for zero...
 
1:06 AM
VECTOR!, blah.
What motivated that?
 
vector! is wonderful. I'm very happy it was added to Red recently.
 
It's simple, it's not that hard to support it.
But you get--at best--(how to say this most clearly) 75% reduction of memory usage from it, at the cost of generality of structure...it makes more sense for Red trying to tackle the "full stack"
For types besides INTEGER! you probably only have 25% reduction.
It really specifically makes sense to make vectors of INTEGER! and not much else; there is already "vector of CHAR!" as STRING!
 
Well if you think that the only benefit of vector is memory saving, you are wrong.
 
What else does it do (besides perhaps locality from said memory savings for performance)?
 
If you are for example generating sound, the ability to render the stream directly is wonderful.
 
1:17 AM
Once I can do a C++ build and get it working I can actually put theories to the test. Which doesn't mean Rebol needs to be switched to C++, but it means that data structure alternate strategies can be tried out. If something pays it could be painstakingly written in C if people decided it was important.
Hum. So being able to get a pointer to contiguous data of your target type, minus Rebol metadata, you mean?
I'd think that would be BINARY!'s job
 
Yes, everything can be binary! Or we can have great set of datatypes, that make our life easier. I'm for the second option.
 
Well in any case, I've got a pretty clear emerging picture of everything at this point. VECTOR! is manageable, and there's no reason you couldn't make a VECTOR! of BLOCK! (for instance). You'd get type checking and insurance that everything in it was a block, it could be more type-safe. Memory savings would be negligible, 25%
That may or may not work today. Haven't tried.
I guess the thing that gets my goat a bit is, bigger questions didn't get hammered down first.
I wonder, at the end of the day, how many people really care what Rebol is written in.
C89? C99? C++? F#? Haskell?
DocKimbel was, IIRC, prior to Red doing an F# implementation.
Who writes C code and names a local variable "main" ? :-/ (Not Carl, in this case, something in the JPEG library.)
Do not call local variables in C "main".
 
1:57 AM
Randomness on my hitlist: using 0 to mean null pointer instead of NULL, a macro NZ(v) to tell you if a value is "not zero" and doesn't distinguish pointers from zero values :-/
How hard is it to write != NULL or != 0?
 
2:29 AM
(Or != SYM_NOT_USED, as is often the case)
 
2:46 AM
0
Q: multi-line statements in REBOL?

Alexander GuoAn annoying problem I'm having with the REBOL3 REPL is that it won't accept multi-line statements. For instance, I would like to type "some_obj: make obj! [" , hit enter, and then continue the statement. This is relevant for me as I am using a Vim plugin that sends visually selected source code ...

 
3:32 AM
@HostileFork Grumps indeed! I did wonder if that was the site to use, but it is code and I'd like it reviewed. What's the problem?!?
What constitutes a 'real' programming language exactly?
 
A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. The earliest programming languages preceded the invention of the digital computer and were used to direct the behavior of machines such as Jacquard looms and player pianos. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. Many programming languages requi...
"A programming language is a notation for writing programs, which are specifications of a computation or algorithm. Some, but not all, authors restrict the term "programming language" to those languages that can express all possible algorithms."
I think when you take the "some but not all"...and add in a moderator diamond...you wind up with the infamous "closed by one mod" phenomenon
In the moderator election I was specifically looking to not vote for "Too much spam! Give me more power, I will close questions with no voting process, to process and clean! Give me the mallet, I will use!"
Not a platform I believe in.
 
Yep, seems weird that the first impulse is to put it on hold. Why not put it under review and let people comment/answer on it in the interim?
 
I was pleased to see Jeremy Banks get in for the win, was looking like he might not. His platform was the most agreeable to me.
 
It would seem this is the key line in the Code Review terms: "If you are asking to review code in a language for which a specification exists but for which there is no interpreter or compiler implemented, then Code Review is not the place to ask."
 
Fair enough.
But one could link to that vs making some abstract semantic argument of what is and isn't a programming language.
 
3:49 AM
Then the statement in the terms is inconsistent.
 
posted on April 23, 2015 by Alexander Guo

Hi there, It's great news that REBOL will become compiled via Red/System. Now I'm not sure exactly how the compiler is implemented, but wouldn't it be better to have Red/System compiler emit C code, and then utilize GCC to compile that to efficient machine code? For instance, there's the Nim pr

 
4:46 AM
0
Q: Expressing Rebol Dates in BNF

rgchrisI'm looking to define the Rebol date format in BNF notation (as adapted for Rebol Parse). I'd like as best as possible to only define valid dates—at least those that are valid in Rebol at the moment: Rebol [ Title: "A Formal Description of Rebol Dates" Date: 23-Apr-2015 File: %date-g...

 
Same question, different notation!
 
@rgchris +1 for the "don't give in to the authoritarians" attitude. :-)
 
Thks!
Now if I can quickly write %ebnf-to-parse.reb then I can perhaps get the original question reinstated too!
Maybe tomorrow...
 
"Although Rebol will interpret 12-010-2014 as a date (12-Oct-2014), I don't see any reason to support this."
Hurm.
>> print 01 + 02
..."it's 3" says invisible RebolBot
>> print 08 + 09
..."it's 17" says invisible leading-zero-doesn't-mean-octal RebolBot
I'd say that these decisions would be intertwined.
 
Possible.
Was thinking also: 0:DECAFBAD as that doesn't conflict with numbers, set-words, urls or anything else. 0:16:DECAFBAD 0:2:01010101
Maybe too close to IPv6 addresses?
 
5:03 AM
Taking a look at IPv6 and fitting it into the plan would be forward-looking
While TUPLE! is a bit of a weird hack
Needing some rest for now, but perhaps that is a good thought to leave with--an answer for IPv6 addresses
l8r
 
5:57 AM
@rgchris I think @brett wrote an EBNF to parse at some point
BNF not EBNF
 
 
6 hours later…
11:45 AM
0
A: multi-line statements in REBOL?

endo64Unfortunately Rebol 3 Console doesn't support multi line statements. I usually write my statements into a text editor, copy them to clipboard and then do in Rebol3 console: do to string! read clipboard:// Better put that into a function: do-clip: does [do to string! read clipboard://]

 
>> "Luckily google cache kept a copy of shrink.r"
 
; Brought to you by: try.rebol.nl
== "Luckily google cache kept a copy of shrink.r"
 
@rebolbot how are you feeling?
 
@johnk Can you elaborate on that?
 
red> "As aloof as usual"
 
11:50 AM
; Brought to you by: try.rebol.nl
== "As aloof as usual"
 
@johnk Thanks for keeping our friendly neighborhood bots alive...
 
12:19 PM
My pleasure
 
12:35 PM
https://github.com/red/red/pull/1108
GitHub
Red Pull Req—FIX: crush compressor crush when compiling large files
qtxie
1429770592
 
1:17 PM
@rgchris Conflicts with time! values.
 
 
2 hours later…
2:58 PM
@johnk Thanks!
@MarkI Seemed too good to be true...
 
3:15 PM
>> format/pad [-4] 1 0
 
; Brought to you by: try.rebol.nl
== "0001"
 
3:49 PM
posted on April 23, 2015 by Alexander Guo

Hi everybody, I looked at the Trello for Red, and my two cents on the roadmap is that it doesn't seem to me that the GUI would be completely necessary when trying to make Red 1.0. Thoughts? Cheers, Alex Guo

 
4:43 PM
>> format/pad [-4] 1 #a
 
; Brought to you by: try.rebol.nl
== "#a#1#a#a"
 
:(
 
>> 1 / 0
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/math-zero-divide.html
    *** ERROR
** Math error: attempt to divide by zero
** Where: /
** Near: / 0
 
4:52 PM
@MarkI Interesting function, isn't it? My new word of the day!
>> do reb4.me/x/ebnf.r
load-ebnf {Word ::= [a-z_-] [a-z0-9_-]*}
 
; Brought to you by: try.rebol.nl
== [
    Word: [
        Charset_0001 any Charset_0002
    ]
    Charset_0001: charset [#"a" - #"z" #"_" #"-"]
    Charset_0002: charset [#"a" - #"z" #"0" - #"9" #"_" #"-"]
]
 
@rgchris Wasn't it you who asked me if anybody ever uses BNF to validate dates?
I seem to recall saying something about it being possible but impractical ...
 
How does this fare on the possible/practical front?
 
@rgchris How does what fare? ebnf.r?
 
4
Q: Expressing Rebol Dates in BNF

rgchrisI'm looking to define the Rebol date format in BNF notation (as adapted for Rebol Parse). I'd like as best as possible to only define valid dates—at least those that are valid in Rebol at the moment: Rebol [ Title: "A Formal Description of Rebol Dates" Date: 23-Apr-2015 File: %date-g...

 
5:01 PM
I will reiterate, it is possible to generate bnf rules that parse only valid (Rebol) dates, but no-one should ever use those rules to do that.
What is your use case, @rgchris?
 
I haven't got to that yet.
 
Custom code is more efficient, especially if you are allowing different orderings in your dates.
 
>> do reb4.me/x/ebnf.r
grammar: get in context load-ebnf reb4.me/x/date.ebnf 'date
foreach test [
	"28-Feb-2016"
	"29-Feb-2000"
	"29-Feb-2011"
	"29-Feb-2010"
	"29-Feb-2016"
	"1-April-2015/12:00"
	"1-4-2015/12:00+5:00"
	"31-Apr-2015"
	"15-Apr-16"
	"2015-04-01/12:15:10"
	"2015-04-01/12:15:10."
	"2015-04-01/12:15:."
	"2015-04-01/12:15:10.1234"
	"2015-04-01/12:15:10.1234-05:00"
	"2015-04-01/12:15:10.1234-0:00"
][
	print [either parse test grammar ["*"][" "] mold test date? try [load test]]
Timed out, I guess.
 
Um, you are missing a "|" in your rules for DateMonthNovember and DateMonthDecember.
 
Fixed :)
 
5:08 PM
OK, you asked for it ... Rebol accepts leading zeros in all numeric date fields.
 
It does, but I'm ignoring that intentionally.
I do support optional leading zeroes for single digit month and day values.
 
Okely dokely, how's about this puppy: date.ebnf incorrectly classifies 1900 as a leap year.
 
Need to work in leap year exceptions. Should be fun.
 
Indeed! Also, for more fun, there is no year zero ...
 
It may not be possible to detect where Rebol expands the year 00 to a non-leap year.
>> 29-feb-0
 
5:16 PM
; Brought to you by: try.rebol.nl
== 29-Feb-2000
 
Right. Or any even (two-digit) year ...
You'd have to add a "context year" to your parsing.
 
If supporting the two-digit auto-expanding year is indeed rational/reasonable.
 
Which reminds me, that "feature" makes date tests require the ability to set the machine's date, not always fun.
But I would do it, I think relative dates are useful, and therefore require testing.
I can understand how it makes some people uncomfortable though.
 
In that case, I would then suggest that 29-Feb-00 be legal subject to testing.
 
@rgchris Um, why? With the ability to test and set the machine clock, or with a context year, 29-Feb-00 can be correctly analyzed.
 
5:25 PM
Lexically legal.
 
@rgchris I see, so not all validity checks are done in the BNF.
 
If you want to support that.
 
That would make 29-Feb-<two-digit-year> lexically legal as long as <two-digit-year> is even?
 
[02468][048]|[13579][26]
 
@rgchris Of course, excuse my dumbitude.
You are absolutely correct, and the only case where the date could be lexically legal but not correct would be 29-Feb-00 when the machine clock is off by over 100 years but less than 400 years :)
 
5:33 PM
:)
Even then, you couldn't bomb out on it—what if I'd somebody had written a script that referenced said day and that script ran 100 years from now?
 
@rgchris Luckily relative dates are a console thing and not a script thing.
Scripts should not be reading relativized date strings and "load"ing them as dates, for example.
Input can be relative, storage never. An interesting distinction that only Rebol makes.
The distinction being between "machine input" like files and "user input" like a keyboard.
Most modern OSes go out of their way to eradicate that distinction, so it's going to be an uphill battle, I predict.
 
So I'm currently having some trouble with Red. Its giving me some errors and I doun't quite no whats prompting it.
 
5:57 PM
-=== Red Compiler 0.5.1 ===-

Compiling /home/thomas/Documents/Github/c2reds/lib/clang.red ...
...compilation time : 420 ms

Compiling to native code...
*** Compilation Error: invalid path value
*** in file: %/home/thomas/Documents/Github/c2reds/lib/clang.red
*** in function: exec/ctx531~createIndex
*** at line: 1
*** near: [as integer! mexcludeDiagnosticFromPCH/value displayDiagnostics: as integer! mdisplayDiagnostics/value ret:]
thomas@frozen-mint ~/Documents/Github/c2reds $
Here is the corresponding code:

https://github.com/iceflow19/c2reds/blob/master/lib/clang.red#L627
Currently I can't tell if its something I'm doing or if its a problem in Red itself.
 
 
1 hour later…
7:11 PM
@iceflow19 Hm, I didn't think the integer! came boxed to routine!. Does it? I thought it was just proxied the integer! value for Red/System
 
7:33 PM
@HostileFork Well I originally was using an older version of the compiler and upgraded. It could be that the version I was on didn't have the proxy yet.
 
@iceflow19 Try a small test and see if just using integer! directly works
 
Give me a sec.
 
7:44 PM
Ya that seems to work for the that error. While I like the idea of the auto marshaling, I think Nenad should still give us the option to manually do it ourselves. Like being able to specify something like a [manual] in the routine spec.
Or extend the type spec for a parameter ie. [manual integer!] or [auto integer!]
 
@iceflow19 You can bring it up in Red Dev Chat. I don't know enough about the usefulness of not-proxying to know...perhaps you might want to do bit twiddling on an already existing cell to change its type without needing new space?
 
@HostileFork Ya, that was kind of the direction my thoughts were going. Or being able to get other metadata out of the other fields in the struct.
 
Something I've been wondering about is the unused space in cells and if they should just be random junk w/no guarantee or if they should be canonized
In INTEGER!'s case, there's nothing else there besides the value
Though that's just today. Who knows.
 
Anyways the current error I'm getting is:

*** Compilation Error: invalid target type casting: CXCursor!
*** in file: %/home/thomas/Documents/Github/c2reds/lib/clang.red
*** in function: exec/ctx531~Cursor_getArgument
*** at line: 1
*** near: [as CXCursor! mC i: as integer! mi ret:]

Shouldn't I be able to cast the integer to a struct! ? Let me look back through the type table...
Btw, the it is defined in the clang.reds
CXCursor!: alias struct! [
kind [int32!]
xdata [int32!]
data [void-ptr!]
]
 
8:08 PM
I realize what I did in the above code.
@HostileFork I think I did run by an actual bug though.
Lets say you have a struct:

TestStruct! alias struct! [
dummy [integer!]
]
And an imported function takes:
myproc: "library_proc" [
val [TestStruct!]
]
 
@iceflow19 I don't use that stuff at this point in time, so even if there's an obvious bug I'm unlikely to see it. If you think you've found a bug the best places to take them are Red dev chat or the issue tracker.
 
Good point I'll take it over there.
 
Though interested to hear what it is exactly you're doing with this...
 
You mean with the code I'm working on? It's a port of the c2r3 to red to auto-generate red bindings using clang
 
Interesting...well keep us posted on how it goes.
 
8:25 PM
On another note, one of the professors that I've presented Rebol and Red to has been spreading the word to his grad students, and they might be considering using Rebol for their masters thesis/project. Woot! Rebol in academic papers :)
3
 
@iceflow19 Rebol could use some academia/formal study :-)
So great!
 
I'm just trying to get the word out even if its by word of mouth and one person at a time.
 
It'll be slow going for a while. But maybe one day the experimental gestation will reach a critical mass.
 
8:46 PM
It's interesting that Rebol's codebase is both a rejection of C++ and "that direction" of solution, yet is the sort of codebase that could really benefit from C++. All the bookkeeping, type checking, and management of who's-responsible-for-what are completely missing.
...and luckily, I now have a running gcc C++ built-and-linked Rebol, that compiles with warnings turned up to -Wall, that can also be built with a C compiler with -Wall.
Now I shall go for clang C++ with warnings up (because they have different skill sets at warnings)
This week, on an all new episode of "whaa?"...
	REBINT n;

	for (n = 0; n < MAX_SCHEMES && Scheme_Actions[n].sym; n++);
	ASSERT2(n < MAX_SCHEMES, RP_MAX_SCHEMES);

	Scheme_Actions[n].sym = sym;
	Scheme_Actions[n].map = map;
	Scheme_Actions[n].fun = fun;
I hate that kind of for loop.
What's wrong with:
    REBINT n = 0;

    while (n < MAX_SCHEMES) {
        if (Scheme_Actions[n].sym == SYM_NOT_USED) {
            Scheme_Actions[n].sym = sym;
            Scheme_Actions[n].map = map;
            Scheme_Actions[n].fun = fun;
            return;
        }
        n++;
    }

    Crash(RP_MAX_SCHEMES);
 
9:12 PM
@HostileFork It double-indents the important stuff, also it has a spurious return in it.
 
You're going to have a hard time justifying for loops that end in semicolons.
REBINT n = 0;

while ((n < MAX_SCHEMES) && (Scheme_Actions[n].sym != SYM_NOT_USED))
    n++;

if (n == MAX_SCHEMES)
    Crash(RP_MAX_SCHEMES);

Scheme_Actions[n].sym = sym;
Scheme_Actions[n].map = map;
Scheme_Actions[n].fun = fun;
There's a compromise.
I don't believe in using ! to test for zero or enumeration values that are "incidentally zero", partially because I eased up and decided it was okay to test for null pointers.
 
After more investigating, I've realized I was recursively calling the routine and that was what was causing me trouble.
 
@MarkI Anyway, compiling under C++ with warnings up finds all kinds of nice little things, like: github.com/rebol/rebol/blob/…
 
@HostileFork Hope it goes well. I was wondering if it was compilable under clang.
 
@iceflow19 Just warnings now. I was thinking of turning up pedantic c++98 and seeing if it could build to the standard, as it can't build to ANSI-C and we're not taking that direction.
 
10:05 PM
@MarkI Speaking of signed and unsigned checks...what is this supposed to do? REBFLG is defined as unsigned 32-bit.
The only caller passes TRUE. :-/ github.com/rebol/rebol/blob/…
 
10:53 PM
    REBOOL latin8 = TRUE;
    REBOOL last_was_cr = FALSE;
    REBUNI ch;
    REBUNI *start = dst;

    while (len != 0) {
        // Need two bytes to get a UTF16 character
        assert(len >= 2);

        // Combine bytes in big or little endian format
        if (lee)
            ch = *src + ((UTF32)*(src + 1) << 8);
        else
            ch = ((UTF32)(*src) << 8) + *(src + 1);

        // Adjust source pointer and length to indicate input consumed
        src += 2;
        len -= 2;

        // Handle carriage return translation if requested.
@MarkI ^-- I think it was supposed to be something like that. (Untested)
Although src[1] is better than *(src + 1). I think mentally I have a block about using array indexing vs. pointers when in the middle of a memory block.
 
11:22 PM
1
A: Expressing Rebol Dates in EBNF

RubberDuckIs Janua really a valid month? If so, then you're fine, but I have a feeling that this would be more appropriate. DateMonthJanuary ::= 'January' | 'Jan' | '0'? '1' Which brings me to my next problem. It's case sensitive, right? So, 22-JAN-2015 wouldn't match. I believe it should, but I'm not ...

 
@HostileFork Very cool, congrats.
 
@earl The warnings are sort of pointing to "issues" as I dig into bits of things. BTW, do you have opinions on REBOOL vs. REBFLG?
Are both really necessary?
 
@HostileFork Hmm, I get the same without having to resort to C++.
../src/core/d-print.c: In function ‘Form_Hex_Pad’:
../src/core/d-print.c:546:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  sgn = (val < 0) ? -1 : 0;
             ^
(Plain GCC with -Wall -Wextra)
 
@earl I didn't get that warning with GCC and -Wall under C, for whatever reason.
 
../src/core/d-print.c:546:13: warning: comparison of unsigned expression < 0 is
      always false [-Wtautological-compare]
        sgn = (val < 0) ? -1 : 0;
               ~~~ ^ ~
 
11:30 PM
I guess the -Wextra. I haven't actually gone to the "full list" of warnings that I picked over at one point in time, just starting somewhere.
 
(clang, with just -Wall)
 
Hadn't tried clang with -Wall prior to C++
 
I'm still wondering a bit what you expect that C++ will get you, unless you actually resort to #ifdef'ing in some C++isms.
 
@earl Yup. :-)
 
@HostileFork After our latest conversation I did some basic checks, and we should be able to build against C11 fine. And going back to C99 that's fine as well, if we introduce names for anonymous structs/unions.
Still doesn't help with the MSVC issue.
(And I also haven't yet looked into whether/how much MSVC 2013 improves things.)
 
11:35 PM
Perhaps Shixin can be the MSVC Czar and figure that all out...
 
I don't think Shixin's primary platform is Windows.
BrianH or Maxim, though ....
 
Yeah, I read that.
And I suppose he does the occasional cross-build and cross-platform support. But from what I gathered, Linux first ...
@HostileFork I don't think that REBFLG is strictly necessary, no. As far as I understood it, REBOOL is 8-bit for use in "tightly" controlled memory layout and REBFLG was intended to be the more relaxed native word pendant.
However, REBFLG is unsigned (in declaration, at least, even though not necessarily in usage, pre your fixes) and REBOOL is signed.
The "native word" invariant is already broken for 64-bit builds (REBFLG is always 32 bits wide). And doing some widening when it doesn't hurt semantically but potentially improves performance on the target system is something I am generally fine to leave to a compiler.
 
Yup.
 
So I don't care much.
I also wouldn't mind "fixing" REBFLG to heed the intended design (native word size for "speed").
 
11:45 PM
I kind of feel that the optimizer will figure it out, and in C99 builds #define REBOOL bool.
 
And it's one of those things that strikes me as a potential nicely self-contained change, whatever direction it goes.
Nah, REBOOL defines as bool is no good, unless you want to drop all memory layout invariants as well.
The REB* types are supposed to have a well-defined and fixed size, at least as far as I remember.
 
I'm going to have to think about what I think about memory layout invariants.
 
@HostileFork More than 3 functions in reb-lib.h for me.
 
@earl Weird :-/ I'll go back and look into it. It was something about the parse rule choking on the source and failing, so I just simplified the rule to move on. I didn't look too close.
Some character in the wrong place it didn't expect. It seemed finicky.
 

« first day (1635 days earlier)      last day (2145 days later) »