« first day (1801 days earlier)      last day (3372 days later) » 

12:00
Sorry did not know that :) just wanted to help out
Hi @Kevin: I saw a confusing unclear Tkinter question yesterday. I has about to post a comment requesting clarification, suspecting some horrible XY problem. But then someone posted a crappy answer which the OP accepted. I didn't know whether to scream or cry. :)
This doesn't seem to be an answer
@PM2Ring Yep, that's not a very good answer
Without an IntVar, there's no way (AFAIK) to get the state of the checkbutton. I wonder how long it will take until OP thinks "Ok, now how do I actually get the value of alpha_check?"
I guess it might sorta seem to work under simple testing. Until you attempt to access boxticks.
If he only needs to determine the state in rare circumstances, it could take a very very long time
I'm tempted to answer it myself for the principle of the thing
Nah I'll just leave a critical comment
12:08
It's hard to know what to write without knowing what the OP's really trying to do.
Monday cbg
It's easy to give OP what they want, but hard to give them what they need
Amen
But if you try sometimes
You just might find
12:10
cbg
I finally finished my script that compresses data using Huffman coding.
problem is, I have a dictionary file containing the pickled huffman tree, and it's bigger than my compressed and uncompressed data. what do?
Radionbutton output reset and border that's not showing up amuses me because the code is so incomplete, it starts with ` = Label(...)`
I guess it didn't occur to OP to copy the entire line
TBH, I thought it weird that Tkinter accepted variable = boxticks after boxticks was turned into an int. I thought the variable arg had to be a Tkinter IntVar, StrVar, etc.
I think it also accepts integers.
@Kevin That'd explain it. :)
I think all [Thing]Vars have a globally unique id that you can use in place of an actual reference to the object
12:14
@Kevin That rings a bell. And I think Tkinter inherits that approach from Tk/Tcl
@GLaDOS approximately how big is your uncompressed data? For something in the ~100 byte range, I wouldn't be too surprised if the setup for huffman coding might actually exceed the size of the thing it's encoding.
Alternatively, wild guess: when you encode the file, the resulting output is a string that looks like "010100011000...", which is inefficient because you're using eight bits per character when you could be using one bit.
@GLaDOS Well, that's the downside of Huffman: you need to store the Huffman table. But the usual approach is not to store it as a pickled Python object. :)
here's all of the statistics
what would you use instead?
@Kevin Nah, we've got that stuff figured out.
Perhaps it would be worthwhile to write your own serialization algorithm for the table. You can take some shortcuts that pickle can't, because you know e.g. that all keys+values are strings, that all keys are one character long, etc etc
12:18
Meh damn it
Is there a way to get all phone numbers from a page I could use regex but matching phone numbers of all format would be almost impossible since it varies from country to country or am I wrong
I really wouldn't like to implement my own serialization algorithm
@VigneshKalai I see this question asked occasionally and the consensus is "this is pretty difficult to do"
sighs :(
like, really wouldn't like to
12:21
@GLaDOS Are you directly pickling the tree? You don't necessarily need the entire node structure - you can just take all the leaf nodes and build a simple dictionary out of it
Hey guys, popping in for a python stylistic question
going from custom data structure to built-in data structure may improve memory usage, even if you stick with pickle
@Kevin and when I need to decode the data?
I already have a dictionary I can use instead
but the way I save the data is problematic
since huffman isn't necessarily aligned to 8 bits
I've just caught myself writing this line of code (if type(self.next_mode) == type(self)) to check if we've actually changed class. I know it's not particularly pythonic, pondering a better way to do it
@VigneshKalai you used to get Skype thinking that things like ISBNs were phone numbers, because they're very similar
@VigneshKalai you do get a rel="tel" (all of that may be wrong) indicator that a field is a telephone number, but that's obviously only if the person making the page added that
12:24
I'd probably arrange the file like: [encoding table][number of bits of encoded data][encoded data, with padding at the end if necessary]
@RobertGrant yes from your point we will get a lot of junk values
Is there a term referring to the grief one feels when he understand he might need to refactor a major part of his code and it's going to take a while when thought he was nearly done?
Off topic chat: any chess players know the solution to this puzzle?
*understands
I have a feeling it has something to do with castling or en passant or trifold repetition or the fifty move rule or some other goofy thing I never think about
@GLaDOS Man I've been there. Often on the night the thing needing refactoring is due.
12:28
this requires a word
@GLaDOS disillusioned?
no it has to contain the grief
maybe refucktor
@Kevin can't see it. BigCorp proxy blocks chess.
@Kevin Am I just being thick? Surely the white king just needs to move one square?
NOW I WANT TO SEE IT
waits for tantrum to work
12:31
@IntrepidBrit white king cannot move
@RobertGrant It worked, check slack :P
Ah yes I just saw :)
@GLaDOS Found wry (collinsdictionary.com/dictionary/english/wry) but not being a native english speaker I’m not sure of its usage.
The only move that doesn't mate is the rook
Ah, here was a solution on Hacker News
12:32
this has to be a new word
I'm going with weltschmerz for this one
(the word search, not the chess problem)
I have a theory
I haven't looked at the answer on hn
The answer has the "you'll know when you find it" quality that all good puzzles have
Wow, I can't even work it out from that link.
Okay, my theory (incorrect) was piece swap, so you take the bishop at A8 and make it a knight
Or a pawn or whatever
12:40
@GLaDOS You don't need to pickle the Python dict holding your tree, you just need to save enough data for the decoder to be able to reconstruct that tree. Also, there are various ways to reduce the space needed for the Huffman table.
OTOH, if you're using Huffman to compress anything larger than a few kB the table size is not worth worrying about too much. But if you do want to make it as small as possible, you should have a look at Canonical Huffman code
No, you must do game swap. Replace the board with Stratego, where check doesn't exist and the colors are red and blue. Tadaa! Now white can't checkmate.
I am getting an error stating kivy.utils is not a package when i try to import kivy.utils.escape_markup
@GLaDOS: If you don't want to use one of the techniques given on the canonical Huffman page, why not use this one from the main Huffman page:
"[...] simply prepend the Huffman tree, bit by bit, to the output stream. For example, assuming that the value of 0 represents a parent node and 1 a leaf node, whenever the latter is encountered the tree building routine simply reads the next 8 bits to determine the character value of that particular leaf. The process continues recursively until the last leaf node is reached"
That shouldn't be too hard to implement, since you (presumably) have functions that can manipulate lists of bytes bit by bit.
12:56
I wonder if there's ever a justifiable circumstance to have a statement of multiple assignment that works if evaluation is left-to-right, but would fail if evaluation was right-to-left. ex. a = a[0] = [1]
This just screams "refactor me"
Can you do
import kivy.utils
yes i can but when i run the script it states escape_markup is not defined
@Wann Is that the only function you want to use from kivy.utils?
yes
In that case you can do
from kivy.utils import escape_markup
#...
new_text = escape_markup(old_text)
Otherwise,
import kivy.utils
#...
new_text = kivy.utils.escape_markup(old_text)
The second way is longer, but it makes the code easier to read & maintain.
13:09
@PM2Ring That sounds much better actually. I just hoped I wouldn't need to reconstruct the tree because I am lazy
thant worked. thank you
*that
Laziness is a programming virtue according to Perl guru Larry Wall.
Indeed
Laziness, hubris and something
Yes but it has the "no true scotsman" problem when you really deconstruct the assertion.
"What if you're so lazy that you never do anything ever?" "That's not true laziness. That's sloth". Ok, got it. So good laziness is laziness, and bad laziness isn't laziness.
FWIW, if you keep your code as modular as possible then refactoring part of it isn't so bad. In a modular design, each part of the program hides its internal details from the other parts. So if you need to change the internal design of one part it doesn't affect the other parts.
13:14
Then you're at the level of tautology. "Doing something in moderation, that's good to do in moderation, is good to do"
@Kevin what if you're just making a fun rhetorical point? :)
morning everyone
Laziness is a sensitive issue for me. It's closed so many doors in my life that I'm coming to view it as a disability. </oversharing>
What Larry said:
"Laziness
The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don't have to answer so many questions about it. Hence, the first great virtue of a programmer."
Yeah but he meant that you're so lazy you'll spend weeks writing scripts to automate something simple
13:19
But it's more interesting to write the scripts than doing the mind-numbingly simple but repetitive task. :)
And you're the guy who is writing his own language and did some weird lambda stuff I still can't even work out with your code right in front of me, so I'm not sure I'd know you're lazy, even in the non-Larry sense
@PM2Ring That's not laziness as much as it is planning ahead
Thanks for the vote of confidence :-)
("But you haven't made any commits to KevinScript for seven months", says the small voice of doubt. Quiet, you. Just because I haven't typed anything out doesn't mean I'm not working on it.)
Hmm, I just gave an OP 1.5 answers to the two questions in his post. I expect I'm about to get a "but what about..." comment and no points. grumble, I'm already giving 150%...
@GLaDOS Sure. The whole "Laziness is the first great virtue of a programmer" thing is a humorous slogan containing a grain of truth.
if you take a lot of humorous slogans, take the grains of truth out of them all, grind them into a fine powder, add water and insert into an oven.
do you get a bread of truth?
13:31
Or a sludge of platitude
The truth hurts so it's better used as sandpaper than a comestible
Although I suppose it could function similarly to dwarf bread
Abraded by truth, Kevin returned to github...
what about pancakes of truth?
Yep, definitely not going to get any points for this...
cbg, sup
13:34
Kevin here are some pity points awarded to you, by me. Enjoy
(yes they are completely made up but it's the thought that counts)
I am consoled.
Can't reproduce and no feedback on original comment for two days stackoverflow.com/questions/32662393/…
$
I am console
13:50
I think I'm about to write some rather WTF code
This project has an "expression builder" that we use instead of writing raw SQL expressions. I need to find all rows whose short_code value is case-insensitive-equal to a given string. But the expression builder has no tolower component or anything similar.
@Kevin I see a problem with your answers to that Tkinter question: you don't call the .grid() method of direction_status_frame and you don't put the radio buttons into that frame. And that's why the frame border's not showing up.
So I'm considering just permuting through all possible capitalizations. Effectively if code == "ab" or code == "AB" or code == "Ab" or code == "aB"
luckily the short code has a max size of 2
@Kevin Oh no! Can you convert them to ASCII numeric code & back again? If so, tolower / toupper is a single bit toggle.
Alternatively I could use the "case insensitive like" expression, which does what I want but is slower than "equals"...
Efficient, readable: choose one
@PM2Ring That's true. The frame is useless since nothing ever gets put inside it.
So I parsed an xml tree using the elementtree library but I can't reference this tag directly:
<TimeCreated SystemTime="2015-09-18T20:53:11.557089200Z"/>
13:57
@Kevin Ah.
It keeps forcing the {parent tag}TimeCreated like that basically when I want to access just the tag. Any suggestions?
If OP is still trying to put the border on the frame and not the label, after I specifically told him not to, then that's really too bad
user4433485
Cbg!
Ayy
Hi, Katherina. Hi, corvid.
user4433485
14:01
I finally reached the 500 rep :p
Nevermind it's some xmlns thing.
@RobertGrant Weeks? I think you mean years. Terence Parr's motto is Why program by hand in five days what you can spend five years of your life automating?
Heh
I like that
@Katherina Well done! So now you can do some review queue work... if you want to. :)
user4433485
@PM2Ring Yeah I saw that, no idea what it is tho :p
14:10
You can read about it: stackoverflow.com/help/privileges/access-review-queues and you should have a little brown button with a number in it, up on the status bar to the left of your badges. That tells you how many posts are available for you to review.
user4433485
@PM2Ring Cool!
user4433485
does it make me a better person?:p
Does jinja2 have the equivalent of django's template tags, where you can stick a widget thing on the screen and it knows where to go and get its data?
I just don't fancy the idea of querying the same thing in every view and adding it to the template render data
@Katherina It could. :) You can pick up points for editing stuff, and collect a few badges. Feel free to skip stuff if you don't know what to do, or you're otherwise not interested in handling. I should warn you that there are occasional "audit" questions thrown in to the queues to make sure you're not mindlessly approving crap.
I like that audit question idea - was really impressed when it told me it was just a test :)
14:20
Unfortunately, the audit questions are selected automatically and occasionally they aren't appropriate. That is, it says you failed the audit even though you chose an appropriate action. But when that happens you complain on SO Meta & the mods will fix it.
user4433485
=D
E.g. I suppose I could make a custom filter, and query the data in there, but that seems massively not the point of filters
user4433485
nice system tho
Is there a rep leaderboards? Just saw someone with 411k rep O.o
user4433485
oO
DSM
DSM
From nowhere he appears, bearing cabbage!
14:46
Not as geeky as the Bruce Schneier Facts :)
The nuclear launch codes held by the President of the United States are secured by an unbreakable system: a plain brown envelope with a picture of Bruce Schneier on the flap.
I'm trying not to laugh out loud
Reposting for the weekday crowd:
(required prerequisite: The Expert )
@Kevin I just saw it in the transcript. This is excellent.
DSM
DSM
I have no idea what that was, but I liked it.
Experts can do absolutely anything, including entertaining people that haven't seen the prerequisite.
Watch the pre-requisite first. It's worth it.
14:49
Is that the thing about the perpendicular lines?
Bruce Schneier knows Alice and Bob's shared secret. I like this one
@Robert yeah
Aah nice
Apparently the answer to my question is context processors
I just got an upvote about context processors earlier today. It's a sign.
I don't know what the sign is for, there was no context.
@RobertGrant Yep, those are definitely more geeky.
@davidism laurel
Davidism storms into the arena
I actually have 6 more, but I'll let them stew for a while.
Let me guess: they're all Flask-related, aren't they? :)
How'd you know?!
15:01
As I may have mentioned before, I don't feel comfortable voting on questions that I don't understand, unless they're obviously bad. But what's obvious to you may not be obvious to those of us who don't know anything about Flask.
I voted on 1/6 of those. 16.6% ain't bad.
Yeah same. I go through them but can only vote on < 50%.
That's OK, though. The numbers will talk in the long run.
The third one possibly seems answerable, although might belong on a different site
"does web host XYZ have capability ABC?" is programming related... Sort of.
it's more a super user, I think
It sounds like they should ask GoDaddy. Or just suck it up and pay for a month of hosting to try it out.
15:05
Or just never ever use GoDaddy for anything because they're a terrible company.
DSM
DSM
I think I went for two of them.
That too.
I need to get you all proficient in Flask. For your own benefit, obviously not so you can judge these questions. :-)
I still want to read your Flask tutorial whenever you write it.
I agree the GoDaddy Q should be closed, but what's an appropriate closereason? It's not really a resource request. What do we usually use for questions that should be directed to some company's support desk? IIRC, Fizzy uses a custom close for LinkIn support questions...
I'm not a web dev, but I'm just curious. I've learned a little Django. How does flask differ? (I have no knowledge of flask at all)
@Programmer flask has less built in
And is more designed for small projects than Django is
This song sounds way better with a lead female vocalist
Django is very good at CRUD projects of any size
Although not of any complexity
Flask is more a framework to build your own Django. It's perfectly fine for large applications too.
Ahh, okay. Thanks :^)
15:10
Yeah, what I meant was the bare bones seem more focused on small projects; you can still make big stuff with it
DSM
DSM
@davidism: I've now written two flask apps and we have an RFP reply going out next week which would involve me writing a third, so your teaching has been useful at least for me. :-)
@DSM hopefully it doesn't involve too much counting :0
Nooo.
@DSM neat!
@corvid oh man you almost have 2k :)
@Programmer nobody is accepting my awesome javascript and meteor answers :|
15:14
All in due time, friend
DSM
DSM
@RobertGrant: I write code specifically so I don't have to be any good at arithmetic. :-)
Redditors: I have shared the sopython/lpthw link on reddit. it's meeting with a mixed reception. :) reddit.com/r/Python/comments/3lsqqv/…
DSM
DSM
I'm reluctant to click on any reddit link, but if you're saying there are lots of LPTHW fans on Reddit, would it be too condescending to say I'm not surprised?
By mixed I mean some like the list, some hate it.
are the haters authors and editors for LPTHW?
15:29
I want to add a comment about the reason we wrote this, but at the same time I don't want to get involved.
I was also going to write "we'd welcome more discussion in the room", but then I thought better of that too.
so... quick question... if you guys aren't fans of LPTHW (and the lack of Python 3 guidance does seem like a big issue), what would you recommend instead? Cuz I was just about to go start reading it :)
as someone who is not really a "beginner" nor a "non-programmer"
would any of the stuff in the pinned comment --> still be useful?
ooo. "dive" into Python. looks good.
Python As She Is Wrote, coming Christmas 2016 via Kevinson Publishers inc
15:31
Yes. I would recommend the official Python tutorial if you already have some programming experience.
@Kevin take my money!!
@AaronHall it's not that strongly felt I think, but I did reply to one of them
Honestly, I would have gotten us to clean up that page before submitting it. Right now it's just a dump of complaints with no organization or explanation.
That can't be right - the list was compiled by Stack Overflow!
...chat regulars.
I'm looking forward to being in the group that is the subject of the author's next rant.
DSM
DSM
Plus it doesn't really explain how we got into the whole LPTHW issue in the first place (namely, we've seen so many questions from its students).
15:45
@Kevin Sub line: “An in depth look at Python for experienced users of KevinScript”?
That's the audience I have in mind :-)
DSM
DSM
".. from the only an experienced user of KevinScript"
stike the “experienced” too :P
I'll get my 20,000 hours in at some point, I'm sure.
How many do you already have?
15:51
Probably around 5, if you only count actually writing .k files
DSM
DSM
You're still way up there percentile-wise.
Oh yeah I'm wrecking the curve for sure
"an user" sounds wrong but I'm pretty sure it's correct gramatically...is it just me?
Only if you pronounce it "ooser"
Oh it is 'a user'. Okay good to know
15:57
@Programmer no, the a/an difference depends on the initial sound, not the initial letter.
rhubarb
Yeah, that was one of those stupid elementary lessons where they never covered the edge cases @MikeEdenfield
DSM
DSM
Which is why we've had disagreements before on whether you say "an historical" or "a historical", because we disagree about whether you pronounce the h or not..
Rbrb also!
"an" goes before words that start with a vowel sound, and "user" starts with a "Y" sound even though it's spelled with a "U", and "Y" is a consonant in this case even though it's sometimes a vowel. Let's all bask in the perfect rationality of the English language.
15:58
@DSM OED seems to believe that issue is settled :)
OED doesn't control me! Descriptivism forever!
lunch :^)
16:18
I am trying to have the text grow with the size of the window which is inside a label in Kivy. But i also do not want the text grow outside the bounds of the box , say when the text is change to a longer phrase. I tried binding the texture_size to the label size then the text_size to the texture size but the text does not grow when i maximize the window
when i binded font_size to texture size the size of the text increase but beyond the label and when i maximized it did not grow any larger
I pronounce "historic" with a soft "h".
DSM
DSM
(For people interested in the H-or-no-H conversation, we last talked about that here, I think.)
DSM
DSM
Too slow! :-) (from here)
16:26
Nice.
DSM
DSM
I can never remember that one so I search for "multiplication" in the canon.
@DSM oh I wish I was involved in that! I read a couple of William Boyd books recently and he relentlessly uses an before Hs, infuriating!
Sometimes I doubt the wisdom of having a multiplication operator for lists.
@IanClark That must have been an hardship for you to read :-D
@Kevin *twitches*
:P
Don't have an heart attack
Ok I'm done.
16:36
I'd actually pronounce it as "art attack"
Hello, btw.
DSM
DSM
Cabbage for Fizzy.
(I just saw "an Hillary-friendly" used. Pretty sure I'd have used "a" there.)
Hello to the Canadian bureau of the Dark Council.
First thing that comes to mind when I hear "art attack":
These things just need a few menacing spikes to properly be Attack Art
DSM
DSM
If I saw that beast walking I'd think (1) that's awesome, and (2) I'm going to look at it from very far away.
16:42
I am reading a documentation, does this sound correct? different features groups
@thefourtheye Depends on the context I think.
The ES6 section describes the three different features groups and which ones are enabled by default in Node.js. - This is the actual sentence
I feel that it should be three different feature groups
Yeah that's probably better
Cool, thanks man :-)
@Kevin reminds me of Soda Constructor
DSM
DSM
16:45
It's not always wrong to have two plural words like that, though.
@davidism Me too :-) That was a fun toy.
@DSM But I hardly have seen anything like that in common text
It kinda gives redundant feel
no?
feature groups probably makes more sense given the context, but it could also be missing an apostrophe: three different feature's groups
I mentally categorize that kind of double plural as "not automatically wrong, but probably wrong unless you have a real good reason"
Well, I am proof reading the documentation. So, I can point this out I guess.
@JoeKington Doesn't it mean that each of the three different features have groups?
16:48
An example of a "real good reason" escapes me at the moment, but surely some exist
DSM
DSM
@thefourtheye: it's rare, but not impossible. Say you had two icons, each labelled "foxes". You could refer to the "fox icons" (meaning the icons which were related to a fox), but you could also say "the foxes icons", where it's implicitly "the 'Foxes' icons". Again, it's rare, but not unheard of. (There are better examples, this was just the first one that came to mind).
I mean, they are groups of features. So features groups could be right.
+1 Morgan.
@thefourtheye - It would, yeah. Not sure whether that makes any sense at all in context.
It's not automatically wrong.
16:50
"We are the group that meets to decide which features will be in the language. We are the features group. There are many features groups like us, but we are better than all of them"
Actually, the groups are listed like this. All ES6 features are split into three groups for shipping, staged and in progress features
Up next: how to pluralize "attorney general"
@thefourtheye Now that bothers me more. Without the oxford comma it just reads as two groups.
DSM
DSM
We'd probably say attorneys-general up here (governors-general, lieutenants-commander, etc.)
@MorganThrapp you mean comma after staged?
16:52
@thefourtheye Yeah.
@DSM, same, but it "sounds weird" to the average person. Good thing it almost never comes up.
Hmmm, I saw some discussion about this comma in English SE site I guess
DSM
DSM
Use of the Oxford comma is what separates us from the animals.
4
How should BDFL be pluralized? BDsFL?
+9000.
@Kevin don't be silly, Guido is a singleton.
16:53
@DSM Ah, this actually makes more sense. We should really call them like that only :-)
Huh. Do twitter images not onebox?
Reminds me of the comic that illustrates the difference between the sentences "At the party I met the hookers, JFK, and Stalin" and "At the party I met the hookers, JFK and Stalin"
@MorganThrapp Kevin's example makes it clear to me than the image ;-)
Also, "This book is dedicated to my parents, Ayn Rand and God".
16:57
haha I remember that one.
The only criticism is that it sounds pompous or something.
But it's a tradeoff I'm willing to make for clarity.
DSM
DSM
Even with the comma, that's an odd combination of dedicatees.

« first day (1801 days earlier)      last day (3372 days later) »