« first day (844 days earlier)      last day (2936 days later) » 

12:32 AM
@BrianH For reword I guess it's not going to be typical to pass in (say) a block of escape characters, but the empty block and none are subject to similar questions of distinction.
 
So, what's rebol?
 
Not your mother's language?
 
Nope :)
I've actually never heard of it
 
Well, you've come to the right place. Just let @HostileFork get warmed up.
 
@BenjaminGruenbaum Hey Benjamin (my dad's name actually)... welcome...
 
12:41 AM
It slices and dices better than any other general purpose utility language. For one.
 
I know Javascript/Java/C/C++/C# pretty well, and some python and ruby. Never heard of Rebol, why would I use it and what would be some of its use cases?
 
@HostileFork I was thinking of handling the trailing delimiter case by passing in a block of two char or string delimiters, no more, no less, typechecked. That would be a strict enough definition that you can even do it in native form.
 
@BenjaminGruenbaum Rebol is very literate, it has lots of stuff that Lisp does except much prettier. Here's the RSS feeder that gets the answers to questions tagged Rebol for instance.
(StackOverflow doesn't provide that feed as a default)
@BenjaminGruenbaum Realistically speaking it's not something you'd use for writing--say, a device driver. That's why we've got the Red project. Performance-wise, think of it as being about the same application space as Ruby. It's an interpreter.
 
Looks very functional :) the use looks very similar to C#'s using clause, and all the functional stuff looks very interesting
I'm not looking to write device drivers, I don't really care for low level stuff
 
@BenjaminGruenbaum It's not functional, though you can do functional-ish things with it. Have you ever tried out Lisp?
 
12:45 AM
So, looking at the code you posted, the REBOL part is 'description' of the module. "do either" is switch case. "use" is importing for a block scope, and the rest is parsing?
 
The thing is, with Red, a Rebol-like language, you will be able to do system programming too. Using the same sort of abstractions.
 
@HostileFork I seee 'map-each' 'find/match' and 'join' 'insert' and 'next' looks pretty functional to me (though admittedly I don't see any methods/function in that code)
 
Here's what the creator of Rebol has to way wrt it being a functional language.
 
I guess I'm seeing is more collection manipulation and less functional concepts, in other languages (Javascript, C#) collection manipulation is done using lambda expressions
 
We're the creators, now. :-) (It became open source in December... despite being around since 1998!)
 
12:47 AM
@BenjaminGruenbaum switch is switch case, use defines a bunch of local variables for use in a block scope, and the REBOL part has script metadata.
 
I'd say that at least as much as you can view Lisp as being a functional language, Rebol is much the same.
i.e. it's not pure, but offers the best of several paradigms (buzzword alert!)
 
@BenjaminGruenbaum There's a real weird kind of uniformity in Rebol. So first [print "Hello"] is the symbolic term print (a word!). And first "Hello" is the character #"H" And fifth second [print "Hello"] is the character #"o"
 
How does that code do XML manipulations? Is load-xml an external dependency or is it a built in, if so how does it know to import it?
 
What some people trip over is that Rebol is written a lot like ordinary language. It has much less "structural callouts" to tell you about what's taking parameters, you're supposed to read it in your head.
 
12:50 AM
It does read nicely
 
You can, if you really want to, use parentheses...but the parentheses are symbolic objects in their own right, and can be used for more clever purposes than that.
 
Also, it doesn't actually use functions for a lot of the things that functional languages use them for. You can do the functional language stuff in Rebol, but we usually do things a bit more efficiently.
 
@BenjaminGruenbaum It's just another script for parsing XML altxml.r
 
@BrianH what do you mean?
 
The system matches the parentheses for you, so you've got it as another Tinker-toy in your tool belt. You can put your own meaning on things like myfunction [foo bar (blah blah blah) a: 10 http://google.com].
These things are what we call "dialects". One particularly impressive one is called PARSE. The default one is called DO.
 
12:52 AM
What are dialects for?
Are they similar to LISP identifiers?
 
It's a big set of tinkertoys! Most languages wouldn't be able to do something like say if tag = <a> [print "The tag is a"] because their parsers are so brain dead they'd be like "hm, less than a what?"
 
here dialect is roughly a DSL
 
You're in JavaScript and you've got some CSS and you try to say background-color but it thinks you mean background minus color, and then you have to put that in quotes, and everything's a big mess 24/7.
 
@HostileFork how would Rebol solve that?
 
As mentioned some dialects are built-in, but you can easily extend the language by creating others.
 
12:54 AM
Rebol is a case of thinking things through. print {"Isn't it nice," asked {Fork}, "when your string delimiters are asymmetric? As long as they pair up, you don't need escaping."}
@BenjaminGruenbaum Rebol goes for being clever instead of merely brief. You put spaces between your tokens. background-color is not equal to background - color. The cleverness has a lot to do with empowering a bigger symbolic space...a larger box of bricks, if you will.
 
@BenjaminGruenbaum Closest comparison would be to Lisp macros, but at a different phase (runtime, not compile-time).
 
One of the first things that you notice, and one of the things which gives it some of its power, is the very large number of built in datatypes.
 
@BrianH How about having to always pass two delimiters? Seems simpler and more intuitive to me.
 
So instead of shaping your problem around the language you extend the language around the problem?
 
Yes.
 
12:59 AM
@BenjaminGruenbaum Yes, there aren't really "reserved words", and colon isn't the "assignment operator". Once you get your head around it, you'll look at everything differently. But the weird bit is that by default it was made to look kind of like an ordinary language. It's not.
 
You basically extend Rebol and tell it how to understand that extension, and then use it in that extended way inside that context?
 
This is facilitated (amongst other things) by the combination of a rather effective parsing EDSL with a multitude of literal types.
 
@BenjaminGruenbaum I'm going to have to run, got a dinner meeting with the head of Disney's Mobile Gaming unit in Prague. Well, he's in town, I'm not going to Prague for dinner. :-) But please let these guys give you some good PARSE examples, hope to see you again...
 
So a good Rebol use case would be to create my own problem-specific scripting language? Like LUA?
 
(And homoiconicity.)
 
1:01 AM
 
@HostileFork thanks a lot for your help :)
 
@BenjaminGruenbaum Yes, that's a good use case.
 
As with Lua, one of the nice things about Rebol is how tiny (for what it includes) and self contained the runtime is.
Nothing to install.
 
Why would I use it over Lua?
 
That you'd have to decide for yourself, I fear :)
 
1:04 AM
Show him some parse!
Bye! :-)
 
More expressive overall and Rebol's parse dialect is something that will make you say "Oh yeah!".
 
You probably would use Rebol over Lua if you have a knack for very clean and aesthetic syntax.
But that are matters of taste :)
 
It's very interesting to hear about new languages. It looks very expressive, especially as a higher level language to manage a large program. Thanks
 
If you search for/scroll down to default-structure: and then move on a bit further to the commands: part.
 
@rgchris why is it that the syntax colouring for your scripts sometimes appears on a white background? Are you playing with it as we speak?
@BenjaminGruenbaum As was pointed out earlier, it's not just (at least with Red) for higher level programming.
 
1:12 AM
@BenjaminGruenbaum The link above is a non-contrived example showing a very low-key "dialect" in action. This code is part of a compiler backend and describes the structure of a simple ELF binary. The commands: part then is the key component driving the binary generation.
(@rgchris Any chance to get anchors to line numbers (like Github does it) in the source coloriser? :)
 
1:26 AM
@Adrian the D and L keys toggle the background colour
 
Are these documented? Any other other shortcuts?
 
@Adrian that's what the darken.js script does .. not aware of any documentation or other keys
 
1:53 AM
@rgchris, can you mod your feed script so that Rebol questions from programmers.se.com are monitored as well? Although there's nothing there tagged *rebol*, I foresee some questions non-coding Q&A's coming from there.
e.g. Is Rebol a functional language? In what ways would a Rebol parser be more capable than a regex based one?
@BenjaminGruenbaum asked a few questions more appropriate for that site than SO, IMO.
 
I think you should ask those question and answer them Q&A style on programmers, it'll help you raise awareness to the technology.
 
We will do it, but you can start things off by asking the questions!
 
I'll ask one to start things off
0
Q: Is Rebol a functional language?

Benjamin GruenbaumI ran into Rebol and I was wondering about it. I ran into the following script from here: use [feed questions answers][ feed: load-xml/dom http://stackoverflow.com/feeds/tag/rebol questions: map-each entry feed/get-by-tag <entry> [ find/match entry/get <id> "http:...

Please answer with citations from rebol.com/article/0206.html :)
 
2:14 AM
Thanks! Couldn't you create a new tag?
 
I need 30 more reputation, I only answered 3 questions on stackoverflow and only one of those was on a popular question so I don't have a lot of rep there
 
Hmm, I wonder if one of the Rebol regulars does have the rep over there.
 
need 30 more rep for tagging
 
We'll add the appropriate tags soon. In any case, it looks like @rgchris's script is picking up the feeds from there as is.
 
Here, it was added by a programmers user
 
2:22 AM
Nice, people work fast.
@BenjaminGruenbaum what's the language you mostly program in?
 
serverside JavaScript, and C#
 
It was Java, for me (C++ before that), but recently I just can't take the overly verbose nature of these languages. You typically, for significant applications, need to write reams and reams of code to do not so much.
 
Java is overly verbose, I really dislike it. C# and JavaScript are a lot less verbose than Java
 
Hmm, not sure I would agree.
I mean with "a lot".
and with C#
but even JavaScript is not as concise (without being difficult to understand) as it could be.
 
Let's talk about a practical use case, I have an array (or set) of elements, I want to filter those based on size, I want to map each element to its price. Then I want to Aggregate them based on price
In Java, I'd have to explicitly define a collection, I'd have to use a for loop once for filtering it (into another explicit collection), then again to map it (into a new collection) and then again to get the aggregate price
In C# thats:
collection.Where(x=>x.size>15).Select(x=>x.price).Aggregate((x,y)=>(x+y))
I can also do that directly into a database, it'd take my lambda expression and break it into syntax tree pieces, then assemble them back as SQL and query the database
 
2:36 AM
Yes, but in Groovy, a Java superset that you can use on the JVM, you have pretty much exactly the same syntax.
 
Also, I can do typing in C# but I don't have to, I don't have to write java code like Color myColor = new Color(); It has type inference with the 'var' keyword and dynamic typing with 'dynamic'
@Adrian groovy doesn't understand functions as well as C#, LINQ is a lot more powerful than just mapping or selecting, it actually parses it as a syntax tree and providers (like SQL providers for example) can hook on that
I have LinqToXML for example, so I can parse xml the same way, as well as other linq providers. C# from 5-6 years ago was a crappy langauge but it got real good real fast
 
Well, if you want functional and on the JVM then go to Scala, or Clojure.
I guess you can point to F#. :-)
 
I like Scala :) I don't know enough lisp to use Closure. C# is very powerful and does a lot of things Scala can't. F# is really interesting
All the cool functional stuff C# has it got from F#
 
Yeah, I sort of followed that evolution.
 
Javascript is also very potent, it's very fast and functional too
 
2:39 AM
Too bad that F# has that MS association even though it's now OS.
 
JavaScript didn't get new features but it got a lot faster in the last couple of years making it awesome. It's probably the most expressive language I know.
(general purpose that is)
Especially I like the fact that in JavaScript I'm tell my code how to react to its environment and not how to execute linearly.
It's a concept that exists in a lot of languages, but in javascript it's dominant making it very potent
I would love to learn something like Rebol , it looks very different from what I know and very interesting to learn
 
Except when you get into several lavels of callback nesting.
 
@Adrian you don't :)
There are a lot of ways to avoid callback nesting, I rarely have more than 2 levels or nesting in my code, there are better ways to handle this and there are external libraries like async that make concurrency easy.
 
I've been learning JavaScript myself recently, it's hard to avoid and it really is a pretty decent language in some respects, but I never felt it projects the kind of power I see in Rebol, and I'm a newbie here despite having followed it for many years.
I'm familiar with some of the futures, promises libs, but still, you often have to deal with others' code.
 
Javascript is probably the most misunderstood language I know, it's very easy to abuse. It takes quite some time to master properly
I'd argue that callbacks are a lot easier to follow and debug than threads which are the other alternative to what callbacks are used for.
 
2:46 AM
For me Rebol hinted at great power, but for my day-to-day, it wasn't enough to make me try to make a living off of (compared to, shame, Java) due to, mostly, its closed nature.
 
Yeah, I haven't even heard about it until today :) Java is an outdates language that abuses a lot of good programming concepts. Also, javascript is very popular and it's easy to make a living off of.
 
I agree that in combination with Node.js, JavaScript is a pretty good all-round tool. See node-webkit, for example.
 
I would love to find a job where I get to work with Clojure or Haskell (or Rebol for that matter) because it would probably be an awesome learning experience, but I doubt that I can find one
 
Well, I think that Rebol (and Red by exension) will, if not tomorrow, soon provide a wider range of application domains.
from systems programming, embedded, desktop apps, network apps, etc.
It really does span that kind of range.
Can't say that for too many others.
You can run Red on the RaspberryPi, for example.
It's a good time, to get to know these, IMO. It's like getting in on the ground floor (this despite the fact that Rebol started in the late 90's).
For now, I think the biggest bang you can get out of Rebol, if you're asking why would you spend some time with it, is by leveraging its data manipulation abilities and its parsing capabilities.
 
Why does Austin open its first good Ethiopian restaurant as I'm getting ready to leave? :-/
Dinner was great.
 
2:59 AM
@HostileFork You like? I generally like a wide variety of ethnic foods, but I can't say I especially enjoyed Ethiopian.
 
@BenjaminGruenbaum If you're going to be nose-to-the-grindstone practical about it, @Adrian pretty much nailed what you'd do with Rebol to get the most bang for your buck... just a little tool for munging files on your local machine most of the time.
We're much more ambitious than that, and with open sourcing and Red, the gloves are off. We can actually make this a fair fight with the Rubys and Pythons and Javascripts of the world.
And now, even C. But I will give a big glare at anyone who thinks Rebol is appropriate for some of C++11 domain space, it's just not. Red may someday be extended to do it but by then we'll either be obliterated by nuclear war or AIs will be writing all the code.
Red can replace C, but just isn't going to be competitive with C++11 for some things.
@Adrian Well, it's a whole culture and spectrum of cuisine, I've eaten at not-good Ethiopian restaurants (like all the other ones in Austin, basically).
 
lol. It sounds like an interesting language. I think you should try to find something it's really good at and has a practical use case a lot of people need and advertise that use case. A big user base is really important for a language to succeed.
 
LA, DC, and Seattle all had a little Ethiopia district and several to choose from.
 
(Well, that depends on how you'd define success, but you get what I mean)
 
@BenjaminGruenbaum I can think of a million things that were being done wrong from a marketing perspective, that we as a community now have need to change. And you're right, Rebol needs some easy to understand practical application where it's honed for its audience. But this is "herding cats" as the saying goes.
 
3:07 AM
@HostileFork I don't know about Rebol->Red not ever being competitive with C++. Java was that already in quite a few areas (yeah, I know you're gonna say no it wasn't, but it was competitive, not equal), so I would think that Red could get to an even higher level of competitiveness.
 
@BenjaminGruenbaum But I see no one bothered to show you parse like I asked. You won't be able to live without it once you learn it parse "aaabb" [some "a" 2 "b"] returns true. Because it applied the match rules and successfully got to the end of the input some (non-zero) number of "a"s followed by precisely two "b"s
On the other hand parse "aaabbb" [some "a" 2 "b"] will return false. With me so far?
 
any is any number of things including zero. So what would you expect parse "aaabbb" [3 "a" any "c" some "b"] to return?
 
true, since it has 3 a's zero or more c's and one or more b's
like a{3)c*b+ in regex
 
Except readable. :-) Now let's say that I want to make something I call brule: [some "b"] and then I say parse "aaabbb" [3 "a" any "c" brule]
 
3:15 AM
that'd be the same thing as your last statement [3 "a" any "c" some "b"] :)
 
Yup. But I did it to make a point about what's next.
parse [apple apple apple banana banana] [3 'apple some 'banana]
@BenjaminGruenbaum Without the ability to independently lay out subrules in a regex and save them in variables, they get ugly fast. Also, they only work on strings. :-P
 
Can I build a recursive descent parser with it? For (a basic) example calculating a mathematical expression like "5+3/7-15+2" ?
 
@BenjaminGruenbaum If you're interested in its formalistic limits, technically it's a TDPL. But there's lots of things to show you, and here's one little trick... remember I said the default evaluator (the one implemented in the C kernel, like parse) is called the DO dialect.
And PARSE is actually implemented in the core too...optimized C. So for instance it's doing pointer comparisons on those apple/banana symbols, not string compares. Very fast.
But there's a fun little loophole because dialects can borrow from each other. Hence parse "aaabb" [some "a" (print "matched some As") 3 "b" (print "matched three Bs")] will return false, but...
 
(sorry had to fix that, I meant to not have it match the second time.) :-)
This is where you start to see Rebol shine with its multiple series types in its toolbox (instead of Lisp's one-size-fits-all parentheses thing).
In this case, the parenthesized symbol series are used by the dialect to mean "if you manage to match the rule and get to this point, then treat the included code as DO dialect code...
So that will print "matched some As". And return false. :-)
So sky's the limit. You might ask what's possible to do if you don't use parentheses to "escape out"... and that's where you get to the TDPL stuff. You can do things you can't in RegEx, like match nested parentheses or whatever. Whenever you hit a limit or if you feel it more convenient, you can use parenthesized code.
 
3:29 AM
In javascript you can do that in RegEx (matches get callbacks), but it's extremely ugly. I don't think I've ever met a developer that liked regex.
 
Well you can take your awk and your sed and your regex and throw 'em out. This will be your new best friend.
I've barely scratched the surface.
If you've been feeling jaded about development, this will remind you of why programming...is...awesome.
But it is a weirdo time to find us scrambling about in the wake of the open sourcing. :-)
Could be fun times. But outside of the fun, it's useful especially to learn parse.
That's just practical.
The rest, well, might get your goat if you "just want to get work done"
 
There's an example math parser in a few lines years ago
 
I'm wondering how I'd use parse to solve classic recursive descent problems.Calculator for example in python or javascript would be tokenizing the input and then creating 3 functions (one for multiplication/division, one for addition/subtraction and one for numbers or parenthesis)
 
We can fix where it's lacking there--in documentation, having the right bindings--with time.
 
@GrahamChiu thanks, that's what I was looking for (in the calculator example), it just validates the expression and doesn't calculate it though
 
3:34 AM
There's got to be a calculator in parse somewhere.
@rgchris ?
Someone's written one.
 
I've got no idea about the c# question but one could do this
>> sum: 0  foreach [ name value ] remove-each [ name value] data: [ a $10 b $5 c $9 d $15 ] [ value < $9 ][ sum: sum + value ]
== $34.00
>> ?? data
data: [a $10.00 c $9.00 d $15.00]
 
Can I access what I matched in the parenthesis following the match?
 
yes, by the parse dialect word 'copy
 
@BenjaminGruenbaum This is done a couple of ways. So for instance, you can say things like parse "dogcatfish" [thru "dog" copy pet to "fish" (print pet)]
 
@GrahamChiu I was sure Rebol could do that well, I mentioned that Java currently can't :), thanks for the example
 
3:37 AM
@BenjaminGruenbaum a guess of what that prints? :-)
 
so,

digit: charset "0123456789"
parse "1+2" [ copy one some digit to end ] and now one holds "1"
 
@HostileFork How would that work here: rebol.com/docs/core23/rebolcore-15.html#section-6 ?
 
@BenjaminGruenbaum Well, let's just not jump ahead, crawl before you walk before you run. It prints "cat". Now how about this one? parse "dogcatfish" [to "dog" copy pet to "fish"].
(Just covering some basics of "capture")
 
@BenjaminGruenbaum A word of caution that if you try some things from that page with Rebol 3 you might not get the exact same behaviour. Rebol 3's parse has been significantly enhanced.
 
@HostileFork that wouldn't print anything, it'd output true though
 
3:44 AM
@BenjaminGruenbaum Actually what it prints is "dogcat". Because at each moment in the parse, there is a "parse position"...where the pointer is in the series being processed. Instructions move this parse position around based on matching or not matching rules. You get a true result if the parse position winds up at the end of the input series by the end of the processing, though it can have side effects anyway.
@BenjaminGruenbaum "to SOMETHING" is a way of telling it to go look for a match and leave the parse position right before it. "thru SOMETHING" is a way of doing that same match but leaving the parse position after it. Does the difference between the "cat" and "dogcat" outputs make sense now?
 
@HostileFork where are you telling it to 'print'?
 
Oops, left that out. :-) Sorry, my mistake. parse "dogcatfish" [to "dog" copy pet to "fish" (print pet)]
As is known about me, I drink while I chat. :-P
 
Cool, now that output makes sense
 
@BenjaminGruenbaum Just a heads up in case you didn't notice yet that parse can handle parsing of blocks (a collection of valid Rebol datatypes) or strings. There are some differences from one to the other.
 
@BenjaminGruenbaum Okay now guess the output of (hopefully I will write it correctly): parse "dogcatfish" [thru "dog" copy pet thru "fish" (print pet)]
 
3:48 AM
"catfish"?
 
You get a gold star. :-)
Okay, now that you know the idea of parse position, you need to learn something else....
How to get the current parse position into a variable, and how to change the parse position to what's in a variable.
But this continues to scrape away the illusion of how Rebol looks like a "normal" language.
If you write type? second [x: 10] it probably wouldn't surprise you all that much to get back integer, right?
The second thing in that block is an integer, it's 10.
 
that makes sense
 
But the first thing... is a set-word! (types in Rebol end in exclamation points, so I was fudging a bit by not saying integer!)
The DO dialect has a certain way in its pipeline of processing of dealing with set-words, which is just to say "okay, I just saw a set-word... so, um, I'm going to evaluate the stuff that comes after and put it in a variable in a context identified by the string name of the variable based on the binding" and that's a real mindf$^k you can wait until at least day 2 to read up on. :-)
 
 digit: charset [ #"0" - #"9" ]
digits: [ some digit ]
parse "cbm4000vic20cmb64" [ thru "m" copy pet digits (print pet ) to end ]
that's a better pet :)
 
But long story short, you can write things like do [a: b: c: 10] and wind up with a, b, and c being ten.
But this is just what DO does with set-words. How you interpret or apply them in your dialect is up...to...you.
Back to what we were talking about: "capture". The parse dialect uses set-words to capture the parse position.
@BenjaminGruenbaum parse "Hello world!" [thru "o" pos: (print index? pos)] What do you think that does?
 
3:57 AM
I'm going to guess 5 (or 4 if it's 0 based) but I'm really not sure why
 
@BenjaminGruenbaum Rebol is one based and this is controversial. There's actually a movement to change it. Not everyone things that second [a b c] needing to be b should mean that pick [a b c] 2 needs to be b.
You will find some amount of passion saying that Rebol 3 is the time to make the change to zero-based "pick".
<-- believer this is a good change.
@BenjaminGruenbaum So you're right, 5. Now I wonder if you can guess what a get-word looks like? :-)
 
@HostileFork You sure??
 
@GrahamChiu I'm just rapping here. I'm not testing. It's day one, how hard you going to make me work? :-)
 
Gone past "o" so you're at index 6
 
4:01 AM
@GrahamChiu Oh, fine, I did say thru.
 
that makes sense
 
These guys keep me in line. Anyway, a get-word is just another symbol type in your parts box. You can write things like foo: :print and then say foo "Hello" and it will print hello. :-)
That's how the DO dialect uses it. "get the thing the word points to." Instead of calling print, it fetched the print function itself.
Like, the runtime notion of the function that the word "print" is "pointing at".
So that's fun, but again remember each time you see one of these new "kinds of parts" they're just symbol types. Bricks in your box. When you make a dialect you can use them for whatever you feel like.
@BenjaminGruenbaum Also, while I'm waving my hands a little bit in saying so, you have a super powerful thing in your hands because you can round trip from strings to these symbolic structures and back again. symbols: [x: 10 print x] , string: mold symbols , print string => "[x: 10 print x]". Want to go the other way? There's LOAD to turn strings back to structure.
I don't want to talk about the part of that that I'm waving my hands about, let's just put a pin in that and say "with caveats that are only truly comprehensible once you've used it for a while".
 
LOAD sounds scary, I come from a language where you're constantly told not to convert strings back to code
 
@BenjaminGruenbaum Yeah you need to be careful with it.
But anyway, I went on a tangent when I was talking about the other side of parse positions...which is resetting the parse position.
We saw how a set-word was used to store the position into a variable. But a get-word is used in the dialect to move the position to somewhere stored in a variable.
pets: "dogcatfish"
pos: skip pets 3
parse pets [:pos thru "catfish"]
Think that'll return true or false?
I'll stop being so lazy.
 
4:13 AM
@BenjaminGruenbaum Oddly it does return false in my interpreter. I don't know why. parse pets [:pos "catfish"] works, why not thru? @GrahamChiu, bug?
 
pos: would be set to "catfish" I'm going through it, then looking to match "catfish"
 
@HostileFork bug
 
@BenjaminGruenbaum Well it should return true. I don't know why it doesn't, but someone made a mistake and there was a bug.
 
@earl most of the time reword will be used with a single escape character, since most people using it will be making their templates look like shell script stuff, which will probably either use $ or %. I'm hoping that when changed to native people might use it for more than that.
 
@HostileFork might be related to that other parse regression noted the other day
 
4:16 AM
Hey, thanks a lot for the help but I've got to go :) I learned a lot, you should make an interactive tutorial for learning the language, I'm sure it'll help
@HostileFork You can use the transcript of our conversation for it
 
@BenjaminGruenbaum We are working on it! Thanks for stopping by, please say nice things about our language because we need some more help. :-)
 
I will, thanks
 
And do come back if you can. It's super useful.
 
And thank you everyone for teaching me cool stuff
 
@BenjaminGruenbaum Our pleasure!
These trials are helping me think more about what works and what doesn't. Rebol is such a blind-men-and-the-elephant situation. "It's like a snake!" "It's like a tree!" "It's like a rope!" Just depends on if you've got the trunk or the leg or the tail.
@GrahamChiu Sigh, there needs to be more fuzz testing.
These things shouldn't be able to be checked in.
 
4:21 AM
@HostileFork what happened to the test suite?
 
@GrahamChiu It's just not particularly exhaustive. Red's test suite is way meaner. Why do you think I haven't sent the Red pull requests... we're talking THOUSANDS of edge cases.
Or corner cases. Or, bah, my terminology is out of date.
 
have to use 'end now
parse pets [:pos thru "catfish" end ]
 
bleh.
No more bug whack-a-mole. Rigorous practices.
 
I haven't even gone through a single actual application of the C++ build yet, because the last integration was a MONTH ago
Time... to... fork.
Friendly fork. :-)
 
4:30 AM
development branch?
 
5:03 AM
0
A: Is Rebol a functional language?

HostileForkYou know the answer is no, but you're asking anyway, because you don't think the existing explanations suffice...? Not the worst reason to ask a question, gives me an opportunity to yap. :-) Functional programming in its formal definition is about the idea of designing computational machines w...

Like it?
Hey @KK. check out my answer --^ :-)
 
KK.
@HostileFork Checking it out.
 
Wonder why he posted it on programmers and not stackoverflow
Maybe it's a little too "abstract"
I think it's concrete, though.
 
KK.
I think programmers has more of a programming-feel-and-enjoyment crowd, rather than the gimme-a-solution-quick crowd. As a result, I think it will have 'better' eyeballs there (in terms of people who would want to explore a new language just for the heck of it) :-)
 
@BrianH I've surrendered to func. I'm willing to compromise and let that be the version that doesn't collect words, and function is used for what "funct" was. This is what Red is doing. I'll cope. I'm willing to bury that hatchet if everyone else is.
That's my final offer!
All in favor...?
@KK. I have been on a crusade for a long time because I think func is an ugly thing.
@KK. Rebol has something which sweeps a block of a function's code looking for set-word!s and automatically makes them locals. It was called, terribly, funct
So you ask what is function used for? It was wasted on something pointless.
Red has taken my idea and made funct => function and wiped out the useless former "function". All function did was that instead of writing foo: func [x y /local z] [z: 10 return z + 1] you could write foo: function [x y] [z] [z: 10 return z + 1] and get the same thing. Ridiculous.
 
Sassenrath of Amiga OS Exec (and now Rebol) fame.
 
5:12 AM
@GrahamChiu No one knows what that distinction means.
 
@HostileFork One is the OS, the other is the Kernel
 
I know people love to go in and fix it, and we can all go in and fix the idea that Carl invented preemptive multitasking or whatever he never said he did but people think he did, but I think it's okay to say being involved with Amiga's software is how he made a name for himself back in the day.
He didn't make Amiga games, he made Amiga software that came with it when you bought it, I think AmigaOS affiliations are fine to claim.
 
@HostileFork if you want function to drop its backwards compatibility and become a synonym for funct, write up a CC wish ticket. Yourself. And it will have to be a synonym, because there is a lot of existing code that uses funct.
 
@BrianH I asked for R3/backward to get started...
I now know a stupid amount of what would need to be in it. :-(
Journey of 1,000 miles begins with a single step, why not make that our first step?
 
@HostileFork I can't start R3/Backward right now. I'm going to be busy for a couple months. But if you make a CC ticket to make function a synonym for funct, I'll support it.
 
5:19 AM
@BrianH Well there's a start. I would be thrilled. But then we've still got the matter of q ... don't think I've forgotten. :-)
I've got a big post it note with the letter q on it and it says "damn you BrianH" :-)
But for you, I say we put it in R3/backward.
I'm a generous fork.
 
@HostileFork remember, a synonym. We have years of code using funct, so that function is going to stay too. And if q needs to be moved to a module full of functions meant for people using Rebol as an interactive shell, cd and ls can join it, along with others.
 
@BrianH I don't see what's wrong with shell [cd "foo"] etc. Why so much top-level cruftiness when dialects are at your beck and call?!
Penny wise, pound foolish, as they say.
 
It can be delay-loaded, but people use Rebol as an interactive shell every day. We have to include it.
 
@BrianH If you want to use it as a shell, make a shell dialect. Flip into it and out of it. Make flipping in and out easier. Stop abusing the design because you are lazy.
 
An R3/Backward module can import that shell. It can even be a private module, to avoid polluting regular R3 with R2-compatibility.
 
5:27 AM
@BrianH Make the best shell dialect ever, and then make it easy for the REPL to go into the dialect and out of it. Don't effing have ls as a native. Have you lost your mind?
You're right about a lot of things. I have to grant it, repeatedly, but this is something where you're going to have to listen to me.
Because this is a case where it is I who am right.
 
You are really underestimating how much we intend to cut out of the default imports. And how little overhead delay-loading has. And what private modules do.
 
@BrianH That stuff will help but firing up a Rebol session and having ls in the "global namespace" is bringing the ugly in.
 
A delay-loaded module doesn't even get parsed, not even converted from a binary. If you don't import 'shell it doesn't do anything at all. And private modules don't pollute the "global namespace", even to the extent that we have one at all, they're private.
 
@BrianH I still like dialecting better, and I feel like it drives home the point and design of Rebol better
You're kind of trying to use implementation trickery to mask things instead of making it a transparent system.
I don't think you do people favors with that...
As in Fight Club "How's that working out for you, being clever?"
 
You can't use a dialect interactively without writing your own REPL, unless you implement the dialect as a set of functions. And if you don't understand that implementing a dialect as a set of functions is a perfectly valid approach then you are the one who doesn't understand Rebol.
 
5:39 AM
@BrianH I was just thinking about how a good tutorial implemented in a Rebol script would need a REPL, it has to be easy to make your own REPL, it's a solvable problem so why not solve it once?
 
Yes, good idea. But you also don't understand that even those dialects that you see in blocks are often implemented as a set of functions, or of commands if you're using something like delect. The only difference is that the dialect processor binds that block to those dialect words. ... Wait, you think that ls is native? Have you never tried source ls?
 
@BrianH Well whatever it is, I don't think that starting Rebol should make "ls" have any meaning. It's archaic and ugly. It shouldn't come out of the box.
I thought this was a Rebellion.
Maybe I'm in the wrong place.
"LS" and "CD" don't sound like the rebellion to me.
Sounds like the same ol' crap.
 
Again, you're missing the plan. Those include-all interpreters are for the maximalists who are used to R2's all-in-one approach. The real R3 will be more like /Base from the SDK. If you don't want it, don't include it. It's up to you. And even those include-all interpreters don't have to take everything out of the box, they can just leave whole categories of stuff they don't need, until they need it.
And because of delay-loaded, private modules, they don't even have to pollute a "global" namespace that doesn't even exist in R3 - didn't you read my article?
 
@BrianH Implementation details don't change what people experience.
If it walks like a duck, and quacks like a duck, it might not be a duck. But people will tend to say "hey, look. a duck."
If you have a vision of "Rebol/Legacy" which is trying to cater to people who want to get LS and CD out of the box, I guess... but I'd prefer to teach people about "Rebol/Base" where things are more literate and future proof. And when people ask me "hey where do I go download a Rebol" I'm not pointing them to the "Rebol/Legacy" page because I think that's making a mistake.
 
5:54 AM
@HostileFork I suggested to post there. It's the site to post non-coding programming questions according to SE. I think it's needless division, and so do others, but it looks like that's what they want.
 
OK. So, what you experience is that you have some interpreter called "rebol" or somesuch that you can get with your distro, whatever, and when you run it then there is no cd or ls in there, but if you need that kind of thing then you just toss a name for that whole category of stuff in your Needs header and it majically appears. But those interpreters are just for ad-hoc stuff, just for show, just apps.
The real R3 lets you make your own apps that don't have to be anything like those, and don't have to include that stuff, because all of that stuff will be optional. You won't even include it if you don't want it, not even on a delay-loaded basis. Those modules aren't like R2, they're like CPAN.
 

« first day (844 days earlier)      last day (2936 days later) »