News for hackers. Stuff that matters.
Re:GitHub’s engineering team has moved to Codespaces by sammorrowdrums on Wednesday August 11, 2021 @02:11PM (#28145556)
I’ve very recently become a GitHub engineer, and I got pre-access to the beta too and I must say - my absolute favourite thing about CoseSpaces is being able to dev on a repo you don’t work on regularly and probably wouldn’t contribute if it meant having to set up environment etc. It’s really nice to just dip into a project with a working environment in seconds, make your PR and then move on.
Re:GitHub’s engineering team has moved to Codespaces by lilyball on Wednesday August 11, 2021 @04:34PM (#28147393)
This is a problem that can be solved without Codespaces too. For example, if GitHub were to embrace Nix, every project could have a shell.nix file for all of their dependencies, and the new engineer bootstrap script that installs Nix could then just add an internal Nix binary cache (or use Cachix). Any time the shell.nix changes a GitHub Action could push the closure to the binary cache.

With this setup, you can use whatever local tool you want and, as long as environment variables are respected, they’ll just work. The only requirement on your end is to either run nix-shell first, or to use direnv and ask it to load the nix env for you.

The downside is you still are compiling locally, so you still need sufficient CPU/memory resources, but that’s it.

Unfortunately most companies still aren’t paying any attention to Nix.

Re:GitHub’s engineering team has moved to Codespaces by stnmtn on Wednesday August 11, 2021 @04:55PM (#28147608)
-insert comment about that hacker news comment about how dropbox could be replicated with linux here-
Re:GitHub’s engineering team has moved to Codespaces by neilparikh on Wednesday August 11, 2021 @06:33PM (#28148743)
I'm not sure that comment applies here. The suggest Dropbox replacement was more complicated than Dropbox, and had more steps. On the other hand, Nix is about the same amount of complexity, and same number of steps for the developer.

Yes, the parent comment looks a bit complicated, but that's just the one time setup, not something that needs to be done by every developer. And Codespaces will require some of that setup too; it's not like it'll magically know what packages and dependancies your project requires to build.

Re:GitHub’s engineering team has moved to Codespaces by syspec on Wednesday August 11, 2021 @07:25PM (#28149444)
- I see comment about iPod, no wireless, less space than a nomad. lame
Re:GitHub’s engineering team has moved to Codespaces by sagichmal on Wednesday August 11, 2021 @07:59PM (#28149821)
Nix is a prototype-grade implementation of a very narrowly useful model of computation.
Re:GitHub’s engineering team has moved to Codespaces by imron on Wednesday August 11, 2021 @06:59PM (#28149089)
Does it take 10 seconds to spin a new one up?

If not, then it misses the main benefit outlined in the article.

Re:GitHub’s engineering team has moved to Codespaces by sammorrowdrums on Thursday August 12, 2021 @02:13AM (#28152590)
Yeah, it’s really fast. In fact before I joined, I also set up a default CodeSpaces environment for my own repo and then I was up and running in only a few minutes, and that was the first time so I was learning and reading the docs. I could then set up all subsequent new CodeSpaces to start in seconds.

But yes, once a project commits to using CodeSpaces dev environment (even and especially ones with large code / heavyweight environments) there is a lot that can be done to optimise the spawn up time, that cannot be done as easily for local dev.

Re:GitHub’s engineering team has moved to Codespaces by miohtama on Wednesday August 11, 2021 @03:33PM (#28146623)
How does it work when you work on several packages at once,e.g. a lib and an app using it? Is it a monorepo, do you configure both dependencies to be locally editable copies, etc.? For example patching an upstream open source project that is a blocker for your app.
Re:GitHub’s engineering team has moved to Codespaces by dcreager on Wednesday August 11, 2021 @07:59PM (#28149826)
You can also create a separate codespace for each package if they’re independent of each other and you don’t need to test things in the downstream repo in a way that requires your changes being available “locally”.
Re:GitHub’s engineering team has moved to Codespaces by dcreager on Wednesday August 11, 2021 @07:58PM (#28149799)
The codespace is backed by a regular Linux VM, so we can clone the upstream repo and edit/compile/debug/etc in that just like we would locally on our laptops and workstations.
Re:GitHub’s engineering team has moved to Codespaces by mynameisvlad on Wednesday August 11, 2021 @02:22PM (#28145710)
This was my first idea for introducing Codespaces to my team -- set up the infrastructure to be able to spin up a codespace on our less-used component repos where people don't have a local dev environment prepared.
Re:GitHub’s engineering team has moved to Codespaces by fortyrod on Wednesday August 11, 2021 @05:27PM (#28148011)
I'm a big fan of capturing the toolchain(s) with the repo. I have had to hack this for embedded toolchains out of necessity for years (decades?) using VirtualBox on a Mac. I still have a Windows 95 VM sitting around containing a copy of Keil or something that is the only known way to rebuild the code for a certain weird-ass micro from some consulting gig in the late 90's. I wonder if it still boots? Hopefully, that customer forgot about me...
Re:GitHub’s engineering team has moved to Codespaces by wnevets on Wednesday August 11, 2021 @11:57PM (#28151706)
> . It’s really nice to just dip into a project with a working environment in seconds, make your PR and then move on.

That sounds incredibly useful actually. Is that the main sales pitch for codespaces?

Re:GitHub’s engineering team has moved to Codespaces by sammorrowdrums on Thursday August 12, 2021 @02:08AM (#28152561)
Well I use them for regular dev in work too on especially larger repos with heavier toolchains, and both are big plusses for me personally!