Skip to content

Instantly share code, notes, and snippets.

View y2q-actionman's full-sized avatar
🕹️
👾👾👾👾👾👾👾👾👾

Yokota Yuki y2q-actionman

🕹️
👾👾👾👾👾👾👾👾👾
View GitHub Profile
@phoe
phoe / package-local-nicknames.md
Last active February 27, 2024 08:14
Package-local nicknames in Common Lisp - a semishitpost about PLNs

Package-local nicknames in Common Lisp

Warning: this is a rant.

Warning: you have been warned.

Note: actually worthwhile content starts in the second subsection. You are free to skip the first one.

Story time

@RobertAKARobin
RobertAKARobin / python.md
Last active April 18, 2024 20:44
Python Is Not A Great Programming Language
@privet-kitty
privet-kitty / asdf-extension.md
Last active December 8, 2018 08:57
foo.asd defines a new module component that gathers all .lisp files in the directory. foo-infer.asd extends package-inferred-system and auto-generates each `foo/bar/all'-type subsystem.

ASDFの拡張についてのメモ

ASDFではソースファイルを扱うためにいちいちコンポーネントとして登録する必要があり、ディレクトリ中のすべてのソースファイルをまとめて扱うという機能がない。これはpackage-inferred-systemを使った場合も同じで、ASDFが.asdファイルから特定のソースファイルに辿りつくためにはどこかでファイル名を指定する必要がある。この点について、ASDFの拡張を考える。

最初にpackage-inferred-systemを使わない場合(例はfoo.asd)を扱い、その後でpackage-inferred-systemの拡張(例はfoo-infer.asd)について検討する。

cl-source-module: ディレクトリ中のすべてのソースファイルを含むモジュール

このようなコンポーネントはmoduleのサブクラスとして簡単に書ける。ただ、foo.asdでの実装はやや単純すぎるか。実用するとしたら、初回のcomponent-childrenの呼び出しでchildrenスロットに結果を保持しておき、2回目以降は、既存のcl-source-fileについては新しいオブジェクトを作らないようにするべきだろう。

  • :recursive tオプションで、直下だけでなく再帰的にソースファイルを収集するというデザインもありかもしれない。
@y2q-actionman
y2q-actionman / a_road_to_common_lisp_jp.md
Last active January 6, 2024 11:32
A Road to Common Lisp 翻訳

この文章は、 Steve Losh 氏の記事 "A Road to Common Lisp" の翻訳です。

原文はこちらです: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/


A Road to Common Lisp (Common Lisp への道)

これまで、「最近のCommon Lispをどう学ぶとよいでしょう?」と助言を求めるメールをたくさん受け取ってきました。そこで私は、これまでメールやソーシャルメディアに投稿した全てのアドバイスを書き下すことにしました。これが誰かに有益ならば幸いです。

Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.

The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.

Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.

Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a

@y2q-actionman
y2q-actionman / twitter-test.lisp
Last active March 7, 2019 03:39
twitter に所定の時間に自動投稿する
(in-package :cl-user)
#|
(ql:quickload :chirp)
(setf chirp:*oauth-api-key* "**************************"
chirp:*oauth-api-secret* "***************************"
chirp:*oauth-access-token* "*******************************"
chirp:*oauth-access-secret* "***************************")
|#
@chrisdone
chrisdone / AnIntro.md
Last active March 24, 2024 21:13
Statically Typed Lisp

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active March 29, 2024 19:56
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@jmervine
jmervine / gist:2079897
Created March 18, 2012 19:04
installing mysql on ubuntu using an aws instance
$ sudo apt-get install mysql-server mysql-client
... output omitted ...
$ sudo mysqladmin -u root -h localhost password 'password'
... output omitted ...
$ mysql -u root -p
... output omitted ...
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'your_host_name' IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;