16 ms·
When SVG almost got network support for raw sockets
- chatmasta 4y agoSVG is crazy. Here's an SVG in a GitHub readme, animated with CSS: https://github.com/sindresorhus/css-in-readme-like-wat https://github.com/sindresorhus/css-in-readme-like-wat
- sgerenser 4y agoImagine how much crazier it would be with socket support!
- hoofhearted 4y agoWhat do you mean by socket support?
- IncRnd 4y agoIt's explained in a blog post located at https://leonidasv.com/til-svg-specs-almost-got-raw-socket-support/ https://leonidasv.com/til-svg-specs-almost-got-raw-socket-su...
- Evidlo 4y agoSVGs can also have buttons/sliders and be interactive.
- iliane5 4y agoSVG also supports <script> tags, which is even wilder
- mikeytown2 4y agoAn alternative to adobe flash was the idea behind sockets I'd imagine
- est 4y agoFrom the looks, I assume SVG was trying to compete with .SWF, which added network support around that time. Which is OK I guess.
- hadlock 4y agoYou have to remember the background for this era. Shockwave (not yet even Adobe), Shockwave Flash was the overwhelming interactive media on the internet. Kids in middle school and high school watched episodes of .flv videos of South park, we played "stick figure skiing" or "stick figure fighting" games, there were stick figure sledding games, all sorts of "multimedia" apps existed inside the "flash" container/spec. Some of them (multiplayer) also had network support of some sort, if only for supporting ads. A big part of flash was that it was not bitmap, it was... scalable vectors, which allowed it to shrink traditionally "large" (500kb+, easily 10 minutes on dialup) spritemap heavy games, down into 45-100kb (less than 7 minute download) packages that could be played on nearly any desktop SVG had the same base layer functionality but network support would have been a big step towards making an open standard version of Flash. The iPhone was famously one of the last devices to drop support for Flash (due to both wild and regular security holes), and when they did, Flash (the predominant consumer web technology of the early-mid 2000s) finally died. It was a big deal. Had SVG gotten flash-like capability, it could have been a real game changer (although with giant security holes). Security back then was "somebody elses' problem" so while raw sockets seems wholly irresponsible by modern standards, back then it was the norm, partly because less than 10 million people worldwide really had any kind of risk exposure, plus the fact that the internet was still mostly decentralized, AOL was still considered a major force back then. Facebook and others with billions of users didn't exist yet.
- 1970-01-01 4y agoThis was the time when things were truly awesome in terms of content. Flash, Shockwave, SVG, and Java Applets meant there were no longer restrictions to animation on websites. Security just wasn't a big problem. It was a golden age.
- Gigachad 4y agoGood summary, only thing I'd add is that the iPhone didn't drop support for flash, they never had it to begin with and made it clear they never would. Android vendors at the time used to use flash support as selling point until they too dropped it. Being the first to call the death on something seems to be an ongoing trend with Apple.
- chrisweekly 4y agoEvery time SVG comes up I'm reminded of this awesome preso by the inimitable Sarah Drasner; it's 6 years old but still relevant and -- I'd wager -- still eye-opening for many, even in this crowd. Enjoy! https://slides.com/sdrasner/svg-can-do-that https://slides.com/sdrasner/svg-can-do-that
- mamcx 4y agoMy question is if SVG could be viable to make GUI, and if is possible to use it cross-platform without a web view?
- pimlottc 4y agoMan, this deck really brings back feelings of the flash-filled internet of old...
- justinator 4y agoAll the interaction is broken for me (in Firefox)
- illiarian 4y agoI'm also reminded of how rocky SVG's road was, and is: Me and SVG by Amelia Bellamy-Royds: https://codepen.io/AmeliaBR/post/me-and-svg https://codepen.io/AmeliaBR/post/me-and-svg
- chrisweekly 4y agoWow, quite a story. Thanks for sharing. IMHO SVG has such tremendous untapped potential, there must be some way to fund and unstick the standards process....
- macintux 4y agoThat’s great, thanks for sharing it. I had the pleasure of working with Sarah at Basho long ago, one of the rare people who are as talented creatively as they are technically.
- alixanderwang 4y agowe embed some CSS in SVG outputs to make animated diagrams for our text-to-diagram language: https://github.com/terrastruct/d2/releases/tag/v0.3.0 https://github.com/terrastruct/d2/releases/tag/v0.3.0
- olliej 4y agoThe big reason for this iirc from various meetings was a number of maps systems that wanted to be able to say they were purely standards based, so they needed to be able do everything from within purely SVG. Recall that at the time XHR was just part of the general html spec - so there was no separate networking API that could be used _directly_ from svg. At this time of history SVG also was running on a belief that the correct solution to differing performance constraints was to have profiles. The high and low power profiles were not compatible such that you could easily end up in a position where you had content that could not display correctly in both at the same time.
- cenriqueortiz 4y agoscalable, not static (vector graphics)
- pupppet 4y agoI wish they would have split the format into multiple filetypes, SVG for static vector imagery and SVGX or whatever for all the other bullshit. I shouldn't need to worry about logo.svg being some attack vector.
- bawolff 4y agoI mean, if you include it as an <img> tag that is already the case. Although i guess you still have the problem of serving the actual svg file. There are some http headers that can help with that (csp)
- ManiAbod 4y ago[dead]
- lxgr 4y agoMaybe I‘m lacking the imagination for truly nefarious things, but what would be the problem with raw socket access in the browser? Modern browsers can already communicate peer to peer (via WebRTC) and DDoS other web servers (via CORS failures or good old embedding). Is the main concern the increased attack opportunity of non-web servers?
- justinclift 4y agoThe ad industry would surely figure out some way to load stuff for fingerprinting / user tracking with it. :(
- ec109685 4y agoBrowser can’t mediate raw socket connections.
- kevingadd 4y agoYou can use raw sockets to exploit vulnerabilities in arbitrary devices on the user's local network, like routers and IoT devices, which frequently have fixed default IPs
- bawolff 4y agoYou can already do that with svgs (in many cases not all). Although recently browsers changed rules for connecting to internal ips
- Matheus28 4y agoYes but also web servers. You could make requests to them (although you wouldn’t have access to the user cookies) and bypass CORS. There’s some more details in the WebSocket RFC for why it’s a bad idea to give access to tcp/udp sockets to untrusted code unless the receiving server is willing to receive them.
- lxgr 4y agoWithout cookies, is that really a problem though? You can already cause OPTION requests, if the concern is denial of service (although these are presumably much easier to filter out at a load balancer or similar than arbitrary unauthenticated requests).
- justinator 4y agoWhat we lost with SWF was an easy enough use authoring tool. Sockets or not, whatever SVG can do, is there an authoring tool for it like there was for Flash? I LOVED Flash - it probably is one of the first software products I actually bought at the student price in highschool. Flash 5 was just magic, I thought.
- toastal 4y agoSVGs performance is poorly optimized in every rendering engine. Flash had better performance with animations.
- halo 4y agoI mentally group Flash, Visual Basic and Visual FoxPro together as dying because they were unfashionable in tech circles despite being highly productive and practical. They never got effectively replaced and we will very slowly end up with modern equivalents.
- JasonFruit 4y agoAdd Microsoft Access to that list — it was crazy, both good and bad, what semi-tech people did with it.
- crazygringo 4y agoMaybe they were unfashionable but that's not why they died at all. Flash died because the iPhone killed it because Adobe refused to work with Apple to make it more secure and more power-efficient. Ultimately it was Adobe's own-goal. And Visual Basic was similarly a self-inflicted death, when Microsoft decided to make VB.NET incompatible with the previous VB6. But what was bad for Microsoft was good for the internet, as HTML+JS ultimately replaced VB6 for enterprise apps. FoxPro I don't know about, though. Never approached Flash/VB in terms of popularity. Flash videos and apps got easily replaced, and animations with HTML/CSS/JS, and those bite-sized Flash games basically got replaced with mobile gaming as apps.
- giantrobot 4y ago> I mentally group Flash, Visual Basic and Visual FoxPro together as dying because they were unfashionable in tech circles despite being highly productive and practical. I don't think any of those died because they were unfashionable. They died because the world/environment they were designed for changed or left them behind. Flash was built for the world of desktop computers with a mouse, keyboard, and relatively large amounts of RAM. It was optimized for Windows/x86 but could also be made to run on other platforms and architectures. Even on Windows it was unstable and extremely insecure. On mobile its performance was atrocious and all on onMouseDown() events (the typical click event people used) just went nowhere. Flash as written also didn't tend to handle portrait aspect ratios nor window dimension change events well if at all. Adobe was also a terrible steward of the plug-in. They did not want to put the resources into making it good, they barely kept it up with security updates. VB was similar in that it was designed for the unconnected 32-bit desktop world. Microsoft wanted to drop the VB6 runtime and just make the VB language hosted on top of the .NET runtime. It wasn't that the language was out of fashion, lots of LOB apps were written in VB in many companies, Microsoft was just uninterested in continuing development and had a new hotness they were pushing. VB.NET was an imperfect upgrade path for VB6 developers.
- Rodeoclash 4y agoSuch an exciting time to be a programmer. Although I'd picked Director / Lingo as the horse to back instead of Flash. At the time, circa 2002 or so, Director had much more capability than Flash did but I don't remember it having a very good pathway to the web.
- sgerenser 4y agoWasn’t it possible to put Director projects on the web with the “Shockwave” plugin? I recall it actually being fairly popular for a brief time until Flash completely took over.
- sirspacey 4y agoYep! Built my first startup with it. The install process was painful & opaque to users, so it was a big deal when Flash launched because it solved the problem & killed Shockwave fast.
- scaramanga 4y agoFor anyone familiar with sockets being very confused. When they say "raw sockets" they just mean like TCP or UDP sockets as opposed to eg. "websockets". Actual raw (PF_INET, SOCK_RAW) sockets would allow you to do all kinds of additional crazy things beyond merely establishing a TCP connection or sending a UDP datagram. https://man7.org/linux/man-pages/man7/raw.7.html https://man7.org/linux/man-pages/man7/raw.7.html
- junon 4y agoThank you for clarifying. Actual raw sockets for SVG would have been absolutely insane.
- barneygale 4y agoIt's a shame we never got to see a DHCP server implemented in SVG!
- myself248 4y agonmap.svg could be its own GUI!
- legec 4y ago> I’m still pissed I can’t use Inkscape as my IDE. You can always fall back to MS Paint: https://ms-paint-i.de/ https://ms-paint-i.de/
- bawolff 4y agoWell now svgs support web sockets and webrtc, so.... not that crazy.
- animesh 4y agoEvery time I read about SVG, I remember those glorious 3 months I spent making a custom chart wrangling d3 and SVG. Nothing has ever come close in 6 years after that.
- pol_osei 4y agoNSO Group still figured this out and built Pegasus in any case.
- vrglvrglvrgl 4y ago[dead]
- mgaunard 4y agoThat is not what "raw socket" means. Those are TCP sockets. And yes, it would have made more sense to have TCP support rather than to force HTTP onto everything.
- sgerenser 4y agoTechnically correct (the best kind of correct). But in the context of a browser, it’s obviously just referring to actual TCP/UDP sockets, as used by native applications, rather than being intermediated by the browser and limited only to certain application level protocols like HTTPS.
- IncRnd 4y ago> it’s mostly assumed that you’re talking about static vector graphics images SVG stands for "scalable vector graphics" not for "static vector graphics". Scalable files, but not static or pixel oriented files can be scaled to a higher resolution without losing fidelity. You lose fidelity, when increasing the display size of a bitmap. Think of how your company logo appears, when zooming-in on a 16x16 icon version.
- qwerty456127 4y agoThis is sad. I feel like they should have actually added it. Developing a full application in a .svg file sounds really great to me.
- hoofhearted 4y agoI have been just recently been getting into creating React SVG components that pass props to the inlined SVG code. It’s pretty cool what you can do dynamically. I have been playing with dynamic css inside of the SVG, but animations are my next step.
- sirspacey 4y agoWould love to see this, that sounds really cool!
- hoofhearted 4y agoI’m currently building out Wordpress for developers. Our logo in an upcoming release uses inlined SVG, and it’s taking a class name property to change the text color dynamically. https://github.com/elegantframework/elegant/blob/v2.0-alpha/source/elegant-docs/src/components/Logo/Logo.tsx https://github.com/elegantframework/elegant/blob/v2.0-alpha/...
- egberts1 4y agoI got an even bigger guide from this article on discontinued WG for Full (networked) SVG: libphonenumber library by Google, ported in many programming languages. Covers a the general gotchas on phone number parsing (by convention, countries, and telco eccentricities). And started using it. Thanks, Hacker News. Oh, it’s a good thing that Full (networked) SVG didn’t get formalized. https://leonidasv.com/til-parsing-phone-numbers-is-a-nightmare/ https://leonidasv.com/til-parsing-phone-numbers-is-a-nightma...
- dekhn 4y agoAh yes- I remember the predecessor to this was VRML, which started out as mostly-static and then gained a number of scriptability nodes. at the time, it was still unclear how interactive, graphical web applications would be made, and it seemed like markup languages could gain scriptability (https://www.bitmanagement.de/developer/spec/vrmlscript/vrmlscript.html https://www.bitmanagement.de/developer/spec/vrmlscript/vrmls... so around 1996!) SVG is a wonderful standard but it seemed pretty clear that all the scripting should be done in javascript, with SVG as an web element tag or document type.
- jsdeveloper 4y agoI personally think svg had so much potential for the web, only if they had flexbox kind of dom model. the gap between UX design and final product would have been significantly reduced. one would simply design apps in inkscape and add funtionality later to it.
- NelsonMinar 4y agoI think what's astonishing about SVG is it was implemented in the early 2000s, then nearly forgotten. But it still worked in browsers and had a resurgence in the early 2010s. Partly because of the end of Flash, partly because of D3.js. That fallow period between 2003-2011 is remarkable to me, I'm surprised it survived it. One history of this era: https://medium.com/siliconpublishing/the-fall-and-rise-of-svg-9c864ec39e7e https://medium.com/siliconpublishing/the-fall-and-rise-of-sv...
- kylejrp 4y agoI once helped someone create a monstrosity of an SVG - they exported a flowchart SVG from Visio that would show the current state of different steps of a project. The status of each step was stored in a SQL database. I helped write some JavaScript inside the SVG that would create an ActiveX object that would open up a ODBC connection and execute a SQL query to get the latest states, which would update the colors on the flowchart every time you loaded the SVG. It would obviously only work in IE11. Plaintext credentials stored right inside the SVG!