Skip to content
I made a 🐍Snake AI 💻
Profile icon
h
has Hacker Plan
DynamicSquid

[ currently broken :D ]

Hi!

I made Snake. You can control it using WASD, or the arrow keys. Eat the red apples, and don't crash into the walls or yourself!

But.....

When you press space, it uh... helps you out a little :)

Enjoy!

You are viewing a single comment. View All
Profile icon
firefish

Also are the logos good?
image
(slice, dusk, and night)

Profile icon
DynamicSquid

@firefish Slice of pizza. I like the Dusk logo.

Profile icon
firefish

@DynamicSquid slice, thinking like slice of orange (or any citrus fruit for that matter) but okay

Profile icon
firefish

@firefish Why have four eight people upvoted lol, if you upvoted but areb't related to the night project, reveal yourself

Profile icon
firefish

@anonymous360c You have? Oh, why did you undo it then

Profile icon
anonymous360c

What do you mean? @firefish

Profile icon
firefish

@anonymous360c The message you deleted

Profile icon
anonymous360c

What message? Oh that. @firefish

Profile icon
firefish

@anonymous360c You said

I have now.

But I can't find where it was in reply to... -_-

Profile icon
anonymous360c

Ah yes that. I did and I still have. I think these logos are AWESOME @firefish

Profile icon
firefish

@anonymous360c you know I didn't make the night one, lord SQUOD did

Profile icon
firefish
Profile icon
firefish

@DynamicSquid Would this be good for SoN?
image

SoN literally stands for Slice of Night

Profile icon
DynamicSquid

@firefish Why is my language eating pizza?

Profile icon
firefish

@DynamicSquid It is the Slice Of Night, A.K.A. SoN

Profile icon
DynamicSquid

@firefish

"Hi, could I take your order now?"

"Sure, what are your specials today?"

"We're offering a slice of Night"

"Yeah I'll take that"

Profile icon
firefish

@DynamicSquid

"Eat in or takeaway?"

"Eat in please."

"Sorry, it's lockdown, we can only offer takeaways"

Profile icon
DynamicSquid

@firefish

"Then why did you ask me if I wanted eat in"

Profile icon
firefish

@DynamicSquid
"Because our restaurant aims to have as many one star reviews as possible."

"Why?"

"Confidential Policy."

"Buy why?"

"Policy."

"I'll hire a policy designer for you."

"We already have. He was the chef's pet rat."

"I'm out of here."

Profile icon
RayhanADev

@firefish @DynamicSquid comedy gold xD. 👌

Profile icon
firefish
Profile icon
DynamicSquid

@firefish wait how is this is most upvoted comment lol

Profile icon
firefish

@DynamicSquid I asked the same question lol

Profile icon
firefish

@AlianaYee dat le one i didn't make

Profile icon
DynamicSquid

@AlianaYee yay thanks!!!

Profile icon
DynamicSquid

@firefish Ah! There's a guy spamming repl.it with 10 posts per second!!

Profile icon
[deleted]

@firefish - Slice the 8, because its 12 now(including me lol)

Profile icon
[deleted]

@DynamicSquid - 10 posts per second!!! He must be one of those dynamic tentacly creatures...only they have ten-tacles that can post ten comments every second...

Profile icon
[deleted]

@firefish

"Wait! Please make sure you give us a one-star review! Also, don't go out, its not safe"

"Why do you care?"

"We also have a policy that we should protect annoyed customers"

"Lemme guess, your 'policy designer', the rat, created this policy?"

"No sir, this was created by our Customer Care team of specialists"

"What? Humans made such a dumb policy?"

"I never said they were humans...a parakeet, a chimpanzee, a kangaroo, and a snek make a fine team, don't they?"

"I do not even want to imagine what a snek is..."

lol @RayhanaDev

Profile icon
StringentDev

ima at school. @firefish

Profile icon
firefish

@Lethdev2019 lol then how are you sending messages, I just got home

Profile icon
firefish

@KelpHead

Slice the 8, because its 12 now(including me lol)

nice grammar lol

Profile icon
StringentDev

they can't block it even if they tried. @firefish

Profile icon
DynamicSquid

@firefish I send messages all the time at school. I also get my phone taien away from me all the time at school

Profile icon
firefish

@DynamicSquid Have you seen this @poopyarmy nut? He's spamming the repltalk rules and gave me 68 flipping pings

Profile icon
LTI2

@firefish
"But Why?"
"We work for the FBI"
"But Why?"
"Welp, time to lock you in the brainwashing chamber."

Profile icon
firefish

@LTI2
manager walks in with a rat on his shoulder
"Eh, what's this?"
"This is our manager. He takes care of the chef's rat."
customer punches rat
"You WHAT?"
customer runs away

Profile icon
GeneralBaker

"Wait where did the chef's rat go?"
"I don't know, but something is moving in your Slice of Night pizza box."
@firefish

Profile icon
firefish

@GeneralBaker
"Mine? I only just came in. I think the pizza box belongs to the nut who just ran out of here."

Profile icon
GeneralBaker

"But you obviously came for our famous Slice of Night, so we had it prepared in advance. We also make assumptions about our customers, so we prepared this 'mystery meat' just for you."
"You happen to be correct, I love mystery meat."
Customer takes a bite
"Good flavor."
Chef runs in
"WHERE IS MY RAT?!"
@firefish

Profile icon
firefish

@GeneralBaker
"Uh... maybe there?" pointing towards the mystery meat

"YOU'RE FIRED! AND SO ARE YOU! FOR FEEDING THIS MAN MY RAT!"

"Wait... this is rat?" pukes

Profile icon
GeneralBaker

"No really, the rat is OK! I didn't cook it!"
customer pukes again
@firefish

Profile icon
firefish

@GeneralBaker
customer can't hear because he is still vomiting his dinner from yesterday out

Profile icon
GeneralBaker

"Make sure you at least give us a 1 star review on the way out." - chef
"ARE YOU KIDDING?! I AM GIVING YOU A FREAKING 5 STAR REVIEW FOR THIS! NOW NO ONE WILL EVER COME HERE AGAIN!!!"
"Please no! You will ruin me!"
@firefish

Profile icon
firefish

@GeneralBaker
food hygiene inspector enters
"So, what's this?"

"My customer ate my pet rat."

"Good grief! Close your restaurant. How on earth did you manage to get business?!?!"

Profile icon
GeneralBaker

"It's ok. This customer already destroyed my 1 star review record." @firefish

Profile icon
[deleted]

@GeneralBaker walks in "Where's the Slices of Night?"
Manager: "Leave, this place is closed"
Me: "Aw, now I don't get a slice of night. Well, I guess I'm going to Subway."
plays 4"33'

Profile icon
SwaroopBappanad

@firefish Ratatouille confirmed.

Profile icon
firefish

@SwaroopBappanad I knew this was going to pop up.

Profile icon
DynamicSquid

@firefish guys stop cloggin up my notifications

Profile icon
firefish

@DynamicSquid Just pretend it was the poopypants guy off spamming again

Profile icon
RahulChoubey1

@DynamicSquid slice of pizza indeed

Profile icon
firefish

@RahulChoubey1 slice of slice indeed

Profile icon
firefish

@DynamicSquid help @realTronsi dared me to code in a script font
image

Profile icon
realTronsi

@firefish why are you exposing me everywhere :(

Profile icon
firefish

@realTronsi inviting him

Profile icon
firefish

@DynamicSquid HOW MANY CYCLES DID I GET FROM THIS COMMENT AGAIN? 69 that's right i think

Profile icon
DynamicSquid

@firefish lol. oh I'm working on the interpreter for v4 now and I've encountered a bump. not yet sure if the bump is small, or if the bump is an entire fricking mountain. i'll let you know soon

Profile icon
firefish

@DynamicSquid oki, I'll carry on rEmAkInG NiGhT In rUsT grilling apricots on the barbecue

Profile icon
firefish

@DynamicSquid NIGHT'S DYNAMICALLY TYPED NOW HELP ME PLOZ GOSH NO OW HELP THE VM DIED OF DEAD @fuzzyastrocat

Profile icon
DynamicSquid

@firefish I already made a language in Rust https://github.com/DynamicSquid/mirror

Profile icon
firefish

@DynamicSquid I saw it, use cargo please, the include! macro is ew

Profile icon
firefish

@DynamicSquid Due to this change, Night will have to be unaffiliated from SoN

Profile icon
DynamicSquid

@firefish I tried using cargo but it's too complicated. Also I don't have time cause it's for a school project and it's due tomorrow and I have so many buggies to fix

Profile icon
firefish

@DynamicSquid

cargo new mirror

you're done

Profile icon
DynamicSquid

@firefish what does that command do?

Profile icon
firefish

@DynamicSquid creates a new directory called mirror
creates a directory called src inside it
you put your files there
instead of include! you import modules
done

Profile icon
fuzzyastrocat
Profile icon
DynamicSquid

@firefish okay so I've been deeply thinking about it and I think it works

Profile icon
firefish

@fuzzyastrocat SoN is no longer the Slice Of Night, it just SliceVM now

Profile icon
fuzzyastrocat

@firefish Well, that's fine... plenty of langs have a purpose-built vm, like Python

Profile icon
firefish

@DynamicSquid oki! just SoN is now SliceVM, and night is nolonger c-style, so yeah a lot to think about

Profile icon
firefish

@fuzzyastrocat just removing a lot of night references is reeeeeeeeeee

Profile icon
fuzzyastrocat

@DynamicSquid Dang I wish my school projects could be that cool...

Profile icon
DynamicSquid

@fuzzyastrocat Oh, about lang dev, if I want my lang to be good, it has to be different. Right now, it's very similar to Python. Aside from catching some errors at compile time, what are some interesting things that I could add to Night?

Profile icon
firefish

@DynamicSquid Dang I wish my school projects could be that cool...

@fuzzyastrocat Yeah, and not to draw out pictures of castles... (our history teacher was generous last year, not so much now)

Profile icon
DynamicSquid

@fuzzyastrocat No my teacher isn't asking us to build a language lol. My teacher gave out a final assignment and said show me your skills

Profile icon
firefish

@DynamicSquid Expressions: anonymus functions.
e.g.

set f = (a,b,c> a+b+c);

is equivalent to

def f(a, b, c) { return a + b + c; }
Profile icon
DynamicSquid

@firefish Social (or History) is the most boring class ngl

Profile icon
fuzzyastrocat

@firefish Lol, history class ≠ art class

@DynamicSquid That's my point... I've never been asked "Show me your skills in relation to this class's subject matter". It's always "here's the project, do this."

Profile icon
firefish

@fuzzyastrocat thou hast been pungethed to the new repl

Profile icon
DynamicSquid

@firefish lambdas? I'm definitly going to add those in, but Python already has those

Profile icon
DynamicSquid

@fuzzyastrocat Oh lol, that sucks :(

Profile icon
DynamicSquid

@fuzzyastrocat What language do you do at school? Make a interpreter/compiler for that language and do the assignment in your interpreter/compiler :)

Profile icon
fuzzyastrocat

@DynamicSquid You could add:

  • Some kind of interesting memory management paradigm. Perhaps ownership-style?
  • A type system like Haskell's, where you can pass types to functions as if they were normal values. Basically, making types "first-class citizens".
  • Multiple dispatch. This one is neat, I'd highly suggest it. Basically, in most OO langs you have single dispatch — when I call my_var.some_function, the some_function I'm calling depends on the type of my_var. Well, what if the function depended on the types of all arguments? So, instead of doing:
def my_function(x, y, z): if type(x) is int and type(y) is str and type(z) is int: # stuff 1 elif type(x) is str and type(y) is int and type(z) is str: # stuff 2 # etc etc

You do something like:

def my_function (x: int, y: str, z: int): # stuff 1 def my_function (x: str, y: int, z: str): # stuff 1 # etc etc

And obviously, you don't have to give a type — doing def x(y): would apply to y of any type.

More info on multiple dispatch can be found here.

Profile icon
fuzzyastrocat

@DynamicSquid I don't do a language at school. Not even offered.

Profile icon
DynamicSquid

@fuzzyastrocat What so what do you do in Computer Science class then?

  • Oh no. I've already have enough nightmares about memory ownership in Rust lol
  • That seems interesting, but I feel like it might seem off in a dynamically typed lang
  • Ooh... that seems really interesting... definitely going to look more into that
Profile icon
fuzzyastrocat

@DynamicSquid There is no computer science class.

  • Eh, I don't mean strictly rustian. You could probably make it your own, I'm just saying it'd be neat to have a unique memory management scheme.
  • Well, I'm not sure. I mean, the functions str() and int() exist in Python, so why can't the types themselves exist as entities? (Or, maybe each type is a function, and when called that function casts the argument to its type. So basically like Python's int and str functions, but the function itself is used as the type it casts to.)
  • Great!

A lang with both the second and third ideas could be cool:

int # => the "int" type, which is actually a function int("32") # => calling the int function, which casts "32" to an int class MyType: # a demo type pass int(MyType()) # oh no, there is no dispatch for type `MyType` in the int function! def int(x: MyType): # adding a dispatch option print("Hooray!") int(MyType()) # => "Hooray!"
Profile icon
DynamicSquid

@fuzzyastrocat Wait, you don't have computer science at your school :(

Oh that does seem interesting. I probably will add types as functions

Profile icon
fuzzyastrocat

@DynamicSquid Can you come on the fuzpy repl for a sec (not to discuss fuzpy, but just to discuss this)

Profile icon
firefish

@fuzzyastrocat so fuzpy WAS a collaboration... hehe

Profile icon
fuzzyastrocat

@firefish No, I had invited Squid to show them how a bytecode interpreter works.

Profile icon
firefish
Profile icon
fuzzyastrocat

@firefish You can ask squod if you don't believe me

Profile icon
DynamicSquid

Hey, @firefish, care to help me on something?

So I checked the GitHub Linguist guide, and in order for them to add syntax highlighting to a user made language, it must be in at least 200 repositories.

For example, this person tried to add their own language, but fell short of the 200 person requirement.

Right now, a total of NullPointerException repositories on GitHub are written in Night.

Which means we're actually really close. If my math is correct then we only need 200 - 0 = 20 repositories and then we can add a language on GitHub!

Now I'm not saying that I want to get 200 people using Night right now. It'll probably take decades, or perhaps never, I'm perfectly fine with that, but I'd be interesting to try...

So got any ideas?

Profile icon
firefish

So got any ideas?

@DynamicSquid Not at 3am I sure don't

Profile icon
DynamicSquid
Profile icon
firefish

@DynamicSquid You sent me that message at 3am my time, it's 6pm now not a problem

Profile icon
DynamicSquid

@firefish oh okay

Profile icon
firefish

@DynamicSquid and go back to primary school
image

Profile icon
firefish

@DynamicSquid I'm seven hours ahead of you

Profile icon
DynamicSquid

@firefish Trust me, I'm an expert when doing mhdjgb

Profile icon
LTI2

@AJDevelopment
Manager: BTW, we didn't lock you in the brainwashing chamber yet. Snek!
Me: Vomits

Profile icon
firefish

@LTI2
customer still vomiting, has been for about a minute
ambulance comes
customer get's taken to hospital

Profile icon
LTI2

@firefish
Customer vomits for another hour
Manager: Be sure to give a one-star review!

Profile icon
firefish

@LTI2 Headlines:

Customer gets food poisoning at worst-rated restaurant

Profile icon
DynamicSquid

@firefish so close to 300 upvotes

Profile icon
firefish

@DynamicSquid oh god forgot about this

Profile icon
DynamicSquid

@firefish but somehow the among us repl took 1st place for highest upvoted posts within the last 3 years

Profile icon
firefish

@DynamicSquid l'algorithm dumb

Profile icon
firefish

@DynamicSquid haha é snek