New post

Find

Question
· Dec 18, 2024

The right side of a logical double AND (&&) riddle

References:

ObjectScript always follows strict left-to-right execution of arithmetic operators. 

The && operator evaluates the left operand and returns a value of FALSE (0) if it evaluates to a value of zero. Only if the left operand is nonzero does the && operator then evaluates the right operand. It returns a value of FALSE (0) if the right operand evaluates to a value of zero. Otherwise it returns a value of TRUE (1).

So here is a riddle then. Given the expression

write (1=0) && (1=0)

 we get the result "0", which is expected. But if we remove the parenthesis we should in theory (to my understanding) should get the same result, but we do not! We instead get "1" for the following

write 1=0 && 1=0

if this is truly left to right only operational procedence, then shouldn't it still be "0"?

1=0 && 1=0
0 && 1=0
0 (since the left side is 0, the right side shouldn't be evaluated according to docs)

But what appears to be happening is:
1=0 && 1=0
0 && 1=0
0=0

It was not clear that the right side of the `&&` operator does not extend past the "1" but literally checks only "0 && 1" and then continues to check "0=0"

I assumed that anything past a "&&" would be considered the "right side" and would exit early.
 

5 Comments
Discussion (5)2
Log in or sign up to continue
Question
· Dec 18, 2024

EnsLib.HL7.Service.* through BPL to EnsLib.HL7.MsgRouter.RoutingEngine

Very similar question posed here: https://community.intersystems.com/node/467496, but I am missing a piece of this:

How do I correctly call a EnsLib.HL7.MsgRouter.RoutingEngine class from the BPL?I can successfully call the BPL from the EnsLib.HL7.Service.TCPService, and I have the BPL created to delay then call the rule. And I set the context and the result location.

This rule is really basic just sending the HL7 content to a EnsLib.HL7.Operation.TCPOperation

The Visual Trace shows that the BPL is getting called, and the rule gets called after the delay, but the rule actions don't get called, at least not correctly?

How would I send the HL7 original message through the BPL to this rule as if the BPL was not there?

If there is another way to add a delay without the BPL, that would work as well. I have not found a way to add the delay within the rule itself.

Discussion (0)1
Log in or sign up to continue
Job
· Dec 18, 2024

IRIS InterSystems Engineer

Please note- the resource should have expertise working in CCDA/FHIR implementation along with IRIS development experience.

IRIS for Health CCDA/FHIR IRIS developer 

  1. Hard Core IRIS for Health Engineers who have experience working on IRIS for Health 
  2.  CCD/FHIR and conversion services using SDA and DTL model (at least one production implementation of Conversion services to FHIR)
  3. Have Good knowledge of GCP and GKE’s (IKO’s deployed on GKE environment or any K8 cluster)
  4. Fine tune and debug IRIS Productions, assist L2 ops team when required
  5. CICD/GIT knowledge
Discussion (0)1
Log in or sign up to continue
Article
· Dec 18, 2024 2m read

Implemented ideas: Add a project that helps to generate unittests for an ObjectScript class

This article is part of a series showcasing the implementation of ideas from the Ideas Portal, where innovative concepts come to life!

Many InterSystems IRIS developers frequently need to create unit tests for ObjectScript classes — a process often done manually. The iris-tripleslash application revolutionizes this by automatically generating unit test classes with test methods for all the class methods of the original class. Developed by the talented Musketeers team @José Pereira, @Henrique Dias, @Henry Pereira — this tool was inspired by an idea shared by @Evgeny Shvarov on the Ideas Portal: "Add a project that helps to generate unittests for an ObjectScript class".

 

The creators of iris-tripleslash have simplified and enhanced the testing process. By generating tests directly from code examples found in method descriptions, TripleSlash not only improves class documentation but also streamlines test automation. For more details and a hands-on example, check out the article iris-tripleslash - let's rock together!

Many thanks to @Henry Pereira for sharing insights into the implementation process! He shared that the most challenging part of any programming contest is coming up with an interesting idea. Luckily, teamwork made this process easier for the Musketeers (credit goes to @Evgeny Shvarov for suggesting the name 😉). Inspired by the triple slash comment syntax and Elixir's DocTest, which uses comments to test code, they tackled the challenge of creating a parser to transform comments into tests — a task that felt like solving a complex puzzle!

Reflecting on their work, the team believes they could enhance the process by executing tests directly in %UnitTest.TestCase rather than creating a separate test class, making the solution even faster and more efficient.

The iris-tripleslash application has been widely recognized:

  • 1st place award in the Development Contest.
  • 5-star rating on Open Exchange, with 370 views.
  • Positive reviews, including feedback from @Gabriel Schiehl (“unit tests worked correctly”) and Developer Community legend @Robert Cemper (“works ok, it’s complete”).

Additionally, there are eight articles on Developer Community dedicated to this application, including content in English, French, Spanish, and Portuguese, as well as a top-grossing video announcement. While the video may include humor, the application is a serious and powerful tool.


We’d love to hear your thoughts about the iris-tripleslash application and the idea behind it. Share your feedback in the comments, and don’t forget to:

  • Post your own ideas.
  • Vote and comment on existing ideas.
  • Take inspiration from the Community Opportunity ideas and bring them to life!

Let’s continue to innovate and build together!

Discussion (0)1
Log in or sign up to continue
Digest
· Dec 18, 2024

Global Masters is back! Check out our gamification and learning platform for developers

Dear Community member, 

The Global Masters gamification platform for developers is now back in full swing! Explore fun learning activities: participate in tech quizzes, watch videos, and try out tools and applications. Earn points and redeem them for well-deserved rewards!

>> Enter Global Masters now << (use your InterSystems SSO credentials to log in)

The integration between Global Masters, Developer Community, Open Exchange, and the Ideas Portal has also been restored. You’ll continue earning amazing points for every contribution you make to the community!

 

Read more about Global Masters here: