Functional Programming India 🇮🇳《ミ》λ≡

1K posts

Functional Programming India 🇮🇳《ミ》λ≡ banner
Functional Programming India 🇮🇳《ミ》λ≡

Functional Programming India 🇮🇳《ミ》λ≡

@FunctionalIndia

Uniting Functional Programming Language enthusiasts across India. Discussions on https://t.co/dIBZ5Jqs3I. Bsky: https://t.co/jPZ6faePR6

India Katılım Şubat 2020
344 Takip Edilen509 Takipçiler
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Rúnar
Rúnar@runarorama·
Fil-C is pretty cool. A garbage-collected fully source-compatible C that turns unsafe memory access into segfaults? Freaking great. It's not compile-time checking, but it is something, and something is often better than nothing.
English
6
4
82
3.2K
Rúnar
Rúnar@runarorama·
Vibe coding is all the rage, but is anyone thinking about vibe computing? A machine that adapts its interface to the user's intent and context. Where current OSes fix tasks into static apps, the Vibe Computer fluidly generates the right interaction for each moment.
English
4
3
9
1.4K
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
John Carmack
John Carmack@ID_AA_Carmack·
When I started working in python, I got lazy with “single assignment”, and I need to nudge myself about it. You should strive to never reassign or update a variable outside of true iterative calculations in loops. Having all the intermediate calculations still available is helpful in the debugger, and it avoids problems where you move a block of code and it silently uses a version of the variable that wasn’t what it originally had. In C/C++, making almost every variable const at initialization is good practice. I wish it was the default, and mutable was a keyword.
English
188
184
3.2K
299.9K
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Debasish (দেবাশিস্) Ghosh 🇮🇳
If you can only learn two languages, they should be: 1. one of (Rust, Zig) - will teach you to program at a lower level of abstraction, more aligned with the underlying hardware 2. one of (Haskell, Scala, OCaml) - will teach you to program at a higher level of abstraction
Pekka Enberg@penberg

If you can only learn two languages, they should be: Rust TypeScript

English
24
12
223
52K
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Rick
Rick@rickasaurus·
The greatest trick Rust ever pulled was turning all of my functional programmer homies into systems programmers.
Debasish (দেবাশিস্) Ghosh 🇮🇳@debasishg

Mostly working in Rust but keeping a curious eye on Zig - it's always interesting to compare the techniques offered by the two. That reflects a lot on the philosophy of language design that they embrace .. Here are four ways to model “interfaces” in Zig (and they compare to Rust traits) .. 1. Generics / duck typing (comptime) • fn foo(T: type, x: T) and require T to have certain funcs • Zero runtime overhead, no vtables, fully non-intrusive • Equivalent to Rust’s static dispatch 2. Tagged unions + switch • Store a tag + data, switch on the tag • Great cache density when you iterate a big array, no function pointers • Often the fastest in hot loops with many objects • Equivalent to Rust's enum + match 3. Manual trait objects (ptr + const VTable) • Every type defines one const vtable, instances carry a pointer to it • Memory overhead per instance: just one pointer (for the vtable) plus your data pointer if you wrap it • No duplication of the function-pointer list across N instances • Very close to Rust’s &dyn Trait fat pointer model 4. Inline function pointers (intrusive AoS layout) • Use this pattern for hot paths where you never keep big arrays of them. If you create lots of objects like this, you duplicate those function-pointer fields. • That grows your stride, hurts cache density, and increases copy/memmove cost • You do save one indirection (you can call s.draw(s) directly), but the win is usually tiny compared to the cache hit you take in object-dense workloads • In Rust you can implement this with structs with fn fields or strategy objects (e.g., struct X { op: fn(&Self) -> … }) and more flexibly, Box fields. But it's not widely used - rather the trait object approach is preferred.

English
6
13
357
30.7K
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Evgeny Gazdovsky
Evgeny Gazdovsky@gazdovsky·
The realtime cooperative scheduler for the bare metal
Evgeny Gazdovsky tweet media
English
2
2
14
4.1K
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Evgeny Gazdovsky
Evgeny Gazdovsky@gazdovsky·
Yet another device powered by Haskell
English
2
1
6
553
Functional Programming India 🇮🇳《ミ》λ≡ retweetledi
Jakub Kozłowski
Jakub Kozłowski@kubukoz·
free monads are nothing short of magic
English
5
4
24
3.5K