« first day (1366 days earlier)      last day (2414 days later) » 

1:18 AM
pastebin.com/3MXjL64i does this make sense? it gives wrong results. I want to find palindromes
and why oh why are the pastebin colours prettier than what rebol plugin for netbeans does? hmm
 
>> help if
@rebolbot alive?
Asleep I guess.
@user3398747 if takes a value as its argument, and not a block.
 
please can you say what change do I need to make exactly,? I'm a complete beginner, finding it a bit difficult and the tutorials I found don't seem to be vbery thorough
removing the bracket to make it a value didn't help
 
1:45 AM
@user3398747 reverse modifies its argument (it's not always clear which operations modify and which don't, which is unfortunate). So product = reverse product will always be true.
REBOL[]
i: 100
product: 0
while [i <= 999] [
  x: 100
  while [x <= 999] [
    product: i * x
    product: to-string product
    if product = reverse copy product [print product]
    ++ x
  ]
  ++ i
]
@user3398747 Without regards to efficiency and such, that will print out all the palindromes that are products of 3-digit numbers... some twice.
You can pare it down but you'd pared it down too much. There was no case of testing 100*100, for instance, the way you were doing it.
 
ohh. thanks
It takes me a while to think and understand the code I'm reading, but I hope I will get a feel for all the loops and stuff after practicing more exercises
 
It is a bit odd that IF does not take its condition in a block, but there is a reason for that.
IF is a function, like any other. You can build on top of it, or build things like it. And when it gets a BLOCK! parameter that can be any positional reference inside a block.
Routines like FIND, when they act on a block, will give back a block position.
So when you write x: [1 2 3] followed by if find x 2 [print "2 was found"], what is coming in as the first parameter there will be the position inside of x indicating [2 3] It would be as if you wrote if [2 3] [print "2 was found"]
And if nothing is found, it returns NONE. So it would be as if you wrote if none [print "2 was found"] and that will not execute the print.
So the way it works with IF statements is that blocks--being not a NONE or a FALSE--are thought of as "truthy". So IF statements would have to always require a block as boilerplate if you were to be able to put your conditions in blocks. And Rebol tries to avoid boilerplate where not absolutely necessary.
A while loop must have the block, because it's not possible for the caller to evaluate the expression once and pass the result of that evaluation in to while. WHILE must receive the code block to execute as many times as it needs; because the evaluation may be different each time. IF only evaluates the condition one time...so the caller can do it, and not pass the whole expression to IF.
Were this to bother you, you could write your own IF that always takes a condition in a block and overwrite the existing IF. :-) But the idea is just to make the code pleasant and "english-like" to write...
 
2:56 AM
>> 1
 
3:11 AM
New cookies installed and working :)
 
3:21 AM
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/access-no-scheme.html
    *** ERROR
** access error: missing port scheme: https
 
old version still at tryrebol
 
 
2 hours later…
5:05 AM
@HappySpoon Indeed.
@HappySpoon Yes, it should.
 
@rgchris and it did AFAIK
but now looking for markdown
only because the version of markdown I'm looking at allows one to use pygments on rebol code listings
 
Do you have links in your documents?
 
@rgchris nope
I'm just doing the R3GUI docs again
since pandoc wasn't able to cope with wrapping the long code lines
 
Ah, should be very straightforward to hack the asciidoc.r file then. It's reasonably rudimentary—key parts are from ;-- Paragraph States on down.
I can take a wee look tomorrow, should have a few minutes...
 
5:27 AM
thanks, appreciated
 
5:52 AM
Hello,
 
@JoeDred Hello there.
 
Just wanted to type a real question about REBOL/Red. Its been ages since I used a chat...
 
@JoeDred Ah, well we have a little bit about it in the FAQ. It's not bad as chats go. Bots available...
>> print "I'm here!"
 
; Brought to you by: tryrebol.esperconsultancy.nl
I'm here!
 
@redbot
print "multiline input"
print "should address the bot on the first line"
print "and then shift-enter to get new lines"
@johnk Redbot sleeping on the job...
 
5:57 AM
@HappySpoon just catching up - what new url?
@HostileFork noted and will fix soon
 
I tried the whole weekend to implement a quicksort with recursion in Red, but got stuck. The code does what it should do, at least I think it does it.

Problem is, that Scopes do not work as expected in functions. Im coming from a Java-background, so it is a little bit confusing that a variable with the same name in a deeper call overwrites the initial variable up in the recursion stack.

Would someone be so kind to help me with this issue? Im really puzzled at the moment ;)
 
9
Q: Is there a overall explanation about definitional scoping in Rebol and Red

WayneTsuiFrom the REBOL/Core Users Guide, and What is Red, I have learned that both Rebol and Red use definitional scoping. From the guide, I know it is a form of static scoping, "the scope of a variable is determined when its context is defined", and is also called runtime lexical scoping, and is a dynam...

It would help to see your code. Are you using FUNC or FUNCTION?
 
@JoeDred - have you tried to define such a variable local? In function spec definition, you can define it like this: func [a /local b][code here], well, at least in Rebol, hopefuly Red supports it too, as Red/System does ...
 
@RebolBot
a: 10
foo: func [] [a: 20]
foo
print a
 
; Brought to you by: tryrebol.esperconsultancy.nl
20
 
6:06 AM
@RebolBot
a: 10
foo: function [] [a: 20]
foo
print a
 
; Brought to you by: tryrebol.esperconsultancy.nl
10
 
@johnk http://try.rebol.nl/ so we can dispense with the tryrebol.esperconsultancy.nl
 
@HappySpoon sounds good
 
Im terrible sorry, it lies at home.

I read all about scoping yesterday, also your mentioned question HostileFork. Which is really informative.

@pekr I tried using local. Problem is, Red does not support it yet in Version 0.4.2. Every time I call a Function (defined with func) it throws an interpreter error saying there is a missing argument.

I tried the example from the Red/System language spec documentation to verify that /local is not working:

compute: func [
a [integer!]
return: [integer!]
 
@JoeDred Red is new so it's never very sure when you are crossing into unimplemented feature territory, but that works on try rebol/red if you change to function and lose the /local c
compute: function [
a [integer!]
return: [integer!]
][
c: 1 ;-- inferred type is integer!
a + c
]

compute 2
== 3
They should be equivalent.
 
6:34 AM
@HostileFork I feared you would say something like that ;)
@HostileFork So this means recursion is not feasible right now? Because it is not possible to make a variable /local, meaning its scope is the function is it contained in.
 
@JoeDred If you use FUNCTION instead of FUNC then it looks for SET-WORD instances in the body, and any it finds, it assumes are local. So you can do it. You just (apparently, for some reason) can't use FUNC. Let me check the daily build to see if this is resolved.
 
@HostileFork Ah thanks for the insight. I will try that later at home with FUNCTION.
 
@JoeDred Everything looking okay with the latest version, if you download one of the "automated builds". /local c with FUNC works, or FUNCTION without
Just get a "missing argument" error in 0.4.1 for some reason
 
@HostileFork Going to work now! Will definitely try your suggestions. Seems like I will come back here more often to get help =)
 
@JoeDred The more the merrier. Let us know how it's going...
 
6:54 AM
Anyone got ideas of where Rebol might find its niche?
 
 
3 hours later…
9:38 AM
@HappySpoon - difficult to say. Some guys use it for CGI, we don't have so strong framework as Rails, albeit @rgchris and @rebolek are doing some stuff in that area. Personally I like the embedded area and what guys like Atronix and Bo are doing ...
 
That's the issue, the message is not clear.
I used to think that desktop development was a strength, using VID etc, but that market seems to have dried up.
 
I think that View might have sense in the embedded world too, but two problems - AGG is not HW accelerated and according to Cyphre, VID is slow on such devices. Second thing is, that we, as a community (including myself, to be honest), did not utilise architecture of R3-GUI and did not come-up with more styles and some nice skin upon that ...
 
I agree that the embedded "internet of things" world is a good target
 
9:53 AM
I really like Rebol being an infrastructure thing. Hence I welcome once some extensions appear, new kind of library interface and simply anything, which makes R3 more open and integrated. The same attitude I share for Red - integration plus glad strong console is coming and I like Red/System ...
 
I just spent the weekend making this and am interested in getting rebol working to control it
A very successful @NodeBotsAU day. Thank you to all! http://t.co/OhuB4QeLYu
 
Yes ... I recently borrowed two prints of Czech top magazine about Embedded world and there are at least 4 articles about "internet of things".
 
@kealist has done a lot of work on this already - github.com/kealist/rebol-firmata
This is using sysex messages over midi over usb serial to communicate with a small "server" on an arduino
@pekr dialects come into their own in this world. A real logo dialect with a pen up and pen down would be great for teach kids how to code
 
I was thinking about a dialect for GPIO, and I think that Bo already did something in that regard. I need to get back to my BeagleBone Black some day ...
 
@pekr yes that would be good. My pi is now living as my solar panel data collection device .. I need a new one for play :)
 
10:02 AM
Is it compelling though? Better than other ways?
 
That's great to hear. It feels really refreshing to read how some technology is helping ppl in their real life! I also like Carl's Recode presentation about R3 and Insteon automatition ...
 
@HappySpoon Yes
"In the proposal, they pitched that the thesis of their talk would be creating a world in which controlling devices could be as simple as:"
$("livingroom").bind("motion", function() {
  $(this).find("lights").brightness("75%").dimAfter("120s");
});
I suspect that to the average human being this doesn't look simple :)
 
@johnk lol
the world is a dom
 
@HappySpoon - not sure what other ways are. As for Beagle Bone, I am owner of also a white version (first one), and ppl were doing their first steps in Python. That was not complex and could be ported to Rebol. I was quite disappointed, how incomplete their stack was - JS, Cloud9 storage of the source code ...
 
We only need Rebol don't we?
What's the JS for? A GUI to program the browser to control the device?
I have to admit not much interest in small devices.
My Beaglebone Black rev C arrived a few days ago, and I haven't even got round to opening the package yet.
I"m renovating the house so I thought I would just use it for the house PABX.
not really to do any programming with.
there's also a local crowd that produces a wifi LED
so that you can change the color of lights and turn them on/off and adjust the brightness. That might require a bit of coding.
 
10:14 AM
@HappySpoon - yes, basically that - once everything is connected, you can program your device via your browser ...
 
@pekr Pity R3GUI is so slow under Android.
Shixin was doing some testing using a different GUI
But since GTK doesn't run under Android, perhaps Qt would be better.
I recall being able to bring up a basic requester in Qt when i tried it a few years ago from rebol.
Will have to dig up what I did.
 
10:48 AM
@HappySpoon - I do remember some talks about wrapping Qt in terms of Red/System, but from what I remember, Qt is C++ and hence not so easy to wrap? But OTOH even AGG was C++ IIRC ...
 
 
2 hours later…
12:23 PM
red> 1 + 2
 
; Brought to you by: tryrebol.esperconsultancy.nl
== 3
 
12:37 PM
@RebolBot do 1
 
; Brought to you by: try.rebol.nl
== 1
 
https://github.com/red/red/pull/887
GitHub
Red Pull Req—FEAT: added string! TO float! action.
qtxie
1406529293
 
 
9 hours later…
10:08 PM
@johnk just need to alter the redbot then.
instead of ; brought to you by: `http://try.rebol.nl`, why not something shorter like

; courtesy of `http://try.rebol.nl`

or just:

; `http://try.rebol.nl`

??
 
10:57 PM
@HappySpoon redbot is updated as well
 
red> print "well done"
 
; Brought to you by: try.rebol.nl
well done
 
That increases our commit stats :)
 
The 'Brought to you by' is ok. 'Courtesy of' is more concise, but harder to understand for non-English speakers I would imagine
Many more updates are needed ...
Change from .r to .reb, use your authentication ...
Then we can start on a real redbot
 

« first day (1366 days earlier)      last day (2414 days later) »