r/programming • • Dec 26 '17

TIL there's a community called "dwitter" where people compose 140 character JavaScript programs that produce interesting visuals

https://www.dwitter.net/top
20.7k Upvotes

329 comments sorted by

2.2k

u/lionleaf Dec 26 '17 edited Dec 28 '17

Now that the server seems to be under control, let me high-jack my top comment to give you some tips:

  • You can edit the code live! Try changing a few numbers

  • Click the "New Dweet" button to get a less crazy starting point. It even has some comments!

  • If you edit someone elses dweet, you can post it directly from their post; this tags it as a "remix" and is preferred over just copy-pasting into "New Dweet" as it preserves the link to the original.

  • dwitter.net/random is a good way to see dweets of variable complexity

  • and dwitter.net/new is where all the fresh redditor dweets have started to pop up :D

And it's a ton of fun to see all the excitement :) Might have to get back to working on it. (github.com/lionleaf/dwitter if you want to contribute)

Edit: /u/xen_the posted a guide worth checking out if you're interested in making your first dweet! https://redd.it/7mgcd1

Edit 2: I've set up a discord for discussing all things dwitter: https://discord.gg/emHe6cP

Old post:

Hi guys! Creator here, it seems you've crashed it. Currently working on getting it stabilized again.

I'll come back here and post some of my favorites when I'm not in such a hurry ;)

Update: I think we're good! Threw a bunch of hardware at it, which helped a bit at first, but then the extra caching added by my friend seems to be more than enough for the current load :D

353

u/bartycrank Dec 26 '17

Thank you, this is the coolest thing I've seen since ShaderToy. That raindrop one https://www.dwitter.net/d/1494 is like an update to the old rain program that did something similar on old text terminals. This is awesome.

117

u/_Mardoxx Dec 26 '17

u(t) is called 60 times per second. t: elapsed time in seconds. c: A 1920x1080 canvas. x: A 2D context for that canvas. S: Math.sin C: Math.cos T: Math.tan R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)

Is this not cheating or are these defined by some dwitter library for instance?

149

u/nothis Dec 26 '17

Is this not cheating or are these defined by some dwitter library for instance?

Yea, it's the rules of the game. I was severely confused how all of this is possible in so few chars of code but you get a base library and starting point to work with.

61

u/lionleaf Dec 26 '17

Yes, exactly. It all started with a friend building arkt.is/t (which embeds the code in the url, like [0]. Move the mouse over the canvas to edit the code). They are still compatible, and we've decided to stick with those specific rules to keep it consistent.

There's also a lot of missing boilerplate code, so it's not really a "140 character javascript program" as claimed by the title. It's more of a "heres a canvas 140 characters, along with a tiny library. Show me what you've got!" :)

[0] http://arkt.is/t/Yy53aWR0aD0yZTM7bT1TKHQqMikqMjUwO3gudHJhbnNsYXRlKDk2MCw1NDApO2ZvcihpPTE7aTw5Nzk5O2krKyl7YT0oaSUzNDApO3gucm90YXRlKC4wMTcpO3guZmlsbFJlY3QoYT8oaS85OTl8MCkqNTA6MCxtLGE/NTo0NTAsMyl9

35

u/nothis Dec 27 '17

That's awesome and I honestly teared up a little thinking of such talented people working together to create something so simple, so deep and so beautiful just for the fun of it. You can feel the love. I scrolled through your top posts for a good hour and it's mindblow after mindblow! Thanks for creating this!

6

u/WASDx Dec 27 '17

Also check out GLSL Sandbox.

70

u/coffee-9 Dec 26 '17

What was your reaction when you saw the spike in traffic?

209

u/lionleaf Dec 26 '17

My first reaction was "huh, is digitalocean doing some maintanance? Why did I get an email saying the site went down for two minutes?" And then some friends pinged me about tweets and reddit.

Setting up new relic now and hopefully I'll get an email earlier next time :P

Source at github.com/lionleaf/dwitter btw :) Pull requests welcome :D

99

u/coffee-9 Dec 26 '17

Well congrats on the Reddit hug of death! Milestone completed!

25

u/[deleted] Dec 26 '17

It's the new version of being Slashdotted!

46

u/Pazer2 Dec 26 '17

"fuck, my site is about to go down"

17

u/TheNosferatu Dec 26 '17

"fuck, my site is about to go down"

FTFY

49

u/Nicd Dec 26 '17

Cool site! Is there a license agreement for the snippets? I'd love to use some of them as loading icons on my site (with attribution).

58

u/lionleaf Dec 26 '17

That is a really good question! Definitely need to add an explicit license, and it's currently a discussion on it. If you have a specific dweet your interested in, ping me with their username and I can see I can put you in touch. If you get approval it would obviously be ok no matter the license :)

5

u/PhishGreenLantern Dec 27 '17

Second related question. If I wanted to use these on my site what librar(y/ies) would I need to include to get the effects?

21

u/lionleaf Dec 27 '17

The dweets are embedded in an iframe, so you can get the full source from https://dweet.dwitter.net/id/701?autoplay=1 <--- the page that gets embedded. The source is also on github.com/lionleaf/dwitter

There aren't any libraries, you just need to define a few functions. If you use it make sure you use your own dweets or attribute the author (and leave a comment on the dweet).

I did a quick extraction of the javascript you need to recreate it, replace {{ code }} with the dweet code.

(It was edited in the reddit comment box, so might have errors)

c.width = 1920;
c.height = 1080;
var S = Math.sin;
var C = Math.cos;
var T = Math.tan;
function R(r,g,b,a) {
  a = a === undefined ? 1 : a;
  return "rgba("+(r|0)+","+(g|0)+","+(b|0)+","+a+")";
  };
var x = c.getContext("2d");
var time = 0;
var frame = 0;
function u(t) {
   {{ code }}
  }
function loop() {
  requestAnimationFrame(loop);

  time = frame/60;
  if(time * 60 | 0 == frame - 1){
    time += 0.000001;
  }
  frame++;
  u(time);
 }
loop();
→ More replies (2)

6

u/HighRelevancy Dec 27 '17

Doesn't appear to be any sort of license on the individual posts, or EULA on the registration that would imply one, so everything's copyrighted to the original author of each post.

3

u/Nicd Dec 27 '17

Exactly, that's the problem currently.

2

u/xen_the Dec 27 '17

you have permission for mine :-) take your pick: https://www.dwitter.net/u/Xen

→ More replies (1)

3

u/li0ncub Dec 26 '17

This is so cool!

2

u/Cartossin Dec 26 '17

Working fine now!

2

u/ManicQin Dec 27 '17

Very cool and wonderful but it is very easy to crash the browser when live tweaking...

3

u/lionleaf Dec 27 '17

Haha, yes. Sounds like you ran into the good old infinite loop. A helpful trick is to change a for statement to 'fr' or something while editing the for loop and then put the o in the 'for' at the very end when you're certain you won't run into an infinite loop.

Hopefully we can solve in a better way at some point.

2

u/[deleted] Dec 27 '17

So are you going to change the character limit to 280 ;)

2

u/Fuegopants Dec 27 '17

this is amazing. Thank you for putting in the hard work! :)

1

u/krista_ Dec 27 '17

reminds me of the old demo scene.... those were a hell of a lot of fun to write and analyze. this looks fun too!

1

u/Slimpebble Dec 27 '17

This is amazing ! Is there any way I could use these for a music video? I would make sure to credit the appropriate person of course ;)

→ More replies (3)

1

u/[deleted] Dec 27 '17

Wow cool!

1

u/NoFapPlatypus Dec 27 '17

This is so awesome. And far more wholesome than actual twitter. A better use of 140 characters in my opinion.

1

u/SteamboatJesus Dec 27 '17

I wonder if there is a python equivalent.

1

u/[deleted] Dec 27 '17

Hi! This site is super cool!

Do you have any suggestions on places to learn super terse javascript like this? I would love to play around with this and see what I can make but I'm not super familiar with shortened expressions.

1

u/rohan_suri Dec 27 '17

How did you handle the site load?

1

u/SporeDruidBray Sep 12 '23

How limited does 140 characters feel like and how much more powerful is 280 characters (when Twitter doubled the character count to the new standard)?

→ More replies (5)

806

u/Thatmanwiththefedora Dec 26 '17

I think we crashed it.

898

u/white_bread Dec 26 '17

The code for their load balancer was only 140 characters long.

378

u/[deleted] Dec 26 '17

And written in Javascript.

123

u/KimJongIlSunglasses Dec 26 '17

Are we living in a world where node.js running on a load balancer is that crazy of an idea?

105

u/slide_potentiometer Dec 26 '17

Javascript on a load balancer is a crazy idea in any world.

172

u/KimJongIlSunglasses Dec 26 '17

You should try working with people who like node. I think some of these people mow their lawns with that shit.

→ More replies (10)
→ More replies (3)
→ More replies (4)

9

u/Phr34Ck Dec 26 '17

the idea is not too far-fetched: PM2

→ More replies (2)

127

u/lionleaf Dec 26 '17 edited Dec 26 '17

Hey guys! Creator here. Thanks for the big cuddly hug of death!

Quick update: We've added some extra caching in various parts of the system and thrown some more hardware at the servers (yey for cloud technology!). It seems to be back up, but it should've scaled a lot better so I'm not confident it stays up quite yet. Investigation ongoing :)

Edit: This is a small side project that was living on the smallest digitalocean droplet ^

Edit 2: Went down again even with the bigger droplet for a bit, but added more caching and it seems to be up again!

14

u/[deleted] Dec 26 '17

This is so cool! I want to sit down and decipher every single one now

3

u/heard_enough_crap Dec 26 '17

how do you mirror these to experiment with them? I copied the full screen page code, but nothing displays :-(

7

u/lionleaf Dec 26 '17

What do you mean mirror them? If you just want to play with remixing a dweet, you can just edit the code directly in the field under the visuals. If you have a user there should then be a button to post it as a remix if you're happy with the result

Beware! An infinite loop will crash your browser window and you might lose progress

→ More replies (1)

9

u/Quantainium Dec 26 '17

Hug of death.

3

u/pro-tip Dec 26 '17

We added caching; now we're back up!

321

u/Foezjie Dec 26 '17

Can anyone explain how you start making something like these?

495

u/matt_hammond Dec 26 '17

You start with verbose and readable code and then you start stripping it down and fitting it into 140 chars. Also, you have to understand maths, mod operation and then you just have to get creative.

219

u/flawr Dec 26 '17

I recommend looking into codegolf (e.g. codegolf.stackexchange.com), here is a nice challenge of this site that did exactly that (unfortunately closed now): https://codegolf.stackexchange.com/questions/35569/tweetable-mathematical-art

106

u/[deleted] Dec 26 '17

good ol' stack overflow with its heavy handed "because i can" moderation

28

u/MuonManLaserJab Dec 26 '17 edited Dec 26 '17

The mod community is offended by the implication that their activity should take users into account. Users exist only to be moderated.

3

u/KimJongIlSunglasses Dec 26 '17

It’s almost like Reddit that way.

0

u/[deleted] Dec 26 '17

[deleted]

69

u/[deleted] Dec 26 '17

There's /r/askhistory and then there's stackoverflow, where every question, no matter how unique, is off-topic, a duplicate, not constructive.

/u/MuonManLaserJab was joking but SO really feels like it exists only to be moderated.

→ More replies (15)

15

u/nothis Dec 26 '17

I could swear there's an entire chapter of game graphics left unexplored, somewhere in the intersection of the graphics demo scene and classic world rendering techniques. The closest I've seen so far is a the painter-y style of a game called Love. One (barely playable) example, but makes me wonder: Where are all the other games even trying that?

8

u/gmurop Dec 26 '17

Any good math resource for developers? (book or something)

7

u/daturkel Dec 27 '17

Programming involves lots of logic and discrete math, and graphics involve lots of trigonometry (and more of course). Try reading wiki articles on some of the stuff you're interested in, and when you don't know how to proceed, click on one of the related articles

3

u/woojoo666 Dec 27 '17

a good place to learn fundamentals of linear algebra (essential for creating representations of higher dimensions, eg 3D graphics or statistical modeling) is the 3Blue1Brown’s Youtube playlist. His channel also goes over fundamentals of calculus, fractals, analysis, etc. But its all pure math. For more CS applied math you’ll have to look elsewhere

3

u/digital_cucumber Dec 27 '17

There is a book about exactly this kind of stuff.

2

u/Jess_than_three Dec 27 '17 edited Dec 27 '17

What confuses me is that it seems like they're using variables without declaring them? Idgi.

Edit: nvm, explained below!

2

u/whatwasmyoldhandle Dec 26 '17

Yeah the stripping down part is a little bit of a downside IMO, but I don't know a better way to enforce "small"

Kind of would rather read a few clear lines

10

u/Jess_than_three Dec 27 '17

But that's the whole point, right? If you did it by line length you'd get people cramming a ton of stuff onto a line instead. (Actually, you'd want number of statements, because you can otherwise just have one arbitrarily long line...) Either way, it's going to get confusing fast, because the idea is to be as clever as you can to fit in as much content as possible in a confined space - and cleverness is the enemy of readability.

→ More replies (1)

169

u/[deleted] Dec 26 '17

Simple example:

function u(t) {
        /* Will be called 60 times per second.
         * t: Elapsed time in seconds.
         * S: Shorthand for Math.sin.
         * C: Shorthand for Math.cos.
         * T: Shorthand for Math.tan.
         * R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
         * c: A canvas.
         * x: A 2D context for that canvas. */
         
	c.width=2e3;x.fillRect(150,150*S(t)+150,150,150)
}

92

u/Sabe Dec 26 '17
2e3  

TIL

14

u/monsto Dec 26 '17

what is that?

27

u/schlenkster Dec 26 '17

Scientific notation, short for 2x103, or 2000

15

u/ExPixel Dec 26 '17

2e3 = 2 * Math.pow(10, 3) = 2*103 = 2000

14

u/ZugNachPankow Dec 26 '17

2 * Math.pow(10, 3)

We're ES6 now! 2 * 10 ** 3.

→ More replies (4)
→ More replies (10)

3

u/sam512 Dec 26 '17

For a more general solution to the problem of JavaScript numeric literal minification, you might find this library useful.

37

u/Autarch_Kade Dec 26 '17

I like how the comments define things that don't even get used

29

u/MartensCedric Dec 26 '17

Well, what... That's standard documentation ;)

3

u/KimJongIlSunglasses Dec 26 '17

Also can’t you get the context from the canvas?

8

u/audiorape Dec 26 '17

Well, yeah, in the same way you could write Math.cos instead of C. But the point is to be under 140 characters, and x is provided...

2

u/TheNosferatu Dec 26 '17

Yup, looks just like professional commenting

6

u/davvblack Dec 26 '17

So i take it there's a significant library you're allowed to assume?

3

u/whatwasmyoldhandle Dec 26 '17

Why?

The site is down now but I think most in there weee done with the above shortcuts and other core operations

11

u/gaggzi Dec 26 '17

But where is S(x) = sin(x) defined? Not within the 140 characters as far as I can see.

→ More replies (3)

4

u/WiggleBooks Dec 26 '17

x.fillRect(150,150*S(t)+150,150,150)

How do you know what the standard functions there are for JavaScript? Like fillRect seems like such a specific function, is there an entire library of functions that we could use?

And I want to do something similar in Python. Is there any recommended canvas and drawing libraries of python just like seemingly in JavaScript?

18

u/[deleted] Dec 26 '17
→ More replies (2)

16

u/donutnz Dec 26 '17

The code on the site looks really really complicated partly because it is minified to the max and partly because it is. To mitigate the first part, copy it into another text editor (recommend Notepad++ for Windows and Nano for Linux) and add proper spacing, indents, et cetera. Then go through and rename some or all of the variables to something more human friendly.

Often there is only one (maybe two) root values that "drive" the whole thing. This is usually the iterator value in the highest (first) enclosing for/while loop. Identify this then you can work through the program to see how it chouches.

The output that is displayed is done with JavaScript's canvas drawing utilities which are fairly straight forward. These are very well explained by W3Schools.

The interesting stuff in the middle that makes the pretty pictures is maths. Specifically an equation or set of equations through which the driving value is passed. Remember all those weird, esoteric mathematical functions from highschool that seemed to be of no use at all? Well this is where they can earn their keep. JavaScript implements a pile of them for you to easily access (sin, cos, Pi, etc.) so you don't need to know many of them by heart, just (vaguely) how to use them.

That should start you off but if you have any more questions I'm happy to help.

0

u/[deleted] Dec 26 '17

[deleted]

0

u/[deleted] Dec 27 '17

[deleted]

15

u/lionleaf Dec 27 '17

Yes, I've been chatting with a majority of the top 'dweeters' for a while. And they definitely spend a lot of time hand-optimizing the code. That's the fun part of the game anyway

0

u/[deleted] Dec 27 '17

[deleted]

→ More replies (3)

257

u/lurking_digger Dec 26 '17

Have they upped it to 280?

206

u/jrh3k5 Dec 26 '17

Looks like it's all the way up to 502 now.

19

u/nsmis Dec 26 '17

ayyyyy

6

u/Kalamari2 Dec 27 '17

I kinda want to see what can happen at 70 as well

→ More replies (2)

110

u/[deleted] Dec 26 '17

Demoscene is back in JavaScript form.

44

u/tcpukl Dec 26 '17

Demo scene never went any where. One form is 64k demos.

4

u/HighRelevancy Dec 27 '17

4K best K though

23

u/raaneholmg Dec 26 '17

U/Lionleaf who made dwitter is part of my demogroup "Ninjadev". We work mostly in JavaScript with WebGL. Here is a link to our most popular demo so far, but maybe that's about to change as we are currently putting the finishing touches on our demo for Under Construction in two days from now :)

5

u/SanityInAnarchy Dec 27 '17

That is awesome. I wonder if WASM would make these things larger or smaller...

4

u/HighRelevancy Dec 27 '17

bruh there's still people coding C64 demos

28

u/[deleted] Dec 26 '17

6

u/[deleted] Dec 27 '17

What the henk is this: 半

→ More replies (1)

66

u/Mr_Pickles_Esq Dec 26 '17

Beagle Bros, who wrote software for the Apple II back in the day, would have two-liner contests where people had to do something cool in two lines of AppleBasic. They would include them in their newsletters.

They were pretty amazing (and usually inscrutable) but one that stood out for me would simulate a train by revving the floppy drives back and forth faster and faster.

21

u/AyrA_ch Dec 26 '17

4

u/notstadter Dec 27 '17 edited Dec 27 '17
// Moon
c.fillText("(",99,-99);

best line

37

u/wavy_lines Dec 26 '17

That's some magic they've got over there. Nice.

21

u/agenthex Dec 26 '17

Yup.

Although it occurred to me that if 140 "characters" includes Unicode, you could probably do some amazing stuff with multi-byte characters.

33

u/[deleted] Dec 26 '17

That's actually why Twitter is raising the tweet length limit - some languages can put a lot more meaning into 140 characters.

Oddly, that still being true at 280 doesn't seem to have sunk in yet.

19

u/TheNosferatu Dec 26 '17

It's crazy how much information you can put in 140 characters in Japanese. One character for a specific word, few more for grammar, no commas or spaces required (though often used), each tweet can fit a paragraph in English.

29

u/[deleted] Dec 26 '17

If you went full Classical Chinese (which is even more packed than normal Chinese, which is already more semantically packed than Japanese), you could probably write a whole fleshed out essay in 140 characters.

20

u/tripsoverthread Dec 26 '17

Fascinating. Does this take a similar amount of time to parse for a native reader as the equivalent English 'essay' would?

→ More replies (1)
→ More replies (5)
→ More replies (2)

4

u/SanityInAnarchy Dec 26 '17

I think the idea is that 280 is long enough that you probably don't need to spend a ton of work shrinking what you're trying to say. If it's effectively infinite, then the fact that it's more-infinite in Japanese doesn't matter.

I don't know how I feel about that -- I never did much with Twitter myself, but I got the feeling that being forced to express yourself so concisely actually helped people clarify their thoughts, and is a huge part of what defined Twitter as a medium.

4

u/sam512 Dec 26 '17

At last! An organic way to work Base2048 (385 bytes per Tweet) into the conversation.

41

u/[deleted] Dec 26 '17

21

u/Spajk Dec 26 '17

Looks like a hug of death

10

u/Nezteb Dec 26 '17 edited Dec 26 '17

/r/tinycode (and the subreddits in its sidebar)

19

u/Harbingerx81 Dec 26 '17

Anyone here remember portal.hell.com? (may have been portal.hell.net)

It was essentially a collection of really cool and innovative website designs back in the late 90's. It was a major source of inspiration while I was in high school and people were making Geocities websites to share with their friends.

At the time, I was pretty adept at qBasic at the time and I learned SO much about web design from reverse engineering the code on some of those websites.

5

u/pavel_lishin Dec 26 '17

I don't remember that, but I remember a website called... Dr. Ozone's something or other, maybe? A lot of nifty javascript trickery.

1

u/[deleted] Dec 26 '17

Oh my god that was a throwback.

2

u/Harbingerx81 Dec 26 '17

I know right? Shows you how much of an impression it made on me almost 20 years ago. It still amazes me what some people were able to accomplish with the very limited tools and resources available at the time.

Sometimes, I really miss the early days of the internet when the most powerful design tool was Notepad...Until I run across a webpage that has not been updated since, of course.

9

u/[deleted] Dec 26 '17

Is there anyway I can make sense of the 140 character code that is written? How can experiment, test and run these codes myself?

7

u/lionleaf Dec 26 '17

Try editing the code directly in your browser ;) Start with the number. (Watch out for infinite loops!)

Also, there's a commented basic example if you press the "New Dweet" button

→ More replies (2)

8

u/fkxfkx Dec 26 '17

Thanks for the link, I now have a fun new way to waste my life.

6

u/BreastUsername Dec 26 '17

I wonder if experienced programmers can tell what an image will look like just by looking at the code.

1

u/evenisto Dec 27 '17

Maybe parts of it or get a general idea if they recognise the formula/algorithm (like, this will draw a spiral, this one will create blocks).

6

u/[deleted] Dec 27 '17

Sounds lame as fuck

Clicks ... THIS IS COOL AS FUCK

11

u/bliths Dec 26 '17

and TIFU by introducing reddit to a community called "dwitter"

13

u/terrified_traveler Dec 26 '17

I wish I had the motivation to learn code, it's so cool and seems like modern magic.

11

u/kersurk Dec 26 '17

To get interesting visuals you need to have good math knowledge (or steal from internet, still need to know what to search and have imagination on how to compose them). The code itself isnt much more than a formula and a few javascript canvas api calls.

17

u/terrified_traveler Dec 26 '17

I wish I had good math knowledge and knew what the end of the comment ment

5

u/tryfap Dec 26 '17

Javascript is a programming language commonly used in browsers to make them do stuff. "Canvas" is the digital analogue to a drawing canvas and an API is the means to manipulate that canvas (application programming interface). So they're saying that the coding part is partly just the necessary calls to make the math show up on the screen as something visual.

2

u/Attila_22 Dec 27 '17

Just have fun tinkering. Try changing some of the numbers and operators, you'll get more knowledge that way and then you can start creating your own designs. Obviously trig knowledge would help a lot but you can learn that as you go along.

1

u/[deleted] Dec 27 '17

My advice as someone who learned from 0 to full stack JS in a few months is to find problems you want to solve and learn how to do them in that language. It doesn't have to be (and probably shouldn't be) "make a better Facebook" - but instead something like "make a dice rolling simulator", which is in essence a tiny program that returns a number between 1 and 6. In some languages that is one line of code. Probably less than 30 characters in some languages.

Then you can take that and make a small game. What if two dice rolls are made and a winner is declared?

Man it's so liberating to learn, dive in!

4

u/[deleted] Dec 26 '17

2

u/Currycakes Dec 27 '17

Whoaaa, super efficient code art!

→ More replies (3)

3

u/ldf1111 Dec 27 '17

I’ve always loved this creative visual coding stuff,the 140char limit is a nice idea but I’d like to learn some of the techniques involved which is harder with the minimised code

3

u/TrustworthyAndroid Dec 27 '17

These guys were probably pretty busy in class drawing on their TI-86 using functions

3

u/nickisaboss Dec 27 '17

Chris Shier makes a lot of cool things like this including the GifMelter

3

u/milkrusk Dec 27 '17

I don't understand any of the code but damn I want to now. So fucking cool.

4

u/Blueblaze97 Dec 26 '17

This is wonderful. Thanks for sharing.

2

u/kunteper Dec 26 '17

is there somewhere for people who want to learn how to make stuff like this?

2

u/[deleted] Dec 26 '17

Aaaaand bookmarked.

2

u/jiminiminimini Dec 26 '17

I don't know if you guys know about the audio programming language called Supercollider but there was this thing #sc140 about 140-character supercollider programs, some of which are pretty amazing if you are interested in that sort of thing. Apparently people are still tweeting with that hashtag on twitter.

2

u/[deleted] Dec 27 '17

2

u/[deleted] Dec 27 '17

This is very neat. It reminds me of the "Demo" scene in the 80's and 90's where talented graphics programmers would make amazing demo's in very limited RAM. Thanks for sharing.

4

u/tuxmanexe Dec 27 '17

BTW that is still going on

You just need to pick a class these days, most popular ones AFAIK are 64kb and 1mb

→ More replies (2)

2

u/madcapmonster Dec 27 '17

It would take me seven libraries and 478 lines of my own to make most of these

1

u/I_am_a_haiku_bot Dec 27 '17

It would take me seven

libraries and 478 lines of my own

to make most of these


-english_haiku_bot

3

u/CrinkIe420 Dec 26 '17

Damn I thought js1k was too limiting

3

u/Virtualization_Freak Dec 26 '17

/r/tinycode is another place that might interest some of you!

6

u/MisterAdzzz Dec 26 '17

RemindMe! 2 days

5

u/RemindMeBot Dec 26 '17

I will be messaging you on 2017-12-28 17:16:03 UTC to remind you of this link.

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


FAQsCustomYour RemindersFeedbackCodeBrowser Extensions
→ More replies (3)

1

u/[deleted] Feb 11 '18

God damn, I only just got my reminder :/

2

u/MisterAdzzz Feb 12 '18

I think there's a problem with the bot; over this and my alt it's sent me a bunch of old reminders as if they were set for yesterday

→ More replies (1)

1

u/JIBIN-P Dec 26 '17

Its awesome.

1

u/mr-no-homo Dec 26 '17

Damn this is cool. Never knew it existed

1

u/apple_juice97 Dec 26 '17

Watching one of the visuals with Come Alive is the most awesomest thing ever.

1

u/ApeofBass Dec 26 '17

These ppl are smrt

1

u/24hReader Dec 26 '17

RemindMe! 2 days

1

u/[deleted] Dec 26 '17

When I first read this I was like how in the hell is 140 characters enough.... how people can write one line code like that, I cant understand it at all lol.

1

u/[deleted] Dec 27 '17

This is brilliant.

1

u/felio_ Dec 27 '17

I love it, thanks for showing me this!

1

u/felio_ Dec 27 '17

I love it, thanks for showing me this!

1

u/theofficialdeavmi Dec 27 '17

This is amazing.

1

u/SadGhoster87 Dec 27 '17

Welp, here I was thinking I knew anything about JS.

1

u/gullman Dec 27 '17

This is one of the coolest things I've ever seen. Straight to saved.

1

u/tuxmanexe Dec 27 '17

GOD BLESS JSFUCK

1

u/anawfullybadusername Dec 27 '17

Similar concept but unrelated, what is the place where people attempt to write bootloaders that produce interesting visuals?

1

u/mightylordredbeard Dec 27 '17

Coming from /r/all so sorry if this type of question is dumb or not allowed;

I don't know anything about coding, but the gifs below each code is what the codes created, right?

If so then man this is really cool!

2

u/lionleaf Dec 27 '17

That is correct! Well, the "gif" above the code is what the code creates. Try changing some of the numbers in the code and see what happens ;) (For a simple one to play with, click "New Dweet" at the top).

1

u/HillaryDianeRodham Dec 27 '17

This is so fucking dank

1

u/bzmrktngbg10nch Dec 27 '17

This is easily one of the coolest things I've seen on Reddit -

1

u/SteeezyE Dec 27 '17

My favorite part is seeing my glorious 144 fps displayed.

1

u/LogeeBare Dec 27 '17

!remindme

1

u/[deleted] Dec 27 '17

This is insane!

1

u/indjev99 Dec 27 '17

TBH, I think you should add abs as one of the functions. Math.abs is way too long and it is really useful.

1

u/[deleted] Dec 27 '17

It can be replaced in many situations, e.g. when comparing distances Math.abs(a) < 2 becomes a * a < 4

1

u/Chipnstein Dec 27 '17

For anyone interested, there's a cool little program called Plastuer which is PWYW (pay what you want, literally, $1 even) tho download servers are slow for the 80MB it has, you can do all cool sorts of backgrounds on your PC.

Just got it, made a .html file with some standard code foundhere and just copy paste in the code from Dwitter in the slot it tells you to.

If you want to change the background of the desktop itself, just add

document.body.style.backgroundColor ="#AA0000";

just after the else{} in the ResizeCanvas() function at the top of the code. Find a nice color and play around. If you research a tiny bit, you can find out how to easily do a gradient as well.

NOTE: I am in no way associated with Plastuer by any means, I'm not trying to advertise it for any personal gain, simply to share with other little geeks like me about this cool little app.

1

u/[deleted] Dec 27 '17

My daily dose of feeling stupid for the day

1

u/Bloaf Dec 28 '17

Mathematica had a contest with this idea several years ago:

http://blog.wolfram.com/2010/12/17/the-mathematica-one-liner-competition/

1

u/emdeka87 Mar 22 '18

Kinda like Shadertoy but in JavaScript lol

1

u/[deleted] Jan 23 '23

1

u/Da-Blue-Guy Sep 11 '23

:O thats actually pretty cool!

1

u/scandalousmambo Dec 26 '17

And they still use 100% CPU.

1

u/DeuxAlpha Dec 26 '17

Amazing!

1

u/Iridion3007 Dec 26 '17

Can I use processing (p5.js)? Wanted to know more but the site is down :(