HNHacker News
TopNewBestAskShowJobs

andrewray

45 karma · joined July 8, 2015

submissionscomments
andrewray··on Ask HN: What are you working on? (March 2025)
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

andrewray··on Why I moved from Angular to React
You're missing the point of JSX http://blog.andrewray.me/youre-missing-the-point-of-jsx/
andrewray··on Git-blame-someone-else – Blame someone else for your bad code
It's been my experience, especially in the startup scene where business requirements change often, that `git blame` rarely shows you what you want. Files get renamed, moved, re-indented, etc, frequently.

I wrote a tutorial on a more effective (at least for me) solution to find the true author of a change: http://blog.andrewray.me/a-better-git-blame/

andrewray··on Visual Studio Code is now open source
Hi! I'm having trouble with both of these.

https://github.com/Microsoft/vscode/issues/95 https://github.com/Microsoft/vscode/issues/81

Also can you comment on why a jsconfig.json file is needed, as opposed to some in-editor setting, or reading from the config files the user already has installed, like an .eslintrc?

andrewray··on Git freebase
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.
andrewray··on Vue.js 1.0.0
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?
andrewray··on Gnuspeech
If you're on a Mac, you can have some fun with voices (plenty designed for multiple languages):

    say -v ?
Or just run this script to pass hours of time in joy and terror: https://gist.github.com/DelvarWorld/3f700aac8d7972b053f0
andrewray··on Should cars be fully driverless? No, says an MIT engineer and historian
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_...

andrewray··on Show HN: Rune.js – Graphic design systems with SVG in the browser or Node.js
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?
andrewray··on I Was a Cybercrook for the FBI (2007)
Remove the ?currentPage=all from the URL to get the non-broken version of the link.
andrewray··on ShaderFrog – Create and compose shaders in your browser
This may be a silly question, but could you elaborate on why you prefer the project to be open sourced? I'm keeping it closed source now for potential business and security reasons.
andrewray··on ShaderFrog – Create and compose shaders in your browser
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.

andrewray··on ShaderFrog – Create and compose shaders in your browser
Hey folks! All this traffic has got our server a little excited. We're working on restoring full service. Check @shaderfrog for updates https://twitter.com/shaderfrog/status/641645102960500738