Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 62 63 [64] 65 66 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 886660 times)

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #945 on: January 27, 2012, 01:29:20 am »

Yeah, if you learned Ruby too, you'd be spending all your time with Java and C++ going "Why can't this just be as easy as it is in Ruby!?"

ALTHOUGH, regular ruby (MRI) is technically C++ under the hood (and thus has access to several C++ based libraries), and JRuby, the Java version, does the same with Java but even better since Java is ALSO a run time language, giving you a few more options there.

And... none of that really means anything to you. Stick to what you're working with. :P
Logged

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #946 on: January 27, 2012, 01:31:23 am »

Actually, that makes a lot of sense. The prof that I'm working with likes us to get our hands dirty and actually know what we're working with and why. I mean, last semester, we were writing stuff in assembly, and it turned out to be not terrible. Not something I'd want to do every day, but still.
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #947 on: January 27, 2012, 01:54:00 am »

Does anyone know what languages C++ and Java were implemented in?

Most c++ is self compiled now, right?

Oh god I'm half dead I'm so tired now right I don't even know if that makes sense.
Logged

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #948 on: January 27, 2012, 02:01:26 am »

Depends which compiler you're using, I guess.

The very first c++ compiler might've been written in C. I dunno for certain.

But yes you could certainly code a c++ compiler with c++, if that's what you're asking.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #949 on: January 27, 2012, 02:02:55 am »

Depends on what you think of as the first implementation of c++.
It sort of evolved from C in smaller steps until they decided that it was its own thing.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #950 on: January 27, 2012, 03:11:14 am »

Compiling is just translating it from one representation to another. Unless we are talking about non-compiled interpreted languages, they are all translated down into machine code of some variety.

Machine code is at its base level binary, which humans can abstract out to hex or a similar exponent of 2 base number system. Converting those to binary is a trivial problem.

Up another level, and you can describe the numbers used by their function in the system. 'add      $t0, $t1, $t0' Again, a 1:1 conversion from a symbol to a set of numbers it represents (and then down to a bit string). Labels within the code like
label:
       j     label
are stored within the assembler when it goes through, assigning a value (in this case a location in the code; code and data are indistinguishable in memory) to that symbol and inserting it where its used. Again, a really simple process of converting from a more human readable form (assembly) to machine language. From there you can start creating ever more complex compilers, bootstrapping yourself with the compilers you have created to more and more easily add compiler features, until you finally end up with pretty IDE do-everything-for-you systems like Visual Studio.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #951 on: January 27, 2012, 03:16:55 am »

Yes, but you are still required to make that translation. The question was asking what language was built to give us the first translators.

Xegeth

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #952 on: January 27, 2012, 03:55:10 am »

According to wikipedia, the first c++ compiler was Cfront, and strangely enough, it was actually written in c++. To get the first version of the code to compile, a preprocesser was written to convert the code into c, but the source code itself was c++. For more information about it, you could check the programmer's website or the wikipedia page.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #953 on: January 27, 2012, 08:24:29 am »

The JAVA compiler is now written entirely in java as well.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

RedKing

  • Bay Watcher
  • hoo hoo motherfucker
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #954 on: January 27, 2012, 09:13:16 am »

So I thought I'd poke my head in here and see what....SWEET JESUS IN THE MICROWAVE, 64 pages in less than a month?? What are you people doing in here?  :o


So. My experience: numerous years of Apple BASIC and Commodore BASIC; LOGO; very limited C+ experience.

I understand procedural programming, no problem. Loops, conditional statements, subroutines, all that shit. Bit harder time wrapping my brain around object-oriented programming, but I sorta get the gist. I think my work playing around with modding DF helps there, because the way the game handles critters in the raws is sort of OOP.

Any tips on what I should try to learn? Or even IF I should bother to learn. I have no interest in programming as a career, it would be mostly for putzing around and trying to hack up my own small games or tool apps to make "bridges" where I have two other apps that I want to pass data to each other.

Logged

Remember, knowledge is power. The power to make other people feel stupid.
Quote from: Neil DeGrasse Tyson
Science is like an inoculation against charlatans who would have you believe whatever it is they tell you.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #955 on: January 27, 2012, 09:22:14 am »

If you want to make utility programs / small stuff, a scripting language of some sort would be a good thing to learn.  Python perhaps.

For a more game programming related language, you might want to look at C#.  It's like C++ but abstracts out some of the touchier things like memory management and has more features.  Plenty of learning resources too.

And, if you're really interested in making smaller games but don't want to learn the intricacies of a graphics API like DirectX or OpenGL, you can use XNA from Microsoft (uses C#).  There are tons of tutorials on how to do some pretty cool stuff with XNA.
Logged
Through pain, I find wisdom.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #956 on: January 27, 2012, 09:25:36 am »

So I thought I'd poke my head in here and see what....SWEET JESUS IN THE MICROWAVE, 64 pages in less than a month?? What are you people doing in here?  :o


So. My experience: numerous years of Apple BASIC and Commodore BASIC; LOGO; very limited C+ experience.

I understand procedural programming, no problem. Loops, conditional statements, subroutines, all that shit. Bit harder time wrapping my brain around object-oriented programming, but I sorta get the gist. I think my work playing around with modding DF helps there, because the way the game handles critters in the raws is sort of OOP.

Any tips on what I should try to learn? Or even IF I should bother to learn. I have no interest in programming as a career, it would be mostly for putzing around and trying to hack up my own small games or tool apps to make "bridges" where I have two other apps that I want to pass data to each other.
All languages you list are very imperative. Maybe try a functional/OOP language for a change? Scala and Ocaml are alledgedly both very good functional/OOP languages (though I stll have to try them out). Common Lisp and Clojure too if you're not afraid of parenthesis (warning, Clojure is pretty radical when it comes to some things and it assumes you know Java). Of course that is if you're interested in learning something completely new. If you just want to get the end products, Ruby or Python are probably better, because you'll find more documentation and often also better libraries for them.


An interesting way to learn OOP would probably be to implement your own object system in your language of choice. This is probably easier in functional languages (at least I only know of lisp-based sources that treat this though that may be because I never really looked for it), but it's pretty sure you'll understand more of your chosen language and OOP afterwards.
« Last Edit: January 27, 2012, 09:38:03 am by Virex »
Logged

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: if self.isCoder(): post() #Programming Thread
« Reply #957 on: January 27, 2012, 09:37:47 am »

So. My experience: numerous years of Apple BASIC and Commodore BASIC; LOGO; very limited C+ experience.
I actually first started programming in BASIC, on a TI-86 graphing calculator I had in high school. It was tooth-pullingly tedious, as the screen was somewhere around 100 pixels wide and the cellphone-style keyboard made typing simple words feel like writing a novel.

The only reason I kept at it is because it was slightly less boring than actually paying attention in class. :P I actually made a program at some point to help me covertly play Risk with my friends in class. Seriously.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

RedKing

  • Bay Watcher
  • hoo hoo motherfucker
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #958 on: January 27, 2012, 09:59:44 am »

So. My experience: numerous years of Apple BASIC and Commodore BASIC; LOGO; very limited C+ experience.
I actually first started programming in BASIC, on a TI-86 graphing calculator I had in high school. It was tooth-pullingly tedious, as the screen was somewhere around 100 pixels wide and the cellphone-style keyboard made typing simple words feel like writing a novel.

The only reason I kept at it is because it was slightly less boring than actually paying attention in class. :P I actually made a program at some point to help me covertly play Risk with my friends in class. Seriously.
Heh...we used to fiddle around with programs for the TI-81 (or as I called it, the "NATO Assault Calculator" because of the heavy-duty plastic body and humongous keys). Then we got upgraded to a fancier model with an IR port. One of my classmates hacked his into being a remote control for a television (by finding out what the standard TV remote frequencies were, and the control code for the IR port and voila...).
Logged

Remember, knowledge is power. The power to make other people feel stupid.
Quote from: Neil DeGrasse Tyson
Science is like an inoculation against charlatans who would have you believe whatever it is they tell you.

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #959 on: January 27, 2012, 11:38:36 am »

I would like to come out as strongly as humanly possible against deciding to learn C# (or Objective C for that matter). Please, don't become Microsoft's bitch. There are plenty of languages out there that don't tie you in to a single vendor and guarantee your code will only ever work on Windows systems.
Logged
Pages: 1 ... 62 63 [64] 65 66 ... 796