查找

Article
· Jan 17 1m de lecture

実行中のプログラムをコンパイルして保存することによるその実行中のプロセスへの影響

これは InterSystems FAQ サイトの記事です。

Question:

使用中のプログラムをコンパイルして保存すると、現在そのプログラムを実行中のプロセスに影響しますか?

Answer:

実行中のルーチンはその旧バージョンをメモリー上に保持しているため、コンパイルして新しいルーチンが保存されても影響なく実行を継続できます。

クラスのメソッドについても同様です。 再度そのルーチンが呼び出された時点でコンパイルされた新しいルーチンが使用されるようになります。

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Jan 17

Are package names case sensitive?

The documentation at https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...

Case-sensitive: variable names (other than the system variables) are case-sensitive. Names of classes and their members, names of routines and their entry points, names of include files and macros are all case sensitive.

Consider "fully qualified" class name: Package.subpackage.ClassName

What is the class name mentioned in the documentation? Package.subpackage.ClassName  or ClassName ?

It's unclear to me if in InterSystems/ObjectScript parlance class name includes also the packages or not.

In the other (non-related as my example has no SQL/%Persistent involved) documentation at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Schema and table names are not case-sensitive; package and class names are case-sensitive.

But if I try to have both Package.subpackage.ClassName  and package.subpackage.ClassName I'll get:

ERROR #5092: Name conflict on class 'package.subpackage.ClassName' because class 'Package.subpackage.ClassName' has the same name but differs in case.

Or trying to have both Package.subpackage.ClassName and package.subpackage.ClassNameTwo gives me:

ERROR #5093: Name conflict on class 'package.subpackage.ClassNameTwo' because package 'Package' has the same name but differs in case.

So it looks to me the package names are case in-sensitive. To me this is an inaccuracy/bug in the documentation and I'll report that if no-one else objects :)

This is related to "IPM modularization"-effort where I'm trying to apply de-facto naming conventions but the package name case in-sensitivity prevents us to mix the new IPM code with old code (mapped from other namespaces).

9 Comments
Discussion (9)3
Connectez-vous ou inscrivez-vous pour continuer
Article
· Jan 17 2m de lecture

Mac IRISでEmbedded Python利用に関する相性問題

Mac版IRISでは、現状Pythonのバージョンが固定(3.11)なのですが、これに付随する他製品との相性問題に遭遇しましたので報告します。

今までEmbedded Pythonは調子よく動作していたのですが、ある時から急に動作しなくなりました。

原因を調べてみると、Python3.13がインストールされ、それがデフォルトとして上書きされたため、irispythonコマンドを発行すると、それが内部で3.13を呼ぶ様になってしまったためでした。

ちなみにiris session でログインし、そこからEmbedded Pythonを実行する場合は、問題ありません。

あくまでもirispythonコマンドで直接.pyファイルを実行する場合に発生する問題です。

そしてとりあえずの対処法は、python3をpython3.11で置き換える方法です。

以下のような感じです。(どのMacでもbrewコマンドでインストールした場合、ディレクトリ構造は同じだと思いますが、違う可能性もゼロではありません)

cp /opt/homebrew/bin/python3.11 /opt/homebrew/bin/python3

さて、ところで何で3.13がインストールされていたのかというと、

IRIS SQLのLOADコマンドを動作させるためには、JDKまたはJREが必要なのでそれをインストールしました。

そしてOpenJDKのインストールの際に、勝手にPythonもインストールすることが原因でした。

何故Javaのインストールでpythonをインストールする必要があるかは不明ですが、LOAD DATAコマンドはJava経由でpythonを使用することもなさそうなので、上記の応急処置で問題なさそうですが、

根本的な対処法は、

MAC版IRISがフレキシブルpythonをサポートするか、

irispythonコマンドが自分が呼ぶべき正しいpythonバージョンを選択するか

またはわざわざirispythonを呼ばなくても通常のpythonコマンドから普通の.pyファイルを実行してembedded pythonを呼び出せる様にするか

個人的には最後が一番望ましいのですが、何か技術的な困難があるのかもしれません。

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Article
· Jan 16 3m de lecture

第七十五章 使用 ^%IS - OPEN 参数

第七十五章 使用 ^%IS - OPEN 参数

OPEN 参数

默认情况下,OPEN 命令使用 ^%IS 全局中定义的设备的规范。在使用 ^%IS 时,可以通过指定其他设置来覆盖这些设置。

发出 USE 命令

运行 ^%IS 后,应用程序必须向 ^%IS 打开的设备发出 USE 命令。你可以使用变量 IO,只要你明白每次调用 ^%IS 时它的值都会发生变化。然后,后续的IRIS I/O 命令,例如 READWRITE,将引用该设备。

发出 CLOSE 命令

用户或应用程序开发人员必须关闭使用 ^%IS 实用程序打开的设备。

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Jan 16

メンテナンス予定のお知らせ

🚨 メンテナンス予定のお知らせ 🚨  

2025年1月20日(月曜日)、計画的なメンテナンスのため、Developer Communityサイトが一時的に利用できなくなる場合があります。

ご不便をおかけしますことをお詫び申し上げます。ご理解いただきありがとうございます。プラットフォームの改善に向けた取り組みにご協力いただき、感謝いたします!  

9 Under Maintenance Page Tips | Messages for a Down Website

1 Comment
Discussion (1)1
Connectez-vous ou inscrivez-vous pour continuer