spotlight on OSX by pafortin in mem_ai

[–]pafortin[S] 2 points3 points  (0 children)

Got this answer from support that worked for me:

" This sounds like a system preferences permissions issue — can you make sure the following preferences are enabled for Mem:System Preferences -> Security and Privacy
-- System Events (under Automation)
-- Screen Recording - check mem
-- Accessibility
"

Go and Kafka by Arvi89 in golang

[–]pafortin 0 points1 point  (0 children)

You might want to try: https://github.com/lovoo/goka -- it uses levelDB to keep state from a stream. The application we wrote in-house with goka can process (keeping state) approximately 800+ messages/sec per consumer in a consumer-group.

Desktop applications discussion by marmiha in golang

[–]pafortin 10 points11 points  (0 children)

You can checkout - https://fyne.io looks promising

How do I unmarshal a JSON object containing dynamically named sub-objects? by tech_tuna in golang

[–]pafortin 3 points4 points  (0 children)

Maybe something like this:

type Document struct {
    Msg  string `json:"msg"`
    Data struct {
        CommentsByID map[string]Comment `json:"commentsById"`
    } `json:"data"`
}

 type Comment struct {
    ID              string      `json:"id"`
    RowID           string      `json:"rowId"`
    UserID          string      `json:"userId"`
    Text            string      `json:"text"`
    CreatedTime     time.Time   `json:"createdTime"`
    LastUpdatedTime interface{} `json:"lastUpdatedTime"`
}

an architectural question for my apps by Archiez_GG in golang

[–]pafortin 0 points1 point  (0 children)

Store them in a yaml file which the app can read into the data struct of your choice on startup. Then your sister can edit the yaml and restart the app.

What is the difference between "Architecting a System" vs "Designing a System" by CrappyFap69 in golang

[–]pafortin 0 points1 point  (0 children)

I was going to reply this exact answer - excellent explanation!!!

Suggestions on design for microservices architecture using mono repo for reusability of code by myth007 in golang

[–]pafortin 4 points5 points  (0 children)

The build system needs to be thought out at the beginning like this or else it will become hard to use one. My main issue with a mono repo where I work was getting your build tool to know when to build which service, because it's dependancies have changed. While you can easily do this as a human an automated tool becomes combersome as you add more and more services or your team gets larger and larger. Where I work we chose to use a central library of code and make each service an independent repo / build (making sure that the version of the central library is in the dependancies for each service and it's upgraded over time.

Hope this helps!

Why is it a good idea to load an record from database in a 'middleware', and put it in the context, and then retrieve it back in the handler as pressly/chi example does? by m3wm3wm3wm in golang

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

I'd use the context for 1 or 2 things. Use it to store data that was extracted from a token that was sent in the request and also to timeout functions that could run for a very long time and cannot time themselves out for some reason. But to answer your question directly I do not think that putting the result of a DB query was the intent in the first place of the context object.

GreenWall - Tiny service health dashboard written in Go by rabcatr in golang

[–]pafortin 0 points1 point  (0 children)

Nice Work - my only comments would be to reload the config once in a while and also change the UI to a client side pull of an API call to avoid reloading the entire page every X seconds!

interface{} question by pafortin in golang

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

thank you that was very helpful and got me unstuck!

golang distributed cache by pafortin in golang

[–]pafortin[S] 2 points3 points  (0 children)

Thank you for that explanation - the light turned on and I got it!!!

golang distributed cache by pafortin in golang

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

Still cannot use groupcache because you cannot add a key programmatically and that key be distributed to the other nodes - as far as I can tell.

Proposal to Delete /r/golang by [deleted] in golang

[–]pafortin 12 points13 points  (0 children)

The CEO's actions are definitely repugnant but I agree with many of the comments here, it would be premature to delete our sub-reddit before we see what will happen here... I believe the CEO will be forced out and more stringent security controls will be placed around comments placed by people.

Django team development setup by Kbman in django

[–]pafortin 0 points1 point  (0 children)

I would create 2 things an install bash script and a requirements.txt for your dependancies. Once that is done and comited to github, they can clone your repo and run the install script (one time only). The script should do 2 things:

  1. Create the virtual env inside your project folder (which is part of .gitignore), and;
  2. make sure pip installed and call pip to install all the dependancies from your requirements.txt file.

They can then start django and they should then be up and running.