@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.

daviwil, to random
@daviwil@fosstodon.org avatar

Rust, Go, or Zig?

If you have an opinion (or two, or three), I want to hear it.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@daviwil I would avoid Go simply because it is a language "blessed" by Google, which is a company I would never want to depend on for any reason.

Rust is great for its fantastic type system, and seems to have gained a ton of momentum in the hearts and minds of programmers lately, but the Rust community seems to make no attempt to make Rust binary compatible with other programming languages. The language is too different from C to be able to easily interface other languages (scripting languages) to it without automated foreign function interface generators to generate Rust code to which other external libraries can interface.

Zig is great, but not quite as popular as Rust, and does not have a really nice type system. On the other hand, it does produce very efficient binary code and is fully compatible with C libraries, so you can easily interface languages like Guile or Lua to Zig libraries without having to generate any foreign function interface code on the Zig side. And I am told that it has some pretty nice, modern tooling that helps debugging a lot to make up for the fact that it does not have Rust's type system that can catch such errors before compilation completes. Honestly, Zig just seems to be a much more useful language than Rust. But I would use Zig as a language target for Scheme, sort of like how Gambit or Chicken generates C.

If I were forced to choose between Rust and Zig, I would go with Rust just so that I could get to know its borrow checking type system, but my end game would be try to emulate that borrow checking in a Scheme compiler like PreScheme.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "I've been going back and forth on whether I'd try to write a Scheme compiler"

@daviwil yes, this is exactly what I do too when I want to learn a new language, I write a Scheme compiler. I also like writing text editors if I want to test out any GUI libraries for the language. One of my friends always writes a ray tracer when he wants to learn a new language because he likes to test out a language's number crunching and optimizing capabilities, which is something I personally have never done, but sounds like a good idea to try sometime.

Yeah, Rust is one of those languages I really should get to know better, but I just never get around to it. I wonder how well it handles when the code size increases? I guess that is what you want to find out.

ramin_hal9001, to opengl
@ramin_hal9001@emacs.ch avatar

Question:

Does anyone know of an APL compiler or transpiler that can generated Vulkan or OpenGL shader scripts? (Free/libre would be most appreciated.) I think Aaron Hsu might have engineered something like this at some point, but I can't find anything about it at all right now, probably thanks to our amazing new "AI-enhanced" search engines.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@codrusofathens I did narrow my query but without using quotes. My query was something like "apl programming GPU OpenGL shader GLSL" or something like that.

I just tried again with "apl programming compiler target shader GLSL aaron hsu" and I got the APL wiki page for Aaron Hsu which mentions his work on a GPU-hosted APL compiler and links to the Co-dfns GitHub page, as well as his Ph.D thesis. It looks like I almost had the winning query before I posted this question. Of course, you always have perfect vision in hindsight.

louis, to firefox
@louis@emacs.ch avatar

is so good, it's now my default browser. Good bye, .

https://librewolf.net/

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@louis if it can be installed onto the latest Ubuntu or Linux Mint, and if it runs Netflix, I might switch to it myself. I have been wanting to move away from Firefox for a while now. If it doesn't run Netflix I suppose I can keep Firefox installed just for that.

masukomi, to Lisp
@masukomi@connectified.com avatar

geeks: whatever happened to ?

the shen-sources repo https://github.com/Shen-Language/shen-sources appears to have been updated only 3 days ago, but i've literally not heard mention of the language for like... 8 years or so? Long time.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@masukomi so Shen is a bit weird because the guy who made, Mark Tarver, it is also just a little unusual. I'll try to explain.

So for a time I was very interested in Shen because I like the idea of a minimalist Lisp with built-in pattern matching and a Prolog-like language that can be used to do meta-programming. I began evaluating Shen to see if it would suit my purposes — wanted to see if I could use it for Emacs Lisp macro programming, to generate Emacs Lisp code with a kind of dependently typed declarative programming system. So I got the Emacs port of the Shen.

However, when I actually tried using it, I found it was completely self-contained, like a toy language, there was no easy way to get it to generate Emacs Lisp code except as a string via the standard output channel, and calling Emacs "eval" was impossible. I knew there must be a way to create new primitives, something like a "foreign function interface" to Emacs Lisp, but I had a hard time figuring out how to do it. So of course the first thing I did was try to read the documentation. But the only way to read the documentation is via the Shen website, it is not available for download as HTML or Infodoc or whatever. This is painful because when doing any programming in Emacs at all, Infodoc is the easiest form of documentation to read.

What I found on the Shen website (at the time) was JPEG images of the manual, like it had been rendered from LaTeX to a series of JPEG files. This was the only way to learn the language without actually buying a copy of the book from Amazon. So I thought, "OK, weird, but maybe I can at least download these images for offline viewing." So I tried Wget, but I found that Mark Tarver's web server had some hack built-in to it that prevented Wget from ripping the images from the site. It seemed he was REALLLLLY against people reading the documentation for Shen, at least unless they went to the trouble of buying a copy of the book.

I just recently checked the website, and things have improved. The documentation is at least available in HTML now, though I am not really willing to try and download it again.

There are other little details about the presentations Mark Tarver posted on YouTube that rub me the wrong way. Everything he says about it has a less-than-subtle air of hubris that just comes off as a bit daffy to me. He often talks about how revolutionary Shen is, how it will "change the world," and he uses expressions like "re-educating the planet." I would ordinarily overlook the personal behavior of the inventor, since it is indeed a fascinating Lisp system, but the fact that Tarver made it so difficult to obtain the documentation just made it all the more insufferable.

Finally, I ran across this diatribe he wrote criticizing free and open source software. He calls it "open source" but makes no distinction between open source and free software, the way Richard Stallman does. He expects his software to be "revolutionary," but also expects to be well paid for it. He ends his diatribe with a quote by David MacIver: "Plans which are predicated on changing the world before anyone will pay you any money are decidedly bad plans."

Well, what can I say, I wish him luck, I genuinely do. I could have made more effort to learn Shen, perhaps emailing Mark Tarver with my questions, but I never have had to go through so much effort to learn any other programming language, even just to evaluate whether it would be suitable for my purposes. And there are dozens of alternatives made by people out there who are more willing to share the least bit of their knowledge as a professional courtesy, why not just use those.

louis, to random
@louis@emacs.ch avatar

Installed 7.4 on a Hetzner ARM VM yesterday, it's almost effortless, everything just works - and OpenBSD is a joy to configure, thanks to simplicity, comprehensive man pages and consistency.

Linux now feels almost like the Windows of the *nixes.

@mms

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "Linux now feels almost like the Windows of the *nixes."

@louis @mms this! This is why I want to switch to OpenBSD! But I don't have any servers, only desktop computers, and OpenBSD does not have the best support for most of the hardware that I use — mostly laptops and desktop PCs, some of which have GPUs, some of which I use for playing games.

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

@civodul I don't know how to define bloat either, but I think things like fonts, icons, emojis, encryption algorithms, and programming language runtime environments can be excluded from the definition.

But there are many things I do not like. I do not like every application downloading its own copy of slightly different versions of the same library, and/or the same programming language runtime environment. I do not like containers, or things like AppImage or Flatpak trying to facilitate this practice by hiding away the details of library dependencies.

Of course I am sure we both agree that Guix (and Nix) both go a long way to solving the technical details of this problem, but I think there are political issues that remain unresolved, like can we get everyone to agree to release their software at roughly the same time, in a sort of point-release fashion? (Like what Ubuntu does, every 6 months.) I think this solution is analogous to democratic elections in a parliamentary government. "Elections" are held every 6 months, where all laws that have been drafted in the past 6 months go into effect just before the election. So the "laws" are like the software, the "election" is the process of cutting a release of that software and submitting it to the network that delivers it to end users.

But some people will insist on rolling releases. Some people will insist on installing packages using tar archives, some people will insist that flatpaks, appimages, and docker images are all good, practical ways of delivering software. This disagreement is why I call it a "political issue."

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.

daviwil, to scheme
@daviwil@fosstodon.org avatar

In this video, I'll give you 5 reasons why I think you should learn Scheme this year! Regardless if you are a programming beginner or an expert hacker, there is a lot to be gained from learning this language.

Would love to hear your thoughts!

https://www.youtube.com/watch?v=3eXK9YZ0NjU

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@daviwil best reason, in my opinion, the language is so minimal it really teaches you how to do more with less. Of course, there are plenty of libraries available to help you get work done. But learning to write working programs with such a limited but orthogonal set of language constructs, you begin really see how you don't need a whole lot to do everything a programming language can do. It is one of those languages, like Haskell, where you have to warp your brain to really understand it, and this makes you see the very idea of software and code in a whole new light.

garbados, to random
@garbados@friend.camp avatar

honest q:
who is hype about the nix programming language and why

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@garbados Nix is less about the language and more about the package manager that is built out of it. Also, there is an operating system that uses the Nix package manager to manage all software in the system.

What is interesting about Nix is how it builds software: it uses a blockchain-like database of packages to prove the entire chain of dependencies used to build a piece of software, and can guarantee that one piece of software can be built on one computer in an identical way to any other computer, this is called "reproducible builds." Without Nix, it is possible to accidentally build software that have slightly different dependencies on different systems, which can lead to bugs or unexplained changes in behavior between applications running on different systems.

The chain of package dependencies also makes it very easy to undo (or "roll back," as they say) any changes to the set of software your system is using. Every time you install software, a new set of links are added to the chain, sort of like creating a branch in Git. If you install software that breaks a server, or perhaps the GUI on your computer, you can just set your system to use the previous links, and the system goes back to functioning exactly as it did before, no different than checking out an older Git branch of some software. But with Nix, unlike Git, you are "checking out" the set of packages installed on your system, rather than a particular version of source code.

I like to say the the Nix package manager is the most technologically advanced package manager in the world of software right now. (Also Guix, which works in the same way as Nix but uses a different programming language.)

pmidden, to haskell
@pmidden@fosstodon.org avatar

Structured logging in without unnecessary dependencies? Apparently not a thing. :/

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@pmidden I am not sure what you considere to be "unnecessary dependencies" (I supposed you wouldn't want a web server like Wai), but would log-base get the job done for you?

LeftistLawyer, to random
@LeftistLawyer@kolektiva.social avatar

Precisely.

"I really do hope that in the future kids in school will learn about the Holocaust and German nationalism together with Jewish nationalism and zionism and Israel's ethnic cleansing campaigns. The two are the ultimate dialectical event, bound together for all time. It’s depressing. But it is what it is. You can’t ignore it."
-- Yasha Levine

https://yasha.substack.com/p/the-dialectics-of-nationalism

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

> "When we abhor, we become abhorrent."

@LeftistLawyer isn't it OK to abhor fascism, racism, genocide?

sachac, to random
@sachac@emacs.ch avatar

All right, I managed to write about my subed-record workflow for making 47 intro videos ( https://sachachua.com/blog/2024/01/emacsconf-backstage-making-lots-of-intro-videos-with-subed-record/ ), add Org Mode comments with the things I wanted to demonstrate, livestream a demo ( https://www.youtube.com/watch?v=QskeNbGbMa4 ) taking advantage of the links I put in my comments, add the video to my blog post, send the captions to Deepgram's Whisper API, and edit the captions and upload it as the transcript. All this morning, yay! This could work. =)

Since lots of people prefer to avoid YouTube, I'd like to find a Peertube instance where I can sign up, upload videos, and possibly livestream. https://joinpeertube.org/instances?profile=video-maker&themes=15&nsfw=no-opinion&languages=en&quota=50000000000&isStreamer=yes lists a few possibilities. Recommendations welcome!

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@sachac I have been quite pleased with https://diode.zone , their stated purpose is "a focus on creativity and electronics." One problem/good thing about them to consider is they are pretty selective with whom they federate.

jrballesteros05, to random Spanish

YEAH YEAH, There is Mozilla corp and Mozilla foundation, but none of them give a shit about Firefox. And as I know there is no way to donate to Firefox directly. So I give a dawn what happens to the fucking Mozilla, I so worry about Firefox future.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@tyil @jrballesteros05 I think if anyone is going to seriously try to write a new web browser from scrarch, it would have to be in phases, gradually working toward standards compliance. I think projects like Qt and Gtk have what it takes to construct a new web engine, it is just a matter of defining widgets that can be constructed from HTML tags and updated with CSS.

Also WebAssembly is gaining momentom now, JavaScript will likely go the way of COBOL in 20 years. At that point, all you will need is the DOM, executable code will all be WebAssembly, compiled from other languages.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

>> "Also WebAssembly is gaining momentom"

> "This is not a good thing."

@tyil @jrballesteros05 why not?

The software industry has made a few attempts at a "write code once, run it anywhere" virtual machine since the early 1990s. Would you rather a fully proprietary VM like Java or .NET, or X86 emulation, be the one VM we must all use? I think WebAssembly is the best we can hope for as far as it comes to finding a common ground solution.

raymondpert, to Israel
@raymondpert@mstdn.social avatar

deleted_by_author

  • Loading...
  • ramin_hal9001,
    @ramin_hal9001@emacs.ch avatar

    > " Israel continues to prosecute its war against in "

    @LALegault @raymondpert @Miro_Collas this phrasing of it as a "war against Hamas" is really starting to piss me off now. How can anyone see the weekly, reports from the various UN agencies monitoring the situation in Gaza who all have clearly stated that this is a fucking genocide, not a war. The war on Hamas is just a pretext for the genocide.

    And yes, this is a genocide in progress being committed by the United States of America and Israel. Way to go Genocide Joe. How can anyone believe in republican democracy or constitutional rule of law when such exceptions are taken by the US? Even with a Democrat as president, we are living in a full-on fascist authoritarian state.

    ramin_hal9001,
    @ramin_hal9001@emacs.ch avatar

    @nuclide has setup their Linux desktop in the most Lispy way possible: bindings in order to program the compositor (DWL) and the status bar (DTao), for the web browser ( bindings to ) and as the text editor.

    The only way you could be more truly a fan is if you ran an emulator of the CADR Lisp Machine and used ZMacs as your text editor instead, and annoyingly argue with everyone that Scheme is not actually Lisp (cough @amszmidt cough)

    https://lemmy.world/post/10112192

    ramin_hal9001, to ubuntu
    @ramin_hal9001@emacs.ch avatar

    I finally upgraded my computers to the latest

    And since I always use whatever version of is the default in my Linux distro's package repository, I upgrade to Emacs 29.1 for the very first time, at long last!

    To be honest, seeing libgccjit often AOT-compiling the various Emacs packages I have installed is going to take a little getting used to, though I definitely can't complain how very obviously faster Emacs is running now as a direct result.

    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

    #Mastodon #Bonfire #Fediverse #Spritely #OCapN

    ramin_hal9001, to python
    @ramin_hal9001@emacs.ch avatar

    Beware: (today I learned)

    If you accidentally put a comma at the end of a return statement, a 1-tuple is returned:

    def thing(x): return x+1,thing(3) # returns (4,) instead of 4

    When you think about it, it makes sense: Python implements multiple returns values as tuples, and tuples ending with a comma are 1-tuples, and that for either assigning or returning multiple comma-separated values you are not required to enclose values in parentheses, it makes sense that this would be the case with Python syntax. But even so, it still caught me off guard and crashed my program, I would have expected a syntax error.

    syntaxseed, to gamedev
    @syntaxseed@phpc.social avatar

    Ok but what about... Subnautica but an underground mining game. You can mine anything in any direction.

    Build structures, contend with biomes, creatures, oxygen use & structural collapse.

    Discover caves, buried ruins, magma shafts, geodes, treasure and aquifers. Clues found at points of interest reveal the story.

    Craft better equipment and elaborate underground bases.

    Discover better and rarer materials. Dig deeper.

    Ok you folks- make it happen! 😆⛏️

    ramin_hal9001,
    @ramin_hal9001@emacs.ch avatar

    @syntaxseed I am almost 100% certain you could write a Minetest mod, with a simple Lua script (or if not that, a mod to the terrain generator), that would do exactly this.

    ramin_hal9001, to threads
    @ramin_hal9001@emacs.ch avatar

    #Threads is #Meta / #Facebook 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. #Fediblock is the only way to protect our home-grown community from corporate take-over.

    ramin_hal9001,
    @ramin_hal9001@emacs.ch avatar

    > "could you explain why mastodon users, who have explicitly come to mastodon for what it offers, will decide to switch to threads?"

    @jmaris sorry for the late reply. The users who explicitly come to Mastodon for what it offers, a democratically run decentralized social network, are not a concern, they will not be going to Threads.

    But most people, non-technical people, don't care about democracy or decentralization. They still think of Mastodon as just another Twitter, and people who joined just to "try it and see what it is like" will see Threads as an alternative, probably a better alternative because it has a large community of users, and it has more name recognition it has features like search, and it is easier to join since you don't have to choose an instance. They will quickly lose interest in Mastodon which to them will be seen as just "Threads but not as good." But these non-technical people are what make Mastodon interesting, it is a social network with the largest and most diverse group of people with the widest range of interests and expertise that make the social network useful.

    ramin_hal9001,
    @ramin_hal9001@emacs.ch avatar

    > @but we don't have those people now, what makes you think it will be any different if threads is not federated

    @jmaris what do you mean? I am talking about people who are already on Mastodon to see what it is like but don't necessarily care about democracy or decentralization, they just care about whether they can have a good time and meet good people. I expect they would probably abandon Mastodon for Threads if they ever thought both networks are basically the same (since the two networks interoperate) but Threads would seem slightly better to them due to name recognition and expensive features that only a major corporation could afford.

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