dyweb / weekly

DevComm-Shanghai Weekly 上海地区高校技术社团联合周报(欢迎投稿)
https://dyweb-weekly.netlify.com/
65 stars 5 forks source link

weekly-87 #69

Closed gaocegege closed 6 years ago

gaocegege commented 6 years ago

DL: 8.6

at15 commented 6 years ago

https://github.com/alibaba/oceanbase oceanbase 4 年前的开源代码 ... (虽然文档是 word ... https://github.com/alibaba/oceanbase/tree/master/oceanbase_0.4/doc)

另外昨天去了阿里在湾区的 meetup ... 主要在说 X-DB 不知道跟 Oceanbase 什么关系 都是 OLTP。用到了 FPGA 来 compaction (LSM 里合并 block)

最后吐槽一句 ... meetup 讲的太宽泛了 ... https://www.meetup.com/Alibaba-AIOps-Meetup/events/253052732/

image

skyzh commented 6 years ago

https://dev.to/antonfrattaroli/what-happens-when-you-type-googlecom-into-a-browser-and-press-enter-39g8

2018 版当你输入 google.com 敲回车会发生什么。这篇文章从前端的角度回答了这个问题。

当然还有一个最强的版本 https://github.com/alex/what-happens-when

skyzh commented 6 years ago

https://www.rust-lang.org/pdfs/Rust-Chucklefish-Whitepaper.pdf

在 Rust 官网看到了 Chucklefish 从 C++ 切到 Rust 的案例。玩他们家的游戏大概不会再碰到莫名其妙崩溃,错误日志没生成,根本没法反馈的问题了……

skyzh commented 6 years ago

https://stackoverflow.com/questions/1995113/strangest-language-feature

同学在 Python 里写了一段代码,1 <= x <= 2。我很疑惑这个是不是对的,然后自己试了一下发现真的可以。

于是在 StackOverflow 上看到了这个问答。各种语言的玄学特性都在里面了。

skyzh commented 6 years ago

https://stackoverflow.com/questions/1724255/why-does-2-2-in-javascript

Why does 2 == [2] in JavaScript?

gaocegege commented 6 years ago

1 <= x <= 2

为什么要写这么悬疑的代码。。。。。

skyzh commented 6 years ago

https://github.com/gpujs/gpu.js

用 GPU.js 快速做了个 GPU 加速的 Conway's Game of Life,Console 里看到这个 lib 把我的 JavaScript Code 编译成了 OpenGL Shader。

skyzh commented 6 years ago

@gaocegege 我是看到我初学 Python 的同学这样写越界判断才发现有这种悬疑写法。。。而且试了一下竟然能用。。。

skyzh commented 6 years ago

http://metalbyexample.com/rendering-text-in-metal-with-signed-distance-fields/

很久以前折腾过 C# XNA 里面的中文字体渲染,如今看 Metal 资料才知道 3D 游戏的字体渲染有这么多方式。文中介绍了“Signed-Distance Field Rendering”。

Valve 的一个应用: https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

gaocegege commented 6 years ago

https://blog.csdn.net/hengwei_vc/article/details/78643146

Disqus On Jekyll 之翻内篇

Disqus 在国内是被墙的,这篇文章讲了如何实现一个反向代理,代理一部分 disqus 的 API,解决这个问题

utf8please commented 6 years ago

还有一个 Node.js 的, https://github.com/ciqulover/disqus-proxy 优势是 Hexo 只要简单配置即可使用,缺点是前端代码比较简单,功能不全。

这两个项目都是在 Disqus API 的基础上,自己实现一个后端去调用 Disqus API ,然后自己再实现一个前端脚本去调自己的后端……简直就是自己写了个评论系统然后把 Disqus 当数据库用……不像是反向代理那么简单。我觉得很折腾……

P.S. 这两个项目都要求自己有 VPS / PHP 托管。但是有 VPS / PHP 托管的前提下,是否可以干脆就用一个可以独立部署的评论系统?与折腾这些项目相比利弊如何?此问题留给读者思考。

at15 commented 6 years ago

@utf8please exercise for the reader 很熟练啊,你怎么这么熟练啊

codeworm96 commented 6 years ago

https://gitlab.com/Douman/yukikaze async Rust HTTP client library based on hyper

用这个库的程序不怕自己沉掉么

skyzh commented 6 years ago

http://fusharblog.com/3-ways-to-define-comparison-functions-in-cpp/

以前在 NOIP 竞赛的时候一直没有弄懂 STL 里诸如 sort 的比较函数应该如何实现。这篇文章作了很好的解答。最后一个"Define operator()()"产生"A functor, or a function object"的实现我以前从来没用过。

https://en.cppreference.com/w/cpp/algorithm/sort

差点忘了 C++11 里有 lambda...

    std::sort(s.begin(), s.end(), [](int a, int b) {
        return a > b;   
    });

刚刚又有点疑惑 sort(a, a+10) 这种对一般数组的排序是怎么匹配到的。 再看了一下,似乎 Cpp 里的数组指针就是一个 Random Access Iterator。

at15 commented 6 years ago

https://github.com/golang/example/tree/master/gotypes examples for using go's standard library to do static analysis

at15 commented 6 years ago

http://jb-blog.readthedocs.io/en/latest/posts/0032-debugging-zsh-startup-time.html from https://getantibody.github.io/even-faster/ 在 mac 下用 oh-my-zsh 和 nvm 之后每次开 terminal 卡 2s .... 最后改用 brew 装了 ... 有空研究一下 (肯定不会研究的

codeworm96 commented 6 years ago

https://github.com/neoeinstein/stats_alloc An instrumenting middleware for global allocators in Rust, useful in testing for validating assumptions regarding allocation patterns, and potentially in production loads to monitor for memory leaks.

可定制默认分配器的用法

htfy96 commented 6 years ago

Divide Your Rent Fairly。用博弈论解决住卧室住客厅出多少钱的问题

https://www.nytimes.com/interactive/2014/science/rent-division-calculator.html

Submitted via bookmarklet :sparkles: