853 karma · joined Aug 16, 2011 (15y ago) · 112 submissions
comment 10y ago · link · parent
I've been experimenting with programming languages and compilers myself (https://github.com/evanw/skew) and my compiler appears to be ~2x faster than tsc when run with node even though it's also doing constant folding, tree shaking, inlining, and minification while tsc is just removing type annotations (my compiler appears to be ~15x faster when run natively). The slow compilation speed of tsc is my main complaint about the TypeScript ecosystem.
comment 10y ago · link · parent
Example challenges: annotation system on top of documents for feedback, 2D boolean operations on paths, speed up zooming in the app using a tile quadtree, UI testing framework that simulates user actions, real-time events and data pushing across the site, zero-downtime deployments, search API for filtering user files.
Our tech stack: C++, Emscripten, Node, CoffeeScript, JavaScript, WebGL, Ruby, Sinatra
If you're interested in learning more about what we're working on or want to meet up to talk about any of my other projects (http://madebyevan.com/), you can email me at wallace@figma.com.
63.
Float Toy: Play with floating-point bit patterns(evanw.github.io ↗)
1 points · by constexpr · 10y ago · discuss
comment 10y ago · link · parent
comment 10y ago · link · parent
I'm the cofounder of Figma (www.figma.com), a startup in San Francisco building a browser-based collaborative design tool to improve the way designers and engineers work together. We're a small team of 16, and we're looking for talented designers and engineers (www.figma.com/careers) who are interested in tackling challenges in the creative tools space.
Example challenges: annotation system on top of documents for feedback, 2D boolean operations on paths, speed up zooming in the app using a tile quadtree, UI testing framework that simulates user actions, simultaneous multi-user editing, zero-downtime deployments, search API for filtering user files.
Our tech stack: C++, Emscripten, Node, CoffeeScript, JavaScript, WebGL, Ruby, Sinatra
If you're interested in learning more about what we're working on or want to meet up to talk about any of my other projects (http://madebyevan.com/), you can email me at wallace@figma.com.
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
All declarations in ThinScript are order-independent right now so classes are accessible everywhere simultaneously. I'm getting away with that because I'm currently requiring all global initializers to be constant. One idea I had that would allow for non-constant global initializers without really complex static analysis to determine initialization order was to initialize non-constant global variables on first access instead of on startup.
I chose "int" because I was aiming for familiarity with existing languages. I'm also planning for WebAssembly to be just one target among many targets so I don't want to align too closely with WebAssembly. Some other targets I'm considering are C, x86, Swift, and C#, for example.
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
* Using hashtables in TypeScript relies on the representation of JavaScript objects with strings as properties. Emulating JavaScript's in-memory representation in an ahead-of-time compiled language isn't a good idea for performance reasons.
* TypeScript only has a single number type (double) which is pretty slow if you actually need to work with integers. JavaScript VMs do a lot of work to figure out which numbers are integers using information that's only available at runtime. Using explicit integer types means the generated code is a lot tighter.
* A lot of existing TypeScript code uses structural typing to model dynamic type contracts present in today's JavaScript code, but this is usually a loosely-typed approximation and not something that a compiler can rely on. It's more just to improve tooling for developers.
* TypeScript uses exceptions which are hard to emulate efficiently in native code.
* I want to be able to add certain things and extend the language, so I don't want to limit myself to TypeScript. For example, I'm considering a preprocessor for conditional compilation and something similar to C#'s unsafe syntax for pointer manipulation.
comment 10y ago · link · parent
comment 10y ago · link · parent
So either you cross-compile a JavaScript VM to be able to handle everything (super slow and bloated, especially without the ability to JIT compile executable code) or you pick a small subset of TypeScript to compile, in which case it wouldn't really be TypeScript at all.
Plus TypeScript doesn't have integer types (only doubles) so it would generate pretty inefficient code. JavaScript JITs do a lot of work to turn usage of doubles into integers based on run-time behavior that is unknowable at compile-time.
comment 10y ago · link · parent
I'm the cofounder of Figma (www.figma.com), a startup in San Francisco building a browser-based collaborative design tool to improve the way designers and engineers work together. We're a small team of 17, and we're looking for talented engineers (www.figma.com/careers) who are interested in tackling challenges in the creative tools space.
Example challenges: annotation system on top of documents for feedback, 2D boolean operations on paths, speed up zooming in the app using a tile quadtree, UI testing framework that simulates user actions, real-time events and data pushing across the site, zero-downtime deployments, search API for filtering user files.
Our tech stack: C++, Emscripten, Node, CoffeeScript, JavaScript, WebGL, Ruby, Sinatra
If you're interested in learning more about what we're working on or want to meet up to talk about any of my other projects (http://madebyevan.com/), you can email me at wallace@figma.com.
comment 10y ago · link · parent
- A bad debugging experience (no segfaults on null, local variables are numbers instead of strings or objects, function pointer calls are super confusing)
- Much more difficult to interoperate with external JavaScript libraries
- Massive code bloat (you have to reinvent everything like arrays, strings, maps, regexes, memory management, etc. instead of just using the browser's built-in implementations)
85.
Introducing Vector Networks(medium.com ↗)
4 points · by constexpr · 10y ago · discuss
comment 10y ago · link · parent
I'm the cofounder of Figma (www.figma.com), a startup in San Francisco building a browser-based collaborative design tool to improve the way designers and engineers work together. We're a small team of 17, and we're looking for talented designers and engineers (www.figma.com/careers) who are interested in tackling challenges in the creative tools space.
Example challenges: annotation system on top of documents for feedback, 2D boolean operations on paths, speed up zooming in the app using a tile quadtree, UI testing framework that simulates user actions, real-time events and data pushing across the site, zero-downtime deployments, search API for filtering user files.
Our tech stack: C++, Emscripten, Node, CoffeeScript, JavaScript, WebGL, Ruby, Sinatra
If you're interested in learning more about what we're working on or want to meet up to talk about any of my other projects (http://madebyevan.com/), you can email me at wallace@figma.com.
comment 10y ago · link · parent
It would be amazing to have fast GPU-GPU transfer. Is it the case in Firefox that using texImage2D/texSubImage2D on a main thread context with a worker <canvas> will result in a guaranteed GPU-GPU transfer? Or does that download the pixels to the CPU and re-upload them?
> Isn't that the case for all applications?
Yes, but I haven't been following GPU tech recently so I wasn't sure if that still applies universally. Maybe some day we'll get preemptive multitasking on GPUs :)
comment 10y ago · link · parent
This technique would be really powerful if the worker thread could pass a buffer of the rendered results off to the main thread efficiently for use by the main thread. For example, a game has a worker thread to refine lightmaps while the main thread uses those lightmaps for rendering the game (similar to http://madebyevan.com/shaders/lightmap/). Does anyone know if this is possible?
Also, what does this mean for GPU use on the worker? Can heavy GPU use in the worker still lock up the GPU and impact the GPU use of the main thread and the windowing system in the OS?
comment 10y ago · link · parent
comment 10y ago · link · parent