Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port learntla text to VSCode #83

Open
sishtiaq opened this issue Apr 2, 2024 · 5 comments
Open

Port learntla text to VSCode #83

sishtiaq opened this issue Apr 2, 2024 · 5 comments

Comments

@sishtiaq
Copy link

sishtiaq commented Apr 2, 2024

TLA+ Toolbox seems clunky. All the cool kids are using VSCode! (And TLA+ is VSCode is nice and useable thanks to https://github.com/tlaplus/vscode-tlaplus.) The learntla text uses TLA+ Toolbox. But there's no direct 1-1 mapping of TLA+ Toolbox screens/fields/commands (and there are a lot of screens/fields/commands there!) to VSCode. As a specific example, it took me a bit of time to figure out where to put duplicates's (just started on your learntla website --- thanks for this) invariants and properties in the duplicate.cfg. Can the learntla text (examples, in particular) be ported to use VSCode instead?

@hwayne
Copy link
Owner

hwayne commented Apr 2, 2024

I teach my classes in VSCode, the problem that keeps me from migrarting everything (besides laziness) is that you can't put negative numbers or sequences as constants in VScode, at least not without some file shenaniganry

@sishtiaq
Copy link
Author

sishtiaq commented Apr 3, 2024

ah ok.
I can help with the laziness: if you file tickets here outlining what's to be done, I can pick up some of them. (And easy to do when I'm just starting your series.)
VSCode issues: presumably you've filed them with the extension maintainers? They sound pretty critical to making VSCode a replacement tool.

@hwayne
Copy link
Owner

hwayne commented Apr 3, 2024

The problem isn't with VSCode, it's with TLC. TLC's .cfg format can't accept anything besides basics numbers and sets.

To make constants with sequences or negative numbers, you need to create a separate file called, like MySpecMC.tla, and then INSTANCE MySpec WITH Constant1 <- -1, Constant2 <- <<foo, bar>>, and then define a new MySpecMC.cfg. The Toolbox does this automatically for you.

@hwayne
Copy link
Owner

hwayne commented Apr 3, 2024

Maybe I can make a .. vscode:: directive and use it to call out differences

@sishtiaq
Copy link
Author

The problem...'s with TLC. TLC's .cfg format can't accept anything besides basics numbers and sets.
Is there an issue on the TLC repo about this?
Seems like what the Toolbox does is a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants