See the web site for details on how it works, and the source code if you wish to host your own implementation.
25 karma · joined July 23, 2012
See the web site for details on how it works, and the source code if you wish to host your own implementation.
Just wanted to offer some missing bits you might find interesting, specifically, the third function you don't recognise is the random function from the original Tetris on the NES. It comes from the article[0] that went through all the asm of the NES Tetris cartridge.
And yup, that first one is quite quite terrible for random - it came from some of the first results in StackOverflow intentionally looking for something that was overly simple and "bad" at random.
But really the article was about testing and visualising how your own random functions might be.
[0]: https://meatfighter.com/nintendotetrisai/#Picking_Tetriminos
We're (the team) are waiting to hear from the Ops folk at CERN to get the server to stop 503'ing. Until then, you can try it out above.
I spoke to a few of the people involved in the original 1990s project and one big issue was authentication into servers was way too complex.
The simulation (I wrote the JavaScript for it), writes to local browser storage (IndexedDB), the original WorldWideWeb would write to disk (networked or local).
I recently released https://terminal.training (paid course for 4 hours) which is just for this kind of question, but I've also started a free mini email course (same URL) that tries to share some of the CLI shortcuts I've come to rely on over the years.
PE techniques aren't documented (so far as I know) so it's up the developer to take the path they're most comfortable with.
FastBoot, I suspect, will dictate how I code my application/server side logic.
On the surface, it looks like the cost of FastBoot is higher.
The benefits are, I suspect, are higher though: single code base, reusable views, etc.
This is similar to what happens when the path is too long for the omnibox, but simply the effect of putting the domain as far left (in the omnibox) as possible.
i.e. instead of seeing:
[ www.mybank.com.credicards.wt3_segment_secure.login.html.evil-site.com ]
You see:
[ ...html.evil-site.com/ ] (where "...html." are semi-opaque).
I mocked up what I'm suggesting here: http://remysharp.com/2014/05/04/on-chrome-hiding-urls-to-pro...
A gave a little thought outside of that, but not much. I'm all ears if I've accidentally opened up a bag of worms!
The while problem has been raised before, and there is a tiny bit of protection (we parse the code line you're on, and if its a while loop, it's supposed to ignore live execution - though clearly that's not enough). It's true to say I'm still looking for a solution :)
That all said, you dont lose your work if you hit this kind of loop and it hangs the UI. The reason is two fold: 1) jsbin, since it was released in 2008 always saves code to localStorage, but more importantly, 2) it's saving your code to the server AS YOU TYPE - so you hit refresh, and you get you bin back (and the correct URL and saved in your history if you're signed in, etc).
Everything else, including saving, is available as a non registered and anonymous user.
Thought I'd chime in an reply to a few of the comments here.
1. Will it be online in 10 years? Yes - .org domains can only be registered up to 10 years in advance (though we've had donations going up to 2032). Check `whois mit-license.org | grep Expiration` and you'll see 16-Oct-2021 (I need to add this year).
2. "This is bizarre...just Host All The Things!". Partially you're right, but if you read the very first line of the README.md I explain why I wanted to host it:https://github.com/remy/mit-license
TL;DR: because I nearly always forget to include the file, and if I do, I usually forget to change it from project to project, and from year to year (also why I don't like to the opensource.org url - the date is a placeholder).
This would let me include just the url in my script headers (and someone else noted, and you're right on, what if you're offline? Arguably, the "mit-license.org" part of the URL should help the reader know what the license is - even if they can't read the contents).
Like I said, just chiming in. I'm not saying anyone here is wrong or right - it's just something I made for myself, and figured it might be useful to more than just me.
There's a couple of others, and docs will be coming soon. In addition, there's an exposed API that allows you to point JS Bin to a JSON file and it'll load in and save those settings - which is useful for starting a class for teaching where you want the editor in the same mode across all the students.
The client code (for both remote rendering & codecasting): https://github.com/remy/jsbin/blob/master/public/js/spike.js
The server side: https://github.com/remy/jsbin/blob/master/lib/spike/index.js
Very simple, but requires an event based server - so Node was the obvious choice for JS Bin.
The big change in jsbin is the live aspect:
* Start typing, your code is saved and continues to save as you type.
* As you type the live output is updated automatically.
* Open the the full preview url (without /edit) in any other window - be it browser or mobile phone, and that will update in real-time too. So you can edit on your desktop, and the rendered output will appear on you mobile devices.
* If you share the url with /watch on the end, people can watch what you type in real time.
More detail will be in the post later today. I'll try to answer more questions here if they come up.
It also continues to be completely open source: http://github.com/remy/jsbin - so welcoming any contributions :)
However, if you open the devtools console in your browser, and run: `jsbin.settings.editor.smartIndent = false` it'll disable the indenting. The setting is sticky, so you it should remain whilst the data is stored against the browser.