2
20
Fork
You've already forked nodgui
4

**d*** is used at compile time, so need sto be defined in compile time #20

Open
opened 2025年01月02日 13:18:51 +01:00 by Yehouda · 3 comments
(a:define-constant +2pi+ (d* 2.0f0 (desired pi)) :test #'=))

This line is inside (eval-when (compile...), but D* is not, so it is not defined if you just compile the system without loading the source first.
Needs to either define D* at compile time, or just use plain * in this line.

https://codeberg.org/cage/nodgui/src/commit/3dc5464fbd3ec1b871549038cc3b76f3d91741a3/src/typed-operations.lisp#L137 This line is inside **(eval-when (compile...)**, but **D*** is not, so it is not defined if you just compile the system without loading the source first. Needs to either define **D*** at compile time, or just use plain * in this line.
Owner
Copy link

Hi @Yehouda !

After your message I am starting wondering why is (eval-when even needed around that constant. 🤔

I can see no reason so I just removed it, let me know if this changes fix the issue you reported, or introduces more bugs, instead! 😅

You can find the changes in the development branch

Thank a lot for your report!
C.

Hi @Yehouda ! After your message I am starting wondering why is `(eval-when` even needed around that constant. 🤔 I can see no reason so I just removed it, let me know if this changes fix the issue you reported, or introduces more bugs, instead! 😅 You can find the changes in the development branch Thank a lot for your report! C.
Author
Copy link

That wouldn't work because define-constant always evaluates the value at compile time. For example, if you put in a file:

(alexandria:define-constant *junk* 
 (progn (print "Evalting the value for *junk*") 7)
 :test #'=)

and compile it, it prints the string.

That wouldn't work because **define-constant** always evaluates the value at compile time. For example, if you put in a file: ``` (alexandria:define-constant *junk* (progn (print "Evalting the value for *junk*") 7) :test #'=) ``` and compile it, it prints the string.
Owner
Copy link

Thanks for your explanation @Yehouda ! I think I am starting to understand the problem you pointed out.

I wrapped most of the operations defined in that file in eval-when, and pushed the changes in the development branch. I hope I fixed the issue now! 😅

Bye and happy new year!
C.

Thanks for your explanation @Yehouda ! I think I am starting to understand the problem you pointed out. I wrapped most of the operations defined in that file in `eval-when`, and pushed the changes in the development branch. I hope I fixed the issue now! 😅 Bye and happy new year! C.
Sign in to join this conversation.
No Branch/Tag specified
master
development
v0.7.6.5
v0.7.6.4
v0.7.6.3
v0.7.6.2
v0.7.6.1
v0.7.6.0
v0.7.5.1
v0.7.5.0
v0.7.4.0
v0.7.3.5
v0.7.3.4
v0.7.3.3
v0.7.3.2
v0.7.3.1
v0.7.3.0
v0.7.2.1
v0.7.2.0
v0.7.1.3
v0.7.1.2
v0.7.1.1
v0.7.1.0
v0.7.0.4
v0.7.0.3
v0.7.0.2
v0.7.0.1
v0.7.0.0
v0.6.2.1
v0.6.2.0
v0.6.1.2
v0.6.1.1
v0.6.1.0
v0.4.9.6
v0.4.9.3
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cage/nodgui#20
Reference in a new issue
cage/nodgui
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?