October 31, 2013
Synergy E-News - A Newsletter for Synergy Developers
News For All
 
Announcing Synergy/DE 10.1.1b

Patch delivers significant quality and performance improvements, supports  Microsoft’s latest releases

Synergy/DE 10.1.1b is now available on all supported platforms and is ready to download from the Synergy/DE Resource Center. Version 10.1.1b delivers significant quality and performance improvements in a number of areas, including the SELECT class, Synergy .NET multi-threading, and AppDomains. Synergy/DE 10.1.1b also provides support for Microsoft's recent releases, Windows 8.1, Windows Server 2012 R2, and Visual Studio 2013. Synergex worked closely with Microsoft and tested beta versions of Microsoft's products for months to ensure optimal integration and compatibility with these latest releases. See all the fixes and features included in Synergy/DE 10.1.1b, or download 10.1.1b now.

Synergy/DE 10.1.1b is required for Windows 8.1, Windows Server 2012 R2, and Visual Studio 2013. It’s also required for 64-bit Windows 8, and we strongly recommend it for 32-bit Windows 8. If you are using version 10.1.1b of Synergy DBL Integration with Visual Studio 2012, Update 4 is now required. (At the time of this announcement, Update 4 is a Release Candidate (RC) that Microsoft supports in production environments.)

 
News For Developers
 
Richard
PSG Blog: Synergy and XAML in Harmony
By Richard Morris, Sr. Synergy/DE PSG Consultant
The Symphony Framework is a set of assemblies that aid the development of Synergy .NET applications. Together with CodeGen, they provide a powerful, flexible environment within Microsoft Visual Studio to build great looking Windows applications, utilizing your existing Synergy data and logic. Windows Presentation Foundation (WPF) is the tool of choice. The user interface is written in XAML and data bound to your Synergy data exposed through Symphony Framework Data Objects.

Read the rest of the blog post.
 
hr1
Richard
PSG Blog: UI Consistency 101
Put some <style> into your application
By Richard Morris, Sr. Synergy/DE PSG Consultant
In my previous article (Symphony Framework Basics: Simple Data Binding) I demonstrated how to perform simple data binding between your XAML UI controls and your Data Objects. This article demonstrates how to build powerful styles to define and control your user interface and provide automated data binding to your Data Objects. Read the rest of my blog post, and watch a short video.
 
hr1
Steve
PSG Blog: Become Master of Your AppDomain - Thread your way through Synergy .NET
By Steve Ives, Sr. Synergy/DE PSG Consultant

There are special considerations that must be taken into account when implementing non-thread-aware Synergy .NET code that will execute in a multi-threaded environment. As will be explained below, one such environment is code that executes within an ASP.NET / Internet Information Server (IIS) environment. Read the rest of my blog post.

 
hr1
Jim
Why We’re Partial to Partial Methods
By James Sahaj, Project Manager for the Synergy .NET Compiler
 

A class that implements an interface must implement all members of that interface in order to compile and run successfully.  But what if you wanted to give the implementer of a class a choice of whether or not to implement particular methods, and then have all calls associated with any unimplemented methods removed?  This is the purpose of partial methods.

Partial methods, which were introduced in version 10.1.1a, allow the designer of a class to specify the methods that may be optionally implemented by the programmer who uses that class.   Partial methods have two parts: a signature definition and an optional implementation. 

In this scenario, the designer declares a partial class and then specifies two partial methods, giving only their signatures, but not giving them implementations: 

namespace ns1 public partial class class1 static partial method meth1, void parm1, int endmethod static partial method meth1, void parm1, string endmethod public static method testit, void proc ns1.class1.meth1(8); ns1.class1.meth1("hey") end endclass endnamespace
The programmer using this class can then optionally define the implementation of the partial methods he wishes to implement:
namespace ns1 public partial class class1 static partial method meth1, void parm1, int proc Console.WriteLine("meth1(int)"); endmethod static partial method meth1, void parm1, string proc Console.WriteLine("meth1(string)"); endmethod endclass endnamespace main proc ns1.class1.testit() end

The output of the program is as follows:

meth1(int) meth1(string)

So far, there isn’t much difference between a partial method and a regular defined method.  However, suppose the implementer of the class only implemented the meth1(int) partial method.   When compiling the program, the Synergy .NET compiler would detect that the meth1(string) partial method does not have an implementation and remove all the calls to meth1(string) from the executable at compile time!   So, by not implementing that method the programmer can control which calls will be ignored.

Of course, to be able to remove method calls, partial methods must adhere to some basic restrictions:

  • They must be in a partial class.
  • They must return void.
  • Their parameters cannot be marked with an OUT attribute.
  • They must be private, so they cannot be called outside of the partial class.
  • They cannot be virtual.

Using partial methods allows the designer of a class to give some calling flexibility to the programming consumers of that class by allowing them to determine which methods are implemented, and, in turn, which methods are called.  Partial methods were added as part of the 10.1.1a patch.  Please consult the Synergy DBL Language Reference Manual for more details on this wonderful new language feature.

 
hr1
Tech Tip
Compile fails on OpenVMS with a PRTLOAD mmap error loading prototype file
Question
When I compile my program, it fails with a PRTLOAD error, and I get this message:
%DBL-E-PRTLOAD, Unable to load prototype NS-CLS.DBP;1 : mmap (errno 12, VMS error 0x0000021C) failed %DBL-F-NUMFILES, Too many files
Why is this happening and how do I fix it?

Answer
This error indicates that you are out of some kind of system resource. Since the OpenVMS error number is displayed, the first thing to do is translate it. This will give you the cause of the failure. For example,
$ write sys$output f$message(%X21C) %SYSTEM-F-SECTBLFUL, process or global section table is full

This tells you that the sysgen parameter GBLSECTIONS needs to be increased. (On OpenVMS, the mmap function uses the GBLSECTIONS parameter, which defaults to 1024.) You should increase the value of GBLSECTIONS (with modparams.dat and do autogen with feedback) and then reboot. Now, retry your compile.

Sometimes when a quota is exceeded you may see the generic error 0x0000001C, “%SYSTEM-F-EXQUOTA, process quota exceeded”. To fix this, do the following:

  1. Find out which process quota has been exceeded by issuing the command “SHOW PROCESS/QUOTA/PID=<pid>”, where <pid> is the process ID of the session doing the compile.
  2. Increase that quota using the system authorize program.
  3. Log the user out and back in for the new value to take effect.
  4. Retry the compilation.

Whereas in version 10, the OpenVMS error number is displayed, in version 9, it will not be, so you’ll have to first check to see if a process quota has been exceeded by doing this:

  1. Note the PID of the process doing the compile.
  2. In another session, issue the command “SHOW PROCESS/QUOTA/PID=<pid>”, where <pid> is the process ID of the session doing the compile.
  3. Check for a quota value that goes to zero during the compilation.
  4. Increase the quota as above.

Note: The authorize parameter FILLM controls how many files can be opened by a user. One unit of FILLM quota is used for each file concurrently opened.

 
hr1
Are You Up For The Challenge?
The Code Phantom is back, and he’s taken over the Halloween e-quiz...

Jodah Veloper has been bragging about his new skills with Synergy Objects and declaring that he’s ready for any coding challenge that can be thrown at him. Unbeknownst to Jodah, the Code Phantom was lurking nearby and overheard his boast.

On Halloween, the Phantom lures Jodah into a haunted house and traps him in the wine cellar. Unfortunately, the wine cellar was once a crypt, and dusty bottles line shelves that were once the final resting places of the Dearly Departed. If legend is to be believed, the spirits of those formerly interred here will rise at the stroke of midnight on Halloween, devour the mind of anyone they find within the cellar, and then help themselves to a nice bottle of Bordeaux.

Jodah surveys the room and determines that the only point of exit is a very old, very heavy-looking iron door. The door is secured by a very new, very strong-looking electronic lock. On the wall above the door is a clock and in the center of the room sits a table, a chair, a glass, and a laptop.

The laptop is powered on, and the display shows a file with some source code and comments:

;; Hello, Jodah, and welcome to Fright Night!
;;
;; I understand that you've been looking for a challenge, so I'm granting
;; your wish!
;;
;; At 11:57pm, a background service will run on this laptop. It will attempt
;; to compile the file you see before you and then link it into an ELB
;; (library). It will then attempt to compile and link my own little
;; program with yours, and if all goes well, run the resulting executable.
;;
;; My program is simplicity itself.
;; 1) It creates an instance of the class below.
;; 2) It calls the "CellarDoor.GetPasscode" method.
;; 3) It sends the 4-digit decimal value of “CellarDoor.Passcode” to
;; the lock
;;    on the door behind you!
;;
;; If the passcode is correct, the door opens and you're free to go!
;; If something goes wrong or the compile fails, don’t worry: the
;; lock is on a timer and will open on its own...
;;
;; ...at 6:00 tomorrow morning.

;;
;; Have fun, and help yourself to a glass of cognac while you
;; figure it out. ;;
;; Yours truly,
;; The Code Phantom
;;
;; PS: This might be a good time to tell you about a function I wrote that
;; returns the proper passcode. Its name and signature is:
;;              void GenCode(out d theCode)
;; I'll link it in for you automatically, so what could be easier? Don't say
;; I never did anything for you...

namespace CodePhantom.HalloweenChallenge
   public class CellarDoor
 
        public method CellarDoor
        proc
            Passcode = 0       ;   Not defined!
        endmethod
 
        public method GetPasscode   ,void
            endparams
        proc
               ;   TODO!
        endmethod
 
    endclass

endnamespace

Jodah looks at the clock: 11:35. Looking back at the code, he pulls up the chair, sits down, and, after several minutes, hacks out a few lines of code. The result is as follows:

namespace CodePhantom.HalloweenChallenge
    public class CellarDoor
        private mPasscode   ,d4
 
        public method CellarDoor
        proc
            Passcode = 0
        endmethod
 
        public method GetPasscode   ,void
            endparams
        proc
            GenCode(Passcode)
            mreturn   
        endmethod
 
        public property Passcode    ,d4
            public method get
            proc
                mreturn mPasscode
            endmethod
            public method set
            proc
                mPasscode = value
            endmethod
        endproperty
 
    endclass
endnamespace

Jodah makes sure the file is saved, peruses the bottles in the recesses until he finds the cognac (the only bottle not covered by cobwebs and years of dust), and calmly helps himself to a snifter while waiting for the clock to reach 11:57.
What happens next?

  1. Jodah enjoys the cognac and at 11:57, the code builds successfully and the door pops open. Jodah escapes in the nick of time!
  2. Jodah enjoys the cognac until 11:57, tugs fruitlessly on the door until 11:58, hammers on it with his fists until 11:59, screams “Let me out! Let me out! Letmeoutletmeoutletmeout” until midnight...and then shambles out of the cellar as a mindless zombie when the door opens at 6:00 the next morning. Ghosts are very real, and that goes double for Halloween.
  3. Jodah finishes the cognac…and the Château Latour 1865…and the Chateau d'Yquem 1921.  At 6 o’clock – just about the time he decides he’d give anything for a wheel of cheese and a few crackers – the cellar door opens. Jodah shambles out of the cellar with a pounding headache and a bruised ego. Ghosts, of course, don’t exist – even on Halloween.

Don’t know? The answer will be tweeted by @SynergyDE tomorrow!
(If you are not yet following us on Twitter, please do so! It’s the fastest way to get our news and announcements! Go to twitter.com/synergyde.)

 
hr1
Platform News
 
Windows

Microsoft offers $99 upgrades to Visual Studio 2013
http://www.microsoft.com/visualstudio/eng/buy

Microsoft starts rolling out Windows 8.1
October 17, 2013
http://www.zdnet.com/microsoft-starts-rolling-out-windows-8-1-7000022052/

With Windows 8.1, Microsoft seeks redemption of bold, flawed OS redesign
October 17, 2013
http://www.computerworld.com/s/article/9243276/With_Windows_8.1_Microsoft_seeks_redemption_of_bold_flawed_OS_redesign?taxonomyId=89

Microsoft fires off Windows 8.1, first round in fast-track updates
October 17, 2013
http://www.computerworld.com/s/article/9243283/Microsoft_fires_off_Windows_8.1_first_round_in_fast_track_updates?taxonomyId=89

Windows 8 brushes up against 10% user share mark
October 1, 2013
http://www.computerworld.com/s/article/9242863/Windows_8_brushes_up_against_10_user_share_mark

Unix/Linux
Monitor disk IO on Linux server with iotop and cron
October 22, 2013
http://www.binarytides.com/monitor-disk-io-iotop-cron/

Red Hat Enterprise Linux 6.5 enters beta
October 9, 2013 
http://www.internetnews.com/software/red-hat-enterprise-linux-6-5-enters-beta.html

Red Hat Enterprise Linux 5.10 released with MySQL 5.5
October 2, 2013
http://www.internetnews.com/software/red-hat-enterprise-linux-5.10-released-with-mysql-5.5.html

 

Other
US government releases draft cybersecurity framework
October 22, 2013
http://news.cnet.com/8301-1009_3-57608834-83/us-government-releases-draft-cybersecurity-framework/

Cyber-crime costs continue to rise: study
October 8, 2013
http://www.eweek.com/security/cyber-crime-costs-continue-to-rise-study.html

 

 
 
In This Issue
 
link bullet Synergy/DE 10.1.1b Released
link bullet PSG Blog: Synergy and XAML in Harmony
link bullet PSG Blog: UI Consistency 101
Put some <style> into your application
link bullet PSG Blog: Become Master of Your AppDomain
link bullet Why We’re Partial to Partial Methods
link bullet Tech Tip: Failure loading prototype file
link bullet Are You up for the Challenge?
link bullet Platform News
 
Synergy/DE Links
 
link bullet Product Documentation
link bullet Current Releases
link bullet Product Videos
link bullet Resource Center Login
hr1
  logo