Skip to content

Add Sol#9

Merged
frison merged 4 commits intoofthemachine:mainfrom
doompling:add-sol
Apr 10, 2026
Merged

Add Sol#9
frison merged 4 commits intoofthemachine:mainfrom
doompling:add-sol

Conversation

@doompling
Copy link
Copy Markdown
Contributor

@doompling doompling commented Feb 28, 2026

No description provided.

@frison
Copy link
Copy Markdown
Collaborator

frison commented Mar 3, 2026

@doompling -- Love this! The perfect 100th language for this project!

There is a problem though, multi-stage Dockerfiles for languages doesn't work. You may be able to work around this by copying what you need into the 000-base container, you'll see something like this in Golang. Although... just plucking out your compiler and dropping it in alpine could be a can of worms going to be problematic.

Alternatively, if you dropped the base-container all together, and swapped this to use whatever flavour of linux you wanted -- that's also totally fine! As long as it supports the amd64 platform, you can ditch the base. You'll find how this is done here.

Edited: I wanted to share the "let's us a new base container" approach

Comment thread sol/Dockerfile Outdated
@doompling doompling force-pushed the add-sol branch 2 times, most recently from 15c2e99 to 6ac90b7 Compare April 4, 2026 00:22
Comment thread sol/fraglet/guide.md
print("10! = #{factorial(10)}")
end

# TCP echo server
Copy link
Copy Markdown
Contributor Author

@doompling doompling Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty stoked, cross-platform TCP is working 😄 . It works because in the std lib the platform specific libc constants are chosen via a compile-time match statement on the target platform:

## Platform-specific errno and constants
compile match Platform.target() {
    MacOS => use Core::OS::Darwin::*
    Linux => use Core::OS::Linux::*
}

Comment thread sol/Dockerfile
@@ -0,0 +1,64 @@
# syntax=docker/dockerfile:1
# escape=\
FROM debian:bookworm-slim
Copy link
Copy Markdown
Contributor Author

@doompling doompling Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frison Ready for another look whenever you have a chance! Hopefully this is what you were thinking.

I switched to a glibc base image, and this Dockerfile should build anywhere because it downloads a compiler binary and the standard library from "https://github.com/doompling/sol-releases/releases/download/v${SOL_VERSION}"`

doompling and others added 2 commits April 9, 2026 12:24
Fix a build issue (the way the composite dockerfile is constructed for CI builds needs a ./) and make sure sol is a part of some weekly build (in this case, Sunday)
@frison frison merged commit 83a0687 into ofthemachine:main Apr 10, 2026
6 checks passed
@frison
Copy link
Copy Markdown
Collaborator

frison commented Apr 10, 2026

@doompling merged, built, and published. Solid 100th language.

Available at: https://hub.docker.com/r/100hellos/sol
More at: https://100hellos.ofthemachine.com/languages/sol/

Depending on the cadence that you update Sol, you could go with a "latest" release from your github release, so that the weekly Sunday builds for Sol pull your latest compiler down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants