r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Kaj
21-Jun-2011
[2248x2]
Doesn't print-line/puts() work?
print-line prints backslashes as-is
Dockimbel
21-Jun-2011
[2250]
Right, print-line works, I thought that puts() was interpreting C 
escape sequences.
Kaj
21-Jun-2011
[2251x2]
I'd been wondering about it, but you can just write literal strings 
in full REBOL format
By the way, do we want to keep PRIN? My toes curl a little every 
time I see it. I know it's longer, but I would be OK with replacing 
PRIN & PRINT with PRINT & PRINT-LINE - or PRINT/LINE in Red proper
Dockimbel
21-Jun-2011
[2253x3]
I had a hard time with PRIN at beginning too, but got used to it 
after a few years of practice.
I would probably keep PRINT for printing with an added newline. But 
replacing PRIN is welcome if a better alternative is found.
PRINT/LINE and PRINT-LINE are a bit too long, especially for using 
from the (future Red) console.
Kaj
21-Jun-2011
[2256]
You'd probably end up with PUT for PRIN
Dockimbel
21-Jun-2011
[2257]
That's what I was thinking, but PUT is a bit generic verb. OTOH, 
users coming from other languages wouldn't be shocked by PUT used 
in this context.
Kaj
21-Jun-2011
[2258]
Yes, it's not great, either. The problem with PRIN is compounded 
in Red/System because now you get prin-int and such
Dockimbel
21-Jun-2011
[2259x3]
Well, that can be changed to put-*, not a big deal.
Another option could be WRITE, if it is not used latter in Red/System.
But REBOL users might find it a bit misleading.
Kaj
21-Jun-2011
[2262]
I suppose READ and WRITE will get a REBOL like implementation?
Dockimbel
21-Jun-2011
[2263x2]
Yes, but at Red level.
At Red/System level, we might have something like READ-PORT, WRITE-PORT.
Kaj
21-Jun-2011
[2265x2]
With the latest series of Red versions, the 0MQ binding didn't work 
anymore due to crashing on a certain imported function call. This 
is now fixed, probably as a side effect of the last few fixes
Shouldn't newline be a byte/char, as in REBOL? It's a string now
Dockimbel
21-Jun-2011
[2267]
It's for consistency when passed to PRIN/PRINT and avoid requiring 
PRIN-INT.
Oldes
21-Jun-2011
[2268]
I would keep PRIN. And instead of PRIN-INT I would like to see FORM.
Dockimbel
21-Jun-2011
[2269]
The problem with FORM is that it implies a new buffer allocation 
that you need to free at some point.
Kaj
21-Jun-2011
[2270x3]
Yes, the C library print functions do that automatically
For what it's worth, I just implemented a print-newline because that's 
easier and more efficient than PRIN NEWLINE
The 0MQ binding now works on Linux for the first time. I'm quite 
happy with that :-)
Dockimbel
21-Jun-2011
[2273]
Cool! :-)
Kaj
21-Jun-2011
[2274x2]
I've converted the library functions to pass opaque binary messages 
(byte-ptr!) now, as do the R3 and R2 bindings
The examples are now responsible for converting from and to strings 
(so the Red examples are not compatible with the current R3 and R2 
examples)
Dockimbel
21-Jun-2011
[2276x2]
I am installing FreeBSD8.2 on Vmware to test Red...Wow, it is like 
trying to install Linux in 1996...I am really surprized, I wasn't 
expecting an Ubuntu-like installer, but at least a decent package 
manager...Here's my attempt at installing git:

# pkg_add -r git
Fetching ...
...
# git
git: Command not found.

Great!
Btw, network configuration is not done by default, you need to activate 
it manually....seriously, in 2011?
Kaj
21-Jun-2011
[2278x3]
FreeBSD's main principle is to never update the installer ;-)
You'd probably be much better off with PC-BSD or Desktop-BSD
http://www.pcbsd.org
Dockimbel
21-Jun-2011
[2281x3]
Thanks, didn't know about those BSD variants.
I managed to get git running. Let see if I can get Red sources.
Hmm, I guess there is no chance to make REBOL/View run on FreeBSD 
without X...
Kaj
21-Jun-2011
[2284]
Nope. I guess you have a console system now?
Dockimbel
21-Jun-2011
[2285]
Yes.
Kaj
21-Jun-2011
[2286]
Installing X and everything on top manually is a cherished exercise 
on the way to enlightenment :-)
Dockimbel
21-Jun-2011
[2287]
I did such installation several times, manually configuring everything, 
last time was in 1997. An OS requiring me to do that in 2011 is a 
joke.
Kaj
21-Jun-2011
[2288x2]
I remember leaving Red Hat and Gentoo installations at the console 
level in hopes of sparing my hair...
You do realise you've downloaded a server OS? The real joke is REBOL/Core
Dockimbel
21-Jun-2011
[2290]
Sure, we used to have FreeBSD serveurs at Softinnov in the beginning 
(2002), then we switched to Debian and latter Ubuntu.
Kaj
21-Jun-2011
[2291]
It's still a favourite bragging exercise in very popular Linux distributions
Dockimbel
21-Jun-2011
[2292]
I should blame myself first to not have paid more attention in the 
beginning to avoid making Red/System's compiler dependent on REBOL/View 
features.
Kaj
21-Jun-2011
[2293]
Yeah, isn't struct avoidable?
Dockimbel
21-Jun-2011
[2294]
Sure it is, it just requires to code custom serialization routines 
instead.
Kaj
21-Jun-2011
[2295x2]
I'd be very pleased with that; nudge, nudge :-)
Would make Red run on Syllable Server
Dockimbel
21-Jun-2011
[2297]
Also, people installing View on Linux to try Red might encounter 
issues related to View installation.