Discussion
· Mar 3, 2016
Anyone using Visual Studio Code?

Is anyone in the fine community of developers who work with ISC technologies looking at Microsoft's Visual Studio Code offering?

One of Bill McCormick's recent posts about Atelier referred to Visual Studio being considered the best IDE. Granted, Code is far less of a tool than VS, and probably always will be. But it claims to be open source and cross-platform, i.e. Linux and OS X as well as Windows.

8 26
3 5K

Hi, Community!

Have a question for general discussion.

In ObjectScript we have cls for classes and mac code, which both compile into int code.

Is there any reason when you use mac instead of cls for non-persistent classes?

For me the benefits for cls are:

1. Inheritance and other OOP features

2. Auto-documented code

For mac one visible benefit is easier call in terminal:

do method^Utils(p1,p2)

vs

1 43
1 2.6K

Hello community!

At the global summit in Phoenix, we (Lite Solutions) will be presenting a tool performing static code analysis on ObjectScript source files. You can see it in action at this URL:

https://demo.cachequality.com

Technically, the tool is a language plugin over SonarQube (http://sonarqube.org) and consists of three main parts:

5 6
1 1.8K

Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter to pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations?

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

3 27
1 1.5K

We've been tasked with developing a file upload module as part of our wider system, storing scanned documents against a patients profile. Our Intersystems manager suggested storing those files in the DB as streams would be the best approach and it sounded like a solid idea, it can be encrypted, complex indexes, optimized for large files and so on. However the stake holder questioned why would we want to do that over storing them in windows folders and that putting it in the DB was nuts.

2 25
2 1K
Discussion
· Sep 28, 2020
%Status usage in ObjectScript

Hi developers!

Want to discuss with you the case of %Status.

If you familiar with ObjectScript you know what is it. I'd love to hear the history of the case why it had appeared in ObjectScript but it turned out that almost every system/library classmethods return %Status and there is a whole set of tools to deal with it.

What is does it gives you the responsibility to check the value or %Status of every system method you call.

E.g. if you save the data of the persistent class, you should never call like this:

do obj.%Save()

you need to call:

set sc=obj.%Save()

if $$$ISERR(sc) do // something or quit.

1 19
0 953

Hi Community!

There are two general ways to execute arbitrary SQL in serverside ObjectScript code: EmbeddedSQL and ObjectScript SQL a.k.a. Dynamic SQL.

E.g. if we want to get the value of the property of instance with a certain ID using SQL we can do:

&sql(SELECT Name INTO :name FROM Sample.Person WHERE ID=1)

write name

Same result with %SQL.Statement:

set rs=##class(%SQL.Statement).%ExecDirect(,"SELECT Name as name FROM Sample.Person where ID=1")
  do rs.%Next()
  write rs.name

1 2
0 906
Discussion
· Sep 16, 2022
txt2img
Several models, such as DALL-E, Midjourney, and StableDiffusion, became available recently. All these models generate digital images from natural language descriptions. The most interesting one, in my opinion, is StableDiffusion which is open source - released barely a few weeks ago. There's now an entire community trying to leverage it for various use cases.
2 0
0 810

The new $system.external interface (aka "InterSystems External Servers") is used to call/integrate with external language code/libraries, it replace the old gateways (for example Java gateway) that required the import of proxy objects.

Note that the documentation for the old gateways has been removed from IRIS, so only the new $system.external interface is somewhat (i.e. insufficiently) documented.

Regarding the migration from old gateway to new $system.external interface the documentation says:

7 14
2 792

Hi Community,

We've launched a nice competition on Global Masters under the "Season of Giving" campaign, which I hope will bring inspiration to all of you!

We inviting you to share your task ideas for new applications that could be developed on InterSystems Technology. Let's enrich our Open Exchange apps gallery with great applications in 2021!

6 42
0 715
Discussion
· Feb 2, 2022
Code Golf: Paired Opposites

You will receive a string of comma-separated integers whose elements have both a negative and a positive value, except for one integer that is either only negative or only positive, our challenge will be to find that integer.
As usual shortest solution wins.

Input

"1,-1,2,-2,3"

Output

3

3 has no matching negative appearance

4 34
0 680

I would say it is a post of pain after years of using InterrSystems IRIS Docker images in many projects.

And I hope InterSystems will hear me and do something with it.

We have a lot of issues with Docker images, but I see no progress in solving them.

  • containers.intersystems.com - any new releases substitute previous versions, makes build useless
    • ARM64 images have separate names, and it makes a pain to use them
  • flags in iris-main, appears and disappears from version to version, which may fail the start the container
  • healthcheck does not work as expected

10 3
0 652
Discussion
· Jul 31, 2019
CodeGolf: FizzBuzz

Let's have a round of CodeGolf!

As usual the goal is to write the shortest solution for a specified problem.

Today we have one of the classics: FizzBuzz.

Write a program that prints the numbers from 1 to 100.

But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.

For numbers which are multiples of both three and five print “FizzBuzz”

4 22
1 616
Discussion
· Jul 28, 2023
Code Golf: Parenthesis

Our previous code golf ended with an overwhelming win, so now it's time for another one.
Parenthesis Hell is a Lisp-like esoteric programming language(esolang).
As a Lisp-like language, the code consists only of nested matched pairs of opened and closed parenthesis.
Your task is to write a method that receives a string of parenthesis and returns 1 if the order of the parenthesis is valid. For example, the string of parenthesis (())() is valid because it contains a matched pair of opened and closed parenthesis at each position. The string ()((()))) is not valid because it contains one unmatched parenthesis.

5 37
0 613