Live data from Hacker News

Type-checked non-empty strings

exploring-better-ways.bellroy.com

31–40 of 51 posts

Re: Type-checked non-empty strings

#31

Earlier quoted context omitted.

The starting point of casting a horoscope is calculating the apparent locations (this means "where you would have seen them had you looked up there and then") of a whole bunch of celestial objects at the time and place where a particular person was born. You won't (write software to) do that without knowing a whole bunch of linear algebra and ODEs. The fortune-telling part is not what needs the math degree.

Does the quality of the astrology depend on the correctness of celestial object positioning? I always assumed it had more to do with the "bedside manner" of the practitioner, and less to do with any measurable falsifiable phenomenon.

You can't do good astrology if the underlying math calculations are wrong. Most mainstream Western astrology uses Placidus houses and then places planets in signs within those houses. From the planetary placements aspects (angles) are calculated.

The sign that a planet is in, which house, and aspects between the planets are what enables astrological fortune-telling and prediction (the forecasting aspect of astrology is technically known as transits and progressions, this is the "predicting the future" piece).

The bedside manner of the astrologer obviously has an enormous influence. One astrologer will look at a chart and treat it as a fixed "you are this way because of your chart" as if you can't change. A more thoughtful (read: actually good) astrologer will treat the chart as an evolutionary blueprint for growth and change. In many ways astrology is really just a different version of psychology and counseling.

A great book to read if you're open-minded but also don't want a bunch of "woo" is to check The Inner Sky by Steven Forrest. The first chapter of the book is called "Why Bother?" For what it's worth I had my chart read by Steven and it has really helped me in my life.

Re: Type-checked non-empty strings

#32

Earlier quoted context omitted.

Astrology and Haskell are quite similar in that both are much much easier to do if you have a math degree.

Are you sure? I can see for Astronomy that's a branch of physics so sure, there's loads of tricky practical mathematics so if you're bad at mathematics you'll get stuff wrong, but surely for Astrology since it's just bullshit anyway you don't need to do mathematics as it wouldn't make a difference?

> since it's just bullshit anyway

Alright, you're on - post the place you were born, including date and time and I'll cast your chart and tell you what I see. Then you can tell me if you think it's bullshit or not.

Free reading, you have nothing to lose.

Example: Milpitas, CA @ 4:52am January 24 1987

Re: Type-checked non-empty strings

#33

Earlier quoted context omitted.

Are you sure? I can see for Astronomy that's a branch of physics so sure, there's loads of tricky practical mathematics so if you're bad at mathematics you'll get stuff wrong, but surely for Astrology since it's just bullshit anyway you don't need to do mathematics as it wouldn't make a difference?

A horoscope is a fine mixture of fortune-telling bullshit and verifiable astronomical facts. The latter have the form of "where the celestial bodies could be seen at the hour of the client's birth", or "does Jupiter currently appear to be moving forward or backward in the sky". The average Visual Basic programmer and the world's best mathematician are going to be about equally good at writing the fortune-telling part…

I don't think the kinds of people that believe astrology are actually verifying the astronomy though.

Re: Type-checked non-empty strings

#34
post #5

"Huh never heard of Bellroy... I wonder what they're using Haskell for..." Turns out it's some kind of bags and accessories brand!

I once saw a job ad for a company selling a horoscope app that required Haskell. An unusual conjunction for sure.

> An unusual conjunction for sure.

I see what you did there

Re: Type-checked non-empty strings

#35

Earlier quoted context omitted.

Does the quality of the astrology depend on the correctness of celestial object positioning? I always assumed it had more to do with the "bedside manner" of the practitioner, and less to do with any measurable falsifiable phenomenon.

You can't do good astrology if the underlying math calculations are wrong. Most mainstream Western astrology uses Placidus houses and then places planets in signs within those houses. From the planetary placements aspects (angles) are calculated. The sign that a planet is in, which house, and aspects between the planets are what enables astrological fortune-telling and prediction (the forecasting aspect of astrology…

> You can't do good astrology if the underlying math calculations are wrong.

So? The people who believe astrology readings would believe them even if the maths is wrong.

The readings themselves don't match outcomes anyway, so it's not like the buyers of readings can even tell that the maths was wrong!

Re: Type-checked non-empty strings

#36
Empty strings are usually an artifact of lazy developers paying a minimal "empty" value for a type (just as 0 for numbers).

A type like NonEmptyString is a weak defense against that, as a lazy dev can just pass a single space character or something similar.

Re: Type-checked non-empty strings

#37
post #8

Very cool that the language allows specification of a type in this way. I added a similar type — “non-empty-string” to a typechecker for PHP, and it’s been adopted widely in the PHP ecosystem. It turns out to be pretty handy, especially when there’s a full type system to support it.

> Very cool that the language allows specification of a type in this way.

Check out Idris 2. Dependent types can get very hairy to work with, but that language is an absolute playground for inductive type-level verification. And the standard library is like a nice Haskell standard library to me in a lot of ways, although the language itself is (unsurprisingly) not nearly as "production ready" as Haskell.

Re: Type-checked non-empty strings

#38

Earlier quoted context omitted.

You can't do good astrology if the underlying math calculations are wrong. Most mainstream Western astrology uses Placidus houses and then places planets in signs within those houses. From the planetary placements aspects (angles) are calculated. The sign that a planet is in, which house, and aspects between the planets are what enables astrological fortune-telling and prediction (the forecasting aspect of astrology…

> You can't do good astrology if the underlying math calculations are wrong. So? The people who believe astrology readings would believe them even if the maths is wrong. The readings themselves don't match outcomes anyway, so it's not like the buyers of readings can even tell that the maths was wrong!

The one thing I know from your comment is that you haven't seriously studied astrology.

Re: Type-checked non-empty strings

#39

Earlier quoted context omitted.

A horoscope is a fine mixture of fortune-telling bullshit and verifiable astronomical facts. The latter have the form of "where the celestial bodies could be seen at the hour of the client's birth", or "does Jupiter currently appear to be moving forward or backward in the sky". The average Visual Basic programmer and the world's best mathematician are going to be about equally good at writing the fortune-telling part…

I don't think the kinds of people that believe astrology are actually verifying the astronomy though.

False. That's just your opinion. The best astrologers are heavily into astronomy and follow astronomy news very closely.

Re: Type-checked non-empty strings

#40

Earlier quoted context omitted.

Are you sure? I can see for Astronomy that's a branch of physics so sure, there's loads of tricky practical mathematics so if you're bad at mathematics you'll get stuff wrong, but surely for Astrology since it's just bullshit anyway you don't need to do mathematics as it wouldn't make a difference?

> since it's just bullshit anyway Alright, you're on - post the place you were born, including date and time and I'll cast your chart and tell you what I see. Then you can tell me if you think it's bullshit or not. Free reading, you have nothing to lose. Example: Milpitas, CA @ 4:52am January 24 1987

I take downvotes as folks being intellectually not curious.

Homies - Silicon Valley is full of people who are into astrology. FFS, this is a community of people whose favorite thing on earth is Burning Man! People who drop acid and do art and experimental living in the desert usually aren't run-of-the-mill "the universe is just a big machine" type thinkers.

Most of the best programmers I know are serious meditators and mindfulness practitioners. There are reasons for this.

Try to open your mind a little.

Post reply on HN