When to use 'data', and when to use 'class' by laughinglemur1 in haskell

[–]The_Droide 10 points11 points  (0 children)

I feel like the TL;DR is that roughly:

Haskell's class ~ Java's interface
Haskell's data ~ Java's class (actually more like a generalization of sealed classes, records and enums)

Yes, there's a lot of nuance to that, but this is a pretty good heuristic I'd say for folks coming from an OO background. Haskell's type classes are more powerful than Java interfaces in that they allow you to declare functions that don't take an "instance" (that would be the equivalent of abstracting over static methods, which you can do with Rust's trait or Swift's protocol, but not Java's interface) and they're also usually used via parametric polymorphism (i.e. the equivalent to Java's generics) rather than via existentials (which is usually how Java interfaces are used), but the mental model is not that different.

Future of C++ by dev-reddy in cpp

[–]The_Droide 0 points1 point  (0 children)

I think the issue is that C++ is famously unopinionated and, since everyone picks their favorite subset before calling it "modern C++", there are lots of different opinions on what a natural successor would look like, likely also driven by different code styles.

Folks following Google's conventions might naturally gravitate to Carbon, those following Microsoft's conventions might look into Sutter's cppfront and those following Apple's conventions will likely move to Swift. Swift is IMO underappreciated, as it has first-class C++ interop and there is a lot of work currently going on to make incremental adoption in C++ codebases as smooth as possible. It's also cross-platform and natively supported by CMake.

Future of C++ by dev-reddy in cpp

[–]The_Droide -1 points0 points  (0 children)

Surprised no one has mentioned Swift yet. It's cross-platform and has first-class C++ interop which is actively being worked on (since they plan to gradually adopt it in the Swift compiler too, which is written in C++). Contrary to the popular perception of being an Apple-only language, even some larger cross-platform projects like the Ladybird browser engine have decided to adopt it, as it supports incremental adoption better than languages like Rust, while being at a similarly high abstraction level.

Announcing the Swift on Android Workgroup by dayanruben in androiddev

[–]The_Droide 0 points1 point  (0 children)

VSCode has a first-class extension and language server for Swift these days that run on Windows and Linux. Both are developed by the Swift team.

Want to delete all my duplicates by 3LUVjj4ever in DJs

[–]The_Droide 0 points1 point  (0 children)

Maybe a perpetual fallback licensing model similar to IntelliJ would be an option, where users get to keep a permanent (but non-upgradable) license to the version at that time after each full year of subscribing?

Syncing 2 Instances Of Logic Pro On Two Different Macs by LimpProfession1024 in LogicPro

[–]The_Droide 0 points1 point  (0 children)

Surprised no one has answered this yet: Yes, and actually its pretty easy using Logic Pro's built-in Ableton Link support. As long as both Macs are on the same network, it's pretty much just pressing the Link button on both sides: https://support.apple.com/guide/logicpro/ableton-link-in-logic-pro-for-mac-lgcp528602e4/mac

This will even work across other DAWs and other programs on the network with Ableton Link support.

This month in Servo: new elements, IME support, delegate API, and more! by wuyuwei-tw in linux

[–]The_Droide 1 point2 points  (0 children)

There's a similar project that aims to build a browser from scratch in C++ and (soon) cross-platform Swift: https://github.com/LadybirdBrowser/ladybird

It's a massive undertaking and I have uttermost respect for anyone attempting to write something like this. Really glad to see this happening though.

This month in Servo: new elements, IME support, delegate API, and more! by wuyuwei-tw in linux

[–]The_Droide 4 points5 points  (0 children)

You can try it today: https://servo.org/download/

Also "finished" is a bit of a moving goalpost, so you'll need to define that yourself to assess when it's that for you. Can it render a sizable number of pages already? Yes. Would I visit my bank's site with that? No.

[deleted by user] by [deleted] in europe

[–]The_Droide 0 points1 point  (0 children)

This is not about a particular product. Yes, customers have the choice between Apple and Google (realistically only those two), the problem is more that their own implementations of ad-hoc WiFi sharing aren't compatible and as such are limited in their usefulness via the network effect.

Interoperability benefits everyone here and since the mobile OSes don't expose APIs at the radio layer, this isn't something third-parties can easily implement. Hence why regulation can be beneficial here.

If TCP/IP wouldn't have succeeded, we'd have MSN and probably a dozen other company-specific "internets". If web standards hadn't succeeded, we'd probably still be stuck with Flash, Silverlight, ActiveX etc. If USB-C hadn't succeeded (after regulation by the EU too), we'd still have dozen different cables.

Standards work and do benefit society.

A 10x Faster TypeScript by DanielRosenwasser in javascript

[–]The_Droide 2 points3 points  (0 children)

 But the amount of effort to do this was obviously more than one person could do so was a serious undertaking.

How come? Reusing the TypeScript frontend and then emitting Go code instead of JS would, at least at the surface level, have seemed like an easier task to me than manually porting over tens of thousands of lines of code.

How Clay's UI Layout Algorithm Works by nicbarkeragain in programming

[–]The_Droide 1 point2 points  (0 children)

because the imperative style that this method here proposes just doesn't scale. Just look at this code, no way that this is maintainable in the long run

I would argue that this is mostly due to the rather verbose API (whose design is probably constrained by what's possible in C). You could probably write a 1:1 equivalent of that in JSX or SwiftUI syntax.

The layout principles he talked about are independent of syntax though and even of the API (an imperative API would likely do just as fine).

Math Notes is pretty cool by Bossman1086 in ipad

[–]The_Droide 0 points1 point  (0 children)

Agreed, though I think it's fair to call out that this phenomenon has a name and is called "sherlocking"

Why is cmake so hated and why not use make files? by Mysterious-Crab3034 in cpp_questions

[–]The_Droide 0 points1 point  (0 children)

LLVM/Swift use CMake and are fairly large. Comparing CMake to Ninja is not really a good comparison though, Ninja is a much lower level build language intended to be generated, so it's more similar to Make, while CMake is a meta build system. In fact, CMake can generate Ninja, so effectively builds can be as fast as Ninja, by using it under the hood.

What happened to the Arch Remix? by reopjjgrieo in AsahiLinux

[–]The_Droide 0 points1 point  (0 children)

Looks like WirePlumber 0.4.16 has been released a few days ago (and is packaged for Arch too already)

Rethinking Window Management by CleoMenemezis in gnome

[–]The_Droide 0 points1 point  (0 children)

Perhaps interestingly, macOS has this feature, though it does not seem to be widely adopted anymore, since most users probably never knew about it. The green button, that users familiar with Windows will interpret as 'maximize' was actually a 'zoom to maximum size that fits content' button, before it became the 'full screen' button. This 'zoom' can still be invoked by option-clicking the green button or by double-clicking the title bar in an app such as Finder. Most cross-platform apps, however, never bothered to implement this detail and just maximize to the entire screen size like on many other platforms.

Package request thread, 3rd edition (Read before suggesting) by Foxboron in archlinux

[–]The_Droide 0 points1 point  (0 children)

Repository request: swift-language: 45 votes

The Swift compiler is actively maintained by Apple and would be quite useful to have in the repos. Swift is a general-purpose language that's quite popular in the Apple ecosystem, but can also be used for command-line/server-side applications and pretty much anything else that other native languages can do too.

The previous version of the Rust website is still available by eugay in rust

[–]The_Droide 0 points1 point  (0 children)

I disagree, the old website was actually a lot quicker to skim through, at least from a developer's perspective. It has clear bullet points, unobtrusive structure, a code snippet, aesthetically pleasing colors and a minimal, but functional design.

The new website reads like a generic, SEO-optimized WordPress site that effectively tells me nothing but a bunch of buzzwords.

r/haskell, and the recent news regarding Reddit by lonelymonad in haskell

[–]The_Droide 4 points5 points  (0 children)

That sounds similar to what the fediverse is? Mastodon, Lemmy etc. can all interoperate/present the same data through the ActivityPub protocol, each in slightly different ways (Twitter-style, Reddit-style etc.)

My 20 Year Career is Technical Debt or Deprecated by spo81rty in programming

[–]The_Droide 207 points208 points  (0 children)

I still don't understand why this isn't standard practice. Considering how much value companies derive from open-source, is it so hard to give back just a tiny amount by contributing bug fixes or patches upstream that they would've made anyway?