top | item 14749527

p5.js – A library to make coding accessible for artists, designers, educators

349 points| joeyespo | 8 years ago |p5js.org | reply

76 comments

order
[+] bluetwo|8 years ago|reply
I give them credit for putting together a fun explanation of what they are trying to do.

I've used Processing Java and Processing.js, so I assume this is some continuation or extension of those projects.

It might be more effective if the explanation focused on the benefits of using p5, rather than just saying "It makes a circle" or "It draws a slider" (which are features).

For instance, maybe some of these are true:

- p5 speeds the creation of animations on your site

- p5 allows beginners to create complex interactions compatible across devices

- p5 allows low-cost prototyping of game designs

- p5 shrinks site size by replacing videos with animations

Of course you would have to look to the community and beyond to figure of which resonate with potential users.

[+] gizmogwai|8 years ago|reply
P5 is indeed the official port of Processing for Java (Processing.js being an independent attempt from John Resig). But like Processing, P5 is more about artistic realisations than applied use, which all of your alternate descriptions tend to lead to.
[+] criticalhits|8 years ago|reply
I think low cost prototyping is one of the best features here -

I work in an academic environment and was introduced to web development as part of the projects I am working on. The simple interface made it easy to put something together under tight deadlines with little/no Web experience, but experience working with GUIs in other systems.

[+] lqdc13|8 years ago|reply
Does there have to be such a big performance penalty?

I remember flash games working really fast on my phone. However, when a bunch of (~100?) circles appeared on the screen, the video started lagging.

I wonder if games/animations compiled to webassembly would work a lot faster.

[+] jamesrom|8 years ago|reply
I've built all kinds of things with d3, I've been using it for over 4 years. It's a seriously great library.

However, there's a cognitive overhead of thinking in selections and update patterns... It's hard to remove state and make composable components that can work well in React, Angular, et al.

While p5 sounds like the answer. We've been stripping away imperative programming on the web for the best part of it's history. Modern web development is more and more declarative every day... I just can't help shake the feeling it's a step backwards.

[+] Osmium|8 years ago|reply
> While p5 sounds like the answer. We've been stripping away imperative programming on the web for the best part of it's history. Modern web development is more and more declarative every day... I just can't help shake the feeling it's a step backwards.

Maybe, but I really like it -- a use case I'm looking at is making interactive versions of the types of figures you'd normally find in textbooks, and there's no one good library for this kind of thing. Each case is unique and has a large illustrative element. p5.js (and, before that, Processing) just allows you to get stuff done. I think that's why Processing took off so much in the artistic community too.

[+] molloy|8 years ago|reply
I just started learning d3 today for a work project, and yeah the selections and `data()`, `enter()`, `exit()` definitely add some cognitive overhead. Now that I've (mostly) wrapped my head around it, I like it a lot (and I'm also happy with d3's documentation!) Have you used react-faux-dom? [0] I've only just started using it, but so far it feels like a good solution for marrying react and d3.

[0] https://github.com/Olical/react-faux-dom

[+] polskibus|8 years ago|reply
Can you say what is the problem with D3 and react working together?
[+] nrjames|8 years ago|reply
I made a few fun tools with p5.js a little over a year ago.

Image quilting: http://clayheaton.github.io/p5jsTiler/index.html

Genetic algorithm cartoon generator (that I never really finished): http://clayheaton.github.io/generative_cartoons/index.html

I love both Processing and p5.js. They're great tools for fun creative coding and also both are useful other types of prototyping and app development.

Some day I'll get around to extending the image quilting sketch to generate Wang tiles.

[+] krat0sprakhar|8 years ago|reply
p5js is an awesome library! If you're looking for ideas to play with, checkout Dan Shiffman's Youtube Channel - Coding Train[0], a series in which he build ML libraries, games and lots of fun mini-projects.

0: https://www.youtube.com/user/shiffman

[+] baddox|8 years ago|reply
His coding challenges are a source of endless entertainment for me. I swear I could watch an hour a day of his unique combination of cheery, clumsy, and informative.
[+] cocktailpeanuts|8 years ago|reply
I don't get why that guy in the video is so excited about this. Isn't this just some interactive JS animations overlaid on top of video?

I say this because at first I was also excited just by watching that guy get excited, and then suddenly I was like "wait..isn't this already possible with pretty much 100s of libraries out there?"

Maybe someone can explain what makes this unique (so much so that the guy is so excited about it)?

[+] chickenfries|8 years ago|reply
Processing (from which p5 takes its inspiration) has an explicit goal of being beginner friendly. I was first introduced to it in an art class.

From the processing website: > For the past fourteen years, Processing has promoted software literacy, particularly within the visual arts, and visual literacy within technology. Initially created to serve as a software sketchbook and to teach programming fundamentals within a visual context, Processing has also evolved into a development tool for professionals.

https://processing.org/overview/

They (Shiffman, in the video) have a pretty cool youtube channel where they use processing, p5, etc to teach programming, visualization, graphics, that kind of thing. I think it used to be called "coding rainbow" but he ran into copyright trouble I'm assuming.

https://www.youtube.com/user/shiffman

[+] stanislavb|8 years ago|reply
In fact, I like it how excited he is. It's so entertaining :D
[+] cycomachead|8 years ago|reply
p5 has also been around for a while, but even then the tech isn't the cool part.

Processing was well thought out from a learnability standpoint, and p5 takes that and allows you to build some _very_ compelling lessons, modules and even whole CS courses that can be delivered and completed online. Because it's also JS, it means that if you can always augment an exercise with any of the rest of the JS ecosystem (for better or worse).

[+] jamesrom|8 years ago|reply
He might be excited about it because it was a novel idea 3 years ago when this was released.
[+] ryan-allen|8 years ago|reply
Developer friendly intro: https://p5js.org/, examples https://p5js.org/examples/ (this library is ace!)
[+] aplummer|8 years ago|reply
Unfortunately, rendering all that text on a canvas even in your link makes it inaccessible to many people living with disability too - the same as the intro video without captions.

This is a really good example of how not to use canvas.

[+] greggman|8 years ago|reply
both processing and p5.js are amazing but I'm curious are they amazing by design or by effort and luck.

Bret Victor went over many of the reasons why Processing is poorly designed in his opinion

http://worrydream.com/LearnableProgramming/

it kind of made I feel like more of right place at right time for success rather than by design

not that I have any hope of supplanting it with something better anymore than 8086 assembly being replaced something more elegant.

note: much of that linked article is not related so search in page for Processing

[+] a1371|8 years ago|reply
At first I thought it was a video until he said that the clusters are avoiding his head. It is nice to have video interactivity like this.

Also, my opinion might not be popular but kudos to them for making the introduction so dumb-proof with the video and the visuals. More projects have to do this.

[+] ricardobeat|8 years ago|reply
What video? I'm on mobile and there isn't one in the index page. "Request desktop site" is not honored either, as usual.
[+] desireco42|8 years ago|reply
This is by far the most novel way to introduce a library that I've seen in a long time and also very impressive. It isn't accessible, and I don't think p5 can be accessible as well, so I guess that is OK. I really bow to such original presentation.
[+] Joboman555|8 years ago|reply
Link took over 10 seconds to load on iPad before I gave up.
[+] thomasfl|8 years ago|reply
One upvote for the interactive playground on top of a video of a friendly fellow named Dan that tells you what you can do.
[+] franciscop|8 years ago|reply
About the web design: please value readability a lot more; now it is quite difficult to read the text with that background. Besides that, Processing was really fun to play with back when I did, I wish you the best as well!
[+] jwarren|8 years ago|reply
I've seen Mike Brondbjerg speak a couple of times about iterative artistic development using Processing and p5.js. It's really cool stuff, and I'd suggest seeking it out if the area interests you.
[+] falsedan|8 years ago|reply
Did… did they render the text on the landing page as an image?

edit oh no, I see the <p> elements… but the page makes the text non-selectable, and the right-click context menu acts like I clicked on the background image.

[+] aembleton|8 years ago|reply
Firefox on MacOS and it sounds like it's about to take off.
[+] colemickens|8 years ago|reply
I'm a bit surprised that there aren't more comments about following the submission link and then being dropped on, what is apparently a technical product/project, with nothing but a full screen, long-form, non-transcribed video. If I hadn't read the comments here, I would've never assumed it was something technical. And I'm still not going to watch that video.

Hopefully they can put together some text that I can digest accessibly...