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

Primary tabs

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

Replies

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.

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

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.

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.

is the code the same as last year ???

130669-ab1f69bf
 

???

the code worked together with the link: ObjectScript Leaderboard  
@Dmitriy 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).

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

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

Yes,  Robert!

Thanks for rasing the topic!

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

The leaderboard looks like that now:

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

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

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!

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?

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

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.

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!

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.

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

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

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

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

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

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

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

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

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)

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!


 

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.


 

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

Well...my solutions are in COS.

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