Evgeny Shvarov · Sep 14, 2019 go to post

Do not use repository - it is should not be used for anything besides development.

What do you recommend to use Python Gateway in docker container instead?

Evgeny Shvarov · Sep 14, 2019 go to post

Hi Ed!

Thanks for the release!

Tried to build container got the following:

Step 16/20 : COPY --chown=irisowner ./isc/ $SRC_DIR/isc
 ---> e49473814d17
Step 17/20 : COPY --chown=irisowner ./rtn/ $SRC_DIR/rtn
 ---> 12750dfbd0fa
Step 18/20 : COPY --chown=irisowner iscpython.so $ISC_PACKAGE_INSTALLDIR/bin/
ERROR: Service 'iris' failed to build: COPY failed: stat /var/l
ib/docker/tmp/docker-builder811746695/iscpython.so: no such file or directory

Could you please check?

Evgeny Shvarov · Sep 14, 2019 go to post

Hi Ed!

This is $Translate again )

Assume you need all the ASCII codes from 33 to 126 - letters, numbers, punctuation.

So:

classmethod onlygood(str) as %String

{

for i=0:1:255 set $E(all,i)=$C(i)

for i=33:1:126 set $E(good,i)=$C(i)

// adding spaces for "no good" symbols

set good=$J("",34)_good_$J("",129)

return $tr(str,all,good)

}
Evgeny Shvarov · Sep 13, 2019 go to post

The answer is:

To remove the Count measure put any other measure of the cube into the Measures section of the Pivot.

Evgeny Shvarov · Sep 13, 2019 go to post

Hi Lawrence!

But if you remove Count what number do you want to calculate? Do you have any other measure?

The nature of pivots is that you need at least one measure in a pivot. If you don't supply any DeepSee takes Count by default - the amount of Facts in your Fact table.

Evgeny Shvarov · Sep 13, 2019 go to post

Thanks, Anastasia!

The video is 20 min long, but it describes how to start coding, compiling, debugging ObjectScript on InterSystems IRIS in less than a minute!

All you need is Git, VSCode and Docker installed.

Evgeny Shvarov · Sep 10, 2019 go to post

Hi Ed, thanks for sharing!

3. Add template to a server with InterSystems IRIS

Could you provide more details on it?

Evgeny Shvarov · Sep 9, 2019 go to post

Hi, Rubens!

PS: Evgeny, what do you think of adding a Post type called Information? I think the one I used is not adequate, but I had no options since the other types seemed lesser adequate.

Thank you! It's a good idea.  You always can submit a feature request for DC. I would say that this looks like a public discussion around product feature requests, right? To have DC as a sort of idea-portal.

Maybe we'll introduce something like this. But in order to have this more than conversation and to have some follow up on product development, we need to discuss it with Product management.

For now, I think this is more of type Question than Article.

Evgeny Shvarov · Sep 5, 2019 go to post

Also,  if you use $I() or $seq() for id generation it's not comparable  with count=count+1 cause $I is not reversible in trollbacks

Evgeny Shvarov · Sep 5, 2019 go to post

Which implies that foreach iteration is not desired here.

Got you, this was the word "dictionaries". Removed it and added the comment about each element of array.

If you're sure that it would be less than $$$MaxStringLength then you can use $lb, otherwise use locals (which can be converted to ppg/globals easily).

Yes. Thanks.

Evgeny Shvarov · Sep 5, 2019 go to post

Interesting that I can use $LB in a parameter declaration, but cannot call a method - e.g. if you need some logic to form a list. This is not compilable in this case.

Evgeny Shvarov · Sep 5, 2019 go to post

2. Sometimes you WANT and NEED to do the full scan. And my topic was about these cases. In some programming languages, we even can find reserve words for such, e.g. for each.

And again your comment is interesting and helpful and deserves another topic too.

Evgeny Shvarov · Sep 4, 2019 go to post

Thanks, Ed! Two remarks:

1. You mention iteration over resultset and introduce an example of iteration over array of columns cortege or record.

2. My question is not about getting values from arrays like list, locals, ppg, globals but what is better to use when you have a case of full scan over the array that in some cases lists are handier vs locals etc. 

Though the question of what array is better when you need to get values for keys is interesting too, maybe it's another good topic for discussion. Answering your statement here I agree for LB the choice for value by position if it's not a very large (huge) array, where the global is the only answer.

Evgeny Shvarov · Sep 3, 2019 go to post

I was looking at @David Underhill's code for Metrics project and decided that for one level global traversing his code style is the most readable:

    s database="" for {
        s database=$o(databases(database))
        q:database=""

...

}

And in general:

s iter="" for {

    s iter=$o(^array(iter)) q:iter=""

 // do something

}

So, use for instead of while for global traversing and this is readable and you never miss the next set is in while example.

Evgeny Shvarov · Sep 2, 2019 go to post

Cool. And what is better with while $listnext from the performance point of view - local variable or refer to a parameter every time?

Evgeny Shvarov · Sep 2, 2019 go to post

Very rich library and awesome package structure and ObjectScript styling. Perfect work, thank you Richard!

Evgeny Shvarov · Aug 29, 2019 go to post

Mine is faster ;)

ClassMethod RussianToEnglish(russian = "привет") As %String

{

set rus="абвгдезийклмнопрстуфхыэАБВГДЕЗИЙКЛМНОПРСТУФХЫЭьЬъЪ"

set eng="abvgdeziyklmnoprstufhyeABVGDEZIYKLMNOPRSTUFHYE"

set rus("ж")="zh"

set rus("ц")="ts"

set rus("ч")="ch"

set rus("ш")="sh"

set rus("щ")="shch"

set rus("ю")="yu"

set rus("я")="ya"

set rus("Ж")="Zh"

set rus("Ц")="Ts"

set rus("Ч")="Ch"

set rus("Ш")="Sh"

set rus("Щ")="Shch"

set rus("Ю")="Yu"

set rus("Я")="Ya"

set english=$tr(russian,rus,eng)



set wow=$O(rus(""))

while wow'="" {

set english=$Replace(english,wow,rus(wow))

set wow=$O(rus(wow))

}

return english

}

USER>w ##class(Example.ObjectScript).RussianToEnglish("Я вас любил: любовь еще, быть может, В душе моей угасла не совсем;"))
Ya vas lyubil: lyubov eshche, byt mozhet, V dushe moey ugasla ne sovsem;
USER>

Evgeny Shvarov · Aug 29, 2019 go to post

Hi Vivek!

If you want to check for all the required fields instead of checking it on %Save,  you better scan the class before %Save on the properties with required flag and check whether you have the value for it.

IMHO, this is the only way to show all the required fields at once.