Searching txt.sour.is

Twts matching #typing
Sort by: Newest, Oldest, Most Relevant

Nix 2.7.0 released
We’re pleased to announce the availability of Nix 2.7.0. It will be
available from
NixOS - Getting Nix / NixOS.

Here are the release notes:

  • Nix will now make some helpful suggestions when you mistype something
    on the command line. For instance, if you type nix build
    nixpkgs#thunderbrd, it will suggest
    thunderbird.

  • A number of “default” flake output attributes have been renamed.
    These are:

    • defaultPackage.<system></system>packag ... ⌘ [Read more](https://nixos.org/blog/announcements.html#nix-2.7.0)

⤋ Read More

there are two types of panpsychism, and they can be distinguished by asking “if i shatter this glass, will it feel pain?”. one answers “yes”, the other answers “no clue, but probably not”

⤋ Read More

从 CPU 角度理解 Go 中的结构体内存对齐
大家好,我是 Go 学堂的渔夫子。今天跟大家聊聊结构体字段内存对齐相关的知识点。

原文链接: https://mp.weixin.qq.com/s/H3399AYE1MjaDRSllhaPrw

大家在写 Go 时有没有注意过,一个 struct 所占的空间不见得等于各个字段加起来的空间之和,甚至有时候把字段的顺序调整一下,struct 的所占空间又有不同的结果。

本文就从 cpu 读取内存的角度来谈谈内存对齐的原理。

01 结构体字段对齐示例

我们先从一个示例开始。T1 结构体,共有 3 个字段,类型分别为 int8,int64,int32。所以变量 t1 所属的类型占用的空间应该是 1+8+4=13 字节。但运行程序后,实际上是 24 字节。和我们计算的 13 字节不一样啊。如果我们把该结构体的字段调整成 T2 那样,结果是 16 字节。但和 13 字节还是不一样。这是为什么呢?

”`
type T1 struct {

f1 int8  // 1 byte
f2 int64 // ... ⌘ [Read more](https://gocn.vip/topics/20967)```

⤋ Read More

Eagle-eyed folks may have noticed that I made a few wee changes to this website.

The biggest, and most noticeable one is that I’ve filtered out all of the like type posts from appearing on the main feed, from rss, and in the archives. There were waaaaay to many, so filtering them out makes the entire website a lot more navigable. They are not gone, though, and I’ll probably keep sharing like type posts, but now they ar … ⌘ Read more

⤋ Read More

I just went to type the phrase “I avoid Linux like the plague” but then remembered that we’ve all learned that most people won’t actually go much out of their way to avoid the plague.

⤋ Read More

平凯星辰获评《金融电子化》2021 金融业新技术应用创新突出贡献奖
近日,《金融电子化》杂志社发布了 “2021 第十二届金融科技应用创新奖” 评选结果,平凯星辰(北京)科技有限公司(以下简称 “平凯星辰”)榜上有名,这是对平凯星辰在金融科技领域的创新成果与能力的充分肯定。

![在这里插入图片描述](https://img-blog.csdnimg.cn/6f798223462548d68361a7fd75b1ae3e.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow … ⌘ Read more

⤋ Read More

Go 中这么多创建 error 的方式,你真的了解它们各自的应用场景吗
大家好,我是渔夫子。今天从应用场景的角度来聊聊我对 error 的理解。

原文链接: https://mp.weixin.qq.com/s/ncEemMJ0kQayVPJrnF9aew

01 什么是 Error

在 Go 中,error 是一种内建的数据类型。在 Go 中被定义为一个接口,定义如下:


<span class="c">// The error built-in interface type is the conventional interface for< ... ⌘ [Read more](https://gocn.vip/topics/20911)

⤋ Read More

Day 16 of Advent of Code is so confusing that I will not finish today’s puzzle. I wonder if yesterday was my last day with Advent of Code, or will the puzzles become more understandable and easier again in the next few days? Maybe I’m just more the practical type. I like programming, but such complex algorithms are not really my thing. And in the end, Advent of Code is supposed to be fun… ⌘ Read more

⤋ Read More

go 1.18 泛型初体验

go 1.18 泛型初体验

go.1.18beta 版发布,众所周知这个 go.1.18 版本会默认启用 go 泛型。这个版本也号称 go 最大的版本改动。

初识 golang 的泛型

我们写一个 demo 来看看 go 的泛型是长啥样

”`

package main

import (

<span class="s">"fmt"</span>

)

type OrderTypesRead more”`

⤋ Read More

** Operators in C **
Following up my notes on Data Types and Variables in C here are notes on operators in C.

An operator is a symbol that represents a mathematical or logical operation. An operator effects operands.

C provides a number of operators.

Some arithmetic operators include,

”`hljs plaintext

+

*
/
%
”`

% is the most exciting of the list, it is called modulo and it returns the remainder after division. Of note, modulo c … ⌘ Read more

⤋ Read More

My nutritional supplements aim should be:

  • 1 or 1.5 cups of lentils (or any beans you might like better).
  • 2 or 2.5 cups of bitter greens.
  • 1 cup of your favourite protein (or an egg), grilled, or fried with a little of olive oil.
  • 1 or 2 tomatoes, or a handful if of the cherry type.
  • No added sugars. If it is sweet, make it have fibre.
  • No added salt (or very little and ionised), as salt is everywhere.

Related, I tried wild rice for the first time yesterday. It was different, in a good way.

⤋ Read More

** Data Types and Variables in C **
I’ve been writing a heap of Lua lately — this has lead to my becoming interested, again, in C. Here are some ancient notes I dug up on the most basics of data types and variables in C.

All of a computer’s memory is comprised of bits. A sequence of 8 bits forms a byte. A group of bytes (typically 4 or 8) form a word. Each word is associated with a memory address. The address increases by 1 with each byte of memory.

In C, a byte is an object that is as big as t … ⌘ Read more

⤋ Read More

Looking for a Docker Alternative? Consider This.
Docker recently announced updates and extensions to our product subscriptions. Docker CEO Scott Johnston also posted a blog about the changes. Much of the discussion centered on what the licensing changes mean for users of Docker Desktop, which remains free for small businesses and several other user types, but now requires a paid subscription — starting […]

The post [Looking for a Docker Alternative? Consider This.](https://www.doc … ⌘ Read more

⤋ Read More

Gajim: Development News September 2021
September brought many updates under the hood. With big changes coming up in Gajim 1.4, many parts of the code have to be touched. These changes remain mostly invisible for users, but make Gajim more robust. In some cases, this results in visible improvements as well: Both Add Contact and Start Chat windows are now detecting the type of chat behind an address.

Changes in Gajim

Since development on Gajim 1.4 started, a lot has changed under the hood. … ⌘ Read more

⤋ Read More

There is a type of flourishing available to a cat that is only rarely available to us. A human is never simply what she is, but is always striving to become something she is, as yet, not. This is the result of a self-image – a conception of herself and what her life should be – which, when unrealised, can occasion frustration and despair. What the Cat Knows (2020) | Hacker News

⤋ Read More

The advice about interviewing being exhausting is spot-on. Recruiting, interviewing, and hiring candidates is a very different type of work than most of us engineering types enjoy. Until you’ve developed a thick skin, it can also be emotionally draining to reject candidate after candidate. I’m an interviewer at my company and burnt out | Hacker News

⤋ Read More

with !zet and !zetdo, I find myself constantly needing to type out UUIDs. thing is, they aren’t the easiest thing to type. might invent an intermediate typer-friendly intermediate UUID format that can then convert to the regular UUID format. #halfbaked

⤋ Read More

Are you able to coax your webserver to add the charset to the content type header? Browsers are having a hard time thinking you are sending latin-1

content-type: text/plain; charset=utf-8

⤋ Read More

Are you able to coax your webserver to add the charset to the content type header? Browsers are having a hard time thinking you are sending latin-1

content-type: text/plain; charset=utf-8

⤋ Read More

at the end of the day, I do like the stiffness of the tactile grey switches, even if it means I don’t get to type as fast, or as long. they just feel great to me. #mk

⤋ Read More

I believe trauma instills scientific-type knowledge that is factually false but locally adaptive. False beliefs need more protection to be maintained than true beliefs, so the belief both calcifies, making it unresponsive to new information, and lays a bunch of emotional landmines around itself to punish you for getting too close to it. This cascades into punishing you for learning at all, because you might learn something that corrects your false-but-useful model. Emotional Blocks as Obstacles to Learning | Hacker News

⤋ Read More

Bad idea of the day: Evangelion fanfiction in the form of Kaji’s hand-annotated copy of a Fire in the Valley style popular history of the development of Tokyo-3, casting Gendo as an Elon Musk type figure.

⤋ Read More

Teleconferencing is like being on IRC, if everybody was a noob, two people typing at the same time made both of their posts into gibberish, and half the channel has a cat on their keyboard the entire time.

⤋ Read More

I wonder if the reason why the average quality of writing-advice articles is so much lower than other types is that it’s dominated by folks who are trying to write a certain number of words every day & have decided to publish all of them…

⤋ Read More

Bad idea of the day: a NOT operation on types, such that a type can be define as the failure to qualify as some other combination of types or some other boolean type expression

⤋ Read More

Bad idea of the day: Get Annals of the Perrigues style themed corpora type output in your templates by adjusting probabilities by the semantic distance between a choice & some word that is the locus of a theme, with word2vec or something

⤋ Read More