Recent submissions

Comment · 10 months ago
Your landing page makes a lot of claims that are not true

- that the code is 100% mit licensed (it's not)

- that this is in any way gdpr compliant (there are literal rules around this)

- that your data is encrypted and private (it isn't encrypted? Unless being written in Italian is encryption now?)

- that they'll have 99.9% uptime (there is no SLA for vercel hobby tiers)

- "No middlemen. No third-party storage. Every submission lives in your GitHub..." (that is the very definition of third-party storage and a middleman)

Comment · 3 years ago
You are on a completely different level. Wow. I am going to spend absolutely too long tomorrow trying to work out how on earth you've done that. Cheers!
Comment · 3 years ago
Can't update the post now, but I've actually got it down to 713 bytes, which I'm pretty happy with! I could remove features/colors/styles at this point, but I think I'll leave it there for now.

If anyone's interested, I've tried to annotate a fair amount of the tricks I've used so far: https://github.com/lukebatchelor/url-snake/blob/main/golf/de...

let e=document.body,t="Space: start/reset. Arrows: Move<div><canvas id=a><style>#a{border:solid}{background:tan}</style>",r=40,n=400,o,d=[[4,3]],s=d[0],c="#000",p=(e="red",t=n,a=0,l=a)=>{C[f="fillStyle"]=e,C.fillRect(ar,lr,t,t)},h=(e,t=n/2,a=t,l="center")=>{C[f]=c,C.textAlign=l,C.fillText(e,t,a)};e.innerHTML=t,C=a.getContext`2d`,a.height=a.width=n,C.font="30px f",e.onkeyup=({which:e})=>{36<e&&e<41?H=e-38:32!=e||o||(o=1,d=[[4,3]],H=2,S=0)},setInterval(i=>{if(o){let[e,t]=d[0],a=e+H%2,l=t+(H-1)%2,n=([e,t])=>e==a&&t==l;if(d.pop(),a<0||9<a||l<0||9<l||d.some(n))return o=0,p(),h`:(`;d=[[a,l],...d],n(s)&&(d[++S]=d[S-1],s=[(D=new Date)%10,DS%10]),p`tan`,d.map(e=>p(c,r,...e)),p(i,r,...s),h(S,9,30,"left")}},n);

Comment · 3 years ago
I think it was changed by mods unfortunately :/
Comment · 3 years ago
Ooh! Don't know how I missed that, I'll give it a go! Cheers!
Comment · 3 years ago
Edit: I've actually managed to get the javascript down to a measly 859 bytes now. Pretty happy with some of the code golfing techniques I came up with
Comment · 3 years ago
That was actually the original plan! But unfortunately it seems like my phone's qr code reader won't open it in a browser automatically. I then tried using a url shortener to link to it but absolutely no shortener that I could find would take a data: url.

I could host my own shortener to do it, but it feels like that is cheating the spirit of the challenge.

I'll keep playing with it though, add touch device controls, maybe a site to allow generating different versions of the url (different colours, sizes, game over messages, etc).

Comment · 3 years ago
Wow, that's actually impressive. Any idea how chat gpt would know that? Surely it's not making the request for it and surely it's not actually decoding any base64 right?
Comment · 5 years ago
Comment · 6 years ago
Inspired by ts-sql (https://github.com/codemix/ts-sql) and json-parser-in-typescript-very-bad-idea-please-dont-use (https://github.com/jamiebuilds/json-parser-in-typescript-ver...) I decided to try writing a tic tac toe ai in typescripts type system. Mainly as a way to get exposure to more complex typing. It's not as clean or impressive as these other implementations but I learned a lot building it!

Massive shout out to Barld Boot who's tic tac toe implementation I based this off! https://medium.com/@bakeds/play-tic-tac-toe-with-the-help-of...

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton