Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Code:
∇ wordle l;⎕IO;g;i;s;w
⎕IO←i←1◊s←+/d∘.=w←l[?↑⍴l;]◊'Word: ',w
now: ⎕←g←l[?↑⍴l;]◊→end⍴⍨g≡w◊i←i+1
l←(~∨/(l∊(~g∊w)/g))⌿l
l←(((~g=w)/l)∧.≠(~g=w)/g)⌿l
l←(((g=w)/l)∧.=(g=w)/w)⌿l
l←((+/[2]l∘.=d)∧.≥s⌊+/d∘.=g)⌿l
l←((+/[2]l∘.=d)∧.≤(6,⍳5)[1+(s<+/d∘.=g)×s⌊+/d∘.=g])⌿l◊→now
end: 'Guesses: ',⍕i
∇
And I thought lisp was unreadable
 
This smiley annoyance was the only reason I had to edit my last post. I recommend using the [PLAIN][/PLAIN] BB code for this, since it's the code's only purpose.
If you mean the [CODE] tag, you can also do syntax highlighting:
C++:
// There was a nigger who came up with this idea:
cout << "Hello world" << endl;
// Well, that's pretty niggerlicious
 
  • Like
Reactions: Kosher Salt
d←'abcdefghijklmnopqrstuvwxyz' ∇ wordle l;⎕IO;g;i;s;w ⍝ I have l for list; g for guess; i for index; s for summary; and w for word. ⎕IO←i←1◊s←+/d∘.=w←l[?↑⍴l;]◊'Word: ',w now: ⎕←g←l[?↑⍴l;]◊→end⍴⍨g≡w◊i←i+1◊l←(((+/[2]l∘.=d)∧.≤(6,⍳5)[1+(s<+/d∘.=g)×s⌊+/d∘.=g])∧((+/[2]l∘.=d)∧.≥s⌊+/d∘.=g)∧(((g=w)/l)∧.=(g=w)/w)∧(((~g=w)/l)∧.≠(~g=w)/g)∧(~∨/(l∊(~g∊w)/g)))⌿l◊→now end: 'Guesses: ',⍕i ∇
I hate that this isn't a shitpost.
 
d←'abcdefghijklmnopqrstuvwxyz' ∇ wordle l;⎕IO;g;i;s;w ⍝ I have l for list; g for guess; i for index; s for summary; and w for word. ⎕IO←i←1◊s←+/d∘.=w←l[?↑⍴l;]◊'Word: ',w now: ⎕←g←l[?↑⍴l;]◊→end⍴⍨g≡w◊i←i+1◊l←(((+/[2]l∘.=d)∧.≤(6,⍳5)[1+(s<+/d∘.=g)×s⌊+/d∘.=g])∧((+/[2]l∘.=d)∧.≥s⌊+/d∘.=g)∧(((g=w)/l)∧.=(g=w)/w)∧(((~g=w)/l)∧.≠(~g=w)/g)∧(~∨/(l∊(~g∊w)/g)))⌿l◊→now end: 'Guesses: ',⍕i ∇
This is unholy, I assume the necronomicon is written in APL.
 

APLDevsAtWork.jpg
 
How do I print 01001000 01100101 01101100 01101100 01101111 00100000 01010011 01100001 01100001 01110010 to the terminal?
You must first start by anointing the sacred machine with poo and a sprinkling of ashes from half-burnt corpses dumped into the Ganges. Anyway, I found a bunch of fortunes related to APL:
Code:
(computers)
%
A little retrospection shows that although many fine, useful software systems
have been designed by committees and built as part of multipart projects,
those software systems that have excited passionate fans are those that are
the products of one or a few designing minds, great designers.  Consider Unix,
APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them
with Cobol, PL/I, Algol, MVS/370, and MS-DOS.
                -- Fred Brooks
%
APL hackers do it in the quad.
%
APL is a mistake, carried through to perfection.  It is the language of the
future for the programming techniques of the past: it creates a new generation
of coding bums.
                -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5
%
APL is a natural extension of assembler language programming;
...and is best for educational purposes.
                -- A. Perlis
%
APL is a write-only language.  I can write programs in APL, but I can't
read any of them.
                -- Roy Keir
%
Basic is a high level languish.  APL is a high level anguish.
%
Yea, though I walk through the valley of the shadow of APL, I shall fear no
evil, for I can string six primitive monadic and dyadic operators together.
                -- Steve Higgins
%
(perl)
%
So far we've managed to avoid turning Perl into APL.  :-)
                -- Larry Wall in <199702251904.LAA28261@wall.org>
%
Boss: You forgot to assign the result of your map!

Hacker: Dang, I'm always forgetting my assignations...

Boss: And what's that "goto" doing there?!?

Hacker: Er, I guess my finger slipped when I was typing "getservbyport"...

Boss: Ah well, accidents will happen.  Maybe we should have picked APL.
                -- Larry Wall in <199710311732.JAA19169@wall.org>
%
(cookie)
%
A little retrospection shows that although many fine, useful software systems
have been designed by committees and built as part of multipart projects,
those software systems that have excited passionate fans are those that are
the products of one or a few designing minds, great designers.  Consider Unix,
APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them
with Cobol, PL/I, Algol, MVS/370, and MS-DOS.
                -- Fred Brooks, Jr.
%
(songs-poems)
%
Those who sweat in flames of hell,      Leaden eared, some thought their bowels
Here's the reason that they fell:       Lispeth forth the sweetest vowels.
While on earth they prayed in SAS,      These they offered up in praise
PL/1, or other crass,                   Thinking all this fetid haze
Vulgar tongue.                          A rapsody sung.

Some the lord did sorely try            Jabber of the mindless horde
Assembling all their pleas in hex.      Sequel next did mock the lord
Speech as crabbed as devil's crable     Slothful sequel so enfangled
Hex that marked on Tower Babel          Its speaker's lips became entangled
The highest rung.                       In his bung.

Because in life they prayed so ill
And offered god such swinish swill
Now they sweat in flames of hell
Sweat from lack of APL
Sweat dung!
%
'Tis the dream of each programmer,
Before his life is done,
To write three lines of APL,
And make the damn things run.
%
 
∇ wordle l;⎕IO;g;i;s;w ⎕IO←i←1◊s←+/d∘.=w←l[?↑⍴l;]◊'Word: ',w now: ⎕←g←l[?↑⍴l;]◊→end⍴⍨g≡w◊i←i+1 l←(~∨/(l∊(~g∊w)/g))⌿l l←(((~g=w)/l)∧.≠(~g=w)/g)⌿l l←(((g=w)/l)∧.=(g=w)/w)⌿l l←((+/[2]l∘.=d)∧.≥s⌊+/d∘.=g)⌿l l←((+/[2]l∘.=d)∧.≤(6,⍳5)[1+(s<+/d∘.=g)×s⌊+/d∘.=g])⌿l◊→now end: 'Guesses: ',⍕i ∇
so true
 
Back