« first day (2824 days earlier)      last day (2117 days later) » 

4:27 AM
The memory allocation is done on an exponential basis, I think (it should be, anyway). So it's still somewhat of a win, because the bigger the list grows, the less frequent the memory allocation.
 
 
1 hour later…
5:51 AM
Hi, I need to create reports and graphs using python from Excel worksheets. Can anyone suggest the best way to do this? I am a newbie to Python. I only know Excel VBA
 
6:12 AM
why do you need to use python for this task?
 
6:42 AM
HI, i have installed Kivy but it shows me this error can you please help me in solving it. Error: ImportError: /usr/lib/python3/dist-packages/kivy/event.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf
 
@Code-Apprentice the reports of excel are pivot tables and all I need to create a balance sheet
For accounting
It's a bit messy to look at using excel worksheets I was hoping to get better graphs and reporting using python
I need a wider range of graphs that look nice rather than just limit myself to bar charts, line charts and pie charts in excel and I want to automate it
 
7:03 AM
cbg
 
7:34 AM
cbg
anyone here going to pycon germany this year?
 
@Arne nope. will be going to pycon france in october
 
@MarcSantos If you are already good at analyzing/visualizing data with python (using, say, matplotlib), then you can work with excel sheets as well, treating it as just another data source. But as far as I know there is no dedicated lib only for excel.
 
7:52 AM
With their new edit changing bits of the file I have little hope left for stackoverflow.com/posts/51259802/revisions
 
@AndyK Ah, too bad. I thought there should only ever be a single way to do things :p
@AndrasDeak old: 7Q#=", new: 7Q#=" 🤔
 
@Arne ah germany vs france, the old stuff lol
 
and your vote was cast, I see
I guess it is a lot easier to reach from the UK
 
8:52 AM
shadyurl.com <- for when short URLs look too secure
 
9:08 AM
cbg
How to get a chance to join the PyCon?
 
register and pay up?
 
wow , how much should it cost?
 
I imagine that's very hard to google
 
Cost will be $150 per tutorial
: )
 
9:33 AM
Anyone know why I keep getting this error over and over again? ibb.co/cFuaE8 I accidentally pressed cancel and my long installation broke down. So much for good software design
I was installing PyQT
The button was defaulted at cancel than retry so while I was typing stuff it hit cancel when I hit the spacebar :/
 
The package seems no complete ,which you download .
 
Did you google the error?
 
I did some people say it's bad mirrors
But most of them were several years ago
 
And did you try looking for another mirror?
 
I'm restarting the download if it fails again perhaps :P
First time i've seen a download fail this bad though
 
9:40 AM
OK
 
Ironic really
Even torrents can do better lol
 
How is it ironic?
 
They offer a platform for good design
But many things could go wrong with how it was made
 
I find it more ironic that you encountered a problem, searched for it, found a single possible solution, then dismissed it on philosophical grounds, talking about irony
 
Well just a rant they could've at least defaulted the button to land at "Retry"
Than cancel
So when i'm typing code I don't close it when it errors like that
There is no resuming also
So it starts from 0
 
9:43 AM
I'm pretty sure UX 101 is "make the defensive choice the default"
and the defensive choice is "cancel"
 
Well they said in the error that: "This is a temporary error. Please retry"
And they defaulted at cancel
 
okay
 
 
1 hour later…
10:50 AM
cbg
 
off work ...
 
cbg
why import numpy as np? Why is this a trend?
 
saves typing 3 letters for when you need to access it a lot?
Same reason sometimes import itertools as it or from decimal import Decimal as D are used...
 
huh... I mucked that one up first go :)
 
11:05 AM
"no mcve" is fine too. You can hardly call that "minimal"
 
11:28 AM
@JonClements import matplotlib.pyplot as plt; import pandas as pd; import seaborn as sns ... there are a lot of these standard abbreviations. It's on every project out there. It's rare to find anyone not using shorthands.
 
Indeed... the reason remains the same :)
 
11:44 AM
@MisterGeeky your point being?
namespaces are one honking great idea, but that doesn't mean we should grind our fingers to dust typing
 
One thing you don't see enough is import tkinter as tk because people tend to do from tkinter import * instead
 
DSM
12:15 PM
import salad as s; s.cabbage()
 
you mean that salad doesn't have a cbg alias in it? That's unthinkable! :0
 
DSM
Abbreviations were successfully voted down at the review stage. ;-)
 
>>> "hello".encode("salad")
b'cbg'
 
@Aran-Fey, not sure I completely agree with that closure of Tkinter button click. The question is kind of a 50/50 mix of "how do callbacks work?" and "now that my callback is more or less working, how do I prevent it from freezing the user interface if it runs for a long time?"
The latter of which isn't really covered in the dupe target
Ah, whatever, I'll just leave a link to a question with the same problem
 
12:32 PM
Whoah, git is amazing. I'm migrating my version_with_feature_finalnow VCS to git, and I expected a lot of work from merging two of these directories with a year's development difference. Turns out I had only two merge conflicts, one of which is the changelog.
 
Now the Q has two dupe targets, and harmony has been restored to the universe
 
Patience :-)
 
yes kevin
 
12:39 PM
# naive inplace approach...
for idx, reverse in enumerate((False, True True)):
    l.sort(key=itemgetter(idx), reverse=reverse)
shrugs
def whatever(iterable, reverse):
    fst, *rest = reverse
    s = sorted(iterable, key=itemgetter(0), reverse=fst)
    for idx, rev in enumerate(rest, 1):
        s.sort(key=itemgetter(idx), reverse=rev)
    return s
Might be slightly better - and for bonus points - you might even want to group consecutive runs of ascending/descending and reduce the number of sort calls...
 
This problem would be much easier if all builtin types supported unary negative
 
@JonClements can you write the answer there? I was thinking about this problem 2 hours yesterday :D
 
Err... well, I just typed that off the top of my head... haven't even run or tested it
 
Taking that "group consecutive runs" idea and running with it, brb
 
12:56 PM
Go Kevin... Go Kevin... Go! :)
 
@Kevin seems that one works :)
I give chance to others and if nobody else dares then accept it
 
@JonClements I think you need to iterate over the enumeration backwards to get the desired output. Something like for idx, reverse in reversed(list(enumerate((False, True, True)))):
 
But I need to study your solution :P
 
Umm.. why the recursion though?
 
@AndrejKesely it's not exactly "daring"
 
12:59 PM
@AndrasDeak for me yes
 
@Kevin but yeah... last ordering should be first sorted :)
 
Recursion seemed like the most straightforward way to do it, since groupby separates the sequence into an arbitrary number of buckets which each need to be sorted
Compared to a nonrecursive approach that depends on the stability of the sort algorithm to ensure that the ordering of earlier calls is preserved, my approach uses more sort calls. But each of my sorts other than the first are on increasingly smaller subsets of the original list, so I think it evens out
 
err... why would sorting make subsets smaller?
 
isn't timsort famously stable?
 
For example, with the input given on the problem, the first sort operates on a 4 element list. Then the two sorts of depth 2 sort on lists of size 3 and 1 respectively. Then the three sorts of depth 3 sort on lists of sizes 1, 2, 1
 
1:09 PM
from itertools import groupby
ordering = (True, False, False, False, True)
for k, g in groupby(enumerate(ordering), itemgetter(1)):
    (start, rev), (end, _) = itemgetter(0, -1)(list(g))
    print(*range(start, end+1))
    # ^^^ would be `.sort(key=itemgetter(*range(start, end+ 1)), reverse=rev)

# 0
# 1 2 3
# 4
@Kevin I was thinking along those lines of consecutive values...
 
Ah, grouping by ordering values, rather than on elements of the list. Gotcha.
 
yeah... just you reduce the number of inplace .sorts happening
(at least - I think that might work... I'm half way through eating lunch and doing other bits... so who knows... could be just barking up the wrong tree)
 
morning cabbage fun
 
aye aye cap'n - how you doing?
 
cbg
 
1:19 PM
I have an idea for an alternative approach that takes advantage of the fact that lists already compare lexicographically to each other. Just have to hack the values so that inequalities return the opposite result.
 
I'm doing great. Writing the pythons, listening to music, dealing with allergies.
how about you?
Also, the BDFL tweeted out the draft for this PEP and it looks pretty cool: python.org/dev/peps/pep-0572
Definitely pretties up your code for those cases. I like.
 
:|
> Hopefully the final draft will be posted well before the end of July 2018.
oh joy
 
@Kevin I was toying with the idea of a wrapper class object: eg something you do like s = Sorter(True, False, False, False, True, True, False), then use that as a key object - and have it's __call__ method do stuff
 
I added my approach into my answer. Not sure if @total_ordering is strictly necessary there, but it's fun to use
What's the minimal set of comparison operators that you need to implement if you want sortability? Just eq and lt?
 
yeah
 
1:24 PM
Yeah, not strictly necessary then
 
@AndrasDeak that tweet seems vague and passive and it annoyed me. Do you know the history behind that and what exactly is this elusive thing that is keeping it from going in to the final draft state?
 
Wait, were your messages not sarcastic or are you just into it [the sarcasm] really seriously?
 
\o cbg
 
@Kevin I like your class approach :)
 
@AndrasDeak I figured it out.
 
1:30 PM
glad to hear that
 
@AndrasDeak The actual PEP I find interesting
 
SQLAlchemy returns data in the right order.
 
Unless there is history behind this where this PEP is disliked in general?
I'm confused haha
 
results = engine.execute(base_sql)
print([row for row in results])
 
@idjaw yes, it's come up here these past months, and some of us think it's garbage
 
1:31 PM
@idjaw it. is. not. cool!
 
Arne is the only regular so far (as far as I know) who looks forward to it
 
This prints in the right order. BUT when I do

print([dict(row) for row in results])
 
Jul 3 at 14:18, by vaultah
total = 0
partial_sums = [total := total + v for v in values]
print("Total:", total)
 
I am not opposed to sth like this in general, but
 
Jul 3 at 14:18, by vaultah
Example from the PEP
 
1:32 PM
The conversion to dict comes out in the wrong order. So how can I convert a mysqlalchemy row to a dict while maintaining order
 
@Johnston I don't know SQLalchemy. What exactly is a row?
 
@idjaw ^that's my feeling about how they solved the "quick toddler" problem
 
@Johnston Not sure I completely understand the problem, but try OrderedDict
 
@Johnston a) use sqlalchemy, b) sqlalchemy does AbstractKeyedTuple
problem solved
 
1:33 PM
@Kevin there's history; Johnston uses 3.6 or 3.7 (hopefully) but they seem to see mixing of key order
but last time we did this they ended up realizing that they were using the wrong python version; this is the follow-up
 
@AnttiHaapala it's when I convert to JSON the order dissapears because I converted to dict
 
I was just about to say, it would be quite curious if this happened on a state of the art version
 
wow...I've been for so long, I did not catch the hate train
 
@Johnston why'd you care about the order in json
 
@idjaw yes.
 
1:34 PM
@AnttiHaapala When I run sql like
 
JSON dicts are unordered by definition, so there's really no helping it there
 
Does someone have a quick link so I can read some background here?
 
@Johnston nothing would keep the order anyway
 
I just learned about it last night
 
1:35 PM
> An object is an unordered set of name/value pairs.
 
SELECT
bookings.isdeleted,
bookings.TYPE,
bookings.stagename
FROM sfdc.opportunity AS bookings

GROUP BY 1, 2, 3

LIMIT 3;
 
initial inspection sparked an interest. Would love to read the counter to know why it is a McYuck
 
Then an order by will need to do something like order by 6
 
@idjaw the scoping is again sth really different, and it's got lots of weird edge cases etc...
 
So 6 has to be the 6th column I listed. If the columns come back in a different order than I sql'd them. Then order by won't work
 
1:36 PM
what is "sth"?
 
so now we have an assignment that can leak out of list comps, even though list comps are fscking separate functions.
@idjaw something
 
oh
thanks. I never knew that abbreviation
 
... So we're trying to run a sql statement on an object parsed out of a json file? I didn't know that was even possible.
 
Antti uses it all the time :D
 
[need for MCVE intensifies]
 
1:38 PM
Also @idjaw people will start using it all the time, a'la "smart tricks" in C. Unreadable code ensues.
Jul 3 at 21:57, by Andras Deak
once it's on the devs to not use a feature to write unreadable code there's a problem
 
@AndrasDeak Yeah. The same could be said when list comprehensions were introduced. 50 line comprehensions with lambdas
mmmmm
People who aren't responsible are not going to be responsible with any kind of code that requires responsibility
damn...responsible
 
that last link was when we discussed with Arne
 
oh cool. Checking. thanks.
 
Hi everyone
 
@Kevin yeah... can't think of anything more elegant than the Negate wrapper you've done
 
1:39 PM
@Kevin I am generating SQL based on user input from a GUI.
 
There anyone here that have good skill with pandas (DataFrames...)
 
I'm sure there are
 
wow
the history runs deep.
also
tmp + 'bar' if (tmp := foo()) == 'foo' else tmp
that...is unreadable
 
I agree
 
1:41 PM
I would argue that if arguing for that PEP, one should make a better readable example. 😛
 
all that work to avoid a temporary name, at the cost of sooo much unreadable code
 
OK. So, I'm glad I brought this up here.
I really read this on the surface and it seemed like an interesting idea based on something like this in the PEP
 
also the example I linked that vaultah found in the PEP, among the actual examples: listcomp with side-effect that leaks its variable
 
match1 = pattern1.match(data)
if match1:
    return match1.group(1)
 
6 mins ago, by Antti Haapala
so now we have an assignment that can leak out of list comps, even though list comps are fscking separate functions.
 
1:43 PM
So, helping an example like that, seemed "interesting" to me. But...I clearly need to really slow down at the new shiny and look under the hood
 
@AnttiHaapala I know but he wasn't shocked enough
 
@AndrasDeak That only happens in 2.x though?
 
the fact that the example in the PEP is so bad makes it much worse
@JonClements haha, no
 
@idjaw note that listcomps are now separate code objects with call frames
 
1:44 PM
so it is essentially a functoin call so these now do some non-local closure magic yuck :F
 
@AndrasDeak err yes... they leaked in 2.x... no longer in 3
 
they did, now they don't, and soon they will again if you use an asspression
 
presumably then they will likewise leak in generator expressions
 
ahhh okies
 
@AnttiHaapala it would be so much fun if they only leaked in the one but not the other <3
see @idjaw? This is what you missed
 
1:46 PM
but then they said that it is going to leak only to the parent scope and must not be assigned there...
so I wonder what will happen with
 
Serves me right for going MIA
 
yes, you should be ashamed
 
It's a good thing I don't have any voting power
imagine that 😛
So this is how politics works.
 
[total := total + v for v in [total := total + v for v in values]]
 
that's terribad
I actually don't know what the yam is going on there
 
1:47 PM
I don't think anybody does
hopefully an exception
 
haha
 
it may just be as fun as yield in a genexp
 
Thank you in advance for our help, so In a dataframe, I looking for a smart way to group identical data from a column of a dataframe. For the moment I iterating twice in the dataframe (iterrows method) and I iterating in a list of column label, to select the cells and compare them if they are identical, I'm sure they are beter way, i dont want to post a SO question, and maybe marked as a duplicate, but I dont found my answer
 
I want to be able to call match in a conditional, and then examine its contents later. But I also want to not have to read other people's code that uses assignment expressions in literally any other context. How can I have my cake and eat it too?
Python devs, please implement re.get_most_recent_match_result()
 
@AndrasDeak probably a syntax error, except if there is a nested function that has ...
 
1:48 PM
@Kevin Thanks that worked
The ordereddict
 
welp, rhubarb for a while
@Johnston check your python version again
 
@Andras rbrb
 
@YoanBouzin your question isn't very clear.
 
Curious that OrderedDict did anything, but I'm content to let sleeping dogs lie
Meanwhile, Andras pokes that dog with a stick
 
wow
with so many negative votes in that mail thread, I'm surprised Tim Peters voted up. That's the real plot twist.
 
1:49 PM
plot twist: it's pypy 3.6
@idjaw I suspect that's the reason they felt the need to add Tim's endorsement-like something as an appendix
 
If the implementation is hard to explain, it's a bad idea.
 
"look here, even Tim likes it"
 
Special cases aren't special enough to break the rules.
Although practicality beats purity.
so the question is ... is the practicality enough here.
 
@Kevin @AndrasDeak So I am confused now. Because apparently I can't set python version right. pyenv local says 3.7.0 but python --version says 3.5.5
 
PATH issues?
 
1:51 PM
When I do flask run how can I know which version it's running?
 
python3.7 -m flask instead of flask # or whatever executable name
 
Try which python and which pyenv
 
then you can use your python
 
why do we need a syntax change for just ^re.get_most_recent_match_result()
 
TIL - Read. Stop. Think. Ask self if this is really good.
 
1:52 PM
@Ffisegydd thanks for the answer, I will clarify it by an example
 
@YoanBouzin Ideally, if you specify your requirements clearly enough, then either your SO question won't get closed, or the question it gets marked as a duplicate of will contain all the information you need to solve your problem.
In which case it's not a bad thing that your question got closed, because you got your answer regardless
 
@idjaw as I see it it's good as long as reasonable people use it responsibly, which means it's bad
 
@Kevin thaks Kevin for your answer , yes I'm afraid because I have strong difficulty to explain me simply and clear, I'm also french it's hard to me ^^
 
I wonder if there are interesting edge cases that will be found that ultimately break the crap out of this
 
Writing good requirements might just be the hardest problem in programming, even if you're not french
 
1:54 PM
aka py27 leaking the iterator in a loop
I can't remember. Was that a necessary evil by design?
or something that was caught and just left alone
 
why are all the offensive flags from the js room?
 
They are a wild and free people.
 
the js room has never not been without a constant stream of flags
 
And apparently easily offended. Weird mix.
 
don't know, I don't visit the js room.
 
1:59 PM
I'm off sick and watching some people play Doki Doki Literature Club on Twitch. It's seriously messed up. Initially it looks like an anime dating sim game, but it's actually a psychological horror. Definitely the best thing to watch while ill and sleep deprived.
 
@AndrasDeak updated version :D I felt more creative freedom in that one
 
@Ffisegydd sfw?
 
Depends on your work.
(Yes)
 
But you might get odd looks
 
2:01 PM
@piRSquared that means it's the afternoon somewhere
hope you get bettter, Fizzy
 
I've been avoiding watching DDLC playthroughs in the faint hope of eventually getting around to playing it, but I've seen enough fanart and "subtle" hints about the twist that I feel like I have a fairly good idea what happens
 
OK...so
 
after the answer, I clarify my question , so , given a dataframe with string:

items1 items2 item3
0 A C C
1 A C C
2 C B B
3 C B C
4 B C C

How I can group by value the index like for the column item1 :
{'A':[0,1] , 'B':[4], 'C' : [2,3] }

Maybe with counter from collection ? the to_dict method ? maybe...
 
can someone explain voting to me?
A large number of people voted against 572
 
I was looking at the open pandas issues to take on while off, but couldn't find any ones I wanted to pick up
 
2:02 PM
but it's approved?
 
@idjaw informal poll?
 
damn
so....the responsible dev needs to be aware of these things in code review
 
Also D is for Dictator
 
shoudl be interesting when this comes up here
:)
 
df.reset_index('val').groupby('items1').val.aggregate(list) maybe
(Untested)
 
2:05 PM
cbg
 
Or maybe df.groupby('items1').apply(lambda L: list(L.index)).to_dict()
 
@Ffisegydd your answer give the error :
Traceback (most recent call last):
[...]
KeyError: 'Level val must be same as name (None)'

@Jon get the right answer :)

>>> test.groupby('items1').apply(lambda L: list(L.index)).to_dict()
{'A': [0, 1], 'C': [2, 3], 'B': [4]}
Thanks for all ! I go back to work !
 
Not saying it's the best way of doing it... but glad it works... so what do I win? I hope it's a speedboat... always wanted one of those and Bullseye isn't on anymore :(
 
Yeah don't need a name, I could have sworn reset_index allowed you to pick a name though
 
18446744073709551616 quatloos have been credited to your account
 
2:10 PM
I dont know why , always when lambda function are used, they are not very "preferred"
 
functional-style programming is more fun if you make yourself avoid anonymous functions
 
In [20]: df.reset_index().groupby('items1').index.agg(list).to_dict()
Out[20]: {'A': [0, 1], 'B': [4], 'C': [2, 3]}
Blergh that's ugly. I don't like that reset_index doesn't allow a name
 
but you dont use lambda so is good also
 
There's nothing wrong with lambdas
 
@YoanBouzin lambda is not preferred in pandas because it's not a vectorized approach
 
2:12 PM
how would u want to use it? pandas.Series.reset_index does have name
 
fun != best possible design
 
Only thing I don't like about lambda is that it is six characters and makes my one-liners longer than they need to be.
 
@roganjos thanks for the info ;)
 
@piRSquared when doing pandas.DataFrame.reset_index(...) the index is set to the name index which is quite a poor name (can't access it via attribute as you get the Index instead). I'd like to be able to say pandas.DataFrame.reset_index(output_name="some_more_descriptive_name")
The alternative is df.reset_index().rename({'index': 'some_more_descriptive_name'})
 
df.rename_axis('some_name').reset_index()
 
2:14 PM
Yeah that's shorter, it's still not as nice as passing a name out to reset_index. Especially if Series has the same option as you say (I knew I'd seen it somewhere)
 
I agree
You going to create an issue and solve it yourself? (-:
 
If I add a more complex comparison like :
we do to make the same with the two other column item2 and items3
like the two first row we can see that are identical
items1 items2 item3
0 A C C
1 A C C
but also
 
DSM
Sorry, I'm late to the game, but why not just df.groupby("items1").groups? Are we really that wedded to a list instead of an index?
 
Your pandas-fu is better than ours
 
DSM
Even if I did want lists I think I'd just dictcomp the result of that. At least that's basically self-documenting.
 
2:20 PM
I wouldn't call it self-documenting. I knew groups existed, I didn't know it'd return the indices and wouldn't immediately think it'd return the indices.
Whilst Jon's really is self documenting
 
DSM
Ah, I meant that {k: v.tolist() for k, v in something_or_other} was self-documenting. I agree that there's no real way to guess that groups is the groupby-value-to-corresponding-indices map.
 
euh no, so ok, forget my last answer ;) its ok
 
I'm glad I don't participate in numpy conversations, since that means it's impossible for me to get owned when I post a 300 character solution and someone comes in and says "why not just do df.reticulate_splines()?"
I can tell that if I got into np I would construct some real FrankenSolutions
 
My pandas-fu isn't as strong as it once was, but it's still enough to wind up colleagues with "Why not just use this handy dandy function?"
 
ok, scrolling up to see what's going on.
 
DSM
2:23 PM
I got to replace an entire crazy function some of our numbers guys wrote with get_dummies.
 
@Ffisegydd is that when they've written a 20 line custom function, using .apply, and you turn around and go.... why don't you just use: pd.somefunction(df, value=1) kind of thing? :p
 
Does numpy just push releases every fifteen minutes with new methods that contort data in implausible ways? That's the vibe I get
 
@DSM thanks for our answer, df.groupby("items1").groups, yes in fact, is short, the typo that I write was a dict, but ye sin fact the goal is to have like iterable object with the indice inside
 
You need numpy 2018.07.10.10.23.30.59 in order to use df.do_the_needful()
 
I was helping a colleague to debug some issues the other week and pair-googling we found a DSM answer...
 
2:25 PM
I second @DSM's groupby.groups
 
DSM
Some of my older answers are no longer the best way to do things. I'm far too lazy to go update them all.
 
I like leaving my answers as outdated, they make a nice monument to my arrogance
 
I want to go back and remove the annoying images I've left behind
 
I've also encountered Martijn answers (not difficult) when pair-googling.
 
the essential is to arrive at the goal ;)
 
2:26 PM
I've yet to find one of my own D:
 
I found one of my answers via google... Once.
 
DSM
Fun game for parties: how common a Python question can you come up with that doesn't have Martijn in the first page of SO results?
 
It's like that scene from Back to the Future where Marty is trying to avoid his past self so the world doesn't explode
 
any python question I've ever asked :'(
 
The Martijn-whack game?
 
2:28 PM
I expect tkinter pack site:stackoverflow.com is Martijn-free.
 
@Kevin you better start answering more of them in case it's viewed as a challenge :)
 
GUI-related questions are a good bet since he just plugs straight into the computer via USB, no monitor required
 
Martijn 3.7 comes with wireless support, so he just hovers his hand over the keyboard and waits for the electric sparks to jump up.
I managed to finally hit 25k the other day through historic answers.
 
Thanks for all, it was very nice, this chatroom is funny maybe i will come back thanks for all guys (and girls ?) goodbye !
 
DSM
@vaultah: who put that 2014/2018 picture together?
 
2:36 PM
I did
 
DSM
Nicely done. You can see the descent into a Zalgo-like terrorscape.
 
Thanks :P
 
Don't admit to having photoshop skills, for the same reason you don't tell your relatives that you can probably fix their computer problems
Five years from now, when we need a poster done for SoPyCon 2023, we'll say "didn't vaultah make that one cool image one time...? Let's call him up"
 
What's that \if syntax crap?
 
DSM
I thought that was just a potential vision of the future. Hasn't been accepted yet, right?
 
2:43 PM
It's an actual PEP? To allow restricted names to be used with an escaping backslash?
 
Not a PEP (yet), currently it's just an idea that Guido liked
 
Has anyone checked in with GvR lately? Are we sure he hasn't been bodysnatched by a php developer?
15
 
I would like to apologize on behalf of C# for introducing the idea of verbatim identifiers
[only the dead can know peace from this evil.png], [if only you knew how bad things really are.png], etc etc
 
DSM
2:52 PM
 
Hi there. I was looking for a good platform independent language that can replace windows batch and unix bash scripts easily. I came across so many solutions, like compiling using batsh (sh*t ...), js, ruby, lua (poor Windows users), perl and even tcl.
I decided for python and I'm looking for some verification from you: Python is preinstalled on Unix systems, has a friendly installer for Windows, has one of the richest pre-installed libs. Other languages require a lot of external packages for simple tasks such as zipping a folder, Python does not. Perhaps tcl would be a good alternative, too, but Python comes with more and a larger community. Now please correct me if anything I said is wrong. Thank you! :)
 
Nope, you sound correct.
Then again, we're somewhat biased.
 
Oh yes, this text is for any pythons who tried more than python and can stay objective
Ofc you all love python or you wouldn't be here, you would? ^_^
 
I've used several different technologies, I'd stick with Python for its simplicity and batteries-included mentality.
 
DSM
I hesitate to say "easily" because there's always something which trips you up, but yes. One thing to prepare yourself for is that the overhead for really simple stuff can sometimes be high (running some external programs and redirecting the output), but Python scripts scale a lot better, and by the time you add appropriate error handling to something in bash you might as well have been writing Python.
 
2:58 PM
@DSM That's interesting. So handling outputs from programs seem to overhead. But honestly, some simple stuff is complicated in batch and bash in return. Do you have some more examples what to be aware of when working with Python?
 
I feel that Python has a good grip on script-y problems, since you've got os to handle a lot of common operations, and subprocess if you need to subcontract to an external task
 

« first day (2824 days earlier)      last day (2117 days later) »