duangsuse::Echo
722 subscribers
4.29K photos
130 videos
583 files
6.51K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
(
:->
:boys
(
:[str
:Rikka
:ice100
:pandecheng
:Yutta
)
)
(
:->
:say-hello
(
:#
(
:name
)
(
:@
:name
女装哦 🌚
)
)
)
(
:each
:boys
:say-hello
)
那么现在就把这些作为内建的 macro(真正内建的只有 handler)

-> define
-? defined?
-x undef
<- read (mp)
. send
=> hash
# macro
: to_symbol
->s to_string
[str string_array
~~ must_sequence
` loop
`` must_loop
? cond
% typeof
:: index
::= index_eq
ext extension_load
ext~ extenseion_unload
require require_library
eval eval
^ car
$ cdr
@ puts
@! warn
@< gets
λ lambda
#< macro_args (mp)
#> macro_body (mp)
[] square_index
[]= square_index_eq
[]? has_key?
[]- ary_length
[]* keys
str-includes
str-match
+ add
++ inc
- sub
-- dec
* mul
/ div
** pwr
% mod
> lt
< bg
>= le
< be
& and
| or
! not
^ xor
<< shl
>> shr
$type-># to_macro
p print
!! raise
r valueof
This media is not supported in your browser
VIEW IN TELEGRAM
自动类型提升....
先不做
复制 lice 的?
This media is not supported in your browser
VIEW IN TELEGRAM
#PL #project 第一门函数式和能用的语言,就是没写标准库还啥都不能用

支持插件,使用模块化设计
好用 Lime
合影留念 #PL #project
依然可以使用 Lime#loadExtClass(Class)Lime#defineMacroLime.handlers#put 来定义标准库
准备发布可以在 JSE 上运行带 Kotlin std 的版本,然后开始实现标准库宏
Lime.jar
3.4 MB
包含完整 Kotlin std 的
duangsuse::Echo
Lime.jar
需要 Proguard 减小体积,要 -keep class lime.*
Lime.jar
28.2 KB
修复了反射 API vararg 使用上的一些问题
能正常使用的证明:
~/AndroidStudioProjects/Lime/out/artifacts/Jar$ . /opt/android-studio/plugins/Kotlin/kotlinc/bin/kotlinc -cp Lime.jar

Welcome to Kotlin version 1.2.30 (JRE 9.0.4+12-Debian-4)
Type :help for help, :quit for quit
>>> import lime.*


val sexp = Lime.parse("(print a b c)")[0]!! as SexpressionList
val lime = Lime(sexp)
lime.defineMacro("print", "varargs", "(. print varargs)")
companion object o {
@JvmStatic fun print(o: Array<Any?>): Any? {
println(o)
return o}}
lime.handlers.put(Symbol("print"), o::class.java.getDeclaredMethods()[0])
This media is not supported in your browser
VIEW IN TELEGRAM
感觉还是不如 Lite 有希望,不过也是个好玩具,写时花费时间比上次少一半