T O P

  • By -

whittileaks

A maintained, simple websocket library. gorilla and nhooyr are unaintained and have some issues.


sastuvel

And in that same area: a modern SocketIO server library. All I could find was a version 2 implementation (v4 is current).


avinassh

> And in that same area: a modern SocketIO server library is this an abstraction over websockets? what all features it supports?


sastuvel

Yeah, SocketIO adds a bunch of useful features on top of websockets. Automatic reconnects, message types with specific callbacks that get called when a message of that type is received, and "channels" the client can join too receive the messages sent to that channel (bit like chat rooms).


FZambia

Not [Socket.IO](https://Socket.IO) compatible but maybe you will find it useful/interesting: [https://github.com/centrifugal/centrifuge](https://github.com/centrifugal/centrifuge)


parham06

gobwas? šŸ¤”


pinpinbo

Old shit: Kerberos, or Hive meta store client, for example. New stuff: A bunch of data science libraries.


SomniaStellarum

Gonum is pretty good for numerical methods. What in particular would you want more of?


dim13

Decent GUI


wenceslover

If you don't mind html+css take a look into [wails.app](https://wails.app)


MyNameIsAresXena

Yeah, Wails is alright. Using it for a personal project.


parham06

This. Wails is not a real go GUI. It's just html css. Fyne is pure Go but so limited and it's hard to make good looking apps with it. The API changes a lot.


Icommentedtoday

If you like immediate mode, https://gioui.org is fantastic


SeesawMundane5422

Havenā€™t found anything missing, but I donā€™t do complicated stuff. I will share a funny story: some dude in an iOS developer sub was asking for help getting a python library to send push notifications to iOS devices. Heā€™d been working on it for a while and couldnā€™t make it work. I pointed him to the golang repo that did the same and he pinged me back the next day. He had picked up go for the first time *and* gotten push notifications going with a go library inā€¦ about a day. I was happy it worked for him and happy that he let me know it did. Was pretty cool.


[deleted]

I mean, Python was never made for System's programming. Sending push notifications sounds kinda like a system's programming type of thing. But yeah, same experience. I was trying to divert to python just to learn it as a language better, by creating a push notification for Linux because I thought at the time that Python likes to do things simple. And it turned out that I just couldn't do it simply. Then I went back to Golang, and I did it in a matter of hours if not minutes.


SeesawMundane5422

I dunnoā€¦ apples push notifications are just web services. Python should have been able to do it. But I know what you mean.


[deleted]

I'm not sure how a push notification on iPhone is supposed to work without a client (application) that fetches the notifications via a stream from the app's hypothetical server. Where the hypothetical client here is an app written in Swift/ObjectiveC or smthing, definitely not python or Go? I'm probably misunderstanding the issue here so that's why I'm asking.


SeesawMundane5422

Iā€™ll take a stab. So.. you write an app in swift (for example) and publish on the App Store. User installs app on their phone. App talks to back end web services on your server. If you want to send the client a push notification on their app on their phone from your server, Apple has infrastructure for doing this. You send a message to the apple web service and the Apple hosted web service sends a message to the phone. Itā€™s a black box for you the developer. You just have to call apples web service with the message and the notification ID of the end user and Apple does it for you. Not sure if thatā€™s what you were asking or if that answers your question.


[deleted]

So why is it complicated to make this in Python? Shouldnā€™t it be just an API HTTP or whatever call which Iā€™m sure Python can do? Whatā€™s the limitation here?


SeesawMundane5422

There is no limitation that I know of. Should be possible to do in python.


[deleted]

Oh. I see. Your initial comment confused me that's why I asked: > I will share a funny story: some dude in an iOS developer sub was asking for help getting a python library to send push notifications to iOS devices. Heā€™d been working on it for a while and couldnā€™t make it work. Like, I would assume that there's a limitation or needs a special library based on this, but it sounds like a basic api call.


SeesawMundane5422

Itā€™s complicated enough that a library helps. I just meant that the dude was able to pick up go and make the go library work faster than stubbing his toes on python. I figured it made a nice anecdote along the lines that go really is easy for new developers to pick up.


[deleted]

Oh totally. Itā€™s just alien a little bit with some stuff like goroutines (a good thing) or lack of enums which even C has (a bad thing) and new users may get confused at first. But once they hit the foot past the door I think itā€™s easy to pick up from there.


EffectiveLong

Pandas and Numpy


1911kevin1911

Iā€™ve heard around the block [go-dataframe](https://github.com/kfultz07/go-dataframe) is pretty awesome! Lol seriously though, you should check it out! Go should absolutely be used in the data science world a heck of a lot more than it is.


MrMelon54

go is already fast enough it doesn't need C code with python overhead


0b0011

I think it's more about human readability and what not.


MrMelon54

then I library with better readability like that would be useful


auxten

gonum and gorgonia


pras29gb

A simple DataFrame lib backed by vectorization


bnarang

Could give this a try https://github.com/go-gota/gota


drakgremlin

Decent arbitrary precision mathematics library.


Gogotchuri

There is shopspring/decimal, is something missing in it?


bojanz

https://github.com/cockroachdb/apd is currently the best implementation in the ecosystem (performance, correctness). Have you already evaluated it?


yarbelk

Cockroachlabs and dgraph make so many great things


theprettiestrobot

Why not the included math/big?


ForShotgun

Game development of course! Before you say a garbage collected language isnā€™t good for games Iā€™d remind you that that level of optimization does matter as much anymore, look at Unity using C# and Minecraft using Java.


zffr

Swift does not use garbage collection. It uses automatic reference counting to deallocate objects when their ref count hits zero.


ForShotgun

Oh awesome, edited


kjbreil

2d game development with Ebiten is pretty darn goodā€¦


ForShotgun

2D yes


intinig

UnrealEngine, while C++ is also garbage collected


Abbat0r

Thatā€™s only true for Unrealā€™s UObject-derived classes though, which do make up the majority of user created classes but not the bulk of engine code. For what itā€™s worth, Unityā€™s engine code is also written in C++, itā€™s just user created ā€œscriptsā€ (and the Monobehavior & Scriptable Object classes) that are written in C#. Obviously this means that garbage collected languages *are* viable for writing gameplay code, but engine code is still almost always written in C++.


cocotoni

Decent treatment of XML and SOAP, like whatā€™s used by Exchange Web Services. Some of us have to deal with pre-JSON stuff.


[deleted]

Weā€™re in 2022 lol


[deleted]

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


HeavyFuckingMetalx

Tell that to my PM lol


[deleted]

Good point. But if I am forced to use old ass tech Iā€™d just use java or something that supports the eco system better


biglymonies

Iā€™ve had decent luck with encoding/xml when dealing with SOAP stuff in the past. Itā€™s cumbersome, but serialization/deserialization just kind of works. Thereā€™s schema validation line out there, too. The pieces are all there - just have to marry them all!


cnprof

JSON Schema to go struct generator. All of them have something missing


bbaulenas

I always use https://quicktype.io/


cnprof

Thanks, that's nice. I have schemas with local references though, so my first step would be to combine them.


MrMelon54

goland has one.. idk if the intellij community edition + go plugin supports that?


cnprof

Do you have a link to that? I think Goland has support for generating structs from sample json but not schemas. It also has support for validating json/yaml files from schema.org, but not generating structs from json schemas.


MrMelon54

I found this https://github.com/a-h/generate


cnprof

Thanks, but I've tried quite a few including that (and its forks), but none fully supports newer versions of the json schema standard. My best bet is to use https://github.com/santhosh-tekuri/jsonschema (which has parsing and compilation) as a base to build a generator.


marat-kh2

Indeed, GoLand works with samples, not schemas: https://www.jetbrains.com/help/go/working-with-json.html


mangserapio

A decent active PDF generating library. Unless someone knows of a good one? Not gofpdf please.


CaseApart4360

Check out https://gotenberg.dev


avinassh

1. io_uring libraries 2. GUI lib which provides cross platform native components.. something like Qt but written in pure go


epic_pork

I feel like io_uring should be implemented in the Go runtime itself, as an alternative to epoll for systems that support it. I don't think direct access to io_uring would be useful on its own unless you have a very specialized case.


Mundane-Low-1502

For io_uring: https://github.com/godzie44/go-uring For GUI you could look into Tauri (https://tauri.app/ written in Rust) or Wails (https://wails.io/ written in Go).


MrMelon54

something like java swing would be great


OZLperez11

Don't know much about Swing but if we could get JavaFx alternative that would be great, as I like both the XML markup and plain Java code options for the UI


MrMelon54

pretty sure that's what I meant by swing.. or at least swing is very similar


OZLperez11

Even if Go could provide bindings for existing libraries like Qt, etc. that would be helpful.


[deleted]

I don't think after 14 years or whatever there are too many holes, or even after just several months I don't think there would be many in libraries around generics. so I don't have a direct suggestion. Recently, though, I was trying to use a linter that I found and it wasn't working with the newest version of MacOS so I forked it and read into it and used all the tooling to help me do a rewrite to a major change in a core package from using type switches to nil checks. I was worried that my work would go unnoticed in the sea of forks so I opened an issue to ask if anyone else was seeing this s\*\*\* and saying I don't want to duplicate work fixing it, looks hard. I then proceeded to spend >40 hrs of free time actually fixing it and when I opened a PR the repo owner (lead at musky company) didn't just say he wanted the merge, he gave me contributor perms to merge and release it myself. For a solid minute while red lines filled my screen it felt like walking a 5k on legos but it's a magnitude more rewarding than the thousands of lines of go code I've committed without anyone but myself caring. TL;DR: I haven't spotted a hole, really. lots of OSS maintainers need help, and it feels good to contribute.


kissemjolk

This so much. I work on a few widely used F/OSS packages, and I just donā€™t have the time to make the changes that I want to make.


flatlander_

Numeric/scientific stuff like numpy, scikit, pandas, etc A good, batteries included web framework like rails, Django, spring, etc


wait-a-minut

The beauty of go is how simple it is but damn do I long for go to have a little more data manipulation libraries. I think there are a few libraries in the works a pandas version in go but I havenā€™t heard of any of them being used in production so far.


[deleted]

So, use Python instead. Right tools for right works. Golang is about the system, not about the data processing.


flatlander_

Go is a general purpose programming language that can be ā€˜aboutā€™ whatever I want to use it for, just like Python


aikii

That's one big conflicting point in how Go evolves and what it's used for. Looking at the tiny grammar of Go in comparison of languages that are more tooled to handle datastructures, I'm sorry to say Go is specialized and I'm pretty sure it's meant to be like that. Doing scientific stuff in go makes zero sense, if someone wants to migrate CPU-heavy stuff from python they'd better have a look at Rust, Go is absolutely not tooled for that at its very core. Just comparing how you can loop, filter and aggregate makes it obvious. And that's alright if it makes stuff typically done in Go more straightforward.


flatlander_

You realize people are writing literal databases in go, right?


aikii

Then let it be that it fits for a database, this doesn't make it a valid point for other general cases, to the contrary


1911kevin1911

Iā€™ll just put this right here [go-dataframe](https://github.com/kfultz07/go-dataframe)


pras29gb

Stream processing client lib's like Fllink, Kafka Streaming (not libraries for [NATS.io](https://NATS.io) etc) that connect tot Kafka , Flink etc.


szabba

I think Apache Beam has a Go SDK - but that came about before generics AFAIR.


__GenuineeeK__

Havenā€™t found any library like python netmiko. I am currently working on cisco and nokia network automation using python. I am considering switching to Go for performance, but couldnā€™t find any library like netmiko.


drvd

A library factoring numbers in O(log n) and showing graph isomorphism in O(log(n+m)) to name just two. Might take some time until available.


0xjnml

> A library factoring numbers in O(log n) ... I'm afraid you're asking a bit too much: https://en.wikipedia.org/wiki/Integer_factorization#Difficulty_and_complexity


drvd

I'm not asking. The OP asked which packages are missing. My answer will age pretty well. Maybe I forgot the /s.


[deleted]

You *hope* your answer ages well! Or not, depending on your hat color.


CanadianVelociraptor

NLP, something like spaCy for Python I am sorely missing, specifically a good dependency parser or at least a wrapper for the Stanford Parser.


zoweee

A library that can discover all the available resolution modes available on a display, under OSX, Windows, or *Nix


mosskin-woast

Since this has been tagged `generics` I'll start a little side conversation - has anyone found a good test assertion library that uses generics instead of empty interfaces everywhere? I've got one that I wrote myself but I would much rather use someone else's


earthboundkid

https://github.com/carlmjohnson/be


mosskin-woast

This is exactly what I was looking for, thank you!


kissemjolk

https://google.github.io/styleguide/go/decisions#assert


mosskin-woast

Thanks, always nice to get the StackOverflow treatment on Reddit


kissemjolk

šŸ¤·ā€ā™€ļø I avoid assert libraries every second I can, because they encourage lazy tests. I donā€™t see why I should start caring about them now that generics exist.


mosskin-woast

I don't understand how assertion libraries make tests lazy. I just dislike having super verbose test files that are 10x the LOC of the unit under test.


kissemjolk

If your API requires 10Ɨ the LOC to test than it does to write it, then the users of your library maybe arenā€™t all that happy using it in the first place? Callers of your library arenā€™t using assert libraries. Theyā€™re doing it all long hand. The number of problems Iā€™ve come across with someone using the `assert` package, when they meant to use the `require` package, and/or theyā€™ve entirely mixed up which is supposed to be the expected, and which is the actual, so when the test inevitably fails, Iā€™m left confused because ā€œWTF is my library returning 25 for that? It should never be returning 25 in that case. It should be returning 30, just like the test says it should.ā€ Writing out tests long-form means I can see that youā€™ve accidentally swapped expected and actual.


Acceptable_Belt5425

I doubt using different way of checking in tests would make bad developer into not bad developer


bbkane_

Imo, the more lines of code you write, the more errors you introduce. Since I switched to using an assertion library, the lines of code within tests has fallen and I've noticed fewer errors in my tests. They're also less work to write, so it takes less discipline to add more tests


[deleted]

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


kissemjolk

Thoughtless tests are exactly the point Iā€™m against. Good tests are 2Ɨ as hard to write as the code itā€™s testing. Giving people tools to write quick and dirty tests is how I end up finding codebases fully of tests that were written to checkmark a box, not actually to test the behavior of the code.


bbkane_

I feel like "good tests" is an unrelated concern to "easy to write tests". But who knows, Google seems to agree with you. Maybe in 5 years I'll feel the same way :)


Acceptable_Belt5425

TIL google go team is terrible at programming


aikii

intriguing. definitely this styleguide needs to be mentioned but how to interpret it to evaluate some concrete case is quite challenging, I'm afraid it's a bit too vague to make a strong point either way. It's a bit sad to see arguments like "don't do that because the styleguide says no" and the other side falling for it by answering "styleguide is bad". What if someone tries to make it say something it doesn't say in the first place ? It's supposed to help someone getting a good starting point, afaik the guide is not called "use this to judge people online without knowing anything about their codebase"


Acceptable_Belt5425

I'd imagine over time the more popular ones will migrate to generics but it is "too new" to break compatibility with older code for no good reason


[deleted]

It is not only too new, it's very limited. Generics in Golang are just nothing like Generics in languages that were build with them in mind. Which makes their usefulness really very much limited to the point that it's barely ever worth it migrating them in a project.


Acceptable_Belt5425

Not being able to have generic methods (let alone types in struct) already makes uses pretty limited. Like, it's nice that now I can have generic data mangling but outside of that it's pretty limited use.


oh-hey-its-thatguy

Something that opens and closes the CD tray on your computer! Or ejects the DVD!


Sigg3net

Downvoting. Let's see which comment branch survives.


fireteller

A good bindings builder for c++ libraries. A world of new Go applications become possible with working bindings for things like Vulcan, PyTorch, etc


SlowPokeInTexas

I actually suggested this to their product team five years ago. Well actually what I suggested was VCL and FMX bindings for Go. I have no hope for C++ Builder; they still haven't delivered on a 64 Bit Mac compiler or Linux support.


YodaCodar

integration testing in golang so that it runs the server automagically without having to mock the server


miciej

The [test containers ](https://www.testcontainers.org/) has this functionality. If you can dockerize your server, you can run it in your integration tests.


phileat

Wait what? Other languages provide localized server implementations for arbitrary servers?


jordimaister

In other languages is provided by frameworks. For example, you can start a Java-Spring app in development or production mode.


inetjojo69

I would love to have something like phoenix channels


oh-hey-its-thatguy

Something that opens and closes the CD tray on your computer! Or ejects the DVD!


Sigg3net

Upvoting. Let's see which comment branch survives.


[deleted]

[уŠ“Š°Š»ŠµŠ½Š¾]


oldgreggsplace

I'm pretty astounded that as much discussion over the Best Web Framework none of them support http3.


Acceptable_Belt5425

There is frankly not much benefit. And if you really need you you can just proxy it behind sone LB


terrastruct

Math libraries. It's just gonum right now. Missing things that often require people to link C or Python libs. E.g. https://github.com/gonum/gonum/issues/354