Vanessa Freudenberg
banner
codefrau.bsky.social
Vanessa Freudenberg
@codefrau.bsky.social
I design and implement interactive and collaborative systems:
Co-founder of Croquet.io • Chief Architect Multisynq.io • Creator of Squeak.JS.org • Formerly at Alan Kay’s groups (VPRI.org, CDG Labs, YCR HARC) • Dr (EngD) • German living in Los Angeles 🏳️‍🌈
Yes you need to allow that
April 4, 2025 at 2:55 AM
Prompts: aistudio.google.com/prompts/1uwR...

The example app given in the first prompt: github.com/multisynq/mu...
April 4, 2025 at 2:29 AM
Thank you
March 4, 2025 at 8:27 AM
I see we had the same idea. Nice!
February 18, 2025 at 11:25 PM
In a way I like this best because it’s straightforward to explain:
* No damage? Nice, shield doesn’t break
* This attack breaks the shield? Okay, return the number of this attack
* Otherwise, this attack does damage, and we look at the next attack

I’ll admit that “straightforward” is … subjective 😇
February 18, 2025 at 11:19 PM
Played a bit more – recursion is fun!

👸🏻🛡️
🐢🐢🐢
🐢🐢
🐢
💃🏻

codepen.io/codefrau/pen...
February 18, 2025 at 6:31 AM
findShieldBreak = (dmgs, shld) =>
dmgs.findIndex(dmg => (shld -= dmg) < 0)

👸🏻🛡️🔥🔥🔥🐉

codepen.io/codefrau/pen...
February 17, 2025 at 10:02 AM
Especially using single digit numbers to avoid having to tokenize was brilliant. It let us focus on the actual problem instead of incidental complexity
February 10, 2025 at 9:15 PM
It’s not very readable, admittedly, even though it’s very succinct. But whittling it down to almost a one-liner was a fun exercise. Thank you for the prompt!
February 10, 2025 at 9:12 PM
Okay now that I’ve seen all the other submissions I wonder if an actual interviewer would object to my use of `eval()`. Then again, the `splice(-2)` is neat to get the operands in the right order for sub/div. They should appreciate that
February 10, 2025 at 6:38 AM
It’s been a while, yes, but I’m still reading your letter every week. One of the few highlights right now 💜
February 4, 2025 at 10:57 PM
It’s how you combine subexpressions in RPN (see en.m.wikipedia.org/wiki/Reverse...)

Try this:

evaluatePostfix('123*+123++*')
Reverse Polish notation - Wikipedia
en.m.wikipedia.org
February 4, 2025 at 8:28 PM
Clever! But evaluatePostfix('123++') should be 6 🤓
February 4, 2025 at 8:13 PM
That was fun!

function evaluatePostfix(s) {
let a = []
for (let c of s)
a.push(isNaN(+c) ? eval(a.splice(-2).join(c)) : c);
return a.pop()
}

My CodePen does the infix conversion first and evals at the end:

codepen.io/codefrau/pen...
February 4, 2025 at 7:49 PM
When I work with JWTs this is incredibly helpful: jwt.io
JWT.IO
JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
jwt.io
January 30, 2025 at 9:19 AM