Better HN
topnewbestaskshowjobs
Log inSign up

AndyKluger

43 karma · joined Apr 24, 2022 (4y ago) · 80 submissions

Submissions

comment 1y ago · link · parent

These are not developed to that point, really, but you might be interested in dt and mshell.

https://github.com/so-dang-cool/dt

https://github.com/mitchpaulus/mshell

comment 1y ago · link · parent

What do you think stack based languages like Factor miss in this regard?

comment 1y ago · link · parent

FWIW in Factor you can set dynamic variables with

  "coolvalue" thisisthevar set
or if you use the `variables` vocab, alternately:

  "coolvalue" set: thisisthevar
and lexical variables are set with

  "coolvalue" :> thisisthevar

comment 1y ago · link · parent

Thank you!

Because I love to practice and demonstrate Factor, this is working code for that example:

  "f1.txt" "f2.txt" [ utf8 file-lines [ string>number ] map ] bi@ vdot

comment 1y ago · link · parent

Do concatenative langs like Factor fit the bill?

comment 1y ago · link · parent

An alternative (like arrow keys) would be great, as I don't think I can right-click-drag with my touchpad.

comment 2y ago · link · parent

I tried pasting the CSS from https://cdn.jsdelivr.net/npm/water.css@2/out/water.css , which sets link color to #0076d1, but the links still render in black, which is hard to read when my browser is set to prefer the dark colors from that CSS.

comment 2y ago · link · parent

Neat CSS looks very good! I can't remember if I gave it a proper try before.

Some time ago I trialed a bunch of classless CSS projects, paired with Hugo using the "classless-blog" theme, and these were my top picks, out of order:

- holiday: https://holidaycss.js.org/

- bamboo: https://rilwis.github.io/bamboo/demo/index.html

- fieber: https://fieber.hack.re/

- pico classless: https://picocss.com/docs/classless

- yorha: https://metakirby5.github.io/yorha/

- simple: https://simplecss.org/

- water: https://watercss.kognise.dev/

- bolt: https://boltcss.com/

- Lissom.CSS: https://lissomware.github.io/css/

All of them except yorha have light/dark modes, and all of them except yorha are IMO too light by default in light mode.

comment 2y ago · link · parent

1. That's a good looking Hugo theme!

2. Implicitly chain everything all the time!

In Factor, you might do it as:

    reverse [ sq ] [ even? ] map-filter [ . ] each
Or with a little less optimizing:

    reverse [ sq ] map [ even? ] filter [ . ] each
The least obvious thing is that the period is the pretty-print function.

comment 2y ago · link · parent

A major reason I stick with yadm, aside from that it works great and offers me no trouble, is that for basic usage I can just reuse my existing familiarity with the git interface, replacing "git" with "yadm" in the command.

comment 2y ago · link · parent

Sorry this is totally unrelated, but I don't know how to notice replies on HN, and missed a question from you 5 months ago, and HN won't let me reply to that old comment.

You asked what adlist was blocking assets on a site of yours, and I don't think it's an adlist, but a general rule against loading scripts from other domains. Here's what the log looks like: https://cdn.imgchest.com/files/w7pjcgqn387.png

comment 2y ago · link · parent

I'll add that https://github.com/0xType/0xProto is worth checking out, if you haven't. What mono (and proportional) fonts do you find work best for you?

comment 2y ago · link · parent

You can configure your build to be wider than default. In order of increasing width:

- semi-extended

- extended

- extra-extended

- ultra-extended

I think by default the extended variant is included in most builds anyway, if you want to try it.

FWIW here's a sample of my usual build's extended variant: https://cdn.imgchest.com/files/b49zcjd53oy.png

comment 2y ago · link · parent

There's a font apparently based on Andika with some disambiguating improvements, called Cadman.

comment 2y ago · link · parent

Iosevka is absolutely wonderful!

I have my own builds -- not based on AH's glyph choices, but also chosen to minimize glyph ambiguity.

I'll mention another great legible monospace project: 0xProto

---

Build: https://github.com/AndydeCleyre/archbuilder_iosevka/releases...

Screenshot Mono: https://cdn.imgchest.com/files/k46acrxl297.png

Screenshot Mono with syntax highlighting: https://cdn.imgchest.com/files/l4nec9d8lm4.png

Screenshot Proportional: https://cdn.imgchest.com/files/6yxkce8p6a7.png

0xProto: https://github.com/0xType/0xProto

comment 2y ago · link · parent

Yeah that one's annoying.

I got used to a "recent" alias (Zsh):

  if (( $+commands[eza] )) {
    alias recent="eza --binary --octal-permissions --no-permissions --git -snew --icons=always"
  } else {
    alias recent="ls -rt"
  }

comment 2y ago · link · parent

What's the license? Is there a repo?

comment 2y ago · link · parent

I'm also a big fan of mise for managing development runtimes, and while I haven't tried its own task runner functionality, it does feature some: https://mise.jdx.dev/tasks/

comment 2y ago · link · parent

For Python projects, I like to use Taskipy as the UX entry point. If any task itself is more than a one liner but doesn't need Python, I'll have it invoke a shell script from a mk folder. If any task itself requires an activated venv, I'll define it in a noxfile.

What it might look like in a pyproject.toml:

  [tool.taskipy.tasks]
  fmt = "nox -s fmt"
  lock = "nox -s lock"
  install = "if [ $VIRTUAL_ENV ]; then pip install -r local-requirements.txt; else printf '%s\n' 'Please activate a venv first'; return 1; fi"
  test = "nox -s test test_without_toml typecheck -p 3.12"
  docs = "nox -s render_readme render_api_docs"
For file generation tasks (the kind of stuff make is good at), I've been using Tup more and more. But recent versions aren't always packaged for distros, so I'm hoping it gets an asdf/mise plugin.

comment 2y ago · link · parent

Are we expected to be able to drag and drop elements in the List and Board examples, on mobile browsers? I can't, but I look forward to trying on a computer.

https://atlassian.design/components/pragmatic-drag-and-drop/...

comment 2y ago · link · parent

I understand this is probably not a priority or concern at all, but FYI this is what the page looks like with uBlock Origin configured as what they call "hard mode:" https://cdn.imgchest.com/files/my2pc6adm87.mp4

comment 2y ago · link · parent

It's not glyph-ish those APL style languages you like, but have you given Factor a good go?

comment 2y ago · link · parent

Not an array language (AFAIU), but here are some of the mentioned problems solved in (glorious) Factor:

    : find-gcd ( nums -- gcd )
      [ infimum ] [ supremum ] bi gcd nip ;

    : max-wealth ( accounts -- n )
      [ sum ] map-supremum ;

    : which-max-wealth ( accounts -- i )
      [ sum ] supremum-by* drop ;

    primes-upto

comment 2y ago · link · parent

If this interests anyone who hasn't played with it yet, I highly recommend trying out Factor. For me, it makes programming fun again.

Some good practice problems can be found on Advent of Code, Codewars, and the Perl Weekly Challenge.

comment 2y ago · link · parent

FYI I didn't log into my tuta account for a while and they deleted it completely. No way I can recover the data and personal connections I made using it.

Also Discord was like "yeah you may have your Discord credentials, but we need you to check your email before you can log in again anyway." So I lost my Discord account, too.

But I started using this new thing called Skiff and . . . Oh.

comment 2y ago · link · parent

I want to showcase one way to do the example jq/non-jq query using yamlpath:

  yaml-get -p '.tags[has_child(amd)][parent()].name' machines.json
That can replace

  rcl query --output=raw machines.json '[
    for m in input:
    if m.get("tags", []).contains("amd"):
    m.name
  ]'

comment 2y ago · link · parent

I've asked you similar in the past in comments on this site, but: what do you find lacking in the NestedText spec that a new YAML-like format might do better? Why not just embrace NestedText for the task?

comment 2y ago · link · parent

StrictYAML is great (and the author is in these comments!), but ultimately it's one specific library, not a format spec, so to depend on it for a project you need every person/tool doing the writing/parsing to commit to use that library (and the programming language it was written for).

Again, it's a great project, but I wanted something similar that is a language-agnostic format specification, so moved on to using NestedText wherever I can.

comment 2y ago · link · parent

If you haven't checked it out, NestedText is a great format that offers no handling of types beyond string/list/dict, leaving all that to the application reading in the values.

No character needs escaping.

comment 2y ago · link · parent

Hjson is pretty nice.

Two YAML-light style projects are StrictYAML (a Python library), and NestedText (an alternative spec with only string, list, and dict).

123