Dmitry Maslennikov · Jan 26, 2021 go to post

<STORE> error happens due to the memory limit exceeded in the process. Since 2012.2 memory limit is set as 256MB per process by default, you can increase it in System Management Portal on page Memory and Startup

Dmitry Maslennikov · Jan 23, 2021 go to post

You may face the access issue, check the docker settings that you correctly provided a list of resources that can be shared.

enter image description here

Dmitry Maslennikov · Jan 20, 2021 go to post

VSCode/Atelier debugger for instance stops execution when faces break in the running code as well as any error. And should show the place where it stops.

Dmitry Maslennikov · Jan 19, 2021 go to post

So, you tried to debug INT code, and it did not work properly? Is it reproducible, and what will happen if you recompile it? And, still interesting how it will be in VSCode at the same time.

Just curious, did you miss anything in VSCode, or you faced some issues there, so, you decided to stay with Studio? You may answer me in direct messages, to keep this topic clear.

Dmitry Maslennikov · Jan 19, 2021 go to post

First guess, just lost int code, during some compile forgot about k flag. If you debugging classes or mac routines you need int code to be able to debug it. I would also suggest trying VSCode, where the behavior can be a bit different.

Dmitry Maslennikov · Jan 19, 2021 go to post

For a few versions already Caché and IRIS already support OAuth2 out of the box. Look at the documentation.

Depends on your architecture you can use this way, or use any external Identity provider like keycloack. 

And I think IAM also can help with it as well.

Dmitry Maslennikov · Jan 15, 2021 go to post

After a brief look at the tif format, it found to be quite tricky to get ImageSize.

tif(folder, filename) {
#define READWORD $sconvert(fs.Read(2),"U2",endian)
#define READLONG $sconvert(fs.Read(4),"U4",endian)
#define WORD(%val) $sconvert(%val,"U2",endian)
#define LONG(%val) $sconvert(%val,"U4",endian)

  Set fs = ##class(%Stream.FileBinary).%New()
  Set fs.Filename = ##class(%File).NormalizeFilename(filename, folder)
  Set FileSize = fs.Size
  
  Set Width = 0, Height = 0

  Set Identifier = fs.Read(2)
  If Identifier=$Char(73,73) {
    Set endian = 0
  } ElseIf Identifier=$Char(77,77) {
    Set endian = 1
  } Else {
    Throw "Bad Format"
  }
  Set Version = fs.Read(2)

  Set IFDOffset = $$$READLONG
  
  Do {
    Do fs.MoveTo(IFDOffset+1)
    
    Set NumDirEntries = $$$READWORD
    For i=1:1:NumDirEntries {
      Set tag = fs.Read(12)
      Set TagID = $$$WORD($Extract(tag,1,2))
      Set DataType = $$$WORD($Extract(tag,3,4))
      If (TagID=256)||(TagID=257) {
        Set Value = -1
        If DataType=3 Set Value = $$$WORD($Extract(tag,9,12))
        If DataType=4 Set Value = $$$LONG($Extract(tag,9,12))
        Set:TagID=256 Width = Value
        Set:TagID=257 Height = Value
      }
    }
    Set NextIFDOffset = $$$READLONG
    Set IFDOffset = NextIFDOffset
    
    Quit:(Height>0)&&(Width>0)
  } While NextIFDOffset>0

  ZWrite Height,Width
}
Dmitry Maslennikov · Jan 15, 2021 go to post

with landslide situations.

I don't understand what you mean.

You should understand that ObjectScript is not a good way, to deal with such data as pictures, it's not a task for databases to deal with pictures on a low-level. If you need it on ObjectScript level, I would recommend using imagemagick tool, which is external for sure, and available for any platform. But you will get a lot of functionality. and getting image info as well, and you will not be limited by tiff format only. And in addition you will get the ability to do some other stuff with images, scaling, drawing conversion, and so on, it's very powerful.

Dmitry Maslennikov · Jan 15, 2021 go to post

There are many different types of applications. And Caché or nowadays IRIS is just a part of it. For any new applications, I would not recommend using ObjectScript as much as possible and use it as a Database if you need it to just store the data. Any simple application may become bigger in the future, so, having already something that will help with is a good idea. InterSystems some time already offers Community Editon version of IRIS, which is for free, without some of the features, and limited by the size of the Database. And for a simple application, 10GB looks enough. But depends on what do you mean by simple application. It may do some simple task but which will be heavy in the size of data.

Dmitry Maslennikov · Jan 14, 2021 go to post

TIF is an image format, what do you mean by reading this kind of files using ObjectScript? What do you want to get from reading it? Something like OCR tools does?

Dmitry Maslennikov · Jan 13, 2021 go to post

Since 2016.2, you can use UDL format as well, it's a format as visible in any editor. It can be used for import and for export. XML still supported as well, both ways. So, no issues at all in format.

It's not so easy to say how to deal with multiple packages/repos, with no full picture. But see no issues, if doing it in a right way.

Having code in GitHub, you can use GitHub Actions as well, and it will work too.

Dmitry Maslennikov · Jan 13, 2021 go to post

In short, you can do almost everything if you could code it. I would recommend using Docker's way of achieving this. It's not as easy to recommend something specifically, it mostly depends on what you already have, and what exactly you are going to achieve.

Dmitry Maslennikov · Jan 13, 2021 go to post

Mike, what do you mean? VSCode should compile MAC files, the same way as CLS files, just edit and save them, and it should send them to the server and compile it. Do you have any issues with it?

Dmitry Maslennikov · Jan 10, 2021 go to post
d(s) d:s>1 d(s-1) w ! f i=1:1:s,s-1:-1:1 s j=i,a=j#10 f k=j-1:-1:1 {s a=k#10_a_(k#10)} w ?30-i,a,!

I know, about logging in JDBC on the client-side, but not sure how detailed it.

I think you can find if anybody even did such SQL queries, by looking into SQL Cached Queries for the particular table in SMP.

But this will not help to find who did it.

A more reliable way is to look at Journal files. You will need to do a full scan of all journal files. Depends on how many changes you have it may take quite a long time, and you should do it in time until the journal file is purged. If you will find deleting data there, you can get JobID and time when it happened, and by using System Audit, for instance, you would be able to get the exact user.

Fortunately, there is a lot of ways to work with modern frameworks. And no reasons to use Studio for such cases.

You have to use VSCode, where you will get support for JavaScript/Typescript out of the box. And you can also code ObjectScript there as well. So, you could do everything in one modern editor.

So, company policy forces to keep all the source code only in Caché? You can install own source control server, even GitHub. It will be completely your own server anywhere you will decide. With no ability to connect from outside if you would need it.

So, yes, I still sure, not a problem at all. 
I have been worked in company with two contours, one is for development with no access to internet, completely isolated. And another network for outside world. And we had to use two PCs, for our work. And we anyway we were able to use source control

Dmitry Maslennikov · Dec 31, 2020 go to post

What do you mean by $zf does not work for anymore? There are no reasons that it would not work, if it have not used on windows with interactivity. And anyway, there are no more reasons to stay with Studio anymore, while VSCode already available

Dmitry Maslennikov · Dec 31, 2020 go to post

It’s not a problem at all. You can use on-premises versions of GitHub, GitLab, Bitbucket or anything else, depends on your budget and needs.

Dmitry Maslennikov · Dec 16, 2020 go to post

InterSystems have changed SuperServer port in a few latest builds, back to 1972. So, just replacing 51773 with 1972, should work.

You can use docker inspect 

docker inspect containers.intersystems.com/intersystems/iris:2020.4.0.524.0

Will outputs something like this

.....
            "ExposedPorts": {
                "1972/tcp": {},
                "2188/tcp": {},
                "52773/tcp": {},
                "53773/tcp": {},
                "54773/tcp": {}
            },
.....
            "Labels": {
                "com.intersystems.adhoc-info": "",
                "com.intersystems.platform-version": "2020.4.0.524.0",
                "com.intersystems.ports.default.arbiter": "2188",
                "com.intersystems.ports.default.license-server": "4002",
                "com.intersystems.ports.default.superserver": "1972",
                "com.intersystems.ports.default.webserver": "52773",
                "com.intersystems.ports.default.xdbc": "53773",
                "com.intersystems.product-name": "IRIS",
                "com.intersystems.product-platform": "dockerubuntux64",
                "com.intersystems.product-timestamp": "Thu Oct 22 2020 13:02:16 EDT",
                "com.intersystems.product-timestamp.iso8601": "2020-10-22T17:02:16Z",
                "maintainer": "InterSystems Worldwide Response Center <support@intersystems.com>",
                "org.opencontainers.image.created": "2020-10-22T19:32:32Z",
                "org.opencontainers.image.documentation": "https://docs.intersystems.com/",
                "org.opencontainers.image.title": "intersystems/iris",
                "org.opencontainers.image.vendor": "InterSystems",
                "org.opencontainers.image.version": "2020.4.0.524.0-0"
            }

I've just left, only interesting lines in your case. Where you can find, which ports are declared as exposed in the image, and labels, which declares available ports in the image.

Access directly to the label

$ docker inspect containers.intersystems.com/intersystems/iris:2020.4.0.524.0 \
  --format '{{ index .Config.Labels "com.intersystems.ports.default.superserver" }}'                                                                        
1972