That was literally the first thing they did! They stopped, thought about whether or not they should, and then did! And now we have animated url emojis and an island filled with dinosaurs and what could possibly go wro
Because it manipulated the hash component directly.
By using the "replaceState" method of the history API [1] you could avoid polluting the browser's history.
For the Chrome part in any case it doesn't match my experience: under linux Chrome will happily update the url up to every 20ms (50Hz). At higher frequency it will throttle it saying that otherwise the UI would hang.
The limit on Safari (which I cannot test) can be annoying in fact, but not as much as an URL updating 20 times per second :-)
By the way I also find the other reason for not using the History API to be a non-issue, since you can just use the location object to build the whole url from scratch, if you really want to
var n = 0;
function loop() {
location.hash = f[Math.floor((Date.now()/100)%f.length)];
if (n++ > f.length) {
n = 0;
window.history.go(-f.length);
}
setTimeout(loop, 50);
}
This actually doesn't work properly and jumps back too far sometimes because the URLs move with time and not a counter, but you get the idea.
It's just humour. AMP is obviously trash unless you're a Google shill, and this project isn't exactly productive. But at the same time I do honestly believe the world would be better off if AMP developers resigned themselves to building useless stuff like this instead of AMP.
I created a small library for Ruby/Rails that aliased a few methods with emojis. You could remove database objects by using the gun emoji, or trim a string with the scissors emoji.
yes, I want to use them in C. It is possible with clang but, unfortunately, not with gcc. I also want to be able to type them into TeX, both in math mode and in text mode, without much fuss.
\theta doesn't seem that bad. Typing something like \kissyface or \poop seems better than clicking around or typing a numeric code, albeit with the usual name guessing problem.
On OS X, and I assume others, you can add items to be automatically replaced, so something like "!t" could become a unicode theta if you want.
IMO, it's not a "bad idea". Code is meant to be read, not written. If it renders the code more readable, then that's a win. But obviously, whether those symbols actually make the code more readable is debatable.
> whether those symbols actually make the code more readable is debatable.
In general, it would be rather silly to use greek letters for variable names. Yet sometimes, they tend to make numerical code much more readable when you are copying a mathematical formula verbatim.
Compare using "πθ" versus "M_PI*theta" several times on the same formula, for example.
In the book Diamond Age by Neal Stephenson the future working class are functionally illiterate so everything is communicated by emoji. Funny, but also a little bit frightening.
I remember a few years back a common hackathon project was to use lex and yacc to make emoji languages. It was always cool to see what people do with that. Maybe there will be an APL or something with emoji.
The most-used emojis are designed as a language of emotions, making them ill-suited for most programming projects. But that doesn't mean that there aren't emojis that would be very useful in programming. Emojis just aren't used because we lack good input methods for them (outside of smartphones)
Purescript does the same thing (some people like using Unicode symbols for “forall” and function arrows) and it’s also led to amusing github goofs: https://github.com/i-am-tom/purescript-prelewd
Agreed... though, I'd imagine the mostly us-ascii centric programming model might be harder for some foreign languages. The worst, for me, as an example is when I see a special non-us character for JS examples as the assigned variable for a library.
edit: on the flip side, it's pretty cool for passphrases (where allowed)
This is very cute and all but... you know... don't actually do this! Please. Even if you make it so that it doesn't break the back button or history, URLs are things that people copy and paste and send to people. They are put into Word-documents, bookmarks and archive.org. It's not a place for dynamic animations.
URLs should be static, simple, and as short as is reasonable.
While in the video he's updating the location hash (which breaks the backbutton), one can implement this using history.replaceState[1] to keep the back button working normally. He also mentions parsing the animated URL the figure out how far the video was loaded. So if you want you can use the animation in terms of navigation. Or alternatively just put the animation behind a separator and have your router ignore the animation part.
This would preserve both the back button as well as bookmarking! Note that this video is more of the hacking nature what fun things can we do with the URL bar, he stated a number of times that it's more cool than actually useful.
In the article it does state that the history API could be used and why it wasn't.
The first point about updating the whole URL is easy to render moot: when you push new state using the history API, replicate the effect of location.hash by making sure you only change the hash part.
The second part is the sticky one for the "ain't this cool" factor: the throttle in some browsers effectively limits constant animation to 3fps. This isn't an issue for things like the video progress example though: that only needs to update once per second. If you made a library to wrap this idea for easy reuse you could easily implement change detection and other rapid change throttling to smooth things out (so short bursts of many updates work, but longer bursts don't cause a complete stop until ~30s has passed) rather than having to implement these for each use of the technique. ("if" and "you could", because who in their right mind actually would?!)
I'm pretty sure Chrome has different behavior with Dev Tools open and Dev Tools closed, and also with what it does with code posted in the console and code run as part of the page.
So just because it is not throttled when run in the console doesnt necessary imply it wont throttle as part of a regular page as well.
> ou can use emoji (and other graphical unicode characters) in URLs. And wow is it great. But no one seems to do it. Why? Perhaps emoji are too exotic for normie web platforms to handle? Or maybe they are avoided for fear of angering the SEO gods?
No, we don't because it's stupid. Thank god e-mail spam doesn't seem to do this very much with subject lines, what is so wrong with putting TEXT where text belongs?
Welcome to Web 3.0, home of shitty memes and stupid emoji gimmicks
Well no one was expecting emojis, so let the old guys have some fun as well? Have had this idea for a long time, but by now it remained only as a concept. Someone hacked the access to my notes, or maybe certain ideas are universally silly-genius?:)
It's probably possible to do fast enough if the site is nearly empty (just with a window.location.href script tag). But it would definitely trigger a full page rerender.
Probably yes. In browser history updates, browsers will trigger a regular page navigation if the domain changes.
I suppose with keep-alive, all sub/top domains in the same TLS certificate, and immutable far-future caches, one could pull off an animation at ~5 fps.
I love the creativity of the hack, especially when he sync'd the video position with the scrubber. Respect.
I also love the guy's vaguely deranged, Adult Swim -inspired commentary. I went from hater to fan in about 30 seconds, once I realized that he must idolize Tim Heidecker. Again, respect.
However, what I love the most is how the video was composited and edited. What tools do you use to pull that together without slaving over every detail? It looks deceptively low-budget but there's a lot of really subtle details in the way he zooms in on the URL, tweens and flips his video around that make the whole thing feel like a Tim and Eric special feature.
I'd love to know how to produce that sort of result on a meaningfully short timeline.
Youtube poops and endless music video memes are some of the best things to come out of the meme culture. Because folk culture is now truly ‘multimedia’ and we have a horde of people for whom hyperactive video and sound editing is second nature. Now just to wait for when it becomes mainstream and commoditized like graphics editing.
I'm hoping for about the same fate for knowledge visualization techniques—might see it happen soon enough now that ‘data science’ is in vogue.
A nice side effect of it being so commonplace now is that most youtubers are doing their own editing, meaning the jokes and queues are very authentic to their personality and intent, vs having to be inserted after the fact by a separate professional who just wants to get the job done. See for example shows like Laymen Gaming or Girlfriend Reviews, both of which are full of Arrested Development style cutaway gags.
> meaning the jokes and queues are very authentic to their personality and intent
I think that's less a thing than we maybe think. I think the medium crafts the message and even the messenger. There are certainly YouTube like "patterns" and I see a lot of channels eventually devolve into them. Time and again over time I see something I like and then they ever so slightly creep towards the YouTube drama stuff, and before you know it they're doing "reaction videos" and even if their other content is still active it just doesn't feel as authentic anymore.
Not to say I entirely disagree, but I do think the medium has a great deal of influence and IMO that impacts "authenticity" and etc.
This makes me think of that editing 'style' where Youtubers will edit out every single pause for breath, so not only do you see their head snapping about every 2 or 3 seconds, you're practically listening to one massive sentence. To me it feels awful and it ends up making me feel tense.
Like anything though, it only takes one or two people to do it before it catches on and everyone starts emulating it.
Heyyyy thanks glad you enjoyed it! I was surprised to wake up and see this on Hacker News today.
Thought I'd comment on the video editing:
It is all pretty low tech. I use Adobe Premiere to edit and mostly just animate transform, scale, and crop effects to achieve everything. Like for the zooms you pointed out I double up a layer of the screencap and then crop and scale. It's a bit painstaking at times.
Another little part is when I do the screen recording I set my desktop background to an image with a colored box area of 1280x720. This is the area I know will be "on screen". So I have the windows I want to pull in during the video just outside this area. Then I crop to this box in editing. I think this is better looking than just capturing the whole desktop, and I like the live feel.
I'm enjoying evolving this style... I sometimes have thoughts of making some kind of gross homemade video compositing tool in JS. But I haven't gotten there yet...
Check out ShareX, it can easily capture a subset of your screen, and you can hold a modifier (I forget which) to snap to common video resolutions / aspect ratios.
Everything about this is great, I'm not a big video watcher but I just sat through that whole thing it was gold. The selfie direction flips, the interjections from you in another setting instead of chopping the video (both funny but also a nicer way to do it honestly). The concepts you're showing. All really good. Keep it up I'll be watching!
Thanks for the tips and tricks. If you ever made a video on how you make videos, I'd be first in line to watch that.
I haven't looked at Premiere since the bad old days before it traded places with Final Cut as the default choice for editing. These days, I spend most of my time on Ubuntu and use Kdenlive for my very minimal requirements.
The one thing you have that is much harder to teach is great comic timing. I suspect that it will serve you well in many aspects of your life. I don't know if you've been polishing your fast five, but if you ever have an opportunity to try your hand at standup, I'd encourage you to go for it.
172 comments
[ 0.23 ms ] story [ 203 ms ] thread[1] https://developer.mozilla.org/en-US/docs/Web/API/History_API
For the Chrome part in any case it doesn't match my experience: under linux Chrome will happily update the url up to every 20ms (50Hz). At higher frequency it will throttle it saying that otherwise the UI would hang. The limit on Safari (which I cannot test) can be annoying in fact, but not as much as an URL updating 20 times per second :-)
By the way I also find the other reason for not using the History API to be a non-issue, since you can just use the location object to build the whole url from scratch, if you really want to
Edit: nvm. Didn't realize it was in the hash section.
Something like media controls, progress bars or even consent banners. This way they would have an unified appearance and could be user scriptable.
My take is that it's only a matter of time before emojis creep into every area where text is used.
Let's hope they won't ever become a mainstream part of programming languages.
If you consider Amp mainstream, or a programming language, it’s already too late.
I've seen attempts where any connection between the symbol and what the method was doing was purely coincidental.
knowing a few people in this world, I am sure that this will certainly happen way before you can have variables named α, β, γ
I've used θ in code dealing with angles before.
On OS X, and I assume others, you can add items to be automatically replaced, so something like "!t" could become a unicode theta if you want.
For an even more extreme version, look at Perl6's atomic operators: https://docs.perl6.org/language/unicode_ascii#Atomic_operato... (or any other operators on this page for that matter).
IMO, it's not a "bad idea". Code is meant to be read, not written. If it renders the code more readable, then that's a win. But obviously, whether those symbols actually make the code more readable is debatable.
In general, it would be rather silly to use greek letters for variable names. Yet sometimes, they tend to make numerical code much more readable when you are copying a mathematical formula verbatim.
Compare using "πθ" versus "M_PI*theta" several times on the same formula, for example.
> helloworld
"Emojicode is an open-source, full-blown programming language consisting of emojis."
I've seen some "cute" github projects that use them, but they're obviously not for real life use since emojis are tough to type.
edit: on the flip side, it's pretty cool for passphrases (where allowed)
URLs should be static, simple, and as short as is reasonable.
This would preserve both the back button as well as bookmarking! Note that this video is more of the hacking nature what fun things can we do with the URL bar, he stated a number of times that it's more cool than actually useful.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/History_API...
The first point about updating the whole URL is easy to render moot: when you push new state using the history API, replicate the effect of location.hash by making sure you only change the hash part.
The second part is the sticky one for the "ain't this cool" factor: the throttle in some browsers effectively limits constant animation to 3fps. This isn't an issue for things like the video progress example though: that only needs to update once per second. If you made a library to wrap this idea for easy reuse you could easily implement change detection and other rapid change throttling to smooth things out (so short bursts of many updates work, but longer bursts don't cause a complete stop until ~30s has passed) rather than having to implement these for each use of the technique. ("if" and "you could", because who in their right mind actually would?!)
Try this in chrome console. And yes, it doesn't throttle at all.
i=0; setInterval(() => history.replaceState('', '', '/' + (i++)), 50);
It's interesting how people will just believe everything, even if the test is 30 seconds away.
So just because it is not throttled when run in the console doesnt necessary imply it wont throttle as part of a regular page as well.
No, we don't because it's stupid. Thank god e-mail spam doesn't seem to do this very much with subject lines, what is so wrong with putting TEXT where text belongs?
Welcome to Web 3.0, home of shitty memes and stupid emoji gimmicks
https://github.com/dsalaj/awesome-quirks
I suppose with keep-alive, all sub/top domains in the same TLS certificate, and immutable far-future caches, one could pull off an animation at ~5 fps.
I also love the guy's vaguely deranged, Adult Swim -inspired commentary. I went from hater to fan in about 30 seconds, once I realized that he must idolize Tim Heidecker. Again, respect.
However, what I love the most is how the video was composited and edited. What tools do you use to pull that together without slaving over every detail? It looks deceptively low-budget but there's a lot of really subtle details in the way he zooms in on the URL, tweens and flips his video around that make the whole thing feel like a Tim and Eric special feature.
I'd love to know how to produce that sort of result on a meaningfully short timeline.
I'm hoping for about the same fate for knowledge visualization techniques—might see it happen soon enough now that ‘data science’ is in vogue.
I think that's less a thing than we maybe think. I think the medium crafts the message and even the messenger. There are certainly YouTube like "patterns" and I see a lot of channels eventually devolve into them. Time and again over time I see something I like and then they ever so slightly creep towards the YouTube drama stuff, and before you know it they're doing "reaction videos" and even if their other content is still active it just doesn't feel as authentic anymore.
Not to say I entirely disagree, but I do think the medium has a great deal of influence and IMO that impacts "authenticity" and etc.
Like anything though, it only takes one or two people to do it before it catches on and everyone starts emulating it.
Thought I'd comment on the video editing:
It is all pretty low tech. I use Adobe Premiere to edit and mostly just animate transform, scale, and crop effects to achieve everything. Like for the zooms you pointed out I double up a layer of the screencap and then crop and scale. It's a bit painstaking at times.
Another little part is when I do the screen recording I set my desktop background to an image with a colored box area of 1280x720. This is the area I know will be "on screen". So I have the windows I want to pull in during the video just outside this area. Then I crop to this box in editing. I think this is better looking than just capturing the whole desktop, and I like the live feel.
I'm enjoying evolving this style... I sometimes have thoughts of making some kind of gross homemade video compositing tool in JS. But I haven't gotten there yet...
I haven't looked at Premiere since the bad old days before it traded places with Final Cut as the default choice for editing. These days, I spend most of my time on Ubuntu and use Kdenlive for my very minimal requirements.
The one thing you have that is much harder to teach is great comic timing. I suspect that it will serve you well in many aspects of your life. I don't know if you've been polishing your fast five, but if you ever have an opportunity to try your hand at standup, I'd encourage you to go for it.