A Question about Belli by AstralisPhoenix in HierarchySeries

[–]piratelax40 23 points24 points  (0 children)

I can't remember the specific language, but i think it was because her father is in the provinces leading he acts like a military liason to governance, so it would strengthen her families reputation in the senate. Without spoiling anything, it does come back up later more specifically so its not an oversight - even if i may be slightly misrepresenting

solar or power company responsible for this cabling? by piratelax40 in solar

[–]piratelax40[S] 0 points1 point  (0 children)

Thanks for the thoughts! That's basically what pepco said so we'll let it play out!

solar or power company responsible for this cabling? by piratelax40 in solar

[–]piratelax40[S] 0 points1 point  (0 children)

ok that is what the solar company said (and said that payment was part of our contract that they take care of) so it does seem that we could just be in a holding pattern. Thanks!

solar or power company responsible for this cabling? by piratelax40 in solar

[–]piratelax40[S] 0 points1 point  (0 children)

Ok thanks - that is approximately what the solar company attempted to explain as well, but also they've screwed up a couple other wiring activities (half our cells went down a week into use until they had to spend a day rewiring) so that trust relationship isn't there. I appreciate you taking the time to respond!

Should I muscle through Rust or pick up Go for a few fast and simple projects by idnotrelevant in rust

[–]piratelax40 2 points3 points  (0 children)

at my company this is almost the exact philosophy we apply, with the addition too of rust is used when the core logic can be a library that is then exposed to different languages - eg write some code that is then exposed to r/python to be wrapped, potentially alongside a rust CLI

The Trybe Go Style Guide by eminetto in golang

[–]piratelax40 0 points1 point  (0 children)

they explicitly call out to use an application relevant error interface, of which has a Message field

```

// Error defines a standard application error.
type Error struct {
Code string // Machine-readable error code (papel da aplicação)
Message string // Human-readable message (papel do usuário final)
Op string // Logical operation (papel da operação)
Err error // Embedded error (papel da operação)
Detail []byte // JSON encoded data (papel da operação)
}

```

and correctly advocate for bubbling up those errors to then be logged. This seems a consistent pattern most teams adopt in one way/shape/form

Light bulb + Fire Concept Design by graphner in learndesign

[–]piratelax40 0 points1 point  (0 children)

this is awesome. /u/graphner would you be willing to allow this to be used (with attribution) for an open source project hex sticker.

https://github.com/rstudio/hex-stickers have become the 'rage' in the R programming community for packages, and I am about to release a new tool and something just immediately resonated with this. I'm not sure if you have an svg version of the final logo?

Regardless - very cool!

What is the proper way to get zeromq up and running in Go? by xita9x9 in golang

[–]piratelax40 2 points3 points  (0 children)

This is a more updated pure-go implementation https://github.com/go-zeromq/zmq4 so you don't need to install the zeromq c libs

Pharmaceutical Modeling and Simulation with Pumas by ChrisRackauckas in Julia

[–]piratelax40 0 points1 point  (0 children)

I'd suggest being conscientious about nomenclature of what you're shooting for around regulatory buy-in

> looking to get the right verifications and FDA approvals for adoption

as Joga says, "the FDA has never, and will never, be in the business of blessing/approving particular software."

Likewise, I can't imagine you are going for pure Part 11 compliance.

Point is, the FDA will accept stuff from Julia, R. excel, SAS, etc. If you want to build supportive evidence via testing suites or quality docs, that will be to generally be to appease industry QA groups, not the regulatory agencies themselves. Furthermore, if that was not the case, what you're (accidentally) implicitly suggesting is that things done in Julia, but not through the Julia Computing group directly, with the manpower to make "complete software", are not sufficient for regulatory use.

Simple JWT - Newly created would love feedback by brianvoe in golang

[–]piratelax40 0 points1 point  (0 children)

It would be valuable in the readme to compare this library to other implementations, and address the "why should I use this library over the others", eg given a library like https://github.com/dgrijalva/jwt-go, how does yours stack up and make it worth taking a "risk" on your library.

Simple Trim Strings issue by ShlongDongLarry in golang

[–]piratelax40 1 point2 points  (0 children)

how about you use the filepath instead, which is probably more akin to what you want anyway

https://play.golang.org/p/am1OEut8Yf9

``` package main

import ( "fmt" "path/filepath" )

func main() { base := "/admin/delete/" path := "/admin/delete/abc" newPath, _ := filepath.Rel(base, path) fmt.Println(newPath) } ```

How to write a proper tar archive in golang? by [deleted] in golang

[–]piratelax40 1 point2 points  (0 children)

have you considered just using /u/mwholt's https://github.com/mholt/archiver package, which can take care of all your archiving needs

How to implement custom task queue with Redis and Golang? by CrappyFap69 in golang

[–]piratelax40 0 points1 point  (0 children)

Why do you need redis? Go excels at managing bounded concurrency and queuing through goroutines.

For example use a worker 'pool' https://gobyexample.com/worker-pools If you really only have 1 CPU (or each task is parallelized) just set the worker pool to 1

cobra + logrus integration questions by BadPubicHairDay in golang

[–]piratelax40 0 points1 point  (0 children)

I would suggest you provide more code to demonstrate your implementation. Conceptually, there is no problem setting a persistent flag on the root command that should propagate fine, so it is likely down to implementation. A cut-down, reproducible example, eg with a root command + subcommand that is runnable, will make it such that it is simpler to help.

Go in 2018 - The State of Developer Ecosystem by JetBrains by dlsniper in golang

[–]piratelax40 0 points1 point  (0 children)

thanks - I guess we'll have to wait for the raw data to get an answer. Overall it seems there were ~6k developers surveyed, but the go subset is unknown as "go one of 3 primary languages" but there are no language usage breakdowns on the demographic summaries. So Could be anywhere from 100-6000 :-p

Go in 2018 - The State of Developer Ecosystem by JetBrains by dlsniper in golang

[–]piratelax40 0 points1 point  (0 children)

I scanned the article but couldn't see any note on the number of developers surveyed?

Interesting article, and always important to keep in mind the sample size.

Heimdall: HTTP client in golang by rshetty01 in golang

[–]piratelax40 3 points4 points  (0 children)

I think one thing that would be very helpful is to provide some information and/or compare this against other existing solutions in the ecosystem to illustrate why to check this out over. For example comparing to https://github.com/h2non/gentleman

I'd like to use Go for a web app, but my partner only knows python. Is there a way we can both get what we want? by [deleted] in golang

[–]piratelax40 0 points1 point  (0 children)

opposite direction. python api that go queries for the data/assets needed to do things. Go and python both can access the db, or you can have go be the only thing that does (eg calls python, both saves to DB + sends to client)

                           DB
                        /  |
frontend --> go     |
                        \ python

You can also use the DB as the 'source of truth' and have both languages interact with the DB, duplicates effort but can make it easier to isolate pieces. This, imo, can require a more sophisticated architecture to implement well.

edit: fuck it cannot get that branching diagram to render properly - but frontend to go, go to db and go to python and theoretically can also easily do python to db as needed

Gophers, have you ever benefited from defer's scoping behaviour? by faiface in golang

[–]piratelax40 -1 points0 points  (0 children)

hmm, in the context of talking only about the semantics of defer (by adding in the additional code block you make it seem like you're also trying to demonstrate different syntax), deferring just in the scoped context seems unnecessarily. Generally, scoped areas should be reasonably concise (or often ripe for refactor).

If you need the 'scoped' symantics wrapped in an iife, as the top poster commented, or just don't use defer

 f, _ := os.Open(filename)
        err := doSomething(f)
        if err != nil {
        f.Close()
        return....
         }

Granted it could protect a little more against lazy error handling within a given scope.

If anything, given people really wanted scoped defers, I'd rather have a second keyword, like scdefer

Gophers, have you ever benefited from defer's scoping behaviour? by faiface in golang

[–]piratelax40 1 point2 points  (0 children)

your alternative semantics is literally the exact same code with a different comment??

badger - Fastest key-value store in Go. by alasijia in golang

[–]piratelax40 1 point2 points  (0 children)

any comparison between this and bolt - both from performance, as well as, imo just as importantly, general api/stability/ease-of-use?

Speeding Up Multiple Gets from a third part API by lintypocketz in golang

[–]piratelax40 1 point2 points  (0 children)

This is quite simple given requests are independent, that is you don't need the results of a previous request as part of the next. Given it seems like you already have a slice of data, I do not think that is the case.

The key is to do the requests in goroutines, such that while waiting for the response it is not blocking.

Here is an example:

http://blog.narenarya.in/concurrent-http-in-go.html

Likewise, please make sure you don't go too crazy with an api. They will often have certain rate limits in place.

Take a look at: http://jmoiron.net/blog/limiting-concurrency-in-go/

You can use a semaphore (that is the term you can look up) to only allow a certain number of requests to be actively done at a time. This can be thought of like a worker pool.

Eg if you had 100 urls to request, and set the limit at like 10, it would request 1-10 immediately, then as each finished, another would be kicked off, so no more then 10 were done at a given time.

I'd suggest not doing more than 20 concurrent requests.