Compare commits
13 Commits
fda4c01c22
...
master
Author | SHA1 | Date | |
---|---|---|---|
58ba4b2a2f
|
|||
009e86b553
|
|||
d1ec3a51d1
|
|||
dab866f13a
|
|||
94421168c6 | |||
938fe1c715 | |||
eedfc1ffce | |||
0f346d9ded | |||
a662ecc14b | |||
a254d0123d | |||
22d28e763d | |||
d0a4f4b76b | |||
3126005731 |
@@ -15,6 +15,9 @@ trim_trailing_whitespace = true
|
|||||||
[project.json]
|
[project.json]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.{yaml,yml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
# C# and Visual Basic files
|
# C# and Visual Basic files
|
||||||
[*.{cs,vb}]
|
[*.{cs,vb}]
|
||||||
charset = utf-8-bom
|
charset = utf-8-bom
|
||||||
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,2 +1,5 @@
|
|||||||
*.png filter=lfs diff=lfs merge=lfs -text
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
*.jpg filter=lfs diff=lfs merge=lfs -text
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.avif filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.webp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
@@ -1,33 +1,36 @@
|
|||||||
name: Build blog docker image
|
name: Build blog docker image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
Build-Blog-Image:
|
Build-Blog-Image:
|
||||||
runs-on: archlinux
|
runs-on: archlinux
|
||||||
steps:
|
steps:
|
||||||
- uses: https://mirrors.rrricardo.top/actions/checkout.git@v4
|
- name: Check out code.
|
||||||
name: Check out code
|
uses: https://mirrors.rrricardo.top/actions/checkout.git@v4
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Build project
|
- name: Build project.
|
||||||
run: |
|
run: |
|
||||||
cd YaeBlog
|
cd YaeBlog
|
||||||
dotnet publish
|
dotnet publish
|
||||||
- name: Build docker image
|
- name: Build docker image.
|
||||||
run: |
|
run: |
|
||||||
cd YaeBlog
|
proxy
|
||||||
podman build . -t registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest
|
podman pull mcr.microsoft.com/dotnet/aspnet:9.0
|
||||||
- name: Workaround to make sure podman login succeed
|
unproxy
|
||||||
run: |
|
cd YaeBlog
|
||||||
mkdir /root/.docker
|
podman build . -t ccr.ccs.tencentyun.com/jackfiled/blog --build-arg COMMIT_ID=$(git rev-parse --short=10 HEAD)
|
||||||
- name: Login aliyun docker registry
|
- name: Workaround to make sure podman-login working.
|
||||||
uses: https://mirrors.rrricardo.top/actions/podman-login.git@v1
|
run: |
|
||||||
with:
|
mkdir /root/.docker
|
||||||
registry: registry.cn-beijing.aliyuncs.com
|
- name: Login tencent cloud docker registry.
|
||||||
username: 初冬的朝阳
|
uses: https://mirrors.rrricardo.top/actions/podman-login.git@v1
|
||||||
password: ${{ secrets.ALIYUN_PASSWORD }}
|
with:
|
||||||
auth_file_path: /etc/containers/auth.json
|
registry: ccr.ccs.tencentyun.com
|
||||||
- name: Push docker image
|
username: 100044380877
|
||||||
run: podman push registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest
|
password: ${{ secrets.TENCENT_REGISTRY_PASSWORD }}
|
||||||
|
auth_file_path: /etc/containers/auth.json
|
||||||
|
- name: Push docker image.
|
||||||
|
run: podman push ccr.ccs.tencentyun.com/jackfiled/blog:latest
|
||||||
|
29
YaeBlog/Components/AppreciationCode.razor
Normal file
29
YaeBlog/Components/AppreciationCode.razor
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="flex flex-wrap justify-center gap-12 max-w-md md:max-w-lg">
|
||||||
|
<div class="relative w-40 h-48 md:w-48 md:w-48 overflow-hidden
|
||||||
|
transition-all duration-300 ease-out hover:scale-125 group">
|
||||||
|
<img
|
||||||
|
src="./images/wechat-code.jpeg"
|
||||||
|
alt="微信赞赏码"
|
||||||
|
class="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
<div class="absolute -bottom-8 left-0 right-0 text-center
|
||||||
|
text-white bg-black opacity-60 text-sm font-medium
|
||||||
|
backdrop-blur-sm group-hover:bottom-2 transition-all duration-300">
|
||||||
|
请我喝奶茶<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="relative w-40 h-48 md:w-48 md:h-48 overflow-hidden
|
||||||
|
transition-all duration-300 ease-out hover:scale-125 group">
|
||||||
|
<img
|
||||||
|
src="./images/alipay-code.jpeg"
|
||||||
|
alt="支付宝赞赏码"
|
||||||
|
class="w-full h-full object-cover"/>
|
||||||
|
<div class="absolute -bottom-8 left-0 right-0 text-center
|
||||||
|
text-white bg-black opacity-60 text-sm font-medium
|
||||||
|
backdrop-blur-sm group-hover:bottom-2 transition-all duration-300">
|
||||||
|
请我吃晚饭<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
@@ -7,11 +7,15 @@
|
|||||||
<Anchor Address="https://dotnet.microsoft.com" Text="@DotnetVersion"/>
|
<Anchor Address="https://dotnet.microsoft.com" Text="@DotnetVersion"/>
|
||||||
驱动。
|
驱动。
|
||||||
</p>
|
</p>
|
||||||
|
<p class="text-md">
|
||||||
|
Build Commit #
|
||||||
|
<Anchor Address="@BuildCommitUrl" Text="@BuildCommitId"/>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p class="text-md">
|
<p class="text-md">
|
||||||
<a href="https://beian.miit.gov.cn" target="_blank" class="text-black">蜀ICP备2022004429号-1</a>
|
<Anchor Address="https://beian.miit.gov.cn" Text="蜀ICP备2022004429号-1" NewPage="true"/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,4 +23,8 @@
|
|||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
private string DotnetVersion => $".NET {Environment.Version}";
|
private string DotnetVersion => $".NET {Environment.Version}";
|
||||||
|
|
||||||
|
private string BuildCommitId => Environment.GetEnvironmentVariable("COMMIT_ID") ?? "local_build";
|
||||||
|
|
||||||
|
private string BuildCommitUrl => $"https://git.rrricardo.top/jackfiled/YaeBlog/commit/{BuildCommitId}";
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,3 @@
|
|||||||
@using YaeBlog.Models
|
|
||||||
@inject BlogOptions Options
|
|
||||||
|
|
||||||
<div class="px-4 py-8 border border-sky-700 rounded-md bg-sky-200">
|
<div class="px-4 py-8 border border-sky-700 rounded-md bg-sky-200">
|
||||||
<div class="flex flex-col gap-3 text-md">
|
<div class="flex flex-col gap-3 text-md">
|
||||||
<div>
|
<div>
|
||||||
@@ -24,6 +21,17 @@
|
|||||||
Ricardo's Blog
|
Ricardo's Blog
|
||||||
</a>”。
|
</a>”。
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col">
|
||||||
|
<div class="flex justify-center">
|
||||||
|
<p>如果觉得不错的话,可以支持一下作者哦~</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-center">
|
||||||
|
<AppreciationCode/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||||||
|
|
||||||
|
ARG COMMIT_ID
|
||||||
|
ENV COMMIT_ID=${COMMIT_ID}
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY bin/Release/net9.0/publish/ ./
|
COPY bin/Release/net9.0/publish/ ./
|
||||||
COPY source/ ./source/
|
COPY source/ ./source/
|
||||||
|
12
YaeBlog/Exceptions/BlogCommandException.cs
Normal file
12
YaeBlog/Exceptions/BlogCommandException.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
namespace YaeBlog.Core.Exceptions;
|
||||||
|
|
||||||
|
public class BlogCommandException : Exception
|
||||||
|
{
|
||||||
|
public BlogCommandException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlogCommandException(string message, Exception innerException) : base(message, innerException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@@ -6,10 +6,7 @@ namespace YaeBlog.Models;
|
|||||||
public record BlogContents(ConcurrentBag<BlogContent> Drafts, ConcurrentBag<BlogContent> Posts)
|
public record BlogContents(ConcurrentBag<BlogContent> Drafts, ConcurrentBag<BlogContent> Posts)
|
||||||
: IEnumerable<BlogContent>
|
: IEnumerable<BlogContent>
|
||||||
{
|
{
|
||||||
IEnumerator<BlogContent> IEnumerable<BlogContent>.GetEnumerator()
|
public IEnumerator<BlogContent> GetEnumerator() => Posts.Concat(Drafts).GetEnumerator();
|
||||||
{
|
|
||||||
return Posts.Concat(Drafts).GetEnumerator();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerator GetEnumerator() => ((IEnumerable<BlogContent>)this).GetEnumerator();
|
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,11 @@
|
|||||||
{
|
{
|
||||||
_page = Page ?? 1;
|
_page = Page ?? 1;
|
||||||
_pageCount = Contents.Count / EssaysPerPage + 1;
|
_pageCount = Contents.Count / EssaysPerPage + 1;
|
||||||
|
(_pageCount, int reminder) = int.DivRem(Contents.Count, EssaysPerPage);
|
||||||
|
if (reminder > 0)
|
||||||
|
{
|
||||||
|
_pageCount += 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (EssaysPerPage * _page > Contents.Count + EssaysPerPage)
|
if (EssaysPerPage * _page > Contents.Count + EssaysPerPage)
|
||||||
{
|
{
|
||||||
|
@@ -16,11 +16,11 @@ public sealed class BlogHotReloadService(
|
|||||||
|
|
||||||
await rendererService.RenderAsync(true);
|
await rendererService.RenderAsync(true);
|
||||||
|
|
||||||
Task[] reloadTasks = [FileWatchTask(stoppingToken)];
|
Task[] reloadTasks = [WatchFileAsync(stoppingToken)];
|
||||||
await Task.WhenAll(reloadTasks);
|
await Task.WhenAll(reloadTasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task FileWatchTask(CancellationToken token)
|
private async Task WatchFileAsync(CancellationToken token)
|
||||||
{
|
{
|
||||||
while (!token.IsCancellationRequested)
|
while (!token.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
@@ -33,6 +33,15 @@ public sealed class BlogHotReloadService(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInfo changeFileInfo = new(changeFile);
|
||||||
|
|
||||||
|
if (changeFileInfo.Name.StartsWith('.'))
|
||||||
|
{
|
||||||
|
// Ignore dot-started file and directory.
|
||||||
|
logger.LogDebug("Ignore hidden file: {}.", changeFile);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
logger.LogInformation("{} changed, re-rendering.", changeFile);
|
logger.LogInformation("{} changed, re-rendering.", changeFile);
|
||||||
essayContentService.Clear();
|
essayContentService.Clear();
|
||||||
await rendererService.RenderAsync(true);
|
await rendererService.RenderAsync(true);
|
||||||
|
@@ -109,6 +109,12 @@ public partial class EssayScanService : IEssayScanService
|
|||||||
{
|
{
|
||||||
foreach (BlogResult blog in fileContents)
|
foreach (BlogResult blog in fileContents)
|
||||||
{
|
{
|
||||||
|
if (blog.BlogContent.Length < 4)
|
||||||
|
{
|
||||||
|
// Even not contains a legal header.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
int endPos = blog.BlogContent.IndexOf("---", 4, StringComparison.Ordinal);
|
int endPos = blog.BlogContent.IndexOf("---", 4, StringComparison.Ordinal);
|
||||||
if (!blog.BlogContent.StartsWith("---") || endPos is -1 or 0)
|
if (!blog.BlogContent.StartsWith("---") || endPos is -1 or 0)
|
||||||
{
|
{
|
||||||
@@ -121,14 +127,14 @@ public partial class EssayScanService : IEssayScanService
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
MarkdownMetadata metadata = _yamlDeserializer.Deserialize<MarkdownMetadata>(metadataString);
|
MarkdownMetadata metadata = _yamlDeserializer.Deserialize<MarkdownMetadata>(metadataString);
|
||||||
_logger.LogDebug("Scan metadata title: '{}' for {}.", metadata.Title, blog.BlogFile.Name);
|
_logger.LogDebug("Scan metadata title: '{title}' for {name}.", metadata.Title, blog.BlogFile.Name);
|
||||||
|
|
||||||
contents.Add(new BlogContent(blog.BlogFile, metadata, blog.BlogContent[(endPos + 3)..], isDraft,
|
contents.Add(new BlogContent(blog.BlogFile, metadata, blog.BlogContent[(endPos + 3)..], isDraft,
|
||||||
blog.Images, blog.NotFoundImages));
|
blog.Images, blog.NotFoundImages));
|
||||||
}
|
}
|
||||||
catch (YamlException e)
|
catch (YamlException e)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Failed to parser metadata from {} due to {}, skipping", blog.BlogFile.Name, e);
|
_logger.LogWarning("Failed to parser metadata from {name} due to {exception}, skipping", blog.BlogFile.Name, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -56,7 +56,7 @@ public sealed class ImageCompressService(IEssayScanService essayScanService, ILo
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompressResult[] compressedImages = (await Task.WhenAll(from image in uncompressedImages
|
CompressResult[] compressedImages = (await Task.WhenAll(from image in uncompressedImages
|
||||||
select Task.Run(async () => new CompressResult(image, await ConvertToWebp(image.Content))))).ToArray();
|
select Task.Run(async () => new CompressResult(image, await ConvertToWebp(image))))).ToArray();
|
||||||
|
|
||||||
compressedSize += compressedImages.Select(i => i.CompressContent.Length).Sum();
|
compressedSize += compressedImages.Select(i => i.CompressContent.Length).Sum();
|
||||||
|
|
||||||
@@ -65,7 +65,8 @@ public sealed class ImageCompressService(IEssayScanService essayScanService, ILo
|
|||||||
select r.ImageInfo with
|
select r.ImageInfo with
|
||||||
{
|
{
|
||||||
File = new FileInfo(r.ImageInfo.File.FullName.Split('.')[0] + ".webp"),
|
File = new FileInfo(r.ImageInfo.File.FullName.Split('.')[0] + ".webp"),
|
||||||
Content = r.CompressContent
|
Content = r.CompressContent,
|
||||||
|
MineType = "image/webp"
|
||||||
}).ToList();
|
}).ToList();
|
||||||
// 修改文本
|
// 修改文本
|
||||||
string blogContent = compressedImages.Aggregate(content.Content, (c, r) =>
|
string blogContent = compressedImages.Aggregate(content.Content, (c, r) =>
|
||||||
@@ -88,21 +89,31 @@ public sealed class ImageCompressService(IEssayScanService essayScanService, ILo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<byte[]> ConvertToWebp(byte[] image)
|
private static async Task<byte[]> ConvertToWebp(BlogImageInfo image)
|
||||||
{
|
{
|
||||||
using ImageJob job = new();
|
using ImageJob job = new();
|
||||||
BuildJobResult result = await job.Decode(MemorySource.Borrow(image))
|
BuildJobResult result = await job.Decode(MemorySource.Borrow(image.Content))
|
||||||
|
.Branch(f => f.EncodeToBytes(new WebPLosslessEncoder()))
|
||||||
.EncodeToBytes(new WebPLossyEncoder(75))
|
.EncodeToBytes(new WebPLossyEncoder(75))
|
||||||
.Finish()
|
.Finish()
|
||||||
.InProcessAsync();
|
.InProcessAsync();
|
||||||
|
|
||||||
ArraySegment<byte>? array = result.First?.TryGetBytes();
|
// 超过128KB的图片使用有损压缩
|
||||||
|
// 反之使用无损压缩
|
||||||
|
|
||||||
if (array.HasValue)
|
ArraySegment<byte>? losslessImage = result.TryGet(1)?.TryGetBytes();
|
||||||
|
ArraySegment<byte>? lossyImage = result.TryGet(2)?.TryGetBytes();
|
||||||
|
|
||||||
|
if (image.Size <= 128 * 1024 && losslessImage.HasValue)
|
||||||
{
|
{
|
||||||
return array.Value.ToArray();
|
return losslessImage.Value.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BlogFileException();
|
if (lossyImage.HasValue)
|
||||||
|
{
|
||||||
|
return lossyImage.Value.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new BlogCommandException($"Failed to convert {image.File.Name} to webp format: return value is null.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ImageFlow.NativeRuntime.ubuntu-x86_64" Version="2.1.0-rc11"/>
|
<PackageReference Include="ImageFlow.NativeRuntime.ubuntu-x86_64" Version="2.1.0-rc11" Condition="$([MSBuild]::IsOsPlatform('Linux'))"/>
|
||||||
|
<PackageReference Include="ImageFlow.NativeRuntime.osx-arm64" Version="2.1.0-rc11" Condition="$([MSBuild]::IsOsPlatform('OSX'))"/>
|
||||||
<PackageReference Include="ImageFlow.Net" Version="0.13.2"/>
|
<PackageReference Include="ImageFlow.Net" Version="0.13.2"/>
|
||||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
|
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
|
||||||
<PackageReference Include="AngleSharp" Version="1.1.0"/>
|
<PackageReference Include="AngleSharp" Version="1.1.0"/>
|
||||||
|
@@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 2021年终总结
|
title: 2021年终总结
|
||||||
date: 2022-01-12 16:27:19
|
date: 2022-01-12T16:27:19.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
- 年终总结
|
- 年终总结
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
2021年已经过去,2022年已经来临。每每一年开始的时候,我都会展开一张纸或者新建一个文档,思量着又是一年时光,也该同诸大杂志一般,写几句意味深长的话语,怀念过去的时光,也祝福未来的自己。可往往脑海中已是三万字的长篇,落在笔头却又是一个字都没有了。
|
2021年已经过去,2022年已经来临。每每一年开始的时候,我都会展开一张纸或者新建一个文档,思量着又是一年时光,也该同诸大杂志一般,写几句意味深长的话语,怀念过去的时光,也祝福未来的自己。可往往脑海中已是三万字的长篇,落在笔头却又是一个字都没有了。
|
||||||
如今跨年的时候已经过去,朋友圈中已经不见文案的踪影,我也该重新提笔,细说自己2021年中做过的种种。
|
如今跨年的时候已经过去,朋友圈中已经不见文案的踪影,我也该重新提笔,细说自己2021年中做过的种种。
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ tags:
|
|||||||
在前12年的学生生涯中,我们都在期待着这一次的暑假,以为在这个没有作业的假期里,我们就可以充分的享受人间的美好。可是,当时我们不知道,这人间的烦恼,可不止作业这一种,无论是突如其来的疫情导致开学延期,还是等待录取时的不安。
|
在前12年的学生生涯中,我们都在期待着这一次的暑假,以为在这个没有作业的假期里,我们就可以充分的享受人间的美好。可是,当时我们不知道,这人间的烦恼,可不止作业这一种,无论是突如其来的疫情导致开学延期,还是等待录取时的不安。
|
||||||
虽说在暑假时,拥有了自己的笔记本电脑,可是在高中三年屯下的游戏还是没有玩几个,看来我也是“喜加一”的受害者。虽然在高考后入坑了原神,但是假期间我并没有太过投入的玩。
|
虽说在暑假时,拥有了自己的笔记本电脑,可是在高中三年屯下的游戏还是没有玩几个,看来我也是“喜加一”的受害者。虽然在高考后入坑了原神,但是假期间我并没有太过投入的玩。
|
||||||
暑假下定决心要好好的学一学,可是看着我gitee上暑假期间那稀疏的提交,我就知道我又摸了一个暑假的鱼。
|
暑假下定决心要好好的学一学,可是看着我gitee上暑假期间那稀疏的提交,我就知道我又摸了一个暑假的鱼。
|
||||||

|

|
||||||
即使我想写的很多项目都没有被扎实的推进下来,但是学习的一些的C语言还是让我受益匪浅。
|
即使我想写的很多项目都没有被扎实的推进下来,但是学习的一些的C语言还是让我受益匪浅。
|
||||||
现在看来,这个假期真是,**学也没有学好,耍也没有耍好**的典型。
|
现在看来,这个假期真是,**学也没有学好,耍也没有耍好**的典型。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/2021-final/1.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2021-final/1.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2021-final/1.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2021-final/1.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: 2022年终总结
|
title: 2022年终总结
|
||||||
|
date: 2022-12-30T14:58:12.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
- 年终总结
|
- 年终总结
|
||||||
date: 2022-12-30 14:58:12
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2022是困难的一年。我们需要为2023年做好准备。
|
2022是困难的一年。我们需要为2023年做好准备。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -57,11 +58,11 @@ date: 2022-12-30 14:58:12
|
|||||||
|
|
||||||
小小的总结一下:2022年可以算得上是一事无成的一年,还搞砸了不少的事情。在写代码上进展有限,成绩上大幅倒退,说好的六级英语和大学物理竞赛都没有参加,在年末应对疫情进展的时候更是把“不知所措”这个成语诠释的淋漓尽致。
|
小小的总结一下:2022年可以算得上是一事无成的一年,还搞砸了不少的事情。在写代码上进展有限,成绩上大幅倒退,说好的六级英语和大学物理竞赛都没有参加,在年末应对疫情进展的时候更是把“不知所措”这个成语诠释的淋漓尽致。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
关于今年的人际交往和社会关系,我愿意用QQ2022年年终总结中的一张截屏来总结,这张图片透漏出一种无可救药的悲伤。
|
关于今年的人际交往和社会关系,我愿意用QQ2022年年终总结中的一张截屏来总结,这张图片透漏出一种无可救药的悲伤。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 展望
|
## 展望
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-26-19-QQ_Image_1672381538441.jpg
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-26-19-QQ_Image_1672381538441.jpg
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-26-19-QQ_Image_1672381538441.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-26-19-QQ_Image_1672381538441.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-28-12-QQ_Image_1672381543836.jpg
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-28-12-QQ_Image_1672381543836.jpg
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-28-12-QQ_Image_1672381543836.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2022-final/2022-12-30-14-28-12-QQ_Image_1672381543836.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
title: 2022年暑假碎碎念
|
title: 2022年暑假碎碎念
|
||||||
|
date: 2022-08-22T15:39:13.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
typora-root-url: 2022-summer-vacation
|
|
||||||
date: 2022-08-22 15:39:13
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
在8个月的漫长寒假的最后两个月,~~也就是俗称的暑假中~~,我都干了些什么?
|
在8个月的漫长寒假的最后两个月,~~也就是俗称的暑假中~~,我都干了些什么?
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -32,7 +32,7 @@ date: 2022-08-22 15:39:13
|
|||||||
- 下定决定要参加下一学期的物理竞赛,但是在听了讲座之后直接决定开学再开始学习,~~我知道我在家没法学习,俗称开摆~~
|
- 下定决定要参加下一学期的物理竞赛,但是在听了讲座之后直接决定开学再开始学习,~~我知道我在家没法学习,俗称开摆~~
|
||||||
- 又捡起了`Blender`,并在[Github](https://github.com/tanjian1998/bupt_minecraft)上找到了伟大的前辈们在`Minecraft`里复刻的老校区,希望能用`Blender`渲染几张图当作桌面。
|
- 又捡起了`Blender`,并在[Github](https://github.com/tanjian1998/bupt_minecraft)上找到了伟大的前辈们在`Minecraft`里复刻的老校区,希望能用`Blender`渲染几张图当作桌面。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> 在此感谢所有为此付出过汗水的前辈们,让我这个即将搬入老校区的萌新能提前一睹老校区的风采。
|
> 在此感谢所有为此付出过汗水的前辈们,让我这个即将搬入老校区的萌新能提前一睹老校区的风采。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/2022-summer-vacation/result1.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2022-summer-vacation/result1.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2022-summer-vacation/result1.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2022-summer-vacation/result1.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 2023年年终总结
|
title: 2023年年终总结
|
||||||
|
date: 2024-02-29T20:18:19.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
- 年终总结
|
- 年终总结
|
||||||
date: 2024-2-29 20:18:19
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
虽然2023年已经过去了两个月,但是年终总结还是要发的。
|
虽然2023年已经过去了两个月,但是年终总结还是要发的。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -44,7 +45,7 @@ date: 2024-2-29 20:18:19
|
|||||||
|
|
||||||
2023年最令我吃惊的事情是我刷B站的时长:
|
2023年最令我吃惊的事情是我刷B站的时长:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
容易计算得出,我一共看了64天的B站,接近六分之一的时间都在看。虽然我确实有着在干活的时候黑听B站和把B站当作音乐播放器的习惯,但是这个时间未免有点太长了。下一年一定要在这个方面做出一定的改变,将更多的时间放在看书上面去,~~虽然写这句话的时候我就在黑听B站~~。
|
容易计算得出,我一共看了64天的B站,接近六分之一的时间都在看。虽然我确实有着在干活的时候黑听B站和把B站当作音乐播放器的习惯,但是这个时间未免有点太长了。下一年一定要在这个方面做出一定的改变,将更多的时间放在看书上面去,~~虽然写这句话的时候我就在黑听B站~~。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/2023-final/image-20240303165826486.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2023-final/image-20240303165826486.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2023-final/image-20240303165826486.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2023-final/image-20240303165826486.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -6,6 +6,7 @@ tags:
|
|||||||
- 年终总结
|
- 年终总结
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
欸,年终总结难道不是应该在新年当天发出吗,什么已经是新年第三天了?!
|
欸,年终总结难道不是应该在新年当天发出吗,什么已经是新年第三天了?!
|
||||||
|
|
||||||
然而年末偶遇流感病毒,头疼脑热强如怪物,拼尽全力也无法战胜。
|
然而年末偶遇流感病毒,头疼脑热强如怪物,拼尽全力也无法战胜。
|
||||||
@@ -70,7 +71,7 @@ tags:
|
|||||||
|
|
||||||
不过我的B站观看时长再度增长30%,这好吗,这不好,~~有这么多时间刷B站,鬼知道你匆匆在哪了~~。
|
不过我的B站观看时长再度增长30%,这好吗,这不好,~~有这么多时间刷B站,鬼知道你匆匆在哪了~~。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 未来
|
### 未来
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/2024-final/image-20250115171809775.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/2024-final/image-20250115171809775.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/2024-final/image-20250115171809775.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/2024-final/image-20250115171809775.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
title: 人生代码大作业初体验
|
title: 人生代码大作业初体验
|
||||||
|
date: 2022-07-27T11:34:49.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
typora-root-url: big-homework
|
|
||||||
date: 2022-07-27 11:34:49
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
在大学也呆了一年了,终于遇上了第一个需要多人合作的写代码项目。从四月底分组完成,任务部署下来到七月初接近尾声,在这两个多月的时间里,也算是经历了不少,学到了不少。
|
在大学也呆了一年了,终于遇上了第一个需要多人合作的写代码项目。从四月底分组完成,任务部署下来到七月初接近尾声,在这两个多月的时间里,也算是经历了不少,学到了不少。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -44,7 +44,7 @@ date: 2022-07-27 11:34:49
|
|||||||
|
|
||||||
而且采用 `Git`还有一个好处,采用 `Github`的 `Insight`功能可以轻松的看出大家的贡献值()。
|
而且采用 `Git`还有一个好处,采用 `Github`的 `Insight`功能可以轻松的看出大家的贡献值()。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 一些技术上的收获
|
## 一些技术上的收获
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/big-homework/1.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/big-homework/1.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/big-homework/1.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/big-homework/1.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 建立博客过程的记录
|
title: 建立博客过程的记录
|
||||||
typora-root-url: 建立博客过程的记录
|
date: 2022-04-08T11:52:32.0000000
|
||||||
date: 2022-04-08 11:52:32
|
|
||||||
tags:
|
tags:
|
||||||
- 技术笔记
|
- 技术笔记
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
当我已经在Python的浩瀚大海遨(zheng)游(zha)了半个暑假后,我决定尝试一下传说中程序员专用的学(zhuang)习(bi)手(fangfa)段(fa)——建立自己的个人博客。作为一个半懂不懂的Python程序员,心中冒出的第一个想法自然是采用Python的Django作为开发自己的个人博客的手段。然而,在阅读了[用Django搭建个人博客](https://www.dusaiphoto.com/article/2/)等的其他人搭建这类动态博客的过程记录之后,我便义无反顾的转向了采用javascript开发的博客框架[Hexo](https://hexo.io),<del>说好的Python信仰呢</del>。无他,唯简单尔。
|
当我已经在Python的浩瀚大海遨(zheng)游(zha)了半个暑假后,我决定尝试一下传说中程序员专用的学(zhuang)习(bi)手(fangfa)段(fa)——建立自己的个人博客。作为一个半懂不懂的Python程序员,心中冒出的第一个想法自然是采用Python的Django作为开发自己的个人博客的手段。然而,在阅读了[用Django搭建个人博客](https://www.dusaiphoto.com/article/2/)等的其他人搭建这类动态博客的过程记录之后,我便义无反顾的转向了采用javascript开发的博客框架[Hexo](https://hexo.io),<del>说好的Python信仰呢</del>。无他,唯简单尔。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -131,7 +131,7 @@ Hexo init blog
|
|||||||
```
|
```
|
||||||
Hexo会以blog为名称创建一个博客文件夹,这个文件夹的内容为
|
Hexo会以blog为名称创建一个博客文件夹,这个文件夹的内容为
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
`node_modules`文件夹是Hexo需要用到的一些npm依赖包的存放地址,`public`文件夹下是由Hexo渲染产生的静态博客文件,`scaffolds`文件夹是博客用到的模板文件,在默认情况下应该有`draft.md`,`page.md`,`post.md`三个模板文件。`themes`是Hexo中可以使用的主题文件。主题也是Hexo一个非常方便的设计,我们可以方便使用其他人编写的Hexo Themes,让自己的博客在不同的风格之间变换。`source`文件夹就是存放我们写作的博客的地方。一般这里面会有两个子文件夹,`_draft`, `_posts`。我们在里面在创建一个`img`文件夹,把自己的头像图片和网站的图标文件都放在里面,在之后的设置的时候使用。
|
`node_modules`文件夹是Hexo需要用到的一些npm依赖包的存放地址,`public`文件夹下是由Hexo渲染产生的静态博客文件,`scaffolds`文件夹是博客用到的模板文件,在默认情况下应该有`draft.md`,`page.md`,`post.md`三个模板文件。`themes`是Hexo中可以使用的主题文件。主题也是Hexo一个非常方便的设计,我们可以方便使用其他人编写的Hexo Themes,让自己的博客在不同的风格之间变换。`source`文件夹就是存放我们写作的博客的地方。一般这里面会有两个子文件夹,`_draft`, `_posts`。我们在里面在创建一个`img`文件夹,把自己的头像图片和网站的图标文件都放在里面,在之后的设置的时候使用。
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
|
|||||||
|
|
||||||
会在本地运行Hexo自带的一台静态博客服务器。我们用浏览器访问http://localhost:4000, 就可以看见Hexo博客的初始界面
|
会在本地运行Hexo自带的一台静态博客服务器。我们用浏览器访问http://localhost:4000, 就可以看见Hexo博客的初始界面
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
这便说明安装成功了,~~可以开香槟了~~
|
这便说明安装成功了,~~可以开香槟了~~
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/build-blog-record/1.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-blog-record/1.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-blog-record/1.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-blog-record/1.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/build-blog-record/2.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-blog-record/2.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-blog-record/2.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-blog-record/2.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -7,6 +7,7 @@ tags:
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
我们编译是这样的,在本平台上编译只要敲三条命令就好了,而交叉编译要考虑的就很多了。
|
我们编译是这样的,在本平台上编译只要敲三条命令就好了,而交叉编译要考虑的就很多了。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -45,7 +46,7 @@ tags:
|
|||||||
|
|
||||||
通常一份GNU工具链只能针对一个平台进行编译,但是LLVM工具链是一套先天的交叉编译工具链,例如对于`llc`工具,使用`llc --version`命令可以看见该编译器可以生成多种目标平台上的汇编代码:
|
通常一份GNU工具链只能针对一个平台进行编译,但是LLVM工具链是一套先天的交叉编译工具链,例如对于`llc`工具,使用`llc --version`命令可以看见该编译器可以生成多种目标平台上的汇编代码:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
在使用`clang++`时加上`--target=<triple>`指定目标三元组就可以进行交叉编译。
|
在使用`clang++`时加上`--target=<triple>`指定目标三元组就可以进行交叉编译。
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ int main()
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
看样子交叉编译也不是开箱即用的。最开始我们猜想系统提供的LLVM工具链没有被配置为交叉编译,因此尝试在本地自行编译一套LLVM工具链。
|
看样子交叉编译也不是开箱即用的。最开始我们猜想系统提供的LLVM工具链没有被配置为交叉编译,因此尝试在本地自行编译一套LLVM工具链。
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ cmake ../llvm-project.src/llvm \
|
|||||||
|
|
||||||
编译之后的成果会安装到`/usr/local/`目录下,而在`$PATH`环境变量中`/usr/local`位置将在`/usr`目录之前,因此调用时将会优先调用我们自行编译的LLVM工具链,而不是系统中安装的LLVM工具链。
|
编译之后的成果会安装到`/usr/local/`目录下,而在`$PATH`环境变量中`/usr/local`位置将在`/usr`目录之前,因此调用时将会优先调用我们自行编译的LLVM工具链,而不是系统中安装的LLVM工具链。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
但是使用这套编译工具链仍然会爆出和之前一样的问题。说明这并不是系统安装LLVM工具链的问题。仔细一想也确实,这里提示找不到对应的头文件应该是找不到RISC-V架构之下的头文件——这里的也是交叉编译的主要问题所在:虽然LLVM工具链宣称自己是原生支持交叉编译的,但是没人宣称说标准库和头文件是原生的。这里我们就需要一个根文件系统来提供这些头文件和各种库文件。
|
但是使用这套编译工具链仍然会爆出和之前一样的问题。说明这并不是系统安装LLVM工具链的问题。仔细一想也确实,这里提示找不到对应的头文件应该是找不到RISC-V架构之下的头文件——这里的也是交叉编译的主要问题所在:虽然LLVM工具链宣称自己是原生支持交叉编译的,但是没人宣称说标准库和头文件是原生的。这里我们就需要一个根文件系统来提供这些头文件和各种库文件。
|
||||||
|
|
||||||
@@ -198,7 +199,7 @@ clang++ --target=riscv64-linux-gnu --sysroot=$ROOTFS_DIR -fuse-ld=lld hello.cpp
|
|||||||
|
|
||||||
第一个问题的回答是Arch Linux安装的LLVM工具是可以交叉编译的。虽然在Arch Linux官方构建LLVM工具链的[构建脚本](https://gitlab.archlinux.org/archlinux/packaging/packages/clang/-/blob/main/PKGBUILD?ref_type=heads)中没有使用`LLVM_TARGETS_TO_BUILD`参数,但是这个参数的默认值是`all`。这一点我们也可以通过实验来验证。
|
第一个问题的回答是Arch Linux安装的LLVM工具是可以交叉编译的。虽然在Arch Linux官方构建LLVM工具链的[构建脚本](https://gitlab.archlinux.org/archlinux/packaging/packages/clang/-/blob/main/PKGBUILD?ref_type=heads)中没有使用`LLVM_TARGETS_TO_BUILD`参数,但是这个参数的默认值是`all`。这一点我们也可以通过实验来验证。
|
||||||
|
|
||||||
于是回到编译`llvm`的目录下执行`cat install_manifest.txt | sudo xargs rm`。
|
于是回到编译`llvm`的目录下执行`cat install_manifest.txt | sudo xargs rm`。
|
||||||
|
|
||||||
第二个问题的回答可以使用实验来验证,首先安装`riscv64-linux-gnu-gcc`,然后将根文件系统的位置设置为`/usr/riscv64-linux-gnu`,重新编译上面的你好世界样例。编译之后可以正常执行。
|
第二个问题的回答可以使用实验来验证,首先安装`riscv64-linux-gnu-gcc`,然后将根文件系统的位置设置为`/usr/riscv64-linux-gnu`,重新编译上面的你好世界样例。编译之后可以正常执行。
|
||||||
|
|
||||||
@@ -229,4 +230,4 @@ export ROOTFS_DIR=<rootfs>
|
|||||||
|
|
||||||
但是现在的.NET在RISC-V平台上还是废物一个,甚至连`dotnet new`都跑不过,下一步看看能不能运行一下运行时的测试集看看。
|
但是现在的.NET在RISC-V平台上还是废物一个,甚至连`dotnet new`都跑不过,下一步看看能不能运行一下运行时的测试集看看。
|
||||||
|
|
||||||

|

|
||||||
|
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824120646587.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824120646587.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824120646587.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824120646587.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824121425007.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824121425007.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824121425007.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824121425007.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824134158262.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824134158262.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824134158262.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824134158262.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824153514149.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824153514149.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824153514149.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824153514149.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824214145759.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824214145759.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824214145759.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/build-dotnet-from-source/image-20240824214145759.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: C项目中有关头文件的一些问题
|
title: C项目中有关头文件的一些问题
|
||||||
|
date: 2022-05-08T11:35:19.0000000
|
||||||
tags:
|
tags:
|
||||||
- 技术笔记
|
- 技术笔记
|
||||||
- C/C++
|
- C/C++
|
||||||
typora-root-url: c-include-problems
|
|
||||||
date: 2022-05-08 11:35:19
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
最近在完成一门`C`语言课程的大作业,课设老师要求我们将程序分模块的开发。在编写项目头文件的时候,遇到了一些令本菜鸡大开眼界的问题。
|
最近在完成一门`C`语言课程的大作业,课设老师要求我们将程序分模块的开发。在编写项目头文件的时候,遇到了一些令本菜鸡大开眼界的问题。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -17,7 +17,7 @@ date: 2022-05-08 11:35:19
|
|||||||
|
|
||||||
我项目的结构大致如图所示:
|
我项目的结构大致如图所示:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
在`include`的头文件目录下有两个头文件,`rail.h`和`bus.h`,这两个头文件分别定义了两个结构体`rail_node_t`和`bus_t`。
|
在`include`的头文件目录下有两个头文件,`rail.h`和`bus.h`,这两个头文件分别定义了两个结构体`rail_node_t`和`bus_t`。
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ typedef struct bus bus_t;
|
|||||||
|
|
||||||
项目的`test`文件夹下是单元测试文件夹,但是在编译的时候会报错
|
项目的`test`文件夹下是单元测试文件夹,但是在编译的时候会报错
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
大意就是在一个google test内部的头文件中有几个函数找不到定义,这个函数都位于`io.h`这个头文件中。
|
大意就是在一个google test内部的头文件中有几个函数找不到定义,这个函数都位于`io.h`这个头文件中。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/c-include-problems/1.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/c-include-problems/1.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/c-include-problems/1.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/c-include-problems/1.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/c-include-problems/2.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/c-include-problems/2.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/c-include-problems/2.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/c-include-problems/2.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -5,13 +5,14 @@ tags:
|
|||||||
- 杂谈
|
- 杂谈
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
2024年的中国计算机大会于10月24日到10月26日在浙江省金华市东阳市横店镇举办,而鄙人在下不才我,有幸受到实验室资助前去参观学习。
|
2024年的中国计算机大会于10月24日到10月26日在浙江省金华市东阳市横店镇举办,而鄙人在下不才我,有幸受到实验室资助前去参观学习。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
首先开幕式镇楼。
|
首先开幕式镇楼。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 学术上
|
## 学术上
|
||||||
|
|
||||||
@@ -21,11 +22,11 @@ tags:
|
|||||||
|
|
||||||
第一个报告是华为庞加莱实验室秦彬娟老师的《异构智算时代的操作系统演进》。报告高屋建瓴,从比较宏观的角度上介绍了当前异构融合操作系统诞生的背景、发展的方向。在报告中重点介绍了一种异构融合操作系统的设计思路:通过三层架构,基于互联池化技术,构建AI时代的融合算力系统。系统中的三层包括:(1)池化基础底层,包括多设备的融合和池化设备虚拟化;(2)异构融合核心子系统,例如异构融合调度系统、异构融合内存和异构融合存储系统;(3)异构核心服务。总的来说,这个报告在一定程度上勾勒出了未来一个异构融合操作系统应有的各项功能,但是显然这一操作系统的实现还存在着明显的困难。
|
第一个报告是华为庞加莱实验室秦彬娟老师的《异构智算时代的操作系统演进》。报告高屋建瓴,从比较宏观的角度上介绍了当前异构融合操作系统诞生的背景、发展的方向。在报告中重点介绍了一种异构融合操作系统的设计思路:通过三层架构,基于互联池化技术,构建AI时代的融合算力系统。系统中的三层包括:(1)池化基础底层,包括多设备的融合和池化设备虚拟化;(2)异构融合核心子系统,例如异构融合调度系统、异构融合内存和异构融合存储系统;(3)异构核心服务。总的来说,这个报告在一定程度上勾勒出了未来一个异构融合操作系统应有的各项功能,但是显然这一操作系统的实现还存在着明显的困难。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
下面一个报告是较为有干货的报告,北京航空航天大学刘瀚骋老师的《异构融合OS及多样性内存管理框架》。报告中介绍了一个称作`FMMU`的系统,是对于异构融合操作系统中内存管理系统的探索。报告中首先介绍了内存池化技术对于异构融合操作系统的重要性,指出分布式共享内存(Distributed Shared Memory)可能是实现内存池化技术的未来。然后介绍了将部分内存管理中的计算卸载到可编程网络硬件中来加速分布式内存访问的新思路。最后在报告中提到了内存管理技术如何解决错误预测和错误回复的问题。虽然在听的时候没太注意,但是现在总结的时候才发现这个报告的思路似乎有点混乱,尤其是最后一点和内存管理系统并没有什么直接的关系,而且这个内存管理系统似乎不是**异构系统**的内存管理,反而是分布式系统的内存管理。不过总的来说,这个报告还是非常实际的,介绍了不少当前异构融合操作系统中的内存管理面临的问题和解决问题的探索。
|
下面一个报告是较为有干货的报告,北京航空航天大学刘瀚骋老师的《异构融合OS及多样性内存管理框架》。报告中介绍了一个称作`FMMU`的系统,是对于异构融合操作系统中内存管理系统的探索。报告中首先介绍了内存池化技术对于异构融合操作系统的重要性,指出分布式共享内存(Distributed Shared Memory)可能是实现内存池化技术的未来。然后介绍了将部分内存管理中的计算卸载到可编程网络硬件中来加速分布式内存访问的新思路。最后在报告中提到了内存管理技术如何解决错误预测和错误回复的问题。虽然在听的时候没太注意,但是现在总结的时候才发现这个报告的思路似乎有点混乱,尤其是最后一点和内存管理系统并没有什么直接的关系,而且这个内存管理系统似乎不是**异构系统**的内存管理,反而是分布式系统的内存管理。不过总的来说,这个报告还是非常实际的,介绍了不少当前异构融合操作系统中的内存管理面临的问题和解决问题的探索。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
第三个报告是国防科技大学李东升老师的《异构计算环境下的分布式深度学习训练》。报告首先从李老师的主业——并行计算起手,介绍了深度学习训练过程中主要的各种并行方法,例如数据并行、模型并行和混合并行等,指出目前大模型的并行训练存在着计算/存储/通信难的问题。因此,提出了一个智能模型训练并行任务划分方法:(1)基于符号算子的计算图定义方法;(2)面向Transformer模型的流水线并行任务划分方法;(3)异构资源感知的流水线并行任务划分方法。然后针对分布式模型训练中通信调度存在的通信墙、数据依赖关系复杂等的问题,提出综合词嵌入表的稀疏通信调度技术、流水线并行的P2P通信调度技术、模型计算的统一操作执行引擎和网络链路感知的通信执行引擎的通信调度技术。最后提到了智能模型训练 的内存优化技术,针对现有重计算技术(re-computing)和存储交换(swapping)技术存在的问题,提出了一种面向大型智能模型训练的细粒度内存优化方法`DELTA`。
|
第三个报告是国防科技大学李东升老师的《异构计算环境下的分布式深度学习训练》。报告首先从李老师的主业——并行计算起手,介绍了深度学习训练过程中主要的各种并行方法,例如数据并行、模型并行和混合并行等,指出目前大模型的并行训练存在着计算/存储/通信难的问题。因此,提出了一个智能模型训练并行任务划分方法:(1)基于符号算子的计算图定义方法;(2)面向Transformer模型的流水线并行任务划分方法;(3)异构资源感知的流水线并行任务划分方法。然后针对分布式模型训练中通信调度存在的通信墙、数据依赖关系复杂等的问题,提出综合词嵌入表的稀疏通信调度技术、流水线并行的P2P通信调度技术、模型计算的统一操作执行引擎和网络链路感知的通信执行引擎的通信调度技术。最后提到了智能模型训练 的内存优化技术,针对现有重计算技术(re-computing)和存储交换(swapping)技术存在的问题,提出了一种面向大型智能模型训练的细粒度内存优化方法`DELTA`。
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ Plane讨论没有参加。
|
|||||||
|
|
||||||
第二个报告是南京大学冯新宇老师的《基于仓颉语言的嵌入式DSL开发》,同时冯新宇老师也是仓颉语言的首席架构师。冯老师的这个报告主要聚焦于仓颉语言提供的嵌入式DSL能力,而嵌入式DSL这一设计范式已经在前端开发中展现了不俗的潜力。报告中介绍了嵌入式DSL出现的背景,仓颉中为了提供嵌入式DSL而引入的语法糖、仓颉提供的嵌入式DSL工具箱等。虽然仓颉语言是一个主要面向上层应用开发的语言,但是仓颉中丰富的DSL能力还是给异构编程模型的设计提供了不少的启发。而且目前在各种深度学习编译器中DSL的应用也非常广泛,例如`triton`。
|
第二个报告是南京大学冯新宇老师的《基于仓颉语言的嵌入式DSL开发》,同时冯新宇老师也是仓颉语言的首席架构师。冯老师的这个报告主要聚焦于仓颉语言提供的嵌入式DSL能力,而嵌入式DSL这一设计范式已经在前端开发中展现了不俗的潜力。报告中介绍了嵌入式DSL出现的背景,仓颉中为了提供嵌入式DSL而引入的语法糖、仓颉提供的嵌入式DSL工具箱等。虽然仓颉语言是一个主要面向上层应用开发的语言,但是仓颉中丰富的DSL能力还是给异构编程模型的设计提供了不少的启发。而且目前在各种深度学习编译器中DSL的应用也非常广泛,例如`triton`。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
第三个报告是在存算一体的芯片上做数据库的加速,第四个报告是OpenHarmony上`ArkTS`程序的静态分析,都没怎么听。
|
第三个报告是在存算一体的芯片上做数据库的加速,第四个报告是OpenHarmony上`ArkTS`程序的静态分析,都没怎么听。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/cncc-2024/image-20241102211959206.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/cncc-2024/image-20241102211959206.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102211959206.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/cncc-2024/image-20241102211959206.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212355390.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212355390.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212355390.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212355390.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212536635.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212536635.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212536635.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212536635.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212738598.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212738598.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212738598.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/cncc-2024/image-20241102212738598.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 编译MediaPipe框架
|
title: 编译MediaPipe框架
|
||||||
|
date: 2022-11-11T22:20:25.0000000
|
||||||
tags:
|
tags:
|
||||||
- C/C++
|
- C/C++
|
||||||
- 技术笔记
|
- 技术笔记
|
||||||
date: 2022-11-11 22:20:25
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
编译MediaPipe框架。
|
编译MediaPipe框架。
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
@@ -198,7 +199,7 @@ bazel build -c opt --strip=ALWAYS \
|
|||||||
|
|
||||||
如果在编译的过程中提示缺失`dx.jar`这个文件而且你用的SDK版本还是高于31的,那可能是SDK中缺失了这个文件,可以将SDk降级到30就含有这个文件了。我使用的解决办法比较离奇,我是将30版本的SDK文件中的这个文件软链接过来,解决了这个问题。
|
如果在编译的过程中提示缺失`dx.jar`这个文件而且你用的SDK版本还是高于31的,那可能是SDK中缺失了这个文件,可以将SDk降级到30就含有这个文件了。我使用的解决办法比较离奇,我是将30版本的SDK文件中的这个文件软链接过来,解决了这个问题。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
编译消耗的时间可能比较的长,耐心等待即可。
|
编译消耗的时间可能比较的长,耐心等待即可。
|
||||||
|
|
||||||
@@ -227,7 +228,7 @@ bazel build -c opt //mediapipe/graphs/pose_tracking:pose_tracking_gpu_binary_gra
|
|||||||
|
|
||||||
然后还需要从服务器上下载`tflite`文件,`Pose Tracking`这个解决方案需要两个`tflite`文件,第一个是[pose_detection.tflite](https://storage.googleapis.com/mediapipe-assets/pose_detection.tflite),第二个文件则有三个不同的选择,分别对于解决方案中提供的三个质量版本:
|
然后还需要从服务器上下载`tflite`文件,`Pose Tracking`这个解决方案需要两个`tflite`文件,第一个是[pose_detection.tflite](https://storage.googleapis.com/mediapipe-assets/pose_detection.tflite),第二个文件则有三个不同的选择,分别对于解决方案中提供的三个质量版本:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
下载地址是[pose_landmark_full.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_full.tflite),[pose_landmark_heavy.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_heavy.tflite)和[pose_landmark_lite.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_lite.tflite)。
|
下载地址是[pose_landmark_full.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_full.tflite),[pose_landmark_heavy.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_heavy.tflite)和[pose_landmark_lite.tflite](https://storage.googleapis.com/mediapipe-assets/pose_landmark_lite.tflite)。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-15-22-05-41-Screenshot_20230115_220521.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-15-22-05-41-Screenshot_20230115_220521.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-15-22-05-41-Screenshot_20230115_220521.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-15-22-05-41-Screenshot_20230115_220521.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-19-20-20-40-Screenshot_20230119_202008.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-19-20-20-40-Screenshot_20230119_202008.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-19-20-20-40-Screenshot_20230119_202008.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/compile-mediapipe/2023-01-19-20-20-40-Screenshot_20230119_202008.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,20 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: 计算机系统结构——流水线复习
|
title: 计算机系统结构——流水线复习
|
||||||
|
date: 2024-06-12T20:27:25.0000000
|
||||||
tags:
|
tags:
|
||||||
- 计算机系统结构
|
- 计算机系统结构
|
||||||
- 学习资料
|
- 学习资料
|
||||||
date: 2024-06-12 20:27:25
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
让指令的各个执行阶段依次进行运行是一个简单而自然的想法,但是这种方式执行速度慢、运行效率低。因此一个很自然的想法就是将指令重叠起来运行,让执行功能部件被充分的利用起来,这就是**流水线**。
|
让指令的各个执行阶段依次进行运行是一个简单而自然的想法,但是这种方式执行速度慢、运行效率低。因此一个很自然的想法就是将指令重叠起来运行,让执行功能部件被充分的利用起来,这就是**流水线**。
|
||||||
|
|
||||||
流水线的表示方法有两种。
|
流水线的表示方法有两种。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
第一种被称作**连接图**,清晰的表达出了流水线内部的逻辑关系。
|
第一种被称作**连接图**,清晰的表达出了流水线内部的逻辑关系。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> 上图中给出了两个流水线中的概念:通过时间和排空时间。其中通过时间又被称作装入时间,是指第一个任务进入流水线到完成的事件;排空时间则相反,是最后一个任务通过流水线的时间。
|
> 上图中给出了两个流水线中的概念:通过时间和排空时间。其中通过时间又被称作装入时间,是指第一个任务进入流水线到完成的事件;排空时间则相反,是最后一个任务通过流水线的时间。
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ date: 2024-06-12 20:27:25
|
|||||||
- 静态流水线,同一时间内,多功能流水线的各段只能按照同一种功能的方式连接。
|
- 静态流水线,同一时间内,多功能流水线的各段只能按照同一种功能的方式连接。
|
||||||
- 动态流水线,同一时间内,多功能流水线的各种可以按照不同的方式连接,执行不同的功能。
|
- 动态流水线,同一时间内,多功能流水线的各种可以按照不同的方式连接,执行不同的功能。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
按照流水线中是否存在反馈回路分类:
|
按照流水线中是否存在反馈回路分类:
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ date: 2024-06-12 20:27:25
|
|||||||
- 加速比,同一任务,不使用流水线所使用时间与使用流水线所用时间比。
|
- 加速比,同一任务,不使用流水线所使用时间与使用流水线所用时间比。
|
||||||
- 效率,流水线设备的利用率。
|
- 效率,流水线设备的利用率。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
在设计流水线的过程中存在若干问题。
|
在设计流水线的过程中存在若干问题。
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ date: 2024-06-12 20:27:25
|
|||||||
|
|
||||||
一个典型的五段流水线MIPS流水线:
|
一个典型的五段流水线MIPS流水线:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184855300.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184855300.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184855300.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184855300.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184949777.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184949777.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184949777.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612184949777.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612190426368.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612190426368.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612190426368.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612190426368.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612192700169.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612192700169.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612192700169.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612192700169.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612193301372.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612193301372.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612193301372.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/computer-architecture-pipeline/image-20240612193301372.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 日用Linux挑战 第0篇 初见Arch Linux
|
title: 日用Linux挑战 第0篇 初见Arch Linux
|
||||||
|
date: 2023-01-15T22:23:08.0000000
|
||||||
tags:
|
tags:
|
||||||
- Linux
|
- Linux
|
||||||
- 杂谈
|
- 杂谈
|
||||||
date: 2023-01-15 22:23:08
|
|
||||||
typora-root-url: daily-linux-0
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
在将开发重心移到`WSL`上一年之后,我最终还是决定完全抛弃Windows,转向使用Linux作为我日常使用的主力系统。目前,我已经使用Linux作为主力系统一个月了。
|
在将开发重心移到`WSL`上一年之后,我最终还是决定完全抛弃Windows,转向使用Linux作为我日常使用的主力系统。目前,我已经使用Linux作为主力系统一个月了。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -92,7 +92,7 @@ sudo systemctl enable sddm.service
|
|||||||
|
|
||||||
我目前实现的效果大概长这样:
|
我目前实现的效果大概长这样:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
颇有一种`Windows`和`MacOS`杂交的风格。
|
颇有一种`Windows`和`MacOS`杂交的风格。
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ sudo systemctl enable sddm.service
|
|||||||
|
|
||||||
先上一张`shell`的系统概览截图:
|
先上一张`shell`的系统概览截图:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
终端模拟器直接使用的`konsole`,目前没有进行改动。
|
终端模拟器直接使用的`konsole`,目前没有进行改动。
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-28-38-Screenshot_20230112_132829.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-28-38-Screenshot_20230112_132829.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-28-38-Screenshot_20230112_132829.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-28-38-Screenshot_20230112_132829.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-36-45-Screenshot_20230112_133628.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-36-45-Screenshot_20230112_133628.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-36-45-Screenshot_20230112_133628.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-0/2023-01-12-13-36-45-Screenshot_20230112_133628.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: 日用Linux挑战 第2篇 Wayland
|
title: 日用Linux挑战 第2篇 Wayland
|
||||||
|
date: 2023-07-23T11:44:34.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
- Linux
|
- Linux
|
||||||
date: 2023-07-23 11:44:34
|
|
||||||
typora-root-url: daily-linux-2
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
使用`Linux`6个月,我成功戒掉了原神。
|
使用`Linux`6个月,我成功戒掉了原神。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -18,7 +18,7 @@ typora-root-url: daily-linux-2
|
|||||||
|
|
||||||
最近恰好被平铺式的窗口管理器种草,又在B站上看见一个动画绚丽的`wayland`合成器——[Hyprland](https://hyprland.org/),当即脑袋一热,就把`kde`干掉,装上了`hyprland`。
|
最近恰好被平铺式的窗口管理器种草,又在B站上看见一个动画绚丽的`wayland`合成器——[Hyprland](https://hyprland.org/),当即脑袋一热,就把`kde`干掉,装上了`hyprland`。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
安装`hyprland`的过程非常舒适,`hyprland`被打包为一个单独的二进制文件,使用`pacman`安装之后直接在`tty`下执行:
|
安装`hyprland`的过程非常舒适,`hyprland`被打包为一个单独的二进制文件,使用`pacman`安装之后直接在`tty`下执行:
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ Hyprland
|
|||||||
|
|
||||||
各种在学习过程中遇到的工具软件:基本上都工作运行良好。当然因为没有设置缩放的问题而导致字体都很小。因为如果在配置文件中设置缩放之后会导致字体发虚。下面的截图就是我将我的2K显示屏设置为150%缩放的效果,~~虽然在截图中的效果不明显~~。目前在常用软件中唯一让我十分不满意的软件是`wps`,使用体验完全无法和`offices`相提并论,目前我正在研究使用`wine`运行`offices`,如果成功了就再水一篇博客庆祝一下。
|
各种在学习过程中遇到的工具软件:基本上都工作运行良好。当然因为没有设置缩放的问题而导致字体都很小。因为如果在配置文件中设置缩放之后会导致字体发虚。下面的截图就是我将我的2K显示屏设置为150%缩放的效果,~~虽然在截图中的效果不明显~~。目前在常用软件中唯一让我十分不满意的软件是`wps`,使用体验完全无法和`offices`相提并论,目前我正在研究使用`wine`运行`offices`,如果成功了就再水一篇博客庆祝一下。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> 最新的进展是使用`wine`没法安装学校提供的`office 2021`,同时我又不愿意使用古老的`office`版本,但是我发现一个称作`onlyoffice`的第三方软件蛮好用的,等我试用一段时间再说。
|
> 最新的进展是使用`wine`没法安装学校提供的`office 2021`,同时我又不愿意使用古老的`office`版本,但是我发现一个称作`onlyoffice`的第三方软件蛮好用的,等我试用一段时间再说。
|
||||||
>
|
>
|
||||||
|
BIN
YaeBlog/source/posts/daily-linux-2/image-20230702205919301.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-2/image-20230702205919301.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-2/image-20230702205919301.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-2/image-20230702205919301.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: 日用Linux挑战 第3篇 放弃Wayland
|
title: 日用Linux挑战 第3篇 放弃Wayland
|
||||||
|
date: 2023-09-04T14:47:46.0000000
|
||||||
tags:
|
tags:
|
||||||
- 杂谈
|
- 杂谈
|
||||||
- Linux
|
- Linux
|
||||||
typora-root-url: daily-linux-3
|
|
||||||
date: 2023-09-04 14:47:46
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
成也开源,败也开源。
|
成也开源,败也开源。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -53,7 +53,7 @@ date: 2023-09-04 14:47:46
|
|||||||
- `Meta+F`全屏应用
|
- `Meta+F`全屏应用
|
||||||
- `Meta+W`关闭应用
|
- `Meta+W`关闭应用
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Fuck You NVIDIA
|
### Fuck You NVIDIA
|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/daily-linux-3/Screenshot_20230904_144149.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-3/Screenshot_20230904_144149.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-3/Screenshot_20230904_144149.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-3/Screenshot_20230904_144149.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 日用Linux挑战 第4篇 新的开始
|
title: 日用Linux挑战 第4篇 新的开始
|
||||||
|
date: 2024-03-09T14:00:00.0000000
|
||||||
tags:
|
tags:
|
||||||
- Linux
|
- Linux
|
||||||
- 杂谈
|
- 杂谈
|
||||||
date: 2024/03/09 14:00:00
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
小步快跑,面向未来。
|
小步快跑,面向未来。
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -18,7 +19,7 @@ date: 2024/03/09 14:00:00
|
|||||||
|
|
||||||
相较于古老但是稳定的`Ext4`文件系统,`Btrfs`对我来说最大的好处便是可以零成本的创建快照,便于在出现错误的时候及时回滚或者直接重装系统。因此,为了方便快照的生成和回滚,我在安装系统时使用**扁平化**的子分区划分方法:即尽力避免出现嵌套的子分区,所有需要快照的分区都处在`/`目录之下:
|
相较于古老但是稳定的`Ext4`文件系统,`Btrfs`对我来说最大的好处便是可以零成本的创建快照,便于在出现错误的时候及时回滚或者直接重装系统。因此,为了方便快照的生成和回滚,我在安装系统时使用**扁平化**的子分区划分方法:即尽力避免出现嵌套的子分区,所有需要快照的分区都处在`/`目录之下:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- `@`为根分区,挂载在`/`目录之下,打开写时复制;
|
- `@`为根分区,挂载在`/`目录之下,打开写时复制;
|
||||||
- `@home`为家目录分区,挂载在`/home`目录之下,打开写时复制;
|
- `@home`为家目录分区,挂载在`/home`目录之下,打开写时复制;
|
||||||
@@ -44,7 +45,7 @@ sudo btrfs send /.snapshots/home@20240225 | zstd | ssh root@remote "zstd -d | bt
|
|||||||
|
|
||||||
算起来,我已经和`Wayland`显示协议相爱相杀了整整一年了,从`KDE plasma X`到`Hyprland`,再尝试小众的`labwc`,最后回到了`KDE plasma X`。而在2024年2月29日`KDE plasma`释出6.0版本,将`Wayland`作为默认的显示协议,我也在第一时间更新了版本并使用`wayland`显示协议。现在,我可以比较确定的说,`Wayland`目前已经达到可用的水平了,而且我还是使用`RTX 3060`显卡。
|
算起来,我已经和`Wayland`显示协议相爱相杀了整整一年了,从`KDE plasma X`到`Hyprland`,再尝试小众的`labwc`,最后回到了`KDE plasma X`。而在2024年2月29日`KDE plasma`释出6.0版本,将`Wayland`作为默认的显示协议,我也在第一时间更新了版本并使用`wayland`显示协议。现在,我可以比较确定的说,`Wayland`目前已经达到可用的水平了,而且我还是使用`RTX 3060`显卡。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
不过相较于`AMDGPU`可以开箱即用,使用`NVIDIA`启动需要配置如下的模块参数:
|
不过相较于`AMDGPU`可以开箱即用,使用`NVIDIA`启动需要配置如下的模块参数:
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ options nvidia_drm modeset=1 fbdev=1
|
|||||||
|
|
||||||
不过`XWayland`应用程序在使用`NVIDIA`驱动时会存在一个神奇的**同步失败**问题,表现为在`xwayland`中部分控件闪烁,交替显示更新前和更新后的帧,而且这个问题几乎不能被截屏抓到,具体可以见`freedesktop`上的这个[issue](https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317)。虽然这个议题下面有着很长的讨论,还是建议大家完整的看一遍,里面甚至还有:
|
不过`XWayland`应用程序在使用`NVIDIA`驱动时会存在一个神奇的**同步失败**问题,表现为在`xwayland`中部分控件闪烁,交替显示更新前和更新后的帧,而且这个问题几乎不能被截屏抓到,具体可以见`freedesktop`上的这个[issue](https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317)。虽然这个议题下面有着很长的讨论,还是建议大家完整的看一遍,里面甚至还有:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
省流:这个议题讨论了在`xserver`中提供显式同步的协议原语,方便图形驱动程序知道什么时候渲染的帧发生了变化。因此这并不是一个`NVIDIA`驱动程序的问题,而是需要将`Linux`显示协议栈从隐式同步迁移到显式同步。但是相关的工作还在开发过程中,因此解决方法有两个:
|
省流:这个议题讨论了在`xserver`中提供显式同步的协议原语,方便图形驱动程序知道什么时候渲染的帧发生了变化。因此这并不是一个`NVIDIA`驱动程序的问题,而是需要将`Linux`显示协议栈从隐式同步迁移到显式同步。但是相关的工作还在开发过程中,因此解决方法有两个:
|
||||||
|
|
||||||
@@ -77,9 +78,9 @@ options nvidia_drm modeset=1 fbdev=1
|
|||||||
|
|
||||||
于是,我就在`Arch Wiki`上学到一条新知识:
|
于是,我就在`Arch Wiki`上学到一条新知识:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
原来`efi`分区其实只用放`grub`,,,
|
原来`efi`分区其实只用放`grub`,,,
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
BIN
YaeBlog/source/posts/daily-linux-4/Screenshot_20240309_115143.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-4/Screenshot_20240309_115143.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/Screenshot_20240309_115143.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-4/Screenshot_20240309_115143.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/cfd17cff0701a8e8c69fecf247f17fc1-1709963611271-2.jpg
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-4/cfd17cff0701a8e8c69fecf247f17fc1-1709963611271-2.jpg
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/cfd17cff0701a8e8c69fecf247f17fc1-1709963611271-2.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-4/cfd17cff0701a8e8c69fecf247f17fc1-1709963611271-2.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309130329784.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309130329784.png
(Stored with Git LFS)
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309130329784.webp
(Stored with Git LFS)
Normal file
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309130329784.webp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309131750535.png
(Stored with Git LFS)
BIN
YaeBlog/source/posts/daily-linux-4/image-20240309131750535.png
(Stored with Git LFS)
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user