Hacker News new | past | comments | ask | show | jobs | submit | deweywsu's comments login

Am I interpreting this repo correctly? The first C compiler was written in...C?


It would have been bootstrapped in assembly (or B/BCPL?) and then once you can compile enough C to write a C compiler you rewrite your compiler in C.

I remember a Computerphile video where prof. Brailsford said something along the lines of "nobody knew who wrote the first C compiler, everybody just kinda had it and passed it around the office" which I think is funny. There's some sort of analogy to life and things emerging from the primordial soup there, if you squint hard enough.


yes. the Q you're asking is: "how was this bootstrapped?"

the page that's referenced from GitHub doesn't describe that

http://cm.bell-labs.co/who/dmr/primevalC.html

however there probably was a running c compiler (written in assembly) and an assembler and a linker available, hand bootstrapped from machine code, then assembler, linker, then B, NB and then C...

We can't tell but that would make sense...


The first B compiler was written in BCPL on the GE 635 mainframe. Thompson wrote a B compiler in BCPL which they used to cross-compile for PDP-7. Then Thompson rewrote B in B, using the BCPL compiler to bootstrap. AFAIK this is the only clean "bootstrap" step involved in the birth of C (BCPL -> B -> self-compiled B)

Then they tweaked the compiler and called it NB (New B), then eventually tweaked it enough they decided to call it C.

The compiler continuously evolved by compiling new versions of itself through the B -> New B -> C transition. There was no clean cutoff to say "ah this was the first C compiler written in New B".

You can see evidence of this in the "pre-struct" version of the compiler after Ritchie had added structure support but before the compiler itself actually used structs. They compiled that version of the compiler then modified the compiler source to use structs, thus all older versions of the compiler could no longer compile the compiler: https://web.archive.org/web/20140708222735/http://thechangel...

Primeval C: https://web.archive.org/web/20140910102704/http://cm.bell-la...

A modern bootstrapping compiler usually keeps around one or more "simplified" versions of the compiler's source. The simplest one either starts with C or assembly. Phase 0 is compiled or assembled then is used to compile Phase 1, which is used to compile Phase 2.

(Technically if you parsed through all the backup tapes and restored the right versions of old compilers and compiler source you'd have the bootstrap chain for C but no one bothered to do that until decades later).


I think it's sad that we've created a society that feels social pressure to stare at a screen when they find themselves somewhere without something to say to someone else. This explains why social skills are on the decline.


It's always been there. Before the phone we had the walkman. Before that the newspaper. There's always something to indicate 'do not disturb'.

When I'm having a busy day I don't always feel like talking to randoms. I live in a city, not a village and I'll never know everyone.


Is it a social pressure to stare at a screen or to just pretend to be occupied with something else? Would reading a few pages of a book, for instance, satisfy this social pressure? I do agree more generally that smartphones are borderline essential for many social expectations, though. I personally find smartphones really distracting, being a device that allows for instant information at merely the hint of boredom, and if they were less socially enforced I probably wouldn’t have one.


I'm reading hn - your comment - at the doctors. I'm early, she's gonna be, of course, slightly delayed = free hn time, for me.


How about expanding the law such that the police can't lie to ANYONE?


If people understood how the legal system worked this would largely be irrelevant.

People think police are judges or prosecutors and (falsely) trust what they say accordingly. The police are evidence collectors for the prosecution, who presents evidence to a judge. Police are the lowest men on the legal totem pole and have little power in deciding the outcome of your case.

That alone should be enough to make you never trust whatever they promise, because really they cannot promise anything.


A criminal investigation certainly requires at least lies of omission.


I think they shouldn’t be allowed to lie about the law, but anything else is needlessly handicapping them.


Lying police do more harm than good.

False confessions don’t just send innocent people to prison, they also close cases without finding the actual culprits.

Remember the police are incentivized to catch people, not catch guilty people. So the easiest way for them to game the system isn’t in society’s best interest.


"Better for 10 criminals to go free than 1 innocent man suffer."


Yeah we abandoned that a long time ago. Now we're at the corner of "Hide behind civilians, shoot the kidnappers, the hostage and a couple innocent bystanders then suppress the report about the incident for 5 years." (https://en.wikipedia.org/wiki/2019_Miramar_shootout) and "order the victim to approach you, shoot her, lie to the media to say that she was wearing combat fatigues and had a gun, then suppress video of the incident for two years" (https://en.wikipedia.org/wiki/Killing_of_Savannah_Graziano).


For better or worse we're heading into a world with cameras everywhere. We can do better than 1:10.


to be more precise, we're heading into a world where the radio signals blanketing our planet will be leveraged as a realtime omniscient surveillance field. [1][2]

i sound like a conspiracy nut every time i bring this up, but wireless-networks-as-a-sensor seems unavoidable. there simply is no way to keep improving wireless transmitters without also increasing their environmental awareness and therefore leaking data about physical spaces. even simpler networks like wifi will dynamically adapt channels, frequencies to optimize speeds and it turns out you can extrapolate a lot from that [3]. advanced networks with features like beamforming are even more responsive to their environment and therefore more leaky. we're making accidental cameras, and they can see through walls.

it seems like this is going to be a "feature" of 6G mobile networks. read up on "joint communications and sensing" to find research in this area. (it's not just nokia.)

[1] https://www.nokia.com/blog/building-a-network-with-a-sixth-s...

[2] https://www.nokia.com/about-us/newsroom/articles/nokias-visi...

[3] https://news.ucsb.edu/2023/021198/wifi-can-read-through-wall...


why?


Why not?


If I were at risk of being murdered, and only a cop lying could stop it, I'd want the cop to lie. Even to kids!

Let's say you’re being held hostage by a dangerous armed criminal who has already harmed others and is threatening to kill you. The police arrive, and the criminal demands to know if there are snipers positioned outside. If the cop truthfully says “Yes,” the criminal might panic and shoot you immediately. Instead, the cop lies and says, “No, it’s just us talking, let’s work this out,” buying time for a sniper to take the criminal down and save your life.


That's not what anyone means when they talk about cops lying though.

Cops can lie to suspects during questioning. They can say "your friend already confessed" or "we just got a call from the lab, your DNA matches" or "you're getting the death penalty unless you confess right now". As well as bullshit like https://en.wikipedia.org/wiki/Mr._Big_(police_procedure) (in some jurisdictions).

I'm fine with undercover cops lying about whether or not they're wearing a wire, or your scenario. I'm not so keen on uniformed cops lying to elicit confessions.


I agree lying to get a confession is like torture to get information. In most cases, the information you get (and the confession) is bullshit.


If you prohibit all lies you also prohibit the good lies


It's interesting to see who immediately jumps to a hypothetical involving the police protecting them from a crime, versus those who immediately jump to a hypothetical where they're being protected from police.

This may be irrational, but I'm more worried about being falsely imprisoned by legal means than I am about being murdered by illegal means.


>If I were at risk of being murdered,

That's called "exigent circumstances", and a lot of rights are normally thrown out the window if that's the case - police don't need a warrant if threat of bodily harm to themselves or others is on the table.

And that isn't what most lying cops do is about - most of the time it is bad for the public.


So what you're saying is "If you want to make an omelette, you've gotta break some eggs"?


I'm sure we can make a framework around when they can lie. They can not lie to obtain facts or information while investigating. Doing so should poison what they gain and anything found afterwards.


> should poison what they gain and anything found afterwards.

That's a more expansive proposal than the law being discussed. The law is narrower than "investigating" and is focused only on interrogating a suspect, so presumably post-Miranda warning. And in this context being a "suspect" is a specific category elevated from being a witness or person of interest. And then the only penalty in the law is making a confession obtained as the result of a lie to a suspect during an interrogation inadmissable.

Those differences address the concerns mentioned downthread with lying in the context of undercover work.


Frankly the nickle-and-diming of when Miranda does and does not apply is itself an issue: "Oh, no, you're not under arrest, you're just being detained indefinitely," "Hahaha a dog practicing law? What an idiot, continue the interrogation," and "Your honor, the suspect failed to verbally affirm his right to remain silent; instead simply not speaking, so we were under no obligation to cease attempting to interrogate him" are all arguments that the Supreme Court has, in its infinite wisdom, seen fit to uphold as not violating Miranda.


Why?

There are lies that don‘t poison anything.

For instance police lies in an online chat to be a 12 year old girl to catch a child predator.


That's an easy situation to deal with. Have someone who isn't an officer sit at the computer and pretend they are a 12 year old girl to catch a child predator and turn the evidence over to the non-lying police.


The same trick can than be used in an interrogation.

That’s still lying police just with extra steps.


How about not actively providing false information, but being allowed to respond with wrong information?


So pretending to be a 12 year old girl to catch a child predator is illegal then?


This law is about lying during interrogation. When a police officer is wearing the uniform, asking questions, acting in their capacity as a protector of the public, I think directly lying to your face should be a crime. Their authority as an officer is the very thing they are using to get you to believe their lie. That is a critical piece.

A detective doing undercover work may require a degree of duplicity to achieve their aim, their authority as an officer is not what gets you to believe their lie, they almost always conceal that fact from you.

I think these are clearly distinct arenas of law enforcement.


Parents comment says to anyone that includes people outside an interrogation


Do you think that a person wearing a police uniform (that every person has an obligation to obey so long as they make a lawful order), can also, in the performance on that same duty, lie directly to a member of the public?


Depends on the reason


As the law stands, they are allowed to lie as much as they want when in uniform, in public, and anything you say or do in response can be held against you in court. The proposed Virginia law forbids that in the case of children who are interrogated.


Fun fact, that is already illegal. Perverted justice was an entirely civilian organization.

reading some of the criticisms of their former behavior does highlight pretty strongly why exactly that kinda thing is problematic.


there was a dude who the police told they had footage of him committing CSA. It was a lie but he trusted them, so he genuinely believed he was losing his mind as he never contemplated that law enforcement would lie. They arrested, charged and sentenced him, despite the fact he never did.



>Contrary to popular belief, the United States does not require police officers to identify themselves as police in the case of a sting or other undercover work, and police officers may lie when engaged in such work. The law of entrapment instead focuses on whether people were enticed to commit crimes they would not have otherwise considered in the normal course of events.

--your source

Not as straightforward as you're implying.


Now tell my how pretending to be a 12 year old girl forces somebody to commit a crime?


Forcing somebody isn’t entrapment. Entrapment is providing opportunity to encourage someone to commit a crime that they might otherwise have not committed.


Then tell my how pretending to be a 12 year old girl encourages somebody to commit a crime?


I second this. I'm guessing you're limiting access at a lower price point because you're worried too many business customers will opt for the lower cost plan when they should be on the higher priced one? I would pay somewhere in the neighborhood of $10/mo or so for a personal plan that had more than your free tier and less than the business one.


Yes, I’m also sad we couldn’t find a way to be affordable for everyone while also growing our business. We’ve learned that the personal/community app ‘market’ is impossible to grow upon, and that pricing for this group undercuts your pricing power with businesses.


The pricing is completely prohibitive. It’s a shame, looks cool but I’m not gonna bother with a pricing model that’s clearly telling me to go look elsewhere as a solo dev


Glide appears pretty cool, except that the next level up plan over the free one is $69 per month, more than a little steep for most personal users. I myself am wondering if there are any good projects out there that do similar things but that use either local databases or even browser storage?


I think the key value of Google sheets link is that you can do rest of your aggregation/data fixes on Google sheets. And data is in your control

I made an app for a meetup/reunion, but 10 user limit meant everyone had to given a shared password

Like you, I would happily pay for many many services about 10/month - right where streaming subscriptions are. But none of these companies seem to understand that part…


What a brilliant breakdown of so many concepts. Great read! The author has distilled a lot of experience into an insightful article with years of "read between the lines" wisdom gained.


Is this a hit piece by a high-definition display manufacturer? It seems like an unnecessary litany of detractors against one technology without a lot of alternative solutions or trade-offs with others. At the end, there are only 3 sentences that could be called alternatives with the heading "use high resolution displays". Making a "helpful" paper that only lists problems without comparisons or solutions misses all the reasons one would use a 7-segment display (mentioned in the comments here so I won't repeat). There's nothing wrong with this technology. The title "don't use" is too inclusive and is not supported by the paper. I think "Consider not using in certain applications" would have been more appropriate based on the paper's body.


> Is this a hit piece by a high-definition display manufacturer?

This was the exact thought I had. The paper strikes me as being very odd, and the arguments against using 7-segment LEDs are very thin.

I will agree with one thing, though: the right components to use are an engineering decision and as with all engineering decisions, the right choice (i.e., the right set of tradeoffs) needs to be determined on a project-by-project basis. For a given project, that may mean not using a 7-segment LED. Or it might mean that's exactly the right choice.


Could also be a design decision. No reason to let the engineers make all the choices.


Considering the paper does not specify that it has no conflicts of interest in the usual place where it would, we should assume the author is involved with such manufacturers


Huh?

As someone designing electrical circuits that might or might not use a 7-digit display this seems rather to be a guide for which use cases to avoid them.

Electrical engineers sadly sometimes don't think about that at all and slap what they know onto everything. When you have a medical device where a reading error or ambiguity can have serious consequences you might want to be aware of that. There are 7-segment-display usecases where that is not an issue irrelevant, e.g. because you have enough contextual clues to not hold the device wrong and read it upside down or because the potential damage from a reading error is irrelevant.

But this is still a design consideration one should be aware of. Especially in times where 7-segment displays aren't necessarily the cheapest option.


Most other display technologies have their downsides too. For example, fot-matrix LCDs are far more fragile and more easily damaged by sunlight or heat than 7-segment LEDs. If you don't discuss that, but dwell on the downsides of 7-segment displays, it does feel a bit like a hit piece.

In fact, 7-segment displays aren't even a monolithic technology, and not all of the gripes in the article apply to every implementation. You have traditional LED models, LCD 7-segment displays, and then some OLED flavors, VFDs, and even electromechanical designs in niche applications.


Almost any 7 segmented display could be replaced by an analogue gauge. For time, for temperature, for selecting options. When a device has a segmented display, I assume it is to cut costs.


When a device has many analog gauges, I assume it is an unnecessarily expensive device.

Few modern use cases actually benefit from the qualities of an analog gauge. It seems to be more of a status marker, at least for consumer goods. Military and ruggedized applications are a different story.


What would be an application where a segmented display is just as good or better than an analogue gauge? The only one I can think of is a bedside clock or other device that will be used in the dark and can benefit from self-illuminance.

Especially household appliances are worsened by the switch from analogue to digital. A microwave oven used to be so practical to operate. Just dial the clock to your desired time and that's it. Now, you have to press +30s button a bunch of times, or type your time. They're even trying to put digital on stoves, clearly not intended for use by people who actually cook. Induction stoves all have this problem. My air fryer is much worse to operate than it should, because they insisted on digital. It would be perfectly fine with a gauge for time and one for temperature. Now there's all these buttons and a segmented display.

I have a segmented display thermometer. It's not better than an analogue in any way I know of, but they're cheaper. I have a segmented display speedometer on my motorcycle. It is of course getting its input from an analogue measurer, so why transfer it to digital?


Modern speedometers are digital. A magnet or metal disk with cutouts rotating with the transmission produces pulses in a magnetic field sensor, the pulses are counted by a microchip. The data is sent to the dashboard over a packet-based computer network.

I for one find a "71" in large digits much easier to read than trying to figure out where between the lines a little needle is pointing. If the opposite were really true, we'd draw little pictures of gauges to communicate numbers.


In cars I see more analog than segmented displays for the speedometer, but I'm sure you're right that the underlying technology can be digital. For MCs, I kind of agree with you that numbers are nicer.


My current car and one previous had digital speed displays. It's starting to happen, but the inertia is high.


As the owner of some analog gauges that have lost their calibration, I disagree.


But a segmented display will also get its input from an analog source, right? Or are there some applications that I'm overlooking?


The current day digital sensors are a lot more reliable. I have multiple cheap digital thermometer etc gadgets and they read the same temperature to within 0.1 C, humidity to ~0.5%, and so on.

The source is analog only in the sense that physics is "analog" until you get to Planck scale or to quantum phenomena.


I also have some digital thermometers, and personally don't have any preference digital vs analog in them. For home use, +/- one degree or percentage of humidity don't really make a difference. As for reliability I don't think you can beat analog, which will last for decades without changing a battery.


Wonderful. You just "created" this?! This seems like it took many years and lots of hours. Great work!


I think this is at the core of the rot of American society. The thinking that a CEO "owes" the marketing of their company so as to cash it in or even turn profits is, in my opinion, is a mark of the biggest moral ineptitude of the western world's thinking. Yes, I realize this is the 'norm', but it clashes with deep values of the people who aren't shareholders, but are no doubt vested in the product the company produces, mainly the customers. It ignores their needs completely because they don't own stock. "We sold the company, and the new owners bastardized it by slapping their logo on it by eliminating the free tier" is almost commonplace now in business dogma, and yes, most people think it is the kind of strategy 'owed' to shareholders, but this one-sided thinking ignores the better interest of users who the company has built their business on the backs of, and who will now be bait-and-switched into a subscription model, never mind the needs that drove them to the product in the first place. Yes, this is how capitalism works. What I'm saying is that capitalism, as a model, is flawed from a moralistically balanced point of view. It's a never-ending race to the bottom by optimizing for greed until every drop of monetization is squeezed out and every person is left without. Should the owner's employees make money, I mean after all they do the work? Yes, but who takes into account the inestimable value added by the initial users who's interaction with the product shaped it into what it is today?


"it clashes with deep values of the people who aren't shareholders, but are no doubt vested in the product the company produces, mainly the customers. It ignores their needs completely because they don't own stock."

Presumably companies generate value for shareholders by selling things to customers and generating profits, which makes customers the ultimate beneficiaries. What companies are you thinking of that ignores their customers' needs completely and are still quite successful and valuable for shareholders?


Here here. One word, nay, one letter in response:

X


This article shoots itself in the foot right at the start. It reveals that the author is in fact just as wrapped up in Twitter as those he critiques. It shows a graph with a person on the left who has "nothing to say" being a mongrel, as if it's bad not to want to insert or even have a personal opinion about everything. There is completely nothing wrong with not getting wrapped up in the BS that is modern western society at large. In fact, it's quite healthy NOT to have an opinion about any of it because you're off doing much better, much healthier things.


>It shows a graph with a person on the left who has "nothing to say" being a mongrel

I think you may have misread. Both the person on the left and right in the graph are labeled "have something to say."


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: