Skip Navigation

Posts
171
Comments
358
Joined
2 yr. ago

Concatenative Programming @programming.dev

lfnoise/sapf: Sound As Pure Form - a Forth-like language for audio synthesis using lazy lists and APL-like auto-mapping

Concatenative Programming @programming.dev

zeroflag/equinox: Forth Programming Language on Lua

Concatenative Programming @programming.dev

Intensional Joy (a concatenative account of internal structure) — Christine's World Wide Web Site

Concatenative Programming @programming.dev

Advanced Typechecking for Stack-Based Languages

Concatenative Programming @programming.dev

hex programming language

Concatenative Programming @programming.dev

BUND: concatenative language interpreter and shell

Concatenative Programming @programming.dev

BlagojeBlagojevic/blang: Fort [sic?] like lang

Concatenative Programming @programming.dev

Release 0.0.0-alpha1 · roc-lang/roc

Concatenative Programming @programming.dev

Tacit Talk: a podcast about programming languages, combinators, algorithms and more!

Concatenative Programming @programming.dev

Designing Code For Forward Progress

Concatenative Programming @programming.dev

Spreadsheets 1/3 - Rye Language

Concatenative Programming @programming.dev

ngp/tsk | A filesystem-based task manager

Concatenative Programming @programming.dev

Derangements | Re: Factor

Concatenative Programming @programming.dev

Zen of Factor | Re: Factor

Concatenative Programming @programming.dev

Watching Code | Re: Factor

Concatenative Programming @programming.dev

Happy Advent of Code 2024 Everyone!

Concatenative Programming @programming.dev

NeoHaskell

Concatenative Programming @programming.dev

ChipWits' 40th Birthday: Original FORTH Code Open Sourced! - ChipWits Robot Coding Game

Concatenative Programming @programming.dev

Release v1.0.0 · marcopaganini/rpn

Concatenative Programming @programming.dev

Finding Subsequences | Re: Factor

  • I've never used Hy. Does it offer any concatenative-style interaction?

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • CLI flow: run command, print output below

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

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

  • mpv+uosc is my jam these days.

  • 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.

  • More quoted from the post:

    Roc's Dec implementation (largely the work of Brendan Hansknecht—thanks, Brendan!) is essentially represented in memory as a 128-bit integer, except one that gets rendered with a decimal point in a hardcoded position. This means addition and subtraction use the same instructions as normal integer addition and subtraction. Those run so fast, they can actually outperform addition and subtraction of 64-bit base-2 floats!

    Multiplication and division are a different story. Those require splitting up the 128 bits into two different 64-bit integers, doing operations on them, and then reconstructing the 128-bit representation. (You can look at the implementation to see exactly how it works.) The end result is that multiplication is usually several times slower than 64-bit float multiplication, and performance is even worse than that for division.

    Some operations, such as sine, cosine, tangent, and square root, have not yet been implemented for Dec. (If implementing any of those operations for a fixed-point base-10 representation sounds like a fun project, please get in touch! People on Roc chat always happy to help new contributors get involved.)

  • Glad you have it working. This may also work:

     
        
    _stfu () {
      shift words
      (( CURRENT-=1 ))
      _normal -P
    }
    compdef _stfu stfu
    
      
  • FWIW I've read an Arch dev complain that folks using any 3rd party installer are not in fact "running Arch" and should not claim to be doing so.