Eduard Lebedyuk · 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.


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





4 8
2 489

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 94

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 77

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.





6 4
1 199

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.





3 has no matching negative appearance

4 34
0 563

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 70

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 179
Eduard Lebedyuk · 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.


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.






3 11
0 339

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:


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

Setting LONGVARCHAR results in:


0 0
0 92

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


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 423

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 91

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 160
Dan Pasco · Apr 23, 2021
External Language Server in 2021.1

Now that IRIS 2021.1 is available as a preview version, I would like to demonstrate a "new" feature. The Java Gateway has been around for a while now but in 2021.1 it has new skills. External Language Servers are available for Java, DotNet, and Python. Here is a quick - very quick - demo of using the External Java Server. Please don't focus solely on what this demo is doing but rather on what is happening in this demo. First, I acquire a gateway connection oref. This gateway connection is connected to the External Java Server - one of the External Language Servers.

5 9
0 347

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?

3 10
0 192