Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You are lost in the Swamps of Despair.


devel / comp.lang.mumps / Re: YDB-E-DEVPARUNK

SubjectAuthor
* YDB-E-DEVPARUNKLuciano Muratore
`* Re: YDB-E-DEVPARUNKK.S. Bhaskar
 `* Re: YDB-E-DEVPARUNKed de moel
  `* Re: YDB-E-DEVPARUNKJens
   `* Re: YDB-E-DEVPARUNKed de moel
    +- Re: YDB-E-DEVPARUNKed de moel
    `- Re: YDB-E-DEVPARUNKed de moel

1
YDB-E-DEVPARUNK

<6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=295&group=comp.lang.mumps#295

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:6214:411e:: with SMTP id kc30mr41886722qvb.94.1641214846265;
Mon, 03 Jan 2022 05:00:46 -0800 (PST)
X-Received: by 2002:ac8:58ca:: with SMTP id u10mr40022907qta.44.1641214846051;
Mon, 03 Jan 2022 05:00:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 3 Jan 2022 05:00:45 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=185.174.184.98; posting-account=sN-t4goAAABTp4WhwGKtkstxs_YelddF
NNTP-Posting-Host: 185.174.184.98
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
Subject: YDB-E-DEVPARUNK
From: muratorela@gmail.com (Luciano Muratore)
Injection-Date: Mon, 03 Jan 2022 13:00:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Luciano Muratore - Mon, 3 Jan 2022 13:00 UTC

Dears,
I am trying to implement the program from: https://www.youtube.com/watch?v=ObUAklaia1Y.
But, I have the following problem:
open 1:"mtrees2003.m,old"
^-----
At column 9, line 2, source module /home/test/.yottadb/r1.32_x86_64/r/mesh.m
%YDB-E-DEVPARUNK, Deviceparameter unknown

The code was:
kill ^mesh
open 1:"mtrees.m,old"
if '$test write "mtrees2003.m not found",in,! halt

Any suggestions?

Re: YDB-E-DEVPARUNK

<545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=296&group=comp.lang.mumps#296

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:4495:: with SMTP id x21mr31418610qkp.633.1641219947864;
Mon, 03 Jan 2022 06:25:47 -0800 (PST)
X-Received: by 2002:a05:622a:1113:: with SMTP id e19mr37271945qty.612.1641219947605;
Mon, 03 Jan 2022 06:25:47 -0800 (PST)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 3 Jan 2022 06:25:47 -0800 (PST)
In-Reply-To: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.52.84.50; posting-account=zTPg1AoAAABx_LtAQ3dW6FBnU1dwmSvl
NNTP-Posting-Host: 108.52.84.50
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: ksbhaskar@gmail.com (K.S. Bhaskar)
Injection-Date: Mon, 03 Jan 2022 14:25:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 23
 by: K.S. Bhaskar - Mon, 3 Jan 2022 14:25 UTC

On Monday, January 3, 2022 at 8:00:46 AM UTC-5, Luciano Muratore wrote:
> Dears,
> I am trying to implement the program from: https://www.youtube.com/watch?v=ObUAklaia1Y.
> But, I have the following problem:
> open 1:"mtrees2003.m,old"
> ^-----
> At column 9, line 2, source module /home/test/.yottadb/r1.32_x86_64/r/mesh.m
> %YDB-E-DEVPARUNK, Deviceparameter unknown
>
> The code was:
> kill ^mesh
> open 1:"mtrees.m,old"
> if '$test write "mtrees2003.m not found",in,! halt
>
> Any suggestions?

That does not look like YottaDB code. Device parameters in M are not standard. https://docs.yottadb.com/ProgrammersGuide/ioproc.html# and https://docs..yottadb.com/ProgrammersGuide/commands.html may be helpful.

Regards
– Bhaskar

Re: YDB-E-DEVPARUNK

<5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=297&group=comp.lang.mumps#297

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:4446:: with SMTP id w6mr32592572qkp.631.1641223747714;
Mon, 03 Jan 2022 07:29:07 -0800 (PST)
X-Received: by 2002:a05:620a:4445:: with SMTP id w5mr32186065qkp.617.1641223747575;
Mon, 03 Jan 2022 07:29:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 3 Jan 2022 07:29:07 -0800 (PST)
In-Reply-To: <545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.174.62.16; posting-account=j7lJmQoAAADTx0Apfk15DZ7D0qlYy4zv
NNTP-Posting-Host: 71.174.62.16
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com> <545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: eddemoel@gmail.com (ed de moel)
Injection-Date: Mon, 03 Jan 2022 15:29:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 6
 by: ed de moel - Mon, 3 Jan 2022 15:29 UTC

The example on youtube uses Kevin O'Kane's implementation of M[UMPS].
The YottaDB equivalent of that open statement would be OPEN "mtrees2003.txt":READONLY
and later on in the program, the USE and CLOSE commands should not use "unit number 1", but "mtrees2003.txt".
The "use 5" in that sample would probably become "USE $Principal".
Of course, that would require that the file named mtrees2003.txt exists on the computer where the program is running...
Ed

Re: YDB-E-DEVPARUNK

<a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=298&group=comp.lang.mumps#298

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:4495:: with SMTP id x21mr31670663qkp.633.1641224895242;
Mon, 03 Jan 2022 07:48:15 -0800 (PST)
X-Received: by 2002:a05:620a:4051:: with SMTP id i17mr28785583qko.336.1641224895033;
Mon, 03 Jan 2022 07:48:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 3 Jan 2022 07:48:14 -0800 (PST)
In-Reply-To: <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e70d:900:160:d628:7b51:edd9;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e70d:900:160:d628:7b51:edd9
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
<545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com> <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: jewu34@web.de (Jens)
Injection-Date: Mon, 03 Jan 2022 15:48:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 37
 by: Jens - Mon, 3 Jan 2022 15:48 UTC

A yottadb-version of this code shoul look like:
Meshtree ;Meshtree.m
kill ^mesh
set device="mtrees2003.txt"
open device:(readonly:exception="W device_"" not found"" halt")
for use device quit:$zeof read a do
. set key=$piece(a,";",1) ; text description
. set code=$piece(a,";",2) ; everything else
. if key=""!(code="") quit
. for i=1:1 do
. . set x(i)=$piece(code,".",i) ; extract code numbers
. . if x(i)="" quit
. set i=i-1
. use 0
. set z="^mesh(" ; begin building a global reference
.;
.;-----------------------------------------------------------------------
.; build a reference like ^mesh("A01","047","025","600)
.; by concatenating quotes, codes, quotes, and commas onto z
.;#-----------------------------------------------------------------------
.;
. for j=1:1:i-1 set z=z_""""_x(j)_""","
. set z="set "_z_""""_x(i)_""")="""_key_""""
.;
.;#-----------------------------------------------------------------------
.;# z now looks like set ^mesh("A01","047")="Abdomen"
.;# now execute the text
.;#-----------------------------------------------------------------------
.;
. write z,!
. xecute z
;
close device
use 0
write "done",!
halt

Remember the double spaces after argumentless for and argumentless quit...

Re: YDB-E-DEVPARUNK

<6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=299&group=comp.lang.mumps#299

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:75c3:: with SMTP id z3mr40707406qtq.527.1641231624301;
Mon, 03 Jan 2022 09:40:24 -0800 (PST)
X-Received: by 2002:a05:622a:f:: with SMTP id x15mr41229450qtw.481.1641231624143;
Mon, 03 Jan 2022 09:40:24 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 3 Jan 2022 09:40:23 -0800 (PST)
In-Reply-To: <a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.174.62.16; posting-account=j7lJmQoAAADTx0Apfk15DZ7D0qlYy4zv
NNTP-Posting-Host: 71.174.62.16
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
<545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com> <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
<a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: eddemoel@gmail.com (ed de moel)
Injection-Date: Mon, 03 Jan 2022 17:40:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 43
 by: ed de moel - Mon, 3 Jan 2022 17:40 UTC

Since this code was intended as a teaching example, I'd change it for the following reasons:
- use meaningful variable names
- do not use single character variable names
- do not use HALT unless there is a severe error, use QUIT to go back to the calling program
- use the USE command close to the READ or WRITE that it is associated with
- do not use unnecessary intermediate arrays
- do not use multiple loops when a single one is all you need
- I just prefer to use $Principal rather than a platform-specific device number, although both work the same in all implementations that I know of
Which gives me:
Meshtree ;
  kill ^mesh
  set filename="mtrees2003.txt"
  open filename:(readonly:exception="write "_filename_"" not found"" halt")
  for  use filename quit:$zeof  read line do
  . set key=$piece(line,";",1) ; text description
  . set code=$piece(line,";",2) ; list of codes
  . if (key="")!(code="") quit
  . set command="Set ^mesh",separator="("
  . for ii=1:1 Set part=$piece(code,".",ii) Quit:part=""  Set command=command_separator_""""_part_"""",separator=","
  . set command=command_")="""_key_""""
  .;
  .;#-----------------------------------------------------------------------
  .;# command now looks like set ^mesh("A01","047")="Abdomen"
  .;# now execute the text
  .;#-----------------------------------------------------------------------
  .;
  . use $principal write command,!
  . xecute command
  ;
  close filename
  use $principal write "done",!
  quit

(And of course, the code assumes that neither the mesh-codes, nor the key values contain any occurrences of the character " (quote, sometimes called double quote)...)

Re: YDB-E-DEVPARUNK

<d2ea6fa2-face-42ed-ab61-917ad0e59ad1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=300&group=comp.lang.mumps#300

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:e0c:: with SMTP id y12mr40298397qkm.109.1641424240141;
Wed, 05 Jan 2022 15:10:40 -0800 (PST)
X-Received: by 2002:a05:6214:230f:: with SMTP id gc15mr36363206qvb.124.1641424240012;
Wed, 05 Jan 2022 15:10:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 5 Jan 2022 15:10:39 -0800 (PST)
In-Reply-To: <6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.174.62.16; posting-account=j7lJmQoAAADTx0Apfk15DZ7D0qlYy4zv
NNTP-Posting-Host: 71.174.62.16
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
<545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com> <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
<a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com> <6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2ea6fa2-face-42ed-ab61-917ad0e59ad1n@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: eddemoel@gmail.com (ed de moel)
Injection-Date: Wed, 05 Jan 2022 23:10:40 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 34
 by: ed de moel - Wed, 5 Jan 2022 23:10 UTC

On Monday, January 3, 2022 at 12:40:24 PM UTC-5, ed de moel wrote:
> Since this code was intended as a teaching example, I'd change it for the following reasons:
> - use meaningful variable names
> - do not use single character variable names
> - do not use HALT unless there is a severe error, use QUIT to go back to the calling program
> - use the USE command close to the READ or WRITE that it is associated with
> - do not use unnecessary intermediate arrays
> - do not use multiple loops when a single one is all you need
> - I just prefer to use $Principal rather than a platform-specific device number, although both work the same in all implementations that I know of
> Which gives me:
> Meshtree ;
> kill ^mesh
> set filename="mtrees2003.txt"
> open filename:(readonly:exception="write "_filename_"" not found"" halt")
> for use filename quit:$zeof read line do
> . set key=$piece(line,";",1) ; text description
> . set code=$piece(line,";",2) ; list of codes
> . if (key="")!(code="") quit
> . set command="Set ^mesh",separator="("
> . for ii=1:1 Set part=$piece(code,".",ii) Quit:part="" Set command=command_separator_""""_part_"""",separator=","
> . set command=command_")="""_key_""""
> .;
> .;#-----------------------------------------------------------------------
> .;# command now looks like set ^mesh("A01","047")="Abdomen"
> .;# now execute the text
> .;#-----------------------------------------------------------------------
> .;
> . use $principal write command,!
> . xecute command
> ;
> close filename
> use $principal write "done",!
> quit
>
> (And of course, the code assumes that neither the mesh-codes, nor the key values contain any occurrences of the character " (quote, sometimes called double quote)...)

Re: YDB-E-DEVPARUNK

<977b4ae5-42a6-4647-892f-8302c32669ebn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=301&group=comp.lang.mumps#301

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:5ec1:: with SMTP id s1mr50805332qtx.584.1641424403733;
Wed, 05 Jan 2022 15:13:23 -0800 (PST)
X-Received: by 2002:a05:6214:2626:: with SMTP id gv6mr52773768qvb.29.1641424403621;
Wed, 05 Jan 2022 15:13:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 5 Jan 2022 15:13:23 -0800 (PST)
In-Reply-To: <6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.174.62.16; posting-account=j7lJmQoAAADTx0Apfk15DZ7D0qlYy4zv
NNTP-Posting-Host: 71.174.62.16
References: <6cfe19ad-8dac-4095-892f-157e86fdd9b6n@googlegroups.com>
<545c3fe9-5589-4cbe-ba59-2d8c0a8effd8n@googlegroups.com> <5d598339-ce04-421e-8509-7d8484a1ff7an@googlegroups.com>
<a83e3abc-14d8-4f00-8851-c4a70a7ce59an@googlegroups.com> <6166710e-bd24-4920-acba-6cc310c47f26n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <977b4ae5-42a6-4647-892f-8302c32669ebn@googlegroups.com>
Subject: Re: YDB-E-DEVPARUNK
From: eddemoel@gmail.com (ed de moel)
Injection-Date: Wed, 05 Jan 2022 23:13:23 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 3
 by: ed de moel - Wed, 5 Jan 2022 23:13 UTC

For some reason this exercise interests me.
If you don't have the file mtrees2003.txt, I made the current version available at
http://71.174.62.16/mtrees2022.txt
And, of course, I still leave it as a home-work assignment for the students to handle key values and code values that contain a quote character (it's not that hard).

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor