Functional Programming

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

Free foil: Generating efficient and scope-safe abstract syntax. ~ Nikolai Kudasov, Renata Shakirova, Egor Shalagin, Karina Tyulebaeva. https://arxiv.org/abs/2405.16384 #FunctionalProgramming #Haskell

sgraf,
@sgraf@mastodon.online avatar

@Jose_A_Alonso Hmm, interesting. To me, the benchmarks especially so. If it was only for normalisation, it's pretty clear that NbE is and always will be the winner. But if I understand correctly, NbE has limits; for example it would not be so simple to implement a transformation pass like GHC's Simplifier using NbE, where you apply peephole optimisations such as case-of-case, inlining etc. to the program while traversing it. I wonder if @AndrasKovacs has tried NbE for such a pass?

jbzfn,
@jbzfn@mastodon.social avatar
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

#CakeML #FunctionalProgramming #PLT #CompSci

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 to . 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,
@brokenix@emacs.ch avatar

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

alexelcu,
@alexelcu@social.alexn.org avatar

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 with PHP. is changing rapidly and all the books I see are nearly a decade old. Any good recommendations?

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

#elm #elmlang #functionalprogramming

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 #FunctionalProgramming to escape the imperative programming languages, which in turn got me interested into #Compilers and #ProgrammingLanguages. 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 #Cpp in the last couple of weeks. So anyway, does anyone want me to write a series of #blog posts about making a #Lisp 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)

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