Written by

Lead of Developer Community at InterSystems
Announcement Anastasia Dyubaylo · 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

Comments

Robert Cemper · Dec 1, 2019

what is the  join code for ObjectScript Leaderboard 
I get asked for ??
 

You can join a private leaderboard by entering its join code here:

 

--- Your Private Leaderboard ---

You don't have a private leaderboard. You can only have one. You can [Create It] now.

0
Robert Cemper  Dec 1, 2019 to Robert Cemper

Could someone explain to a newcomer what the time is telling me  ?

Any local time  (lokes like EST) ?  or some total ???

     --------Part 1--------   --------Part 2--------
Day       Time   Rank  Score       Time   Rank  Score
  1   11:37:18  15816      0   11:50:08  14212      0
0
Dmitry Maslennikov  Dec 1, 2019 to Robert Cemper

It's kind of time you spend to solve a task, since it was unlocked at Noon EST.

Only the first 100 get the score, by solving order.

0
Robert Cemper  Dec 1, 2019 to Dmitry Maslennikov

Thanks for the clarification. 
It's a rare chance I might be up at that early time smiley 
and if my body is it doesn't mean my brain is too.

0
Dmitry Maslennikov  Dec 1, 2019 to Robert Cemper

Yeah, our colleagues from Boston in the best position.

0
Robert Cemper  Dec 1, 2019 to Robert Cemper

is the code the same as last year ???

130669-ab1f69bf
 

???

0
Robert Cemper  Dec 1, 2019 to Robert Cemper

the code worked together with the link: ObjectScript Leaderboard  
@Dmitry Maslennikov    I  joined your leaderboard  

This is the private leaderboard of Dmitry Maslennikov for Advent of Code 2019.
 

It seems to be the official one (at least by the well-known names).

0
Michael Davidovich  Dec 3, 2019 to Robert Cemper

The link seems to just take me to the overall leader board.  

Am I missing something?

This is going well for me so far laugh

0
Michael Davidovich  Dec 3, 2019 to Michael Davidovich

Nevermind.


"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."
 

0
Evgeny Shvarov  Dec 1, 2019 to Robert Cemper

Yes,  Robert!

Thanks for rasing the topic!

Code is the same 130669-ab1f69bf
And it's the same @Dmitry Maslennikov's board he created last year and we are using again this year for ObjectScript contest.
 

0
Evgeny Shvarov  Dec 1, 2019 to Evgeny Shvarov

The leaderboard looks like that now:

If you see these people in the list - you are in the right place ;)

0
Evgeny Shvarov  Dec 3, 2019 to Asaf Sinay

The situation is changing quickly ;)

0
Michael Davidovich · Dec 3, 2019

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 :(

0
Evgeny Shvarov  Dec 3, 2019 to Michael Davidovich

Hi Mike!

UDL is the one of the way $System.OBJ.Export() exports classes. Simply UDL is not XML)

Just make the solutions in ObjectScript in any IDE you like!

0
Michael Davidovich  Dec 3, 2019 to Evgeny Shvarov

Thanks Evengy :)

Yeah, I think my plan is to code and run in ObjectScript and then once correct, copy to a file in NotePad++ and commit changes from there.

Does that sound right?

0
Evgeny Shvarov  Dec 3, 2019 to Michael Davidovich

Whatever works for you. I think I need to share the fastest way to code ObjectScript with repo some day...

The fastest imho is IRIS CE on docker+VSCode

0
Michael Davidovich  Dec 3, 2019 to Evgeny Shvarov

Ah ok.  We don't have IRIS.  Cache 2018 :)

0
Evgeny Shvarov  Dec 4, 2019 to Michael Davidovich

Maybe it's a good moment to start/try with IRIS.

Check the article

You don't need anything but docker, git and vscode - IRIS Community Edition will be pulled from Docker and its free to use.

0
Michael Davidovich  Dec 4, 2019 to Evgeny Shvarov

I went home and put the community edition on my laptop, however, I will see if I can follow the steps in your article here at work.

Thanks!

0
Dmitry Maslennikov · Dec 4, 2019

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

0
Peter Steiwer  Dec 5, 2019 to Dmitry Maslennikov

where is this from?

0
Evgeny Shvarov · Dec 14, 2019

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.

0
Peter Steiwer  Dec 14, 2019 to Evgeny Shvarov

There ARE currently ISC employees in the top 3, so don't give up yet!

0
Michael Davidovich · Dec 16, 2019

@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

0
Dmitry Maslennikov  Dec 17, 2019 to Michael Davidovich

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. ))

0
Michael Davidovich  Dec 17, 2019 to Dmitry Maslennikov

Thanks, after spending some time with this I see it way more clearly now.  

I was on the right track using $LB in my code, but I'm not efficiently storing my coordinates for each wire and I'm get a MAXSTRING error.

More tomorrow.

Best,

Mike

0
Fabian Haupt  Dec 24, 2019 to Michael Davidovich

I also used a grid to store where the wires go, avoids the whole maxstring problem:https://github.com/kazamatzuri/AoC/blob/dd5eb40ca5b828f35953c196668dfe68618bec63/aoc-cos-container/src/cls/fkh2019/Day3.cls#L55

0
Kevin An · Dec 25, 2019

This is my first comment ever since working at InterSystems for the last 2 and a half years, and my second time participating in Advent of Code. Just finished the last problem of the year, and sent Santa on his way. Wishing everyone a merry Christmas, and best of luck assisting your own Santas. :)

0
Fabian Haupt  Dec 25, 2019 to Kevin An

Good game :) I enjoyed the competition ;) Happy Holidays!

0
Evgeny Shvarov  Dec 26, 2019 to Fabian Haupt

I saw it but didn't get what it does. Could you please share how is it helpful?

0
Fabian Haupt  Dec 27, 2019 to Evgeny Shvarov

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/1387289dbcacfa2d7dd62906e873c074fb32e689/aoc-cos-container/src/cls/fkh2019/Day20.cls#L133

 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
0
Yuval Golan · Dec 25, 2019

You can check my code at

https://github.com/uvg/AdventOfCode

Couldn't make day 18 and part 2 of day 25 (because of not completing day 18)

Also couldn't find a cos code for bignum so the last calculations of part2 in day22 were made in an external calculator

0
Fabian Haupt  Dec 27, 2019 to Yuval Golan

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/fkh2019/Day18.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)

0
Olga Zavrazhnova · Dec 26, 2019

Hi All, 
Can you help me to contact Vladimir Urdešić to congratulate and award? Seems he is not registered on DC. DM me, please!


 

0
Dmitry Maslennikov  Dec 28, 2019 to Olga Zavrazhnova

His LinkedIn and Twitter, but I don't see any relations of him with InterSystems technologies. So, I think he just googled how to join our leaderboard.

0
Olga Zavrazhnova  Dec 31, 2019 to Dmitry Maslennikov

Thank you, Dmitriy! I contacted him. His solutions are written not in ObjectScript.

0
Yuval Golan  Jan 1, 2020 to Olga Zavrazhnova

Well...my solutions are in COS.

Working on a bignum solution (also in COS) for the last code of part2 in day 22.

0