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

C, Ruby and the Macrolands #388

Open
IanTrudel opened this issue Nov 17, 2017 · 11 comments
Open

C, Ruby and the Macrolands #388

IanTrudel opened this issue Nov 17, 2017 · 11 comments
Assignees
Milestone

Comments

@IanTrudel
Copy link
Collaborator

IanTrudel commented Nov 17, 2017

Shoes implementation suffers from its legacy as mentioned from conversations in #383. We shall continue to elaborate on the subject here, outline current problems and potential solutions.

  • Macroland (FUNC_M, RUBY_M, events related, canvas related, etc) is particularly complex.
  • Favouring C function calls that will allow access in Ruby.
    • VALUE my_method(VALUE self, VALUE args) instead of VALUE my_method(int argc, VALUE* argv, VALUE self)
    • This will allow to move shoes/types to Ruby side and use FFI/Fiddle to call shoes/native counterparts. It shall improve debugging and encourage development of new features by less relying on C side of Shoes. It also bring us closer to Shoes4 without being Shoes4.
  • Moving relevant C code to Ruby side that is in fact merely a series of rb_* calls. Ruby in C has no distinct advantages and is not any faster. The only Ruby in C code should be the one that is intrinsic to Shoes, basically cannot be taken out anyway, such as the code loading and executing Shoes code.
  • Might be interesting to move some macros in ruby.h to use PFI, favouring one function per feature, if it makes sense.
  • A better use and understanding of Shoes symbols system.

References
https://silverhammermba.github.io/emberb/c/

@dredknight
Copy link
Contributor

Does this mean it will increase Shoes overall performance when drawing elements?

@IanTrudel
Copy link
Collaborator Author

Does this mean it will increase Shoes overall performance when drawing elements?

It might but it's unclear at this time. What it will do is make our lives easier (@ccoupe , @passenger94 and I) when it comes to Shoes internals. The overall complexity of Shoes make it difficult to debug and profile drawing elements, so the improvements here may make it easier to do that.

I think we should dedicate one of the future releases exclusively to performance improvements. Perhaps around 3.3.9.

@ccoupe
Copy link

ccoupe commented Nov 18, 2017

Does this mean it will increase Shoes overall performance when drawing elements?

Not likely as in no, nope, nada. nyet.

Perhaps around 3.3.9.

If we ever get that far, 3.9 would be so loaded up with meta-meta-dsl-naval _gazing introspection that most people would just say "Alexa, figure this out". Shoes is a nice entry point into the programming world for the curious few who want to try to get inside that world. Shoes has a 'use before' date attached - we just don't know the date when it expires. It will expire.

@IanTrudel
Copy link
Collaborator Author

If we ever get that far, 3.9 would be so loaded up with meta-meta-dsl-naval _gazing introspection that most people would just say "Alexa, figure this out". Shoes is a nice entry point into the programming world for the curious few who want to try to get inside that world. Shoes has a 'use before' date attached - we just don't know the date when it expires. It will expire.

Haha! Don't you worry. We don't need to get so complicated with the DSL. The implementation is some work but it will make Shoes users life easy (as it always been the point). And we can use the new DSL feature easily on anything else once it is in place.

By the way, it was 3.3.9 rather than 3.9. That would be 4 maintenance builds from now.

@IanTrudel IanTrudel added this to the 3.3.9 milestone May 17, 2018
@IanTrudel
Copy link
Collaborator Author

@ccoupe I have attempted to write on your email, but it is no longer active. Any way to get in touch with you?

@dredknight
Copy link
Contributor

@IanTrudel i got @ccoupe facebook profile though i dont want to share it here.

@IanTrudel
Copy link
Collaborator Author

@dredknight Good to see you again :) Does he use Facebook much? I have him too. Haven't gotten in touch with him in ages. Have you communicated with him recently?

@dredknight
Copy link
Contributor

Unfortunately no. The walkabout manilla website is down for about an year or so. I suspect he may have removed the domain altogether. I hope he is alright :(.

@ccoupe
Copy link

ccoupe commented Nov 18, 2022

Hi all. I'm doing surprisingly well. My ISP cancelled email service. The new mail address is [email protected]. As noted I stopped paying for the website - one less thing to deal with. I've moved on to some Home Automation stuff - in python, groovy, c++, Wiring up some gadgets with ESP32 micro controllers and 3D printing.

@IanTrudel
Copy link
Collaborator Author

Excellent news, indeed! A bit shocking that you would use C++ nowadays considering your comment in 2017: C++ ? Not me, I've suffered enough.

@ccoupe
Copy link

ccoupe commented Nov 19, 2022

Yeah. Never say never. Arduino and it's libraries are C++ but they don't tell the beginners that right away. Since damn near every device you'll want or need to use has an Arduino library (or two or three) you can avoid a butt load of wasted time by just going with the program (C++). For existing library/modules C++ is It's about as OO as Rust or Go. If feel sorry for microprocessor but it is easy to see why Arduino is written that way. FWIW I use the platformio variation of VSCode. MSFT and opensource IDE in the same sentence. Odd things happen.

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

3 participants