On Thu, Feb 3, 2022 at 7:17 PM bill lam <[email protected]> wrote:
> gl2 expect ascii or utf8. Try
> gltext 8&u: u:9017
> Or
> gltext 8&u: 9017
Thanks -- that worked. (And, I've updated the gltext entry in the wiki
to reflect this issue.)
For what it's worth, here's the related (and useless, but fun) J
implementation of the rosettacode "Matrix digital rain" task:
require'ide/qt/gl2'
coinsert'jgl2'
junk=: 7 u:;48 65 16b30a1(+i.)&.>10 26 90
sz=:128 72
len=: {:sz
heat=: 0,(255)(len-1)}(<.0.5+255*(% >./)i.len)*/0 1 0
canvas=: sz$' '
hp=: sz$0
cols=: i.0
rows=: i.0
update=: {{
try.glfill 0 0 0 255 catch.wd'timer 0'return.end.
cols=: cols,?{.sz
rows=: rows,0
canvas=: (junk{~?(#cols)##junk) (cols,.rows)} canvas
hp=: len (cols,.rows)} hp
for_p.}./:~~.0,,hp do.
gltextcolor glrgb p{heat
for_xy.($hp)#:I.,p=hp do.
gltextxy 10*xy
gltext 8 u:(<xy) { canvas
end.
end. glpaint''
hp=: 0 >. hp-1
keep=: rows<{:sz-1
cols=: keep#cols
rows=: keep#rows+1
EMPTY
}}
sys_timer_z_=: update_base_
wd rplc&('DIMS';":10*sz) {{)n
pc rain closeok;
setp wh DIMS;
cc green isidraw flush;
pshow;
timer 42
}}
Thanks,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm