Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d

On 1/21/15 1:39 PM, Walter Bright wrote:

On 1/21/2015 8:23 AM, ketmar via Digitalmars-d wrote:

this simply not work.


Neither does Windows Moviemaker. It hung again on me.


Just FYI iMovie works just fine ;)


and not worth it.


WMM is over a decade old, and it still hangs doing something as simple
as trimming off the start and the end. And not rarely, either. It does
it constantly.


This is pretty bad. I remember in college we had a movie lab which had 
lots of hi-end PCs running NT 4.0, with, among other things, 3D-studio 
max. In the 3d-graphics class I took, one of our assignments was to use 
3DSM to animate something with certain requirements. The thing crashed 
so frequently that several students made 3d-animations focused on how 
horrible 3DSM was :)


When software you are using that is supposed to make things easier gets 
in the way, you may as well not use it.




Why even ship such a product you have no intention of fixing bugs for?
It's a net negative for one's image.



I wonder if it's for a bullet point. I know my sister-in-law has made 
videos with WMM (and she is NOT a techie), but they were simple movies. 
Perhaps if you want to do anything super-involved, it's not ready for 
the job.


Also, in one company I worked for, we had a paid contract with Microsoft 
for fixing bugs. I worked for months with them on a bug in one of their 
advanced server systems. In the end, they narrowed it down to the fact 
that the system required MSSQL express (not full version), which only 
worked with a shared-memory interface. Something in their server just 
didn't work right. So we had to install full-blown MSSQL which was 
configured only to use network connection. Then in about 6 months they 
discontinued that advanced server product. Then I rewrote the whole 
thing in Linux ;)


Sometimes I wonder if Microsoft is simply a marketing arm of other OSes...

But I am surprised MS does not have some way to get reasonable paid 
support for their software. Apple gives you 1 year free 
software/hardware support when you buy a Mac. I can fully understand not 
offering Free support. Not everyone is a Walter Bright.


-Steve


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Kagamin via Digitalmars-d
On Wednesday, 21 January 2015 at 08:41:47 UTC, Walter Bright 
wrote:
I wonder why software companies still make it impossible to 
submit bug reports. For example, google:


submit windows movie maker bug report

Click on Reporting and solving computer problems - Windows:

http://windows.microsoft.com/en-us/windows-vista/reporting-and-solving-computer-problems

Note that there is actually no way to report a problem to 
Microsoft, in spite of what the headings say.


supp...@microsoft.com? Just a wild guess.


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d

On 1/22/15 12:03 PM, Walter Bright wrote:

On 1/22/2015 4:44 AM, Steven Schveighoffer wrote:

But I am surprised MS does not have some way to get reasonable paid
support for
their software. Apple gives you 1 year free software/hardware support
when you
buy a Mac. I can fully understand not offering Free support. Not
everyone is a
Walter Bright.


I wasn't expecting support. Just a way to submit a bug report!



So you didn't want it to be fixed? ;)

-Steve


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Walter Bright via Digitalmars-d

On 1/22/2015 4:44 AM, Steven Schveighoffer wrote:

But I am surprised MS does not have some way to get reasonable paid support for
their software. Apple gives you 1 year free software/hardware support when you
buy a Mac. I can fully understand not offering Free support. Not everyone is a
Walter Bright.


I wasn't expecting support. Just a way to submit a bug report!



Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread ketmar via Digitalmars-d
On Wed, 21 Jan 2015 10:39:14 -0800
Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote:

 Why even ship such a product you have no intention of fixing bugs for? It's a 
 net negative for one's image.
ah, that's a different question! i don't know why they still shipping
it instead of providing link to virtualdub, for example.


signature.asc
Description: PGP signature


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Andrei Alexandrescu via Digitalmars-d

On 1/21/15 10:45 AM, Walter Bright wrote:

On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote:

there's plenty of video processing software in the free world.


About 10 years ago, I needed to edit a movie. I downloaded about 10
different video editors. Every one would hang, crash, go berserk,
generate corrupt files, etc. I didn't do anything clever, just to trim,
cut and paste. I never even bothered to try anything more advanced.

I eventually gave up and did the editing with a standalone dvd recorder.

It left such bad taste I was unwilling to try it again until recently.
I'm disgusted that the problems remain. How hard can it be?


10 years is a long time -- Andrei


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 8:23 AM, ketmar via Digitalmars-d wrote:

this simply not work.


Neither does Windows Moviemaker. It hung again on me.


and not worth it.


WMM is over a decade old, and it still hangs doing something as simple as 
trimming off the start and the end. And not rarely, either. It does it constantly.


Why even ship such a product you have no intention of fixing bugs for? It's a 
net negative for one's image.




Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote:

there's plenty of video processing software in the free world.


About 10 years ago, I needed to edit a movie. I downloaded about 10 different 
video editors. Every one would hang, crash, go berserk, generate corrupt files, 
etc. I didn't do anything clever, just to trim, cut and paste. I never even 
bothered to try anything more advanced.


I eventually gave up and did the editing with a standalone dvd recorder.

It left such bad taste I was unwilling to try it again until recently. I'm 
disgusted that the problems remain. How hard can it be?


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 10:53 AM, Andrei Alexandrescu wrote:

On 1/21/15 10:45 AM, Walter Bright wrote:

It left such bad taste I was unwilling to try it again until recently.
I'm disgusted that the problems remain. How hard can it be?


10 years is a long time -- Andrei


Right, which is why I'm disgusted that I still cannot trim the left and right 
edges off.


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 11:03 AM, Brad Roberts via Digitalmars-d wrote:

I'll note, for what it's worth, that there's open bug reports against D that are
almost 9 years old... oldest open bug was filed in May of 2006.  Some of them
fairly fundamental.


All software has bugs. But trimming a video is the most basic operation one 
would like to use a video editor for, and there's no workaround for it not working.




Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 21, 2015 at 10:45:26AM -0800, Walter Bright via Digitalmars-d wrote:
 On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote:
 there's plenty of video processing software in the free world.
 
 About 10 years ago, I needed to edit a movie. I downloaded about 10
 different video editors. Every one would hang, crash, go berserk,
 generate corrupt files, etc. I didn't do anything clever, just to
 trim, cut and paste. I never even bothered to try anything more
 advanced.
 
 I eventually gave up and did the editing with a standalone dvd
 recorder.
 
 It left such bad taste I was unwilling to try it again until recently.
 I'm disgusted that the problems remain. How hard can it be?

Maybe you should write a superior video editor in D. :-) That might be
the killer app D has been waiting for. :-P


T

-- 
Those who don't understand D are condemned to reinvent it, poorly. -- Daniel N


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Brad Roberts via Digitalmars-d

On 1/21/2015 10:53 AM, Andrei Alexandrescu via Digitalmars-d wrote:

On 1/21/15 10:45 AM, Walter Bright wrote:

On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote:

there's plenty of video processing software in the free world.


About 10 years ago, I needed to edit a movie. I downloaded about 10
different video editors. Every one would hang, crash, go berserk,
generate corrupt files, etc. I didn't do anything clever, just to trim,
cut and paste. I never even bothered to try anything more advanced.

I eventually gave up and did the editing with a standalone dvd recorder.

It left such bad taste I was unwilling to try it again until recently.
I'm disgusted that the problems remain. How hard can it be?


10 years is a long time -- Andrei


I'll note, for what it's worth, that there's open bug reports against D 
that are almost 9 years old... oldest open bug was filed in May of 2006. 
 Some of them fairly fundamental.


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Andrei Alexandrescu via Digitalmars-d

On 1/21/15 1:14 AM, Joakim wrote:

On Wednesday, 21 January 2015 at 08:41:47 UTC, Walter Bright wrote:

On 1/21/2015 12:19 AM, Russel Winder via Digitalmars-d wrote:

The Emacs D-Mode will only improve if people provide bug reports and
fixes. A number of people are doing this for their pain points. If the
Emacs D-Mode is substandard for you, can you at least submit issues
presenting the problems.


I wonder why software companies still make it impossible to submit bug
reports. For example, google:

submit windows movie maker bug report

Click on Reporting and solving computer problems - Windows:

http://windows.microsoft.com/en-us/windows-vista/reporting-and-solving-computer-problems


Note that there is actually no way to report a problem to Microsoft,
in spite of what the headings say.


Heh, considering Bill Gates couldn't even figure out how to _download_
Movie Maker a decade ago, you're way ahead of the game: ;)

http://blog.seattlepi.com/microsoft/2008/06/24/full-text-an-epic-bill-gates-e-mail-rant/


Yah, that's a good read. FWIW the right answer here is to vote with 
one's feet - there's plenty of video processing software in the free world.



I find this utterly baffling. Why make it so difficult to report a
bug? Microsoft has always been like this, the only way I've ever been
able to submit a bug report was if I had a friend on the inside who'd
carry it in for me.

This is probably why Windows Movie Maker is such a buggy program. It
hangs constantly, generates corrupt files when creating a movie file
longer than 2G (about 2 hours), etc.


Probably because Microsoft has so many millions of users that their bug
tracker would be awash with noise.


Even better. At Facebook we use statistics and machine learning to 
derive excellent signal from large inputs.



Andrei



Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread ketmar via Digitalmars-d
On Wed, 21 Jan 2015 00:40:48 -0800
Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote:

 I find this utterly baffling. Why make it so difficult to report a bug? 
 Microsoft has always been like this, the only way I've ever been able to 
 submit 
 a bug report was if I had a friend on the inside who'd carry it in for me.
 
 This is probably why Windows Movie Maker is such a buggy program. It hangs 
 constantly, generates corrupt files when creating a movie file longer than 2G 
 (about 2 hours), etc.
if they will allow public bugreports, they will have zillions
bugreports like i pressed that button and it doesn't do that! --
literally. and they will need to hire special man who will be able to
sort that bugreports. and he should be developer himself to see if that
report can be used or must be moved to /dev/null. and...

this simply not work. and not worth it.


signature.asc
Description: PGP signature


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-21 Thread Danni Coy via Digitalmars-d
regular expression search FunctionName.*\{ or FunctionName.*$\s*\{
depending on brace style

On Wed, Jan 21, 2015 at 4:37 AM, Joakim via Digitalmars-d
digitalmars-d@puremagic.com wrote:
 On Tuesday, 20 January 2015 at 00:13:37 UTC, Brian Schott wrote:

 On Monday, 19 January 2015 at 22:49:41 UTC, Ary Borenszweig wrote:

 So... how do you search for a function definition in D without an IDE?


 Running `dscanner --help` prints this:

 --declaration | -d symbolName [sourceFiles sourceDirectories]
 Find the location where symbolName is declared. This should be more
 accurate than grep. Searches the given files and directories, or the
 current working directory if none are specified.


 ^
 THIS!

 I agree with Ary that grep hits a lot of false positives and all the
 formatting tricks don't work with other people's code, plus I've never liked
 IDES.  Dscanner's D declaration finder has become indispensable in the short
 time I've been using it, to the point where I dread going back to searching
 for C declarations and getting stuck with grep again.


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 1:14 AM, Joakim wrote:

Probably because Microsoft has so many millions of users that their bug tracker
would be awash with noise.  Google allows anybody with a google account to post
bugs or comment on them for Chrome and Android, which has led to a ton of noise
on their public bug trackers, along with the benefit of a bunch of bug reports
they'd otherwise never have gotten:

https://code.google.com/p/chromium/issues/list
https://code.google.com/p/android/issues/list

Is it worth the tradeoff?  Maybe not for them, considering the many untriaged
bugs on their trackers, which they haven't bothered putting somebody on 
filtering.


I don't see how Microsoft can afford to miss those important reports. Sure, 
there'll be a lot of noise, but you just put someone on there to filter them. 
And besides, with all the vaunted machine intelligence we've been hearing about 
lately, surely some sort of automated filter could be devised.


For example, one could automatically filter out borderline illiterate 
submissions, and close duplicates.


Or one could make it a public tracker, and let the crowd filter them, sort of 
like reddit.


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 12:59 AM, Russel Winder via Digitalmars-d wrote:

Whereas for Emacs D-Mode you rock up to

https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/issues


and post. There is no guarantee of action though since there is no-one
paid to do support, it's all volunteer activity. However a number of
people do hack on the ELisp and fix things.


And that's the way to do it!



Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Russel Winder via Digitalmars-d
Whereas for Emacs D-Mode you rock up to 

https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/issues


and post. There is no guarantee of action though since there is no-one
paid to do support, it's all volunteer activity. However a number of
people do hack on the ELisp and fix things.

All commits to the mainline end up with a new release to MELPA, so
anyone using Emacs 24 or later with package management has the most
up-to-date D-Mode.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Russel Winder via Digitalmars-d
On Tue, 2015-01-20 at 20:30 +, Jonathan Marler via Digitalmars-d
wrote:
[…]
 Which editor do you use?  I use emacs.  It has some quirks.  The 
 D-Mode doesn't work very well (I end up using Notepad++ when 
 working on phobos/druntime), but I can use it on every platform 
 and over a remote tty so I deal with its imperfections.

The Emacs D-Mode will only improve if people provide bug reports and
fixes. A number of people are doing this for their pain points. If the
Emacs D-Mode is substandard for you, can you at least submit issues
presenting the problems.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Walter Bright via Digitalmars-d

On 1/21/2015 12:19 AM, Russel Winder via Digitalmars-d wrote:

The Emacs D-Mode will only improve if people provide bug reports and
fixes. A number of people are doing this for their pain points. If the
Emacs D-Mode is substandard for you, can you at least submit issues
presenting the problems.


I wonder why software companies still make it impossible to submit bug reports. 
For example, google:


submit windows movie maker bug report

Click on Reporting and solving computer problems - Windows:

http://windows.microsoft.com/en-us/windows-vista/reporting-and-solving-computer-problems

Note that there is actually no way to report a problem to Microsoft, in spite of 
what the headings say.


I find this utterly baffling. Why make it so difficult to report a bug? 
Microsoft has always been like this, the only way I've ever been able to submit 
a bug report was if I had a friend on the inside who'd carry it in for me.


This is probably why Windows Movie Maker is such a buggy program. It hangs 
constantly, generates corrupt files when creating a movie file longer than 2G 
(about 2 hours), etc.




Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-21 Thread Joakim via Digitalmars-d
On Wednesday, 21 January 2015 at 08:41:47 UTC, Walter Bright 
wrote:

On 1/21/2015 12:19 AM, Russel Winder via Digitalmars-d wrote:
The Emacs D-Mode will only improve if people provide bug 
reports and
fixes. A number of people are doing this for their pain 
points. If the
Emacs D-Mode is substandard for you, can you at least submit 
issues

presenting the problems.


I wonder why software companies still make it impossible to 
submit bug reports. For example, google:


submit windows movie maker bug report

Click on Reporting and solving computer problems - Windows:

http://windows.microsoft.com/en-us/windows-vista/reporting-and-solving-computer-problems

Note that there is actually no way to report a problem to 
Microsoft, in spite of what the headings say.


Heh, considering Bill Gates couldn't even figure out how to 
_download_ Movie Maker a decade ago, you're way ahead of the 
game: ;)


http://blog.seattlepi.com/microsoft/2008/06/24/full-text-an-epic-bill-gates-e-mail-rant/

I find this utterly baffling. Why make it so difficult to 
report a bug? Microsoft has always been like this, the only way 
I've ever been able to submit a bug report was if I had a 
friend on the inside who'd carry it in for me.


This is probably why Windows Movie Maker is such a buggy 
program. It hangs constantly, generates corrupt files when 
creating a movie file longer than 2G (about 2 hours), etc.


Probably because Microsoft has so many millions of users that 
their bug tracker would be awash with noise.  Google allows 
anybody with a google account to post bugs or comment on them for 
Chrome and Android, which has led to a ton of noise on their 
public bug trackers, along with the benefit of a bunch of bug 
reports they'd otherwise never have gotten:


https://code.google.com/p/chromium/issues/list
https://code.google.com/p/android/issues/list

Is it worth the tradeoff?  Maybe not for them, considering the 
many untriaged bugs on their trackers, which they haven't 
bothered putting somebody on filtering.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Kagamin via Digitalmars-d

On Monday, 19 January 2015 at 20:51:03 UTC, Alexey T. wrote:
Will be much easier to read Source, if func declarataion begins 
with keyword. def of func. e.g.


func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with 
compatability of old syntad (C like where typeOfResult is 1st 
id).


Why reinvent pascal, but worse? Just go with it: 
http://freepascal.org/


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Steven Schveighoffer via Digitalmars-d

On 1/19/15 8:35 PM, Ary Borenszweig wrote:

On 1/19/15 9:17 PM, Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:

So... how do you search for a function definition in D without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an IDE. It
never occurred to me that this was not doable :-)


But the results will also contain invocations of that function. Do you
go one by one until you find the definition?


Yep. Do it all the time. It's not that hard to see the difference 
between a definition and usage.


-Steve


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread MattCoder via Digitalmars-d
On Tuesday, 20 January 2015 at 13:47:11 UTC, ketmar via 
Digitalmars-d wrote:

  void function foo () { ... }
  foo();

do you see the subtle difference? yes, that tiny whitespace in
declaration. i borrowed that habit from some Oberon code 
decades ago, and it serves me well since then.


Hmm, nice one. I think I'll do this too.

Matheus.



Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread ketmar via Digitalmars-d
On Mon, 19 Jan 2015 22:35:16 -0300
Ary Borenszweig via Digitalmars-d digitalmars-d@puremagic.com wrote:

 On 1/19/15 9:17 PM, Walter Bright wrote:
  On 1/19/2015 2:49 PM, Ary Borenszweig wrote:
  So... how do you search for a function definition in D without an IDE?
 
  I do a text search for the name of the function.
 
  I've been programming in C, C++, and D for 30 years without an IDE. It
  never occurred to me that this was not doable :-)
 
 But the results will also contain invocations of that function. Do you 
 go one by one until you find the definition?
heh.

  void function foo () { ... }
  foo();

do you see the subtle difference? yes, that tiny whitespace in
declaration. i borrowed that habit from some Oberon code decades ago,
and it serves me well since then.


signature.asc
Description: PGP signature


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread ketmar via Digitalmars-d
On Tue, 20 Jan 2015 13:49:47 +
MattCoder via Digitalmars-d digitalmars-d@puremagic.com wrote:

 On Tuesday, 20 January 2015 at 13:47:11 UTC, ketmar via 
 Digitalmars-d wrote:
void function foo () { ... }
foo();
 
  do you see the subtle difference? yes, that tiny whitespace in
  declaration. i borrowed that habit from some Oberon code 
  decades ago, and it serves me well since then.
 
 Hmm, nice one. I think I'll do this too.
be my guest. ;-) i'll be glad if it will help you.

the only bad thing i found with this style is that after some time you
really start noticing the absense of whitespace in declaraions, and it
annoys you. so the first thing you want to do with someone's code is to
ADD THAT WHITESPACES! somehow it becomes most frustrating element of
alien code styling. ;-)


signature.asc
Description: PGP signature


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Joakim via Digitalmars-d

On Tuesday, 20 January 2015 at 00:13:37 UTC, Brian Schott wrote:
On Monday, 19 January 2015 at 22:49:41 UTC, Ary Borenszweig 
wrote:
So... how do you search for a function definition in D without 
an IDE?


Running `dscanner --help` prints this:

--declaration | -d symbolName [sourceFiles sourceDirectories]
Find the location where symbolName is declared. This should 
be more
accurate than grep. Searches the given files and 
directories, or the

current working directory if none are specified.


^
THIS!

I agree with Ary that grep hits a lot of false positives and all 
the formatting tricks don't work with other people's code, plus 
I've never liked IDES.  Dscanner's D declaration finder has 
become indispensable in the short time I've been using it, to the 
point where I dread going back to searching for C declarations 
and getting stuck with grep again.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Walter Bright via Digitalmars-d

On 1/20/2015 12:30 PM, Jonathan Marler wrote:

Which editor do you use?


https://github.com/DigitalMars/me



Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Jonathan Marler via Digitalmars-d

On Tuesday, 20 January 2015 at 03:28:29 UTC, Walter Bright wrote:

On 1/19/2015 7:20 PM, Walter Bright wrote:
Yes. Search Again is a single button press. It really has 
never occurred to me

that this might be a problem needing a solution.


I admit that I've never gotten in to using an IDE. I still have 
complaints about the programmer's editor I use, but they aren't 
big enough to motivate me to fix it!


The nice thing about my editor is it works exactly the same on:

Windows
Linux
FreeBSD
OSX
in a remote tty text window

and is small enough to load instantly.


Which editor do you use?  I use emacs.  It has some quirks.  The 
D-Mode doesn't work very well (I end up using Notepad++ when 
working on phobos/druntime), but I can use it on every platform 
and over a remote tty so I deal with its imperfections.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread ketmar via Digitalmars-d
On Tue, 20 Jan 2015 20:30:00 +
Jonathan Marler via Digitalmars-d digitalmars-d@puremagic.com wrote:

 On Tuesday, 20 January 2015 at 03:28:29 UTC, Walter Bright wrote:
  On 1/19/2015 7:20 PM, Walter Bright wrote:
  Yes. Search Again is a single button press. It really has 
  never occurred to me
  that this might be a problem needing a solution.
 
  I admit that I've never gotten in to using an IDE. I still have 
  complaints about the programmer's editor I use, but they aren't 
  big enough to motivate me to fix it!
 
  The nice thing about my editor is it works exactly the same on:
 
  Windows
  Linux
  FreeBSD
  OSX
  in a remote tty text window
 
  and is small enough to load instantly.
 
 Which editor do you use?  I use emacs.  It has some quirks.  The 
 D-Mode doesn't work very well (I end up using Notepad++ when 
 working on phobos/druntime), but I can use it on every platform 
 and over a remote tty so I deal with its imperfections.
might it be microemacs from Digital Mars site? ;-)


signature.asc
Description: PGP signature


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-20 Thread Danni Coy via Digitalmars-d
 So... how do you search for a function definition in D without an IDE?

Regular Expression Search for

FunctionName.*\n\s*\{

or

FunctionName.*\{

depending on brace style being used.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Vlad Levenfeld via Digitalmars-d

On Tuesday, 20 January 2015 at 01:35:17 UTC, Ary Borenszweig
wrote:

On 1/19/15 9:17 PM, Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:
So... how do you search for a function definition in D 
without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an 
IDE. It

never occurred to me that this was not doable :-)


But the results will also contain invocations of that function. 
Do you go one by one until you find the definition?


First instance of function name preceding an open brace following 
a
closed paren before a semicolon. Its a mouthful but the regex 
isn't that complex if you are comfortable with lookahead/behind


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Ary Borenszweig via Digitalmars-d

On 1/19/15 6:25 PM, Andrei Alexandrescu wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:

Will be much easier to read Source, if func declarataion begins with
keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with compatability
of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


How do you search for a function definition?

In Ruby I search def some_name and I find it. In Go I can probably 
search func some_name. In Rust, fn some_name.


Browsing some C code for Ruby I search with regex with ^some_name 
because they have the convention of writing functions like this:


return_type
function_name(...) {
}

It works, but if you stop following that convention you are lost.

So... how do you search for a function definition in D without an IDE?


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread deadalnix via Digitalmars-d

On Monday, 19 January 2015 at 21:06:40 UTC, Alexey T. wrote:

Better that next D version (next MAJOR version) can support such
syntax. (Old syntax may be compatible too but deprecated).

What developers think..


That why not is a not a good enough reason to do it.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread weaselcat via Digitalmars-d

On Tuesday, 20 January 2015 at 00:13:37 UTC, Brian Schott wrote:
On Monday, 19 January 2015 at 22:49:41 UTC, Ary Borenszweig 
wrote:
So... how do you search for a function definition in D without 
an IDE?


Running `dscanner --help` prints this:

--declaration | -d symbolName [sourceFiles sourceDirectories]
Find the location where symbolName is declared. This should 
be more
accurate than grep. Searches the given files and 
directories, or the

current working directory if none are specified.


you posted this while I was reading the first page : (

guess I could add an addendum
I don't think being able to find a function by grepping func 
foo is anywhere near a valid reason for adding this syntax. 
Programming languages should be made for humans to read, and 
having func just adds visual noise.


...
*cough*function attributes


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Walter Bright via Digitalmars-d

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:

So... how do you search for a function definition in D without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an IDE. It never 
occurred to me that this was not doable :-)


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Walter Bright via Digitalmars-d

On 1/19/2015 2:51 PM, ponce wrote:

Current syntax is akin to C and C++, it means many people already read it
visually and it is easier to port C code to D.


Bingo. It's designed to be an easy transition for people used to programming in 
C, C++ and Java.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Israel via Digitalmars-d

On Monday, 19 January 2015 at 21:25:16 UTC, Andrei Alexandrescu
wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:
Will be much easier to read Source, if func declarataion 
begins with

keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with 
compatability

of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


LOL.

That reply...


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Andrei Alexandrescu via Digitalmars-d

On 1/19/15 3:43 PM, Ary Borenszweig wrote:

On 1/19/15 7:54 PM, Andrei Alexandrescu wrote:

On 1/19/15 2:49 PM, Ary Borenszweig wrote:

On 1/19/15 6:25 PM, Andrei Alexandrescu wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:

Will be much easier to read Source, if func declarataion begins with
keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with compatability
of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


How do you search for a function definition?

In Ruby I search def some_name and I find it. In Go I can probably
search func some_name. In Rust, fn some_name.

Browsing some C code for Ruby I search with regex with ^some_name
because they have the convention of writing functions like this:

return_type
function_name(...) {
}

It works, but if you stop following that convention you are lost.

So... how do you search for a function definition in D without an IDE?


I abandon D and switch to Ruby. -- Andrei


Thanks for the answer.


Tel maître, tel valet. -- Andrei


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Ary Borenszweig via Digitalmars-d

On 1/19/15 7:54 PM, Andrei Alexandrescu wrote:

On 1/19/15 2:49 PM, Ary Borenszweig wrote:

On 1/19/15 6:25 PM, Andrei Alexandrescu wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:

Will be much easier to read Source, if func declarataion begins with
keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with compatability
of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


How do you search for a function definition?

In Ruby I search def some_name and I find it. In Go I can probably
search func some_name. In Rust, fn some_name.

Browsing some C code for Ruby I search with regex with ^some_name
because they have the convention of writing functions like this:

return_type
function_name(...) {
}

It works, but if you stop following that convention you are lost.

So... how do you search for a function definition in D without an IDE?


I abandon D and switch to Ruby. -- Andrei


Thanks for the answer.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread H. S. Teoh via Digitalmars-d
On Mon, Jan 19, 2015 at 04:17:08PM -0800, Walter Bright via Digitalmars-d wrote:
 On 1/19/2015 2:49 PM, Ary Borenszweig wrote:
 So... how do you search for a function definition in D without an
 IDE?
 
 I do a text search for the name of the function.
 
 I've been programming in C, C++, and D for 30 years without an IDE. It
 never occurred to me that this was not doable :-)

Me too(tm), for 20 years.


T

-- 
It is not the employer who pays the wages. Employers only handle the money. It 
is the customer who pays the wages. -- Henry Ford


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Ary Borenszweig via Digitalmars-d

On 1/19/15 9:17 PM, Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:

So... how do you search for a function definition in D without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an IDE. It
never occurred to me that this was not doable :-)


But the results will also contain invocations of that function. Do you 
go one by one until you find the definition?


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Walter Bright via Digitalmars-d

On 1/19/2015 5:35 PM, Ary Borenszweig wrote:

On 1/19/15 9:17 PM, Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:

So... how do you search for a function definition in D without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an IDE. It
never occurred to me that this was not doable :-)


But the results will also contain invocations of that function. Do you go one by
one until you find the definition?


Yes. Search Again is a single button press. It really has never occurred to me 
that this might be a problem needing a solution.


Of course, I'm careful not to name my functions the.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread deadalnix via Digitalmars-d
On Tuesday, 20 January 2015 at 03:12:52 UTC, Andrei Alexandrescu 
wrote:

Tel maître, tel valet. -- Andrei


Will ruby now park cars ?


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread ponce via Digitalmars-d

On Monday, 19 January 2015 at 22:18:34 UTC, Alexey T. wrote:
Ok I see your arguments, indeed, breaking masss of code isn't 
good (even with deprecated flag).

So leave it as is (it is TOO LATE to change this)


Current syntax is akin to C and C++, it means many people already 
read it visually and it is easier to port C code to D.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Andrei Alexandrescu via Digitalmars-d

On 1/19/15 2:49 PM, Ary Borenszweig wrote:

On 1/19/15 6:25 PM, Andrei Alexandrescu wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:

Will be much easier to read Source, if func declarataion begins with
keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with compatability
of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


How do you search for a function definition?

In Ruby I search def some_name and I find it. In Go I can probably
search func some_name. In Rust, fn some_name.

Browsing some C code for Ruby I search with regex with ^some_name
because they have the convention of writing functions like this:

return_type
function_name(...) {
}

It works, but if you stop following that convention you are lost.

So... how do you search for a function definition in D without an IDE?


I abandon D and switch to Ruby. -- Andrei


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Brian Schott via Digitalmars-d

On Monday, 19 January 2015 at 22:49:41 UTC, Ary Borenszweig wrote:
So... how do you search for a function definition in D without 
an IDE?


Running `dscanner --help` prints this:

--declaration | -d symbolName [sourceFiles sourceDirectories]
Find the location where symbolName is declared. This should 
be more
accurate than grep. Searches the given files and 
directories, or the

current working directory if none are specified.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Jon via Digitalmars-d
On Tuesday, 20 January 2015 at 01:35:17 UTC, Ary Borenszweig 
wrote:

On 1/19/15 9:17 PM, Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:
So... how do you search for a function definition in D 
without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an 
IDE. It

never occurred to me that this was not doable :-)


But the results will also contain invocations of that function. 
Do you go one by one until you find the definition?


Sure. If it is a very commonly-used function (like a library 
function), the definition is probably in a different file from 
the one most of the invocations are in anyhow.


-Jon


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Walter Bright via Digitalmars-d

On 1/19/2015 7:20 PM, Walter Bright wrote:

Yes. Search Again is a single button press. It really has never occurred to me
that this might be a problem needing a solution.


I admit that I've never gotten in to using an IDE. I still have complaints about 
the programmer's editor I use, but they aren't big enough to motivate me to fix it!


The nice thing about my editor is it works exactly the same on:

Windows
Linux
FreeBSD
OSX
in a remote tty text window

and is small enough to load instantly.



Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Walter Bright via Digitalmars-d

On 1/19/2015 1:23 PM, Jonathan Marler wrote:

I'm not familiar enough
with the syntax grammar to say for sure whether or not this would make it easier
to parse the language.


This idea is not going to make the parsing any better.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread weaselcat via Digitalmars-d

On Monday, 19 January 2015 at 22:49:41 UTC, Ary Borenszweig wrote:

On 1/19/15 6:25 PM, Andrei Alexandrescu wrote:

On 1/19/15 12:51 PM, Alexey T. wrote:
Will be much easier to read Source, if func declarataion 
begins with

keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with 
compatability

of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


How do you search for a function definition?

In Ruby I search def some_name and I find it. In Go I can 
probably search func some_name. In Rust, fn some_name.


Browsing some C code for Ruby I search with regex with 
^some_name because they have the convention of writing 
functions like this:


return_type
function_name(...) {
}

It works, but if you stop following that convention you are 
lost.


So... how do you search for a function definition in D without 
an IDE?


dscanner -d


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Dicebot via Digitalmars-d
On Monday, 19 January 2015 at 22:54:04 UTC, Andrei Alexandrescu 
wrote:

I abandon D and switch to Ruby. -- Andrei


You should make a front page announcement.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Rikki Cattermole via Digitalmars-d

On 20/01/2015 1:17 p.m., Walter Bright wrote:

On 1/19/2015 2:49 PM, Ary Borenszweig wrote:

So... how do you search for a function definition in D without an IDE?


I do a text search for the name of the function.

I've been programming in C, C++, and D for 30 years without an IDE. It
never occurred to me that this was not doable :-)


I've only been programming for 8 years on and off IDE's.
And I must say, even I do the old search for function names even when in 
an IDE! Thanks MonoD and friends! You do great on the searching!


I'm not really complaining. Once we have Intellij IDEA plugin fully 
working, these problems will go away altogether. Since it cache's AST 
and bunch of other nice tricks.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Mike Parker via Digitalmars-d

On 1/20/2015 7:49 AM, Ary Borenszweig wrote:



It works, but if you stop following that convention you are lost.

So... how do you search for a function definition in D without an IDE?


Case-insensitive search on funcname( usually works for me.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 19, 2015 16:18:25 Walter Bright via Digitalmars-d wrote:
 On 1/19/2015 2:51 PM, ponce wrote:
  Current syntax is akin to C and C++, it means many people already read it
  visually and it is easier to port C code to D.

 Bingo. It's designed to be an easy transition for people used to programming 
 in
 C, C++ and Java.

That and the fact that most of the folks working on the language have been
programming in C, C++, etc. for years, and it probably never occurred to
most of them to have a different function declaration syntax in the first
place. Even if there's a better way to do something, if it never occurs to
you that there's anything wrong with the current way, you're not going to
come up with a new one.

- Jonathan M Davis



Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 19, 2015 20:51:02 Alexey T. via Digitalmars-d wrote:
 Will be much easier to read Source, if func declarataion begins
 with keyword. def of func. e.g.

 func myName(params.): typeOfResult;
 or
 func myName(params...) - typeOfResult;

 easier to read and PARSE. Next D version may allow--with
 compatability of old syntad (C like where typeOfResult is 1st id).

I don't recall ever having any problem with the C/C++ syntax that D uses.
The major problem was with the function pointer syntax, and we already fixed
that. I really don't see how changing the function signature syntax in D
would help anything, and it would force all existing code to be changed (be
it immediately or just when the compatability flag finally goes anyway).
Sometimes, syntax improvements are worth it, but in general, it's just not
worth messing with the syntax unless the language is still in flux enough
that you don't care at all about breaking existing code. So, even if your
suggestion were objectively better (and it really isn't), we probably
wouldn't go with it at this point.

- Jonathan M Davis



Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Alexey T. via Digitalmars-d
Ok I see your arguments, indeed, breaking masss of code isn't 
good (even with deprecated flag).

So leave it as is (it is TOO LATE to change this)


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Alexey T. via Digitalmars-d

Better that next D version (next MAJOR version) can support such
syntax. (Old syntax may be compatible too but deprecated).

What developers think..


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Jonathan Marler via Digitalmars-d

On Monday, 19 January 2015 at 21:06:40 UTC, Alexey T. wrote:

Better that next D version (next MAJOR version) can support such
syntax. (Old syntax may be compatible too but deprecated).

What developers think..


I have a feeling you might get some strong opposition to this 
idea *Brace Yourself*.  However, I don't mind discussing new 
ideas.  I'm not familiar enough with the syntax grammar to say 
for sure whether or not this would make it easier to parse the 
language.  If it does, I wouldn't think it would make it much 
more simple.  One question is how would you declare a function 
pointer?


Current : void function() myfunction;
YourIdea: func void function() myfunction;

This seems a little odd/redundant. I suppose you could change the 
syntax to something like this:


func void myfunction();

But then you wouldn't be able to know if that was a function 
pointer or a function declaration.


I'll finish by saying that at first glance, I'm not sure if 
adding this extra keyword will help readability much.  I've never 
really had problems distinguishing between functions and other 
things.  That being said, maybe I've been programming in C-like 
languages too much so take that with a grain of salt.


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Andrei Alexandrescu via Digitalmars-d

On 1/19/15 12:51 PM, Alexey T. wrote:

Will be much easier to read Source, if func declarataion begins with
keyword. def of func. e.g.

func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with compatability
of old syntad (C like where typeOfResult is 1st id).


No. -- Andrei


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread bachmeier via Digitalmars-d

On Monday, 19 January 2015 at 20:51:03 UTC, Alexey T. wrote:
Will be much easier to read Source, if func declarataion begins 
with keyword. def of func. e.g.


func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with 
compatability of old syntad (C like where typeOfResult is 1st 
id).


I have nothing against Rust, but that's the last place I'd go if 
I were looking for improved syntax. Personally I view it as 
visual clutter that will make it harder to read the program.


Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread Alexey T. via Digitalmars-d
Will be much easier to read Source, if func declarataion begins 
with keyword. def of func. e.g.


func myName(params.): typeOfResult;
or
func myName(params...) - typeOfResult;

easier to read and PARSE. Next D version may allow--with 
compatability of old syntad (C like where typeOfResult is 1st id).


Re: Like Go/Rust, why not to have func keyword before function declaration

2015-01-19 Thread ketmar via Digitalmars-d
On Mon, 19 Jan 2015 20:51:02 +
Alexey T. via Digitalmars-d digitalmars-d@puremagic.com wrote:

 Will be much easier to read Source, if func declarataion begins 
 with keyword. def of func. e.g.
 
 func myName(params.): typeOfResult;
 or
 func myName(params...) - typeOfResult;
 
 easier to read and PARSE. Next D version may allow--with 
 compatability of old syntad (C like where typeOfResult is 1st id).
maybe it's better to just stick with go/rust then? really, everybody
knows where to download that compilers, yet they comes here and using
D...


signature.asc
Description: PGP signature