« first day (1513 days earlier)      last day (3451 days later) » 

12:22 AM
So I just found out about Python's StringIO module. Pretty happy about that; looks like just the thing I wanted.
 
There's also BytesIO if you're working with bytes instead of characters.
 
12:37 AM
^^ read as using python3
 
Yes, Python 3 is the way to go now.
We're going to be switching our blog over to Python 3 shortly. I've already got a test suite that passes for both Py2 and Py3 currently.
All of our dependencies are compatible with Python 3 and I've done some local testing in Python 3 and everything seems to work.
The only thing left is to rebuild the environment in production and test it out.
...which I just haven't gotten around to yet.
 
12:53 AM
speaking of python 3.. In my project I/we originally intended to go with Python 3 but found it wasn't included by default in 12.04 and for various reasons we don't want to pull in any other dependencies so.. :/
 
Uh-oh.
Prepare for heartache. String literals are bytes by default in Python 2.
Unicode is going to be quite tricky. Still possible, but tricky.
@Seth Must 12.04 be supported?
I realize it's still LTS, but... couldn't the fact that it's kind of old be reason enough to make 12.04 users install python3?
 
@NathanOsman I know, scares me when I think about it :/
 
Hmm... at the very least, please use something like six to make things palatable.
six would simply be included in the source, so no extra dependency there.
 
@NathanOsman I doubt it... we've kind of talked about this before, we want to get it included in the liveCD.
@NathanOsman I'll have to look into it, thanks.
 
It won't be included in the 12.04 LiveCD :P
 
12:59 AM
six?
 
It's a drop-in Python file that maps certain types based on whether it's run on Py2 or Py3.
That way, your code can run on both Py2 and Py3 without modification.
 
well as long as it is small I don't mind bundling it. We're already planning on bundling another library.
 
For example, six.b("abcdefgh...") will always return a bytes regardless of whether the interpreter is Py2 or Py3.
If you just did "abcdefgh...", you'd get different types in Py2 and Py3.
 
nice.
 
 
1 hour later…
2:14 AM
@hbdgaf I think you were right about that $100 keyboard being stolen.
the guy best-offer sold it for $90
 
2:35 AM
it happens
 
3:26 AM
@hbdgaf If you had an app with a Gtk frontend and a cli backend how would you tell whether the Gtk frontend was running vs just the cli backend? I have an app that needs to do some things differently depending on whether the gui is running or not. I'm trying to keep the gui separate from as much of the actual work/logic as possible so I can use it elsewhere too.
I guess you might be able to check if certain Gtk specific things are defined or not.
 
Why not have a gui flag that you pass to the backend and set it to True when invoked by the GUI and otherwise have it default to False.
 
faceplam. What an incredibly simple solution I didn't even think of.
By far the simplest and most accurate way I guess.
Brilliant @NathanOsman.
 
No problem :)
 
 
1 hour later…
4:40 AM
I have a question which is not really about how ubuntu works but is tangentially connected and might be seen as a bit provocative is this a place I can ask it?
 
Here in chat? Sure.
 
Yes here as opposed to the main site.
Do a lot of people experience how shall I put it? Rage? When getting used to using linux?
This might just be me.
 
Certainly not rage, although sometimes frustration.
It does have a steep learning curve.
Once you spend more and more time playing around in it, you'll begin to get used to things.
It took me quite a while.
 
I've been at it for quite a while now off and on and I don't really like the kind of person I am when I try to use it.
 
What areas in particular are you having trouble with?
 
4:53 AM
Main problems:

Lack of plain English explanations of how to write and use scripts, editors and multiple languages simultaneously.

Inability to easily find commands.

Incredibly unhelpful error messages.
I'm also trying to do things in ubuntu that I would struggle to manage in more familiar environments which definitely is not helping.
None of the features and settings are easy to find. I just spent an hour an a half to find out the .bash_profile and .profile are sort of maybe the same thing.
Meh I could rant about it but what would be the point. Let's just say I am concerned that continuing to use it may adversely affect my mental health.
 
Well, I certainly don't recommend doing something that would jeopardize your health.
A lot of Linux tools and commands are like swiss-army knives. They do a lot of things (and can be painful if misused) which can sometimes overwhelm someone who isn't used to the tool.
 
Yes, I think that the most sensible thing for me to do is to try somehow to get through this to the end of my PhD and then run for the hills away from Linux and away academia.
Just got to hang in there and try to put my mind back together afterwards somewhere a bit less frantic.
 
5:12 AM
And of course, we're here if you have any questions.
 
Unfortunately I often can't express the problems I am experiencing clearly enough to get too much out of this site. Didn't take long for me to experience tumbleweed.
I try but frankly I don't think that I get it enough to actually take advantage.
Mayber I should try to post about that in meta?
 
5:35 AM
0
Q: What does dropped packets mean in ifconfig -a?

user2809564I have my Ubuntu machine running in production in which we have our app server running. My app server connects to cassandra and get the data from the database. When I do ifconfig -a on my ubuntu machine, I am seeing lot of dropped packets - davvid@machineX:~$ ifconfig -a bond0 Link encap:E...

 
 
3 hours later…
8:40 AM
@karel lol, already got accepted: superuser.com/a/842614/152045 xD
That was fast!
 
@Seth How I would do it depends. One way would be dropping a state file filled with json somewhere when the app launches or using a sock file to communicate with the running instance. Then you'ld (socket example) have to use an event loop in both the GUI and CLI though. Not just a linear CLI.
I like Nathan's option better though.
 
9:06 AM
@blade19899 :) I also noticed that there is a new tag under that question that doesn't have a tag excerpt written yet. All registered users can submit edits for tag wikis.
 
@karel Done.
I'm also removing the bit about the ppa on superuser, it seems irrelevant :/
Slightly improved, but still with the PPA bit in it: superuser.com/a/842614/152045
PPA BIT, BE GONE!
 
9:22 AM
@HackToHell, is your semester over?
 
9:35 AM
@blade19899 I wonder if the new tag will get culled by tag cleanup. I hope not, because I expect new questions with this tag will appear in the course of time as Firefox Developer Edition gets updated to newer versions.
 
@karel I don't think it will get cleaned up on Ask Ubuntu. Not sure about the tag on superuser.
 
@jokerdino Gets over on December 6 :/
I totally forgot about Kanban app :/
 
0
Q: number of open files configuration not operational

JeromeAddressing an error of Too many open files I was attempting to follow the suggestions here Although /etc/sysctl.conf fs.file-max = 70000 vm.swappiness = 10 and /etc/security/limits.conf nginx soft nofile 10000 nginx hard nofile 30000 following changes to the sysctl com...

 
 
4 hours later…
1:21 PM
I can't find my forgot button on Firefox. I have the latest Firefox!
forget*
 
Dan
which forget button? :O
 
@blade19899 You know you can edit chat messages for a few minutes right? Just hover over the message, click on the down arrow and then click on "edit".
 
Within 3 minutes. And 3 min already passed ;)
Anybody knows some js, jquery?
 
Dan
1:41 PM
@blade19899 Meh Ctrl+Shift+Delete is still easier :P
But I do have the button on my Firefox 34.0
 
Ow yeah, i forgot about that
33.1.1
 
@Dan What does that do?
 
Dan
@terdon Shortcut for clearing browser history
works on chrome too
 
@Dan All of it?
 
@terdon No just the option box
 
Dan
1:43 PM
no, you get a dialog, you choose what you want to clear
 
You can there choose what, how, when, Goku, how much
 
@Dan It doesn't work for me on 33.0
 
@terdon Are you on Mac, Windows, Linux?
 
@blade19899 Take a wild guess :)
 
@terdon Ubuntu :)
 
1:46 PM
No, actually, an LMDE morphed into Debian testing but Linux anyway :)
 
lol
The longest spam comment ever, undetected - and unreported - since 2010: Ubuntu emoticons | Ubuntu Design Blog I already reported!
 
jrg
> I like to work on Personal home pages rather than .NET, though .NET provides the ability of drag and drop elements, but I love Personal home pages much.
LOLLLLL
 
@jrg What does that even mean?
 
jrg
@terdon it's a spam comment from the link @blade19899 has above
 
jrg
1:57 PM
@blade19899 yeah, due to Ubuntu's agreement with google for other things.
 
large paragraphs makes me sea sick
 
Holy verbiage Batman!
Looks like the bot spewed out their entire collection of set phrases.
 
2:44 PM
Oh that's common
Akmiset should have caught that.
 
 
1 hour later…
3:45 PM
This really needs more upvotes. I can't believe the top voted answer is to blindly delete the lock file:
28
A: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

Faheem MithaI see pretty much all the answers recommend deleting the lock. I don't recommend doing that as a first measure; maybe if there is no alternative. The lock is placed when an apt process is running, and is removed when the process completes. If there is a lock with no apparent process running, this...

 
Hello everyone, it's my first time here, so sorry for any problems. I have one problem here in Ubuntu, that another user told me to post it in the chat here (I updated the question): askubuntu.com/questions/547357/…
 
@Nori-chan Hi, what makes you think there is a problem? First of all, confirm that there is really a blank line there by running history | grep -P '^\d+$'.
I just did that and saw that I have some blanks too. I'm thinking about how that could have happened but it is nothing to worry about, you can do anything you like to the .bash_history file and that won't harm the system. It is just a log.
Hmm, in my case it seems to have happened with commands I copy pasted so presumably I also pasted newlines but I can't repeat this at the moment.
 
@terdon I know that it's just a log. But I'm really scared of the possibility (if that's possible) of someone being able to hack into my PC (it happened with me in the past). Both gedit and the Log viewer shows some blank lines.
But I will try the command.
 
@Nori-chan No, no, this is no indication of hacking, don't worry about that.
The command will just print the empty lines, only to make sure they are there.
 
@terdon Your command doesn't worked here. What should have happened with the command?
 
4:00 PM
@Nori-chan It should show you if there are blank lines in your history. What exactly did you run?
 
@terdon history | grep -P '^\d+$'
 
OK, then you don't actually have any blank lines in your history.
I found how it can happen though.
Just hit space a few times and then hit enter
That will appear as a blank line in your history
@Nori-chan Sorry, wrong command, it should be history | grep -P '^\d+\s*$'
 
@terdon Why gedit and the log viewer shows the blank lines, and the command don't show?
OK, will try that now.
 
Because I gave you the wrong command :)
 
@terdon Nothing happened with the command. I used history | grep -P '^\d+\s*$'
Also, I tried to hit space and press enter, but the blank line didn't appeared in the bash history (viewing it on Log Viewer)
 
4:08 PM
@Nori-chan I don't know what Log Viewer is. Some kind of graphical thing? I have no idea what it shows. Follow the steps in my answer. Hit space a few times, say 5 for example, then run history. It should look like this:
   73  ls
   74
   75  history
The blank line is because I hit enter on a line containing spaces.
 
But, since this is no indication of hacking, I'm relieved.
@terdon Sorry. Log viewer = System Log (just added the bash history)
 
@Nori-chan I don't use the graphical tools much, I have no idea what that is.
 
@terdon Just tried that. But I still don't get blank lines
 
Now, what is interesting is why the grep command fails for you. Ah! I know, you have too few comands. Try this instead:
history | grep -P '^\s*\d+\s*$'
That should show you the blank lines
 
@terdon Again, nothing returned.
Also, I have classes right now. I will come back later.
 
4:11 PM
Strange. Please hit space a few times, then enter, then run history | tail and post the output here.
 
Thank you a lot for the help!
ok
1663 exit
1664 history | grep -P '^\d+$'
1665 exit
1666 history | grep -P '^\d+\s*$'
1667 exit
1668 history
1669 ls
1670 history
1671 history | grep '^\s*\d+\s*$'
1672 history | tail
Strange right?
I still ahve some time here, What do you think it is? A bug?
have*
 
@Nori-chan No, you haven't run the blank command. Where should it have been? You need to hit space a few times and then hit enter
 
@terdon Ok then, I will try again
1665 exit
1666 history | grep -P '^\d+\s*$'
1667 exit
1668 history
1669 ls
1670 history
1671 history | grep '^\s*\d+\s*$'
1672 history | tail
1673 exit
1674 history | tail
Before typing the history | tail, I pressed 10 times space and then enter
 
You can just try copy/pasting this into your terminal directly:
echo foo

history | tail -n 3
No, that fails, the spaces are removed.
Grrr
 
Tried that. Returned foo and this
1675 exit
1676 echo foo
1677 history | tail -n 3
 
4:16 PM
Yes, that's cause the spaces are eaten by the chat.
Ah, I know, you probably have HISTCONTROL=ignorespace set. Please run this command and paste the output:
grep HISTCONTROL ~/.bashrc ~/.profile ~/.bash_profile 2> /dev/null
 
@terdon /home/nori/.bashrc:HISTCONTROL=ignoreboth
 
@Nori-chan OK, that explains it. That means that any lines that start with a space are not saved in the history. So, the blank lines you see were probably from before you set that.
Or, they are from a time when you used ssh or dropped to a tty to log in, ran an empty line and since .bashrc isn't read when you log in that way, the setting was ignored and the blank line was saved.
Why they're shown in gedit is weird. I suspect you either 1) are looking at .bash_history~ and not bash_history or that 2) you have a very long line ending in whitespace and gedit is wrapping it, making it look like an empty line.
 
4:33 PM
@terdon Well, I'm sure I'm looking at.bash_history, and strangely, no, I don't have a very long line editing.
But strangely, some blank lines are old and some of them are new.
And I have no idea how I disabled those blank lines
 
@Nori-chan Ah, no, I just checked. OK, everything is normal.
So, when you have ignoreboth, the commands that start with space are logged in ~/.bash_history but they are not shown by the history command.
They should magically appear if you run this:
HISTCONTROL= history | grep -P '^\s*\d+\s*$'
 
@terdon Before doing that, just let me ask one thing: Is everything here behaving normal? Or is there anything that's strange?
 
Everything is 100% normal. The system is behaving as expected.
These are just the arcana of bash history management.
 
Perfect. That's really good. I will run the command and exit, because I have classes now. Thank you a lot for solving my problem.
Strange I used the command and tested it. I still can't see the blank lines.
 
5:06 PM
@Nori-chan That is one command, not two. It should all be run in a single line.
 
@terdon can't we edit the most upvoted answer and include this answer over there(with accredition)? Or is this kind of activity discouraged?
 
@terdon I used it in a single line, but no success
 
@astrob0t Not at all, it's actively encouraged actually. Go for it.
 
@terdon sure. :)
 
@Nori-chan Not sure what's going on then. Strange. In any case, this is really nothing to worry about, there is no reason to assume you've been hacked.
OK, it has something to do with when/how the cmmands are written to history. I also have to go now but the bottom line is don't worry, everything is fine.
 
5:14 PM
Ok them, thank you a lot.
 
I'm intrigued by this. I think I'll post a question and answer on U&L when I get to the bottom of it. I'll let you know.
 
Thank you.
 
5:40 PM
0
Q: Ubuntu user disappeared from machine

s g Unsolved mystery - I was given a coworker's Ubuntu 12.04.1 LTS machine and set up my own (sudo/admin) user on there from the command line. I switched to my user and confirmed everything was okay using the groups command and the /etc/passwd file looked great. After months of everything working per...

 
@KasiyA can you please explain the rejection of this edit. every answer is CC licensed.
 
@astrob0t Copying one answer, verbatim, into someone else's answer isn't really appropriate. Especially if you don't quote it (good job for attributing it though). I suggest you suggest a new edit with just a warning "try this other answer first".
3
 
@astrob0t ouch, yes, sorry. I didn't understand you meant to copy the answer directly. I thought you were suggesting adding the information to the accepted answer. Copying directly is a nono.
 
@Seth i was pretty reluctant to copy it verbatim at first, but it was pretty properly worded. So just left an attribution note. Thank you for the suggestion.
ok, just to confirm, is the CC license for posting new answers(built upon the existing answers) and not just editing/direct copy-pasting on existing ones?
 
6:04 PM
@Seth I may have overstepped my bounds here. On U&L we tend to approve of stuff that clearly improves the answer even if it changes the intent. Especially when this is an accepted answer which is just not the right way to do things. Doubly so when it's a post that is so often used as a master for dupes.
What's the AU policy on this?
 
6:14 PM
@astrob0t the reason was :
You edited the answer with copy pasted another answer from there.
 
6:28 PM
@Seth, @terdon got my question's answer over here -> meta.askubuntu.com/questions/8250/…
 
Hope this ok to post I got a rails project on ubuntu on virtual-box. rails server fails due to a mysql socket 2 error, turns out that mysql.sock and mysql.pid not exist, despite being being referance in my.cnf (it does not even look like the folder they should be in is there var/run/mysqld). (also, I am sing rubymine and rbenv only apreas in the RM terminal, not the real one, no idea if that is relevant)
 
@Btuman The Q itself should be on topic as long as the issue is on the mysql side and not in your rails code. Are you sure mysql is running by the way?
 
6:44 PM
I think the issue was that I had not realized that there was more to installing mysql2 then istalling the ruby gem
any direction in how to figure that out would be great
 
sudo apt-get install mysql-server mysql-client
That should both install it and start the service. Check with service mysql status.
 
thanks
does it matter where I run that line from
gtg will be bak later
 
7:10 PM
@terdon If you are referring to my reject reason that's just because there wasn't a better choice.. I really don't like the new reject reasons.
Pretty much all of the edits I've rejected since they were implemented didn't completely fit any of them..
@astrob0t I can't remember top of my head, but I believe the CC license allows you to copy the entire thing with attribution, yes. Just because you can doesn't mean you should though. Especially when both answers are on the same question.
 
@Seth No I was referring to this:
2 hours ago, by terdon
@astrob0t Not at all, it's actively encouraged actually. Go for it.
Which, understandably, suggested that astrob0t could copy the answer.
 
Copying another answer in verbatim is discouraged, yes. You do that on U&L?
 
7:29 PM
@Seth the intention here was to improve the answer by citing/adding someone else's answer, but it ended up being a blatant copy-paste. My bad.
 
@astrob0t You're fine, mistakes/misunderstandings happen :)
FWIW I went ahead and added some links so the warning is more specific.
 
@Seth that seems to be a better way. i would keep this in mind.
 
o/
 
 
2 hours later…
9:58 PM
only one more day of black-friday/thursday freight before i get to take a "my body is broken" day off. \o/
also, o/
 
10:15 PM
@Lucio - thought you might like to read this csoonline.com/article/2849944/malware-cybercrime/…
@Seth - any thoughts here
The solution seems to be adding a modprobe -r and modprobe hook to the pre-sleep/post-sleep hooks respectively.
 
@hbdgaf Most of it looks similar but the OP of the first questions says he can't even get wifi to work until he suspends/unsuspends, not really sure they are the exact same problem.
Sadly the first is more of something you would need to troubleshoot IRL :/
 
10:30 PM
Just a sec. My second comment is bouncing. Have to wait for timeout
@Seth There, see my interpretation of the problem.
I don't want to hammer it or anything. It's just something to think about on the radar.
 
Good comments @hbdgaf, looks like the OP doesn't quite know what it all means though (not your fault). I might take a jab at adding a bit more, or wait for one of our other wireless gurus to take a stab. Your comment was pretty helpful.
Dunno that there is any moderatorly action I can or should take quite yet though.
 
10:46 PM
There isn't. I just wanted that one to be floating around in "I'm aware of that" headspace. I'm not sure if the installation procedure was followed. So, I think I'll let that one sit. I think trying to nudge it along would probably get me irritated and trite, so things would get less constructive.
I'ld think if that installation procedure was followed 1+2 wouldn't be happening at all.
 
@hbdgaf I checked that, but his card isn't listed there.. I'm not familiar with broadcom cards (thankfully) so I don't know if that is purposeful and/or important, but it isn't listed..
 
Yeah, there's no specific "your card maps to this as the most functional driver" in there. Maybe something to ping Luis about.
 
good idea.
 
If I were him, I'ld try each driver in order. It may be he's just using the wrong broadcom driver.
 
hmm, doesn't look like he's been in chat yet. Maybe I'll leave a comment.
@hbdgaf That's possible as well. I'm hoping one of our wireless gurus will see it and step in. There are a couple of people around here who do nothing but answer wireless questions (or almost so).
 
10:54 PM
Hopefully someone that has that chipset laying around will, so they can do a "this is the driver that worked for me" addition to the canonical installation question and drop a "rinse repeat and update question" cycle.
 
yes, that would be good.
 
11:14 PM
Uh....
This'll be interesting
 
I wonder if it affects iceweasel?
 
Well, it won't affect Firefox shipping on Ubuntu, so thats good
 
@hbdgaf Does Iceweasel use Google by default?
Sounds a bit weird for something like Iceweasel.
 
I don't remember. I haven't used it in forever. Was just my kneejerk reaction.
 
@Seth ikr
 

« first day (1513 days earlier)      last day (3451 days later) »