Live data from Hacker News

Notch trying jsFiddle

jsfiddle.net

81–90 of 143 posts

Re: Notch trying jsFiddle

#81
post #23

Earlier quoted context omitted.

This code uses zero canvas / javascript specific functions. It is using basic trigonometric functions and is using canvas only to write RGB pixels. Canvas are much more powerful and high level than that, but this is not a good example as Notch just needed to set pixels.

Having watched Notch write Prelude of the Chambered (which I then ported to JRuby) it seems he really loves this direct pixel manipulation style - as do I! The sad part, though, is it doesn't particularly scale well with canvas (yet) and using sprites, shape primitives, or even WebGL is way to get full speed at a regular resolution. (Imagine a 640x480 pixel field of randomized colors, you can get hundreds of FPS for…

[deleted]

Re: Notch trying jsFiddle

#83

While this is cool, isn't this exactly what WebGL is for? I know drivers/support is an issue, but Chrome also ships with a multicore software renderer (SwiftShader) which can probably get a lot further than a JS putImageData engine.

It's just a demo. It's for fun.

Re: Notch trying jsFiddle

#84
post #59

Earlier quoted context omitted.

Can you explain why?

I don't enjoy comparing the length of relatively similar lines. Why not use xa, xb, xc, etc... instead of xd, _xd, __xd, ___xd, yd, _yd, __yd, ___yd, zd, _zd, __zd, ___zd?

I think the underscores standout better.

Re: Notch trying jsFiddle

#87
post #73

Earlier quoted context omitted.

This "responsive programming environment" you speak of has been around for a really long time. Don't expect sliders and colorpickers to do cool stuff, but this should be a good jumping off point for you to start learning from: http://stackoverflow.com/questions/3305164/how-to-modify-mem...

Thanks, I'm plenty aware of gdb and debuggers:) (ex-google software engineer, etc etc) Go watch the video. Bret presents a very cogent vision for a dramatic improvement on most of today's standard engineering/design tools.

And here I'm going to point to Bret's later writing, http://worrydream.com/#!/LearnableProgramming. It's not about the sliders it's about the understanding. A good example is the first large loop setting up the texture.

    for ( var i = 1; i 
If this was a first introduction to programming it would scare off many people.

My interpretation of Bret's idea is that it would be better to have the ability to highlight the section of the texture being written by each section of the loop. It's not the sliders & live editing that are most important it's about linking abstract control into meaning within the learner.

Re: Notch trying jsFiddle

#90
post #16
post #11

Earlier quoted context omitted.

I totally agree. You probably meant "code operates at such a _high_ level" :) low level = close to hardware, high level = high abstraction, like JS

No I really mean low level :-) Javascript is high level, but here notch is using it as a low level framebuffer.

I respectfully disagree with your use of low level, though I do understand your analogy about the pixelbuffer being like a frame buffer.

But he's actually using Javascript arrays which can get passed around inside a javascript VM, and do not have a set size. Not very "low level".

I spent a moment and changed the arrays to Float32Arrays which have set sizes and sit in memory without being fucked with by the VM and sped the demo up dramatically.

http://jsfiddle.net/uzMPU/2612/

Post reply on HN