« first day (1709 days earlier)      last day (2071 days later) » 

1:59 AM
@Adrian Hey, I saw that you asked Dr meister if he was interested in red/rebol and he said no macros no go... what did you think of that?
 
 
2 hours later…
3:46 AM
@JacobGood1 well, the macros are one thing - I'm hoping that something could/will be added to Redbol not too far down the road. He also mentioned the binding library he's using being template based; this making it really fast. I'm not sure if @HostileFork 's approach is that much slower, but this could be measured, I suppose.
I think @earl is for adding macros, but from what I've seen, others aren't really pushing for this feature.
Besides macros, I think you saw that I would also be behind making immutability a default. Nenad's reaction to the whole subject, on gitter, tells you that he views that type of feature as trying to make Red/Rebol into something else - Clojure, for example. I'm not sure why he wants to see it like that, though.
 
Immutability is one of the core concepts of Rebol, no? What are you guys trying to do of it?
Did Rebol also really needed macros, to do anything done?
 
@pekr you mean mutability, no?
 
yes, sorry ...
 
Well, my question, to either @HostileFork or Nenad, was whether there is a hard dependence in these languages on things being mutable by default.
 
You can't win the crowd, by turning Rebol/Red into the programming tool others are already using.
4
 
4:01 AM
That's not what making immutability a default would do.
 
I can bet, that even if you would add macros, those already using the macros enabled languages would not switch anyway ... they will find another reason, why they can't use the tool imo
 
@pekr, these are features that aren't specific to any one particular language anymore. They have just been shown to be very useful to have in languages.
Immutability helps with larger programs by making code easier to reason about. It also helps a lot when it comes to concurrency.
As for macros, though they are available in some non-homoiconic languages, they make languages that have this quality even more powerful.
 
AFAIK, R3 was made a bit more mutable. You can no more change the body of running function, most probably planned modules/concurrency was the reason ...
sorry, if I am technically confusing things
 
you mean immutable, here, no?
 
As for macros - any reference for me to understand? Isn't Rebol flexible enough, to allow dynamic code construction?
Yes, sorry again, my english, confusing terms ...
 
4:12 AM
Sure, treating code as data is a great thing to have, but macros are something else. I'm not sure how limiting Rebol being interpreted would be with regards to adding macros to the language, though. Doing so in Red might be easier. As for something to read wrt the benefits of macros, you can try this - letoverlambda.com - it's about Lisp, but the principle would be the same.
Just keep in mind that homoiconicity (treating code and data the same) is a different aspect of a language, so macros should not be precluded just because you have the former feature.
If you recall, Nenad mentioned wanting to add a DSL to create DSLs. Doing this by way of macros would be natural, but would be only one of the benefits.
 
 
4 hours later…
8:43 AM
@Adrian / @JacobGood1 - I'd side with @pekr here that one should be cautious about expanding the scope too much...when the basics in philosophy and mechanics (the really distinguishing features) haven't been nailed all the way for what's in the box.
Pulling my old "keep the focus" example of the Spirograph:
 
@HostileFork Why not be even safer and use Java?
 
Hm?
 
You'll only feel the pain of drudgery.
I mean if the fear is that you give the user too much power.
 
Well my argument is more "walk before you can run"
 
Spirograph limits what lines you can draw and with its constraints it can produce relatively interesting patterns - but they are quite limited in range.
Similar thinking can be applied to programming languages.
 
8:47 AM
Yes, but if you've demonstrate you cannot design an appealing normal Spirograph without laying out all the pieces so that they can snap in the box top... but rather the pieces jumble and fall all out whenever the box is not held precisely flat up...
And all your little spiropieces go flying and get lost (as the early version of Spirograph I had did; it was a hand-me-down when I was a kid and missing wheels)
 
But I'm not about to add mocros to Rebol, and Nenad doesn't seem to be in a hurry, so there's no "danger".
 
@Adrian - there's now Q&A session, which Doc will get onto in 2 weeks. You can raise the question there. Doc just wants it to be technology related, no company related questions yet - groups.google.com/forum/#!topic/red-lang/UEdGRrDr8Zg
So - macros might be a good candidate here ...
 
Then it would be cool if you could do some kind of nanotech where you can resize the pieces by dragging them physically on the board to get the size you want... and then restore them to the size they go for storage by pressing them another pleasing way...
Or make them clean themselves up and swoop back into the box, or all the crazy future ideas you would have that involve making an even better spirograph...
That's what will make you stand out.
 
@pekr I'll ask, just to have his official position "on the record".
 
That's what will make your item "timeless"
 
8:51 AM
@HostileFork and macros stop you from achieving all these crazy future ideas how?
 
But you don't help your cause very much by poking in some fingerpaint and maybe glitter just because people like those things. You're not working with your medium.
 
@HostileFork actually, "people", in general aren't calling out for macros in most languages.
 
Well I'm trying to keep the focus on "walk before you can run" and "get the unique parts down right" and then see how the other pieces fit.
 
Most people are content to not really exploit the power of a prog language - macros are typically more useful to the more advanced users.
 
I think sometimes just for organization sake it helps to keep the sets distinct and ordered. You can still make art and mix mediums.
 
8:54 AM
As I said - ppl requesting macros know most probably nothing deeply about Rebol, to value it. I talk about the concepts like ports, schemes, easy gui, parse ...
 
But, just like homoiconicity, macros really extend the power you have.
 
Adrian, honetly - do you think that adding macro capabililty, would make your friends consider starting using the language? :-)
 
@pekr are you saying that macros and any of those things are incompatible?
 
I am NOT saying we should not add such a feature. I just doubt the motives :-)
 
Rebol is supposed to be a messaging language, and if something compelling like Ren could be picked up then you message around and use the right tool for the job, instead of risking muddling your unique medium.
So yes, new features are good. But can the old ones work and be analyzed over?
 
8:56 AM
I have a quick question about the parse dialect.
Suppose I happen to have variables such as this one:
weekday-names: ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"]
And I want to use them in parse rules instead of writing out things like:
parse "Thursday" ["Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"]
 
Well, you don't probably understand, what on my mind ... difficult to express. You know, sometimes we aproach our friends, saying - hey, I know that cool programming language. And uncousciously ppl become defensive - gee, what if it is better than the one I am using? :-) So we start asking - can it do thing xy, while not giving even few minutes to study what is it about :-)
 
Rather, I want to write something like:
parse "Thursday" [x weekday-names]
Is there some word I can use in place of x here?
 
some, any?
 
@HostileFork well, what I keep hearing is that you guys somehow think that macros are incompatible with a Redbol language. Why does my wish for having macros preclude me also wanting a cleaned up base - in the way you're attempting to do it, @HostileFork?
 
@pekr By analogy with how it's used in do, I would have chosen any for the name of this word too, but it's used for something else in parse.
 
9:01 AM
@pekr in describing Rebol to a friend I probably wouldn't even mention macros. Once the language was discussed to a greater degree, and various features were understood, macros could be brought up, but IMO they should be there as a matter-of-course, in a language such as Rebol/Red. Nothing that you'd need to yell about.
 
@WiseGenius - I am not sure there is a solution for what you request ...
 
@pekr It's almost as if, once you find out how powerful Rebol is, when the question of macros comes up and the answer is no, the obvious next question is "Why not?"
It doesn't take anything away from the language.
 
@Adrian Didn't say it precludes it; just that there's a lot of stuff to get right already in design and execution. And I've been sad to see Red repeating Rebol's failure modes by attacking many similar problems in what is largely the same line of thinking about how to write it.
 
@HostileFork sure, and you're just one guy.
That's why I can understand if there's no rush on your (or Nenad's) part to add macro support. Resources are limited, at the moment.
But I still wish :-)
 
Well I think these things make for good article ideas. How might it look? What's the spec? I wish the way it came would be "here's the spec" and "here's a pathological example that won't work and that's okay" and "here's a pathological example that won't work and does anyone have ideas?"
 
9:06 AM
IIRC Doc was not fully against the idea, and as for me, I am mostly a community coordinator/evangelist,hence I can judge, how technically difficult it is to add such support
 
@WiseGenius I've at a time proposed (and implemented) the ability to call functions in PARSE such that they can have arguments, return blocks, etc. So you'd write x as a function that returned a block. However, arguments against was that it would make it hard to read the dialect.
Considerations were made for allowing a zero-arity-function only, and that would be okay. If it returned something, parse would treat it as if that would have been what's in the spot...the way variable lookup works.
Anyway, with the unconstrained version you could arguably do as you would for any code to turn the block into what you wanted. Performance would suffer if you were in a loop and had to generate the alternated list each time by calling the function.
 
@HostileFork I would have thought this particular functionality to be very common and already in parse. I've needed it many times, and each time lamented that it wasn't called any. It's only now that I decided to ask what it is called.
 
You can of course write parse "Thursday" compose [(my-interpolator weekday-names)]
With usual caveats of "composing parse rules overlaps with parentheses as code a lot, and quoting parentheses is annoying"
Anyway, that's a reason why I liked being able to write the functions. But yeah, it would be slow.
 
9:30 AM
@WiseGenius My beef with any as a word today in parse is that it doesn't jibe with the way DO uses it to mean "at least one". So you've gone teaching people that any [(1 > 2) (3 > 4)] is not a match... then tell them parse "a" [any ["b" | "c"] "a"] comes back with a match and isn't disrupted.
While dialects are going to use words in different ways, bringing the two into as much parity as possible would seem good.
 
@HostileFork I agree, but I think the way I'm describing is the way which matches do properly.
 
Sounds better to me. What would you propose to retake any?
But there are details. How would your any handle parens, blocks, etc? Without the vertical bar, it would be harder to see the associations of where rules end?
any [[some rule] (code) [other rule] (code)] could be a way you get pairing up but it would be hard to remember you were inside of an ANY where the bars aren't needed...
 
@HostileFork Unfortunately, I still can't yet think of an English word which means "0 or more times". What does some currently do in parse?
 
one or more times.
 
yes, and any is zero or more times
 
9:43 AM
@WiseGenius I think that if Rebol had some nice mixing functions in the box that could throw things in with the pipe characters, it's usually better to say something like my-rule: intersperse ["a" "b" "c"] '| and then inside the parse the my-rule is named, so it reads clearer. Doesn't hurt to give things names. It's a more general tool.
The risk of not requiring the pipes is that usual risk of breaking the flow and logic of the parse dialect in the middle somewhere so you forget what you're reading and now don't know when the paren is executed or not. It becomes a sort of specialized tool that doesn't fit the model.
 
@HostileFork If my concern was visually not remembering, I'd use a different language, since Rebol's syntax can already be difficult for human parsing with it's fixed-arity functions.
@HostileFork It doesn't seem to be a problem for any in do, though it may be an unfair comparison.
 
@WiseGenius Well if it weren't necessary for PATH! to be evaluated, then NewPath might be able to step in. parse "Thursday" ["Sunday"/"Monday"/"Tuesday"/"Wednesday"/"Thursday"/"Friday"/"Saturday"]. I give it as an example of how a dialect author might be able to use such a tool in a case like this, to give PATH! its claws back as a real dialect brick.
The idea of PATH! being able to be the tools on alternating things might rely on the "spaceable path" where I suggested optional breaks via .. for clarity so you could write it without the spaces or with them.
"lexical break" (not an expression barrier or literal unset). @MarkI points out that the mold behavior and preservation over modification is a problem for lexical break, as its a comment that might arguably have more importance than others...so losing it could be more of a problem.
 
10:02 AM
@HostileFork My problem is that I often have a block of values from elsewhere, such as weekday-names, I want to use in parse. It's only ever | that I've needed to “intersperse”. What other operators do you think would be common to want to intersperse through blocks in parse?
 
Well I've needed to intersperse often for other things.
So it's not so much that I offhand know of a lot of other things. It depends what intersperse does exactly. If I pass it a function will it call that function and put whatever comes back in there? I could imagine interspersing some paren code with something that varies a little each step.
 
@HostileFork Sounds like it could be a useful function. But then parse would also need to be able to call such functions? BTW, what does combine ["a" "b" "c"] '| result in?
 
@WiseGenius Evaluates to "abc" and then | .... as combine is single-arity when used unrefined. But you probably mean combine/with ["a" "b" "c"] '| and at the moment that give you effectively combine ["a" | "b" | "c"]. As it evaluates it will try to do bitwise OR, concluding that string is not an acceptable argument.
Using something like | for something as kind of rare as infix bitwise OR seems like a waste to me.
 
@HostileFork Yes, that's what I meant, thanks.
 
10:19 AM
I made the argument about a little bitwise math dialect that one might use that could be all kinds of smart, rather than parroting C in the main language vs. tailoring it for the structural exploration and modification of the homoiconic structure
 
So I suppose combine/with ["a" "b" "c"] "x" would be effectively the same as combine intersperse ["a" "b" "c"] "x"?
 
@WiseGenius The way COMBINE's /WITH currently works is a bit tricky and I have been thinking about it; for instance how it works with levels in the structure and if you pass it a function what that function's arguments are etc.
 
@WiseGenius - or you can create a 'parsify function, which will insert "|" into the original block ... but of course, you modify the block
 
It might be like an intersperse/deep
 
10:42 AM
Anyway, whether intersperse were to exist or not, I'm still convinced that parse "a" [any ["a" "b" "c"]] should mean parse "a" ["a" | "b" | "c"] as in do.
I still can't yet think of a good word to replace the current any, though.
I blame English.
 
11:05 AM
@WiseGenius Well you do have some precedent with things like of e.g. of [integer! string! word!] in parse project. I guess the issue would be that parens would not be allowed inside the any rule; you'd find resistance to that and likely a technical underpinning why not to do it.
 
 
3 hours later…
1:47 PM
@WiseGenius You can simulate any with opt some. I think I'd prefer of in your situation and leave any. If nothing else any implies that it doesn't have to match the following block, would prefer something more definite: parse "a" [from ["a" "b" "c"]]
Behaving consistently with do isn't an argument for how something should work in parse, two different languages.
parse "Tuesday" [of system/locale/days]
parse "Tuesday" [from system/locale/days]
parse "Tuesday" [one-of system/locale/days]
 
find?
 
@WiseGenius Find's not bad...
 
I'd certainly think about it from the angle that it's part of a reduced rule:
parse "Monday the 6th" [from day-names " the " ordinal from [st nd rd th]]
Good parse rules to my eye begin to resemble a very literate description of grammar its trying to match. The above seems to fit with that. find? is a little too DO-ish:
parse "Monday the 6th" [find? day-names " the " ordinal find? [st nd rd th]]
Yeah, probably misused 'ordinal' here, it's early in the day for me :P
 
2:39 PM
@rgchris Guess that makes sense...
 
3:00 PM
@WiseGenius - btw - have you seen the Parse project document, which apart from short theory introduction, brought many enhancements for R3 parse? rebol.net/wiki/Parse_Project
I am glad we got to/thru multiple options, yet | is still used as OR
how would you distinguish an alternative option then?
I like 'from
You could even use: 1 3 from day-names, or some from day-names, etc.
 
@pekr Sorry, GTG. TTYL.
 
 
1 hour later…
4:20 PM
0
Q: parse html with single or double quotes

LuisWhen using the parse dialect, how to parse tags that have properties enclosed by ' or '"`, as in: thru <h2 class="txt-medium txt-bold"> thru <h2 class='txt-medium txt-bold'> One way was to do: thru {<h2 class=} thru {txt-medium txt-bold} thru ">" Tried to use the | or operator but with no ...

 
@rgchris I use their prefixes to distinguish them: ordinals are for ordering, as in 1st, 2nd, 3rd, and cardinals are not, as in there are 52 cards but there is no 52nd card.
In your example, either one applies, you are using them both :)
 
5:17 PM
0
A: parse html with single or double quotes

rebolekYes, you can use | operator, but defining a charset is better in this case: delimiter: charset [#"^"" #"'"] single: {<h2 class='txt-medium txt-bold'>} double: {<h2 class="txt-medium txt-bold">} >> parse single [thru "class=" delimiter copy values to delimiter thru ">"] values == "txt-medium txt...

 
 
3 hours later…
8:46 PM
@MarkI Hm, C99 barrier for the Atronix'd core build... libffi and the RSA encryption code use alloca().
Anyway, progress made after a bit of not progress.
Doing a bit less disruptive plan on how to apply the changes. Gets a little more organized each time and with less by-products of thought detours.
 
@pekr Liking FROM even better now :)
 
9:36 PM
So, 'from is just kind of 'find, right?
 
Do you mean the way it works?
It's just shorthand for:
>> remove collect [foreach day system/locale/days [keep '| keep day]]
 
; Brought to you by: try.rebol.nl
== [
    "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday"
]
 
I don't see it as analogous to find. Unless find took a block argument: find/match/tail "Monday the 6th" system/locale/days
 
Well, the idea of Wisegenius was, to not modify the original block at all, so simply - allow block values as being a submission of variants ...
hmm, need to study collect now, looks cool ...
 
10:09 PM
@pekr Right—that's the equivalent.
@pekr COLLECT is an essential—can't believe it didn't exist since forever.
 
10:47 PM
lots o macro talk goin on...
I really like the rebol language do not get me wrong, but I keep hearing things like this...

From the user group:

You mean, besides having all the power of Lisp or Scheme while still
being accessible to mere mortals? ;)

Which is patently false. I do not care to correct this because I do not want to make rebol look bad or the poster. The fact is rebol/red will remain 1 step below any dialect of lisp, power wise, as long as it lacks macros.
scheme is a dialect of lisp btw so saying lisp or scheme is wrong they are both lisp
 
11:47 PM
Should IF respond to an ERROR! as if it were true?
>> if make error! "Bite Me!" [print "All Smiles!"]
 
; Brought to you by: try.rebol.nl
All Smiles!
 
@JacobGood1 What might a macro look like in Rebol?
 
not sure, doc can figure that out(i hope) =)
I think the only way it would happen is if there was some sort of compiler plugin
 
So it's not something you could build in Rebol?
 
it is not something I can build, that is correct. The only way I would build such a thing is to create a tiny lisp that sits atop rebol/red
I do not know how to make macros with such a free form syntax or really any other syntax other than the s expression syntax
I am not saying that it cannot be done, I guess it is possible
but my route would be a lisp that symbiotically exists with rebol
 
11:56 PM
There is Macro expansion in the PowerMezz bundle, but I'm not sure how it works, how similar it is or what you'd use it for. And it's undocumented :)
 
well that helps lol
macro can mean a lot of things to a lot of people as well
 
Need to ask Gabriele, but I think he's only lives in AltMe.
 

« first day (1709 days earlier)      last day (2071 days later) »