« first day (2292 days earlier)      last day (2881 days later) » 

20:00
@wim this is the oneliner python room
I'm pretty sure we've done it twice before but I keep forgetting how to do it :3
@Kevin the answer I linked has another answer that's been edited by wim, and I remember discussing it here
wim
wim
I'm trying to find an old question I answered about this ..
but I didn't remember that it was about this subject
wim
wim
there was another user who had done it in some insane magical way, but it worked
20:02
that's the one
12
A: defaultdict of defaultdict, nested

ptsSimilar to BrenBarn's solution, but doesn't contain the name of the variable tree twice, so it works even after changes to the variable dictionary: tree = (lambda f: f(f))(lambda a: (lambda: defaultdict(a(a)))) Then you can create each new x with x = tree(). For the def version, we can use ...

edited by the badger himself
when somehow lisp would be more readable
wim
wim
oh, right, that's why I couldn't find it
it was not my answer, just my edit
Hmm, I'm 95% sure that works
I only remember because I almost know that guy
Good old lambda f: f(f).
20:04
that's functional programming right there
That reminds me of the height of my PLC class: implement a dictionary in Scheme using only lambdas
was it webscale?
Reminds me of:
Jan 7 '14 at 21:06, by Kevin
Today's experiment: Fizzbuzz in 56,909 bytes
noo nooo no no no no nooooo
"You're hired. And you're fired."
Oh, I didn't know there were python minifiers
20:07
Featuring Church numerals and a guest appearance by Zalgo
don't bring religion into this
:-P
Once you work out that 3.14/3 == 5.14 fizz., it becomes trivial
DSM
DSM
Admirable.
@KevinMGranger wow
20:13
Hello guys I know this is not the place to ask this question but if there is a ruby channel can somebody give me it's link
Thanks
@Gardezi you're joking, right? Literally go to the chat page and search "ruby".
DSM
DSM
If you see @WayneConrad, say hi for us!
Speaking of exploring other rooms, this was in the PHP room: gitamp.audio
oh yeah. I saw that a while ago. It's really cool!
I can't remember if it was here or in work-slack.
DSM
DSM
The second this phone meeting is over I'll plug my headphones in and listen!
20:19
Sorry @davidism my bad @KevinMGranger What's the deal with this room
sorry leave it
@Gardezi at this rate you're not going far. Read our room rules, don't ping people at random.
@davidism I know. Sorry about that. My bad
@Gardezi did you go to chat.stackoverflow.com and search for ruby?
20:26
@idjaw yeah and I got it. Thanks for all the help :)
I'm pretty sure one of you recommended the book Three Body Problem, like, four months ago. My library finally notified me that it's in stock.
wim
wim
useless question collecting useless answers, and OP didn't edit it into shape. delete please. stackoverflow.com/q/41833388/674039
@Kevin I'm sure I've seen it mentioned here
Yeah, I recommended it.
I hope when they say "on hold for you until Jan 28", they mean up to and including all of Jan 28, because I go to the library on Saturdays.
I don't know anything about it except the title and the problem it refers to
In physics and classical mechanics, the three-body problem is the problem of taking an initial set of data that specifies the positions, masses and velocities of three bodies for some particular point in time and then determining the motions of the three bodies, in accordance with Newton's laws of motion and of universal gravitation which are the laws of classical mechanics. The three-body problem is a special case of the n-body problem. Historically, the first specific three-body problem to receive extended study was the one involving the Moon, the Earth and the Sun. In an extended modern sense...
DSM
DSM
20:29
I've had it recommended to me by people of wildly different perspectives, so it probably has something to it.
I'm sure everybody thinks it's a romance novel, but are too ashamed to admit after reading it, so they keep on suggesting it with a straight face
In principle I could go get it now because I'm already finished this week's book (Things Fall Apart), but... Effort.
(God bless two hundred page books with big fonts.)
You'll want a happy book to read after it. It's really good, but really bleak in its outlook. Gets even bleaker in the second and third books.
Not to discourage you. I couldn't stop reading it in the moment.
Oh, I thought it was actually about the physics behind it but easily digestible, a-la a brief history of time
I found brief history anything but easily digestible. Then again, I was ~15 when I read it.
20:34
You weren't already well-versed with particle physics?
I've got Black Holes and Time Warps on my shelf but I've only ever read the first chapter and looked at all the pictures.
I'll always wonder what that one chapter is about that is illustrated with what strongly resembles cornstarch on a speaker
@KevinMGranger alas, no
@Kevin oobleck \o/
New cult: the universe is on a giant speaker in space. The big bang was the "drop" and we are in the "wubstep" era.
If I had to guess, that chapter is about quantum fluctuations on the scale of the Planck length
Maybe now I'll read it to find out.
20:39
do:)
Kids, don't read for your education, read to prove your friends wrong.
+10 points for doing it technically
DSM
DSM
This git music makes me feel like a hippie.
Semi-relatedly, I keep seeing references to this song saying it's been proven to reduce blood pressure etc. I don't know about that but it is pretty relaxing.
Yo.
Regarding the link at the bottom of this message (where the goal is to find smaller letters with exactly three capital letters on each of their sides), can anyone explain to me what is the character + doing in [^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+?
I understand that + makes it so that it matches more than one non-capital letter, but as I understand it, it doesn't matter that happens beyond the first non-capital letter, one is enough.
https://the-python-challenge-solutions.hackingnote.com/level-3.html
(see full text)
DSM
DSM
20:50
Since it's exactly three capital letters, they put a "something not a capital letter" at the start and the end. Does that make sense?
@DSM I get that [^A-Z] is there, what I don't get is the plus sign.
I think I understand the question and I think I agree that it doesn't matter if the + is there or not as long as it's not *
@AndrasDeak I think you see my point, yes.
I wager 0.9 quatloos that it's there because some regex matching methods only match from the start of the string
20:53
that's possible
re.match("b", "abc") returns None
then again, with a greedy algorithm the above will find a match that starts before the last non-capital
Despite b plainly being in the string
DSM
DSM
Hmm, I'm not sure I buy this regex.
Having now read the actual page, it uses findall which doesn't give a fig about starting position, so never mind.
20:54
@Kevin I was about to comment I haven't learned about match yet xD
you'll find your match then
DSM
DSM
The + bit means that there has to be a character there, so "ABCdEFG" won't match even though d has exactly three letters on each side.
so would the same thing without +, right?
I tried it without the plus sign, same result. I tend to think about the code before executing.
[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]
DSM
DSM
20:55
Yeah, I'm saying this is the wrong way to go about it.
ah, OK:)
It annoys me that I can never remember the difference between "+" and "*", and doing help("+") is not at all helpful
@Kevin those I never confuse
Don't you use wildcards in a shell? The * there works similarly, according to my logic
Thank you all, by the way.
no worries
20:57
It's one of those things where I use it right 99% of the time but when asked to explain the difference I immediately trip
let your cerebellum do the work
I see 0.9 and I'm triggered (referring the the incident that happen at the recent Smash 4 tournament)
Shell globs and regexes do not work similarly whatsoever ever
Don't let that bite you
rm -rf .*
# don't do that
@Ffisegydd Ooh, I like the second one under "explorations". I must learn the secret of seemingly 3d line art.
@MooingRawr I read about that but didn't understand it 100%. Was it supposed to be set at 1.0 and they didn't replay the match though?
21:01
I hope this isn't taboo. Before I started learning Python I, naturally, googled about Python 2 vs 3. What I found is that even though it basically not mattering at my level, is that there wasn't consensus (most of the stuff I found was 3+ years old) about whether Py3 would be he norm or not.
As of now, can you can guys tell me what the verdict is?
DSM
DSM
Most of us here are 3 users these days. Some of us feel very strongly about it, others less so.
Use the latest version unless you have a preexisting condition.
The verdict is that those who prefer 2 are sub-human, much like their version number is sub-3
@KevinMGranger I meant along the "which one is * and which one is +" axis
@KevinMGranger Ahahah.
21:03
Some of us feel very strongly about it
@GitGud python 2 dies in 2020.
Took me 4 years to transition from Python 2 to Python 3 in my personal development. In my opinion, it is better.
DSM
DSM
I wouldn't recommend a beginner start with 2. Too many pitfalls.
There are many code-bases that exist in the business sector still running on 2, but if you are starting something new use the latest stable.
I'm on the latest version I think, 3. something. Maybe 3.6.
Only messed with 2 on CodeAcademy.
21:05
I learned a bit with 2 years ago, took a break, came back to 3 and found that I had forgotten all of the 2 gotchas, and what do you know, didn't need to remember them.
@Programmer It was suppose to be set at 1.0 but for some reason, the to p8s were done in 0.9 messing up some people's combos and potential kills.
The author of Learn Python the Hard Way seems to have a very strong opinion, namely that 2 is better.
Frankly, it seems to me that he's basically raging and ranting, so I didn't take him too seriously.
What makes an author with such visibility defend Py2 so strongly?
very good question
Oh god not this again.
it seems to me that he's basically raging and ranting, so I didn't take him too seriously.
21:08
@GitGud incidentally, read this
@AndrasDeak was about to link that....
I think you've identified a key point here. Many in this room are very dissatisfied with the misinformation spread about 2 vs 3, and said author is responsible for a non-zero amount of it.
@MooingRawr Sorry, my personal technical opinion is worthless (I don't even have one), so I need to rely on others :)
Keep in mind those articles were authored during the Python 3.1 era.
Py3 sucked during that time.
21:09
I'm super pro-3 but I acknowledge 3 before around 3.3 was... unfortunate. A lot of breaking changes that weren't necessary.
DSM
DSM
Library incompatibilities meant that I wasn't willing to make the jump until itertools.accumulate growing a key argument was irresistible.. but when the state of 3 changed, I changed my position accordingly.
@GitGud Why are you sorry? I was just merely shuddering at the thought of having to remember all the bad things about LPTHW, nothing personal against you...
I switched around 3.4 so I didn't need to worry about the atrocities of 3.1 and 3.2. I heard stringio was completely broken.
Also, when somebody complains that a lot of libraries are still python 2, show them this
Aight, aight. I'm sold.
21:12
supervisor please
I picked up 2.7 in high school. picked up 3.3 in university..
@AndrasDeak obviously it is wrong to call that one guy a N :D
I like having both on my resume. More job opportunities, though I really REALLY don't want to spend my days managing unicode support in a Python 2 code base.
"Just skip Python 3 and go straight to 4, make it compatible"
I stink with formatting so I'm not going to try... lol
"Make Python great again"
I hear these
21:15
anw airport cbg
DSM
DSM
Compatible with what? Not going back to Python 2's mistakes, I hope.
I'd love a precognitive map that knows when to return a list
cbg Antti :D do you have an opinion on Python 2 vs 3
Ohohohohoho, does he ever
21:17
Hi, Antti.
@MooingRawr I do not have opinions. I just have solid facts.
Antti doesn't have an opinion on Python 2 vs 3; he's rather an opinion on two legs.
This vegetable lingo was done before in Dragon Ball.
I am the one who helps everyone else say: "look, compared to Antti, my opinions are quite moderate."
21:22
Cbg
How are you all
Jamming to music and writing Typescript.
That's nice
Wish it could be Python. XD How are you?
21:26
I am good, thanks
I am looking for some groups on facebook or something where they post some challenges to solve
Can't help you there.
I entered one group and there's nothing but people posting some random tutorials for "how to learn python in one day"
One day? What happened to 24 hours?
Not all in one day, of course.
All I meant is that I was expecting tasks :D
@Andras I really like Ubuntu, I haven't used Windows in 1 month :D
21:38
glad to hear that:)
are you using unity or gnome?
Oh.. I have no idea :D 16.04 LTS :D
gnome and unity are window managers, they are what you actually see when you use ubuntu with a mouse
Ah, I just checked. It's unity
@SimeonAleksov, going back to your previous query, have you ever tried codewars.com?
@SimeonAleksov then read this and this, I'm not sure if it still applies (I've been using gnome for a long time), but better to be safe than sorry
21:42
@Jacob-IT, I haven't. I will check it for sure.
@Andras, Thank you, will do :)
@SimeonAleksov this newer site says that 16.04 might not enable spyware by default:P
you'll need to look into it whether it's still an issue
Yeah, I'll definitely read those articles.
I am just giving myself break from studying :D
I have a computer architecture exam tomorrow ;D
sure, no rush, just be aware of this potential issue:)
21:51
Thanks :)
Clever code for summing numbers a through b, where a and b are not guaranteed to be provided in order:
def get_sum(a, b):
return (a + b) * (abs(a - b) + 1) // 2
that's just Gauss
I know that's a math thing, but sorry it doesn't ring a bell.
22:07
The anecdote says that young Gauss was bored as hell in school, and kept annoying the teacher. The teacher wanted to occupy him for a while, so gave him the task of summing the first 100 numbers. Then young Gauss came up with the formula for summing n consecutive numbers, and was back to annoying the teacher within minutes.
That's awesome, thanks for sharing.
when I saw the code I thought it was really clever, didn't know it was an established anecdote.
I'm not sure how established it is, I last heard it in middle school:)
22:26
rebg
@SimeonAleksov Try Arch
he's new to linux
... in a VM
22:44
Using not Windows spoils you. Going back to Windows I'm always like "WTF happened here?"
last time I used windows 10, it constantly used 100% hard drive and was slow as hell
a friend of mine got HDD fried
Going back to Windows is like once being a king and now banished. I have no authority anymore.
23:03
What is wrong with Windows, exactly?
nothing
It depends what you are trying to do and what restrictions you face, and what you want to do to work around those restrictions
speaking purely within a developer context
@Brandin no control, no package management, programming(especially python) is pain
23:16
I don't know about the no control part. But, package management, yeah, definitely.
Programming, yeah. Outside of .NET, you start getting to hacky territory to get things to work
I think java is fairly solid though, no?
repcap <3
and guru
23:59
Package management is fine on Linux only if you want to install everything into /usr/bin. That's what 99% of add-on packages are packaged to do, with fixed paths. At least InstallShield and co. on Windows let you choose the directory.

« first day (2292 days earlier)      last day (2881 days later) »