« first day (987 days earlier)      last day (3978 days later) » 

2:02 AM
cabbage
 
 
1 hour later…
3:18 AM
Cabbage!!!!
 
 
2 hours later…
5:36 AM
Cabbage, Peaches and Pears!
 
cabage
cabbage
@IgnacioVazquez-Abrams ohai
 
Potato?
 
Glad you could join python chat again :)
 
Watermelon :)
wait a second...
"Your welcome"?
"YOUR welcome"?!!!
YOUR!?
 
5:45 AM
Yea, I noticed that too ;)
 
There's a typo their :)
 
I see what you did they're
 
Wow, all these chat flags from 4-letter words.
 
It seems all the starred posts have the word cabbage in them
 
My goal is to get all the starred comments to be related to cabbage - 14h ago by Shannon Strutz
Is there a way to construct a dict from two arrays using generators?
dict(zip(array1, array2)) - not welcome :)
 
5:56 AM
from itertools import izip
now use izip() instead of zip()
 
I will still have to use dict on the result
izip just generates pairs
 
Sure, but one at a time instead of chewing through the whole thing.
 
anyone know anything about A star
 
Hm...
 
A star?
 
6:06 AM
A* pathfinding
implemented intp pygame
 
What of it?
 
I need to use it in the RPG me and my friend are making
 
DFS/BFS?
BFS, I guess
 
whats that
 
In graph theory, breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations: (a) visit and inspect a node of a graph; (b) gain access to visit the nodes that neighbor the currently visited node. The BFS begins at a root node and inspects all the neighboring nodes. Then for each of those neighbor nodes in turn, it inspects their neighbor nodes which were unvisited, and so on. Compare BFS with the equivalent, but more memory-efficient Iterative deepening depth-first search and contrast with depth-first search. Algorithm ...
 
6:09 AM
eyeah probably BFS
 
DFS is "Depth first search"
will not be good on large maps :)
Is there "Become a Python ninja" book? :)
 
yeah its a large map
 
A* relies on logn smallest key for decent performance like Dijkstra's, right?
 
 
2 hours later…
8:25 AM
Looking at this:
>>> vec = [[1,2,3], [4,5,6], [7,8,9]]
>>> [num for elem in vec for num in elem]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Could anyone, please, unwrap this for me?
I never saw "x for y in z for x in y" syntax
Basically, I understand that it's: num in elem, when elem is in vec
 
It's a way to flatten a list
But simply
Hmm...
 
Well, yes, I see that it's a flattening, but how/why the syntax?
 
Just think of it as
>>> for elem in vec:
...     for num in elem:
...             print num
...
1
2
3
4
5
6
7
8
9
I'm not exactly sure how the list comprehension works
 
why not [num for num elem for elem in vec]
the order is different
I mean,... two "for"s okay... what will be [x for y in z for z in u for x in y]?
Python is scary sometimes :(
 
Try it ;)
Anyways, I have to go
 
8:31 AM
The list comprehension loops are written the same way nested 'for' loops are written
[x for y in z for z in u for x in y] would be the same as:
 
got it
Found a much better example:
[(i,f) for i in nums for f in fruit]
 
for y in z:
    for z in u:
        for x in y:
            lst.append(x)
 
If you just want to flatten something, use itertools.chain() instead.
 
Use itertools.product for that
 
I don't want to flatten, I wanted to understand the syntax :)
 
9:08 AM
Howdy
Umm... did I forget deoderant this morning and have knocked everyone unconscious with eau du Jon? ;-)
 
9:55 AM
How is this a bad thing?
http://askubuntu.com/q/314232/83865
 
10:15 AM
@ignacio ?
I think a perfectly reasonable response if your company allows is just say "we support xyz browsers"
Either that or actually have or vm a Windows machine
 
10:36 AM
Should I keep Cabbage developing as it is (three modes, each having a different strength), or make it one single language?
It'll make it a good cabbage-load easier to parse and to write the docs for
And arguably less confusing for the coder
Any suggestions?
 
Gotta run bbiab - I shall have a think 'bout that
 
@Volatility are we talking about the cabbage programing language itself?
cabbage to everyone!
 
yeah
 
yesterday I was thinking about it a lot
so, what are the three modes?
 
Rbrb
More shopping!
 
10:43 AM
@JonClements rbrb
 
Look here for the current documentation
I was thinking of combining each into a single mode, with all the functionality
 
but.. why this is called the cabbage language?
I mean there is no salad thing in here
 
huh?
The whole language is based around cabbage
 
    beans = [•, ••, •••, ••••, •••••]

    corn bean pea beans:
        potatot(bean)
 
Cabbage != Salad
 
10:47 AM
Iknow
salad is the speaking language cabbage is the programming one
 
yeah
 
but what makes your thinking on cabbage special
 
but Salad is based on salad, and Cabbage is solely based on cabbage
 
where are the vegetables?
 
Cabbage was the first (and only, for quite a while) word in Salad
 
10:49 AM
i know
than followed by rhubarb
and later the others
 
The idea of the programming language started before rhubarb was introduced
 
ok.. so?
 
I decided to keep it based on cabbage, rather than adding in everything else
 
but in that case you are creating an other programming language, which has cabbage in its name, and that's all. No salad word inside, no other vegetables around.. am I right?
 
Why would it...?
 
10:53 AM
I'm asking this, because yesterday, my main idea was: almost all programming languages are in english (with different words are used inside) and now, our language (the salad)
 
If I was trying to do that, the language would be called 'Salad'
 
has eveloed to "almost a full" language, so why not use their words?
OK then:)
I was just curious
then, in your case: what makes cabbage so special?
 
As in, why did I base the language around cabbage and not any other vegetable?
 
nope
in general as a programming language
what is the goal, why are you creating it, etc.
 
The language is for fun, not much else
 
10:58 AM
OK:)
 
So what do you think? ;)
About my original question
23 mins ago, by Volatility
Should I keep Cabbage developing as it is (three modes, each having a different strength), or make it one single language?
 
my advice is: make it one
 
Ok, that's probably what I'll do then ;)
 
oh, my vote is only 1, ask the others also:)
 
Yeah, I'll leave it for a bit
But I voted as well, so that's 2 vs 0 so far ;)
 
11:04 AM
:):):)
 
 
1 hour later…
12:31 PM
cabbage
 
cabbage
Have you had your think?
 
yes - depends.... am I the BDFL of this, or is this your off-spring ;)
 
mine ;)
 
A random idea then: how about having each mode switchable within a context block
with mode a:
    @@ a @@ @ @@ @
or something
(as it's just for fun!)
 
The intention was that each mode had its own advantages/disadvantages to use, and choosing one mode to code in would be a tradeoff
But deciding syntax for each mode then coding it into PLY was giving me headaches
 
1:01 PM
cabbage
 
2 hours ago, by Volatility
Should I keep Cabbage developing as it is (three modes, each having a different strength), or make it one single language?
 
One
 
So that's 3 votes to 1
Looks like Cabbage is gonna get a general overhaul
 
@Volatility how did you copy your question like that ^ ?
@JonClements wb
 
You just copy the link of the chat message
 
1:05 PM
the permalink?
 
yeah
 
2 hours ago, by Peter Varo
:):):)
hmm
kewl:)
 
thanks
 
no worries
Almost 200k questions tagged
 
1:11 PM
Cabbage, Everyone!
 
Just lost 10 rep </3
 
Foooor?
10 downvotes?
 
@mishik it'd either be 5 downvotes (unlikely) or a removal of an upvote somehow ;)
 
I meant 10 downvotes from Haidro :)
 
Awww - but Haidro is so nice and all - why would he downvote? :)
 
1:18 PM
To punish infidels!
(read that in growly voice)
 
A question was removed from SO
In other news, I'm quite shocked that map is faster: stackoverflow.com/a/17380603/1971805
 
I, too
 
Do you think it's the None ?
 
Got no idea
 
map is faster only when there's no lambda
147
A: Python List Comprehension Vs. Map

Alex Martellimap may be microscopically faster in some cases (when you're NOT making a lambda for the purpose, but using the same function in map and a listcomp). List comprehensions may be faster in other cases and most (not all) pythonistas consider them more direct and clearer. An example of the tiny spee...

 
1:31 PM
But this isn't a list comprehension
 
But it can be
[i for i in '1111']
 
What happens when you time the list comprehension vs the constructor?
 
It seems list() is the slowest
map and list comp are pretty much the same
But this is weird
I think it is the None which is making it go faster
putting str, it takes twice as longer
 
That's cause map has to call the function
 
I don't understand what the None does though
 
1:37 PM
It's essentially the identity function
returns the value unmodified
(when used in map/filter)
 
Cool
 
None translates to lambda L: L I believe
 
oh
 
1:58 PM
Who is the Python developer who died a few months ago?
He was a legend, perhaps involved with SciPy.
Ok, it's John Hunter, matplotlib creator: groups.google.com/forum/#!msg/pydata/FpwXp3sX6N8/mxopkZ1PkBQJ.
 
woohoo 1.5k!
 
rep? Grats!
 
2:14 PM
Melon :)
 
2:30 PM
Banana job ;-)
 
2:46 PM
Potato?
 
2:56 PM
Potato - potato?
 
Potato too
 
Banana banana
 
lettuce?
oh... sprouts... got it
sprouts, was a peas :)
 
Lol... yamming salad can be a tomato sometimes :-D
 
Avocado!
 
3:04 PM
Wow - haven't heard this one in years...open.spotify.com/track/67T4fqLSRCgf9hJ83zhFco
 
In years?
Artichoke?
 
Might be confusing it with something else though
 
Mushroom, maybe
Now imagine some python newbie walks into this room. He/she then can safely assume that python drives one crazy.
 
But soon they shall come to embrace the way of the Cabbage :-D
 
Join the dark side of Python! We have Salad!
 
3:20 PM
Just a cabbage instead of a cat?
 
or a snake
 
SALAD,SALAD darkside?
 
python*
 
A snake and a cabbage...?
 
Emperor Pythontine
Darth Yielder
Count Dictu
 
3:25 PM
PyFighters?
Darth Tuple?
Gotta live serious discussions about Python. ..
 
3:40 PM
Enumerationkin Skywalker
Loop Skywalker
 
Dicta the default?
 
Tuploine
 
Abstract Base Classes: The Duck Typers strike back?
 
List comprehension: A new hope
:D
I'm crying :)))
 
Python wars: the function returns?
 
3:45 PM
Value returns back
 
Python 3: the next generation?
 
hey hey hey
That's different universe!
Spock is cool though
 
(Okay - having to step slightly sideways!)
Hans Singleton?
 
And his friend Push_back'a :)
 
(Kind of "solo")
 
3:49 PM
oby1.gen(oby)
 
Umm...push_back makes me think of std::vector though
 
true...
 
Well this could be a useful training exercise for newbies to go through the language and library to find (bad) puns
 
Although that way may not be obvious at first unless you're Alderaanian
The channel is empty cause of us :)
 
Speak for yourself cough ;-)
A channel always needs some light entertainment!
 
3:53 PM
:)
Cabbage. Peaches and pears, I need asparagus beanly. Mushrooms how to get this yamming tomato to work banana. Is this a peas or lettuce? Please asparagus. Melon.
 
Or insanity - either or. ..
see it's a fully usable language
What could possibly go wrong having it listed as an official language of the United Nations or something!
 
Avocado
 
"Can you tell me how to get to the airport"?
That might not work too well - but that's what miming and pointing is for right?
 
Typical greeting:
1: Cabbage
2: Cabbage
1: Potato?
2: Banana. Potato?
1: Potato.
You shoud say: Mushrooms how to get to the airport. Any asparagus?
 
Excellent... that can be the first page of our phrase book
 
4:08 PM
:))
Are you thinking what I'm thinking?
 
Pinky and the brain?
 
We should create a English-Salad dictionary! :)
That would be very banana!
Even Banansome!
 
Ooo banansome
By this time next year rodney - we'll be millionaires!
 
Let's start
My new favorite:
1. What would you like for dinner?
2: Mushrooms
 
 
1 hour later…
5:27 PM
asking for "Steak and chips" is going to be a problem here I see...
 
5:37 PM
Or if you really wanted mushrooms :)
 
umm, yes...
not quite sure how one would do an impression of a mushroom either
ahh got it - lots of people have touch screen mobiles - they could just draw it ;)
 
formFields = {('ctl00$PlaceHolderMain$txt_Id', '54673')}
encodedFields = urllib.urlencode(formFields)
there is something wrong with formFields
 
Seems like some password :)
 
can someone tell me what is it
 
You have a key, but not value
 
5:47 PM
@mishik no it isn't
 
and the key is a tuple
 
It's a set of one element, that's a 2-tuple
 
TypeError: not a valid non-string sequence or mapping object
 
remove the {} for urlencode
 
that's the error I get
 
5:48 PM
formFields = (('ctl00$PlaceHolderMain$txt_Id', '54673'),) is what you're after
 
Heey, someone starred me :)
 
ok still have the same error
@JonClements I'm using a single tuple only
 
That is a single tuple
 
"," is to force tuple
 
@mishik ok thanks
it works fine now thank you very much
 
5:50 PM
Thank Jon :)
 
@JonClements thanks both of you
 
wow, only taken 8 hours for something Python related to turn up in the room ;)
 
6:07 PM
Cabbage has eaten Python.
 
Cabbage has teeth and a stomach it appears
wb @Jared
 
Javascript room is sniffing me :(
 
6:26 PM
In tkinter how to get the absolute position of a widget top/left coordinates in pixels?
 
awww, I didn't get sniffed
@PeterVaro no idea
1 message moved to recycle bin
 
wow, recycle bin... SO is really deeply thought through
 
sorry - just getting rid of a javaroom notice here ;)
in general - rooms don't link to other rooms
 
java?! :)
 
just disappointed I didn't get "sniffed" :)
 
6:41 PM
and due to that disappointment you're naming javascript java ? :)
hey, that's a nice dog :)
I guess, I'm not good at spotting things...
 
yes, I errr neglected to type the "script" bit ;)
 
щлфн ерут)
wow
okay then* =)
 
being a squirrel - you didn't realise you were talking to a dog ?
 
I'm a hamster
 
I'm a dog that needs glasses :(
 
6:53 PM
And I'm a hamster that needs strawberry
 
Kinda strange given the size of my eyes to the size of the rest of me
 
and hooray! I have one
lol
 
I bought strawberries today
although, given my performance of telling the difference between a squirrel and a hamster - I may have bought something red that vaguely looks like strawberries
 
My wife brought about 2 kilos of them from her mom's
lol2!
anyway, 1am. I'll try to sleep now.
Rhubarb!
 
take care - see you laters
right, I've gotta rhubarb as well for the moment
 
7:15 PM
@JonClements <widget>.winfo_rootx() and <widget>.winfo_rooty()
 
 
2 hours later…
9:25 PM
Cabbage
I thought the init method needed to be the first method after the creation of a class
 
9:57 PM
Are there any setuptools experts in here?
I'm having a little problem with entry points: I declare them in my setup.py and when I install the package via "setup.py install", they are discovered just fine. If I install it via "pip install", they aren't found. Both times the package with the entry points is installed just fine in site-packages.
 
10:51 PM
Is this a bug? <list>.sort() desn't return self, so [3, 2, 1].sort() doesn't return [1, 2, 3] -- strange..
^ in Python 2.7.5
 
11:22 PM
No, it's the documented behaviour
none of Python's stdlib returns stuff for chaining.
it makes it more obvious it does the operation in-place
 
11:37 PM
hmm.. thanks @Lattyware although I think for mutable objects it makes sense to return self.. anyway, I have to write a +1 line in my code.. err;)
 
It's precisely because it's mutable it doesn't.
If it was immutable, it would have to return an object (the sorted outcome)
Python keeps to the idea that a value returned is a new value
this means that operations like sorted() are not in-place, and return a value
things that modify in-place (only availible on mutable types), like seq.sort() don't return values.
returning self is convenient for chaining operations, but it doesn't make the code clear
extra lines are not evil
especially if they add clarity
if you need it on a single line (that should never be a need), you can always use sorted() instead.
Obviously, that does have memory implications.
 
Oh I only chain things when they are easy to understand.. for me list.sort() is absolutely an understandable option. Of course I do know, that sorted(list) is not an option here -- overkill. Anyway, thanks for the answer, I'm not 100% convincedm that this is right as it is now, but if guido and the guys think so..
we have to follow them..
 

« first day (987 days earlier)      last day (3978 days later) »