« first day (2090 days earlier)      last day (2858 days later) » 

1:00 PM
if you look into communities, nothing matches the PHP community
 
@AnttiHaapala Javascript
but that further proves your point
 
@PradeepJaiswar Not a criticism ... I just meant that if you're asking right at the start, you'll be more comfortable having a big audience to ask further questions down the line :-)
 
#pyramid @ freenode
 
Morning cabbage.
 
What does this mean? rm -rf !$/.git, particularly the !$
 
1:09 PM
The last token of the previous command
vim thing.py
python !$
you're going to want to be careful with that one though... maybe echo it first
Incidentally, it's the token post word splitting, so don't quote it, otherwise weird stuff happens.
 
cabbage
 
káposzta
 
umm...cabbage:P
 
I assume that's right, I just used Google translate.
 
@PM2Ring same word in russian
 
1:16 PM
it is, but it's hard to return the gesture since you're native language is English:D
 
slavic word
 
@AnttiHaapala well, close
obviously took it from them
 
same as in I and Andras have the same name
 
along with the vegetable, probably
considering the existence of cabbage pirogs
AAAH "you're native language" after edit window:(
 
lakër in Shqip. I was on the 'at the Grocery Store' chapter earlier. :D
 
1:19 PM
@AndrasDeak and we talk about paprika
 
do we have any Shqippanese people around?
@AnttiHaapala I never know if people mean paprika when I say paprika...
 
both of them actually
 
lol. Shqiptar, i'd say.
 
or all of them
 
I tend to think that paprika mostly means the ground spice in the west. But Hungarians call that "piros paprika", red paprika. So paprika alone would mean the veggie.
 
1:21 PM
@AnttiHaapala Ok. I guess it looks Slavic. FWIW, I spent a few months teaching myself Russian in my mid-teens, but decided it wasn't a good idea since I had a fairly full load of subjects at school. I've forgotten almost all the Russian I learned, apart from the Cyrillic alphabet, and I guess I'm probably a little shaky on Cyrillic alphabetical order. :)
 
all of capsicum veggies are really called paprika in Finnish, alongside wit the powder
 
Mmm, i feel it might be a bit hot for paprika and cream when we're in Hungary this time. Fine in the winter!
 
@AnttiHaapala but you had a similar Slavic influence
 
not really :D
 
No? Just a bunch of Russians?:D
@Withnail cream?
 
1:23 PM
there never were that many Russians.
they tried
 
so is it just you and Russian?
my impression of a Russian influence on Finns probably comes from you, considering that you're the only Finn I know:)
 
remember Finland was an autonomous grand duchy of Russia in 1809 - 1917
 
@AnttiHaapala I missed that
 
but with cream/sour cream on it
 
1:24 PM
Oooh, paprikás csirke. Yumm:)
 
in 1860 Finland got its own money... own stamps since 1856
 
own stamps:D
 
It never occurred to me that that would hold significance
 
shit?
 
1:25 PM
link works anyway
5 kopeyki
 
that was in kopeka though :d
but see, the lion there :D
 
kopeek or smething, I guess
 
kopeekka
words never end in k.
like in Quenya
 
in Finnish they don't;)
@AnttiHaapala also good to know:D
 
копе́йка
 
1:27 PM
From now on I'll just note "quenya=Finnish, black speech=Romanian"
 
In Quenya and Finnish alike, words can only end in n,t,r,l,s and vowels :d
:P
 
@AnttiHaapala the singular, yes, but for 5 you need to conjugate it
5 копе́eк probably
 
dunno :D
 
Ooo, So just went down for maintenance
 
The end is nigh. Help vampires must have gotten over the fence again, they are gnawing on the cables.
 
1:29 PM
:D
@AndrasDeak jjrt wasn't racist :P
 
wasn't he?;D
 
@AndrasDeak The modern postage stamp was still very new technology in 1856; the first such stamps were issued in Britain in 1840. Prior to that date, postal services did mark posted items by stamping them, though. See Wikipedia
 
I thought the significance was of a cultural kind
being acknowledged a bit by having your own stamps
 
is there any way to monitor active database connections? from postgres
my db goes crazy and stops responding
 
As in... -
select *
from pg_stat_activity
where datname = 'mydatabasename'
 
1:36 PM
thanks
 
i'd probably use packages.debian.org/sid/misc/pgtop pgtop if you can though.
 
yeap
 
(Had this when i was trying to work out whether it was python or postgres that was falling over. Obviously it was my python code though. :D)
 
yeah, there must be a "leak"
 
1:39 PM
\o/ passed my phone screen. now for the technical test. :|
 
@AndrasDeak furthermore, Russian stamps weren't accepted in Finland...
same for money 4 years later...
around that time the major languages in official use were Swedish and Finnish, not Russian.
 
so my application uses only one process by consumes all the connections in the pool :feelsbadman:
 
user559633
if it's a private pool, sounds fine :)
 
@AnttiHaapala now I do know that money is important:P
the resistance must have been down to Russian vs Finnish vodka..
 
ok, guys, I officially need help with managing db connections
 
1:46 PM
the first step is admitting that you need help
 
@AndrasDeak finland had prohibition in 1919-1932...
The state liquor monopoly opened its doors on 5.4.-32 at 10
parliament had some fun :P
 
@AnttiHaapala I bet that went down well...
 
I do something like this. Is this a good way of handling connections?
 
@PM2Ring it did, if you were a smuggler or made your own moonshine
 
There's nothing like prohibition to encourage a thriving black market economy.
 
1:51 PM
@AnttiHaapala lol:D
your people have a sense of humour
 
You have to up North.
 
and it is true, not some urban legend.
@PM2Ring before prohibition the consumption of alcohol was .07 liters per capita :P
during prohibition it went up quite a lot
 
per what?:D
 
user559633
Say what you will about the Finnish -- roughly 5.4 million in population, inhabitants of a European nation bordering Sweden and Russia, that they drive on the right side of the road, that their ITU country code is 358, but they have been known to joke in the past.
 
@AndrasDeak per year, not hour :d
 
1:54 PM
I was going for "day":D
 
@tristan finland has such a shitty ITU code because they were like... "why should we send some delegates to some shitty meeting" :D
everyone who sent a delegate in got 2 digit codes :D
 
were you also assigned to be some comittee seretary?
 
user559633
USA's ITU code is +1 because we're down for whatever
 
Finland was size of Denmark, and Norway back then, 46 and 48 respectively
and we've got what, frikkin 358?
 
user559633
meh, at least it's 3+5=8
 
1:59 PM
What's wrong with 358, apart from requiring 3 digits? It's easy enough to remember, being a Fibonacci sequence.
 
user559633
^ :)
 
I can't even find ITU numeric codes
 
1 is also a fibonacci sequence
 
oooooh, that code
the wonderful trivia I learn every day...
it really pays out to be ignorant:D
 
user559633
Interesting thing: the Domincan Republic has 3 isd_codes (1-809,1-829,1-849)
 
2:02 PM
Cyprus has 357. 357°C is the boiling point of mercury, and Mercury was the messenger of the Roman gods, so there's a link between 357 and communication. Pity that Cyprus is Greek & Turkish. :)
 
> still uses +37744/+37745 [...]
 
Don't ask me why I happen to remember the boiling point of mercury. :)
 
well Mercury is practically Hermes, right?
 
user559633
I will continue not asking you that.
 
@AndrasDeak Exactly.
 
2:04 PM
so the Greek part could still benefit:D
 
Dominican republic surely knows how to become independent :D
(and then lose the independence)
 
2:18 PM
@PM2Ring As you might easily have predicted - upon seeing the word Bangor, that was immediately in my head too.
 
@JRichardSnape I'm not surprised. :) FWIW, I heard Day Trip to Bangor on the local community radio station a day or two ago.
 
Really? I heard it a lot as a kid in a folky/hippy household :)
That and "All around my hat" were the only two relative "hits" for the folk scene in that period. I was a very non-cool kid.
inb4 And remain a very non-cool adult.
 
Yeah, it did reasonably well on the Australian charts, back in the day. And it gets played on our community station (which is targeted at the older audience) fairly regularly.
Did you like that Anderson Ponty Band clip? IMHO, neither Jon nor Jean-Luc have the raw power they had a few decades ago, but I reckon they still do pretty well for a couple of old blokes. :)
 
@PM2Ring Very much. Particularly as a sometime bass player in my student days - the bass intro + Ponty plays to all my interests :)
 
Thoughts on Chilcot?
 
2:30 PM
@JRichardSnape Oh good. That bass intro was wild!
 
@Ffisegydd Not looked yet. Have had actual work to do (Boo!)
Did he savage Blair?
 
@JRichardSnape Oh yes.
 
Thought so. I wonder what Jezza has said heads to the internetenator
 
He went about as far as a non-judicial inquiry possibly could towards saying Blair is a war criminal.
 
Obviously the report was evenly-worded and politically correct and what not, but it was strongly leaning against Blair throughout from what I saw in his statement.
I was too young to have an opinion on the Iraq war.
Which is to say, I didn't care.
The press questions with the family after the statement was very intense.
 
2:35 PM
@ZeroPiraeus Just saw "the way the legal basis was dealt with before the 20 March invasion was far from satisfactory." As you say - as near as he could go, I reckon.
@Ffisegydd It was what made me realise the full gravity of the late Blair project. I was marching and campaigning. It takes some ego to ignore 1 million people on the streets.
This phrase "the right thing to do". I see it quoted there in a note from Blair to Bush. Cameron uses it a lot. It is very, very dangerous. It implies such an ego - that one leader has a handle on the objective "right thing".
 
Key conclusions are that there was no imminent threat, and that Blair deliberately exaggerated evidence of WMDs. The first means the war was illegal, and the second means impeachable misconduct.
 
Hi. How is code like this: from .utils.compat import * ... compiling in python 2.7?
shouldn't it error?
 
DSM
@JRichardSnape: that seems strange to me. If someone doesn't think what they're doing is the right thing to do, why would they do it?
 
Yes - I saw the key conclusions summarised thus.
 
:Feels vindicated that he was part of the protests in Scotland:
 
2:40 PM
@DSM It's not the thinking, it's the telling others that it is unquestionably "the right thing", without justification.
 
@deostroll which part? the dot before utils?
 
shame-facedly admits he was in favour at the time
 
@AndrasDeak yes
 
@JRichardSnape Not to defend either, but eventually a decision has to be made. That decision could be made by a single person or by parliament voting or whatever, but a decision has to be made. Never mind, I misunderstood your point.
 
@deostroll dunno
 
2:42 PM
It means import from this package, right?
 
DSM
@JRichardSnape: so I can think it, but I can't tell it to people? You keep putting "right thing" in scare quotes, but I'm legitimately not getting your point. Presumably those who opposed the war also felt they were doing the right thing in opposing it.
 
Once more, with feeling: not to defend either but it's only a saying. You could come to the conclusion that something is "the right thing to do" either because you've decided it's right (bad, ego, etc) or because you've spoken to intelligence, analysts, your cabinet, etc.
 
hi guys
 
@whyguy cbg
 
An old folky favourite: May You Never, with John Martyn and Kathy Mattea on guitars and vocals, some tasty lap Dobro work by Jerry Douglas, and of course the inimitable Danny Thompson on bass.
 
2:43 PM
@DSM I would expect that they think it's the right thing to do (who deliberately, knowingly does the wrong thing? only a sociopath). It almost shouldn't need saying. But to assert it, rather than make the argument; that's the rub.
Sorry for the quotes - I guess that betrays my opinion that it was not the right thing
 
@JRichardSnape Whoa, hey now. Less of the sociopath name throwing. I do the wrong thing all the time for comedy.
 
can I ask a algorithmic question here?
 
Yeah, the key is Blair cites having thought it was "the right thing" as a defence, when it's merely a tautology.
 
DSM
Yes, we don't just discuss politics. :-)
 
2:44 PM
I think this also makes perfectly clear why Blair is so upset with allegations of bad motives - he did genuinely think it was the right thing. I believe that. I just don't think it's sufficient.
 
@JRichardSnape rationalization sucks
 
@AndrasDeak they are python 3 feature, right?
 
look at the link
 
Alas, politicians are not scientists. (I say alas, but I think we'd be in a lot more trouble if all politicians were scientists)
 
@ZeroPiraeus Interesting - my partner was in the same boat. Very similar left wing politics to me, but she was absolutely convinced by the humanitarian plight, to her this dwarfed the WMD arguments.
 
2:46 PM
@Ffisegydd Merkel was a physicist...and became an anti-nuclear-energy advocate
so much for science
 
@AndrasDeak Nice summary. I would add, particularly post-hoc rationalisation.
 
I thought it was the right thing to do at the time, done for the wrong reasons. I've since reversed quite hard.
 
suppose we have
m = [1, 2, 2, 3, 4, 6, 5, 4]
n = 5

create a array `sol` with length = n
in which you count the values of m

like sol = [1, 2, 1, 2, 1]
 
yes
 
got it?
 
2:47 PM
Nope.
 
DSM
It's ambiguous what to do with missing values, for one.
 
@JRichardSnape Sierra Leone and Kosovo led many to think that a glorious new era of positive intervention was possible. Incredibly naïve looking back, but there you go.
 
if it's missing put 0
 
Are you saying that the 1st element in sol is the count of the minimum element in m?
 
@ZeroPiraeus It was and still is possible, only because the alternative was active and current genocide.
 
2:49 PM
first element in sol is count of 1 in m
and so on...
 
First or minimum?
 
DSM
^ good Q.
 
What I don't get is, what's your question?
 
DSM
Some people like poetry, others like describing problems they're facing. Let a thousand flowers bloom, etc.
 
@whyguy That's easily done with itertools.groupby. Or maybe not. :)
 
2:50 PM
Well, I'm stuck here supposing:P
 
well wait
 
DSM
@PM2Ring: I would've gone the Counter route, personally. (IIUC.)
 
you see a 6 here (which is > than n) and when find such a value make all the values in sol same as max(sol)
 
wat
 
I believe whyguy needs as output [np.sum(np.array(m)==k) for k in range(n)] in numpy
 
2:51 PM
got it?
 
Nope
 
DSM
Less than before, in fact.
 
hahaha
 
@whyguy Why isn't sol == [1, 2, 1, 2, 1, 1] ?
 
DSM
@AndrasDeak: that won't work for two reasons.. can you spot them? ;-)
 
2:52 PM
but my beliefs are being shaken by additional info coming from whyguy
 
BAYES!
 
@DSM call it pseudocode:D
 
m = [1, 2, 2, 3, 4, 6, 5, 4]
n = 5

then
sol = [1, 2, 1, 2, 1]
if we don't consider the 6 rule
 
thank goodness for the 6 rule
5
 
> Bayesian Theory: Shaking beliefs and leaving people gibbering, indecisive wrecks since 1763.
 
DSM
2:53 PM
#alwaysswitch
 
never mind
 
@DSM ah, 0-based indexing
what's the other one?
 
DSM
It seems you understand your problem better than any of us. Is there a problem you had with implementing it?
 
I hope not just something silly about numpy being called np
 
@whyguy It's still not clear how you want to handle 6. When building sol are you ignoring any values in m that are greater than n?
 
2:57 PM
Hello, salad people!
Can we delete this one?
-1
A: Django: TemplateDoesNotExist at / home.html

paradoksumsuTry to use documentation. You may find your answer on: https://docs.djangoproject.com/en/1.8/topics/templates/

 
3:13 PM
that's more than a year old though
 
So?
 
just noting:)
doesn't make it any more valuable, I was only surprised
wanted to flag VLQ, but couldn't, I thought it was 2 weeks old or something
nice feature-request, Fizzy
On a tangentially related note, I never would've thought I'd see "effective panda" come up anywhere
not exactly the totem animal of efficiency
 
@AndrasDeak Ta.
Incidentally, the book is not very good at all :P
I actually paid a few $ for it, to support Tom, but it's pretty amateurish.
 
3:28 PM
:)
 
It's written in LaTeX and he's got example code that overruns the page so you can't see half of the lines.
 
yikes
that's...quite dilettante-ish:/
OK the tag line of the book is killing me
> A series on writing effective, idiomatic pandas.
but I'm sure that's on purpose
 
That's not nice to the pandas, they're not idiots. :/
 
I mean, look at all the math they do!
 
3:34 PM
@PM2 as a music fan you may appreciate musicmap.info
Zoom for epicness.
 
Pandas are pretty tolerant, but you shouldn't antagonize them. After all, how much can a panda bear?
3
 
wayyy.
 
@Ffisegydd Groovy. I hope it doesn't chew up too many bytes, I don't get a lot per month...
 
Doesn't seem to be too bad, from looking at the networking panel
Loading just the page is less than Chat :P
There's a few extra requests when you click on individual genres, but it's remarkably low actually.
 
DSM
3:42 PM
@Ffisegydd: Tom wrote one; I know Andy was working on one; and I've thought about it. ("Pandorable Data Analysis by DSM" or something.) Everyone's in the game!
 
you should split up the market, or at least agree on the same high price of your work
I don't know what carteling is called in English
 
@Ffisegydd Excellent! I've seen something like that before, but nowhere near as detailed. Or slick.
 
@DSM Data Snakes Mentoring by DSM.
 
:D +1 ^
 
"Snake Charming With Pandas"
 
3:45 PM
Here's some classic Louisiana Swamp blues: The High Sheriff Of Calhoun Parish by Tony Joe White.
 
4:01 PM
@DSM I've got the one by Wes on my desk. It's a bit old now though.
 
O, reilly?
 
Come on, you're better than that.
 
mumbles
 
DSM
There, there, JRS. I don't think you're better than that.
 
Nice.
 
4:07 PM
I found it amusing. I don't know what that tells about me.
 
DSM
I've been removing warnings and fixing a bunch of legacy issues with this code, but there's this one section which as near as I can tell only works because it doesn't, and if I fix it, everything goes boom. Frustrating, but that's what underlings are for, I guess.
 
Does it attempt to instantiate the set of all sets which don't contain themselves?
 
DSM
Not as far as I can tell, but there's this mysterious comment about shaving I can't parse. ;-)
 
Guys, If you can help please... I run `python -m SimpleHTTPServer 8000`
outputs: `Serving HTTP on 0.0.0.0 port 8000 ...` And on another console I type `curl localhost:8000`and it shows `curl: (7) Failed to connect to localhost port 8000: Connection refused`, it's same for nginx
 
4:15 PM
Isn't 127.0.0.1 localhost?
(I'm not talking about python)
 
Yes
And it's same with 127.0.0.1
 
so..try curl 0.0.0.0:8000?
I have no idea about what you're doing, but clearly Serving HTTP on 0.0.0.0 port 8000
and yet you're attempting to connect to localhost
 
0.0.0.0 port 8000: Connection refused
 
much better:)
 
@AndrasDeak 0.0.0.0 means "all ip addresses"
 
4:17 PM
No firewall nothing
 
DSM
FWIW curl localhost:8000 works for me just fine.
 
So localhost should also work on 0.0.0.0
 
Alpine image latest
 
@Ffisegydd OK, as I said, I don't know anything about this:D
 
Christ, Jack Straw looks like an empty husk.
 
4:18 PM
Works for me too.
Windows 7, Python 3.5
@VeeeneX are both consoles on the same PC?
 
Yes
It's linux
 
DSM
Is the alpine image one of those microlinux ones?
 
Python 2.7
Yes
Installed curl and nginx
 
Is there something else running on port 8000?
 
Nope
 
4:20 PM
Can you curl google?
 
DSM
I wish I could go back in time and tell myself that "curl google" would one day make sense.
 
is there a standard way for doing querystring for sort ascending vs. descending, like some use sort=asc or sort=title:asc or sort=+ etc ...
i see it different in many sites and am wondering if there's a standard for that
 
Well
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.sk/?gfe_rd=cr&amp;ei=VzB9V5XpMsvR8geQ6atw">here</A>.
</BODY></HTML>
 
@VeeeneX 1990's just called, they want your html back
@JoeSaad no.
 
This is crazy
 
DSM
4:27 PM
Things which seem crazy sometimes are, but are more often the result of something stupidly simple no one considered. What you're doing sounds like it should work, though.
 
How is this compression ?

 >>> print len(zlib.compress('aaa',9))
11`
 
@VeeeneX ping localhost
 
DSM
Pigeonhole principle. Any compression algorithm has to make some inputs longer. (Well, okay, I guess that's not quite true -- a no-op algorithm wouldn't make anything longer. But you know what I mean.)
 
But it's making almost every small string longer. I shoud try with file too see
 
@MarkoMackic think about it:
 
4:29 PM
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.598 ms
 
if you have a "non-op" algorithm...
 
Looks fine
 
it will make nothing smaller, nothing bigger...
 
Ouuu Fixeeed!
 
but if you have n bytes, you have a choice between "use non-op" or "use Algo X"
 
DSM
4:30 PM
And so it's not a very good compression algorithm, I admit, but usually we allow the identity operations..
@VeeeneX: what was the issue?
 
... but you need to use at least one extra bit to tell whether non-op or Algo-X is in use...
>>> len(zlib.compress(b''))
8
 
It wasnt the same docker machine :( :D
 
but it's 9 bytes and you have 3 bytes of original text
 
DSM
@AnttiHaapala: not if you don't save that information at all. I mean, for any given file, you don't actually know if it's compressed or not, regardless of what internal markup they use.
 
let's pretend it never happened
 
4:32 PM
@DSM well, but that's handy:P
 
I get you, I must reaserch the non op and algox compression algorithms :)
 
@MarkoMackic You mean 11 bytes. 9 is the compression level. The output of the function has header info in addition to the actual compressed data. See tools.ietf.org/html/rfc1950
 
8 bytes, typo, I was pointing to anttis example
-->aaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccc
17
yeah now it's good :)
 
4:51 PM
@MarkoMackic In Antti's example, the input data has zero bytes.
 
ah yeah
I thought "b''"
my mistake
 
You may enjoy implementing your own simple LZW compressor & decompressor from scratch. It's not that hard, and it's a good exercise in working at the bit level, IMHO.
 
5:06 PM
what IMHO, LMHO means :)
I wanted to dig into that
 
compressor is much harder than decompressor
lzss is probably easier...
lzss is easy to understand and to write a shitty compressor for,
 
you mean recognizing patterns
or it does some referencing to first instance
of stinrg
or not, I'll read it in depth when I can
 
Lempel–Ziv–Storer–Szymanski (LZSS) is a lossless data compression algorithm, a derivative of LZ77, that was created in 1982 by James Storer and Thomas Szymanski. LZSS was described in article "Data compression via textual substitution" published in Journal of the ACM (1982, pp. 928–951). LZSS is a dictionary encoding technique. It attempts to replace a string of symbols with a reference to a dictionary location of the same string. The main difference between LZ77 and LZSS is that in LZ77 the dictionary reference could actually be longer than the string it was replacing. In LZSS, such references...
 
that's what I'm reading now
 
5:27 PM
c
b
g
 
very interesting ;) cbg idjaw
 
cbg
b b
gbc
 
5:44 PM
def shiftaround(x):
	l = list(x)
	for i in range(0,len(x)):
		l.append(l.pop(0))
		print ''.join(l)

shiftaround("cbg")
 
@MarkoMackic SyntaxError: Missing parentheses in call to 'print'
 
I was having py2 currently in console
 
sample(c("c", "b", "g"), 3, replace = FALSE) :P
 
isn't that just something like ''.join(x[::-1])?
except much slower because pop(0)
oh, no, it prints it ineach loop
you're doing cyclic permutations
how about a deque?
 
yeah, shifting chars :) a deque would be much more performant, this was the first I thought of, just for "cbg" permutations funn
 
5:51 PM
deque.rotate will do this for you
 
You don't need a deque. Just use slicing on a new string that equals x * 2.
 
Well a deque is obvious, so there shouldn't be any other obvious solutions:P
 
def string_shifts(x):
    l = len(x)
    x += x
    for i in range(l):
        print(x[i:i+l])
 
guys what do you think of this. That if line is really bugging me. But the alternative one liner I came up with calls strip() twice which I equally don't like. Anyone have any suggestions on how I can make this prettier?
with open(filename) as f:
    for line in f.read().splitlines():
        if line:
            jobs.add(line)
 
5:59 PM
@PM2Ring yeah I got that
 
actaully you can pretty much pick any close reason, even after translation that is too broad/no mcve etc :D
 

« first day (2090 days earlier)      last day (2858 days later) »