HN user

andrewray

44 karma
Posts3
Comments13
View on HN

Taking shader programs (they have a main() functions), hacking up their source code / AST to turn the into modularized code packages, and then enabling composition of shaders by injecting the output of one module into another (essentially calling the main function of one shader in another). This enables arbitrary shader composition. One application is Photoshop-style stacking of shaders as layers, like https://shaderfrog.com/2/editor/cm6y90vai002mpaxio3zjhfvq

Or getting real freaky with it by composing many effects deep https://shaderfrog.com/2/editor/cm1s7w23w000apar738s9d1x0

Git freebase 11 years ago

If your branch conflicts, rebase off master (the branch you're making a pull request to). Then it will merge cleanly. There's no practical downsides to having merge commits in master, but you should never (or rarely) see merge conflict resolution commits. You should be able to rebase to a mergeable state before merge.

Vue.js 1.0.0 11 years ago

I've always heard good things about Vue from its users. I have to compare all Javascript frameworks to React, because to me React feels like the first framework that got it "right." The API of React is surprisingly thin. Looking at Vue templates, the syntax seems quite alien, halfway between Django and Angular:

    <th v-for="key in columns" @click="sortBy(key)" :class="{active: sortKey == key}">
And the API seems to needlessly separate HTML and Javascript, with some strange (to a newcomer) API calls:
    Vue.component('demo-grid', {     // moving away from JS classes
        template: '#grid-template',  // Why separate view code from view code?
        replace: true,               // what is this?
Has anyone heavily used React and Vue and have an argument for what this thicker API affords?

Cars seem fundamentally different than his other examples: Spacecraft, underwater vehicles, and airplanes. The importance difference is cars have a clear, visual grid of where they can travel and where they cannot travel. Painted lines on the road and navigational signs provide a construct of the environment around them.

Maybe the closest comparison is subway / metro rails. There are already many fully automated subway systems: https://en.wikipedia.org/wiki/List_of_automated_urban_metro_...

This seems to take the declarative nature of SVG and make it more imperative, like HTML5 Canvas, even though it ironically uses a virtual DOM implementation under the hood. For my React projects I chose SVG over canvas because I could write my layout declaratively, and avoided imperative manipulation libraries. How do you modify existing SVG shapes with this library?

All shaders are beautiful :)

This is a problem with user content submitted sites. It's hard not to conflate the quality of the content (shaders) with the quality of the product (ShaderFrog). There are no default ShaderFrog shaders, they're all user created.

The more oddball shaders (my favorites) are the composed shaders, which are not eligible to be used as inputs to other composed shaders. Only the basic shaders, which are generally higher quality because they require more knowledge of how GLSL works, can be inputs to composed shaders.