POV-Ray : Newsgroups : povray.off-topic : The other OS Server Time
26 Nov 2026 02:23:47 EST (-0500)
  The other OS (Message 51 to 100 of 130)  
<<< Previous 50 Messages Goto Latest 50 Messages Next 30 Messages >>>
From: Darren New
Subject: Re: The other OS
Date: 5 Aug 2011 16:01:23
Message: <4e3c4c13$1@news.povray.org>
On 8/5/2011 5:42, Orchid XP v8 wrote:
> I was asking, more basically, "how do you do useful stuff with
> COM?"

Oh. You find a COM object that does what you want it to do, and you use it.

> As best as I can tell, COM lets you create "objects" and invoke
> "methods" on them... that's as far as I was able to figure out.

Yes, that's what COM is for. The "methods" are usually implemented in either 
system libraries or in applications. So an "object" might be an excel 
spreadsheet, and the "methods" would manipulate the cells, set up a graph, 
and then copy the image of the graph to the clipboard for you to use.

Asking "what good is COM" is like asking "what good are command line 
arguments? All they do is let you give strings to a program, but what do I 
*use* them for?"

With COM, you could do something like write a script that reads a database, 
sticks the entries in Excel, does a time-value average, finds the entry that 
has some maximum value for some property you're interested in, and then fire 
up google earth to plot how that property has changed with geography over time.

COM is to stdio like powershell is to CLI. It's an OO way of talking to a 
running program and invoking methods inside it.

> I'm fairly sure I tried that [or similar] in Tcl and it didn't work.

I dunno. I used it for years.

> I also figured that the only reason that you can (say) embed an Excel
> spreadsheet in a Word document is because both products are produced by the
> same company.

No no no. That's the whole *point* of COM. That's why there's a standard 
interface definition language and such. That's how systems like firefox and 
emacs work - custom scripting languages manipulating data structures only 
visible within the context of that program. COM lets you talk to the data 
structures inside a program without using that program's scripting language.

> I've yet to see a language that can invoke DLLs either...

Maybe you should learn a normal language, then. :-)

> I'd be perfectly happy doing COM from, say, JavaScript. It's not that
> Haskell is the problem, it's that I can't see *anything* that speaks COM.

Tcl, VBScript, WScript, VBA, and C# all have trivial interfaces to COM. 
Google up some language you know, and look to see if it has a COM interface 
implementation.  Didn't you tell me you had written a VBA macro or two?

> I get the feeling that the only way to solve this is to use some
> horrifically awful language like VB...

No, you just have to learn something vaguely normal, and then not give up 
when the first thing you try doesn't work.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 5 Aug 2011 16:02:59
Message: <4e3c4c73$1@news.povray.org>
On 8/5/2011 0:35, Orchid XP v8 wrote:
> Now that might actually be useful. I've yet to find any hex editors.

There's this cool technology that was invented a few years that helps you 
find things. You may have heard of it. ;-)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 5 Aug 2011 16:07:30
Message: <4e3c4d82@news.povray.org>
On 8/5/2011 8:05, Warp wrote:
>    I have emacs set so that it shows whitespaces at the end of lines with
> blue background.

git's GUI does the same thing. And I think there's even a switch to prevent 
check-ins of code with trailing spaces.

The best fun I had recently was working on a makefile that included

SOURCES = alpha \
     beta \
     gamma \
     delta \
     epsilon

Except there was a trailing space after gamma, so delta and epsilon never 
got recompiled. Given that a full compile resulted in about 60,000 lines 
when stdout was redirected, the problem was not obvious.


Looks like VIM can do this too:
http://vim.wikia.com/wiki/Highlight_unwanted_spaces

Wow. I wish I had thought to actually do that before.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 5 Aug 2011 16:25:51
Message: <4e3c51cf@news.povray.org>
On 8/5/2011 5:42, Orchid XP v8 wrote:
> A precondition is a Bool expression which must be true when a code bloc
k is
> entered. If it isn't true, the code block is allowed to malfunction
> arbitrarily badly. But if it /is/ true, then when the code block exits,
 the
> postcondition is required to be true.

Yeah. They're a lot less useful when you're talking about functional 
languages, because they're really just redefining the function.

> I don't see anything in the above that requires the code blocks to be c
lass
> methods, or even to be proper named constructs. If you were operating i
n
> BASIC, it might just be "when line 1580 is reached, X must contain a
> positive integer", and then "when line 1615 is reached, X must contain 
a new
> positive integer larger than the one that was there before".

That would be preconditions and postconditions. It wouldn't be DbC, I don
't 
think.

> An invariant looks like it should apply to any data structure of a give
n
> type (e.g., every tree node must contain a value lower than the one in 
its
> parent node), or perhaps to a given set of global variables (the nextID

> variable must always be positive and nonzero). Again, I don't see any
> especial reason why it has to apply only in an OO setting.

The invariant only holds while you're not manipulating the data. E.g., wh
ile 
you're rebalancing the tree, the invariant needn't hold. Now if you start
 
cutting global variables up into collections and corresponding blocks of 

code that manipulate them, or talking about "the set of all data structur
es 
that are manipulated by this particular set of code", I'd say you have so
me 
OO design going on there. :-)

> Let me put it this way: It looks a crapload better than Word, Excel,
> PowerPoint, OpenOffice, or the HTML rendering of any browser I've tried
.

That isn't what TeX was written to compete against.

> Whether it looks better than a £20,000 piece of professional publi
shing
> software, I couldn't say. But given that I'm never going to own £2
0,000,
> it's kind of irrelevant.

All you need is something designed by an actual typesetting company, like
 
Adobe. The very fact that you're looking at TeX output that has been run 

thru a PDF is already telling.

>> But it's quite as much there as the
>> jaggies on a 300DPI print-out compared to a 1200DPI print-out.
>
> Then why don't you just, um, increase the resolution? That's the entire

> /point/ of Metafont, after all. Its fonts are completely scaleable.

It was an analogy. Most people wouldn't believe their 300DPI laser printe
r 
prints jaggies on their text, until you set it down next to a 1200DPI las
er 
printer.

> Has there ever /been/ a Unix that isn't distributed in source form?

Of course.

> In reality, I'm not actually going to change such things, on either sys
tem.
> It would be far too hard. But in principle, it's possible with Linux. (
And
> probably OpenBSD and a few others.) It's not possible with Windows. At
> least, not without paying real money.

It's certainly possible with Windows. You just need to get the source cod
e.

> Of course, "Windows" is a single monolithic piece of software, whereas
> "Linux" (the OS) is a vast array of independently replaceable bits.

Because Powershell is monolithic, and printer drivers are monolithic, and
 
file systems are monolithic in Windows, and ... wait, what?

What part of Windows do you think is monolithic and can't be fairly easil
y 
replaced that *can* be replaced in Linux?

> Well, yeah. Not as random as, say, Shift+Alt+- (I'm looking at you, Ema
cs).
> But it's not the sort of thing you'd try just on the off-chance that ma
ybe
> it does something.

You know, you should google "Windows keyboard shortcuts" and see the doze
ns 
and dozens of standard shortcuts. It'll probably make your life easier. I
 
mean, control-right has worked that way since like Win3.

>> Where I would want to search in a text file to find a word?
>
> Where you'd want a special key to move to the next word on the line. Bu
t
> sure, if you wanna do search instead...

If I'm writing code and I want to move three tokens to the right, you thi
nk 
it won't be faster with the shift key?

> The output is 4000 lines line? In what universe...?? O_O

That was the small one. You don't think compiling a Linux distro generate
s 
tens of thousands of lines of output?

>> Heck, I have all the names and addresses in a text file. I want to loo
k
>> up my brother's fax number.
>
> See, I would probably use a real database for that.

I used to.

>>> These are all pretty rare, really.
>>
>> I think it depends on what you do with an editor. :-) They're all pret
ty
>> common for me.
>
> What, are you writing C or something?

I write lots of stuff. But yes, C also. Not sure why that matters.

>> The code for emacs doesn't get invoked thru the keyboard mappings, any

>> more than the code for COM does.
>
> And you add some package that makes Alt+R do the same thing as Ctrl+R b
ut
> slightly differently. Oh, I'm sorry, you changed Ctrl+R to be Ctrl+Z? O
h,
> well, nevermind... ;-)

You don't write a package where Alt+R does the same thing as Ctrl+R. You 

write a package where Alt+R invokes the same underlying function that Ctr
l+R 
does.

> No, the last time I ran Vi was on an early version of RedHat. Apparentl
y Vi
> was the only text editor installed, and I was desperately trying to fin
d
> something to edit the X configuration file so that I could make it star
t up.

You know what? That's *exactly* why you should learn vim. :-)

vi runs in 32K. emacs won't link on a machine with a megabyte address spa
ce.

>>> Being able to invoke all your tools from within your editor and edit
>>> their output is again quite a powerful idea.
>>
>> vi had that too, except it was *all* your tools, with no need to write

>> macros to handle it.
>
> I should have forceen a Holy War. ;-)

No, I'm just saying, normally in vi you highlight some text and run it th
ru 
an external script. If you want to indent the next paragraph, it's }!form
at 
and if you want to sort it it's }!sort

(Or something like that.)

emacs stuff I've seen is usually implemented in elisp, which means if you
 
want to reindent your code, you have to fire up the entire emacs 
infrastructure to do so.

>>> Not unless you hire a vast
>>> army of C++ programmers to write the necessary hooks and DLLs and God

>>> only knows what else to add the support to VS.
>>
>> Uh, one Bulgarian intern, on the weekends.
>
> Did I mention the part about how it never really worked to everyone's
> satisfaction and was eventually abandoned?

Yeah, I saw that. That's how I know it was a Bulgarian intern on weekends
 
who decided to abandon it because it wasn't working well.

The point is not "here's a useful plug-in for Haskell", but to show you a
 
counter-example to your assertion that VS doesn't support third-party lan
guages.

>> That's exactly why Microsoft invented COM, IBM invented REXX, standard
s
>> bodies invented COBRA, etc etc etc.
>
> Accessing COM is nowhere near as easy as throwing together a few lines 
of
> elisp. (As far as I can tell.)

You're doing it wrong. See the Tcl example, for example. You keep claimin
g 
it didn't work, but since I don't know what you were trying to do or how,
 
I'm not sure why it didn't work. And of course it's possible it's just 
bitrot there too.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 5 Aug 2011 16:33:53
Message: <4e3c53b1$1@news.povray.org>
On 8/5/2011 8:08, Warp wrote:
> Darren New<dne### [at] sanrrcom>  wrote:
>> (What would an invariant look like in C?)
>
>    I suppose the closest thing is "assert(a<  b);"

That's not really an invariant, tho. C basically doesn't have the facility 
to say "any time you're not in one of these N functions, there should be the 
following relationship between these collection of values:..."

Primarily because there's no way to express code that's outside any function.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 7 Aug 2011 11:00:47
Message: <4e3ea89e@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> On 8/5/2011 8:08, Warp wrote:
> > Darren New<dne### [at] sanrrcom>  wrote:
> >> (What would an invariant look like in C?)
> >
> >    I suppose the closest thing is "assert(a<  b);"

> That's not really an invariant, tho. C basically doesn't have the facility 
> to say "any time you're not in one of these N functions, there should be the 
> following relationship between these collection of values:..."

  "In computer science, a predicate is called an invariant to a sequence
of operations provided that: if the predicate is true before starting
the sequence, then it is true at the end of the sequence."

  "Programmers often make use of assertions in their code to make invariants
explicit."

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 7 Aug 2011 11:45:53
Message: <4e3eb331$1@news.povray.org>
On 8/7/2011 8:00, Warp wrote:
>    "In computer science, a predicate is called an invariant to a sequence
> of operations provided that: if the predicate is true before starting
> the sequence, then it is true at the end of the sequence."


Well, here's the thing.

assert(a < b) is testing a precondition if you stick it in a function before 
any code that changes values of variables.

assert(a < b) is testing a postcondition if you stick it in a function after 
all code that changes values of variables.

assert(a < b) is testing an invariant if you have it as a precondition and a 
postcondition for every function that reads or writes a or b.

assert(a < b) might even be part of a loop variant rather than any invariant.

In your example, "a < b" might be an invariant. "assert(a < b)" isn't 
enforcing an invariant unless you write it at the start and end of every 
function.

But sure, assert() is about as close as you can get in C to providing a way 
to implement the design pattern of DbC. It is, as you said, "the closest 
thing". But that's like saying "function pointers is the closest thing you 
have to closures in C." I.e., not very close. :-)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 7 Aug 2011 11:59:38
Message: <4e3eb66a$1@news.povray.org>
On 8/7/2011 8:00, Warp wrote:
>    "In computer science, a predicate is called an invariant to a sequence
> of operations


Oh, and yes, if you're talking about DbC, You're basically talking about 
OOP, so an "invariant" applies at the class level. Basically, any time the 
constructor has finished and you're not inside a method of the instance in 
question, that class's invariants should all be true. So a class invariant 
is a predicate that applies at the end of the constructor and at the end of 
each method and (ideally) at the start of each method. The only reason it 
wouldn't apply at the start of each method is if someone changed one of the 
objects that instance references. (E.g., your invariant is 
this.mystorage.capacity > 100 and someone else goes around your back to set 
mystorage.capacity = 50 because they have a reference to the same 
"mystorage" instance.)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: nemesis
Subject: Re: The other OS
Date: 8 Aug 2011 00:25:00
Message: <web.4e3f642ba0509d2f538c5e2a0@news.povray.org>
tl;dr

In any case, Warp uses it, so it's clearly not because of elisp.  It was once
upon a time very hot among C++ users.

As for your editor, does it have a kill circular ring to quickly and
conveniently select latest extracted text entries?  Does it have parametrized
macros to quickly generate text from templates?  Have it got automatic buffers
for "jumping" back and forth through the text with ease?  Oh, sorry for your
flashy flint tool...

BTW, for a long while now I've been a happy vim user, which is about the same as
emacs.


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 00:32:27
Message: <4e3f66db$1@news.povray.org>
On 8/7/2011 21:20, nemesis wrote:
> BTW, for a long while now I've been a happy vim user, which is about the same as
> emacs.

I think elisp is probably easier to program than vim macros. You really have 
to be into programmable calculators to make sense of vim macros. Altho they 
are, technically, turing complete. Every time I use something besides vim, I 
find I miss the "." command most.

Given that, having something actually integrated with the compiler so you 
get stuff like intelisense is often worth the loss of power.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 06:36:21
Message: <4e3fbc25@news.povray.org>
On 05/08/2011 04:05 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> My text editor allows you to *display* the line ends, so you can
>> visually see which lines end with LF, which ones are CR, and also
>> arbitrary combinations thereof. It can also display other non-printing
>> characters if you wish (which is sometimes useful).
>
>    I have emacs set so that it shows whitespaces at the end of lines with
> blue background.

I have my editor set to automatically strip such whitespaces. (And to 
add an extra blank line to the end of the file if one is not already 
present.)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 06:37:26
Message: <4e3fbc66$1@news.povray.org>
On 05/08/2011 09:02 PM, Darren New wrote:
> On 8/5/2011 0:35, Orchid XP v8 wrote:
>> Now that might actually be useful. I've yet to find any hex editors.
>
> There's this cool technology that was invented a few years that helps
> you find things. You may have heard of it. ;-)

Oh, Google helps you find *millions* of hex editors. Which all cost 
money. And, from the look of their product websites, I suspect about 80% 
of them are actually trojans.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 06:59:25
Message: <4e3fc18d$1@news.povray.org>
On 08/08/2011 05:20 AM, nemesis wrote:

> As for your editor, does it have a kill circular ring to quickly and
> conveniently select latest extracted text entries?

No. But neither does Emacs. (Unless by "convenient" you mean "really 
frigging hard to figure out".)

> Does it have parametrized macros to quickly generate text from templates?

No. For that, I use a real programming language.

> Have it got automatic buffers
> for "jumping" back and forth through the text with ease?

I don't even know what that means.

> Oh, sorry for your flashy flint tool...

I never said my editor was perfect. Only that I've never found a better one.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 07:21:12
Message: <4e3fc6a8$1@news.povray.org>
On 05/08/2011 09:25 PM, Darren New wrote:
> On 8/5/2011 5:42, Orchid XP v8 wrote:
>> A precondition is a Bool expression which must be true when a code
>> block is
>> entered. If it isn't true, the code block is allowed to malfunction
>> arbitrarily badly. But if it /is/ true, then when the code block
>> exits, the
>> postcondition is required to be true.
>
> Yeah. They're a lot less useful when you're talking about functional
> languages, because they're really just redefining the function.

Not so much, no.

Defining how to sort some data [efficiently] is a tad more complicated 
than defining a test of whether some data is sorted.

> That would be preconditions and postconditions. It wouldn't be DbC, I
> don't think.

OK, well let me rephrase: You can do everything that DbC does. Whether 
you still call it DbC is a question which is untirely uninteresting to me.

> The invariant only holds while you're not manipulating the data. E.g.,
> while you're rebalancing the tree, the invariant needn't hold. Now if
> you start cutting global variables up into collections and corresponding
> blocks of code that manipulate them, or talking about "the set of all
> data structures that are manipulated by this particular set of code",
> I'd say you have some OO design going on there. :-)

If you want to consider a module to be some vague kind of "class", then 
OK...

>> Let me put it this way: It looks a crapload better than Word, Excel,
>> PowerPoint, OpenOffice, or the HTML rendering of any browser I've tried.
>
> That isn't what TeX was written to compete against.

> All you need is something designed by an actual typesetting company,
> like Adobe. The very fact that you're looking at TeX output that has
> been run thru a PDF is already telling.

Yes. It tells that nobody else will have a way to view DVI files, so I 
distribute then as PDF. Your point?

It's not like turning the DVI file into PDF actually alters its 
appearence in any way, shape or form.

>> Has there ever /been/ a Unix that isn't distributed in source form?
>
> Of course.

So... how would you compile it? I thought the entire reason Unix was so 
popular is that it operates on arbitrary architectures.

> It's certainly possible with Windows. You just need to get the source code.

...which you cannot ever have...

> What part of Windows do you think is monolithic and can't be fairly
> easily replaced that *can* be replaced in Linux?

When you install "Windows", it installs one giant binary blob. I'm sure 
Microsoft probably structures it internally as many seperate modules, 
but such seperation is not visible in the finished product.

Unix, on the other hand, has the opposite problem: The OS is made up of 
several hundred billion tiny programs, each dragging around 80 years of 
backwards compatibility support...

>> Well, yeah. Not as random as, say, Shift+Alt+- (I'm looking at you,
>> Emacs).
>> But it's not the sort of thing you'd try just on the off-chance that
>> maybe
>> it does something.
>
> You know, you should google "Windows keyboard shortcuts" and see the
> dozens and dozens of standard shortcuts. It'll probably make your life
> easier. I mean, control-right has worked that way since like Win3.

You mean there's more than one program that uses that particular 
shortcut (for the same thing)?

>>> Where I would want to search in a text file to find a word?
>>
>> Where you'd want a special key to move to the next word on the line. But
>> sure, if you wanna do search instead...
>
> If I'm writing code and I want to move three tokens to the right, you
> think it won't be faster with the shift key?

Well, I suppose if you had seriously *huge* tokens, it would be faster. 
Like, if you were writing Java or something. But most "words" are only, 
like, 5 characters or so. Jabbing the arrow key 5 times is hardly a 
difficult task.

>> The output is 4000 lines line? In what universe...?? O_O
>
> That was the small one. You don't think compiling a Linux distro
> generates tens of thousands of lines of output?

Why would you ever compile a Linux distro? (Other than for a laugh.)

>> No, the last time I ran Vi was on an early version of RedHat.
>> Apparently Vi
>> was the only text editor installed, and I was desperately trying to find
>> something to edit the X configuration file so that I could make it
>> start up.
>
> You know what? That's *exactly* why you should learn vim. :-)
>
> vi runs in 32K. emacs won't link on a machine with a megabyte address
> space.

That's unlikely to ever be a problem for me. What /is/ a problem is that 
Vi was utterly incomprehensible...

>> I should have forceen a Holy War. ;-)
>
> No, I'm just saying, normally in vi you highlight some text and run it
> thru an external script. If you want to indent the next paragraph, it's
> }!format and if you want to sort it it's }!sort
>
> (Or something like that.)
>
> emacs stuff I've seen is usually implemented in elisp, which means if
> you want to reindent your code, you have to fire up the entire emacs
> infrastructure to do so.

On the other hand, since Emacs is an entire operating system, it appears 
that most people just start Emacs after they log in, and never shut it down.

> The point is not "here's a useful plug-in for Haskell", but to show you
> a counter-example to your assertion that VS doesn't support third-party
> languages.

I didn't say that VS doesn't support third-party languages. I said it 
was far too /hard/ to implement support for third-party languages.

>> Accessing COM is nowhere near as easy as throwing together a few lines of
>> elisp. (As far as I can tell.)
>
> You're doing it wrong. See the Tcl example, for example. You keep
> claiming it didn't work, but since I don't know what you were trying to
> do or how, I'm not sure why it didn't work. And of course it's possible
> it's just bitrot there too.

I seem to recall it got as far as "require package tcom", and Freewarp 
was like "WTF is tcom?" And I had a look at the package description, and 
it was like "OK, put this file in /bin, and that file in /lib" and I'm 
like "WTF? Where's that?"

Or something like that.

I don't actually /like/ Tcl all that much. I'd prefer something a bit 
safer, but hey... from the way you're talking, you make it sound as if 
almost /every/ programming language can trivially access COM.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 07:29:22
Message: <4e3fc892$1@news.povray.org>
On 05/08/2011 09:01 PM, Darren New wrote:
> On 8/5/2011 5:42, Orchid XP v8 wrote:
>> I was asking, more basically, "how do you do useful stuff with
>> COM?"
>
> Oh. You find a COM object that does what you want it to do, and you use it.

I can see how an application might expose a COM object such that 
invoking a certain method is like clicking on a particular button. What 
I can't figure out is how COM lets you do stuff like link a chart to a 
database such that every time the database changes, the chart updates. 
I'm not sure how you invoke methods to make that happen.

>> As best as I can tell, COM lets you create "objects" and invoke
>> "methods" on them... that's as far as I was able to figure out.
>
> Yes, that's what COM is for. The "methods" are usually implemented in
> either system libraries or in applications. So an "object" might be an
> excel spreadsheet, and the "methods" would manipulate the cells, set up
> a graph, and then copy the image of the graph to the clipboard for you
> to use.

Would Excel be a single COM object? Or would you have like seperate 
objects for each workbook, worksheet, cell, etc?

>> I also figured that the only reason that you can (say) embed an Excel
>> spreadsheet in a Word document is because both products are produced
>> by the same company.
>
> No no no. That's the whole *point* of COM. That's why there's a standard
> interface definition language and such.

See, I've always assumed that the glitering world of native Windows 
GUIs, IPC, DLLs, COM, etc. are all behind closed doors, accessible only 
to people who know how to write really low-level Windows code. And I've 
always assumed that the really /good/ stuff (like embedding one 
application inside another) is accessible only to Microsoft themselves. 
(Or anybody who pays really vast sums of money. People like Symantec.)

>> I've yet to see a language that can invoke DLLs either...
>
> Maybe you should learn a normal language, then. :-)

So... you mean basically C or C++ then?

>> I'd be perfectly happy doing COM from, say, JavaScript. It's not that
>> Haskell is the problem, it's that I can't see *anything* that speaks COM.
>
> Tcl, VBScript, WScript, VBA, and C# all have trivial interfaces to COM.

Oh dears.

> Didn't you tell me you had written a VBA macro or two?

Yeah. It took me several hours to finally construct a 25-line VBA macro 
which performs the utterly trivial task of setting the value of a 
certain cell to today's date. This was an exercise in extreme 
frustration, as the help files utterly failed to be remotely helpful in 
any way. I've been bitter ever since. :-P

>> I get the feeling that the only way to solve this is to use some
>> horrifically awful language like VB...
>
> No, you just have to learn something vaguely normal, and then not give
> up when the first thing you try doesn't work.

Yeah, maybe that's what it comes down to. I tend to avoid all the 
MS-designed languages, which is maybe why I can't do COM.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 08:43:21
Message: <4e3fd9e9@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> >    I have emacs set so that it shows whitespaces at the end of lines with
> > blue background.

> I have my editor set to automatically strip such whitespaces. (And to 
> add an extra blank line to the end of the file if one is not already 
> present.)

  But, as I said, I hate it when editors do things without being told to.

  Open the file, save it, the end result must be identical. Change it only
if I tell it to change it.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 08:48:06
Message: <4e3fdb06@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> On 08/08/2011 05:20 AM, nemesis wrote:

> > As for your editor, does it have a kill circular ring to quickly and
> > conveniently select latest extracted text entries?

> No. But neither does Emacs.

  So Emacs has an elisp interpreted that can be used basically for anything
that you could ever imagine doing to text. Except having a circular kill
ring, it appears. At least according to you.

> > Does it have parametrized macros to quickly generate text from templates?

> No. For that, I use a real programming language.

  When you want to edit a text file, you write a separate program to do
that?

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 08:53:38
Message: <4e3fdc52$1@news.povray.org>
On 08/08/2011 01:43 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>>>     I have emacs set so that it shows whitespaces at the end of lines with
>>> blue background.
>
>> I have my editor set to automatically strip such whitespaces. (And to
>> add an extra blank line to the end of the file if one is not already
>> present.)
>
>    But, as I said, I hate it when editors do things without being told to.

OK, fair enough. However, I don't work with any file formats where such 
trailing spaces would be significant.

I also don't work with any file formats which should ever contain a tab 
character, so I've configured my editor to strip those too.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 08:55:19
Message: <4e3fdcb7$1@news.povray.org>
>>> As for your editor, does it have a kill circular ring to quickly and
>>> conveniently select latest extracted text entries?
>
>> No. But neither does Emacs.
>
>    So Emacs has an elisp interpreted that can be used basically for anything
> that you could ever imagine doing to text. Except having a circular kill
> ring, it appears. At least according to you.

Emacs has a circular kill ring, it's true. I would dispute that it's 
/convenient/ though.

>>> Does it have parametrized macros to quickly generate text from templates?
>
>> No. For that, I use a real programming language.
>
>    When you want to edit a text file, you write a separate program to do
> that?

No. When I want to generate large chunks of text programatically, I 
write a program. (As you can probably tell, this isn't something I need 
to do very often.)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 09:08:23
Message: <4e3fdfc7@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> OK, fair enough. However, I don't work with any file formats where such 
> trailing spaces would be significant.

> I also don't work with any file formats which should ever contain a tab 
> character, so I've configured my editor to strip those too.

  And then you lament about the lack of hex editors...

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 09:09:20
Message: <4e3fe000@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> No. When I want to generate large chunks of text programatically, I 
> write a program. (As you can probably tell, this isn't something I need 
> to do very often.)

  Why, when you could have your text editor do it?

-- 
                                                          - Warp


Post a reply to this message

From: Le Forgeron
Subject: Re: The other OS
Date: 8 Aug 2011 09:22:40
Message: <4e3fe320$1@news.povray.org>
Le 08/08/2011 15:09, Warp a écrit :
> Orchid XP v8 <voi### [at] devnull> wrote:
>> No. When I want to generate large chunks of text programatically, I 
>> write a program. (As you can probably tell, this isn't something I need 
>> to do very often.)
> 
>   Why, when you could have your text editor do it?
> 
Let's face it:
* vi is a text editor.
* emacs is an elisp based monster which happen to also be a text editor
by default (but it can be your mail reader, and far more, including your
navigation shell)
* other programs daring to be titled "text editor" are just lacking a
lot of functionalities and are at best replacement for Notepad.


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 09:31:50
Message: <4e3fe545@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Let's face it:
> * vi is a text editor.
> * emacs is an elisp based monster which happen to also be a text editor
> by default (but it can be your mail reader, and far more, including your
> navigation shell)
> * other programs daring to be titled "text editor" are just lacking a
> lot of functionalities and are at best replacement for Notepad.

  Real programmers use edlin anyways.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 09:45:32
Message: <4e3fe87c$1@news.povray.org>
>> OK, fair enough. However, I don't work with any file formats where such
>> trailing spaces would be significant.
>
>> I also don't work with any file formats which should ever contain a tab
>> character, so I've configured my editor to strip those too.
>
>    And then you lament about the lack of hex editors...

I wouldn't use a hex editor to edit text any more than I'd use a text 
editor to edit binary.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 09:46:26
Message: <4e3fe8b2@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> I wouldn't use a hex editor to edit text any more than I'd use a text 
> editor to edit binary.

  Why not?

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 09:47:24
Message: <4e3fe8ec@news.povray.org>
On 08/08/2011 02:09 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> No. When I want to generate large chunks of text programatically, I
>> write a program. (As you can probably tell, this isn't something I need
>> to do very often.)
>
>    Why, when you could have your text editor do it?

The main type of text that I edit is program source code.

If you /need/ to generate large chunks of code automatically, you're 
writing your program wrong.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 09:49:07
Message: <4e3fe953@news.povray.org>
On 08/08/2011 02:46 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> I wouldn't use a hex editor to edit text any more than I'd use a text
>> editor to edit binary.
>
>    Why not?

Because typing "banana" is way, way easier than typing "62 61 6E 62 6E 
62". Obviously.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 10:00:21
Message: <4e3febf5@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> On 08/08/2011 02:46 PM, Warp wrote:
> > Orchid XP v8<voi### [at] devnull>  wrote:
> >> I wouldn't use a hex editor to edit text any more than I'd use a text
> >> editor to edit binary.
> >
> >    Why not?

> Because typing "banana" is way, way easier than typing "62 61 6E 62 6E 
> 62". Obviously.

  Yes, because people use hex editors to edit plain ascii text.

  You still didn't answer my question: Why don't you want the same program
supporting both text editing and hex editing?

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 10:01:44
Message: <4e3fec48@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> On 08/08/2011 02:09 PM, Warp wrote:
> > Orchid XP v8<voi### [at] devnull>  wrote:
> >> No. When I want to generate large chunks of text programatically, I
> >> write a program. (As you can probably tell, this isn't something I need
> >> to do very often.)
> >
> >    Why, when you could have your text editor do it?

> The main type of text that I edit is program source code.

> If you /need/ to generate large chunks of code automatically, you're 
> writing your program wrong.

  You could use the same argument for any of the several features in your
text editor that you, personally, never use.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 10:22:13
Message: <4e3ff115$1@news.povray.org>
On 08/08/2011 03:00 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> On 08/08/2011 02:46 PM, Warp wrote:
>>> Orchid XP v8<voi### [at] devnull>   wrote:
>>>> I wouldn't use a hex editor to edit text any more than I'd use a text
>>>> editor to edit binary.
>>>
>>>     Why not?
>
>> Because typing "banana" is way, way easier than typing "62 61 6E 62 6E
>> 62". Obviously.
>
>    Yes, because people use hex editors to edit plain ascii text.
>
>    You still didn't answer my question: Why don't you want the same program
> supporting both text editing and hex editing?

I said that I wouldn't use a hex editor to edit text.

Now, if there was a single program that had decent support for text 
/and/ binary editing, then sure, I'd use that.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 10:23:28
Message: <4e3ff160$1@news.povray.org>
>    You could use the same argument for any of the several features in your
> text editor that you, personally, never use.

What? The argument that because I don't need a particular feature, its 
presence or absense isn't particularly important to me? Seems like a 
fairly valid argument.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Mike the Elder
Subject: Re: The other OS
Date: 8 Aug 2011 10:45:01
Message: <web.4e3ff540a0509d2f85627c70@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
....
> Because typing "banana" is way, way easier than typing "62 61 6E 62 6E
> 62". Obviously.
....

"62 61 6E 61 6E 61" actually.

And, yes, I *am* consdiering professional help... Perhaps "Coders Anonymous" -
It's a 0C step program.  ;-)


Best Regards,
Mike C.


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 10:45:46
Message: <4e3ff69a@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Now, if there was a single program that had decent support for text 
> /and/ binary editing, then sure, I'd use that.

  But you said you wouldn't use a text editor to edit a binary.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 11:01:55
Message: <4e3ffa63$1@news.povray.org>
On 08/08/2011 03:40 PM, Mike the Elder wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
> ....
>> Because typing "banana" is way, way easier than typing "62 61 6E 62 6E
>> 62". Obviously.
> ....
>
> "62 61 6E 61 6E 61" actually.

I REST MY CASE!

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: The other OS
Date: 8 Aug 2011 11:03:20
Message: <4e3ffab8$1@news.povray.org>
On 08/08/2011 03:45 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> Now, if there was a single program that had decent support for text
>> /and/ binary editing, then sure, I'd use that.
>
>    But you said you wouldn't use a text editor to edit a binary.

I wouldn't use a program specifically designed for editing text to edit 
binary.

If it had a seperate mode for editing binary, I might use that. But I 
would never, ever use a text editor running in text mode to edit raw 
binary. That's just silly.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: The other OS
Date: 8 Aug 2011 11:27:38
Message: <4e40006a@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> I wouldn't use a program specifically designed for editing text to edit 
> binary.

> If it had a seperate mode for editing binary, I might use that. But I 
> would never, ever use a text editor running in text mode to edit raw 
> binary. That's just silly.

  You are missing the point. You said:

> OK, fair enough. However, I don't work with any file formats where such
> trailing spaces would be significant.

> I also don't work with any file formats which should ever contain a tab
> character, so I've configured my editor to strip those too.

  Which is contradictory with your earlier lamentation that you don't have
any hex editor. (If you never work with any file formats where automatically
stripping some characters breaks the file, what would you use a hex editor
for?)

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 12:04:47
Message: <4e40091f$1@news.povray.org>
On 8/8/2011 4:29, Orchid XP v8 wrote:
> I can see how an application might expose a COM object such that invoking a
> certain method is like clicking on a particular button. What I can't figure
> out is how COM lets you do stuff like link a chart to a database such that
> every time the database changes, the chart updates. I'm not sure how you
> invoke methods to make that happen.

Assuming you're talking about (say) a SQL server and excel, you write a 
macro in excel that runs whenever you open the spreadsheet (probably in 
VBA). The macro in VBA opens a connection to the SQL COM object, tells it to 
read a database, and then loops over the results, using the Excel COM object 
to stick the rows into the spreadsheet. When it gets to the end of the 
result set, it closes the SQL COM object and tells Excel to draw a chart 
using the COM interface for that.

> Would Excel be a single COM object? Or would you have like seperate objects
> for each workbook, worksheet, cell, etc?

Excel would be a single COM Server. You instantiate an "application" object, 
and that object will have methods for instantiating workbooks, worksheets, etc.

So looking at the Tcl example of talking to Excel again:

 >> set application [::tcom::ref createobject "Excel.Application"]

This makes the "application" variable refer to a COM object of type 
"Excel.Application", which fires up Excel if it isn't already running. If 
you look in the registry for "Excel.Application", it shows you all the data 
structure links telling you which executable it is, what command line 
arguments it uses to do that, and what GUID Excel will store in the 
appropriate data structures to make it work. It also tells you the threading 
model, permissions needed, etc etc etc.

You can also pass the GUID directly instead of the name to be looked up, at 
which point you get that and only that implementation.

In a scripting language like Tcl, things like "Visible" and "Workbooks" are 
passed to a function called IDispatch. So "$application Visible 1" is really 
closer to "$application IDispatch ("Visible", 1)". However, there is also 
statically typed interfaces, and the description of those interfaces (like C 
"struct" headers or C++ class declarations) are described in the Interface 
Description Language, or IDL.

 >> $application Visible 1

This is a method invocation. It's passing "1" to the argument of the 
"Visible" method on the Excel Application object.

 >> set workbooks [$application Workbooks]

The Workbooks method returns the list of workbooks in the currently focussed 
spreadsheet.

 >> set workbook [$workbooks Add]

This adds a new workbook and returns it.

 >> set worksheets [$workbook Worksheets]

This gives you the list of worksheets in the given workbook.

 >> set worksheet [$worksheets Item [expr 1]]

"Item" is the standard method name for indexing elements, like [] in C. You 
have to run "1" thru expr to make sure it's an integer, or you might wind up 
looking for the worksheet whose name is the single-character string "1". 
Because Tcl doesn't have types.

set data [list \
     [list "North" "South" "East" "West"] \
     [list 5.2 10.0 8.0 20.0] \
]
set sourceRange [$worksheet Range "A1" "D2"]
$sourceRange Value $data

So you create some data, pick out the range A1 through D2 in your worksheet, 
and set the values into that range. Again, "Value" is a pretty standard 
method that means "assign the value to the content", basically the inverse 
operation of "Item".

 >> set charts [$workbook Charts]
 >> set chart [$charts Add]

Get the list of charts and add a new one.

 >> $chart ChartWizard $sourceRange 5 [::tcom::na] 1 1 0 0 "Sales Percentages"

Start the chart wizard and answer these values. You'd have to look at the 
docs to figure out what the chart wizard arguments mean here, but a couple 
are obvious.

And that's how you drive Excel. You want to drive it from SQL? Replace the 
"set data" line with one that opens Sql.Application, creates a query, 
submits it, and retrieves the data.

But that page of code is all you need (given Tcl and TCom and of course 
Excel) to actually create a chart in Excel from your script.

Word has similar stuff, where you can insert text, set it bold or change the 
font, etc etc etc.  A lot like javascript's DOM model.

> See, I've always assumed that the glitering world of native Windows GUIs,
> IPC, DLLs, COM, etc. are all behind closed doors, accessible only to people
> who know how to write really low-level Windows code. And I've always assumed
> that the really /good/ stuff (like embedding one application inside another)
> is accessible only to Microsoft themselves. (Or anybody who pays really vast
> sums of money. People like Symantec.)

Nope. You really can do it in Tcl.  Getting it to actually display in your 
code is a little messier, but not much.

>>> I've yet to see a language that can invoke DLLs either...
>>
>> Maybe you should learn a normal language, then. :-)
>
> So... you mean basically C or C++ then?

Something not experimental. Java, C, C++, C#, Ruby, Python, VBA, Tcl, etc 
etc etc.

>>> I'd be perfectly happy doing COM from, say, JavaScript. It's not that
>>> Haskell is the problem, it's that I can't see *anything* that speaks COM.
>>
>> Tcl, VBScript, WScript, VBA, and C# all have trivial interfaces to COM.
>
> Oh dears.

Looks like Python has COM access:

http://www.devshed.com/c/a/Python/Windows-Programming-in-Python/2/

The best way to search seems to be something like
     python "com interface"
because otherwise it finds python.com and stuff like that.

This may be broken, but maybe it'll be easier for you to understand how COM 
works:
http://research.microsoft.com/en-us/um/people/emeijer/Papers/HaskellCom.pdf
I mean, that looks like a pretty good description of how it all works.

>> Didn't you tell me you had written a VBA macro or two?
>
> Yeah. It took me several hours to finally construct a 25-line VBA macro
> which performs the utterly trivial task of setting the value of a certain
> cell to today's date. This was an exercise in extreme frustration, as the
> help files utterly failed to be remotely helpful in any way. I've been
> bitter ever since. :-P

Heh. Interestingly enough, that has been my experience too. Not uncommonly, 
the documentation for something will be just a little off, or it won't tell 
you exactly what you need installed to make it work, so the docs will tell 
you what the method is and the arguments, but it won't tell you what class 
it applies to, or which libraries have to be installed to find the 
implementation, or etc.

> Yeah, maybe that's what it comes down to. I tend to avoid all the
> MS-designed languages, which is maybe why I can't do COM.

But COM is really common in pretty much anything that's not so UNIX-centric 
that nobody even writes a COM library interface. Even PHP interfaces to COM:

http://php.net/manual/en/ref.com.php

Pretty much any language powerful enough to override the function call 
syntax is going to have something that looks like COM pretty easily. Or 
anything statically typed for which you have the IDL in advance, so you can 
compile interface stubs that take the arguments to calls and package them up 
for COM, which is how C++ gets to COM for example. (You just wind up with 
different syntax to get to dynamically-linked COM vs statically-linked COM 
interfaces.)

Funny enough, it looks like nobody ever wrote a COM interface for elisp. :-)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 12:11:19
Message: <4e400aa7@news.povray.org>
On 8/8/2011 3:37, Orchid XP v8 wrote:
> Oh, Google helps you find *millions* of hex editors. Which all cost money.
> And, from the look of their product websites, I suspect about 80% of them
> are actually trojans.

Fine. Here's a free one I've been carrying around since 1999 or so.

Alternately, google for "freeware hex editor" and take your pick. :-) 
There's probably a bunch much nicer than this one, but since I need a hex 
editor about once every 3 years, this does for me.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message


Attachments:
Download 'hexedit.exe.dat' (148 KB)

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 12:30:29
Message: <4e400f25$1@news.povray.org>
On 8/8/2011 4:21, Orchid XP v8 wrote:
> Defining how to sort some data [efficiently] is a tad more complicated than
> defining a test of whether some data is sorted.

Yeah.

Incidentally, part of the point of DbC is that the pre/post/invariants are 
the actual important part. The rest is implementation details because you 
can change them around as long as you maintain the invariants. (Assuming, of 
course, that your invariants are complete.)

>> That would be preconditions and postconditions. It wouldn't be DbC, I
>> don't think.
>
> OK, well let me rephrase: You can do everything that DbC does. Whether you
> still call it DbC is a question which is untirely uninteresting to me.

Remember that DbC is a *design* technique, not a coding technique.

>> The invariant only holds while you're not manipulating the data. E.g.,
>> while you're rebalancing the tree, the invariant needn't hold. Now if
>> you start cutting global variables up into collections and corresponding
>> blocks of code that manipulate them, or talking about "the set of all
>> data structures that are manipulated by this particular set of code",
>> I'd say you have some OO design going on there. :-)
>
> If you want to consider a module to be some vague kind of "class", then OK...

It's not so much whether it's a "class" or a "module", but rather whether 
there's well-defined places in your code where the invariants don't hold and 
well-defined places where they do.

> It's not like turning the DVI file into PDF actually alters its appearence
> in any way, shape or form.

Sure it does. You stopped using metafont, for one thing.

>>> Has there ever /been/ a Unix that isn't distributed in source form?
>>
>> Of course.
>
> So... how would you compile it? I thought the entire reason Unix was so
> popular is that it operates on arbitrary architectures.

How would I compile what? Unix? Why would I compile Unix that works, any 
more than I'd compile Windows? Of course *somebody* has the source. Just not 
the end users.

>> It's certainly possible with Windows. You just need to get the source code.
> ...which you cannot ever have...

Why do you say that? I had access to Windows source code at my previous job. 
Not the OS, but selected libraries.

>> What part of Windows do you think is monolithic and can't be fairly
>> easily replaced that *can* be replaced in Linux?
>
> When you install "Windows", it installs one giant binary blob. I'm sure
> Microsoft probably structures it internally as many seperate modules, but
> such seperation is not visible in the finished product.

Not if you're not a coder. If you're writing a device driver or building a 
video card, I'm pretty sure it's lots of separate modules. Go into your 
control panel and look at the device drivers. Notice the "uninstall" bits 
there. Plug in a new USB device you never had before, or a new printer, or a 
new graphics tablet. What do you think happens, other than a new module 
being installed?

> You mean there's more than one program that uses that particular shortcut
> (for the same thing)?

Anything with a text box. One of the nifty things about Windows is that 
early on, back when Gates was still making tech decisions, they built a text 
box object that *everyone* can use. The only program I ever found that 
*didn't* use it is Mozilla and Thunderbird (and cmd.exe obviously). 
Everything else will (for example) take handwriting recognition on a machine 
that supports a touch screen, because MS just added that to the text box 
code everyone was already using.

I suspect Java doesn't use it either at least sometimes, but I never tried 
using a Java program on the machine with the touchscreen.

>>> The output is 4000 lines line? In what universe...?? O_O
>>
>> That was the small one. You don't think compiling a Linux distro
>> generates tens of thousands of lines of output?
>
> Why would you ever compile a Linux distro? (Other than for a laugh.)

First, I must admit amusement that earlier in this same thread, you 
expressed wonder that there had ever been a Unix distro not released in 
source form, and how in the world would you compile it?

Second, you compile a Linux distro when you're building a new piece of hardware.

> That's unlikely to ever be a problem for me. What /is/ a problem is that Vi
> was utterly incomprehensible...

True, it's unlikely to be a problem nowadays. Unless you wind up on an 8-bit 
machine again for some reason. It's also the case that (I think) vi tends to 
be installed by default and emacs isn't, so if you want to get into a server 
somewhere and make a 3-line configuration change, knowing enough vi to 
handle that is probably a good idea.

Do a tutorial on vi for the same length of time you did it on emacs, and see 
how it goes. Given its nature, of course it's incomprehensible if you never 
read the instructions.

> On the other hand, since Emacs is an entire operating system, it appears
> that most people just start Emacs after they log in, and never shut it down.

"It's a great OS, but the text editor is sooooo complicated!"

I was highly amused when I saw the icon for one of the emacs distributions 
was a kitchen sink.

>> The point is not "here's a useful plug-in for Haskell", but to show you
>> a counter-example to your assertion that VS doesn't support third-party
>> languages.
>
> I didn't say that VS doesn't support third-party languages. I said it was
> far too /hard/ to implement support for third-party languages.

Too hard for who?

> I seem to recall it got as far as "require package tcom", and Freewarp was
> like "WTF is tcom?" And I had a look at the package description, and it was
> like "OK, put this file in /bin, and that file in /lib" and I'm like "WTF?
> Where's that?"

Well, no, adding libraries to Tcl when you're using freewrap is going to 
make anything difficult. You've got a "here's a program you don't install 
with a selection of libraries already present" distribution, and you're 
surprised that adding libraries to it is difficult?

Use a real install of Tcl. Freewrap is specifically designed to package up a 
select collection of libraries.

> I don't actually /like/ Tcl all that much. I'd prefer something a bit safer,
> but hey... from the way you're talking, you make it sound as if almost
> /every/ programming language can trivially access COM.

Not necessarily "trivially". I don't know that I'd call the C++ interface 
"trivial", since it requires a somewhat more complex build system and more 
data than just the COM object itself. But most scripting languages have a 
pretty easy way of invoking COM even if they don't well support writing 
servers for COM.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 12:33:57
Message: <4e400ff5@news.povray.org>
On 8/8/2011 7:01, Warp wrote:
>> If you /need/ to generate large chunks of code automatically, you're
>> writing your program wrong.
>
>    You could use the same argument for any of the several features in your
> text editor that you, personally, never use.

I'd more say that if you need to generate large chunks of code 
automatically, your programming language is too low-level for the code 
you're writing. Boilerplate is a sign that your language needs to be able to 
automate the boilerplate.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Stephen
Subject: Re: The other OS
Date: 8 Aug 2011 13:32:19
Message: <4e401da3$1@news.povray.org>
On 08/08/2011 2:31 PM, Warp wrote:
> Le_Forgeron<lef### [at] freefr>  wrote:
>> Let's face it:
>> * vi is a text editor.
>> * emacs is an elisp based monster which happen to also be a text editor
>> by default (but it can be your mail reader, and far more, including your
>> navigation shell)
>> * other programs daring to be titled "text editor" are just lacking a
>> lot of functionalities and are at best replacement for Notepad.
>
>    Real programmers use edlin anyways.
>
But must only use two fingers. ;-)

I just checked and Edlin is not included in Win7 64 bit.

-- 
Regards
     Stephen


Post a reply to this message

From: Jim Henderson
Subject: Re: The other OS
Date: 8 Aug 2011 13:34:11
Message: <4e401e13@news.povray.org>
On Mon, 08 Aug 2011 09:31:50 -0400, Warp wrote:

>   Real programmers use edlin anyways.

Pah, edlin.  Real programmers use copy con: ;)

Jim


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 13:36:02
Message: <4e401e82$1@news.povray.org>
On 8/8/2011 10:32, Stephen wrote:
> I just checked and Edlin is not included in Win7 64 bit.

Ah, the end of an era. :-)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Stephen
Subject: Re: The other OS
Date: 8 Aug 2011 13:55:17
Message: <4e402305$1@news.povray.org>
On 08/08/2011 5:11 PM, Darren New wrote:
> On 8/8/2011 3:37, Orchid XP v8 wrote:
>> Oh, Google helps you find *millions* of hex editors. Which all cost
>> money.
>> And, from the look of their product websites, I suspect about 80% of them
>> are actually trojans.
>
> Fine. Here's a free one I've been carrying around since 1999 or so.
>
> Alternately, google for "freeware hex editor" and take your pick. :-)
> There's probably a bunch much nicer than this one, but since I need a
> hex editor about once every 3 years, this does for me.
>

I tried it (I trust you) and it behaves strangely under Win7 64 bit. 
When I tried to resize the window I couldn't and the window "jumped" to 
the far left of my screen. (I have the taskbar on the left and it went 
below it.) Also when dragged it moved in steps. Strange!

-- 
Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: The other OS
Date: 8 Aug 2011 13:57:09
Message: <4e402375$1@news.povray.org>
On 08/08/2011 6:36 PM, Darren New wrote:
> On 8/8/2011 10:32, Stephen wrote:
>> I just checked and Edlin is not included in Win7 64 bit.
>
> Ah, the end of an era. :-)
>

Hallelujah!
But sad.

-- 
Regards
     Stephen


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 14:29:44
Message: <4e402b18$1@news.povray.org>
On 8/8/2011 10:55, Stephen wrote:
> Also when dragged it moved in steps. Strange!

Welcome to amateur Win98 software running on a different CPU with a 
different OS architecture with a different window manager! :-)

Seriously, get one that's less than 10 years old and it'll probably work better.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: The other OS
Date: 8 Aug 2011 14:30:14
Message: <4e402b36@news.povray.org>
On 8/8/2011 10:34, Jim Henderson wrote:
> On Mon, 08 Aug 2011 09:31:50 -0400, Warp wrote:
>
>>    Real programmers use edlin anyways.
>
> Pah, edlin.  Real programmers use copy con: ;)

pip main.cpp=con:

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Patrick Elliott
Subject: Re: The other OS
Date: 8 Aug 2011 15:15:04
Message: <4e4035b8$1@news.povray.org>
>>> I also figured that the only reason that you can (say) embed an Excel
>>> spreadsheet in a Word document is because both products are produced
>>> by the same company.
>>
>> No no no. That's the whole *point* of COM. That's why there's a standard
>> interface definition language and such.
>
> See, I've always assumed that the glitering world of native Windows
> GUIs, IPC, DLLs, COM, etc. are all behind closed doors, accessible only
> to people who know how to write really low-level Windows code. And I've
> always assumed that the really /good/ stuff (like embedding one
> application inside another) is accessible only to Microsoft themselves.
> (Or anybody who pays really vast sums of money. People like Symantec.)
>
In reality, if you know what you are doing, and your own application 
supports it properly, you can even link things within VBScript. The 
problem being that "some" functionality gets seriously screwy, if its 
not right, and MS' explanation on how to do it is... less than helpful. 
I seem to remember that the example they had for doing it super-low 
level, which you need for full functionality of "embeddable" objects, 
like MS' own picture object, only showed how to instance a single 
object, not handle them as a collection, or respond to clicks and other 
effects on *all* of them at the same time. But, if you use IE, or even 
their shell script system, these things are handled by code already set 
up to do that sort of thing. Same if you are using a compiled language, 
like the full VB (not the script).

All in all, while, in principle, you can do all sorts of fancy shit with 
them, its still easier, unless you know how to do all the object 
collection, respond to stuff instanced "after" the application is 
running, i.e., late linked, without the application knowing before hand 
what the interfaces are, etc., then your prior assumption is pretty 
close to accurate. If all you are trying to do is say, link to an excel 
document, to pull out a few known cells of data, to do other 
calculations, but you don't have to actually "display" the page, its 
damn simple. Otherwise, you end up pulling your hair out trying to find 
example code of how to actually do that stuff, if your "intent" is to 
access it using late binding, which, as I said, means that your program 
doesn't already "know" how to handle some of the interfaces, but has to 
set them up once running.

Mostly, the problems in that case all come down to "your" application 
responding to messages from the control though. Which is why a spreed 
sheet can be "read", but not displayed easily. The former requires 
merely making a request, which is "immediately" returned, via the 
request itself. Displaying it require telling it who the "parent window" 
will be, then trying to get your application to "see" messages via the 
Windows messaging system, which tell it where you clicked, what you 
moved, etc. Your own application is effectively blind to these, without 
some serious behind the scenes support, or unless you "prelinked" the 
object, i.e., added it as part of the project, instead of creating the 
connection later. This is especially obvious when you run the VBScript 
engine in your own application, only to discover that it has 
CreateObject, but that the, "Let clicks and things be handled for this 
object", function is actually an IE feature, not something in the script 
engine itself, so you have to somehow design one for yourself. The last 
time I tried to figure that one out I gave up when the guy writing the 
client that used scripting implemented the features directly anyway. lol


Post a reply to this message

From: Stephen
Subject: Re: The other OS
Date: 8 Aug 2011 17:38:00
Message: <4e405738$1@news.povray.org>
On 08/08/2011 7:29 PM, Darren New wrote:
> On 8/8/2011 10:55, Stephen wrote:
>> Also when dragged it moved in steps. Strange!
>
> Welcome to amateur Win98 software running on a different CPU with a
> different OS architecture with a different window manager! :-)
>

:-)

> Seriously, get one that's less than 10 years old and it'll probably work
> better.
>

I've got XVI32bit.exe that seems okay. I can't remember why I downloaded 
it but I did.

http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

-- 
Regards
     Stephen


Post a reply to this message

From: Jim Henderson
Subject: Re: The other OS
Date: 8 Aug 2011 17:46:12
Message: <4e405924@news.povray.org>
On Mon, 08 Aug 2011 11:30:13 -0700, Darren New wrote:

> On 8/8/2011 10:34, Jim Henderson wrote:
>> On Mon, 08 Aug 2011 09:31:50 -0400, Warp wrote:
>>
>>>    Real programmers use edlin anyways.
>>
>> Pah, edlin.  Real programmers use copy con: ;)
> 
> pip main.cpp=con:

Now that one I haven't heard before....what's its origin?

Jim


Post a reply to this message

<<< Previous 50 Messages Goto Latest 50 Messages Next 30 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.