Andy

joined 1 year ago
MODERATOR OF
 
[–] [email protected] 1 points 4 days ago

Thanks, yes, I use nox and github actions for automated environments and testing in my own projects, and tox instead of nox when it's someone else's project. But for ad hoc, local and interactive multiple environments, I don't.

[–] [email protected] 1 points 6 days ago

If it didn’t bring something more to the table, besides speed, no one would care

I'm literally saying its speed in certain operations makes an appreciable difference in my workflows, especially when operating on tens of venvs at a time. I don't know why you want to fight me on my own experience.

I'm not telling anyone who doesn't want to use uv to do so. Someone asked about motivation, and I shared mine.

[–] [email protected] 2 points 6 days ago (2 children)

The convention

That's one convention. I don't like it, I prefer to keep my venvs elsewhere. One reason is that it makes it simpler to maintain multiple venvs for a single project, using a different Python version for each, if I ever want to. It shouldn't matter to anyone else, as it's my environment, not some aspect of the shared repo. If I ever needed it there for some reason, I could always ln -s $VIRTUAL_ENV .venv.

Learn pyenv

I have used pyenv. It's fine. These days I use mise instead, which I prefer. But neither of them dictate how I create and store venvs.

Shell scripts within Python packages is depreciated

I don't understand if what you're referencing relates to my comment.

[–] [email protected] 1 points 6 days ago (2 children)

I have a pip-tools wrapper thing that now optionally uses uv instead. Aside from doing the pip-tools things faster, the main advantage I've found, and what really motivated me to support and recommend uv with it, is that uv creates new venvs MUCH faster than python's venv module, which is really annoyingly slow for that operation.

[–] [email protected] 2 points 6 days ago (4 children)

I use my own Zsh project (zpy) to manage venvs stored like ~/.local/share/venvs/HASH-OF-PROJECT-PATH/venv, so use zpy's vpy function to launch a script with its associated Python executable ad-hoc, or add a full path shebang to the script with zpy's vpyshebang function.

vpy and vpyshebang in the docs

If anyone else is a Zsh fan and has any questions, I'm more than happy to answer or demo.

 

I'm posting this mostly for the new hacker news discussion: https://news.ycombinator.com/item?id=40736174

3
F: Functional False (www.nsl.com)
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
 

F is a pure functional concatenative language originally designed as an extension of False. F contains the list-operations of K3 and the dip combinator of Joy. Floating-point and symbolic datatypes are supported. One-time assignment is enforced in syntax. A theory of function-valence and -charge is outlined. F also contains a general continuation primitive $, and the pattern sublanguage of XY. G is a variant of F in which the K3 adverbs are implemented as primitives.

Discussion on lobsters: https://lobste.rs/s/m9xv5y/f_functional_false

[–] [email protected] 1 points 1 week ago

From the author, on reddit:

Made a little mistake in there: you can create FDs with higher numbers using eg. exec {fd}<>pipe and they'll generate numbers above 10, plus the variables'll be better for scripting.

 

This is not my own content!

 

This is not my own content!

 

Factor gains a quit function (and preserves history)!

[–] [email protected] 7 points 2 weeks ago (1 children)

CLI flow: run command, print output below

TUI flow: navigate and interact with a layout that updates in place

 

This is already in the sidebar, but now there's a fresh post on Lobsters, so maybe some good discussion will come of it.

[–] [email protected] 1 points 2 weeks ago

If you haven't checked them out you might be interested in aconfmgr or pacdef.

[–] [email protected] 1 points 3 weeks ago* (last edited 3 weeks ago)

Space Age

USING: assocs calendar math math.extras ;

CONSTANT: year-factors H{
  { "Mercury"   0.2408467  }
  { "Venus"     0.61519726 }
  { "Earth"     1.0        }
  { "Mars"      1.8808158  }
  { "Jupiter"  11.862615   }
  { "Saturn"   29.447498   }
  { "Uranus"   84.016846   }
  { "Neptune" 164.79132    }
}

: space-age ( seconds planet -- earth-years )
  year-factors at
  years duration>seconds
  /
  2 round-to-decimal ;

[–] [email protected] 5 points 1 month ago

mpv+uosc is my jam these days.

[–] [email protected] 2 points 1 month ago

Even more:

If a function takes a number—whether it's an integer, a floating-point base-2 number, or a Dec—you can always write 5 as the number you're passing in. (If it's an integer, you'll get a compiler error if you try to write 5.5, but 5.5 will be accepted for either floats or decimal numbers.)

Because of this, it's actually very rare in practice that you'll write 0.1 + 0.2 in a .roc file and have it use the default numeric type of Dec. Almost always, the type in question will end up being determined by type inference—based on how you ended up using the result of that operation.

For example, if you have a function that says it takes a Dec, and you pass in (0.1 + 0.2), the compiler will do Dec addition and that function will end up receiving 0.3 as its argument. However, if you have a function that says it takes F64 (a 64-bit base-2 floating-point number), and you write (0.1 + 0.2) as its argument, the compiler will infer that those two numbers should be added as floats, and you'll end up passing in the not-quite-0.3 number we've been talking about all along.

view more: next ›