Ramin_HAL9001

joined 3 years ago
[–] Ramin_HAL9001@lemmy.ml 14 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I'm a communist but I suddenly realised that American conservatives should all be hardcore Linux enthusiasts. Why is this not already the stereotype?

Libertarians and conservatives in the US demand liberty only for the already wealthy and powerful upper class, the liberty to enslave and exploit whomever and whatever they choose. They believe the ultra-wealthy have somehow earned the right to do so. On the contrary, the socialists, especially the anarchists, are opposed to unjust hierarchies, and the hierarchy created by wealthy and politically powerful classes are the most unjust of all -- quite the opposite of the libertarians and conservatives.

Libertarian (Liberal) propaganda appropriates the more popular socialist ideologies while conflating liberty for only the wealthy/powerful versus liberty for all people. One can see appropriation done in the same way in the very name of the National Socialist (Nazi) party of Germany. These tactics that were used by the Nazis are still used by various American conservative and libertarian parties, who mostly align under the umbrella of the Republican Party. Just look at what the Trump cult weirdos are all saying nowadays. It is pure KKK and Nazi ideology resurrected, under a thin veil of euphemisms.

So if you take at face-value what libertarian and conservative politicians in the US say publicly about freedom, small government, civil liberties, etc., then they ought to be very enthusiastically in favor of Linux, but it is all just propaganda. They don't care about freedom, only freedom for the elite clique of their supposed "supermen," the wealthy elites, the freedom to exploit groups of people who they hate most


take your pick: foreigners, black people, women, gay and trans, Jews, Muslims, the "woke," the "leftist," etc. The libertarians and conservatives hate things that benefit society at large, because what benefits society also benefits these people they hate.

Linux is pretty authentically a community project for the good of society, and it is truly subversive to the authority of the corporations and elites. So the various libertarians and conservatives of the US recognize Linux as a threat. Only that small group of privileged, middle-class libertarians stupid enough to be duped by the wealthy elite propaganda believe that free software is aligned with their ideology.

[–] Ramin_HAL9001@lemmy.ml 14 points 4 weeks ago (3 children)

What I want to know is, how much energy was used to create these floors, install them, and how much energy will be required to service them (the electronics) if they break down over the useful life of the installation, including how much energy was spent on resource extraction and processing.

Then I want to see that number compared as a ratio to the amount of energy these floors can generate over their expected useful life span, say 15 years in high pedestrian traffic areas.

I am highly skeptical that the ratio would even approach 1:1, I expect a net energy loss. But I could be convinced otherwise with some good data.

[–] Ramin_HAL9001@lemmy.ml 1 points 1 month ago* (last edited 1 month ago)

Adding Solar to More Devices

I never understood why this wasn’t more common already. ... Why not? Seems like an obvious solution…

Good question, with a simple engineering answer: often times the energy cost of creating these solar panels and installing them into devices is considerably higher than the amount of energy those devices could possibly except after many decades of constant use. The point in time at which the solar energy collected by the device matches the energy cost to create and install the device might actually be longer than the life of the solar panel or the device itself. So adding solar to every last little thing will actually cost a lot more money for consumers while causing more harm to the environment.

That is not to say that solar is always bad, in fact solar is incredibly good when used at industrial scales, especially in power stations, and on the rooftops of factories, parking lots, shopping centers, data centers, and warehouses.

We see too often on the news stories about how some amazing invention might help solve global warming, but this is often just propaganda. The oil and car companies want you to think buying more technology from these tech companies (which are often their own subsidiary companies) will solve the problem. But really it is just another way of profiting off of people, tricking them into buying their stuff rather than reducing consumption, reusing, and recycling, and without those companies doing any of the hard work on the energy transition themselves.

[–] Ramin_HAL9001@lemmy.ml 1 points 1 month ago (1 children)

both can be installed side by side if you have enough disk space.

Yeah, this is exactly what I do using QEMU and Aarch64 Debian. I suppose I could try the Asahi Linux in QEMU but that actually might be more difficult since I don't think QEMU can emulate the MacBook hardware, as far as I know. And I can't do dual boot, I want to be able to switch back and forth between Mac OS and Linux without rebooting anything.

[–] Ramin_HAL9001@lemmy.ml 1 points 1 month ago (3 children)

You can try asahi linux on the macbook :)

I could, but I still need Mac OS for work-related things.

[–] Ramin_HAL9001@lemmy.ml 5 points 1 month ago (5 children)

I switched to Linux permanently in 2008. Last OS I used before Linux was Mac OS X version 10.4 "Tiger" (if I recall correctly) which is what came with the Macintosh PowerBook that I had bought roughly in the year 2004. I have never used Microsoft software unless someone was paying me to, but at the time, Windows XP was still all the rage even though Microsoft was trying to get everyone to switch to Windows Vista. (Vista got a lot of well-deserved hate too, sort of similar what we see with Windows 11 right now, actually.)

Anyway, I was a die-hard Apple fanboy, but getting more and more into free software and I kept on using Macports/Homebrew to build Linux stuff I found online, but back in those days a lot of apps I wanted to try did not have good support for the Darwin kernel build of GCC which was pretty old compared to what Linux was using at the time. Occasionally a build would fail, and I would try to port the software on my own, with the idea of maybe submitting a package to Macports. But after a while I realized, "if I want to use Linux software, why not just use Linux?"

So I bought a Netbook (Dell Inspiron Mini 10) with Ubuntu pre-installed. I really loved that little computer, I used it for a good 5 years until I needed a more powerful computer. I still have it, actually. I never went back to Apple until this year when I took a new job where they wanted me to use a MacBook Pro. (Again, not using proprietary software unless I am well paid.)

I can say with confidence that Linux is considerably better than Apple's operating systems. I use Aarch64 Debian 12.5 in a QEMU on that MacBook for most things, only switching over to Mac OS when I really need to.

[–] Ramin_HAL9001@lemmy.ml 3 points 1 month ago (2 children)

How can you pirate Photoshop and Elements? They are WebAssembly binaries that phone home before you are allowed to use them.

[–] Ramin_HAL9001@lemmy.ml 4 points 1 month ago (2 children)

Never tried it, but everyone I know who has tried it says its the most stable rolling release OS ever. That is pretty cool. Btrfs support is cool too, copy-on-write, deduplication, and whole-disk snapshot and rollback capability, its great for keeping your data safe.

I don't care about rolling releases, I get my stability from Debian, or sometimes Mint. If I want the latest software I'll install Guix packages or FlatPaks. And I can still use Btrfs on Debian.

[–] Ramin_HAL9001@lemmy.ml 93 points 1 month ago* (last edited 1 month ago) (12 children)

I can explain the difference between X11 and Xorg with an analogy to the web and web browsers: X11 is like HTTP, Xorg is like the Chrome browser. X11 is the protocol, Xorg is software that implements that protocol.

X11 is old, it was designed back in the 1980s and includes messages for drawing lines and circles and fonts on the screen. Also, back then there were a lot of "thin clients", computers that were basically nothing but a browser, since graphics were computationally expensive and could not be done on the client computer, graphics rendering was done server side. There are lots of messages in the protocol for handling screen updates over a computer network.

Nowadays, all personal computers are powerful enough to render their own graphics, and no one needs the display server to draw individual lines or circles on screen. Vector graphics and fonts are done at the application level, not over the network. So these these messages specified in the X11 protocol are hardly ever used. Really, most of X11 (let's say 90% of it) is not used at all, only the parts where the keyboard and mouse are defined, and how you can allocate memory to buffer a graphic and copy that buffer to the display. But you still need to maintain the Xorg software to handle everything that X11 specifies, and this is just a waste of code, and a waste of time for the code maintainers.

So basically, they decided about 10-15 years ago that since no one uses most of X11, let's just define a new protocol (called Wayland) that only has the parts of X11 that everyone still uses, and get rid of the 90% of it that no one ever uses. Also, the protocol design takes into account the fact that most modern computers do all of their own rendering rather than calling out to a server to render for them. Also the Wayland protocol design takes into account that a lot of computers have graphics cards for accelerated graphics rendering.

Since the Wayland protocol is much simpler, it is easier for anyone to write their own software which implements the protocol, these software are called "compositors." Finally, 10 years after some of the first implementations of Wayland, the protocol and compositors are becoming mature enough that they can be used in ordinary consumer PCs.

 

Screen shots of my new Cinnamon Desktop environment on #Aarch64 #Debian 12.5.

I am really digging the combination of the "High Contrast" widget theme with the ordinary (non-high-contrast) icon and window decoration themes. I am using the "Mojave Light" window decoration theme from the Cinnamon theme repository, and the Adwaita default icon theme for all applications programmed using the Gtk framework. Fonts are all set to DejaVu Sans Mono.

[–] Ramin_HAL9001@lemmy.ml 1 points 2 months ago* (last edited 2 months ago) (1 children)

Emacs.

Emacs is an app platform in and of itself, and the vanilla installation comes with dozens of its own apps pre-installed. Like how web apps are all programmed in JavaScript, Emacs apps are all programmed in Lisp. All Emacs apps are scriptable and composable in Lisp. Unlike on the web, Emacs encourages you to script your apps to automate things yourself.

Emacs apps are all text based, so they all work equally well in both the GUI and the terminal.

Emacs comes with the following apps pre-installed:

  • a text editor for both prose and computer code
  • note taking and organizer called Org-mode (sort of like Obsidian, or Logseq)
  • a file browser and batch file renamer called Dired
  • a CLI console and terminal emulator
  • a terminal multiplexer (sort-of like "Tmux")
  • a process manager (sort-of like "Htop")
  • a simple HTML-only web browser
  • man-page and info page browser
  • a wrapper around the Grep and Find CLI tools
  • a wrapper around SSH called "Tramp"
  • e-mail client
  • IRC client
  • revion control system, including a Git porcelain called "Magit"
  • a "diff" tool
  • ASCII art drawing program
  • keystroke recorder and playback

Some apps that I install into Emacs include:

  • "Mastodon.el" Mastodon client
  • "Elfeed" RSS feed reader
  • "consult" app launcher (sort-of like "Dmenu")
[–] Ramin_HAL9001@lemmy.ml 1 points 4 months ago (1 children)

@Smorty@lemmy.blahaj.zone when humans have their basic needs all satisfied, and they feel secure and mostly content with life, they naturally become very creative and innovative.

Think about it: if you were not worried about paying rent every month, not worried about medical bills, not worried about where your next meal is coming from, and the job you did only require you work 6 huors a day 4 days a week, what would you do with your abundant free time? You might have kids and devote your life to them, and that is really helpful for perpetuating society. You might be happy to just play video games and watch TV and movies and maybe read fictional novels in all of your free time, and that would be totally OK too.

But a lot of people would get antsy, they would want to find tasks for themselves to perform. They may devote themselves to sport, and become the best players in the world. They may devote themselves to art, and without a free market to satisfy, without a business case to defend the art you make, the art you make would be truly free and likely very innovative. Even in engineering and science, in which some creativity is required to come up with innovative solutions to problems, if you don't have to worry about making things that are marketable, you just want to make things that you think are cool and useful for yourself, it may turn out to be useful for millions of other people.

[–] Ramin_HAL9001@lemmy.ml 0 points 4 months ago

Yes! Emacs has already taken over most of my desktop environment apps with the exception of the web browser and a few apps like Blender and Gimp. I haven't gone as far as you, getting each Emacs buffer to display in its own frame in is own WM-level window, but that would make for a more immersive experience. Also, your color scheme is similar to the one I use now. I love it.

I can't wait for the day when software written in Lisp takes over my window manager, then my panel, then my session manager, then my whole operating system kernel.

 

Another bit of gold from ICFP 2023 by Pjotr Prins of the University of Tennessee.

The actual title of the talk is "Why code in Python+C if you can code in Lisp+Zig?" but the "Lisp" in this case is actually Guile Scheme. I didn't know this, but Zig uses the C ABI so it binds to any language that can do FFI bindings to C, including most Scheme and Common Lisp implementations. But why don't I just post the abstract here:

"Most bioinformatics software today is written in Python and for performance C is used. Lisp has been around for over half a century and here I don’t have to tell how or why programming Lisp is great. I will talk about Zig as a minimalistic new language that is unapologetically focused on performance, tellingly with a blazingly fast compiler. It is advertised as a replacement for Thompson, Ritchie, and Kernighan’s C, but it may even replace C++ in places. Zig uses the C-ABI and does not do garbage collection, so it is ideal for binding against other languages. In this talk I will present combining GNU Guile Lisp with Zig. I’ll argue that everyone needs two languages: one for quick coding and one for performance. With Guile and Zig you get both at the same time and you won’t have to fight the Rust borrow checker either."

 

Note: this was originally a comment I wrote on Lemmy in answer to the question “what type of problems do you solve using Lisp?”. The post got to be a bit too long, and I am re-publishing it here as a proper blog post. I am also including some of a post I wrote on Mastodon which touched on some of these same issues.

So to answer the question: I have known about Common Lisp and Scheme for years, but only recently started using them. This is the story of the 3 Lisp dialects that I use.

Emacs Lisp

I use Emacs and Emacs Lisp to manage my tens of thousands of text files, I write Emacs Lisp scripts to automate simple tasks like searching for pieces of information, formatting it, and outputting it to a report that I might publish on my blog or send in an e-mail. I also use Emacs to help with data cleaning before running machine learning processes. Emacs helps with navigating CSV and JSON files, it also is a really good batch file renamer.

Scheme

I have recently started using Guile Scheme to do some personal projects. I went with Guile over the myriad other Scheme dialects because it is the implementation used for the Guix package manager and operating system.

  • Also, there the Goblins, which is a distributed object-capability programming system is officially supported on the Guile platform, and I have been really wanting to write applications using this programming style ever since I first learned about it.

  • Also, there is the G-Golf foreign interface layer allows Guile to automatically use an C library that implements the GObject Introspection interface. So through Guile, like with Python, you can use any C code library used to create of all native apps in the Gnome, MATE, Cinnamon, or (my personal favorite) the Xfce desktop environments. This potentially makes Guile a viable alternative to Python scripting across all of those Linux desktop environments.

Of all the Lisp dialects, Scheme is my favorite, for a few reasons:

  • It is absolutely tiny. Guile is relatively large (not as big as Common Lisp), but other implementations are unbelievably small. for example the Chez Scheme “petite” interpreter is fully compliant with the R5RS standard, and the executable is like 308 kilobytes on a 64-bit Linux computer system.

  • Hygienic macros with syntax-case

  • Recursive functions over using the loop macro of Common Lisp. When writing algorithms, I personally find it easier to reason about recursive functions than loops. Scheme also provides me the ease-of-mind that comes with knowing the optimizing Scheme compiler will ensure recursive loops will never overflow the stack.

  • Pattern matching is well supported by most Scheme implementation.

  • It is a "Lisp-1" system, meaning there is only one namespaces for variables and functions, as opposed to Common Lisp (a "Lisp-2 system") which allows a name to be either a variable, a function, or both. I personally find it easier to reason about higher-order functions in Lisp-1 systems.

  • Support for Delimited Continuations, which is a fairly recent discovery of computer language theory (first being discussed back in the 1990s), but is available across a few Scheme implementations.

Common Lisp

That said, I am also starting experimenting with Embedded Common Lisp (ECL) because it is a lightweight standards compliant Common Lisp implementation that compile your program into C++ code, and this is useful to my professional work.

The modern software industry, especially in the realm of big data and machine learning, has mostly settled on a pattern of using C++ for creating performance critical libraries, and creating Python binding to the C++ libraries for scripting. I was hoping languages like Haskell and/or Rust might come along and change all this, but it will take decades (if ever) for the software industry to turn in that direction.

The problem with Python, in my experience (and I believe many other software engineers would agree) is that it does not scale well to larger applications at all, whereas Common Lisp does. This is for various reasons, but mostly due to how Lisp does strong dynamic typing, and also the CLOS implementation of the meta-object protocol. Yet too many companies waste time writing large applications in Python — applications that are much larger than the scripting use cases that Python was originally intended to be used. I believe this is time and money better spent on other things.

So I see Common Lisp, and the ECL compiler, as a potentially viable alternative to the sub-optimal status quo of Python as a scripting layer around C++ code libraries, at least perhaps for my day job, if not being more generally true industry-wide. Mostly, ECL would allow me to write a program in Common Lisp instead of Python, but deliver to my clients the C++ code that ECL generates to be used in their machine learning projects. (I have not actually done this yet, I am still investigating whether this would be a viable solution to any of my projects).

ECL makes it easy to use C++ libraries through Lisp instead of Python. And there are so many good C++ libraries out there: Qt, OpenCV, Tensorflow, PyTorch, OpenSceneGraph, FreeCAD, Godot game engine, Blender. And it compiles easily on Linux/Unix (GCC), Windows (MSVC), and MacOS (via Clang++), so good for cross-platform development.

Conclusions

So in spite of Lisp being such an old family of languages (its earliest incarnations dating all the way back to 1958), and being superseded in popularity and widespread use by languages like Python and JavaScript across the software industry, Lisp is still a modern, relevant, evolving, and very useful family of programming languages. At the same time, a Lisp such as Scheme or Common Lisp would even be a better choice of programming language in many applications where Python is currently used.

I just hope I eventually find the time to try out all of these Common Lisp and Scheme related ideas I have. I especially hope ECL turns out to be a profitable technological choice for the professional work that I do. But only time will tell.

Please feel free to comment here, or on Mastodon

view more: next ›