There has got to be a use for BRB. Unless we're against spaghetti code for some strange reason, I propose using it as a GOSUB.

HAI

BTW Eat
BRB BATHROOM
BTW Eat more
BRB BATHROOM

BATHROOM
  VISIBLE "MYOB LOL!"
IM BACK

KTHXBYE

Isaac, 2007/05/30 17:54


Perhaps it is a wait for a trigger signal?

Dan_Wood 2007/05/30 12:28


It seems like at least one of BRB or BBL should have something to do with generators or promises.

wm, 2007/05/30 17:52


Surely BRB should be equivalent to something like sleep()?

Martin Pilkington, 2007/05/30 21:28


Another vote for sleep() alike.

wohali, 2007/05/30 21:35


I also think that at least one of BRB and BBL should be sleep. Maybe there could be some kind of usage of one or the other to make the program sleep as well as lock out the program, like make it modal?

David Millar, 2007/05/30 22:44


Maybe both BRB and BBL could be sleeps, but since BRB usually implies a smaller time span than BBL, BRB could default to sleeping in nanoseconds or milliseconds, while BBL defaults to seconds?

Juan Antonio Ramirez, 2007/05/30 23:01


Originally I thought BRB would make a good GOTO, but there's already a pretty good GOTO suggested. So I agree with Juan as to the usage of BRB and BBL. I suggest the following potential usages:

Either use numbers to define how long to sleep:

BTW sleep for 5 sec and 10 ms
BBL 5
BRB 10

Or add more letters to denote a longer span of time

BTW sleep for 5 sec and 10 ms
BBLLLLL
BRBBBBBBBBBB

Admittedly, BRB doesn't lend itself so well to the second method. You could increase the number of R's instead (e.g BRRRRRRB) or add more RB's to the end (BRBRBRBRBRBRB). Or you could drop that method for BRB altogether and require a loop to be used.

Another idea, and my favorite so far, is to just make BBL the sleep function (leaving BRB for other uses) and use the number of L's to denote the granularity of time. For example:

BTW sleep for 5 sec, 10 ms, 7 us, and 3 ns
BBLLLL 5
BBLLL 10
BBLL 7
BBL 3

Tristan Griffith, 2007/05/31 02:29


The problem with AGAINZ as a 'goto' is that it only makes sense if you gotoing somewhere earlier in the code.

BRB works great as a goto or gosub because the parameter is very natural.

BRB BIOBREAK

BBL works for sleep() though:

BBL 5 MINZ

Garoo, 2007/05/31


Why not have BBL as a function call and BRB as an asynchronous function call (a function run in a separate thread)? or a generator?

I makes sense to me:

HAI
    BTW do something else and come back later
    BBL foo
    BTW call a function, but drop RIGHT back (instead of later sometime)
    BRB foo
KTHXBYE

SO IM LIEK foo
    BTW in function
KTHX

Cerberus, 2007/05/31


BRB is totally a match with the 'yield' statement. see: http://lxer.com/module/newswire/view/61805/index.html

3v4n, 2007/06/01

contributions/brb.txt · Last modified: 2007/06/01 15:38 by 3v4n
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki