shalabh
07/01/2023, 1:59 AMKevin Greer
07/01/2023, 2:10 AMshalabh
07/01/2023, 2:14 AMKartik Agaram
link
called `inline`: you don't need to click, you just see the contents of the destination in place. A combination of link
and inline
might subsume lots of ideas like Subtext and Brief ()shalabh
07/01/2023, 4:09 AMclass T: ...
def f1(a: T): ...
def f2(b: T):
f1(b)
The T
annotation in both function definitions link to the class definition. The f1()
call links to the f1
function definition.
Any mutually recursive definition will form cycles.
Note also the hypertext objects here are individual definitions and dont impose any language semantics.
Not sure I understood the inline
idea. Are you talking about transclusion?Kartik Agaram
shalabh
07/01/2023, 4:13 AMinline
any refererence makes sense. Any hard link should be inline-able by the reader. I don’t think the writer has to decide if the link should be inlined or not.Kartik Agaram
Konrad Hinsen
07/01/2023, 6:44 AMKongwei Ying
07/01/2023, 11:45 AMshalabh
07/01/2023, 10:10 PMKartik Agaram
shalabh
07/02/2023, 12:45 AMWhere do you imagine the hyperlinks going to, other definitions?Yes and also derived definitions (eg objects created via meta programming) and even runtime traces can link back to the definition objects.
I’m wondering if the ability to click on hyperlinks is all we’re discussing.Good question. Clickable links between source definitions exist in many environments. Even vscode lets me do that with most of my programs. However this is typically implemented as a layer on top of the underlying media (text files). The links may not match always actual semantics, but more importantly they do not navigate to derived definitions or connect runtime objects with definitions. In fact derived definitions are not typically available in the dev environment at all (smalltalk envs are the exception). The idea is to use hypertext as a unifying interaction model between the person and the system - for hand written definitions, derived definitions as well as runtime traces. The hypertext ux would include clickable links and any other features we want to include eg inline content.
Kartik Agaram
guitarvydas
07/02/2023, 1:27 AMshalabh
07/02/2023, 3:08 AMThe runtime traces is hard to do performantlyAgree. This could be opt-in via a debugging / “capture trace” mode. Hypertext that links back to definitions seems better than explicit print style debugging.
The metaprogramming, I gather you want to be able to click on a macro call and see its expanded outputYes. I also think it would be nice to have the generated definitions available in searches. Derived definitions may also be produced from external schemas or import time execution.
Konrad Hinsen
07/02/2023, 7:19 AMI was thinking one aspect of code-as-hypertext is earlier than usual binding.and then:
However the bindings-as-written are not the final bindings.I am not sure I understand your bindings. Are they mutable or not? Or maybe mutable initially, then frozen? As for GT, yes, it's a new tooling layer on top of a standard Pharo object graph. The bindings presented in the UI thus reflect the current state of the system, but everything can change at any time.
I was thinking why the method body is text and not hypertext?Names would then point to what? There is nothing but names and objects in the Smalltalk object graph (if you see literals as special names).
In fact derived definitions are not typically available in the dev environment at all (smalltalk envs are the exception).And the big practical issue in Smalltalk is that you get only the derived definitions, with no provenance tracking unless the metaprogramming framework has its own mechanism for that. But then, that's not a fundamental issue, it's part of the tooling layer.
shalabh
07/02/2023, 5:24 PMI am not sure I understand your bindings. Are they mutable or not? Or maybe mutable initially, then frozen?This would be PL dependent but typically I imagine no in-place rebinding. However a form of rebinding happens by creating new versions of the hypertext objects. Eg the hand edited source objects could only be rebound by the user as part of editing. In the metaprogramming stage the system would create derived versions of these objects where some of the bindings have changed. For instance a binding to an abstract type in a source object may be resolved to a concrete subtype in the derived objects. So the PL semantics would also restrict what kinds of “rebindings” happen. Eg “constants” would be bindings that don’t change in any derived objects.
Kartik Agaram
inline
apply also to the very idea of hypertext? Why does the writer need to create hyperlinks, can the reader just have tools for all these transforms? That's basically the world I live in today. My IDE takes me to a word's definition with F12, all its references with S-F12, all its callsites with C-k C-t. Perhaps we just need to do more of this?
Now I want to link to an old thread of Lisp Machine screenshots, but it's sadly stuck in Twitter.shalabh
07/02/2023, 7:12 PMI think you might run into situations where you want a thing to hyperlink to multiple possible targets.Yes. I imagine viewing the source and various derived objects as distinct hypertext objects where you are able to go back and forth and follow the chain of provenance.
Does your point againstGood question. While it does bother me that the tooling overlaid links are an approximation (and poorer for dynamic langs generally), the bigger issue is the lack uniform navigation across derived definitions and source definitions. I want to see the rendered macro, the concretized generic method and so on. I want to deftly bounce between those and the original source definitions. BTW your earlier counterpoint of writer designed experience viaapply also to the very idea of hypertext? Why does the writer need to create hyperlinks, can the reader just have tools for all these transforms? That’s basically the world I live in today.inline
inline
is valid. I think the reader should still have the ability to customize it further (eg collapse an inline
).
A related point is that the reader doesn’t get to customize the text in text-file-as-code. For example if the writer chose to write import pandas as pd
, the reader has no choice but to see pd.foo
scattered across the file. If this was hypertext-as-code, it’s easier for tools to offer customized rendering, eg “show the fully qualified name everywhere”, or “show the short name, but blue for `pandas`” and so on. In theory this is possible with text-file-as-code but more challenging, given that tooling is trying to simulate the PL semantics to extract high fidelity references.Konrad Hinsen
07/03/2023, 5:56 AMI want to see the rendered macro, the concretized generic method and so on.Now that I understand your idea, I actually want more; I want to edit the rendered macro, or manually send it through a domain-specific transformer. I want those changes recorded, and when later I edit the upstream code, I want to be able to merge the changes made at different levels. Example use case: optimization. Quite often, optimization is in conflict with abstraction. If I get to edit both the abstract and the concrete code, I can have my cake and eat it.
shalabh
07/03/2023, 6:04 AMNow that I understand your idea, I actually want more; I want to edit the rendered macro, or manually send it through a domain-specific transformer.Hear hear! I think about a flow where you edit a derived object directly and the system shows how the change can be translated back to the source objects. There could be more than one possible source edit and the system would give you a choice. More importantly, it can show you the effect of that change on other derived objects.
Konrad Hinsen
07/03/2023, 7:13 AMshalabh
07/03/2023, 7:57 AMBeni Cherniavsky-Paskin
07/03/2023, 10:17 AMjonathoda
07/03/2023, 9:38 PMshalabh
07/04/2023, 4:37 AMKonrad Hinsen
07/04/2023, 7:02 AMMarcelle Rusu (they/them)
07/11/2023, 2:58 PMmy_color_picker
with <input type=color>
<- can think of these almost as "visual/dynamic macros"