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

Possible fix for several syntax-related crashes as well as for use syntax mylang not functioning correctly. #373

Closed
wants to merge 5 commits into from

Conversation

ShadauxCat
Copy link

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):

  • 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.

And in a third commit:

-Allowed loading files with extensions other than ".dao" using the syntax:
load "modulename.ext"

Jaedyn Draper added 5 commits February 17, 2015 13:20
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.
Add: new vm instruction DVM_UNTAG for untagging a value of type "X|none"...
@daokoder
Copy link
Owner

daokoder commented Apr 5, 2015

Thank you very much for your work on the macro module. However, currently, we are actually using fossil as the primary version control tool for the development of Dao. The git repo for Dao is updated by exporting from the fossil repo. But the changes in the git repo cannot be seamlessly imported into the fossil repo, so there is a problem.

Fossil was also used as the primary version control tool for dao-modules repo, now I decided to switch to git for dao-modules, as discussed in daokoder/dao-modules#39. But I am not yet ready to make the same switch for dao. Now I considering to move macro and help to dao-modules, then your work can be easily merged into macro as a part of dao-modules.

@ShadauxCat
Copy link
Author

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?

@daokoder
Copy link
Owner

daokoder commented Apr 5, 2015

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.

@ShadauxCat
Copy link
Author

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.

@ShadauxCat
Copy link
Author

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?

@Night-walker
Copy link

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.

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...

@ShadauxCat
Copy link
Author

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.

@ShadauxCat ShadauxCat closed this Sep 30, 2015
@dumblob
Copy link

dumblob commented Sep 30, 2015

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.

@Night-walker
Copy link

I agree that until we move to GitHub one way or another, the project will remain desolated.

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

Successfully merging this pull request may close these issues.

4 participants