June 10, 2013 reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Hi folks, There's an interesting discussion going on at Reddit about choosing a replacement language for 0install: http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/ I've tried to do a bit of D advocacy there, but there's more to be done. :) If you have a few moments to dispel some D myths, and contribute constructively to the discussion, please take a look! Best, Graham |
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Graham Fawcett | On Monday, 10 June 2013 at 18:25:05 UTC, Graham Fawcett wrote:
> Hi folks,
>
> There's an interesting discussion going on at Reddit about choosing a replacement language for 0install:
>
> http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/
>
> I've tried to do a bit of D advocacy there, but there's more to be done. :) If you have a few moments to dispel some D myths, and contribute constructively to the discussion, please take a look!
>
> Best,
> Graham
I don't know how to make this test on Windows (current OS). But he uses this to test that failure to print hello correctly indicates failure.
./hello 1< /dev/null; echo Exit status: $?
And Rust is the only one to pass in his list (ATS, C#, Go, Haskell, OCaml, Python)
|
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Graham Fawcett | Graham Fawcett: > http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/ I was about to link that Reddit thread here myself :-) The original article proposes to translate to your language this little piece of Python+libs and measure its speed, safety in presence of errors, etc: #!/usr/bin/env python import os, sys, json envname = os.path.basename(sys.argv[0]) args = json.loads(os.environ["0install-runenv-" + envname]) os.execv(args[0], args + sys.argv[1:]) Later he proposes other means to measure a language quality. Overall the comparison is quite interesting, despite several methodological problems. Bye, bearophile |
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Monday, 10 June 2013 at 20:51:16 UTC, Jesse Phillips wrote: > On Monday, 10 June 2013 at 18:25:05 UTC, Graham Fawcett wrote: >> Hi folks, >> >> There's an interesting discussion going on at Reddit about choosing a replacement language for 0install: >> >> http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/ >> >> I've tried to do a bit of D advocacy there, but there's more to be done. :) If you have a few moments to dispel some D myths, and contribute constructively to the discussion, please take a look! >> >> Best, >> Graham > > I don't know how to make this test on Windows (current OS). But he uses this to test that failure to print hello correctly indicates failure. > > ./hello 1< /dev/null; echo Exit status: $? > > And Rust is the only one to pass in his list (ATS, C#, Go, Haskell, OCaml, Python) If you want to know what happens on my linux box 1 module hellotest; 2 3 import std.stdio; 4 5 void main() 6 { 7 writeln("hello world."); 8 } anthony@LinuxGen12:~/projects/temp$ ./hellotest hello world. anthony@LinuxGen12:~/projects/temp$ ./hellotest 1</dev/null; echo status : $? status : 0 anthony@LinuxGen12:~/projects/temp$ |
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Graham Fawcett | On Monday, 10 June 2013 at 18:25:05 UTC, Graham Fawcett wrote:
> Hi folks,
>
> There's an interesting discussion going on at Reddit about choosing a replacement language for 0install:
>
> http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/
>
> I've tried to do a bit of D advocacy there, but there's more to be done. :) If you have a few moments to dispel some D myths, and contribute constructively to the discussion, please take a look!
>
> Best,
> Graham
Be careful with advocating D too much, I think what with the very positive but visible D conference coverage we don't want to seem like zealous fanboys. It may be better to let discussion of D cool off for a while, then return when there is something new and cool to show rather than get into arguments over Rust vs D. Those will only degenerate and make D users look bad.
This is important- it reflects on the users and the language and can very easily turn people away while single misinformed comments will not be noticed by all that many people.
Don't rubbish Rust. Comparisons quickly and easily turn negative.
|
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anthony Goins | On Monday, 10 June 2013 at 22:06:29 UTC, Anthony Goins wrote:
> If you want to know what happens on my linux box
>
> 1 module hellotest;
> 2
> 3 import std.stdio;
> 4
> 5 void main()
> 6 {
> 7 writeln("hello world.");
> 8 }
>
> anthony@LinuxGen12:~/projects/temp$ ./hellotest
> hello world.
> anthony@LinuxGen12:~/projects/temp$ ./hellotest 1</dev/null; echo status : $?
> status : 0
> anthony@LinuxGen12:~/projects/temp$
So D fails the test too. But now that I think about it, isn't /dev/null where you write data to a black hole... maybe he meant /dev/zero
|
June 10, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to ixid | ixid:
> Be careful with advocating D too much, I think what with the very positive but visible D conference coverage we don't want to seem like zealous fanboys.
Right.
A better idea is to port the proposed code to D, count how many points it gets, and show all of it in the Reddit thread.
Bye,
bearophile
|
June 11, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On 6/10/2013 4:26 PM, Jesse Phillips wrote:
> On Monday, 10 June 2013 at 22:06:29 UTC, Anthony Goins wrote:
>> If you want to know what happens on my linux box
>>
>> 1 module hellotest;
>> 2
>> 3 import std.stdio;
>> 4
>> 5 void main()
>> 6 {
>> 7 writeln("hello world.");
>> 8 }
>>
>> anthony@LinuxGen12:~/projects/temp$ ./hellotest
>> hello world.
>> anthony@LinuxGen12:~/projects/temp$ ./hellotest 1</dev/null; echo status : $?
>> status : 0
>> anthony@LinuxGen12:~/projects/temp$
>
> So D fails the test too. But now that I think about it, isn't /dev/null where
> you write data to a black hole... maybe he meant /dev/zero
Yeah, I thought /dev/null was a bit bucket. D shouldn't fail on writing to that, and didn't.
|
June 11, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tuesday, 11 June 2013 at 00:27:28 UTC, Walter Bright wrote:
> On 6/10/2013 4:26 PM, Jesse Phillips wrote:
>> So D fails the test too. But now that I think about it, isn't /dev/null where
>> you write data to a black hole... maybe he meant /dev/zero
>
> Yeah, I thought /dev/null was a bit bucket. D shouldn't fail on writing to that, and didn't.
The command actually redirects /dev/null to fd 1 as an *input* stream, thus rendering it non-writable.
David
|
June 11, 2013 Re: reddit discussion on replacing Python in 0install | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On 6/10/2013 5:35 PM, David Nadlinger wrote:
> On Tuesday, 11 June 2013 at 00:27:28 UTC, Walter Bright wrote:
>> On 6/10/2013 4:26 PM, Jesse Phillips wrote:
>>> So D fails the test too. But now that I think about it, isn't /dev/null where
>>> you write data to a black hole... maybe he meant /dev/zero
>>
>> Yeah, I thought /dev/null was a bit bucket. D shouldn't fail on writing to
>> that, and didn't.
>
> The command actually redirects /dev/null to fd 1 as an *input* stream, thus
> rendering it non-writable.
Ah, I see. In that case, writeln should have thrown an exception. Should submit a bug report.
|
Copyright © 1999-2021 by the D Language Foundation