hardkorebob

joined 5 months ago
[–] hardkorebob@programming.dev 0 points 3 months ago* (last edited 3 months ago)

No to Python, Go, Lisp and C to begin. In fact at this level you just need to get a feel for process. You need to start where u feel attracted to. You need to learn principles and not languages nor frameworks. Im surprised not one of the replies gives an accurate picture of what it entails to think like a computer. Computation is not an efficient brain like a humans. It was made to work with the hardware we invented long ago. You have to learn the rudimentary and boring repetition the machine HAS to do so it can appear as a real memorable entity. A practical suggestion is to go install Linux From Scratch. When you complete that journey you will have a taste of some principles. Then I also suggest to simply rewrite character for character kilo.c. Why? So you learn how much a pain and a workout it is to crunch at the keyboard. Learn by doing. Learn by breaking and briking. Go find a game u love with all ur being and reverse engineer it. Who cares what u know at the moment, the goal is the process not the result and besides nothing is ever finished, just get it done. One baby step at a time. Oh and dont ask any more questions. All of those have been asked, its our jobs to find the answer. Please take all this as a simple nudges. None is written with any ill will, trolling nor negativity. Take away the knowledge not the pressumed attitude behind my words. Forget the internet and just dive into it. Another way is to pay some pro to mentor you. Good luck with that since most persons are too busy and are elite. Whatever u want to learn has to be done in the spirit of neglect. You cant care too much about computation. It is just a process for making fragmented business. No one NEEDS software nor money. We all agree to play these nonsensical games. Have fun and be grateful for the process itself. Good journey to you friend! Its a weird one. Ive been at it for 35 years and Im still a newbie.

PS The internet is filled with info. Its your job to determine the knowledge and not the judgement on the worth of the person who posted it. Too much drama and toxicity because everyone at the top of the food chain is pushing that vibe. Everyone everywhere is complaining about our violent ways, how we write to each other online and how we are all being subhuman. Peace to all!

#allerrorsmatter #cod-ape

[–] hardkorebob@programming.dev 1 points 3 months ago (1 children)

Yes my point doesnt need to be made. I deleted that.

[–] hardkorebob@programming.dev 2 points 3 months ago* (last edited 3 months ago)
Meta [
	Title:   {Fizz Buzz math "game"}
	Author:  "Kaj de Vos"
	Rights:  "Copyright (c) 2021,2022 Kaj de Vos"
	License: {
		PD/CC0
		http://creativecommons.org/publicdomain/zero/1.0/
	}
	Notes: {
		https://en.wikipedia.org/wiki/Fizz_buzz
		https://wiki.c2.com/?FizzBuzzTest
		https://www.rosettacode.org/wiki/FizzBuzz
	}
]

For counter 100 [                                   ; Count to 100
    Third?: unless modulo counter 3 [write "Fizz"]  ; Display "Fizz" every third count; remember whether we did

    Any [
        unless modulo counter 5 [write "Buzz"]      ; Display "Buzz" every fifth count
        third?                                      ; Remember earlier result
        write counter                               ; Display the number if not third or fifth
    ]
    Write " "                                       ; Separate the displayed items
]
Write new-line
13
submitted 3 months ago* (last edited 3 months ago) by hardkorebob@programming.dev to c/programming@programming.dev
 

Examples of an interesting computer programming paradigm.

 

Please enjoy my mind contraptions for learning purposes.

pnk.lang is a DSL made in Shell Script that compiles to Python. Abstracting indentation and category of functions into colors[capital letters] using the tag_add method from tkinter. For me it reduces cognitive load and also you write much less Python boilerplate.

shimky is the IDE for pnk.lang built in pnk.lang. It has some vim behaviors/modes/commands and an internal bash shell/command line, an mp3 player[mpv] and a youtube music downloader command line. Paste a URL and hit Ctr-n and you get a refreshed mp3 list with new mp3 renamed for POSIXish.

Here I made a small pnk.lang IDE for Red using shimky. ;)


Get shimky/pnk.lang : https://github.com/dislux-hapfyl/shimky

Get Red: https://github.com/red/red

#allerrorsmatter #hacktheplanet #redlang #ahdahwm

[–] hardkorebob@programming.dev 1 points 3 months ago* (last edited 3 months ago)

Woeks well on:

OS: Fedora Linux 40 (Forty) x86_64 :: i3 Edition

Host: OptiPlex 9010

Kernel: 6.8.5-301.fc40.x86_64

CPU: Intel i7-3770S (8) @ 3.900GHz

GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590

Memory: 1955MiB / 19862MiB

Runs Ghostrunner on Steam very well for old hardware.

[–] hardkorebob@programming.dev 4 points 3 months ago

Fork it and Make Pull Request. 👍

 

A Shell DSL that transforms into Python.

I created this IDE to spin up Tkinter UIs or anything Python with less boilerplate and rich cognitive and efficiency shortcuts: for me, I think this tool helps me prototype GUI apps quicker with less characters typed so less effort.

I would love to take this further if I could get anyone interested. Thanks.

https://github.com/dislux-hapfyl/shimky

PD: Both Titles are Correct

 

A Shell DSL that transforms into Python.

I created this IDE to spin up Tkinter UIs or anything Python with less boilerplate and rich cognitive and efficiency shortcuts: for me, I think this tool helps me prototype GUI apps quicker with less characters typed so less effort.

I would love to take this further if I could get anyone interested. Thanks.

https://github.com/dislux-hapfyl/shimky

[–] hardkorebob@programming.dev 3 points 3 months ago

Yeah! What he said!

[–] hardkorebob@programming.dev 1 points 4 months ago

I am a n00b so I really dont have fandom. I just learning and sharing. No offense taken.

[–] hardkorebob@programming.dev 1 points 4 months ago (2 children)

Check out my DSL I made for Python in Shell. https://github.com/dislux-hapfyl/shimky I checked out all your projects on GitHub. You are a Super Programmer for sure.

[–] hardkorebob@programming.dev 1 points 4 months ago (4 children)

Man I C this Perl is so awesome! Thanks for this cool tool!

[–] hardkorebob@programming.dev 2 points 4 months ago

I wanna make some cool stuff. I just need some other hackers like me. LOL

 

This code is a highly abstracted and unconventional script that appears to be for generating Python code using Bash shell script constructs within a shell scripting context, translating them into Python code generation. Here's a breakdown of what different parts of the script do:

Function Definitions:

The script defines several functions (ZDimp, ZDas, ZDshebang, etc.) that output Python code. Each function generates specific parts of Python code, like imports, class definitions, and method definitions. Functions like ZFtoorwin, XIcv, and ZDcld are used for generating more complex constructs like class instantiation and method invocation within classes. Control Structures:

It includes shell-based control structures to create conditional (if, elif, else) and looping constructs (for, while) in the generated Python code. The constructs use a mix of direct shell commands and placeholders for Python code, indicating that the script likely works alongside other tools or scripts that provide inputs dynamically. Instance and Function Call Generation:

Functions for setting instance variables (ZIfv, YIfv, etc.) and making function calls (ZFfc, YFfc, etc.) dynamically build Python code that manipulates class instances and calls methods. These functions are versatile, allowing for different indentation levels and conditions to be specified dynamically. Utility Operations:

Functions like XFshsp, XFpyev, and others handle subprocess execution, text manipulation, and variable assignment within the generated Python environment. These functions are intended to be flexible and reusable across different parts of the generated code, indicating a modular approach to code generation. Error Handling and Debugging:

The script includes structures for try-except-finally blocks (XKtry, XKexcp, XKfin), allowing generated Python code to handle exceptions effectively. This suggests that the generated code is expected to run in environments where robust error handling is necessary. In summary, this Bash script serves as a meta-programming tool that dynamically generates Python code. It abstracts Python programming constructs into shell script functions, allowing the script writer to generate complex Python applications using shell command syntax. This approach is unconventional and seems tailored for specific use cases where such a level of abstraction is beneficial, perhaps in automated code generation tools or educational environments where showing the transformation of simple commands into Python code can be illustrative.

 

https://github.com/dislux-hapfyl/shimky

This code is a highly abstracted and unconventional script that appears to be for generating Python code using Bash shell script constructs. It mimics object-oriented programming concepts within a shell scripting context, translating them into Python code generation. Here's a breakdown of what different parts of the script do:

Shebang and Author Information: The script starts with a shebang for Bash, and author details are provided in a comment.

Global Variables:

Various variables are set for use within the generated Python code, such as bg for background color, datenow for the current date and time, px and py for padding values, etc. S, E, and _ are shorthand for self, echo, and expr respectively, simplifying the syntax for commonly used operations. Function Definitions:

The script defines several functions (ZDimp, ZDas, ZDshebang, etc.) that output Python code. Each function generates specific parts of Python code, like imports, class definitions, and method definitions. Functions like ZFtoorwin, XIcv, and ZDcld are used for generating more complex constructs like class instantiation and method invocation within classes. Control Structures:

It includes shell-based control structures to create conditional (if, elif, else) and looping constructs (for, while) in the generated Python code. The constructs use a mix of direct shell commands and placeholders for Python code, indicating that the script likely works alongside other tools or scripts that provide inputs dynamically. Instance and Function Call Generation:

Functions for setting instance variables (ZIfv, YIfv, etc.) and making function calls (ZFfc, YFfc, etc.) dynamically build Python code that manipulates class instances and calls methods. These functions are versatile, allowing for different indentation levels and conditions to be specified dynamically. Utility Operations:

Functions like XFshsp, XFpyev, and others handle subprocess execution, text manipulation, and variable assignment within the generated Python environment. These functions are intended to be flexible and reusable across different parts of the generated code, indicating a modular approach to code generation. Error Handling and Debugging:

The script includes structures for try-except-finally blocks (XKtry, XKexcp, XKfin), allowing generated Python code to handle exceptions effectively. This suggests that the generated code is expected to run in environments where robust error handling is necessary. In summary, this Bash script serves as a meta-programming tool that dynamically generates Python code. It abstracts Python programming constructs into shell script functions, allowing the script writer to generate complex Python applications using shell command syntax. This approach is unconventional and seems tailored for specific use cases where such a level of abstraction is beneficial, perhaps in automated code generation tools or educational environments where showing the transformation of simple commands into Python code can be illustrative.

 

cross-posted from: https://programming.dev/post/12104901

https://github.com/dislux-hapfyl/pynksh

Writing functional shell snake code to improve my sanity.

view more: next ›