Re: D support in Exuberant Ctags 5.8 for Windows

2014-11-12 Thread Jussi Jumppanen via Digitalmars-d

On Thursday, 26 July 2012 at 22:06:08 UTC, Gary Willoughby wrote:

I'm looking at this page and trying to download the latest 
CTags 5.8 with D patch compiled for Windows but i'm getting a 
dead link.


FYI the Zeus IDE uses ctags and many years ago I updated ctags
to have some understanding of the D language.

Those code changes where made against the last 5.8 version and
they can be found here:

http://www.zeusedit.com/z300/ctags_src.zip

But as I said earlier those changes are quite old, so I don't
know how well they work with the current D language.



Re: No VisualStudio project for phobos?

2014-05-08 Thread Jussi Jumppanen via Digitalmars-d
On Thursday, 8 May 2014 at 13:58:51 UTC, Orvid King via 
Digitalmars-d wrote:


I'm fairly certain that it can't build VisualC++ project files 
from a version of VS older than 2010, due to the fact that 2010 
is the first version where VisualC++ projects were proper 
MSBuild project files.


MSBuild can build VisualC++ 2008 project files, but you do have
to use a version of MSBuild that is happy with those files.

For those interested, more details can be found here:

http://www.zeusedit.com/zforum/viewtopic.php?t=7143



Re: Compile-time memory footprint of std.algorithm

2014-04-23 Thread Jussi Jumppanen via Digitalmars-d

On Wednesday, 23 April 2014 at 20:04:09 UTC, Peter Alexander
wrote:

Maybe we should investigate where the memory is going first 
before planning our attack :-)


FWIW one hint might be found in the DCD project found here:

https://github.com/Hackerpilot/DCD/

In that project compiling the lexer.d file causes a massive
increase in compiler memory usage.

More details found here:

https://github.com/Hackerpilot/DCD/issues/93

NOTE: That was DMD running on a 32 bit Windows XP machine.


Re: Let's give a honor to dead giants!

2012-04-20 Thread Jussi Jumppanen

On Friday, 20 April 2012 at 03:33:43 UTC, H. S. Teoh wrote:


One thing I miss, though, is ctags support for D.


Here are the changes I made to the Exuburant ctags so
it would do D language tagging.

  http://www.zeusedit.com/z300/ctags_src.zip

These changes where made quite some so that the Zeus IDE
would tag D code, so I'm not sure how well it handles the
latest D 2.0 language changes.





Re: IDE Support for D

2012-04-07 Thread Jussi Jumppanen

On Friday, 6 April 2012 at 23:45:49 UTC, Manu wrote:

Fair enough I guess, but I'm a customer. I work commercially, 
and I'd happily pay money for tools that work.


On Windows, the Zeus editor/IDE has support for the D language:

http://www.zeusedit.com/zforum/viewtopic.php?t=2645


Sadly, I can't offer any significant amount of my own time


Any Zeus bug reports are more than welcome ;)

NOTE: Zeus is shareware



Re: Just starting out

2011-10-13 Thread Jussi Jumppanen
J Arrizza Wrote:

> If that doesn't play, I'll stick with UltraEdit 

FWIW, Zeus is another Windows based editor and it is D language 
aware.

It does syntax highlighting, class browsing, code folding etc.

http://www.zeusedit.com/d.html

It is also pretty easy to setup Zeus to run the DMD compiler 
inside the Zeus IDE.

http://www.zeusedit.com/zforum/viewtopic.php?t=2645

Cheers Jussi


Re: std.path review: update

2011-07-21 Thread Jussi Jumppanen
Lars T. Kyllingstad Wrote:

> On Wed, 20 Jul 2011 14:16:04 -0400, Steven Schveighoffer wrote:
>
> Any .NET programmers out there?  Can you please tell me what the 
> following functions return?
> 
>   System.IO.Path.GetDirectoryName("\\foo\bar")
>   System.IO.Path.GetPathRoot("\\foo\bar\baz")

This code:
  using System;
  
  namespace Test
  {
 static class Program
 {
[STAThread]
static void Main()
{
   string test;
  
   test = @"\\foo\bar\";
   Console.WriteLine("System.IO.Path.GetDirectoryName(" + test + ")");
   Console.WriteLine(System.IO.Path.GetDirectoryName(test));
  
   test = @"\\foo\bar";
   Console.WriteLine("System.IO.Path.GetDirectoryName(" + test + ")");
   Console.WriteLine(System.IO.Path.GetDirectoryName(test));
  
   test = @"\\foo\bar\baz";
   Console.WriteLine("System.IO.Path.GetDirectoryName(" + test + ")");
   Console.WriteLine(System.IO.Path.GetPathRoot(test));
}
 }
  }

produced this output:

  C:\temp>test.exe
  System.IO.Path.GetDirectoryName(\\foo\bar\)
  \\foo\bar
  System.IO.Path.GetDirectoryName(\\foo\bar)
  
  System.IO.Path.GetDirectoryName(\\foo\bar\baz)
  \\foo\bar

Cheers Jussi


Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for

2011-04-13 Thread Jussi Jumppanen
Bruno Medeiros Wrote:

> Why would editors not allow you to enter that right? 

I was wondering the same thing?

> Works fine in Eclipse, again because when it auto-indents on Enter, it 
> uses the indentation of the previous line. :)

It also worked fine in Zeus, because it too uses this same Enter key logic.



Re: If invalid string should crash(was:string need to be robust)

2011-03-13 Thread Jussi Jumppanen
%u Wrote:

> I agree with a), but not b), Can't find anything in unicode standard says
> you can use the low surrogate like that

According to: http://www.cl.cam.ac.uk/~mgk25/

According to ISO 10646-1:2000, sections D.7 and 2.3c, a device
receiving UTF-8 shall interpret a "malformed sequence in the same way
that it interprets a character that is outside the adopted subset" and
"characters that are not within the adopted subset shall be indicated
to the user" by a receiving device. A quite commonly used approach in
UTF-8 decoders is to replace any malformed UTF-8 sequence by a
replacement character (U+FFFD), which looks a bit like an inverted
question mark, or a similar symbol. 

Refer to this file for the above quote: 

http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt



Re: null [re: spec#]

2010-11-08 Thread Jussi Jumppanen
so Wrote:

> At initialization rvalue should not contain anything about 
> lvalue, this is absurd.

That may well be the case. 

I was only pointing out that as far as the Microsoft 
compiler is concerned, saying the code:
 
'compiles with no warning, no error, nothing...'

is incorrect. It will issue a warning even if the default 
warning level of 1 is used.

Now as to question whether or not this is a smart way 
to handle the situation, that is a totally different 
discussion all together;)



Re: null [re: spec#]

2010-11-07 Thread Jussi Jumppanen
so Wrote:

> Not related to this but i have to share.
> Try compiling this in C/C++.
> 
> int i = i + 5; // something like this.

void main()
{
int i = i + 5; // something like this.
}

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
c:\temp\test.c(3) : warning C4700: uninitialized local variable 'i' used


Re: @property

2010-06-24 Thread Jussi Jumppanen
Max Samukha Wrote:

> I don't think the rule applies universally. For example, .NET is full of 
> functions starting with Set/Get that are not properties because they 
> perform complex/lengthy computations or for some other washy reason.

In .Net it is generally not a good idea to write a getter property that 
changes the object in any way (i.e. they should be written as pure read 
only).

And why is that you ask?

Because when you watch a object in the debugger the debugger extracts the 
object debug information by calling the these getter properties.

So if the object properties are written badly and change the object, 
then by just adding that object to a watch window or hovering over 
it with the mouse will result in the corruption of the object.

This can make for some very interesting debugging.



Re: [feedback] folding in scintilla

2010-04-13 Thread Jussi Jumppanen
Andrej Mitrovic Wrote:

> Personally, I would prefer the left and right brace to stay on the same 
> line as the function definition, and maybe add an elipsis between them 
> so I can tell that function is folded just by looking at the code.

That's a bit like how Zeus does it's folding: 

http://www.zeusedit.com/images/lookfold.png



Re: Solution for Fatal flaw in D design which is holding back widespread adoption(tm)

2010-03-31 Thread Jussi Jumppanen
Nick Sabalausky Wrote:

> I was thinking of it as whole-programming-world kind of thing not specific 
> to any langauge, kind of like how UTF has been replacing ASCII and code 
> pages (although this would use UTF). Basically kind of like a programmer's 
> RTF (although it obviously wouldn't involve setting fonts and colors, but 
> rather things like tab settings).

You mean something like PTSC - http://www.synchro.net/ptsc_hdr.html


Re: Compiler: Size of generated executable file

2010-01-12 Thread Jussi Jumppanen
Lutger Wrote:

> Funny enough distributing dll's alongside the app is exactly what a lot 
> of windows apps do, to prevent dll hell or satisy some license.

If the Windows application is developed correctly in that it is design 
to use the Windows Side-by-side assembly feature: 

http://en.wikipedia.org/wiki/Side-by-side_assembly

then provided the developer does not stuff up the manifest, DLL hell 
is pretty much a non event.



Re: "Compiler as a service" in C# 4.0

2010-01-05 Thread Jussi Jumppanen
Nick Sabalausky Wrote:

> I thought C# compiling was already part of the .NET library...? 

It is.

Class: CSharpCodeProvider
Namespace:  Microsoft.CSharp
Assembly:  System (in System.dll)

Provides access to instances of the C# code generator and code compiler.



Re: How is D doing?

2009-11-10 Thread Jussi Jumppanen
IkeaTheSofa Wrote:

> Can't run 'C:\D\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH
> ... Can anyone decipher this? 

The PATH is an environment variable that the system uses to locate 
executables.

You can set the PATH environment variable using the Start Button, 
selecting the Settings, Control Panel menu, selecting the System 
icon and editing the environment variables found on the Advanced 
tab. 

What you need to do is add the DMD installation bin folder to 
this PATH environment variable.

> Any suggestions for a begginer(in general)?  
> I also can not get the ecliseD plugin to work, but thats a
> different issue.

FWIW here is a simple tutorial on how to get the D compiler to run 
from within the Zeus editor:

   http://www.zeusedit.com/forum/viewtopic.php?t=2465

This tutorial also goes into details on setting up the PATH.



Re: IDE for D? Recommendations?

2009-10-23 Thread Jussi Jumppanen
AJ Wrote:

> Anyone have recommendations for which IDE to use to 
> do an evaluation of D with? 

On the Windows platform, with a minimal amount of configuration 
the Zeus IDE will quite happily run the D compiler:

   http://www.zeusedit.com/forum/viewtopic.php?t=2465

NOTE: Zeus is shareware 

Jussi Jumppanen
Author: Zeus for Windows IDE



Re: Notepad++

2009-08-12 Thread Jussi Jumppanen
Stewart Gordon Wrote:

> Or maybe I should just go back to TextPad (which isn't perfect 
> either) and put up with its not supporting Unicode

FWIW Zeus is very similar to TextPad in feature set and the latest 
version also adds support for Unicode/UTF8.

   http://www.zeusedit.com/

It will do D syntax highlighting and code folding out of the box.

It also comes with a version of ctags.exe made with these 
changes specifically for the D languages:

   http://www.zeusedit.com/z300/ctags_src.zip

meaning it can produce tags infomation for your D source files.

NOTE: Zeus like TextPad is shareware.

Jussi Jumppanen
Author: Zeus for Windows



Re: Dynamic D Library

2009-07-16 Thread Jussi Jumppanen
BCS Wrote:

> If I'm understanding the situation correctly, what you just 
> described is ONLY a problem on Windows and only because
> of a design flaw in the way DLL's work. 

That might be well be the case. 

But to basically then say that “when developing with D on Windows 
it is highly recommended that DLL's are not used” will just end up 
sounding like limitation of D and not of Windows DLLs.

Windows developers know languages like C/C++, C#, Visual Basic, in 
fact almost any language you care to name, have no trouble working 
with DLLs so the question they will be asking is why should D?



Re: Oh Dear

2009-07-12 Thread Jussi Jumppanen
Rainer Deyke Wrote:

> Integer division in Python uses floor division instead of
> truncated division, and to the best of my knowledge has always
> used floor division.  

Based on the results produced by Python 2.6.2 and Python 1.5.1 
this does appear to be the case:

Python Version: 2.6.2 (r262:71600, Jul  1 2009, 22:22:20) [MSC v.1500 32 bit 
(Intel)]
  
8  //   3 = 2
8  // (-3)= -3
  (-8) //   3 = -3
  (-8) // (-3)= 2
8  %   3  = 2
8  % (-3) = -1
  (-8) %   3  = 1
  (-8) % (-3) = -2
  
8  /   3  = 2
8  / (-3) = -3
  (-8) /   3  = -3
  (-8) / (-3) = 2
8  %   3  = 2
8  % (-3) = -1
  (-8) %   3  = 1
  (-8) % (-3) = -2
  
  
Python Version: 1.5.1 (#0, Sep 11 2002, 21:19:56) [MSC 32 bit (Intel)]
  
8  /   3  = 2
8  / (-3) = -3
  (-8) /   3  = -3
  (-8) / (-3) = 2
8  %   3  = 2
8  % (-3) = -1
  (-8) %   3  = 1
  (-8) % (-3) = -2

Cheers Jussi

Note: These results where created by running the Zeus/Python 
  script shown below using a very old version of the Zeus 
  and the recent version of Zeus.

import sys
import zeus

def key_macro():
zeus.screen_update_disable()
zeus.FileNew()
zeus.write("Python Version: " + sys.version);

#   This only works for 2.6.2
# zeus.write("\n\n")
# zeus.write("  8  //   3 = " + str(  8  //   3 )  + "\n", 0)
# zeus.write("  8  // (-3)= " + str(  8  // (-3))  + "\n", 0)
# zeus.write("(-8) //   3 = " + str((-8) //   3 )  + "\n", 0)
# zeus.write("(-8) // (-3)= " + str((-8) // (-3))  + "\n", 0)
# zeus.write("  8  %   3  = " + str(  8  %   3  )  + "\n", 0)
# zeus.write("  8  % (-3) = " + str(  8  % (-3) )  + "\n", 0)
# zeus.write("(-8) %   3  = " + str((-8) %   3  )  + "\n", 0)
# zeus.write("(-8) % (-3) = " + str((-8) % (-3) )  + "\n", 0)


zeus.write("\n\n")
zeus.write("  8  /   3  = " + str(  8  /   3 )   + "\n", 0)
zeus.write("  8  / (-3) = " + str(  8  / (-3))   + "\n", 0)
zeus.write("(-8) /   3  = " + str((-8) /   3 )   + "\n", 0)
zeus.write("(-8) / (-3) = " + str((-8) / (-3))   + "\n", 0)
zeus.write("  8  %   3  = " + str(  8  %   3  )  + "\n", 0)
zeus.write("  8  % (-3) = " + str(  8  % (-3) )  + "\n", 0)
zeus.write("(-8) %   3  = " + str((-8) %   3  )  + "\n", 0)
zeus.write("(-8) % (-3) = " + str((-8) % (-3) )  + "\n", 0)

zeus.screen_update_enable()
zeus.screen_update()

key_macro() # run the macro



Re: Any IDEs or editors that are compatible with D 2.0?

2009-05-27 Thread Jussi Jumppanen
Matt Nawrocki Wrote:

> Hi... are there any IDEs or editors out there that support DMD 2.0 
> yet? I am having a hard time finding a good one. Thanks!

On the Windows platform there is the Zeus editor/IDE:

http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/ZeusForWindows

Zeus is a shareware editor that also has quite few IDE like features.

The current installer will be missing a few D2 keywords but they can be very 
easily added by hand.



Re: OT: on IDEs and code writing on steroids

2009-05-26 Thread Jussi Jumppanen
BCS Wrote:

> What I want is a language where most of the time you build 
> a project from only the information in the source code. 

There is nothing in C# that stops you doing exactly this.

You can build this Simple.cs file: 
  
  using System;
  using System.Windows.Forms;
  
  namespace SimpleApplication
  {
  static class Program
  {
  [STAThread]
  static void Main()
  {
  MessageBox.Show("Hello World!", "C# Application", 
  MessageBoxButtons.OK, 
  MessageBoxIcon.Information);
  }
  }
  }

to create a Simple.exe using nothing but this command line:

  csc.exe /r:System.dll; D:\temp\simple.cs

> What I don't want is a language where the only way to keep track 
> of the information you need to build a project, is with an external 
> data file. 

People have been developing projects using an "external data file" 
for decades. It's called the make file.

> I don't want that because the only practical way to do that is _force_ 
> the programmer to use an IDE and have it maintain that file.

What exactly is it about C# that makes you think you are FORCED
to use an IDE to write the code?
 
MSBuild.exe is nothing than Microsoft's replacement to make.exe. 

It is nothing more than a version of make.exe that takes XML 
make files as it's input.





Re: OT: on IDEs and code writing on steroids

2009-05-17 Thread Jussi Jumppanen
BCS Wrote:

> Has anyone ever tried building a c# project without an IDE? 

Yes.

> I don't even know if it can be done. 

It is actually very easy to do:

  http://www.zeusedit.com/forum/viewtopic.php?t=2518

and it is even easier if you have a simple 'one file', throw 
away project:

  http://www.zeusedit.com/forum/viewtopic.php?t=1235

> Yes you can trigger a build from the command line, but setting 
> up a project without it would require hand editing of XML (yuck) 
> and the build tool IS visual studio.

It is true that Visual Studio creates XML project/solution files
and the contents of these files is overly complex.

But these XML files are Visual Studio specific and a lot of their 
complexity comes from the fact that they contain extra information 
that is only needed by the IDE.

If you use the MsBuild approach the amount of XML that is needed to 
create a project/solution is much smaller and in general the XML is 
fairly trivial.  




Re: why Unix?

2009-04-07 Thread Jussi Jumppanen
Christopher Wright Wrote:

> The GUI is better than that of cmd.exe, but not anywhere near 
> as good as, say, GNOME Terminal. (It's still fixed width, as 
> I recall; just wider by default.)

The cmd.exe terminal window can be resized.

With the cmd.exe window visible click on the icon in the top 
left corner and bring up the Properties window.

Select the Layout panel and change the terminal size to what 
ever width/height combination required and save the changes 
against the title of the console window.

>From then on all new console windows with that title will take 
on those attributes.

On a new machine this is usually on of the first things I do, 
since the default properties are pretty poor.



Re: why Unix?

2009-04-06 Thread Jussi Jumppanen
Jason House Wrote:

> For example, as an emacs user, I can easilly program for an hour 
> without touching my mouse. 

I would say 'not using the mouse' is clear sign the programmer is
coding using a programmer's editor and not a modern day IDE. 

I would also say many Windows programmers are completely lost 
without their IDE, and this can makes them less productive as a 
developer.

They could make themselves better programmers by overcoming their 
addiction to the IDE.

  http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind.html

But programming on Windows without a mouse driven, language specific 
IDE, using nothing but the command line and a good editor is possible 
and really quite easy to do.

> As a commandline utility, it can be combined with other stuff such 
> as ls, sort, grep, sed, awk, etc... I don't know if I'd start there 
> though...

Replace ls with dir, download the Win32 version of grep, sed, awk 
and you can run all those tools just fine from the Windows command 
line, or from within any decent editor.

You don't have to go to Unix to find the command line.



Re: Eric S. Raymond on GPL and BSD licenses. & Microsoft coming to

2009-03-29 Thread Jussi Jumppanen
Yigal Chripun Wrote:

> That is why there are many successful companies that base 
> their business model on free licenses like the GPL and zero 
> companies that use the BSD.

The Apple OS X is a BSD derivative: http://en.wikipedia.org/wiki/Mac_OS_X

  "Mac OS X is based upon the Mach kernel.[7] Certain parts 
  from FreeBSD's and NetBSD's implementation of Unix were 
  incorporated in Nextstep, the core of Mac OS X."



Re: OT -- Re: random cover of a range

2009-02-16 Thread Jussi Jumppanen
Yigal Chripun Wrote:

> Denis Koroskin wrote:

> > I've heard many Jews refuse to do the blood transfusion even if 
> > it costs them their life.
> 
> Where did you hear that?

I'm not sure about the Jewish faith but Jehovah's Witnesses believe 
the Bible prohibits the accepting of blood and that to do so is a sin. 

Many a Jehovah's Witnesses have died because of this belief.



Re: Off subject

2009-01-07 Thread Jussi Jumppanen
Vincent Richomme Wrote:

> Hul doesn't work because it matches some typedef struct like this :
> 
> typedef struct c_parser GTY(())
> {
> ...
> } c_parser;

That's what I meant when I said the regexp will almost certainly 
need to be tweaked ;)

For example this new 'tweaked' regexp search string:

  (^[_a-z0-9]+[ &*\t]+[_a-z0-9 &*\t]*[_a-z0-9]+[ 
\t]*\({0,1}[^\]+.(.*[^;]+)(\n{\n)

will distinguish bettween these two case:

  void myfunc(int aFoo)
  {
  ...
  }

  typedef struct c_parser GTY(())
  {
  ...
  } c_parser;

Obviously for each new case some extra tweaking of the repexp 
might be required.

But if you used something like SED you can make the searching a 
hell of a lot smarter.

SED allows you to define rules where by you can take the result 
of one search, run a second test against it and then accept or
reject the result based on the result of this second test.

  http://www.zeusedit.com/forum/viewtopic.php?t=1229

Using this approach you could define rules to filter out these 
exceptions.



Re: Off subject

2009-01-06 Thread Jussi Jumppanen
Vincent Richomme Wrote:

> I would like to know if there are some parsers/scripts that could parse 
> some C/C++ language and that could insert printf in each function.

One option would be to use a regular expression within a search 
and replace.

Just as a simple test I came up regexp that does seems do the trick:

  Search string:
  (^[_a-z0-9]+[ &*\t]+[_a-z0-9 &*\t]*[_a-z0-9]+[ \t]*[(]+.*[^;]+)(\n{\n)


  Replace String:
  \0fprintf(stderr, ("\1")

Any regexp enabled text editor should be able to handle the search and
replace. It worked just fine in the Zeus IDE ;)

You could also use SED or AWK to do a batch mode regexp search and replace.

NOTE: The regexp was only tested for the function declaration that 
you posted, so it will almost certainly need to be tweaked for other 
variations of function definitions.