Our great sponsors
go | sqlc | |
---|---|---|
1842 | 150 | |
111,731 | 8,215 | |
0.9% | - | |
10.0 | 7.7 | |
3 days ago | 2 days ago | |
Go | Go | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go
-
Learn x86-64 assembly by writing a GUI from scratch
Example of assembly in Go source code:
https://github.com/golang/go/blob/master/src/crypto/md5/md5b...
-
Why no src directory?
This mother of all things has a dedicated src directory, so it really comes down to each project to choose its own file structure.
-
Exploring Async PHP
There are many solutions available without requiring PHP 8.1 that have been battle tested, but it's interesting to see the direction the PHP language is going in to compete with the likes of Golang and Elixir, both of which support async programming and have done for years.
-
Some annoying moments in Golang
I dislike how the implicit reference-like behavior of slices, maps, channels, and function pointers confuses newcomers to the language. It would be less ergonomic to have to declare them as pointer types, but it would be more clear to readers. The language used to actually do this in its pre-1.0 infancy (example). Everything is passed by value, but the values are pointer themselves to the actual data structures.
Will change in Go 1.21
-
In depth, complex technical implementation videos?
This isn't videos, but I would recommend tearing apart the implementation of the standard library and runtime for the language. They are accessible but present an interesting study in expert implementation.
-
Show HN: MicroSCOPE
MicroSCOPE is a software program developed through the [Go](https://go.dev) programming language that allows for the inidetection of a precise category of malicious software. The program is designed specifically for a class of malicious programs called _ransomware_ whose operation consists of data encryption and ransom demand in order to gain access to the content again.
In particular, MicroSCOPE was developed to be able to support two of the mainly used formats: the PE (_Portable Executable_) format for Windows platforms and ELF (_Executable and Linking Format_) for Unix-based platforms. Through the application of certain heuristics, MicroSCOPE is able to assign a score that corresponds to the level of dangerousness of the file being analyzed. The higher the score, the more similar characteristics the software will exhibit to ransomware that has already been studied. The heuristics have been extrapolated from numerous case studies and will be improved over time.
-
GoLang — Simplifying Complexity “The Beginning”
If you want to delve further into concurrency, you can check out this link. If you want to test and see some examples, you can click here. We'll create a separate post to talk about Goroutines, which is a very detailed and interesting topic. We know that Go's support for concurrency makes it a godsend for problems that are best solved using concurrency.
-
Longevity of Go
I believe that if Google dies, Go doesn't die with it, as per the license.
sqlc
- PHP to Golang
-
Sketch of a Post-ORM
The future isn't writing queries by hand or using ORM's. The future is reflection or code generation tools like https://sqlc.dev
Whether you use traditional queries or ORM's you still have to write all the model query code by hand in traditional systems. Projects like sqlc generate all the shapes/objects, validation, and everything else for you.
-
Why elixir over Golang
For maintaining state I use PostgreSQL. Driver: https://github.com/jackc/pgx (I use the pgxpools) Along with Sqlc for generating database models and allowing me to focus on just building queries in DBeaver. https://sqlc.dev/
-
Repost - Codegen F# from SQL
sqlc is a command line program that generates type-safe database access code from SQL.Sqlc documentation - https://sqlc.dev
-
That people produce HTML with string templates is telling us something
In a similar-but-also-totally-opposite vein to goqu is sqlc [1], where you write the SQL and the Go bindings get generated.
-
how to avoid writing dreadful SQL statements
Use something that does codegen, like sqlc or Bob.
-
Why ORMs are so hated?
In Go we have http://sqlc.dev which allows you to define all your SQL queries and table schemas upfront in a single file and have all the model code generated for you.
-
Go with PHP
I left PHP for Go.
- with http://sqlc.dev I don't have to write ORM or model code anymore.
- with http://goa.design I can have well-documented API's that any team can generate a client for in any language. It also generates the HTTP JSON and gRPC servers for me so I can focus on my logic.
- with https://github.com/99designs/gqlgen I can define GraphQL revolvers that play well with sqlc (any RDBMS) or I can use a key-value store.
- speaking of key-value stores, Go allows them to be embedded! Even SQLite now has the https://litestream.io/ project to make it super simple to use a durable, always backed-up SQLite database even in a serverless context.
Go is faster, uses less memory, and has really-well designed stdlib without all the bugs I used to face trying to use the PHP stdlib.
-
Deno 1.33: Deno 2 is coming
I was interested in looking up sqlc for python but it seems to be for go? Is there a different version than this? https://github.com/kyleconroy/sqlc
-
How do you handle migrations ?
Next try https://github.com/pressly/goose We have this setup to be run by the CI-CD pipeline to be run before the application is started. BTW, this utility is compatible with https://sqlc.dev , so they work good together.
What are some alternatives?
sqlx - general purpose extensions to golang's database/sql
GORM - The fantastic ORM library for Golang, aims to be developer friendly
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
SQLBoiler - Generate a Go ORM tailored to your database schema.
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
pgx - PostgreSQL driver and toolkit for Go
Angular - The modern web developer’s platform
ent - An entity framework for Go
golang-developer-roadmap - Roadmap to becoming a Go developer in 2020
PyPika - PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.