-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add a green check #91
Comments
How would we handle |
Some sort of color mixing would need to be implemented, or just a truth table (This could get out of hand rather quickly though |
Python implementation for if #74 ever wants to implement this (sorry if this is bad, its been a bit since i last used python so im a bit rusty, used to javascript now) def checkGreen(i):
if (isinstance(i, str) or callable(i)):
if i == "green" or i == "rbg(0,255,0)" or i == "rbg(0, 255, 0)" or i == "0,255,0" or i == "0, 255, 0" or i == "#00FF00" or i == "rbg(0,255,0)":
return True;
elif hasattr(i, "__name__"):
if i.__name__ == "green" or i.__name__ == "Green":
return True
else:
return False
return False |
Wouldn't it make more sense as an external module/crate/library/package/whateveritscalledinthislang? |
It would be much more fitting as a built in function, since this is a rather commonly needed function |
what if I define the immutable const const const like that? : const const const green = "rgb(255,255,0)"! That would be rude, so I won't do that but someone else could... (By the way I'm not sure what the |
(oh and where do we draw the line between green and blue?) |
Exactly on green, if the user wants to get a color close to green they would use |
The check could go deeper, we may need to philosophically define green to avoid any edge cases We're gonna need a large truth table, and the implementation was written in a DreamBerd competitor called "Pythom" or something so it uses a weird operator at the end of lines |
Which returns a boolean being |
we should be inclusive to colorblind users, the compiler needs to check if the user is colorblind and if so only ever return However there is the rare case when a user turned colorblind in which case we must record the exact time so code executing before that would have it's regular behavior.. |
Wait, can you turn colorblind? |
todo: implement a way to interface with reality to check if user is colorblind and the exact time of the change. |
this is more complex than I first thought |
This is just for the green specification, we still have to do all the other visible colors, along with invisible colors such as ultraviolet and infrared |
added a task list |
You know, there are times when I wish i was joking (I'm sure I missed plenty, and I still need to add all the variants for the color spaces) |
There is definitely room for a race condition there, and very nasty compiler bugs! Scenario: a compiler runs |
Oh, I thought we had that "atomic shield" thing that allows us to execute instructions in exactly 0 seconds:
I guess that is pretty complex on its own, I shall open a new issue about it Update: there's a wikipedia page on this: https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use |
Mmm, I think lifetime annotations can be leveraged for this purpose. The near-exclusive use of seconds always struck me as limiting. If we introduce binding to something other than static time units, ex. actual real-world life times, that would solve this problem as a result (simply bind to the retina, and write a destructor). It might introduce some other issues: undecidability? armageddon? idk |
Hmm that could be done but I think we are waaaayyyy too overcomplicating things here. What I propose instead, is that we simply
|
Add a built-in function to check if the given value is
green
or not.TODO:
false
,maybe
andtrue
remember how to codeThe text was updated successfully, but these errors were encountered: