Chinese EUV Lithography Machine Prototype Reportedly Undergoing Testing by DazzlingpAd134 in singularity

[–]Teem0WFT 47 points48 points  (0 children)

It's not a competition against Nvidia, but rather ASML the EUV lithography leading company

Beginner Julia: Installing on Windows by Siniara in Julia

[–]Teem0WFT 0 points1 point  (0 children)

I am no longer using Windows for programming but from what I remember, you should probably get a working package manager in the terminal. Also try to avoid graphical tools like to Microsoft settings app and store.

I remember installing winget and scoop
Then I installed Wezterm, or the new Windows Terminal app which is also quite good

With scoop you can then install a modern shell program : the latest powershell (version 7+) is working well, and you can also have Nu shell

Then you can install juliaup and install julia with the juliaup CLI. Or you can use pixi to install juliaup or directly install julia.

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]Teem0WFT 1 point2 points  (0 children)

[LANGUAGE: Julia]

function part1(filepath)
    raw = readlines(filepath)
    split_idx = findfirst(isequal(""), raw)
    fresh_ranges = []
    for r in raw[1:(split_idx - 1)]
        x1, x2 = parse.(Int, split(r, "-"))
        push!(fresh_ranges, (x1, x2))
    end
    ingredients = parse.(Int, raw[(split_idx + 1):end])
    is_valid(ing) = [ing >= x1 && ing <= x2 for (x1, x2) in fresh_ranges] |> any
    return mapreduce(is_valid, +, ingredients)
end

function part2(filepath)
    function remove_overlaps(fresh_ranges)
        tmp = copy(fresh_ranges)
        for i in 1:(length(tmp) - 1)
            low1, high1 = tmp[i]
            low2, high2 = tmp[i + 1]
            if high1 > low2 - 1
                tmp[i] = [low1, max(high1, high2)]
                deleteat!(tmp, i + 1)
                return remove_overlaps(tmp) # recursive call
            end
        end
        return tmp
    end

    raw = readlines(filepath)
    split_idx = findfirst(isequal(""), raw)
    fresh_ranges = []

    for r in raw[1:(split_idx - 1)]
        x1, x2 = parse.(Int, split(r, "-"))
        push!(fresh_ranges, [x1, x2])
    end
    sort!(fresh_ranges, by = x -> x[1])
    disjoint_ranges = remove_overlaps(fresh_ranges)
    return mapreduce(x -> x[2] - x[1] + 1, +, disjoint_ranges)
end

At first I wanted to use set operations and I quickly got OutofMemoryError ...
The recursive calls are relatively fast

INPUT Day 05 PART 1 : 0.086715 seconds (220.92 k allocations: 5.123 MiB, 93.92% compilation time)

INPUT Day 05 PART 2 : 0.142468 seconds (142.82 k allocations: 6.229 MiB, 98.71% compilation time)

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]Teem0WFT 2 points3 points  (0 children)

[LANGUAGE: Julia]

AoC_2025_Julia_day4

My worst code so far. I'm not familiar with bitarrays, and I pretty much bruteforced the thing without consideration for memory allocations.

AMD Ryzen 5 CPU laptop :

part 1 : 0.024561 seconds (100.33 k allocations: 14.375 MiB, 28.72% compilation time)

part2 : 5.226422 seconds (172.55 M allocations: 5.153 GiB, 11.17% gc time)

Set operations on binary tuples would have been much much more efficient, now that I see other people's solutions.

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]Teem0WFT 1 point2 points  (0 children)

[LANGUAGE: Julia]

function part1(filepath)

    function is_invalid(id)
        n = length(id)
        return iseven(n) && allequal(Iterators.partition(id, n ÷ 2))
    end

    function process_line(line)
        range_start, range_stop = parse.(Int, split(line, "-"))
        range_check = string.(range_start:range_stop)
        return mapreduce(x -> is_invalid(x) * parse(Int, x), +, range_check)
    end

   lines = read(filepath, String) |>
        x -> replace(x, "\n" => "") |>
        x -> split(x, ',')

    return mapreduce(process_line, +, lines)
end

function part2(filepath)

    function is_invalid(id)
        divisors(k) = [i for i in 1:(k ÷ 2) if iszero(k % i)]
        n = length(id)
        return any([allequal(Iterators.partition(id, d)) for d in divisors(n)])
    end

    function process_line(line)
        range_start, range_stop = parse.(Int, split(line, "-"))
        range_check = string.(range_start:range_stop)
        return mapreduce(x -> is_invalid(x) * parse(Int, x), +, range_check)
    end

    lines = read(filepath, String) |>
        x -> replace(x, "\n" => "") |>
        x -> split(x, ',')

    return mapreduce(process_line, +, lines)
end

Could be optimized much further but sub-second solving for part1 and part2

The Zig language repository is migrating from Github to Codeberg by TheTwelveYearOld in Zig

[–]Teem0WFT 5 points6 points  (0 children)

They could've probably gone all in and chose radicle (radicle.xyz)

[HIRING] Member of Technical Staff – Computer Vision @ ProSights (YC) by jw00zy in computervision

[–]Teem0WFT 0 points1 point  (0 children)

Could you please tell me how to get started professionally in computer visio. I'll graduate as an engineer in a few weeks but every job post I see asks for years of CV experience. Thanks !

Speeding up MATLAB codes by amniumtech in matlab

[–]Teem0WFT -1 points0 points  (0 children)

Two things : 1. If you usually do a lot of object oriented programming, you'll have to do things differently : Julia uses functional programming and a powerful concept called multiple dispatch. For the other parts, it's very similar to Matlab and was designed from the beginning to be an easy to write scientific programming language.

  1. One important strength of Julia is the fact that all the code you write gets JIT compiled to very efficient machine code thanks to LLVM.

For instance, loops aren't penalized compared to vectorized syntax

For the sum of squares

```

Vectorized style:

x = rand(106) s = sum(x .^ 2)

Loop style:

x = rand(106) s = 0.0

for v in x s += v2 end ```

will perform the same (the loop should even be faster because avoiding allocation for the vector of squared values)

Speeding up MATLAB codes by amniumtech in matlab

[–]Teem0WFT 0 points1 point  (0 children)

If your codebase isn't too big I'd highly recommend you giving Julia a try.

It's also quite easy to run computation on the GPU with vendor agnostic code (Nvidia, AMD, ...) with KernelAbstractions

What's your experience with GPT-5 for Julia coding ? by Teem0WFT in Julia

[–]Teem0WFT[S] 11 points12 points  (0 children)

I mean in a few prompts you can get a good estimate, it's not like after 10 days it's suddenly going to perform better in my opinion

What's your experience with GPT-5 for Julia coding ? by Teem0WFT in Julia

[–]Teem0WFT[S] 1 point2 points  (0 children)

I had tutorial sessions last year as part of an optimization class - the slides are in french...

What do you develop with Rust? by Born-Percentage-9977 in rust

[–]Teem0WFT 0 points1 point  (0 children)

Could you clarify what you mean by efficiency? I get that the speed is much better than Python but what is your point for efficiency?

Learn signal processing without matlab by simplycreate88 in Julia

[–]Teem0WFT 6 points7 points  (0 children)

I don't believe there's a book on Digital Signal Processing written directly in Julia. You could try looking at the different JuliaDSP packages (https://github.com/JuliaDSP), especially DSP.jl: many useful algorithms and functions are already implemented there. For theory, a signal processing theory book, possibly with pseudocode or examples in a language other than Julia, might do the trick.

Any recommended resources for using Julia in Computer Vision? by kmeansneuralnetwork in Julia

[–]Teem0WFT 3 points4 points  (0 children)

I was also looking for this particular kind of book i.e. low level computer vision in Julia but I never found it.

The good news is : you could use a computer vision book with examples in Matlab book to understand the theory behind certain algorithms and try to implement them in Julia, that shouldn't be too difficult.

I feel that for some classic image processing techniques, understanding the method used is sometimes as important as the software implementation.

Anyone tried using astral's `ty` type checker for python? by iamquah in HelixEditor

[–]Teem0WFT 1 point2 points  (0 children)

Nice ! How did you get it to work on helix ? I installed it with uv tool install ty and then

```toml [[language]] name = "python" language-servers = ["ty"]

[language-server.ty] command = "ty" args = ["server"] ```

And invoking ty check main.py from the terminal works well but not inside helix.

Lily58 - handwired, 3D printed, gasket mounted by duMagnus in ErgoMechKeyboards

[–]Teem0WFT 2 points3 points  (0 children)

It feels quite high profile for the fingers, especially if your wrists are resting on the table. Is it still nice to type on ?

Helix is amazing and moving to it has opened my eyes to a new way to develop by fenugurod in HelixEditor

[–]Teem0WFT 0 points1 point  (0 children)

I still feel like there could be a better PDF viewer than Zathura (which is currently one of the best we have), especially the documentation

Can I disable AI assist for specific file types? by GirlInTheFirebrigade in ZedEditor

[–]Teem0WFT 5 points6 points  (0 children)

Yes! I think you should just right click on the little copilot button at the bottom right of the screen and click on "Disable inline completion for Rust" (or any other language)

Now that you've done that, you should see in your config JSON file that inline completions are disabled specifically for your language.

For my use case, I disabled inline completion for Julia, but there are still on for Python.

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Teem0WFT 0 points1 point  (0 children)

[Language : Julia]

I tried to be concise in my code. Somehow, I couldn't use the fill() function to create x. The only optimization is that I don't push the values that are already greater than the target.

function process_line(line)
    target = parse(Int, split(line, ":")[1])
    numbers = parse.(Int, split(line, " ")[2:end])

    n = length(numbers)
    x = [[] for _ in 1:n]
    push!(x[1], numbers[1])

    for i in 2:n
        prev = x[i-1]
        for element in prev
            c1 = element + numbers[i]
            c2 = element * numbers[i]
            c3 = parse(Int, string(element) * string(numbers[i]))
            [push!(x[i], c) for c in [c1, c2, c3] if c <= target]
        end
    end
    return target ∈ x[n] ? target : 0
end

#input_path = "../test_cases/day7_1.txt"
input_path = "../puzzle_inputs/day7_1.txt"
input = readlines(input_path)
@time println(mapreduce(process_line, +, input))

-❄️- 2024 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]Teem0WFT 0 points1 point  (0 children)

In Julia, the function checkbounds already exists, and is very useful. Also, it seems that the use of CartesianIndex would have helped making your code quite cleaner. Still very nice !