Discussion
· Nov 17, 2021
Code Golf - Encoder

We need to send some coordinates to a spaceship through a laser beam.
To do that we have to encode it, and beam it out into space.
Your mission is to implement the encoder with a compression standard.
As usual shortest solution wins.

Task

You will receive a string of comma-separated integers and you will return a new string of comma-separated integers and sequence descriptors.

Input

"0,2,4,5,5,5,5,5,3,4,5"

Output

"0-4/2,5*5,3-5"

4 8
2 563

I am sure I came across this in the past with Cache and just saw this again in IRIS.

When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.

For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.

0 5
0 178

This year at Global Summit we will have several members of the InterSystems internal applications team (AppServices) on site to present topics of interest to developers. There will be General Sessions that we teach on a number of topics related to tools we're launching to the OEX, knowledge gained based on migrating our Caché app portfolio to InterSystems IRIS, best practices for following OWASP Top 10 with ObjectScript, and a survey of the application landscape offering services to our customers and prospects.

2 9
0 194
Discussion
· Mar 4, 2022
Code Golf: Label Validation

New month, new code golf!

You will receive a string with a label code with numbers and letters.
Our challenge is to check if this code begins with 1, 2, or 3 and ends with A, B, C, S, or R.
It should return true(1) if so or return false(0) otherwise.
As usual shortest solution wins.

Input

"198739A79D9R"

Output

1

6 4
1 304

Let's consider you would like to efficiently store your historical data in a similar structure than the one used for your current data, but without sharing the same physical storage (ie : not in the same global). What is the most efficient way to do it ?

Below a simple class of your current data :

3 9
0 348
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 682

For me the best moments were:

1 - Global Masters WON the 2021 Influitive BAMMIE Award for Most Passionate Community

2 - Tech Article contests

3 - InterSystems Programming Contests

4 - 10,000+ DC members

5 - Partner directory and business services

6 - 500+ applications on OEX

7 - Open Virtual Summits

8 - Prizes from GM points

9 - Free online learning courses

10 - Discord channels

11 - Innovations from IRIS Data Platform

12 - Multilanguage communities, including portuguese, spanish and chinese community

5 4
0 153

Hi, Community!

Open Exchange (OEX) is getting more and more popular and more and more developers consider publishing their apps in the public package manager registry.

This is really great!

So the topic of thoughtful naming convention is getting more important and even critical. Let's discuss?

1 6
0 383
Discussion
· Oct 8, 2021
Code Golf: Just add water...

Have you ever seen those vaccum compressed towels, that look like a pill and after you add water became a towel?

That's our challenge for today. As usual shortest solution wins.

Task

You will receive an integer number and you will return a new number where each digit is repeated a number of times equals to its value.

Input:

42

Output:

444422

Note:

3 11
0 425

When overwriting the Read method (that has a %CacheString return type) on a new class that inherits %Stream.FileCharacter class, returns an error about incorrect return type, must be Binary, even if it matched the real signature.

Looking at the compile global information we can see:

^oddCOM("%Stream.FileBinary","m","Read",42)="%Library.Binary"

After further investigation we realise that there is a generator method looking at the OdbcType class definition.

Setting LONGVARCHAR results in:

^oddCOM("User.CStream","m","Read",42)="%Library.String"

0 0
0 161

A quine is a computer program which takes no input and produces a copy of its own source code as its only output.

Wikipedia.

How about a fun challenge?

The task is to write a quine in InterSystems ObjectScript. It can be a class, or a method, or a routine, or just a line to be executed in a terminal. You decide!

Here's some resources you might consider useful:

Hard mode: do not use source code access functions.

Here's my (extremely uninspired, I know) attempt:

Class User.Quine
{

/// do ##class(User.Quine).Test()
ClassMethod Test()
{
    set sc = ##class(%Compiler.UDL.TextServices).GetTextAsString($namespace, $classname(), .str)
    write str
}

}

It produces this output:

How many different ways of producing a quine are there in ObjectScript?

9 15
0 490

When I'm asked questions about SQL, I like Intersystems staff at the WRC, generally ask about the Query Plan. My feeling is that even before you run a query you should examine the results of Show Plan to confirm that the code is going to give me the results in the manner I would expect. If I expect it to leverage an index and I see that it is not then I go back and look at what I might have done incorrectly and try to re-write the query to get the index behavior I'm looking for. To that end, there's a poll below to ask you if think moving the Show Plan button as the first button would be

0 0
0 144
Discussion
· Jul 6, 2021
Vunerability Scan

Hi All,

I have to do intersystems iris objectscript code vulnerability scan. I tried in synck vulnerabilities but it's not supported for the xml file. Can someone guide me? Anyother tools are there to do this?

0 1
0 153

Images for other languages are often build using multistage build process.

What about InterSystems IRIS?

Consider this Dockerfile:

FROM irishealth-community:2020.4.0.524.0 AS builder

# Load code into USER and compile
# Adjust settings, etc.

FROM irishealth-community:2020.4.0.524.0

# replace in standard kit with what we modified in first stage

COPY --from=builder /usr/irissys/iris.cpf /usr/irissys/.
COPY --from=builder /usr/irissys/mgr/IRIS.DAT /usr/irissys/mgr/.
COPY --from=builder /usr/irissys/mgr/user/IRIS.DAT /usr/irissys/mgr/user/.

The advantage of this approach is the image size.
The disadvantage is that on a final stage developer must know/remember all the modified places in the builder image.

But otherwise is this approach OK for InterSystems IRIS?
Have anyone tried to build IRIS images this way?

2 9
0 250

Hi Developers!

Thank you for using ZPM Package Manager and contributing more and more useful packages to the public registry!

But as you already aware ZPM packages are always deployed with source code.

Do you think we need to add the option to deploy without source code - e.g. if you want to deploy a commercial package?

Will you develop commercial modules if there will be an option and deploy it with ZPM?

How do you deploy commercial applications today?

4 10
0 253
Discussion
· Jan 10, 2021
Code Golf: Diamonds
To start the year let's have a round of CodeGolf!

You know the drill. Shortest solution wins.

Print a size ascending range of Diamonds using the numbers 1 to 9, ranging from size 1 to size N, each diamond separated by a blank line.

A size 1 diamond should look like this, a single centered 1:

         1

With the size N=9 diamond looking like this:

2 19
0 457

Hi Developers!

Want to raise security discussion today!

Let's discuss how InterSystems security for applications works. In general, the concept is clear: we have Resources (what to protect), Roles which combine a set of privileges and accesses to Resources and Users which can have this or that Role.

But there is also a concept of Application which also could have a Role.

So you either provide a Role for a User or for an Application.

What do you use in production? What is your strategy and why? Pros, cons?

0 4
0 214
Discussion
· Nov 10, 2020
Why change?

I have already asked a question about migrating an Oracle database to Caché, and I was promptly answered. Now, I have one more question, however it is more conceptual. In general, any tool defends its benefits, and looking at Caché's, among many, there is a lot of talk about speed. The question is, if I already have a database, and at the moment, its performance is not a problem, I would like to know what else could influence the change of this database? Remembering that it is functional and without any apparent problem.

8 2
1 249