Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Rust vs Go: how to choose the best programming language for your project?

Rust and Go, these two modern programming languages, with their unique advantages, are becoming hot topics in the developer community. Their competition in performance, security, simplicity, feature set, and concurrency not only influences developers' choices but also foretells future trends in software development.Battle of Performance: Rust's Precision vs. Go's EfficiencyRust, developed by Mozilla Research, has become the preferred choice for performance-sensitive applications due to its zero-cost abstractions and memory safety features. It ensures memory safety through concepts like ownersh...

1,435 0       RUST GO GOLANG COMPARISON


  In-depth Exploration of Direct and Indirect Dependency Management in GoLang

The dependency management in Golang is handled using go mod. go mod is the official dependency management tool introduced by the Golang team. It assists developers in managing project dependencies to ensure the stability and maintainability of the project code. In go mod, dependencies are categorized into two types based on how packages are imported in the code: direct dependencies and indirect dependencies. Direct dependencies are explicitly referenced in the project code, while indirect dependencies are dependencies of the direct dependencies. Below we will provide detailed explanations of t...

1,018 0       GO MODULE DIRECT DEPENDENCY INDIRECT DEPENDENCY


  Go是一门面向对象的编程语言吗

Golang已经开源了13年,在最近的TIOBE编程语言排名中,于2023年3月再次进入前十名,并比2022年底的排名上升了两个位置。Go在2022年底提高了2个排名许多第一次接触Go的开发者来自面向对象的编程语言,比如Java、Ruby等,他们在学习Go后第一个问题通常是:Go是一种面向对象的语言吗?在本文中,我们将探讨这个问题。追溯在广为人知的Go编程语言“圣经”《The Go Programming Language》中,有一个Go与其主要祖先编程语言之间的亲缘关系图表。Go与其主要祖...

981 0       OOP GOLANG CHINESE GO


  Can two new objects point to the same memory address in GoLang?

Do you have any idea what the output will be for below GoLang snippet?package mainimport ( "fmt")type obj struct{}func main() { a := &obj{} fmt.Printf("%p\n", a) c := &obj{} fmt.Printf("%p\n", c) fmt.Println(a == c)}Many people would think that a and c are two different object instances which have different memory addresses. Hence a == c will be false. But if you try to run the above program, you would see below output0x5781c80x5781c8trueTo get to know the reason why the comparison returns true, some understanding of how Go allocates memory and how variable memory escape happens are ne...

12,255 0       ZEROBASE VARIABLE ESCAPE GOLANG GO


  Fix 'this authentication plugin is not supported' issue while using Go to connect MySQL 8

MySQL 8 has changed its default authentication plugin from mysql_native_password to caching_sha2_password to improve its security. However many third party libraries seem act slowly to catch up with this change. This causes some compatible issues with their connection to MySQL. One of the issues is seen in Go libraries while it's trying to connect to MySQL 8.The specific error has been observed is "this authentication plugin is not supported". The root cause of this issue is that the go-sql-driver didn't support the new default authentication plugin. This bug has been reported a coup...

14,632 4       GO MYSQL 8 AUTHENTICATION PLUGIN MYSQL


  In-memory key-value store in C, Go and Python

Subtitle: Wow Go’s net library is fastOn paternity leave for my second child, I found myself writing an in-memory hashmap (a poor-man’s memcached), in Go, Python and C. I was wondering how hard it would be to replace memcached, if we wanted to do something unusual with our key-value store. I also wanted to compare the languages, and, well, I get bored easily!The code is on github as Key-Value-Polyglot.Each version implements enough of the get and set commands from the memcached protocol that we can test them with a memcached client.If you write a version in a different language (...

4,413 0       KEY-VALUE MEMORY C PYTHON GO


  How the Go language improves expressiveness without sacrificing runtime performance

This week there was a discussion on the golang-nuts mailing list about an idiomatic way to update a slice of structs. For example, consider this struct representing a set of counters. type E struct { A, B, C, D int}var e = make([]E, 1000)Updating these counters may take the form for i := range e { e[i].A += 1 e[i].B += 2 e[i].C += 3 e[i].D += 4}Which is good idiomatic Go code. It's pretty fast too BenchmarkManual 500000 4642 ns/opHowever there is a problem with this example. Each access the ith element of e requires the compiler to insert an...

2,085 0       GO EXPRESSIVENESS PERFORMACE SACRIFICE


  Learning Go

This year I'm going to try a new programming language - Go. I had this notion that compiled, type based languages are overly complex and reduces developer efficiency. However, after doing some reading about Go, it appeared to take a different path from the rest and felt like something worth trying.Acquainting a programming language is a journey. First few steps you take with it will define your perception about it. These first few steps went well for me with Go and it felt like a good fit for my repertoire. I thought of sharing my learning experience, hoping it will help others who w...

2,252 0       GOOGLE LEARNING GO RESOURCE