Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Additional programming languages

This thread is locked; no one can reply to it. rss feed Print
Additional programming languages
Specter Phoenix
Member #1,425
July 2001
avatar

Just got an email from a guy I know in CS department of IU. Made me laugh with his list he told me to learn to be viable. Told me to learn Assembler, ADA, Pascal, Java, C, C++, C#, PHP, MySQL, Javascript, CSS, XML, HTML, ASP.NET, Perl, Python, and LUA. Then told me that would also give me plenty of understanding to use D if I wanted. He is always teasing me about learning a ridiculous amount of languages (at one point I think he told me to learn like 40 or so languages. I just tell him "I don't know where to get half the tools for those languages :P" and wait for his next list of languages. He has done this for years now, ever since we met (he worked at Gamestop in the mall). Thought he had grown tired of it because I hadn't received anything for a few months and he just started up again.

I just sit around reading here lately. Right now I have grown bored with the net and today I picked up and started reading C++ Primer. I've had it for years now and not even opened it. Just something for me to do when I'm sitting here while son is at school and I have my chores done.

Evert
Member #794
November 2000
avatar

Told me to learn Assembler, ADA, Pascal, Java, C, C++, C#, PHP, MySQL, Javascript, CSS, XML, HTML, ASP.NET, Perl, Python, and LUA. Then told me that would also give me plenty of understanding to use D if I wanted. He is always teasing me about learning a ridiculous amount of languages (at one point I think he told me to learn like 40 or so languages. I just tell him "I don't know where to get half the tools for those languages :P" and wait for his next list of languages. He has done this for years now, ever since we met (he worked at Gamestop in the mall).

Honestly, a programming language is a programming language. If you know one it's not hard to pick up another. From that list, I've used x86 assembly ("assembler" isn't really a programming language), Pascal, C, C++, PHP, Javascript, Perl and Python. HTML and CSS are not programming languages, but I've used both. In addition I use FORTRAN regularly and I've done Bash shell scripting in the past. I've also done some programming with Maple. Oh, and I started out with BASIC (GW-BASIC, then QuickBASIC, played with but didn't like VisualBASIC).

Bottom line: listing a dozen programming languages that you "know" may look impressive, but it's meaningless. What you need to do is learn one well enough that you can use it comfortably, after that you can quickly and easily pick up another one if you have to. You will not be an expert immediately, but you can use it and will learn about the peculiarities quickly enough. A third language will come even easier. If you try to learn too many similar languages at the same time everything will just be confusing.

Trezker
Member #1,739
December 2001
avatar

What you really want to learn and implement is algorithms and design patterns. You'll just have to learn the programming language as a means to an end, don't focus on the learning the language itself.

Don't pick a language feature and then find a problem to solve with it. Pick a problem and then find the tools needed to solve it.

I only learned Lua because I had a specific problem. I needed scripting and I'd heard good things about Lua so I went there.
Later I thought it was a big bother having to switch between Lua and C++ and I made Allua so I could do everything using only Lua. I learned a lot about Lua doing this, I wouldn't have found the motivation to learn Lua without having a problem motivating me in the first place.

I also learned some Python because I needed to export a Blender model in a format that made sense to me. But since then I haven't had any problems that led me to use Python for anything else, so I didn't learn much of that language.

verthex
Member #11,340
September 2009
avatar

(he worked at Gamestop in the mall).

Don't listen to that guy. I know people who are programmers at Walmart??? Its like who are they kidding and what do they really use it for in the real world. Then again if that guy could show you a demo with all those languages that does blow your socks off then maybe you should listen to him but otherwise its the case of the blind leading the blind, go deaf on him and tell him to learn every math book from calculus to topology and see where that gets him.

Striker
Member #10,701
February 2009
avatar

For my strategy project i use LUA, based on the Blitzkrieg dialect mixed with Sudden Strike commands i create my own. The complete c Allegro program is controlled by LUA scripts.

axilmar
Member #1,204
April 2001

Be realist, what would happen in this scenario? Microsoft would still implement its own rendering library, that IE would use, and it would have been as non-standard compliant as IE has been. There's no difference.

No. the rendering library would be imported via an import statement.

bamccaig said:

What does that program do?

It creates a gui.

Quote:

Note that your XML example really is an HTML fragment

I wanted to stress the fact that a programming language source can also serve as markup.

Quote:

Which is exactly the part that you are failing to explain at all.

It creates a set of widgets, and then runs an event loop on those widgets.

Quote:

Most browsers probably hook into a library to handle the rendering.

Exactly. The rendering library is hardcoded, in respect to the code running with it.

Quote:

The problem with this is that your example programs above don't contain any of this extra information.

That's exactly what I intended to do: I wanted to show that programs can be equally short, like markup.

The extra information is hidden in the instantiated objects, which contain the gui code. For example, a Label class, an Input class, etc.

Quote:

If the browser knew nothing about the presentation of these "programs" then no browser would be able to render them at all.

Exactly. The rendering would be the task of the imported library.

Quote:

Your programs don't describe how they should be rendered. The problem is that if they did, then your Web site authors would need to manually write code for every possible user agent they run on, because you can't render a Web site the same in all user agents. The environments differ.

No, the rendering library would take the differences into account.

Quote:

It does not.

I think you are stuck in a specific mindset, and that's why you cannot understand what I am saying.

It's very easy actually: instead of rendering the page with an external library, render the page with the same programming language the page is written into. Like, for example, downloading a Java Swing source and running it.

Specter Phoenix
Member #1,425
July 2001
avatar

verthex said:

Don't listen to that guy.

He was the manager of Gamestop several years ago, which is how I met him because of getting games there. They closed it the start of this year though so I have to go to EB now instead (don't know why they had two stores in the same mall that were owned by one company). He is now one of the heads in the CS department at IU.

Second, same can be said about every one here. A person can come across as knowledgeable and not know much at all (like me). Also, having a mind blowing demo again doesn't show their ability (I made pong 3 times but the code was basically handed to me all 3 times, but every time I attempt it without help I hit the same snag, collision detection).

I enjoy reading tech books, but I've come to accept that I'll never be a programmer because I just don't get something about it.

Oscar Giner
Member #2,207
April 2002
avatar

axilmar said:

No. the rendering library would be imported via an import statement.

From where? You said earlier the rendering library would ship with the browser:

Quote:

Where would that module be stored?

In the browser.

So what forbids Microsoft (or any other company) to use their own (possibly non-standard compliant) library?

axilmar said:

It creates a set of widgets, and then runs an event loop on those widgets.

So it's not just a render library, it handles all user interaction as well. And how will the library look and feel appropriately for the OS (feel like a native app)?

Quote:

It's very easy actually: instead of rendering the page with an external library, render the page with the same programming language the page is written into. Like, for example, downloading a Java Swing source and running it.

Have you though about the security problems that involves? I have Java disabled in all browsers for a reason :P.

I think I agree with Bam in one thing: you're not capable of explaining your idea. Reading all your answers I see contradictions in it, not making much sense in what exactly are you proposing.

Specter Phoenix
Member #1,425
July 2001
avatar

Evert said:

HTML and CSS are not programming languages

Yeah, he never said programming languages in his emails. He stays general and just says languages.

Quote:

"assembler" isn't really a programming language

I was always told in college that Assembler was the language and x86 x64 and such was the instruction set used. Which made sense to me at the time because most tech positions I looked at requirements said assembler experience was a good thing.

Trezker said:

Pick a problem and then find the tools needed to solve it.

Never have a problem that I need to solve, which is why I normally just pound out rehashed programs all the time.

I think I agree with Bam in one thing: you're not capable of explaining your idea. Reading all your answers I see contradictions in it, not making much sense in what exactly are you proposing.

I agree.

weapon_S
Member #7,859
October 2006
avatar

I have to admit axilmar's idea is tempting. More strict CSS/HTML regulations would do the same thing, I guess (and suffer from the same weaknesses).
I have used Javascript and PHP, but I'm completely out of it. I like C(++) because it's so damn straight-forward, and C++ has the don't-pay-for-what-you-don't-use attitude. You hardly ever have to worry about obscure things happening at runtime.
Javascript is nice, because it has direct access to a text and image 'canvas'. PHP is nice because you can slowly inject it into pages, making them gradually more dynamic.

Specter Phoenix
Member #1,425
July 2001
avatar

The stupid things I'm doing when I find something new that I wasn't taught in my college course for C++.

#SelectExpand
1 2#include <iostream> 3#include <string> 4#include <vector> 5using namespace std; 6#define DEBUG 7int main() 8{ 9 int elem_count = 0; 10 cout << "File: " << __FILE__ << " at Line #: " << __LINE__ << "Executing\n"; 11 #ifdef DEBUG 12 cout << "Beginnning execution of main()\n"; 13 #endif 14 15 string word; 16 vector <string> text; 17 18 cout << "\nTime: " << __TIME__ << ", Date: " << __DATE__ << "\n"; 19 if (elem_count == 0) 20 cerr << "\nError: " << __FILE__ << " : line " << __LINE__ << " elem_count must be non-zero.\n"; 21 while (cin >> word) 22 { 23 #ifdef DEBUG 24 cout << "word read: " << word << "\n"; 25 #endif 26 text.push_back(word); 27 28 if (word == "!") 29 break; 30 } 31}

Evert
Member #794
November 2000
avatar

I was always told in college that Assembler was the language and x86 x64 and such was the instruction set used.

When you write code in assembly, you write code targeting specific hardware, using mnemonics and operands specific to that hardware. That's what I meant when I said it's not really a programming language: despite the name x86 assembly language has very little to do with, say, PowerPC assembly language (or perhaps more relevant: ARM assembly language).

It's still worthwhile to know, because it helps you understand what the machine is doing and how it's doing it (and you can look at the assembly translation from the compiler if you ever need to figure out what exactly the compiler is doing to your code), but the details are only relevant to particular architectures.

Specter Phoenix
Member #1,425
July 2001
avatar

We briefly touched assembly. We used Emu8086 but I remember almost nothing that I learned.

MiquelFire
Member #3,110
January 2003
avatar

I played around with z80 assembly. Never made anything useful, besides a program to reset the high score list on zTetris.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Specter Phoenix
Member #1,425
July 2001
avatar

Some times I think about trying to relearn assembly.

Thomas Fjellstrom
Member #476
June 2000
avatar

First assembly I learnt was some custom assembly for a virtual machine I started writing for an old-old-old speedhack. Worked reasonably well.

Second assembly I learnt was PIC18 assembly. Annoying as fuck, but can be fun. Trying to do anything on an 8 bit micro with 2k memory or less is incredibly painful. Especially when its something complex like BCM (Binary Coded Modulation) or Software PWM (Pulse Width Modulation) on 8-64 separate ports at once. The code in C is somewhat ok, but sane code would want to branch and loop. A LOT. And a lot of branching and looping in assembler is quite hard to follow. Especially since I have a hard time with following more complex setups (like complex conditionals and loops in assembler).

A friend of mine did his without a lot of branching or looping. A lot of his code was automatically generated using macros. Bloated the final code up a lot, but it was easier to follow :o at least at the upper layer. Trying to actually follow his fancy math was something else.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

verthex
Member #11,340
September 2009
avatar

Evert said:

When you write code in assembly, you write code targeting specific hardware, using mnemonics and operands specific to that hardware.

Ironically my entire programming "career" started with assembler. It began around 1999 when I wanted to get into programming graphics. My friend insisted I would use C++ and he used BASIC to show me a simple demo of a sine wave changing colors as a random function. Then someone at a used software computer store explained to me about assembler and I was immediately amazed by it. Later this other guy (who worked with me) gave me a copy of Jeff Duntemanns assembly language step by step 1st edition (where he also mentions the use of assembly language as an in between for programmers but not the end all and getting to use it for low level parts of coding are horrendously difficult).

The point I'm trying to make is that programming with assembler is possible to learn from but one of the things I realized more recently is that the richness of a modern programming language is just not there with assembler. And I'm thinking of python or C++. All the time spent dealing with low level architecture is just not as important to the actual code and C++ hides those parts. I'm not saying that assembler is useless because I have seen some optimizations on the X86 that work and those are simd instructions, but to deal with that level of coding at a non-expert level is too painful and should be left to people who have already learned all the basics and even the advanced parts of assembler.

Tobias Dammers
Member #2,604
August 2002
avatar

axilmar said:

It's very easy actually: instead of rendering the page with an external library, render the page with the same programming language the page is written into. Like, for example, downloading a Java Swing source and running it.

Or like, for example, an Android or iOS app? Because that's what you get when you go the other way. And there's your security problem - the number of sploits published for Android is hilarious (considering the amount of money that went into the project, the rock-solid kernel it is based on, and the experience found in the company that backs it), and the only reason iOS scores any better is that the platform is ridiculously closed. Oh, and did I mention that Java, in the role you describe, has failed utterly? People write traditional desktop applications in it, and web applications, and custom information systems, but I haven't seen a distributed end-user Java application in a decade, if ever.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

axilmar
Member #1,204
April 2001

So what forbids Microsoft (or any other company) to use their own (possibly non-standard compliant) library?

No, I said it will be stored in the browser, not shipped with the browser. The library will be downloaded at the first time and any time it is updated, and then cached locally somewhere in the filesystem controlled by the browser.

Quote:

So it's not just a render library, it handles all user interaction as well. And how will the library look and feel appropriately for the OS (feel like a native app)?

Today, html controls do not look like anything like native controls, do they?

Quote:

Have you though about the security problems that involves? I have Java disabled in all browsers for a reason

Please, do tell me the security problems that involves.

Quote:

I think I agree with Bam in one thing: you're not capable of explaining your idea. Reading all your answers I see contradictions in it, not making much sense in what exactly are you proposing.

Ok, here is a simple explanation: instead of downloading a document, clients download a program.

And there's your security problem

How about sandboxing? that would work, wouldn't it?

Quote:

Oh, and did I mention that Java, in the role you describe, has failed utterly?

I am well aware about the reasons Java failed, and so my proposal is anything but Java. I am not proposing to do something radically different, just to replace the document with a program. Programs will still be downloaded as pages, have links in them, etc. It's just that what the code of the page will do will be defined by the program and the included libraries, not by the browser.

Thomas Fjellstrom
Member #476
June 2000
avatar

axilmar said:

How about sandboxing? that would work, wouldn't it?

Android and Chrome both have a pretty solid Sandbox. Chrome was unbeaten till recently, but this last pwn2own thing (or whatever it was called) there was three major exploits.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

axilmar
Member #1,204
April 2001

Android and Chrome both have a pretty solid Sandbox. Chrome was unbeaten till recently, but this last pwn2own thing (or whatever it was called) there was three major exploits.

It wasn't so solid after all, was it? :-)

Oscar Giner
Member #2,207
April 2002
avatar

axilmar said:

Today, html controls do not look like anything like native controls, do they?

Of course they do. Even on Opera, which is a browser that has always used its own controls have now a native look and feel since a few versions ago. The text box where I'm typing this is 100% native.

Quote:

Please, do tell me the security problems that involves.

Well, one easy to think about, and that can't be solved with sandboxing, since it's not something you can sandbox in this scenario: since the program is responsible for rendering, it'll need full access to the GPU, for performance reasons. Anyone could for example write a program that uses all your GPU power for computing (bitcoin mining for example).

Javascript, which is a quite limited (limited in the sense of access to the hardware) language has security problems, imagine a language like yours that need to expose much more.

Edit:
What you describe actually reminds me of ActiveX :-X

axilmar
Member #1,204
April 2001

Of course they do. Even on Opera, which is a browser that has always used its own controls have now a native look and feel since a few versions ago. The text box where I'm typing this is 100% native.

So there is no problem to use native controls, is it?

Quote:

since the program is responsible for rendering, it'll need full access to the GPU

Modern O/Ses do not provide direct and full access to the GPU; everything goes through a driver. Drivers can easily be sandboxed.

Quote:

Javascript, which is a quite limited (limited in the sense of access to the hardware) language has security problems, imagine a language like yours that need to expose much more.

Everything can be sandboxed.

Quote:

What you describe actually reminds me of ActiveX

I am not talking about downloading executable components.

Oscar Giner
Member #2,207
April 2002
avatar

axilmar said:

Modern O/Ses do not provide direct and full access to the GPU; everything goes through a driver. Drivers can easily be sandboxed.

Of course through a driver or API ::). That doesn't change anything. Being sandboxed doesn't solve the problem I described either. Are you being picky on purpose to avoid answering certain questions? (I've seen you do this to several ones, not just this).

Quote:

So there is no problem to use native controls, is it?

I asked how would you do it, but instead of answering that, you told native controls are not used. Now you say native controls are not a problem. Make up you mind! (and answer the question)

Also:

axilmar said:

No, I said it will be stored in the browser, not shipped with the browser. The library will be downloaded at the first time and any time it is updated, and then cached locally somewhere in the filesystem controlled by the browser.

Actually, no, the first time you said the library would be in the browser. You didn't say anything about being downloaded from somewhere. My question is, where's this somewhere? If I understand you correctly, web pages will include a line similar to import url_to_render_library. What happens if, after some time and a lot of webpages use it, that library goes off-line (forever)? Half the internet stops working? Not a good idea having to rely on a centralized thing.

bamccaig
Member #7,536
July 2006
avatar



Go to: