Live data from Hacker News

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

pwy.io

41–50 of 50 posts

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

#41
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…

> that is the lamest joke imaginable and your content is good enough that it doesn’t need “dunks”

Hah - fair enough!

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

#42
post #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…

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

You're right, thanks - fixed! Small typos like those are the hill I'll die on.

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

This case actually matches the `Ordering::Less` branch (14

    Ordering::Less => curr + Span::new().days(day - curr.day()),
... yielding this calculation:

    2018-02-14 + (31 - 14) = 2018-03-03
Since the actual next occurrence is on 2018-03-31, 2018-03-03 is a valid guess (just a suboptimal one).

I've rephrased this section in the article to show the calculation more clearly now.

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

#43

Would this work for network ACLs?

ACLs are more like a binary function, right?

    f(packet, time, ...) = { reject, allow }
In that case evaluating the function once is enough to know whether the packet should be let through or not, there's no way to sort of "differentiate" this function, no way to step through it.

But this got me thinking about cases where policy _modifies_ the packet, like:

    f(packet, time, ...) = ({ reject, allow }, new-packet)
In this case you'd be looking for a fixed-point, evaluating this function until new-packet = packet (or you exhaust some time and give up). Not sure on the potential utility, though - just a random thought.

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

#44
post #9

Earlier quoted context omitted.

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.

What can I say, other than we have very different experiences. Opening an .ics file from the Files app indeed shows its details, but selecting "Done" does nothing but dismiss its contents and adds nothing to the calendar.

Contrast this with opening the same .ics file from an email attachment or viewing it online, which presents an "Add All" button.

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

#45

Earlier quoted context omitted.

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…

Conspiracy theory: US will never switch to metric because then you'd sell half as many tools. I'm joking of course but there's a grain of truth. The meme of a lost 10mm socket is just as true in America and most tool sets come with both imperial and metric sizes. It's really annoying to have to double up. But wouldn't be America if we didn't have unnecessary complexity, right? Can't be a real programmer™ without faci…

[deleted]

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

#46
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. Please don't use dd-mm-yyyy. It's better to use different separators to clarify the date format. The three common formats are yyyy-mm-dd, dd.mm.yyyy and mm/dd/yyyy.

Much of that depends on country for usage.

In the U.K. when handwriting I think dd/mm/yyyy is much more common than dd.mm.yyyy

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

#47

Earlier quoted context omitted.

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…

Conspiracy theory: US will never switch to metric because then you'd sell half as many tools. I'm joking of course but there's a grain of truth. The meme of a lost 10mm socket is just as true in America and most tool sets come with both imperial and metric sizes. It's really annoying to have to double up. But wouldn't be America if we didn't have unnecessary complexity, right? Can't be a real programmer™ without faci…

better mousetraps solutions exist: https://metrinch.com/metrinch_en/

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

#48

Would this work for network ACLs?

ACLs are more like a binary function, right? f(packet, time, ...) = { reject, allow } In that case evaluating the function once is enough to know whether the packet should be let through or not, there's no way to sort of "differentiate" this function, no way to step through it. But this got me thinking about cases where policy _modifies_ the packet, like: f(packet, time, ...) = ({ reject, allow }, new-packet) In this…

Makes sense. Advanced ACL analyzers translate them into first order logic and then use something like Z3 to find the packets that satisfy them but they rarely support the time based ACLs. But those are not used much in practice.

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

#49
post #9

Earlier quoted context omitted.

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 so…

We made the deliberate choice on MacOS to remove VTODO from iCal when it split out to the Reminders App and started to go beyond the open protocol.

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

#50

Earlier quoted context omitted.

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.

What can I say, other than we have very different experiences. Opening an .ics file from the Files app indeed shows its details, but selecting "Done" does nothing but dismiss its contents and adds nothing to the calendar. Contrast this with opening the same .ics file from an email attachment or viewing it online, which presents an "Add All" button.

I thought, surely this can’t be right - but can confirm that this is the behaviour I see as well, opening a .ics file in Files lets you inspect the event but doesn’t seem to give you any way of importing it into a calendar (even from the share sheet). Maybe you could email the file to yourself but that seems like a pretty roundabout way of doing it.

Not that I ever get a .ics file from anywhere except my emails, but it would be nice to be able to actually use them if I have them.

Post reply on HN