Better HN
topnewbestaskshowjobs
Log inSign up

compsciphd

2,299 karma · joined Feb 15, 2012 (14y ago) · 1,239 submissions

Submissions

comment 6y ago · link · parent

citation that the FSF believes that GPLd libraries when dynamically linked require the all the code to be GPLd?

https://gitlab.com/gnu-clisp/clisp/blob/dd313099db351c90431c...

or something else?

I agree that many create that API barrier (ex: ZFS on Linux). Those that argue that ZFS on Linux is legally problematic agree with the FSF's definition (which I would argue leads to the belief that APIs are copyrightable). Those that think ZFS on Linux is on a fine footing believe that APIs aren't copyrightable and one can create a shim to decouple your non GPLd code from GPL "libraries", especially if the coupling that ends up happening is never distributed as done by the end user.

comment 6y ago · link · parent

if I distribute the GPL library (say libreadline) with my app, I'd probably agree with you.

If I expect the end user to have libreadline installed on their machine (from debian / redhat repos, and for argument sake Debian/Red Hat/et al aren't distributing my app), I think I'd disagree. I'm not distributing any GPLd code.

I think its a bit more complicated if Debian/Red Hat are distributing my non GPLd app that links against a GPLd library that they also distribute, but aren't really distributing them together. The reason I say this, is because even though they are "distributing" both "together", we wouldn't say that GPLd code and BSD code that they "distribute" "together" infects the BSD code.

I might also agree that its not exactly the same issue, but I do think it should make one think about it.

comment 6y ago · link · parent

anyone who believes that GPLd dynamically linked libraries impact code written to use them effectively believes that APIs can be copyrighted. (ex: the FSF believes this).

comment 6y ago · link · parent

yes, its not distribution agnostic, what I'd argue is that "docker style" containers (i.e. created out of a composed set of layers) would benefit from being constructed out of its own layer distribution instead of a package distribution. that the benefits one gets from building images in a way that leverages layers would be a big win.

simple examples:

1) we spend time ordering the layers we install in docker so as not to waste space if an earlier layer changes. in layer aware building, this isn't an issue.

2) if one does a run apt-get install XYZ, unless one nukes one's cache on every build (possibly ruining all efforts to not waste space if data comes out somewhat differently), one will not actually be getting the latest packages.

The primary benefit of leveraging an existing distribution is that you have all the software they have already built (and is built to work on them). Which I don't want to downplay the value of that. I understand why the decisions were made to leverage them, I just feel they come with a cost.

I'd also note that the prototype I described was basically finished being built 4 years prior to docker. we've learned a lot since then, but I think we've also forgotten a bit.

comment 6y ago · link · parent

I'm a big fan of the "The Lasso Special" :) (such a good show).

comment 6y ago · link · parent

there's no capital risk for the servicing company.

847.

Microsoft in the Frame to Buy Nokia (Again)(forbes.com ↗)

5 points · by compsciphd · 6y ago · discuss

comment 6y ago · link · parent

when I say package model, its short hand for a dependency graph model between packages where packages can easily be installed and upgraded independently with whatever dependencies that they need to be installed along with them.

If one really wants to simplify it, I'd say "Debian's package model" as that's what I have the most direct experience with.

comment 6y ago · link · parent

"Does a great dumb TV exist in 2020?"

no. None of the TVs with the best picture quality are dumb. It's a shame, but its the truth.

so it really depends what you want, but if getting the best bang for the buck picture quality (highest nits, highest contrast, best color accuracy in SDR and HDR), you are going to be limited to smart TVs. If all you care about is 1080p in SDR, you can get a dumb TV that is competitive, but once in the 4k/HDR world they just don't exist. you're limited to samsung, lg, sony, panasonic at the top end, and even good bang for buck manufacturers like tcl, hisense and vizio are all just shipping smart features on their highest PQ TVs.

comment 6y ago · link · parent

I agree, I don't fault them for taking the easy way, I do think it was wrong though. I created tools tools for converting debian packages into layers (in my research I stored these layers on a shared file system (either a multi-attach (in practice would need an fs that can have a single writer and multiple readers, which might simplify things) on a san or nfs.

But, debian packages aren't really made for this directly, as they have their pre/post install/remove scripts. My "hack" was to treat every package as an dpkg --unpack version (i.e. not configured) and then at image "build" time (i.e. each image is really a layer that is a manifest of dependent layers + data created at image build time), we would dpkg --configure --pending all the composed layers (with a bit of magic happening behind the scenes to make dpkg realize that the packages were unpacked but not configured yet).

This mostly worked well, but you could have some ordering issues. A bigger issue is because debian doesn't expect this to happen, it creates encryption at install time (say for ssh), not at first run time. So for example, if one created an ssh daemon image, any instance run from it would have the same key. not a great idea. Of course, its possible to engineer my way out of this (simple case would be to write tooling to recognize these cases and inject it into the created images), but it goes to why a direct conversion from debian packges into layer wasn't a silver bullet solution. I had the thought that perhaps an Ubuntu type approach would work, where some packages are wholesale imported from Debian into Unbutu without any changes but "important" packages ae modified to fit Ubuntu better could work.

As an aside, the 2 papers referenced above were my "job talk" for my post doc at IBM Research, and got me the job. I tried to get support to continue this line of work there, but that never happened (and then my manager left, and I was left working on unrelated cloud stuff for the last 1.5 years there). Of course, this is now important to IBM (see Red Hat purchase).

I wasn't approaching this from the pet/cattle metaphor, so I also gave my system the ability to upgrade instances in place by mark removeding layers as unlinked (i.e. ignored by readdir/lookup), and adding new layers. A big advantage here over traditional package management is that this made upgrades "atomic". For example, when you upgrade libc in the traditional package managed world, your system is temporarily "broken", in the sense that any executable that tries to run in between old libc removal and new libc installation will fail as its not on the file system. However, in the cattle world of containers, this is probably unnecessary complexity.

comment 6y ago · link · parent

I strongly believe that both flatpak and docker both went about the wrong way of building images.

they should have leveraged the package model that linux distributions already have and viewed them as mix and matchable layers much like packages are mix and matchable. with full dependency resolution. i.e. creating an "apache" container image should be as easy as "apt-get install apache" but without actually installing anything. just creating a manifest that references the packages/layers that are needed.

simple upgrades a container image is then just upgrading the set of layers in the container image, and unlike docker where even if 2 layers are exactly the same content, if a layer "above" them is different, they are different layers, in a package -> layer concept that's unnecessary.

In fact, this is what I published and created the notion of container images that are defined by a file system that is created by composing a set of shared layers together, but Docker took the easy way out and punted on that.

this would also make it simple(r) to do security analysis on container images as well as compose multiple images together.

https://www.usenix.org/legacy/events/atc10/tech/tech.html#Po...

https://www.usenix.org/legacy/events/lisa11/tech/#Potter

(which also goes to my in joke that I'm the only one who can get a job that requires 10+ years of docker experience ;) )

comment 6y ago · link · parent

one doesn't work at startups to maximize your earnings. you work at a startup because the pay is sufficient for your goals and its work you want to do (ex: because you really believe in the product, you feel you can grow in ways you couldn't in large companies / have impact or control in ways you can't in lage companies or perhaps others).

If either of those 2 things aren't true, you probably shouldn't choose to work at a startup over a large established company.

comment 6y ago · link · parent

If people wanted to farm a t-shirt, just create your own public github repo and make PRs to it. No need to spam real repos.

comment 6y ago · link · parent

we pay anywhere between $64-$80 a month (depending how many lines use over 2GB of data) for 3 lines of service on t-mobile that are unlimited all 3 ways (with the normal deprioritization that probably happens with this as well if going over 50GB a month, which we don't).

basically, I don't buy the significant value in their privacy mode (perhaps it has value to others, but not so much to me). I can see the value in supporting the development of the phone, but its a very significant delta in cost.

comment 6y ago · link · parent

even if plugged into a receiver, the new chromecast doesn't passthrough/bitstream hd audio (dts-ma/dts-x, true-hd/atmos). which means I probably will not be getting it.

comment 6y ago · link · parent

youtube tv is sold in the US, not in the UK. youtubetv subsidizes the cost of the dongle in the US and not in the UK. much like netflix also subsidizes the cost of the dongle. Apparently, google is valuing its ability to push youtube tv with it a lot.

comment 6y ago · link · parent

my experience using DDG is that its simply returning the same results as Bing. Is the only value they bring that one trusts them more with our data than microsoft?

comment 6y ago · link · parent

"former clerks do much, much better at getting their former boss's vote than expected, even net of the confounders you'd expect (ideological agreement, relevant case characteristics)."

I don't see why this is surprising?

To take an example from my experience with academia, I could write a paper by myself or I could have my advisor go over it give feedback and edit it (we would call it sprinkling his magic pixie dust over it). There was nothing necessarily informationally different in the paper (though there could be that too, he would motivate us to do explain certain things better or do different experiments). Why? Because he sat in the program committee meetings where papers were accepted and rejected, he now knows why people who sit on those committees accept or reject papers. He can then make sure the papers written by his students are tailored to those desires.

I would expect the same exact results from a former clerk to their former boss. they know exactly the type of arguments that their former boss finds persuasive and those that they don't and would hence tailor the arguments in such a way, such that even someone with ideological agreement could not without that insider knowledge.

comment 6y ago · link · parent

is it difficult for it to be changed when you immigrate to the US?

As a simple example: look at people from eastern europe that "americanized" their names when they came over from the old country at the end of the 19th/beginning of the 20th century.

comment 6y ago · link · parent

which actually pcre has, as it has "subroutines"

comment 6y ago · link · parent

I believe you need capture group back references and recursion on the capture group back references to match a palindrome

edit: actually, even with recursive construct (at least in PCRE) I think its still impossible.

comment 6y ago · link · parent

I believe (perhaps wrong again) that back references are not in posix (though many implementations have them)

edit: I was wrong. back references are in posix. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...

so I guess not even all posix RE can be converted to finite state machines.

comment 6y ago · link · parent

I think (perhaps incorrectly) that posix regular expressions can be converted to finite state machines (and in fact, that is how you make them run efficiently), it is the PCRE that cannot be fully converted to finite state machines. (but willing to be corrected on this!)

comment 6y ago · link · parent

PCRE type is what most programmers colloquially called "regular expressions" (but I note the same thing as you in my comment below you.

comment 6y ago · link · parent

Story time about an interview experience I one had.

So I once interviewed at Google (well, I've interviewed at google many times, and have never gotten passed the hiring committee, but my resume looks decent so recruiters keep coming after me)

Anyways, on said interview, I was asked to program a relatively simple regex matcher (characters and star, perhaps ., don't remember).

Anyways, I totally bombed that question (I'm a big believer that 45m isn't enough time to organize ones thoughts on said Q as phrased, as it gives you nothing to build on, but I'll get back to that in a bit). This of course through me off for the rest of the interview day, because I tend to chew on problems that I have trouble with and tend to not let go of them quickly until I have some better understanding of the issue (including perhaps my limitations in being able to do anything about it).

So after the interview, as I tend to do, I did a bit of research, and came across this article of Kernighan

https://www.cs.princeton.edu/courses/archive/spr09/cos333/be...

which put everything into context beautifully

now, why do I think its a terrible interview Q? Because as Kernighan writes

"Rob disappeared into his office, and at least as I remember it now, appeared again in no more than an hour or two with the 30 lines of C code that subsequently appeared in Chapter 9 of TPOP."

if it would take Rob Pike and hour or 2 to come up with a nice solution, what chance do us mere mortals have in the context of an interview with people staring at us.

With that said, I do think this serves as a basis for a good interview question. Take a simple character by character string matcher as Rob Pike wrote, and ask the interviewee to expand on it, how would they add different functionality to it. 1) could they add '.', 2) could they enable it to match anywhere in the text, 3) could they add anchors, 4) and if really good, could they add star support. You get to see how the interviewee thinks about code, thinks to modify code, and being regex, still provides a good basis for thinking about tests. I hope people I interview find this to be a tractable Q.

Getting back to my story, in order to prove to myself I wasn't an idiot (and to learn some java, I was mostly a C programmer in the linux kernel at the time), I decided to take Rob Pike's approach and try to implement as much of a regex matching engine as I could

which turned into https://github.com/sjpotter/regex.

then when I needed to improve my Go programming skills (and explore possibly bad ways of doing Go programming), I ported it to https://github.com/sjpotter/regex-go

now, what's the point of this story in regards to the article? Implementing the quantifiers gave me a better appreciation of how they worked, both greedy and not (and the performance impacts of them, especially with my naive implementation of a matcher).

By following https://www.regular-expressions.info/reference.html and adding as much as I could (include backreferences, lookahead/behinds and conditionals) it gave me a much better understanding of the power in regular expressions (at least of the PCRE type, I'm not sure my old discrete structures teacher would be happy calling all of these "regular expressions").

comment 6y ago · link · parent

I'd presume (perhaps incorrectly, so perhaps hope), that he's pretty insured up to avoid that fate.

comment 6y ago · link · parent

I'd agree with you, but do you think china doesn't behave this way?

an example might be https://www.foxbusiness.com/markets/china-coronavirus-nation...

to an extent its a he-said/she-said, but if this were in the US, we would say "it's not a good look".

comment 6y ago · link · parent

how do you think US companies break into china?

the chinese government forces them to "sell" (i.e. "partner" where the partner is given significant concessions that would never happen without the chinese government's protection, including ownership over IP).

honestly, if one views the US in a trade war with china, then there is a concept of "national security" (in a wide view of the term, I'd agree not the traditional view in the US, but probably closer to how china views the term) to allowing chinese companies access to the US market that are not reciprocated in China.

heck, the fact that they want to "partner" is probably indicative of how the chinese view the issue. i.e. US companies have to have a chinese "partner" to enter china, so to do the same in the US, they seek out a US partner.

comment 6y ago · link · parent

weird Q I was wondering about in regards to the epoch. (perhaps a stupid Q)

what would be the problems with choosing a new epoch (i.e. one where jan 1 is the same day of week as jan 1, 1970 and is 2 years before a leap year. (perhaps doesn't exist).

The worse case I see is that apps that calculate years internally (instead of via a shared library or like) would calculate them incorrectly. I'm wondering if this wouldn't be something that could be massaged around. Of course, it just pushes the problem down the road.

it also makes timestamps like this incompatible between systems that have different epochs, which could be an issue.

as I said, naive (possibly stupid) Q, just wondering if people have actually talked about it?

comment 6y ago · link · parent

the headline doesn't fit with the text of the article. the article doesn't quote him as saying that he takes vitamin C, but that taking a gram of vitamin-c is not bad.

----

"If you're deficient in vitamin D, that does have an impact on your susceptibility to infection. I would not mind recommending, and I do it myself, taking vitamin D supplements," he said. "The other vitamin that people take is vitamin C because it's a good antioxidant, so if people want to take a gram or so of vitamin C, that would be fine."

----

1
282930
42