« first day (847 days earlier)      last day (2933 days later) » 

10:00 AM
@Ladislav, but then, in this example: >> now/time/hour
** Script error: now has no refinement called hour

>> a: now
== 24-Feb-2013/10:53:05+1:00

>> a/time/hour

how can I do the now /time/hour in one expression.
It would have been perhaps possible for the DO dialect to decide that if the first thing is a function, that it would go by the method of looking for refinements, and if it had "leftover stuff" it would re-iterate and try to use the path method on the result of the function, but that's kind of sloppy and would cause a performance loss in the interpreter. There's no need.
@SebastianGodelet that is an inconvenience caused by differences in path handling between function calls and data access methods you simply need a different access method like pick as Graham already mentions below
>> pick now/time 1
== 23
If 'now were not a native ( C ) function, you could grab the function body , modify it to add an /hour refinement
select now/time 'hour might should arguably work, it could be special cased for time. And (now/time)/hour perhaps as well, I don't know enough about the reasons why that would not be made to work. We're hammering some of these cases out as Red and Rebol try to find what the best decisions are and perhaps formalize the lexing/parsing in something other than open code.
@SebastianGodelet As Graham suggests, if you don't like something you can change it. Think print is a stupid name? write-screen: :print and then unset 'print
I think we should add an /hour /minute etc to 'now to make it consistent with the date paths
10:09 AM
@SebastianGodelet The method could be e.g., pick now/time 1
@GrahamChiu, I'd like to see a more general way like: (now/time)/hour
Think that's a horrible idea and don't want people to change your basic functions? Restart the interpreter and go with protect 'print. Then try unset 'print and see it not work. :-)
@Ladislav, I mean I know how I can get the hour part, it's just I do like consistency in language design
i mean in lisp i do : (* (+ 2 3) 4), it's a recursive notation. But here rebol fails that i can't do a nested expression
You can change now if you like. One thing you can do is you can ask this on StackOverflow as a Q and get an answer of why things like (now/time)/hour and select now/time 'hour don't work. I'd like to know, actually, why not to do these things.
@HostileFork, well I guess I'll post a question. That does help a lot in understanding.
10:13 AM
@SebastianGodelet the problem is that in case of Rebol it is not a nested expression. It is a syntax, which is not supported
Sorry for always using this example, but
>> type? (now/time)/hour
== /hour
What is the "/hour" type then?
w: now/time
== 2
i.e. need to be assigned to a word to get all the magic.
@SebastianGodelet you should probe load "[(now/time)/hour]"
As opposed to e.g. load "[a/time/hour]" you shall see that it is syntactically different
@Jina, I would call it real magic when I could do that in one expression :)
@SebastianGodelet /hour is a refinement! type, a separate value that is returned. So you're first evaluating type? (now/time) and then /hour and /hour will be returned.
10:18 AM
@SebastianGodelet @SebastianGodelet This is a case where the path notation, due to the behavior of parser, for reasons I don't know are justifiable, did not work. You can say things like foo: [a b c] and then foo/(1 + 2) and what you will get is a path that is structured with two elements, foo and the 3-element series (1 + 2). Evaluates to foo/3 and hence c. To answer you as to why quote (1 + 2)/foo does not group as a a path, you would have to ask if that's an oversight or not.
@SebastianGodelet Sady there is a disconnect between what the function time returns and what the interpreter can immediately do with it. Magic not perfect!
@SebastianGodelet That is doable in one expression as demonstrated by Graham, you just do not accept it is.
>> first now/time
== 23
Sorry: 'now is the function, 'time is the datatype
foo/(1 + 2) was only added a few years ago ...
10:21 AM
Rebol is syntactically richer than Lisp, there is not equivalent to the path! datatype in Lisp
@Ladislav, what Graham offered is first now/time or pick now/time 1, but I do not see the word "hour" in there. I'm sorry that I'm so picky about this. I just wanted to know why the parser does not give me this options. I find it just a bit counter-intuitive that storing a: now/time into a word first and then doing a/hour works, but a construct like (now/time)/hour is not working...
It's not impossible--as I mentioned--to reshape the interpreters choice of what the DO dialect does with path!. It could go hunting and try and figure out what to do with elements of the path that weren't refinements on a function. It could batch them up somehow and look to see if it could apply them to the results. But that would be really messy. Grotesque even. (now/time)/hour though, that would be okay.
It's fairly trivial to extend 'now to add /hour etc (it already has /year)
@SebastianGodelet But this is all about dialect design choices. you can make one that works the way you think you want it. And then you can look at what a mess you made and go "ohhh, now I see why not." :-)
It would be tedious would it not?
10:24 AM
Sorry to have caused such a riffle here :( As I understood R3 is still in alpha, and I'm really about language design. I'd offer my help for any improvement.
Improving an existing system is much better than developing my own actually.
@SebastianGodelet we were all asleep!
@SebastianGodelet No, it's fun. :-) We just have to think it through and figure out ways of explaining. Some of these things are hard to find the right phrasing for.
Which would be least surprise for a typical programmer? now/hour or the discussion just had?
Jina, well, for someone coming from imperative languages, now/time/hour failing is rather surprising....
@Ladislav is there a way to define a new 'now and capture all the old refinements without explicitly coding for them?
10:26 AM
NOW is inconsistent / incomplete

>> help now
    NOW /year /month /day /time /zone /date /weekday /yearday /precise

     Returns the current local date and time.
     NOW is a native value.

     /year -- Returns the year only.
     /month -- Returns the month only.
     /day -- Returns the day of the month only.
     /time -- Returns the time only.
     /zone -- Returns the time zone offset from GMT only.
     /date -- Returns date only.
     /weekday -- Returns day of the week as integer (Monday is day 1).
@SebastianGodelet the confusion is because / is used both for paths and refinements
I think that one thing Rebol is missing, is sort of a real "let's follow the Rabbit hole" of what the evaluator is doing in a clear video or something, so people don't get mixed up. Carl mentions that Rebol is "dressed up" to look like other programming languages while being very different under the hood and it's a bit of a lie. It's kind of how people come up and think colon is the assignment operator and wonder why x: 10 works but x : 10 or x :10 don't work.
@SebastianGodelet I guess, it's that /hour /minute /second could be added as a refinement, but there are then a lot of other types that would require similar special-case accessors. I've suggested in the past the idea that dates can be converted to object!, and then you can get a common way to access any elements of a date, but this was rejected.
Which just points to fundamental issues that are glossed but shouldn't be.
@GrahamChiu Confusion also because of surprising incompleteness of NOW
10:28 AM
And a day-in-the-life-of-a-path in the DO dialect is one of those things that needs to get covered. Like, what's actually happening.
@HostileFork, so Joel's [joelonsoftware.com/articles/LeakyAbstractions.html|Law of leaky abstractions] also kind of fits in there ...
@Jina I don't think Carl was ever convinced it was necessary to add other refinements
Concretely, in what steps. And every idea that seems sensible like what @SebastianGodelet is asking, if it comes up, needs to be addressed in the "well we could, but this is what would happen...and we really don't want that".
@GrahamChiu Open source means not all of us have to be limited to carl's convictions.
@SebastianGodelet Yup good article, I use the phrase often.
10:29 AM
@SebastianGodelet I think this would be a Lisp-ish way of doing things: hour-of: func [t [time!]] [first t]. You can now write: hour-of now/time, or you can get rid of paths altogether as in Lisp defining time-of: func [d [date!]] [fourth d]. Now the Lisp-inspired access method would be: hour-of time-of now
Seb has clearly identified an annoying flaw. Time to show that rebol can magic up changes given feedback?
@Jina well you can submit a curecode wish ...
@Ladislav, the do dialect already offers the prefix notation, isn't it? So could we have a prefix notation on the refinements (allowing infinite nesting of these terms)?
And with that... I've got to take off before my head explodes. Nice to meet you @SebastianGodelet, good questions, I think it would make a great one for the main site. Hope to talk to you again...
@HostileFork Now is the hour for me too!
10:31 AM
@SebastianGodelet I could try to write it in Rebol using return/redo
(or you could)
@HostileFork, The major cause of complaints is C++ undoubted success. As someone remarked: There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup
@SebastianGodelet C++11 is my other language of choice. <-- organizer, Austin C/C++ Group, for a little while longer until I get someone else(s) to do it. :-)
@HostileFork, well bye bye then! Its lunch time here too...
@SebastianGodelet However, as I indicated above, there is a trivial prefix notation usable instead of refinements (refinements are messy), so my question actually may be "what are your objections against hour-of time-of now?"
@Ladislav, I didn't know you could actually say hour-of time-of now
I mean i just heard about this language at the beginning of this chat ...
10:39 AM
You can't. :-)
@SebastianGodelet REBOL will tell you
>> type? /hour
== refinement!
@PeterWAWood, yes I know understand what a refinement is. Now I also understand that refinements cannot be nested. It's just good to know the limitations of a language
@SebastianGodelet I think it must be just about breakfast time where Fork lives.
Well. Different topic. In rebol, can I load native shared libraries (that's what my boss would ask me, thinking about all the other code already written). When adopting a new language, that is always the obstacle number 1
@SebastianGodelet Yes you can.
10:45 AM
In the wiki book: http://en.wikibooks.org/wiki/REBOL_Programming/Language_Features/Types
It states: date! 24-may-2005
2008-11-30[n 3]
REBOL supports ISO 8601,
but then i do: type? 2013-02-24T11:45:45+02
if fails...
@SebastianGodelet That seems only to be the date part.
Support for ISO 8601 doesn't mean that it is a REBOL datatype. Each REBOL datatype has a strict literal form.
actually, it's recognized as a date!, but only the date part, not the time.
@PeterWAWood, as the code for the R3 interpreter is on github, I'll see what I can do for extending the parser in fork. Just want to practise my compiler and interpreter skills...
>> ? to-idate

Returns a standard Internet date string.
TO-IDATE is a function value.

date -- (Type: date)
10:51 AM
so in the interpreter, prefixing an ? does give me the help for any command?
The to-idate function is in REBOL 2. It hasn't made it to R3 yet.
>> load-gui
Fetching GUI...
GUI Version: 0.2.1
(Developer test GUI theme)
** User error: "Newer version of R3 required (A70). Type: upgrade"

>> upgrade
Fetching upgrade check ...
Script: "REBOL 3.0 Version Upgrade" Version: 1.0.1 Date: 7-Apr-2009
Checking for updates...

R3 current version:
It was released on: 20-Feb-2011/16:24:53.125

Your version is current.
how can I find out which version I just downloaded?
@SebastianGodelet Done brushing teeth and all that but want to just point out that (a) the code for the lexical scanner (not to be confused with the parse dialect implementation) is in src/core/l-scan.c. I'd like to see it replaced with something generated from a more formal spec. and (b) rgchris has gotten a start on that with his "Railroad Diagrams"
@SebastianGodelet system/version
The diagrams are generated by EBNF found here We definitely could use some interested party in helping with formalizing it because I don't like dangerous C code like that...
I don't believe one needs to write things in that form for it to be "fast".
10:56 AM
@HostileFork, thanks! Well I do like using EBNF parser generators.
But it remains to be tested if we can do a generator that can keep pace with the hand-written code. I tend to think that if hand-written C code like that is "faster", it's probably only faster because it is incorrect. :-) L8r, for real this time...
Well, does the speed of the parser really matter in an high-level interpreted language?
I like the grammar! It's really small. Compare that to C++ EBNF ...
well.. lunch time. Bye all!
posted on February 24, 2013 by Ladislav

[Comment] Graham, your example is unfortunate. This looks like a better example: write clipboard:// ajoin [ 1 newline 2 newline 3 newline ] type? read/lines clipboard:// ; == string!

11:26 AM
posted on February 24, 2013 by Ladislav

[Wish] In the Stackoverflow chat I noticed that newbies are not content with accessing date and time using ordinal functions. I propose to define accessor functions as listed below in the example code (and, eventually, discontinue the ordinal access to date and time values). While this looks as a negligible improvement having already the path access available, the frequent objection of newbie

This report states an old wish for better ISO-8601 support:

@Henrik Hmm, the "YYYY" format conflicts with Rebol integers.
@Henrik Also, the "YYYY-MM" format may be problematic - I am not sure how it shall be represented "internally".
11:43 AM
I agree. They are too generic. I am wondering though, if it could be done as a type, so you could still do:

>> iso-8601? to-integer 1997
== true

I don't know if you can do:
>> a: to-iso-8601 to-integer 1997
== 1997

>> type? a
== iso-8601!
posted on February 24, 2013 by Ladislav

[Comment] @Henrik Hmm, the "YYYY" format conflicts with Rebol integers, any idea what to do?

posted on February 24, 2013 by Ladislav

[Comment] @Henrik Also, the "YYYY-MM" format may be problematic - I am not sure how it shall be represented "internally" - shall it be represented as the first day of the respective month?

@Henrik iso-8601? "1997" is easy, to-iso-8601 "1997" is easy as well... It might even return something like 1/1/1997
(can be implemented as a mezzanine at present)
@Ladislav It would be easier to simply rule out parts of the spec, which conflict with REBOL datatypes. You could still parse for full compliance, if you specifically ask, whether a value is iso-8601 compliant. Email! has similar problems, AFAIR.
@Henrik Yes, however, the fully compliant to-iso-8601 function is easy to write and may be useful on its own, as I see it
@Ladislav so it converts to a string! ? it would be nice to go the other way as well.
11:56 AM
@Henrik hmm, I may have picked a wrong name. I meant a function converting a string to internal representation, in fact
Any idea of a good name for that?
Maybe as-iso-8601 "1997"?
@Ladislav That may work. We can do one mezz per date format. We just need to be able to go the other way as well, but that would be a big bloating of to-date.
@Henrik to-date are bloat themselves. We already do not need these having to date!
12:12 PM
@Ladislav how do you see the shortest path from any date format to doing native date! calculations and back to any other date format?
@Henrik for converting the ISO-8601 formatted strings to internal format we could do with just one mezzanine function, named e.g. as-iso-8601, if you like.
The reverse is more problematic, if we pick 1/1/1997 to represent "1997", we may be unsure whether to convert it to "1997" or to "1997-01" or to "1997-01-01".
@Ladislav hmm... when I read as-iso-8601, I expect some kind of date! or string that adheres to iso-8601 to be converted to a full iso-8601 string!. am I reading it wrong?
@Henrik no, you are not reading it wrong, you are observing my poor ability to find a good name for it
the REBOL naming scheme almost dictates an as-date function, where the name of the function implies what becomes of the value. That's why I mentioned before that would be bloated.

So for things like that, we need a naming scheme that implies what the value should be understood as. What the value becomes is then unfortunately not given in the function name.

Such as is-iso-8601 or from-iso-8601
posted on February 24, 2013 by Ladislav

[Comment] My idea how to resolve this in a partially satisfactory way is to define a function like AS-ISO-8601 (better names, anyone?) working, e.g., as follows: as-iso-8601 "1997" ; == 1/1/1997 as-iso-8601 "1997-02" ; == 1/2/1997 , etc.

12:23 PM
I want to do this:

>> a: is-iso-8601 "1997-07-16T19:20:30.45+01:00"
>> type? a
== date!
>> a: a + 1
>> as-iso-8601 a
== "1997-07-17T19:20:30.45+01:00"
@Henrik REBOL 2 contained a mezzanine to-idate which returned a string in iso-8601 format (though not quite correctly). Perhaps a pair of functions to-idate and from-idate would be best
I think idate was Carl's short form for internet date rather than iso-8601 date (though it still fits).
@PeterWAWood Yeah, that should do. And it should scale just fine to support any date format we want.
Red could use the same model. I wonder if DocKimbel has any insights on this?
hello again, back from lunch :)
just a side question if I may ask, building on Windows x64 with Visual Studio 2012 yields:
f-math.obj : error LNK2001: unresolved external symbol _signbit
anyone ever encountered this?
12:40 PM
@Henrik I'm all for moving the complex date! parsing/forming to mezz level.
12:54 PM
@DocKimbel Yes, this makes for a nice, isolated coding project.
1:13 PM
How hard is it to embed r3 in red? And start date! there?
1:28 PM
I've long advocated support for at least RFC3339 dates to be supported natively—effectively the subset of 8601 that is like the Rebol date format except uses the 'T' and 'Z' notation—don't think that adds much of anything to parsing.
This a commonly enough used format to warrant inclusion.
Must dates match the common forms? Or could red invent something own for mold, like @2013-2-24-14:41 ? And then offer a conversion library?
1:44 PM
From Rebol in Ten Steps: "Where possible, REBOL allows the use of international formats for values such as decimal numbers, money, and dates."
Hmm, that doesn't quite make the point I thought, but still RFC3339 is still a standard that's worth supporting.
But its for red. And big and easily buggy. And could be added later. Most important would be having something to read/write a date.
RFC3339 dates are fairly strict and differ from current Rebol dates by one/two characters.
Are we talking about rebol or red? i saw @dockimb: I'm all for moving the complex date! parsing/forming to mezz level.
and thought its red
In the Railroad Scheme, the rule would only change to Date ::= DateDate ( ('/' | 'T') Time (DateZone | 'Z')? )?
@dt2 Both.
As date formats go, it's low-hanging fruit.
But complex. at least i get the expression from this thread :)
1:53 PM
@dt2 That's mostly about ISO 8601, which is more of a grab bag of date formats.
@dt2 It applies to both Rebol and Red.
@dt2 How hard is it to embed r3 in red? That doesn't make much sense, they are implemented totally differently, with different underlying programming languages.
So RFC3339 is straightforward, reliable and now is a good time to change? red implementing and r3 still very alpha?
@dockimbel, the extension way, not shared heaps.
i hope red has something like ffi, and r3 could be plugged into that
@dt2 Got to start somewhere.
@dt2 Red has direct binding to any external shared lib using a declarative dialect at Red/System level.
looks good. so red could. and r3 sayed it can be embedded as a dll?
Does red have callbacks for async?
2:03 PM
@dt2 Callbacks from external libraries are supported.
Is there some hello-world tutorial? download this zip, write stuff in that file, run make, watch output? To lower the entry-fears of mine?
print "hello world"
@dt2 What OS are you on?
linux. ubuntu/12.04
Download the relevant version here (don't worry that it's alpha)
Unzip, chmod +x <Rebol script>, and then ./<Rebol script> from Terminal
dt2: download exe from here: rebolsource.net type print "hello world" and watch the output
rebol.com versions are outdated
2:11 PM
No, i am talking about red
can't help you there.
about r3 i know :)
But @DocKimbel was here and he could, because he made red.
@dt2 Just read the Github home page for Red, all instructions are there.
thanks. you care a lot about docu.
@dt2 I do, but as Red is still under heavy work, there's only docs for Red/System for now.
2:38 PM
@Henrik Then probably load-iso-8601 may be a good name for the function I had in mind.
2:50 PM
@DocKimbel maybe the output log could include a full filename? For us beginners?
@dt2 what brought you here/to tRebol/Red?
Some old fun with rebol, and then it became open source.
@HostileFork Weird, I was waiting in a long line for a latte this week as well! Thks for the one and only retweet :)
Got outdated when the web switched to ajax/v8. May get interesting again because of ajax/v8 :)
And i hope i make more friendship with c, for nostalgic reasons.
3:06 PM
For anyone else that missed my shameless request: chat.stackoverflow.com/transcript/message/7896412#7896412
Q: When would using a scripting language within a larger program be useful?

Toby PersonI have heard of several situations of people using say, JavaScript or Python (or something), inside a program written in C#. When would using a language like JavaScript to do something in a C# program be better then just doing it in C#?

^Good opportunity to promote Rebol @HostileFork could probably write it best.
@SomeKittens There is also an opposite approach used by Saphirion, e.g.: use a scripting language and write only the parts requiring some "lower level approach" in C (or whatever).
3:34 PM
@Ladislav Yes, that might do. But consider that something that understands a string value in a specific way, essentially a string parser, could be a generally useful set of functions.
So we just need to make sure we want to use load-*
@Henrik I do not object against from-idate either. I just think we need a good name, rather some popular with the majority of users
posted on February 24, 2013 by rgchris

[Comment] RFC 3339 http://www.ietf.org/rfc/rfc3339.txt is a subset of ISO 8601 defined specifically for Internet timestamps. Current Rebol dates allowing "T" to separate dates and "Z" as a UTC zone marker would be consistent with this format. "YYYY-MM-DDTHH:MM:SS(.SSS)Z"

@Ladislav Form-Date?
@rgchris No, I really meant from-idate or load-idate name - i.e. the opposite of form; taking into account the similarity, it looks like from is not a good prefix
my other suggestion was is-*
3:46 PM
@dt2 That's part of the details for polishing the compiler usage. We are only at version 0.3.1 and I can't afford the time now to work on the gazillions little details required to polish it. OTOH, if someone makes some improvements and send me a pull request, I'll consider it.
There's also detect-*
@rgchris: I don't know if that is too close to DELECT.
also DETECT-* may indicate that the return value is logic!
Delect is a horrible word. Anyways, it wouldn't be just 'detect, it'd be 'detect-date, 'detect-url.
@Henrik I wouldn't have thought so.
LOAD-* seems to be a better idea, then.
4:21 PM
@rgchris Support for RFC3339-style date literals sounds like a good idea to me.
@PeterWAWood I don't think to-idate is ISO8601-compatible, but rather a RFC822-style format. I think this was later re-standardised in RFC1123 (or whatever succeeded it).
So, what did I miss?
Some issues are CC'd now
4:37 PM
@HostileFork Indeed, good catch!
@HostileFork Do you want to submit a pull request for it?
@DocKimbel Nope, you can do it. :-)
@BrianH Some new folks, @SebastianGodelet has a CS background and is interested in looking at the interpreter guts and the EBNF project, so maybe a potential developer as opposed to user. :-)
Speaking of which, @earl... any idea about this error?
I'm slogging my way through the Red tests still, but the end feels like it is in sight, though it might not be. :-)
@HostileFork Can you tell what is your goal?
@Ladislav My hopeful goal is to be able to run Red on either R2 or R3 for Linux ELF IA-32, and have no test regressions in the process.
4:43 PM
@SebastianGodelet Unfortunately, MSVC is not a fully supported build platform at the moment, which is why this build bug for MSVC slipped in recently. If you back out the most recent merge in mainline (for example, by doing a git reset --hard HEAD^), then the MSVC build should work again.
It turned out to be a slightly ambitious first thing to try on Red. :-)
Learning by immersion.
4:55 PM
@graph Back to work, and the addiction. It's like World-of-Rebolcraft these days. Some people get paid for it, though. :-)
working on something and being in chat with people who work on something feels nice
We need like, a World of Warcraft scripting binding or some kind of thing for Minecraft. Then we'll get the real addicts.
then it might get mainstream though and that's not something you really want
right? :)
I'm okay with it, but there's always been a little concern of "serve no wine before its time" (the original language creator makes wine as a hobby, and often used the metaphor). If it gets too much attention too early then you start to become stuck with bad decisions. This distinction of being really seclusive has been one of the reasons Rebol has had time for the design to rattle out, but it's certainly not done.
5:01 PM
@SebastianGodelet I'm not certain how Gists work for collaborative works, however that's where I've put the latest Rebol EBNF file :)
So it's best for now if we get people who are okay with the language changing out from under them and fixing up their source code, if it means an improvement or refinement. That means it's only appropriate for some kinds of applications and personalities right now.
Rebol 3 is still an alpha, even though it's been out for years. It would have cleaned up faster if it had been open source, I think, but there are some strong feelings by some that open source free-for-alls create fractured messes. I don't think there's anything wrong with curating one's own better version, and if the public runs off and makes something popular that's kind of like it but not as good in your eyes, well at least they're not using something completely incompatible.
You just have to protect your trademarks and brands so they don't get mixed up as being "you". This is what all the open source projects do. You can make something based on Firefox's codebase but you can't call it Firefox, etc. etc. Can't use their logo without permission.
(Well you can, but if you annoy them, they can sue you and make you stop doing it)
posted on February 24, 2013 by rgchris

[Wish] Reflects now established convention of @name notation referring to a person in web/online services. There's a strong semantic case for this as a datatype for use in data exchange/storage and dialecting. Twitter defines a handle as `["@" 1 15 [alphanum | #"_"]]` though generally longer names could be supported with possibly more characters to support a wider range of services. Does not c

@HostileFork I have a general programming question
@graph 'kay
Ok I have this little webscraping code that leftover from a different project which seems to work just fine. And now I have my shiny new server rented too. Naturally I want my code from that server. Is there anything that I should keep in mind? Can I just leave it running?
like, is it bad form to just hit someone's site for a long time, expecially when I have some bugs in my code and my scraper does funny things?
5:13 PM
@Ladislav I replied to issue.cc/r3/1961
@graph There are different policies on this and it really depends. If someone doesn't offer a general API service, or an API key that explicitly gives you an account ID for your scraper and throttles you or charges you at some rate...then you're supposed to respect things like robots.txt
The Robot Exclusion Standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web crawlers and other web robots from accessing all or part of a website which is otherwise publicly viewable. Robots are often used by search engines to categorize and archive web sites, or by webmasters to proofread source code. The standard is different from, but can be used in conjunction with, Sitemaps, a robot inclusion standard for websites. History The invention of "robots.txt" is attributed to Martijn Koster , when working for Nexor then Web...
@HostileFork yay @SebastianGodelet !
ok it seems to not exclude the areas that I want to scrape (and google does it too)
@graph The best thing to do is use an agent string that identifies you and make sure they can get in touch with you if there is a problem. It increases the likelihood that you'll get a nice message like "hey ease up on the page hits" instead of just having your IP blocked.
And of course, in the lousy current design of the Internet, it's not just you who could get screwed by being blocked, it could be others from your subnet or wherever. When I wrote my Rebol-powered LiveJournal-to-dream-log scraper, I just left it running overnight and had it do a blog entry each minute to avoid any problems.
@graph What are you scraping and what are you looking for?
@BrianH aha, did not know about it either, we should let @SebastianGodelet know then that the currently supported way is pick now 'hour
5:22 PM
there are those wallpaper-scraping sites, right? I want the same but for images from music/instrument/equipment sites. Skip all the forum text, straight to the images or audio files, and then link to the forum post from there. And have tags to tie it all together. And affiliate links lol
posted on February 24, 2013 by BrianH

[Comment] That is a lot of words to add to the default set, especially since PICK can do everything you want already: pick d 'year ; year-of pick d 'month ; month-of pick d 'day ; day-of pick d 'time ; time-of pick d 'zone ; zone-of pick d 'date ; only-date-of pick d 'weekday ; weekday-of pick d 'yearday ; yearday-of pick d 'utc ; utc-of pick d 'hour ; hour-of pick d 'minute ; minut

@Ladislav That's why I thought it worth writing the long comment. If you didn't know about it, we have a serious documentation/discoverability problem.
@BrianH that is indeed a serious problem in this case - should this be mentioned in the date and time datatype documentation or at the pick function documentation or at both places?
@graph Rebol parse is good for web scraping. You can do it by string, or even better by structure. Chris has an XML to Rebol symbolic structure converter, you can try it on any XHTML website with his online renderer...for example with Carl's blog RSS-XML
ok added a user-agent with my email adress, no problem. It seems a little that scrapting and such is a normal thing that quite a few people do, you did too
5:31 PM
Well, I was scraping all stuff that I had made/written. (Then again, I do use web images as a way of communicating things that look like what I saw in the dream...)
yea uhm I notice that my Regex on that 2 year old code is in fact sometimes a little hard to understand. Especially the clever one
@graph What's the clever one?
clever regex
@graph Yeah but I mean if you paste it here we might could show you equivalent Rebol and you'd go "hey. that's nice." :-)
Regex r = new Regex("(([a-zA-Z][0-9a-zA-Z+\\-\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\.\\-!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\.\\-!~*'()%]+)?");
ok how would you do that?
lok j/k this is a regex for an URL
I didnt come up with that
just stuff like "td_post_{0}\".+</td>",id) -it's easy, take stuff between <td> and </td> when the <td> has and id of td_post_12345
BUT it still does not explicitly state which assumptions go into this
5:39 PM
Yeah we can't stand things like that. :-) if we had a string and wanted to test if it was formed like a url, we could just try to load it and if we got a url! value back, then use it.
@graph Extract URLs—it's never going to be as concise, but it is clear.
@Ladislav the fact that pick and poke can do things like this should be mentioned in the pick and poke documentation, and the particular list of words that apply to any datatype's pick, poke or path access should be mentioned in the datatype's documentation, along with example code. And then we need to make the behavior more consistent, since consistency makes more generic functions possible.
posted on February 24, 2013 by abolka

[Comment] "Have the WORDS-OF reflector return the words that you can use for PICK or path access in situations like this (unbound, of course)." A big +1 on that suggestion in particular. Discoverability of these "accessor words" currently strikes me as really bad.

posted on February 24, 2013 by BrianH

[Comment] The syntax doesn't really conflict with email!, but not because of any domain checking or dots: it's because it doesn't have anything before the @. And it triggers an error when you write one, which is a problem if this syntax is used as much as you say in regular communication. It seems to me that having the distinction between this and email might help with block parsing where the d

Btw, "What did I miss?" included yesterday. I wasn't on the internet yesterday.
>> value: try [load "http://google.com"]
== google.com

>> if url? value [print "yup it was a url all right :-)"]
yup it was a url all right :-)

>> value: try [load "1234"]
== 1234

>> type? value
== integer!

>> type? value: try [load "4chan"]
== error!
@graph So you can take advantage of that in your toolbox, as well as with the parse strategies.
5:47 PM
yeah interesting
@Feeds @BrianH I put some suggested names at the end of the ticket. Not just Twitter, it's generally known as a handle—but person! user!—something to that effect might also work.
@graph Most languages don't expose their parsers as a service. Someone wrote a question the other day and it was like, "hey I want my C program to generate some C code and then run it from inside the program, how do I do that?" and people have to explain you can't, because then you'd have to ship a compiler along with your program...and install the compiler somewhere and all the header files. But also, you're dealing with strings, that's all you have to manipulate this generated program as.
Lisp has this with things like Intern
But Rebol is rather more sophisticated.
any way to integrate the gateway-drug-PARSE-stuff into my visual studio?
@rgchris yeah, I replied to that in your ticket, said reply you might want to read. Not a bad idea.
I know, I'm replying to your reply without replying directly.
As the question was already addressed in the ticket.
5:56 PM
We have a handle! type, for something that is also commonly called a handle, and not just in Twitter-speak.
Right—handle! was only one of my suggestions.
That was a call for suggestions beyond yours :)
Not sure this question made it to the room feed stackoverflow.com/questions/15052183/…
@graph With the source to R3 it should be easier to fit into the plugin architecture of systems that let you do third-party things for things like alternative search-and-replace methods. I don't know what kind of work people have done in this area, but it should be done. Still, is pretty easy to get from php-code: read %myfile.php to doing some parse php-code [ .... ] that is a modifying parse rule and then to write %myfile.php.out php-code.
@rgchris Yeah, noticed Cyphre had posted an answer and no feed. Is it StackOverflow API, StackOverflow feed refresh, or the feed itself?
@BrianH :) It wasn't clear that you weren't addressing me, sorry—I don't have further suggestions at this time.
5:59 PM
@HostileFork I would answer "Use TCC" :)
posted on February 24, 2013 by BrianH

[Comment] Don't require anyone to remember an ISO number to figure out which function to use. When I implemented the Excel-compatible variant of the formatter for this in my CSV tools script (T is space, Z not supported), I called it TO-ISO-DATE, though that would be a better name for this function (which might benefit from an /excel option for its defacto standard syntax variant). Or maybe FOR

@HostileFork R3 has an intern function too, though it does something different from the Lisp one: It adds the words to the lib and user contexts. Our equivalent to Lisp's intern is to-word, of course :)
@HostileFork Which question?
@rgchris Maybe this, I've seen lots like it though:
A: C code compilation

HostileForkIf you're asking how to create and distribute a project which is able to build upon an existing compiler for its functionality, there are packages you can find which are just the compiler portion without the IDE. Minimalist GNU for Windows is such a package: http://en.wikipedia.org/wiki/MinGW ...

@Feeds @BrianH Should I open a separate ticket with regard to RFC3339 dates? Would very much like...
@HostileFork not sure I understand—the feed only picks up tagged questions...
6:08 PM
@rgchris Oh I missed what you were referring to, not paying attention to the reply link. My brain was still on the last stackoverflow question I'd mentioned. :-)
Actually now that I look at it, it wasn't a new question. Cyphre just showed up in the room and had 10 points so I assumed he'd just answered it and I voted him up. I thought it was new!
A: Does Rebol really have an equivalent for javascript prototype property?

CyphreOldes is right, the JS-like prototyping is not present in REBOL by default. But you are free to create own functionality that suits your needs. Here is simple example that uses nested context for value sharing between multiple instances to simulate the JS prototyping: creature: func [ /proto...

But he just had 10 points, and showed up here. :-)
6:21 PM
@BrianH although I suppose there is also name!
I still like AT! except for it being confused with AT
It would be like calling PAREN! something like PRECEDENCE! and then going "oh that's one use of it, but you can override it in your dialect for other meanings"
I've tried R3 CGI using this answer: facebook.stackoverflow.com/questions/14123618/… but I got empty string when reading system/ports/input
6:40 PM
@HostileFork It's a decent question, but the comments he gives to the answers show that he is refusing to get the point. It's frustrating to work with people who do that kind of thing. It's also frustrating to deal with people who come from languages that mix up the terminology for prototyping and delegation, since those are distinct concepts. Javascript messes things up for everyone.
@rgchris the great thing about standards is that there are so many of them. With enough standards almost any string can be a date. If we need a module full of date string parsers and formatters, we should make one.
@BrianH This standard is common and would require minimal change to the date parser.
If it weren't for the "T" instead of "/", most dates of this form would load as-is.
So far I've only needed the Excel variant of ISO dates, since that is the most common format I've seen. But I agree that we should support more date formats in the TO-DATE string parser. The main reason I don't like that ticket is that "support for ISO something-or-other" is not specific enough. Parsing stuff is a separate issue from outputting stuff.
@rebolek did anything happen? this works: deta2b.koding.com/rebsite/cgi-args.r3
but i needed to explain that *.r3 is a cgi
Two instances OTOMH: Atom Spec (including SO feeds!), GitHub.
@rgchris name! isn't bad, though it would require a huge amount of cultural context to explain why it is acceptable to refer to that as a name when it's possible that writing convention for usernames may be gone from society within a decade. @BrianH isn't my name, barring legitimate philosophical arguments :)
6:53 PM
@BrianH Yes, name! doesn't feel right. Fork's at! suggestion has some merit. I'm not sure I see the conflict with 'at as a problem.
@rgchris I like at! too. I don't think that it will conflict too much with at because we only use the type name as a constructor for a few types (mostly object and map). If we are worried about that though, why not at-name!?
@dt2 yes, that works
@HostileFork can I persuade you to contribute to CC (just for now) as I at least have the feed of messages posting in here?
@rgchris In the case of map, we changed the name of the function to map-each so that map would be freed to use as a type constructor. We don't need a type constructor here because we have literal syntax, but since we're not going to change the name of at we might want to follow the same principle and avoid the conflict from the start.
7:03 PM
at is used extensively already
@HostileFork there is still the matter of that CC ticket for the change to function :)
@dt2 I've got it working now, thanks!
@GrahamChiu but it's not a type constructor, nor is it related to any datatype. Any potential conflict between an at! type and the at function would be thematic, not conceptual. Still, a thematic conflict isn't nothing.
posted on February 24, 2013 by BrianH

[Comment] Brainstorming in SO chat has resulted in suggestions of name!, at!, and at-name!.

posted on February 24, 2013 by fork

[Comment] It does seem useful and "savvy" considering that it doesn't really conflict in the parser, and is so insanely popular these days. (I type @Someone a lot more often than their email address these days, in fact.) However, I don't like the idea of it being called something too semantic just because of how it's used somewhere. It would be like calling PAREN! something like PRECEDENCE!,

@rgchris and @HostileFork take a look at that CC ticket again (Feeds doesn't catch comment updates). There's another approach that could work better for us.
7:22 PM
@BrianH Well, then AT! might make a good naming replacement for EMAIL! and R3/backward could patch it up. If you're tolerant enough to take malformed email addresses, then why not @foo.bar@baz@ too?
Can't just be anything with an AT in it though, given stuff like ftp://user:%23%23%23@host.com
@HostileFork I think that you are all underestimating how precious these datatypes are. We only get 64, total, including internal ones. Any more and we have to switch processor architectures, because a typeset has to be checked with register ops to be efficient. If you are going to justify adding one you better have a damn good reason.
posted on February 24, 2013 by BrianH

[Comment] We'd have to decide whether the thematic inconsistency between the not-type-related AT function and an at! type would be a problem. A much bigger problem is, what benefit would we get from not counting these as the email! type, and would that benefit outweigh the really serious downside of allocating one of our precious few available datatypes to make that distinction? For instance,

7:40 PM
@BrianH That's not adding a type, just an equivalence for the purposes of keeping people who want the legacy EMAIL! name loaded.
>> set 'emu! email!
== email!

>> foo: func [e [emu!]] [probe e]

>> foo john@example.com
Works. So... change the name to AT! and encompass more behavior, put a definition like that for compatibility in old code. If your new code wants the equivalence you can have it too.
I just don't think email is a good name for it if it's not formally trying to even recognize valid email addresses, but some set of "at-identified" symbols.
Q: For rebol3: Want to get started with native extensions on linux. How do I write a hello-world?

dt2I know how to write some 100 lines c, but I do not know how to read/organize larger source like rebol. Somewhere was a tutorial with hostkit and dll, but it seems r3 is now statically linked. So I do not know where to look. How would I write a native which gets a value, returns another? Where to...

@BrianH I'd be ok with that. Renaming email! to at! wouldn't be so bad either.
@BrianH I could bump the IDs on the feed to try and pick up comment/post edits, but that may not be desirable (the same message could appear more than once due to even minor edits). I wish the SO folks would hurry up and allow oneboxing of OpenGraph metadata so we can post pages in directly:
A: ThinkGeek onebox support for chat

mootinatorI like this idea, but would take it one step further. ThinkGeek has fairly complete OpenGraph metadata on it, i.e.: <meta property="og:type" content="product"/> <meta property="og:title" content="Star Trek Cookie Cutters"/> <meta property="og:url" content="http://www.thinkgeek.c...

8:02 PM
@rgchris yeah, I don't have a problem with notifying you all of a significant edit if the ticket is the subject of an active discussion. It would be tricky to tell the difference between major edits and typo corrctions for feed reporting anyway.
Yeah, renaming email! to at!... In some dialects these are not words, they're keywords. So your suggestion to "rename" email! to at! means adding a permanent equivalence, not at all getting rid of the word email!, and changing many dialects so it uses both words as keywords for that type. Type names are weird. So, if you want to add a new name while never ever getting rid of the old name, write up a ticket.
There are downsides to that approach as well though. For instance, what does type? a@a return? If it's not email!, a lot of code will break.

HostileForkThat's two questions. :-) Regarding the first (about adding a native)... it's probably best elaborated as developer documentation on a Wiki. Questions in the rebol tag should generally be more about the language from a user's point of view. The answers regarding source code itself typically...

8:27 PM
About @handle, is that about usernames for login? if, how about "nick"? Or "id" or "entity" or "address". (found some 2cent in my pocket, thought i spend them)
@dt2 There is a saying about religion by atheists to religious: "I contend we are both atheists, I just believe in one less god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." By the same token, these lists of so many alternative names for what this thing could mean is why I prefer AT! :-)
i am more about spaghetti monsters, yummi and that, but if you pray to big AT! , i am ok with that :)
Hey @BenjaminGruenbaum , we are discussing (among other things) the question of whether with these things starting with AT-signs being so prevalent in the symbol universe, if we should tolerate them as what-used-to-be email address symbol types.
Right now Rebol will say "invalid email" on @something but there's not any real reason why it couldn't be allowed in the parser.
Why not make email! a subset of at!
BTW @hostilefork thanks for the answer. still reading. and would go mad to figure all the places out myself :)
8:32 PM
Hi :) I don't think it should be disallowed either
I'm not sure why it would be disallowed, since @stuff is not a valid email (a@a is though)
Historically it was considered beneficial, prevented accidents I guess, but this was before Twitter and all these chats and ats.
The issue is that Rebol's type system is a bit constrained by aspects of its "clever" implementation, so having separate email! and at! types wouldn't necessarily be the best use of the scarce type space.
(I say "clever" because I don't know if it's clever to limit the design to 64 types or not. It may be, but I'll have to see for myself if I think so.)
but Somekits subset-idea? we have lots of formats for date. we have any-series. This would be any-location, or any-at. The main type would require /type (email etc) and /text. and only one entry in the precious 64.
email! could be the main type for historical reasons. jabber reuses it too.
It's kind of strange to think of the constraints on dialects, because it gets tempting to go totally literate with things like tweet [Waiting for a latte the line is long! @MileyCyrus #latte #twittertracker] But you really need to use strings in there. tweet [{Waiting for a latte the line is long!} @MileyCyrus #latte #twittertracker] But yeah, I think the AT! tweak is worth doing, it's an important symbolic nowadays.
I also think we could do something clever with comma. It got wasted as an alternative way of writing 100,00 instead of 100.00 and doesn't do anything else useful. I'm sure we could find fun things for it, chris had a proposal.
If people from other countries can learn to read words like "append" then I think they can use ordinary decimal points!
Would it work to look for "!?." for strings? then your example would work.
8:47 PM
@dt2 tweet [C++ SO chat has turned into 4chan :-/] etc. One shouldn't abuse the symbols, they also have overhead for each unique one.
"what if it were parsed as a block type so [a b, c d, e f] was effectively something like [comma(a b) comma(c d) comma(e f)]

type? first [a b, c d] == comma!

If you just make comma effectively another word you're not giving dialects much power beyond [a b | c d] or whatever

But if the parser derived structure from it, that could be of value."
Something fun like that, the current use of comma is no fun at all.
I thought since real languages terminates with "?!.", something terminated with that is a string. but rebol uses "?!" at end of words already.
".," are hard to read, maybe not good to give them importance.
@dt2 It's a very written language kind of idea, but just not a fit for computers and the need to make string symbols.
rule: if i find a "." between [], the first part is a string. but did not check for surprises.
making chats/tweets smarter with embedded rebol could be nice. some extras for a "command line". brainstorming:
load "/tweet this is text [this is rebol] and more text"
Speaking of tweets, my campaign to shamelessly promote my code snippet on Twitter has garnered, erm, one retweet! (reminds me of the Fry and Laurie Bigometer).
9:03 PM
sigh i did not want to make a full set of accounts for rebol, but i guess i have to look into twitter? :)
9:17 PM
posted on February 24, 2013 by Gregg

[Comment] Discovery is important. When the ROUND func was being designed, there was much discussion about having a single func, with refinements, versus multiple funcs (TRUNC, CEIL, etc.). I think the refinement model is a key part of REBOL's design, though it can use abused. NOW has a lot of refinements already, and I only use a few consistently (now/date and now/time being the most used I thi

9:34 PM
@HostileFork we make up for the 64 datatypes by including some fairly generic container types among the group. For example, we have one type for all vectors, regardless of their content types. For another example, we have one type for all objects, regardless of internal structure. You can't really say that one approach to types is better than others in general, you have to bring up specifics, and pick your tradeoffs.
We picked a tradeoff in favor of efficient RTTI, essential for a language with no compile time at all, let alone compile-time types. As a side effect, block parsing and other generic structure manipulations are really fast in Rebol.
1 hour later…
10:41 PM
@HostileFork yeah, the comma thing is a bit more intentional than just having a way to have internationalized numbers. The main advantage to how commas are treated is that it prevents people from writing commas in Rebol code (as opposed to Rebol strings, which can have as many commas as you like).
@BrianH Hmmm. Fear of zero, fear of commas... :-)
Yet no one wanted to stop people putting semicolons at the end of lines, apparently!
Given that a comma is a small character that is tough to distinguish from a period, but usually given a much different semantic meaning from a period, it tends to be a huge source of difficult-to-find errors in most languages that allow them. So, we made a choice that Rebol code wouldn't have commas in it, and we have benefited greatly from that choice.
Interesting, Hadn't thought of that.
@HostileFork Yup, we made a semi-colon a comment character, which has the benefit of making it not a statement separator (or was it terminator? or was it both? are they even necessary?) :)
Carl did, not we :)
10:48 PM
Is there any way to convince R2 to make a > 127 char! codepoint mold with caret escaping? :-/ Inability to do so is causing those character literals to be invalid UTF-8.
Carl made a lot of good choices. We chose to concur, rather than talking him out of them, and because of that we have benefited from those choices. Except for non-Americans and the unshifted character thing, that wasn't very global I'm afraid.
@HostileFork mold is just a function. So yes, you can make a function that does that.
Hrmmm. Guess I have to do a post-processing pass on the Red/System code being generated by Red to clean that up in R2 then.
It's not as hard as it sounds. And if all else fails, Gabriele wrote some fairly comprehensive text conversion code for R2.
Well hold, I'll look and see if I understand exactly what's going on a bit more.
Well, yes, that's what it is...I just have assertions that caught the fact that an R2-based Red is generating invalid preconditions for an R3-based Red/System.
As long as you don't mix them it's not a problem, but if you wanted to you would have to do a pass over the code before you saved it to a file and fix it to proper UTF-8.
(Because Red/System now uses legitimate regular old loading as a string, not a "load as binary and then cast it as-string")
Hence a Unicode Red/System is pretty easy now.
(In R3)
Or maybe I've been looking at this too long. I see what's happening, in any case.
11:52 PM
Pekr wrote: 'Rebol Tutorial, your reactions contain too much of "I don't care"...' - I tend to agree
@HostileFork, can you show an example of what you are trying to do with the > 127 char! ?
@Respectech Oh, don't worry about it, thanks. I am just writing out R2 source code with character literals in it > 127, and reading with R3. Or at least theorizing about doing that...just getting some asserts. R3 source code doesn't want isolated bytes in the binary of the source code higher than 127 because that's not a correct UTF-8 encoding.
Oh, OK. Just wanted to see if I could help.
