425 reputation
312
bio website
location
age
visits member for 2 years, 6 months
seen 8 hours ago

8h
comment grep variable-length optional text
Yes, the attempt can be enjoyable as a thought exercise, though in the end, our goal as a programmer, as you have noted, must be efficiency.
9h
comment grep variable-length optional text
You make an excellent point. I was operating under the impression that a regex equivalent to the family would be the most elegant solution, but failed to appreciate that constructing the family as a set of string literals would be computationally much less expensive, and moreover that the difference in computational overhead between the two approaches would scale with the size of the file to be examined.
9h
comment grep variable-length optional text
Out of curiosity, do you know if it is possible to formulate the search in the language of regular expressions (i.e., can one construct a regex that equates to the family of search queries)? Or is the only solution to build the family of queries programmatically, as you have done?
9h
comment grep variable-length optional text
Oh, that's an interesting solution: constructing the entire list of valid sequences and submitting all of them to grep. I was thinking of building a regex that represented the valid list, but simply searching for each individually would work equally well. Thanks.
9h
comment grep variable-length optional text
The problem is that it would also return, for example, ^axyz, which is undesired.
10h
comment grep variable-length optional text
@steeldriver: This is because the preceding sequence is definite. For instance, I would not want to count ZKEJLCN as a valid result. If the file consists only of capital letters, then grep '^[A-Z]*KEJLCN' is equivalent to grep KEJLCN.
10h
comment grep variable-length optional text
I added a more detailed example. Please let me know if that clarifies the matter. Thanks.
Sep
19
comment recurrent loss of wireless connectivity
Thanks, unfortunately the access point is in a work environment, and I do not have control over it.
Sep
18
comment recurrent loss of wireless connectivity
Implementing these steps seems to help somewhat, but the connection still terminates periodically, requiring manual reactivation using the commands specified in the original post.
Sep
14
comment recurrent loss of wireless connectivity
Thanks for the information. I will try disabling 802.11N for a day or so to confirm that the network termination problem has resolved.
Nov
26
comment remotely query text file associated with an instance of vi
@donothingsuccessfully. Thanks for your suggestion. I was reading a little about screen after seeing it mentioned in other posts. Can it be applied retroactively to an existing process or must the process be initiated with screen in order to take advantage of this facility?
Nov
26
comment remotely query text file associated with an instance of vi
@JosephR. That is an interesting idea. So you can deliver commands to vi but the \n newline seems not to register.
Nov
26
comment remotely query text file associated with an instance of vi
@JosephR. Wonderful solution to the first half of my question. In my case, the /proc/<pid>/fd/ folder contains the symlinks 0, 1, 2, and 4. The first three point to /dev/pts/3 and the last one points to the swap file. Many thanks.
Aug
2
comment disabling mouse support in `vim` in a `gnome-terminal` environment
:) Yes, I use gnome 3 fallback mode because I can't stand their new OS X interface. But a lot of things that always worked in gnome 2 are not working for me, like custom keybindings and gconf-editor. What is your desktop environment of choice? I'm thinking of trying xfce or lxde. Thanks for your help.
Aug
2
comment disabling mouse support in `vim` in a `gnome-terminal` environment
Hi, good suggestion. I tried in xterm and had no problem with mouse activation. I could reproduce the problem by typing :set mouse=a in vim running in xterm (and reverse it by typing :set mouse=). Any idea how to troubleshoot the gnome-terminal glitch? Should I start a new thread? Thanks.
Aug
2
comment mutt: rename IMAP folder
When I was searching the internet for how to do this, I came across a post that said that one could use the r key, but I was confused because r is bound to reply by default. Now, it is clear that this applies only in the context of the list of folders. When I rename a folder by pressing r, I receive the following prompt: Rename mailbox 'X' to: [C^[[C^[[C^[[C^[[ -- there are precisely 36 repeats of [[C^, which I must delete before typing the name. Do you know why this string of characters appears and how I can avoid it besides deleting it each time I choose to rename a folder? Thanks.
Aug
2
comment disabling mouse support in `vim` in a `gnome-terminal` environment
Hi, thanks for the suggestion. I added this to my .vimrc file and tried executing it interactively (:set mouse=c), but neither had an effect in my case.
Aug
2
comment disabling mouse support in `vim` in a `gnome-terminal` environment
Also, if I type :set mouse= directly in vim, shouldn't this override any settings from config files? Why would direct execution of this statement within vim not disable mouse control?
Aug
2
comment disabling mouse support in `vim` in a `gnome-terminal` environment
My /etc/vim/vimrc file is pretty bare (runtime! debian.vim and a conditional if filereadable("/etc/vim/vimrc.local") ; source /etc/vim/vimrc.local; endif). The /etc/vim/vimrc.local file does not exist on my system. My ~/.vimrc file only has a few lines that I have added manually. An strace of vim reveals that it checks the following locations for config files: /usr/share/vim/vimrc, /etc/vim/vimrc.local (ENOENT), and /home/user/.vimrc. (Why do I receive the ENOENT error; doesn't the if statement prevent attempts to open this non-existent file?).
Aug
1
comment mutt: gmail IMAP unresponsive
PS: Is it a bad idea to leave mutt running on my computer and then later ssh into my computer from another terminal and launch another instance of mutt for temporary use?