Hacker Timesnew | past | comments | ask | show | jobs | submit | drewolson's commentslogin

Reviews are very exciting, but seem to be unable to fit the following use case:

I want to setup a repo such that a subset of collaborators (or organization members) can merge reviewed PRs to protected branches. I want the rest of the users to be able to create new branches and submit PRs from them, but _not_ to be able to push to protected branches. They should _only_ be able to land code in protected branches via reviewed PRs (via the merge button).

Is there a way to achieve this now that I'm missing? Gitlab's more granular user roles + permissions allow this.



Am I understanding correctly that this proposal again side steps / ignores pinning dependencies for libraries? To me, this is the biggest current problem in the ecosystem and, as a library author, this doesn't solve any of my issues. I hope I misread somehow.


With this scheme libraries can vendor their dependencies, if necessary.


Can you reference the part of the proposal that states this? I'm reading the following points:

> $GOPATH/src/foo will be imported as foo by non-main package $GOPATH/src/mypkg/p.

> $GOPATH/src/mypkg/external/foo will be imported as foo by a non-main package p anywhere, when p is being built as a dependency of command $GOPATH/src/mypkg/c.

It seems to me this is saying that libraries will use external packages only when built as a dependency of a main package. Again, this means library authors are out of luck.


There are two proposals.

You seem to refer to the Google doc proposal that was linked to in the first message of the mailing list thread several months ago.

The link on hackernews points to an answer by Google that was written just a few hours ago that instead "propose" the following:

> If there is a source directory d/vendor, then, when compiling a source file within the subtree rooted at d, import "p" is interpreted as import "d/vendor/p" if that exists.


Ah, thanks.


You're pushing the Go ecosystem in this direction:

    https://spot.livejournal.com/312320.html


How is this different from godep[1] other than being the root of its own GOPATH and having a different naming convention for the location of vendored dependencies?

[1] - https://github.com/tools/godep


Author here. You're right. I removed references to "pure" in the article.


Does jitpack currently support repositories in Github Enterprise?


Currently not. Actually you are the first to ask and it sounds like a great feature:) most likely that would mean you host jitpack on premises. It's something we don't provide yet but it is on the road map.


Wonder how high the usage would be. If you have github enterprise setting up Nexus and having build process publish to it seems easier than this build server.


This whole "framework fatigue" thing is going reductio ad absurdum. Convenience is not bad. _Too_ much convenience traded for opacity is bad.

As someone with a Phoenix app running in production, I can tell you that this framework hits the sweet spot of providing lots of value without requiring the user to learn too much. The abstractions it provides, especially the router and rendering layers, are very welcome. And I'm saying this from the perspective of someone who has built a few smaller vanilla plug applications.

Let's not throw the baby out with the bath water here just because rails went a little too far with the magic.


I'm confused, you're questioning the author's sincerity in expressing his own enjoyment of pair programming?

I deeply enjoy pairing. I know quite a few folks that do as well.


Ok, fine then :) I admit I've never met anyone so genuinely enthusiastic about pair programming, so it sounds unusual to me.


Give it a go sometime. It's the most fun I've had at a job.


I think the point is, if you write map like this you might as well be using a dynamically typed language in the first place because you're deriving no benefit from the type checker. In fact, you're just using casting to completely circumvent it.


Of course. If the main cornerstone of your project is map it's probably not the greatest idea to use Go, but if you're using Go for other reasons and happen to need a quick map function there's no reason to change languages just because Go doesn't have a standard library implementation


But then it's pretty odd to use Go because you like the language, while not being able to design a proper map().

And map() btw is only the tip of the iceberg in functional programming. But then again, Go is not a functional programming language.


Author here.

From what I've read/seen, the go blocks are lightweight thread-like processes multiplexed onto a thread pool. You may be correct about using Thread/sleep, ideally I would have used (timeout ...) and then pulled off the channel. However, I didn't want to introduce the concept of channels too early in the post, so I felt Thread/sleep worked as a compromise.


Thread/sleep will block the entire thread. The thread pool could create more threads, but core.async uses a fixed thread-pool, so, yeah, don't use Thread/sleep in a go block. A timeout channel would be the way to go, or, you can use an alternate core.async implementation, which is a (small) part of the Pulsar project: https://groups.google.com/forum/#!topic/clojure/1xxxTti6Vi0 (I'm the main author)

We will have full API and semantic compatibility when version 0.2 is released next week. Pulsar also has cluster distribution and an Erlang-like actor framework.

Because Pulsar uses instrumentation at the bytecode level, you have more freedom within Go blocks. You wouldn't use Thread/sleep in the Pulsar implementation, either, but Strand/sleep will do the job. It detects whether you're in a go block (implemented as a fiber in Pulsar), in which case it suspends the fiber but doesn't block the thread, or within a normal thread, in which case it will simply call Thread/sleep.


Yeah, Thread/sleep isn't quite what you want here:

(time (let [c (chan), n 1000] (dotimes [i n] (go (Thread/sleep 50) (>! c i))) (dotimes [i n] (<!! c))))

"Elapsed time: 8412.25733 msecs"

(defmacro gosleep [millis] `(<! (timeout ~millis)))

(time (let [c (chan), n 1000] (dotimes [i n] (go (gosleep 50) (>! c i))) (dotimes [i n] (<!! c))))

"Elapsed time: 91.278469 msecs"

ETA: for comparison, here's what happens if you actually make 1000 system threads:

(time (let [c (chan) n 1000] (dotimes [i n] (thread (Thread/sleep 50) (>!! c i))) (dotimes [i n] (<!! c))))

"Elapsed time: 4183.669835 msecs"


Thanks (and thanks to pron). I've updated the post to include a warning against using Thread/sleep in go blocks for "real" code.


I feel silly though that this is the one thing I've commented on, so:

This is an awesome post, thanks for it ^_^


Yah, for demo purposes of wanting to show something taking awhile thread/sleep is very convenient. I have no idea, time.sleep in golang might actually block a real thread too. I'm just curious if blocking in a go block could starve your thread pool or if there is some magic being done by the macro to even correct for that?


There isn't. Thread/sleep will block the thread and potentially starve your thread pool. Be careful not to do it.


I noticed you're using tornado but appear to be using the standard (non-evented?) python redis library. Does using this library block tornado's event loop? Did you look at other tools like brukva[1]?

[1] https://github.com/evilkost/brukva


brukva looks interesting, i'll check it out. thnx.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: