The end to all language wars and the great unity API to come!

C

Chris Angelico

In my experience, it's been the GUIs that are awful and the backend
stuff that's been good in Windows.

Suppose I gave you a computer that had GNOME ported to Windows, and
used the purplish palette that Ubuntu 10.10 uses, and had a Windows
port of bash as its most convenient terminal. Members of this list
will doubtless have no problem duck-typing that as a Linux box (to the
extent of being quite surprised on seeing something that functions
differently).

What is Microsoft selling? They're a company, which means they need to
keep selling stuff year after year. What's saleable in Windows? Is it
the kernel? Maybe, but only by its specs. Far more saleable is the
user-facing parts of the system. Sell them a pretty new GUI with
transparent windows. Sell 'em a fancy new Office that looks and feels
different. Sell a development package that lets programmers use these
same facilities in their own code.

(And of course, sell them bug fixes, by declaring end-of-life on older
products and forcing everyone to move up. But that's different.)

Since XP, the Windows kernel has been mostly reliable. I've had
programs go wrong, and (eventually) managed to kill the process, upon
which everything cleans up fairly nicely. Not that that's really a
boast-worthy feature; I'd call it mandatory these days.

The main reason I would recommend unifying kernels is simplicity. Let
Microsoft play with, and sell, pretty GUIs and pretty apps. Let
someone else worry about what's underneath. As an advantage, it would
then become possible to buy a copy of Windows, run it *under Linux*,
and treat it like a VMWare window.

But it's not likely to happen, and I'm not 100% convinced it'd really
be a good idea (see DNS root servers argument from earlier). It would
make cross-compilation a lot easier, though!

Chris Angelico
 
A

Andrew Berg

Suppose I gave you a computer that had GNOME ported to Windows, and
used the purplish palette that Ubuntu 10.10 uses, and had a Windows
port of bash as its most convenient terminal. Members of this list
will doubtless have no problem duck-typing that as a Linux box (to the
extent of being quite surprised on seeing something that functions
differently).
I would love to see a fully functional KDE running on Windows (this is
being worked on, but development has been slow and rough). I was talking
about GUI design, though, not just the aesthetics of a window manager
and widgets.
A recent version of bash working on Windows would be nice too, but IMO,
MS should be actively promoting PowerShell. It's not that PowerShell is
a superior scripting language to bash, but that it's integrated with WMI
and is therefore much more convenient for admin stuff.
What is Microsoft selling? They're a company, which means they need to
keep selling stuff year after year. What's saleable in Windows? Is it
the kernel? Maybe, but only by its specs. Far more saleable is the
user-facing parts of the system. Sell them a pretty new GUI with
transparent windows. Sell 'em a fancy new Office that looks and feels
different. Sell a development package that lets programmers use these
same facilities in their own code.
I think the reason MS has been creating good sysadmin tools lately is
that it's feeling competition from Linux/Unix server solutions. If they
can make a Windows domain admin's job easier, they're more likely to
sell their OS.
As for the end-user side of Windows (and their office suite), AFAICT,
they're still pretty complacent with their market share and only change
things up for the sake of difference. Since the GUI is the most
noticeable part of the software, that's what gets changed.
Since XP, the Windows kernel has been mostly reliable. I've had
programs go wrong, and (eventually) managed to kill the process, upon
which everything cleans up fairly nicely. Not that that's really a
boast-worthy feature; I'd call it mandatory these days. I agree.
Let
Microsoft play with, and sell, pretty GUIs and pretty apps.
I completely disagree. MS sucks at making GUIs.
 
D

Dennis Lee Bieber

Beliefs aren't subjective. One's taste in music, for example, is
largely subjective and can't be right or wrong, but a belief (which has
to do with facts) certainly can be.

Pardon????

Most "beliefs" that I've encountered do their best to ignore any
facts that contradict the belief. "Facts" imply testable evidence,
hypotheses, eventual theorems...
 
D

Dennis Lee Bieber

Democracy DOES NOT WORK. Plain and simple. You cannot build a
programming language democratically.
Uhm... COBOL and Ada may be close... They were committee/competition
where the best (compromise) aspect was selected for inclusion...
 
A

Andrew Berg

I disagree. The stuff endusers tend to use is polished to some
extent, but the backend is verging on hideous. If a developer
complains about the ugly internal structure "yeah, but you say that
just because you're a computer person / geek."
Admittedly, I haven't tried to do a whole lot of development with the
Windows APIs, and I certainly haven't tried to develop any software
that's heavily tied to the kernel, so I could be wrong in this area.
Could you elaborate?
Yes, the NT kernel still has some
long standing bugs, but MS has done well with things that matter to
sysadmins. chkdsk, for example, has been around for ages, but I still
don't know of anything that really beats it.


How about FreeBSD's ability to check a filesystem while it's in use?
Actually, I meant in Windows, as in there aren't any 3rd-party tools
that really trump chkdsk for repairing NTFS volumes. I should've
clarified that. However, that sounds like an awesome feature (though I'm
not going to switch to FreeBSD just for that).
I've only had a small
amount of experience with it so far, but Powershell seems to be an
excellent tool for admin scripting since it interfaces with WMI so
well.


I worked with PowerShell for about a year (after an acquisition by
Microsoft), before eagerly diving back to Python. Here are some of my
notes about the problems in PowerShell:
Did you encounter these issues with PowerShell 2? I know MS put a lot of
work into fixing and adding features to PowerShell 1, but like I said, I
haven't had much experience with it.
 
A

Andrew Berg

Pardon????

Most "beliefs" that I've encountered do their best to ignore any
facts that contradict the belief. "Facts" imply testable evidence,
hypotheses, eventual theorems...
I didn't say people were objective. A belief is quite similar to a
statement of fact. Whether the statement is true or false or even
objectively reached isn't relevant to the definition.
 
C

Chris Angelico

I completely disagree. MS sucks at making GUIs.

I never said they were good at making GUIs. I said they were good at
selling GUIs.

Dan is right about the ugliness of the Windows APIs. There are
innumerable anomalies between otherwise-similar functions, weird
behaviours that may and may not have historical precedent, and enough
hair-pulling fuel to turn you bald in a week. Also, and possibly more
serious, the security features that Windows has mostly seem to have
been monkey-patched in; and there are ridiculous vulnerabilities just
waiting to be exploited. The WM_TIMER message can be sent by any
process to any process, and one of its parameters is the address of a
callback - and voila, other process starts executing code at that
address. And this works even if the program doesn't use timers.

ChrisA
 
C

Chris Angelico

       Uhm... COBOL and Ada may be close... They were committee/competition
where the best (compromise) aspect was selected for inclusion...

And are they what you would call good languages?

A committee isn't the same as democracy, although it is related. If
you have two people making a decision, you potentially pull things in
two directions. If you have two million people making a decision, you
tear it to pieces.

Vision for a language (or any other project) cannot come from a
mandate from the masses. I'm waiting for my aquatic ceremony before I
start building a language.

ChrisA
 
Joined
Jul 1, 2011
Messages
4
Reaction score
0
Hi everyone,

Just joined today and I am sooooo excited.

it is great to join this Forum, hope i'm welcome in...
grey.png
 
G

Gregory Ewing

rantingrick said:
I was thinking more about this comment and it occurred to me that
Python does have user controlled data structures. Just because there
is no "top level syntax" like ruby does not mean these do not exists.

Syntax is what it's really about, though. There's no clear
dividing line, but when Guido says he's opposed to "user
defined syntax" he's talking about things like Lisp macros,
which let you effectively extend the grammar with new
keywords and syntactic structures.

Compared to that, Python's grammar is very much fixed.
Anything you want to do has to be done within the existing
framework of function calls, attribute references etc.

If Python truly had user-defined syntax, it wouldn't have
been necessary to modify the compiler to implement features
such as list comprehensions and with-statements -- those
features could have been implemented, with the *same
syntax* or something close to it, in the base language.
 
G

Gregory Ewing

rantingrick said:
Something to replace Python, Ruby, Perl,
JavaScript, etc, etc not some "pie-in-the-sky", "single-answer-to-all-
our-problems" pipe dream language.

So it's just a "single-answer-to-all-our-glue-programming"
pipe dream language, then? :)
 
S

Steven D'Aprano

rantingrick said:
How is giving the sort method a function by which to determine the
relative value of objects a control structure? Do you know what a control
structure is? It's something that you use to modify control flow:

if foo <= bar:
foo += 1
else:
bar += 1

Interesting, corey. Very interesting. However the fun is yet to come
so stay tuned...
That's a control structurem the "if-else". I don't know what Ruby calls a
control structure, but that's what it is. for and while are in there too.
When you run lst.sort(lambda x, y: cmp(x[1], y[1])), what happens?

So are you suggesting that a control structure must have at minimum
one of "for", "while", or "if"?

A control structure is a structure which controls the program flow. Control
structures include:

* jumps (goto, gosub, comefrom, exceptions, break, continue)

* loops (for, while, repeat...until)

* conditional branches (if, case/switch)

There may be others, although I can't think of any of hand. Jumping, looping
and branching pretty much covers all the bases, I think.

It excludes expressions such as ternary-if, because that doesn't control
program flow, it's just an expression.

A function which includes a control structure inside it is not itself a
control structure, in the same way that the existence of bones inside you
does not make you a bone.


[...]
Yes there IS and "if" in there and IF you look closely enough you may
see two "for"'s also. So by your own definition this (naive) code
qualifies as a control structure.

I see what you did there. First you put words into Cory's mouth that he did
not say, they you try to criticise him based on those words -- YOUR words.

No Rick, that's your definition, not Cory's. Please do not treat us as
stupid.


But wait just a second Corey. My statement has nothing to do with
sort. sort is just the vehicle. My statement is that the cmp argument
to sort IS a user defined control structure (the code block to be
exact).

The cmp argument to sort is not a control structure because it is not a
structure and it does not control the program flow.
 
S

Steven D'Aprano

sal said:
How could a belief be wrong?

I believe you are a small glass of beer. Are you *actually* a small glass of
beer in reality? If so, my belief is right. If you are a human being, then
my belief is wrong.
 
S

Steven D'Aprano

rantingrick said:
You want features? And remember i am talking about scripting/glue
level languages here. Something to replace Python, Ruby, Perl,
JavaScript, etc, etc not some "pie-in-the-sky", "single-answer-to-all-
our-problems" pipe dream language.

* Intuitive syntax.

Intuitive to who?

Newbies? Then you get a language like Hypertalk, that experienced
programmers hate.

Experienced C programmers? Then you get something like Java.

Forth programmers? Then you get something like Arc, that nobody except Paul
Graham uses. (Not literally, no offence to anyone who likes Arc.)

System administrators? They you get something like Perl. ("It's like bash
scripting only better!")

Mathematicians? Then you get something like Haskell.

Non-programmers? Then you could get anything from Inform7, to Applescript,
to Resolver's Python-in-a-spreadsheet, to Pascal, to FoxPro, to Flash, to
Javascript, to Mathematica... depending on *which* non-programmers you are
aiming at.

* Productivity friendly.

That covers everything from Excel to Lisp, depending on who you ask.

* Complex enough to solve large problems but simple enough for simple
problems (that does include extending into C when needed)

But if you are designing the "perfect language", what do you need C for? C
will no longer exist, except in museums, because Rick's perfect language
will be used for everything.
* Multi paradigm (problem

Which is guaranteed to annoy those who believe that paradigms A, C, D and E
are harmful and should be avoided... the only problem is that there is no
broad agreement on which paradigm B is non-harmful.

* Promotes a culture of code readability (because people read source;
not just machines!).

Define readability.

Hypertalk, Python, Inform7 and Pascal are all readable, in radically
different ways.

Hmm. Just think how far ahead we would be if these folks would stop
trying to support petty differences and focus on a singular Python
language?

These are not "petty differences", but real differences that are important
to people who have actually work to do.

A sushi chef needs a different sort of knife to a brain surgeon, both of
which are different to that needed by a special forces soldier deep in
enemy territory, which is different again to the sort of knife is needed by
some guy working in a warehouse unpacking boxes. Different jobs need
different tools.

There is no perfect language because different tasks need different tools,
and any compromise tool that tries to do everything will be weaker than a
specialist tool.
 
R

rantingrick

A control structure is a structure which controls the program flow. Control
structures include:

* jumps (goto, gosub, comefrom, exceptions, break, continue)

* loops (for, while, repeat...until)

* conditional branches (if, case/switch)

-------------------------------------------
THIS CODE RESULTS IN A CONTROL STRUCTURE!

--> lst.sort(lambda x,y: cmp(x[1], y[1]))
-------------------------------------------

I am using a user defined spec as an argument to the cmp function.
That spec then modifies the body of the compare function and creates a
user defined control structure. You can argue all day that it is not a
user defined control structure but no one is going to believe you.
A function which includes a control structure inside it is not itself a
control structure,

Of course the FUNCTION is not a control structure (not directly). No
wonder you are confused. It's the FUNCTION BODY that is the control
structure. The function body that has been modified by my arguments to
the cmp function. But in a way, you can say the function OWNS the code
block so it is itself a control structure. Still confused? Read on...
in the same way that the existence of bones inside you
does not make you a bone.

Bad analogy. See last comment.
I see what you did there. First you put words into Cory's mouth that he did
not say, they you try to criticise him based on those words -- YOUR words..

I quoted Corey exactly. And why do you feel the need to answer for
him?
The cmp argument to sort is not a control structure because it is not a
structure and it does not control the program flow.

Again you lack simple reading and comprehension skills. It's not the
argument that is the control structure itself. The argument is just
the SPEC for creating a control structure. The control structure is
the modified CODE BLOCK owned by the "CMP" function.

The modified code block owned by the cmp function-- defined by the
user through an argument spec-- controls the return value to the list
sort method. USER DEFINED CONTROL STRUCTURE. Plain and simple. I don't
think i can use any simpler terms to describe it.

Give it up man and admit i am correct and you are wrong.
 
S

Steven D'Aprano

No it doesn't.

How does it change the program flow? You call the sort method, it sorts, and
execution continues at the next statement. Regardless of whether you supply
a cmp function or not, the program flow is identical:

ENTER SORT ROUTINE
PERFORM SORTING
EXIT SORT ROUTINE

There is no control transferred. It is a linear program flow: in, do the
job, out again. Since it doesn't modify the program flow, it is not a
control structure.

"Perform sorting" is a black box. It could have loops, branches,
unconditional exists. It could have COMEFROM statements up the wazoo, if it
were implemented in a language with COMEFROM (like Intercal). None of that
matters two bits: the caller cannot use sort to modify the execution
sequence around it, therefore it's not a control structure. No matter how
much the sort routine jumps around internally, you can't use that change
program flow around it.

print surely is implemented with a loop: it has to loop over a string and
write it to stdout. Would you say that therefore print is a control
structure:

ENTER PRINT STATEMENT
PERFORM PRINTING
EXIT PRINT STATEMENT

One entry, one exit.
 
R

rantingrick

--> lst.sort(lambda x,y: cmp(x[1], y[1]))

No it doesn't.

How does it change the program flow? You call the sort method, it sorts, and
execution continues at the next statement. Regardless of whether you supply
a cmp function or not, the program flow is identical:

Not identical. The sort called WITHOUT a cmp argument will sort in a
predefined manner. The sort called WITH a cmp argument can modify the
existing code block in a way that suits a users desired result. A USER
DEFINED CONTROL STRUCTURE. Just because this realization breaks the
mold of everything you hold dear about user defined control structures
does not mean it is incorrect. For some reason you are religious about
this subject. Could it be that you are wrong?
ENTER SORT ROUTINE
PERFORM SORTING
EXIT SORT ROUTINE

True for the non-modified case.

False for the modified one...

ENTER SORT ROUTINE
PERFORM SORTING BASED ON USER DEFINED CONTROL
EXIT SORT ROUTINE
There is no control transferred. It is a linear program flow: in, do the
job, out again. Since it doesn't modify the program flow, it is not a
control structure.

So you are telling me that calling cmp(itemsA[idx], itemsB[idx]) is
exactly the same as cmp(itemsA[idx][-1], itemsB[idx[-1])? Please show
proof of this in code. You have just witnessed the power of user
defined control structures and it has rocked your little world. You
believed UDCS to be evil, all the while oblivious to your own everyday
usage of them. Now that's ironic. Cruel or poetic, you be the judge.
"Perform sorting" is a black box. It could have loops, branches,
unconditional exists. It could have COMEFROM statements up the wazoo, if it
were implemented in a language with COMEFROM (like Intercal). None of that
matters two bits: the caller cannot use sort to modify the execution
sequence around it, therefore it's not a control structure. No matter how
much the sort routine jumps around internally, you can't use that change
program flow around it.

The "jumping"(sic) around is controlled by a user defined spec. The
user is in control. The user made the definition. The cmp function
just implemented it.
print surely is implemented with a loop: it has to loop over a string and
write it to stdout. Would you say that therefore print is a control
structure:

ENTER PRINT STATEMENT
PERFORM PRINTING
EXIT PRINT STATEMENT

Nope. Print only takes an argument and spits out the result to
stdout.write. Print is an abstraction API for system.stdout.write, and
nothing more.
One entry, one exit.
As evident from all the BS you spew on a daily basis, apparently YOU
have one entry and one exit!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top