I am from node.js ecosystem.
Golang has released its module system finally and I have read some articles about it:
https://blog.golang.org/using-go-modules
https://github.com/golang/go/wiki/Modules
But, after that, I still didn't find a place like npmjs.com where I can find available go modules.
There is no central repository yet, but note that the module support is still experimental in Go 1.12. It will be enabled by default in Go 1.13 (scheduled for August 2019).
Check out The Go Blog: Go Modules in 2019.
For publicly-available modules, we intend to run a service we call a notary that follows the module index log, downloads new modules, and cryptographically signs statements of the form “module M at version V has file tree hash H.” The notary service will publish all these notarized hashes in a queryable, Certificate Transparency-style tamper-proof log, so that anyone can verify that the notary is behaving correctly. This log will serve as a public, global go.sum file that go get can use to authenticate modules when adding or updating dependencies.
We are aiming to have the go command check notarized hashes for publicly-available modules not already in go.sum starting in Go 1.13.
and
Module Discovery
Finally, we mentioned earlier that the module index will make it easier to build sites like godoc.org. Part of our work in 2019 will be a major revamp of godoc.org to make it more useful for developers who need to discover available modules and then decide whether to rely on a given module or not.
Big Picture
This diagram shows how module source code moves through the design in this post.
There is no central repository for Go modules. As long as you follow the conventions for publishing Go packages (see PackagePublishing), the go tools will be able to fetch your package/module, no matter where you published it.
In order to discover what is already out there in the Go universe, a good starting point is Awesome Go, a curated list of awesome Go packages/modules.
https://search.gocenter.io can be used to search for Go modules, know more about popularity of a module version and even help module authors connect with their consumers. This is GA since end of January 2019 and globally available.
I had the same question. If you start off with the built-in packages (https://golang.org/pkg/), and you follow some non-obvious links, you eventually end up here:
https://pkg.go.dev/
Related
Julia has a package for binary decision diagrams called CUDD_jll available from JuliaHub. The package is able to install and compile on the Apple M1 architecture. It does appear to install and compile on macOS v13 running Julia v1.82. But the user interface from an older package CUDD does not appear to be compatible with CUDD_jll.
What is needed is a test or examples revealing user commands for initializing cudd, defining logical variables, and the basic operations of AND, OR, NOT.
Does anyone have such information they will share?
_jll packages are generally not meant to be used directly, they're backend dependencies that will be automatically installed when you add a package that uses them.
In this case, CUDD.jl is the package you want to install and work with. That will automatically install CUDD_jll as a dependency and use it. Actually, the current CUDD.jl doesn't yet use CUDD_jll as a backend. It instead does its own download of the CUDD library, from a source that doesn't provide M1-compatible binaries. CUDD_jll is a recent effort to change that. It does provide binaries for the M1 architecture, but is yet to be merged in as a backend.
In the meantime, you can try ] add CUDD#update-to-yggdrasil to directly add the branch that uses CUDA_jll as the backend, and see if that works for you. (Once the PR gets merged, you can remove this branch-specific dependency and ] add CUDD like before.)
The Apple M1 system is not compatible with CUDD. My mistake, sorry.
I am new to Go and trying to create my first program. Following the various getting started & tutorials I create a new module, which for my purpose needs to have a dependency on this module:
github.com/timescale/promscale#0.6.2
My problem is that the module has dependencies that have not "properly adopted" the semantic versioning approach.
go list -e -m all
...
k8s.io/client-go v12.0.0+incompatible
...
reports 37 such modules... so contacting the module author to have them adopt SIV, as I have seen suggested, will not be an option.
Am I missing something, or should I simply completely give up on using modules for this new project?
Are Go modules really usable today given third party "incompatible" modules?
Yes.
Am I missing something
Maybe: This "+incompabtible" is not a sign of failure.
or should I simply completely give up on using modules for this new project?
No, of course not.
Thanks for the answers and comments, it seems that:
New project should use modules, +incompatible dependencies will come up but that is fine
This FAQ entry has it right, just read the first 2 lines and keep "Additional Details" for a rainy day
go list -m all won't behave as described in all the tutorials if +incompatible dependencies exist, it will choke on the first incompatible module instead.
go list -m -e all seems to work as expected.
If you are using Goland, using GOFLAGS=-e seems to make dependency resolution work despite +incompatible modules. This may well have side effects that I am not aware of.
In a past question, Is there a CAS for Pharo?, I asked about a Computer Algebra System for Pharo, and people pointed to Domains, a port of Mathematics from CUIS smalltalk, that is part of PolyMath project. I suceeded installing PolyMath in Pharo 8, running the following code in the playground, as adviced in https://github.com/PolyMathOrg/PolyMath:
Metacello new
repository: 'github://PolyMathOrg/PolyMath:v1.0.2';
baseline: 'PolyMath';
load
The problem is, it appears Domains is not installed by default with PolyMath, as I didn't find the corresponding classes in the class browser, and the Domains subpage has no similar instructions on installation.
EDIT (March 2, 2021): I tried to follow the sugestion of EstebanLM, and load from iceberg, having PolyMath installed beforehand. But I only see the following packages in the iceberg screen:
It is in a separate github repo (PolyMathOrg/Domains), without a baseline. So you need to just clone the repo from github in Iceberg, and then load the packages in the right order from hand. Iceberg will complain if you try to load a package with unloaded dependencies (Mathematics-Kernel is a good starting point), and you can just reload after loading the missing dependency.
If you note down the needed loading order, you can provide a PR with a baseline
Once you load polymath, you will have all packages available to load.
The tool used to load/save packages in Pharo is called iceberg (is a git client). You can find it in the menu "tools" in Pharo 8 or in "browse" in Pharo 9.
I am getting these sort of errors the past couple of days:
Notice: /Stage[main]/Ymd_apache2::Drupal::Install::Composer/Exec[composer_install_drupal_for-my.domain.tld]/returns:
The "http://repo.packagist.org/p/icecave/parity%24e12bbae9986909655d8294143107cb751f4df60f2ac1f45e8254014c7873abd7.json"
file could not be downloaded: failed to open stream: Cannot assign requested address
My question is this: Does there exist an open source tool I could install in my cluster which would serve as a repository for composer (perhaps js as well) packages and which would proxy my requests to the outside world, caching successful pulls for required packages and preserving them for future deployments?
I am not budgeted for a jfrog license at this time.
So far, my research has found these two articles which seem relevant, but I am concerned that (1) so little seems to have been written about either of these; (2) so few commits seem have been offered to the repo, no releases are tagged; (3) its been many six some years since one of these articles was written.
Is either of these going to provide me a stable solution? Or additional head-aches?
https://code.tutsplus.com/tutorials/setting-up-a-local-mirror-for-composer-packages-with-satis--net-36726
https://github.com/isaaceindhoven/velocita-proxy
Any relevant experience with these would be appreciated.
Thanks,
-- Hugh Esco
Check out satisfy.
provides composer repositories via satis
has a web GUI
can serve as a "cache" / proxy
We used it in a past project for similar purposes. Worked great.
It is well maintained by one of the greatest developers I ever had the pleasure to work with #ramunasd.
You should be able to deploy satisfy into your cluster with ease.
Developer of this project chiming in:
https://github.com/isaaceindhoven/velocita-proxy
The project is relatively new but more and more projects are starting to use it. Feel free to try it out, and if you run into anything make sure to raise an issue on GitHub. Heck, maybe even write a small article about it if it fit your needs? ;-)
Hi I want to import a 3rd party library to GO playground, I saw an answer for this question: https://stackoverflow.com/a/27813778/6638204 but it said that this can not be done, but the xiam/go-playground library on github states that it can do this. I tried using it but I did not understand what should I exactly do. I successfully installed the library and used it to run programs that do not need third party libraries. but I did not get how can I import a third party library. ps: I have docker installed in my machine
The answer is still the same: you can't do that on the "official" Go Playground (at https://play.golang.org/).
If you or someone else runs a custom, modified version of the Go Playground: then the answer is you can do there whatever is allowed, which may include the usage of external libraries which the custom engine may go get prior to compilation and execution.
Also see related question: Which packages may be imported in the go playground?
You might be able to do it since May 14th, 2019
See this tweet (from Brad Fitzpatrick)!
The #golang playground now supports third-party imports, pulling them in via https://proxy.golang.org/
Example: https://play.golang.org/p/eqEo7mqdS9l 🎉
Multi-file support & few other things up next.
Report bugs at golang/go issue 31944, or here on the tweeters.
But that means you have published your package deliverable in such a way it is reference by the Go proxy.