Live data from Hacker News

Marching Events: What does iCalendar have to do with ray marching?

pwy.io

21–30 of 50 posts

Re: Marching Events: What does iCalendar have to do with ray marching?

#21
post #8

Earlier quoted context omitted.

Yep, I knew it as the Japanese format

Not just Japanese, but I believe most East Asian countries as well. Interestingly, not only with dates, but they order things from the “biggest” to the “smallest” Like Year-month-day for dates. Family name - personal names for names. And for address, they start with country, city, street name, then house number. Opposite of what is more common in western countries. I actually find it more useful as very often I remem…

And for address, they start with country, city, street name, then house number.

A generalization that does not apply in places like Tokyo, where many houses are numbered by their age, and street names are not used at all.

Re: Marching Events: What does iCalendar have to do with ray marching?

#22
post #2

I've thought of this a lot! Lots of hospitality booking and pricing engines, for instance, require materialization of complex rules: if suppliers have rules that say "if the checkin is on these 3 days of each week add a price multiplier, which stacks with the holiday pricing event that happens every year, but only if you're a certain number of days out from check-in" you need to be able to render this for arbitrary d…

"if the checkin is on these 3 days of each week add a price multiplier, which stacks with the holiday pricing event that happens every year, but only if you're a certain number of days out from check-in" you need to be able to render this for arbitrary date ranges to provide pricing calendars.

Ugh. I did just this sort of "dynamic pricing" shenanigans for a travel company years ago. It made me feel dirty.

Re: Marching Events: What does iCalendar have to do with ray marching?

#23
post #9

Earlier quoted context omitted.

What do you mean? You can open them in Finder or iOS Files app and a calendar import UI will be shown.

Opening an .ics file on iOS from the Files app will show the events, but will not allow you to import/add them to your calendar.

Opening an .ics file on iOS from the Files app will show the events, but will not allow you to import/add them to your calendar.

Not true. I just tried it on an iPhone 14 with iOS 18.4, and it works fine.

You tap on the ics icon, and it opens up the details. Tap "Done" and the event lands in the calendar you specified.

Re: Marching Events: What does iCalendar have to do with ray marching?

#24
post #8

Earlier quoted context omitted.

Yep, I knew it as the Japanese format

Not just Japanese, but I believe most East Asian countries as well. Interestingly, not only with dates, but they order things from the “biggest” to the “smallest” Like Year-month-day for dates. Family name - personal names for names. And for address, they start with country, city, street name, then house number. Opposite of what is more common in western countries. I actually find it more useful as very often I remem…

Also applies to Hungarian and Lithuanian, which are in Europe. Still, I agree, weird to characterize it as European.

Re: Marching Events: What does iCalendar have to do with ray marching?

#25
post #5
post #4

> yes, this blog is a proud user of the european date format - if you don't want to see yyyy-mm-dd's, please press alt-f4 and go back to boycotting bud light or something Interesting to call this the "european date format", given that prior to ISO 8601 I'm pretty sure this date order was almost entirely used in East Asia and not Europe. To me day-month-year will always be the European date order.

Ah, you're right - I wanted to include a dunk, but forgot to actually fact-check it! -- gotta figure out something better.

Why would you want to do that? I don’t think Europeans realize how familiar technical and engineering minded Americans are with metric. It’s just so overplayed.

GP is right my default reaction as a MM/DD/YYYY dumb American was that you didn’t make sense because that is the internationally standardized unambiguous format and what we all use for dates where sorting or i18n matters. Sorry for rant you probably don’t deserve it but for real that is the lamest joke imaginable and your content is good enough that it doesn’t need “dunks”

Edit: get dunked on

Re: Marching Events: What does iCalendar have to do with ray marching?

#26
First, thanks for this mental model; I've got a project with iCals where I haven't been happy with the logic, and maybe I can clean it up with this! But I don't think the text matches the examples...

This seems like an error?

> (day-of-month 12 2018-01-14) = 2018-02-14 > // 2018-01-12 is the closest 12th day of month starting from 2018-01-14 (-2d), > // but that corresponds to a negative span, so we jump to the next month

Shouldn't the nearest 12th day of the month after the 14th of January be 2018-02-12 ?

> Rule::DayOfMonth(31) > .next(date("2018-02-14"))

> ... will say 2018-03-03 - which is legal, because the actual next occurrence happens on 2018-03-31, for which 2018-03-03 is a valid underapproximation.

But I would expect curr.last_of_month().tomorrow().unwrap(), to return 2018-03-01 ???

Re: Marching Events: What does iCalendar have to do with ray marching?

#27
post #9

Earlier quoted context omitted.

What do you mean? You can open them in Finder or iOS Files app and a calendar import UI will be shown.

Opening an .ics file on iOS from the Files app will show the events, but will not allow you to import/add them to your calendar.

Apple's built-in Calendar program on macOS will import VEVENT entries just fine; most programs handle VEVENTs in an .ics file well.

VTODO, on the other hand, is broken in many applications, and I've only gotten VTODO to work on Mac once in my life—and I don't remember how. Outlook flat-out ignores VTODO.

If every calendar app supported VEVENT and VTODO well, my life would be much, much simpler. I'm required to use some cloud software that tracks events and tasks, and I'd love to sync it to my phone and have those events and tasks show up as events and tasks. But, because very few calendars import VEVENT correctly (or at all), my cloud software exports both events and tasks as VEVENTs—events for the correct duration, and tasks as a five-minute event on the due date. This is a stupid kludge to get around the usual bad support of VEVENT, and it's one of the things that raises my blood pressure the most.

Re: Marching Events: What does iCalendar have to do with ray marching?

#28
post #5

Earlier quoted context omitted.

Ah, you're right - I wanted to include a dunk, but forgot to actually fact-check it! -- gotta figure out something better.

Why would you want to do that? I don’t think Europeans realize how familiar technical and engineering minded Americans are with metric. It’s just so overplayed. GP is right my default reaction as a MM/DD/YYYY dumb American was that you didn’t make sense because that is the internationally standardized unambiguous format and what we all use for dates where sorting or i18n matters. Sorry for rant you probably don’t des…

Seems like the dig dug into you to make you respond like this.

Re: Marching Events: What does iCalendar have to do with ray marching?

#29
post #4

> yes, this blog is a proud user of the european date format - if you don't want to see yyyy-mm-dd's, please press alt-f4 and go back to boycotting bud light or something Interesting to call this the "european date format", given that prior to ISO 8601 I'm pretty sure this date order was almost entirely used in East Asia and not Europe. To me day-month-year will always be the European date order.

To me day-month-year will always be the European date order. If you're a fan of digging through old letters in British antiques stores, you'll find that the "American" date format that people on the internet like to complain about was inherited from Britain (along with the imperial measurement system). It was only after the American Revolutionary War that Britain switched to putting the day before the month. Probably…

Fun fact: you can be the change you want to see!

I fill out all paper forms and typed dates as yyyy-MM-dd wherever possible. No one has ever been confused by it. Some have even copied it.

I also give units in metric sometimes and set some of my thermometers to C to help build my intuition for what different C temps feel like.

On the other hand I'm setting up a hobby machine shop at home and trying to use metric or a metric lathe would involve too much swimming upstream so alas - it is all imperial stuff.

Re: Marching Events: What does iCalendar have to do with ray marching?

#30
post #2

I've thought of this a lot! Lots of hospitality booking and pricing engines, for instance, require materialization of complex rules: if suppliers have rules that say "if the checkin is on these 3 days of each week add a price multiplier, which stacks with the holiday pricing event that happens every year, but only if you're a certain number of days out from check-in" you need to be able to render this for arbitrary d…

Curiously enough, I've used to work in hospitality! ( https://pwy.io/posts/mimalloc-cigarette/ & https://pwy.io/posts/memory-for-nothing/ ) Our dataset wasn't so large as to warrant experimenting with GPUs - `cost(extraCpu) I like when seemingly engineering-oriented problems turn out to be way more approachable once you apply / invent / adjust some math foundations, e.g. like with Feldera ( https://sigmodrecord.org/p…

A channel manager using Rust for the caching layer? That's actually kind of incredible. Might want to pick your brain someday :)

And Feldera/DBSP is absolute magic - definitely something I want to dig deeper into!

Post reply on HN