« first day (1664 days earlier)      last day (2116 days later) » 
00:00 - 19:0019:00 - 00:00

12:08 AM
@OMGtechy Rebol/Red values...which can be put into blocks...are "boxed" cells. They are 16 bytes on 32-bit platforms, and 32 bytes on 64-bit platforms (Red has no 64-bit version at this time). So you can put four pointer-sized things in each cell.
The first pointer-sized thing is used as a header to tell you what type the thing is, and some other flags and information. The remaining three pointer-sized things are used in a way that is type dependent.
Integers are 64-bit (on both 32-bit and 64-bit platforms), and that can be fit in the cell quite easily.
Arbitrary-sized things cannot fit in finite space, clearly. So one of the pointer-sized items is used as an actual pointer to a data block, then there is an index of where the offset that value refers to is.
Hence when you pass a series value to a function, even though you are getting it by value...that value contains the pointer to the same data the caller had.
You can change the index and not affect the index of the caller's value. But if you change the series data somehow it will affect what the caller sees upon return.
In other words: everything is passed by value, but values that need to point to arbitrary-sized data that won't fit in a single cell contain a pointer so you effectively get a reference.
It's all rather simple. Except the part where it isn't. Which mostly has to do with a lacking formal model of how to deal with moving the index past the end or beginning of a series, and how it reacts to that.
Or the counter: moving the data out from under a series so the index goes bad. Basically, kind of the problem with iterators in general. In other words, Rebol/Red only has iterators to refer to its "series collections"; you never talk about the collection's data independently.
 
 
1 hour later…
1:33 AM
@OMGtechy You couldn't have picked a tougher introduction to reduce, for which you deserve ... congratulations!
The problem is that you are actually not reducing the block enough.
You are picking the value out of your data word, but unfortunately your count word (which doesn't need to be a set-word, by the way) is not reduced and hence it is, as you so sagely noted, the same ol' count word every time.
Let RebolBot and I walk you through it (wish me luck!):
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [?? current] [append map reduce [data [count: 1]]]] res
Oops. Need more luck ...
@rebolBot delete
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [?? current] [append map reduce [data [count: 1]]]] map
 
; Brought to you by: try.rebol.nl
current: [count: 1]
current: [count: 1]
current: [count: 1]
current: [count: 1]
== [1 [count: 1] 2 [count: 1] 3 [count: 1] 4 [count: 1]]
 
There. As you can see, the result of your select puts a block into the data word.
That block is the same [count: 1] block that is inside the [data [count: 1]] block.
So if I add 1 to it, it will add 1 to all of them:
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [?? current] [append map reduce [data [count: 1]]]] map/2/count: map/2/count + 1 map
 
; Brought to you by: try.rebol.nl
current: [count: 1]
current: [count: 1]
current: [count: 1]
current: [count: 1]
== [1 [count: 2] 2 [count: 2] 3 [count: 2] 4 [count: 2]]
 
See? I only added one 1 at the end, after map was all built.
Reducing again, so double reducing, is one way to solve this "problem". (Hint: there are others!):
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [?? current] [append map reduce reduce [data [count: 1]]]] map/2/count: map/2/count + 1
Oops again, forgot the final printout of map.
@RebolBot delete
And, I forget how to double reduce apparently. So let's just do it the best way, which is to copy the block you are appending:
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [?? current] [append map reduce copy/deep [data [count: 1]]]] map/2/count: map/2/count + 1 map
 
; Brought to you by: try.rebol.nl
current: [count: 1]
current: [count: 1]
current: [count: 1]
current: [count: 1]
== [1 [count: 2] 2 [count: 1] 3 [count: 1] 4 [count: 1]]
 
1:45 AM
There. Now you see that only the count that I set at the end has been incremented to 2.
And now we can write a complete version that works (hopefully):
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [current/count: current/count + 1] [append map reduce copy/deep [data [count: 1]]]] map
 
; Brought to you by: try.rebol.nl
== [1 [count: 3] 2 [count: 3] 3 [count: 1] 4 [count: 1]]
 
I know (a) I have done a terrible job of demonstrating this, (b) you are most likely even more confused now, and finally (c) I wish I could explain it better.
On the bright side, you will probably not ever come back here, so I have only been preaching to the choir this whole time and they are always very forgiving :)
 
@MarkI Wait until they don't come back to say they won't come back :-)
 
@HostileFork I only said probably won't :)
 
I'm back to working after taking a couple days of... I dunno. Not really working.
 
1:52 AM
But I mean really, talk about how bad can your first experience with a language be!
Block literals, reducing, and deep copying, all in one tiny [count: 1] wrapper ...
 
And this terminator standardization thing needs to happen
 
@HostileFork He seemed to be doing fine with good ol' carriage return.
 
I mean the zero bytes sequence on series termination thing.
I'm doing another pointer-sized series for the GC queue
 
@HostileFork Right, terminator, not separator, my bad. And yes, that does need to happen.
 
@ShixinZeng said he thinks allocating a series of size N should make N + 1 elements and then it's handled under the hood.
 
1:56 AM
@HostileFork Works for me. I always wanted malloc(strlen(zot)) to do that for me ...
 
It seems that all hell is allowed to break loose specifically due the fear that if you write a terminator at the alloc step in the first slot, you might then put another data item there if you were doing something complicated... hence write and then writing again...
First of all, I think there are worse things that could happen than writing a terminator sequence and then overwriting it.
 
@HostileFork Agreed, sounds very micro-optimizy (TM).
 
But secondly, even that can be handled with some kind of macro where most code calls the terminating form, but if you're sure then you can use the raw version.
However, the raw version should account for the space even if it doesn't put the terminator in
 
@HostileFork Bingo. That's the thought I had when I wondered about packing images into a movie, series of a series.
 
e.g. there are no zero-element allocs.
 
1:58 AM
@HostileFork Double bingo. Star bingo!
 
Heh.
Anyway, I've got things to a point where this shouldn't be too hard to do
And we've already discussed the whole LEN problem
Which is somehow series->tail all over
And LEN has the terminator, noooo
The series terminator: "I'll be block!."
Jeez, YouTube is doing 60fps now? That's... excessive.
Who exactly can meaningfully perceive interframes above 30?
YouTube is now targeting aliens or some obscure rain forest insect, I guess.
 
>> map: [] foreach data [1 1 2 1 2 2 3 4] [either current: select map data [current/count: current/count + 1] [append map reduce [data reduce [to set-word! 'count 1]]]] map
 
; Brought to you by: try.rebol.nl
== [1 [count: 3] 2 [count: 3] 3 [count: 1] 4 [count: 1]]
 
So I remembered how to double reduce, yippee! But that one would have been even worse to demonstrate ... or explain :(
 
@MarkI Hm, I wonder if there should be a version of REDUCE that keeps reducing until there's no change... REDUCE/FULL
 
2:10 AM
@HostileFork IIRC Rebol 1 had that. Everybody hated it -- but only after trying it!
@HostileFork Is it just me or does hipster dog's beer fridge say "IMLOVING" on it?
 
@MarkI Would you mind doing me a favor and taking a little time out to write up your thoughts on source formatting and practices? Anything that you believe is important. People go on about a lot of stuff, debating even --i vs i-- when all things are equal (and in C++ it actually does matter--different overloads with different implementations.
231
Q: Is there a performance difference between i++ and ++i in C?

Mark HarrisonIs there a performance difference between i++ and ++i if the resulting value is not used?

I'm just curious if we can map out what people think is good or bad currently.
It would be enough to just pick a few Rebol functions or structs and document what they do right or wrong in your opinion
 
2:28 AM
@HostileFork I have deliberately forced myself to stay out of discussions which border too closely on "religious wars", and almost all such right vs. wrong opinions are either trivial or religious.
That said, I will continue to complain about egregious violations, and, as I have been all the way through, to share my agreement with your opinions when they are right :)
 
@MarkI I am a person who--in theory--could admit his mistakes.
(if I made any...)
 
If we wanted to collaborate on a book of "Rebol Source Code Formatting Decisions", well, that might be fun.
I'd want more dedication and peer review than is rightly expectable at the moment though.
 
@MarkI I was thinking less "book" and more "short file in markdown explaining some basic rules".
 
2:58 AM
@MarkI Oh, also, I am in favor of getting rid of unsigned integer usage for things like size and such. Your vote on that?
 
@HostileFork Really? size_t is traditionally unsigned, I would have thought you bought into that.
 
@MarkI The committee came back and said it was a mistake.
 
@HostileFork Did they provide reasoning?
 
May 12 at 6:57, by HostileFork
@earl On signed indices: http://www.youtube.com/watch?v=Puio5dly9N8
May 12 at 6:59, by HostileFork
Bjarne Stroustrup: "one of the sad things about the standard library is that the indices are unsigned whereas array indices are signed and you are sort of doomed to have confusion and problems for that."

Herb Sutter: "Yes, it is unfortunately a mistake in the standard library that we use unsigned indices."

Audience Member: "...it is difficult not to use unsigned integers as the STL does use it for indices, sizes, etc."

Herb Sutter: "They are wrong...."

Chandler Carruth: "We are sorry..."

Herb Sutter: "As Scott would say, we were young."
 
@HostileFork I remember you posting that, but that's for indices, not sizes ...
 
3:03 AM
29
Q: Why is size_t unsigned?

JonBjarne Stroustrup wrote in The C++ Programming Language: The unsigned integer types are ideal for uses that treat storage as a bit array. Using an unsigned instead of an int to gain one more bit to represent positive integers is almost never a good idea. Attempts to ensure that some val...

If Rebol was going to go standard somehow and actually use size_t, I'd say so it goes and you can't second guess it now
But it's trying to define its own size type, so that means it's a chance to not do it. "in modern programming, adopting unsigned types for numbers has severe disadvantages and no advantages"
I've changed my opinion on this over time. I used to think that it was really important--for documentation purposes if nothing else--to mark things that shouldn't be negative as unsigned.
But experience taught me eventually that it's... bad.
It would be different if there were "teeth" of some kind and your values would throw exceptions on underflow or whatever. But that's not how it works. So you get bad behavior, mask bugs, and it just mucks things up.
Believe-you-me, I wish it weren't this way. It just is.
 
As I've said before, making chars signed is fine by me. Same goes for sizes and bitflags. Maybe that means we don't ever need unsigned.
I guess we've officially abandoned all 16-bit platforms by now.
 
I don't think it's a matter of there being no potential for an advantage...just that C and C++ don't do it in any meaningful way that gives that advantage.
@MarkI I think that's official, yes.
And I think if you do run on a 16-bit platform, you're doing something embedded and if your sizes wind up being 15-bit then you're already probably making a lot of compromises.
Least of your worries, probably.
 
And nobody uses 8-bit microcontrollers any more, not when they can cram Slackware on a stick.
But I think that's the problem.
 
@MarkI Well we're not suggesting putting slackware on a stick here. We're saying make your string limits a bit shorter if you're the first to run on 16-bit.
Also, Slackware is still around?
 
@HostileFork Bloatware bought them out.
 
3:17 AM
Did you see the weird "Amiga" running Linux Mint?
 
Sorry HF, got to Zzzzzzzzzzz
 
 
11 hours later…
2:45 PM
posted on May 22, 2015 by Steven White

I was cleaning out my desk and came across a printout of an email from Carl explaining how threads are evil and 'messaging' is the way to go.  REBOL is advertised as a 'messaging language.'  But I don't understand how one actually would DO 'messaging.'  I assume it refers to small applications communicating with one another.  But how is that done? &n

 
@HostileFork Yes you did. And you already mentioned your encounter if I'm not mistaken :)
 
@Morwenn Well, it's one of the risks of talking to old people. They repeat themselves.
 
3:18 PM
@HostileFork I already repeat myself at 23 years old. That's because I tend to talk to face-to-face to many different people. So I easily forget who I talked to about some things.
 
@Morwenn so I'm using Address Sanitizer now to see what happens, also because I've got some too-big-to-valgrind cases. And it's finding some different memory errors that valgrind didn't make happen.
 
@HostileFork I heard that it's a great tool, less expensive than Valgrind, but I didn't get to use it since it does not work with MinGW (yet?).
 
@Morwenn From my "I am trying it just now" experience, it is a bit harder to configure. You link it in and then control it with environment variables, but I'm getting weird stuff. Allocation failures, or it just saying "Killed" and then dropping out to the command prompt.
But seems worth it to persevere and figure out.
 
3:38 PM
Hello everyone! I just discovered Red/REBOL and am intrigued by some of the basic ideas. I thought I would introduce myself to chat (as the FAQ so helpfully mentions I should) while I'm poking around some of the beginning documentation for REBOL. (I'd like to be able to start reading some of the code for Red)
2
 
Hello @Freezerburn! Great to hear you like Rebol! If you have any questions, feel free to ask, or you can try our good pal @RebolBot to see how things work.
 
@rebolek Will do! And how do I interact with @RebolBot?
 
@Freezerburn Just type**>>** and some Rebol code
>> 1 + 1
 
; Brought to you by: try.rebol.nl
== 2
 
>> now/time
 
3:44 PM
; Brought to you by: try.rebol.nl
== 17:44:57
 
@rebolek A ha, cool. I'll keep it in mind. For now I just need to start wrapping my head around the basic language though. Do you know any resources other than the official REBOL website for learning about the language? (anything assuming knowledge of general programming concepts is definitely acceptable, including message passing since I've had experience with Obj-C, and it looks like REBOL/Red are message passing languages?)
 
@Freezerburn This is an excellent tutorial re-bol.com/rebol.html but there are links to other tutorials.
 
@rebolek Awesome, thanks!
 
@Freezerburn You're welcome. And if the tutorials are not enough, just ask. There's always someone willing to help.
 
4:00 PM
@HostileFork Did you also try the undefined behaviour sanitizer?
It seems really easy to use and catches easy to fix errors.
 
@Morwenn Hadn't seen that... looking
 
It could be interesting to plug it in the debug builds.
 
@Freezerburn In my completely unbiased opinion, I think there are some good articles on this site
 
@HostileFork Completely unbiased opinions? The best kind! I'll be sure to take a look, thanks :)
 
@HostileFork The guy likes you, he used your avatar.
 
4:08 PM
So as someone who has just started looking into REBOL/Red, and as someone who is highly interested in developing video games, how suitable are these languages for working on that kind of thing? In your completely unbiased opinions, of course :) (that's not the only thing I'm interested in as a programmer, but it's definitely a large area of focus for how I evaluate languages)
 
@Freezerburn Rebol is an interpreted language which--like most interpreted languages--has to delegate to some large amount of C/C++ extensions to get decent performance. Such work was never a focus, outside of standard GUI stuff (Think TCL/Tk)
Red is a different take. I'd say that in the case of both languages, the way to look at it is that everyone joining in is part of the design. It's early yet.
 
@HostileFork @Freezerburn I heard that Machinarium was written in Rebol. Did I hear incorrectly?
 
@MarkI I thought it was built in Flash?
 
flash code generated by rebol
 
@Freezerburn Machinarium runs on Flash, the way that Rebol runs on X86/ARM/etc. The source for it was a Rebol dialect that was compiled to Flash.
I think they used some other method for the iPad release, or something like that
But a nice thing about Rebol is that it's pretty easy to process and stay agile with what you've got.
It is its own "parsing API".
 
4:16 PM
@HostileFork That's actually pretty awesome. Never heard that before. I just assumed it was like Binding of Isaac and was written in pure Flash
 
@Freezerburn The guy who did it (the code part, not graphics) stops by here sometimes.
 
@HostileFork Sweet. Would love to be able to say hi. Outside the norm tech for games is definitely an interest of mine (even if I do spend a lot of my time writing code that will theoretically be used for a game in Java...)
I keep trying to pick up things like LISP of Haskell for making games though, even if I never get far
 
@Freezerburn Heh...well Elm is pretty cool, which you've presumably seen...
 
@HostileFork Definitely seen, never picked up to this point. Not sure why... I think I was on a kick of "I must program in pure Haskell and compile to Javascript instead of use Elm" at the time I was considering using it
 
@Freezerburn If you haven't already watched through "What is Red" the video, I'd say that's a good place to understand some of its mission and hybridization: red-lang.org/p/contributions.html
So it's going to be rather different; a paradigm-neutral compiled/JIT/interpreted bit that can embed C-like code as well.
 
4:21 PM
@HostileFork Have not yet. Seen it mentioned in almost everything to do with Red. I really like some of the basic ideas behind what you want to do with the text FAQs/timeline though
@HostileFork Sounds rather like the dialect of LISP that was used to make Crash Bandicoot
 
Game Oriented Assembly Lisp (or GOAL) is a video game programming language developed by Andy Gavin and the Jak and Daxter team at Naughty Dog. It was written using Allegro Common Lisp and used in the development of the entire Jak and Daxter series of games. Syntactically GOAL resembles Scheme, though with many idiosyncratic features such as classes, inheritance, and virtual functions. GOAL encourages an imperative programming style: programs tend to consist of a sequence of events to be executed rather than the functional programming style of functions to be evaluated recursively. This is a diversion...
Hm, hadn't heard of it.
 
Never mind what I just said, it does mention PS1 for GOOL. Derp
 
4:34 PM
@Morwenn Wow, it seems to build WAY slow with undefined behavior sanitizer on. (?)
 
5:02 PM
@Freezerburn I'm pretty new to it too, welcome to the club!
 
@OMGtechy The aforementioned machinarium, if you've never seen it. Good game: machinarium.net
 
I have, but thank you :D
I am just reading your comments about boxed values and what @MarkI said about reduce
@MarkI :D :D :D
I understand now, thanks :)
yours and @HostileFork 's explanation did a d-d-d-d-double kill on the issue
 
@OMGtechy Note also that series have a protection status...
 
@RebolBot
stuff: [a b c d]
protect stuff
append stuff 'e
 
5:13 PM
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-protected.html
    *** ERROR
** Script error: protected value or series - cannot modify
** Where: append
** Near: append stuff 'e
 
so they're immutable?
 
That protection is carried on the underlying arbitrary-sized data, although you can also protect a word itself...
@RebolBot
stuff: [a b c d]
protect stuff
stuff: [e f g h]
append stuff 'i
 
; Brought to you by: try.rebol.nl
== [e f g h i]
 
@RebolBot
stuff: [a b c d]
protect 'stuff
stuff: [e f g h]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-locked-word.html
    *** ERROR
** Script error: protected variable - cannot modify: stuff:
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
5:15 PM
@OMGtechy Hopefully that makes the difference clear.
 
it does thanks :)
much like immutable strings in other languages
I can't mutate the string but I can make another and chance the variable to refer to the new one
whilst in the latter I can't do that either
 
And here you can protect a word yet have it refer to mutable data...
 
nice to have the choice
 
@RebolBot
stuff: [a b c d]
protect 'stuff
append stuff 'e
 
so, I have my first rebol program up and running now :D
 
5:17 PM
; Brought to you by: try.rebol.nl
== [a b c d e]
 
@OMGtechy Cool :-) Best of all is when people write blogs about, we have a running lack of people writing such things. A few sometimes when people pick it up: rebol-land.blogspot.com/2013/03/…
 
@RebolBot
; normally this would refer to a file,
; but I didn't want to upset the bot too much...
; source: read %encode.rebol
source: [1 7 6 8 2 0 49 969 38 81 8 8 43 3 1 3 32 2 3 3 5 2 2 2 4 4]

map: []
foreach data source [
	either current: select map data [
		current/count: current/count + 1
	][
		append map reduce copy/deep [data [count: 1]]
	]
]

probe map
 
; Brought to you by: try.rebol.nl
[1 [count: 2] 7 [count: 1] 6 [count: 1] 8 [count: 3] 2 [count: 5] 0 [count: 1] 49 [count: 1] 969 [count: 1] 38 [count: 1] 81 [count: 1] 43 [count: 1] 3 [count: 4] 32 [count: 1] 5 [count: 1] 4 [count: 2]]
== [1 [count: 2] 7 [count: 1] 6 [count: 1] 8 [count: 3] 2 [count: 5] 0 [count: 1] 49 [count: 1] 969 [count: 1] 38 [count: 1] 81 [count: 1] 43 [count: 1] 3 [count: 4] 32 [count: 1] 5 [count: 1] 4 [count: 2]]
 
damn formatting
 
@OMGtechy If you edit there's an option to push "fixed font" over on the right (a third button next to send and upload... only shows up on multiline messsages)
 
5:19 PM
@HostileFork I probably will write about it :) I write programming shizzle on my blog sometimes
@HostileFork ah yeah forgot about that. You can also control + k IIRC
yeah control k works
 
If RebolBot ever gives you double output or something, you can say @RebolBot delete and it will delete the result from your last request (or edited-request). Or you can reply to the specific message with reply arrow and say just delete.
 
@RebolBot delete
probs too late
 
(assuming it can. Has to be in the 2 minutes)
 
@RebolBot delete
wahey, ty :)
I have been telling folks at work about rebol too
#freeadvertisment
 
@OMGtechy The best kind.
 
5:23 PM
~700 software engineers / hardware engineers
I am doing a talk there on image encoding soon
if I end up liking rebol I could do one on rebol
 
So FWIW, there actually is a ++ in Rebol. Prefix only. As it so happens I've re-engineered it so we could have both if we wanted. Open season for experimentation coming up :-) But it could be confusing if you see a ++ b...which wins?
@RebolBot
x: 10
++ x
print x
 
I personally think ++ shouldn't exist
 
; Brought to you by: try.rebol.nl
11
 
I think a word would be better. increment x or something.
Long word though.
 
I just think whatever += 1 or whatever: whatever + 1 in the case of rebol
 
5:26 PM
Well the question is about repeating the name twice, and in the interpreted evaluator case there's a question of efficiency
 
well some kind of += equivalent like +: would do the trick
 
You wind up dealing with quoting, as ++ must do. Because it needs the name. You can't pass ++ the evaluative result of x, because that's an integer. To change x you need its word or path
>> source ++
 
; Brought to you by: try.rebol.nl
++: make native! [[
    {Increment an integer or series index. Return its prior value.}
    'word [word!] "Integer or series variable"
]]
 
(Revealing a defect above of the absence of PATH! as legal.)
There are a few of those that need to be stamped out. ++ isn't used much, so it has probably been a longstanding oversight.
@OMGtechy Anyway, there is a native MAP! type which was added in Rebol3 and now in Red, and it with any luck some of the missing design questions for MAP! will be sorted out. I think a MAP! should consist of PAIR! items, and that PAIR! be generalized better... but worrying about it is not something I'm focusing on just yet.
 
I'm looking at sort and wonder, what if I want to use two refinements? Specifically I want /compare and /skip, but need to provide args for both. How do I do that?
 
5:34 PM
@OMGtechy If refinements take arguments, then they will add their arguments in the order the refinements are used.
 
ah thanks
 
@RebolBot
foo: function [x /ref-a a /ref-b b] [
    print [{x is} x {and a is} a {and b is} b]
]
foo/ref-a/ref-b "Hello" "Rebol" "World"
foo/ref-b/ref-a "Hello" "Rebol" "World"
 
; Brought to you by: try.rebol.nl
x is Hello and a is Rebol and b is World
x is Hello and a is World and b is Rebol
 
@OMGtechy Something to note in general if one starts finding refinements getting out of hand, or used in too many combinations, that you are probably making the mistake of doing with refinements what you should do by passing a block in that's a dialect.
Another general premise is that you do not want to add refinements that are mutually exclusive if you can avoid it.
 
noted :)
 
5:39 PM
And I will of course give the necessary reminder, that if you find yourself writing a lot of code that looks sort of like C or Python or Ruby you're probably doing it wrong. I think coding in Rebol at the low level is something that is neither here nor there. Rather the evaluator has its weird shape and properties to get you bootstrapped out of coding at the refinement/append/back/reduce level ASAP.
It's just the funny thing that Rebol can dress up like a somewhat boring imperative language that makes it so bizarre.
 
Yeah first step for me is to get something working, then after that "rebolize" it by peer review
 
@RebolBot
a: b: c: 10
print [a b c]
 
; Brought to you by: try.rebol.nl
10 10 10
 
People might see that and go "Oh, hey, so it's like there's a multiple assignment syntax..." Not particularly.
 
well it's easiest to think of something new in terms of something old, so until the new becomes old that's probably how people are going to think
 
5:43 PM
@RebolBot
a: 10

either a < b: 20 [print [a b]] [unset 'b]
either a < c: 5 [print [a c]] [unset 'c]

unless value? 'b [print "b has no value"]
unless value? 'c [print "c has no value"]
@RebolBot delete
 
; Brought to you by: try.rebol.nl
10 20
c has no value
 
Anyway, a lot in the toolbox for writing some pretty twisted code.
 
so now I'm trying to sort my data
28 mins ago, by RebolBot
; Brought to you by: http://try.rebol.nl
[1 [count: 2] 7 [count: 1] 6 [count: 1] 8 [count: 3] 2 [count: 5] 0 [count: 1] 49 [count: 1] 969 [count: 1] 38 [count: 1] 81 [count: 1] 43 [count: 1] 3 [count: 4] 32 [count: 1] 5 [count: 1] 4 [count: 2]]
== [1 [count: 2] 7 [count: 1] 6 [count: 1] 8 [count: 3] 2 [count: 5] 0 [count: 1] 49 [count: 1] 969 [count: 1] 38 [count: 1] 81 [count: 1] 43 [count: 1] 3 [count: 4] 32 [count: 1] 5 [count: 1] 4 [count: 2]]
I can sort it my the first values in each "pair" easily, by using sort, how would I use count to sort it?
 print sort/skip/compare map 2 func [a b] [
	a/count < b/count
]
I tried that
but it's only passing the ints as args so it doesn't work
 
@OMGtechy Good guess. Hm, let me look.
 
thanks :)
 
5:52 PM
@OMGtechy Of course, it skips two arguments, but compares by first.
 
indeed, I am close but still can't find my cigar...
 
@rebolek Would seem it should give you a series position so you can see both values
 
if that's the case I think I know what I need to do
 
@HostileFork No need for that, you have /compare refinement that lets you specify which argument you want to compare.
 
@OMGtechy Use /ALL
 
5:54 PM
I take it the args to my function should change?
i.e. the map and the series positions
 
@OMGtechy They'll be series positions then, not the first value
So you will need to compare a/2/count and b/2/count. a/1 and b/1 will be your data values.
 
ahhh gotcha thanks :)
 
6:09 PM
still not working >.<
 
@RebolBot
map: [1 [count: 2] 7 [count: 1] 6 [count: 100]]
probe sort/skip/compare/all map 2 func [a b] [
	  a/2/count < b/2/count
]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-bad-path-type.html
    *** ERROR
** Script error: path a/2/count is not valid for integer! type
** Where: -apply- sort
** Near: a/2/count < b/2/count
 
yeah I've been toying around with it and got this info
 
@redbot
map: [1 [count: 2] 7 [count: 1] 6 [count: 100]]
probe sort/skip/compare/all map 2 func [a b] [
	  a/2/count < b/2/count
]
 
; Brought to you by: try.rebol.nl
[7 [count: 1] 1 [count: 2] 6 [count: 100]]
== [7 [count: 1] 1 [count: 2] 6 [count: 100]]
 
6:11 PM
@OMGtechy Random thing wrong in Rebol. Fixable.
 
; normally this would refer to a file,
; but I didn't want to upset the bot too much...
; source: read %encode.rebol
source: [1 1 1 1 2 2 2 3 3 3 3 3]

map: []
foreach data source [
	either current: select map data [
		current/count: current/count + 1
	][
		append map reduce copy/deep [data [count: 1]]
	]
]

print ""
sort/skip/compare/all map 2 func [a b] [
	print map
	print ["indices" a b]
	print ["a" map/:a]
	print ["b" map/:b]
	print ""
	a < b ; just there because this is suppose to sort things and needs some kind of boolean output ...
seems it doesn't like moi
 
@redbot delete
@OMGtechy I think it just steps out now and again to talk to some robofriends.
 
aha
@RebolBot help
 
I respond to these commands
Note: [] means optional input or shows expected datatype, (|) means choice:
(do|do/2|do/red|do/boron|do/echo) expression "evaluates Rebol/Rebol-like expression in a sandboxed interpreter. echo repeats exact command sent to r3"
(hi|hello|goodnight|goodbye|bye|[good][night|morning|afternoon|evening]) some-text "returns a greeting to the user who greeted bot"
cc id "retrieves curecode data"
delete [ loud ] "in reply to a bot message will delete if in time"
do/ideone which-lang [word! string! integer!] expression "evaluates a source expression for the specified langu
 
6:15 PM
@OMGtechy Can you elaborate on that?
 
@RebolBot delete
@RebolBot delete
 
@OMGtechy Well if you noticed my counter example with Red, it just seems /ALL is not properly implemented in Rebol. So no, you may not be able to do it the way you want to.
 
damn
 
(in Rebol, right this minute, although that's the kind of thing I'm up for fixing shortly.)
 
I'll have to write sort myself it seems
 
6:17 PM
"The ALL refinement will force the entire record to be passed to the compare function. This is useful if you need to compare one or more fields of a record while also doing a skip operation."
@RebolBot do/2
map: [1 [count: 2] 7 [count: 1] 6 [count: 100]]
probe sort/skip/compare/all map 2 func [a b] [
	  probe a probe b false
]
@RebolBot delete
 
; Brought to you by: try.rebol.nl
[7 [count: 1]]
[6 [count: 100]]
[1 [count: 2]]
[7 [count: 1]]
[6 [count: 100]]
[7 [count: 1]]
[7 [count: 1] 6 [count: 100] 1 [count: 2]]
== [7 [count: 1] 6 [count: 100] 1 [count: 2]]
 
@RebolBot do/2
a: [7 [count: 1]]
print select a/2 'count
@RebolBot delete
 
; Brought to you by: try.rebol.nl
none
 
Well it looks like a piece of functionality that wasn't properly carried over to Rebol3 from Rebol2, but I don't feel like futzing with Rebol2 any more than that for the investigation. :-) Looks like Red got it right, and Rebol just needs to be patched.
 
and yet rebol3 is being used in production o_o
man forskip is rather counter intuitive
 
6:26 PM
@OMGtechy I've given those things a pretty good going over
 
@OMGtechy Thanks for coming back!
 
@HostileFork just not in the latest public builds yet?
@MarkI pleasure :D
well at least this isn't how it's meant to be
otherwise I'd be like byeee rebol
my partner just called me a stupid fat hobbit and pretended to be golum. I love her.
 
@OMGtechy I definitely obsess a lot more about coherence and making everything fit together. To some people there is a "who cares about the names"...and many of the people who follow Rebol aren't native English speakers anyway
 
well the way forskip makes you refer to the current loop variable is just plain silly
 
@OMGtechy The thing I don't like about some of these is that there was an attempt to come up with a meaningful name for the variants where you care about the words in the body vs. when you don't. That's a hard naming discernment.
If they would just take a literal NONE in that slot, you wouldn't have to try and make up these fake names.
loop x 10 [print x] could do what you'd expect, while loop # 10 [print "no loop variable"] would just forego binding a name into the body
 
6:34 PM
just looping through my data structure is becoming a problem, it's silly
I'm sure it'll look totally different once I've rebolised it
but I should be able to do it like this if I want
 
Well what you really should be using is a proper MAP!, however it's a fine learning exercise to do it as you're doing it.
And MAP! is just getting its real scrutiny on working; which it has never had.
 
well I didn't know about map :P but yeah I think it's good for me to do things the hard way at first to learn
 
Bear in mind that the process of developing and giving feedback on the Rebol artifact was a long process, during a time when the interpreter itself was closed source and mostly written by one person.
And bear in mind that timeline-wise, I'm fairly late--with the majority of my involvement coming only after open-sourcing in Dec 2012.
 
you'd think this bread and butter kinda stuff would be sorted though
 
Red was conceived in a bit of a "declaration of independence"... that promises had not been fulfilled, that it was necessary to build from scratch--and it became more ambitious in the process.
@OMGtechy I would... but then again, when you're working on a new idea you often tend to tackle the unknowns and whatever it was that inspired you to come up with the new medium in the first place. The idea of "getting right what other languages already more or less do as well as it can be done" may not be too interesting.
 
6:40 PM
philosophy I guess
 
Personally I'm less critical about things like not hammering together the perfect sort interface (a good enough one is possible), than I am critical that central tenets or design formalisms were not looked at first. So in essence the opposite critique: tackle the hard and unique design studies before you go writing piles of spaghetti code.
 
@OMGtechy Don't forget that even if this kind of bread and butter thing you're trying to do isn't already taken care of, you can write your own things to handle the situation. Remember that you can basically write your own syntax, much like LISP
 
@Freezerburn indeed, but for a newcomer it's offputting
 
I would say the fact that it was left to the somewhat disempowered users to hammer through essays like Ladislav's Bindology is the bigger problem. (Note: things are different a bit in Rebol3)
Something of that form should have been on the Rebol website clear and up front for serious programmers, instead of a somewhat generic "nothing to see here" set of things on how to get the first or last things out of a block. And even that has all kinds of wackiness that's unexplained.
>> append [a b c] [d e f]
 
; Brought to you by: try.rebol.nl
== [a b c d e f]
 
6:44 PM
Okay, so why did it splice by default? How do I tell it not to splice?
>> append/only [a b c] [d e f]
 
; Brought to you by: try.rebol.nl
== [a b c [d e f]]
 
"Wait. /ONLY what? /ONLY append...like I asked you to do in the first place, when I called a routine called append and passed it a block-styled value?"
So even in the mechanical provisions it looks awkward and "off", completely puzzling people as to how any of this is "good". All under the banner of a slogan on the front page that says "gurus building the future"... with a very old-looking website.
So I'm known for being one of the harsher critics of all that. Not how I would do it.
The funny bit being though that there is something "new" in the mix. It's just buried beneath the surface. Even /ONLY is a good thing--believe it or not. (I didn't believe it for a long time)
And while I said I wasn't going to do it, I've gone off and am cleaning up the C code.
 
well put it this way, if by the time I've finished this program (I will see it through out of stubbornness) it doesn't get any better, I can't see myself using it again :/
 
@OMGtechy Different tools are good for different things. You ever read this?
 
no
 
6:50 PM
"Well, nice talking to you, too bad you couldnt invent something more lame." :-)
 
ahaha
reading it, just sounds like an awful teacher
 
"New Balance shoes tell all." When I met Bjarne I noticed he was still wearing New Balance Shoes. So I asked if he remembered getting that letter, and he said no he didn't remember that at all. It could be completely made up.
Or he gets a lot of email and forgot.
@OMGtechy Initially, I was looking at Rebol because a guy I knew had built his web service on it... and I offered to look over it. I couldn't get the system to install and learned enough to figure out what was going on. Lamenting it had no enumerated type, I complained. Then found out I could add one: blog.hostilefork.com/enumerated-type-for-rebol2
 
I'm just plain curious about things.
Right now I would honestly rather be writing Haskell, which is saying something
 
And while I found that somewhat entertaining, it is things I've considered since that make it truly interesting. Some of these things are things that haven't been done as solidly as they need to be, and that's why I am biting the bullet and going ahead with my "Rebol fork"
You didn't pick anything very fun.
Why didn't you pick a PARSE task to start with?
 
it's fun to me :D
 
6:58 PM
That's fun.
 
because I will only do something if there's some problem I genuinely want to solve
so I am just using a new language to solve said problem
right now I want to throw my computer at the window, but that doesn't tend to help
 
go get a beer - it's friday and you will feel better :-)
 
00:00 - 19:0019:00 - 00:00

« first day (1664 days earlier)      last day (2116 days later) »