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

Pr 20210430 bugfixes #417

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

0-8-15
Copy link
Contributor

@0-8-15 0-8-15 commented Apr 29, 2021

Various small changes accumulated over time.

@mgorges
Copy link
Contributor

mgorges commented Apr 29, 2021

Thanks for trying to help us improve your codebase. I agree most of these are minor but you did include 'GLCORE: fix missing globalbinding and unbound variable' which is a pretty major rewrite of functionality? This one change also does a bunch of macro things, which I am worse at simply reading the code for to see what risks and problems might be?

@0-8-15
Copy link
Contributor Author

0-8-15 commented Apr 30, 2021 via email

@0-8-15
Copy link
Contributor Author

0-8-15 commented Apr 30, 2021

One more review later: you are right: commit #145d9b5 should have been submitted in #418.

Absolutely.

It already references things introduced over there.

Sorry for that. You don't want the whole sequence of experimental commits to someone else git branch, do you?

I tried to break it into two pull requests. The one with the small things and the big one I really don't know how to break in piecemeal. I failed.

(h (if i (glgui:image-h i)
(cadr (cadr (car fnt)))))) h))
(cond
((macro-ln-ttf:font? fnt) (ttf:glyph-height (MATURITY+1:ln-ttf:font-ref fnt 0)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is MATURITY+1 here - it is not defined?

@@ -169,6 +169,16 @@ ___result = GL_CLAMP_TO_EDGE;
((c-lambda (float float float) void "glTranslatef")
(flo a) (flo b) (flo c)))

(define glTranslatef//checks (c-lambda (float float float) void "glTranslatef"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what the // in variable names mean?

;; textures

(cond-expand ;; CONSTRUCTION-CASE
((or gambit debug) ;; tentative changes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems to be experimental code and I also don't understand it - sorry.

macros: prefix: %MATURITY+3%texture%macro-
%%valid ;; FIXME: factor out from immutable components
glidx ;; index (for opengl and internal table)
%%-???-u32vector ;; what is this? mutable?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are %%-??? functions - I don't understand the macro piece to adjudicate this so we can't merge it as I can't maintain it.

(define (glCore:texture? x) (%MATURITY+3%texture%macro-glCore:texture? x)) ;; avoid eventually!

(define (glCore:texture-valid? texture)
(%MATURITY+3%texture%macro-glCore:texture-%%valid texture))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is MATURITY+3 ?

@mgorges
Copy link
Contributor

mgorges commented May 27, 2021

Okay, so I have finally learned how to cherry-pick commits in pull requests with the Github Desktop app. I have added all commits except for 0603b04 and 145d9b5, and the cleanup from fb2a000 and 9c435d2, which were combined in c840068.

0603b04 I didn't merge because I believe MATURITY+1 is not defined (or I don't understand what it does)
145d9b5 I didn't merge as this is a combination of untested code, MATURITY+3 things, and macro magic I don't unterstand.

@0-8-15
Copy link
Contributor Author

0-8-15 commented May 28, 2021 via email

@0-8-15
Copy link
Contributor Author

0-8-15 commented May 28, 2021 via email

@0-8-15
Copy link
Contributor Author

0-8-15 commented May 28, 2021 via email

@0-8-15
Copy link
Contributor Author

0-8-15 commented May 28, 2021 via email

@0-8-15
Copy link
Contributor Author

0-8-15 commented May 28, 2021

In the case at hand it is so that I removed the MATURITY+1: from the actual definition but managed to not remove if from the call in glgui:fontheight. Unfortunately my dev envt did have both definitions, though they are already the same. Hence I did not catch it.

Looking closer I found that this is not all it takes. I'll update. Both definitions are still in use in my development environment (and the integration/pull-request machine still can not build as it does not have enough resources).

Here is what is in my development environment:

(define (MATURITY+1:ln-ttf:font-ref font char) ;; -> glyph
  (cond
   ((macro-ln-ttf:font? font) ;; TBD: leave this as the only case
    (table-ref (macro-ln-ttf:font-char->glyph-table font) char #f))
   (else (error "illegal arguments" MATURITY+1:ln-ttf:font-ref font char))))

You see: this version returns then while entry as a distinct type while the backward compatible version returns the legacy representation. I'll try to get rid of the latter.

Update: I can not reproduce the error I made yesterday. The above definition is all it takes.

In the meantime I removed the MATURITY+1: prefix here and dropped the old definition. Still working.

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.

None yet

2 participants