Earlier quoted context omitted.
Interesting project! Could you explain what you mean by "since the references are not normalized in the formulas, they can't repeat them even when they behave identically"? Do you mean the normalization from A1 to R1C1 that you mention later in the post or something else?
Yes, I mean exactly that. :- )
Clojure’s Approach to Identity and State (2008)
61–69 of 69 posts
Re: Clojure’s Approach to Identity and State (2008)
#62Earlier quoted context omitted.
Yes, I mean exactly that. :- )
How does this normalization affect being able to repeat formulas (or references in formulas)?
The common pattern in spreadsheets is to have a set of columns of repeated formulas. i.e.
| A | B | C | D |
|-----|-----|----------------|-----|
1 | | | | 0.12|
2 | 42| 42| =A2*B2+C1*$D$1 | |
3 | 69| 69| =A3*B3+C2*$D$1 | |
Where, you'll note, although the function and reference shape in C2 and C3 is identical, the text is not.Whereas, with R1C1-type references.
| 1 | 2 | 3 | 4 |
|-----|-----|----------------------------|-----|
1 | | | | 0.12|
2 | 42| 42| =RC[-2]*RC[-1]+R[-1]C*R1C4 | |
3 | 69| 69| =RC[-2]*RC[-1]+R[-1]C*R1C4 | |
The text of the formula is exactly the same in both copies.This makes it a lot cheaper to deduplicate them, because we don't need to run the whole parser on the 400k+ formula invocations in our sheet, and then compare the ASTs rather than text; since in this form, there are only a few thousand unique expressions rather than a few hundred thousand.
Re: Clojure’s Approach to Identity and State (2008)
#63I prefer a programming language that allows me to pick and choose which paradigms I want to follow-- whether OOP or FP, mutable or immutable, etc. I don't need Clojure to do that for me.
Personally, I am trying to figure out why a closed source language is producing such activism-- trying to increase the popularity importance of the language... despite the fact that it's a privately owned language-- not really "open source"-- everything flows through one man & his company, which come first & above, regarding the language's development.
Rich Hickey: [Paraphrasing] "Open source isn't about you. I created this, it's mine, and I'll change it when and how I choose."
Clojure Community: "Hey, let's try to get more people into Clojure! Let's increase this community!"
Re: Clojure’s Approach to Identity and State (2008)
#64Earlier quoted context omitted.
How does this normalization affect being able to repeat formulas (or references in formulas)?
While spreadsheets usually display references as though they refer to a specific cell (i.e. A3, B2, etc.), but underneath, the references are relative (unless specifically made absolute, with $ in the case of A1). The common pattern in spreadsheets is to have a set of columns of repeated formulas. i.e. | A | B | C | D | |-----|-----|----------------|-----| 1 | | | | 0.12| 2 | 42| 42| =A2*B2+C1*$D$1 | | 3 | 69| 69| =A…
Re: Clojure’s Approach to Identity and State (2008)
#65I've tried Clojure. I prefer a programming language that allows me to pick and choose which paradigms I want to follow-- whether OOP or FP, mutable or immutable, etc. I don't need Clojure to do that for me. Personally, I am trying to figure out why a closed source language is producing such activism-- trying to increase the popularity importance of the language... despite the fact that it's a privately owned language…
Rich has a fairly strict development approach and wants to personally review and approve all changes to the core. There are complaints about that process, and that's fair. But as far as I have seen, most large, successful projects have similar personalities leading them (Stallman, Linus, Larry Wall, Guido...).
Finally, I should add -- if what you are looking for is software freedom... then you should absolutely consider using a Lisp like clojure. Lisp's give you the power to control your language through macros and non-core libraries. Unlike other languages, you do not need a core development team to make language changes for you. Perhaps this is why clojure is so powerful... because the core process issues you have heard about are not actually that important, and in fact the language itself enables substantially more software freedom than perhaps you are giving it credit for.
Re: Clojure’s Approach to Identity and State (2008)
#66Earlier quoted context omitted.
While spreadsheets usually display references as though they refer to a specific cell (i.e. A3, B2, etc.), but underneath, the references are relative (unless specifically made absolute, with $ in the case of A1). The common pattern in spreadsheets is to have a set of columns of repeated formulas. i.e. | A | B | C | D | |-----|-----|----------------|-----| 1 | | | | 0.12| 2 | 42| 42| =A2*B2+C1*$D$1 | | 3 | 69| 69| =A…
Thanks for the explanation. I was confused about the meaning of "repeat". It's a missed opportunity that ODS doesn't store formulas as ASTs in the first place.
It's really for the best that they don't. ODS is XML, so they'd probably make the AST XML as well, which would outrageously oversized.
Re: Clojure’s Approach to Identity and State (2008)
#67Earlier quoted context omitted.
I recall he was big into SBCL, but most IT organizations wanted all code to run on the JVM or CLR. So he had to make a Lisp to run on the JVM and Armed Bear Common Lisp apparently wasn't exactly what he wanted. I want to learn Clojure, but there are definitely some road blocks. I don't have the time for Emacs, it'd be a pain to get a Cursive license (although the cost is extremely reasonable I'd have to do paperwork…
If you're learning Clojure then you can use cursive for free until you go commercial with it?
Re: Clojure’s Approach to Identity and State (2008)
#68Earlier quoted context omitted.
Can you give me the ELI5 on STM & the Actor model? The article points out why Actor has issues, but I don't fully understand STM.
Identities change their associated values (state) by transactions. That means that from the viewpoint of concurrent observers (threads), partial or interrupted updates are never seen - the update is either 0% or 100% completed. In Software Transactional Memory, that can be accomplished with atomic swaps. In Clojure, a new value, no matter how large, is constructed and the transaction is completed by repointing a muta…
Re: Clojure’s Approach to Identity and State (2008)
#69Immutability is very helpful, and the connection between values and identity is illuminating. But there have been very important developments in programming languages since this post/page was written: notably, the introduction of "borrow checking" (exemplified by Rust's implementation). Borrow checking has a very significant positive effect on the sustainability of imperative code, which makes the claim that "imperat…
This is a very great point that I’d like to highlight. The main problem with languages of today is shared mutable state. It’s the default in every major language, and it is the wrong default because of the inherent complexity it brings. You can avoid this complexity by killing either one of the adjectives: shared OR mutable. Immutability is generally pitched as the only way to solve this problem, and it is definitely…