Alex Sun's Technical Notes
website·Indexed 31 days ago
https://blog.alexsun.top/A comprehensive collection of technical notes covering frontend and backend development. Topics include Vue.js and VueUse, Java language fundamentals, TypeScript type challenges, Kubernetes, Docker, Nginx, GraalVM, Prisma ORM, and GitHub Actions.
What's inside Alex Sun's Notes
- Prisma is an open-source ORM framework that provides a data model, automatic migrations, type safety, and auto-completion. It supports relational databases, NoSQL databases (such as MongoDB), and geographic databases (such as CockroachDB). It is compatible with various architectures including REST, GraphQL, and gRPC APIs, and is commonly used with frameworks like Next.js, Remix, SvelteKit, Nuxt, Redwood, and the t3 stack.
Overview of the proposed language design goals
The proposed language is designed as a safe, concise, and 'syntactic sugar-rich' static language that maintains native performance and extreme elegance. It targets developers who want an elegant programming experience, those seeking a system programming language outside of virtual machines (like JVM/PVM), and those writing high-performance programs that remain maintainable. Key design philosophies include:
- Static Nature: Prioritizes static typing for system programming and longevity.
- Useful Abstractions: Avoids complex syntax if a feature can be implemented via a library or a more conventional method.
- Expressions as First-Class: Every statement is an expression (e.g.,
ifandforreturn values), moving closer to functional programming. - Multi-paradigm: Broad support for functional programming and duck typing (similar to TypeScript) without performance loss.
Overview of Mermaid.js
Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions to dynamically create and modify complex diagrams. It allows developers to maintain documentation and visualizations as code, making them easier to update and version control. An official online editor is available at https://mermaid.live/edit for testing syntax, changing themes, and exporting SVGs.Overview of Cursor AI Code Editor
Cursor is a code editor similar to VS Code that features built-in AI chat and coding capabilities powered by OpenAI (GPT-3.5). It provides a free tier of 100 chat requests per month, with a paid 'Cursor Pro' subscription available for higher usage limits ($20/month). Usage quotas can be monitored in the Cursor settings page.Overview of vuepress-solid-template configuration
The vuepress-solid-template provides a zero-configuration setup out of the box. It comes pre-configured with fully functional plugins to support LaTeX and other common documentation requirements, utilizing the latest supported versions of VuePress native themes and ecosystem plugins. Users can add or remove plugins as needed.Introduction to Docker and its core concepts
Docker is an open-source application container engine (Apache 2.0 license) that allows developers to package applications and their dependencies into lightweight, portable containers. These containers use a sandbox mechanism to ensure isolation and provide high performance with minimal overhead compared to traditional virtualization.Overview of soybean-admin technology stack
soybean-admin is an elegant admin template built with the following technology stack:
- Framework: Vue 3, Vite 4, TypeScript
- State Management: Pinia
- UI & Styling: Naive UI, UnoCSS, Sass, Iconify
- Utilities: Axios (Requests), CryptoJS (Encryption), dayjs (Date/Time), VueUse (Composables), cross-env (Environment management)
- Visualization: ECharts, AntV G2
- Tooling: ESLint, Prettier, Commitizen (Git commit standards), Vditor (Markdown editor), xgplayer (H5 video player)
Overview of PySide6
PySide6 is the official Python version of the Qt 6 cross-platform GUI framework. It is developed by the Qt Company and is distributed under the LGPL license, making it more commercially friendly than PyQt (which uses the GPL license). PySide6 supports Linux/X11, macOS, and Microsoft Windows. It utilizes the Shiboken binding generator to reduce binary size and memory footprint.Overview of pnpm features and installation process
pnpm (performance npm) is a package manager designed for speed and disk space efficiency. It avoids 'phantom dependencies' by using a content-addressable store and linking dependencies into thenode_modulesdirectory. The installation process occurs in three stages: dependency resolution, directory structure calculation, and linking dependencies from the store tonode_modules.Overview of PySide6 modules and their functions
PySide6 is organized into several modules providing different functionalities for GUI and system development:
QtWidgets: Window classes and UI controls (buttons, menus, input boxes, lists).QtCore: Core non-GUI functionality, including the meta-object system, properties, object models, signals and slots, timers, files, threads, and processes.QtGui: Basic graphical functions, event handling, 2D graphics, images, and fonts.QtSql: Interfaces and models for relational databases.QtMultimedia: Multimedia handling, including camera, audio/video playback, and recording.QtChart&QtDataVisualization: 2D and 3D data visualization and charting.QtPrintSupport: Printer recognition, print settings, and print/preview dialogs.QtBluetooth: Bluetooth device scanning, connection, and interaction.QtNetwork: TCP/IP and UDP network programming.QtWebEngine&QtWebEngineWidgets: Embedding Chromium-based web browsing functionality.QtXml: XML processing via SAX and DOM APIs.QtOpenGL,QtOpenGLFunctions, &QtOpenGLWidgets: 3D and 2D rendering using OpenGL.QtDesigner: Tools for creating custom controls for Qt Designer.QtSvg: Support for displaying vector graphics files.QtTest: Unit testing functionality for PySide applications.QtStateMachine: Creation and execution of state charts.QtHelp: Integration of online help systems.QtConcurrent: Support for multi-threaded programming.Qt3DCore,Qt3DInput,Qt3DRender,Qt3DAnimation,Qt3DLogic,Qt3DExtras: 3D rendering and real-time animation.
Overview of Matrix Decomposition use cases
Matrix decomposition is used in various data science and machine learning tasks, including:
- Matrix completion (e.g., ALS algorithm for collaborative filtering)
- Cleaning outliers and anomalous data points
- Dimensionality reduction and data compression
- Personalized recommendation systems
- Indirect feature combination (calculating similarity between features)
Overview of FRP (Fast Reverse Proxy)
FRP is a high-performance reverse proxy application written in Go that supports TCP, UDP, HTTP, and HTTPS protocols. It is primarily used for intranet penetration to expose internal services to the public internet. It consists of two components:frps(the server providing the proxy service) andfrpc(the client connecting the internal application to the server). It also includes a web-based management dashboard to monitor proxy status and traffic.