Does you K0Dë? Icode

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Does you K0Dë? Icode

#1 Post by Lobster »

Hi everyone, :D

I love programming languages :idea:
I am just a rubbish coder :roll: :oops:

Probably my favourite language is Python because it was invented by a snake :?

https://youtu.be/bY6m6_IIN94

I have tried some very obscure and even proprietary languages such as Curl and Swift. Ancient defunct languages such as Xbasic (my first Linux language)

Coding is the best puzzle game there is.

What's your game? Are you into AI? Gosh I was learning about quantum computing before they had viable processors
https://peace.fandom.com/wiki/Designers

[HEALTH WARNING: Coding can lead to madness] - nothing for me to worry about - already there :shock:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: Does you K0Dë? Icode

#2 Post by disciple »

Lobster wrote:Hi everyone, :D

I love programming languages :idea:
I am just a rubbish coder :roll: :oops:

Probably my favourite language is Python because it was invented by a snake :?
Really? Not THE LOBSTER PROGRAMMING LANGUAGE?

You can use it for scripting in Treesheets
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Thanks @disciple
I downloaded treesheets for Puppy8 and found it rather good. It has a primitive macro spreadsheet language of its own ...

Lobster is too hard for my limited neurons ... :oops:

I am looking at quantum programming languages again and am not impressed. :?

CLEARLY a quantum programming language should be able to reverse engineer ANY piece of code AND provide the most efficient route to its implementation.

That is what quantum computers are great at. Has anyone released such an open source possibility? Are the Chinese on the case?

Instead we are foisted with cloud based languages, that mean we provide code for free and the 'service' provider then has access to optimise our code using a more appropriate in house language. Pah!

Puppy Linux
perfectly formed to be more efficient
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#4 Post by williams2 »

provide the most efficient route to its implementation
Nature does this.
https://en.wikipedia.org/wiki/Quantum_biology

By the way,
Question: When is a cat a quantum object?
Answer: For all practical purposes, never.
I don't think that linking a macro object, like a cat, to a quantum object makes the cat a quantum object. It is still a macro object, it is still the same cat.

https://en.wikipedia.org/wiki/Schrodinger%27s_cat

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#5 Post by Lobster »

The transition of the quantum level to the macro is part of the difficulty of creating stable quantum processors.

Getting a cat to 'go quantum' is some way off ...
https://www.myscience.org/news/2019/sci ... 19-chicago
I was looking for Schrödinger's cat the other day, as I believe it is related to
the Surrey Puma and Silsden Beast, which exists ... yet doesn't :shock: :wink:

Meanwhile anyone try pyret?
https://www.pyret.org/

I like the elegance of that code ... 8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

(WARNING! TOO LONG; DON'T READ!)

Hi Lobster,

Because this message contains little of general interest to the Puppy community, I thought that rather than post it in your thread, I should relegate it to a PM.
:?: ¿Que?
Someone kindly posted a Private Message about their programming history and preference.
I found it very interesting.
Hopefully they will post it here ... 8)

... meanwhile I always need a gui, gtk was helpful for this.
GTK 3 or whatever it was finally called, was superseded by zenity and Yad ... ideal for the raspberry pi 4 ...

Yad is relatively easy to use. I have always like bashscript plus a simple gui ... :D

Puppy Linux
Dorge Programming
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#7 Post by 6502coder »

Okay. With a few minor edits, here's the PM Lobster mentioned. I hesitated to make it a post because it's nearly all just personal opinion.

Q1. Do I code?
Yes. As my member name "6502coder" implies, I code. :wink:

Q2. My favorite language?
That's a toughie. The languages in which I've slung code include: 6502 assembler, ALGOL-W, APL, AWK, Bash, BASIC (several dialects), Bob, Bourne Shell, C, C++, FORTH, Fortran (IV and 77), J, Java, Javascript, LISP, MIX, Modula II, Pascal, PL/I, Python, Ruby, S-Plus, RATFOR, Ruby, Smalltalk, WATFIV, and X-LISP. I've probably overlooked a few, and I've left out a couple of languages of my own invention.

On the other hand, there ARE languages I refused to touch with a ten-foot pole: these include ADA, Algol68, Scheme, Perl, Prolog, and C#.

BTW, although I've included Bourne Shell and Bash in the list above, I personally do not consider shell languages such as Bash, Bourne shell, ash, csh, tsh, dash, etc. to be true programming languages. To me, there's a line between scripting languages (such as Bash etc), and true programming languages (such as C). All scripting languages are very limited in speed, maintainability, and breadth of application compared to true programming languages. AWK is a borderline case, perhaps being more a scripting language than a true programming language, but having very wide application simply because text processing problems are so common. On the other hand, people who say Python is a scripting language rather than a true programming language do not understand the distinction.

C is by far the language I've used the most. I started programming in C back in 1978. Over the course of my professional career I've written several hundred thousand lines of C code, so by now I more or less think in C anytime I tackle a new programming task. It's my go-to tool for anything that has to be done at the byte level.

AWK is probably the most fun for me. I use it for anything that involves processing a bunch of text, and also for lot of the stuff that other people do in Bash. My Puppy Newsletter Index Sorter application is written in AWK. FORTH is another fun language. I had a great time playing with FORTH on the Atari 800, but on modern PCs FORTH is pretty useless.

Most of the coding I do these days is implementing simple games. For this I use Javascript. Javascript lets you use OOP (object-oriented programming) without shoving it down your throat, and is great at string manipulation, such as generating sentences in Adventure/ZORK/CYOA-style text-based games. It's also much easier to implement a simple GUI in HTML and Javascript than to mess with GTK and other C-based GUI toolkits. I contributed a game in Javascript to the Puppy Newsletter.

For stuff that requires a more sophisticated GUI, I like Python plus Tk/Tcl. For example, I once implemented a dual-pane filemanager in Python (sort of like Midnight Commander), because I wanted an MSDOS-style filemanager that would support the longer filenames in WinXP.

So, my "favorite" programming language is AWK...or C...or Javascript...or Python, depending on the application.

BTW Pyret is interesting, thanks for mentioning it! Being neither a beginning programmer nor a teacher of such, I don't really have much use for it, but I do like the elegant syntax, and--in stark contrast to too many recent programming languages (yes, I mean YOU, Rust, Swift, and Julia)--it has a rational and clearly articulated justification for burdening us with Yet Another Programming Language.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

6502coder wrote:Okay. With a few minor edits, here's the PM Lobster mentioned. I hesitated to make it a post because it's nearly all just personal opinion.
:D Thanks @6502coder 8)

In a sense it all is personal opinion. If we want impersonal opinion we can talk to Siri [or Sorry as I believe (IMHO) it should be pronounced ...]
or Alexa Sale [not ye olde British comedian ...]
Q1. Do I code?
Yes. As my member name "6502coder" implies, I code. :wink:
You code for the 6502 CPU ... My first computer used that chip ... The BBC ... Great BASIC based on Modula-2 ... There used to be a snobbery against BASIC but it is very useful. I think we still have a compiled one in the DVX?
Q2. My favorite language?
That's a toughie. The languages in which I've slung code include: 6502 assembler, ALGOL-W, APL, AWK, Bash, BASIC (several dialects), Bob, Bourne Shell, C, C++, FORTH, Fortran (IV and 77), J, Java, Javascript, LISP, MIX, Modula II, Pascal, PL/I, Python, Ruby, S-Plus, RATFOR, Ruby, Smalltalk, WATFIV, and X-LISP. I've probably overlooked a few, and I've left out a couple of languages of my own invention.
Ah ... Bob was a new one for me ...
http://www.drdobbs.com/open-source/bob- ... /184409401

Few others new to me which I will look up ... :)
On the other hand, there ARE languages I refused to touch with a ten-foot pole: these include ADA, Algol68, Scheme, Perl, Prolog, and C#.
I looked at Perl for some reason and then found a better/more modern alternative ...
The first language I touched with a five foot barge pole was smalltalk. I was intrigued by it. The first language I wanted to learn. Sadly the implementation on the computer I had was atrocious. Gave up ... and then as warned, I got into 'bad' habits with Pascal that made it impossible to understand Smalltalk (Squeek) though I tried extensively. I had been warned that Smalltalk was unique ... Pascal was a great language (I learned Turbo Pascal) compiled code as fast and efficient as C but much simpler because you got blocks of code (procedures) to work. All the versions of Pascal I have come across on Linux ... not really for me ...
C is by far the language I've used the most. I started programming in C back in 1978. Over the course of my professional career I've written several hundred thousand lines of C code, so by now I more or less think in C anytime I tackle a new programming task. It's my go-to tool for anything that has to be done at the byte level.
My god you think in C. You might like this film/documentary about someone who dreams in Sushi ...
en.wikipedia.org/wiki/Jiro_Dreams_of_Sushi
AWK is probably the most fun for me. I use it for anything that involves processing a bunch of text, and also for lot of the stuff that other people do in Bash. My Puppy Newsletter Index Sorter application is written in AWK. FORTH is another fun language. I had a great time playing with FORTH on the Atari 800, but on modern PCs FORTH is pretty useless.
Yes I looked at FORTH, however I did not have a telescope big enough to move it ..
Most of the coding I do these days is implementing simple games. For this I use Javascript. Javascript lets you use OOP (object-oriented programming) without shoving it down your throat, and is great at string manipulation, such as generating sentences in Adventure/ZORK/CYOA-style text-based games. It's also much easier to implement a simple GUI in HTML and Javascript than to mess with GTK and other C-based GUI toolkits. I contributed a game in Javascript to the Puppy Newsletter.
That is interesting. Javascript is one of the languages I refused to use because its early versions were buggy, vulnerable and frankly a danger to cyberkind IMHO.
For stuff that requires a more sophisticated GUI, I like Python plus Tk/Tcl. For example, I once implemented a dual-pane filemanager in Python (sort of like Midnight Commander), because I wanted an MSDOS-style filemanager that would support the longer filenames in WinXP.
Yes Python, linking it to a GUI has always seemed much harder than it should be ...
So, my "favorite" programming language is AWK...or C...or Javascript...or Python, depending on the application.
You are a programming polyglot :)
BTW Pyret is interesting, thanks for mentioning it! Being neither a beginning programmer nor a teacher of such, I don't really have much use for it, but I do like the elegant syntax, and--in stark contrast to too many recent programming languages (yes, I mean YOU, Rust, Swift, and Julia)--it has a rational and clearly articulated justification for burdening us with Yet Another Programming Language.
Pyret reminds me of Curl ... very simple ... Curl was/is amazing, being able to ray trace in real time ...
Tee hee, did learn some Swift (best tutorials, using game design from Apple)
You probably did not like Vala and Genie?
http://wikka.puppylinux.com/ValaGenieintro
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#9 Post by 6502coder »

Well, since I'm being given license to spew incendiary insults at everyone else's favorite languages...
There used to be a snobbery against BASIC but it is very useful. I think we still have a compiled one in the DVX?
There's a whole thread where us BASIC-diehards have been hanging out:
http://www.murga-linux.com/puppy/viewto ... 849#961849
I looked at Perl for some reason and then found a better/more modern alternative ...
Long before I discovered Perl, I'd already learned AWK and was using it for most of the things Perl does. Perl does more, but not enough to motivate me to learn it, and the syntax is awful. APL code is cryptic and exotic, but Perl code just looks like random noise.
The first language I touched with a five foot barge pole was smalltalk
And you lived to tell the tale!

Smalltalk: 'Everything is an object. 1 is an object. You don't just "add" 1 plus 1. Instead, you send the first 1-object an "add" message along with the second 1-object. The first 1-object takes the second 1-object and invokes its (the first 1-object's) "add" method on the second 1-object, instantiating a 2-object.' Okay, that's a parody...but not by much.
Yes I looked at FORTH, however I did not have a telescope big enough to move it ..

Atari arcade game machines were programmed in FORTH (a version aptly named "Coin-Op Forth" for "coin-operated game machine") . So even without a telescope, you may have USED Forth without knowing it.
Javascript is one of the languages I refused to use because its early versions were buggy, vulnerable and frankly a danger to cyberkind IMHO.
I'd never use Javascript on a large, multi-person software project. That's sheer insanity, due to the lack of type-checking and namespace management. But for hobbyist stuff, it's great. And all my Javascript programming is client-side, not server-side. None of my Javascript projects require or use an internet connection.

The real "danger to cyberkind" comes from the well-meaning people who try to remodel Javascript into a proper systems programming platform, which it just aint fit to be. Sort of like electronic cigarettes. Better to just say no.

Yes Python, linking it to a GUI has always seemed much harder than it should be ...
I prefer to get by with Xdialog whenever possible, and failing that, yad. I turn to Python+Tk/Tcl only for stuff with a really complex GUI, and if the GUI really is complex, there is an irreducible amount of housekeeping that just can't be avoided, unless you're willing to live with somebody else's prefabricated design. Whether it's GTK or Tk/Tcl or Motif or the Amiga's Intuition, the amount of tedium in specifying "put a button in the second column of the third row of widgets, drop-shadowed, left-justified, non-expanding" has been pretty much constant. The words change, but it's the same song.
You probably did not like Vala and Genie?
I gave them a look, as I did also BaCon. The problem with them is ME. I'm just not a GUI guy, and most of the benefit of these OOP languages is realized in GUI development (at least, that's the area of intersection with the kinds of projects I'm interested in). I believe that a non-trivial GUI usually entails an amount of programming work that is disproportionate to the benefit it adds. I'd rather spend the effort on making the app more useful, or more reliable, than on making it prettier.

I would not say I dislike Vala or Genie or BaCon. I would say that I did not find them to provide sufficient incremental power to my toolkit to justify the effort of adopting them.
You are a programming polyglot

Yes, I'm able to cause core dumps in many languages!

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#10 Post by Lobster »

You might find this of interest
meanwhile ...

I have always believed that so called AI should be used not to only to 'understand' human language but to understand coding languages.
This does not mean the rather primitive efforts to autotype your keywords but to examine working code and display it in a variety of styles, until we have a common interfacing language ...

Easy for machine and human to comprehend ...

Is it too much to ask for?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
NeroVance
Posts: 201
Joined: Wed 10 Oct 2012, 23:00
Location: Halifax, Canada

#11 Post by NeroVance »

I've always been a Tcl kind of guy, but honestly I've been thinking of moving to Python. Decent amount of support, highly understandable code and the people who use it typically know how to use the toilet (here's looking at you Java)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#12 Post by Lobster »

I should stick with one language (Python is excellent) :shock:

... instead I am reading (again) the excellent Dummies guide to C
and before I have barely begun getting and using the recommended CodeBlocks IDE,
I am already trying to install a GUI creating plug in ... :oops:

Should stick to a bit of running from C from Cli C as @6502coder mentions ...
So many languages, so little time ... :D
http://wikka.puppylinux.com/PuppySchoolProgramming
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#13 Post by Lobster »

If you have a spare kid to program, try Scratch 3 ...
Basically a visual slot-code-blocks-together and run (there is a java compiler available).
Suitable for five year olds and idiot crustaceans ...

https://www.media.mit.edu/projects/scra ... /overview/

Easy to learn and I created a random audio file player with great ease ...
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#14 Post by Lobster »

Here is the adult version of scratch ... Snap! :D
https://snap.berkeley.edu/

Snap! is a broadly inviting programming language for kids and adults that’s also a platform for serious study of computer science.

https://youtu.be/xfHJZ2zWpjQ

Puppy Linux
Geeks 'r Us
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#15 Post by 6502coder »

Snap! immediately reminded me of Turtle graphics in Logo. A quick google on turtle graphics then led me to this, Turtle graphics in Python
https://www.geeksforgeeks.org/turtle-pr ... ng-python/
https://repl.it/languages/python_turtle

All very cute but still just variations on the original Turtle graphics in Logo, IMO.

User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

#16 Post by nosystemdthanks »

ive had the pleasure of helping people learn how to create their own working programming language.

i would encourage lobster to think of 5 to 10 commands he would enjoy using.

its easier to parse text and translate to working program code than most people think. sure, in the 80s it was all about creating bytecode and writing machine code, lots of compilers translate to intermediate languages now-- even someone of lobsters allegedly modest talent could do it. (especially by forking an existing language.)
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#17 Post by musher0 »

Hi Lobster.

Stick to bash and associates ( awk, sed, regex codes, ANSI codes )

Learn what the included GNU/Linux commands are and do, their parameters,
and how to pipe them to good effect.

That'll be plenty on your plate, and you'll be able to do a lot.
(But not influence the behavior of quantum cats!)

Since bash is a meta-language, you can write a bash script using ordinary
human language logic.

My 2¢.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#18 Post by Lobster »

Thanks for useful advice GUISE, here is my favourite LOGO
https://en.m.wikipedia.org/wiki/NetLogo

... elsewhere I note puppybasic is being revived ...
http://www.murga-linux.com/puppy/viewto ... 21#1037721
http://wikka.puppylinux.com/PuppyBasic
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Computer semi-expert
Posts: 61
Joined: Tue 09 Jul 2019, 14:38
Location: State of Confusion

#19 Post by Computer semi-expert »

As my avatar indicates, I program in C++. I also know a tiny bit of other assorted languages, but not enough to do anything (or at least anything major). I do the vast majority of my programming on Windows.

Post Reply