Earlier quoted context omitted.
This only applies to libraries served from separate locations though, right? No issue writing a Haskell library for wasm and then having consumers compile their app leveraging your library (at which point it's bundled with the RTS)
I’m not sure what the serving part has to do with it; if I have a ruby library and a python library and I use them from a Haskell app, I’m getting three runtimes, regardless of if they’re bundled together or not.
Rust and WebAssembly in 2019
91–97 of 97 posts
Re: Rust and WebAssembly in 2019
#92I'm not quite into Rust yet, but it is a very candidate for useful webassembly frameworks/projects. It doesn't need a big run time, but is more expressive than C/C++. The big drawback is that, unlike Javascript or Python, there is just no way I'm going to be able to teach Rust to previously non-technical people. The learning curve is just too damn hard.
> The big drawback is that, unlike Javascript or Python, there is just no way I'm going to be able to teach Rust to previously non-technical people. Plenty of "non-technical people" learn to write simple (buggy) programs in C in a matter of months. And once you know the basics of the C machine model, it is quite feasible to work up to Rust. The thing about learning Rust though is that it's not really a mature languag…
Rust has interesting features and an enthusiastic community (though the extreme down voting of any mild criticisms of Rust here is disappointing). But again, the learning curve is very flat, meaning you have to learn a whole lot just to achieve the simplest things. I have taught programming to highly intelligent non-programmers before. I know the difficulties. They don't have either the time or the frustration tolerance to argue with the rust compiler.
Re: Rust and WebAssembly in 2019
#93It didn't click until just now that rust is very naturally suited to WebAssembly due to its lack of garbage collection. As I understand it, there's no current plans for WebAssembly to include a garbage collector, so higher level languages that want to compile to it will need to bundle their own, increasing the size of the download quite a bit.
Re: Rust and WebAssembly in 2019
#94Earlier quoted context omitted.
> I truly have never seen this. In fact, I'd say I often see a rather careless culture of doing DOM manipulation here and there because it solves an immediate problem, albeit by short-circuiting the abstractions that may be in place and are now a bit more fragile. Uggghhh, somehow you have somehow never seen DOM fear while simultaneously describing your own DOM fear. To say this behavior is prolific underscores the p…
Is this all just about people using ``$`` instead of ``document.querySelector``? I figured you were talking about the virtual DOM in React or something. Now I'm not sure what you mean anymore. What GP is advising against is doing direct manipulations on the DOM outside of an application's normal control flow. That has nothing to do with being afraid of the DOM, it has to do with grouping your update logic into one pl…
Here is a summary of the standard DOM for mere mortals:
https://prettydiff.com/2/guide/unrelated_dom.xhtml
> What GP is advising against is doing direct manipulations on the DOM outside of an application's normal control flow.
I have been doing this work long enough to see all manners of excuses and justifications. It is amazing how they change over time, but at any given time they are wonderfully uniform centering on the most popular understanding of the technology at the time. They are all unoriginal clichés that people mindlessly echo.
The excuses that stuck with me over the years:
* Its too hard. You cant do it without jQuery.
* It has to be further abstracted. Without the necessary abstractions you are essentially working in assembly code. (JavaScript is never close to assembly).
* You are reinventing the wheel (never mind that frameworks do that frameworks reinvent the wheel)
* You have to maintain state and you cannot do that without a framework. (unit test your code)
* If you don't use a framework you will end up writing a framework anyways.
---
In the end all the stupidity comes down to behavior. Developers don't trust the technology, don't trust their management, and especially don't trust each other or themselves to get it right. This behavior is called invented here syndrome and it isn't limited to the dom, the web, or even software. I frequently speak with lawyers and medical professionals who are frequently forced to mitigate this very same set of stupidity.
The cure for this foolishness is:
* Don't hire incompetent people, which are people lacking the proper desire and potential.
* Train your people. This technology isn't hard.
* Have the proper test automation in place.
* Have strong leadership in place. It is only a matter of time before people get frustrated or desperate and differ to really bad decisions. Bad decisions aren't limited to stupid people. Strong leaders are capable of withstanding the tired pleadings and big tears. Bad decisions are almost universally motivated by a perception of convenience without regard for risks or future expense, the easy versus simple paradigm.
Of course most organizations aren't willing to invest in any of this and would rather push the debt out to be a future failure for somebody else.
Re: Rust and WebAssembly in 2019
#95Rust and wasm is looking pretty interesting. I've recently started playing with kotlin-js. Kotlin also has a wasm compiler but their javascript transpiler has been around longer and garbage collection is short term an issue for their wasm compiler. Also there are a ton of kotlin-js libraries out there already which makes using this straightforward. This is exactly the kind of stuff the rust people are targeting as we…
Personally I can't wait, javascript is miles ahead of where it was 5 years ago but it's still pretty painful to use on large, longer running projects with bigger teams. I once enjoyed it enough and now dread starting a project in it. Typescript is a massive improvement but maybe the ship has sailed. If we don't _have_ to use it anymore why bother?.
Basically, I'm planning to ditch javascript pretty soon. I consider typescript to be a stop gap solution. I'd prefer to use something like Kotlin or indeed Rust. IMHO Kotlin is a great fit because it already is used for frontend work in Android. Also the transition from javascript to Kotlin is pretty smooth once you get over the stockholm syndrome that most javascript developers seem to suffer from (they don't seem to know better). I've seen a few people adapt to Kotlin and liking it. In my experience, these things tend to be driven by people voting with their feet. There's lots of early signals on Github that this is starting to happen.
I'd also prefer to opt out most of the npm ecosystem. IMHO, most of the stuff there is inherently javascript centric and not a great fit in a type safe environment that has things like generics, polymorphism, and other stuff that makes frameworks look and feel a bit differently. Even with type annotations like in typescript you get lots of leaky abstractions and you are still dealing with javascript when it inevitably blows up. Better to make a clean break with this and create a new ecosystem from scratch. And frankly, most npms are not that hard to replicate in another language.
Re: Rust and WebAssembly in 2019
#96I decided that Rust is the natural next step for my personal side project stuff, which I want to be more on the browser-based gamedev side of things. The learning curve is enormous - since coming from like Unity and Flash, so much is done for you... I mean, one _can_ write their own shader code and physics and things, but it's not at all required in order to make impressive content. Even in JS, Three.JS and friends t…
Really nice! The Flash devs I met went all downhill with Flash, because they never learned how to code and suddendly needed to do it.
Re: Rust and WebAssembly in 2019
#97Earlier quoted context omitted.
Really nice! The Flash devs I met went all downhill with Flash, because they never learned how to code and suddendly needed to do it.
Doesn't sound like they were devs at all. Flash's AS3 (and to a lesser extent AS2) were pretty good languages and after learning them it should be pretty easy to transition to JS. AS3 was, imho, a better ECMAScript implementation than JS was, especially because it was typed. As someone who worked in both AS3 and JS I still miss it a bit but it wasn't that much of a leap to work in other environments.
I think one of the reasons "flash devs" get a bad rap is because a huge amount of the paid work for an epoch was all about making like preloaders and banners and things that were 95% timeline transitions and animations with just a sprinkling of code.
It's like taking a JS developer from the 90's and putting them in the same league of modern web app developers.
Same language (essentially, ish) but no comparison.
Especially with the last hurrah of flash which tied into native extensions for standalone builds and things - Adobe really dropped the ball with something great :\