- 0 Posts
- 284 Comments
gedhrel@lemmy.worldto Programming@programming.dev•I'm getting started with functional programming, which language would you recommend?1·5 days agoErlang wasn’t the first implementation of CSP.
gedhrel@lemmy.worldto Programming@programming.dev•I'm getting started with functional programming, which language would you recommend?2·6 days agoClojure has it’s own set of idioms; it comes with some small surprises for old lisp hands. There are some things it’s really brought into the mainstream: performant persistent data structures in particular.
As well as excellent tooling and pedagogy, the principle attraction of Racket is the macro system. There’s a great book about this (this is true of just about all aspects of Racket). Racket’s focus is on building a tower of languages via macro extension. Metaprogramming is thematically FP-adjacent but neither sufficient or necessary; but if you’re looking for a fun learning experience it’s really worth a look.
In terms of employment opportunities - I know of several Clojure shops (on the JVM it has the bonus of being able to take advantage of the hole ecosystem), but I’m not aware of anywhere that’s using Racket outside of the academic sphere.
gedhrel@lemmy.worldto Programming@programming.dev•I'm getting started with functional programming, which language would you recommend?4·6 days agoAnother great avenue into this world is Racket. The tooling is fantastic and the documentation culture is first-class.
I’ve a couple of GP friend who used to describe “Dr Google” as their online colleague.
The point being, they were somewhat trained in interpreting risk as opposed to the stereotypical googler-of-symptoms. Once upon a time search engines were quite useful.
gedhrel@lemmy.worldto Programming@programming.dev•I'm getting started with functional programming, which language would you recommend?8·6 days agoI’d go with Erlang over elixir, but it sounds like you already have an interest in gleam.
FWIW: just pick one and get started. There are some major axes to consider: pure versus impure, lazy versus strict, static versus dynamic typing, but to kick off if you’ve done no FP before it’s probably better to just go for it.
There are some really intriguing “next steps”: SICP, the ML module system, the Haskell ecosystem, the OTP approach to state, but to begin with it’s just worth getting used to some basics.
Yes. And “Lego” is the collective noun.
I can confirm that no “Brit” uses a semicolon like that. We’re not barbarians.
gedhrel@lemmy.worldto UK Politics@feddit.uk•Four pro-Palestine activists arrested after ‘car smashes through gates of F35 manufacturer’3·20 days agowhen soldiers hide, fight and store weapons there yes
There’s a saying: two war crimes don’t make a right.
gedhrel@lemmy.worldto World News@quokk.au•Vast majority of Israelis believe there are 'no innocents' in Gaza, says poll5·20 days agoPropaganda works.
It wasn’t disregarded; it was never mentioned because it was still a state secret.
It’s a horrific character assassination.
The only two things it gets right are: there was a second world war; Alan Turing worked at Bletchley.
gedhrel@lemmy.worldto Technology@programming.dev•Hate Systemd? A New Init System(Nitro) Debuts as a Minimalist Process Supervisor for LinuxEnglish1·21 days agoPeople keep on repeating that but “and do it well” was never part of the deal. Also, it used to be “and read my mail.”
gedhrel@lemmy.worldto Technology@lemmy.world•UK Official Calls for Age Verification on VPNs to Prevent Porn LoopholeEnglish7·27 days agoThe neighbours’ seven-year-old suggested using a VPN to get around age checks. I don’t know if he knows what one is, but he’s definitely seen adverts for them.
gedhrel@lemmy.worldto Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)1·29 days agoI kind of expected a lot of this; I remember the sendmail 4 book from back in the day when O’Reilly had that, DNS and BIND, and Perl as the entirety of its corpus.
Unsolicited “good morning message” - is that what it’s called now?
gedhrel@lemmy.worldto UK Politics@feddit.uk•Downing Street urges people not to take part in protest in support of Palestine Action1·1 month agoThey are. Arrested doesn’t even imply “charged”; it’s a threatening tactic, but the pilice and the cps know nothing will get very far in court.
gedhrel@lemmy.worldto Programming@programming.dev•We Asked 100+ AI Models to Write Code. The Results: AI-generated Code That Works, But Isn’t Safe2·1 month agoI’m primarily transfixed, not by the example in your comment, but that you don’t voice the “th” in “with”.
It won’t (using your example explicitly) but in general what you’ve discovered is that:
- Variables hold values
- Some of those values are references to shared mutable objects.
Lists fall into the second category. There are ways to copy lists if you want distinct behaviour.
list2 = list1[:]
will perform a “shallow copy”. If you have a list of lists, however, the nested lists are still shared references. There is
copy.deepcopy
available to make a complete clone of something (including all its nested members).
Start with the core gameplay loop. Look for the fun. Look for what you can take out, not add.
Play-testing something like this with pencil and paper first might be a good idea. Once you work out why it always plays the same way, then you can look for how to perturb the gameplay.