iyc_
Re:Many Hard LeetCode Problems Are Easy Constraint Problems
on Friday September 12, 2025 @03:41PM (#45225877)
Mistakenly read this as you wrote that 2D game engine (which looks awesome btw) for a job interview to get the job: "I can't compete with this!!! HOW CAN I COMPETE WITH THESE TYPES OF SUBMISSIONS!?!?! OH GAWD!!!"
Re:Building my first mechanical keyboard
on Saturday May 21, 2022 @10:11AM (#31458091)
That, and the missing meta/hyper key either on the left hand side of the spacebar, or close to the thumbs.
Re:Solid.js feels like what I always wanted React to be
on Wednesday March 02, 2022 @03:13PM (#30532383)
> In React, we render lists by using regular JavaScript idioms like loops, arrays, and array methods like map. However in Solid.js, much like traditional templating languages, we get a construct like <For> that reinvents a concept that's already in the language.
I had/have your bias, but from playing with it I found a couple things:
1) Like React, you can swap out the template feature for a function call (or subcomponent). e.g. instead of
return (
<button...>
...
</button>
<For each={state.todos}>
...
);
you can use functions and loops: function displayTODOs<T>(todos: T[]): any {
let arr: any[] = [];
for(let [i, todo] of todos.entries()) {
const { done, title } = todo;
let elem = (/\* JSX \*/);
arr.push(elem);
}
return arr;
}
...
return (
<button ...>
</button>
{displayTODOs(state.todos)}
);
2) Even with my bias, I must admit I found the `<For...` syntax to be surprisingly easy to read and fast to eye-parse; much more so than other 'templating' (using your term) languages/macros/syntax I've used over the years.