« first day (2484 days earlier)      last day (2688 days later) » 

16:02
xD
Just ate a potato chip that I estimate was 60% vinegar. Wish I had known ahead of time so I could mentally prepare.
@Code-Apprentice yup what's up?
@idjaw See my recent messages about myu PyCharm settup?
@Rawing What about the errors reported in the editor in the IDE?
OK. If you reference back to my screenshot I sent you will see that I set up the working directory
that working directory is going to be the same even for the actual running of the app
this allows all the imports to be with respect to your main execution point
so your test runner and app runner should be running from the same place so you avoid all that import insanity
that is the main issue you are facing I believe
16:19
Are those settings used for resolving imports in the editor as well?
@Code-Apprentice Not sure. I don't have any red squiggles.
Second time in 2 weeks I've tripped over code like this:
@Kevin how did that happen?
def validate(thing):
    if ... put validation conditions here ...:
        return True
    else:
        raise ValidationException("{} ain't valid".format(thing))
the vinegar bit I mean
@PaulMcG the problem being that it doesn't just return None False? [edit: typo]
16:22
@Code-Apprentice Yes and no. So the first thing you need to do is configure your project settings
then for your test runner config, make sure you use the proper working directory for where that main execution will be
Seeing a "return True" path tells me that the alternative would "return False"
yeah, I meant False, sorry
Or leave out "return True", negate the validation conditions, and just raise
@AndrasDeak The cafeteria occasionally offers ready-made specials, which I like because I don't have to talk to anybody to get one. Today's special was pulled pork and chips. The fact that the chips were moderately vinegar-covered was not advertised.
16:24
@idjaw sweet! I finally found what I was looking for. Just had to mark the tests folder as a source folder.
there ya go!
I found different ways you can go about doing all this stuff....it's not as clear cut as it should be.
glad you got it sorted out
yes, as great as PyCharm is, sometimes it is difficult to find the settings you need, even with the command palette.
@Kevin aww :(
@Code-Apprentice yup. Throw in IntelliJ instead and you will see that all projects have their own mess of configuring it all
PHP by far is the biggest yam to configure
especially if you are wiring in tests
javascript, python, php so far each have their own distinct way in intelliJ
I like vinegar well enough although sometimes it irritates my mouth
16:26
I mean...I guess it makes sense? But, couldn't there have been some more thought in to the Ux to help streamline it a bit?
So it's best if I enter into the transaction consensually
@idjaw I am much more familiar with IntelliJ...at least Google's version for Android dev.
which has its own set of options, too
IntelliJ is what I was at work and PyCharm is what I use personally.
talking about which...I want to get a professional version for work. Should I get PyCharm or IntelliJ and install plugins?
What's the difference?
if it is for work, get work to get IntelliJ
16:29
Yes, for work, and the company will buy it for me.
yep. Get IntelliJ
definitely
Pro has a 30 trial, right?
I suppose?
Not sure
When I was employed I was just given my key and that was that.
I have PyCharm Pro right now as a trial.
I eventually bought my own personal PyCharm license
16:30
IntelliJ itself is enough I think
I'll check it out next week. I need to get some actual work done and deal with the IDE config stuff later.
The only reason I oppose IntelliJ for personal use is based on price alone.
It's more?
Unless you are self-employed then I would say it is worth every dollar.
Well, I would say its worth the money spent.
16:31
IntelliJ >> PyCharm
I do Java, too, for my personal projects.
WHAAAAAT?
But so far the Community Edition has suited my purposes.
JAAAAAAVVVVVVAAAAA?
@thefourtheye Can you do node dev with PyCharm?
I haven't tried
16:31
@thefourtheye Yes, for android.
@idjaw Nope. They have a Node.js plugin for that and that is also costly.
Atleast in Indian money
@Code-Apprentice Your use case seems like it might be worth it to just cough up the price for intelliJ. Because you might end up buying the piece-meal IDE's and it could get really irritating loading up an IDE per environment
@thefourtheye Oh...so the node plugin in PyCharm has a price to it?
that probably means it has its own standalone IDE....probably webstorm?
Exactly...
But it will work with everything
I recently saw Visual Studio Code in one event, and it looks like it would be good for Node.js development.
VS Code is great for many things
I tried it... I like it better than Atom now...
16:39
VS Code is pretty damn sweet
but I hardly ever jump in to an editor anymore and want to give it love
the combination of IDE and vim is enough for me
See, that's the thing. It hits the perfect sweet spot between vim and an IDE for me.
interesting. I'll have to play around with it a bit more. How much time did you invest to play around with it? as in, add plug-ins, etc.
Very little. The only "learning curve" was setting up plugins to make it work the best for a given language, but that wasn't so hard
alright. fair.
16:55
Node.js development is horrible no matter what editor you use
I wouldn't go that far. I'm not the biggest fan of node being the answer for everything
but I have to say when I had write a few APIs in node, it wasn't bad at all.
Pretty curious how Python error message when using import is getting a syntax error on a version string, and for a version that he hasn't got on his machine no less.
until your code gets complex
Javascript is unable to handle complexity. Either that or I am horrible at JS
hmm...I still disagree
using await/async to help structure the code nicely helped greatly in making the code very well structured, easy to read and very easy to test
I will agree that you can very easily fall in to the trap of ugly code if you don't properly structure your code to avoid the callback hell
haven't had the chance to use async/await
maybe that's why
16:59
that is exactly why :)
It's all fun and games until your environment variables get stolen
haha
I work with Java and Javascript every day. Java is infinitely more enjoyable for me
<insert java joke>
I think the reason JS works(in our case too) is that APIs aren't that complex
17:02
probably
I cannot speak for UI dev at all. I haven't touched it in years
and never in a node context
I've been middle and back for a few years now and like it just fine.
one thing I never liked about Node is that it lacks ORMs built on a decent db layer (like postgres). There's one for mongo but bleh.
yeah, we were lucky that mongo did exactly what we needed
so there were no issues there.
Maybe we should stop trying to do JS on the backend and start trying to do literally any other language on the frontend :thinking_emoji:
4
WOuldn't it be nice?
good luck convincing dev hipsters
js is the one true answer for everything
so stop thinking
wim
wim
17:12
do you guys wanna hear my java joke
I thought Java was the joke?
If it's at Java's expense, yes
I sense trouble ahead
badum tiss
here we go
wim
wim
17:13
Q: knock knock
A: who's there
lol I knew it!!!!!
lollerskates
wim
wim
:D
hahaha I was telling myself "He is going to wait like 10 seconds to answer"
Are we making fun of java for being slow?
17:14
See, that joke doesn't actually make sense. Java is fast. VM startup time is slow as heck. it would make more sense if the answerer were java and the question-asker was the one starting the VM
how can you tell you just told a joke to a bunch of nerds?
6
I love you, fam.
[the best kind of correct.png]
reminds me of the imessage prank
Java is a great language
17:18
The VM is interesting, at least. I find the language adequate at best, and the tooling and ecosystem hostile at average.
Popular languages decline in reputation as more and more clueless programmers write non-performant code in it. So it goes.
@Kevin which languages?
All of them.
Just the computer ones, I think
17:25
funny, all I hear is C++ is faster because no VM arguments
but C++ is popular too
so that irrelevant I gues
All languages are computer languages, but not all of them have parser implementations yet.
English will be the most popular language for game development when computers can turn "make me a triple-A quality game with free-roaming survival elements and a crafting system" into a working executable
Java can make optimizations to its code that can only be determined at runtime. There's always tradeoffs. Most of the java code you run is native anyway since it's JITed, but that does increase initial startup time.
@KevinMGranger not even considering the fact that vast majority of C++ devs won't be able to write C++ code running as fast as Java
@WayneWerner lol
that's hilarious
17:36
Almost no one needs the performance they think they need, anyway. Just use python ;)
lol haha
I should try writing one of our services in Python
microservice?
but I don't think it will be able to pull off
yea
do it
Python + docker + microservice = <3
17:40
@khajvah Why not? Instagram does
@idjaw that reminds me that a colleague showed me this but I don't use docker
@WayneWerner I heard they are doing some weird stuff like turning off automatic garbage collector
shrugs
make it work, then make it fast
@khajvah I thought that was a response to this in which case it would've been an epic pun
17:46
When your processes don't last long enough for gc to matter, yup, disabling it helps!
they're all riding missiles
all this is way above my skill level
I feel stupid now
my knowledge is too high level
If you don't feel like you're out of your depth then you aren't learning anything
@khajvah I try to learn by just being here and reviewing the chat every once in a while. I'd say I have sub-par success :P
@AndrasDeak i_understood_that_reference.gif
17:48
@Programmer chat discussions are high level too most of the time
until some wizard brings CPython codez to the chat, I mean
PyDropSomeKnowlede()
For when knowledge is not enough, get your knowlede on.
idjaw trying to lede us astray
I'm always here for you, fam. Always.
every time I try going deeper, I come across C and stop.
that language is just not enjoyable
17:54
C?
I'm very curious to dive in to C.
I really need to make some time to do it.
it's rather boring to me
but the stuff that are written in it are intereting
It's fun to write in c, it's not fun to read c though.
C is not as bad as its reputation
CPython C is downright enjoyable to read
C seems alright, I'll check it out more once it's production-ready
I really can't stand to read C... It makes me question the purpose of life. Cpython is ab it better but still no thanks. I really enjoy the memory management though. super fun and feels like a hax0r :D Dream job. Write C but never bug fix it...
> Maybe if I keep believing, my dreams will come to life.
18:09
wait wait I know this
33 mins ago, by Kevin M Granger
Almost no one needs the performance they think they need, anyway. Just use python ;)
Thanks Kevin. I now have my go-to answer.
cheers, bud.
old_guy_in_pub_raising_pint.gif
@MooingRawr just use valgrind to debug your memory management
You don't need regex to detect if a line starts with '*'!!!
In fact, since * is a special character in regex, it'd be even harder to use regex for that. Heh.
@WayneWerner hmm I will keep that in mind next time I work with c or any memory management system. Thanks
18:20
C is fun. Bad C is not fun.
Good C is a myth, don't believe the propaganda! Even hello world in C has bugs! D:
Do you have a file named "io.py" in your current directory? — Kevin 2 hours ago
The only 'io.py' that I can find is in C:\Python27\Lib — DanaDaskalova 2 hours ago
@user2357112 good God in heaven, you're absolutely right, there is indeed a io.py file in there and it does contain 'Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32' Would it work if i just delete this one line? — DanaDaskalova 1 hour ago
[Deep, mournful sigh]
If House taught us anything, it's that the patient lies
happening now
18:31
I'm discounting the possibility of malice, instead opting for the simple fact of not looking in every directory that the import system looks for files
Tip for future Kevin: don't bother asking the OP about their current working directory, because they can misinterpret that question ten different ways. Just make them run os.getcwd() and/or os.listdir() as necessary
@idjaw it was hailing yesterday when I was leaving work. I was scared of the little bite size ice balls would crack my windows. :\ At least it isn't raining upwards (when it's raining and you walk over one of those air vents for the subway systems) :D
what is this "precipitation" you speak of?
I'll just refer you to here @AndrasDeak -> matadornetwork.com/notebook/…
and look for an insulting remark in there
I direct it at you
@idjaw clearly translated by Hungarians, +1
I know multiple offensive variations to #4
I want some Mac 'n Mackó
18:46
"mackó" is actually diminutive for a bear cub
Not to be confused with prominent Ocean City New Jersey pizza parlor Mack and Manco's
looks like this m.cdn.blog.hu/ho/homar/image/200901/medve1.jpg (well, the oldschool one is this one: nyest.hu/media/…)
which is why the "yield to incoming traffic" sign is nicknamed a "macisajt" sign
That's a very serene looking bear. He would fit in well with the Gorilla Munch Triumvirate
18:48
hehe :D
But it wouldn't be a triumvirate then, would it :/
I see the oldschool illustration adheres to the Droste Effect, just as The Laughing Cow and Land O' Lakes butter does. What's the deal with that trend?
@KevinMGranger He wouldn't get voting powers but they'd still hang out.
@PaulMcG -> [tag:cv-pls] {link} {reason}
18:52
Sorry, I don't post those that often,
no worries. It's only because there are some scripts that run to detect those messages under a particular format.
I wonder how many regulars actually use those scripts.
I guesstimate "none"
wow
wasn't that "doesn't give a yam about tornado" photo also from Canada?
19:06
I am reminded of:
@AndrasDeak yeah
tornados are not...typically Canadian, right?
I think the proper term is Canada Tornadoes
you know, like Canada Geese
tornados are not a thing for us. Which is really strange for us
I already checked if this was a Canadian Tornado (a flock of geese randomly attacking people)
it wasn't. This is a classic tornado
The beverage Canada Dry is almost entirely liquid so I have some objections about its branding
19:15
I suggest walking up to the tornado, apologizing and asking them to relocate to their proper destination
I never knew why the word Dry was in there, Kevin...and now I know why
> The "Dry" in the brand's name refers to not being sweet, as in a dry wine. When John J. McLaughlin, who first formulated "Canada Dry Pale Ginger Ale", originally made his new soft drink, it was far less sweet than other ginger ales then available; as a result, he labelled it "dry".
@AndrasDeak I think I might need to sacrifice a beaver.
> this is concentrated food & should be eaten slowly
I lawled
wow...@khajvah that's amazing. Thanks for sharing
and I saw the production for that is in Montreal!!!
that's insane
I could have sworn I linked the old MRE eating youtube channel in here before... But a search for "botulism" has zero hits so maybe not
19:20
ouch
> these were bad 71 years ago
Yesterday I opened a bag of marzipan "potatoes" that expired last September. I took caution and only ate half the bag, in order to get only 1/2 sick if they're bad. Today I finished the rest of the bag. #winning
things that smell terrible. Rotten potatoes
Our ancestors ate dirt for like 100 million years*. I think people underestimate what humans are capable of digesting.
(*Ok probably not literally but you get my meaning)
19:24
Is there an easy way to generate 2-value combinations in this specific order: combinations([1,2,3,4]) -> [(1,2),(1,3),(2,3),(1,4),(2,4),(3,4)]?
@Kevin yeah but the life expectancy has changed a bit
>>> list(itertools.combinations([1,2,3,4], 2))
[(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
Dang, not the right order.
sort them
@AndrasDeak as a lover of marzipan....I want that now.
Getting the obvious attempt out of the way for everyone else's benefit. Let me jump on this grenade ;-)
19:26
> What's the matter with me? Hm, I don't know takes another bite of 71 year old chocolate
@AndrasDeak Apparently low life expectancy in early history had more to do with high childhood mortality than anything affecting adults. Therefore, you can eat dirt once you turn 18.
Andras... That was beautiful :D
what is that order?
Well actually it doesn't have to be specifically that order. The thing is that I'm doing expensive operations with each value (1, 2, 3, 4), so I only want to move on to a new value when all other combinations are already exhausted
19:27
I don't get it
So 4 isn't used until all combinations of 1, 2 and 3 have been generated
Hmm
it looks like the second number is increasing after the first number is exhausted of all it's pairing
chain shorter combinations somehow?
I'm not even sure how to formalize that constraint
probably something recursive
if it was 1,2,3,4,5 I think the order would be [(1,2),(1,3),(2,3),(1,4),(2,4),(3,4),(1,5),(2,5),(3,5),(4,5)] etc...
19:29
def combinations(seq):
    if len(seq) == 2:
        yield tuple(seq)
    else:
        for t in combinations(seq[:-1]):
            yield t
        for item in seq[:-1]:
            yield (item, seq[-1])

print(list(combinations([1,2,3,4])))
#[(1, 2), (1, 3), (2, 3), (1, 4), (2, 4), (3, 4)]
[(i, j) for j in range(1, whatever) for i in range(1, j)]
You could itertools it, but it sounds like the runtime will be dominated by whatever you're using these combinations for.
import itertools
import operator
print(sorted(list(itertools.combinations([1,2,3,4], 2)),key=operator.itemgetter(1)))
going to test my speed one sec I think Kevin would be faster
@Kevin Nice! Thanks. Now to understand how that works.
or [(l[i], l[j]) for j in range(len(l)) for i in range(j)]
@user2357112 Thanks, now I feel stupid for struggling to make your previous snippet work with non-integer lists.
19:37
@Kevin good to know!
OK. This wonderful international community needs to help me understand the proper name of this:
I only know the name in my native tongue....and apparently it's called a cactus pear?
ask @Antti, he's an expert on weird and disgusting fruits
what are you eating lol...
that fruit is delicious
I'm eating it now
it's so good
"fig cactus" in Hungarian, according to wikipedia
oh, that's the plant
"whatever grows on a fig cactus, how should we know" then
great. I'm sticking with cactus pear
the only poke-y fruit I've had before is Durian. smells so badly but tastes like nothing I've had before...
I suppose cactus pear are safer to harvest than durians :D
I'm not going to call it a prickly pear
that just...no
:D hahahah that got my giggling using my mental image of you saying prickly pear with a disgusted look on your face :D
20:03
stackoverflow.com/questions/45488303/… I was to help this person learn but I don't feel like it's right, to encourage this time of question. Am I wrong if I answer this question ? ( I have my answer typed up but debating with myself)
hard to say
it's a "make my code better" question
I don't have any strong opinions there
His question is what's holding me back
if he formatted his code as in "I can't reach the later if or This is what I've tried but I can't do y. I would have answered it already
prickly pear are pretty delicious. Just watch the spines
20:20
Hey everyone! :)
cabbage @user6582640
I got this
```
u'troops': {u'skeleton_horde': 1, u'chr_balloon': 3, u'baby_dragon': 2, u'minion': 7, u'knight': 7, u'musketeer': 5, u'order_volley': 7, u'fire_spirits': 6}
```
to this

```
fire_fireball barbarians order_volley mirror goblin_barrel building_xbow prince inferno_dragon
```
using this

' '.join(x['right']['troops'])
But I'm missing the level. How would I get the um... key value (?) and put it next to the character?
Thanks @WayneWerner!
Something like ' '.join('{}: {}'.format(unit, level) for unit, level in x['right']['troops'].items()) I guess
20:25
Holy crap
I'll try it lol
Ahhh! You're the greatest!
Thank you @Rawing!
Y̶o̶u̶'̶r̶e̶ ̶w̶e̶l̶c̶o̶m̶e̶ Watermelon
hahaha
You guys have a good day. Thanks so much again
20:43
@idjaw I don't actually know that @AndrasDeak
I know it exists but that's about it

« first day (2484 days earlier)      last day (2688 days later) »