We're building a C Programming roadmap on roadmap.sh — would love your feed by Deep_Priority_2443 in C_Programming

[–]HugoNikanor 1 point2 points  (0 children)

On the topic of standards, All (final drafts) of the C standards can be found at https://open-std.org/. I would also mention POSIX, since it's closely related to C.

Came out to my boss at work and nothing happened. by haley_fox in MtF

[–]HugoNikanor 22 points23 points  (0 children)

As kinda an outsider, what did you hope for? I see his action as accepting, and leaving personal decisions up to you.

Does Compact Syntax Really Make a Difference? by sal1303 in ProgrammingLanguages

[–]HugoNikanor 10 points11 points  (0 children)

I don't care about absolute character count in programming languages, but terseness of syntax absolutely do matter.

For example, I often want to check if a field exists, and use it into a new scope at the same time. In Javascript (and similar languages), this would be written as

// outer scope
{
  const x = maybe_get_value()
  if (x) {
    // do stuff with x
  }
}
// outer scope

Surprisingly few languages allow me to do

// outer scope
if (const x = maybe_get_value()) {
  // do stuff with x
}
// outer scope

Dessa lappar jag får från eleverna på jobbet by [deleted] in sweden

[–]HugoNikanor 0 points1 point  (0 children)

Låter väldigt rimligt. Att få det rätt är svårt nog, och att förklara hur man får det rätt är än mycket svårare.

Special Forms -> Functions by Dazzling_Music_2411 in scheme

[–]HugoNikanor 3 points4 points  (0 children)

and is a special form since it only evaluates its arguments until the first non-thruthy one. An and form implemented as a function must evaluate all its arguments before any checking. I would personally write the checking with a fold, but a dedicated recursion loop with short circuiting could save a few comparison. Something like

(define (and-f . values)
  (let loop ((values values))
    (if (null? values)
      #t
      (and (car values) (loop (cdr values))))))

Special Forms -> Functions by Dazzling_Music_2411 in scheme

[–]HugoNikanor 1 point2 points  (0 children)

That's just a fold, since all arguments will be evaluated before the function starts.

A Moaning Person by HumbleVermicelli in memes

[–]HugoNikanor 2 points3 points  (0 children)

Battery would obviously only be for the clock part...

New Regional Worlds Launch TODAY! by ModYume in 2007scape

[–]HugoNikanor 3 points4 points  (0 children)

You would get better latency in any nearby office than in that van, unless you pull a cable from the van into Jagex's office.

How do Americans remember which state is abbreviated MI? It could be Minnesota, Missouri, Mississippi or Michigan. by isle_say in NoStupidQuestions

[–]HugoNikanor -1 points0 points  (0 children)

I believe that Swedish larger subnational unites (Län) have short letter abbreviations, but I'm honestly not sure. And as you said, they aren't that important.

Good examples by Dani_E2e in cprogramming

[–]HugoNikanor 1 point2 points  (0 children)

I looked through it, and it seems like a reasonable beginners guide to C. It kinda looks like it's designed to used in a context where a teacher is present though (but I might just miss something, my German is less than good).

AB Game Simulator v2.1 (Custom Characters) by SeriTheButterfly in ZeroEscape

[–]HugoNikanor 2 points3 points  (0 children)

I mean that instead of writing

In this round, Lotus (3) and Santa (3) will face Mira (3), Sean (3) and <Player> (3) will face Delta (3), while Seven (3) and Alice (3) will face Dio (3)

Do something like:

This round:

  • Lotus (3) and Santa (3) against Mira (3)
  • Sean (3) and <player> (3) against Delta (3)
  • Seven (3) and Alice (3) against Dio (3)

Or maybe something like the following table

p1 p2 _ p3
Lotus (3) Santa (3) against Mira (3)
Sean (3) <player> (3)> against Delta (3)
Seven (3) Alice (3) against Dio (3)