News for hackers. Stuff that matters.
Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @03:43AM (#28521560)
It is almost forgotten now, but the platform which carried Java to critical mass was the browser. Java successfully pivoted to server-side, but initially it was considered a client-side language.

C++ was the preferred application development language on Windows.

Python is popular because of the numeric and ML ecosystem.

Re:Functional programming is not popular because it is weird... by tragomaskhalos on Tuesday September 14, 2021 @03:54AM (#28521632)
I would say that in the enterprise software world Java was an irrelevant toy before the pivot to server side. At that point though, whoosh stratosphere
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:17AM (#28521764)
I'm not sure that's quite right. I feel like there was a decent span of time where many desktop apps were written in Java (with AWT or Swing), particularly enterprise apps where you valued development speed and ease of deployment more than a slick UI or high performance.
Re:Functional programming is not popular because it is weird... by mannschott on Tuesday September 14, 2021 @03:19PM (#28529642)
My $JOB is maintaining such a desktop CRUD app that's been in use for the past 20 years. It uses a Swing (via a proprietary higher-level framework) for its GUI. Over the years it's accreted a few dozen services (also in Java) in its orbit, but the central GUI app and its data-base still remain and continue to be extended as new requirements arise.
Re:Functional programming is not popular because it is weird... by SergeAx on Tuesday September 14, 2021 @06:45AM (#28522741)
Python is popular because their teach it in US schools and colleges as a next best thing after BASIC int terms of ease. During ML uprise Python became a common denominator between mostly US-based scholars.
Re:Functional programming is not popular because it is weird... by thaumasiotes on Tuesday September 14, 2021 @05:11AM (#28522110)
> It is almost forgotten now, but the platform which carried Java to critical mass was the browser.

I'm still confused by the cycle of

- You can run Java applets in a web browser!

- Ew. Time to stop doing that.

- I've had a brilliant idea! We need a bytecode-based VM in the browser so a web page can run arbitrary code.

- I'll call it "WebAssembly".

Re:Functional programming is not popular because it is weird... by TeMPOraL on Tuesday September 14, 2021 @05:35AM (#28522277)
Other than security, the other bad thing about applets was that they were very slow to start, and required a Java runtime that did not come bundled with the browser - you had to download an installer for it manually, install it, and then the thing was constantly nagging you about updates (and, IIRC, the updating agent or whatever it was that sat in my tray noticeably degraded the machine's performance even if nothing was using JRE).
Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:34AM (#28524545)
Here:

- You can run Java applets in a web browser!

-> Yeah, so? There are all crap, slow to start, big on resource bloat, slow to draw, and don't offer much).

-> Ew. Time to stop doing that.

Then 15+ years passed, during which JS became the dominant way to build CRUD/Enterprise/form-based/and more apps, got big features (from WebRTC to an embedded DB, and from accelerated canvas and 2D graphics to MIDI). And it even hit big on the server too.

Then: - I've had a brilliant idea! We need a bytecode-based VM in the browser so a web page can run arbitrary code.

WebAssembly, is faster than Java Applets was back then, has easier ties to the DOM for UI (as opposed to being a sandbox), can be used to supplement conventionally written web apps, and is not tied to a single company.

So, quite a lot of differences due to time, and also in the characteristics of the technologies involved.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @01:51AM (#28535705)
Well, it’s not hard being faster than 20 years old tech. Also, webassembly still doesn’t have proper bindings to the DOM (and seriously, at the time we could be happy that a static DOM could be displayed), and java is one of the very few languages that actually has a proper specification allowing independent implementations, and it is not just saying that “the spec is whatever code we write”.

So these comparisons frankly make no sense as every such shortcoming could have been easily fixed in 20 years.

Re:Functional programming is not popular because it is weird... by coldtea on Wednesday September 15, 2021 @03:52AM (#28536433)
>Well, it’s not hard being faster than 20 years old tech.

Yes, but it was even more hard to make Java applets run with any acceptable speed in 1997, which is what mattered for their deprecation. Understadingly people didn't just say "let's suffer them for 10 years until the hardware catches up to make them tolerable".

>Also, webassembly still doesn’t have proper bindings to the DOM

Yes, but still better than what applets had :-)

>So these comparisons frankly make no sense as every such shortcoming could have been easily fixed in 20 years.

It would make even less sense for people in 1997-1999 to stick with applets because "such shortcomings will be easily fixed in 20 years". People use what works now, or at least offers a serious advantage despite the shortcomings. Java applets then didn't offer much.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @04:12AM (#28536549)
> Understadingly people didn't just say "let's suffer them for 10 years until the hardware catches up to make them tolerable".

It’s funny because that is essentially what happened. Other than flash (which suffered essentially from the same shortcomings as applets, but at least had a productive environment to create them), there was nothing that replaced these technologies for many years to come. Canvas rendering came much later and only with much more recent browsers did it have acceptable performance. It is not accident that many people long for the old web which was strangely more interactive in some cases than what we have today.

Don’t get me wrong, java applets were shitty. But we sort of threw it all away instead of fixing it, which in hindsight seems to have been an easier road (since the JVM has always been the state of the art runtime, and JS engines had to catch up from zero). DOM integration into an object oriented language would have been much easier than what webassembly does through JS bindings, and lack of security was frankly more of a mindset back then, and the jvm could have been sandboxed just as “easily”* as js engines are.

* it is a hard thing to do, but it happened to JS engines because the money was there. Integrating the JVM with proper sandboxing would have required less money/energy.

Re:Functional programming is not popular because it is weird... by 1f60c on Tuesday September 14, 2021 @05:25AM (#28522210)
Correct me if I'm wrong, but I think the problem with applets was that they were too powerful and it took eons for vulnerabilities to be fixed.
Re:Functional programming is not popular because it is weird... by goto11 on Wednesday September 15, 2021 @04:11AM (#28536543)
The problem with Java applets was not the use of bytecode or a VM. The problem was that it was slow to start so you looked at a grey rectangle for a long time before anything happened. Flash was much snappier, which is why it won out over Java. Flash also had better development tools targeted multimedia and games.
Re:Functional programming is not popular because it is weird... by malft on Tuesday September 14, 2021 @08:30AM (#28523722)
Java has all the security logic INSIDE THE VM.

That's the big difference.

Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:26AM (#28522215)
- Now you can go back to run Java applets in a web browser!
Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:28AM (#28524468)
>It is almost forgotten now, but the platform which carried Java to critical mass was the browser

I think that's backwards. I was there. Aside from a few e.g. banking and government applets one was forced to use and a couple of exceptions, applets never got anywhere and died fast.

Enterprise Java became what Java is all about very very soon. Java landed in 1996. Servlets/Tomcat landed in 1998.

By 2000 there was plenty of enterprise Java development - in fact that was the year MS created its own Java copy, in the form of C#/.NET after having tried to extend their version of Java for the Windows platform.

Re:Functional programming is not popular because it is weird... by Izkata on Tuesday September 14, 2021 @10:07AM (#28525037)
Back when Flash was called Shockwave, it was competing with Java applets for browser games. It did lose, but it was out there.
Re:Functional programming is not popular because it is weird... by NoSorryCannot on Tuesday September 14, 2021 @12:45PM (#28527399)
Minor nit, Shockwave wasn't the same as Flash. All three plus ActiveX overlapped in their time on the market, which is hair-raising to think about.
Re:Functional programming is not popular because it is weird... by Izkata on Tuesday September 14, 2021 @12:56PM (#28527544)
Was Shockwave a platform for Flash then, or something?

I don't know any technical details here, but from a user perspective Shockwave did turn into Flash. The Flash file extension "swf" even stands for "ShockWave Flash".

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @02:05PM (#28528450)
It was two separate products with separate origins. Macromedia had Shockwave and then they purchased Flash (which was called Splash then) and branded it Shockwave Flash.

Shockwave was somewhat similar to Flash, but it was developed for the "multimedia" CD-ROM's, which meant the files was generally too big for online. Flash was much more compact which is why it won out.

Re:Functional programming is not popular because it is weird... by native_samples on Wednesday September 15, 2021 @06:48AM (#28537506)
Shockwave = plugin for playing Macromedia Director content. Director was a GUI builder for interactive multimedia apps which were programmed in a custom language called Lingo.

Flash was originally called FutureSplash, if I recall correctly. When Macromedia bought it they rebranded it to fit their general branding theme, hence the confusion. Flash wasn't really intended to be an app platform, it started out as a vector animation format, but later they added scripting using a dialect of JavaScript called ActionScript.

Most users ended up with the Flash plugin but not the Shockwave plugin. Macromedia Director was huge in its day - my first programming job involved writing Lingo - but it died out pretty quick when the internet started taking off.

Re:Functional programming is not popular because it is weird... by CRConrad on Wednesday September 15, 2021 @07:26PM (#28545796)
> Flash was originally called FutureSplash

So had the renaming taken place now in stead of twenty years ago, it would be called F7lash in stead of just Flash.

Re:Functional programming is not popular because it is weird... by detaro on Tuesday September 14, 2021 @12:58PM (#28527573)
Shockwave was Flash's larger brother, feature wise. Shockwave stuff could contain Flash files, but Shockwave could do things Flash couldn't, or could do them earlier. (And if I remember correctly Shockwave came first, and when Macromedia aquired it they then build Flash)
Re:Functional programming is not popular because it is weird... by selfhoster11 on Wednesday September 15, 2021 @04:13AM (#28536561)
Notably, Linux support for Shockwave was missing.
Re:Functional programming is not popular because it is weird... by foota on Tuesday September 14, 2021 @04:03AM (#28521682)
I don't think ML was what it is today when python started.
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:13AM (#28521742)
Right, definitely not.

From my perspective, Python became popular as the simplest and friendliest general scripting language along the lines of Perl or TCL, and the easiest for somebody familiar with other languages like C or Java to pick up.

If I wanted to do something just a bit too fiddly for a shell script, I'd reach for Python (and still do, although I've recently started using Node too).

Perl initially became popular as the best text-wrangling language for CGI scripts and the like, but (I think) was a bit too weird to be a general-purpose hit for the masses like Python. Likewise Tcl/Tk was great for whipping up quick UIs, but both parts seemed a little too weird to stand on their own.

Ruby was another strong contender; I think Python was already too well-established to be displaced by Ruby, but Ruby found its audience via Rails (which I'm guessing is better than Django).

Re:Functional programming is not popular because it is weird... by somejan on Tuesday September 14, 2021 @05:18AM (#28522162)
Rails was the first of that type of web framework. Django and all similar frameworks are Rails clones. At that time Rails was the killer app for Ruby. Unfortunately for Ruby the other languages were willing to put in the effort to copy it, and Rails is no longer a unique advantage.
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @07:42AM (#28523210)
Django and all similar frameworks are Rails clones.

Hmm, are you sure? I’m not saying you’re wrong, because I’m not sure myself! I heard of Django before I ever heard of Rails but that doesn’t mean much.

Wikipedia suggests they were released at around the same time -- Django started slightly earlier, Rails open sourced earlier.

Re:Functional programming is not popular because it is weird... by crucialfelix on Tuesday September 14, 2021 @08:47AM (#28523908)
Zope was the leader in python long before Django or rails. Since 1999

ColdFusion and JSP and PHP were dominant for a long time before Rails as well.

Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @05:40PM (#28531754)
Aha, yes, I was getting mixed up between Zope and Django!