Andy

joined 2 years ago
MODERATOR OF
 

Copied from the release notes:

We're starting with a new release approach, these files will stay available permanently in contrast to the latest nightly.

We now recommend most users to stick to 0.0.0-alpha releases instead of nightly-latest.

This current release is based on commit a089cf2 from the 6th of January 2025. These files are identical to nightly-latest published on the 7th of January 2025.


EDIT: A whole lot more detail in the new 0.0.0-alpha2-rolling release

 

Discussion on lobsters

[–] Andy@programming.dev 1 points 1 year ago

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

[–] Andy@programming.dev 1 points 1 year ago* (last edited 1 year 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 ;

[–] Andy@programming.dev 5 points 1 year ago

mpv+uosc is my jam these days.

[–] Andy@programming.dev 2 points 1 year 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.

[–] Andy@programming.dev 2 points 1 year ago (1 children)

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

[–] Andy@programming.dev 1 points 1 year ago

No, that's not used by Zsh.

[–] Andy@programming.dev 8 points 1 year ago (1 children)

Glad you have it working. This may also work:

_stfu () {
  shift words
  (( CURRENT-=1 ))
  _normal -P
}
compdef _stfu stfu
[–] Andy@programming.dev 1 points 1 year ago (1 children)

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.

[–] Andy@programming.dev 1 points 1 year ago

Huh? Is this relevant, or some kind of bot spam?

[–] Andy@programming.dev 2 points 1 year ago

For anyone else wondering:

Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify!

[–] Andy@programming.dev 20 points 1 year ago (2 children)

So far, this isn't much of anything.

Telegram already closes public channels reported for copyright violations.

Some excerpts from this post:

Compared to other platforms, we do not see the seriousness of Telegram to cooperate.

. . .

In May 2023, progress appeared to be going in the wrong direction. Telegram was reportedly refusing to cooperate with the Ministry of Communications and Digital on the basis it did not wish to participate in any form of politically-related censorship.

. . .

With no obviously public comment from Telegram on the matter, it’s hard to say how the social platform views its end of what appears to be an informal agreement.

Telegram will be acutely aware, however, that whatever it gives, others will demand too. That may ultimately limit Telegram’s response, whatever it may be, whenever it arrives – if it even arrives at all.

[–] Andy@programming.dev 1 points 1 year ago* (last edited 1 year ago)

Wow, the first submission here with a negative score. I'm guessing it's because it mentions bitcoin.

Well, I'll say that bitcoin is not the point here, but rather that the author is enthusiastically embracing forth, with its "directness," simplicity, and portability. You can find more in the lobsters comments.

The author plans to port their small Zig subtitle-displaying project to forth, and hopes to use forth for all their systems programming needs in the future.

view more: ‹ prev next ›