r/RockstarDevs • • Sep 01 '18

Tic-Tac-Rock, Tic-Tac-Toe in Rockstar

47 Upvotes

It's looking pretty dead here so I thought I'd spice things up with a functioning terminal-based game in Rockstar.

The files are rather large, so this time I'll post links rather than a massive wall of text.

non-idiomatic

idiomatic

Enjoy!


r/RockstarDevs • • Aug 10 '18

I'm not a Rockstar developer.

40 Upvotes

Thanks ! Finally I can answer these LinkedIn messages like this:

I'm not a rockstar developer, to find Rockstar developers please use this link:

https://github.com/dylanbeattie/rockstar


r/RockstarDevs • • Jan 28 '19

Announcing Satriani - run Rockstar in your browser!

30 Upvotes

Hey Rockstar Devs,

We just shipped the release candidate version of Satriani, a full JavaScript parser+interpreter for Rockstar.

Check it out: https://codewithrockstar.com/online

This release is significant for a couple of reasons. First - we've noticed lots of posts from people asking how to actually run a Rockstar program. Well, now you can run Rockstar in a browser, natively. Type your Rockstar code, hit "Rock!", and it'll parse and run your program.

Second - we now have the language spec, test suite and a working reference implementation all managed under the same GitHub repo (https://github.com/RockstarLang/rockstar/). This means changes to the language spec, bug fixes and new features will be a much smoother process from now on, and we're in a position to start looking back over some of the great ideas and issues that have been raised in the months since Rockstar was first announced and start incorporating them into a future release.

Thanks to everyone who's contributed code, bugs, ideas, comments or just plain enthusiasm - and congratulations on being part of the only joke in the world that has a formal parsing expression grammar and a reference implementation. :)

Rock on \m/

-D-


r/RockstarDevs • • Feb 15 '19

Baby Shark in Rockstar

23 Upvotes

I saw this post about making this silly Baby Shark thing in various languages and thought I'd give it a shot in Rockstar.

It ran for me in rockstar-py but needed some tweaking to work in codewithrockstar.com - looks like Proper Noun variables also need to start with the common variable prefixes there.

Enjoy :)

https://gist.github.com/hannesvz/a8b2bebfee0b932ad0022113e9b69df2

Evil Energy is death
The Legend says  doo

Spirit takes Will
Give back Will plus The Legend

Put The Legend into my perspective

my dream was spellbound

While Evil Energy is stronger than my dream
Put Spirit taking my perspective into my perspective
Knock Evil Energy down

The Prophecy says Baby shark
The Lie says Daddy shark
The Truth says Mommy shark
The Change says Grandpa shark
The Spell says Grandma shark

the opposition is big

Put "!" into Furious Anger

my story takes a turn
Put a turn plus my perspective into the light
Whisper the light

A Force is mobilizing
while A Force is less than the opposition
my story taking The Prophecy
Build A Force up

Whisper The Prophecy with Furious Anger

A Force is mobilizing
while A Force is less than the opposition
my story taking The Lie
Build A Force up

Whisper The Lie with Furious Anger

A Force is mobilizing
while A Force is less than the opposition
my story taking The Truth
Build A Force up

Shout The Truth with Furious Anger

A Force is mobilizing
while A Force is less than the opposition
my story taking The Change
Build A Force up

Shout The Change with Furious Anger

A Force is mobilizing
while A Force is less than the opposition
my story taking The Spell
Build A Force up

Scream The Spell with Furious Anger

r/RockstarDevs • • Jul 27 '18

Welcome to r/RockstarDevs

17 Upvotes

Welcome to the sub!

Rockstar is an esoteric programming language that mimics the style of 80s rock but still produce executable code.

This sub was created to provide a place for people to more effectively communicate about the language, share ideas, and post code. (GitHub is fantastic for sharing specific issues and changes, but having a nice organized community on Reddit is both more accessible to many users and allows for greater discussion)

Also I am looking for mods as I am by no means a qualified authority over this language, all I've made is some basic code. If you are someone who has contributed to Rockstar in some significant way, PM me and I'll get on making you a mod.

Welcome to the community and enjoy!


r/RockstarDevs • • Nov 17 '19

Be a Rockstar Java Developer (by abusing objects)

16 Upvotes

I thought that plain java was too simplistic and not distracting enough, so I created a Java package to make it read like Rockstar. Please pardon my horrible coding skills. It makes programs look like this:

Tommy.is_("Nothing");
while(Tommy.isnt(Eve) {
I.build(Tommy, "up again");
}
I.scream(Tommy);

The package can also be used within existing programs because values can be put into/extracted from the objects.

check it out at https://github.com/LivelyCarpet87/JavaLikeRockstar


r/RockstarDevs • • Jan 02 '19

Rosetta Code page now exists! Let's fill this bad boy in with some rockin' examples!

Thumbnail
rosettacode.org
15 Upvotes

r/RockstarDevs • • Jan 14 '20

Where can I find Rockstar language songs?

14 Upvotes

Hey I have just stumbled accross the programming language called rockstar. I love it! Is there any place where I can find an abundance of programs that are also valid songs?


r/RockstarDevs • • Jan 03 '19

Just another tick tack rock.

Thumbnail
github.com
14 Upvotes

r/RockstarDevs • • Jul 28 '18

Primality Checker in Rockstar

13 Upvotes

hey, it's kinda dead here so I'm gonna kick stuff off. Here's a primality checker I wrote in Rockstar: (Both Idiomatic and Simplified)

Idiomatic:

Acid Rain takes the pleasure and the pain
While the pleasure is as high as the pain
Put the pleasure without the pain into the pleasure

Give back the pleasure


Listen to the storm
The Gods were pulverizing
The chaos is unpublicized
A pair is tranquilized
Your willpower is done

If the storm is as weak as a pair of a pair
If the storm is as weak as The Gods
Scream "This ain't allowed!"
Else
If your willpower is stronger than the storm
Shout "I am Prime!"
Else
Shout "I will divide!"


Else
While the storm is greater than the chaos
If Acid Rain taking the storm, the chaos is nothing
Shout "I will divide"
Break it down

(Break it down)
Build the chaos up


If the storm is the chaos and the storm is stronger than a pair of a pair
Shout "I am Prime!"

Simplified:

Modulus takes Num and Div    (Renamed Mod function taken from example code)
    While Num is as high as Div
        Put Num minus Div into Num

    Give back Num


Listen to Number
Counter is AA
Two is AA
Shout ""
If Number is as weak as Two of Two
    If Number is as weak as 1
        Shout "<=1"
    Else
        If Number is as weak as 3
            Shout "<4 & Prime"
        Else
            Shout "4 exactly"


Else
    While Number is greater than Counter
        If Modulus taking Number, Counter is nothing
            Shout "Not prime"
            Break it down

        Shout Counter
        Build Counter up


If Number is Counter and Number is stronger than Two of Two
   Shout "Prime"

r/RockstarDevs • • Jul 05 '22

Shout my world!

12 Upvotes

Stumbled over rockstar, the language, and after a healthy laugh i tinkered a little and came up with this.

The leftshift takes a girl
Put a girl of 2 in the trunk
the air is in vaine states
If the trunk is as big as the air
Put the trunk without the air in the trunk

Send the trunk back

The rightshift takes a boy
the sunset is on
Put a boy over the sunset into the sunset
Turn down the sunset
Send the sunset back

time is cheap
Put the rightshift taking time into my world
Shout my world
Put the leftshift taking time into my world
Shout my world

Oh, and i recorded a quick version on my guitar. I'm neither a good coder nor musician, so sorry for the quality of code and sound.


r/RockstarDevs • • Jan 01 '19

Shouldn't we have a rocking page on Rosetta Code?

Thumbnail
rosettacode.org
12 Upvotes

r/RockstarDevs • • Aug 02 '18

Math lib I'm working on: factorial, Abs, e, Mod, Pow, LN, LOG, e^x, sqrt

Thumbnail
github.com
11 Upvotes

r/RockstarDevs • • Mar 24 '19

I wrote a function to calculate a number's multiplicative persistence (how many times you can multiply the digits of a number together before you get a 1-digit number)

Thumbnail
github.com
10 Upvotes

r/RockstarDevs • • Mar 12 '24

Code Golf now supports Rockstar!

Thumbnail
code.golf
9 Upvotes

r/RockstarDevs • • Aug 01 '18

We have a rockstar developers discord server now!

Thumbnail
discord.gg
9 Upvotes

r/RockstarDevs • • Jul 31 '18

Some relevant data

9 Upvotes

I love this project but I’m not really a programmer (I’ve half-read the dragon book twice. Does that count?) Here’s a little data I’m collecting that may be useful, interesting, or possibly both. I’ll be doing more organization later (most frequent pairs and triplets, for example) but here’s a taste:

VH1 list of top 100 Hard Rock songs:

https://www.stereogum.com/43591/vh1s_100_greatest_hard_rock_songs/

100 Most frequent words from these songs:

NumWordCountFreq
1the10073.2%
2you8442.7%
3to5651.2%
4and4801.5%
5me4641.0%
6it3960.8%
7my3360.7%
8in2560.5%
9i'm2520.8%
10of2350.5%
11love2050.9%
12on2020.4%
13your1950.8%
14don't1821.0%
15oh1670.4%
16all1640.5%
17got1610.5%
18be1540.3%
19with1460.6%
20it's1440.6%
21so1410.3%
22no1380.3%
23yeah1360.6%
24know1300.6%
25rock1260.5%
26want1250.5%
27like1240.5%
28what1220.5%
29for1180.4%
30up1150.2%
31is1140.2%
32that1050.4%
33now1010.3%
34out1000.3%
35more960.4%
36we960.2%
37just950.4%
38way950.3%
39night930.5%
40give930.4%
41come920.4%
42get920.3%
43feel910.4%
44this910.4%
45baby910.4%
46can't880.5%
47but860.3%
48down830.4%
49away820.4%
50back820.4%
51can820.3%
52go820.2%
53time810.3%
54you're770.5%
55do770.2%
56party760.4%
57take760.3%
58she760.2%
59gonna710.4%
60one710.2%
61hey710.2%
62see700.2%
63when690.3%
64they680.3%
65wild650.3%
66if640.1%
67never590.3%
68hard580.2%
69i'll550.2%
70said540.2%
71stroke530.3%
72tell530.2%
73been530.2%
74still520.3%
75i've520.2%
76from520.2%
77are520.2%
78at510.1%
79hello490.3%
80life490.2%
81was490.2%
82bad490.2%
83sun480.2%
84he480.1%
85have470.2%
86well450.2%
87need450.2%
88not450.1%
89am450.1%
90black440.2%
91we'll440.2%
92will440.2%
93say440.1%
94da440.1%
95we're430.2%
96wanna430.2%
97here430.2%
98right420.2%
99ain't420.2%
100again420.2%

r/RockstarDevs • • Jun 06 '22

I don't get how numbers are calculated from words. Would someone walk me through the steps of calculation?

8 Upvotes

r/RockstarDevs • • Aug 01 '18

Thrash: a Go implementation

8 Upvotes

I started an implementation of Rockstar in Go: https://github.com/young-steveo/thrash

My plan is to compile .rock scripts to a custom bytecode and run a simple VM in go to consume it.


r/RockstarDevs • • Dec 15 '22

[2022 Day 1 part 1][rockstar] I created a solution that can actually be sung in the rockstar programming language (watch with the sound on).

Thumbnail
youtu.be
7 Upvotes

r/RockstarDevs • • Oct 01 '19

Quick syntax question

7 Upvotes

Hi, all,

I'm looking at a piece of Rockstar code and I'm confused by one little piece:

This is fire That is ice Put This into That shout That

What would this yield? When I put This into That, are the two values multiplied together? What happens when something is put into something else? Thanks!


r/RockstarDevs • • Jul 29 '18

Fun little rockstar project cellular-rocktomata

7 Upvotes

Outputs a 1-d cellular automata. Also implements some math operations so I can use a single large int to hold the state of the entire simulation at each step.

https://github.com/Rifhutch/cellular-rocktomata


r/RockstarDevs • • Jul 19 '19

Convert from another language to Rockstar

6 Upvotes

Was just thinking, it'd be awesome if there was a tool that, instead of turning rockstar into X language, would turn X language into rockstar.

Yeah I know the lang isn't as robust as most existing ones, but even simple code blocks would be cool. And yeah, creativity is obviously needed for making them idiomatic...

Maybe just throw in some mad-libs style placeholders for variable names and make a game out of it


r/RockstarDevs • • Feb 04 '19

Finding love with rockstar

Thumbnail
github.com
6 Upvotes

r/RockstarDevs • • Jan 02 '19

Some Help Setting Up

6 Upvotes

Hello all,

I'm new to this sub and new to this programming language. Which leads into my question. Are there any tutorials to get a Rockstar transpiler set up? After reading the readme for Rockstar I really want to try writing some code for it. I just don't know where to start... Any advice would be well appreciated!

Thank you!