« first day (825 days earlier)      last day (2955 days later) » 

KK.
1:52 PM
@HostileFork Thanks.
I appreciate it.
 
 
1 hour later…
dt2
3:06 PM
cloud9 runs rebol :)
 
KK.
3:19 PM
Hello @dt2
Are you free for a minute?
 
KK.
3:58 PM
@HostileFork @GrahamChiu Thanks a lot for talking to me when I just entered into this room by mistake. The following is what I am doing right now, and I must say am enjoying it, at least for now :-)
 
dt2
@kk here now
 
KK.
@dt2 Thanks. I was trying to figure how to use rebol on linux. Got it. Thanks anyways.
 
dt2
no problem :)
 
KK.
@dt2 are you there?
I tried something like do [a: (4 + 3) 4 + 3]
I am trying to do it in multiple lines, like
do [
a: (4 + 3)
4 + 3]
but I get the following error when I press enter after typing do [
** Syntax error: missing "]" at "end-of-script"
** Near: (line 1) do [
(Hope I am not wasting your time)
 
 
1 hour later…
5:14 PM
@KK. Hey KK lemme look at this
 
KK.
Hello @HostileFork
 
In the interpreter command line? If so, a lot of things don't work out very well there.
But that should work in a script file.
 
KK.
Ok.
 
This is a temporary thing, and, I hate to even say it, but you might try yourself a Rebol 2 interpreter if you're just trying to get the hang of things. rebol.com/download-view.html
Because some stuff like that was more polished.
We're going to fix it! :-)
 
KK.
Since I am not working on anything critical or even money-making (lol) I don't think I am going to start using Rebol 2.
Is there somewhere I can report this as an issue for Rebol3?
Hello @GrahamChiu
 
5:20 PM
Hi
 
@KK. We know. :-)
 
KK.
:-)
 
Try this
Do read clipboard://
 
Reporting bugs to Rebol right now is...well. Probably the best way to do it is to tell us here and let us take care of it. We'll figure out if it's a bug or not and what to do about it.
 
KK.
@GrahamChiu it says none
@HostileFork Ok.
 
5:24 PM
Rebol has suffered from a sort of "do it all yourself" mentality for a long time, and this means the bug tracking system is written in Rebol... and the chat system was written in Rebol...
Which led to a case of "spreading oneself too thin".
 
KK.
@HostileFork I have read here and there about this kind of mentality, under the name "Not Invented Here syndrome"
 
I try and get people to appreciate Stackoverflow, even if it's not written in Rebol...
@KK. Precisely.
 
You must have typed that block then rather than pasting it in
 
KK.
@HostileFork Yes. I think I understand. A good thing is a good thing.
@GrahamChiu Yes. Lemme paste it.
pasting it too lead to the same result
== none
 
Except the chat was written long before there was any persistent chat elsewhere
 
KK.
5:29 PM
@GrahamChiu Ok. So Rebol was ahead of time, but could not really catch the imagination of the masses?
 
Poor marketing and then closed licence
 
KK.
Actually, someone writing their own language for their own work is supposed to be ahead of time, unless they are mad or want to make money off (as you say) closed license.
 
@KK. You saw the website. It's terrible.
Rebol came from an era where a language did not need a snazzy website. People used languages that were sold in boxes that they read about in computer magazines.
 
KK.
Yes, if I did not meet you guys and someone showed me that page, I would think Rebol was just another stone age language which failed to take off, and deserved it.
I am just thinking about money.
 
Stone age language? Not at all. Designed by Captain Caveman? Yes. :-)
A super clever fire-inventing caveman... but a caveman nonetheless.
 
KK.
5:33 PM
Just like $ is a type in rebol, I think it will be easy to create and use types for other currencies like Rupee (India) and Saudi Dinar (Saudi Arabia).
Then converting between these currencies is just a matter of multiplying with the conversion rate.
Doing such a thing in most mainstream languages will involve tens, if not hundreds of LOC.
 
@KK. I've protested the use of commas in numbers for decimal points, Rebol supports it: 10,20 instead of 10.20
I don't know what India's convention is.
 
KK.
@HostileFork Now that you mention it, I too myself find myself protesting.
 
I would be more open to world currencies in the parser as long as it didn't break anything else, but in my mind that was a waste of comma
 
KK.
India was ruled by the British for almost 200 years, so our conventions are almost the same as them.
 
I only recently saw the Gandhi movie with Ben Kingsley
 
KK.
5:36 PM
Except the number system. A million is 10,00,000, rather than 1,000,000.
Ok.
 
Have you seen it? I don't know how accurate it is, but it was a good movie I thought.
 
KK.
I have not seen it.
Gandhi was a very intelligent person. Ahead of times too.
 
Everyone is named Gandhi
 
KK.
It must be accurate. I have only heard praise about it.
@GrahamChiu How? I did not understand.
 
It's a very common family name

It is a BC very common family name
 
KK.
5:40 PM
No, I don't think so. Maybe because I am from a different part of India.
 
So @KK. one place you can look to kind of get a bit of Rebol experience is just to wander in the Stackoverflow Rebol tag. It may be biased a bit toward the places where Rebol isn't so clear, or where Rebol 2 and Rebol 3 differ...
 
Bad design ...the keyboard obscures the chat area in droid
 
KK.
@HostileFork sure. I visited a few questions.
I also saw an answer by @GrahamChiu in another question about text I/O with Rebol.
 
Stay practiced with type? and probe and here's another one to know... quote.
 
KK.
Ok.
 
5:45 PM
I have a family of patients where husband and wife both have same surname. They explained it to me that it was inevitable since Gandhi was so common. So it
 
So for instance compare type? (2 + 2) and type? quote (2 + 2)
 
Is like a movie named "smith"
 
KK.
@HostileFork In first case it is integer! and in the second case it is paren!
 
@KK. Yup. This cuts a bit at the core of some of the difference between Rebol's linguistic tinker-toys and the way other languages work.
I bet you don't have to try it to know what second quote (2 + 2) will be...
 
KK.
@GrahamChiu it is not that common, but I am not too sure. Right now, the dynasty family that runs the ruling party also has the same surname.
@HostileFork I think it will be integer!
Just a sec
NO. It is +
 
5:49 PM
When you quote the parentheses they become a grouping unit, like a block! with brackets just a different type...
They can even be empty. length? [() () ()]
 
KK.
Ok.
last quote (2 + 3) returns ` == 3 `
so I think I am getting the hang of it
 
Now here's a puzzle, why is it different if you don't say "quote"?
 
KK.
Just a sec, let me think.
Maybe because last is supposed to be a function, and functions expect different things
Like a list of things rather than just an integer in quote (2 + 3)
 
Well it comes down to the fact that, by default unless instructed otherwise, when the DO dialect gets its hands on a series of symbols it chooses to interpret parentheses as precedence in calculation.
 
KK.
Gonna try it in the interpreter
 
5:54 PM
quote is a tool in your arsenal to tell the DO dialect not to do that. :-)
 
KK.
>> last (2 + 3)
** Script error: last does not allow integer! for its value argument
Ok. Just like `(a b c) in lisp?
 
Similar spirit, but Rebol is not Lisp so you'll find things to be different.
 
KK.
Yes, this much is clear to me.
Starting from the fact that Rebol at least lets us use operators between operands.
 
It's a bit of a trick, though. Rebol is lying to you a little.
 
KK.
Ok. Is is some kind of syntax sugar, or sugar syntax, or something like it? I don't really remember what the term is.
 
5:59 PM
Kind of, but it's really just what the DO dialect does with it.
Try 1 + 2 * 3
 
KK.
9
 
Try length? quote (1 + 2 * 3)
 
KK.
5, is it because there are a total of 5 things: 3 operands and 2 operators?
 
Yup. Three INTEGER! and two WORD!
And for reasons of uniformity, Rebol's evaluator does not do operator precedence, it just goes left to right
 
KK.
Ok. So are all operators WORD ?
Yes. I read it.
 
6:01 PM
You could make a dialect where 1 means add 500 to the number previous to it. :-)
a: 10 mydialect [a 1] print a could produce 510 as output.
 
KK.
You mean that 1 + 2 * 3 and 2 * 3 + 1 different since it is calculated from left to right.
 
@KK. That's what the DO dialect of Rebol has chosen to do, yes.
 
KK.
a: 10 mydialect [a 1] print a leads to
>> a: 10 mydialect[a 1]
** Script error: mydialect has no value
 
Well you'd have to WRITE mydialect. :-) We can do just that if you like
 
KK.
Ok. lol.
>> a: 10 DO [a 1] print a
10
Yes, sure we can do that.
 
6:05 PM
Heh that DO did not do much!
 
KK.
:-)
 
It evaluated a (10) then threw it away
Then it evaluated to 1 for the result of the entire DO expression
Then it threw that away and ran a print of a
 
KK.
>> a: 10 DO [add a 10] print a
10
>> a: 15
== 15
 
Well that time you used a function with two operands and had a side effect, so yes, different!
Let's start simply. mydialect: func [expr [block!]] [probe expr]
 
KK.
No, no no
>> b: 14
==14
Ok.
@HostileFork Ok.
 
6:08 PM
@KK. Oh oops, I misread, was typing in another window, of course adding does not have a side effect.
 
KK.
@HostileFork Not to worry, I do not even know what a side effect is. :-)
 
When a function is not a "pure function"... e.g. it modifies its input or some global state instead of just evaluating a new value... that is a side effect.
Functional programming people hate writing code that way, they want it all pure, always creating new values independent of the rest of the system.
So now we have a function that expects a block. All it does is probe it. So try mydialect [a 1]
 
KK.
>> mydialect [a 1]
** Script error: mydialect has no value

>> DO [a 1]
== 1
 
Hrm, you entered mydialect: func [expr [block!]] [probe expr] ?
 
KK.
Oh. No. Just a sec.
>> mydialect: func [expr [block!]] [probe expr]
>> mydialect [a 1]
[a 1]
== [a 1]
My bad.
 
6:13 PM
Function specification takes two arguments. One laying out the parameters to the function, and one for the body that represents the code. It's yet another example of a dialect, you'll see this over and over and over. :-)
Okay I said we were going to make a dialect where the appearance of a number 1 would add 500 to whatever came before it.
 
KK.
Ok. seems like a javascript style function definition.
var karunesh = function () {}
I am just trying to relate things to what I know. You pointing out the differences makes it even better.
Yes.
 
Funny thing is there's lots of ways to do this, I wish other people were around to throw in a suggestion, I'm tempted to do it with parse!
 
KK.
Ok. :-)
Don't resist yourself.
 
Well here's a fun start. parse [a 1 b c 1 d d d 1] [some [word! pos: integer! (print first pos) | word!]]
I'm a very clever person in a general sense, but not by any means the most clever Rebol programmer, so I will ask you to continue to bear that in mind.
 
KK.
>> parse [a 1 b c 1 d d d 1] [some [word! pos: integer! (print first )]pos) | word!]]
1
1
1
== true
 
6:20 PM
Well your paste didn't seem to quite match what I wrote, but the output is right.
What we did there is have a match rule. Each step of the parse said is it either a word followed by an integer, or just a word?
If it was a word followed by an integer we printed the thing at the integer position.
a 1 was a word followed by an integer, so it printed 1. b was just a word, so it matched and didn't do anything. c 1 was a word followed by an integer so it printed the integer. d was just a word so it matched and didn't do anything. The next d was just a word so it matched and didn't do anything. That last d 1 was a word followed by an integer so it printed the integer.
 
KK.
@HostileFork There is another issue.
I tried changing the second and third 1s to any other integer values.
 
And it printed them out I imagine?
 
KK.
For this I just pressed the up arrow key, and the last command came up. Since it was a long command, it streched to two lines.
 
Gotta widen that terminal or shrink your font or something. :-) Yes, we know it sucks, people are working on it
We only got the source in december!
 
KK.
Trying to reach the first line stopped when the cursor reached the beginning of the second line and stopped there.
 
dt2
6:25 PM
Use an editor :)
 
KK.
@HostileFork Ok.
@dt2 No, I was just telling this cause he said it is the best way for reporting, for now. :-)
 
I'm not working on that in particular, I'm kind of attacking "higher level" issues
 
KK.
Ok.
 
But I'm sure someone is going to get pissed off enough to fix it
 
KK.
I too am sure.
 
dt2
6:27 PM
i use gedit as scratchpad. better than console.
 
For years we've dealt with this after having a relatively nice Rebol 2 console.
As I came into Rebol in the Rebol 3 era, I've just been used to it because I thought "oh, no point in using Rebol 2... it's on the way out..." so I'm a bit more tolerant than others.
 
KK.
@dt2 Ok. I too will use gedit from now.
 
Hence I'm hoping they will fix it while I tackle my own pet peeves.
 
KK.
So, how do I run a Rebol script?
 
do %scriptname.rebol
Another thing to learn: type? %foo/bar/baz.txt
 
dt2
6:30 PM
enable external tools in plugins. (i hope i translate that right)
then with ctrl-f8, it runs the makefile in the script folder
put all: <newline>
<tab>./r3 script.r
in file "makefile"
ctrl-s to save, ctrl-f8 to run, gedit opens a little output window
 
KK.
@dt2 Sorry, I did not understand any of the last series of messages.
 
dt2
you want to use gedit
 
KK.
Yes.
 
dt2
it has a way to run rebol with a single keystroke
and show the result
 
KK.
So you mean enabling external tools in plugins for gedit
On it
 
dt2
6:33 PM
yes
then you get the ctrl-f8 key
which runs make
 
KK.
@dt2 Ok. I created a file with a single line: add 2 3
 
dt2
(at least here^^)
 
KK.
The output was:
Running tool: Build

No Makefile found!

Done
 
dt2
yes. make a file named "makefile". same folder as script
then make is sensible about tabs
put into it
first line: all:
 
KK.
It says:
 
dt2
6:38 PM
second line: how you would to run rebol with a script from commandline. but with a tab in front.
for testing, put there: echo "it works!"
 
KK.
From what I understood, here is what the file looks like:
all:
echo "it works"
with a tab in front of the second line
 
dt2
yes.
now press ctrl-f8 and it should print a message
or tell you something about spaces
 
KK.
I think it is supposed to print "it works", but it prints
Running tool: Build

make: Entering directory `/home/sudhanshu'
make: Leaving directory `/home/sudhanshu'
Using makefile from ~
make: *** No targets. Stop.

Exited: 512
(currently i am playing in ~)
 
dt2
>> write %makefile {all:^/^-echo "hello"^/}
>> call "make"
echo "hello"
hello
== none
does that work?
 
Hullo @HawkWeisman - noting your inability to chat, I'll mention that should you ask or answer a question coherently, we'll get you up to 20 points with upvotes. :-)
 
6:48 PM
@dt2 Colouriser is indeed a 'load/next hack. As Fork suggested, I have tried to define Rebol in EBNF (mainly for the purposes of producing the RR diagrams). Also @earl has a project to define Rebol in Parse terms.
 
KK.
@dt2 No it does not.
Can we just start from the beginning?
 
@HawkWeisman Sometimes a first question gets brutally shot down, and that's just the hazing of StackOverflow, they have their "way" and if you do it wrong they want to scare you into doing it "right".
 
KK.
I have a file with:
all:
echo "it works"
Now, pressing Ctrl-f8 does not work properly.
 
dt2
@kk, did you paste my example in the console?
this writes a makefile: write %makefile {all:^/^-echo "hello"^/}
and this tests it: call "make"
from the rebol-console
@rgchris. does ebnf work for everything, or are there problems?
 
KK.
Right now, I was running the rebol intepreter and my script in two different directories. I am gonna do it in same directory now.
 
dt2
6:55 PM
@erals projects looks like what i would try. and @fork it has no parens :)
 
KK.
@dt2 thanks, it works. I was confused earlier.
 
dt2
ok. if you have the makefile, the script and the interpreter in the same directory, you can replace the echo-line with: ./r3 script.r
and then a make from commandline or ctrl-f8 should run the script
 
@dt2 It just about works at defining all the values. Where it fails is in the space between values where the lack of lookahead is a problem.
 
dt2
you have to put probe before the expressions to see something.
@rgchris i am confused. every language has free spaces and works with ebnf. what am i missing?
 
Some values can follow others without spaces.
 
dt2
7:01 PM
ah.
 
[block][block]
<tag><tag>
<tag>3"string"
But others cannot.
 
dt2
@rgchris can we forbid that ?
>> [<tag>3"string"]
== [<tag> 3 "string"]
would be mold compatible.
 
3word
word#issue
 
KK.
@dt2 it runs in gedit using Ctrl-f8, but bash gives error on do %kk.rebol
it says-
bash: syntax error near unexpected token `do'
 
dt2
you are on bash here.
you must tell bash that you want to run rebol
 
KK.
7:07 PM
Ok.
How do I do that?
 
@dt2 Could, but then we wouldn't be describing the language as it is. And as yet, I'm not sure @earl or myself have the clout to enforce such things.
 
dt2
the same way you start rebol from terminal
./r3
if you are in the same folder as rebol
 
KK.
Ok. Just a sec.
 
dt2
then it shows you a lot of helptext from gedit
then you tell it that rebol shall run a script
./r3 kk.rebol
 
KK.
Here, it says:
sudhanshu@ubuntu:~/Documents$ ./r3 kk.rebol
bash: ./r3: No such file or directory
 
dt2
7:11 PM
@rgchris fork wants it for interop between red and rebols. some relaxing may be ok. you can always mold load before sending a message.
@kk what does "r3" instead of "./r3"?
the ./ says the r3 is in the same folder as the makefile
how do you start r3 from the commandline?
 
KK.
It says r3: command not found
Aah. Just a sec.
 
dt2
the r3 is the exe-name. maybe you use a different name
 
@dt2 I guess the tradeoff is between design considerations/convenience of parsing. I haven't yet given up on EBNF yet if there's a possibility of getting the definition right (my ulterior goal is to be able to write parsers in other languages).
As well as having a foundation for proposing new types.
 
dt2
How do other language-defs handle that? i can write a[1] or a [1] and AFAIK its still possible with ebnf
 
KK.
@dt2 I am using the file as exactly from the website.
sudhanshu@ubuntu:~/Documents$ ./r3-g6a79a7b kk.rebol
** Script error: echo does not allow string! for its target argument
** Where: do either either either -apply-
** Near: do intern code

>>
 
7:16 PM
@dt2 The rule as I have it allows that, but it also allows 3word.
 
KK.
@dt2 You continue your discussion with rgchris. I can get the command line thing later.
 
One option I have is to go hyper-verbose and have a rule for values that can follow integer. I fear that's a rabbit hole.
 
KK.
@dt2 @rgchris @HostileFork Bye and Good Night.
 
@KK. It's a shame there's no threads in this chat, but don't let me put you off :)
 
dt2
good night kk.
 
7:20 PM
'night.
 
@KK. Gnite, we do enjoy this so do come back :-)
 
KK.
@rgchris No, I am feeling pretty sleepy. So I figured its better if I get out of the discussion.
@HostileFork Thanks :-)
Will do.
 
I think having even a handful of new Rebol users, be they kids in India or China... doesn't matter... is important. So I'm glad when we take the time.
Jerry's book seemed to be successful in China, so there may be a big opportunity there.
 
Yes, I feel bad for diluting the channel, but then what other options is there?
 
@rgchris Don't think of it that way!
 
dt2
7:24 PM
Its a chat. meant to go away :)
 
Let the AltME people build their cathedral
In the meantime, make the bazaar.
 
Yes, but even in realtime trying to track what's meant for you...
I guess that's what the pings are for :)
 
There are replies, and the ambiguity lets you delegate. I wandered off and you and dt2 took care of KK.
This is good. It's not good for Q&A and that's why we have the Q&A.
But it's good for the moment.
 
** Where: do either either either -apply- — eesh, that's not very helpful.
 
@rgchris Rebol error messages are generally crap.
 
7:27 PM
Yes, but R2 would have at least shown the code where 'echo was called.
 
And I thought C++ was bad.
 
dt2
@hostilefork how about some extra rooms?
 
@dt2 We just don't have enough bandwidth to justify it yet. By my count that's our second visitor who actually has bothered to look at the language at all.
 
dt2
so we need one extra room to move over. for now :)
 
In time maybe, but for now, we have less to worry in terms of dilution of "grown up talk" with "newbie talk" than we do for just any interest in Rebol at all!
 
7:29 PM
@HostileFork Rebol errors can be a little elusive, but there are a few ways to mitigate the mystery. Like specifying types on functions and using [catch].
 
dt2
rgchris mentioned it was hard to follow
 
@rgchris Dunno if you saw my remark on how R3's protect is quite useful to catch bugs, I'm using it constantly
"I know this value was good here, it goes bad later, well I'll protect it". Like a memory breakpoint.
 
I did see that, I haven't used that myself—could come in handy.
 
Caught some things I can't quite figure how I'd catch without it.
R2's protect sucks.
 
dt2
how hard would it be to add an int in each value, and encode the source-position there? then errorhandlers can tell where the error comes from.
 
7:33 PM
@HostileFork do you have an example of how they're different?
 
@dt2 Amusingly, Red loads files by line...and puts an issue on each line in the loader...#L 1 for line one, #L 100 for line 100...
 
That could well be for those hidden 'new-line flags too.
 
@rgchris R2 can't protect blocks, only words, if you pass it a block it assumes its a block of words you want to protect. So a: [10] protect a append a 20 works IIRC in R2 with no complaint.
 
dt2
must be in the values IMHO. an errorhandler sees only the errorvalue.
 
Not currently on a computer I can test that on
 
dt2
7:36 PM
then a set in 'load and a get in the handler
 
Without being non-lazy, anyway :-)
 
dt2
@fork there is an online-rebol to try! i am too lazy to searhch for it :p
 
@dt2 Kaj and I argued over it, but there's a non-state preserving one: Esper consultancy Rebol
 
dt2
enough to compare your protection ;)
 
@dt2 I had what I thought was more promising concept that he ignored, but that someone crashed and my hosting company mailed me about someone typing in an infinite loop. If you promise not to do that, I'll let you see it. Wow, it's totally broken. Anyway, I had a bit of an idea, please do not hack it, I am not good with sandboxing. My idea
Ah crap it's not working
Hold on.
@dt2 Okay, try it Now.
Please don't destroy my computer. Thanks.
This is not "let's see how well he secured it" time.
I didn't.
Hullo @JoshuaFox -- I will also ask you to please not destroy my computer :-)
Any reputable SO user would not, right?
 
@dt2 Did you try my page? It's just a concept.
 
dt2
>> print "Hello fork!"
Hello fork!
can i type quit?
 
Please don't do that kind of thing, you might make the universe explode :-)
Just be... er, inspired. And at some point we sandbox the whole thing and put it somewhere that's not hosting my web content.
 

« first day (825 days earlier)      last day (2955 days later) »