You are viewing archived messages.
Go here to search the history.

Prabhanshu Gupta 2023-12-14 10:04:32

I'm making a system for working with loosely structured tables in spreadsheets. Tables/lists in sheets represent collections of things, however formulas and drag-filling works at an item-level (cell-level) abstraction. This causes a lot of problems – duplicated effort, hard to do lookups across tables, errors when new data is added. However, committing to a structure upfront (a SQL style table for example) has a big cost. An effective system would allow users to gradually introduce structure that works with whatever rich table they draw.

Right now I'm onto a language for pulling data from such rich tables. It works by manipulation of the ranges (rectangles) pointed to by Labels. Queries can be made by intersecting/unioning rectangles (in picture is a small example). What ideas/projects would you recommend looking at in this space? I've looked around a fair bit for "2D grammar" and "spatial programming language" but haven't had much luck.

image.png

Prabhanshu Gupta 2023-12-14 10:07:32

Some free-form tables as example.

image.png

Nilesh Trivedi 2023-12-14 11:47:44

Not directly related to your experiments but I'd love to have a reactive data management app where I can create atoms(name-value pair), objects/dicts (set of atoms, name being the unique key), flat tables (sequence/list of objects) and then be able to create new values with formulas referring to any of these. Spreadsheets mix up data structures and presentation which I dislike.

Prabhanshu Gupta 2023-12-14 11:56:08

Also slightly unrelated: What would be the ideal way for you to access said data from outside the app?

Nilesh Trivedi 2023-12-14 11:57:18

The whole file would be just a json object.

William Taysom 2023-12-15 09:30:21

Knee-jerk reaction (coming from having thought about related issues for years and years). At the deep level, I find it best to keep track of functional/cardinality dependencies: a given employee has a name, age, salary; a team has multiple employees on it and an employee can be on multiple teams. That way you can pay less attention to the exact organization of tables. Instead focus on a richer grammar for views. I'm especially fond of grouping, which if you think about it, is a lot like currying a function.

In my work, I often have a compound key —given a time, place, and person, you have a unique event of some sort — and then it makes sense to talk about events, but you also want to pretty freely switch between places or people and still retain the context.

Ivan Reese 2023-12-16 20:09:09

In linguistics, we have "denotation" and "connotation" as two forms of meaning. In programming, we have denotational semantics and operational semantics. Do we have connotational semantics? (If not — may we?)

Personal Dynamic Media 2023-12-16 20:22:01

We have idioms and design patterns which, when recognized by a reader, carry connotations.

Whether that's a good thing or a bad thing is debatable.

Paul Graham has argued that the presence of design patterns in a language indicates an inability to create the abstraction you really need. For example, he has compared design patterns to manual macro expansions.

twitter.com/paulg/status/1409386827803410436

Peter Norvig is rumored to have said "Design patterns are bug reports against your programming language."

He also pointed out how many standard design patterns become unnecessary in a sufficiently dynamic language.

norvig.com/design-patterns

🐦 Paul Graham (@paulg) on X: @stylewarning "Design patterns" (= macroexpansions)

Ivan Reese 2023-12-16 20:31:52

My sense is that every (say) adjective in human language both denotes and connotes distinct meanings. Does every programming construct connote something? Is this where the debate over the meaning of reduce vs loop emerges?

Personal Dynamic Media 2023-12-16 20:38:09

My first instinct is to say the connotation is (ideally) the programmer's intent. I'm not certain yet whether I believe that, but starting from there...

I think this does seem relevant to discussions about language features specifically meant to iterate over a range of numbers or the members of a collection, versus something more generic like the for loop in C.

One could argue that the distance between denotation and connotation is greater with a generic for loop than it is with a loop structure specifically meant to iterate over the members of a collection, and by reducing the difference between denotation and connotation you reduce the intellectual difficulty of reading the code, and you make it easier for the compiler to infer the programmer's intent for purposes of optimization.

Ivan Reese 2023-12-16 20:57:18

I'd go further — I think there's a bit of a low-brow ~stink~ on using a for loop when (say) mapping would be more elegant, and (right back at them) a bit of a high-brow stink on anything fancier than a loop. Like, our programming constructs have a culture around them. The choice of construct connotes something about the person who wrote the code.

Ivan Reese 2023-12-16 20:58:18

(A word can connote more than one meaning simultaneously, right?)

Personal Dynamic Media 2023-12-16 20:59:46

Of course. I'm not a literary type, but I think that's where many of the so-called layered meanings in literature and poetry come from.

Ivan Reese 2023-12-16 20:59:57

So perhaps the connotational semantics are tied up with the reasons that a construct is added to a language.

Personal Dynamic Media 2023-12-16 21:00:06

And a word can definitely denote more than one meaning simultaneously. That's where puns come from!

Personal Dynamic Media 2023-12-16 21:02:19

So perhaps the connotational semantics are tied up with the reasons that a construct is added to a language.

That might be where some of them start, but I think connotations, like idioms, grow within the shared understanding of a community.

Personal Dynamic Media 2023-12-16 21:03:04

Disclaimer: I've given this no serious thought before, so I may have totally different opinions tomorrow.

Jimmy Miller 2023-12-16 22:26:58

I definitely think different language constructs carry connotations. Don’t know any work specifically about it. But am reminded of this I saw the other day. interconnected.org/home/2023/12/05/code

📝 The subjective experience of coding in different programming languages

Posted on Tuesday 5 Dec 2023. 687 words, no links. By Matt Webb.

Eli Mellen 2023-12-16 22:34:06

Barthes!

For Barthes connotation and denotation are different orders of “signification.”

He suggested that the construction of myths results in two levels of signification: the “language-object”, a first order linguistic system; and the “metalanguage”, the second-order system transmitting the myth.

Where the language-object refers directly to some thing, and metalanguage is used to convey meaning in the mode of myth!

Eli Mellen 2023-12-16 22:34:57

(this is sort of foundational to a lot of marxist readings of stuff, so…a marxist programming?)

Eli Mellen 2023-12-16 22:35:58

📝 Connotation and Denotation

Connotation and Denotation are crucial concepts in Semiotics, Structuralism, Marxism, Cultural Studies and in the entire realm of literary and cultural theory. Denotation refers to the primary sign…

Eli Mellen 2023-12-16 22:39:19

📝 denotation and connotation

"denotation and connotation" published on by null.

Tom Lieber 2023-12-17 03:00:29

Ivan, were you ever a Rubyist? I was, in the early 2000’s when there were dozens of DSLs for any particular task, and the various sources of connotation described in this thread were in full force—syntactical, tribal, brow-based. Whether and when you chose to write { and } or “do” and “end” (which are basically equivalent) could make me feel at home in a file or like a foreigner, because it said something about who you learned Ruby from or which language you just came from. It probably wasn’t a special time or language, but it’s something I noticed because I was in a community that reveled in it.

Ivan Reese 2023-12-17 03:06:58

Yeah, that's a great example of what I'm thinking.

Personal Dynamic Media 2023-12-17 03:45:28

Not sure exactly what the different styles connote, but there used to be holy wars over indentation styles.

en.m.wikipedia.org/wiki/Indentation_style

catb.org/jargon/html/I/indent-style.html

Perl has an especially idiom heavy culture. I still remember thinking through "do_something(..) || die(...);" the first several times I saw it.

I once worked on a code base where the standard way of doing something i times was "while(i--) {...}". THAT took some getting used to.

📝 Indentation style

In computer programming, an indentation style is a convention governing the indentation of blocks of code to convey program structure. This article largely addresses the free-form languages, such as C and its descendants, but can be (and often is) applied to most other programming languages (especially those in the curly bracket family), where whitespace is otherwise insignificant. Indentation style is only one aspect of programming style. Indentation is not a requirement of most programming languages, where it is used as secondary notation. Rather, indenting helps better convey the structure of a program to human readers. Especially, it is used to clarify the link between control flow constructs such as conditions or loops, and code contained within and outside of them. However, some languages (such as Python and occam) use indentation to determine the structure instead of using braces or keywords; this is termed the off-side rule. In such languages, indentation is meaningful to the compiler or interpreter; it is more than only a clarity or style issue. This article uses the term brackets to refer to parentheses, and the term braces to refer to curly brackets.

Tom Lieber 2023-12-17 05:16:59

I love this question. I’m still thinking about it.

I thought of a few mundane examples of when designers intentionally smuggled connotations into the language: “foo!” as syntax for ~unsafely~ removing null from foo’s type, and “foo?.bar” for when we’re ~unsure~ whether foo exists. These are good.

But man, I can’t think of instances as universally relatable as we have in prose. Like syntax for ~begrudgingly~ implementing an interface, or ~timidly~ asserting a precondition, or ~sarcastically~ implementing a can’t-happen branch, or ~apologetically~ throwing an exception. I can’t think of a way, without a comment, to tell a reader that the following code ~seems~ to work but I’ve only ever run it once so be careful. Put it in the top-level instead of packaging it up in a function? What about self-confident code?

Do I just have a huge blind spot for these things, though? I recently learned that TypeScript has two syntaxes for declaring object types. I use them both regularly, but I never spared a conscious thought for their concurrent existence. I would use one to evoke OCaml-ness and the other, Java-ness. Total autopilot. All vibes.

Arvind Thyagarajan 2023-12-17 06:12:05

i'm finding it hard to imagine connotation without emotion; which (clearly) is unnecessary in the parts of the programme that deliver machine instructions (so far!) -- but there's space for it in the parts of the programme that are mean to be read, admired, spread, taught, debated, timecapsuled, encultured...

Timothy Johnson 2023-12-17 06:18:35

The best thing I've learned from following @James Koppel is that the design of a program is something different from the code. Sometimes it's not even possible to recover the design from just the source code: pathsensitive.com/2018/01/the-design-of-software-is-thing-apart.html.

But you can make your intentions clearer, and one way is through the connotations of your code. The programmatic structures and the variable names that you choose both communicate something about the design.

I believe most of the bugs that I've written in the past year happened because the design of a component changed and the implementation didn't.

At that point, the code may still "work" just fine in its current form (i.e., it returns the correct output for any input). But if so, it works by coincidence rather than by design.

Another way to say this is that the connotations of the code implicitly make promises about the behavior. And if those promises are no longer guaranteed by the design, it becomes very easy to create bugs by calling a function in a way that seems natural, but has unintended side effects.

📝 The Design of Software is A Thing Apart

Big up-front planning phases are out. Rapid iteration is in. With all this movement towards agile, it’s increasingly tempting to throw ou...

Ivan Reese 2023-12-17 06:23:10

In (human) language, where do connotations come from? Do they emerge from popular usage? Somewhere else? Multiple factors?

Would ~connotational semantics~ come from a similar source?

Jack Rusher 2023-12-17 10:33:35

Not in the programming languages themselves (see also: content-free grammars), but sometimes at the meta level between the programmers (see: examples upthread).

Eli Mellen 2023-12-17 12:42:50

Would ~connotational semantics~ come from a similar source?

I think this is a fascinating question, and also points to the phrase “semantics” being a wee bit overloaded in English, maybe?

Like, there is a semiotics to a program —

  • the “physical” source symbolizes a program’s intent
  • but then also it’s compilation or reduction for execution is sort of the purpose behind it made “real”

As for where connotations come from, they are the exciting bit of programming to me, I think — the connotation of an image, say, is varied and dependent on how it’s interpreted, and what you understand to inform that image — the more abstract the image, the more you can sorta say the connotation is “closer” to alignment with the image itself.

With a program when do you start thinking about a it’s connotations? When it’s source in an editor? When it’s been compiled? When it’s been run?

Mark Dewing 2023-12-17 16:51:25

There's the old joke that "a sufficiently determined programmer can write Fortran-77 in any language". Learning the syntax of a language is pretty easy (or at least straightforward). What takes longer is learning the 'spirit' of a programming language. Or learning common idioms in how particular tasks are done in a programming language.

Personal Dynamic Media 2023-12-17 17:02:41

In (human) language, where do connotations come from? Do they emerge from popular usage?

My first guess would be that they emerge from the frequent usage of a word or phrase in combination with some other word, phrase, or idea. When this happens often enough, the word or phrase evokes images or feelings associated with the other word, phrase, or idea.