-
Notifications
You must be signed in to change notification settings - Fork 19
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
Possible fix for several syntax-related crashes as well as for use syntax mylang
not functioning correctly.
#373
Conversation
Possible fix for several syntax-related crashes as well as for `use syntax mylang` not functioning correctly. Crashes were caused by infinite recursion in DaoParser_ErrorX2 and DaoParser_ErrorX3. Use statement breakage was due to not seeking ahead far enough in the token list after parsing the use statement. This may not be the correct fix for that; there may be a need to actually do some parsing to figure out how many tokens forward to seek. But this worked in my tests.
- Added $STR() to stringify a macro value (i.e., $STR($ID1)) - Added $CAT() to concatenate macro values (i.e., $CAT($ID1 '_Helper')) - Fixed a bug where a value failing to be found in a ZERO_OR_ONE group nested in another ZERO_OR_ONE group would cause the higher-level group to also report a non-match - Fixed a bug where a plain identifier in the last section of a group could cause a failed match in some circumstances (i.e., { [ $ID1 '=' '4' ';' ] 'io' '.' 'writeln' '(' '{' "hello world" '}' ')' ';' } would fail to match correctly.
Put them in different commits because I'm just copying and pasting the files into github directly, because I haven't set up a local git workspace yet on my box.
…ntax: load "modulename.ext"
Add: new vm instruction DVM_UNTAG for untagging a value of type "X|none"...
Thank you very much for your work on the Fossil was also used as the primary version control tool for |
I noticed that, but there's no instructions on the daovm website for how to contribute to the fossil repository. Since I assume you don't want me just contributing directly to your mainline branch without your oversight, can you tell me how you would like me to go about contributing? |
With fossil, the only way is to give you direct write permission to the repo. But in my experience, this may be problematic sometimes. Now I prefer github's pull-request model. But as mentioned, we cannot do this without giving up fossil. So patches is probably the simplest solution for now. However we can do essentially what github does with pull requests, we just need to do it manually. Namely, you can make a clone of the fossil repo, and I host it on daovm.net, then after you make and push some changes, you can make a pull request by opening a new issue. After checking, I may then pull from your cloned repo and merge the changes to the main repo. PS. I should clarify that I am open to the idea of switching to git as the primary version control tool for Dao. But this will happen only if there are a lot of good contributions to DaoVM. |
I would like to make a lot of good contributions to DaoVM. :) Short of writing my own language from scratch, Dao's the closest thing I've found to exactly what I'm looking for in a scripting language. I don't really have any preference on version control, though. (Well, I do, but my preference is Perforce. I'm honestly not a big fan of git.) Only important thing to me is that there's an easy way to communicate and collaborate and perform code reviews. I'm pretty excited about Perforce Helix. It might be worth looking into once it's publicly available. |
For now, since git has a good way of showing you diffs so you can look at my changes and make sure they're ok, how about you tell me whether or not my changes are acceptable, and if they are, I can send you a diff or we can go about setting up a fossil clone for me to use? I've never worked with fossil before - is creating the clone something I can do or something you need to do? |
Did you assume it could be the other way around -- that you get a lot of good contributions once you switch to git? :) It's not even about git, it's about pull requests... |
Seems obvious this isn't going anywhere. I'm just closing this to get it out of my open pull requests list. BTW, just as a note... you'd probably get more developers willing to contribute to dao if you made some effort at accepting/integrating their contributions. |
You're right. We're thankful for your contributions and we hope you'll get back at some point. Right now we're struggling with unavailability of GitHub in certain states (e.g. China) and inability to simply export the whole repository (including wiki, issues etc.) and deploy elsewhere. Therefore this less convenient solution with Fossil and one-way synchronization. On the other hand, we're trying hard to move to GitHub - see daokoder/dao-modules#58 (comment) . So, don't hesitate and keep an eye on this as I'm going to present Dao at the OpenAlt conference which will definitely bring several new developers and users. |
I agree that until we move to GitHub one way or another, the project will remain desolated. |
Possible fix for several syntax-related crashes as well as for
use syntax mylang
not functioning correctly.Crashes were caused by infinite recursion in DaoParser_ErrorX2 and DaoParser_ErrorX3. Use statement breakage was due to not seeking ahead far enough in the token list after parsing the use statement. This may not be the correct fix for that; there may be a need to actually do some parsing to figure out how many tokens forward to seek. But this worked in my tests.
Also, in a separate commit (but apparently I cannot separate the pull requests):
And in a third commit:
-Allowed loading files with extensions other than ".dao" using the syntax:
load "modulename.ext"