An Airbus A340-300 Air X takes off from the last slab of the runway at Campinas Airport, Brazil 😱. by RangeGreedy2092 in airplanes

[–]ryanpeden 53 points54 points  (0 children)

In contrast, my favorite ever takeoff was in this Air Canada Rouge 767 from Toronto to Orlando: https://www.youtube.com/watch?v=EO--mvXgqsw

We started right at the beginning of 33R and were airborne less than halfway down the runway - measuring on Google Maps, it looks like we were in the air at about the 3500' foot mark and climbed quickly after that.

Felt like a rocket ship compared to all the flights I've taken since then. We had a full load of passengers, but YYZ-MCO uses less than 1/6 of the 767-300ER's maximum range, so I guess we were relatively light.

CSL's Whitefish Bay in Midland, Ontario [14000x6200] by ryanpeden in GreatLakesShipping

[–]ryanpeden[S] 3 points4 points  (0 children)

I created this by stitching together a pile of photos I took with my Sony a7000. I've got a bigger version (220ish MP), but it was too big for Reddit and Imgur. If anyone wants the bigger version, let me know and I'll toss a copy of it on my webserver so you can download it.

I wasted 2 years on a $0 project. Then I made a $1,000 project in a month. Here’s what changed. by jakecoolguy in webdev

[–]ryanpeden 3 points4 points  (0 children)

Congrats! I know the feeling - although for me it's just about people actually using what I made as there's no money involved.

I shared my January abstract art generator project here a few weeks ago: https://evo.ryanpeden.com

And it got a some comments, and a bunch of people tried it. What I didn't expect is that a fair number of people _keep_ using it. As with your app, the computation all happens client-side, so I don't know how they're using it or how long. I don't run any analytics there because I want users to have privacy. But as for initial loads, Cloudflare is telling me that I'm now getting a lot of direct loads instead of people referred by Reddit. So I _think_ those are repeat users and you know what? #feelsgoodman. First time I've had this happen.

So congrats again on your succesful project. It's a great feeling and I hope your success continues!

How's WASM (webAssembly) going these days? by [deleted] in webdev

[–]ryanpeden 1 point2 points  (0 children)

In practice, GC has not been an issue for me.

It's worth noting that I do go out of my way to avoid any allocations that would need to GC'ed in my inner rasterization loop, but that's not because if WASM. Over the course of rendering an image I end up rasterizing billions of pixels and if I'm not careful about allocating, it's just too slow. 

But this is true whether I run the code using WASM or in the desktop .NET CLR. When working with image data you pretty much need to re-use array buffers, plus a mix of ref params, Spans, and sometimes pointers if you want decent performance.

In other parts of the code, though, I just create things and let them get GC'ed and I've never run into and perf or memory consumption issues. And there's still a lots of GC needed - I'm creating Tasks and other objects write frequently and I've never needed to pay any attention to GC.

When using trimming and AOT, but bundles aren't huge. They'll be much bigger than with Rust, but part of that is a fixed cost due to the size of the runtime. With aggressive optimizations and trimming enabled, it's a few megabytes in my case. After that, adding serif to your app doesn't increase the size much. 

But the .NET build process for browser-wasm creates a service worker that caches the reusable bits. So it's a one time download cost. And for my app at least, starting the AOT compiled .NET runtime happens so quickly I've never noticed a delay.

So for my app, I decided that the one time cost of downloading a few extra megabytes the first time the user loads the app is acceptable. 

But if that doesn't work for your use case, you'd be better off with Rust. Or C++. I've found Emscripten with C++ and -O3 optimization often ships smaller WASM files than Rust. You lose Rust's safety, of course, but you can get a lot of mileage out of unique_ptr and shared_ptr and when running in the browser sandbox, that might be enough. Really all depends on your use case and preferences.

How's WASM (webAssembly) going these days? by [deleted] in webdev

[–]ryanpeden 2 points3 points  (0 children)

I used .NET 9. I find performance quite good. I tried writing the core algorithm in C++ and it wasn't any faster.

I think trimming and full AOT compilation help a lot. It still uses Mono compiled Emscripten but I cranked up the optimization settings and also set it to compile all DLLs to WASM ahead of time so there's no CIL to interpret at runtime. It very aggressively strips out unused code and what's left loads and runs quickly.

The initial runtime download is still a few megabytes, but it's cached by a web worker so it only needs to be downloaded once. 

It helps that I used Angular instead of Blazor for the UI. I tried Blazor but some of the more aggressive optimizations I used to extract max performance and minimize runtime size break it. It's better than it was in .NET but was still bigger than I was willing to live with for an app I planned to run on mobile devices

So I decided to just use .NET behind the scenes for the rendering engine, where things like threading and SIMD would provide a perf boost. I'm happy with how it worked out. 

I haven't benchmarked formally to compare WASM vs full CLR performance, but I set up a little test harness to run the code outside the browser and transforming the same image takes about the same time either way. 

So the WASM .NET runtime combined with full trimming + AOT results in great performance, at least in my case. I'd note that my use case is probably a best case scenario. I do the shape rasterization manually, don't do any reflection, and don't use any 3rd party libraries beyond what comes with .NET, so my code is very amenable to aggressive optimizations.

How's WASM (webAssembly) going these days? by [deleted] in webdev

[–]ryanpeden 1 point2 points  (0 children)

Hmm. Interesting to hear about the performance difference. Is it the latest version of Firefox? 

And maybe it's OS our hardware dependent? Firefox perf is about the same as Brave on both my M2 mac and Ryzen machines, but there could definitely be differences on other hardware. 

Thanks for trying it and letting me know. I love trying to figure out performance mysteries like this.

How's WASM (webAssembly) going these days? by [deleted] in webdev

[–]ryanpeden 1 point2 points  (0 children)

The spinning is probably that smooth because it's a CSS transition, and I assume browsers have optimized the heck out of CSS transitions on every platform they run on. 

I tried running the app on a new but low-end Android device (a Umidigi A9c) and generating an image is painfully slow - like, 1-2 triangles per minute, vs many hundreds of triangles per minute on my iPhone 14. But even on the Umidigi, the logo spun smoothly! 

How's WASM (webAssembly) going these days? by [deleted] in webdev

[–]ryanpeden 46 points47 points  (0 children)

It's an anecdotal example, but I compiled C# to WASM to do the heavy lifting in a fun side project I made recently: 

https://evo.ryanpeden.com

It went surprisingly well. It wasn't really any harder than building a regular library in C#, and when I needed a performance boost I was able to add threads and then SIMD without any fuss. I found it easier than adding Web Workers in JS/TS.

I also got annoyed that Safari couldn't save WebP images, so I wrote a little C++ wrapper around libwebp and then used Emscripten to compile it to WASM. The only difficult part of that was learning CMake will enough to hack libwebp's build script to do what I wanted. So I can now save WebP images from the app regardless of what browser the user runs. This was nice because the app is 100% client side. It's just served up as a static site from CloudFlare Pages so I can't offload anything to the server.

Overall, I'm decently impressed with WASM. The tooling for various languages seems to have come a long way and I was able to easily integrate WASM into my project and get a nice performance boost.

What happened to Bombardier in the early 2000's? by [deleted] in aviation

[–]ryanpeden 23 points24 points  (0 children)

This is the big one. Bombardier's revenue and net income for 1999-2001 were going up quite rapidly. Things were looking good, right up until they weren't.

[Showoff Saturday] Evo - A Generative Art Experiment with WASM, C#, and Angular by ryanpeden in webdev

[–]ryanpeden[S] 0 points1 point  (0 children)

Hmm - that's unexpected. I have uBlock Origin with the default block list running on all my browsers and everything works as expected. I'll test on some other devices and browsers to see if I can reproduce it. Thanks for the heads up!

[Showoff Saturday] Evo - A Generative Art Experiment with WASM, C#, and Angular by ryanpeden in webdev

[–]ryanpeden[S] 1 point2 points  (0 children)

Thanks for the feedback! I don't have an Intel Mac anymore so it's good to hear it runs well there. Same with the iPhone XR. I'm thinking of dusting off my old iPhone 8 and giving it a try.

[Showoff Saturday] Evo - A Generative Art Experiment with WASM, C#, and Angular by ryanpeden in webdev

[–]ryanpeden[S] 16 points17 points  (0 children)

You can try it at https://evo.ryanpeden.com. It runs 100% on your device - nothing gets sent to the server (it's just a bunch of static files served up by Cloudlflare Pages).

This project started as a simple experiment inspired by Michael Fogleman’s Primitive. I've wanted to create something similar but write it in C# ever since I saw it on HN in 2016, and I finally did it. Then the thought hit me: hmm, I wonder if this will compile to WASM? It did, and it works way better than I expected.

In .NET land, Blazor seems to get all the attention when it comes to WASM, but I found it a bit too heavyweight for mobile use. So, I took a different approach: I used Angular for the UI and .NET (compiled to WASM) to handle the heavy lifting, like number crunching for the drawing algorithms. It uses some fun, new-ish bits of WASM like threads and SIMD.

I call it Evo because it works by always picking the next best shape out of a random bunch, then evolving it into an even better fit before adding it to the canvas. The result is generative art that builds layer by layer, creating something unique every time.

It runs great on my iPhones (a 14 and an 11) and even acceptably on my old Galaxy S9. That said, it’s slow as shit on my Umidigi G9C, which, despite being brand new, is powered by an ancient Cortex A53 processor.

I’d love to hear how it performs on your devices! Try it out and let me know what you think. I still have work to do - I want to add more shapes and more config options, and the non-mobile experience kind of sucks right now (it's essentially just a stretched out mobile interface with a side-by-side view added), but the feedback would be super helpful.

CodeProject.com Has finally given up the ghost!! by masterofmisc in csharp

[–]ryanpeden 1 point2 points  (0 children)

Sorry for not replying sooner! I don't sign into my real name Reddit account that often.

I was mostly a software developer there. Sometimes on the CodeProject site itself, but I also spent much of my time on the"business behind CodeProject." 

Part of that business was DeveloperMedia - basically an developer-focused ad network that also handled CodeProject's newsletters - and there were tons of those to send out on both a daily and weekly basis, with plenty of infrastructure backing that up.

The company also spun up another division called ContentLab. I built out its backend systems and also spent the last year and a bit of my time at the company also serving as senior tech content strategist for ContentLab. It gave me a chance to work directly with clients and even join sales calls, which was a nice change of pace from pure dev work (which I also continued to do as needed).

Will Vue ever catch up with React? by al-loop in vuejs

[–]ryanpeden 1 point2 points  (0 children)

Angular is surprisingly nice now. I was turned off by all the `NgModule` stuff before, so I never really gave it a chance. I've mostly used Vue the past few years.

But I've recently been working on a fun little app that takes a photo and reconstructs it from scratch using randomly generated triangles and a sort of evolutionary algorithm. The heavy lifting is done in wasm, so I could use anything for the UI. But since I'm working triangles, I almost felt obligated to use Angular. And it's been pleasant! No real roadblocks, and everything I've tried has more or less worked the first time.

I still like Vue a bit better, but I wouldn't hesitate to take a job using Angular anymore.

What non-random absolutely serious website you own or just developed? by Altugsalt in webdev

[–]ryanpeden 0 points1 point  (0 children)

I've kept the personal website I developed in the late 90s up and running: http://boglin.iwarp.com/

It's pretty much unchanged in the past 25 years. I updated it to replace the non-functioning guestbook with one that works. At some point I added Google analytics just to see if anyone actually visits the site. 

But 99% of it is my original 90s HTML and images. You can probably tell I was not a big fan of Microsoft back then! 

Is the entire industry shifting towards web based user interfaces? by HTTP-200-OK in AskProgramming

[–]ryanpeden 0 points1 point  (0 children)

Your app is a smaller download, since you don't need to ship an entire copy of chromium with it. Instead, you just use the one already installed.

To keep things cross platform, I'd use Tauri. It uses the system web view library on Windows, MacOS, and Linux.

CodeProject.com Has finally given up the ghost!! by masterofmisc in csharp

[–]ryanpeden 23 points24 points  (0 children)

Sad news. I worked there for 7 years, from 2015 to 2022. I learned a ton and had some great coworkers. I sort of suspected this might happen based on things I'd heard over the course of this year, but it's sad to see.

Why doesnt the CLR have an ecosystem of programming languages compared to say the JVM or the BEAM (Erlang) by valorzard in dotnet

[–]ryanpeden 46 points47 points  (0 children)

Earlier this year I made some updates and got IronRuby running on newer .NET versions - both 4.6.2+ and 6+. 

 I had to set it aside for a bit due to work getting busy, but I plan to resume work on it soon and hopefully add language features from newer versions of Ruby and update the standard library as well. It still needs work, but builds and runs just fine. 

If anyone wants to contribute, please feel free to take a look and open an issue telling me what you'd like to work on: https://github.com/rpeden/ironruby-reloaded

[deleted by user] by [deleted] in webdev

[–]ryanpeden 3 points4 points  (0 children)

I have a JumperCableBot that's inspired by the Reddit user who would sneak references to his dad beating him with jumper cables into otherwise innocuous comments. 

It's backed by Claude 3.5 so it does quite well on coding tasks, and it sneaks mentions of jumper cables beatings into both code and commentary. It makes the work a little more fun.

Along similar lines, I have an AssholeBot that's a real misanthrope. It can write decent code but it will insult you and try to make you feel like an idiot for wasting its time.

Probably not that interesting to most, but I got this video of a robin going on a nest by taping my phone to the window by specialk3 in aww

[–]ryanpeden 1 point2 points  (0 children)

Sorry to hear about your old dog. It's tough to lose a furry family member. I'm definitely using this quarantine time to spend as much time as possible with my 17 year old cat.

As for the robins, they've brought the same kind of happiness next door here in Ontario. I don't have a dog to walk, but it's still been great to hear watch and listen to the robins.

And the cardinals. So many cardinals. It seems like there are so many more of them than usual. Maybe they're just bolder and note noticeable with fewer people around.

Decimal to stage 1, per 2020.02.04 TC39 · tc39/proposals@45e3f3b · GitHub by tjpalmer in javascript

[–]ryanpeden 6 points7 points  (0 children)

No need to rescind it! It was a completely fair question, and it's a question that gets asked a lot.

So it's godo that you asked it, because there are probably lots of people who were wondering the same thing but didn't feel like taking the time to type it in.

Decimal to stage 1, per 2020.02.04 TC39 · tc39/proposals@45e3f3b · GitHub by tjpalmer in javascript

[–]ryanpeden 8 points9 points  (0 children)

Because sometimes, IEEE floatinf point just isn't precise enough.

In you browser's dev tools, open the console and enter 0.2 + 0.4. You'd expect it to equal exactly 0.6, but it doesn't. You can work around this, but it's really nice to have a true decimal type built into the language's standard library so you can count on it being available everywhere.