r/functional • • Apr 12 '12

Challenge: Write a functional Freenet

1 Upvotes

Freenet sucks. Well, it's a great idea, but it has problems. Freenet is written in Java, for one. It uses way too much memory. One of my recent attempts to maintain a node would crash every hour because it ran out of memory. It doesn't use 100% of my CPU (any more), but it does keep the little thing busy. It spawns hundreds of threads to read and write data from and to different nodes. Worst of all, it has only a couple of people maintaining its source.

Theoretically, a Freenet written in C (my personall background) would run a lot faster and have less memory overhead. Substantiating this belief are comparitive benchmarks: Java vs C, another Java/C shootout, Wiki on Java's performance. I might have less memory overhead, and faster code in most places.

But then i started hearing about the wonders of functional programming. How it solves all concurency problems. How there are numerous gains to be had from conforming yourself to this way and allow the code to be parallelized safely and scalably. Speed, performance, parallel execution, this sounds like a really good paradigm to write Freenet in! It sounds perfect. Java/Hakell benchmarks show that Java often runs a little faster, but uses more than 3 times the memory, on average. Java beats Erlang in terms of execution speed, but not memory, in most runs.

Despite benchmarks not showing that a functional Freenet would definitely run faster, it does corroborate that it would use less memory. Also, throughput and timed output aren't the same and it might have better throughput.

Now to the crux of the matter: A lot of flame wars seem to get started when a discussion of functional vs imperitive programming becomes topical. (I hope that doesn't happen here.) We all know the arguments on both sides. Functional programming has a lot of theory to it but it doesn't have a great library of programs to substantiate its claims. Gnome, the Linux kernel, package managers, 3D games, GUIs, etc., will typically be written in a procedural language, perhaps for mostly culteral reasons. Freenet is both a necessary software of the modern age and one that requires highly parallelized code. I think the functional programming community should think seriously about implimenting Freenet. It doesn't have to work off the same USKs and SSKs, but it has to work; a decentralized internet.

TL;DR: (see above)


r/functional • • Nov 14 '12

In a Functional World. The counter parts of imperative languages.

0 Upvotes

In a functional world.

Clean is functional for C Haskell is functional for C++ OCaml is functional for Java F# is functional for C# Scheme is functional for Lisp (almost literally)


r/functional • • May 25 '22

https://www.youtube.com/watch?v=MHkHhHICngA

0 Upvotes

Have you ever stopped to rethink your #Elixir programme's infrastructure?

Watch this video of Amy Null's talk 'Don't try this at home: Rethinking infrastructure with Elixir' at #CodeBEAM V America 2021 to learn more.

https://youtu.be/MHkHhHICngA


r/functional • • Sep 24 '09

Functional Programming at Facebook.

Thumbnail
vimeo.com
3 Upvotes

r/functional • • Mar 16 '16

2 arrays at once

0 Upvotes

Does anyone know a functional way to use two arrays at once? like turning

const first_name, last_name : [String]

into

const combined : [(String, String)] = // ????
const total_letters = combined.reduce // ect

r/functional • • Mar 15 '23

Build animatronics with Nerves | Flora Petterson | Code BEAM America 2022

0 Upvotes

Wanna build animatronics with #Nerves? Then this is the talk for you! Flora Louise shared her experience as a second-generation puppeteer building interactive animatronics with Nerves.

https://youtu.be/4Ulurej4NTg


r/functional • • Nov 28 '22

Improve your tests with Makina | Luis Eduardo Bueso De Barrio | Code BEAM Europe 2022

0 Upvotes

Improve your tests and learn more about Makina, the new test library for Elixirlang, compatible with PropEr and QuickCheck state-machine models.

This is Luis Eduardo Bueso De Barrio's talk from this year's last CodeBEAM Europe. https://www.youtube.com/watch?v=3FYglv8NccM


r/functional • • Jul 11 '22

Code & Homicide: What Software Developers Can Learn from Offender Profiling | Crux Conception & Adam Tornhil | ElixirConf EU 2022

0 Upvotes

Crux Conception & Adam Tornhill came together for #ElixirConf EU 2022 to investigate novel ways of analysing source code.

Watch the video to see this highly unique keynote!

https://youtu.be/WShenbgc47c


r/functional • • Feb 06 '08

Erlang/OTP R12B-1 has been released

Thumbnail
trapexit.org
4 Upvotes

r/functional • • Dec 19 '17

Functional Java: Streams

Thumbnail
medium.com
0 Upvotes

r/functional • • Mar 26 '17

Haskell Concepts in One Sentence

Thumbnail torchhound.github.io
5 Upvotes

r/functional • • Dec 20 '17

The Design of the Scalaz 8 Effect System - John A. De Goes

Thumbnail
youtube.com
1 Upvotes

r/functional • • May 13 '22

https://www.youtube.com/watch?v=sHWD3mtcwsA

1 Upvotes

Watch this video from last year's #RabbitMQ Summit 2021 where Michael Klishin introduced us to Khepri, an evolutionary approach to the schema database in RabbitMQ.

Learn more at: https://youtu.be/sHWD3mtcwsA


r/functional • • Oct 30 '16

Your Functional Programs Are Imperative Pumpkins

Thumbnail
blog.eventsourcing.com
1 Upvotes

r/functional • • Jan 23 '18

Functional Kotlin: Write a Custom Collector

Thumbnail
medium.com
1 Upvotes

r/functional • • Oct 27 '22

Slaying the Type Hydra, or How We Went from 12,000 Dialyzer Errors to None | Jesper Eskilson | Code BEAM Europe 2022

1 Upvotes

Have you ever tried running #Dialyzer on a large #Erlang project for the first time? Did you also get thousands of cryptic errors? Watch Jesper Eskilson's talk at #CodeBEAM Europe 2022 where he presented Klarna's case study!

https://youtu.be/4PZE40h13wM


r/functional • • Mar 04 '22

https://www.youtube.com/watch?v=Rp5UsMT-32E

1 Upvotes

Last year at #CodeBEAM V, Melinda Tóth introduced RefactorErl, a source code analysis and transformation tool for #Erlang. Check out the video below and learn some of RefactorErl's most useful features, such as; refactorings, code comprehension support, semantic queries, software complexity measures and more. https://youtu.be/Rp5UsMT-32E


r/functional • • Jan 27 '16

Functional Programming at Atlassian with Robbie Gates

Thumbnail
youtube.com
1 Upvotes

r/functional • • Sep 25 '08

Is it just me, or does the lisp logo remind everyone of the Big Bad Machine in the UN in The Animatrix?

0 Upvotes

r/functional • • Feb 06 '08

Getting Started with Scala

Thumbnail blog.spiralarm.com
1 Upvotes

r/functional • • Apr 01 '15

Custom Infix Operators in Haskell

Thumbnail
csinaction.com
1 Upvotes

r/functional • • Dec 10 '16

Stack safe Function composition

Thumbnail
medium.com
1 Upvotes

r/functional • • Jun 13 '22

BEAM + Prometheus + Grafana = Observability Heaven | Alex Koutmos | Code BEAM V America 21

1 Upvotes

Learn about the importance of application/system observability & how it can impact both the engineering & business sides of the house through Alex Koutmos talk 'BEAM + Prometheus + Grafana = Observability Heaven.'

Watch video at: https://youtu.be/0SkVsUdUutE


r/functional • • Jun 22 '14

The Lambda Calculus for Absolute Dummies (like myself) 2012

Thumbnail
palmstroem.blogspot.fr
8 Upvotes

r/functional • • May 18 '23

Understanding Elixir Processes and Concurrency.

2 Upvotes

Lorena Mireles is back with the second chapter of her Elixir blog series, “Understanding Elixir Processes and Concurrency."

Dive into what concurrency means to Elixir and Erlang and why it’s essential for building fault-tolerant systems.

You can check out both versions here:

English: https://www.erlang-solutions.com/blog/understanding-elixir-processes-and-concurrency/

Spanish: https://www.erlang-solutions.com/blog/entendiendo-procesos-y-concurrencia/