Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,24 @@
coclass 'activeobject'
require'dates'
create=:setinput NB. constructor
T=:3 :0
if. nc<'T0' do. T0=:tsrep 6!:0'' end.
0.001*(tsrep 6!:0'')-T0
)
F=:G=:0:
Zero=:0
setinput=:3 :0
zero=. getoutput''
'`F ignore'=: y,_:`''
G=: F f.d._1
Zero=: zero-G T ''
getoutput''
)
getoutput=:3 :0
Zero+G T''
)

View file

@ -0,0 +1,17 @@
cocurrent 'testrig'
delay=: 6!:3
object=: conew 'activeobject'
setinput__object 1&o.@o.`''
smoutput (T__object,getoutput__object) ''
delay 2
smoutput (T__object,getoutput__object) ''
setinput__object 0:`''
smoutput (T__object,getoutput__object) ''
delay 0.5
smoutput (T__object,getoutput__object) ''

View file

@ -0,0 +1,32 @@
delay=: 6!:3
task=: {{
obj=. '' conew 'integra'
F__obj=: 1 o. o.
delay 2
F__obj=: 0:
delay 0.5
s=. S__obj
destroy__obj''
s
}}
coclass'integra'
reqthreads=: {{ 0&T.@''^:(0>.y-1 T.'')0 }}
time=: 6!:1
F=: 0:
K=: S=: SHUTDOWN=: 0
create=: {{
reqthreads cores=. {.8 T. ''
integrator t. '' T=: time''
}}
destroy=: {{ codestroy '' [ SHUTDOWN=: 1 }}
integrator=: {{
while. -.SHUTDOWN do.
t=. time''
k=. F t
S=: S + (k+K)*t-T
T=: t
K=: k
end.
}}

View file

@ -0,0 +1,8 @@
task''
0.0194745
task''
_4.40316e_15
task''
0.00874017
task''
_0.0159841