HiPhish's Workshop
  • Grid Framework
    • Overview
    • Features
    • Examples
    • Gallery
    • Showcase
    • FAQ
    • News
    • Support
    • Buy Now 35$
  • Open Source
    • NTFS-Clone
    • IPS-Tools
    • roll
    • Newton's Method in C
    • Xeen Tools
    • Wolf3D Extract
    • Game Source Documentation
  • Vim/Nvim plugins
    • Info.vim
    • REPL.nvim
    • Quicklisp.nvim
    • jinja.vim
    • Guix channel
  • Blog
  • About
  1. blog
  2. 2020
  3. 12
  • Spreading tables in Lua

    published: 2020-12-31

    modified: 2021-01-02

    Javascript has a spreading operator which lets us splice the contents of an object or array into another object or array. This makes it very easy to create an object based on another object and override or add entries. Since Lua and Javascript are quite similar, wouldn't it be nice to have this operator in Lua as well? Lua is a minimal language, so adding a new operator seems unlikely, but Lua is also very flexible, and we can add a spreading function instead.

    Continue reading…

  • Making LuaRocks (partially) compliant with the XDG Base Directory specification

    published: 2020-12-29

    LuaRocks is a community-driven package manager for the Lua programming language. LuaRocks packages can be installed globally or in the user's home directory, but sadly LuaRocks does not follow the XDG Base Directory specification. However, with a few lines of Lua code we can fix this shortcoming partially at least.

    Continue reading…

  • Making SBCL compliant with the XDG Base Directory specification

    published: 2020-12-28

    The war on dotfiles continues, this time with SBCL. Let's see how we can make it comply with the XDG Base Directory specification.

    Continue reading…

  • Making Bash compliant with the XDG Base Directory specification

    published: 2020-12-27

    GNU Bash does not comply with the XDG Base Directory specification, it uses the classical dotfiles approach where it just dumps all its files into the home directory. It does not even have the courtesy of putting all its files in one common ~/.bash directory. Fortunately we can coerce Bash into compliance with a bit of effort.

    Continue reading…

subscribe: RSS

archive

  • 2025 (1)
  • 2024 (8)
  • 2023 (11)
  • 2022 (13)
  • 2021 (5)
  • 2020 (15)
  • 2019 (17)
  • 2018 (1)
  • 2017 (4)
  • 2016 (6)
  • 2015 (2)

categories

  • misc (21)
  • open-source (24)
  • organisation (14)
  • vim (24)

tags

  • vim (21)
  • lisp (21)
  • rant (14)
  • html (10)
  • lua (9)
  • unix (8)
  • linux (5)
  • neovim (4)
  • web (4)
  • msgpack (3)
  • games (3)
  • testing (3)
  • guix (2)
  • network (2)
  • markdown (2)
  • python (2)
  • cocoa (1)
  • info (1)
  • awk (1)
  • elixir (1)
  • wine (1)
  • git (1)
  • terminal (1)
  • unity3d (1)
  • functional programming (1)

Creative Commons Attribution-ShareAlike 4.0 International License © 2015-2022, licensed under CC BY-SA 4.0

GitHub GitLab