« first day (886 days earlier)      last day (2894 days later) » 

12:05 AM
posted on April 03, 2013 by BrianH

[Comment] See also #1644, which this ticket is part of.

posted on April 03, 2013 by BrianH

[Comment] See #482, #1327, #1333 and #1644 for the existing tickets.

 
12:26 AM
posted on April 03, 2013 by BrianH

[Comment] This is related to #1327, #1333 and #1644.

 
 
1 hour later…
1:26 AM
posted on April 03, 2013 by BrianH

[Comment] Do you want this just for url! or also for other series types with limited syntax, such as file!, email! and the path types? There are other types that don't MOLD properly if they aren't values that were specified in normal non-construction-spec syntax. Do we want to make this a general rule?

posted on April 03, 2013 by Ladislav

[Bug] In the example below, the non-ascii character in the "URL string" is not handled correctly by LOAD. When encountering a non-ascii character in a "URL string" LOAD can either * accept the string as a URL using correct encoding * not accept the string as a URL

posted on April 03, 2013 by Ladislav

[Comment] One part is MOLD/ALL. For MOLD/ALL the resulting string must be recognizable as representing the value of the specific datatype, meaning that MOLD/ALL processed file must be recognizable as a file, MOLD/ALL processed email must be recognizable as an email, MOLD/ALL processed path must be recognizable as a path. I am not sure what the preferences are for MOLD (and don't care much)

 
 
6 hours later…
7:17 AM
@rebolek, are you there?
anyone around?
 
@Adrian Yes?
 
hi Boleslav - do you have a minute to maybe help me with something?
 
@Adrian Hello Adrian, no problem. What do you need?
 
I'm trying to get this:
@RebolBot
b: [[4 6 7] [2 3 1]]
collect [foreach i b [ keep i keep '|]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> b: [[4 6 7] [2 3 1]] collect [foreach i b [keep i keep '|]]
== [4 6 7 | 2 3 1 |]
 
7:25 AM
to return something like this:
== [[4 6 7] | [2 3 1] |]
in other words, to retain the blocks
 
I did this yesterday
@RebolBot do b: [[4 6 7][2 3 1]] collect [foreach i b [keep reduce [i '|]]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> b: [[4 6 7] [2 3 1]] collect [foreach i b [keep reduce [i '|]]]
== [[4 6 7] | [2 3 1] |]
 
hmmm, great, but why didn't my version work?
I'm trying to learn from this, too
if i is a block, keep should return that, no?
 
Because when you keep block! it adds its values. It's better to explain using append
@RebolBot do append [1 2][3 4]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> append [1 2] [3 4]
== [1 2 3 4]
 
7:30 AM
@RebolBot do append/only [1 2][3 4]
 
@rebolek What?
 
@RebolBot do append/only [1 2][3 4]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> append/only [1 2] [3 4]
== [1 2 [3 4]]
 
The difference is in the /only refinement that keeps block! as is. But I guess that keep has no such refinement.
 
there should be similar control over keep, I would think
heh - didn't see
Anyhow, your work-around is good enough - thanks!
 
7:33 AM
@Adrian You're welcome. When adding multiple values it's always better to use reduce or compose.
@Adrian I'm looking at the source of collect and it seems that keep has /only refinement
@RebolBot do b: [[4 6 7] [2 3 1]] collect [foreach i b [keep/only i keep '|]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> b: [[4 6 7] [2 3 1]] collect [foreach i b [keep/only i keep '|]]
== [[4 6 7] | [2 3 1] |]
 
nice
should be documented in collect
 
Someone with better English than me should suggest new HELP string :)
 
The thing is that the doc strings for functions are kept to a minimum, on purpose, and this would necessarily lengthen the one for collect.
Maybe this could be added to the help string for the body arg.
 
7:50 AM
help/doc gives expanded help but points to www.rebol.com pages
 
8:05 AM
posted on April 04, 2013 by Ladislav

[Bug] URLs are defined as "sequences of octets". Since R2 strings were also implemented as "sequences of octets" it made sense to implement URLs in R2 as a "string type". However, in R3, strings aren't "sequences of octets" any more. Thus, it is problematic to implement URLs in R3 as a "string type". It would make better sense to implement them internally as a "binary type". See also #2013.

 
8:54 AM
@earl , why not do an experimental build with 'write able to take object! as well ?
@rebolbot find community
 
posted on April 04, 2013 by Ladislav

[Comment] The current internal representation ("special string type") is possible as well if the properties of LOAD are defined carefully. There are two variants how to do it in that case, it just must not be done the way it currently is.

 
9:27 AM
@GrahamChiu +1
 
 
2 hours later…
11:22 AM
@RebolBot
? keep
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> ? keep
Found these related words:
   collect         function! Evaluates a block, storing values via KEEP fu...
   reduce          native!   Evaluates expressions and returns multiple re...
 
Perhaps have a global 'keep function if only for help purposes?
 
@Bracketworks Welcome to the Rebol and Red room. See our FAQ
 
@rgchris What about changing the help string from Evaluates a block, storing values via KEEP function, and returns block of collected values. to Evaluates a block and returns block of values collected via KEEP or KEEP/ONLY functions. It's also three chars shorter.
 
12:04 PM
@pierre Welcome to the Rebol and Red room. See our FAQ
 
Hello!
Long time since I did not come in this place...
@RebolBot Thanks! I'll check this.
 
@pierre What?
 
Sorry, M.RebolBot; I behaved like if I was talking to a human being...
 
 
3 hours later…
3:02 PM
@Arie Welcome to the Rebol and Red room. See our FAQ
 
 
1 hour later…
4:10 PM
Okay, I'm back.
Been busy with non-Rebol things, but today back to some Rebol things.
 
Howdy!
 
Any executive summary of what I missed? Is the Redis scheme for R3 looking viable?
 
@HostileFork It's alpha, but it works. There's discussion about allowing more datatypes as argument for WRITE. Me and Graham argue for allowing it because WRITE isn't flexible enough right now and Brian is against because I don't know why.
 
If "Reblis" is built into R3 as the MAP! and has an ordinary function!-based command set that's compatible with what Redis people expect, that does not preclude having a scheme available as well. But what I keep trying to mention is that if you create something too "new" and people have to learn and retrain, it doesn't meet this "apples-to-apples" thing I keep trying to advocate.
 
Right now you can do this with Redis scheme: key: 'mykey value: "my value" send-redis-cmd redis-port [SET key value] and also write redis://redis-server/mykey "my value"
I'd like to do write redis://redis-server/my-hash-key map [field: "val"] but I can't because WRITE doesn't support other types than block!, string! and binary!.
 
4:23 PM
posted on April 04, 2013 by rebolek

[Wish] HELP/DOC will open detailed help for function in browser. However with user functions this will result in 404 on rebol.com. Allowing URL! in function specs could add HELP/DOC support also to user functions.

 
@rebolek Hm. Well, you could do write [map] [field: "val"], right?
 
@HostileFork Do you mean write redis://redis-server/my-hash-key reduce [map [field: "val"]]? Yes, the block! can be dialect, but it seems unnecessary to me, when it could be possible to write map/object to redis' hash directly.
 
4:43 PM
@rebolek Well write can't take one argument, so no. But parse and such is able to reference variables in its dialect without reducing them to values first.
Redis port scheme could assume by convention it's a block containing a map variable, and give an error otherwise.
 
@HostileFork Of course I can add a dialect (also send-redis-cmd does path and word lookup so you don't have to reduce manually) but it would be really nice to determine key type by value I write (block! -> list, map! or object! -> hash, other types -> string, etc...).
 
Oh, okay, wait I got confused for a second there.
Yes, I meant what you said
Well, there may be a technical reason why it's not a good idea to allow other types. But you can work around it without a reduce was my point.
As to why one would want such a workaround, presumably it's because it would make the port system more complex, and you'd wind up with more error checking on the majority of ports that do not have these behaviors defined because you'd have to check inside the scheme instead of letting the type system do it at the level of the call to write.
So on the few port categories that actually would be having support for these types, they would use this kind of a dialecting method.
 
I agree that there may be some reason. But if there is, I'd like to know what the reason is. That's all :)
Actually, it wouldn't make port system more complex. It's up to scheme author to decide what datatypes they want to support. To me it's artificial limitation unless someone explains why.
 
@RebolBot do help write
Greetings @Arie! Welcome to StackOverflow and congratulations on your first answer. I've voted you up, and with one more upvote you can speak (after some server delay).
@RebolBot
help write
I seem to have killed RebolBot.
 
5:05 PM
@RebolBot do ? write
oh
 
You could move the type checking to the port write actor instead
 
Exactly.
 
6:00 PM
Hello @ereOn! Welcome. Heard of Rebol?
@RebolBot do print {Am I alive again?}
@GrahamChiu RebolBot's last successful execution was on a "delete silent" request. Hasn't spoken sense.
 
6:15 PM
Looks like it died when accessing tryrebol
 
6:59 PM
posted on April 04, 2013 by BrianH

[Comment] Well, many schemes should have a way to deal with non-ASCII characters, converting them to one or more encodings when they are used. For instance, a HTTP scheme should be able to convert to one encoding for domain names (Punycode IDN) and another for the rest (UTF-8). As another example, an ODBC scheme should be able to directly handle Unicode server, table and field names. I say that

posted on April 04, 2013 by BrianH

[Comment] URLs outside of Rebol are defined as a series of octets, but inside Rebol they don't necessarily need to be. Many schemes in Rebol could just be URL-looking syntax for something Rebol-specific, like an ODBC scheme. I think that it should be up to the scheme to handle any encoding to octets at runtime, if such a thing is necessary or possible for that particular scheme (for example it

 
** Access error: protocol error: "Server error: HTTP/1.1 504 Gateway Time-out"
@RebolBot version
 
@GrahamChiu 0.0.27 30-Mar-2013
 
@RebolBot
help write
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> help write
USAGE:
    WRITE destination data /part length /seek index /append /allow access /lines

DESCRIPTION:
    Writes to a file, URL, or port - auto-converts text strings.
    WRITE is an action value.

ARGUMENTS:
    destination (port! file! url! block!)
    data -- Data to write (non-binary converts to UTF-8) (binary! string! block!)

REFINEMENTS:
    /part -- Partial write a given number of units
        length (number!)
    /seek -- Write at a specific position
@ereOn Welcome to the Rebol and Red room. See our FAQ
 
7:17 PM
@HostileFork Maybe I need to write my own async handler for a simple http request to tryrebol server until someone is able to determine why an http error can crash rebolbot
 
posted on April 04, 2013 by Ladislav

[Comment] "URLs outside of Rebol are defined as a series of octets, but inside Rebol they don't necessarily need to be." - right you are as I noted in the previous comment

posted on April 04, 2013 by Ladislav

[Comment] " I think that it should be up to the scheme to handle any encoding to octets at runtime, if such a thing is necessary or possible for that particular scheme (for example it would be possible for HTTP, unnecessary and inappropriate for ODBC)." - that is a bad design, the internal representation must be chosen and used before any scheme-specific handling is employed

 
 
1 hour later…
8:21 PM
posted on April 04, 2013 by BrianH

[Comment] "that is a bad design, the internal representation must be chosen and used before any scheme-specific handling is employed." I meant Unicode, not hex encoding. The internal representation should be Unicode, with some way to indicate escaped characters that DECODE-URL can detect (hex encoding?). If correct scheme-specific handling of Unicode-to-octet encoding is impossible for a parti

 
@RebolBot find source
 
9:00 PM
posted on April 04, 2013 by Ladislav

[Comment] " If correct scheme-specific handling of Unicode-to-octet encoding is impossible " - what exactly is "scheme-specific handling of Unicode-to-octed encoding" when discussing the properties of URL datatype as handled by the LOAD, MOLD or TO-STRING functions?

posted on April 04, 2013 by Ladislav

[Comment] "The internal representation should be Unicode" - the internal representation *can* (and currently does) use Unicode characters at present (Unicode characters 0 to 255 are used), but the representation surely isn't "Unicode". I can even prove that it can't be Unicode.

 
 
1 hour later…
10:00 PM
posted on April 04, 2013 by BrianH

[Comment] "what exactly is "scheme-specific handling of Unicode-to-octet encoding" when discussing the properties of URL datatype as handled by the LOAD, MOLD or TO-STRING functions?" Nothing, those functions shouldn't do any conversion from Unicode to octets or back at all. The whole point is to have the URL type be Unicode internally, not octets. The port scheme handler would do any Unicode-

posted on April 04, 2013 by Ladislav

[Comment] "Nothing, those functions shouldn't do any conversion from Unicode to octets or back at all." - the LOAD function is specifically meant to convert URL's (or any other values) from the "external representation" to the "internal representation".

posted on April 04, 2013 by Ladislav

[Comment] " The whole point is to have the URL type be Unicode internally, not octets." - how exactly is that (or should that be) compatible with the observations I made?

posted on April 04, 2013 by Ladislav

[Comment] 'wouldn't do any octet encoding at all, they would only be concerned with escaping (which is currently done as a "%" and two hex digits). ' - you are just using a terminology incompatible with the RFC. According to the RFC #3986 the usage of '#"%" followed by two hex digits' is called "percent encoding", which is what I am respecting.

 
10:39 PM
posted on April 04, 2013 by Ladislav

[Comment] "that doesn't affect the principle that the internal representation should be Unicode" - can you explain what do you mean?

posted on April 04, 2013 by BrianH

[Comment] the LOAD function is specifically meant to convert URL's (or any other values) from the "external representation" to the "internal representation". The internal representation would be Unicode with escape sequences. LOAD would convert UTF-8 to Unicode. you are just using a terminology incompatible with the RFC There is no RFC for Rebol syntax or semantics. We are not discussing a l

posted on April 04, 2013 by Ladislav

[Comment] "Well, many schemes should have a way to deal with non-ASCII characters" - you are missing a couple of trivial things here: * The ticket discusses the behaviour of LOAD, which isn't scheme-dependent at present. * Since you are discussing scheme-dependent behaviour in this LOAD ticket, shall I understand it so that you propose LOAD to behave differently for different schemes, i.e., us

 
10:51 PM
@RebolBot version?
 
@GrahamChiu Can you elaborate on that?
 
@ereOn While we have some RSS notifications going crazy on here--including one written in Rebol to supply answers to StackOverflow questions in the Rebol tag (not a feed that StackOverflow supplies by default...), we're always ready to talk Rebol to new or old users!
@RebolBot Aggregator for ereOn
 
@HostileFork Rebol SO tagged questions @ereOn
 
@GrahamChiu We truly have to get that "invalid email" thing fixed so we can use @foo in dialects! These issues need to be decided and closed.
 
posted on April 04, 2013 by Ladislav

[Comment] "The internal representation would be Unicode with escape sequences." - my problem is that I do not know what "Unicode with escape sequences" is

 
11:19 PM
posted on April 04, 2013 by Ladislav

[Comment] "LOAD would convert UTF-8 to Unicode." - funnily, that is exactly opposite to what is going on, in fact: LOAD is accepting an "external representation", which is a string (Unicode, in case of R3). LOAD takes the string as its argument and transforms it to a representation that has to be (at least in some sense) compatible with RFC #3986, which prescribes that UTF-8 shall be used. I.e

posted on April 04, 2013 by BrianH

[Comment] Advantages of using a different internal escaping model than percent-encoding: "%" is a printing character, one which people actually use, particularly in passwords. If we use a non-printing escape character like #"^(7F)" then we are less likely to have a problem with special-casing the escape. Percent encoding of greater-than-ASCII characters uses UTF-8 sequences and more than one ch

posted on April 04, 2013 by Ladislav

[Comment] "that is a different issue from how the url! value is treated by LOAD..." pardon? Are you saying that this ticket is off-topic when "discussing" the (currently incorrect) behaviour of LOAD?

 
11:40 PM
posted on April 04, 2013 by BrianH

[Comment] "LOAD is accepting an "external representation", which is a string (Unicode, in case of R3)." Um, no. Unicode is not a binary encoding, it is a series of codepoints which may be encoded in one of any number of binary encodings. LOAD only loads UTF-8 binary data. When you LOAD a string! value, it converts the string to UTF-8 binary before it loads it. Just a clarification, it doesn't

posted on April 04, 2013 by BrianH

[Comment] "Are you saying that this ticket is off-topic when "discussing" the (currently incorrect) behaviour of LOAD? ... and proposing the remedy?" Well, sort of. This ticket is about the "Internal representation of URLs" (see, right there in the subject). So, once we decide on an internal representation, LOAD will have to read Rebol source and generate values of that internal representation

posted on April 04, 2013 by Ladislav

[Comment] "The behavior of LOAD is currently correct for the current internal representation." - OK, good to know what you think and where our points differ, thank you.

 
11:58 PM
posted on April 04, 2013 by BrianH

[Comment] "and where our points differ" - If we change the internal model so that the LOAD bugs can be fixed, that would change the internal model, even if it is still encoded in octets instead of codepoints. The current internal model only allows characters from 0-255 and is considered to be pre-decoded. Making it not pre-decoded would change the model, as would supporting characters outside o

 

« first day (886 days earlier)      last day (2894 days later) »