Programming language geek-out

Non-spam and Anime things that don't fit in C&C. Also where talk that you don't want to turn into spam goes. So No Spam allowed

Programming language geek-out

Postby Té Rowan » Sun Jun 08, 2014 6:15 pm

(Anyone in the future whining about necroing will automatically be flamed. The probability of said flaming being literal is, while small, non-zero.)

Why Python? Why not? I'm a beginner at Python, but I still managed to put together in a day or so a working program that slurps in author files grabbed from the-archive-that-must-not-be-named and spits out new ones in the old HTML4+Javascript form. I built a workflow around that form, y'see, that lets me update my library once a month with material from there.
A government is the only known vessel that leaks from the top. (James Reston)
Té Rowan
User avatar
Prism Power Senshi
Posts: 3047
 

Re: Programming language geek-out

Postby Cheb » Thu Jun 12, 2014 4:36 am

While I personally am averse of python, the general principle is this: Everything that mov.. gets the job done!

If it works for you, use it! Just be aware of its limitations. Every language does have its cap that won't allow your project to grow beyond some limits.

C++ is the best to utilize hardware resources, but it won't allow you making multi-platform applications without a Herculean effort.
Javascript is perfectly multi-platform but your program will never get out of the browser application ghetto.

And so on.

P.S. I love Javascript. It does have its share of weird mechanics, but overall it's the most free-form language I saw. Just don't forget to do everything using objects.
Pascal is better than C++ in that it is smaller and simpler and takes much less time to truly master. But boy, it's such a grammar nazi.
php. Yeech. Blarg. Gets the job done, though. If you work with small sets of simple data, utilizing the hardware at 1/20th of its capacity.
Proud owner of 1.5 kilograms of Germanium transistors
Cheb
User avatar
Moon Senshi
Posts: 1549
 

Re: Programming language geek-out

Postby PCHeintz72 » Thu Jun 12, 2014 4:39 pm

I never bothered with Python, but that is more a matter I've never needed it than any aversion to it.

I've been programming a long time. I know DOS/Windows Batch, Basic, Pascal, C, C++, a tiny bit of C#, Installshield (its programming language that is), Visual FoxPro, Visual Basic, SQL and a few other languages that have been custom to my workplaces over the years, including one that used Reverse Polish notation.


As for grab and update of fan fiction stuff... I do not use Python for it, but have heard it is great for stuff like that. My own setup is written in of all things Free Pascal, though I could port it to something else easily enough. I did that because at the time I was experimenting with what it could do, and decided to challenge myself to write my own Lister reporting program in it. I learned Pascal back in early 90's though, so the language was not new to me, just the Free Pascal variant.
PCHeintz72
User avatar
Prism Power Senshi
Posts: 2736
 

Re: Programming language geek-out

Postby Spica75 » Thu Jun 12, 2014 8:21 pm

I learned Pascal back in early 90's though, so the language was not new to me, just the Free Pascal variant.


That reminds me, what available free languages are there?

Once upon a time i found something called Asic that someone had put together by himself, a variation on Basic with it´s own compiler to avoid running the compiler with the program like original basic.
Was really quite good, if it had been able to use multidimensional arrays(and graphics) i would probably still be using it. The AI i wrote for my simple demonstration rock, paper, scissors game was surprisingly good, thanks to how easy it was to program with Asic.


I've been programming a long time. I know DOS/Windows Batch, Basic, Pascal, C, C++, a tiny bit of C#, Installshield (its programming language that is), Visual FoxPro, Visual Basic, SQL and a few other languages that have been custom to my workplaces over the years, including one that used Reverse Polish notation.


Me, it´s more of a "I programmed a long time ago", mostly at least. I don´t really remember much of Pascal and Windows Batch, nor the tiny bit of C i once learned, and certainly not of the Amiga Assembler or machinecode for C=128, despite that i did a fair amount of neat things with both of those. Sadly, what i could still whip up a program in today without messing up, is probably just Basic 7.0, maybe GWBasic with Basic 2.0 a remote possibility.
Spica75
User avatar
Prism Power Senshi
Posts: 2399
 

Re: Programming language geek-out

Postby PCHeintz72 » Thu Jun 12, 2014 11:08 pm

That reminds me, what available free languages are there?

There are a number of them, but the main issue is compilers today are *not* like the ones of 20 years ago... Languages are far more extensive and sophisticated. Thus much harder to be made by a single individual.

Earliest languages I can think of off hand I did was GWBasic and Atari Basic.

Try this link:

List of open-source programming languages
- http://en.wikipedia.org/wiki/List_of_op ... _languages

Sadly, what i could still whip up a program in today without messing up, is probably just Basic 7.0, maybe GWBasic with Basic 2.0 a remote possibility.

Basic 7.0 is really just a hop skip and a jump to Visual Basic for DOS (Yes, there *was* a short lived DOS variant of Visual Basic, and yes I did have a copy). I made a interesting Joystick calibration program in it, among other things while experimenting with its capabilities. The Windows one had more restrictions in how stuff could be done.
PCHeintz72
User avatar
Prism Power Senshi
Posts: 2736
 

Re: Programming language geek-out

Postby Spica75 » Fri Jun 13, 2014 8:45 am

Try this link:

List of open-source programming languages


Thx. Darn, that´s a lot more than i thought there would be.

Basic 7.0 is really just a hop skip and a jump to Visual Basic for DOS (Yes, there *was* a short lived DOS variant of Visual Basic, and yes I did have a copy).


Yeah, but while i spent several years playing around with the C=128s 7.0, my attempts at Visual Basic were severely stifled by lack of good documentation.

It seems noone nowadays can actually just provide a "this command makes this thing happen, and here are the options and switches for it" tutorial or even list of commands. The manual i got with the C128 had an excellent, loooong chapter like that, going over every single command well enough that i could figure out how to use it properly in code and then some examples how to combine it best.

But ever since objectbased coding became all the rage in the 90s, it´s just utter crap, pages upon pages of text about the structure this or that or discussing theory(what?), listing a chunk of code and saying what it does in total, but not what the individual lines do, insanely stupid, and completely useless.

*uarghh*

What´s the point of understanding what a block of code does if can´t find out what parts to change to make my own code?

Please excuse the rant... But all those bad books pretty much caused me to quit my attempts at learning more "modern" programming out of sheer self preservation.
Spica75
User avatar
Prism Power Senshi
Posts: 2399
 

Re: Programming language geek-out

Postby Spokavriel » Fri Jun 13, 2014 10:56 am

Just your description of those books has me thinking about seeing what I could encode in pure machine code. Math remains math behind all of this.
Image
Spamville Character ProfileArchived Current Senshi of Ophelia (Uranus VII).
My Console Video Games
Spokavriel
User avatar
Eternal Power Senshi
Posts: 47773
 

Re: Programming language geek-out

Postby Cheb » Sat Jun 14, 2014 5:43 am

Still, OOP is the best way to organize things. Sometimes it's the only way.
Proud owner of 1.5 kilograms of Germanium transistors
Cheb
User avatar
Moon Senshi
Posts: 1549
 

Re: Programming language geek-out

Postby Spica75 » Sat Jun 14, 2014 8:35 am

Cheb wrote:Still, OOP is the best way to organize things. Sometimes it's the only way.


Nah, that´s mostly just hype. I had a bundle of arguments about this in the 90s, and several times people said something along the line of "well you MUST have it for -this-" and then i looked at it and just to show, wrote up something in Basic 7.0 that worked just fine to do the same thing.

My code was also generally faster and much smaller. I know there was one occasion when it was problematic to get efficient code out of Basic, and another time when i had to spend too much of a week to make it work, but overall, i managed better code.

OOP is more flexible and convenient, especially if many programmers are involved, but it is definitely not better or required. And it´s rather an illusion that it needs less work.



Spokavriel wrote:Just your description of those books has me thinking about seeing what I could encode in pure machine code. Math remains math behind all of this.


:mrgreen:

Machine code is annoying, but once you learn the common stuff, it´s not quite so horrible as you might think on first sight at least.
Thanks to the C=128 having an integrated machine code monitor, i did a short little venture into it, but even though interesting, it´s not something i would recommend to most people.

The one time i fiddled together something for a PC in machinecode though, darn, the performance really tends to be amazing. Can make an old 8Mhz 286 look like it´s a 3Ghz i5.
Spica75
User avatar
Prism Power Senshi
Posts: 2399
 

Re: Programming language geek-out

Postby Spokavriel » Sat Jun 14, 2014 8:49 am

Boiling it down to the Machine Code is how this one guy got a Linux version to fit onto a single floppy disk. Full GUI and capable of handling just about everything the full version did but it's just locked down to one processor family. The full version took half a CD for the so called flexibility and less reliability.
Image
Spamville Character ProfileArchived Current Senshi of Ophelia (Uranus VII).
My Console Video Games
Spokavriel
User avatar
Eternal Power Senshi
Posts: 47773
 

Re: Programming language geek-out

Postby PCHeintz72 » Sat Jun 14, 2014 9:50 am

As for OOP... in any language that can support it, prefer modular discreet programming to full OOP for smaller projects... with larger blocks or pure data blocks among external code/include files (by whatever the language calls them). Programmed right, doing it this way can make a program OOP ready, and easier to port, as each block does specific functionality and can be easier to port or alter.

I've never needed the extreme compactness nor speed of assembly or machine code. I cannot argue though that if you can code in it, it is by far the single best approach to a one off program. I can see though for larger projects it being a bit of a nightmare for upgrades.. And impossible to use if the goal is multiplatform.

Favorite general availability languages I've worked with are C/C++ and Pascal/Delphi (Borlands IDEs are horrible though). Both allow both modular discreet and full OOP. Both are multiplatform to a degree. Both have benefit that if you can code in them, learning many other languages can be easy since even if different it is similar. Both can depending on version support multi threading and multi processor. Both are extensible.
PCHeintz72
User avatar
Prism Power Senshi
Posts: 2736
 

Re: Programming language geek-out

Postby Cheb » Sat Jun 14, 2014 2:23 pm

, wrote up something in Basic 7.0 that worked just fine to do the same thing.

It's not the matter of making something that works, it's the matter of making something that is easy to maintain and evolve. Procedural programs gradually become harder to modify as they evolve, while OOP programs much less so.

Procedural paradigm is fine for something solid that won't change much. For example, my text compiler I use to maintain http://ranmafics.ru and my fics on FFnet is a purely procedural Lazarus application.

But! As soon as you need two somethings where you had one something written using functions and global variables... You're screwed.

I gradually learned to form my code as a few large classes with lots of methods and lots of fields. Even if each class does ever have only one instance. Because it allows me to "pack and leave" without much fuss, if a need arises. Use chunk of one project in another, add or change some functionality withour changing the code base (virtual methods are mightily convenient, I'm telling you). Things like that.
Proud owner of 1.5 kilograms of Germanium transistors
Cheb
User avatar
Moon Senshi
Posts: 1549
 

Re: Programming language geek-out

Postby Spica75 » Sat Jun 14, 2014 4:57 pm

It's not the matter of making something that works, it's the matter of making something that is easy to maintain and evolve. Procedural programs gradually become harder to modify as they evolve, while OOP programs much less so.


Like i said above, more flexible and convenient, yes they are that. Although you do realise "procedural" might not be the right description? Since C++ can also be called procedural AND OOP.

Procedural paradigm is fine for something solid that won't change much.


I´m not sure i can agree on that though, because some languages, like Amiga Basic can effectively do everything that OOP can, it just works and looks different. Without inheriting all the annoyances that i have learned to loathe with vehemence within OOP.

But! As soon as you need two somethings where you had one something written using functions and global variables... You're screwed.


Why? I mean did you loose the sourcecode or something? Otherwise you add another "something" and recompile it/run it. Yes it takes a few minutes to write, it´s not the end of the world unless you need it to be highly complex.

I gradually learned to form my code as a few large classes with lots of methods and lots of fields. Even if each class does ever have only one instance. Because it allows me to "pack and leave" without much fuss, if a need arises. Use chunk of one project in another, add or change some functionality withour changing the code base (virtual methods are mightily convenient, I'm telling you). Things like that.


Decent approach. And probably vastly better than mine for anything someone else is going to look at, i tend to just sit down and write on intuition, worked well for me, but whenever my friend (with actual programming education) looked at my code he couldn´t figure it out at all most of the time.



PCHeintz72 wrote:As for OOP... in any language that can support it, prefer modular discreet programming to full OOP for smaller projects... with larger blocks or pure data blocks among external code/include files (by whatever the language calls them). Programmed right, doing it this way can make a program OOP ready, and easier to port, as each block does specific functionality and can be easier to port or alter.


Pretty much what i did in Amiga Basic. Wrote up a bundle of codeblocks that i could then copy and paste into a new program, with standardised variable names to make it easy.

I've never needed the extreme compactness nor speed of assembly or machine code. I cannot argue though that if you can code in it, it is by far the single best approach to a one off program. I can see though for larger projects it being a bit of a nightmare for upgrades.. And impossible to use if the goal is multiplatform.


Aye, it is definitely the best thing to program in, from a USER standpoint, as it´s smaller and seriously better performing, but upgrades, well you basically have to make it so that any upgrades replaces whole individual files without introducing any new connections unless you replace all files involved.

Both have benefit that if you can code in them, learning many other languages can be easy since even if different it is similar. Both can depending on version support multi threading and multi processor. Both are extensible.


*sigh*

Yeah i know, i sooo totally wish NOW, that i had continued learning to use the Pascal plugin module i had for the C128. Was extremely useful to have the language, compiler and all instantly loaded by just turning the computer off and plugging in the module.




Spokavriel wrote:Boiling it down to the Machine Code is how this one guy got a Linux version to fit onto a single floppy disk. Full GUI and capable of handling just about everything the full version did but it's just locked down to one processor family. The full version took half a CD for the so called flexibility and less reliability.


It definitely has some advantages, but sadly it´s such a bother to program with.
If you can get to the point where you can write machinecode fluidly and without mistakes, then you can do wonders, but getting to that point, *eeep*, not easy.
Spica75
User avatar
Prism Power Senshi
Posts: 2399
 

Re: Programming language geek-out

Postby PCHeintz72 » Sat Jun 14, 2014 5:23 pm

Yeah i know, i sooo totally wish NOW, that i had continued learning to use the Pascal plugin module i had for the C128. Was extremely useful to have the language, compiler and all instantly loaded by just turning the computer off and plugging in the module.

Generally speaking, while those two families of languages(C/C++/C# and Pascal/Delphi) can be more restrictive and force some good coding practices, it actually makes it easier to switch to a more freeform language like say Cobol or Basic, as the enforced good practices, at least some of them, would carry over and be usable, you actually would get better coding practices from them.
PCHeintz72
User avatar
Prism Power Senshi
Posts: 2736
 

Re: Programming language geek-out

Postby talonhunter » Sat Jun 14, 2014 5:50 pm

I haven't seriously touched anything programming wise since college 25 years ago...except for my vocaloid synthysizer stuff, but I remember when we all had to learn how to use assembler language in high school to make our apple, heathkit, commodore, Texas instrument programs run on the school mainframes and PC's
Who needs the light when the shadows are so much more...Playful

Senshi of Dione (Saturn IV)

=^*^=
Come see some of the crew here
talonhunter
User avatar
Prism Power Senshi
Posts: 2756
 

Next

Return to Other Talk

Who is online

Users browsing this forum: No registered users

cron