« first day (3306 days earlier)      last day (1643 days later) » 
00:00 - 21:0021:00 - 00:00

12:01 AM
Or did you leave now?
 
12:28 AM
This is the classic left-recursion problem with PEG parsers.
 
12:50 AM
@AndrasDeak I'm in lovely Australia for a week
 
Oh, nice! Hope you'll survive have a great time
 
@PaulMcG thanks for giving the problem a name, that is very helpful to find out how to deal with it.
Makes me wonder whether it would be feasible for pyparsing to implement some of the counter-strategies for the problem.
 
wim
1:47 AM
it's coming into drop bear season, watch out
 
2:28 AM
cbg
 
Hello, does anybody have much experience with tensorflow?
I was looking for ml room but couldn't find one
 
stackoverflow.com/questions/58686503/… python 4.x... am i time traveling ???
Haha
 
 
4 hours later…
6:09 AM
beep bop
 
6:21 AM
cbg
 
 
1 hour later…
7:29 AM
cbg o/
Is Christmas already started?
 
I am experienced in C++ do you think I should start learning python to pass coding interviews? I noticed that I spend a lot of time typing in C++. How can I overcome that?
 
Not sure of C++, didn't work much after Uni. But I would insist you continue writing code in C++ even though it's taking time in coding interviews since you're already experienced developer(in C++). Getting started with Python is easy but we should not forget it's another programming language which will take its own time to master.
But I have seen many C++ developers writing codes in Python in weekly contest on Leetcode to finish it in one hour
 
user10984358
7:57 AM
not directly related to what he said, I come across interviewers asking Pointer Arithmetic to c/c++ programmers, which is not in python, at least to my knowledge
 
user10984358
if you are good at those then what he said is true, time spent on learning python can be used to do more problems
 
jie
8:18 AM
@PaulMcG Someone had give me answer and solution(stackoverflow.com/questions/58669428/…).
 
jie
@IljaEverilä what cbg means?
 
jie
8:39 AM
@IljaEverilä ok, learn it.
@IljaEverilä What's the relation between abbreviation salad language.
 
I'm not regular enough here to be able to answer that.
 
the abbreviated forms are faster to type
but there are some traditionalists who prefer to write out the whole cabbage
 
jie
in my eye cabbage = 白菜, why englisher call cbg = (hi, Hello).
 
8:55 AM
ah, that's what you mean. It's just a joke that turned into a tradition
with the additional benefit that it identifies people who have not yet read the rule page, since they will greet with "hello" instead :)
 
9:16 AM
:)
Jul 25 at 6:43, by TheLittleNaruto
I cooked cabbage day before yesterday. It was delicious.
Whatever @Arne said, is right.
 
Umm... that seems like sacrilege to me :p
 
9:34 AM
Morning guys, I'm trying to build my first web app. I need to pass the input and "build an url" from an form input...if that make sense... Now I have url = f'https://www.tennis.fr/catalogsearch/result/?q=918193-012' I want 918193-012 to be entered when the user hit the submit button
if you have some time to have a look at my question : stackoverflow.com/questions/58606125/…
 
9:52 AM
That looks like you need to go through the flask tutorial. There's something about handling request data in there
 
@Aran-Fey thanks :) request data, alright, let's check it one more time
 
@JonClements xD
Unknowingly done mistake!
@AnotherUser31 Let me check
 
@TheLittleNaruto mind you... sometimes it's just fun
 
@TheLittleNaruto thank you so much !
 
@JonClements Nice way to make the room dirty :P
that too just for fun
 
10:02 AM
Yeah... sometimes dogs take it too seriously though and really go psycho... youtube.com/watch?v=rElAW4G-_jU
 
lmao this was nice editing
@AnotherUser31 make another routing with implementation of receiving price of provided stock code.
Something like this:
@app.route('/get/price')
def get_stock_price():
    return fetch_stock_price_from_db(requests.get_json()["stock_code"])
When making requests on this url, make sure you're passing raw json data which should look like this:
{
   "stock_code":123
}
This is just a rough idea. I think you can take it further from here. @AnotherUser31
 
@TheLittleNaruto but than I have to change the way I'm scraping the url ? how is that part gonna look like ? url = f'https://www.tennis.fr/catalogsearch/result/?q=918193-012'

response = requests.get(url)
 
Whichever url is pointing to index.html, just append "/get/price" to it
 
do I need to have a db ? to store somewhere users input ? 'cause I don't have one at the time
*sorry to ask so many....dumb questions....
 
How were you planning to have this stock code and price mapping?
It won't come magicaly if I am not mistaken :P
 
10:17 AM
databases store data, but you don't want to store the user input. you just want to process it
 
@TheLittleNaruto the user sends a form and this way builds that url that I have... @Aran-Fey this is exactly what I need I think...
 
@AnotherUser31 Then have the process implementation in "get_stock_price()" method
 
Umm... that's an odd looking cabbage? :p
 
haha unfortunately no; it's our Universe
 
@TheLittleNaruto alright, thank you, I'll try to make it work ! I will make it work ! :)
 
10:42 AM
@AnotherUser31 Attaboy
 
@TheLittleNaruto something like this ?
@app.route('/')
def index():
base_url = 'https://www.tennis.fr/catalogsearch/result/?q=' + stock
response = requests.get(base_url)
return render_template('index.html')
 
:D :D :D
 
btw I never said how will you do client side code; because for that I use Postman to validate my APIs.
I don't have any background with JS/HTML thingy
 
I have Postman too...not using it very often :)
 
11:00 AM
Could anyone tell me how to make this work
`[j for j in [1,3,5] if i,j in enumerate(desired_classes)]`
 
what is "this" supposed to be doing? Note that what youve given as, does not really help convey what you wanted it to do. the if i, j in enumerate(...) part makes no sense
 
Sorry, I will make this clear
let desired_classes = [1,2,5,6]
Output = [0,2]
j in enumerate(...) should search for values and the output list should contain the indices i of the values present
If its still not understandable, please do tell
 
it is still not clear
please explain in your own words what you want to do.
by "classes" you mean something like classification indices?
 
So I have a simple function reset_config like this:
def reset_config(self):
    print("Configing")
 
@Pari
 
11:09 AM
And I am calling this function as follows:
print "-----start configing-------"
board.digital[2].reset_config
print "-----end configing-----"
But this is the output:
-----start configing-------
-----end configing-----
 
@subtleseeker then you have it backwards. you are checking if each of [1,2,5,6] are IN [1,3,5].
 
Why is the print statement in the function not called?
 
because you are not calling the function
you merely look it up
 
The english convention and python syntax are fairly tightly bound, so it's easier to write syntax if you can think of the correct order that way
 
@ParitoshSingh How do I extract the indices of the values present?
 
11:11 AM
@MisterMiyagi I need to add () at the end?
 
Ok, thx
 
[i for i, value in enumerate([1, 2, 5, 6]) if value in [1, 3, 5]]
Replace the [1, 2, 5, 6] and [1, 3, 5] with the variable names accordingly. Note that, common sense would say that "desired classes" is not the correct name for [1, 2, 5, 6]. But i'll let you figure out the names of things
Clearly, they are not all desirable if you're filtering them out?
 
@ParitoshSingh Thanks, got that!
 
No worries.
 
11:40 AM
Morning all!
 
Sorry to see your resignation pup
 
thanks... good news is it gives me more time to talk nonsense here though :p
haven't seen you a bit - how's things going
 
I guess that's a win, until you pee on the rug
I'm doing alright - busy busy busy (the good kind)
Yourself?
 
that's good to hear... me... just the same old, ya know? :p
 
11:45 AM
Aye! Well, good to have you back in the room
 
Cheers matey... anyway... gotta run for a bit... hopefully catch you in the not too distant future?
 
Aye, no doubt!
waves bye
 
rbrb for now :)
 
 
1 hour later…
12:58 PM
cbg
 
cbg
 
1:09 PM
Yesterday I very nearly used assignment expressions for a legitimate purpose. Something along the lines of if (s := next(tokens)) != "ZIP": raise Exception(f"Expected 'ZIP', got {repr(s)}")... But then I remembered my home computer is still on 3.7
 
saved by the bell
although that's indeed one valid use case
 
Proposed feature: self-destructing variables. After assigning them, they can only be accessed once, and then they're deleted
 
we could call it "scoping"
 
I never use s after this line and I don't want it in my namespace any more
I would unironically love a way to manually create scopes
 
@Kevin wait, that means you are not up to the extrapolated use of several hundred asspressions by now?
 
1:15 PM
@Kevin <> is unused in the syntax
 
@MisterMiyagi No, and in fact I am beginning to suspect the extrapolation was created on faulty pretenses
 
<
s = next(tokens)
if s != 'ZIP':
    raise Exception(f"Expected 'ZIP', got {repr(s)}")
>
 
This all started when I said "I've used assignment expressions once since their introduction" and despite me saying that one month after their introduction, somehow the math turned out to "once every three hours"
 
it's perfectly cromulent, I assure you
 
Well, if you say so. I guess I just have to try harder
 
1:18 PM
@Kevin that sounds suspiciously like move semantics
 
try harder:
    use_asspression():
except InsanityException:
    pass
I think I'll (yet again) try to turn my package into an importable-and-executable one, but now with the added benefit of knowing about __main__.py
 
now I'm wondering... are asspressions allowed in the except clause head?
 
 
@MisterMiyagi probably
 
Hi there! Any Django Developer here?
 
1:20 PM
Looks like it requires parens:
>>> try:
...     1/0
... except foo:=Exception:
  File "<stdin>", line 3
    except foo:=Exception:
              ^
SyntaxError: invalid syntax
>>>
...
>>> try:
...     1/0
... except (foo:=Exception):
...     print("Oops")
...
Oops
 
that's what I expected anyway
 
@Kevin on second thought, I have enough data points by now. Please do not damage the Kevin this channel may not deserve but needs right now.
 
how's that jet lag? :P
 
I'm mildly surprised that except Exception as (foo:=e): is not legal syntax, although I guess there isn't much of a use-case for it
 
@AndrasDeak I might be slightly more sleep deprived than usual
 
1:23 PM
The bit after as can't be some arbitrary expression, so I guess it makes sense
 
plus, it is really weird giving tasks to students in another time zone....
 
@MisterMiyagi bet you'll love the way home when you'll have an insanely long day (assuming I got that right)
@Kevin that's probably the same thing as with statements, where there's some meddling if I recall correctly
 
@Kevin I guess it is because the e cannot be both an assignment target and source at the same time.
 
Yeah I expect with to behave similarly
 
or wait, I think I'm confused
 
1:25 PM
long days mean having dinner twice. is there anything not to love about that?
 
Rather, I expect with (foo:= expr) as x to work, but not with expr as (foo:=x)
 
@MisterMiyagi heh
 
>>> with open('file.txt') as (foo:=f):
...     pass
...
  File "<stdin>", line 1
SyntaxError: cannot assign to named expression
Interestingly, the SyntaxError didn't raise until after I finished the block. Compare to the try-except above, which raised right after the except line.
 
@Kevin How about:
foo = 3

class _(Namespace):
    bar = foo * 2
    print(bar)  # 6

print(_)  # None
 
Every once in a while I toy with the idea of class blocks as namespaces, but I always run into a little quirk or two that results in surprising behavior
 
1:30 PM
plus these are the "cute tricks" that can lead to physical harm
 
I forget when it occurs exactly but there's some scenarios where you get a NameError even though the variable would be visible if you weren't inside a class
 
I wonder what happens if you have a meta class that can use the functions local as the namespace of the class...
 
I wrote a scoper using a context manager. I think it had to peek up the call stack to del the names going out of scope.
 
@Kevin comprehensions?
 
Probably
 
1:34 PM
with scoping("x"):
    x = 1000
print(x)  # NameError
 
Dark magic
 
that wouldn't work in functions though
 
class Foo:
    x = 5
    y = [x for i in range(1)]
    #NameError: name 'x' is not defined
 
You also can't assign new values to any variables that already existed before the class statement, but nevermind that :P
 
I'm sure there's a very good reason for this, but the bottom line is, class blocks don't have the same semantics as my desired feature of proper namespace blocks
 
1:42 PM
Well, functions defined in a class can't access variables from the class body, and comprehensions are implemented as functions so they don't leak variables. The combination of both explains the NameError, but there isn't exactly a good reason for it
Though I do think it's good that functions don't have direct access to class variables
 
I'm not going to read Martijn's three page answer, but the vibe I get is "we could do this a different way, but then it would still have surprising behaviors in cases X Y and Z, so why bother"
You can poke at the air bubble under the wallpaper all you want, but you'll never get rid of it
 
all it takes is a needle...
 
@Mirza715 Just ask your question. "Ask your question directly. Avoid asking if it's okay to ask, or if anyone knows about a topic. Users may want to see your question before speaking up, and users who join later can see it." (see: sopython.com/chatroom)
meanwhile screams at sqlalchemy to just use his index
 
1:57 PM
wow, 26 days until Advent of Code, time flies
 
Hi im trying to deploy a small webapp on Azure for testing, there are only two modules im using Flask and pandas. Both are in the requirements.txt, when running a small test application it throws a ModuleNotFoundError on pandas, but not on flask. I'm deploying via CLI directly in pycharm
I'd like to know what causes pandas to fail while Flask succeeds, which to me says that the requirements.txt is used.
 
Hi mtbrands. Rather than us trying to blindly attempt to help you with your problem, do you have a MCVE that we can take a look at?
(MCVE - Minimal, Complete, and Verifiable Example)
 
```from flask import Flask
import pandas as pd
app = Flask(__name__)


@app.route("/")
def hello():
a = pd.Dataframe()
return "Hello World!"
```
 
might be that the python env comes pre-packaged with flask since it expects to be a web app. might also be that the import pandas statement is just before the import flask one, so both are not present but you only know about pandas
 
Perfect. Thanks.
Wot Arne said ^^
 
2:08 PM
I'm interested in seeing the stack trace, as it may contain additional clues
 
I always find these issues annoying as its so hard to copy
 
Also, please used fixed font for pasting code fragments and stack traces. There is a nice link on this room's star board on formatting code in chat.
 
You might already know this, and this might not be relevant to the current situation, but the Windows command prompt does support copy-paste. you highlight the text you want and press "Enter". No, I don't know why it's not ctrl-c.
 
Oh sorry I meant replicating the issue
 
Ok. I was just worried that you were laboriously transcribing the traceback for me character-by-character. I wouldn't make anyone go that far for troubleshooting help.
 
2:12 PM
@OldTinfoil How to order_by Queryset by choice field (e.g choices are 1,2,3,4. Order by 2,4,3,1) in django rest.
 
@Mirza715 tilts head sideways what kind of ordering is that?
 
I was hoping the traceback would give a clue like "can't import pandas because one of its dependencies is missing" but no luck there
That may or may not be the actual problem, still
 
@mtbrands Have you tried something similar to pip install -r requirements.txt ?
 
I've done that in the Azure shell, in the activated venv. It will install pandas, but seemingly not where the app needs it
 
Are you trying to trying to run this through the dev server or some kind of 3rd party production web server (apache / nginx)?
(If it's not the dev server, then it's possible that you're not correctly invoking the venv in your vhost)
 
2:24 PM
@PaulMcG Any plans to port to snake_case?
 
puts his MCVE hypocrisy hat on Any advice on debugging why sqlalchemy is not using my perfectly good index? A manual SQL query completes a query in 1.3s, but sqlalchemy seems to be using the normal scan (takes hundreds of seconds)
 
@OldTinfoil I have heard efficiency is an issue with ORMs, but then again I had a question closed for that very reason. So.... yeah.
best bet is to check what SQLalchemy "compiles" down to (not saying it necessarily actually compiles to anything, but what are the underlying calls and how do they compare to your custom code...
 
@Dair Yes there are. I have a page on the GitHub wiki that talks about the general approach. Won't be for a while yet tho.
 
@PaulMcG Ah. ok. good to know. Thanks.
 
@OldTinfoil I believe it would be the dev server, not doing anything special i think
 
2:28 PM
I'm looking in debug toolbar, and the mysql EXPLAIN implies that the query should be using the index (Using where; Using index).
@Dair The compiled query seems to be correctly parsing my index hint, even if it's not using it. Bit of a head scratcher.
@mtbrands So you're directly running the web server via something like: python mything.py 0.0.0.0 8080 ?
 
No deploying to Azure like az webapp up -n myapp
which returns an azurewebsites.net address with the webapp on it
Getting rid of the pandas stuff returns a working html page
 
I susepct we're rapidly getting to the end of my usefulness here as it looks like it might be going into azure specific knowledge
Revert your changes so that you're trying (and failing) to import pandas - then try to re-run pip install -r requirements.txt
 
I was afraid it would, always a possibility i overlooked something simple before even getting to azure
 
Have you got it working locally?
 
2:40 PM
I do, yes
@Dodge I may have tried something similar but Ill give it a go of course
 
Saw that and thought it might be useful
 
cbg folks
 
cbg inspector!
 
@roganjosh yes it can. The point is that fitness is a module that you define by yourself, to suit the needs of your problem. So you could easily rewrite the fitness function in fitness.py and make it fit whatever constraints you'd like to impose. One important point to note: pyvolution has changed since that presentation. My above comment is true of both versions, but I'd recommend the newer version for py3 compatibility
Room6: It's finally done. I'm PhinisheD
20
 
woot, pineapple :)
 
2:52 PM
Thank you. I'm doing my happy dance
:D>-<
:D|-<
:D\-<
:D/-<
 
@inspectorG4dget Congratulations! That is quite an achievement.
 
Thank you :)
Now, it's onto the next chapter of my life
 
@inspectorG4dget 🎉!
Dr. Gadget now?
 
/me takes a bow
 
now you'll wait for months until someone finally says "We need a doctor!!!"
 
2:56 PM
Now to get a PHD in all other fields of study. You just have to take the procedure you carried out for the first one, and swap in the appropriate variables for eg philosophy and business management and architecture etc.
 
@inspectorG4dget Much the pineapple!!
 
yeah, it's not that scalable. I don't think I'm going back to school again
Many melons :)
@AndrasDeak yes, I'll run over with a USB stick that has diagnostic software on it. "Has anyone attempted a df yet?"
 
You just need to prove that choosing the placement of load-bearing beams in bridges is an NP-hard problem, and then you can port over your existing dissertation with a couple find-replace operations
 
that's brilliant. Reduce all PhDs to one
in the event that not /all/ PhDs can be reduced to one, could we come up with a minmal spanning set of PhDs to cover all dissertations? and a dissertation generator to enumerate all theses? All of a sudden, advanced degrees just turned into a computability problem
 
woot woot!... I'll grab the celebratory cabbage! :P
 
3:02 PM
Get the good cabbage, that we've been saving for a special occasion!
 
I love you guys. It doesn't get said enough
 
It is an odd thought that the entirety of all communication in this room is simply a collection of thoughts in the minds of a set of individuals, potentially resulting in strong communal bonds, but without a single word ever being spoken or heard
 
@PaulMcG of course... and the posh glasses :)
 
ala previous suggestion by (at)Kevin to internally pronounce [mcve] as "McV" I've now started using [mre] and pronounce it "MrE" or "mystery".
 
Coincidental semantic alignments of this nature are a sign from the universe that you're going in the right direction
 
3:15 PM
@JonClements Yard glasses for all!
 
Maybe later in the day... should probably be looking to having a bit of sophistication before we all end up going: "CHUG! CHUG! CHUG! CHUG!...." etc... :p
 
@piRSquared I usually go with "muh-ree"
 
3:57 PM
That's awesome, congratulations!
 
@inspectorG4dget BIG GRATZ (-:
 
big melons, everyone :D:D:D:D:D
 
hello guys, suppose if you did vars(foo) and get a huge list of variables in the interpreter...can you do something like more/less so that you can read/peruse the output...?
in other words page the output so you can read it at your pace...
 
You might be interested in help() and dir(), which give information about an object's interface, in an arguably more readable format than vars()
help() in particular has a more-like interface
 
@Arne YES! I love it
 
4:13 PM
I wanted the output of vars() or dir() to be subjected to a more-like interface from the interpreter mode...
 
push comes to shove, you can always save the output in a variable yourself, and display it in chunks as you see fit
 
I wonder if the more-like functionality of help() is publicly accessible anywhere, so you can apply other kinds of text to it...
 
I wasn't even aware help did something like that. haven't really used help as much as i should
 
It has its uses, although 80% of the time it lists a lot of boilerplate that doesn't tell you much. For example, here's a selection from help(int).
 |  Methods defined here:
 |
 |  __abs__(self, /)
 |      abs(self)
 |
 |  __add__(self, value, /)
 |      Return self+value.
 |
 |  __and__(self, value, /)
 |      Return self&value.
Ah, so doing & on two ints causes them to be &-ed together. I see.
 
I should mention that if you're on IDLE (and you really shouldn't be), help doesn't paginate like more/less
 
4:21 PM
Hi guys, question I don't feel suits SO but is worth asking. .How muh do you guys value PEP8?
 
@inspectorG4dget ngl when you said big thank you i pictured something else
 
PEP8 is excellent, more languages should do things like that. (and maybe they do.)
 
i wonder if this overloaded language was a design oversight or intended functionality
 
My boss thinks you should exploit the entire width of the monitor. I really don't like that idea, I feel like it makes code hard to read. Just wondering if his view was particularly common
 
make your font size bigger then =P
 
4:24 PM
Ah, pydoc.pager appears to be responsible for more-like paging.
 
@deostroll import pprint, then do pprint.pprint(vars(complex_object)), will be a long output, but more nicely formatted
 
Heh, malicious compliance at its best
 
length of each line is probably the most flouted feature of the PEP, but making your lines bigger than they should be is silly. You will have lines with different lengths, the point is, doing do too many things in one line
 
And in pdb, do "pp vars(fool)"
 
I just tried pydoc.pager("\n".join(f"this is line #{x}" for x in range(400))) in my REPL and it printed a page-worth of lines and then the -- More -- prompt
 
4:25 PM
Nice
 
@Glazbee get the best of both worlds, and you get the added benefit of being able to read your code late into the night more easily
 
@Glazbee I value PEP8 a LOT. I utilize my entire monitor by splitting my windows
 
Perhaps this can be combined with prettyprinting for maximally pretty output
 
@piRSquared this, i usually have 4 split windows on double monitors
 
I...have a laptop.
 
4:26 PM
then use ubuntu and get use to ctrl alt (arrow key)
 
Actually, to be honest, Spyder already does a sort of split which is inherently very useful, imo.
 
As does PyCharm
 
>>> import pydoc
>>> import pprint
>>> def more_vars(obj):
...     pydoc.pager(pprint.pformat(vars(obj)))
...
>>> import math
>>> more_vars(math)
{'__doc__': 'This module provides access to the mathematical functions\n'
            'defined by the C standard.',
 '__loader__': <class '_frozen_importlib.BuiltinImporter'>,
 '__name__': 'math',
 '__package__': '',
 [skipping about thirty lines because otherwise the output would be really long]
 'frexp': <built-in function frexp>,
 'fsum': <built-in function fsum>,
@deostroll how's this? ^
 
@piRSquared and vs code
only piece of microsoft software i actually kinda like to use
 
@Kevin yes...awesome....thanks
 
4:38 PM
@Skyler I haven't mustered up the motivation to try it out yet. But it's on my TODO list.
 
decently similar to pycharm, though i didnt really use that that much since i was using sublime text at the time
 
@Kevin do answer here
 
gave a much better initial impression then atom
 
On windows, pydoc.pager implements more-like paging by... calling os.system("more < temporaryFileContainingTheHelpText"). I guess that's an effective approach :>
No point reimplementing the cow when you can get the milk for free
 
4:59 PM
@Glazbee Much of the "ecosystem" expects line widths of a certain size for formatting and the like. Git is a perfect example.
@inspectorG4dget Congrats on your thd
 
> We now integrate with Microsoft Teams, helping you to connect your internal knowledge base with your chat. Learn more.
Why the yam am I shown this annoying piece of yam?
4
 
wim
5:20 PM
monetization yo
 
but I'm not a customer!
 
@OldTinfoil thanks TinFoil :)
 
I connected my internal knowledge base with chat years ago. It only took a couple dozen electrodes, a hacksaw, and a lot of aspirin.
It works quite well, with only the occa[Viashino Skeleton is the only Magic: The Gathering card whose name matches its creature type]sional glitch
Sorry about that, a little cross-channel interference there... Now where did I put my industrial pliers
 
6:12 PM
I had a larger merge with a few hiccups, after which I scared myself for a good few seconds because the results were all different. Then I remembered that I upgraded numpy between the two runs and there was a major rehaul of random streams, which explains most of the difference...phew!
(although I'm pretty sure I have some bug still)
 
how are all the tied for most awesome people ever doing today?
cue everything is awesome song
 
@biggi_ anddd now its stuck. :)
 
Is there a wavelength of light which is objectively the most red? Wikipedia only tells me that red is somewhere in 625–740 nm.
I'm guessing the answer is "no, because anything involving an RGB model of color is rooted in human biology, and thus varies depending on the observer's cone cell responsivity curves"
 
666 nm, the Devil's wavelength
 
Strangely, the responsivity curves at en.wikipedia.org/wiki/Trichromacy#/media/File:Cones_SMJ2_E.svg show that the red curve peaks around 580 nm, which is yellow, not red.
And 740 nm isn't even on the chart.
 
6:24 PM
740 is IR by all accounts
 
Probably best to ask a mantis shrimp, they can see like 17 primary colors
 
Is Wikipedia being cheeky by counting infrared as part of red, because it has "red" in the name :/
 
@Kevin the "red line" doesn't correspond to "red color vision", it's just the longest-wavelength cone cell
and yes, there are no clear wavelength limits due to variations among humans
 
Yeah, I thought it might be the case that the red line doesn't directly correspond to perception of red. I'm a little rustled at the misleading line colors.
Not intentionally misleading, surely, but still. Don't underestimate my ability to be a fool.
 
the source for the 740 nm figure says Red 665nm for "ROYGBIV", so 666 is a good guess, @Dodge :P
 
wim
6:30 PM
Asked mantis shrimp, got sucker-punched
 
@AndrasDeak spooky
 
What I'm trying to determine right now is whether you can add colors together to get a color that appears spectral (i.e. is composed of only one wavelength of light)
 
@Kevin define "add colors"
if you add multiple wavelengths it will have multiple wavelengths, but it might appear the same to a human as a single wavelength, see blue+yellow == green
physically "blue + yellow" is exactly that: blue plus yellow
 
Adding in the additive sense. If I have to give a physical definition, I'm creating light in narrow bands of wavelengths and bouncing them off a white wall.
 
Feb 25 at 14:36, by Andras Deak
@amcgregor "blue + yellow == green" is the same thing. So is brown.
 
wim
6:35 PM
.
├── mymodule
│   └── __init__.py
└── mymodule.py

import mymodule
print(mymodule.__file__)
^ guess the output
 
@AndrasDeak good news: I remembered I refactored the code so that random numbers a pregenerated, which means that the same input goes along a different path even if the seed is the same.
 
I think blue* + yellow = green applies only in subtractive color models, but the fundamental question is the same.
(*well, cyan, but close enough)
 
I never got the hang of that
> Subtractive color, is used to model the appearance of color (absorbing) from pigments or dyes, such as those in paints, inks, and the three dye layers in typical color photographs on film.
then I guess so
 
Adding spectral blue and spectral green light causes a human to perceive yellow. It's unclear to me whether this "hybrid" yellow would be 100% indistinguishable from spectral yellow. Or would it be less intense, or less saturated, or something? What is intensity and saturation anyway?
In any case a spectrometer would be able to distinguish hybrid yellow and spectral yellow easily, but I'm interested in people right now
 
@Kevin until humans can calibrate their vision there's no point in trying to distinguish them I think
you can mix a lot of "hybrid" yellows so I would expect some of them to look just like monochromatic yellow
What's really going on is that color vision is like a weird neural network with heuristics that sometimes fall apart. It worked good enough in nature, because there are no yellow LEDs there.
if evolution were subject to LEDs then perhaps color vision would be more sophisticated than "try to integrate the spectrum with these three profiles and try to find a point in multidimensional space using that"
 
6:45 PM
Right now I'm focusing only on the physical responsivity of cone cells, and pretending that there isn't any especially fancy post-processing after that. A single cone by itself can't determine the wavelength or intensity of light, since responsivity is dictated by a mixture of both. A single cone reacting at half strength could be due to half-intensity light at the peak of its response curve, or full intensity light halfway up its response curve.
 
indeed (I think)
 
If you have two different types of cones, then this reduces the possible wavelength/intensities that can produce a particular combination of reactions. If you have three different cones, it reduces it even more.
 
honestly I don't try to guess how color vision works since I've learned about color blindness correction glasses
 
One thing I'm trying to determine numerically is whether there are any pairs of spectral colors that are indistinguishable from one another if you only have S and M cones. Empirically this must be the case since that's what colorblindness is, but I want to get an idea of which colors are indistinguishable.
You could think of the problem as "given the functions f(x) and g(x), find all pairs (x1, x2) such that f(x1)/g(x1) == f(x2)/g(x2)"
 
@Kevin if it helps there's "red-green" and "blue-yellow" color blindness
(apart from the full version)
Hungarian conveniently distinguishes between the former ("color confusion") and the full version ("color blindness")
 
6:58 PM
protanopia - missing L cones
deuteranopia - missing M cones
tritanopia - missing S cones
Cone monochromacy - missing any two cones
Rod monochromacy - missing all cones
I wag my finger at en.wikipedia.org/wiki/Color_blindness for using the phrase "red retinal photoreceptors" when we just established that the red line doesn't peak at red
 
Bite thine thumb
 
With only M and S cones, there are plenty of solutions for the f(x1)/g(x1) == f(x2)/g(x2) problem, because s has zero responsivitiy for half of the visible spectrum. So for all wavelengths "w" in the range of 500 through 700, S(w)/M(w) == 0 / M(w) == 0
 
7:20 PM
The paragraph in en.wikipedia.org/wiki/Color_blindness that starts with "Protanomaly and deuteranomaly can be diagnosed using an instrument called an anomaloscope" at least partially answers one of my questions. It produces a mix of spectral red and green, in varying ratios, until the testee declares that the color exactly matches a spectral yellow that has been provided for comparison. This means that you can produce a hybrid yellow that's indistinguishable from spectral yellow.
... But perhaps this is cheating because the S cone has (nearly) zero reactivity during the entire test. Perhaps it would be impossible to create a hybrid blue that's indistinguishable from spectral blue, since all three kinds of cones have reactivity in the blue wavelength.
 
wim
does it install its library as owned by root? I don't know, because I've always used homebrew for macOS python installations.
 
@wim IIRC, it does require root permissions. YMMV because the last time I did that was py2k in 2012. I use pyenv now, which does not require root permissions
 
wim
7:36 PM
hmm, that's unfortunate, because as soon as the pip becomes outdated it will have the nag telling user to pip install --upgrade pip, which won't work.
 
People who understand (perhaps literary) references in English, could you please explain to me the definition/usage of "Mandarin" as an adjective in the following paragraph?:
> America is thus a nation rapidly drifting towards a state of things in which no man of science or letters will be accounted respectable unless some kind of badge or diploma is stamped upon him, and in which bare personality will be a mark of outcast estate. It seems to me high time to rouse ourselves to consciousness, and to cast a critical eye upon this decidedly grotesque tendency. Other nations suffer terribly from the Mandarin disease. Are we doomed to suffer like the rest?
 
wim
it's mandarin as in chinese not mandarin like the orange
 
I think it's a florid reference to China's educational system, which prioritizes rote learning. A detractor of the system might say that the students learn to pass tests without actually learning the fundamentals. So the diplomas and credentials they receive don't necessarily reflect their practical ability.
 
Or perhaps there is a more widespread social phenomenon of credentialism in China, of which their eductional system is but one symptom. I'm not super versed on the topic.
 
7:45 PM
Ahh... that makes sense. Thank you. This reminds me of an Assimov story in which pizza delivery guys were required to have PhDs
 
wim
Ain't that what it stands for? Pizza-hut Delivery
 
hahahaha. So at the ceremony, do you get a Pizza-hat?
 
wim
googled pizza-hat. was not disappointed.
 
wim
8:54 PM
ouch ... grep -r doesn't follow symbolic links
you want grep -R .. this had me confused for way too long
 
hello!
 
cabbage
 
00:00 - 21:0021:00 - 00:00

« first day (3306 days earlier)      last day (1643 days later) »