News for hackers. Stuff that matters.
Re:Moving from TypeScript to Rust / WebAssembly by rubber_duck on Thursday July 09, 2020 @05:08AM (#23778303)
Won ? Ruby fell off a cliff once it got to a point where people had to maintain that shit in production - I'm currently working on a large mature RoR codebase and I'm switching jobs ASAP because it's incredibly painful to work with and feels like a dead end career wise - and I like the gig otherwise - good product and a decent team - but the technology is draining so much of my life energy on nonsense it's ridiculous. And the language is built for unmaintainability - standard functions being abbreviated to a single letter, 2 or 3 aliases for a single standard function (map/collect and such), Rails overriding the conventions of the language (! postfix). And then there's the architectural retardation of fat models, fat controllers and using mixins ("concerns") completely break encapsulation - all actively killing code reuse-

PHP has long been a meme and is mostly legacy stuff or bottom tier work.

Dynamic languages are adding static optional static typing because the value provided by tooling as the projects scales is undeniable.

It took ES6/TypeScript to drag JS out of the dump that it was with every library adding its own take on a class system - the maintainability jump from ES5 to TS is incomparable for anything larger than 1k LOC

Re:Moving from TypeScript to Rust / WebAssembly by wwright on Thursday July 09, 2020 @06:56AM (#23778832)
I say this a lot, but if you are this irritated by Rails, then you ought to see the 20+ year old legacy C/C++ some of us get to work with ;)
Re:Moving from TypeScript to Rust / WebAssembly by rubber_duck on Thursday July 09, 2020 @09:45AM (#23780099)
I started on C++ back in VS6 days and I wrote tons of it when I was in to game dev and graphics programming - but I would not want to work on those systems and kinds of problems when I can get paid the same to work on higher level stuff - the tooling quality and slow iteration cycle when I'm really stuck on something leads to a lot of stress - I just want low stress dev environment where I focus on solving problems I'm being paid to solve - not problems created by the tools and then having to explain stakeholders why something seemingly simple takes 3x of the estimate. I like environments where I'm confident in my estimates - C# proved to be good in this regard simply because the tooling is there even when I hit a wall and it has a relatively consistent uniformity that makes it easier to navigate unknown territory.
Re:Moving from TypeScript to Rust / WebAssembly by cmrdporcupine on Friday July 10, 2020 @09:50AM (#23791437)
Funny, after 10 years of Java and other high level languages I was very happy to go work on C++ at a lower level and have been pushing myself lower down the stack as I go.

C++ these days is a far more pleasant beast than the VS6 days, the tooling is pretty good and the language can be tamed into a pretty elegant beast with the right coding standards and discipline.

Re:Moving from TypeScript to Rust / WebAssembly by bigredhdl on Thursday July 09, 2020 @02:33PM (#23783450)
I agree. My team is just more productive in C#, so we just stay there as much as possible. As you say, the ability to work on just solving the actual problem is very under valued.
Re:Moving from TypeScript to Rust / WebAssembly by cmrdporcupine on Thursday July 09, 2020 @08:58AM (#23779675)
This is one nice thing about working at Google. We have C++ codebases that are 20 years old, but you'd never be able to tell because they are still continuously worked on and even if not there's a team of people at Google who constantly run company-wide refactorings and the like to modernize things.
Re:Moving from TypeScript to Rust / WebAssembly by gen220 on Thursday July 09, 2020 @09:12AM (#23779771)
This is, IMO, one of the most underrated aspects of the monorepo, that has such a valuable impact over time.

It only takes a handful of extremely passionate engineers (and I really mean a handful, like less that 2% of engineers in an org) to raise the quality-floor of the entire codebase.

Re:Moving from TypeScript to Rust / WebAssembly by lifeisstillgood on Friday July 10, 2020 @05:52AM (#23789767)
For sanity, sustainability and fairness I would rather that read

It only takes a handful of extremely passionate engineers > It only takes a handful of paid engineers, full time assigned to the task

Re:Moving from TypeScript to Rust / WebAssembly by gen220 on Friday July 10, 2020 @10:45AM (#23791946)
Anecdotally (I don't work at Google, and this might not apply there because it's such a large company): At the monorepo companies I've worked at, of the 2% passionate I mentioned, maybe half have naturally gravitated towards working FT on the infra teams, the other half make very occasional but astronomical contributions, while working full-time on an actual product.

What I mean to say is that with a monorepo, you leave the door open to essentially passion-driven contributions made by the other half of that 2%. In non-monorepo environments, the barrier to uniform adoption is too high for someone that isn't full-time assigned to the task to justify.

Some people are genuinely passionate about this stuff, and want to take on the task of migrating the entire code base, because it's a fun challenge and it'll improve their day-to-day work every day for the remainder of their employment. They're very rare, but they do exist, and with a monorepo those people are better-equipped to drag the company forward.

Re:Moving from TypeScript to Rust / WebAssembly by lifeisstillgood on Friday July 10, 2020 @05:03PM (#23796428)
I don't get this - changing the code is not the problem - this is a political / marketing issue.

I have some news - passion is not enough, and there are more than 2% of people working on things they are passionate about - it only 2% get lucky.

I can think of a few instances in my recent career at large monorepo company where I have built something on the scale of "passionate, could improve our working lives"

One died because ... well I gave up, two are used locally by my team and those I could persuade, whilst other solutions built by others for the same fix have gone on to be blessed officially, (ie replaced by grassroots competition) and one was replaced by a fully mandated and funded project that spotted the need and just steamrollered over all the local fixes.

One is still outstanding and I think well worth pushing still.

But I don't dream of the big win where suddenly the Board says "why, without your glasses Miss Moneypenny you look ravishing".

I get paid, I work, and I try and make the world a bit better where I can. I am passionate about it. But i don't write blog posts about how passionate I am.

Maybe I should :-)

Re:Moving from TypeScript to Rust / WebAssembly by randall on Thursday July 09, 2020 @09:30AM (#23779936)
Ya, fb feels the same way fwiw. I'm very sold on the benefits of monorepos now.
Re:Moving from TypeScript to Rust / WebAssembly by mmargerum on Thursday July 09, 2020 @10:07AM (#23780372)
I've got a large codebase i've been maintaining since 1999 that i've continued to evolve and is still in use today . I've been able to steadily improve it without breaking much. IDK maybe its being > 50 but I can appreciate less "dynamic" environments. I do we dev in vue with a go back end but I know the vue part is going to be a rewrite in 5 years. Who wants to keep doing that shit? not this 52 year old guy.
Re:Moving from TypeScript to Rust / WebAssembly by cmrdporcupine on Thursday July 09, 2020 @11:25AM (#23781267)
Modern refactoring and static analysis tools really make it far easier to keep old code bases up to date.

As a hobby thing I'm taking an almost 30 year code base written in C and reworking it into C++17. I've become somehow somewhat adept at this transformation over the years :-)

Re:Moving from TypeScript to Rust / WebAssembly by pjmlp on Thursday July 09, 2020 @01:42PM (#23782838)
Yeah, the problem is that the large majority of the world isn't Google, software isn't their main business, and their codebases are maintained by a continuous rotation of external contractors that are paid by the tickets that they get to implement.
Re:Moving from TypeScript to Rust / WebAssembly by cmrdporcupine on Friday July 10, 2020 @09:48AM (#23791423)
Yep, and don't get me wrong. Stray out of the monorepo and into the wilds of various git hosted code bases at Google and you'll find code rotting in the fields, maintained to a far lower standard (IMHO).
Re:Moving from TypeScript to Rust / WebAssembly by angrygoat on Thursday July 09, 2020 @08:46AM (#23779568)
I'll see your legacy C/C++ and raise you legacy Fortran 77 :)
Re:Moving from TypeScript to Rust / WebAssembly by wwright on Thursday July 09, 2020 @09:37AM (#23780006)
We needn't fill the young Rubyist's head with nightmares that deep, friend :)
Re:Moving from TypeScript to Rust / WebAssembly by Dowwie on Thursday July 09, 2020 @09:10AM (#23779764)
I think you would really appreciate Rust for backend web dev. Quite a few people who were once upon a time hardcore rubyists gravitated to Rust and became some of its greatest contributors: Steve K., Sean G., Carl L., Florian G., and many more.
Re:Moving from TypeScript to Rust / WebAssembly by rubber_duck on Thursday July 09, 2020 @09:59AM (#23780289)
I like Rust a lot - especially since I have a C++ background - unfortunately I don't see any opportunities to move to it ATM, but I haven't really tried hard enough - maybe I'll take a month off after my current project to write something substantial in it and try to find a Rust gig.
Re:Moving from TypeScript to Rust / WebAssembly by kevinyew on Thursday July 09, 2020 @07:41AM (#23779096)
PHP is definitely not a meme, it's got a ton of actively developed frameworks, PHP 7 was a huge step forward for the language and PHP 8 is shaping up to be as well.

It's been used at every workplace I've been at, sometimes well, sometimes not so well, just like any language. No idea what the point of blanket statements like this is.

Re:Moving from TypeScript to Rust / WebAssembly by ampersandy on Thursday July 09, 2020 @10:27AM (#23780609)
Especially when said statements are just wrong. Anecdotal evidence from individual companies does not allow you to make representative statements about the entire internet...

https://w3techs.com/technologies/details/pl-php claims ~79% of websites whose backend is known use PHP.

https://w3techs.com/technologies/details/pl-ruby shows Ruby has grown from 2.5-3.5% over the last year.

Re:Moving from TypeScript to Rust / WebAssembly by jmuguy on Thursday July 09, 2020 @07:42AM (#23779101)
Which standard function in Ruby is a single letter?
Re:Moving from TypeScript to Rust / WebAssembly by rubber_duck on Thursday July 09, 2020 @07:57AM (#23779202)
b, to_s, to_i, to_a, to_c, to_h, to_r, etc.

Should have said methods but you get what I mean. And I've encountered ambiguous and pointless abbreviations all over the place.

Re:Moving from TypeScript to Rust / WebAssembly by colmvp on Thursday July 09, 2020 @08:33AM (#23779472)
It's weird, when I was I younger I used to love shortform syntax like that as well as removing unnecessary punctuation

But now that I'm older, I appreciate things being more descriptive and orderly, including strict use of semicolons, functions that say what they are doing (e.g. to_string), or being explicit about converting (e.g. static_cast<type>)

I think it's because I find trying to make everything as succinct as possible ends up trying to be too clever.

Re:Moving from TypeScript to Rust / WebAssembly by zaphar on Thursday July 09, 2020 @09:02AM (#23779708)
When I was younger I tended to write more code than I read. As I got older I transitioned to reading more code than I wrote. This correlated with a desire toward a preference for code that self documents as I progressed.
Re:Moving from TypeScript to Rust / WebAssembly by SAI_Peregrinus on Thursday July 09, 2020 @09:12AM (#23779779)
I type fast enough that somewhat longer names don't hurt. Also tab completion has existed both in IDEs and in shells for many years now. But just like very nearly everyone else I fall into the "7 ± 2 items in working memory at once" capability range. Having to remember what a command/function/syntax element does instead of reading a word that says what it does takes away from that working memory.

Long-term memory is similar, while it's not bounded in the same way it takes time and effort to develop. I'd rather type `git new-branch` than have to remember `git checkout -b` and I certainly don't alias it to `git nb` or something: I can type `git n<TAB>` and let that complete it.

Re:Moving from TypeScript to Rust / WebAssembly by peterholcomb on Thursday July 09, 2020 @09:09AM (#23779752)
Well said. "Clean Code" goes into this a lot and it helped me realize why I was starting to become more and more bothered by looking back at the short variable names I wrote years ago on my projects.
Re:Moving from TypeScript to Rust / WebAssembly by wing-_-nuts on Thursday July 09, 2020 @12:38PM (#23782009)
When I was first learning java I loathed the verbosity, but I was coding everything in vi. Now days with good ides, I don't mind java's verbosity or even the boiler plate.

I find myself more annoyed by dynamic languages, because the tooling just isn't at the same level. All sorts of 'hints' that I rely on in java simply aren't there in other languages, and the ide throws up it's hands and is like '...? I guess this is right? Godspeed sir', and I wind up having to go lookup documentation rather than ctrl clicking into underlying functions and code. It's really annoying, and it's made me be more appreciative of staticly typed languages.

Re:Moving from TypeScript to Rust / WebAssembly by jmuguy on Thursday July 09, 2020 @09:06AM (#23779735)
Interesting, I’d never seen or used .b or .p that someone else mentioned. I agree those definitely should not be a part of the standard library. Not sure about to_i etc. we use those pretty often and it’s never really been an issue.
Re:Moving from TypeScript to Rust / WebAssembly by andrenth on Thursday July 09, 2020 @08:18AM (#23779355)
p
Re:Moving from TypeScript to Rust / WebAssembly by thecreamedcorn on Thursday July 09, 2020 @12:48PM (#23782123)
I think you took the phrase too literally. I'm assuming by won they didn't mean that Ruby and PHP will dominate the web landscape for eternity. I'll just point out that dynamic programming languages have for most of the webs history been the primary tool for developers.
Re:Moving from TypeScript to Rust / WebAssembly by Kiro on Thursday July 09, 2020 @08:37AM (#23779505)
The meme here is that your comment reads like a parody of an outraged junior programmer at their Dunning–Kruger peak.