Comments on: Happy New Year and Happy New R2 Release!
REBOL Technologies

Comments on: Happy New Year and Happy New R2 Release!

Carl Sassenrath, CTO
REBOL Technologies
1-Jan-2010 20:21 GMT

Article #0447
Main page || Index || Prior Article [0446] || Next Article [0448] || 26 Comments || Send feedback

I'd like to take a moment to wish all of you the very best for the new year.

It's 2010! Can you believe it? Funny how "the future catches up to you" -- a kind of time warp -- if you know what I mean. Mental connections that span across time, like tunnels, where suddenly you're at the other side, and you can look directly back at where you were. Both sides connected.

So, to kick off 2010 on the right foot, we have a new release of R2: Version 2.7.7.

As I mentioned earlier, the main purpose of this release is to make TLS/SSL (transport layer security) available in REBOL/View to make a range of secure reblets possible and freely distributable by and to anyone. TLS is a standard part of the web now, so we felt it best to release it as a standard part of REBOL/View.

In addition, Brian Hawley has added a major portion of his R2/Forward mezzanine package that gives R2 many of the useful functions of R3. One function that I'll personally use often is funct, the R3 method of defining functions where all in-context set-word variables are by default local. But, there are many other useful features, and it also helps prepare users for features that are an integral and native part of R3.

Summary of V 2.7 Changes

Keep on rock'n and REBOLing in 2010!

26 Comments

Comments:

Carl Read
2-Jan-2010 3:05:25
Very pleased to see this. It suggests it's still worthwhile to develop stuff using R2/View, instead of waiting who-knows how long for R3/View to be usable. It's felt like being in limbo...

Keep it up!

Johnatemps
2-Jan-2010 3:08:21
a link for the doc of R2/Forward mezzanine package ?
Brian Hawley
2-Jan-2010 5:05:26
This is the second release of R2 with contributions from R2/Forward. The functions I wrote for 2.7.6 were the first R2/Forward functions.

New functions added in 2.7.6: also, first+, in-dir, move, take, to-relative-file, and the rewritten alter and extract.

New functions and other definitions added in 2.7.7: funct, to-function, apply, closure, closure!, closure?, to-closure, get-path!, get-path?, to-get-path, map!, map?, to-map, typeset!, typeset?, to-typeset, any-object!, any-object?, any-path!, any-path?, scalar!, scalar?, assert, cause-error, throw-error, body-of, spec-of, title-of, types-of, values-of, words-of, reflect, !, ++, --, default, quote, true?, undirize, ajoin, collect, map-each, swap, ascii?, latin1?, utf?, deline and enline.

The docs are the same as the R3 docs for the same functions, more or less. The R2/Forward docs are in the source code - it's extensively commented, and posted in R3 chat #837. I'll post some summaries in subsequent messages here (message length limit).

Brian Hawley
2-Jan-2010 5:08:59
Functions about functions:
  • funct: Defines a function with all set-words as locals. Also lets you define static local variables. We use this one a lot.
  • to-function: Makes a function from a block containing spec and body blocks.
  • apply: Apply a function to a reduced block of arguments, regardless of the evaluation rules of the function's arguments. This compiles a standard function call with workarounds, then does it.
  • closure, closure!, closure?, to-closure: Replicates the closure! function type from R3. Yes, this is a fake datatype. We can do those in REBOL :)

More fake datatypes:

  • get-path!, get-path?, to-get-path: The get-path! word is just another word for path!, but the others are functions that create and test for paths that resemble get-paths in R3. They don't work the same way though - this is just for appearances, not semantics.
  • map!, map?, to-map: Just other words for hash!, hash?, and to-hash, to allow you to write more R3-compatible code. You still need to use select/skip.
  • typeset!, typeset?, to-typeset: This one actually works. It treats blocks of datatypes as if they were typesets. Even find works with them, though you need to use found? on the result. R3's typesets take the place of R2's pseudotypes; to-typeset also works with the pseudotypes.
  • any-object!, any-object?: A typeset of the object types and its test function.
  • any-path!, any-path?: A typeset of the path types and its test function.
  • scalar!, scalar?: A typeset of the types you can do arithmetic with and its test function.
Brian Hawley
2-Jan-2010 5:11:13
Error handling functions:
  • assert: Assert that the condition is true, or else throw an assertion error. This is used in R3 to make the code more robust. This version needs more work though: assert/type doesn't work with paths yet.
  • cause-error, throw-error: These are nice functions for generating errors. They make error handling code safer. The cause-error function is based on the R3 version. The throw-error function is a version for use in R2 functions with the [catch] attribute, which is unnecessary in R3.

Reflection:

  • body-of, spec-of, title-of, types-of, values-of, words-of,: Brand new reflection functions, safer and easier to use. No more reflection with obscurely overloaded ordinal functions. See their help for details. The types-of function returns the fake typesets defined above.
  • reflect: In R3 this is the core reflection action, and all of the *-of functions are just wrappers. In R2 the situation is reversed: reflect is the wrapper and the *-of functions do their own work. The errors thrown are reasonably consistent with R3 though.
Brian Hawley
2-Jan-2010 6:19:20
Other new functions:
  • !: Another word for not.
  • ++ and --: Incrementing and decrementing.
  • default: Set a word to a default value if it hasn't been set yet.
  • quote: Returns the value passed to it without evaluation.
  • true?: Returns true if an expression can be used as true by the conditional functions.
  • undirize: Returns a copy of the path with any trailing "/" removed. The opposite of dirize.
  • ajoin: Reduces and joins a block of values into a new string.
  • collect: Evaluates a block, storing values via keep function, and returns block of collected values.
  • map-each: Evaluates a block for each value(s) in a series and returns them as a block. Includes the /into option that is proposed for the R3 version. The index words are handled by a dialect compiler.
  • swap: Swaps elements of a series.
  • ascii?: Returns true if a character, integer, string or binary is in the ASCII character range (below 128).
  • latin1?: Returns true if character, integer, string or binary is in the Latin-1 character range (below 256). Always true for strings and characters in R2. Binaries are treated as UTF-8.
  • utf?: Returns the UTF encoding from the BOM (byte order marker): + for BE; - for LE.
  • deline: Converts string terminators to standard format, e.g. CRLF to LF. Like R2's read or read/lines without /binary.
  • enline: Converts standard string terminators to current OS format, e.g. LF to CRLF. Like R2's write or write/with without /binary.

Changed functions:

  • also: Better support for error! arguments.
  • alter: Added /case option.
  • array: Better error handling and doc string.
  • attempt: Now doesn't catch return or exit.
  • extract: Added the /into option, improved the doc string and error handling.
  • first+: Added R3-style paren argument handling.
  • in-dir: Now throws an error when the directory doesn't exist, instead of doing the code in the current directory.
  • move: Now throws error on bounds check.
  • take: Better error handling.
  • what-dir: Now returns a copy of the current directory, for safety.
Brian Hawley
2-Jan-2010 6:44:42
The really cool functions are funct, apply and map-each. They are worth examining the source of. I use them all the time.

Most of the file functions were skipped for this round because I think the R3 versions they're based on could still use some work. And the info? and exists? changes might be too disruptive to include at all in R2 - more testing and discussion is needed. We don't want a repeat of what happened with extract in 2.7.5, however positive those changes have been.

Next release round will have to focus on getting R2 migrated to the REBOL development platform: DevBase (aka R3 chat, already used for this release), CureCode, and the manual generator. We'll get the enhancements that we can test the compatibility of too. Graham has some nice http enhancements that look promising, for instance.

We're trying to avoid really disruptive changes, but we need your help. Please get on R3 chat and help with the testing. If you have a favorite R2 app, test it in 2.7.7. To the extent that we can get away with we do want to fix the bugs in R2, but backwards compatibility will often trump that.

Monthly releases, woohoo!

Kaj
2-Jan-2010 11:43:21
Brilliant work, Brian!
meijeru
2-Jan-2010 12:39:38
R3 chat #837 contains an APPLY version by Ladislav, which is not used. The one actually implemented is significantly different. Can you explain?
Graham
2-Jan-2010 13:36:20
Is this mention of TLS a mistake?

We have only ever had SSL in R/Command previously.

Brian Hawley
2-Jan-2010 14:00:18
Ladislav was experimenting with versions of apply that would have better support for passing in error! values. He hasn't yet figured out a way to improve on the released version without self-modifying code, which we are trying to avoid in the official mezzanine code. If someone manages a workaround that isn't self-modifying, go for it.

Some of the functions currently have some limitations relative to their R3 counterparts, notably quote and assert. The assert function will be improved; the quote limitation is not fixable, but has a workaround: use lit-words instead of quote word!. The map-each, deline and enline functions actually work better than they do in R3, where they still have missing features or bugs.

There is more to come from R2/Forward - I'm just getting started :)

Hostile Fork
2-Jan-2010 15:57:47
Happy New Year, and a transitional release of R2 sounds like a good idea!

funct is indeed a very critical thing for helping address the perception that Rebol has historically made that "everything is a global". I still fear that its name being so similar to func will cause confusion, and a hard-to-understand difference in behavior for a single (easy-to-miss) letter.

More on that issue on wiki at Scoping In Rebol:Talk.

Phil D.
2-Jan-2010 16:33:04
Awesome. Powerful. There is a place for R2.
Carl Sassenrath
2-Jan-2010 18:26:18
REBOL currently supports SSLv2, SSLv3 and TLSv1. The supported encryption algorithms include DES, 3DES and ARCFOUR, in all strengths defined in the SSL/TLS standards. Both RSA keys and, for SSLv3 and TLSv1, DSA/DH keys are supported.
Graham
2-Jan-2010 20:18:55
>> rebol/version == 2.7.7.3.1 >> smtp: open/lines tls://smtp.gmail.com:587 >> set-modes smtp [ secure: true ] ** Script Error: Feature not available in this REBOL ** Near: set-modes smtp [secure: true] >
Brian Hawley
3-Jan-2010 14:24:49
Yeah, that error message is worded awkwardly. It doesn't make a distinction between features that are available in other REBOL platforms, and features that aren't available at at all in REBOL yet (which I suspect is the case here).
Nick
3-Jan-2010 15:49:28
Thank you Carl and Brian :) Happy New Year!
Endo
4-Jan-2010 2:02:03
Excellent work! Thanks a lot.
Endo
4-Jan-2010 2:05:13
Don't forget to copy your user.r file to %appdata%\rebol folder on Windows. Rebol/View doesn't load it from program files anymore.
MikeL
4-Jan-2010 3:18:03
Well done Brian and Carl. Some nice features.

I would like to use the ODBC to connect to SQL Server. I read the documentation

http://www.rebol.com/docs/database.html#opening

Is there any further documentation planned to support changes to connect to SQL Server which requires integrated security?

http://msdn.microsoft.com/en-us/library/ms811006.aspx

Giuseppe Chillemi
4-Jan-2010 16:29:55
Really thanks Carl, hope ODBC will migrate to R3 as soon as the infrastructure is ready and then steadly upgraded. Nice 2010 to you too.

Giuseppe Chillemi

Brian Hawley
4-Jan-2010 21:29:19
MikeL, the problem isn't integrated security (which is optional, not required), it's an incompatibility with the more recent client libraries included with more recent SQL Server versions. Fixing that is a priority for me as well.
MikeL
5-Jan-2010 3:41:20
Thanks Brian. The Integrated Security decision is an option for the administrator not the client. If the db admin wants integrated security and rebol odbc options do not support that I can't use Rebol v2 or v3.
deglingo
5-Jan-2010 14:56:46
Thanks very much Carl and Brian.
With ODBC part of Rebol/View, I can now access DB2 databases at work without using Olivier Auverlot's trick of accessing through a tiny JAVA server using JDBC (in his book "Rebol Programmation") ! By the way, tell me if I'm wrong : it works only on Windows ? It doesn't work with UnixODBC or LinuxODBC drivers (http://www.unixodbc.org/ ), does it ?

I think Rebol will be more and more successful if it can be used to access heterogeneous systems. For example, at work, through a JAVA/J2EE application, I access all kind of databases (Oracle, DB2, Sybase) on Windows or Unix using JDBC, I access also legacy systems such as AS400 or Mainframe (zOs) through JMS/MQ, a LDAP server, ERPs, and so on. I really dream of doing same things with the simplicity and power of Rebol... Maybe one day...thanks again for the huge work accomplished on Rebol for the community...

I wish the best for Rebol (and especially for the 3.0) in 2010 !
batman
9-Jan-2010 5:54:12
Great news then, if ODBC is there. does it support stored procedures?

That's what I have been waiting for. I wished it had come out a few weeks earlier, I had to start a new project in Ruby because of the absence of odbc in REbol a few weeks ago.

well I will have to wait for the next project now.

Thanks guys!

shadwolf
13-Jan-2010 10:54:59
Happy news year Carl best wish for your familly and you 2010

Post a Comment:

You can post a comment here. Keep it on-topic.

Name:

Blog id:

CS-0447


Comment:


 Note: HTML tags allowed for: b i u li ol ul font p br pre tt blockquote
 
 

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, spams, personal attacks, politics, religion, etc.

Updated 12-Dec-2017   -   Copyright Carl Sassenrath   -   WWW.REBOL.COM   -   Edit   -   Blogger Source Code