C0deH4cker / Fission

The programming language that defies the laws of physics
MIT License
23 stars 4 forks source link

Random mirror # doesn't compile with g++ #1

Closed m-ender closed 8 years ago

m-ender commented 9 years ago

When compiling with

g++ --std=c++11 *.cpp -o Fission

I get

Mirror.cpp: In member function ‘virtual bool fsn::Mirror::onHit(fsn::Atom&)’:
Mirror.cpp:65:38: error: ‘arc4random’ was not declared in this scope
    atom.dir = (atom.dir + arc4random() % 3 + 3) & 3;
                                      ^

Would you mind using a more platform independent PRNG there?

C0deH4cker commented 9 years ago

I actually didn't think anyone was using Fission so I never bothered completing my changes. Since I now know that at least one person is using it, I'll go back and finish making changes (and fix this bug you reported, thanks!).

On May 1, 2015, at 5:08 AM, Martin Büttner notifications@github.com wrote:

When compiling with

g++ --std=c++11 *.cpp -o Fission I get

Mirror.cpp: In member function ‘virtual bool fsn::Mirror::onHit(fsn::Atom&)’: Mirror.cpp:65:38: error: ‘arc4random’ was not declared in this scope atom.dir = (atom.dir + arc4random() % 3 + 3) & 3; ^ Would you mind using a more platform independent PRNG there?

— Reply to this email directly or view it on GitHub.

m-ender commented 9 years ago

It's a fun challenge to program in this. I wrote atoi and itoa if you're interested:

     ;
/  Y@<+@0'L/  [Y]_L
R? % \  @  /  $J
  ;A          /[{+++++++++L
   _          ; ;
   UR+++++++++>/
              O

and

     /"0"/    \
R'x[@%  //    /
     \$@{   / \
   @    \     <\
   $       ;  ;}+++++++++L
   %@       A {/
   M     \@<+@/
   ~       @
  ;Z       K Y 0'L
         \  !A   /

Is there a more convenient way to get an atom with mass 10 than R+++++++++?

C0deH4cker commented 9 years ago

I have had a massive set of local changes for a long time that I never pushed as they weren't finished. They somewhat change the way the language works so I was hesitant to do so. I think that I'll push those in a new branch while I finish working on them and let people see what they think of the new Fission. It modifies some components and adds others.

C0deH4cker commented 9 years ago

Just fixed this locally, will be in the next group of changes.

m-ender commented 9 years ago

Let me know when you've pushed that new branch. I'm currently working on a larger program, so I guess that would break a lot (but maybe simplify some things).

C0deH4cker commented 9 years ago

That is the goal, yes. Not much changes, but there are a few usability changes. I'm open to suggestions as well.

On May 25, 2015, at 4:09 AM, Martin Büttner notifications@github.com wrote:

Let me know when you've pushed that new branch. I'm currently working on a larger program, so I guess that would break a lot (but maybe simplify some things).

— Reply to this email directly or view it on GitHub.

m-ender commented 9 years ago

Somewhat off topic for this discussion, but I wanted to show you the larger program I mentioned: http://codegolf.stackexchange.com/a/50858/8478. I'd think you find some people interested in esolang design in general in the CodeGolf.SE chat.

C0deH4cker commented 9 years ago

Wow that's amazing! I'll definitely spend some time figuring out how it works later. Seems like a pretty good test case since it (ab)uses almost every component in the language!

On May 27, 2015, at 9:13 AM, Martin Büttner notifications@github.com wrote:

Somewhat off topic for this discussion, but I wanted to show you the larger program I mentioned: http://codegolf.stackexchange.com/a/50858/8478

— Reply to this email directly or view it on GitHub.

m-ender commented 9 years ago

I've expanded that post with a very extensive explanation that comes close to a Fission tutorial. ;)

I also found a 6-byte quine: http://codegolf.stackexchange.com/a/50968/8478

I'm really looking forward to the new version you mentioned. I've got a bunch of ideas to improve Fission, but I'd like to see what you had in mind before proposing them.

m-ender commented 9 years ago

FYI, there are now at least two people using Fission. ;)

C0deH4cker commented 9 years ago

I noticed! I have some ideas for modifications to Fission, but I'd like to run them by you first for feedback. If you're on Freenode, I created #Fission-lang (#Fission is already registered, but nobody is in the channel :/)

m-ender commented 9 years ago

I haven't used IRC in forever, but I found a web client. I'd definitely prefer gitter or just SE's chat though. ;)

C0deH4cker commented 9 years ago

Well I tried gitter. I can say that at the very least their iOS client is a piece of crap as it doesn't let you do anything besides join one of the handful of rooms listed by default and your organizations. I see no way to create a room or even leave a room you've joined. The idea of it is cool but the implementation is way off.

Also on SE's iOS client I can't figure out how to use chat :/.

On Jun 1, 2015, at 3:16 AM, Martin Büttner notifications@github.com wrote:

I haven't used IRC in forever, but I found a web client. I'd definitely prefer gitter or just SE's chat though. ;)

— Reply to this email directly or view it on GitHub.

m-ender commented 9 years ago

Ah yeah, SE's mobile apps don't support chat (yet?). There's a separate (unofficial) app ChatSEy though, which is alright. But I'm okay with Freenode if the other options are a hassle for you.

On Mon, Jun 1, 2015 at 6:12 PM, C0deH4cker notifications@github.com wrote:

Well I tried gitter. I can say that at the very least their iOS client is a piece of crap as it doesn't let you do anything besides join one of the handful of rooms listed by default and your organizations. I see no way to create a room or even leave a room you've joined. The idea of it is cool but the implementation is way off.

Also on SE's iOS client I can't figure out how to use chat :/.

On Jun 1, 2015, at 3:16 AM, Martin Büttner notifications@github.com wrote:

I haven't used IRC in forever, but I found a web client. I'd definitely prefer gitter or just SE's chat though. ;)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/C0deH4cker/Fission/issues/1#issuecomment-107642727.

C0deH4cker commented 9 years ago

Apparently ChatSEy isn't an app for iOS. If you have a better option, feel free to suggest it. For now I think IRC is the most manageable option at least when I'm not at my computer. I still have about 6 hours until I get back from work, so I'll be on then.

On Jun 1, 2015, at 10:14 AM, Martin Büttner notifications@github.com wrote:

Ah yeah, SE's mobile apps don't support chat (yet?). There's a separate (unofficial) app ChatSEy though, which is alright. But I'm okay with Freenode if the other options are a hassle for you.

On Mon, Jun 1, 2015 at 6:12 PM, C0deH4cker notifications@github.com wrote:

Well I tried gitter. I can say that at the very least their iOS client is a piece of crap as it doesn't let you do anything besides join one of the handful of rooms listed by default and your organizations. I see no way to create a room or even leave a room you've joined. The idea of it is cool but the implementation is way off.

Also on SE's iOS client I can't figure out how to use chat :/.

On Jun 1, 2015, at 3:16 AM, Martin Büttner notifications@github.com wrote:

I haven't used IRC in forever, but I found a web client. I'd definitely prefer gitter or just SE's chat though. ;)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/C0deH4cker/Fission/issues/1#issuecomment-107642727.

— Reply to this email directly or view it on GitHub.

m-ender commented 9 years ago

No problem. I will likely be asleep by then, so just dump your ideas in IRC and I'll have a read tomorrow morning.

On Mon, Jun 1, 2015 at 8:54 PM, C0deH4cker notifications@github.com wrote:

Apparently ChatSEy isn't an app for iOS. If you have a better option, feel free to suggest it. For now I think IRC is the most manageable option at least when I'm not at my computer. I still have about 6 hours until I get back from work, so I'll be on then.

On Jun 1, 2015, at 10:14 AM, Martin Büttner notifications@github.com wrote:

Ah yeah, SE's mobile apps don't support chat (yet?). There's a separate (unofficial) app ChatSEy though, which is alright. But I'm okay with Freenode if the other options are a hassle for you.

On Mon, Jun 1, 2015 at 6:12 PM, C0deH4cker notifications@github.com wrote:

Well I tried gitter. I can say that at the very least their iOS client is a piece of crap as it doesn't let you do anything besides join one of the handful of rooms listed by default and your organizations. I see no way to create a room or even leave a room you've joined. The idea of it is cool but the implementation is way off.

Also on SE's iOS client I can't figure out how to use chat :/.

On Jun 1, 2015, at 3:16 AM, Martin Büttner <notifications@github.com

wrote:

I haven't used IRC in forever, but I found a web client. I'd definitely prefer gitter or just SE's chat though. ;)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <https://github.com/C0deH4cker/Fission/issues/1#issuecomment-107642727 .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/C0deH4cker/Fission/issues/1#issuecomment-107685581.

m-ender commented 9 years ago

Looks like this isn't really working out. I've edited my GitHub profile to show my email address, so feel free to just email me directly... asynchronous communication works better across our timezones.

C0deH4cker commented 8 years ago

Fixed in d019e2265e006f74de80cd9e6e39d0950fd2349a