Hacker Newsnew | past | comments | ask | show | jobs | submit | piinbinary's commentslogin

Back when I lived in SF, there was one bus route (the 6, I believe) that I could use to get to work. The bus was so slow due to frequent, long stops and traffic lights that I could keep up with it on foot by walking briskly. I only bothered taking it when it was raining because it didn't get me to work any faster than walking.

That's an interesting point.

I'm also curious how bus stops interact with timed lights. Presumably each time the bus stops, it gets kicked back to the next cycle of green lights (which might be a low-single-digit minute delay).

Hopefully there's a traffic engineer in the audience who can give the real answers.


The way it is done her ein my European city is that the bus stop is move behind the traffic lights. The bus and the system are in radio contact, thus the position is known. The time the bus needs from current location to the traffic lights on green light can be predicted, thus the system can calculate whether to keep the green light till the bus arrives or turn red, let the crossing traffic go and then turn green for the bus again. The less predictable time of passenger getting off and on (takes time when crowded, wheelchair takes time, but can be fast when nobody requires that stop) is behind the traffic lights, thus doesn't have to go into the calculation.

Of course this has limits on density of traffic lights and traffic isn't fully predictable either, but overall this works quite well, giving busses mostly a green wave.


I think it's missing Google's Bard

That reminds me of `curl wttr.in/94110`

I also enjoy `finger <cityname>@graph.no`

> friends don’t just bring up type inference in casual conversation

I wonder if this is a reference to "I need you to understand that people don't have conversations where they randomly recommend operating systems to one another"

But to the actual point of the article: my understanding is that there are areas where you can use bidirectional typing (e.g. languages that have subclasses) where HM style type inference might become undecidable.


I once studied proof theory for a summer at a school in Paris and we talked about type inference and theorem proving all the time in casual conversation, over beers, in the park. It was glorious.

Being a student is so much fun, and we often waste it, or at least don't value it as much as we ought. 20 years later I'd love to go back.


> Being a student is so much fun, and we often waste it, or at least don't value it as much as we ought. 20 years later I'd love to go back.

An aside, but some years ago I watched the demo 1995 by Kewlers and mfx[1][2] for the first time and had a visceral reaction precisely due to that, thinking back to my teen years tinkering on my dad's computer, trying to figure out 3D rendering and other effects inspired by demos like Second Reality[3] or Dope[4].

I seldom become emotional but that 1995 demo really brought me back. It was a struggle, but the hours of carefree work brought the joy of figuring things out and getting it to work.

These days it's seldom I can immerse myself for hours upon hours in some pet project. So I just look things up on the internet. It just doesn't feel the same...

[1]: https://www.youtube.com/watch?v=weGYilwd1YI

[2]: https://www.pouet.net/prod.php?which=25783

[3]: https://www.pouet.net/prod.php?which=63

[4]: https://www.pouet.net/prod.php?which=37


Join us in ##dependent on Libera IRC. We continue to talk about this stuff all the time, with a focus on Martin-Löf intuitionistic type theory.

> I wonder if this is a reference to "I need you to understand that people don't have conversations where they randomly recommend operating systems to one another"

It is!

> my understanding is that there are areas where you can use bidirectional typing (e.g. languages that have subclasses) where HM style type inference might become undecidable

There are! Afaik most languages end up with a bidirectional system in practice for this reason. Haskell started out HM and has shifted to bidir because it interacts better with impredicative types (and visible type applications). Bidir can handle fancy features like subtyping and all sorts of nifty stuff.


The subject does sometimes come up in my casual conversations, since Robin Milner was my first CS lecturer.

He never actually spoke about type inference in my presence. He did teach me CCS (pi-calculus predecessor) a couple of years later, by which time I could appreciate him.


I'm impressed with how approachable the explanation is!


That stuck out to me as well.

I wonder if there could be a bug where extra code runs but the result is discarded (and the code that runs happens to have no side effects).

The post also says

> That is roughly 1 billion iterations

but that doesn't sound right because GCC's version runs in only 0.047s, and no CPU can do a billion iterations that quickly.


I am currently going through that book. I recommend it with one caveat: you'll need to have written some interpreters before (Crafting Interpreters is a perfect starting point) because it expects you to already know some things like to how write a simple recursive decent parser.



It didn't know about the Woodboring beetle: https://en.wikipedia.org/wiki/Woodboring_beetle

Doing this felt odd, it was like it wore out something in my brain. After a while I could picture the animals I wanted to enter but I struggled to remember the word for them. Only now, a minute or so after stopping, could I remember 'Dragonfly'

I was also amused by the reaction to "crab":

> (Carcinization makes it hard to define “crab”, so I'm going to pretend you said “brown crab”.)


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

Search: