GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    json web tokin' (est@social.emily.news)'s status on Friday, 17-Feb-2023 13:55:25 JSTjson web tokin'json web tokin'

    I already knew about syntactic shortcuts like:

    [“1”, “2”, “3”].map(&:to_i)

    But today I learned I could do something like:

    [“1”, “2”, “3”].map(&method(:Integer))

    Actually, this example is a bit contrived. What I really wanted to do was this accursed thing:

    ENV[“NUMERICAL_ID”]&.then(&:Integer)

    Which will either be `nil` (if the env var is not defined) or an Integer (if it is defined and can be converted safely). Anything else raises an exception.

    No point to this. Just something cursed I almost did, but backed away from.

    In conversationFriday, 17-Feb-2023 13:55:25 JST from social.emily.newspermalink

    Attachments

    1. No result found on File_thumbnail lookup.
      exception.no
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.