I'm in programming language research and APL is a weird one. It's undoubtedly effective but the entry barrier is absurd.
I talked with a person actively working with APL at ICFP last year; their main argument was that in most cases excess symbols are just noise (I agree) and APL was the logical conclusion of that. I think it goes too far; while I use APL-style quite a bit in Mathematica, idiomatic APL code is just too dense IMO.
Then again, I never really learned APL, so maybe that feeling will change if I actually learn it.
Ah youngsters :)
All it requires is a different golfball on the IBM Selectric typewriter, plus an overlay for the keys.
French.
Well: "TECO" - Both DEC and MIT versions. It'd be pretty tough to post an example, given the use of all those non-printing characters....
Surely the point of an interpreted or compiled language is to allow the use of readable code, what then is the point of wankery like that?
I hate languages like that, it's a similar thing to the 'examples' you find on forums which are just dick waving by people desperate to prove just how much smarter they are than everyone else.
#include <math.h>
#include <sys/time.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
double L ,o ,P
,_=dt,T,Z,D=1,d,
s[999],E,h= 8,I,
J,K,w[999],M,m,O
,n[999],j=33e-3,i=
1E3,r,t, u,v ,W,S=
74.5,l=221,X=7.26,
a,B,A=32.2,c, F,H;
int N,q, C, y,p,U;
Window z; char f[52]
; GC k; main(){ Display*e=
XOpenDisplay( 0); z=RootWindow(e,0); for (XSetForeground(e,k=XCreateGC (e,z,0,0),BlackPixel(e,0))
; scanf("%lf%lf%lf",y +n,w+y, y+s)+1; y ++); XSelectInput(e,z= XCreateSimpleWindow(e,z,0,0,400,400,
0,0,WhitePixel(e,0) ),KeyPressMask); for(XMapWindow(e,z); ; T=sin(O)){ struct timeval G={ 0,dt*1e6}
; K= cos(j); N=1e4; M+= H*_; Z=D*K; F+=_*P; r=E*K; W=cos( O); m=K*W; H=K*T; O+=D*_*F/ K+d/K*E*_; B=
sin(j); a=B*T*D-E*W; XClearWindow(e,z); t=T*E+ D*B*W; j+=d*_*D-_*F*E; P=W*E*B-T*D; for (o+=(I=D*W+E
*T*B,E*d/K *B+v+B/K*F*D)*_; p<y; ){ T=p[s]+i; E=c-p[w]; D=n[p]-L; K=D*m-B*T-H*E; if(p [n]+w[ p]+p[s
]== 0|K <fabs(W=T*r-I*E +D*P) |fabs(D=t *D+Z *T-a *E)> K)N=1e4; else{ q=W/K *4E2+2e2; C= 2E2+4e2/ K
*D; N-1E4&& XDrawLine(e ,z,k,N ,U,q,C); N=q; U=C; } ++p; } L+=_* (X*t +P*M+m*l); T=X*X+ l*l+M *M;
XDrawString(e,z,k ,20,380,f,17); D=v/l*15; i+=(B *l-M*r -X*Z)*_; for(; XPending(e); u *=CS!=N){
XEvent z; XNextEvent(e ,&z);
++*((N=XLookupKeysym
(&z.xkey,0))-IT?
N-LT? UP-N?& E:&
J:& u: &h); --*(
DN -N? N-DT ?N==
RT?&u: & W:&h:&J
); } m=15*F/l;
c+=(I=M/ l,l*H
+I*M+a*X)*_; H
=A*r+v*X-F*l+(
E=.1+X*4.9/l,t
=T*m/32-I*T/24
)/S; K=F*M+(
h* 1e4/l-(T+
E*5*T*E)/3e2
)/S-X*d-B*A;
a=2.63 /l*d;
X+=( d*l-T/S
*(.19*E +a
*.64+J/1e3
)-M* v +A*
Z)*_; l +=
K *_; W=d;
sprintf(f,
"%5d %3d"
"%7d",p =l
/1.7,(C=9E3+
O*57.3)%0550,(int)i); d+=T*(.45-14/l*
X-a*130-J* .14)*_/125e2+F*_*v; P=(T*(47
*I-m* 52+E*94 *D-t*.38+u*.21*E) /1e2+W*
179*v)/2312; select(p=0,0,0,0,&G); v-=(
W*F-T*(.63*m-I*.086+m*E*19-D*25-.11*u
)/107e2)*_; D=cos(o); E=sin(o); } }Postscript is pretty weird too, but in a nice way.
I hate C too :) Or perhaps you like this flight simulator program from the 1998 IOCCC?Code: [Select]#include <math.h>
#include <sys/time.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
double L ,o ,P
,_=dt,T,Z,D=1,d,
s[999],E,h= 8,I,
J,K,w[999],M,m,O
,n[999],j=33e-3,i=
1E3,r,t, u,v ,W,S=
74.5,l=221,X=7.26,
a,B,A=32.2,c, F,H;
int N,q, C, y,p,U;
Window z; char f[52]
; GC k; main(){ Display*e=
XOpenDisplay( 0); z=RootWindow(e,0); for (XSetForeground(e,k=XCreateGC (e,z,0,0),BlackPixel(e,0))
; scanf("%lf%lf%lf",y +n,w+y, y+s)+1; y ++); XSelectInput(e,z= XCreateSimpleWindow(e,z,0,0,400,400,
0,0,WhitePixel(e,0) ),KeyPressMask); for(XMapWindow(e,z); ; T=sin(O)){ struct timeval G={ 0,dt*1e6}
; K= cos(j); N=1e4; M+= H*_; Z=D*K; F+=_*P; r=E*K; W=cos( O); m=K*W; H=K*T; O+=D*_*F/ K+d/K*E*_; B=
sin(j); a=B*T*D-E*W; XClearWindow(e,z); t=T*E+ D*B*W; j+=d*_*D-_*F*E; P=W*E*B-T*D; for (o+=(I=D*W+E
*T*B,E*d/K *B+v+B/K*F*D)*_; p<y; ){ T=p[s]+i; E=c-p[w]; D=n[p]-L; K=D*m-B*T-H*E; if(p [n]+w[ p]+p[s
]== 0|K <fabs(W=T*r-I*E +D*P) |fabs(D=t *D+Z *T-a *E)> K)N=1e4; else{ q=W/K *4E2+2e2; C= 2E2+4e2/ K
*D; N-1E4&& XDrawLine(e ,z,k,N ,U,q,C); N=q; U=C; } ++p; } L+=_* (X*t +P*M+m*l); T=X*X+ l*l+M *M;
XDrawString(e,z,k ,20,380,f,17); D=v/l*15; i+=(B *l-M*r -X*Z)*_; for(; XPending(e); u *=CS!=N){
XEvent z; XNextEvent(e ,&z);
++*((N=XLookupKeysym
(&z.xkey,0))-IT?
N-LT? UP-N?& E:&
J:& u: &h); --*(
DN -N? N-DT ?N==
RT?&u: & W:&h:&J
); } m=15*F/l;
c+=(I=M/ l,l*H
+I*M+a*X)*_; H
=A*r+v*X-F*l+(
E=.1+X*4.9/l,t
=T*m/32-I*T/24
)/S; K=F*M+(
h* 1e4/l-(T+
E*5*T*E)/3e2
)/S-X*d-B*A;
a=2.63 /l*d;
X+=( d*l-T/S
*(.19*E +a
*.64+J/1e3
)-M* v +A*
Z)*_; l +=
K *_; W=d;
sprintf(f,
"%5d %3d"
"%7d",p =l
/1.7,(C=9E3+
O*57.3)%0550,(int)i); d+=T*(.45-14/l*
X-a*130-J* .14)*_/125e2+F*_*v; P=(T*(47
*I-m* 52+E*94 *D-t*.38+u*.21*E) /1e2+W*
179*v)/2312; select(p=0,0,0,0,&G); v-=(
W*F-T*(.63*m-I*.086+m*E*19-D*25-.11*u
)/107e2)*_; D=cos(o); E=sin(o); } }
You can write Forth programs almost as ugly and incomprehensible as Perl. Cheers, techman.
Surely the point of an interpreted or compiled language is to allow the use of readable code, what then is the point of wankery like that?
Although pretty interesting and in a completely different league, I would also mention Smalltalk.
When the JIT was frst being developed and was at a statefrom https://www.researchgate.net/publication/328509577_Two_Decades_of_Smalltalk_VM_Development_Live_VM_Development_through_Simulation_Tools (https://www.researchgate.net/publication/328509577_Two_Decades_of_Smalltalk_VM_Development_Live_VM_Development_through_Simulation_Tools)
where bytecoded methods could actually be translated to
machine code, development fell into a very productive and
enjoyable rhythm.
As a bytecode was encountered for which
the template had yet to be written execution would stop in
the debugger, which would create a skeleton implementation
for the template method from the MessageNotUnderstood ex-
ception. The programmer would implement the body of the
method and execution would continue. Were the new tem-
plate definition to be incorrect and cause a bug during JIT
generation, rather than when the generated machine code
was run, then the debugger could be used to wind execution
back to the beginning of the JITting of the current method
and resume execution, repeating the cycle until disassembly
looked good (somewhat like lemming debugging below). As a
new method was encountered and JITted yet more templates
would be encountered. Similarly as the abstract machine
instruction to concrete machine instruction mappings were
added these could be implemented in the debugger, an expe-
rience repeated when new back ends were added. Much of
the JIT was written in this interactive live style. This style
encourages tool creation because one can create, extend and
polish tools in the middle of debugging sessions, enhancing
them to make sense of ones current predicament. Immediate
feedback makes tool investment cheap and cheerful.
Although pretty interesting and in a completely different league, I would also mention Smalltalk.
The core concepts are now mainstream: Java is effectively "typed Smalltalk", and Ojbective-C is "Smalltalk with a C syntax".
(...)
Although pretty interesting and in a completely different league, I would also mention Smalltalk.
The core concepts are now mainstream: Java is effectively "typed Smalltalk", and Ojbective-C is "Smalltalk with a C syntax".
(...)
Oh certainly (which is why I said interesting AND in a different league than other weird languages that have been cited). (And agree with the clear descendence in Obj-C, a bit less so in Java, but that's another topic entirely...) Smalltalk was pioneer, and influenced many later languages.
It was still the "weirdest" language I had learned. Whatever "weird" means to each of us.
PS. As I recall those IBM "golf balls" were technically called "type balls". That may have just been local jargon.
I still have an RS232 Selectric with an APL ball.
I will keep you in mind, but it may not be what you think. The one I have had a dead interface (made by Datel, I think) and was rescued from a trash bin. I don't think it was RS232 originally. I removed the old electronics and built new electronics out of a Z80 and family peripherals. All the really hard mechanical stuff with the solenoids, reed switches, etc. was already done. It had APL stickers on the fronts of the key caps, so APL was its original vocation.
I still have an RS232 Selectric with an APL ball.
I am SO tempted to see if you would be interested in selling that Selectric! I still have early version of the IBM PC and a my IBM APL package and I'm still dreaming of setting it all up and running it again. The current printer on the PC is one of the old ALPS daisy wheel printers but the Selectric would be even more retro. I actually did start looking for a Selectric about 15 years ago and I found some but none with the RS-232 interface. Even when the Selectrics were commonplace those were always scarce.
It would cost an arm and a leg to ship a Selectric but if you EVER decide to part with the "golf ball", let me know! I'd be quite happy to add it to my old computer collection.
Unless you were masochistic, you wrote your TECO code and then you packed it – you did not do both at the same time! How could anyone read the code, including its author(s)?What is this "pack" operation you speak of? (Hmm. Maybe something EMACS did automatically? (Looking at my old Twenex EMACS init, I see some '$' characters where I'd expect escapes to be? Plenty of other bare control chars, though) But not the non-MIT TECOs.)
Back in the mid-2000s I had cause to use a scripting language that was part of a product that the parent company of my then-employer made....
Back in the mid-2000s I had cause to use a scripting language that was part of a product that the parent company of my then-employer made.
It was like a weird bastardised hybrid of C, Visual Basic and Perl. The block structure of C (curly braces, etc) but with the keywords ("if ... then", etc) and object access of VB, and a smattering of single-character special variables like Perl (#, $, @, etc).
Practically the whole product was written in it. The language was actually implemented as an ASP (that's classic ASP, not ASP.net) plug-in language, so it had a dependency on IIS, even though it didn't use it.
... Most Domain Specific Languages are an unmaintainable and incomprehensible pile of steaming turds, which could and should have been replaced by a decent library in a standard language....
... Most Domain Specific Languages are an unmaintainable and incomprehensible pile of steaming turds, which could and should have been replaced by a decent library in a standard language....
It is hard to write a good language, and quite rare to find someone good at that and addressing the domain. Creating a DSL as a good library in a tested, competently realized language greatly improves the odds of success.