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

I re-read my favorite book, Catch-22 by Joseph Heller, but this time, I read it aloud to my kids (albeit with occasional censoring of some parts).

I'm prone to bursting into laughter with that book, and my kids quickly found it very funny as well. They could almost immediately divine the next contradiction in the narrative.


I really want an 8.5x11 or bigger, very low power e-ink device that I can use as essentially a photo display. I was inspired by this[0], but as I'm not a hardware guy at all, trying to make one is out of my reach. Hopefully this PineNote will become that device sometime.

[0] https://youtu.be/gECj1AE9D2c


I spend all of my days reading PDFs.

I want an 8.5x11 device with large-size microUSB. Nothing fancy, no markup, no net connection, huge battery. Simple page turning (could be touch or button). Simple file handling. Memory of where I stopped reading.

You could sell these things in volume, the first venue being libraries and bookstores.

Students with school library access could use them to carry all of their papers. Profs could use them for research.

Sci-hub would be a perfect research match.


I am an Android user fed up with Google, but I've never really focused on alternatives to stock Android. I briefly investigated Cyanogenmod and its successor, LineageOS, but never to the point of installing it. I do use the Gmail app on my phone, but it's not a requirement for me. Beyond that, I don't really have strong ties to the Google Suite of apps. I do have a few apps I've purchased and use frequently, but most are freeware.

All that said, for those of you who have de-Googled your phone, how much friction was there? Is there a leader of the pack for alternate app stores (if necessary), and/or do you load APKs directly?


have been running de googled for more than last 6 years. during original setup of phone there is a lot of opportunity to shut down Google. how ever, can proceed and succeed most of the way with the right tools, and patience. vigilance in disable options is important. some times you can disable all actions after install - for example location, etc. F-droid is your primary source for apks. they have everything you need, with very good filters and warnings about privacy and other options of their apps. If you need some apk available on that is on Google only, then there are a few other sites, that package them and seem to work quite well. They look sketchy, they promote other apps, but I haven't had any issues using them in over 5 years. just click carefully. for example apkpure. You can get things like Signal, mapy. cz, Wyze and so on, better yet, sometimes older versions. In a few apps, while running, you have to ignore the message that you need Google for this app to work. I haven't had one that actually needed it. even Google photos. (assuming you don't want it linked to Google cloud.)


I didn't know anything about AoC until just recently when I took a very brief look at the 2020 problems (but didn't deep-dive). I'm trying to find good problems that can help me learn SAT/SMT solvers, but there doesn't seem to be much out there. Anyone know how well-suited these are for AoC?


Not just a good policy -- my wife is a former EMT & firefighter in MN, and at least there, apparently it's the law that fire trucks blast their horns at every intersection. Whether this is required when they leave the fire hall and turn onto the first road, I don't know.


> If you're comfortable with running Windows 11,you're already sharing more data than the DPRK could possibly want to extract from you

Citation needed. Sure, Windows collects a lot of telemetry, but Microsoft takes great pains to ensure these data are privacy-protecting. On the other hand, if you assume an OS from an authoritarian regime is collecting info, it would seem that by definition, they want to know exactly who you are.

I'll even give Apple and Google the benefit of the doubt that they're similarly (to Microsoft) concerned about protecting PII.


I just got bit tonight by Python's duck typing. I was trying to use PIL to draw rectangles for a super simple script to visualize results from another component. I found an example and tweaked accordingly:

    w, h = 220, 190
    shape = [(40, 40), (w - 10, h - 10)]
    # ...
    img.rectangle(shape)
When my results came out totally wrong, I spent 45 minutes trying to figure out if my code that built the shapes was off or if my drawing was off. What I had assumed were rectangle dimensions in the form of `(width, height)` were actually bounding box coordinates `(x2, y2)`. Both of those are tuples of ints, but semantically, they're very different.

I'm growing increasingly frustrated with Python, and in my frustration, I feel like this nonsense could be wholly avoided by stronger typing. Were I to use Rust or C#, two languages with which I have much more experience, I have to imagine the library would prevent this loss of productivity. Simply define a Point struct and it's perfectly clear what is being passed in.

Edit: I shouldn't have said duck typing but rather the lack of strong/compile checks. Apologies for my sloppy thinking.


> Edit: I shouldn't have said duck typing but rather the lack of strong/compile checks

Every compiled language I can think of would also be totally happy for you to pass (int width, int height) to a function designed to handle (int x2, int y2) - what language are you thinking of that would make this a compile error?

Some languages do allow you to create your own custom types which mean you can spot the difference between two types of int and avoid mixing them up… but python is one of those languages.


Its a library design rather than a language design thing. You could make a separate class Size and Point that both take an (int, int) constructor, and even have BoundingBox whose constructor takes (Point, Point), and the function could take a BoundingBox instead of a list of tuples. Of course, you can do that in Python, just as well.


Sounds like you want 'newtypes', e.g.

    XCoord = NewType("XCoord", int)
    YCoord = NewType("YCoord", int)
    Point = NewType("Point", Tuple[XCoord, YCoord])
These are just new names for existing types (in this case the existing types `int` and `Tuple[int, int]`); they make no difference to the way the code actually runs (unlike, say, introducing a new class).

However, checkers like Mypy will not let us mix up these newtypes with their underlying types. For example, if a function requires a `Point`, Mypy will complain if we try to call it with a `Tuple[int, int]`.

Newtypes are useful for keeping semantically-distinct types separate, even if they just-so-happen to use the same underlying implementation. In other words, they let us selectively avoid duck-typing if it might cause problems.

Of course, this is only useful if the code we're calling actually exposes such types!


There's nothing stopping you doing that in Python. If it's important to you to define a point struct, do that, add a type annotation, and add mypy to your compile.

When i used to work with C++ i would spend hours debugging compile issues that were just the wrong type (templates are especially bad!) that really had no impact on the code, it was just a waste of my time.

What I like about python is that the static typing is there if you want it, but you don't have to.


I have several problems with this:

* I have had the installation of mypy fail on multiple machines and crash (‽) several machines

* mypy is a separate component; yes, it's very well supported, but it's not included with python3 by default

* It's not required by packages to function, which means that packages can and do simply neglect to add typings. The package I used in my example doesn't provide any such typing information, so me using mypy wouldn't help

* Besides mypy, the package in question lacks appropriate documentation (eg, the mouseover of the function I was calling provided nothing in the IDE to give a hint). The method signature defines the shape parameter as being named "xy". Only when I went to the web site did I find that it's supposed to be either List[int, int, int, int] or List[Tuple[int, int], Tuple[int, int]] and that the second pair of values is a point and not dimensions. Were I doing this in another language, the type annotation would likely provide some details.

This is my problem with Python -- yes, you can use typing hints if you want, but nowhere is it required. This leads to a world in which I spend 45 minutes painfully debugging this kind of thing only after my code is written. In my experience, this type of bug very rarely exists in stricter, compiled languages.


To my knowledge Python doesn't have any sound type system. Mypy doesn't provide that.

So, no you can't have (currently) proper static typing in Python. It's more like in TypeScript where it's a best effort thing. (At least you get notified when the typer gives up. That's much better than nothing of course!)

C++ templates aren't a good example either. Templates are a Turning complete language so they can't provide guaranties in all cases and aren't as such type safe at all.

Better examples for type systems and their usefulness would be languages form the ML family (also including Haskell and similar in this case).


>> Python doesn't have any sound type system

Neither do popular statically typed languages like Scala, Java, C#, … - sound in the context of PL theory means the type checker will only accept a correctly typed program. Which is not true for any of these languages i mentioned - you can get the compiler to accept an incorrectly typed program.

>> you can't have (currently) proper static typing in Python

That’s an even bigger group of languages in that bucket, typing is undecidable in “favourite” languages like Rust, ocaml, c++, f#


Scala's base caluculus is proven sound!

The implemented language as such has minor soundness holes, correct. But you need to resort to "murky" parts (like combinations of null, top and bottom types and sub-type relationships between them) to exploit this.

In practice I've never run into any case of this soundness holes. You need to explicitly construct a pathological case. (Just avoid null and you should be safe in any case afik).

This can't be said about things like MyPy or TS. There you run into soundness holes on a daily basis.

OCaml and F# are undecidable? Also because of sub-typing?

And what's the problem with Rust? It doesn't have sub-typing.

The problems with sub-typing in general could go away in the future when algebraic sub-typing catches on.


I don't think this example has anything to do with "stronger typing". A Tuple<Tuple<int, int>, Tuple<int, int>> would have passed the type check just fine the same way, without revealing your error.


> I don't think this example has anything to do with "stronger typing".

I disagree. There are definitely languages where you could easily differentiate between a "length-int" and a "coordinate-int" in the type system, while still representing it as only an int in memory at runtime.

I belive both Haskell and Ada can do this for instance.


> There are definitely languages where you could easily differentiate between a "length-int" and a "coordinate-int" in the type system

Python, via the shared portion of the type system enforced by the major type checkers, is one of those languages.

The fact that a particular library doesn't choose to do this doesn't mean the type system doesn't fully support it.


If you have a Rect type that'll likely take four arguments and you can still make the same mistake of confusing the Rect(x, y, w, h) signature with Rect(x1, y1, x2, y2). This of course could not happen if Rect were defined as Rect(Point origin, Size size) but that might get a tad annoying for callers.


Sure that is annoying, but I'm not sure it has anything to do with duck typing?


You don’t need strong typing but good naming to avoid these issues. While a type system kind of requires everything to be named, it really doesn’t matter to the type checker whether these names are semantically correct or have any semantic meaning at all.


> What there isn't is a good way to get a single subscription to watch anything you want.

I would even settle for a way where I can ask, "Where can I stream X?" There used to be canistream.it -- which is apparently now being rebuilt but has long been mostly useless. Fingers crossed that it becomes useful.


I did a search for "streaming search" and got https://reelgood.com/ and https://www.justwatch.com/. Roku also has a search engine called "What's On". https://www.roku.com/whats-on.

Now if only someone would combine all of these search engines...


They funniest (saddest) answer is the Pirate Bay.


The Google TV app does a good job at that. It checks all my installed apps and links directly to the media item in that app if I pick a piece of media on one. It will also link to services I don't have, or offer a pay-to-play through Google itself.


JustWatch is pretty good.

https://www.justwatch.com/


justwatch.com works pretty well, at least in the USA.


Works well in Canada too (as long as you are on their Canadian site).


I bought my house (suburb of Seattle) for $300k seven years ago. It's been feeling pretty small lately, so I occasionally check Zillow to see what's on the market. I can't find anything within a reasonable commute (~45 minutes) to work without paying at least $800k, and even then, it's usually a derelict property that probably will need to a few hundred thousand more to bring it up to par.

My three options seem to be:

1. Live with the small house (and awesomely small principal) we have, at least until the bubble bursts 2. Suck it up and pay a ton of money 3. Move far from Seattle.

I'd actually love option 3, but with established relationships in the area, it's not a great option socially for the family.


With spending 300k seven years ago what is the value of the property now? Would't be surprised if it's 600k+. Let's assume you put 60k into downpayment and maybe you've gotten another 40k in principal put in from payments. That's 400k of equity you can put into a new place.

Sure this is technically option 2, but it's not as terrible if you compare to people that are buying now without having equity grown for years to help purchase.


A lot of people get tripped up by nominal prices. Ignore the big numbers, and focus on the return you will be getting using the non callable (and non recourse in WA state) leverage you get with a home mortgage.

Unless Seattle stops being attractive to people with high incomes, you have nothing to worry about. Use your current home’s equity to get the house you want.

The situation mainly sucks for people who jump on the equity ladder later than those who jumped on earlier. But that is how our society is structured, and I do not see a reason for that to change soon.


I don't remember why, but I learned regexes maybe my sophomore year of college because it seemed like such an interesting thing that I might need some day? I also started to learn SQL about the same time. Those feel like herculean efforts so foreign now because I've been using them for so long.

One day at my second job out of college, I wrote a quick regex for something, and one of my more senior colleagues looked at me like I was a wizard. It was amazing to be able to get some street cred for that. To me, it validated the effort I went through previously.

I'm trying to learn about SAT/SMT solvers now. Not because I have a pressing need for them but because it's a completely foreign thing that - who knows? - maybe I'll be able to put to good use today. The problem with SAT/SMT is that there are nowhere near the clear learning resources compared with, say, regexes.



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

Search: