Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Being schizophrenic is better than living alone.


devel / comp.lang.postscript / logo

SubjectAuthor
* logoluser droog
`* Re: logoluser droog
 `- Re: logoCarlos

1
logo

<47e6d596-a98e-434a-a558-fc42e165871bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=135&group=comp.lang.postscript#135

  copy link   Newsgroups: comp.lang.postscript
X-Received: by 2002:a37:a442:: with SMTP id n63mr13223219qke.152.1643214304230;
Wed, 26 Jan 2022 08:25:04 -0800 (PST)
X-Received: by 2002:a05:6808:148e:: with SMTP id e14mr4042739oiw.188.1643214303927;
Wed, 26 Jan 2022 08:25:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.postscript
Date: Wed, 26 Jan 2022 08:25:03 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=97.87.183.68; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 97.87.183.68
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47e6d596-a98e-434a-a558-fc42e165871bn@googlegroups.com>
Subject: logo
From: luser.droog@gmail.com (luser droog)
Injection-Date: Wed, 26 Jan 2022 16:25:04 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 128
 by: luser droog - Wed, 26 Jan 2022 16:25 UTC

%!
%errordict/undefined{pstack / = countexecstack array execstack == quit}put
%errordict/typecheck{pstack / = countexecstack array execstack == quit}put
<<
/logo{
{ % a
%pstack / =
dup length 0 eq { pop exit } if
1 shift first
dup type /nametype eq {
dup arity % xs x n
3 2 roll exch shift exch % x xm xs
3 1 roll [ 3 1 roll % xs [ x xm
aload pop counttomark -1 roll % xs [ ...xm x
load 1 shift first % xs [ ... xp xa
/inputs cvx 3 -1 roll /proc cvx % xs [ ... xa inputs xp proc
4 array astore cvx % xs [ ... {xa inputs xp proc}
exec ] exch
%pstack / =
}{
exch
} ifelse
}loop
}
/forward{{dist} PS {dist = / =}}
/to{{name} PS { % xs [
%pstack
exch { % [ ... xs
%pstack / =
dup first dup type /nametype eq {
dup dup length string cvs first (:) first eq {
exch rest
}{
pop exit
} ifelse
}{
pop exit
} ifelse
} loop
%pstack / =
counttomark 1 add 1 roll ] cvx % xs {inputs}
exch [ exch { % {inputs} [ ... xs
%pstack / =
dup first dup type /nametype eq {
dup /end eq {
pop rest exit
}{
exch rest
} ifelse
}{
exch rest
} ifelse
} loop
%pstack / =
counttomark 1 add 1 roll ] cvx exch % {inputs} {proc} xs
3 1 roll 2 array astore
/name load exch
/logo where pop 3 1 roll put
[
}}

/proc{
{
{
dup length 0 eq { pop exit } if
1 shift first
%pstack / =
dup /PS eq { pop stop } if
[ exch logo ] exch
} loop
} stopped {
%pstack / =
first exec
} if
end
}
/inputs{
dup length dict begin
dup length 1 sub -1 0 { % ... a i
2 copy get % ... a i a_i
4 -1 roll def pop % ... a
} for pop % ...
}
/arity{
load first length
}
/shift{ % a n
2 copy % a n a n
0 exch getinterval 3 1 roll % a[0..n-1] a n
1 index length 1 index sub getinterval % a[0..n-1] a[n..$]
exch
}
/first{ 0 get }
/rest{ 1 1 index length 1 sub getinterval }

>>begin

{
forward 12
forward 100
5 6 7

to fd :dist
forward :dist
end
fd 47
}logo
(stack:) = pstack
quit

output:
$ alias gsq
alias gsq='gsnd -q -dNOSAFER'
$ gsq logo.ps
12

100

47

stack:
[[[]]]
[]
7 6
5 []
[]

Re: logo

<cc304be9-3782-49e8-a3b5-1d9dd0952595n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=136&group=comp.lang.postscript#136

  copy link   Newsgroups: comp.lang.postscript
X-Received: by 2002:ac8:5908:: with SMTP id 8mr5061747qty.61.1643352468328;
Thu, 27 Jan 2022 22:47:48 -0800 (PST)
X-Received: by 2002:a05:6808:2212:: with SMTP id bd18mr9401118oib.41.1643352468118;
Thu, 27 Jan 2022 22:47:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!5.161.45.24.MISMATCH!2.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.postscript
Date: Thu, 27 Jan 2022 22:47:47 -0800 (PST)
In-Reply-To: <47e6d596-a98e-434a-a558-fc42e165871bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=97.87.183.68; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 97.87.183.68
References: <47e6d596-a98e-434a-a558-fc42e165871bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cc304be9-3782-49e8-a3b5-1d9dd0952595n@googlegroups.com>
Subject: Re: logo
From: luser.droog@gmail.com (luser droog)
Injection-Date: Fri, 28 Jan 2022 06:47:48 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 165
 by: luser droog - Fri, 28 Jan 2022 06:47 UTC

It now does recursive evaluation of arguments before calling a function.
Extra unexpected values just trickle down to the stack. I'm still using
marks to bracket stuff on the stack, but now without creating so many arrays.
This means lots of extra stack shuffling. Finally getting the hang of counttomark.

%!
%errordict/undefined{pstack / = countexecstack array execstack == quit}put
errordict/typecheck{pstack / = countexecstack array execstack == quit}put
<<
/logo{
{ % a
dup length 0 eq { pop exit } if
logo-step
}loop
}
/logo-step{
dup rest exch first
dup isfunc {
dofunc
}{
exch
} ifelse
}
/isfunc{
dup type /nametype eq {
load
dup xcheck exch type /arraytype eq and
}{
pop false
} ifelse
}
/dofunc{
dup arity [ 4 3 roll % x n [ xs
{ % x n [ ... xs
counttomark % x n [ ... xs cnt
dup 2 add index exch 1 sub % x n [ ... xs n #...
le { exit } if
logo-step % x n [ ... ? xs
} loop % x n [ ... xs
counttomark 1 add 1 roll % x n xs [ ...
counttomark 4 add -2 roll pop % xs [ ... x
load dup rest exch first
/inputs cvx 3 -1 roll /proc cvx
%pstack / =
4 array astore cvx % xs [ ... {xa inputs xp proc}
exec % xs [ results*
%] exch
counttomark 2 add -2 roll pop % results* xs
}
/dofunc-v1{
dup arity % xs x n
3 2 roll exch shift exch % x xm xs
3 1 roll [ 3 1 roll % xs [ x xm
aload pop counttomark -1 roll % xs [ ...xm x
load dup rest exch first % xs [ ... xp xa
/inputs cvx 3 -1 roll /proc cvx % xs [ ... xa inputs xp proc
4 array astore cvx % xs [ ... {xa inputs xp proc}
exec ] exch
}

/print{{it} PS {it == / =}}
/sum{{x y} PS { x y add }}
/difference{{x y} PS { x y sub }}
/product{{x y} PS { x y mul }}
/quotient{{x y} PS { x y div }}

/to{{} PS { % xs [ . xs [
%pstack / =
exch dup rest exch first /name exch def
{ % [ ... xs
dup first dup type /nametype eq {
dup dup length string cvs first (:) first eq {
exch rest
}{ pop exit } ifelse
}{ pop exit } ifelse
} loop counttomark 1 add 1 roll ] cvx % xs {inputs}
exch [ exch { % {inputs} [ ... xs
dup first dup type /nametype eq {
dup /end eq { pop rest exit }{ exch rest } ifelse
}{ exch rest } ifelse
} loop counttomark 1 add 1 roll ] cvx exch % {inputs} {proc} xs
3 1 roll 2 array astore cvx /name load exch /logo where pop 3 1 roll put
[
}}

/proc{
{
{
dup length 0 eq { pop exit } if
dup rest exch first
dup /PS eq { pop stop } if
[ exch logo % xs [ results*
%] exch
counttomark 2 add -2 roll pop
} loop
} stopped {
first exec
} if
end
}
/inputs{
dup length dict begin
dup length 1 sub -1 0 { % ... a i
2 copy get % ... a i a_i
4 -1 roll def pop % ... a
} for pop % ...
}
/arity{
load first length
}
/compose{
1 index xcheck 3 1 roll
1 index length 1 index length add array dup 0 4 index putinterval
dup 4 -1 roll length 4 -1 roll putinterval
exch {cvx} if
}
/shift{ % a n . a[n..$] a[0..n-1]
2 copy % a n a n
0 exch getinterval 3 1 roll % a[0..n-1] a n
1 index length 1 index sub getinterval % a[0..n-1] a[n..$]
exch % a[n..$] a[0..n-1]
}
/first{ 0 get }
/rest{ 1 1 index length 1 sub getinterval }

>>begin

{
print 12
print 100
print sum 3 product 4 2
5 6 7

to fd :dist
print :dist
end
fd 47
to tup :arg
4 6
end
print tup 12
print 5
}logo
(stack:) = pstack
quit

Output:
$ gsnd -q logo.ps
12

100

11

47

6

5

stack:
4 7
6 5

Re: logo

<20220210150719.00006b44@cvkm.cz>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=143&group=comp.lang.postscript#143

  copy link   Newsgroups: comp.lang.postscript
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: carlos@cvkm.cz (Carlos)
Newsgroups: comp.lang.postscript
Subject: Re: logo
Date: Thu, 10 Feb 2022 15:07:19 +0100
Lines: 7
Message-ID: <20220210150719.00006b44@cvkm.cz>
References: <47e6d596-a98e-434a-a558-fc42e165871bn@googlegroups.com>
<cc304be9-3782-49e8-a3b5-1d9dd0952595n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Trace: individual.net pDMjuB4J+0WCaIqnoj33bQuqDo/0T7tBi6dsE8+ei7rpSGB5lB
Cancel-Lock: sha1:ufF1ASQFf5vGD07NB1bbPyyYpdc=
X-Newsreader: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-w64-mingw32)
 by: Carlos - Thu, 10 Feb 2022 14:07 UTC

On Thu, 27 Jan 2022 22:47:47 -0800 (PST)
luser droog <luser.droog@gmail.com> wrote:

> [LOGO]

Ha! Awesome! :)

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor