Example doesn't work on windows #1

Closed
opened 2026-03-01 03:45:52 -08:00 by jonathanBieler · 4 comments
jonathanBieler commented 2026-03-01 03:45:52 -08:00 (Migrated from github.com)

I'm trying the example in the Quick Start section in windows terminal, it doesn't crash but it shows nothing. It's using CPU so I think it's doing something in the background but just doesn't display.

Image

Windows Terminal
Version : 1.23.20211.0

Julia 1.12.5

I'm trying the example in the Quick Start section in windows terminal, it doesn't crash but it shows nothing. It's using CPU so I think it's doing something in the background but just doesn't display. <img width="642" height="447" alt="Image" src="https://github.com/user-attachments/assets/013b4c0f-7476-49c0-ba98-17d40523e3fb" /> Windows Terminal Version : 1.23.20211.0 Julia 1.12.5
kahliburke commented 2026-03-01 10:07:50 -08:00 (Migrated from github.com)

Hi, thanks for trying the framework. I don't have a Windows system so it makes testing this more difficult.

You didn't show the full source that would be needed to get the app running, here is the minimal app source that works for me.

using Tachikoma
@tachikoma_app

@kwdef mutable struct Life <: Model
    quit::Bool = false
    grid::Matrix{Bool} = rand(24, 80) .< 0.25
end

should_quit(m::Life) = m.quit
function update!(m::Life, e::KeyEvent)
    e.key == :escape && (m.quit = true)
end

function view(m::Life, f::Frame)
    h, w = size(m.grid)
    g = m.grid
    nc = [sum(g[mod1(i+di,h), mod1(j+dj,w)]
          for di in -1:1, dj in -1:1) - g[i,j]
          for i in 1:h, j in 1:w]
    g .= (nc .== 3) .| (g .& (nc .== 2))
    a, buf = f.area, f.buffer
    cs = [:primary, :accent, :success,
          :warning, :error]
    for i in 1:min(h, a.height),
        j in 1:min(w, a.width)
        g[i,j] || continue
        set_char!(buf, a.x+j-1, a.y+i-1,
            '█', tstyle(cs[clamp(nc[i,j],1,5)]))
    end
end
app(Life())

Is that what you are running?

Hi, thanks for trying the framework. I don't have a Windows system so it makes testing this more difficult. You didn't show the full source that would be needed to get the app running, here is the minimal app source that works for me. ``` using Tachikoma @tachikoma_app @kwdef mutable struct Life <: Model quit::Bool = false grid::Matrix{Bool} = rand(24, 80) .< 0.25 end should_quit(m::Life) = m.quit function update!(m::Life, e::KeyEvent) e.key == :escape && (m.quit = true) end function view(m::Life, f::Frame) h, w = size(m.grid) g = m.grid nc = [sum(g[mod1(i+di,h), mod1(j+dj,w)] for di in -1:1, dj in -1:1) - g[i,j] for i in 1:h, j in 1:w] g .= (nc .== 3) .| (g .& (nc .== 2)) a, buf = f.area, f.buffer cs = [:primary, :accent, :success, :warning, :error] for i in 1:min(h, a.height), j in 1:min(w, a.width) g[i,j] || continue set_char!(buf, a.x+j-1, a.y+i-1, '█', tstyle(cs[clamp(nc[i,j],1,5)])) end end app(Life()) ``` Is that what you are running?
kahliburke commented 2026-03-01 12:01:41 -08:00 (Migrated from github.com)

@jonathanBieler I found a friend with a windows installation and was able to run the example plus the demos without too much issue. There are still some gaps in support since the terminals within Windows are not in general as full featured. For example, automatic resizing of the TUI does not function.

Have you considered using WSL2? I believe you could then install kitty terminal and enjoy all the fun!

@jonathanBieler I found a friend with a windows installation and was able to run the example plus the demos without too much issue. There are still some gaps in support since the terminals within Windows are not in general as full featured. For example, automatic resizing of the TUI does not function. Have you considered using WSL2? I believe you could then install kitty terminal and enjoy all the fun!
jonathanBieler commented 2026-03-02 03:49:18 -08:00 (Migrated from github.com)

That fixed it yes. Note there's similar issues in Kaimon :

https://github.com/kahliburke/Kaimon.jl/blob/main/src/tui/io.jl#L189

(it gives me a "ERROR: LoadError: SystemError: opening file "/dev/tty": No such file or directory" when trying to start it)

I could use WSL2 but since the doc says it support windows, it's better to fix it .

That fixed it yes. Note there's similar issues in Kaimon : https://github.com/kahliburke/Kaimon.jl/blob/main/src/tui/io.jl#L189 (it gives me a "ERROR: LoadError: SystemError: opening file "/dev/tty": No such file or directory" when trying to start it) I could use WSL2 but since the doc says it support windows, it's better to fix it .
kahliburke commented 2026-03-02 20:54:05 -08:00 (Migrated from github.com)

Thanks, I will check there too, the dependency just needs to get updated which will be easier now that Tachikoma is in the general registry. You could get through this by going into the project directory and doing something like updating the package.

Thanks, I will check there too, the dependency just needs to get updated which will be easier now that Tachikoma is in the general registry. You could get through this by going into the project directory and doing something like updating the package.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Tachikoma.jl#1
No description provided.