News for hackers. Stuff that matters.
Re:PyScript: An open source platform for Python in the browser by SillyUsername on Friday August 16, 2024 @08:19AM (#41265667)
Someone just invented a whole new level of hell for devs who maintain code.

First it was untrained consultants and VB or Delphi (Pascal)

Then came the JS monkeys mixing up plain JS with jQuery and SQL injections.

Now it's time for data scientists and pi/sketch users to feel the pain of an uncharted domain...

Re:PyScript: An open source platform for Python in the browser by pdntspa on Friday August 16, 2024 @12:19PM (#41267748)
Everyday We Stray Further From God
Re:PyScript: An open source platform for Python in the browser by v3ss0n on Friday August 16, 2024 @10:21AM (#41266702)
Thats what I am thinking too. Integrating code of DS/ML people into backend is painful enonugh. Imagine maintaining frontend code of those who had never done proper forntend development...
Re:PyScript: An open source platform for Python in the browser by bob020202 on Friday August 16, 2024 @04:55PM (#41270330)
If it's not something that needs extensive testing, I'd rather maintain that codebase than a "proper" one. Data science people don't pump out 100 files with 20 layers of OOP, and they don't know how to use Redux or whatever overkill navigation lib. It'll be a main.py that just does what you want. Maybe there will be copy-pasted code, but even that can be more readable sometimes.
Re:PyScript: An open source platform for Python in the browser by v3ss0n on Saturday August 17, 2024 @02:57AM (#41272522)
You are right about over engineered redux and react, It would be a lot less painful to maintain main.py and a lot more grepable
Re:PyScript: An open source platform for Python in the browser by micahdeath on Friday August 16, 2024 @08:41AM (#41265866)
If you could write VB (VB6) in WASM, that would make some things so much simpler!!! (I work on a legacy codebase)
Re:PyScript: An open source platform for Python in the browser by v3ss0n on Friday August 16, 2024 @10:23AM (#41266718)
Thats mean you want to embed VB code into Browser Like in ActiveX days?
Re:PyScript: An open source platform for Python in the browser by pjmlp on Friday August 16, 2024 @01:45PM (#41268594)
Actually I think Blazor might support class libraries written in VB.NET.
Re:PyScript: An open source platform for Python in the browser by micahdeath on Friday August 16, 2024 @05:06PM (#41270418)
They do and it appears to work really well (I have only experimented with it.)
Re:PyScript: An open source platform for Python in the browser by micahdeath on Friday August 16, 2024 @05:05PM (#41270409)
Isn't it the same thing as a SPA or any other WASM? The only real difference now is that it is now accepted and the browsers assist with cross platform APIs (and some security) instead of pure Windows APIs. (Ok, so I made it a bit more simple than it is, but that is how I see it.)
Re:PyScript: An open source platform for Python in the browser by nazgulsenpai on Friday August 16, 2024 @02:06PM (#41268779)
Oh man that would be so cool. Kinda like the Ruffle Flash player!
Re:PyScript: An open source platform for Python in the browser by pwang on Friday August 16, 2024 @05:01PM (#41270382)
Anaconda Code is what you're looking for! It's Python (via PyScript) running as an Excel plug-in, that has full access to the spreadsheet and can harness a big part of the core PyData stack (including matplotlib, sklearn, pandas, etc.)

The whole thing runs via PyScript/WASM, and lives locally inside the Excel spreadsheet. https://www.anaconda.com/blog/introducing-anaconda-code-add-...

Re:PyScript: An open source platform for Python in the browser by anakaine on Friday August 16, 2024 @08:18PM (#41271465)
Please don't tell people I work with about this.
Re:PyScript: An open source platform for Python in the browser by sitkack on Friday August 16, 2024 @05:21PM (#41270513)
Arguably, VB6 and Ruby have a pretty similar syntax. And Wasm is first class in the Ruby build farm. https://github.com/ruby/ruby.wasm
Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Friday August 16, 2024 @11:42AM (#41267364)
Honestly, WebAssembly with C#'s Blazor is the best development experience I've ever had. I can fully debug the front-end and back-end within Visual Studio.
Re:PyScript: An open source platform for Python in the browser by maleldil on Friday August 16, 2024 @12:36PM (#41267914)
But then you have to use Visual Studio.
Re:PyScript: An open source platform for Python in the browser by camdenreslink on Friday August 16, 2024 @12:57PM (#41268156)
Visual Studio is really good if you are doing C# development on Windows.
Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Friday August 16, 2024 @01:26PM (#41268411)
MonoDevelop was also really nice. So much so, it looks like they copied it into Visual Studio for Mac???[0]

In any regard, C# has some of the richest tooling I've seen for any programming language, I do wish Microsoft would invest even marginally into MonoDevelop again.

[0]: https://www.monodevelop.com/

Re:PyScript: An open source platform for Python in the browser by neonsunset on Friday August 16, 2024 @02:13PM (#41268842)
VS4Mac is MonoDevelop. Well, it was - VS4Mac is dead now as it has been stagnating, and at the end of its life was likely more harmful to .NET adoption by developers using macOS.

Its niche is now replaced by VS Code, particularly after base C# extension switched to Roslyn LSP from Omnisharp, and, of course, Rider which has been a strong cross-platform offering for a long time.

With that said, I heard only positive things about MonoDevelop back in the day and my impression from the feedback is that it was something its authors really put care into. I suppose it is part of history now.

On Blazor - both Rider and VS Code support it. Contrary to the belief of slowly but surely diminishing group of developers that think .NET is still stuck in Windows land, there is nothing that ties you to Windows here.

Re:PyScript: An open source platform for Python in the browser by pjmlp on Friday August 16, 2024 @04:56PM (#41270339)
Not really.

The original VS4Mac was Mono Develop.

Afterwards the team started to share code between Visual Studio and VS4Mac, written in .NET Standard libraries, until they started the full rewrite, using .NET Core proper with Cocoa bindings, as the team did not consider MAUI with Catalyst mature enough for the rewrite.

Only to have the project cancelled and replaced by our Electron shell friend, after they reached the 1.0 of the rewrite efforts.

Which still doesn't have the graphical tooling and storyboards integration from VS4Mac.

Most folks are rather adopting Rider.

Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Tuesday August 20, 2024 @08:47AM (#41299581)
> Afterwards the team started to share code between Visual Studio and VS4Mac, written in .NET Standard libraries, until they started the full rewrite, using .NET Core proper with Cocoa bindings, as the team did not consider MAUI with Catalyst mature enough for the rewrite.

Do you have a source for this? I really love these historical dev tidbits. Would love to read some of the talks on it.

My understanding was that ultimately they used C++ code from the original VS itself for the new VS4Mac eventually.

Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Friday August 16, 2024 @01:24PM (#41268400)
One of the best IDE's I've ever used. JetBrains IDE's come close, but Visual Studio is a gem.
Re:PyScript: An open source platform for Python in the browser by noworriesnate on Friday August 16, 2024 @01:56PM (#41268684)
Visual Studio is nice but I vastly prefer Rider, even on Windows. It feels bit snappier, especially when you're comparing Visual Studio + Resharper versus Rider. TBH this is probably a matter of what is familiar though.
Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Friday August 16, 2024 @02:33PM (#41269042)
I use Rider on other platforms.
Re:PyScript: An open source platform for Python in the browser by maleldil on Friday August 16, 2024 @01:46PM (#41268609)
IMO, it's somewhat polarising. Some people love it, but I personally can't stand it. It feels too heavy, trying to dominate every aspect of writing code. I prefer lightweight editors, but I recognise it's a personal thing.
Re:PyScript: An open source platform for Python in the browser by anakaine on Friday August 16, 2024 @08:20PM (#41271472)
Its totally a personal thing. I feel VS Code is the right combination of light weight, light touch, and keeps my focus where I need it whilst still having the ability to get to helpers that make life easier.
Re:PyScript: An open source platform for Python in the browser by pjmlp on Friday August 16, 2024 @01:46PM (#41268600)
The 2nd coming of Web Forms, or Silverlight, take your pick.
Re:PyScript: An open source platform for Python in the browser by giancarlostoro on Friday August 16, 2024 @02:32PM (#41269038)
In the case of WASM though, does it really matter? Ideally I want to see other languages do the same thing.
Re:PyScript: An open source platform for Python in the browser by pjmlp on Friday August 16, 2024 @02:36PM (#41269084)
It matters when debugging pile of WASM code, and the performance loss switching back and forth to JavaScript engine.

The very reason I haven't bothered that much with Blazor, are my debugging scars from Web Forms and JSF.

Given the choice, I will go with stuff that works directly with script tags and the built-in developer tools.

Re:PyScript: An open source platform for Python in the browser by bouncing on Friday August 16, 2024 @02:49PM (#41269217)
I'm curious what widgets/frontend tooling you use.

This is, I assume, Visual Studio for Windows. Have you tried it at all in VS Code or is that a non-starter?