HackerTrans
TopNewTrendsCommentsPastAskShowJobs

icen

no profile record

comments

icen
·9 dagen geleden·discuss
I’m greatly enjoying my Charybdis nano: the built in trackball makes using the mouse just as convenient as the keyboard
icen
·2 maanden geleden·discuss
Numpy doesn’t quite get it. It covers the core verbs, but it opts for specialised names instead of using adverbs (you can apply your own, but it’s much more laborious).

Once you see +/, you understand ,/ or fn/ - whereas you have to remember that it’s written sum, concatenate, or np.ufunc.accumulate in numpy. The same goes for +\ vs cumsum etc (and you don’t get all of these pre defined).

The difference here means that whilst numpy gets the core array operations down, it’s much less convenient and less self explanatory than the apl system.
icen
·2 maanden geleden·discuss
There's also the much less vector oriented spelling:

    (1 ∾˜ "  "⊸(¬∘⍷))⊸/
which removes the first space of each occurrence of double spacing
icen
·2 maanden geleden·discuss
Do you remember what it was? This is how I would spell that in BQN, and you could write something very similar in APL (you don't have shift, so you'd have to write 1 drop 0 cat swap instead)

    ((«¬∘∧⊢)' '=⊢)⊸/
This works by building a boolean mask of spaces, and converting it to a mask of 'is a space, preceded by a space', negates that, and replicates out by that inverted mask (i.e. is not a space preceded by a space):

Here's stepping through it with some input.

       (' '=⊢)  "this  is a  sentence with       many   spaces"
    ⟨ 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 ⟩
       («' '=⊢)  "this  is a  sentence with       many   spaces"
    ⟨ 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 ⟩
       ((«∧⊢)' '=⊢)  "this  is a  sentence with       many   spaces"
    ⟨ 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 ⟩
       ((«¬∘∧⊢)' '=⊢)  "this  is a  sentence with       many   spaces"
    ⟨ 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 ⟩
       ((«¬∘∧⊢)' '=⊢)⊸/  "this  is a  sentence with       many   spaces"
    "this is a sentence with many spaces"
icen
·3 maanden geleden·discuss
It's clear that the symbols want to have one meaning each, for monadic and dyadic use, but that might mean quite different execution and types.

For example, & is monadic 'where' and dyadic 'min' (a logical extension of it being AND on bit-booleans), but this means you get different semantics, even if they all capture the 'where'-ness:

    1 3 ~ &0 1 0 1 / when applied to a list, gives the indices of true elements
    `b`d ~ &`a`b`c`d!0 1 0 1 / when applied to a dict, gives their keys
In both cases, you get that `x@&x` works, as `&x` will yield appropriate indices for `x`, but what that actually does has changed. In other languages, these would be spelled very differently, and so do seem like an overload, but sometimes it is just a point of view.

As for why it's obvious- it's not, really, but it's no less obvious than the word `where`, and you have already learnt it, as it is (as it seems to me at least) to be punned on the C syntax (same as `*`, which gives `first`).
icen
·6 maanden geleden·discuss
There’s nonguix for access to non free drivers and such. I think that system crafters have some installable images if you don’t have a current guix install to build one

It’s regrettable that this is necessary, but with so few Ethernet ports on laptops it’s harder to install these things without access to WiFi.
icen
·6 maanden geleden·discuss
You might be interested in this then: https://mlajtos.mu/posts/new-kind-of-paper

I’ve not used it myself, but it appears to be the thing you’re wanting?
icen
·8 maanden geleden·discuss
In helix that's %d (select-buffer, then delete). The selection-then-action design for helix is showing it's difference to vi, which is action-on-movement.