Skip Navigation
Release v1.0.0 · marcopaganini/rpn
github.com Release v1.0.0 · marcopaganini/rpn

Changelog ea87548 Add the "dup" operator. 8231403 Improve precision handling a bit. a6148e8 Update README.md with decimal and brew info. 6184a22 Updated CHANGELOG.md to v1.0.0.

Release v1.0.0 · marcopaganini/rpn

I posted this project here before, but it's now reached 1.0.0.

0
Recommended way to run my scripts from a venv?
  • Sure, but nox is the closer counterpart for in-venv-task definitions. List "sessions" with -l, pick specific sessions to run with -s.

    import nox
    from nox.sessions import Session
    
    nox.options.reuse_existing_virtualenvs = True
    APP_NAME = 'logging_strict'
    
    @nox.session(python='3.12')
    def mypy(session: Session):
        """Static type checker (in strict mode)"""
        session.install('-U', 'mypy', '.')
        session.run('mypy',  '-p', APP_NAME, *session.posargs)
    

    Unfortunately it doesn't currently do any parallel runs, but if anyone wants to track/encourage/contribute in that regard, see nox#544.

  • Recommended way to run my scripts from a venv?
  • As someone's new comments just brought me back to this post, I'll point out that these days there's another good option: uv run.

  • Recommended way to run my scripts from a venv?
  • No, I don't use GHA locally, but the actions are defined to run the same things that I do run locally (e.g. invoke nox). I try to keep the GHA-exclusive boilerplate to a minimum. Steps can be like:

    - name: fetch code
      uses: actions/checkout@v4
    
    - uses: actions/setup-python@v5
      with:
        allow-prereleases: true
        python-version: |
          3.13
          3.12
          3.11
          3.10
          3.9
          3.8
          3.7
    
    - run: pipx install nox
    
    - name: run ward tests in nox environment
      run: nox -s test test_without_toml combine_coverage --force-color
      env:
        PYTHONIOENCODING: utf-8
    
    - name: upload coverage data
      uses: codecov/codecov-action@v4
      with:
        files: ./coverage.json
        token: ${{ secrets.CODECOV_TOKEN }}
    

    Sometimes if I want a higher level interface to tasks that run nox or other things locally, I use taskipy to define them in my pyproject.toml, like:

    [tool.taskipy.tasks]
    fmt = "nox -s fmt"
    lock = "nox -s lock"
    test = "nox -s test test_without_toml typecheck -p 3.12"
    docs = "nox -s render_readme render_api_docs"
    
  • What would Enaml 2.0 look like? | nucleic/enaml | Declarative UI
    github.com What would Enaml 2.0 look like? · nucleic enaml · Discussion #558

    Hi Everyone! I've been thinking lately that it might be time for me to devote some real effort into an Enaml version "2.0". I'd like some feedback from the community about that should look like. He...

    What would Enaml 2.0 look like? · nucleic enaml · Discussion #558

    From Enaml's docs:

    > Enaml brings the declarative UI paradigm to Python in a seamlessly integrated fashion. The grammar of the Enaml language is a strict superset of Python. This means that any valid Python file is also a valid Enaml file, though the converse is not necessary true. The tight integration with Python means that the developer feels at home and uses standard Python syntax when expressing how their data models bind to the visual attributes of the UI.

    > . . .

    > Enaml’s declarative widgets provide a layer of abstraction on top of the widgets of a toolkit rendering library. Enaml ships with a backend based on Qt5/6 and third-party projects such as enaml-web and enaml-native provides alternative backends.

    ---

    A maintainer of Enaml has just opened a brainstorm discussion on the next major development goals.

    It's a project I've long admired, though rarely used, and I'd love to see it get some attention and a revamp. I think the bar these days has been raised by projects like QML and Slint, which provide a great context in which to set new goals.

    0
    Yet another "What distro should I use?" post, but at least I did some homework.
  • If you choose to give Fedora a try, I recommend Ultramarine, which has more set up from the start, including their "Terrs" repository with more updated packages.

  • phreda4/r3: r3 programing language - ColorForth inspired
    github.com GitHub - phreda4/r3: r3 programing language - ColorForth inspired

    r3 programing language - ColorForth inspired. Contribute to phreda4/r3 development by creating an account on GitHub.

    GitHub - phreda4/r3: r3 programing language - ColorForth inspired
    0
    marcopaganini/rpn: A CLI RPN calculator in Go
    github.com GitHub - marcopaganini/rpn: A CLI RPN calculator in Go

    A CLI RPN calculator in Go. Contribute to marcopaganini/rpn development by creating an account on GitHub.

    GitHub - marcopaganini/rpn: A CLI RPN calculator in Go

    !Animated preview

    This is not my own project!

    0
    Fun with Go Iterators
    xnacly.me Fun with Go Iterators

    Go 1.23 added Iterators, so lets build a js like streaming api

    Discussion on HackerNews

    0
    Slint 1.8: Math gains postfix support
    slint.dev Slint 1.8 Released

    New Property Changed Callbacks, Timer, and Swipe Gesture

    Slint 1.8 Released

    Slint is a GUI toolkit, and is largely not relevant to concatenative programming. But the latest release adds a touch of postfix to the mix, which is nice to see.

    From the blog post:

    > ## Math Gains Postfix Support > > A subtle but profound change to the language. Traditional syntax: > > Math.max(20, Math.abs(value.x)) > > New postfix syntax: > > value.x.abs().max(20) > > The new syntax improves readability by making the transformation steps more explicit. It works well for many operations but has limitations: > > Effective for simple transformations (e.g., abs, max) Less intuitive for operations like clamp or atan2. > > pos.y.atan2(pos.x) // Less clear than atan2(pos.y, pos.x) > > So for now you cannot use postfix for all functions in the Math namespace. We may revisit these cases later, so give them a try and let us know your thoughts.

    0
    Roc, Exercism, Forth!
    isaacvando.com Roc, Exercism, Forth!

    Explore Roc's error handling through a Forth interpreter implementation. Learn about Roc's launch on Exercism and dive into stack-based programming concepts.

    Roc, Exercism, Forth!
    0
    best alternative to windows file explorer?
  • In no particular order.

  • best linux terminal emulator
  • Ah yes you can tell by the post title:

    best linux terminal emulator

  • best linux terminal emulator
  • Oh, is that #4948?

  • best linux terminal emulator
  • For me: Wezterm. It does pretty much everything. I don't think Alacritty/Kitty etc. offer anything over it for my usage, and the developer is a pleasure to engage with.

    Second place is Konsole -- it does a lot, is easy to configure, and obviously integrates nicely with KDE apps.

    Honorable mention is Extraterm, which has been working on cool features for a long time, and is now Qt based.

  • zdimension/macro-forth: some kind of RPN in rust via macros
    github.com GitHub - zdimension/macro-forth: Compile-time const Forth evaluation with macros

    Compile-time const Forth evaluation with macros. Contribute to zdimension/macro-forth development by creating an account on GitHub.

    GitHub - zdimension/macro-forth: Compile-time const Forth evaluation with macros
    0
    Is Telegram really an encrypted messaging app?
  • Just note that the comment was inaccurate, in that their weird encryption is indeed open source at least.

  • remokasu/stacker: command-line RPN calculator with an RPN-based scripting language (on PyPI)
  • I'd say an important part of this calculator's interaction model is doing something, getting a result, then doing something else to that result. That's not too bad in the regular Python interpreter either.

    For example, in Python:

    >>> 5
    5
    >>> 4 + _
    9
    >>> 2 * _
    18
    

    In Stacker:

    >>> 5
    [5]
    >>> 4 +
    [9]
    >>> 2 *
    [18]
    

    Does Hy have something like the Python interpreter's _?

  • remokasu/stacker: command-line RPN calculator with an RPN-based scripting language (on PyPI)
  • So it looks like a totally different data flow style, and (I think) geared toward writing then running programs, whereas Stacker is more for interactive stack-oriented calculator tasks.

  • remokasu/stacker: command-line RPN calculator with an RPN-based scripting language (on PyPI)
  • I've never used Hy. Does it offer any concatenative-style interaction?

  • Is there a better way to browse man pages?
  • As someone else said, setting less' jump value is helpful.

    Another tool I use, mostly for the zshall manpage, is https://github.com/kristopolous/mansnip

  • Recommended way to run my scripts from a venv?
  • 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.

  • Python's UV tool is even better
  • 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.

  • Recommended way to run my scripts from a venv?
  • 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.

  • Andy Andy @programming.dev
    Posts 114
    Comments 332
    Moderates