ときどきの雑記帖 RE* (新南口)
シニカルムーン
40th
Turbo Pascalも40周年
今から 40 年前の 1983/11/20 に『Turbo Pascal 1.0』がリリースされました。#TurboPascal40th pic.twitter.com/DfuJoZ2o6n
— DEKO (@ht_deko) November 20, 2023
CP/M版の1.0だけでも GW-BASICや MS-DOSみたいにソースコード 公開してくれないかなあ…
リコー
リコー、写真用フィルムの販売を開始 35mm判とブローニー判 | マイナビニュース
へー。
Java and the String Odyssey
メモ。
Java and the String Odyssey: Navigating Changes from JDK 1 to JDK 21
hings
hings Programmers Can Do in One Week : r/programming
hings
とは?
としばし悩んだのだけど、頭のT
が抜け落ちただけだった模様。
- Things Programmers Can Do in One Week | Blog | build-your-own.org
- Things Programmers Can Do in One Week | Hacker News
Oof, too bad you can’t edit a title in Reddit.
化対応
多言語化対応における TypeScript の型定義を通して開発のしやすさについて考えた
「多言語対応」か 「多言語化」でいいような気が、
世界を「数字」で回してみよう
このシリーズ結構好きなのだけど 久しぶりの新作
「日本のコロナ史」を総括する ~5類移行後の答え合わせ:世界を「数字」で回してみよう(70)番外編(1/11 ページ) - EE Times Japan
新刊近刊
Mathematica
あー使いてー
- ハンズ・オン・スタートMATHEMATICA® 原書3版 - 丸善出版 理工・医学・人文社会科学の専門書出版社
- ハンズ・オン・スタートMathematica® - 丸善出版 理工・医学・人文社会科学の専門書出版社
第2版の翻訳本は
発行年月日 2018年01月
だった。
アルゴリズム
- 2024/2/2 アルゴリズム設計マニュアル 原書3版 上 Steven S. Skiana/平田… [その他] - 新刊.net
- 2024/2/2 アルゴリズム設計マニュアル 原書3版 下 Steven S. Skiana/平田… [その他] - 新刊.net
上巻が
価格: ¥8,580. (税込)
下巻が
価格: ¥7,480. (税込)
いい値段だなあ(まあ黄色い表紙の本だし)。 ところで前の版はいつ出てたっけと確かめると
出版社 : 丸善出版 (2012/2/11)
おおう😓
Hacker Culture A to Z
Get our newest release, Hacker Culture A to Z by Kim Crawley. If you're just getting started on your hacker journey, you'll find plenty here to guide your learning and help you understand the references and cultural allusions you come across. https://t.co/rCMXqePn7K pic.twitter.com/ls4LHKtAm3
— O'Reilly Media (@OReillyMedia) November 20, 2023
出版社: Oreilly & Associates Inc (2023/12/19)
目次を見ると
The New Hacker's Dictionary
っぽい感じもあるんだけど、
収録されている単語を見ていくと
物足りないというか
なんというか。
automate the boring
You can can get 25% off the 3rd edition of Automate the Boring Stuff with Python with code PREORDER direct from the publisher: https://t.co/GwKrytbba0
— @AlSweigart@mastodon.social (@AlSweigart) November 20, 2023
この表紙は 日本語版では「退屈なことは~」になっているアレか。 ずいぶん速いペースで版が改まっているような
半額キャンペーン
技書博9 開催期間の2日間、人気の一部の電子書籍が半額で買えるキャンペーンを実施される様です。 Go 言語プログラミングエッセンスもお安く買えます。ぜひこの機会に。 #gihyo #gihyodp https://t.co/AsHft6EN3Z
— mattn (@mattn_jp) November 21, 2023
拙著「Linuxのしくみ 増補改訂版」も11/25,26yの2日間だけ半額の1600円で買えます!https://t.co/hPSpAMuH1B
— sat (@satoru_takeuchi) November 21, 2023
black friday
Kindle本のブラックフライデー特大セールが開催!
— コリス🍡🍭 (@colisscom) November 20, 2023
Web制作やUIデザイン、イラスト関連の良書が半額で、超お買い得ですhttps://t.co/6VxXLC5c8i pic.twitter.com/lMabznxwDu
word boundary
つづき。
実際のところどうなのか明確にしておきたいけど古い文献あさるのめんどくせー😓
1977年11月のexのマニュアルに
Ex Reference Manual Version 1.1 - November, 1977
Basic regular expression forms
\< This sequence in a regular expression forces the match to occur only at the beginning of a ‘‘variable’’ or ‘‘word’’; that is, either at the beginning of a line, or just before a letter, digit, or underline and after a character not one of these.
\> Similar to ‘<’, but matching the end of a ‘‘variable’’ or ‘‘word’’, i.e. either the end of the line or before character which is neither a letter, nor a digit, nor the underline characte
という記述を発見。 GNU マニフェストよりも前のものなので、 このメタ文字がGNU起源のものではありえないことは確定すね。
こっち GitHub - Cube9999/vi: The original source code of the vi text editor, taken from System V だと時期がはっきりとはわからないけど
case '<':
*ep++ = CBRC;
continue;
case '>':
*ep++ = CLET;
continue;
というコードあり。
ところで vi/vax/ex_re.h を見ると
/*
* There are three regular expressions here, the previous (in re),
* the previous substitute (in subre) and the previous scanning (in scanre).
* It would be possible to get rid of "re" by making it a stack parameter
* to the appropriate routines.
*/
var struct regexp re; /* Last re */
var struct regexp scanre; /* Last scanning re */
var struct regexp subre; /* Last substitute re */
こんな記述があり、var
とは?
と思ったが
vi/vax/ex.h
を見ると
#ifndef var
#define var extern
#endif
というのがあった。なるほど。
coreutils
coreutilsのコミットを眺めていたら いくつか面白いものを発見。
その1
pinky: fix string size calculation coreutils.git - GNU coreutils
ATTRIBUTE_PURE
-static size_t
+static idx_t
count_ampersands (char const *str)
{
- size_t count = 0;
- do
- {
- if (*str == '&')
- count++;
- } while (*str++);
+ idx_t count = 0;
+ for (; *str; str++)
+ count += *str == '&';
return count;
}
if文をなくしたというのがポイントなんだろうか? 吐いたコードがどう変わるのかちょっと確かめてみたいところではある。
その2
maint: DECIMAL_DIGIT_ACCUMULATE uses stdckdint.h
-/* If 10*Accum + Digit_val is larger than the maximum value for Type,
- then don't update Accum and return false to indicate it would
- overflow. Otherwise, set Accum to that new value and return true.
- Verify at compile-time that Type is Accum's type, and that Type is
- unsigned. Accum must be an object, so that we can take its
- address. Accum and Digit_val may be evaluated multiple times.
-
- The "Added check" below is not strictly required, but it causes GCC
- to return a nonzero exit status instead of merely a warning
- diagnostic, and that is more useful. */
-
-#define DECIMAL_DIGIT_ACCUMULATE(Accum, Digit_val, Type) \
- ( \
- (void) (&(Accum) == (Type *) nullptr), /* The type matches. */ \
- verify_expr (! TYPE_SIGNED (Type), /* The type is unsigned. */ \
- (((Type) -1 / 10 < (Accum) \
- || (Type) ((Accum) * 10 + (Digit_val)) < (Accum)) \
- ? false \
- : (((Accum) = (Accum) * 10 + (Digit_val)), true))) \
- )
+/* Set Accum = 10*Accum + Digit_val and return true, where Accum is an
+ integer object and Digit_val an integer expression. However, if
+ the result overflows, set Accum to an unspecified value and return
+ false. Accum and Digit_val may be evaluated multiple times. */
+
+#define DECIMAL_DIGIT_ACCUMULATE(Accum, Digit_val) \
+ (!ckd_mul (&(Accum), Accum, 10) && !ckd_add (&(Accum), Accum, Digit_val))
マクロを関数に置き換えた? と思ったが、 自前のマクロをC23で使えるようになったシステムのマクロに置き換えた。 ということらしい。
C23での方法
C23に向けて N2683: Towards Integer Safety で「安全な整数演算」について色々提案されました。その中から、以下の3つがC23に取り込まれます:
#include <stdckdint.h> bool ckd_add(type1 *result, type2 a, type3 b); bool ckd_sub(type1 *result, type2 a, type3 b); bool ckd_mul(type1 *result, type2 a, type3 b);
awk
- We need a mode that preserves double quotes around and within fields. · Issue #215 · onetrueawk/awk
- calrifications about double quotes gawk.git - gawk
- Fix string/regex comparisons. gawk.git - gawk
FORTRAN Compiler on IBM 704
〇年前に通った道
vimをプログラミングすることが楽しくなって、こんなエディタは他にないんじゃないか、っていわれても、それはemacs使いが35年前に通った道だってなっちゃうよね
— Kaoru Maeda 前田 薫 (@mad_p) November 18, 2023
bit 演算
色々頑張ると bit 演算で書ける
— りきぽん🐟 (@ricky_quikem) November 13, 2023
for (int S = (1 << r) - 1; S < (1 << N);) {
int x = S & -S, y = S + x;
S = (((S & ~y) / x) >> 1) | y;
} https://t.co/Lr8menhvmM
式の部分部分はわかるんだけど(本当に?)、 全体でなにがどうなっているのかワカラン😓
Declarative parse.y
というわけで"Declarative parse.y"というタイトルで11/29に発表します。登壇者の傾向から、parserの話が多くなるのではないかと思います。https://t.co/xdLMTCsbIJ
— kaneko.y (@spikeolaf) November 18, 2023
お、これはと思ったが
Fukuoka.rb #333 Ninja Talk 大会 - connpass
これか。
21:30 | 21:40 | junk0612 さん | LL 法と LR 法の違いは? 調べてみた! -完全版- |
これも興味をひかれるなあ
ところで
- 順番は厳正な Array#sample により決定しました
- 「全部なら Array#shuffle でいいんですよ」と教わりました
にちょっとウケた
Customizing Printf
GNU C Libraryでのprintfの書式指定子の拡張方法について。存在自体を知らなかった。少なくともこの点(ユーザー定義型に対する拡張)において標準C++のiostreamは良くやってると思う。定義するのも使うのも簡単だ。
— Yak! (@yak_ex) November 20, 2023
>Linux Fu: Customizing Printf via @hackaday https://t.co/XrFsh63Ful
メモメモ
桜美林
“おベルリン”大学としか読めん pic.twitter.com/Y9hcY8mnHY
— あさだ (@Piersanti_alter) November 19, 2023
答え、置いておきます pic.twitter.com/5Xo0LlefJy
— あさだ (@Piersanti_alter) November 19, 2023
気にしたことはなかったけどそういう由来だったのか
その言語を使う気になるかどうかでかなり重要な要素を占めるのが「面倒臭い布教者がいないか」で、これでいくらか割を食っているJuliaという例もあるんですが、Rustも例外じゃないですよね。
— Odashi (@odashi_t) November 20, 2023
瓜田不納履李下不正冠
「職業・電気エンジニア」が趣味で作った基板を勤め先会社(電子機器を作っている)で受け取ろうとすると「それは趣味じゃないのでは?」と税関から怒られが発生してビジネス向けの関税を取られる可能性があるらしい。学びだ(趣味の電子工作をしているみんなは荷物は家で受け取ろう)
— なるみCYO🐷 (@queenmk) November 21, 2023