Evgeny Shvarov · Mar 1, 2019 go to post

IMHO this deserves an enhancement request. Data for mapped lib classes is stored in User Namespaces,  but tune params for this data in Lib Namespace. Looks difficult to use persistent classes as part of a library in this case. 

Maybe you can generate automatically the storage class @Eduard Lebedyuk mentioned with the first call from a User Namespace?

Evgeny Shvarov · Feb 28, 2019 go to post

But why? "@" introduces an additional stack, right? And what is above in stack should be visible. Or not?

Evgeny Shvarov · Feb 28, 2019 go to post

Wow. Confirm that for IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2019.1.0S 

Evgeny Shvarov · Feb 26, 2019 go to post

Hi David!

Great you've found the answer by yourself! It happens to me sometimes right after I end writing a question)

There is no need to add "Solved" to the title to indicate the question is closed. We have the feature of an accepted answer. So you can mark your answer as Accepted and this will be the indicator for the question as solved and it will disappear from the filter of Not accepted answers.

Thanks for your contribution!

Evgeny Shvarov · Feb 26, 2019 go to post

Kyle! Really great staff! 

This is also very helpful for DeepSee/IRIS Analytics projects, where you every time need to expand the access rules on yet another listing table.

Evgeny Shvarov · Feb 23, 2019 go to post

Yes, understood. Maybe we need to allow this? But the idea is if Author of the question accepted the answer that means he doesn't want any new changes to it and wants to keep it.

Evgeny Shvarov · Feb 22, 2019 go to post

Agree with @Eduard Lebedyuk answer, want to introduce another toolset:

1. Import ISC_DEV utility to a DEFAULT_INSTANCE say in a USER namespace and map the classes of the utility to %All.

2. Setup the workdir to export the code

YOURNAMESPACE> w ##class(dev.code).workdir("/path/to/your/wor
king/directory/")

2. export code calling:

YOURNAMESPACE> w ##class(dev.code).export()

This will export cls, routines, and dfi (DeepSee) into separate files.

3. Create the repository in git and commit all the files from the directory into the repository (and even push, if you use Github/Gitlab)

4. Repeat p1-2 for a PRODUCTION_INSTANCE and export classes into the same directory.

5. Compare the changes.  If you Open the directory in  VSCode with Object_Script plugin by @Dmitry Maslennikov you will immediately see the changes in Source Control section of VSCode. E.g. I introduced one line and saved the class and it shows the files changed since the latest commit and the line with the change.

Alternatively you can commit and push changes to Github/Gitlub and see the diff since the latest commit. E.g. like changes in this commit.

If you don't have DeepSee resources, p.1 can be changed to Atelier or VSCode - both have the out-of-the-box functionality to export the source into files in UDL form.

HTH

Evgeny Shvarov · Feb 16, 2019 go to post

Like the clickable InterSystems Data Platforms tags in the repo:

@Dmitry Maslennikov , could you share, please, the code to be inserted into Reaadme.md to introduce it into the repo?

Evgeny Shvarov · Feb 16, 2019 go to post

Yes, you cannot change the content of an accepted answer.

we did this intentionally: what is the reason to change the answer, which resolved the question?

Evgeny Shvarov · Feb 15, 2019 go to post

New cool update came up with VSCode!

What's new in this version

  • IMPORTANT: Connection disabled by default, now. Set "objectscript.conn.active": true to enable it
  • Automatically Preview XML files as UDL, (disabled by default, setting objectscript.autoPreviewXML)
  • Preview XML As UDL by command from Command Palette and from Context Menu
  • Fixed highlighting for XData with css in style tag
  • Show percent-member in outline
  • Multi-root workspace supported now, for different connections
  • Multi-root workspace also for server explorer
  • Go to definition now goes to real file if such presented, or opens from the server
  • Basic syntax highlighting for CSP files, only as HTML
  • Added some snippets for class
  • Go to Subclass for the current class, available in command palette
  • Go to Super class for the current class, available in command palette
  • Go To any class/method in the workspace including server (by Cmd+T/Ctrl+T)
  • some small fixes in the highlighting, and selecting words/variables
  • Intellisense. Show list of methods for ##class(SomeClass)
  • Go to macros definition
  • Go to definition for methods and properties for self object like ..Name..SomeMethod()
  • Added completion for class parameters
  • Export without storage

Well done, Dmitry!

Evgeny Shvarov · Feb 14, 2019 go to post

Thank you, Vitaly! ObjectScript is full of opportunities! With a creative community, of course :)

Evgeny Shvarov · Feb 14, 2019 go to post

Hi Sergey! Do not take Community Edition limits into consideration. 

If you don't have limits what is the best strategy with packages/tools development in your opinion?

Evgeny Shvarov · Feb 13, 2019 go to post

Yes, you are right.

I guess it is fair for the cases when the tool spawns jobs and does some work as daemons - like services, monitoring, alerting, etc. In this case data stays with XYZ database.

But I agree that we need a public registry of "safe" Class/Global prefixes and names.

We can take some easy and obvious approaches: Github or DNS.

E.g. with the Gihub approach the package name can start with a company.reponame.

Thoughts?

Evgeny Shvarov · Feb 13, 2019 go to post

Also, the option which worked:

ClassMethod valuesCollectionToDisplay(val, delim) As %String
{
  quit ..AsJSON(val)
}

ClassMethod AsJSON(val) As %String
{
  set res = []
  set ptr = 0
  while $LISTNEXT(val, ptr, el) {
    do res.%Push(el)
  }
  quit res.%ToJSON()
}

And the SQL call:

Select %EXTERNAL(values) values from data
Evgeny Shvarov · Feb 12, 2019 go to post

Nice writing, Nikita!

Just want to mention that there is a new community option to code ObjectScript you've probably never tried - VSCode plugin for  ObjectScript by @Dmitry.Maslennikov.

A lot of developers can name VSCode as "favorite" IDE and the plugin can do really a lot for InterSystems IRIS developers today. 

Evgeny Shvarov · Feb 12, 2019 go to post

If tool XYZ is installed in namespace+database XYZ and consists of classes in the XYZ package that's %ALL-mapped from XYZ, default storage for persistent classes in that package will use globals ^XYZ.* which will get stored in the default data database of whichever namespace the tool is used in (e.g. USER). These globals mustn't clash with globals created in the same place by a tool from a different supplier, or by the end-user's own apps.

Right. And this is the reason why the tool with XYZ.Classes should be installed in XYZ namespace - in this way even if I map XYZ to %All all the data persistent data for XYZ.Classes will be stored in XYZ namespace, even if I use it from USER namespace, right?

Evgeny Shvarov · Feb 12, 2019 go to post

Hi John! Thanks for the input. Why do you think we need a prefix for globals? The matter to have a dedicated namespace/database for the tool frees us from this requirement, right?

-  There should be a central name registry, to avoid clashing on namespace/database names, package names etc between different package providers.

Agree, this is valuable. If we'll see thousands of modules. If we have a public package manager this will solve it I guess. But maybe "package name=repo name" rule could be a solver.

- What's the upper limit on namespaces? Databases?

I guess we have it in docs, but this number is large. Thousands I hope.

- Adding a namespace for each tool package will lengthen namespace lists in Studio, Portal etc. Maybe tools don't always need a namespace in front of their database. Ones that present a web app / REST interface probably do (at the moment) because of how the app config has to point to a namespace.

One of the options when tools could safely share one namespace when it has the same publisher. We often can imagine one company/developer who produces several tools which probably can be installed into one namespace/database. 

Evgeny Shvarov · Feb 5, 2019 go to post

INT code gives you the option to debug the related MAC, CLS or.. INT code. So it's for debugging purpose. And yes, it's stored in globals on disk and so needs disk space.