 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 04/22/10 03:38, Warp wrote:
>> More specifically,
>> http://www.codeproject.com/kb/shell/ShellExtGuide8.aspx
>
> So in order to get Windows Explorer to show exact byte counts, I would have
> to download and install Visual Studio, get it to work, write an extension
> manually, install it, and keep it with me in an USB stick so that I can
> install it in a friend's computer if I ever want to see the byte sizes there
> as well?
Or, you know, just use a different file explorer program.
Somehow I've lost the point of this whole discussion. Who said you have
to use just Windows Explorer?
> Konqueror uses thousands-separators in file sizes.
And I'm sure there exists software that runs on Windows that shows
exact file sizes.
I sense an apples to oranges comparison going on here. Why are you
comparing Konqueror with Windows Explorer, anyway?
--
Sign on ZIP file : CAUTION! Contents under pressure!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 22 Apr 2010 09:10:03 +0100, Invisible wrote:
> (I'm still having trouble thinking up a use-case for that. About the
> only thing I can think of is trying to find out which header file
> defines a particular symbol or something.)
Header file definitions, sure.
Some of the things I grep for regularly:
Which file contains contract information for a particular partner?
Which of the chat log files I have contains a reference to a particular
website, user ID, password, or discussion?
Which of the configuration files for apache contain information about a
particular virtual host?
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel wrote:
> Ah ok. And how do I do that? I'll find out next week after some deadlines.
http://articles.techrepublic.com.com/5100-10878_11-6163793.html
GIYF, once you have a basic idea of what the answer looks like. :-)
In particular, peek at Figure G.
If that doesn't help (and you might have to tell it to reindex stuff), then
there's something out there somewhere that provides a "this is really a text
file" interface for an arbitrary list of extensions.
http://www.bench3.com/2009/06/customize-search-feature-in-windows.html
explains that a bit more, showing you where you'll see it. See if that
helps. And again, remember that unless you wait for the rebuild of the
index, it won't necessarily show up right away.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 22 Apr 2010 09:12:03 +0100, Invisible wrote:
>>> I throught that grep is an overly-complicated way of searching for the
>>> location of a string within one particular file? (I usually just use
>>> my text editor's "search" function.)
>>
>> Does your editor support regular expressions? Most only support a
>> simple substring search.
>
> Is there some advantage to supporting regular expressions?
Yes, because if you don't know the exact string you're looking for, you
can specify a more general string that is likely to be found.
> I mean, I realise that hypothetically a regex can find things that a
> normal search can't. But in reality, when are you *ever* going to use
> that? What would it be useful for?
I use it several times a week myself, reasons include chat log files in
my IM client where I might need to find a conversation I've had in the
past about something. I recently was trying to remember the name of an
internal website, but I couldn't remember who I had talked to about it or
the website name. I was able to use grep to find what I needed in a
matter of seconds without searching (checks - "find -type f | wc -l" -
8694 chat log files across all the different IM protocols I use).
Doing that by hand would be very tedious and would take days, and even
then, I might not find what I was looking for.
>> As Warp said, you also can traverse a directory structure with grep to
>> find the file(s) that have the string in them.
>
> I didn't know that. I thought grep was just for searching within one
> file.
If I tell you the 'net is wonderful resource for information, what will
you say in response? ;-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Orchid XP v8 wrote:
>> With an extension? Or natively? I don't recall seeing anything about
>> it in the docs. (I did find DDE, however. And registry access.)
>
> That said, it's in ActiveState's teapot, so in a sense it's "native" and
> "comes with Tcl".
OK, fair enough. I just didn't see anything about it while reading the
FreeWrap documentation.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 22 Apr 2010 09:06:38 +0100, Invisible wrote:
>>> Now, in fairness,
>>> as far as I can tell Windoze can't do this *at all*. But it was pretty
>>> hard to do from Linux either.
>>
>> Windows = Internet Connection Sharing Linux = at least with openSUSE
>> 11.2, YaST -> Firewall -> Masquerading. Two NICs need to be configured
>> and running. You can even set port forwarding there.
>
> Interesting. I thought ICS only works for dialup modems?
Apparently not. Dunno the current state, as I don't use Windows...
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Nonsense. Every programming language and every scripting language
>>> supports COM that I've seen.
>>
>> I've yet to find a language that can do it.
>
> I've named half a dozen. What languages do you use?
I just named a bunch of 'em. ;-)
>>> Didn't you tell me Haskell has a COM interface?
>>
>> Yes, but it doesn't compile on Windows.
>
> Are you sure it's "it doesn't compile" and not "I don't know how to
> compile it"?
Well, I asked about it and got stoney silence. From past experience, the
solution probably begins with "install a Unix emulator..."
>>> I know Tcl does.
>>
>> With an extension? Or natively? I don't recall seeing anything about
>> it in the docs. (I did find DDE, however. And registry access.)
>
> http://www.vex.net/~cthuang/tcom/
>
> Extensions *are* native. Tcl is a language for writing extensions in.
I have a vague recollection of seeing some Tcl extension that did
something I wanted, and being unable to actually make it work. I won't
beat on about that too much though since I no longer remember enough
details.
>>> What language have you used on Windows that does *not* do COM?
>>
>> Java, Smalltalk, Eiffel, JavaScript, Tcl, Haskell, POV-Ray (well,
>> duh!) As far as I know, none of them support it.
>
> In other words, you didn't take the time to google
> java "com interface"
> smalltalk "com interface"
> eiffel "com interface"
> tcl "com interface"
> before you said you have no languages that support it.
Ah, so they added it to Java? (I'm not sure I even want to know how they
made that platform-neutral...) I haven't used Java for a while, but when
last I did it was legendary that the APIs undergo radical changes with
every minor point release.
For Smalltalk, I'm going to put my foot down and assert that the
implementation that *I* have doesn't support COM.
And Eiffel... yeah, well, I don't use Eiffel any more. And Tcl we've
talked about elsewhere.
> Javascript per se doesn't, but jscript does, which is pretty much the
> same thing with a different name.
I'm clearly going to have to investigate this one... It might actually
be useful.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"andrel" <byt### [at] gmail com> a écrit dans le message de groupe de
discussion : 4BD### [at] gmail com...
> Matlab files with extension .m in XP
> no luck but your google skills are way beyond mine anyway.
>
> Do you have an idea why it would not find those or look into them anyway?
> Because if I had a theory about that I could try to find a cure.
Darren gave you the answer, but here's the magic google search:
http://www.google.com/search?q=xp+search+matlab+files
The right answer is the first one.
I've largely stopped wondering about oddities in Windows (or Office or any
software with a big following). I just google for answers: it's faster and
usually very smart people have found workarounds.
G.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22/04/2010 9:02 PM, Jim Henderson wrote:
> Apparently not. Dunno the current state, as I don't use Windows...
>
> Jim
Your lighting bill must be huge ;-)
--
Best Regards,
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22/04/2010 8:49 PM, Neeum Zawan wrote:
> Somehow I've lost the point of this whole discussion. Who said you have
> to use just Windows Explorer?
The god of capitalism? Hmm! :-)
--
Best Regards,
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22-4-2010 21:54, Darren New wrote:
> andrel wrote:
>> Ah ok. And how do I do that? I'll find out next week after some
>> deadlines.
>
> http://articles.techrepublic.com.com/5100-10878_11-6163793.html
>
> GIYF, once you have a basic idea of what the answer looks like. :-)
>
> In particular, peek at Figure G.
>
> If that doesn't help (and you might have to tell it to reindex stuff),
> then there's something out there somewhere that provides a "this is
> really a text file" interface for an arbitrary list of extensions.
>
> http://www.bench3.com/2009/06/customize-search-feature-in-windows.html
> explains that a bit more, showing you where you'll see it. See if that
> helps. And again, remember that unless you wait for the rebuild of the
> index, it won't necessarily show up right away.
>
Although this is for vista, I get the idea.
Basically what happens is that while I still think a file is a sequence
of bytes my OS suddenly has started thinking about the contents and
meaning of my files. I wasn't expecting that, so I was dumbfounded that
the utilities that used to work suddenly didn't behave as before. They
probably have advertised this increase in user friendliness extensively
and I have not paid attention. Conclusion: it is all my fault.
BTW is there a switch to tell the system that it can keep the PnP, the
USB support and the filesystems but otherwise stop trying to 'help' me
and behave like a simple windows 95 machine?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22-4-2010 22:23, Gilles Tran wrote:
>
> "andrel" <byt### [at] gmail com> a écrit dans le message de groupe de
> discussion : 4BD### [at] gmail com...
>> Matlab files with extension .m in XP
>> no luck but your google skills are way beyond mine anyway.
>>
>> Do you have an idea why it would not find those or look into them
>> anyway? Because if I had a theory about that I could try to find a cure.
>
> Darren gave you the answer, but here's the magic google search:
> http://www.google.com/search?q=xp+search+matlab+files
when you do it it always sounds so simple :(
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> I have a vague recollection of seeing some Tcl extension that did
> something I wanted, and being unable to actually make it work.
Yet, oddly enough, I've been using Tcl to invoke and serve COM in production
systems for ... oh, six or seven years?
> Ah, so they added it to Java?
Oddly enough, that too would be answered by putting
java "COM interface"
into google and clicking "I feel lucky."
> For Smalltalk, I'm going to put my foot down and assert that the
> implementation that *I* have doesn't support COM.
Which implementation do you use?
Plus, you probably use Word and Excel, and they both support COM too.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan <m.n### [at] ieee org> wrote:
> I sense an apples to oranges comparison going on here. Why are you
> comparing Konqueror with Windows Explorer, anyway?
Because one is the default file manager in OpenSUSE and the other is the
default file manager in Windows.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Apr 2010 21:26:18 +0200, Darren New <dne### [at] san rr com> wrote:
> Nekar Xenos wrote:
>> I love tabbed browsing. Then I have more space on the taskbar for all
>> my other windows.
>
> I put the task bar on the side. I can probably put 40 tabs on there
> before it gets close to full.
>
I actually did that at one stage. But it was on a normal CRT monitor back
then and everybody else complained that they couldn't find anything... ;)
--
-Nekar Xenos-
"The spoon is not real"
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> I have a vague recollection of seeing some Tcl extension that did
>> something I wanted, and being unable to actually make it work.
>
> Yet, oddly enough, I've been using Tcl to invoke and serve COM in
> production systems for ... oh, six or seven years?
Yeah, well, I had noticed that you seem to know far more about COM than
I do. (To me, "COM" is "that thing which apparently powers Windows but
that I can't actually get near".)
>> For Smalltalk, I'm going to put my foot down and assert that the
>> implementation that *I* have doesn't support COM.
>
> Which implementation do you use?
Smalltalk VisualWorks. I *think* it was v3.0...
> Plus, you probably use Word and Excel, and they both support COM too.
You mean VBA supports COM?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Neeum Zawan <m.n### [at] ieee org> wrote:
>> I sense an apples to oranges comparison going on here. Why are you
>> comparing Konqueror with Windows Explorer, anyway?
>
> Because one is the default file manager in OpenSUSE and the other is the
> default file manager in Windows.
One is *a* default file manager in OpenSUSE. :-)
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 22 Apr 2010 21:28:57 +0100, Stephen wrote:
> On 22/04/2010 9:02 PM, Jim Henderson wrote:
>
>> Apparently not. Dunno the current state, as I don't use Windows...
>>
>> Jim
>
> Your lighting bill must be huge ;-)
:P
Not so much, though, I prefer the darkness generally. ;-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Yeah, well, I had noticed that you seem to know far more about COM than
> I do.
Not *that* much. Maybe a half a day's worth of learning?
>> Which implementation do you use?
> Smalltalk VisualWorks. I *think* it was v3.0...
http://www.cincomsmalltalk.com/documentation/current/ReleaseNotes7.5.pdf
They were up to a version that supports it (7.5) five years ago. You were
working with V3.0. Perhaps you were using a pre-COM version that wouldn't
run under Win98 or something?
>> Plus, you probably use Word and Excel, and they both support COM too.
> You mean VBA supports COM?
How do you think VBA talks to the application? Of course it supports COM.
That's pretty much *all* it supports. It doesn't really do anything on its own.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote:
> I actually did that at one stage. But it was on a normal CRT monitor
> back then and everybody else complained that they couldn't find
> anything... ;)
Why were they logged into your account? :-)
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 22 Apr 2010 14:28:38 -0700, Darren New wrote:
> Warp wrote:
>> Neeum Zawan <m.n### [at] ieee org> wrote:
>>> I sense an apples to oranges comparison going on here. Why are
>>> you
>>> comparing Konqueror with Windows Explorer, anyway?
>>
>> Because one is the default file manager in OpenSUSE and the other is
>> the
>> default file manager in Windows.
>
> One is *a* default file manager in OpenSUSE. :-)
And not even the most recent - Dolphin is the default in KDE4 on 11.2,
IIRC. I don't know for sure, though, because Nautilus is the default in
GNOME (which is what I use).
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 04/22/10 13:44, Warp wrote:
> Neeum Zawan <m.n### [at] ieee org> wrote:
>> I sense an apples to oranges comparison going on here. Why are you
>> comparing Konqueror with Windows Explorer, anyway?
>
> Because one is the default file manager in OpenSUSE and the other is the
> default file manager in Windows.
So why compare with Linux? You're comparing with OpenSUSE.
--
Isn't it a bit unnerving that doctors call what they do practice?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22/04/2010 10:32 PM, Jim Henderson wrote:
> On Thu, 22 Apr 2010 21:28:57 +0100, Stephen wrote:
>
>> On 22/04/2010 9:02 PM, Jim Henderson wrote:
>>
>>> Apparently not. Dunno the current state, as I don't use Windows...
>>>
>>> Jim
>>
>> Your lighting bill must be huge ;-)
>
> :P
>
> Not so much, though, I prefer the darkness generally. ;-)
>
Have you checked your reflection in a mirror, lately?
--
Best Regards,
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Is there some advantage to supporting regular expressions?
>
> Yes, because if you don't know the exact string you're looking for, you
> can specify a more general string that is likely to be found.
Surely this almost never actually works though?
> I use it several times a week myself, reasons include chat log files in
> my IM client where I might need to find a conversation I've had in the
> past about something. I recently was trying to remember the name of an
> internal website, but I couldn't remember who I had talked to about it or
> the website name. I was able to use grep to find what I needed in a
> matter of seconds without searching (checks - "find -type f | wc -l" -
> 8694 chat log files across all the different IM protocols I use).
>
> Doing that by hand would be very tedious and would take days, and even
> then, I might not find what I was looking for.
As I say, not the kind of thing I ever need to do. (Although
occasionally I wish it was possible to search this newsgroup...)
>>> As Warp said, you also can traverse a directory structure with grep to
>>> find the file(s) that have the string in them.
>> I didn't know that. I thought grep was just for searching within one
>> file.
>
> If I tell you the 'net is wonderful resource for information, what will
> you say in response? ;-)
Suffice it to say that since I don't need grep, I hadn't deeply
researched its capabilities. (I only recently discovered that it's a
search tool, for example.)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Yeah, well, I had noticed that you seem to know far more about COM
>> than I do.
>
> Not *that* much. Maybe a half a day's worth of learning?
Heh. I've spent somewhat more than half a day reading about it. What
I'll probably never do is actually use it...
>>> Which implementation do you use?
>> Smalltalk VisualWorks. I *think* it was v3.0...
>
> http://www.cincomsmalltalk.com/documentation/current/ReleaseNotes7.5.pdf
>
> They were up to a version that supports it (7.5) five years ago. You
> were working with V3.0. Perhaps you were using a pre-COM version that
> wouldn't run under Win98 or something?
No, we were running it under Windows 98. I guess the release we had just
didn't have COM support implemented yet. (Remember that Smalltalk is
basically its own little world. Talking to stuff outside probably isn't
a high priority.)
I recall having a look at v5 (I think) at some point, and while they'd
added lots of nice features, they made the system too complicated. I
didn't like it, so I went back to v3.
>>> Plus, you probably use Word and Excel, and they both support COM too.
>> You mean VBA supports COM?
>
> How do you think VBA talks to the application? Of course it supports
> COM. That's pretty much *all* it supports. It doesn't really do anything
> on its own.
Well, I guess that makes sense.
On the other hand, VBA doesn't seem to require you to memorise 20-digit
GUIDs or interface index numbers or any of the other stuff that the COM
documentation seems to indicate is necessary, so...?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan <m.n### [at] ieee org> wrote:
> So why compare with Linux? You're comparing with OpenSUSE.
OpenSUSE is the only distro deserving of a mention... ;)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 04/23/10 04:00, Warp wrote:
> Neeum Zawan <m.n### [at] ieee org> wrote:
>> So why compare with Linux? You're comparing with OpenSUSE.
>
> OpenSUSE is the only distro deserving of a mention... ;)
This means WAR!
--
Every hard drive I've ever bought has been larger than all my previous
hard drives combined. And this is without even trying.
--Seen on Slashdot.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> OpenSUSE is the only distro deserving of a mention... ;)
>
> This means WAR!
First there was Emacs vs Vi.
Then there was Windows vs Linux.
Then came AMD vs Intel.
And now we must have the War of the Distros. My god... it'll be terrifying!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> On the other hand, VBA doesn't seem to require you to memorise 20-digit
> GUIDs or interface index numbers or any of the other stuff that the COM
> documentation seems to indicate is necessary, so...?
I'm not sure what the question is. What do you think CreateObject does?
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> OpenSUSE is the only distro deserving of a mention... ;)
>
It's not often that I agree with you, but you're right :-)
John
--
Cogito sum,|| wbu### [at] tznvy pbz (rot'ed) || GPG Key Fingerprint:
ergo sum, || These opinions are mine alone, || 0D9BCF4CF1B71CA2F5F7
cogito || others can find their own || BFBBCBC34EDEAEFCE453
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Invisible wrote:
>> On the other hand, VBA doesn't seem to require you to memorise
>> 20-digit GUIDs or interface index numbers or any of the other stuff
>> that the COM documentation seems to indicate is necessary, so...?
>
> I'm not sure what the question is. What do you think CreateObject does?
What's CreateObject?
All I know is that I've never seen any VBA code with 20-digit GUIDs in
it. And I've never seen it in documentation either. It just pretends
that you're manipulating objects.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 23 Apr 2010 06:26:24 +0100, Stephen wrote:
>> Not so much, though, I prefer the darkness generally. ;-)
>>
>>
> Have you checked your reflection in a mirror, lately?
It's too dark for mirrors. ;-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 23 Apr 2010 09:04:37 +0100, Invisible wrote:
>>> Is there some advantage to supporting regular expressions?
>>
>> Yes, because if you don't know the exact string you're looking for, you
>> can specify a more general string that is likely to be found.
>
> Surely this almost never actually works though?
Obviously I'd prefer to spend my time doing something that "almost never
actually works", right? (IOW, the fact that I do in fact do this should
demonstrate to you that it *does* actually work more often than not,
because I'm not likely to waste my time doing something that is unlikely
to work).
>> Doing that by hand would be very tedious and would take days, and even
>> then, I might not find what I was looking for.
>
> As I say, not the kind of thing I ever need to do. (Although
> occasionally I wish it was possible to search this newsgroup...)
That's actually something I do use it for as well - I've been known to
scrape newsgroups with a perl script, dump the contents, and then use
grep to parse the output file to find a message I was looking for based
on something in the message text.
>>>> As Warp said, you also can traverse a directory structure with grep
>>>> to find the file(s) that have the string in them.
>>> I didn't know that. I thought grep was just for searching within one
>>> file.
>>
>> If I tell you the 'net is wonderful resource for information, what will
>> you say in response? ;-)
>
> Suffice it to say that since I don't need grep, I hadn't deeply
> researched its capabilities. (I only recently discovered that it's a
> search tool, for example.)
Well, perhaps you would benefit from using it (perhaps not), but just
because you weren't aware of its capabilities, you never considered it as
an option to accomplish a task. It's only natural that one wouldn't use
a tool that might be well suited for a task if one doesn't know about the
tool or fully understand its capabilities.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 23 Apr 2010 07:00:25 -0400, Warp wrote:
> Neeum Zawan <m.n### [at] ieee org> wrote:
>> So why compare with Linux? You're comparing with OpenSUSE.
>
> OpenSUSE is the only distro deserving of a mention... ;)
FTW! :-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Darren New wrote:
>> Invisible wrote:
>>> On the other hand, VBA doesn't seem to require you to memorise
>>> 20-digit GUIDs or interface index numbers or any of the other stuff
>>> that the COM documentation seems to indicate is necessary, so...?
>>
>> I'm not sure what the question is. What do you think CreateObject does?
>
> What's CreateObject?
It looks up names in the registry and translates them to 20-digit GUIDs.
It's like complaining you don't see IP addresses in hyperlinks, so the web
must not use IP.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> No, I mean... I thought grep can only search within a single file (as
> can any decent text editor). I didn't realise it can search multiple
> files.
>
> (I'm still having trouble thinking up a use-case for that. About the
> only thing I can think of is trying to find out which header file
> defines a particular symbol or something.)
Yesterday, the 'parted' tool was giving me a totally cryptic error message.
$ apt-get source parted
$ cd parted-2.2
$ grep -rn "error message here" .
-r makes search recursive, -n makes grep output line numbers next to the
filenames. Then I opened a text editor on the file and line number that grep
mentioned, and tried to figure out the code :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Invisible <voi### [at] dev null> wrote:
>> Um... why? Three lines of text doesn't take "minutes" to write. And
>> that's about all it takes to search a folder for a file matching a
>> condition. (Obviously, it depends on how complicated the condition is...)
>
> How long does it take you to write a program which does the same thing
> as this:
>
> fgrep '#include "header.hh"' *.cc
>
There could be more spaces.
grep '#include[[:space:]]\+"header.hh"' *.cc
How long would it take to write a program that can match that, taking into
account that there could be multiple spaces?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Warp wrote:
>> So what? I'm not interested in how much disk space the file is taking.
>
> But most other people are. Hence the default UI.
Default UI? There is no option to make it work in a different way. It's not
the default UI, it's the *only* UI.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible escreveu:
> Warp wrote:
>> Invisible <voi### [at] dev null> wrote:
>>> Mostly because even on a PC with hardware far in advance of what the
>>> Amiga has, Windows was *vastly* slower.
>>
>> Far in advance? 12MHz CPU (if you were rich), no hardware graphics
>> acceleration of any kind, 16 colors (again, if you were rich)... How is
>> that "far in advance of what the Amiga has"?
>
> Because the PCs at college had 133 MHz CPUs and 32 MB of RAM - multiple
> times the Amiga's 7 MHz CPU (admittedly of completely different design)
> and 2 MB of RAM. And yet, on such a machine, even something as simple as
> closing a window causes huge amounts of disk thrashing.
Something "as simple" is not as simple as it seems. Like, something as
simple as displaying lines of text on the screen could take a few
seconds on early mainframes and PCs...
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> On Thu, 22 Apr 2010 09:10:03 +0100, Invisible wrote:
>
>> (I'm still having trouble thinking up a use-case for that. About the
>> only thing I can think of is trying to find out which header file
>> defines a particular symbol or something.)
>
> Header file definitions, sure.
>
> Some of the things I grep for regularly:
>
> Which file contains contract information for a particular partner?
>
> Which of the chat log files I have contains a reference to a particular
> website, user ID, password, or discussion?
Which of the lines in this chat log contains a normal message, as opposed to
information like "Jim has joined #povray" or "Logfile started"?
I piped the result of that grep into 'sed' to extract only the username,
then sort | uniq -c | sort -n, and I got an ordered list of who talks the
most in the chatroom :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> 3. It really takes that much code just to do the same task as DIR /B C:\
> C:\FileList.txt?
Says the guy who would rather write his own program to do specific searches
than figure out grep :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> scott wrote:
>> Obviously it's just a simple example so you can see how it works.
>
> Wikipedia seems to indicate that WSH supports JavaScript. I wonder if I
> can get that to work...
var fso = new ActiveXObject("Scripting.FileSystemObject");
var sFolder = "C:\\tmp";
var newFile = fso.CreateTextFile(sFolder+"\\FileList.txt", true);
var folder = fso.GetFolder(sFolder);
var files = folder.Files;
// yes, enumerating COM collections really is this messy in Javascript
var filesEnum = new Enumerator(files);
for (; !filesEnum.atEnd(); filesEnum.moveNext()) {
var file = filesEnum.item();
newFile.WriteLine(file.Name);
}
newFile.Close();
WScript.Echo("Done!");
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 23 Apr 2010 18:03:30 -0300, Nicolas Alvarez wrote:
> Which of the lines in this chat log contains a normal message, as
> opposed to information like "Jim has joined #povray" or "Logfile
> started"?
>
> I piped the result of that grep into 'sed' to extract only the username,
> then sort | uniq -c | sort -n, and I got an ordered list of who talks
> the most in the chatroom :)
Yep, that would work too. :-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> Darren New wrote:
>> Warp wrote:
>>> So what? I'm not interested in how much disk space the file is taking.
>> But most other people are. Hence the default UI.
>
> Default UI? There is no option to make it work in a different way.
There's no option included in the software as it comes from the manufacturer
to make it work differently, no.
> It's not
> the default UI, it's the *only* UI.
"Default" means "unless you do something." :-)
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez <nic### [at] gmail com> wrote:
> > fgrep '#include "header.hh"' *.cc
> There could be more spaces.
> grep '#include[[:space:]]\+"header.hh"' *.cc
Well, since it's not possible to have two #-commands in the same line,
and having anything else between the #include and the file name is unlikely,
you could just as well do it line:
grep '#include.*"header.hh"' *.cc
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 23/04/2010 6:47 PM, Jim Henderson wrote:
> On Fri, 23 Apr 2010 06:26:24 +0100, Stephen wrote:
>
>>> Not so much, though, I prefer the darkness generally. ;-)
>>>
>>>
>> Have you checked your reflection in a mirror, lately?
>
> It's too dark for mirrors. ;-)
>
> Jim
LOL
--
Best Regards,
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> Yesterday, the 'parted' tool was giving me a totally cryptic error message.
>
> $ apt-get source parted
> $ cd parted-2.2
> $ grep -rn "error message here" .
>
> -r makes search recursive, -n makes grep output line numbers next to the
> filenames. Then I opened a text editor on the file and line number that grep
> mentioned, and tried to figure out the code :)
Isn't trying to figure out why an arbitrary piece of code doesn't work
formally equivilent to the Halting Problem? (With non-termination simply
being the most basic kind of program bug...)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> What's CreateObject?
>
> It looks up names in the registry and translates them to 20-digit GUIDs.
See, you definitely know far more about COM than I do. I wasn't even
aware that there *are* names associated with GUIDs...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> Invisible wrote:
>> 3. It really takes that much code just to do the same task as DIR /B C:\
>> C:\FileList.txt?
>
> Says the guy who would rather write his own program to do specific searches
> than figure out grep :)
Or rather, I'd rather write my own program than use grep for a *complex*
search. (E.g., find anything that's a valid XML fragment.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> Or rather, I'd rather write my own program than use grep for a *complex*
> search. (E.g., find anything that's a valid XML fragment.)
Don't start making unfair comparisons. 'grep' (as well as other similar
tools such as 'sed') is a line-based tool. It can match individual *lines*
of the input. It cannot be used to perform operations which would require
interpreting several lines (unless it has some non-standard extensions).
Recognizing a valid XML fragment would require interpreting several lines
of the input (if you want to be able to match all possible cases), and hence
'grep' cannot be used for that.
'grep' is most useful for finding things you know are all in one line,
and for filtering files with a known format (such as httpd logs).
If you need more complicated things like that, then often 'awk' or 'perl'
can be used (still usually with shorter commands and faster than writing
your own program would). For example 'perl' can be used for the same things
as 'grep' and 'sed', but it has a vastly expanded set of match patterns and
other instructions.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |