Show HN: A TO-DO app that fits inside a single tweet
11–20 of 56 posts
Re: Show HN: A TO-DO app that fits inside a single tweet
#12Earlier quoted context omitted.
Op here: you can’t do it with plain js Plus it’s ok to use frameworks according to the tweet
Care to elaborate? There are some nifty tricks when it comes to golfing JS.
Well the body can’t have any dom elements according to the challenger
That means I had to create the dom elements as well and I was unable to figure out a way within the given character limit
Re: Show HN: A TO-DO app that fits inside a single tweet
#13Using Vue.js for this task is like pouring a jug of milk with a crane.
Re: Show HN: A TO-DO app that fits inside a single tweet
#14Earlier quoted context omitted.
Op here: you can’t do it with plain js Plus it’s ok to use frameworks according to the tweet
Care to elaborate? There are some nifty tricks when it comes to golfing JS.
f.addEventListener('keypress',e=>{if(e.keyCode==000) etc()})Re: Show HN: A TO-DO app that fits inside a single tweet
#15Re: Show HN: A TO-DO app that fits inside a single tweet
#16Earlier quoted context omitted.
Care to elaborate? There are some nifty tricks when it comes to golfing JS.
JS is ok, it’s the DOM APIs that are verbose. I mean this is just to handle the enter key: f.addEventListener('keypress',e=>{if(e.keyCode==000) etc()})
Re: Show HN: A TO-DO app that fits inside a single tweet
#17In this case, "to-do app" and "general purpose library" are so general that it becomes a game of semantics. The winner will have the broadest definition of "general purpose" and narrowest definition of "app".
I don't think we should criticize the person who posted this. It was a silly prompt that was guaranteed to get controversial submissions that people would pick apart.
Re: Show HN: A TO-DO app that fits inside a single tweet
#18My version is even shorter and has a closing -tag and even -tags for the swag: new TodoApp({}); It's obviously just a concept and doesn't work yet (example.com, durr!) but it's in the same spirit. It only relies on a general purpose todo app library. Default options of course! (Which fortunately make it mount on body)
Re: Show HN: A TO-DO app that fits inside a single tweet
#19Earlier quoted context omitted.
Care to elaborate? There are some nifty tricks when it comes to golfing JS.
JS is ok, it’s the DOM APIs that are verbose. I mean this is just to handle the enter key: f.addEventListener('keypress',e=>{if(e.keyCode==000) etc()})
f.addEventListener('keypress',e=>{...})
With the older but essentially equivalent f.onkeypress=e=>{...}
and save 18 characters. You can even use `onkeyup` and save 3 more characters.Re: Show HN: A TO-DO app that fits inside a single tweet
#20My version is even shorter and has a closing -tag and even -tags for the swag: new TodoApp({}); It's obviously just a concept and doesn't work yet (example.com, durr!) but it's in the same spirit. It only relies on a general purpose todo app library. Default options of course! (Which fortunately make it mount on body)
Ha ha I almost gave up and wanted to do the same But then I realized I’ll be able to figure it out It’s done for the challenge :)