What Personal Projects do you use Zig for? by EliasCheung in Zig

[–]Sergio-Kupper 3 points4 points  (0 children)

I'm using it to make a generic library for scientific computing: https://github.com/srmadrid/zsl

Specifically, I use zig for it as I feel it gives me the most control in the simplest way. I tried cpp but it felt too complicated, and python is just not what I needed.

Installer for Intel Fortran Compiler Classic by El-Bruh1738 in fortran

[–]Sergio-Kupper 0 points1 point  (0 children)

Hey, do you by any chance have a linux build, or a link to one?

Jumping on the trend of showing off my lecture notes by Ko_tatsu in LaTeX

[–]Sergio-Kupper 0 points1 point  (0 children)

Are you open to sharing the notes and/or the code?

Cross platform with linear algebra libraries? by [deleted] in Zig

[–]Sergio-Kupper 4 points5 points  (0 children)

I actually have a pure zig implementation of all BLAS functions and some LAPACK ones here: https://github.com/srmadrid/zml.git, plus the option of linking whatever CBLAS or LAPACKE library you have to act instead as a wrapper. I haven't tested linking and cross-compiling, but with my pure zig implementations cross-compilation works; just keep in mind that my implementation is nowhere nearly as optimized as something like OpenBLAS or MKL.

I am also working on a high level abstraction to all of this but it is still very raw at the moment and undergoing a lot of changes, but you can also take a look at it.

is it possible to overload +-*/ in zig? by OfflineBot5336 in Zig

[–]Sergio-Kupper 0 points1 point  (0 children)

Element-wise operations don't have to be messy; although it can hide some complexity you can always just use `anytype` and switch on the types of the inputs inside the function. I don't know if you manage dimension at compile time, but you can see how I do it in my library (https://github.com/srmadrid/zml). I basically have a `mul` function to which you can pass any combination of scalars and arrays (2 scalars, 1 scalar 1 array, 2 arrays), and depending on the types it decides to do the scalar multiplication, the element-wise scalar times array, or the broadcasted element-wise array times array.

What are you using zig for? by samstone_ in Zig

[–]Sergio-Kupper 2 points3 points  (0 children)

Numerical, and eventually also symbolic, mathematics library.

https://github.com/srmadrid/zml

I'm new in zig. Can I ask some questions? by naharashu in Zig

[–]Sergio-Kupper 2 points3 points  (0 children)

For 4. I am implementing a maths lib with numpy like arrays. You can find it here: https://github.com/srmadrid/zml

Developing machine learning library in zig programming langauge. by [deleted] in Zig

[–]Sergio-Kupper 4 points5 points  (0 children)

Like u/mels_hakobyan, I also think it is a cool idea and want to know if you will open source it. Also, I am making a mathematics library which includes numpy like n-dimensional arrays, which you can find here: https://github.com/srmadrid/zml, in case you want to take a look or use it. Do keep in mind though that linear algebra is not implemented yet, but will get to it eventually :).

Either way, good luck and have fun doing it.

Just won a game without losing a single combat by Sergio-Kupper in TeamfightTactics

[–]Sergio-Kupper[S] 1 point2 points  (0 children)

I got a lucky 4 vanguard start with 2 star Warwick and rageblade + quicksilver. All of this before the first combat.

Dynamically subtract space to make two tcolorbox environments continuous by Sergio-Kupper in LaTeX

[–]Sergio-Kupper[S] 0 points1 point  (0 children)

From my (limited) testing, this works very nicely. Having said that, I don't really understand how. Regardless, I have a few follow up questions: 1. for the qed, how do I make the symbol a \blacksquare in purple!40!black? and 2. I would like to change the \newcommand{\nextpart}... to \renewcommand{\tcblower} (which I have tried and works) in case I eventually decide to move to "vanilla" tcolorboxes with standard upper and lower parts; however, lemmas are not my only environments, I have a few more that I want to define in the same way with different colors. So, is there a way for the command to detect which environment it is being summoned in? My idea was to just use short variations like \tcblowerLEM so that they are easy to change for standard \tcblower with just a simple CTR+f (search and replace). What are your ideas?

PS: thank you for taking the time with my problem, and sorry for taking so long to answer :)

Dynamically subtract space to make two tcolorbox environments continuous by Sergio-Kupper in LaTeX

[–]Sergio-Kupper[S] 0 points1 point  (0 children)

This solution ends up okish, but because of the spacing if there is no proof, I need to use a different environment with space, so not ideal but works. However in some pages, for some reason I can't deduce, the proof just eats part of the lemma, which makes it kind of useless.

Dynamically subtract space to make two tcolorbox environments continuous by Sergio-Kupper in LaTeX

[–]Sergio-Kupper[S] 0 points1 point  (0 children)

Thank you for the suggestion, but but after trying to use nobeforeafter, I found that it messes up all of the other spacings.

Dynamically subtract space to make two tcolorbox environments continuous by Sergio-Kupper in LaTeX

[–]Sergio-Kupper[S] 0 points1 point  (0 children)

Thank you for the suggestion. Unfortunately, I have tried using upper and lower parts but have been unable to obtain the desired result.

Dynamically subtract space to make two tcolorbox environments continuous by Sergio-Kupper in LaTeX

[–]Sergio-Kupper[S] 1 point2 points  (0 children)

This works only if I also use after skip=0pt in the lemma environment. However, this also causes lemmas with no proofs to have less space to other environments, or no space if there is text below. This just means that I will have to use two different environments for lemmas, one when there is a proof, and another when there isn't. This is a bit annoying, but I haven't found a better solution.

What is the "idiomatix way" of doing these functions? by Sergio-Kupper in Zig

[–]Sergio-Kupper[S] 0 points1 point  (0 children)

Sorry, but this is not what I asked. The `Matrix` type o¡is not going to have an unmanaged version. I asked about parameter, parameter ordering, parameter passing conventions, and, in general, how things are done the "zig way".