News for hackers. Stuff that matters.

andrewray

Re:Ask HN: What are you working on? (March 2025) on Sunday March 30, 2025 @05:00PM (#43527587)
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

Re:Why I moved from Angular to React on Monday February 06, 2017 @05:59PM (#13585140)
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/

Re:Visual Studio Code is now open source on Wednesday November 18, 2015 @09:21PM (#10592345)
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?

Re:Git freebase on Saturday October 31, 2015 @07:15PM (#10484635)
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.
Re:Vue.js 1.0.0 on Tuesday October 27, 2015 @01:09AM (#10456407)
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?
Re:Gnuspeech on Tuesday October 20, 2015 @07:30PM (#10422586)
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
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?
Re:I Was a Cybercrook for the FBI (2007) on Sunday September 20, 2015 @05:40PM (#10249260)
Remove the ?currentPage=all from the URL to get the non-broken version of the link.
Re:ShaderFrog – Create and compose shaders in your browser on Wednesday September 09, 2015 @09:02PM (#10195617)
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.
Re:ShaderFrog – Create and compose shaders in your browser on Wednesday September 09, 2015 @04:13PM (#10194215)
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.

Re:ShaderFrog – Create and compose shaders in your browser on Wednesday September 09, 2015 @12:30PM (#10192377)
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