@ramin_hal9001@emacs.ch
@ramin_hal9001@emacs.ch avatar

ramin_hal9001

@ramin_hal9001@emacs.ch

I'm just some kind of nerd: software developer, big fan of functional programming, especially Haskell and Scheme. I also love old Macintosh computers. Haskell programming since 2007, Linux user since 2008, Emacs user since 2018. Currently working as an app developer at a small machine learning consultancy. You could call me a "full stack" engineer, but server-side is where I am really in my element.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

timnitGebru, to random
@timnitGebru@dair-community.social avatar

Have you heard of expert systems? Probably not. That was the "AI" that was gonna change humanity that billions were being poured into in the 80s. The same news orgs hype stuff up during "AI summers" without even looking into their archives to see what they wrote decades ago.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "Have you heard of expert systems?"

@timnitGebru https://www.youtube.com/watch?v=_S3m0V_ZF_Q

This epsidode of "The Computer Chronicles" mentions expert systems and Lisp systems.

Also, I am pretty bitter that Python became the language of choice for statisticians and therefore modern machine learning and neural networks, when back in the 70s and 80s everyone thought Lisp machines were computers that was going become sentient. Lisp is superior in quality to Python in almost every way.

ramin_hal9001, to threads
@ramin_hal9001@emacs.ch avatar

is / using the old 4-E strategy strategy to destroy Mastodon:

  1. Embrace: what they are doing now, launch a competing but compatible service with that of Mastodon. The vast majority of users, most of whom don't care about the privacy and intimacy of the Mastodon network will go with the brand with the most name recognition.
  2. Extend: attract users to their centralized network with features like search, which they have the resources to do but the rest of the Mastodon network does not. But also include features for tracking and advertising, sell this as a good thing, "a better place to grow your perasonal brand, your business."
  3. Extinguish: after attracting a critical mass of users large enough to decimate the user base of the competing Mastodon network, queitly remove compatibility with the Mastodon network, this will effect only 10% of Mastodon users because the other 90% will be on Threads. "Who cares if we lose contact with that tiny minority of old Mastodon users, they should have just joined Threads by now anyways, they still can. It has search, and more people voted for it with their patronage it, and you don't have to think about what instance to join, its easier!"
  4. Enshittification: without any real competition to keep people from leaving for an alternative, start exploiting users for more and more content for ad revenue, exploit advertisers with ever-increasing costs of ad revenue.

They are scared to death about losing control over the Internet that they had gained over the past 15 years or so, and they are fighting to take that control back for themselves. We built this, but now a corporation like Meta/Facebook feels they have the right to exploit it for all its riches until it is destroyed.

Don't let it happen. is the only way to protect our home-grown community from corporate take-over.

ramin_hal9001, to guix
@ramin_hal9001@emacs.ch avatar

Somebody uploaded video of the SICP lectures by Sussman and Steele recorded at MIT in 1986 to PeerTube!

Here ⮕ sicp_lectures@diode.zone

I don't know how long these videos have been on the Internet, but I am amazed that this is the first time I ever learned about their existence.

ramin_hal9001, to mastodon
@ramin_hal9001@emacs.ch avatar

Authorized Fetch Circumvented by Alt-Right Developers

(Quoting part of the article...)

Alex Gleason, the former Truth Social developer behind Soapbox and Rebased, has come up with a sneaky workaround to how Authorized Fetch functions: if your domain is blocked for a fetch, just sign it with a different domain name instead.

Mastodon has been providing a half-measure to its users for years. Now it’s the time to make things right: going into 2024, I think it’s going to absolutely be a requirement to develop more robust forms of privacy options and access controls to empower users.

Bonfire is doing an incredible amount of research focused on this very problem, and Spritely has put forward some groundbreaking work on Object Capabilities in the recent past.

Discussion thread: https://mozilla.social/@wedistribute/111648319217106288

ramin_hal9001, to scheme
@ramin_hal9001@emacs.ch avatar

Why Program in C+Python when you can program in Zig+Scheme?

Another bit of gold from #ICFP2023 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."

#Scheme #Guile #GuileScheme #Zig #CProgramming #CPlusPlus #FunctionalProgramming

ramin_hal9001, to emacs
@ramin_hal9001@emacs.ch avatar

tip of the week

This is a two-for-one, these are two tips that I can't believe I never learned about it until now.

What is an easy way to see the value of a variable, or see the result returned from a function call?

You might know about the M-: (Alt-Colon) command, which lets you run any Lisp code, the result is printed into the *Messages* buffer. But... if you use the prefix command C-u (Control-U) and then press M-: (Alt-Colon), the result returned by the Lisp code is printed into the current buffer after the cursor.

Even better, however is using the (pp) ("Pretty-Printing") function. This also outputs to *Messages* by default, but it takes 2 arguments, the second of which can be a buffer. Try this code:

(pp (buffer-local-variables) (currrent-buffer))

The result returned by (buffer-local-variables), which is a list of all buffer-local variables and their values, is pretty-printed right after the cursor.

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

(Via @futurebird ) So Republican lawmakers in Iowa appear to be (effectively) rolling dice to decide which books to ban from schools now.

> "Frankly, we have more important things to do than spend a lot of time trying to figure out how to protect kids from books," (emphasis mine)

> "We are confident this process will ensure the spirit of the law is enacted here in Mason City,"

> "For those titles within Mason City’s library collections, administrators asked ChatGPT the specific language of Iowa’s new law, "Does [book] contain a description or depiction of a sex act?"

> "If the answer was yes, the book will be removed from circulation and stored,"

You can't make this shit up.

They could also complain that the neural network has bias set by their political opponents, and then train a neural network on a data set constructed by "the right kind of people" who want to ban books of any kind and ask it whether it contains objectionable material.

I have seen humans do more elaborate things than that to try and justify various acts of oppression. All you need to do is come up with a seemingly "objective" process of justifying your every psychotic whim, and you can trick most people into thinking your psychotic behavior is perfectly logical and reasonable.

ramin_hal9001, to fediverse
@ramin_hal9001@emacs.ch avatar

David Pierce of

It is nice he thinks ActivityPub is the Internet of the future, calling it "the post-platform" world in which journalists, individuals, organizations all run their own ActivityPub services rather than create accounts on platforms like Ex-Twitter or Facebook. But his perspective is still limited to a world where all applications run on the HTTP protocol with DNS identifying services. He talks about the "Post On (your) Own (host), Syndicate Everywhere" (POSSE) model, and how organizations and individuals can deploy Mastodon instances on their own servers. They also interviewed @pluralistic (Cory Doctorow) which was nice.

They really should have interviewed the @spritelyinst folks to see the real Internet of the future, in which HTTP is replaced with the Object Capability Network (OCapN). But to be fair, this tech is still pretty new and maybe not yet to the point where tech journalists at The Verge would be interested in doing articles about it.

ramin_hal9001, to ai
@ramin_hal9001@emacs.ch avatar

Humorous commentary on the ever-encroaching surveillance state

All Microsoft Windows users shall now have their every keystroke recorded, every document, every copy and paste, sent to Microsoft, and used to train a neural network used to track your every move, so that they can "improve the quality of ads that they serve to you" (not an exact quote). In exchange for forfeiting your privacy and freedom, you get in return a moderately useful predictive AI that can sometimes do the thing you wanted to do on you computer before you do it (but have take the effort to correct it when it gets things wrong). Isn't modern technology awesome!

ramin_hal9001, to RedditMigration
@ramin_hal9001@emacs.ch avatar

looking into how kbin.social works

It is pretty cool. Unfortunately, they don't have enough developers to meet the sudden demand caused by the #RedditMigration , but hopefully they will work out the bugs and other issues, and get more funding for better hosting.On Kbin a message board is called a "magazine," which is similar to a "SubReddit" or a Lemmy "Community". The URL for a magazine is /m/<NAME>, so for example: /m/fediverse or /m/emacs.

Within each "magazine" you have 3 subsections. The Threads, which are posts created by subscribers, the People (/m/<NAME>/people), which shows profiles of all contributors to the "magazine", and the Microblog (/m/<NAME>/microblog) which lets members participate in Mastodon-like posting, kind of like members of a "local" Mastodon instance.

I also kind of like the user interface a bit better. I think if Kbin works out the rough edges, I would prefer that over ordinary Mastodon or Lemmy as it combines the best of both.

#kbin #fediverse #RedditMigration #Lemmy #Mastodon

ramin_hal9001, to scheme
@ramin_hal9001@emacs.ch avatar

Playing around with Guile/Goblins: so much fun!

I have learned a lot about the Guile platform recently, and it is starting to feel a bit more familiar to me now. The programming language does have support for multithreading, but in classic Scheme fashion, is much more minimal than what something like provides (Haskell concurrency is what I know best). What Haskell calls a "mutex variable" or MVar is actually a combination of two fundamental components: "mutexs" and "condition variables." After coding my own Haskell-like MVar, I feel like I understand Scheme multithreading well enough to implement any concurrent algorithm...

...which I don't need to do because Guile Scheme provides just about every single algorithm to you already, between Andy Wingo's (@wingo) Fibers library, and the Actors Library, which they describe as "a standard library of sorts ... for a variety of common actor model patterns." I can see why @cwebber occasionally shows bouts of hubris over this project, it is truly an achievement! With a little more work, Guile could become a fully networked software platform, like the World Wide Web itself.

I am also working with the Guile-GI library to program GUIs using Gtk. At the moment I am trying to figure out how to define my own class of Goblins "Vat" objects using GLib Threads so I can run a Gtk application within a Vat. I want to update the Gtk Application view from the Scheme REPL. (Any help is appreciated.)

(Shout-out to @spritelyinst )

ramin_hal9001, to climate
@ramin_hal9001@emacs.ch avatar

Mainichi newspaper (Japan) talking about how latest fashion trends adapt to extreme heat with (for example) battery-powered cooling fans built-in to your jacket, much like what is used by people who have to work out in the sun.

So their "solution" to heat is more production of batteries and electronics, more e-waste, which is ironically, one major cause of the heat waves.

ramin_hal9001, to cpp
@ramin_hal9001@emacs.ch avatar

C++ is everywhere, that makes ECL very valuable.

The software industry, especially in the realm of free software, 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 Rust might come along and change all this, but it will take decades.

In the mean time, if you want to use C++ but not actually write C++, you can make use of the ECL Common Lisp compiler, which can compile Lisp to C++ code. This gives you all the best features of Common Lisp for programming with the universe of C++ code libraries available to you. You can use a C++ library and still have Common Lisp macros, garbage collection, high-level scripting, S-expressions as serialization, domain specific languages, a proper meta-object protocol that wraps C++ classes nicely, and wealth of choices for functional programming systems from the untyped lambda calculus all the way up the lambda cube to System-F and the Calculus of Constructs. This not only makes ECL a viable alternative to Python for scripting and app development, but objectively better than Python since you can actually turn your Common Lisp scripts into code that gets compiled into a larger C++ application.

With ECL I would have all sorts of C++ libraries available to me:

  • game engines like Unreal and Godot
  • 3D modeling: FreeCAD, OpenSCAD, Blender
  • Machine learning, big data, and HPC with PyTorch, TensorFlow, OpenCV, OpenCL

I will continue to contribute to the Scheme and Haskell communities as much as I can. I will continue to pursue my dream of an Xfce-like desktop environment written in Scheme. But no matter how I look at it, I am going to more productive in the long run using ECL and C++.

I was hoping that the software industry would gradually shift over to better, more functional languages like Rust and Haskell. And I would love it if Scheme languages could ever begin to seriously replace Python as a scripting language. But realistically, I think I am going to change tack and meet the industry half way. I think I should probably start using ECL as my language of choice, as much as I would prefer Scheme or an ML-family language like Haskell.

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

Wow, the Nanopass Compiler Framework used in the Chez Scheme compiler, which is the compiler that produces the fastest native binary programs of all Scheme implementations, is available as a separate library that you can use in any compiler.

The nanopass framework provides a tool for writing compilers composed of several simple passes that operate over well-defined intermediate languages. The goal of this organization is both to simplify the understanding of each pass, because it is responsible for a single task, and to simplify the addition of new passes anywhere in the compiler.<pre>(define-language L0 (terminals (variable (x)) (primitive (pr)) (datum (d)) (constant (c))) (Expr (e body) x pr c 'd (begin e* ... e) (if e0 e1) (if e0 e1 e2) (lambda (x* ...) body* ... body) (let ([x* e*] ...) body* ... body) (letrec ([x* e*] ...) body* ... body) (e0 e1 ...)))</pre>

You can install it from the Akku repo.

civodul, to random
@civodul@toot.aquilenet.fr avatar

Wirth’s “Plea for Lean Software” (1995) resonates with me.
https://cr.yp.to/bib/1995/wirth.pdf

The problem is more acute than ever. Sure, there are applications today that couldn’t exist 10 or 20 years ago; and yes, interfaces have improved.

Yet common tasks (messaging, web browsing, document authoring, software development) are not all that different but require much larger amounts of resources.

🧵

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "it's rather that GUIs are hardly ever created with user freedom (and user empowerment) in mind."

@civodul @janneke this is very true, and even more true for smartphone operating systems.

I can think of a few GUI applications that do empower users: Emacs, Blender, GIMP, Krita, there are probably a few more that don't occur to me right at this moment.

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

I just built and installed ECL (hompage) onto my computer, and after playing around with it for only a few minutes, I am quite impressed with it!

  • First off, the entire installation is only 40 MB, so this is definitely one of the more compact Common Lisp implementations I have ever seen.
  • It emits C code, native shared libraries, native static libraries, and native executables.
  • It uses libffi for C interoperability.
  • It provides ASDF, and the ability to install packages from QuickLisp
  • It implements Lisp standard processes on top of Pthreads
  • It provides some bindings to Qt4 for GUI programming
  • It implements all of CLOS

All of that in just 40 MB (not including Qt, which you need to install separately). The only drawback so far is that the documentation has some gaps in it.

But I definitely want to play around with some more. The trouble is most Common Lisp packages written nowadays only support SBCL. I would like to see how much of the Common Lisp ecosystem I can actually use through ECL. I wonder if I could maybe port something like the Lem text editor over to ECL instead of building it with SBCL, but that might prove impossible.

Anyway, my overall impression right now is that I have a very lightweight but powerful Common Lisp compiler at my disposal now that can easily be embedded into any C program I want, which is very exciting!

Thanks to @screwtape and @rml and @louis for turning me onto ECL!

DrALJONES, to Israel
@DrALJONES@mastodon.social avatar

Report

As many as 300 protesters were arrested in Brooklyn on Tuesday night, where thousands of mostly Jewish New Yorkers gathered for a “Seder in the Streets” to stop arming Israel.

The demonstration was held one block away from the home of Chuck Schumer & came just hours before the Senate overwhelmingly approved $14 billion in arms funding to Israel.

https://www.democracynow.org/2024/4/24/schumer_seder

..

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "As many as 300 protesters were arrested in Brooklyn on Tuesday night, where thousands of mostly Jewish New Yorkers gathered"

@DrALJONES (emphasis my own), and these are the people Joe Biden is calling "antisemitic" when he says shit like:

> "I condemn the antisemitic protests. That's why I have set up a program to deal with that..."

This delusional political double-speak is just getting more and more absurd by the day, I just can't handle this, my reflexive face-palmming is starting to hurt.

ramin_hal9001, to FunctionalProgramming
@ramin_hal9001@emacs.ch avatar

Please watch the ICFP 2023 Keynote "Functional programming for the planet," by Anil Madhavapeddy

He talks about how he takes modern functional programing techniques from all walks, so not just monads, but reproducible builds (e.g. Nix, although Nix is not yet used), and building these very complex data processing pipelines. He talks about how at Cambridge he has to often sit down with scientists to discuss with them how they gather and process data and produce visualizations.

He then takes the code they have written, often in languages like R and Python, and translates the stateless, functional essence of it into OCaml, and then takes the references to the datasets (often hard-coded URLs) and turns them into proper data sources. The OCaml is annotated with symbols that allow for automatic generation of GUIs.

The data sources are incredibly diverse. Many of them come from scientific experiments that have been ongoing for decades, many of the sources come from multiple generations of measuring devices, where older devices give lower-accuracy information and newer sources give higher accuracy. He also talks about the importance of security for some data sources, e.g. the location of critically endangered animals that would almost certainly be poached if photographs of these animals leaked to the public, what with how easy it is to localize nowadays.

He also inspires computer scientists to use their talents to start talking with activists, and possibly even policy makers, directly to learn what their needs are and see how you can apply yout own skills.

WIlliam Byrd was in the audience and during the Q&A session informed the audience of a workshop related to this kind of intersection of technology and activism at the DECLMed workshop ("Declarative Programming for Biology and Medicine") colocated with ICFP2023, so please check that out as well.

Read the abstract for this talk at the ICFP 2023 home page.

ramin_hal9001, to scheme
@ramin_hal9001@emacs.ch avatar

Hey, all you Scheme programmers...

Do you frequently visit srfi.schemers.org to see if there is already an commonly used implementation of a particular algorithm or code pattern? Would you like to be able to search these documents offline?

Well all you have to do is download this file: https://srfi.schemers.org/srfi.tgz ! Now you can search through it with grep!

I wish more websites with lots of static content provided a public link to a tar archive of all of their content. I do that for my own blog by the way. Someone should write an RFC about that.

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

@cwebber Quick question: do you know of any ActivityPub servers written in Guile? And I guess more importantly: should there be one? Or do you think it would be better to start again from scratch, a kind of ActivityPub 2.0, with OCapN and Goblins as a foundation? Is this part of Spritely's roadmap for Goblins?

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

Just a reminder:

The word coined by Cory Doctorow ( @pluralistic ) does not mean "degrades in quality." It means more specifically, a product or service that degrades in quality due to revenue streams depending on selling ads to audiences. Perhaps over time it might come to mean more generally a product or service that degrades in quality due to stingy corporate managers cutting corners and eliminating the good bits of a product or service to increase profit margins. Feel free to read Doctorow's book Chokepoint Captialism to learn more.

I mention it only because I just had a most unpleasant conversation with some reactionary who seems to be trying to appropriate the term "enshittification" to simply mean "degrading in quality." My concern here is that these reactionaries want to erase from the word's meaning any evocation of Doctorow's more specific critique of products/services that profit from ad revenue, and maybe also to spread fear, uncertainty, and doubt about federated alternatives like Lemmy or Mastodon (they were talking about the "enshittification" of Mastodon and Lemmy, which is pure nonsense).

Please be aware. Thanks for your time.

ramin_hal9001, to emacs
@ramin_hal9001@emacs.ch avatar

tip of the week

Here is a quick tip on how to debug an Emacs command, like when you see an unexpected error message when pressing a key chord that was supposed to run a command: you can use "eval-expression" to get a stack trace (or "backtrace" as Emacs calls it) when an error occurs. Ordinarily when a command fails, especially when run with "M-x" or by pressing a key chord, no stack trace buffer is shown, rather the error is printed to the "*Messages*" buffer. You can set the "debug-on-error" global variable to "t" to force stack traces to pop-up when commands fail, but I find it easier to use the "eval-expression" command instead.

  1. Run "view-lossage, usually bound to "C-h l", this opens a buffer of your most recent key presses and which commands each one executed. Use this to find the name of the command that caused the error.
  2. OR if you are sure which key you pressed that caused the error, use "C-h k <keys> (where <keys> is the key you pressed that caused the error) this will tell you which command should have run when you pressed the key that caused the error.
  3. Run the command again in the same buffer where the error occurred, but instead use "eval-expression", bound to the "M-:" (Alt-Colon) key.
  4. Unlike when using "M-x", you must evaluate the command as a lisp expression in parentheses. At the "Eval:" prompt, type the command name in in parentheses and press enter, for example (this-command-should-work)

Now a "*Backtrace*" buffer will pop up in it's own window and you can start debugging.

Of course, you should be comfortable reading Emacs Lisp code, and understand the basics semantics of Emacs variables, hook functions, and "advice" functions — often times when Emacs breaks it might be because a hook or advice function has been put in place that relies on some global variable that has been changed to an unexpected value.

The greatest strength of Emacs over other editors is that you can easily reprogram any and all aspects of its behavior as you are using it. But this is a double-edged sword, because any mistakes you make in customizing it's behavior can break the thing you were trying to make better. This is especially frustrating when you break a command that is activated by a key binding. You press a key, often times unconsciously because it is committed to muscle memory, and nothing happens but a little error message popping up at the bottom of the window. You can of course quit and run a new Emacs process, but as you Emacs skill improves, you might want to try solving problems without just turning it off and on again.

ramin_hal9001, to random
@ramin_hal9001@emacs.ch avatar

Emacs tip of the week

Here is another one that I discovered by accident, and as always, I can't believe it took me so long to learn about it.

When using Dired to browse files, I sometimes use the "&" ("dired-do-async-shell-command") to run a shell command on that file. And I sometimes run the "file" command, which is a very handy command that uses a database of magic numbers and other magic tricks to guess what kind of data is stored in the file.

Just press "y" to run "file"

The "y" button runs file in an aysnc shell and reports the result in the message line.

So here is me: I am using Dired to look through some files, "oh, what is that file? What the hell does the ".qgpqp" extension mean? Should I open it and see" (presses "y") "Oh, I better convert that to PDF" (presses "&", types "pandoc --from qgpqg --to pdf <RET>")

ramin_hal9001, to emacs
@ramin_hal9001@emacs.ch avatar

I finally started using Mastodon.el in

Given the recent changes planned to be coming to coinciding with a rare lull in my daily work, I finally decided to go through with the effort to switch my browser over to on all of my computers, and also to start using non web-based clients for as many of my apps that I can. Part of this effort includes switching over to Mastodon.el in .

So far it has been one of the easiest Emacs apps I have ever used, and if I had known it would be this nice I would have switched a long time ago. I only wish there were a more distinct visual division between each "toot", but I can get used to the way it is now no problem. And also the fact that now it integrates into the rest of is in and of itself an incredibly handy feature that the web-based client could never have.

rml, to random
@rml@functional.cafe avatar

Under communism will be the mandatory first programming language for all aspiring programmers.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@rml Python and JavaScipt are the languages of the liberal petite-bourgiouse. There can be no freedom until these are overthrown.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • magazineikmin
  • cubers
  • InstantRegret
  • cisconetworking
  • Youngstown
  • vwfavf
  • slotface
  • Durango
  • rosin
  • everett
  • kavyap
  • DreamBathrooms
  • provamag3
  • mdbf
  • khanakhh
  • modclub
  • tester
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • ngwrru68w68
  • Leos
  • anitta
  • tacticalgear
  • normalnudes
  • JUstTest
  • All magazines