Skip to content
Sign upLog in
← Back to Community

Copper, a open source programming language

Profile icon
VofaDev

I've always wanted to create my own programming language, so I started making one! This language is called copper because I like steampunk-themed stuff, and Copper is pretty steam-punky. There is more details in the README of the project. Here is the README anyway:


Copper

An Open source compiled programming language, In development.

Github

See the wiki here, also needs some work haha!
https://github.com/gearDev-code/Copper

Goals

Copper is an general-purpose OOP language.

Coppers main goal is to allow easy editability of its syntax, so programmers are in total control of how their programming
language looks without having to make their own.

Example:

Change the normal declaration of a variable in copper:

var: myvar $= `hello, world!`

To a python-like syntax:

myvar = "hello, world!"

Other goals

  • make the programming language easy.
  • make the programming language fast
  • make the programming language secure

Progress

I am still kind of getting into assembly, so the progress is slow

  • simple variables
  • Logging to the console
  • string/variable concatination
  • simple functions
  • functions in functions
  • OpenGL libs
  • OpenAL libs
  • Simple networking libs

(More will probably be added to the checklist later)

Problems

  • Functions and variables will do weird stuff if their names are four characters.

Contributions.

Not excepting contributions yet :(

Code Organization

The code in Coppers compiler is not organized as I would like it to be yet. I will be changing it soon.

Nasm

This programming language is not distributed with nasm yet, which it uses to compile to. You'll have to download it yourself currently.

Voters
Profile icon
mollthecoder
Profile icon
TheOneAndOnly-
Profile icon
ShaunHannon
Profile icon
Brendan23
Profile icon
CATSAG7PRO
Profile icon
TSoL
Profile icon
Plorzon
Profile icon
AryyanVineeth
Profile icon
pibinary
Profile icon
NapoliIndustry
Comments
hotnewtop
Profile icon
xxpertHacker

Coppers main goal is to allow easy editability of its syntax, so programmers are in total control of how their programming
language looks without having to make their own.

So, consider this scenario: I, a developer who often uses Copper when programming, create a large program in Copper, so large in fact, that I create an entire GitHub repository dedicated to an A.I. program in Copper. Later, I encounter a bug, so I proceed to ask some other Copper developers that I know if they could help me out, yet there is a problem: although we all know the same language, we all write in different syntaxes, meaning we can't read each other's code as well, creating division between us.

My question to you is that, if we all write in drastically different syntaxes, do we really write in the same language?

Real-ish example: you write C++, I write C++; I wrote a program in a mutant variant of C++ here. Is it still C++, as you know it?

Profile icon
VofaDev

@xxpertHacker
Hmm, good point... Most languages are similar in one way or another though. I should clarify that "syntax editing" does not include changing functions/method/module names just types, declarations, etc. Also if you edit the syntax, I would be able to edit it back to coppers normal/my preferred syntax (probably going to add a syntax translator). If you don't get what I mean, you will see in due time.

Profile icon
MatthewWesolows

@xxpertHacker
It could still work, think of Assembly, which has multiple different syntax (ex: Intel Syntax or AT&T Syntax) and manny differnt flavors (NASM, etc.).

Profile icon
xxpertHacker

@MatthewWesolows
Yes, but they all have their own hard set of rules.

To have every single individual's code be a different syntax sounds... idk...

Also, as for what you said about asm languages, they're not the same thing, they're just different assembler languages, as assembly language is more of a family of languages.

Profile icon
AmazingMech2418

@gearDev
It would probably be good to instead of making the syntax editing in the base language, have a base language and then a dialect transpiling system to go with it.

Profile icon
realTronsi

@xxpertHacker
codepoint plug ;)

Profile icon
xxpertHacker

@realTronsi
Lmao, half of the team agreed that the project is dead.

I just used the C++ as an example.

Lmfao, the server doesn't even compile because I broke the file caching code and never fixed it. But sure, I'm definitely self-plugging right now.

Now, seriously, go click the link, read the three C++ files, and tell me that it's still "normal" C++ syntax.

Profile icon
realTronsi

@xxpertHacker
I mean it's still readable for me, but maybe because I know a bit of rust.

Profile icon
xxpertHacker

@realTronsi
Yeah, it's closer to Rust, but think about that, should it be closer to Rust, or should it just be idiomatic C++ instead? It's also mildly funny that it looks like Rust, but is actually loaded with memory lifetime bugs ;)

Profile icon
realTronsi

@xxpertHacker
idk what you're using though so idk, is it supposed to be an extension of C++?

Profile icon
xxpertHacker

@realTronsi
Lmao, I used the CPP (C-preprocessor) with C++, and a single GNU extension to use value returning ({ ... }) block scope.

Otherwise, it's just plain C++ ;)

Don't believe me? Check the compilation process yourself.

What you're seeing is what I call "rust.hpp," which started almost as a joke, but became a real thing.

Profile icon
realTronsi

@xxpertHacker
but you used stuff like mut, while in C++ it's mutable so watt

Profile icon
xxpertHacker

@realTronsi
C++'s mutable isn't related to Rust++'s mut.

See how it's already become unreadable when viewing it from the C++ perspective?

Read the entire rust.hpp file to understand it better.

If you have any extra questions, ask on the Repl, let's not cover this Copper post with this convo.

Profile icon
MatthewWesolows

Very nice! Using assembly for the log is quite clever. My advice however, is to try to find alternatives. Using assembly in that way won't allow your language to be portable across devices with different processors and operating systems. But hey, the only things I've made are simulators and game related stuff. (It's also nice to see a fellow C++ programmer though!)

Profile icon
VofaDev

@MatthewWesolows
Honestly, you probably know more than me. But I use nasm (net-wide assembly) and that is available for compilation on almost all devices, I think. (lol, your profile picture though)

Profile icon
Whippingdot

bruh there are soo many C++ coders.

@MatthewWesolows

Profile icon
xxpertHacker

@Whippingdot
Well... Replit is a Python community...

Profile icon
xxpertHacker

@gearDev
Asm languages are inherently not portable.

Nasm is made for Intel x86 CPUs. It won't work on an iOS device, on an Android mobile, on a Windows desktop, etc.

Profile icon
VofaDev

@xxpertHacker
Oh really? Because I have a x64 machine and it works on here...

Profile icon
xxpertHacker

@gearDev
x64 code is usually portable to other x64 CPUs that use the same instruction set...

Profile icon
conspicous

I am also making an opensource Lang called hare. It will come with a pkg repo and manager, and should convert to ASMx86 and ASMx64.

Profile icon
VofaDev

@StringentDev
Cool!

Profile icon
conspicous

@gearDev
the thing is we are compiling to all 64-bit platforms (win-x64, lin-x64, macos) via npm's (nodejs) pkg module :D.

We will in future be using github to compile the executables on release so we can do x86 releases too.

Profile icon
firefish

@StringentDev
https://replit.com/teams/join/dipiosuztzjwijymviilmpvpgmhkzssb-Virra pls join

Profile icon
firefish

@StringentDev
please join the team https://replit.com/teams/join/dipiosuztzjwijymviilmpvpgmhkzssb-Virra

Profile icon
conspicous

uuuh it is on the momentum team


@firefish

Profile icon
firefish

@StringentDev
it shouldn't be on the Momentum team... I asked
@Whacko
to remove the repls

Profile icon
Whippingdot

bruh i thought u knew not to put join links in a comment thread. now that you did this i HAVE to join now 😭

@firefish

Profile icon
Whippingdot

ah you too smart the link is not valid 😭😭

@firefish

Profile icon
conspicous

yes. yes we are... but do you want to help out on Virra?

@Whippingdot

Profile icon
Whippingdot

yes pls

@StringentDev

Profile icon
conspicous

@firefish
, (1) sorry for not being online today, been really busy, (2) can you invite
@Whippingdot

Profile icon
conspicous

i invited you... it's pending.

@Whippingdot

Profile icon
Whippingdot

huh i accepted

@StringentDev

Profile icon
SleepySid

Very interesting ..can u plz ping me whenever u post the update of this language :D

Profile icon
Baconman321

@gearDev
same here :D

Profile icon
mollthecoder

@SudhanshuMishra
It can run now using the run button.

Profile icon
mollthecoder

OpenGL and AL shouldn't be too high on the priority list.

Profile icon
Baconman321

I seriously wish that I could make languages, but I'm a web developer and I don't have much to work with 😭

Although, I am making a terminal lang in JS :D

Languages are fun but hard to make IMO.

Profile icon
VofaDev

@Baconman321
I started out with web languages, and I self taught myself every language I know (took a while though). Node.js would probably be easier for you to learn and work with if you wanted to create a language.

Profile icon
Baconman321

@gearDev
Yeah but it's slower.

I'd rather use C/C++/Go like ur using.

C sounds like a good language, actually... considering it's unsafe with memory management meaning that you have more control over it.

Profile icon
BranstinR

it doesn't even run but it looks good

Profile icon
VofaDev

@BranstinR
Yeah, lol, I added a running command so now you can run it i think. It compiles and runs the "test.cppr" script.

Profile icon
Wilke000

Ohhhhhhhh

POG

POG

POG

POG

POG
POG
Profile icon
VofaDev

@Wilke000
Oh gosh...

Profile icon
Wilke000

:)

@gearDev

Profile icon
DaCuteRaccoon

@Wilke000
you forgot the five great pogs. pog, pog, pog, pog, and pog.


Not to mention,

pog


Header bq pog?

pog


bqcb pog (blockquote-codeblock)?

pog


Best of all, Gers' pog.

Poggers!

Profile icon
Wilke000

yes of course

@DaCuteRaccoon

Profile icon
Wilke000

@DaCuteRaccoon

Pog man

Profile icon
JBloves27

Very nice! I like it's syntax, simple and easy to memorize! ;D

Profile icon
OldWizard209

This seems to be pretty interesting

@gearDev
. Is there a way I can learn more about this language? Thanks

Profile icon
VofaDev

@OldWizard209
what would you like to learn? I haven't really worked on the wiki, but I will!

Profile icon
DynamicSquid

Nice! Is there a GitHub page to this?

Profile icon
VofaDev
Profile icon
DynamicSquid

@gearDev
Awesome!

Profile icon
Bunnytoes