Skip to content

Instantly share code, notes, and snippets.

@weihanglo
weihanglo / rust-vs-go.md
Last active June 12, 2024 03:02
【譯】Rust vs. Go

【譯】Rust vs. Go

本文譯自 Julio Merino 2018 年七月撰寫的 Rust vs. Go 一文。Julio Merino 是 G 社僱員,在 G 社工作超過 8 年,無論工作內外,都接觸開發不少 Go 語言,並撰寫 [Rust 點評][rust-review]系列文,來聽聽他對 Rust 與 Go 的想法吧。

Thanks Julio Merino for this awesome article!


@mangreen
mangreen / Youtube Get Current Second Api Demo.
Last active August 26, 2021 02:04
Youtube Get Current Second Api Demo.
<!DOCTYPE html>
<html>
<body>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<div>Current Time: <span id="time"></span></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
@lyricat
lyricat / prime_sieve.go
Created August 15, 2012 11:21
A concurrent prime sieve
// A concurrent prime sieve
// via: http://golang.org/doc/play/sieve.go
package main
// Send the sequence 2, 3, 4, ... to channel 'ch'.
func Generate(ch chan<- int) {
for i := 2; ; i++ {
ch <- i // Send 'i' to channel 'ch'.
}