#functional_programming

2025-05-31

🚀 just uploaded (link in reply): "List Unfolding -
unfold as the Computational Dual of fold,
and how unfold relates to iterate" #folding #unfolding #fold #unfold #foldL #foldL_prime #unfoldL #unfoldL_prime #unfoldr #iterate #anamorphism #catamorphism #functional_programming #scala #haskell

Alavi | علویalavi@techhub.social
2025-05-30

Today I spent a LOT of time solving AoC2024 day2 puzzle.

I solved it in three ways:
1. Javascript, just how I normally write it (somewhat functional programming)
2. A fully FP javascript solution
3. clojure solution

I realized some interesting things:
1. the functional programming js solution was very pretty and clean, and I think js is pretty good at FP. (I'm just learning FP so maybe I'm wrong)

2. the effective LOC of both clojure and js solution were exactly the same, and I think in the cleanliness and readability department they are very similar. But maybe that is because I'm much more used to js

3. The effective LOC of the functional solutions were almost half the LOC of the "normal" solution

Here are the solutions
github.com/alirezaalavi87/adve

#adventofcode #javascript #clojure #functional_programming

2025-05-18

🚀 just uploaded (links in reply): Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation #scala #functional_programming #computer_graphics

2025-05-08

In #haskell, if you were implementing, say, a Lisp interpreter, is there a "REPL monad"?

It feels like there should be one, but I cannot think of it for the life of me...

#Haskell #functional_programming #monad

2025-05-06

Как функциональщик в Go ушёл… и не вернулся

Хороших технических статей про Go было написано немало, и эта — не одна из них. Эта статья — графомания о моём субъективном и эмоциональном опыте перехода со Scala на Go. Руководитель : Хочешь техлидить новый проект? Я : Да, конечно. А что за проект? Руководитель : Распределённые бэкенды на Go. Я : Go? Но я же скалист-функциональщик… Чуть позже Коллега : Слышал, что ты будешь техлидить другой проект — вы там тоже Scala завозить будете? Я : Нет, будем писать на Go. Коллега : Ты что, бросаешь Scala и нашу тусовку?! Этот момент мне запомнился очень хорошо. Когда ты долго работаешь с каким-то языком, накапливаешь экспертность, нюансы, грабли, привыкаешь жить в его экосистеме — смена стека кажется чем-то болезненным. Будто ты уезжаешь в другой город и оставляешь старых друзей. Да, конечно же, язык — просто инструмент, а реальная компетенция — в теории, паттернах и опыте решения определённого рода задач, которые копятся за годы работы. Тяжело менять классы задач, но менять инструментарий гораздо легче...

habr.com/ru/companies/2gis/art

#golang #go #scala #java #net #functional_programming #worse_is_better #мысли_вслух

So, I just learned that a project I've been working on already exists

lemmygrad.ml/post/7739758

2025-04-19

Does *anyone* actually like Moscow ML's insistence that structures live in files with identical names (e.g., `structure Foo_Fabricator` MUST live in the file `Foo_Fabricator.sml` and MUST have a signature with identical name `signature Foo_Fabricator` which itself lives in the file `Foo_Fabricator.sig`)?

I always thought it idiomatic Standard ML to use SCREAMING_SNAKE_CASE for signature names, which breaks Moscow ML's conventions (unless you put it in SCREAMING_SNAKE_CASE-sig.sml and compiled it as a toplevel unit...which kinda breaks the whole module-as-compilation-unit idea?).

And Moscow ML *hates* it when you include the signature and a structure within the *same* file, because that violates its hardcoded assumptions about the world.

And another thing...

#MoscowML #StandardML #functional_programming #naming #convention #programming

2025-04-13

🚀 just uploaded: fpilluminated.org/deck/260 Drawing Heighway’s Dragon - Part 3 - Simplification Through Separation of Concerns - Rotation Without Matrix Multiplication #scala #functional_programming #computer_graphics

2025-03-29

🚀 just uploaded: Drawing Heighway’s Dragon - Part 2 - Recursive Function Simplification - From 2^n Recursive Invocations To n Tail-Recursive Invocations Exploiting Self-Similarity

fpilluminated.org/deck/257

#scala #functional_programming #computer_graphics

2025-03-20

Разбираем конкурентность в Go: книги, блоги, выступления

Особенность Go — удобный механизм конкурентности. Создавать конкурентные задачи в парадигме языка можно буквально «бесплатно» и предельно просто: достаточно написать ключевое слово go перед вызовом функции — и она начнет выполняться в отдельном потоке. Я Владислав Белогрудов, эксперт по разработке ПО в YADRO. В свое время изучал различные источники и лучшие практики в поиске эффективных способов организации параллельных процессов в Go. Делюсь ими с вами. Пополнить библиотеку

habr.com/ru/companies/yadro/ar

#golang #go #goroutine #concurrency_patterns #functional_programming #channel

2025-03-04

Как и почему эффекты помогают писать хороший код

В этой статье я рассказываю об эффектах. Несмотря на то, что эффект – понятие столь же простое, как обычная функция, для меня оказалось не так просто найти подходящее объяснение, но, я его нашел. Вы узнаете, в чем заключается идея использования эффектов и чем они отличаются от классических функций. Я делюсь своим опытом разработчика и показываю примеры кода с использованием эффектов. Вероятно вы найдете для себя что-то интересное. Если вы никогда не слышали об эффектах или термине "побочный эффект", рекомендую ознакомиться с этой темой для повышения вашего профессионального уровня и технического кругозора! Читать об эффектах

habr.com/ru/articles/882946/

#typescript #effect #type_safety #types #type #zio #functional_programming #object_oriented_programming #side_effects #function

2025-03-02

🚀 just uploaded to fpilluminated.org/! Drawing Heighway’s Dragon - Recursive Function Rewrite - From Imperative Style in Pascal 64 To Functional Style in Scala 3 #scala #functional_programming

Direct link: fpilluminated.org/deck/256

2025-02-11

Каррируем React-компоненты: функциональные паттерны на фронтенде

Современный React все больше соответствует идеалам функционального программирования. Ежедневно мы пользуемся подходами из мира ФП, зачастую даже не подозревая об этом. Эти паттерны плотно укоренились в сознании фронтенд-разработчиков, делая наш код значительно чище, читаемее и предсказуемее. В этой статье мы применим один из функциональных паттернов в React приложении и посмотрим что из этого выйдет.

habr.com/ru/articles/881546/

#react #frontend #typescript #javascript #patterns #functional_programming #фронтенд #реакт #функциональное_программирование #паттерны

2025-01-20

Functional Languages Are The Minimum

programming.dev/post/24308110

2024-11-13

@jackeric I suspect that Excel formulas are the most widespread #purelyFunctional #programmingLanguage. (Surely by number of users. Unsure whether also by lines of code, but could well be.)

#functionalProgramming #functional_programming #purely_functional

2024-11-04

Hey You'se!

Applications for PhD scholarships (UK students fully funded, international students part funded) in Computer & Information Sciences at Strathclyde are *open*.

Details on applications within @mspstrath are here:

msp.cis.strath.ac.uk/phd2025-J

*Deadline* 25th November, 2024.

Please share!

#dependent_types #type_theory #logic #FormalMethods #Coalgebra #functional_programming #homotopy_type_theory #ProgrammingLanguages #CategoryTheory #AppliedCategoryTheory #HumanFactors

What would you ask Simon Peyton Jones?

programming.dev/post/21303720

2024-10-28

🚀 just uploaded to fpilluminated.com

From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism - An Example

Direct link: fpilluminated.com/deck/241

#scala #subtype_polymorphism #ad_hoc_polymorphism #typeclasses #fp #functional_programming

2024-10-20

Lists are just unary trees!

-- List
data UnaryTree a = Nil | Cons (a, UnaryTree a)

-- Binary Tree
data BinaryTree a = Leaf | Branch (BinaryTree a, a, BinaryTree a)

#haskell
#functional_programming

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst