Home Applications Advent of Code ObjectScript Docker Template

Advent of Code ObjectScript Docker Template

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
236
Views
0
IPM installs
3
1
Details
Releases
Reviews  (1)
Issues
Articles  (1)
Simple template to craft Advent of Code with ObjectScript in InterSystems IRIS

What's new in this version

Community article added

objectscript-adventofcode-template

This is a template to craft solutions for AdventofCode in InterSystems ObjectScript.

Use this template in Github and have a ready-to-use template repo which lets you develop ObjectScript solutions for AdventOfCode puzzles.

Prerequisites

This needs to have git and docker installed.

Use the Github template (green button) and create your own repo

Installation

Clone/git pull the repo into any local directory

$ git clone https://github.com/your-repository.git

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

How to Test it

Template goes with the first puzzle solved and a ready to use class Base to load data from files named input1.txt, input2.txt, … placed in the root of repo.

Open IRIS terminal:

$ docker-compose exec iris iris session iris
USER>zn "IRISAPP"
IRISAPP> ##class(eshvarov.Advent2019.Day1).Run()

How to add another task

Create Day2.cls derived from base
put input2.txt into the root and start solving tasks.

You can code ObjectScript with VSCode if you want - this repo goes ready to code with IRIS in docker.

Install VSCode and ObjectScript plugin and open the folder in VSCode.
Open /src/cls/eshvarov/advent2019/Day1.cls class and try to make changes - it will be compiled in running IRIS docker container.

.vscode/settings.json

Settings file to let you immedietly code in VSCode with VSCode ObjectScript plugin)

.vscode/launch.json

Config file if you want to debug with VSCode ObjectScript

Made with
Version
1.0.125 Jan, 2020
Category
Technology Example
Works with
InterSystems IRIS
First published
02 Dec, 2019
Last checked by moderator
17 Sep, 2024Works