Author Topic: General Programming Megathread - New OP  (Read 28968 times)

nah i'm pretty sure that could've been coded way more efficiently and in a language that doesn't require as much WORDS.

Ruby chatbot stuffs.




Sadly some of the regex patterns produced are complete and utter bullstuff. I'm refining the whole system but so far it looks like it could work.

So who made the programming language to make programming languages?
« Last Edit: December 14, 2012, 09:11:16 PM by Elecro »

So who made the programming language to make programming languages?
Whaaat. I guess C or something

Machine code / binary code. The people who invented the processor made it.

In it's current form, IA-32, Intel developed it for their 32 bit processors. There's other forms of it for other types of processors like ARM processors, but IA-32 is the standard for all normal desktop computers.
« Last Edit: December 14, 2012, 09:15:31 PM by .Trinick »

Machine code / binary code. The people who invented the processor made it.

How was binary code made then?


I have too much freetime...

How was binary code made then?
IA-32 Machine code consists of an OP code of one byte followed by operands. For example, A2 is the OP code for moving a value into a register. Then there's a byte that shows the memory address to move the value to, and the second operand is the value to move into that. I don't know how to write perfectly in machine code, so all I can show you is the human readable format called Assembly.

mov EAX, 1


Random stuff
C Compiler
Assembler
Machine code
physical
 
I think that's how it goes on standard computers.

I'm more better at computer components than programming. I do know about 30% Lua and 5% PHP.

Random stuff
C Compiler
Assembler
Machine code
physical
 
I think that's how it goes on standard computers.
It depends. Not all languages funnel through a C compiler. Most languages compile straight to machine code. Some languages (like Java) compile to a special form of machine code that will not run on processors, but instead in a virtual machine. This allows the virtual machine to be ported to any operating system and the same machine code will now run on every operating system.


If I'm correct, the new major version of Ruby runs through a VM which compiles to Ruby bytecode sadly you can't export the compiled code otherwise that would be amazing.

Not sure if Python runs the same way.


Ruby and Python are both interpreted languages, which mean they don't compile to machine code. I believe a few people did make third party compilers for them, but I'm unsure.