ridiche,

I don’t see the problem

bandwidthcrisis,

Leaning to program on 8-bit machines with 8k of RAM means that even today I abbreviate names.

Plus it was accepted wisdom that shorter variable names were faster for the BASIC interpreter.

vox,
@vox@sopuli.xyz avatar

variables don’t make it to the compiled binary tho, except debug symbols of course if have those enabled (but deploying them to an embeeded system is a terrible idea, they can remain on the host system)

oh you mean on not for

bandwidthcrisis,

Yeah for interpreted BASIC.

But even after moving to writing assembly language on a separate PC devkit there was still the habit of using short names.

I think that some assemblers had limits on name size.

Trainguyrom,

Hey, this must be that self-documenting code I keep hearing about

VeganCheesecake,

Comments are for Suckers.

LinearArray,
@LinearArray@programming.dev avatar

im scared

istanbullu,

I approve. All code should be like this

sqw,
@sqw@lemmy.sdf.org avatar

rage bait

testeronious,

Cleanest code by Unclest Bob

xmunk,

Obviously, we can’t allow code like that - PascalCase is heresy… camelCase that shit.

TrippaSnippa,

snake_case gang represent

CCF_100,

My ASDV professor has two moods: He either names variables like this post, Or he names variables pp (for pointer pointer)

robojeb,

Fuck for some reason pp is giving me flashbacks to having to write using Hungarian notation variable names.

Hupf,
mectag,

It’s an unwritten rule that there‘s always a fitting xkcd post

tourist,
@tourist@lemmy.world avatar

lgtm

merged

xmunk,

I’m assigning all my PRs to you, buddy, your performance metrics will be over 9000!

RatBin,

Why not leave comments

bAZtARd,

Why leave comments?

mspencer712,

Ugh, this makes me want to “slash slash slash.”

hardkorebob,
MicrowavedTea,

I’d ask what I’m looking at here but feel I might regret it

hardkorebob, (edited )

In Oct’23 a basic Text widget with Subprocess to run shell commands allowed me to take my command line fu into a different arena because Tkinter gave me special tricks. This tool (shell functions) allows me to type up GUI apps or any Python script with less effort, for my fingers and brain.

wc newide; ksh newide | wc

513 1671 11018 newide in pnk

604 1987 29867 newide in python

The blocks of color are capital letters colored using tkinter methods (tag_add & tag_configure) with a bg and fg of the same color to make it look like a lego block, it’s all ASCII. On the right, an idle clicker game/toy made with pnk.lang, also just ASCII/UTF-8. The IDE you see in the pic also was coded using functional shell language I call pnk.lang and the original first iteration of this specification is in the legacy folder in the repo below. Just me learning how to code faster in Python but in shell but in neither at this point.

github.com/dislux-hapfyl/pynksh

www.reddit.com/r/pnk/

Don’t be put off by Ksh because Bash can also interpret it, since it’s just shell functions that print Python code. But I have plans to use an Xbox controller so I can move away from building with the keyboard at piecemeal rates. I will do this by abstracting away identifiers and all data we use as engineers into “dictionaries” to then transform it into a spatial system. I already done this first step! Using a basic grid with a maximum of 10 rows x 3 cols, indexing row[0-9] col[0-2], as you see there on the left side, and by using a letter I then categorize the functions of pnk(shell+python) so I can have 30 x 26[a-z] available slots; a00 b11 k22 and so on…by making it a visual shortcut that reduces cognitive load and typing for me.

Take a closer look at my repo without dismissing it too quickly. It could seem unnecessary but maybe someone else can see what I have made as useful and how we gonna take it to higher levels of abstraction and create a new realm for making computer applications in an abstract game/IDE of art and code. Perhaps it’s that creator effect that happens when you make something for the first time that makes me see its future utility and appeal. All this was made incrementally using my own software I built from scratch. I do have a great vision and would love to speak to anyone who is interested. I also demonstrate the utility of this small tool on youtube[link in repo]. Thanks.

MicrowavedTea,

Ok I don’t completely get the use case but that’s…impressive. Thanks for the detailed explanation and good luck moving it forward

hardkorebob,

Thanks a lot! ;) … maybe also see my reply above.

kralk,

I’m somehow more confused

hardkorebob, (edited )

I write python in shell. Literally. I made a shell function file (pnk.lang) that prints correct python code. The capital letters in the shell function’s name, my Tkinter IDE turns into color as you see above. So I let the color (capital letter) abstract away indentation for my brain. The second letter is for category of python code according to me. Again using color to allow me to think. I dont like Python syntax. I looks ugly to me. So I made this tool to make coding colorful, succint and fun for me. It reduces my eye strain among many other personal benefits.

S=self

E=echo

#Z=“” #0

Y=" " #3

X=“$Y$Y " #7

W=”$Y$X "

V=“$Y$W "

U=”$Y$V "

YDfd() {


<span style="color:#323232;">typeset z="$1"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    typeset nn="$2"
</span><span style="color:#323232;">
</span><span style="color:#323232;">typeset cc="$3" 
</span><span style="color:#323232;">
</span><span style="color:#323232;">if [[ $z == z ]]; 
</span><span style="color:#323232;">
</span><span style="color:#323232;">then
</span><span style="color:#323232;">
</span><span style="color:#323232;">	$E "$Y def $nn(${S}$cc):"
</span><span style="color:#323232;">
</span><span style="color:#323232;">else
</span><span style="color:#323232;">
</span><span style="color:#323232;">	$E "$Y def $nn($cc):"
</span><span style="color:#323232;">
</span><span style="color:#323232;">fi
</span>

}

YDdefe() {


<span style="color:#323232;">typeset fn="$1"
</span><span style="color:#323232;">
</span><span style="color:#323232;">YDfd z $fn ,e=None
</span>

}

YDdefe addNew

XIcv $ap Pnk

XFpk $ap 1 both

XFfc zz pw.add $ap

turns into


<span style="color:#323232;">def addNew(self,e=None):
</span><span style="color:#323232;">    self.appinstance = Pnk(self,)
</span><span style="color:#323232;">    self.appinstance.pack(expand=1,fill="both",padx=2,pady=2,)
</span><span style="color:#323232;">    self.pw.add(self.appinstance)
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • tacticalgear
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • Youngstown
  • ngwrru68w68
  • slotface
  • everett
  • rosin
  • thenastyranch
  • kavyap
  • GTA5RPClips
  • tester
  • JUstTest
  • modclub
  • cubers
  • ethstaker
  • mdbf
  • khanakhh
  • Durango
  • normalnudes
  • Leos
  • cisconetworking
  • anitta
  • provamag3
  • megavids
  • lostlight
  • All magazines