1597314060
Golang rune type is the alias for int32
, and it is used to indicate than the integer represents the code point. ASCII defines 128 characters, identified by the code points 0–127. When you convert the string to a rune slice, you get the new slice that contains the Unicode code points (runes) of a string.
Byte
slice is just like a string, but mutable. For example, you can change each byte or character. This is very efficient for working with file content, either as a text file, binary file, or IO stream from networking.
Rune
slice is like the byte slice, except that each index is a character instead of a byte. This is best if you work with text files that have lots of non-ASCII characters, such as Chinese text or math formulas ∑ or text with emoji ♥.
In Golang, we often use strings to store character data. But rune slices have many advantages: they treat characters more consistently. For Unicode characters, a rune slice can be used to append and modify characters with no errors. If we act on a string directly, we can cause problems here.
#go #golang
1599854400
Go announced Go 1.15 version on 11 Aug 2020. Highlighted updates and features include Substantial improvements to the Go linker, Improved allocation for small objects at high core counts, X.509 CommonName deprecation, GOPROXY supports skipping proxies that return errors, New embedded tzdata package, Several Core Library improvements and more.
As Go promise for maintaining backward compatibility. After upgrading to the latest Go 1.15 version, almost all existing Golang applications or programs continue to compile and run as older Golang version.
#go #golang #go 1.15 #go features #go improvement #go package #go new features
1597314060
Golang rune type is the alias for int32
, and it is used to indicate than the integer represents the code point. ASCII defines 128 characters, identified by the code points 0–127. When you convert the string to a rune slice, you get the new slice that contains the Unicode code points (runes) of a string.
Byte
slice is just like a string, but mutable. For example, you can change each byte or character. This is very efficient for working with file content, either as a text file, binary file, or IO stream from networking.
Rune
slice is like the byte slice, except that each index is a character instead of a byte. This is best if you work with text files that have lots of non-ASCII characters, such as Chinese text or math formulas ∑ or text with emoji ♥.
In Golang, we often use strings to store character data. But rune slices have many advantages: they treat characters more consistently. For Unicode characters, a rune slice can be used to append and modify characters with no errors. If we act on a string directly, we can cause problems here.
#go #golang
1599287850
Golang array is a fixed-size collection of items of the same type. The items of an array are stored sequentially and can be accessed using their index. If we want to declare an array in Go, a programmer specifies the type of the elements and the number of items required by an array.
Golang programming language provides a data structure called an** array**, which can store the fixed-size sequential collection of items of the same type.
The array is used to store the collection of data, but it is often more useful to think of the array as the collection of variables of the same type.
Instead of declaring individual variables, such as no1, no2, …, and no99, you declare one array variable such as numbers and use no[0], no[1], and …, no[99] to represent individual variables.
#golang #go #golang array #golang programming
1599732000
We spoke to Rob Pike, the co-author of the Go programming language, about a career spanning four decades, the evolution of Go over the last ten years, and into the future.
Evrone: Unlike many developers today, you started your career decades ago at Bell Labs. What’s been the biggest change in the way we develop software that you can think of, given your rare perspective?
**Rob: **The scale is much bigger today. Not just of the computers and the network, but the programs themselves. All of Unix version 6 (circa 1975) fits comfortably on a single RK05 disk pack, which has just over 2MB of storage, with lots of room left over for user software. And that was a fine computing environment, or at least seemed like one at the time. Although I can, of course, explain much of the growth, it is astonishing and perhaps not all of it is justified.
#golang #golang-api #golang-tools #golang-website #rob-pike #interview-transcript-go #latest-tech-stories #cloud-infrastructure-and-go
1597365540
Golang rune type is an alias for int32, and it is used to indicate than an integer represents the code point. ASCII defines 128 characters, identified by the code points 0–127. It covers English letters, Latin numbers, and a few other characters. Unicode, which is the superset of ASCII, defines the codespace of 1,114,112 code points. Unicode version 10.0 covers 139 modern and historic scripts (including the runic alphabet, but not Klingon) as well as multiple symbol sets.
ASCII stands for American Standard Code for Information Interchange, which is a character encoding standard for electronic communication. ASCII codes represent the text in computers, telecommunications equipment, and other devices.
In the past years, we dealt with one character set, which was ASCII. It used 7 bits to represent 128 characters, including upper and lowercase English letters, digits, and a variety of punctuations and device-control characters. Due to this, a vast number of the population of the world is not able to use their writing system on the computer.
#go #golang