News for hackers. Stuff that matters.

avitzur

Re:I need your clothes, your boots, and your motorcycle on Thursday June 18, 2026 @04:19PM (#48590951)
Good times, good times.
Re:Desmos 3D graphing calculator (beta) on Friday October 13, 2023 @10:01AM (#37870720)
Well howdy, old-timer! That brings back some memories. (The '80s: after the dinosaurs, but before the giant armored sloths - back when neutrinos were massless and Λ was zero.)

Did you work on Axiom? That was the finest crafted computer algebra system.

Re:Desmos 3D graphing calculator (beta) on Thursday October 12, 2023 @07:37PM (#37864575)
You're welcome
Re:Shipping Graphing Calculator on Saturday February 04, 2023 @12:05PM (#34655974)
Erin Ottmar's https://graspablemath.com is probably the best current exploration of the idea.
Re:The Graphing Calculator Story on Monday October 17, 2022 @01:54PM (#33237326)
At Apple? None whatsoever. It was a surprising fluke that even in the Apple of 1993. It only succeeded because so many people helped. That Apple was beleaguered at the time may have given employees a certain devil-may-care attitude towards their own job security and a willing to cross certain lines to assist us or look the other way.
Re:The Graphing Calculator Story on Monday October 17, 2022 @11:25AM (#33234835)
Btw, I wrote that, Ask Me Anything.
Re:The Graphing Calculator Story on Monday October 17, 2022 @11:24AM (#33234822)
Amy O'Leary tells my favorite version of this story on This American Life:

https://www.thisamericanlife.org/284/should-i-stay-or-should...

Re:Porting Graphing Calculator from C++ to Swift on Tuesday July 05, 2022 @12:34PM (#31990419)
Yes, the numeric evaluation is vectorized via the Accelerate Framework's vForce and vDSP APIs. That is a significant performance improvement. The numeric evaluation remains a hotspot with vectorization, as that is where the app does most of its work.
Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @01:14PM (#31969262)
Applications / Utilities / Grapher is a different application (formerly Curvus Pro X from Arizona Software) which replaced the original Mac OS 7 Apple menu Graphing Calculator because I was very slow porting to Mac OS X.
Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @01:12PM (#31969238)
That thread describes me working through performance issues in the initial port eight months ago. Those cases perform adequately now. Parsing is not a bottleneck. Walking the bytecode remains a performance hotspot, as that is where all the numeric calculations occur, but no more or less so comparing the C++ and Swift implementations.

I did investigate maintaining the flex/bison parser, since its generated state machine C code is more robust than my handwritten recursive descent parser when presented with pathological input. However, as you say, since I need a Swift data structure in the end, there is little to be gained and a lot of complication bridging via a C-FFI.

Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @10:57AM (#31968178)
Thank you! I can't believe that was thirty years ago. It feels unreal.
Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @10:55AM (#31968168)
The math is internally represented as a tree for display and editing. Most of the performance critical code is the numeric evaluation when graphing. For that, the math is compiled to a linear byte code which vastly improves locality of reference and is an opportunity to apply optimizations such as common subexpression elimination and loop invariant code motion.
Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @10:50AM (#31968118)
Most of the performance critical sections are numeric computation loops. I use the Unsafe APIs where profiling shows that the bounds-checking overhead is significant.

In principle, I could get rid of reference counting overhead by using value types or immutable data. I couldn't see a simple path to doing that without re-architecting everything (with no guarantee that the end result would not just have different performance issues.) For the moment, I'm awaiting compiler improvements before re-evaluating the tradeoffs. There is certainly room for the compiler to reason better on eliding retain/release. https://github.com/apple/swift/issues/58549

Yes, the code does use Accelerate where applicable. That is one component of the numeric evaluation. It addresses the lowest level of things like evaluate the sin function on every array element, or multiply there arrays element wise. Performance tuning is a game of whack-a-mole. There's always another bottleneck somewhere.

Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @12:48AM (#31965155)
I wrote the blog post. AMA.
Re:Porting Graphing Calculator from C++ to Swift on Sunday July 03, 2022 @12:47AM (#31965147)
It has been in continuous development since 1985. Before the port, parts were in C, C++, Objective-C, and Objective-C++, as well as Lex, Yacc, GLSL, and Python. Will do the top-level comment.
Re:Porting Graphing Calculator from C++ to Swift on Saturday July 02, 2022 @02:45PM (#31961333)
Yes, precisely. I looked into bridging to C++ initially, but it was impractical.
Re:The Graphing Calculator Story (2004) on Saturday October 17, 2020 @10:50PM (#24815155)
Re:The Graphing Calculator Story (2004) on Friday July 20, 2018 @05:27PM (#17579093)
THANK YOU!!!
Re:The Graphing Calculator Story (2004) on Tuesday April 10, 2018 @07:39PM (#16806714)
We were trying to build an iPad with 1992 technology. http://arno.org/arnotify/2010/01/penmac/
Re:The Graphing Calculator Story (2004) on Tuesday April 10, 2018 @07:38PM (#16806702)
Thank you!
50, and still programming on the same codebase I started when I was 18.
Re:The Graphing Calculator Story (2004) on Friday May 02, 2014 @01:02AM (#7684207)
Yes, as well as FullWrite and many other products.
When the hardware failure is more frequent than failures in your software, we can consider that "good enough" (for consumer-level applications.)
Re:The Graphing Calculator Story on Friday March 02, 2007 @01:14PM (#1870)
I started programming on an HP-65 in the 70's. That was before graphing calculators, though.