#functionalprogramming
Automated generation of exam sheets for automated deduction. ~ Petra Hozzová, Laura Kovács, Jakob Rath. https://publik.tuwien.ac.at/files/publik_302699.pdf #Logic #ATP #Teaching #Haskell #FunctionalProgramming
λ Why Lisp Syntax Works | borretti.me
⎧ Common Lisp syntax works because of the conjunction of:
- Syntactic uniformity, allowing macros to be applied everywhere.
- Turing-complete macros that can execute arbitrary code at compile-time, and leverage libraries.
- An image-based development model that blurs the lines between compile-time and run-time ⎭
#Lisp #CommonLisp #FunctionalProgramming
https://borretti.me/article/why-lisp-syntax-works
«With Eio 0.10 just released, it’s time for another update! Since the above post (which was for Eio 0.5), some of the bigger changes are:...»
https://discuss.ocaml.org/t/update-on-eio-effects-based-direct-style-io-for-ocaml-5/10395/2
Aggregation pipelines in #mongodb remind me of #functionalprogramming - an example: https://beny23.github.io/posts/functional_mongo_aggregation/
In this Causal Islands🏝️ talk, Idris 2 creator Edwin Brady gives an introduction to his functional programming language built on Quantitative Type Theory. https://m.youtube.com/watch?v=0uA-tKR6Ah4&feature=youtu.be #functionalprogramming
Dynamic programming in Haskell: automatic memoization. ~ Brent Yorgey. https://byorgey.wordpress.com/2023/06/06/dynamic-programming-in-haskell-automatic-memoization/ #Haskell #FunctionalProgramming
10 Days of grad: Deep learning from the first principles (Day 10: Beyond supervised learning). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day10/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 9: Roaming the latent space). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day9/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 8: Model uncertainty estimation). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day8/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 7: Real world deep learning). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day7/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 6: Saving energy with binarized neural networks). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day6/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 5: Convolutional neural networks tutorial). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day5/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 4: The importance of batch normalization). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day4/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 3: Haskell guide to neural networks). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day3/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 2: What do hidden layers do?). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day2/ #Haskell #FunctionalProgramming #AI #DeepLearning
10 Days of grad: Deep learning from the first principles (Day 1: Learning neural networks the hard way). ~ Bogdan Penkovsky (@penkovsky). https://penkovsky.com/neural-networks/day1/ #Haskell #FunctionalProgramming #AI #DeepLearning
What's a monad? ~ Jason DeLaat. https://jasondelaat.github.io/pymonad_docs/explanations/whats-a-monad.html #Python #FunctionalProgramming
About functional programming (A fun way to reason). ~ Mary Paskhaver. https://medium.com/geekculture/use-lambda-calculus-to-think-about-functional-programming-4734f80e7714 #FunctionalProgramming #LambdaCalculus
🐫 Server-side rendering React in OCaml
➥ sancho.dev
#OCaml #Reactjs #FunctionalProgramming https://sancho.dev/blog/server-side-rendering-react-in-ocaml
#Prediction: #RocLang will make purely functional programming languages mainstream and much more accessible.
#ProgrammingLanguage #FunctionalProgramming #DX #DeveloperExperience
I had a few minutes, so updated the #FPIndia site. Added a page for connected communities - https://functionalprogramming.in/communities. As well as adding details of ongoing events on the events page - https://functionalprogramming.in/events
Dynamic programming in Haskell: lazy immutable arrays. ~ Brent Yorgey. https://byorgey.wordpress.com/2023/06/02/dynamic-programming-in-haskell-lazy-immutable-arrays/ #Haskell #FunctionalProgramming
High-level programming on low-level platforms (Two domain-specific languages based on Haskell). ~ R. Krook. https://research.chalmers.se/publication/535846/file/535846_Fulltext.pdf #Haskell #FunctionalProgramming #DSL
Programming requires breadth of knowledge. ~ Chris Martin (@chris__martin). https://typeclasses.substack.com/p/programming-requires-breadth-of-knowledge #Haskell #FunctionalProgramming
Haskell Optimization Handbook. ~ Jeffrey M. Young. https://haskell.foundation/hs-opt-handbook.github.io/ #Haskell #FunctionalProgramming
Haskell: Indexed recursion schemes. ~ Leo D. https://apotheca.io/articles/Indexed-Recursion-Schemes.html #Haskell #FunctionalProgramming
New Blog Post!
Learning #Haskell the Hard Way.
In this one, I whinge about the dot operator, demystify (for me) the let. . .in syntax, and start another blog series that I probably won't finish.
Interesting #CallForPapers : a special issue in the Journal of #FunctionalProgramming on Program Calculation: "The idea of program calculation, in which programs are derived from specifications using equational reasoning techniques, has been a topic of interest in functional programming since its earliest days. In particular, the approach allows us to systematically discover how programs can be defined, while at the same time obtaining proofs that they are correct". https://www.cambridge.org/core/journals/journal-of-functional-programming/announcements/call-for-papers/special-issue-on-program-calculation
🐫 Writing an interpreter... in OCaml?!?
➥ TJ DeVries
#OCaml #FunctionalProgramming
https://m.youtube.com/watch?v=NjKJ9-ejR6o&feature=youtu.be
Competitive programming in Haskell: introduction to dynamic programming. ~ Brent Yorgey. https://byorgey.wordpress.com/2023/05/31/competitive-programming-in-haskell-introduction-to-dynamic-programming/ #Haskell #FunctionalProgramming
The Haskell Unfolder Episode 4: falsify. ~ Edsko de Vries (@EdskoDeVries). https://www.youtube.com/live/N0d7_MJmsKQ?feature=share #Haskell #FunctionalProgramming
Verifying an effect-handler-based define-by-run reverse-mode AD library. ~ Paulo Emílio de Vilhena, François Pottier. https://arxiv.org/abs/2112.07292 #ITP #Coq #OCaml #FunctionalProgramming
Etna: An evaluation platform for property-based testing (Experience report). ~ Jessica Shi, Alperen Keles, Harrison Goldstein, Benjamin C. Pierce, Leonidas Lampropoulos. https://lemonidas.github.io/pdf/ETNA.pdf #Haskell #FunctionalProgramming #ITP #Coq
Haskell course: Lesson 12: Installing Haskell locally. ~ Robertino Martínez (@_roberm_). https://youtu.be/R64sCXU0Ru0 #Haskell #FunctionalProgramming
Haskell course: Lesson 13: Modules. ~ Robertino Martínez (@_roberm_). https://youtu.be/R64sCXU0Ru0 #Haskell #FunctionalProgramming
Functional programming in Lean. ~ David Thrane Christiansen. https://leanprover.github.io/functional_programming_in_lean #LeanProver #Lean4 #FunctionalProgramming
I have added #ObjectIcon and #ATS --
https://rosettacode.org/wiki/Bernstein_basis_polynomials#ATS
#ATSlang #FunctionalProgramming
Addendum: Others have been adding examples, too, so far in languages with which I am unfamiliar.
#FunctionalProgramming can we think of Polymorphic Variants (#OCaml is the ones I know) as "inferred Sum Types"? It got me thinking because of Roc-Lang: https://www.roc-lang.org/tutorial#accumulating-tag-types whereas OCaml has an explicit syntax for "accumulating tags"
Functional Python, Part III: The ghost in the machine. ~ Christopher Harrison. https://www.tweag.io/blog/2023-05-25-fp3-the-ghost-in-the-machine/ #Python #FunctionalProgramming #Hypothesis
Some naïve quadrature implementations, in #ATS, for #RosettaCode --
Two IDE features I would pay for if they were implemented in Emacs or Vim:
- Local Hoogle and Hoogle-like search engine for Scala, smart enough to understand the current type context
- Some sort of term rewriting tool that would let me select an expression and then try to simplify it
#functionalprogramming
Another #ATS example for #RosettaCode fans!
https://rosettacode.org/wiki/Long_multiplication#ATS
This is long multiplication, which I have used here to solve two distinct problems.
The designer of the task must never have realized you could do this in something other than BCD and end up not having a carry ever occur.
Functional programming in JavaScript. ~ Riku Vesanto. https://www.theseus.fi/bitstream/handle/10024/796278/Vesanto-Riku.pdf?sequence=2 #FunctionalProgramming #JavaScript
I was just good enough to post to #RosettaCode my #Scheme implementation of the #SVD --
https://rosettacode.org/wiki/Singular_value_decomposition#Scheme
It’s the Golub-Reinsch algorithm, as improved for EISPACK. (I have a printed copy of that volume with the ALGOL in it, BTW, though you can get the preprint online. But the FORTRAN code has numerical-stability improvements.)
Now I did the same task in #R7RS #Scheme --
A little #RosettaCode example of a Maybe #monad, in #ATS --
Alright, you many, many #ATS fanatics. I have a treat for you: four #RosettaCode tasks at once!
https://rosettacode.org/wiki/Bresenham_tasks_in_ATS
#ATSlang #FunctionalProgramming #GraphicsProgramming #Fonts
Sure, one can use SDL2 or whatever to draw lines, and, sure, these figures have "aliasing", but the tasks call for aliased figures. (I already did antialiased lines in ATS for a different task.)
For the #Scheme I decided to get a little fancy:
Xiaolin Wu's line algorithm - Rosetta Code https://rosettacode.org/wiki/Xiaolin_Wu's_line_algorithm#Scheme
Also I realized that using the transparency channel meant I had no need for gamma correction! But it then did require constructing an image from parts. That’s what made it more fun, though.
#RosettaCode #R7RS #FunctionalProgramming #GraphicsProgramming
Okay, you #ATS fans, whom I know to be plentiful! Here is the #RosettaCode task for drawing antialiased straight lines, done in ATS:
https://rosettacode.org/wiki/Xiaolin_Wu's_line_algorithm#ATS
And furthermore in #StandardML ---
https://rosettacode.org/wiki/Euler_method#Standard_ML
The same #DifferentialEquations program as before, but this time in #OtusLisp or #Scheme:
Euler method - Rosetta Code https://rosettacode.org/wiki/Euler_method#Ol
「 As the name suggests, with purely functional programming, the developer can write only pure functions, which, by definition, cannot have side effects. With this one restriction, you increase stability, open the door to compiler optimizations, and end up with code that’s far easier to reason about 」
— IEEE Spectrum
#FunctionalProgramming #FP #PL #Haskell
https://spectrum.ieee.org/functional-programming
λ Demystifying functional programming (in a real company)
— Caio Oliveira
#Clojure #Lisp #FunctionalProgramming https://medium.com/building-nubank/demystifying-functional-programming-in-a-real-company-e954a2591504
I have the (Rosetta Code) program running at https://sourceforge.net/p/chemoelectric/mandelbrot-viewer as the start of an actual project. The SDL2 interface is now organized in parallel with SDL2’s header files.
(Making a complete SDL2 interface is too much work for my fingers. I did not long ago make a rather complete libxml2 interface for D, but THAT I could do with AWK scripts.)
#ATS #ATSlang #Mandelbrot #MandelbrotSet #RosettaCode #FunctionalProgramming
Mandelbrot set - Rosetta Code https://rosettacode.org/wiki/Mandelbrot_set#An_interactive_program_that_can_write_PAM_images
This program is destined to become an actual project, but what is here is good for Rosetta Code (IMO).
#RosettaCode #ATS #ATSlang #SDL2 #FunctionalProgramming #MandelbrotSet #Mandelbrot
A graphical #Scheme program for #MandelbrotSet. It really could use a lot of work, but I’m moving on from it.
A zoomed-in picture of a part of the Mandelbrot set.
Mandelbrot set - Rosetta Code https://rosettacode.org/wiki/Mandelbrot_set#An_interactive_program_for_CHICKEN_Scheme
The #IFL23 , the The 35th Symposium on Implementation and Application of Functional Languages, has published their Call for Papers.
The symposium is in Braga, Portugal, end of August. Draft paper submission deadline is July 31st.
There is no mention on the website of a @phpledge , a #CodeOfConduct or other measures to keep participants healthy and safe, physically or otherwise, so that's something to keep in mind before applying.
Not long ago a gave a talk at NodeJS One Africa about Functional Programming in JavaScript. It's a gentle introduction to the topic. If you've ever been curious, have a look: https://youtu.be/_FVK0mD76Ds
#javascript #programming #africa #nodejs #functionalprogramming
This #compiler for the #RosettaCode Virtual Machine assembly language can now target any of #ATS, #C, #Mercury, or #Scheme --
https://sourceforge.net/p/chemoelectric/rosettacode-contributions/ci/default/tree/vmc.dats
The Scheme code runs very fast in #ChezScheme, so-so in all else I have tried. I wonder how they do it. Maybe a lot of C code (instead of Scheme) in the runtime is part of it?
The generated Mercury is not so fast, but such is life with Mercury. It’s fastish, considering.
I decided to keep going and have added "vmc", the virtual machine compiler: https://sourceforge.net/p/chemoelectric/rosettacode-contributions/ci/default/tree/vmc.dats
No guarantee it works at any given time--though, if I am good, I can work with Mercurial branches. Right now it can compile to #ATS and to #C
#Compiler #FunctionalProgramming #ATSlang
The ATS it makes does tail calls. The C uses goto--many more goto than are needed, but optimizers might clean that out. The generated code is in continuation-passing style.
I went ahead and wrote a Virtual Machine to #ATS translator for the #RosettaCode #compiler task series:
Compiler/virtual machine interpreter - Rosetta Code https://rosettacode.org/wiki/Compiler/virtual_machine_interpreter#Compiler
The thing’s designed to make it relatively easy to handle many other languages. Languages with #goto should be easy to do, for instance: convert the program to one procedure with a lot of goto in it. And #Scheme could be done easily. I have ideas for #ObjectIcon and co-expressions.
Lo and behold, now #OwlLisp (a dialect of #Scheme without anything mutable in it):
https://rosettacode.org/wiki/Modular_arithmetic#Owl_Lisp
#RosettaCode #ModularArithmetic #FunctionalProgramming #Lisp
Now I have added #Mercury --
https://rosettacode.org/wiki/Modular_arithmetic#Mercury
#RosettaCode #MercuryLang #LogicProgramming #FunctionalProgramming
(For convenience I use higher-order functions, so that the Functional Programming hashtag makes sense. Also, Mercury is a language in which tail recursion is the preferred method of looping. And, it just occurs to me, I wrote the program mostly as ‘functions’ rather than ‘predicates’!)
Now I have both enhanced the #ATS program (to show how to take advantage of the macro system) AND added a #Scheme program:
I have added #ATS to the languages for which there is a solution to the #RosettaCode #ModularArithmetic task:
Modular arithmetic - Rosetta Code https://rosettacode.org/wiki/Modular_arithmetic#ATS
This task was practically tailor-made for #Ada. :) But ATS lets us easily extend the language to handle modular numbers.
#ATSlang #FunctionalProgramming #Proofs
Update: After reading the task language again, I added some more commentary, to point out what I see as a flaw in the task.
I’m excited to share with you my latest blog post on how to apply functional programming principles to your #Rust functions. This is something I’ve been learning and practicing for a while. I hope you enjoy reading it as much as I enjoyed writing it. And of course, I’d love to hear your opinions and suggestions on this topic.
#FunctionalProgramming
I added #OwlLisp to the repertoire of my answers to the #ContinuedFractions arithmetic draft-task on #RosettaCode:
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n1,_continued_fraction_n2)#Owl_Lisp
FP and OOP are close siblings (using OOP to teach Currying) | The Upside-Down Trees
https://blog.mhashim6.me/fp-and-oop-are-close-siblings/
Discussions: https://discu.eu/q/https://blog.mhashim6.me/fp-and-oop-are-close-siblings/
seen on the side of a vending machine in #Reykjavik, #iceland
(photo by @akiva )