Announcement
· Dec 1, 2019

Advent of Code 2019 has been started! Win and Get a Ticket to InterSystems Global Summit 2020 in Seattle!

Hi Developers,

It's December the 1st! And this means that the Advent of Code 2019 has been started!

And you are very welcome to participate in the ObjectScript contest!

 

Here is the leaderboard. There are last year's participants and some people already solved the first task.

Note: You need to sign in to Advent of code  (e.g. with GitHub or Google account) to see the leaderboard and participate in the contest.

Win Conditions: 
To win our prize you should be on the top of ObjectScript Leaderboard and upload all the solutions in a public repository and present the code in InterSystems ObjectScript in UDL form. The example of the repo.

Note: You need to sign in to Advent of code  (e.g. with Github or Google account) to see the leaderboard and participate in the contest.

Prizes: 

        → 1st Place: 10,000 points on Global Masters and FREE registration & hotel accommodation for the next InterSystems Global Summit 2020 in Seattle! 

        → 2nd Place: 5,000 points on Global Masters

        → 3rd Place: 3,000 points on Global Masters

You can join the ObjectScript private leaderboard with 130669-ab1f69bf code.

Good luck to all of you! yes

Discussion (48)4
Log in or sign up to continue

Soooo, what is UDL form?  A Google search shows Universal Design for Learning, but I can't seem to find a spec for writing code.

Also, I'm still using Studio.  I've saved a project called AOC.prj and created a class AOC.Day1 in USER, but I can't find the source folder for USER to start a git repo and push it up.  Nor can I save the project to anywhere but the namespace.  Anyone else using Studio?

Trying to remain positive here as I haven't even coded the first day yet because of my set up challenges :(

I've recorded how I solved Day 4 with IRIS and VSCode-ObjectScript

https://www.youtube.com/embed/3KtJY_ts5Ho
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

Advent Of Code 2019 reached its equator!

Here is the current top-20 list:

We decided to raise the odds in the competition and we are adding a new prize for winners - 3 vouchers for InterSystems Certification Exams!

Top-3 participants will get the voucher for any of the two exams available! 

*The option is not eligible for InterSystems employees.

@Dmitry Maslennikov 

I'm wondering if you can talk me through your Day 3 code?  Specifically the draw function.

I'm terribly confused on where crossType and crossSteps are being set.

Also the InterSystems documentation clearly shows how to use $LB on the right side of an equals operator, but I haven't seen it on the left side or understand how that works:

Set grid(y, x) = $Listbuild(type, steps)

I guess simply it's setting that node in the array to a list of two elements, type and step?

Maybe by Christmas I'll get to day 5! Haha!

Mike

crossType and crossSteps I get from $lb stored in grid which I read with $Data with variable crossInfo.

So, I use the trick with the second argument in $Data, where variable gets value if data exists.

And another trick with the left $listbuild as you noticed. Which just extracts values from right's side $listbuild to variables in the left's side $listbuild. The documentation actually has information about it.

Good luck. ))

It's a graph library that allows me to create a generic graph. the shortestPath method uses A* (https://en.wikipedia.org/wiki/A*_search_algorithm) to find the shortest path connecting two nodes in the graph. This is reusable in all of the 'find a path through a maze' kind of puzzles. The lack of generalized libraries/tools is the biggest drawback in COS. For example Day20, part1: https://github.com/kazamatzuri/AoC/blob/1387289dbcacfa2d7dd62906e873c074...

 k ^grid,^ports,^portals
    d ..parseInitial()
    d ..buildGraph()
    d ..findPortals()
    d ..linkPortals()

    s entry=$LG(^portals("AA"),1)
    s exit=$LG(^portals("ZZ"),1)
    zw entry
    w " -> ",!
    zw exit
    s path=..graph.shortestPath(entry,exit)    
    s length=$LL(..graph.shortestPath(entry,exit))-1
    return length

had the same problem for 22 :/ I'm not aware of any big-num library for Iris. Probably because it's not really language used for numerical stuff.
day 18 takes quite long: https://github.com/kazamatzuri/AoC/blob/master/aoc-cos-container/src/cls...
Especially part1, part2 finishes quicker since it's 4 much smaller mazes. I'm still trying to improve it a bit (you have to adjust your memory settings to even work at all, otherwise you're getting errors all over the place)