February 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28  
Jan   Mar
 Find out about the XML feeds of this site  
21:23 03/06/02
#sidebar.txt
on now () { kernel (clock.now)}3/15/2002; 3:33:44 PM

 

Sporadic notes about working with radio No Simpler than this Radio:

Friday, February 22, 2002

#> 16:56  Radio 
quickly loose everything with [Ctrl-] Backspace  
 Asc Mo
do not do this:

open weblogdata.root.. navigate to "posts" and press Ctrl-BackSpace.

Ctrl-BackSpace kills. it has the potential to ruin your setup. i suspect that there is a system level callback (they seem to exist for all sorts of things) that i have not found which could prevent me and others from accidentally pressing Ctrl-BackSpace when attempting to hit it's innocuous cousin, Shift-BackSpace.

* find a way to disable the key-combo

* work out a method by which to update TWO radio.roots and to master/patch one from the other in case of accidental tree deletions.

no, this has not happened to me on a branch that mattered. not yet. but my encounter with that key-combo was enough to freak. there appears to be no undo for it. if there is.. or if you have a solution, get in touch please.

# 16:43  Radio 
nutzoid misinterpretations and some neat helper routines  
 Asc Mo
from the hunches dept:  the more source i read the more i am scratching my head about the way subroutines are avoided and code is inlined. i have counted too many references that refer to subroutines as 'bottlenecking code' and i find that puzzling. here's why.. and the hunch in detail:

for someone freely instantiating local variables on the head when they could be initialized and reused to call a parameterless function call a bottleneck is making me think that fundamentally the source is accessed as if it was data.. e.g. that it is literally semaphore'd, introducing overhead in the call..

this would restrict concurrent use of functions, be silly and bad and force one to inline as much as is being done while allowing one to call delegation bottlenecking.

this would make a lot of sense if the genesis of the outliner proved to be a single-user vision. its a hunch right now, but i'm going to go mad if it turns out that no matter how many threads one uses that code block are serialized beyond my control.  ..meanwhile i use 'functions'.

here are my two favorites: ;-)
on IsDynamic()
 { local (pta=html.getPageTableAddress());
 return !(pta^.radioResponder.flStaticRendering)}
 on IsStatic() 
{ local (pta=html.getPageTableAddress()); 
return (pta^.radioResponder.flStaticRendering)} 
 
<<# 16:09  Radio 
how i moved some code to add my own vars while rendering  
 Asc Mo
work-around for post-item callback issue:
modified 
system.verbs.builtins.radio.
weblog.post
disabled calling the callbacks from here
macros.weblogpostform
move the callback to postit()
inserted before the line containing: //redirect

now i've got to see about not loosing the blasted changes next time radio updates itself. i wonder whatever became of the hackmaster dreams..
#> 15:52  Radio 
radio post-item callback too early -- timing bug   
 Asc Mo
more callback trouble. this time its about the timing of the post-item callbacks. my goal is to inherit the state of the 'NotOnHomePage' flag from the category i'm posting an item to. here is my callback routine:

on postItem(adrpost) { local { flaxNotOnHomePage=false; adrBlog= radio.weblog.init(); adrCatgs= @adrBlog^.categories; catg; catn=""}; adrPost^.ok= "yes"; if defined(adrPost^.categories) { adrPost^.ok= "yes, it has categories"; for catg in @adrPost^.categories { catn=nameOf(Catg^); if defined(adrCatgs^.[catn].flaxNotOnHomePage) { flaxNotOnHomePage= adrCatgs^.[catn].flaxNotOnHomePage; if flaxNotOnHomePage { break}}}}; adrPost^.flNotOnHomePage= flaxNotOnHomePage}

as you can see, this is easy (its finally all making sense to me). I set an an "OK" flag when this routine gets called... there are never any categories for new posts. THIS IS A BUG. its right and you have full data when you edit existing posts... but not for new posts; that is when it gets called prematurely.. sending me on a hunt for a workaround.

# 04:15  Radio 
renumbering is a go.  
 Asc Mo
if this all worked as designed i have now backfilled my database with empty posts for 11:24 each day since the start of the year. the posts were automatically renumbered and the storylists rebuilt, keeping the entire database functioning normally. -- i did this to allow my custom rendering for the "Daily Symbols" category to have something to trigger it in the past. -- when i get back to it, i'll integrate some more neats bits of information into the Archive and Symbols pages. -- if you have not noticed what i'm doing in "Daily Symbols", take a look, then click the day-icon. also see how that same data flows neatly into all other category archive pages.

@ 15:33 03/15/02
© Michael Ax, 2002