Searching We.Love.Privacy.Club

Twts matching #maps
Sort by: Newest, Oldest, Most Relevant

The Go 1.18 generics landscape
A fairly complete presentation about Go 1.18 generics including examples, planned changes for future releases, writing generics code, defining constraints, new library packages, and generics examples for generics Map() / Reduce() / Filter()  and a type-safe Set implementation. 1 points posted by FGM ⌘ Read more

⤋ Read More

GoCN 每日新闻 (2022-1-15)

  1. https://jogendra.dev/writing-maintainable-go-code Writing maintainable Go code
  2. https://mp.weixin.qq.com/s/h8vhy8IJKnA8aNbTlCoQtg 理解 go 中空结构体的应用和实现原理
  3. https://juejin.cn/post/7053109648223633438 Go 并发写 map 产生错误能够通过 recover() 恢复吗?
  4. [https://soulteary.com/2022/01/15/explain-the-golang-resource-embedding-solution-part-1.html](https://soulteary.com/2022/01/15/exp … ⌘ Read more

⤋ Read More

GoCN 每日新闻(2022-01-04)

GoCN 每日新闻(2022-01-04)
  1. 「GoCN 酷 Go 推荐」go 语言位操作库 — bitsethttps://mp.weixin.qq.com/s/UcuKgKnt4fwrg3c-UHc3sw
  2. Go 通过 Map/Filter/ForEach 等流式 API 高效处理数据https://mp.weixin.qq.com/s/7ATm_Zu7ib9MXf8ugy3RcA
  3. 优化 Go 二进制文件的大小[https://prog.world/optimizing-the-size-of-the-go-binary](https://prog.world/optimizing-the-si … ⌘ Read more

⤋ Read More

Go 通过 Map/Filter/ForEach 等流式 API 高效处理数据

什么是流处理

如果有 java 使用经验的同学一定会对 java8 的 Stream 赞不绝口,极大的提高了们对于集合类型数据的处理能力。

”`
int sum = widgets.stream()

          <span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class= ... ⌘ [Read more](https://gocn.vip/topics/20922)```

⤋ Read More

go 语言位操作库 bitset
bitset库 实现了 bitsets 数据结构,这是一种正整数和布尔值映射关系的结构,它比 map[uint]bool 更高效

什么是 bitsets

bitsets 基本思想是用一个 bit 位来标记某个元素对应的 Value,每一位表示一个数,1 表示存在,0 表示不存在
比如我要表示 1, 3, 7 这 3 个数

  1. 构造一个空白 bitsets:00000000
  2. 每位代表的值如下:76543210
  3. 想要表示的值标记 1:10001010
有什么好处?

�� … ⌘ Read more

⤋ Read More

GoCN 每日新闻(2021-12-13)
GoCN 每日新闻(2021-12-13)

  1. 尝鲜 Go 1.18 范型版本的 map 和 slice!https://juejin.cn/post/7040800455349239822
  2. Go 实现可序列化的 Roaring Bitmapshttps://dgraph.io/blog/post/serialized-roaring-bitmaps-golang/
  3. Go 使用 Github Actions 做 CI[https://www.alexedwards.net/blog/ci-with-go-and-github-actions](https://www.alexedwards.net/blog/ci-with-go-and-github … ⌘ Read more

⤋ Read More

BigCache 针对 Go 垃圾回收的设计优化

为什么有这篇文章

某一天在群里摸鱼的时候,看到群里有人问 go map 的空间回收问题,把截图贴上吧:

Image

其实一位群友发出的问题引起了我注意,他的问题是: gomap 的值调用了 delete 函数是不是不会立即删除?当然这个问题如果研究过或者深入 go 的内存分� … ⌘ Read more

⤋ Read More

@movq@www.uninformativ.de I am getting this when I run it on cron (extra lines in between becuase otherwise jenny will make them a mash):

Traceback (most recent call last):

File “/home/quark/jenny/jenny”, line 565, in

if not retrieve_all(config):

File “/home/quark/jenny/jenny”, line 373, in retrieve_all

refresh_self(config)

File “/home/quark/jenny/jenny”, line 294, in refresh_self

process_feed(config, config[‘self_nick’], config[‘self_url’], content)

File “/home/quark/jenny/jenny”, line 280, in process_feed

fp.write(mail_body)

File “/usr/lib/python3.8/encodings/iso8859_15.py”, line 19, in encode

return codecs.charmap_encode(input,self.errors,encoding_table)[0]

UnicodeEncodeError: ‘charmap’ codec can’t encode character ‘\U0001f4e3’ in position 31: character maps to

⤋ Read More

Learning European Languages (Michel Thomas)

Image

From Gottfriend Hensel’s 1791 Synopsis Universae Philologiae

I’ve said on a couple livestreams that the ideal way for an English speaker to begin learning or excel in learning other major European languages (Spanish, French, Italian and German) is to use Michel Thomas’s audiotapes. They can be found for free on Pirate Bay and other sites, but you can also buy them [on his official … ⌘ Read more

⤋ Read More

not to mention there’s lots of interesting transformations one can apply to the linear ramp of a phasor signal. movable midpoint as seen in phase distortion synthesis and !phasewarp. exponential and @!(sndkitref “bezier”)!@ mappings. Not to mention all the trig functions and waveshaping synthesis techniques. All these things would warp tempo in interesting periodic ways. #halfbakedideas

⤋ Read More