TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Some identities in J (array language)

2 点作者 veryveryold4 个月前
Some identities in the J computer language.<p><pre><code> 0: :- (+-) 0 -: (0: 0) 0 -: (0: 7) 1: :- (*%) ]: :- (+0:) ]: :- (*1:) ]: :- ] + 0: ]: :- ] * 1: 1 -: 1 1 1 = 2 2 2 = 2 2 2 10 = 2*1+4 0: -: 0: + 0: 1: -: 0: + 1: +: -: ] + ] *: -: ] * ] (],[) -: ([,])~ +: -: +~ *: -: *~ &gt; -: &lt;~ &lt; -: &gt;~ 1: -: =~ *~ -: ] * ] 0: -: -~ ] -: (]]) 10 3 = 3 (] , [) 10 3&amp;* -: (* 3:) %&amp;3 -: (% 3:) 10 20 30 10 20 30 -: ,~ 10 20 30 14 49 0 1 -: (+:,*:,0:,1:) 7 A simple test: test =: (],[) -: ([,])~ 10 test 20</code></pre> 1<p>I wonder if some LLM or intelligent person could guess what those symbols and identities mean given a large list of identities.<p>Spoiler: 0: :- (+-) .NB for all x, 0 = x + (-x) 1: :- (<i>%) .NB for all x, 1 = x </i> (1&#x2F;x) ]: :- (+0:) .NB for all x, x = x + 0 4 -: #&#x27;long&#x27; &#x27;f&#x27; -: {. &#x27;first&#x27; &#x27;t&#x27; -: {: &#x27;last&#x27; &#x27;wd&#x27; -: ({.,{:) &#x27;word&#x27;

1 comment

Pompidou3 个月前
-: and :- are not the same... Maybe some typos... But your list shows how left and right terms are the same in each identities. Look like some pedagogical stuff.<p>For instance :<p>(],[) -: ([,])~<p>(],[) Appends right and left term while ([,])~ append left and right term after arguments order inversion.