spindas: (Default)

A React/Redux app is a one-way data flow cycle. The user interacts with the UI, which produces Redux actions, which get dispatched to reducer functions, which update the app’s state object, which gets passed back to React to re-render the UI.

A conversation with ChatGPT is also a one-way cycle. A human sends a prompt (action), which gets passed to the language model (reducer), which updates the conversation (state) with its response.

Can we use the latter to emulate the former? Spoilers: yes, we totally can! ChatGPT will happily act as your universal reducer, so you can prototype your app’s frontend without needing to mock up a backend or business logic right away. And after interacting with the frontend for a bit to teach the AI how the app works, you can even ask it to implement the reducer function for you.

Here’s a quick demo of a basic counter app with my react-redux-chatgpt plugin doing the reducing (app on the left, behind-the-scenes ChatGPT conversation in the console on the right):

And here’s ChatGPT powering the Redux TodoMVC example, unmodified except to delete the reducers and replace them with ChatGPT:

Check out the source code on GitHub! Or keep reading for an in-depth explainer.

Read more... )
spindas: (Default)
Sticking this here so I can stop re-compiling this info for myself. Here's the reading order for the modern Marvel comics featuring the characters Rocket Raccoon and Groot, for someone not interested in reading the mainline Guardians of the Galaxy books, as of the start of 2021.

Because really, Rocket and Groot are the only Guardians of the Galaxy you actually care about, right?

ROCKET RACCOON VOL. 1: A CHASING TALE (Trade Paperback)
spindas: (raccoon)
spindas: (raccoon)

For whatever reason, Dreamwidth’s default rich text editor (built on an old version of FCKEditor) hides a lot of the available toolbar buttons. I’ve written a quick userscript that enables all available buttons in the editor, and also increases the height a bit to make writing more pleasant. I’ve tested it on Firefox with GreaseMonkey; presumably it should work on Chrome/Chromium as well.

// ==UserScript==
// @name        Better Dreamwidth Editor
// @namespace   betterdweditor
// @include     https://www.dreamwidth.org/update?usejournal=spindas
// @include     https://www.dreamwidth.org/editjournal*
// @version     1
// @grant       none
// ==/UserScript==

window.onload = function () {
  var frame = document.getElementById('draft___Frame');
  frame.onload = function () {
    document.getElementById('draft___Frame').style.height = '600px';
  };
  frame.src = 'https://www.dreamwidth.org/stc/fck/editor/fckeditor.html?InstanceName=draft&Toolbar=Default';
};
spindas: (raccoon)
Firewatch is a story-centric game by Campo Santo and Panic. I played it all the way through this weekend and had a really great time with it. Besides the top-notch voice acting, gorgeous visuals, and mystery-filled plot, one feature that’s been getting a lot of attention is the disposable camera the player carries through most of the game. Starting with 18 unused shots on the roll, you can fill it up with snaps of trees and trails and plenty of sunsets peaking over the hills. At the end they’re all uploaded to a personal page on Firewatch.camera, where you can share them or order prints from the "Fotodome".

Firewatch photo upload screen

At the end of my own playthrough, I uploaded my shots and logged onto the site to see them.

My camera roll

But one of them came out… weird.Read more... )
spindas: (raccoon)

After doing Google Summer of Code last year, this is my first year of applying for internships. So I’m nervous-yet-excited, and am really hoping that resumes actually get looked at as I don’t have any “employers” to put down so far.

Places I’ve applied to:

  • Mozilla in Mountain View – open source, makers of Firefox and Rust! This is kind of my dream job.
  • Adobe in San Jose – they’re really easy to get to from home, which is great since I don’t have my driver’s license yet.
  • Yahoo in Sunnyvale – also very reachable.
  • Facebook in Mountain View – one at WhatsApp, where they use Erlang! And two elsewhere in the company.
    Lesson learned: if you have a Facebook account, make sure you log in before applying, and use Chrome – the “Skills” field is currently broken on Firefox (this seems to be fixed now). Also, some fields have character caps that aren't apparent unless you proceed to the next page and then go back.

Places I’ve looked at:

  • Jane Street – it’d be fun to work in a functional language like OCaml, but they only have positions in NYC, London, and Hong Kong.
  • Galois – another FP (Haskell) shop that’s too far away (Portland).
  • Google – they’re all closed up for the summer internships. I’ll have to apply earlier next year.
  • Nest – lots of positions open, but the closest office is in Palo Alto, which lacks good public transportation to and from San Jose.
  • Twitter – again, the nearest office is in-state but not close enough (San Francisco).

As it turns out, location is a major limiting factor for me. I definitely need to start driving soon.


spindas: (raccoon)

My proposal for the Haskell's Google Summer of Code 2015 has been accepted! I'm super excited for this. There's a list of the other accepted proposals on reddit, and I've posted my full proposal as a Gist. I'll be working on embedding LiquidHaskell signatures in Haskell's native type system. Woo!

spindas: (raccoon)
New Packages
Adopted Packages
spindas: (raccoon)
The existing package for the elementary Dark theme, aptly named elementary-dark-theme, is... really bad. It downloads the source archive over HTTP instead of HTTPS, doesn't use checksums to verify the download, gives the wrong source URL and license... So I put up elementary-dark, and filed a request to replace ("merge") the old package with the new one. After doing a lot of work with Debian packaging in the past, I was pleasantly surprised by how easy the PKGBUILD format is to work with.
spindas: (raccoon)

I'm working on integrating the Oculus Rift DK2 with the Ogre3D engine. Last night I got basic head tracking working: moving the DK2 in real life translates into camera movement in-game. The goal is to build a toolkit that makes building something for the Rift in Ogre super duper easy.

Page generated Sep. 22nd, 2026 01:11
Powered by Dreamwidth Studios