« first day (1445 days earlier)      last day (3497 days later) » 

6:01 PM
I don't think Python mentions comments in its grammar specification, so I don't think KS should either.
 
@Kevin That sounds absurd
 
And yet, it is the truth; ctrl-f for "comment" in the grammar reveals 0 results.
 
Looks like they get removed during or before tokenization.
 
I guess it makes sense
 
6:04 PM
@Kevin although in languages like Nimrod they are part of the AST
 
"Languages like Nimrod" → "Nimrod"
 
Theory: docstrings are string literals instead of comments, because otherwise you would not be able to see them with the inspect module.
 
@Veedrac is it really the only one?
 
It's hardly common at any rate
 
I agree with that -- and I also haven't seen it anywhere else -- is it possible that Nimrod is the only one?
 
6:07 PM
buh. I suck at math
 
I couldn't *ahem* comment on whether it's the only one.
 
Leaving comments as tokens would get really tricky if you permit things like a = b + /*now I will add c, check it out */ c
 
Why would you ever have inline comments?
U mad?
 
inline comments are cool! :D
 
Then you would have to have rules like additionExpression := expr "+" expr | expr "+" comment expr | expr comment "+" expr | comment expr "+" expr | expr "+" expr comment
 
user559633
6:08 PM
inline all the comments
 
user559633
i inline comment relatively often
 
Inline comments are cool in the same way that C++ is popular
 
user559633
foo = bar * baz # this line is here to piss people off with crappy variable names
 
user559633
@Veedrac in that they are cool because they exist to get things done?
 
@Kevin makes sense.. actually I like the fact that you can do things with the AST at runtime in Nimrod, however I really don't have any idea what useful things you could do with comments..
 
6:10 PM
To be clear, comments literally in the middle of a line of code is an implementation nightmare; comments at the end of a line of code is merely a bit ugly
 
I saw what you did there.
 
@Kevin I was specifically referring to in-line comments, not end-line comments.
 
user559633
@Veedrac yeah i figured, but what?
 
@tristan Just accept me for who I am!
 
user559633
6:12 PM
that's not the way the world works!
 
user559633
also, what kind of drunk sociopath would put comments in the middle of a line of code?
 
Not a KS programmer, because I don't want to implement it.
You're welcome, world.
 
@tristan I would do! :)
 
user559633
f.trigger(evt, /*i'm drunk with lust and gin!*/ tgt)
 
@tristan Actually, I have done:
foo(x, y, /*wish_I_had_named_arguments=*/bar)
 
6:14 PM
@Kevin when will KevinScript be ready for testing on humans?
 
@tristan since C doesn not have keyword args, I like to use the inline comments when the args count is greater or equal than 4:
    glDrawArraysInstanced(GL_TRIANGLE_FAN,
/* First index in buff */ 0,
 /* Number of vertices */ program->vert_count,
/* Number of instances */ program->inst_count);
 
I could imagine it being an unfortunate side effect for a language where newlines are entirely optional, so this kind of code:
frob(
    15, /*as dictated by upper management*/
    16, /*calculated empirically by observing the sunspot cycle*/
    23  /*just because I feel like it*/
)
would end up with in-code comments if you minify it
 
user559633
i just wanted to say "drunk with lust and gin" ;________;
 
nobody work on minified code
 
So, yeah, basically what Peter said
I should read before I write.
 
user559633
6:16 PM
i only work on minified code because i'm an efficient programmer
 
@tristan :D:D:D
 
user559633
also i'm neo(pet) irl and i know kung food
 
I suppose that makes it OK
 
I remember Neopets...
 
Me too
I remember their stock market minigame. Pro tip: invest in stocks that have a price of 1 cent. They literally have nowhere to go but up.
 
6:18 PM
Yeah yeah. I remember they were one of the first websites to have the purchasable objects irl that could be used in-game.
 
DSM
sigh I should know better by now.
 
I tentatively agree, but I would like to hear more.
 
Arch Linux is a boon for people who like downloading updates
 
Did you know that the number of updates in the universe is constant and so everytime you update someone somewhere else has to downgrade. This is why Python 3 will never take off. Eventually the entropy will settle down to 50-50 split.
 
I do like my updates. Then I go back to Ubuntu at work and wonder, "Where did that feature go?"
 
6:23 PM
I know, I'll have KevinScript's version number tick downwards. For every KevinScript -3.X installed, you also get one free Python 3.X.
Thus respecting the conservation of updates, while at the same time giving the middle finger to entropy
 
You Ubuntu people have it easy
 
You should have Kevinscript start at version 10 and then slowly work down to version 1. Stops you from having to support it. "Sorry can't update anymore, already on version 1. Can't have version 0 or negative as THAT WOULD BE STUPID!"
 
Arch Linux's nightlies are it's stable releases
@Ffisegydd Loads of people have version 0.x
 
Thanks for ruining my joke. I'm just gonna go sit in the corner and sob.
 
@Veedrac it has, with an awful hack:
typedef struct
{
    int first;
    int second;
} Args;

static void
_function(Args args)
{
    printf("%d + %d = %d\n", args.first, args.second, args.first + args.second);
}

#define function(...) _function((Args){__VA_ARGS__})

int main(void)
{
    function(.second=12, .first=56);
    return 0;
}
OUTPUT: 56 + 12 = 68 :P
 
6:26 PM
I suggest something more like TeX's version scheme, only with more Newton-Raphson
 
DSM
@Kevin: I made the mistake of answering a non-library question when I knew Martijn was afoot.
 
user559633
lol arch linux
 
user559633
"the best thing about my italian car is that i constantly have to maintain it"
 
@tristan arch is cool
 
I'll use a video game numbering system. KevinScript I through X behave as normal, then I start doing things like "Kevinscript X-2" and "Super KevinScript DX" and "KevinScript: the Reckoning: Candelabra of Mephistopholes", eventually coming right back around to plain "KevinScript" for the twentieth anniversary.
 
6:27 PM
@PeterVaro I can't decipher that at all
What on earth did you do?
 
I approve of the way TeX handles updates. "This software is so complete and bug-free that I don't need to bother with many releases. It's been 10 years since the last update, I'll see you in 20."
 
KevinScript (2034) is a lot like KevinScript (2014), but with voice acting and more polygons.
 
KevinScript 7 is the best.
 
@Veedrac it is using an anonym structure as arguments, and designated initialisers to create the structure and macros to make it work
 
@PeterVaro "Science science code code program program"
 
6:30 PM
@Veedrac ?
 
Can you ELI5?
 
I have no idea what that is..
 
"Explain like I'm 5"
 
oh sure I can ;)
 
It's not a literal thing
 
6:31 PM
 
Hello!
 
@Veedrac since C99 you can do things like this:
struct s {int a; int b;};

int main(void)
{
    struct s S = {.a=12, .b=21};
    return 0;
}
 
does python cache in terminal somehow?
 
Today we'll see if posting a new answer to an old, established question with answer in the 4xx range, will lead to upvotes anyway.
 
Oui! Greetings @JoeSaad
 
i'm using python manage.py validate and it is giving me a certain error
i removed the line and still the error is coming
 
@JoeSaad: cache what?
perhaps you removed the wrong line?
 
i'm running this command python manage.py validate
 
it is called designated initisaliser => you can fill your struct with a keyword like syntax, and the keywords are the member names of the struct
 
@PeterVaro That makes sense
The rest is macro magic
 
6:34 PM
you can even do this with arrays
 
it is giving me "NameError: .... "
i removed that line completely
still getting errors there
 
Did you save your file?
 
int main(void)
{
    int array[] = {
        [3] = 12,
        [9] = 21
    };
    return 0;
}
so that the forth and the tenth elements are defined the others will be 0
 
@PeterVaro ...why?
That seems useless
 
because that's how the language works ;)
@Veedrac let me show you a nice example
enum {
    alpha, beta, gamma, delta
};

int main(void)
{
    int array[] = {
        [alpha] = 4,
        [beta]  = 10,
        [gamma] = 9,
        [delta] = 3
    };

    printf("%d\n", array[gamma] + array[delta]);

    return 0;
}
your indices are now "named"
so they are not "magic" numbers anymore
which makes your code easier to read and understand
 
6:39 PM
I am sorry, i was having a model being referenced as a foreign key before it's actually being created..
 
Erm. OK. That seems horrible, but I can see why you might want it.
 
No idea what that is about even.
 
10?
 
user559633
6:41 PM
Did 9 come out? I don't really track toy OSes
 
'And if they create a Developer Edition, They can call it Windows Developer Edition X..... WinDEX!' - Random guy on Slashdot.
 
anyway, the last magic I did was using anonym structures, instead of this:
typedef struct
{
    int first;
    int second;
} Args;

static void
func(Args args)
{}

int main(void)
{
    Args args = {.first=12, .second=21};
    func(args);
}
 
And no they never did Windows 9.
 
I did this:
int main(void)
{
    func((Args){.first=12, .second=21});
}
 
Windows is copying my numbering system!
 
6:41 PM
that's all the magic @Veedrac
 
My system being, do whatever you want, in flagrant disregard for logic
 
@Kevin sue them!
 
@Kevin it's a conspiracy! I bet Bill Gates Steve Ballmer the new guy is in here right now...stealing your ideas...
Do you have your tinfoil hat on?
 
I bet his name is Kevin too..
 
Yes, I will begin litigation immedia -- is vaporized by the fiery gaze of Microsoft's legal division
 
6:44 PM
@Peter close. It's Satya.
 
DSM
@Kevin: while file is open:
 
@Ffisegydd almost they both starts with the letter Z
 
How did you know my name starts with an invisible Z?!
 
the silent Z -- a real mystery..
 
Luckily I have many more silent and invisible letters, so you haven't yet guessed my True Name, which would grant great power over me.
 
6:46 PM
zKevinz?
 
Damn! How may I do your bidding?
 
Give me your power over all the stars
3
 
surreptitiously fills out "True Name change" form, mails to DMV
 
@Kevin but I know there are 64 leading invisible lettrs there and 16 at the end
 
IT'S WORKING! Mwhaahahahahahahaha
 
6:47 PM
The secret of stars is, write things that people will like and therefore star
 
I think all I have to do is search for them in the Pi
 
@Kevin That doesn't make any sense. I thought all the "away people" in this room are Kevin starbots?
 
I know your True Name...it's r"\w*Kevin\w*"
 
@Ffisegydd I thought you hate regex ;P
 
Why r?
 
6:49 PM
raw string
 
DSM
Good habit.
 
It's considered generally good practice
Even if it's not strictly necessary.
@Peter I do. I'm gonna go shower in bleach.
 
@Ffisegydd :D
 
Okay. Gotta rewrite all my code...
 
I love "regices" (that has to be the plural of regex :P)
 
6:50 PM
@IntrepidBrit It's possible, but if so, it happened without my knowledge.
 
@Kevin Ah, I see you follow the White House policy of plausible deniability. taps nose Mum's the word. Or should I say, "Mom's the word"
 
slaps @IntrepidBrit on the wrist we link people to the 3.4 docs in this room young man!
 
Argh, I forgot how to Python :(
 
Now sit down and eat your neeps!
 
@Ffisegydd Ow! Besides - I'll eat a modern Scottish dish thanks. Just polished off my Tikka Masala.
 
6:53 PM
I just noticed the '2' in the link.. shame on you @IntrepidBrit, shame on you!
 
My bad, I forget the world is using Python 3 and I'm unable to move forward with my projects for the time being :(
But I should strive to be a good example...
 
I'm reverse upgrading Kevinscript to negative three million. Everybody upgrade to Python 3.X or the version differential will tear spacetime a new one.
 
anyone knows if this error is related to versions? App 'foo' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations
 
Can't say I've ever seen that error message before.
 
Damn, I messed regex escaping and regular escaping.
 
6:55 PM
@Kevin thanks!
 
Yep, r should be there
 
user559633
@JoeSaad create a stackoverflow question and i'll check it out
 
@tristan you greedy..
 
user559633
i just don't have time for synchronous
 
user559633
tracking down a generator returning None
 
user559633
6:57 PM
f-ing up my threads and i dun like it, I DUN LIKE IT
 
:)
anywho, I think I'm going to grab something to eat, as I forgot to eat anything today..
 
@Kevin Sounds like a terrible design flaw...
 
rhubarb
~
 
cbg all :-)
 
cbg
 
6:58 PM
@PeterVaro Rhubarb
@ZeroPiraeus Re-cabbage
 
@Ffisegydd There was a 9.5 and 9.8 IIRC ...
 
We don't discuss 9.5.
There's many things we don't discuss in this room. Windows 95, Jon's missing leg, why Kevin has a yellow dog leg keychain, Scottish independence...
 
foams
 
Have to wonder whether Apple will take it as a cue to bump their major version ... "ours goes to eleven" etc.
 
@Ffisegydd that'd have to be one huge key chain...
 
7:03 PM
Windows 10 is going to wreck a lot of badly written code. if version < "Windows 7": raise Exception("Please upgrade your OS") kind of thing.
Better to just keep going up the ASCII chart. Coming next year, "Windows :"
 
now hating: C++
 
Rene Auberjonois replied to your Tweet!
Woo hoo... that's errr, two Star Trek actors now
 
I'm so proud :-)
 
It's Twitter Star Trek pokemon!
 
7:12 PM
Nice networking skills. Can you get Worf to come to my birthday party?
 
wherewhere
 
@Kevin I'll see what Mike says :)
 
Worfie could fly there by his fighter jet...
 
Also had stuff from Joss Whedon in the past...
 
"Why is there a small yellow dog that keeps tweeting at me?"
 
7:16 PM
Worf is the logical guy right? (I say stuff like this to my GF all the time and it really winds her up)
 
growls
 
My favourite was she said "Oh I'm being very illogical" and I just replied with "Yeah Kirk wouldn't like that" and it took her 3-4 seconds to work out I was winding her up.
 
@Ffisegydd haha... I like that one :)
Umm.... anyway... don't wind me up - I've just had a vegetable stir fry
 
Kirk wouldn't like you stealing his spotlight. Being illogical is his shtick!
Keep it up, and you'll get demoted to "away team redshirt"
 
7:18 PM
@Ffisegydd classic
 
Yep.
 
anyway... was really looking to the stir fry, but take a stab who forgot to get the diced pork out the freezer :(
 
Is that a new one?
 
yep, new badge, there's a meta post about it somewhere
 
7:20 PM
Computer, cross reference all badges by time of creation and show meta posts for each... Oh, I forgot, this isn't Star Trek.
Guess I'll use the search bar grumble grumble
 
@Zero wow... congrats - now stop getting rep and badges and stop making us feel like we're slacking :)
 
@Zero ahhh... that did go silver - good job :)
 
Done
 
7:25 PM
I wish not-yet-attained badges had progress bars, where applicable. How am I supposed to know how many question edits I've made within 12 hours of posting an upvoted answer?
 
Not sure whether that one's amenable to a SEDE query ... but yes, it would be nice to have progress bars.
 
Maybe they think that would over-encourage achievement hunting.
We've got enough review botters as it is.
 
It could be a privilege!
if there were a "doesn't seem to be aggressively gaming the badges" badge (called Zen, maybe?), that could unlock progress bars.
 
Wouldn't people just tactically game the Zen achievement so that they could aggressively game badges again?
Or you could troll people by making it the final achievement for extra Zen
 
Grrr
In [74]: a = 1

In [75]: b = 1

In [76]: a, b += 2, 3
  File "<ipython-input-76-53c4b8d9ee33>", line 1
    a, b += 2, 3
                ^
SyntaxError: illegal expression for augmented assignment
 
7:31 PM
@IntrepidBrit "doesn't seem to be aggressively gaming the Zen badge" would get you the Tao badge.
... which must mean there's a bronze level below both of them for Confucianism, but I'm not sure how to define it.
 
Do we have a canonical dupe for "Why is my array acting funny? I initialized it like`x = [[0] * 10] * 10`"
 
Yeah
 
Damn, I couldn't find that one. I was searching for "multiple" or "multidimensional" or "reference duplication"
I think I liked the list better when the question titles were visible in the list. Ctrl-f for likely keywords was more likely to come up with something.
(not that it would have been useful in this particular instance)
 
7:35 PM
Eventually there will be a search option. We discussed it briefly earlier today.
 
I look forward to it :-)
 
@ZeroPiraeus Wibbly wobbly, timey wimey?
 
I was just thinking that the Tao badge should take the progress bars off again :-)
The badge progress that can be measured is not the eternal badge progress.
 
I was thinking of a word cloud on sopython with the most used tags and having links to http://stackoverflow.com/questions/tagged/tagname, we should have one so we can be cool and trendy and hip like everyone else.
 
@Ffisegydd if you wish - but I'd prefer practical as a first priority
ahh balls... think I get invoiced for sopython tomorrow
 
DSM
7:39 PM
@Zero: I use "The Pythonicness that needs hours of thought is not the true Pythonicness" sometimes when people are working hard to make their perfectly functional code more Pythonic instead of doing something useful.
 
So true, so true ... strokes beard
My beard, not yours. That would be odd.
 
$0.00 in outstanding invoices
$80.00 owed from outstanding services
$75.68 outstanding (click to charge)
 
The Enlightenment badge just turns your screen blank.
 
DSM
(mental note: shave)
 
To reverse it, you must get the Endarkenment badge.
 
7:41 PM
I don't see 3 hours racking up $4.32
 
DSM
3 hours of what?
 
Brb, gonna upload 30 gigs of data to the SOPython server
 
@Kevin feel free :)
 
This pickup truck full of linux ISO cds ought to do it
 
Use up our unlimited inbound traffic please
 
7:43 PM
Darn their excellent terms and conditions!
 
@Kevin mind you, we've only got 155gb of disk space left... so do your worst!
 
@Jon what do you mean "practical" as a first priority?
 
Crunch data first before fancy visuals?
 
Oof. I think I just need to let go of trying to explain this properly ... the temptation to explain why this comment misunderstands the situation is high, though.
 
@Zero are you doing a no-sleep thing recently?
(did you actually sleep this morning for instance)
 
7:49 PM
@Jon Oh I see, yeah I know it's just an idea.
 
I did, yes ... six solid hours!
 
@Ffisegydd although I do want that clustered city like thing someone else did :)
 
@Jon I was looking at that today and thinking "Man I'd like to do it just for Pythonistas..."
Tried to find his code.
 
I'm more doing an accidental "damn, it's 05:00, maybe if I can push through to 20:00ish I'll be able to reset" thing. Badly.
 
I need to design an api to get data from Nidaba but I don't really know how to go about designing it, what procedures to follow or what not.
I'm not worried about "whenever you release a public api, it's permanent" because frankly if Guido can break the entire language with one version change then I can break a bloody API.
But would be nice to get it roughly right to begin with.
 
7:52 PM
@Ffisegydd think of it the same way as though you were designing classes with methods
 
look at the stack exchange api, I think it's pretty reasonable
 
bahahaha my biggest experience with OOP outside toy examples is matplotlib which has the worst api in the world.
There are on average 7* different ways to do each thing in mpl, each behaving differently. (* I made the number 7 up but it's not just 1)
So how would we do it? Create a nidaba package and then install it on sopython. Then use it along the lines of from nidaba import get_questions ?
 
@Ffisegydd what's your availability for Civ5 this week... my fault we missed last time, but oh well...
 
I would think something ORM-like would be most useful, but if OOP is out of the picture, then...I would probably write my own if I needed it?
 
@Jon tomorrow or Thursday. Can't do the weekend (apart from maybe Sunday evening)
 
7:56 PM
(@Ffisegydd)
 
@metaperture we have the data in a database (mongodb for now) but we're thinking of writing an API to access it so we don't have to worry about the fiddly bits in the Flask code.
I think the API we write can be pretty much designed specifically for us, and then made more general later on.
 
@Ffisegydd right, as a user I'd probably like a "Question" class with ".answers()" as an iter or something
@Ffisegydd depending on the analytic use cases, having an export as a networkx bipartite graph might be useful
(one cluster as users, another as commented/asked questions, probably with different edge types)
 
DSM
Heh. In succession, I asked why the OP expected the result he expected, Kevin pointed out that the expectation seemed unreasonable, and Roger pointed out that the observed result was reasonable.
 
Yeah eventually we were going to look into a graph database for that sort of thing I think.
 

« first day (1445 days earlier)      last day (3497 days later) »