Earlier quoted context omitted.
The copyright of the thing Googlers build on their oswn time are usually owned by Google and so it ends up on the Google org if they want it on GitHub. They usually have a disclaimer like "this is not a official Google product..."
This isn't correct: if a Googler writes some code from scratch, which is unrelated to their work, on their personal time, and using their personal laptop... then it's definitely not owned by Google. There could be gray areas where code ownership could be disputed, but in general your employer owns only the intellectual property it paid for. Source: I'm a Googler (until next month).
Zx 3.0
51–60 of 169 posts
Re: Zx 3.0
#52I personally find Ruby's built-in shell features more ergonomic: `cat package.json | grep name` branch = `git branch --show-current` `dep deploy --branch=#{branch}` if $?.success? [ "sleep 1; echo 1", "sleep 2; echo 2", "sleep 3; echo 3", ].map { |cmd| Thread.new { %x(cmd) } }.each(&:join) name = 'foo bar' `mkdir /tmp/#{name}` if $?.success?
Re: Zx 3.0
#53Zx is good if JavaScript is only language you know. If you have ability to program or learn other programming languages, Python with packages like Shell and Plumbum might be better choices for shell scripting tasks that outgrow shell. - Python code with Shell is easier to read ana write - No nees to carry async/await keywords thru the code - Powerful plain text manipulation in the stdlib https://pypi.org/project/pyth…
Re: Zx 3.0
#54Earlier quoted context omitted.
This isn't correct: if a Googler writes some code from scratch, which is unrelated to their work, on their personal time, and using their personal laptop... then it's definitely not owned by Google. There could be gray areas where code ownership could be disputed, but in general your employer owns only the intellectual property it paid for. Source: I'm a Googler (until next month).
Not true. You need explicit permission (there is a process for obtaining it, and it is very lightweight as I've done it myself). The general idea is that you get permission without much hassle if you develop something that doesn't compete with Google. You need to argue your case otherwise. Source: I'm a Googler that went through the process before. Edit #1 for all Googlers reading this: search "IARC" internally and y…
Re: Zx 3.0
#55Earlier quoted context omitted.
Not true. You need explicit permission (there is a process for obtaining it, and it is very lightweight as I've done it myself). The general idea is that you get permission without much hassle if you develop something that doesn't compete with Google. You need to argue your case otherwise. Source: I'm a Googler that went through the process before. Edit #1 for all Googlers reading this: search "IARC" internally and y…
Btw, Google actually publishes this documentation externally. https://opensource.google/docs/releasing/
Re: Zx 3.0
#56Earlier quoted context omitted.
Btw, Google actually publishes this documentation externally. https://opensource.google/docs/releasing/
They removed the `go/iarc` mirror recently, now seemingly only available on the wayback machine: https://web.archive.org/web/20210710210932/https://opensourc...
Re: Zx 3.0
#57I personally find Ruby's built-in shell features more ergonomic: `cat package.json | grep name` branch = `git branch --show-current` `dep deploy --branch=#{branch}` if $?.success? [ "sleep 1; echo 1", "sleep 2; echo 2", "sleep 3; echo 3", ].map { |cmd| Thread.new { %x(cmd) } }.each(&:join) name = 'foo bar' `mkdir /tmp/#{name}` if $?.success?
To be safe, abstractions that make it easy to shell out must also:
- escape all variable interpolations by default using “shellwords” or similar.
- throw exceptions on error by default.
Backticks in Ruby are very easy to use, but aren’t safe.
Re: Zx 3.0
#58I personally find Ruby's built-in shell features more ergonomic: `cat package.json | grep name` branch = `git branch --show-current` `dep deploy --branch=#{branch}` if $?.success? [ "sleep 1; echo 1", "sleep 2; echo 2", "sleep 3; echo 3", ].map { |cmd| Thread.new { %x(cmd) } }.each(&:join) name = 'foo bar' `mkdir /tmp/#{name}` if $?.success?
What I don’t like about backticks in Ruby is that they “ignore” errors in commands you run. It’s up to the program author to remember to check $? for the last executed command’s exit status. And guess how many times the average Ruby script using this feature implements error handling? Usually it’s totally forgotten. To be safe, abstractions that make it easy to shell out must also: - escape all variable interpolation…
Re: Zx 3.0
#59Earlier quoted context omitted.
Maybe but Python is sloooow and its type annotation situation is pretty poor. I would recommend using Deno. It has the following advantages: * Uses Typescript which gives you a great static typing system. * Runs via V8 so it's about a million times faster than Python. * Single statically linked binary with no project setup files required (package.json/dependencies.txt) makes it about a million times easier to deploy…
I’ve found Python is just fine performance-wise for CLI tools. What bad experiences have you had with it? I’ve mostly used click.
However, situation is similar with nodejs.
Re: Zx 3.0
#60Earlier quoted context omitted.
This isn't correct: if a Googler writes some code from scratch, which is unrelated to their work, on their personal time, and using their personal laptop... then it's definitely not owned by Google. There could be gray areas where code ownership could be disputed, but in general your employer owns only the intellectual property it paid for. Source: I'm a Googler (until next month).
Not true. You need explicit permission (there is a process for obtaining it, and it is very lightweight as I've done it myself). The general idea is that you get permission without much hassle if you develop something that doesn't compete with Google. You need to argue your case otherwise. Source: I'm a Googler that went through the process before. Edit #1 for all Googlers reading this: search "IARC" internally and y…
Compare e.g. https://thebusinessprofessor.com/en_US/property-law/californ...
I bet Google lacks the copyright for many of the projects they claim.