Earlier quoted context omitted.
"slightly different ways to initialise stuff." can you elaborate? theres only what 11 datatypes in elixir?
Perhaps they are referring to the syntactic sugar around keyword lists? [a: 1, b: 2] == [{:a, 1}, {:b, 2}] Or maybe atom vs string keys in maps? %{a: 1} vs %{"b" => 1} Or keyword lists always needing to come last in lists? [some: :value, :another] # error [:another, some: :value] # valid Or maybe something else entirely. Those are just things I remember having to lookup repeatedly when I was first learning elixir.
Functional programmers need to take a look at Zig
151–160 of 163 posts
Re: Functional programmers need to take a look at Zig
#152Earlier quoted context omitted.
idk in elixir we basically do exactly whats happening with io parameters when mocking or swapping implementations that all satisfy the same behaviour. here. i am not the only one that refers to it as dependency injection: https://daily.dev/blog/zig-async-io-io-uring-zig-0-16-rethin... "Zig 0.16 introduces std.Io, a flexible I/O abstraction that uses dependency injection, similar to the Allocator interface"
Sigh. I meant that the zig authors did not make it a general pattern and just slapped on the DI pattern specifically for io, instead of generalising the abstraction so people can DI stuff.
Re: Functional programmers need to take a look at Zig
#153Re: Functional programmers need to take a look at Zig
#154My stack today is kinda nice but perhaps a bit odd: - Go - backend + CLIs - TypeScript - fronted, occasionally zx for more complex scripts - Nushell as my scripting language (I’ve been relentlessly using it everywhere I can instead of bash/zsh and man it is such an improvement) I heard so much good stuff about both Zig and Rust and would love to eventually get to know one of them.
nushell + 1. After ~20 years of bash+zsh, I'm translating all my scripts to nu. Yesterday I noticed I still don't know how to write ls | where modified in zsh after all years.
find . -type f -mtime +21 -delete
Or if you have fd fd -t f --changed-before 3w -X rmRe: Functional programmers need to take a look at Zig
#155Earlier quoted context omitted.
Nushell, from their website, looks a lot like PowerShell's idea of a shell, but less verbose.
PowerShell is not really that much more verbose. This is the equivalent of the nushell command by crabsand. dir | ? LastWriteTime -lt (Get-Date).AddDays(-21) | del
Re: Functional programmers need to take a look at Zig
#156Earlier quoted context omitted.
PowerShell is not really that much more verbose. This is the equivalent of the nushell command by crabsand. dir | ? LastWriteTime -lt (Get-Date).AddDays(-21) | del
Too much casing changes, IMO
dir | ? lastwritetime -lt (get-date).adddays(-21) | del
PowerShell is not case sensitive (but nushell and bash are).Re: Functional programmers need to take a look at Zig
#157Earlier quoted context omitted.
> using SpringBoot well there's your answer, isn't it?
This is both a fair response and isn’t! The OP was talking about typical Java stuff you’ll encounter, which is overwhelmingly spring boot. But I also agree that you can do much better than that for resource usage if you’re willing to avoid the common defaults the community has embraced.
> Java is a resource hog when you use patterns and libraries popular in Java land
Which java land. The java 8.0 land which is all about design pattern hell? Or modern java in 2026 which is largely about terseness and functional programming? From the tone, they're referring to the former.
> Deployment is super simple in Go, upload a single cross compiled binary it's done
To me this just sounds like OP is unaware of simple things like jlink or jpackage, and their idea of deploying a java application probably involves launching an IDE.
> But when you'll code the same thing in Go using the same method
Same method would mean using "Springboot for Go". Or, conversely, doing a clean implementation in pure java or with equivalent lightweight libraries. If all you want to do is basic calculations, you don't compare using a computer to a calculator and then complain the computer is heavy and slow to boot.
I agree and appreciate that there's a lot of legacy bloated java libraries out there which are "popular" and possibly for the wrong reasons, and that this is a problem. But, that aside, they're comparing building a bespoke lightweight tool from scratch in a language they enjoy, to using a bloated framework they can't be bothered to fine-tune on a language they associate with pre-2000 patterns. Just say you're more familiar with Go than modern Java and enjoy it more and leave it at that. Java has made great leaps into becoming a very beautiful language recently, and biased rants like this aren't helping.
Re: Functional programmers need to take a look at Zig
#158Re: Functional programmers need to take a look at Zig
#159Earlier quoted context omitted.
I went the same way but with only using Lisp dialects like Elisp and Clojure and Nix. Although I would ditch Nix too if another Lisp could supplant it too.
Obvious follow-up that's begging to be asked -- if you like nix and want a lisp, have you tried guix/guile?
The robust and immutable functional paradigm, especially with Determinate Flakes, overlaps enough with mindset of the language that brought me to Lisp in the first place (Clojure).
Re: Functional programmers need to take a look at Zig
#160Earlier quoted context omitted.
I went the same way but with only using Lisp dialects like Elisp and Clojure and Nix. Although I would ditch Nix too if another Lisp could supplant it too.
Elisp and Common Lisp for me, although I still use bash in the terminal.
I think going back to the fundamentals and revisiting what works is a luxury developers have in the post AI era. Lisp is decades olds, but Paul Graham called it the Maxwell Equations of PLs for a very good reason. Uncle Bob holds it in high regard as well, and the future of the industry could be very fruitful applying their wisdom.