Forwarded from 𝔽𝕣𝕠𝕤𝕥
每个人当成一个真值过滤器,如果串联起来的话就谁说真谁说假就无所谓了,总的结果都是假
然后就是「串联」,第二个人要负责判断第一个人的输出结果
然后就是「串联」,第二个人要负责判断第一个人的输出结果
逻辑好深奥啊,原来自反性(reflexivity)和 identity 真是基石一样的存在,要不然不知道自己在求什么
组合和排列数我都不会求,看来是不好弄了
(数目)2 真的有那么特殊吗? 🤔 还是说 2 和 3 在逻辑上不需要被差别化对待?
组合和排列数我都不会求,看来是不好弄了
(数目)2 真的有那么特殊吗? 🤔 还是说 2 和 3 在逻辑上不需要被差别化对待?
Python 里的
and(ps) 就是 notExists False,这么说按 positive 求肯定答案会全是 Negative,无法区分两个不同的宾语(subject),难道一定要有一个关系被构造为非对称的才可以利用唯一的真断言?🤔
𝔽𝕣𝕠𝕤𝕥
每个人当成一个真值过滤器,如果串联起来的话就谁说真谁说假就无所谓了,总的结果都是假 然后就是「串联」,第二个人要负责判断第一个人的输出结果
现在就是 NP 哲学问题:自己证明难还是证明别人的证明正确难?……
题外话,我对代数/逻辑问题不感兴趣,所以到此为止吧。
题外话,我对代数/逻辑问题不感兴趣,所以到此为止吧。
Forwarded from dnaugsuz
import android.notification.NotificationManager.*
override fun onCreate() { super.onCreate()
fun createPreetyChannel() {
val channelName = notificationChannelName(this, ID_BACKGROUND)
val channel = NotificationChannel(ID_BACKGROUND, channelName, IMPORTANCE_LOW)
channel.apply { showBadge = false; lightColor = getColor(this, R.color.colorPrimary) }
NotificationManagerCompat.from(this).createNotificationChannel(channel)
}
fun createChannel(setIcon: Boolean) = startForeground(RUNNING_IN_BACKGROUND, TimeObserverService.getForegroundNotification(this, setIcon))
when (SDK_INT) {
in VERSION_CODES.O..Int.MAX_VALUE -> createPreetyChannel()
in VERSION_CODES.N until VERSION_CODES.O -> createChannel(setIcon = false)
else -> createChannel(setIcon = true)
}
stopSelf()
}#Kotlin https://github.com/arrow-kt?type=source 可怜的 Arrow functional programming 库啊(
Forwarded from dnaugsuz
一个有前端的函数式编程库居然被埋没在 Kotlin Android 开发的㲿洋大海之中……
不知道那些只看星星数目的人看到后会作何嘲讽(
不知道那些只看星星数目的人看到后会作何嘲讽(
Forwarded from dnaugsuz
import android.os.Build.VERSION.SDK_INT
import android.os.Build.VERSION_CODES.*
fun startForeground() {
when (SDK_INT) {
in O..Int.MAX_VALUE -> { prepareForOreoStart(); prepareForNormalStart(setIcon = true) }
in N until O -> prepareForNormalStart(setIcon = false)
else -> startNormal(setIcon = true)
}
startService(Intent(this, FakeForegroundService::class.java))
}
private fun prepareForNormalStart(setIcon: Boolean) {
startForeground(ID_RUNNING_IN_BACKGROUND, getForegroundNotification(this, setIcon = false))
}
private fun prepareForOreoStart() {
val channel = NotificationChannel(ID_BACKGROUND, notificationChannelName(this, ID_BACKGROUND), IMPORTANCE_MIN)
channel.apply { showBadge = false; lightColor = getColor(this, R.color.colorPrimary) }
NotificationManagerCompat.from(this).createNotificationChannel(channel)
}
duangsuse::Echo
好像不擅长逻辑…… 那我枚举敷衍下好了 假定 A 是恒真,不,我是说下面我会把恒真的人称为 A 问 B,A 会告诉我某条是生路,关于结果是否为生路,分支: f(B) t(A), positive -> 假 negative -> 假 永远得假,不能分辨出正确结果 t(B) f(A), positive -> 假 negative -> 假 永远得假,不能分辨出谁是 A where t(p) 代表命题成立、f(p) 代表命题不成立 组合就是这些,二者中至少有一个真话所以没必要为…
刚才我想了想,觉得问题也可以是「那边的人会说左边的路是生路,且他没说谎」
看起来好像是更可能接近解法,毕竟信息量大一些
可是我发现 真/假 混淆的情况下,要做到推出两个分支 AND 成立不太直接
问「你是诚实的人」等于 negation,没法区分
问「对方是诚实的人」依然没法区分
无论是 negation 多少次还是把一个断言反套到另一边,总是没法区分
……🤔
看起来好像是更可能接近解法,毕竟信息量大一些
可是我发现 真/假 混淆的情况下,要做到推出两个分支 AND 成立不太直接
问「你是诚实的人」等于 negation,没法区分
问「对方是诚实的人」依然没法区分
无论是 negation 多少次还是把一个断言反套到另一边,总是没法区分
……🤔
#FP https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
草我一直没注意里面的在想一个 a -> c 一个 c -> a 怎么可能一样呢 🤔(其实那也是 b -> c 啊,不对,不可能得出这种关系)
id . f 和 f . id 的类型相等的情况必要 id 与 f 之一的类型是 a -> a
然后就不知道了…… 太菜
id . f == f
f . id == f 草我一直没注意里面的
id :: a -> a
id . f 和 f . id 的类型相等的情况必要 id 与 f 之一的类型是 a -> a
(.) :: (y -> z) -> (x -> y) -> (x -> z) (id . f) 确定 y、(f . id) 确定两个 y 为同一然后就不知道了…… 太菜
Bartosz Milewski's Programming Cafe
Category Theory for Programmers: The Preface
Table of Contents Part One Category: The Essence of Composition Types and Functions Categories Great and Small Kleisli Categories Products and Coproducts Simple Algebraic Data Types Functors Functo…