Functional Programming

frankel,
@frankel@mastodon.top avatar
Jose_A_Alonso,
@Jose_A_Alonso@mathstodon.xyz avatar
jbzfn,
@jbzfn@mastodon.social avatar

🐫 Pretty Printing in OCaml: A Format Primer
➥ Vladimir Keleshev

https://keleshev.com/pretty-printing-in-ocaml-a-format-primer

jbzfn,
@jbzfn@mastodon.social avatar

「 CakeML is a functional programming language and an ecosystem of proofs and tools built around the language. The ecosystem includes a proven-correct compiler that can bootstrap itself 」

https://cakeml.org

furmans,
@furmans@chaos.social avatar

We are super glad to inform you that LAMBDA WORLD CADIZ is BACK...

🗓️2-4 October 2024
📌Palacio de Congresos de Cadiz
🎟️Early Camarón at €150
🪩lambda.world

Should the best Rock-Funky-Hard SolYNaranjaS band make a noise there...? Should not ?

Jose_A_Alonso,
@Jose_A_Alonso@mathstodon.xyz avatar
Jose_A_Alonso,
@Jose_A_Alonso@mathstodon.xyz avatar

Getting your Haskell executable statically linked with Nix. ~ Tom Sydney Kerckhove. https://cs-syd.eu/posts/2024-04-20-static-linking-haskell-nix

bart,
@bart@floss.social avatar

fp-ts brought advanced #FunctionalProgramming to #TypeScript. Now a related project implementing an effect system for TypeScript (effect-ts) seems to have gotten a lot of VC money. Interesting... Docs look very polished, not sure how they will make money though.

https://effect.website/

abnv,
@abnv@fantastic.earth avatar
haskman,
@haskman@functional.cafe avatar

@feld @abnv Okay, let me try to explain my thinking a bit -

A caveat - if I were to make this chart today, I would swap the positions of Erlang and Rust.

Keeping that in mind, I made this chart so that each axis broadly makes sense. Lawful languages tend to stick to rules and the only surprises are usually how much of a stickler for rules they are. Chaotic languages on the other hand, love their quirks / special cases. "Good" languages are usually languages with academic backgrounds, whereas "Evil" languages sacrifice some ideals for practicality.

With those definitions, the alignment for each language broadly makes sense to me. Lisp for example, is an academic language, yet a hackers tool, quirky, yet very regular. Hence true neutral.

feld,
@feld@bikeshed.party avatar

@haskman @abnv with this explanation and the suggestion of swapping Rust and Erlang, it really does make sense ✌️

haskell_foundation,
@haskell_foundation@mastodon.social avatar

Graham Hutton, in collaboration with the University of Nottingham, brings you the Advanced in course. Dive into a treasure trove of freely available videos to elevate your Haskell skills. Enjoy the playlist here: https://www.youtube.com/playlist?list=PLF1Z-APd9zK5uFc8FKr_di9bfsYv8-lbc

Jose_A_Alonso,
@Jose_A_Alonso@mathstodon.xyz avatar
brokenix,

Implement web servers using lenses
dependent types
https://github.com/ska80/idris2-server?tab=readme-ov-file

alexelcu,
@alexelcu@social.alexn.org avatar

#FunctionalProgramming will make you build better software, regardless of language. Some understated effects:
‣ Prefer params to global state
‣ Prefer data pipelines to fragile state mutation
‣ Prefer clear responsibilities for components
‣ Make dangerous side effects visible.

jbzfn,
@jbzfn@mastodon.social avatar

🤝 Ending the war or continuing it? Let's bring functional programming to OOP codebases | Cherry Ramatis

https://dev.to/cherryramatis/ending-the-war-or-continuing-it-lets-bring-functional-programming-to-oop-codebases-3mhd

worldsendless,
@worldsendless@qoto.org avatar

I'm looking for recent books or up-to-date text on #FunctionalProgramming with PHP. #PHP is changing rapidly and all the books I see are nearly a decade old. Any good recommendations? #FP

worldsendless,
@worldsendless@qoto.org avatar

@Crell I did look at yours, but Stack Overflow errors have taught me the hard way that PHP has changed a lot recently. Isn't much of PHP different since you wrote the book?

Crell,
@Crell@phpc.social avatar

@worldsendless There's a number of very cool improvements to the language, yes. Whether they impact the FP story is the question.

Enums are new. Readonly makes value objects easier, as does constructor promotion. The mixed type is nice in a few cases. Union types don't matter for FP, and neither do attributes.

The core FP story hasn't really changed in the last 4 years. Had any of the FP based RFCs I submitted passed, that would be different, but... They all got blocked.

jbzfn,
@jbzfn@mastodon.social avatar

:patcat: Why I love Elm.
➥ Sufiyan Yusuf

「 The biggest reason I love Elm is that it changed my perspective on programming.

As someone who aspires to be a code craftsman, this is the biggest reason to learn Elm. Crazy story - I tried really hard to bring the Elm architecture with me when I started a project in Rust. It really makes you think about what goes into building deterministic systems 」
https://sufiyan.substack.com/p/why-i-love-elm?r=aaxsb&s=w

jbzfn,
@jbzfn@mastodon.social avatar

:thinkerguns: Why is Elm such a delightful programming language?
➥ Marcio Frayze

「 Elm is a pure functional programming language with immutable data structure, soundness type system, currying, and blah blah blah. But instead, the author preferred to highlight his real intention: to create a safe language that web developers feel pleasure in using it. The rest is a consequence of that! 」
https://dev.to/marciofrayze/why-is-elm-such-a-delightful-programming-language-2em8

abnv,
@abnv@fantastic.earth avatar

I learned to escape the imperative programming languages, which in turn got me interested into and . Turns out, most of the real-world compilers are written in C and C++, so here I am back at square one.

After years of avoiding it for decades, I taught myself in the last couple of weeks. So anyway, does anyone want me to write a series of posts about making a interpreter (https://github.com/kanaka/mal) in C++?

nil,
@nil@functional.cafe avatar

@abnv I am voting yes for the blog posts! The other irony of sufficiently high level functional programming is that you want it to seem imperative on the surface! Like cursors in reagent/cljs letting you imagine you have variables/registers even though it’s a single atom under the covers. I am sure the Haskell lens paradigm from whence cursors came is even more elegant. Monadic even.

mavnn,
@mavnn@mastodon.sdf.org avatar

I may have got a bit carried away writing a blog post presenting both a really practical way with a nice developer experience of handling asynchronous operations that might fail in TypeScript... and a "write your own monad in TypeScript" tutorial.

If you're interested in , , or both - please share. I think the techniques in this post can really make writing TS a lot more enjoyable, and the results more reliable.

https://blog.mavnn.co.uk/2024/02/19/do-notation-for-typescript.html

haskman,
@haskman@functional.cafe avatar

people on : I am now moderating the and communities on Programming.dev.

The best part is that you can also (sort of) follow them from . Search for the following URLs in your mastodon client

https://programming.dev/c/purescript, and https://programming.dev/c/haskell

See you there!

shakthimaan,
@shakthimaan@mastodon.social avatar

Introduction for OCaml, a blog post for developers that want to dig into OCaml by @emil_priver https://priver.dev/blog/ocaml/ocaml-introduction/

__sharky__,
@__sharky__@mastodon.social avatar

This chapter took me a while and I need to reimplement it again. I think translate-codon should use a map . Having to wrap codons with codon-strings does not feel right , but I don't understand what partition returns.

Not sure about throw-away maybe a recursion is too much for this ? Maybe there are other built-ins I can use.

Using map more than once does not feel right. I think processing one rna a time would make it more simple.

mykhaylo,
@mykhaylo@fosstodon.org avatar

@__sharky__ and use recur instead of function name for recursion, it will do some tail call optimization

mykhaylo,
@mykhaylo@fosstodon.org avatar

@__sharky__ also just (map str codons)

gregorni,
@gregorni@fosstodon.org avatar
kramo,
@kramo@fosstodon.org avatar

@bragefuglseth @gregorni

⚠️ "Brage Fuglseth" was killed because it ran out of memory.

gregorni,
@gregorni@fosstodon.org avatar

@fkinoshita I'm also kind of confused, because I don't really know what area of coding OCaml is targetting. Their website says it's memory-safe, fast, and industry-leading, but nowhere does it say what usecase it's intended for.

__sharky__,
@__sharky__@mastodon.social avatar

First time I need to use destructuring in . Takes some time to get my head around the syntax , but it works !

__sharky__,
@__sharky__@mastodon.social avatar

@loudfpv 😅 Ok, I will work on my brackets ! I'm still tinkering. I have no idea how to format code in clojure. Is there something like black or flake8 for ? These are code formatters for python*

mykhaylo,
@mykhaylo@fosstodon.org avatar

@__sharky__ @loudfpv you can use cljstyle to format it. And here's the style guide to read for fun: https://guide.clojure.style/

vascorsd,
@vascorsd@mastodon.social avatar

The new language tour for Gleam looks nice - https://tour.gleam.run

is a language statically typed on top of the BEAM virtual machine (the thing powering erlang).

It plays in the ecosystem together with .

I've never touched tech but always been curious and being a developer, gleam talks to me.

Patiently watching it grow 😌

vascorsd,
@vascorsd@mastodon.social avatar

The focus may not be totally the side of things, but it feels mostly right or good enough for it. I don't believe we will ever see monoids and semirings in it, but more as a practical language with the simple patterns that the style enables.

Its site description:

"The power of a type system, the expressiveness of functional programming, and the reliability of the highly concurrent, fault tolerant Erlang runtime, with a familiar and modern syntax."

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