_______ __ _______ | |
| | |.---.-..----.| |--..-----..----. | | |.-----..--.--.--..-----. | |
| || _ || __|| < | -__|| _| | || -__|| | | ||__ --| | |
|___|___||___._||____||__|__||_____||__| |__|____||_____||________||_____| | |
on Gopher (inofficial) | |
Visit Hacker News on the Web | |
COMMENT PAGE FOR: | |
Rama is a testament to the power of Clojure | |
JonChesterfield wrote 1 hour 58 min ago: | |
Fragment sounds like actor to me. Stateful thing that sends messages to | |
other fragments. Not convinced that's a generalisation of a function. | |
throwaway_fjmr wrote 3 hours 59 min ago: | |
I worked on a few OSGi projects in the early 2000s. Rama and their | |
claims trigger funny vibes in me, OSGi meets K8s meets Clojure cult. | |
I'm looking forward to future releases, though. | |
mrkeen wrote 5 hours 3 min ago: | |
> Another example is Specter. Specter is a generically useful library | |
for querying and manipulating data structures | |
> [1] > MutableCell.Java. 8 years ago | |
package com.rpl.specter; | |
public class MutableCell { | |
private Object o; | |
public MutableCell(Object o) { | |
this.o = o; | |
} | |
public Object get() { | |
return o; | |
} | |
public void set(Object o) { | |
this.o = o; | |
} | |
} | |
Behold the power! | |
[1]: https://github.com/redplanetlabs/specter/tree/master/src | |
thih9 wrote 4 hours 38 min ago: | |
Simple and elegant, powerful indeed. | |
Or did you mean something else? In which case please elaborate. | |
blackeyeblitzar wrote 8 hours 26 min ago: | |
It seems really distasteful to take the name of an important religious | |
and cultural figure from a different country and appropriate it for | |
some pet project. | |
[1]: https://en.wikipedia.org/wiki/Rama | |
as1mov wrote 4 hours 36 min ago: | |
A genuine question, why is that a bad thing? The worst thing that | |
could happen is someone would get curious about the word and try to | |
learn more about it, consequently reading about Hindu mythology. | |
There's tons of material in Hinduism + Buddhism would be amazing if | |
adapted in books/movies/shows/games, but it hasn't happened because | |
everyone seems to be so touchy about it (despite the fact that the | |
religion itself doesn't have a singular book, god or commandments | |
specifying what's good/bad). | |
Also before the usual retort comes back, my family is Hindu. | |
nathanmarz wrote 6 hours 46 min ago: | |
It's named after the Arthur C. Clarke book. | |
labrador wrote 7 hours 9 min ago: | |
Except it has other meanings, not necessarily the Supreme Being. From | |
the link you shared: | |
RÄma is a Vedic Sanskrit word with two contextual meanings. In one | |
context, as found in Atharva Veda, as stated by Monier | |
Monier-Williams, it means "dark, dark-colored, black" and is related | |
to the term ratri, which means night. In another context in other | |
Vedic texts, the word means "pleasing, delightful, charming, | |
beautiful, lovely" | |
HexDecOctBin wrote 6 hours 50 min ago: | |
And neither of these meanings are relevant to the project, nor have | |
these meanings been widespread for at least last 2000 years. | |
labrador wrote 6 hours 11 min ago: | |
Why do they have to be widespread? | |
kaba0 wrote 6 hours 40 min ago: | |
Itâs also the concatenation of two, extremely common syllables, | |
so purely by chance one is ought to hit them. Like, where Iâm | |
from its the name of a margarine brand - is it also | |
misappropriating? | |
ThinkBeat wrote 13 hours 13 min ago: | |
I remember when the first time i read about Rama, | |
with the blog post about having duplicated Twitter scale | |
at 100x code or some such. | |
Which all in all, if you have built a platform/runtime/language | |
and you pick one particular example to highlight it, being able | |
to achieve XXXX% less than is trivial. | |
I was curious about all the bluster then, | |
Seeing this post I am somewhat disappointed that there does not | |
appear to have been a lot of visible progression. | |
But I guess it is still running semi stealth in private beta. | |
I will be interesting to see what becomes of it. | |
nathanmarz wrote 12 hours 47 min ago: | |
Indeed, we're in private beta and aren't publicizing much about what | |
we're doing. We'll eventually be releasing many case studies on how | |
our private beta users are using Rama. | |
titanomachy wrote 13 hours 55 min ago: | |
> At its core is a new programming language implementing a new | |
programming paradigm, at the same level as the âobject-orientedâ, | |
âimperativeâ, âlogicâ, and âfunctionalâ paradigm… | |
generalizes the concept of a function into something called a | |
âfragmentâ... a fragment can output many times (called | |
âemittingâ), can output to multiple âoutput streamsâ, and … | |
do more work between or after emitting. | |
This sounds really similar to programming with observables (e.g. RxJS), | |
is a "fragment" an even more general concept? | |
I used observables when I did frontend development, I found it a useful | |
paradigm (once I got my head around the idea). | |
nathanmarz wrote 13 hours 35 min ago: | |
A fragment itself is a generic programming construct that serves the | |
same purpose as a function (just more general). When used in Rama | |
topologies, they serve a similar role as observables in terms of | |
reacting to new data as it flows through and sending any amount of | |
information downstream to any number of output streams. | |
snitty wrote 14 hours 38 min ago: | |
>Ramaâs language is Turing-complete⦠| |
Amazing they could accomplish such a feat. | |
titanomachy wrote 13 hours 58 min ago: | |
This seems unnecessarily cynical, they're just stating one of the | |
design decisions that they made. When you design a new DSL you could | |
choose to make it Turing-complete (e.g. Ruby on Rails) or not | |
Turing-complete (e.g. Terraform's HCL). The point isn't that one is | |
more technically difficult to build than the other. | |
epolanski wrote 15 hours 10 min ago: | |
> Lisps have great control over what happens at compile-time, which | |
lets you do incredible things. | |
> Lisp programmers have struggled ever since it was invented to explain | |
why this is so powerful and why this has a major impact on simplifying | |
software development | |
I've written some Common Lisp, Scheme, Racket. | |
I like them. | |
But what op defines as a feature is actually what kills all those lisps | |
but Clojure where macro abuse is rare. | |
Everybody implementing their abstractions, every library implementing | |
their own language, I like those features, macros are fun, but it just | |
doesn't scale neither in open source and even less at work. | |
Haskell to some extent too suffers the same issue, simple Haskell is | |
nowadays a dead project, but every single project has different | |
language extensions, syntax, etc.. | |
I feel like Lisp and Haskell attract people that love programming more | |
than shipping code. | |
Which is why at the end of the day, php has more killer software than | |
all those languages combined. | |
defyonce wrote 4 hours 33 min ago: | |
> I feel like Lisp and Haskell attract people that love programming | |
more than shipping code. | |
this! but I find Clojure incredibly pragmatic, we grow our codebase, | |
ship things, just the line of business work with Postgres/Clojure and | |
Rum(React) on frontend. | |
We do it with super small team, where one person owns the entire sub | |
system | |
refset wrote 4 hours 20 min ago: | |
This is how I see things also. Clojure is extremely practical and | |
naturally attracts people that want to ship products. | |
The "Figma OSS Alternative" post that's also on the HN homepage | |
right now doesn't mention Clojure anywhere (no comments about it | |
either!), but Penpot is clearly also yet another app successfully | |
shipped using Clojure: | |
[1]: https://github.com/penpot/penpot | |
lispm wrote 6 hours 24 min ago: | |
> Everybody implementing their abstractions, every library | |
implementing their own language | |
In Lisp one can extend the language syntax. One does not need to | |
implement a new language. For example the Common Lisp Object System | |
adds operators like DEFCLASS, DEFMETHOD, DEFGENERIC, ... in addition | |
to already existing operators like DEFUN, DEFSTRUCT, DEFTYPE, | |
DEFPARAMETER, ... | |
Thus the language can be incrementally extended, instead of using a | |
completely new language. | |
The CLOS macros are used by many programmers, they were standardized, | |
documented and implemented. | |
As every form of abstraction, syntactic abstraction needs to be | |
learned and requires extra work. Lisp was from the start developed to | |
enable such things, and its early form of that applied to Lisp itself | |
were the Lisp interpreter evaluating s-expressions, FEXPRs | |
(procedured receiving unevaluated arguments) and in 1962 macros. | |
> I feel like Lisp and Haskell attract people that love programming | |
more than shipping code. | |
One of the purposes of Lisp was to implement new ideas: like | |
computing with mathematical formulas (-> Macsyma and earlier | |
attempts), computing theorems (-> ACL2 and earlier attempts), ... | |
This ability to support experimentation in R&D (actors, rule-based | |
systems, frame systems, ...) was always a part of the language | |
community. | |
If we look at the surviving commercial systems (Allegro CL and | |
LispWorks), they still support this feature set. | |
Clojure was developed as a Lisp-inspired functional language with | |
deep Java/JVM integration to support enterprise programming for | |
people who were tired of programming in Java. That's fine. But the | |
advice then was to not utilize the full power of Lisp (syntactic | |
abstractions), to address the fear of unmaintainable software, while | |
at the same time not using various features of Lisp (like gradually | |
typed implementations of Lisp like SBCL) which helps to write robust | |
software. | |
Generally Lisp has a broader outlook. It ran on an experimental | |
spacecraft, it powered autonomous robots inspecting pipelines, it was | |
the base for early research in computing (-> Interlisp), it ran on | |
calculators (HP RPL), it supported children education (Logo), it's | |
used to schedule telescope operations (-> Hubble and James Webb), it | |
is used to schedule airline/airport operations, ... | |
> php has more killer software than all those languages combined. | |
If we research for ground breaking software, then I bet over the long | |
history of Lisp there were a lot more in many more diverse domains | |
written in Lisp | |
Lisp has been applied to develop airplane parts. BOEING and Airbus | |
used to be Lisp users (they might be still use it for older planes). | |
ICAD was the first parametric CAD system. ICAD used macros to | |
describe physical objects and their relationships. This was used to | |
construct turbines, wings, and a lot of other parts of Airplanes. | |
If you look into the long history of Lisp, it has been successfully | |
applied in domains PHP has never seen. Sometimes really crazy stuff, | |
like the first virtual military troop training systems, where the US | |
army deployed a few extensive training and simulation systems, where | |
the virtual worlds were controlled & generated by a Lisp system and | |
rendered by multiple graphics engines for each training simulator. In | |
the early 80s. -> [1] That's nothing like PHP, but it was ground | |
breaking in its domain. PHP had a different purpose: it was developed | |
to make it simple to write&generate web pages in a large scale. | |
That's a huge domain, but that was not what Lisp was developed for. | |
Btw., we see a bunch of new languages which now also support some | |
form of macros. A recent example is Rust. | |
[1]: https://en.wikipedia.org/wiki/SIMNET | |
fr4nkr wrote 13 hours 12 min ago: | |
I've used Lisps on and off for a decade or so, and my experience with | |
it is pretty much in line with the Grammarly devs' summary: misuse of | |
macros is one of those things people just assume is a major problem, | |
but in reality is quite rare, even in cases like Emacs Lisp where | |
most packages are developed by just one person. Lisp is not Perl, its | |
users do not create spaghetti mazes for fun. | |
ww520 wrote 13 hours 26 min ago: | |
For compile time control and meta programming, I found Zig's comptime | |
system to be the best. It blends with the regular syntax seamlessly | |
and solves several problems at the same time. It's one of the best | |
things came out of language design in recent years. | |
fiddlerwoaroof wrote 14 hours 4 min ago: | |
This is one of those perpetual myths about macros. Ruby on Rails | |
metaprogramming is often harder to debug than macros in Common Lisp. | |
Flink and Spark work by generating and loading Java code at runtime | |
(macros) but, since Java has no language-level support for macros, | |
the generated code is very hard to inspect and debug. | |
What killed most lisps was the AI Winter and the concurrent drying up | |
of DARPA funding. | |
epolanski wrote 12 hours 54 min ago: | |
I don't think I've expressed myself well. | |
When I say software at scale I mean: | |
- going on GitHub opening a file and understanding what's happening | |
- reviewing a PR and figuring out stuff without requiring an ide | |
- having easy onboarding with devs already accustomed to a base | |
language and its patterns | |
Java, C, TypeScript, Scala, Kotlin, etc. Pretty much all major | |
languages offer this: less power but much less ambiguity and mental | |
overhead. | |
Lisps (with a minor exception for clojure) and Haskell are just not | |
those languages. | |
Which, again, is why all of those languages produced very little | |
software worth of mentioning for decades. | |
tome wrote 4 hours 6 min ago: | |
That's interesting, because to hit all those points I'd prefer | |
Haskell! I've never found another language where it's so easy to | |
jump into an unfamiliar codebase, or to come back to code I wrote | |
years ago and get started again immediately. By contrast, I | |
don't think I could read idiomatic Java without requiring an IDE | |
to help me navigate. | |
fulafel wrote 8 hours 11 min ago: | |
There's a place for languages that are the COBOL of their niche, | |
yes. Depending on how you look at it, they are DSLs too. | |
Javascript in the browser is actually an interesting case here. | |
(And after Javascript spralwed out... ClojureScript is the nicest | |
way to write React apps) | |
jimbokun wrote 9 hours 56 min ago: | |
Scala??? | |
The language that never met an abstraction it didnât | |
immediately incorporate into itself? | |
fiddlerwoaroof wrote 12 hours 48 min ago: | |
And this is just not true: Iâve worked on large lisp programs | |
in various situations with minimal documentation and done just | |
fine. | |
MH15 wrote 15 hours 18 min ago: | |
I think we've spent a lot of time looking at backend and frontend web | |
app development as separate. In my work, TRPC ( [1] ) solved this. I | |
hope others in different frameworks find a similar solution soon. | |
[1]: https://trpc.io/ | |
jimberlage wrote 16 hours 12 min ago: | |
Is anyone using Rama at scale? This isn't a complaint about it being | |
closed-source, people have to make their money somehow. But I've seen | |
a lot about Rama's scale when the only things to check the claim are a | |
private beta and a single-process dev build. | |
I'm super curious to hear from people who have tried it for larger | |
projects! | |
nathanmarz wrote 16 hours 10 min ago: | |
A few of our private beta users are using Rama at larger scale (>1M | |
appends/second). We'll be publishing case studies eventually. | |
metadat wrote 16 hours 15 min ago: | |
> Rama can build end-to-end backends at any scale on its own in a tiny | |
fraction of the code. At its core is a new programming language | |
implementing a new programming paradigm.. | |
Grand claims, but where are the super powerful demo apps? The getting | |
started docs are a trickle of info.. [1] The "demo gallery" has a few | |
cherry picked examples, but I don't see how this fulfills the claim of | |
a "new paradigm". I wanted to be blown.. but this ain't it. [2] Oof. | |
[1]: https://redplanetlabs.com/docs/~/operating-rama.html#_accessin... | |
[2]: https://github.com/redplanetlabs/rama-demo-gallery | |
kitd wrote 5 hours 7 min ago: | |
Tbf, the purpose of the blog is to talk about the power of | |
Clojure/Lisp for defining the new paradigm, rather than the paradigm | |
itself. Though the author then goes on to talk about "fragments" as | |
the basis for the new paradigm. | |
The first sentence has a link to the project page which has most of | |
the info you need. | |
smackeyacky wrote 11 hours 34 min ago: | |
Not even a code sample in the article. You'd think if they were so | |
convinced it was a new paradigm we'd see why. Makes me skeptical. | |
nathanmarz wrote 11 hours 27 min ago: | |
It's an article about Clojure's influence on Rama, not an | |
introductory tutorial on Rama. But we have plenty of code samples | |
elsewhere: [1] [2] [3] | |
[1]: https://github.com/redplanetlabs/rama-demo-gallery | |
[2]: https://github.com/redplanetlabs/twitter-scale-mastodon | |
[3]: https://blog.redplanetlabs.com/2023/10/11/introducing-rama... | |
[4]: https://redplanetlabs.com/docs/~/tutorial1.html | |
cactusfrog wrote 14 hours 41 min ago: | |
The Clojure community is extremely cult like. I worked with a dev who | |
tried to push Datomic, and despite the huge flaws with his system, | |
and the fact that it was closed source, he would continuously tout | |
how much better it was than a relational database. I donât believe | |
the hype. | |
undershirt wrote 11 hours 56 min ago: | |
I know our engineering discipline is in shambles, but there are | |
probably better ways to argue against hype without ourselves using | |
hyperbole. | |
cactusfrog wrote 10 hours 41 min ago: | |
I donât believe Iâm exaggerating. You can replace | |
âClojureâ with âJesusâ in the linked article and it … | |
makes sense. | |
hu3 wrote 11 hours 17 min ago: | |
Closed source is enough reason in my book. | |
geodel wrote 15 hours 38 min ago: | |
Well there is whole bank transfer implementation there and thoroughly | |
commented too. Some entrepreneur can take this and run with it to | |
create next generation banking platform. | |
sokoloff wrote 3 hours 57 min ago: | |
Maybe they could call their new Clojure-based bank Nubank. | |
erichocean wrote 1 hour 53 min ago: | |
Obv. Unicorn potential. | |
ntonozzi wrote 15 hours 53 min ago: | |
Here's an example of the backend code: [1] It certainly looks like it | |
does a lot with their DSL, but as a newcomer it's really hard to | |
parse. | |
[1]: https://github.com/redplanetlabs/twitter-scale-mastodon/blob... | |
nathanmarz wrote 15 hours 41 min ago: | |
I suggest starting with the tutorial and the heavily commented | |
examples in rama-demo-gallery, linked below. [1] | |
[1]: https://redplanetlabs.com/docs/~/tutorial1.html | |
[2]: https://github.com/redplanetlabs/rama-demo-gallery | |
mintplant wrote 12 hours 14 min ago: | |
Any examples of the Clojure version? | |
nathanmarz wrote 12 hours 3 min ago: | |
All the examples in rama-demo-gallery have both Java and | |
Clojure versions, including tests. There's also the | |
introductory blog post for the Clojure API which builds a | |
highly scalable auction application with timed listings, bids, | |
and notifications in 100 LOC. | |
[1]: https://blog.redplanetlabs.com/2023/10/11/introducing-... | |
nathanmarz wrote 16 hours 12 min ago: | |
Check out twitter-scale-mastodon, which is an implementation of | |
Mastodon's backend from scratch that scales to Twitter scale. It's | |
more than 40% less code than Mastodon's backend and 100x less code | |
than Twitter wrote to build the equivalent. [1] | |
[1]: https://github.com/redplanetlabs/twitter-scale-mastodon | |
[2]: https://blog.redplanetlabs.com/2023/08/15/how-we-reduced-the... | |
finnh wrote 16 hours 0 min ago: | |
> These numbers are a bit better than Twitterâs numbers. Because | |
of how unbalanced the social graph is, getting performance this | |
good and this reliable is not easy. For example, when someone with | |
20M followers posts a status, that creates a huge burst of load | |
which could delay other statuses from fanning out. How we handled | |
this is described more below. | |
Huh. I haven't written myself a twitter, but I've always assumed | |
that this problem is solved by a mix of fan-on-write and | |
fan-on-read. Most people are fan-on-write, but those with a | |
follower count > $THRESHOLD are fan-on-read. | |
The fan-on-read set is small enough to be easily cacheable, so the | |
extra reads required to service a follower's feed are more than | |
compensated for by the fact that the content is in RAM in a cache. | |
Sounds like RedPanda went exclusively with fan-on-write. I'd be | |
surprised if Twitter does the same - but it sounds like OP has more | |
knowledge about this than me, so I'm happy to be educated! | |
nathanmarz wrote 15 hours 38 min ago: | |
The chronological timeline at Twitter fans out on write. This | |
makes sense when you consider that the most important application | |
metric is the latency to load the timeline. That latency is a lot | |
lower when you only need one query on the materialized timeline | |
rather than a ton of queries for everyone you follow. | |
finnh wrote 14 hours 34 min ago: | |
Good to learn, thanks. "Everyone you follow" isn't quite what | |
I was saying, but I also don't use twitter so I'm doubly in the | |
dark here. | |
I'm surprised that someone with, say, a Twitter problem and | |
tens of millions of followers - the two seem to go hand-in-hand | |
- drives tens of millions of writes every time they post. But | |
there you go, learned something today. | |
fizx wrote 14 hours 7 min ago: | |
I was tech lead on that subsystem for a little while in 2010. | |
A lot of smart people thought about the hybrid approach, | |
either by using the search index to drive the timeline or | |
building a custom ring-buffer-based index of all tweets. | |
Ultimately two systems are harder to maintain than one, | |
custom indices are hard, and the low-complexity approach | |
dominated a higher-performance approach. | |
Also, contrary to popular opinion, we didn't go down when | |
Justin Bieber tweeted, but we did have elevated error rates | |
when large quantities of Justin Bieber followings put | |
pressure on the MySQL row lock of his following count. In | |
retrospect, lock striping would have helped, but the | |
migration would have been horrific. | |
nathanmarz wrote 14 hours 30 min ago: | |
Back in the days of the fail whale, Twitter would go down | |
when Justin Bieber tweeted because their system couldn't | |
handle the load. | |
metadat wrote 16 hours 7 min ago: | |
> Running on a real cluster | |
> Until Rama is publicly available, the only way to get access to | |
the full Rama release is by applying to our private beta. | |
I thought it was coming out last August? What happened? | |
(As per your link, [1] ) | |
Edit: @nathanmarz that's cool you have enough interest to keep | |
things moving with it being private. I'm only interested in open | |
solutions for this domain, though. IMO, accepting lock-in is a lot | |
to ask. | |
Best wishes ~ MD | |
[1]: https://blog.redplanetlabs.com/2023/08/15/how-we-reduced-t... | |
nathanmarz wrote 16 hours 4 min ago: | |
We released the public build last August, which can be used to | |
experiment with Rama. Details on that are at the link below. | |
Otherwise, we're still in private beta and access to the full | |
Rama release to run real clusters is just for private beta users. | |
[1]: https://redplanetlabs.com/docs/~/downloads-maven-local-d... | |
<- back to front page |