Replies: 14 comments
-
@adamchalmers @iterion @alteous @franknoirot @greg-kcio @jgomez720 @jessfraz @mlfarrell @gserena01 Calling the brain trust 🗣️. Any other good ideas? |
Beta Was this translation helpful? Give feedback.
-
for 11. The naming issue of "components", could be "pufflings" but probably a bit too cutesy. |
Beta Was this translation helpful? Give feedback.
-
These are all naming convention-related thoughts first.
Aw "pufflings" is such a cute baby animal name, I didn't know that's what they were called. I love the metaphors around wax and puffins, but I would recommend we keep them to branded aspects and out of the DSL if possible. I think "components" or "parts" will be easier for mechie types to adopt.
I also think Random thought on file format nameHow do you feel about |
Beta Was this translation helpful? Give feedback.
-
I'll stick with components, parts get confusing because they can be assemblies and parts sounds like it's a piece-part. The rest sounds good. |
Beta Was this translation helpful? Give feedback.
-
Is it necessary to separate project configuration from the source code? Perhaps the configuration could be part of the source code, for example:
I like the terseness of the
I agree. As a layperson, the association between wax and paraffin was not intuitive. I would like to understand better the relationship between this file format Kurt is developing here and the one I am developing. For context, the format I am developing is based on glTF, notably adding boundary representations. I'm thinking of the relationship between .puff and .gltf files as analogous to that of .c (C source code) and .o (compiled object) files, where .puff is the source code and .gltf is the compiled output. With this in mind, perhaps we could have a 'compiled output' view like godbolt.org does. @Irev-Dev, are we on the same page? |
Beta Was this translation helpful? Give feedback.
-
I think so, having metadata in the source code seems like a lot of clutter, especially since I assume you would need to list it in every file? I can also easily see us coming up with more things to put in the toml files in future, which potentially means more and more clutter.
Compiled vs non-compiled is definitely a legitimate way of conceptualizing the two, though I'm not sure if that will be a mental model that will be useful to our users. The app will also support exporting other files too (mesh, step and maybe even file formats like solidworks 😉). The compiled output like godbolt speaks to the nerd in me, though I'm I think this might fall into the camp of devtools for those looking to contribute to the lang itself, and not something the average ME would be interested in, I might be wrong though. |
Beta Was this translation helpful? Give feedback.
-
I'm also not worried about the names of things as that's also a branding question that hasn't been settled yet anyway. |
Beta Was this translation helpful? Give feedback.
-
Am I understanding the role of exports fully?
Then I'll have one question on this point:
Are all exported elements within the same directory implicitly available for import by files within the same project directory, like Yarn/NPM projects? And then this "file paths" dependency type is for using modules on your local machine but not in the current project? |
Beta Was this translation helpful? Give feedback.
-
Replying to Kurt3, 4, 7, 8, 10, 13, 15: Love this.
Why? Because the former is not composable. What happens if we want to configure how the example is run? For example, say we add serial examples (that cannot be run simultaneously) or remote examples (that are run on a different server). Are we going to support Annotations are inherently composable, because you can add more annotations, or more details to existing annotations. Here's how I'd represent those concerns above:
I think this is simpler and cleaner than relying on special function names.
A1: URLs as imports can be a bit dangerous because URL contents can change at any time, causing build errors even when you haven't updated anything. There's no version or content hash built into URLs. A2: Do we want a project.lock like how Cargo, Go and some Python projects work? That way if users specify a vague dependency (like a git branch) we can resolve to a specific dependency (like a git revision/commit/hash) and make sure we consistently keep using it, even if a new commit is added to the branch. Not doing
OtherA3: Will users be able to use their own text editor? On one hand, it's a bad idea, because you're building deep integration between the 3D view and the language code view (e.g. clicking a line in the 3D editor will highlight its code in the source editor). But on the other hand, my local editors are very powerful -- they have all kinds of features like regex find/replace, vim navigation, being able to manage my git diff etc. And it'll take a long time before we can build those features into untitled app. Maybe we could support this with an Untitled App "local files" mode, where it doesn't spawn a two-paned window. Instead, it spawns a window with only the 3D view, and watches a local directory for changes. This way, users can open their preferred code editor on the left, and the 3D view in a new window on the right. But it's OK if you don't want to support this, for the above reasons. A4: In addition to embedding screenshots into docstrings (point 10), what if users could embed normal 2D image files (e.g. a JPG of the existing, pre-kittycad engineering diagrams) too? The project structure could have a /media directory, and you could insert a reference to an image under /media by using normal markdown syntax, like |
Beta Was this translation helpful? Give feedback.
-
Note: Rust is currently experimenting with exactly this idea -- put the Cargo.toml metadata into a special comment block at the top of your source code file. See its RFC. This is a pretty convenient idea, because it helps beginners get onboarded quickly. No need to navigate a file system, and you can easily copy/paste your source code into a DM or a Discord room or whatever to get help with it. I actually think it might be a really good idea for our target audience, who aren't as technical as the average Rust user. |
Beta Was this translation helpful? Give feedback.
-
What I was thinking is you can export values, any value you like, that is any variable you like. So whatever is in that variable gets exported, it could be a number, it could be a piece of geometry (component), or it could be a function. Does that sound okay to you? It's just like a normal language, you can export whatever you want from a module, I wouldn't get tied up on components somehow being special, as far as the language is concerned, it's just an id that points to something the engine is taking care of.
Yeah sounds like you're one the same page as what I was thinking. Just some basic ways for users to manage dependencies without a full-blown package manager. URLs are going to be more useful IMO, but I think file-paths should be included. But yes you should also be able to
A1 Yeah URLs have problems, but it's kinda a "in lieu of a package manager". I would much rather have URLs than nothing, and if you pick your URL well they shouldn't change. Not doing HTTP, sorry I guess I mean I don't think putting a A3 I don't think we should encourage or discourage using other editors. The UI direct-manipulation <-> code-gen interope is the core innovation of untitled app, and that's going to be hard to bring to existing editors, so I think untitled-lang will be greatly diminished without untitled-app. Having said that if we allow hiding the editor in untitled-app, with your side by side suggestion, that will still allow of the codegen, what they will loose doing that is the ability to right click on a feature in 3d and select, "go to definition". Oh just had and idea, we could have "copy relative definition path" and get something like like "./path/to/file:34", to easily get to that spot again in another editor. A4 hmm, yeah I like this, I think that might work well for "graceful fallbacks" I mentioned earlier, maybe whenever folks put screenshots in their docs than we generate an image in media so that it is easier to publish elsewhere (github etc) and if they want to embed something 3d in the docs, we also screenshot the first frame and put it in media as the fallback? |
Beta Was this translation helpful? Give feedback.
-
5 (which I think you meant as 11): Yeah, agree, let's use reserved dirs for now. A3: Agree A4: Agree |
Beta Was this translation helpful? Give feedback.
-
Thanks @adamchalmers for linking to the cargo-script RFC, finally read it. And sorry @alteous, I'm definitely warming to the idea. I think I was hung up on too much clutter, but the cargo-script basically only lets uses to put dependencies up top and a bunch of the fields get sane defaults, and you would have to break it up into a toml file to change those fields.
|
Beta Was this translation helpful? Give feedback.
-
Both suggestions sound good. We should also have an easy button to convert a single-file script into a proper project. And to be clear I think the single-file script mode can be low-priority for now. |
Beta Was this translation helpful? Give feedback.
-
From the inception of this language, when I initially presented a basic demo, a significant portion of the demo was dedicated to justifying our decision to develop our own domain-specific language (DSL). While I won't delve into those details at this moment, the extended explanation was because language development shouldn't be taken lightly. But since we're commit to this endeavor, the language should fulfill the following objectives:
Here are some ideas for your consideration.
create a new project
it will add a new folder to this directory with its name and create the structure of the project (project.toml withname = <name>
, some folders including acomponents
folder andcomponents/main.pf
)project.toml
will be what defines a project.project.toml
s and grab the project's name and display a list of those projects in the app's home screen for the user to select fromproject.toml
will function much the same as apackage.json
orcargo.toml
, listing dependencies, and any other metadata about the project.show
function to exports/public entities. I think this is a better pattern for defining what 3d artifacts are displayed in the scene, and separately supports building utils/modules in separate files.s
///for documenting specific things and
//!` should be borrowed.example
to become examples for the suffix (exampleSomeFn
is an example forsomeFn
)examples
,components
andlib
components
is probably not the best name, the name needs to be fairly generic as needs to cover piece-parts and assemblies. any suggestions?. options:Elements
,Structures
,Units
,Constructs
,Modules
project.toml
will be treated as the central file that defines the project. When the user selects it the right-hand pane (usually the 3d-scene) will instead render the documentation for the project.parts/main.pf
will be a special name that we'd expect to normally be the assembly for an entire project.//!
comments at the start of this file form the start of the documentation when the user selects theproject.toml
.project.toml
can list dependencies as file paths, URLs and git-urls. While a centralised package repository would be nice at some point, allowing the above gives a lot of bang for buck when it comes to having some dependencies support and suits our "local first" approach.Needs more consideration
Further in the future
not doing
Beta Was this translation helpful? Give feedback.
All reactions