Advent of Code starts soon

23 views
Skip to first unread message

pixel...@gmail.com

unread,
Nov 30, 2025, 11:34:21 PM (2 days ago) Nov 30
to Medley Interlisp core
Don't know if anyone has done Advent of Code ...
The year before last I solved one of the days using Medley but I didn't save my answers.

Essentially, they're programming puzzles (12 this year) with a daily puzzle of two parts.

There are 12 days this year rather than 25. (They get harder towards the end).
Quite a lot of them are best served by languages with heavy collection processing facilities as well as heavy text manipulation facilities. Might be harder with Medley as we could use a regex library.

https://adventofcode.com/


Paolo Amoroso

unread,
Dec 1, 2025, 2:24:18 AM (2 days ago) Dec 1
to pixel...@gmail.com, Medley Interlisp core
The schedule is abit too tight for a slow coder and thinker like me, even with 12 days instead of 25, and I'm not into puzzles. So I'll have to decline.


--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/64bfdff1-b1e6-466c-860e-42a7b14dfcbdn%40googlegroups.com.


--

Paolo Amoroso

unread,
Dec 1, 2025, 6:55:14 AM (2 days ago) Dec 1
to pixel...@gmail.com, Medley Interlisp core

On Mon, Dec 1, 2025 at 5:34 AM pixel...@gmail.com <pixel...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/64bfdff1-b1e6-466c-860e-42a7b14dfcbdn%40googlegroups.com.

pixel...@gmail.com

unread,
Dec 2, 2025, 1:44:06 AM (yesterday) Dec 2
to Medley Interlisp core
Lisp is pretty well suited in general for quite a few of these.
I used Emacs Lisp last year which has a great deal of power thanks to many of CL's utilities being ported some time ago.
Emacs Lisp now has traces of Common Lisp, Scheme, and Clojure if you know where to look.

In the end I think I'll just use Common Lisp do a few and call it good.
I was thinking about doing it in Medley yesterday for more visibility to the Project but I think I need to do a few quickly then move on to something more interesting.
I was going to do it in the CL implementation we've got, but the into clause in LOOP is missing. (But I'm happy we have a mostly compliant LOOP now)

Still I'm sure it can be done in InterLisp. :)
I'm going to take a break from the public facing Interlisp stuff for a while.

pixel...@gmail.com

unread,
Dec 2, 2025, 3:20:10 AM (yesterday) Dec 2
to Medley Interlisp core
I lied! 

Day 2 done in Medley (yes, Common Lisp used).

Each person's data set is unique to their login so it's not cheating to show you my answers.
I did a CL:COMPILE-FILE and it still took quite a bit of time but an answer was produced. (SBCL blows through it instantly).
But that's fine, I still like Medley having CL as an option.
Screenshot_20251202_011650.png

Paolo Amoroso

unread,
Dec 2, 2025, 5:11:00 AM (yesterday) Dec 2
to pixel...@gmail.com, Medley Interlisp core
Great job. How long did it take? Tens of seconds? Minutes?


Nick Briggs

unread,
Dec 2, 2025, 12:09:42 PM (20 hours ago) Dec 2
to pixel...@gmail.com, Lisp Core
Cool.  Did you load the DFASL it produced?  Unless you give it one of the other keyword arguments (perhaps :LOAD T) CL:COMPILE-FILE just compiles it to produce the DFASL  but does not load it back into the system, so you would have still been running interpreted.

pixel...@gmail.com

unread,
Dec 2, 2025, 1:25:45 PM (19 hours ago) Dec 2
to Medley Interlisp core
I think so...

I was using FILESLOAD after each compilation (I thought it loads the DFASL updating the function to the compiled form until edited.).
I tried it with just LOAD T as suggested. 
I'll include the Lisp file as well (I guess if anyone wants to try the puzzle for Day 2 themselves don't spoil it with my code. :P)


Screenshot_20251202_112124.png
DAY2.LISP

pixel...@gmail.com

unread,
Dec 2, 2025, 1:51:00 PM (18 hours ago) Dec 2
to Medley Interlisp core
Ah, here is the source if you'd also like to try it in other implementations.
Forgot to include it. (Though I'm not complaining about Medley)
DAY2.LISP

pixel...@gmail.com

unread,
Dec 2, 2025, 1:53:57 PM (18 hours ago) Dec 2
to Medley Interlisp core
Strange, I thought I selected from my desktop. Let me try once more...
day2.lisp

Matt Heffron

unread,
Dec 2, 2025, 3:01:49 PM (17 hours ago) Dec 2
to pixel...@gmail.com, Medley Interlisp core

By default FILESLOAD will not load a file that has been loaded before, unless given the LOADFROM “option”.

See IRM 17.1

 

From: lisp...@googlegroups.com <lisp...@googlegroups.com> On Behalf Of pixel...@gmail.com
Sent: Tuesday, December 2, 2025 10:26 AM
To: Medley Interlisp core <lisp...@googlegroups.com>
Subject: Re: Advent of Code starts soon

 

I think so...

I was using FILESLOAD after each compilation (I thought it loads the DFASL updating the function to the compiled form until edited.).
I tried it with just LOAD T as suggested. 
I'll include the Lisp file as well (I guess if anyone wants to try the puzzle for Day 2 themselves don't spoil it with my code. :P)


On Tuesday, December 2, 2025 at 10:09:42AM UTC-7 nicholas...@gmail.com wrote:

Cool.  Did you load the DFASL it produced?  Unless you give it one of the other keyword arguments (perhaps :LOAD T) CL:COMPILE-FILE just compiles it to produce the DFASL  but does not load it back into the system, so you would have still been running interpreted.

 



On Dec 2, 2025, at 00:20, pixel...@gmail.com wrote:

 

I did a CL:COMPILE-FILE and it still took quite a bit of time but an answer was produced. (SBCL blows through it instantly).
But that's fine, I still like Medley having CL as an option.

 

--

You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.

image001.png

Nick Briggs

unread,
Dec 2, 2025, 3:57:32 PM (16 hours ago) Dec 2
to pixel...@gmail.com, Lisp Core

On Dec 2, 2025, at 10:25, pixel...@gmail.com wrote:

I think so...

I was using FILESLOAD after each compilation (I thought it loads the DFASL updating the function to the compiled form until edited.)

That only happened to work for you because you called the file DAY2.LISP instead of DAY2 -- so it was confused about whether it was already loaded.
FILESLOAD is not supposed to load a file that is already loaded.

I tried it with just LOAD T as suggested. 

I was talking about (COMPILE-FILE "DAY2.LISP" :LOAD T) -- but you can always (LOAD "DAY2.DFASL") after you've compiled it without the :LOAD T option.

I'll include the Lisp file as well (I guess if anyone wants to try the puzzle for Day 2 themselves don't spoil it with my code. :P)


<Screenshot_20251202_112124.png>

On Tuesday, December 2, 2025 at 10:09:42 AM UTC-7 nicholas...@gmail.com wrote:
Cool.  Did you load the DFASL it produced?  Unless you give it one of the other keyword arguments (perhaps :LOAD T) CL:COMPILE-FILE just compiles it to produce the DFASL  but does not load it back into the system, so you would have still been running interpreted.


On Dec 2, 2025, at 00:20, pixel...@gmail.com wrote:

I did a CL:COMPILE-FILE and it still took quite a bit of time but an answer was produced. (SBCL blows through it instantly).
But that's fine, I still like Medley having CL as an option.


--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/b650f9d9-a487-4140-a457-26a1192d1262n%40googlegroups.com.
<Screenshot_20251202_112124.png><DAY2.LISP>

pixel...@gmail.com

unread,
Dec 2, 2025, 5:56:12 PM (14 hours ago) Dec 2
to Medley Interlisp core
Thanks for the clarifications. (I'm still working my way through everything)
I did the steps suggested and it looks like the results are similar but it was worth learning the right way.

So it would appear "thems the results" still. :)

Nick Briggs

unread,
Dec 2, 2025, 6:27:10 PM (14 hours ago) Dec 2
to pixel...@gmail.com, Lisp Core
Yeah, no worries.  I ran your code on my ancient macbook air, compiled, and it took longer than your presumably faster machine.   For fun, I ran

(IL:WITH.SPY (USER::TASK1 USER::*INPUTS*))
(IL:SPY.TREE)

and found where the time was going (approximate percentages in the graph):

PastedGraphic-1.png

and just looking at BIGNUM.DEFPRINT:

PastedGraphic-2.png

Matt Heffron

unread,
3:04 AM (5 hours ago) 3:04 AM
to pixel...@gmail.com, Medley Interlisp core

Are you sure about “but the into clause in LOOP is missing”?

The into preposition is present in sources/XCL-LOOP

It is recognized and expanded.

 

 

From: lisp...@googlegroups.com <lisp...@googlegroups.com> On Behalf Of pixel...@gmail.com
Sent: Monday, December 1, 2025 10:44 PM
To: Medley Interlisp core <lisp...@googlegroups.com>
Subject: Re: Advent of Code starts soon

 

Lisp is pretty well suited in general for quite a few of these.

Reply all
Reply to author
Forward
0 new messages