Blackboard Computing Adventures 💡
8 subscribers
785 photos
73 videos
61 files
261 links
Welcome to BCA ⚡⚡ our Virtual Learning Space. Mostly Blackboard snapshots, sometimes with explanatory/exploratory and analytical notes. Open teaching efforts by Fut. Prof. JWL at his BC gate on 1st Cwa Road and HQ research dissemination.
Download Telegram
TODAY, at TEA v1.3.2 we have introduced a standard program that will be delicious to especially teenagers and millennials!

SMS-TEXT-MINIFIER v3
#====================================
# SMS-TEXT MINIFIER v3
#----|what it is|-------------------
# A bsc TXT/SMS mnifyr
#====================================
v:vMSG | v:vMSG_ORIG

#----|THE CONSTANTS|-------------------
v:vDELIM:{
***********************
}

f!:^$:lPROCESS:lPROMPT
l:lPROMPT |
i!:{Welcome to TEXT MINIFIER v3} | x*!:vDELIM
x!:{Enter a text message that you want minified:}
i*: | f!:^$:lPROCESS:lPROMPT

l:lPROCESS
v:vMSG | v:vMSG_ORIG #store original message
z: #convert all text to lower-case first
t.: #truncate trailing white-space

#----|THE COMPRESSORS|-------------------
#first, eliminate redudancy
r!:a+:a|r!:b+:b|r!:c+:c|r!:d+:d|r!:e+:e|r!:f+:f|
r!:g+:g|r!:h+:h|r!:i+:i|r!:j+:j|r!:k+:k|r!:l+:l|
r!:m+:m|r!:n+:n|r!:o+:o|r!:p+:p|r!:q+:q|r!:r+:r|
r!:s+:s|r!:t+:t|r!:u+:u|r!:v+:v|r!:w+:w|r!:x+:x|
r!:y+:y|r!:z+:z|r!:\s+:{ }|r!:\.+:.|r!:,+:,
r!:\?+:?|r!:\!+:!|r!:{\:+}:{:}|r!:{;+}:;

#numbers in words with digits
r!:one:1|r!:two:2|r!:three:3|r!:four:4
r!:five:5|r!:six:6|r!:seven:7|r!:eight:8
r!:nine:9|r!:ten:10|r!:zero:0

#then perform smart/creative replacements...
r!:wh:w|r!:ing:in|r!:and:n
r!:{it is}:tis|r!:you:{u}|r!:the:d
r!:to:2|r!:for:4|r!:how:hw|r!:ed:d
r!:[ ]*are[ ]:{ r }|r!:why:y|r!:ou:u
r!:[ ]be[ ]:{ b }|r!:your:yo|r!:right:8t
r!:phone:4ne|r!:ike:yk|r!:day:dy|r!:now:nw
r!:can:cn|r!:be:b|r!:love:lv|r!:ight:8
# and more as time shall inspire...

#----|PRESENT|-------------------
v:vMSG #store final compressed version
#compute compression analytics...
y!:vMSG | v:vN_MSG
y!:vMSG_ORIG | v:vN_MSG_ORIG
v:vMEASURE_EXPR:{((I-O)/(1.0*I)) * 100}
v:vI:I | v:vO:O
r*!:vMEASURE_EXPR:vI:vN_MSG_ORIG | v:vMEASURE_RESULT
r*!:vMEASURE_RESULT:vO:vN_MSG | v:vMEASURE_RESULT
r*.:vMEASURE_RESULT |
f!:\.:lNOTRUNC
d!:^.*\...
l:lNOTRUNC
v:vMEASURE_RESULT

#Present compressed message and analytics
i!:{ORIGINAL MESSAGE:} | x*!:vDELIM | x*!:vMSG_ORIG | x*!:vDELIM
x!:{COMPRESSED [by } | x*!:vMEASURE_RESULT | x!:{%]:} | x*!:vDELIM
x*!:vMSG | v:vFIN_MSG_WITH_ANALYTICS

i!:{TEXT MINIFIER: processing message is complete | Choose what to do:
[1] Return Final Message Only | [else] RESULTS + Analysis} | i*: | t.:
f:^1$:lNOANALYSIS

y:vFIN_MSG_WITH_ANALYTICS | q!: #show original msg+analysis+final message

l:lNOANALYSIS #only show final compressed message
y:vMSG


#standard #teaprograms #smsutilities #edutainment #sourcecode
Blackboard Computing Adventures 💡
ADVANCES in CHILD EDUCATION? (:)(:)__?(?)__! Introducing THE SPELLING SIR GAME v3 [link] https://bit.ly/thesirgame Designed by Fut. Prof. Joseph Willrich @ Nuchwezi Research, the updated version of this game becomes the 34th standard Transforming Executable…
Interested in studying the source code of this very important game? Well, it is here shared for Free!

v:vDESCRIPTION:{
###############################
# [new] SIR GAME v3:
# by Fut. Prof. JWL @ Nuchwezi Research
###############################
WELCOME to a simple game fit for kids, and those learning spelling in English. THE RULES: playing is simple:
You shall see a word with a MISSING lett?r, and if you guess it right, you score. You can also quit the game anytime if you like.}

#------[ DEFINE CONSTANTS ]
v:vDELIM:{
#####################
}
v:vMAINPROMPT:{
NEXT: [Q] QUIT | OR continue playing...}
v:vTHANKS:{Thanks for playing THE SIR GAME!}

#------[ DEFINE VARIABLES ]
v:vREPORT:{-|HAVE NOT PLAYED the SIR GAME yet|-}
v:vSCORE:{0} # hold current score
v:vMOVES:{0} # hold current moves

#------[ WELCOME MESSAGE ]
# show the welcome message
y:vDESCRIPTION | i*:
# then start game
j:lPLAY

#------[ THE GAME PLAY ]
l:lPLAYNEXT
y:vPROMPT | i*: | f:^[qQ]$:lFINISH

l:lPLAY #into the game...

# randomly pick a word from the given list
I!:{HONEY TRICK WINDS GAMES MONEY GRASS BABIES WATER BALLS PHONE INTERNET MUMMY HOUSE RAIN SHORTS KITTEN COLOUR MILK SHOES CUPS FORK EATING TABLE CHAIR WINDOW DOG RICE PLAY DIG WALLS TALK WALK FIND PHOTO WRITE KITE NUMBER LETTER PAPER CUTS GATES BANANA ICE PRICE HAND SING RING PIG PIN PEN HEN COW BIRD BAD SMILE HILL MEAL MEAT MEAN UGANDA CLASS TEACH APPLE STORY}
| a: | d:[ ].*$
v:vWORD #store selected word
v!:vWORD | x!:{-1} | r.: | v:vNWORD #get its length-1
# randomly inject "-" b4 Nth pstn
v:vSALT:{-}
S*:vWORD:vSALT:vNWORD |
#(="TR-ICK") for example
R:.[-]:? | R:[-].:? | # returns "TR?CK"
v:vQUIZ

#------[ the QUIZ ]
l:lQUIZ

y:vQUIZ | i*: | v:vANS # prompt and store response

#------[ the SCORING ]
#swap answer into quiz
v:vPATTERN:{?}
r*:vQUIZ:vPATTERN:vANS
z!: #capitalize result
v:vANSWORD #store
#compare...
v:vTESTER:{"__"==".."}|v:vP1:{__}|v:vP2:{..}
r*!:vTESTER:vP1:vWORD|v:vTESTER
r*!:vTESTER:vP2:vANSWORD|v:vTESTER
y:vTESTER | r.: | f:^true$:lWIN:lLOSS
l:lWIN # we won, update score +1
y:vANS | x!:{ (CORRECT)} | v:vANS
y:vSCORE | x!:{+1} | r.: | v:vSCORE | j:lREPORT
l:lLOSS # we lost, update score -2
y:vANS | x!:{ (WRONG)} | v:vANS
y:vSCORE | x!:{-2} | r.: | v:vSCORE | j:lREPORT

#------[ the REPORTING ]
l:lREPORT
#build report...
y:vMOVES | x!:{+1} | r.: | v:vMOVES #first, update moves thus far

#compute error rate
v:vEVALUATOR:{((..)/__)*100}|
r*!:vEVALUATOR:vP1:vMOVES|v:vEVALUATOR
r*!:vEVALUATOR:vP2:vSCORE|v:vEVALUATOR
y:vEVALUATOR | r.: | v:vRATING
f!:\.:lRATEFINE
d!:{^.*\...} | v:vRATING | l:lRATEFINE

v:v1:{The WORD: } | v:v2:{ | QUIZ: } | v:v3:{ | Your Answer: } | v:v4:{
TOTAL SCORE: } | v:v5:{ @MOVES: } | v:v6:{ | RATING: } | v:v7:{%}
g*:{}:v1:vWORD:v2:vQUIZ:v3:vANS:v4:vSCORE:v5:vMOVES | v:vREPORT

x*!:vMAINPROMPT | v:vPROMPT

j:lPLAYNEXT # iterate...


#------[ QUIT ]
l:lFINISH
g*:{}:vREPORT:v6:vRATING:v7 | v:vREPORT #update report with rating info
y:vREPORT | | x*!:vDELIM | x*!:vTHANKS # show last report and quit


#sourcecode #teaprogramming #transformingexecutablealphabet #tealanguage