Kissaki

joined 2 years ago
MODERATOR OF
[–] Kissaki@programming.dev 4 points 6 hours ago (4 children)

Enable squash commits. Each PR should be squashed to a single commit. This makes the master branch linear and simple. This ensures each individual commit on master has been reviewed and is in a working state.

In non-minimal changesets, I would miss information/documentation about individual logical changes that make up the changeset. Commit separation that is useful for review will also be useful for history.

I prefer a deliberate, rebase- and rewrite-heavy workflow with a semi-linear history. The linear history remains readable, while allowing sum-of-parts changesets/merges.

It's an investment, but I think it guides into good structuring and thoughts, and whenever you look at history, you have more than a squashed potential mess.

Squash-on-merge is simpler to implement and justify, of course. Certainly much better than "never rebase, never rewrite, always merge", which I am baffled some teams have no problem doing. The history tree quickly becomes unreadable.

[–] Kissaki@programming.dev 1 points 6 hours ago (1 children)

While exploring solutions, I use f or ffto mean "follow-up/to-squash" and a to mean logically separate. Sometimes other (additional) short abbreviations to know where to move, squash, and edit the changes to.

Other than maybe initial development until the first stable/usable version, these never persist, though. And even then, only if it's not a collaborative project. If it is shared or collaborative, "Iterate on x" is preferable as a non-descriptive title.

I guess my commit descriptions get better with project lifetime, not worse.

[–] Kissaki@programming.dev 9 points 10 hours ago

Unicode symbols is a good idea.

I'll call my compiler 👷‍♂️and my debugger 😈.

[–] Kissaki@programming.dev 1 points 10 hours ago

I don't think these are mutually exclusive concepts.

[–] Kissaki@programming.dev 5 points 10 hours ago

It's interesting that LLMs emotionally saved them, allowing them to bounce back from a destructive to a constructive mindset.

Reading another post of theirs, they seem to really love AI. Albeit in that post, it feels to me like they took AI responses too literally, with too much meaning (as if sentient, or ignoring potential training bias, etc).

[–] Kissaki@programming.dev 1 points 10 hours ago (1 children)

Do you mean self-host on your own hardware and infrastructure? At home? Otherwise you'd still be dependent on the server or infrastructure providers.

 

However, there are some important features that WinSock just doesn’t expose. […]

Rust’s current async ecosystem is built atop a particularly cursed concept. It’s an unstable, undocumented Windows feature. It’s the lynchpin of not only the Rust ecosystem, but the JavaScript one as well. It’s controversial. It’s efficient. […] Without it, it’s unlikely that the async ecosystem would exist in its current form. It’s called \Device\Afd, and I’m tired of no one talking about it.

 

However, there are some important features that WinSock just doesn’t expose. […]

Rust’s current async ecosystem is built atop a particularly cursed concept. It’s an unstable, undocumented Windows feature. It’s the lynchpin of not only the Rust ecosystem, but the JavaScript one as well. It’s controversial. It’s efficient. […] Without it, it’s unlikely that the async ecosystem would exist in its current form. It’s called \Device\Afd, and I’m tired of no one talking about it.

 

However, there are some important features that WinSock just doesn’t expose. […]

Rust’s current async ecosystem is built atop a particularly cursed concept. It’s an unstable, undocumented Windows feature. It’s the lynchpin of not only the Rust ecosystem, but the JavaScript one as well. It’s controversial. It’s efficient. […] Without it, it’s unlikely that the async ecosystem would exist in its current form. It’s called \Device\Afd, and I’m tired of no one talking about it.

 

Seed7 is a general purpose programming language designed by Thomas Mertes. It is a higher level language compared to Ada, C/C++ and Java. The Seed7 interpreter and the example programs are open-source software. There is also an open-source Seed7 compiler. The compiler translates Seed7 programs to C programs which are subsequently compiled to machine code.

In Seed7 new statements and operators can be declared easily. Functions with type results and type parameters are more elegant than a template or generics concept. Object orientation is used where it brings advantages and not in places where other solutions are more obvious. Seed7 contains several concepts from Pascal, Ada, C, C++ and Java.


The author posted on Reddit; quoting in part:

Seed7 is based on ideas from my diploma and doctoral theses about an extensible programming language (1984 and 1986). In 1989 development began on an interpreter and in 2005 the project was released as open source. Since then it is improved on a regular basis.

Seed7 is about readability, portability, performance and memory safety. There is an automatic memory management, but there is no garbage collection process, that interrupts normal processing. The templates and generics of Seed7 don't need special syntax. They are just normal functions, which are executed at compile-time.

Seed7 is an extensible programming language. The syntax and semantics of statements (and abstract data types, etc.) is defined in libraries. The whole language is defined in the library "seed7_05.s7i". You can extend the language syntactically and semantically (introduce new loops, etc.). In other languages the syntax and semantics of the language is hard-coded in the compiler.

Seed7 checks for integer overflow. You either get the correct result or an OVERFLOW_ERROR is raised. Unlike many JVM based languages Seed7 compiles to machine code ahead of time (GRAAL works ahead of time but it struggles with reflection). Unlike many systems languages (except Rust) Seed7 is a memory safe language.

Some programs written in Seed7 are:

  • make7: a make utility.
  • bas7: a BASIC interpreter.
  • pv7: a Picture Viewer for BMP, GIF, ICO, JPEG, PBM, PGM, PNG, PPM and TIFF files.
  • tar7: a tar archiving utility.
  • ftp7: an FTP Internet file transfer program.
  • comanche: a simple web server for static HTML pages and CGI programs.

Code Example

# Print a Fahrenheit-Celsius table with floating point numbers.

$ include "seed7_05.s7i";  # This must be included first.
  include "float.s7i";     # Subsequent includes do not need a $.

const proc: main is func
  local
    const integer: lower is 0;
    const integer: upper is 300;
    const integer: increment is 20;
    var integer: fahr is 0;
    var float: celsius is 0.0;
  begin
    for fahr range lower to upper step increment do
      celsius := float(5 * (fahr - 32)) / 9.0;
      writeln(fahr lpad 3 <& " " <& celsius digits 2 lpad 6);
    end for;
  end func;
[–] Kissaki@programming.dev 6 points 1 day ago (1 children)

However, we believe that by concentrating our resources, we can provide users with more professional, stable, and comprehensive commercial-grade services and support."

I found this formulation a bit funny. When you suddenly have to pay, it becomes “commercial-grade” by definition.

[–] Kissaki@programming.dev 2 points 2 days ago

That subheadline though…

Headline: "x or y?"
Subheadline: "Spoiler: Yes."

🤨

Why even add a subheadline when it only makes sense with the content.

[–] Kissaki@programming.dev 4 points 2 days ago (1 children)

the storage is local-only from your browser/device. so “the cloud”, but the cloud storage capacity is made up of your devices.

What does this mean?

[–] Kissaki@programming.dev 9 points 2 days ago

Do you see downsides to learning it?

If you can, do it. It's common enough to be [potentially] useful. If you don't have a concrete need, then it's not necessary, though.

 

Lean is a theorem prover and programming language that enables correct, maintainable, and formally verified code

/-- A prime is a number larger than 1 with no trivial divisors -/
def IsPrime (n : Nat) := 1 < n ∧ ∀ k, 1 < k → k < n → ¬ k ∣ n
-- 'Grind' efficiently manages complex pattern matching and
-- case analysis beyond standard tactics.
example (x : Nat) : 0 < match x with
  | 0   => 1
  | n+1 => x + n := by
  grind
-- Automatically solves systems of linear inequalities.
example (x y : Int) :
    27 ≤ 11*x + 13*y → 11*x + 13*y ≤ 45
    → -10 ≤ 7*x - 9*y → 7*x - 9*y > 4 := by
  grind

Does anyone have experience with Lean? Can it be useful for implementing algorithms or logic beyond mathematical proofs, for software libs?

[–] Kissaki@programming.dev 4 points 5 days ago (1 children)

1 C

2 Pascal

When you add a dot after the number it becomes a numbered lists and you don't have use a paragraph for each line.

Alternatively, you can use a backslash (\) or two spaces ( ) at the end of a line to use a line-break so you can but one line after the other instead of requiring paragraphs.

 

Hare’s boringness is a feature, not a bug. Our goal is not to make programming exciting again, but to make it easy to write simple, obvious programs which are optimized for reliability and longevity. An exciting programming language cannot meet that goal as effectively as Hare does. We have instead sought out the smallest and simplest language design which accommodates these goals. Because we have relatively few features, Hare programs tend to converge upon the single obvious way of solving their problems with the tools at their disposal.

[–] Kissaki@programming.dev 7 points 5 days ago

Holy mother of varying font size, narrow width, image text

Here's the text (including numerous paragraphs, so I'll put it in an expand, respectful to other comments):

Text from images

Currently on the phone with Visa

Instead of starting with a complaint, I approached this as a Confused American Consumer who doesn't understand why they can't buy things off a website they use

The call center rep immediately asked if it was about Steam/itch

I said yes and asked for information, saying I don't understand what's happening, just trying to understand.

Something about Australia? Why is Australia impacting me in the US?

They said to email complaints to an email address

I don't have a complaint though! I don't even know what I'm complaining out.

Email offered again.

I repeated myself. Slower.

Email again.

After a few rounds of this I asked for a manager. I'm now on hold.

My demeanor has been polite but confused. Talking slower than usual, to eat up time.

I've worked call centers before, and I'm not here to lash out at the rep.

I'm playing the part of Polite But Annoying Customer.

I'm causing friction but not giving them any reason to dismiss me.

They just offered me a callback from the supervisor but I said I'd stay on hold

Got a supervisor

Wasted time with greetings / asking how their day is etc

Repeated everything I had told the rep

Said I don't want to waste anyone's time emailing a complaint if I don't know what the complaint is about

Supervisor finally said they've been instructed to only hand out the email and give no further information

They can't tell me anything else on the phone

I say hey, no problem, I know this isn't your fault

I ask to file an internal ticket

Supervisor said all calls are logged with case numbers

I ask for the case number

I now have something I can call back about and waste more time

(since I don't know how email works and I need people to explain things to me slowly on the phone)

Total call length: 25 minutes

I think anyone who has done customer service before wants to be as efficient as possible when calling.

But here, you need to play the part of someone who is incapable of doing any self-service while also embodying the kind neighbor who eats up 15 minutes of your life whenever you pass their porch.

 

Examples from the README

example 1

[
  { "let": { "name": "JSON", "times": 3 } },
  {
    "for": {
      "var": "i",
      "from": 1,
      "to": "times",
      "do": [
        { "print": { "add": ["Hello ", "name"] } }
      ]
    }
  }
]

example 2

[
  { "import": "system.jpl" },
  { "print": { "call": { "now": [] } } },
  { "print": { "call": { "osName": [] } } },
  { "print": { "call": { "cpuCount": [] } } },
  { "let": { "a": 9, "b": 4, "name": "JPL" } },
  { "print": { "add": ["\"a + b = \"", { "add": ["a", "b"] }] } },
  { "print": { "mul": ["a", "b"] } },
  { "print": { "div": ["a", "b"] } },
  { "print": { "mod": ["a", "b"] } },
  { "print": { "&": [6, 3] } },
  { "print": { "||": [false, true] } },
  { "print": { "gt": ["a", "b"] } },
  { "def": { "sq": { "params": ["x"], "body": [{ "return": { "mul": ["x", "x"] } }] } } },
  { "print": { "call": { "sq": [5] } } },
  { "def": { "greet": { "params": ["who"], "body": [{ "return": { "add": ["\"Hi, \"", "who"] } }] } } },
  { "print": { "call": { "greet": ["\"JSON Fan\""] } } },
  { "if": { "cond": { "<": ["b", "a"] }, "then": { "print": "\"b < a 👍\"" }, "else": { "print": "\"b >= a 🤔\"" } } },
  { "for": { "var": "i", "from": 1, "to": 3, "step": 1, "do": [ { "print": { "call": { "sq": ["i"] } } } ] } },
  { "print": "\"All features in one! 🎉\"" }
]

example 3

[
// 🚀 Welcome to JPL — JSON Programming Language!

// Import system utilities for fun stuff
{ "import": "system.jpl" },

// Print system info
{ "print": { "call": { "now": [] } } },
{ "print": { "call": { "osName": [] } } },
{ "print": { "call": { "cpuCount": [] } } },

// Define a math function to square a number
{
  "def": {
    "square": {
      "params": ["x"],
      "body": [
        { "return": { "mul": ["x", "x"] } }
      ]
    }
  }
},

// Greet a user
{
  "def": {
    "greet": {
      "params": ["name"],
      "body": [
        { "return": { "add": ["Hello, ", "name"] } }
      ]
    }
  }
},

// Declare variables
{ "let": { "a": 7, "user": "Kapil" } },

// Use greet function and print
{ "print": { "call": { "greet": ["user"] } } },

// Conditional message
{
  "if": {
    "cond": { ">": ["a", 5] },
    "then": { "print": "a is greater than 5" },
    "else": { "print": "a is 5 or less" }
  }
},

// Loop with break and continue
{
  "for": {
    "var": "i",
    "from": 1,
    "to": 10,
    "step": 1,
    "do": [
      { "if": { "cond": { "eq": ["i", 3] }, "then": { "continue": true } } },
      { "if": { "cond": { "gt": ["i", 7] }, "then": { "break": true } } },
      { "print": { "call": { "square": ["i"] } } }
    ]
  }
},

// Fun ending message
{ "print": "🎉 Done with curly braces and JSON fun!" }
]

 

The population (especially the younger generation, who never seen a different kind of technology at all) is being conditioned by the tech industry to accept that software should behave like an unreliable, manipulative human rather than a precise, predictable machine. They're learning that you can't simply tell a computer "I'm not interested" and expect it to respect that choice. Instead, you must engage in a perpetual dance of "not now, please" - only to face the same prompts again and again.

 

Building UI in .NET MAUI with XAML continues to be the most popular approach. […] One of the downsides is how verbose it can become. […]

.NET 6 introduced global and implicit usings for C# which greatly reduced the using statements at the head of many C# files. Now in .NET 10 starting with Preview 5 we are introducing the same for XAML so you can declare your namespaces and prefixes in a single file and use them throughout. In fact, you can now omit the use of prefixes altogether!

 

Starts with the basics of how Datamoshing works in video encoding, then explores it in game engine rendering.

view more: next ›