* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Source - It's a programming language.  (Read 3435 times)

0 Members and 1 Guest are viewing this topic.

Offline iconmaster

  • New User
  • Join Date: Jan 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
  • The Crazy HP Prime Guy
    • iconmaster5326
    • View Profile
  • Gender: Male
Source - It's a programming language.
« on: January 21, 2015, 10:24:59 pm »
Once upon a time, I was writing programs for the HP Prime in HPPL. The more I worked in HPPL, the more I became dissatisfied with the language. I mean, it was usable, but I wanted better.

So I decided to make something better. I started work on Source. It's a programming language.

Source is a procedural, statically-typed bytecode-compiled language that can either compile to whatever platform you need or interpret directly on your computer. Currently, it compiles to HPPL.

Source gives you control. It's statically typed, so you can read your code more easily. It can assume types, so it's not needlessly verbose. You can control how it compiles through directives.

Source is flexible. It provides data structures and user types. You can define methods for data types anywhere. You can organise your code into packages. Source even can handle cyclic dependencies!

Source has tools. Compile it into HPPL from the command line, or use SourceBench to write and compile code on the fly. Use SourceBox to run your code on your PC. Run SourceLine to interactively execute Source code.

Source isn't done yet. The core libraries still need implemented, not to mention a bunch of features such as custom structs and classes. In the future, it will be able to compile to a bunch of places, not just HPPL. I wouldn't describe it as 'usable' yet. But stay tuned!

Anyways, the important bit: The link. Check out the source code at:

https://github.com/iconmaster5326/Source

Want to download Source? Want to learn more? Check out the wiki at:

https://github.com/iconmaster5326/Source/wiki

The wiki has downloads, documentation, and tutorials.
« Last Edit: March 26, 2015, 08:05:18 pm by iconmaster »



Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17475
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Source - It's a programming language.
« Reply #1 on: January 22, 2015, 04:05:00 am »
This is definitively something I'll need to try to learn when I am done with Supersonic Ball HP and Super Walrii Land. :) I'm also glad that you are still planning PC support. It would be nice to be able to make games for both calcs and the computer simultaneously. Maybe eventually you could also compile to Ndless C?
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline iconmaster

  • New User
  • Join Date: Jan 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
  • The Crazy HP Prime Guy
    • iconmaster5326
    • View Profile
  • Gender: Male
Re: Source - It's a programming language.
« Reply #2 on: January 23, 2015, 09:19:10 pm »
I'm creating tutorials for those who want to get up to date on the syntax of Source on the wiki here. I suggest you check it out!

I'm also glad that you are still planning PC support. It would be nice to be able to make games for both calcs and the computer simultaneously. Maybe eventually you could also compile to Ndless C?

If LLVM can be compiled to ARM assembly, I'd assume you could get something working on the NSpire in short order. It'd take some work, though, but its quite possible.

Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17475
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Source - It's a programming language.
« Reply #3 on: January 24, 2015, 12:22:50 am »
Cool to hear about the tutorials. In the past, some people made new languages for various calculators, but they would remain undocumented for the most part, which prevented many people from using them.

And thanks for the info about LLVM.
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17475
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Source - It's a programming language.
« Reply #4 on: March 11, 2015, 11:03:27 am »
Btw have you worked on this recently?
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline iconmaster

  • New User
  • Join Date: Jan 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
  • The Crazy HP Prime Guy
    • iconmaster5326
    • View Profile
  • Gender: Male
Re: Source - It's a programming language.
« Reply #5 on: March 11, 2015, 12:41:45 pm »
Btw have you worked on this recently?

In the past few weeks, I've done some minor changes to the compiler, yes. Mostly, though, I've had to take time to deal with other obligations.

When I have time, I need to rewrite the HPPL output platform, so expect large changes when they do happen...

Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17475
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Source - It's a programming language.
« Reply #6 on: March 11, 2015, 01:47:01 pm »
Aah ok no problem. Glad this is still worked on :). Keep us updated when there are big updates :)
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2610
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
    • View Profile
  • Gender: Male
Re: Source - It's a programming language.
« Reply #7 on: March 25, 2015, 12:10:08 am »
Wow when I get my prime I will definitly use this!
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 2669
  • Post Rating Ratio: +17/-1
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • View Profile
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Source - It's a programming language.
« Reply #8 on: March 25, 2015, 05:20:07 am »
Yep, shoulda try it out. By the way, is there any way to use it with LLVM (since you mentioned it in the thread)?
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)

In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii:

YUKI-CHAAAANNNN

Offline Duke "Tape" Eiyeron

  • Urist McEiyolobster
  • Super User
  • Join Date: Nov 2014
  • Location: (V)(-_(//));(V)
  • Posts: 1636
  • Post Rating Ratio: +11/-2
  • Fanciest Walrus of the oceans.
    • @@Eiyeron
    • Eiyeron
    • /u/Eiyeron
    • Eiyeron
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
  • Gender: Male
Re: Source - It's a programming language.
« Reply #9 on: March 25, 2015, 08:10:39 am »
Making llvm work on calc would be rad as it'd open so much things for the calc. Each langugae that would compile into LLVM could be run on the Nspire. Imagine the feats one could do!
  • Calculators owned: A lot.

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3147
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: Source - It's a programming language.
« Reply #10 on: March 25, 2015, 11:10:36 am »
isnt there already a LLVM to Z80 compiler? also i did a click google on it some time ago and i saw some Cemetech posts about it
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline iconmaster

  • New User
  • Join Date: Jan 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
  • The Crazy HP Prime Guy
    • iconmaster5326
    • View Profile
  • Gender: Male
Re: Source - It's a programming language.
« Reply #11 on: March 26, 2015, 08:11:33 pm »
Hello, everyone! Glad you've been interested in Source. I updated the OP, so now it describes Source a little better.

Yep, shoulda try it out. By the way, is there any way to use it with LLVM (since you mentioned it in the thread)?

There WILL be a way to, but the LLVM platform for Source is not usable yet. In time, I hope LLVM to be the primary compilation target for Source.

isnt there already a LLVM to Z80 compiler? also i did a click google on it some time ago and i saw some Cemetech posts about it

There is the one LLVM Z80 project I know of, but it hasn't been worked on for several years, apparently. It doesn't look working yet, but I have hopes.

Right now, I discovered some mechanics in the core Source engine that need rewritten, so I'm seriously considering rewriting the Source compiler from scratch. If I do this, it might be a while before Source becomes usable. It would be for the better, however; my old code can be a bit hard to follow.

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3147
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: Source - It's a programming language.
« Reply #12 on: March 26, 2015, 08:27:19 pm »
Wait- this is a language on a virtual machine? wouldn't it be possible to port it to other calculators and make a common programming language? O.O
i've always wanted to code a higher virtual machine than my brainf*** compiler... though i don't have mcuh experience and don't really get some of the opcodes...
« Last Edit: March 26, 2015, 08:37:06 pm by Cumred_Snektron »
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline iconmaster

  • New User
  • Join Date: Jan 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
  • The Crazy HP Prime Guy
    • iconmaster5326
    • View Profile
  • Gender: Male
Re: Source - It's a programming language.
« Reply #13 on: March 26, 2015, 10:21:56 pm »
Wait- this is a language on a virtual machine? wouldn't it be possible to port it to other calculators and make a common programming language? O.O
i've always wanted to code a higher virtual machine than my brainbleep compiler... though i don't have mcuh experience and don't really get some of the opcodes...

The name of LLVM is a misnomer. It is not a virtual machine; is compiles code using LLVM IR, a virtual language, as an intermediate. When Source compiles to LLVM, it will be a fully compiled language.

In other news, I'm finalizing pointer operations in Source. What syntax looks better to you guys?

one() is a function that returns a pointer to a local. two() returns the value inside that pointer, dereferencing it.

Code: [Select]
//idea 1
function one() as ptr[int] {
local a = 2
return a.ptr
}

function two(b as ptr[int]) as int {
return b.value
}

Code: [Select]
//idea 2
function one() as $[int] {
local a = 2
return $a
}

function two(b as $[int]) as int {
return b$
}

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3147
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: Source - It's a programming language.
« Reply #14 on: March 26, 2015, 10:50:20 pm »
Yes but since there's not really a good z80 backend a seperate compiler/virtual machine for z80 would still be cool :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games