Haskell 中的数据导向编程(SICP 2.4.3)
本文探讨了《计算机程序的构造与解释》(SICP)一书中提出的数据导向编程思想,并将其应用于 Haskell 语言。复数可以以直角坐标形式(实部和虚部)或极坐标形式(模和幅角)存储,无论以何种方式存储,我们都需要能够查询这四个量。文章在之前讨论的标签数据类型基础上,进一步展示了如何通过数据导向的方式实现通用的复数运算。
本文探讨了《计算机程序的构造与解释》(SICP)一书中提出的数据导向编程思想,并将其应用于 Haskell 语言。复数可以以直角坐标形式(实部和虚部)或极坐标形式(模和幅角)存储,无论以何种方式存储,我们都需要能够查询这四个量。文章在之前讨论的标签数据类型基础上,进一步展示了如何通过数据导向的方式实现通用的复数运算。
Jimmy Wales announced that Wikipedia was live at wikipedia.com on January 15, 2001. The site was intended to be a "really quite snazzy" wiki complement to the Nupedia project, offering a more collaborative and less formal environment for building an encyclopedia.
Realta Fusion has achieved a milestone by generating electricity directly from a fusion reaction, reportedly a first. The breakthrough marks a significant step toward practical fusion energy, potentially offering a clean and nearly limitless power source.
OpenAI has announced Daybreak, a new initiative focused on advancing AI safety and alignment research to ensure artificial general intelligence benefits humanity.
SpaceX has announced plans to launch approximately one million satellites to create space-based data centres, according to the European Southern Observatory (ESO). The massive satellite constellation would significantly increase the number of objects in orbit, raising concerns about light pollution and interference with astronomical observations.
Max Weinbach says he had early access to OpenAI's new model GPT-5.6 Sol, calling it his favorite model by far. He highlights that it never gives up and will keep reasoning until it's done. OpenAI announced that GPT-5.6 Sol, along with Terra and Luna, will launch publicly on Thursday, with preview access expanding globally now.