« first day (1036 days earlier)      last day (2744 days later) » 

12:50 AM
@y__b__y Welcome to the Rebol and Red room. See our FAQ. Cool, you have a reputation score of 41 so chat away!
 
 
2 hours later…
2:20 AM
@earl, I'll poke around with that. Still may be out of my ability, but good to have something to look for
If you need more details, or if you already know what the issue is, great
Is there a kind of locking or semaphore in place for series?
 
 
9 hours later…
11:12 AM
some interesting stats:
http://github.com/rebol/rebol watch: 150 star: 477 fork: 156
http://github.com/ruby/ruby watch: 480 star: 4'239 fork: 1'127
 
 
3 hours later…
2:17 PM
So Ruby is not so big as 1 would expect, and how many active participants are amongst them? Could be a lot of dormant contributors.
 
 
3 hours later…
5:42 PM
@onetom Hm, we could do some outreach to people who have forked it and/or starred it... there's a list. That's a good number of interested people.
 
@HostileFork what would we tell them?
 
@onetom Point them to the chat room, tell them about the Recode conference and send them the videos, get them to register for interest in the next Recode
So best to wait until that site has happened, I guess. :-/
@RobertM.Münch If you didn't notice, David den Haring mentions working with Saphirion at this point in his talk
 
Douglas Crockford forked it too
 
@onetom Hmmm, well, cool... that shows he's at least a little interested still.
 
6:12 PM
so many asian names... i wonder if jerry made a campaign and lured people in somehow to fork or star the rebol repo :)
 
@hostilefork @onetom disregard this, just a test, but needed some active users
 
@AstDerek No problem... doing something with the bot I take it?
 
@HostileFork Yes, trying a modular approach you know?
hehe :)
 
6:38 PM
i saw the "if found? find x y [...]" pattern but im not sure why is it good?
according to http://www.rebol.com/r3/docs/functions/found-q.html :
"Returns false for all other values. Not usually required because most conditional function will accept a none as false and all other values as true, except pick."
so it should be okay with 'IF, still that's where i see it the most often.
 
6:53 PM
@onetom It's good if you don't want to write not none? in cases that demand a boolean result, I guess. But yeah, it seems questionably useful for a rather specially-named function that does that. something? would be a more apt name.
 
7:42 PM
not none? find ... doesn't seem that verbose, and is more explicit for the cases where it comes up. Seems less confusing, if you ask me. @DocKimbel, vote from Red as to whether "found?" is a good thing to have in the language?
 
@HostileFork but it's unnecessary, since 'IF 'UNLESS 'EITHER all treat none as false
 
@RebolBot
source found?
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> source found?
found?: make function! [[
    "Returns TRUE if value is not NONE."
    value
][
    not none? :value
]]
 
@onetom Well there are some cases where you want to explicitly turn the find result into a boolean, because a boolean is what the situation requires... or maybe it has a different interpretation for a series position parameter from a boolean
 
writing nothing is the least verbose... like this:
unless find associations item [insert tail associations item]
 
7:45 PM
@HostileFork The very rare cases I used found? are only when it reads better than using to-logic, so not after if, either or unless.
 
@HostileFork as the documentation says, only PICK is picky about it and wont treat none as false
 
In all other cases, IMHO, it is totally unnecessary and just makes code more verbose.
 
that would have worth an SO question actually, isn't it?
 
@onetom Well it's more an issue tracker thing; I think when we look at something and know it's a design question and we plan on a change or considering one then that's not a particularly good question per se -- it encourages too much debate.
Questions are more "I tried this and it isn't working" => "Here, this is what you should have done"
At least, that's what StackOverflow policy tries to cull down to, in order to keep the site more about useful answers and less about "discussion"
My friend is trying to talk me into buying a Nexus 10 as the replacement for my laptop. :-/ I dunno. I tried using an original iPad for a while that was a loan from a friend and I never really bonded with it, it was too heavy. The 7" form factor seems much more "handle-able"...but I can't type on any tablet with satisfying speed.
Especially not a 7" one
 
8:00 PM
@HostileFork iPad mini, then?
but i haven't used latest Android versions; some people said they made a lot of progress and jelly bean is the 1st usable android version which is on par with iOS etc etc, but i kinda doubt it...
especially since iOS 7 is gonna come out soon... it might just be better then the latest android again.
@HostileFork My question was really: Is there any case where "if found? find ..." is not doing the same as "if find ..."? but as i understand there is no such case.
 
@RebolBot
help find
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> help find
USAGE:
    FIND series value /part length /only /case /any /with wild /skip size /last /reverse /tail /match

DESCRIPTION:
    Searches for a value; for series returns where found, else none.
    FIND is an action value.

ARGUMENTS:
    series (series! gob! port! bitset! typeset! object! none!)
    value (any-type!)

REFINEMENTS:
    /part -- Limits the search to a given length or position
        length (number! series! pair!)
 
Q: Is there a convention for object constructors?
@RebolBot
something!: context [lookup: none init: does [self/lookup: #[map! [1 x]]] ]
x: make something! [init]
x/lookup/2: 'y
probe x/lookup
something!/lookup
 
; Brought to you by: http://tryrebol.esperconsultancy.nl
>> something!: context [lookup: make map! [
1 x
]] x: make something! [] x/lookup/2: 'y something!/lookup
== make map! [
1 x
2 y
]
 
@onetom I vaguely remember there was some discussion of addressing this, which I ran across while tinkering with my Ruby-in-Rebol project.
 
8:13 PM
; Brought to you by: http://tryrebol.esperconsultancy.nl
>> something!: context [lookup: none init: does [self/lookup: make map! [
1 x
]]] x: make something! [init] x/lookup/2: 'y probe x/lookup something!/lookup
make map! [
1 x
2 y
]
== none
 
thats what i could imagine as a crossover of the python __init__ and the ruby initialize
or maybe construct is meant to solve this kind of problem?
@RebolBot
something!: context [ lookup: [x] ]
x: make something! []
append x/lookup 'y
probe x/lookup
something!/lookup
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> something!: context [lookup: [x]] x: make something! [] append x/lookup 'y probe x/lookup something!/lookup
[x y]
== [x]
 
only series! are copied on 'MAKE ? because blocks and strings doesn't seem to suffer from this behaviour
 
8:56 PM
Q: what's the simplest way to execute a block of code as if it would be a method within an object?
in other words, how to make the following pattern easy?
o: context [a: 1 inc: funct[n][self/a: a + n]]
do bind [inc 3] o o/a
@RebolBot
o: context [
do: funct [prg] [lib/do bind prg self]
a: 1
inc: funct[n][self/a: a + n]
]
o/do [inc 3]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> o: context [do: funct [prg] [lib/do bind prg self] a: 1 inc: funct [n] [self/a: a + n]] o/do [inc 3]
== 4
 
9:18 PM
that's a bit sad that ruby can be less verbose but still quite clear despite of the semicolons and everything... :/
i: 1 accumulate/with ["asd" 'qwe 123] funct[a e][a/(++ i): e a] make map! []
vs
i=1; ["asd", :qwe, 123].reduce({}) do |a, e| a[i] = e; i+=1; a end
or even
i=1; ["asd", :qwe, 123].reduce({}){|a, e| a[i] = e; i+=1; a}
not talking about the fact that such basic functional programming "primitives" are built in
 
9:36 PM
Q: has anyone wrote any mocking/stubbing tools for rebol?
 
@onetom map collect [repeat e ["asdf" 'qwe 123] [keep index? e keep first e]]
 
@earl hmm... i didn't know repeat can do that.
still it's a bit low-level with collect. it adds an extra bracket to the game...
 
Well, the explicit mutation in your examples would be too imperative for my taste.
(And in any case, this should just be make map! enumerate ...)
 
@earl well, im all for the non-imperative style too. that's why i pulled in the accumulate function from hof.red actually...
Q: any simpler way of doing "get in (expr) 'key" where expr evaluates to some object?
for example i would love to write just "(expr)/key" and i don't quite understand why pathes cant begin with a paren!
 
9:55 PM
@onetom select expr key. (Same number of chars, though.)
 
10:06 PM
@earl 1 token less at least. thx
 
guys can someone help me with this? stackoverflow.com/questions/18562176/…
 
@PavanK Welcome to the Rebol and Red room. See our FAQ. Cool, you have a reputation score of 175 so chat away!
 
still ugly, since normally u can say o/key not select o 'key... and u can do o/(dynamic key expression) so why not (dynamic object)/key?...
@PavanK excuse me, but how is it rebol related?
 
It is general programming question sorry if I shouldn't have asked it
 
10:21 PM
@RebolBot do system/options/file-types
 
@onetom What are you trying to say?
; Brought to you by: tryrebol.esperconsultancy.nl
>> system/options/file-types
== [%.txt text %.html %.htm %.xml %.xsl %.wml %.sgml %.asp %.php %.cgi markup %.bmp bmp %.gif gif %.png png %.jpg %.jpeg jpeg %.rx %.so extension]
 
@PavanK you can ask of course, it's just less likely to get an answer here then at other, more on-topic places.
@RebolBot
prg: "Rebol[] print 'ok"
cd %/tmp
write %0.reb prg do %0.reb
mkdir %spec/
write %spec/0.reb prg ls %spec do %spec/0.reb
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/access-cannot-open.html
>> prg: "Rebol[] print 'ok" write %0.reb prg do %0.reb mkdir %spec/ write %spec/0.reb prg ls %spec do %spec/0.reb
*** ERROR
** Access error: cannot open: %0.reb reason: -3
** Where: write
** Near: write %0.reb prg do %0.reb mkdir %spec/ write %spec/0.reb pr...
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/access-cannot-open.html
>> prg: "Rebol[] print 'ok" write %x.reb prg do %x.reb mkdir %spec/ write %spec/0.reb prg ls %spec do %spec/0.reb
*** ERROR
** Access error: cannot open: %x.reb reason: -3
** Where: write
** Near: write %x.reb prg do %x.reb mkdir %spec/ write %spec/0.reb pr...
; Brought to you by: tryrebol.esperconsultancy.nl
>> prg: "Rebol[] print 'ok" cd %/tmp write %0.reb prg do %0.reb mkdir %spec/ write %spec/0.reb prg ls %spec do %spec/0.reb
ok
0.reb
ok
 
10:37 PM
aaah... there was a typo, that's why it didnt work locally
i have 1 more idea for the constructor convention:
obj-class!: make object! [
init: does [something user defined]
new: does [make self [init]] ; this would be a standard pattern
]
; usage would be:
o: obj-class!/new
instead of
o: make obj-class![init]
 

« first day (1036 days earlier)      last day (2744 days later) »