Show newer

我只能从源码好不好看的角度“评价”,万一人家就觉得那么写好看呢,对吧?跑的欢跟代码好不好看又有什么关系呢,我只是盲人摸象再无能而怒罢了。(鬼知道openharmony的源码要咋编译,里头gn, Kconfig, Makefile, gundle等的大杂烩。。。还有-I$(LITEOSROOT)/忘了/src这种骚操作)
---
想通前:你懂个锤子的操作系统?你看过源码吗?
想通后:我个锤子的操作系统,我下贱!

这个群本来技术氛围很好的,你指出别人错误不用担心被认为阴阳怪气,现在该变一变了,华为除外,这个是雷区

Show thread

另外plan9虽然代码结构清晰,但我依然感觉这个系统仅仅是写出来能跑而已
只管做,很少有错误处理,或者说是没有错误处理
所以代码简洁有点难以置信,另外有些实现看着就很草

Show thread

操作系统这玩意根本就不是你牛逼写出来就可以的,感兴趣的伙伴们可以去了解一下 Plan9 是怎么挂的干脆利落的。

Show thread

这件事现在已经不是技术问题了,是宗教问题(复述),感谢我的列表,我的好友
另外舆论上这个东西已经不接受任何批评建议了,就跟饭圈一样,就当没看见好了

有没有大佬做过把自己博客从一个平台迁移到另一个平台?资源文件是怎么处理的?

lib/csu/dynamic/init_test:jcr_test  ->  failed: /usr/src/lib/csu/tests/init_test.c:80: .jcr not run  [0.001s]
lib/csu/dynamiclib/init_test:jcr_test  ->  failed: /usr/src/lib/csu/tests/init_test.c:80: .jcr not run [0.002s]
lib/csu/static/init_test:jcr_test  ->  failed: /usr/src/lib/csu/tests/init_test.c:80: .jcr not run [0.001s]
lib/libc/resolv/resolv_test:getaddrinfo_test  ->  failed: /usr/src/lib/libc/tests/resolv/resolv_test.c:299: run_tests(_hostlist_file, METHOD_GETADDRINFO) == 0 not met [278.492s]
lib/libc/sys/stat_test:stat_socket  ->  failed: /usr/src/contrib/netbsd-tests/lib/libc/sys/t_stat.c:355: Expected error 36, got 61, in connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) == -1 [0.002s]
lib/msun/ctrig_test:test_inf_inputs  ->  failed: 16 checks failed; see output for more details [0.003s]
sys/acl/00:main  ->  failed: 1 of 4 tests failed [0.039s]
sys/acl/02:main  ->  failed: 1 of 4 tests failed [0.110s]
sys/audit/administrative:acct_failure  ->  failed: acct.*13117.*return,failure not found in auditpipe within the time limit [11.089s]

.jcr 确实没了,另外系统可能有点假死(雾)

Show thread
# make checkworld
...
7628/7741 passed (113 failed)
# kyua report --results-file /root/.kyua/store/results.usr_tests.time.db
===> Summary
Test cases: 7741 total, 301 skipped, 40 expected failures, 104 broken, 9 failed
Total time: 2824.977s

从 FreeBSD 的 csu 中删除 gcj 支持(也就是我看不惯很久的 .jcr 段)

crtbegin.c

--- crtbegin.c.orig	2021-06-21 18:09:59.796723000 +0800
+++ crtbegin.c	2021-06-21 18:11:34.154714000 +0800
@@ -94,35 +94,3 @@
 );
 #endif
 
-/*
- * Handler for gcj. These provide a _Jv_RegisterClasses function and fill
- * out the .jcr section. We just need to call this function with a pointer
- * to the appropriate section.
- */
-extern void _Jv_RegisterClasses(void *) __weak_symbol;
-static void register_classes(void) __used;
-
-static crt_func __JCR_LIST__[] __section(".jcr") __used = { };
-
-#ifndef CTORS_CONSTRUCTORS
-__attribute__((constructor))
-#endif
-static void
-register_classes(void)
-{
-
-	if (_Jv_RegisterClasses != NULL && __JCR_LIST__[0] != 0)
-		_Jv_RegisterClasses(__JCR_LIST__);
-}
-
-/*
- * We can't use constructors when they use the .ctors section as they may be
- * placed before __CTOR_LIST__.
- */
-#ifdef CTORS_CONSTRUCTORS
-asm (
-    ".pushsection .init		\n"
-    "\t" INIT_CALL_SEQ(register_classes) "\n"
-    ".popsection		\n"
-);
-#endif

crtend.c

--- crtend.c.orig	2021-06-21 18:10:09.816571000 +0800
+++ crtend.c	2021-06-21 18:11:39.405199000 +0800
@@ -39,9 +40,6 @@
 	(crt_func)0
 };
 static crt_func __DTOR_END__[] __section(".dtors") __used = {
-	(crt_func)0
-};
-static crt_func __JCR_LIST__[] __section(".jcr") __used = {
 	(crt_func)0
 };

试一试 text :pio_cute:

root [15] TFitEditor::DoFit - using function PrevFitTMP  0BDFF158
 FCN=0.461417 FROM MIGRAD    STATUS=CONVERGED     122 CALLS         123 TOTAL
                     EDM=1.22647e-07    STRATEGY= 1      ERROR MATRIX ACCURATE
  EXT PARAMETER                                   STEP         FIRST
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
   1  Constant     1.07758e+00   3.96379e-01   1.87133e-04  -7.49212e-04
   2  Mean         4.95815e+01   1.40941e+02   8.49062e-02   2.04531e-06
   3  Sigma        1.09037e+02   1.70096e+02   1.87540e-03  -1.21735e-04

想到自己是个垃圾,于是就把写了一点的鸿蒙1.1评论删了(雾

Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。