Adding Kotlin to programming languages

15 views
Skip to first unread message

Dave Musicant

unread,
Nov 4, 2025, 4:15:45 PMNov 4
to PreTeXt development
Greetings, all ---

I've taken on the task of porting over the Runestone data structures textbook in Kotlin. (We've gone to using Kotlin in our own data structures class, and we'd love to have a textbook to go with it.) In order to get the code samples working properly, I'd need PreTeXt to handle Kotlin as an additional language. I'm willing to take this on and give it a go, in putting together a pull request. Would you folks be willing to receive one, if I can figure out how to pull this off?

Thanks! And if the answer is yes, I'm most happy for any and all pointers on best practices for doing so.

--
Dave Musicant

Andrew Scholer

unread,
Nov 4, 2025, 5:55:30 PMNov 4
to prete...@googlegroups.com
Dave - 

Rob Beezer would be the final word on willingness to receive a PR, but I would assume the answer is yes.

There isn't too much that PreTeXt needs to handle an arbitrary programming language. (Though features like syntax highlighting may depend on the availability of that language in upstream tools.)

Usually, Rob will want something that tests/demonstrates the change. For Runestone stuff, that usually means something in the Sample Book. Here is a good example from when Octave support was added:
https://github.com/PreTeXtBook/pretext/commit/b76e83711bd326ad915eaf98940322d50a6729a5

If you search through the codebase for 'octave' or 'cpp' you can probably find the spots that will need updating. Most of them are simple bits specifying "kotlin is a valid option" or "kotlin uses the jobeserver".

The bigger lift would be on the Runestone side, especially to integrate with the auto-grading infrastructure if that is desired. Anything about that is probably a Brad question on Discord.

Andrew Scholer

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/238665b1-ead0-44c4-9627-7ce0259bbe34n%40googlegroups.com.

Bradley Miller

unread,
Nov 4, 2025, 7:18:49 PMNov 4
to PreTeXt development
Dave and I have been in conversation about this.  I’m looking forward to merging his PR to add the Kotlin language to the JOBE server.  Not to mention a Kotlin version of the data structures book!

I’m hoping that PR will prove to be a template that others can follow to add additional languages that have been requested such as R.


Brad

Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.


Rob Beezer

unread,
Nov 4, 2025, 9:38:43 PMNov 4
to prete...@googlegroups.com
On 11/4/25 14:54, Andrew Scholer wrote:
> Rob Beezer would be the final word on willingness to receive a PR, but I would
> assume the answer is yes.

Certainly if Brad/Runestone is going to support this on the Jobe server and so
on, then we can entertain the various bits needed for static versions, syntax
highlighting, Runestone manifest, etc.

@Andrew - you've got a headstart on this one with your useful suggestions for
Dave. Would you like to continue to shepherd this through an eventual PS?

Rob

Andrew Scholer

unread,
Nov 5, 2025, 2:43:48 PMNov 5
to prete...@googlegroups.com
Rob - Yes, I can do that.

Dave - 

Changes like this that affect both Runestone and PreTeXt end up requiring a pull request in both worlds. In this case, the PTX PR will be required to test the RS changes. 

So I would recommend making a branch in PreTeXt that will be your PR. Once you have some new code in it, go ahead and make a PR on PreText based on your branch, but mark it as a draft. Don't worry about keeping the commits in it clean; you can do a rebase at the end to clean them up. 

Feel free to ask PreTeXt questions here, or to lump them in with Runestone ones in Discord.

Andrew Scholer 

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.

Dave Musicant

unread,
Nov 6, 2025, 12:31:39 PMNov 6
to prete...@googlegroups.com
Fantastic. Thanks, Rob and Andrew. I'll get going on it and follow up when I'm ready.

--
Dave

Dave Musicant

unread,
Nov 11, 2025, 5:44:08 PM (11 days ago) Nov 11
to prete...@googlegroups.com
The PreTeXt portion of adding Kotlin is in, I've submitted a draft PR. I'm happy to answer questions, please let me know how I can help. Thanks!


--
Dave


On 11/5/25 1:43 PM, Andrew Scholer wrote:

Andrew Scholer

unread,
Nov 11, 2025, 8:56:36 PM (11 days ago) Nov 11
to prete...@googlegroups.com
Great!  I'll try to take it for a test drive in the next day or two.

Andrew Scholer

Reply all
Reply to author
Forward
0 new messages