« first day (2153 days earlier)      last day (3020 days later) » 

17:00
But why pickle? It's HTML, it's already in a serialized-ish format.
user559633
@Slayther Post code
Wait, so I can just store text of parsed html and parse it again, it will be quick?
You've probably wasted more time trying to solve this than you're going to save by not parsing the HTML each time.
user559633
I'd pickle the lxml.html.fromstring and just keep using lxml and xpath, but I'm not very cool
17:01
"Something something premature optimization" ~ Donald Knuth.
@tristan I had fun dealing with a distributed redis set up. If you hit any blocks, let me know, I might have hit the same ones.
Idk, I don't want to parse it every time. It takes forever
Try writing your application rather than getting bogged down in minutiae before you even know where to focus.
user559633
2 mins ago, by tristan
@Slayther Post code
@Flobin perhaps ask on the site, I couldn't see anything.
17:03
If it takes forever, then something's wrong. Parsing HTML is not inconveniently slow, even without the LXML backend.
user559633
@idjaw Will do, I'd appreciate that. If it's not trivial, I'll pay you for your time
@AnttiHaapala what site do you mean?
user559633
the site
@tristan I just dump code here?
if it is a lot of code use pastebin
user559633
17:03
@Slayther pastebin or gist
I want to make a class to generalize string escaping and unescaping. But I'm having trouble with what to name the thing.
user559633
string_doorway
@Flobin not all pythonistas are in this chat...
@QuestionC are you sure you're not looking for MarkupSafe?
user559633
whatever wants good things in life died inside of me, so i'd just call it string_escape_or_unescape()
@AnttiHaapala er... you mean make a stack overflow post?
it isn't 0.2 seconds obvious to me (but I am not a django user)
17:05
@Slayther Do you need to save everything in that HTML? If not, it'd be better to just save the stuff you need. Or at least transform the data into something flat(ter) that won't blow your recursion limit out of the water.
it is the second assert that fails, so the correct error message was given for the first field, so idk.
@PM2Ring Well, not everything, but I can't really know what I will need
@Slayther Fair enough.
@Slayther then the solution is simple:
@davidism HTML is just one of the things I'm doing is the problem. I also do JSON string escaping and now have to escape URIs into filenames.

Also... it's C#, I just like the crowd here honestly.
17:06
store a) what you think you need, and b) the html source.
@AnttiHaapala Oh, neat idea
Thanks
user559633
I assume that you can go back and edit it later if you need to do more.
user559633
One mistake that I, myself, am guilty of doing is pretending my code is being sent off into orbit, where I can't just simply modify it later to handle use cases I didn't immediately think about.
@tristan Why am I always in that state?
@Slayther or... you can save the soup turned back into html, so it might be easier to parse
17:09
@AnttiHaapala Oh, so just soup.text or?
user559633
@Slayther Not sure. I think it takes mindful practice and/or not enough time not to generalize functions to not over-generalize your code.
so that beautifulsoup might decode &foo; and &bar; and save
@Slayther no, html
Ahh, the raw thing?
Wait, there is soup.html?
user559633
input_http.www.whatever.org.txt
str(soup)
17:10
Oh, ok
>>> x = bs4.BeautifulSoup('<html>&auml;</html>')
>>> str(x)
'<html><body><p>ä</p></body></html>'
see^
Noice
the &auml; was decoded so it will be slightly faster to parse again.
Ok, thanks. A lot of things in my mind right now so I better get working
usually the parsers use regular expressions to scan for stuff that isn't &, say...
17:12
They use regex? e.e
@tristan I used to be obsessed with handling all the cases. But once I realized what my goal is, and I took a test-driven approach, I always made sure that whatever the code was being used for at that given time was tested. Once a new feature would come up, I would refactor accordingly. I kept finding myself just constantly refactoring before throwing <version 1> out to the world.
When I would use regex to parse html, I would get slapped by a huge hand from the sky.
... n​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
user559633
@idjaw My problem is that I'm like a corn farmer that knows he'll need to plant soy in 3 years, so I try to do favors for myself in the future by leaving around little hooks and markers for the future.
user559633
Then the future comes, things have changed, and those markers are no longer useful. The problem is, that sometimes that little bit of foresight saves gobs of work.
17:14
@AnttiHaapala Spot on. Exactly what I was thinking. c:
@tristan yeah. We can never win them all, but when we do it really helps and makes us thank past us. Which is always a good feeling.
ͣᷠͭͭͥͬͦͨᷜᷤ
user559633
A series of boxes to you as well, good sir
lol, windows
Ok, I can't start up my brain again. Seems the Python deterpreter is dead
user559633
17:25
I've made Python throw a lot of errors, but I've never had it launch a deterpreter.
Python can't deterpret Python, for sure
I had the dederplicator pop up once when I made the same dumb mistake twice.
@davidism Now you're just talking nonsense. :p
user559633
@davidism If you make a generator error three times while staring into a mirror, Guido will appear behind you and write that block of code for you.
12
story idea, candyman revival, but with Guido
user559633
17:29
Nonsense, in my room/6? Artichoke, my good cabbage!
had to look that up
oh wait..yes... laurels

Sorry to butt in

Dec 18 '14 at 16:35, 20 minutes total – 20 messages, 4 users, 0 stars

Bookmarked Dec 18 '14 at 19:56 by davidism

user559633
This is the part of the day that I realize I'm about to hit my high water mark for amusing content.
well, looks like they put the Nintendo in the Apple
And they're currently demoing Pokemon Go on the apple watch
17:33
Well, now we know why they haven't bothered to fix anything.
"Pokemon Go: Now broken on even more platforms!"
user559633
Apple or Nintendo?
^^ I see what you did there
user559633
I'm looking forward to a new Macbook Pro 15".
I'm looking forward to flying cars.
17:35
I really hope the pro line does not have that rumoured touch F keys
cabbage
did I miss the madness?
Pokemon Go is made by Niantic, not Nintendo
nah it's still going on @AndrasDeak
http://www.engadget.com/2016/09/07/iphone-7-liveblog/#!post=88975
thank goodness:P
yeah... they did that other geothingy game
user559633
17:35
@MorganThrapp I'm not. Why would I want a confused baby boomer or texting kid to be able to crash into the 2nd floor of my house?
iPhone++, my my
@JonClements Ingress
that's the one - thanks - I had a beta to that from a mate in Oz...
(I think)
Ingressmon
tried it for a few minutes and thought f* this
user559633
17:37
Congressman is literally the worst pokéman
user559633
I am a twit and this is my twitter.
@JonClements it sounds like a crazy waste of time that almost sticks you to the computer like a junkie. But we have Stack Overflow for that.
"Literally the Worst" is literally the worst Pokémon.
s/computer/mobile/ of course
@KevinMGranger It must be time for me to sleep: I initially read that as "demooing".
user559633
17:39
/me speaks into recorder "show idea #23 'literally brilliant' -- a british show that sarcastically teaches people the meaning of the words 'literally' and 'ironic'"
@PM2Ring big bugs in software are called COWs, standing for Computationally Overtly Wrong
user559633
@PM2Ring As in "Apple is demooing its cash cow, the iPhone N?"
have you heard???? pokemon go on apple watch!!!
Something like that...
user559633
17:41
Apple marketing notices a bucket has a hole in it. They offer different color choices for the hole and drill another one in it.
1000 nits...I'm surprised Apple didn't come up with a marketing name for that.
@tristan consumers buy it - why change a marketing strategy what "works"?
@tristan They close up the first one though, so that you have to use their proprietary hole.
so who's going to buy the new iphone ? :D
not me
17:42
"take my money"
Headphone jack? Where we're going, we don't need no stinking headphone jack.
i heard the 8 will actually be better
user559633
Just checked. lol @ doubling down on the iWatch
I just bought the 6P, so nope.
I heard the 9 will be even better than the 8
17:43
but i heard the 10 really drops the ball
Better than c*ap is..?
iphoneX
That's why the pull a PHP / Microsoft and only release the 11
user559633
17:44
Scandalous
user559633
Actual lol. "subtext: have fun with your wife" where Jackie is on the side
Am I missing something? Why is this getting upvoted? stackoverflow.com/q/39376164/400617
anyone shorting apple?:d
There will be less shorting apples because the new hardware is waterproof
user559633
@AnttiHaapala I imagine they'll do okay until the initial set of suckers stop buying the new crap. seems a bad idea to short apple.
DSM
DSM
17:45
I'm just glad someone mentioned casefold.
Why are all Apple fans suckers?
@KevinMGranger Apparently my phone is waterproof - I had a watch is was apparently water proof to 20m
"Much like our stock, our watch is underwater".
@KevinMGranger suckers for the best product ever you mean!
user559633
Their stock will be fine for a bit, but I think they're out of ideas.
17:47
@tristan Next up: Apple Ring!
I don't think they've ever had their own ideas, so it's more like everyone else is out of ideas
user559633
"No one wears a watch because phones and computers everywhere? Release a computer watch and make the computers function more like restricted phones"
DSM
DSM
People who are willing to pay more for Apple stuff subsidize certain kinds of development for the rest of us, so I can't complain too much. I'm not sure that money couldn't be spent better elsewhere, but it's not my money, so have fun!
user559633
That strategy can only pull for so long.
now... if I'm in a position that I'm fully clothed and testing out the feasibility of the endurance of any products I own for being 20m underwater - I'm sorry to say - I'm probably on a position where I couldn't care less about 'em
user559633
17:48
Macbook Air and Macbook Pro are the best build quality/spec/OS for the money.
@tristan as long as you install gentoo on it
user559633
@khajvah lol sorry, I have things to do beyond fussing with things that aren't working in my base software
I think they've spent more time this keynote talking about their partners than they have their own stuff.
what is a better metric of connectivity? mbps or packets/sec
>>> 'TIẾNG VIỆT'.casefold()
'tiếng việt'
nice
user559633
17:49
"Williams is heavily promoting the Apple Watch Series 2 towards swimmers." that's pretty niche
@tristan did they remove function keys already?
@AnttiHaapala What sorcery is this
its method keys now
user559633
@khajvah Not sure, but yeah, that or Mac OS further feeling like iOS would be what makes me do the switch over to a Linux
"omfg - I'm drowning - never mind guys, my phone still works - I'll send a text for help..."
17:50
I have never owned an apple product
and only touched a macbook a few times
@khajvah I have to admit I've been sorely tempted by a really nice laptop
user559633
@khajvah The hardware is legitimately high quality and OS X is like a Linux that you don't need to maintain.
If there comes a time where OSX features start cutting in to my dev capabilities on OSX, I'll switch. But for now, I don't see that happening any time soon, and currently I can't of think of anything (except for the couple of tools that don't work on OSX) that really say "OMFG OSX IS T3H SUX".
@tristan the quality part has some debates. Like the glued display on macbook pro
almost but not quite:
>>> unicodedata.normalize('NFKC', 'TIẾNG VIỆT').casefold() == unicodedata.normalize('NFKD', 'TIẾNG VIỆT').casefold()
False
17:51
@JonClements yea me too. Macbook pro is certainly sexy
user559633
@khajvah Never had an issue and I've been buying them for over a decade.
Wait, why am I still here
user559633
Unless you legitimately think you're going to user service your year-2016 laptop
@khajvah what laptop would you choose that gives you the right performance, build quality and longevity?
@idjaw Laptop? a chromebook
17:52
jesus...
ok
I don't need much from a laptop really
just do it sundays..
it's a facebook machine for me
Right now I use 5 year old laptop which was underpowered even when I bought it
so why the hate for the apple laptop?
@idjaw is there hate?
17:56
I don't hate apples, but I don't think they make sense to buy if you're cheap.
for what you get they're pricey...
user559633
@JonClements Spec out a similar Dell in weight/dimensions/performance.
@idjaw I didn't. I actually would love to have a macbook pro
@khajvah You're the Chromebook target market.
comparably, I think the XPS comes close
and price-wise it's right there
so really they are all in the same ball park
17:56
and apart from the "supposed user experience" - I haven't seen an equiv. I couldn't spec up for less
user559633
last I checked, the XPS was slightly junkier on the outside, and a hundred bucks more
not sure if I would keep the Mac os though
do they run linux though? the XPS
yes
user559633
Sure, you can put a Linux on XPS. Or a Macbook
17:57
you can even buy it with ubuntu installed
this lenovo thinkpad is ok otherwise but I'd need a cast iron keyboard... which this doesn't have.
neat
user559633
I tried with my last (development) build to find something better than the macbook air in the price range and couldn't.
oh my WHAT HAPPENED TO THE PUPPY?
@QuestionC yeah
they look good
17:58
@AndrasDeak what puppy?
what happened to ninja pup
@AnttiHaapala and brick housing? :P
you can't keep doing to this us pup :P
sheds a tear for puppy never to have existed
17:58
@tristan the only thing that'd make me want a mac is the screen
@Flobin yeah
user559633
@JonClements The exterior is nice and the keyboard/trackpad is also very high quality.
@JonClements and magnetic power connector \o/
I should actually buy a chromebook

« first day (2153 days earlier)      last day (3020 days later) »