feat: C template #27

Merged
Sigmanificient merged 7 commits from c into main 2024-05-14 20:24:13 +00:00
3 changed files with 69 additions and 0 deletions
Showing only changes of commit aff83a7bf1 - Show all commits

35
c/Makefile Normal file
View file

@ -0,0 +1,35 @@
.POSIX:
.SUFFIXES: .o
CC ?= gcc
OUT := hello
SRC += main.c
OBJ := $(SRC:.c=.o)
CFLAGS += @compile_flags.txt
CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS := -fwhole-program -flto
LDFLAGS += -Wl,--gc-sections -s
RM ?= rm -f
.DEFAULT_GOAL: all
.PHONY: all
all: $(OUT)
$(OUT): $(OBJ)
$(CC) -o $@ $<
.PHONY: clean
clean:
$(RM) $(OBJ)
.PHONY: fclean
fclean: clean
$(RM) -r $(OUT)
.PHONY: re
.NOTPARALLEL: re
re: fclean all

18
c/compile_flags.txt Normal file
View file

@ -0,0 +1,18 @@
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-std=c99
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-pedantic
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-pipe
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wall
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wcast-qual
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wconversion
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Werror=return-type
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Werror=vla-larger-than=0
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wextra
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wmissing-prototypes
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wshadow
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wstrict-prototypes
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-Wwrite-strings
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-O2
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-march=native
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here
-mtune=native
getchoo commented 2024-05-07 06:20:12 +00:00 (Migrated from github.com)
Review

why assume this?

```suggestion ``` why assume this?
getchoo commented 2024-05-07 06:21:18 +00:00 (Migrated from github.com)
Review

there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary

```suggestion ``` there's no reason to use these by default. it will only be confusing if anyone shares a locally built binary
Sigmanificient commented 2024-05-07 07:55:13 +00:00 (Migrated from github.com)
Review

I think that C99 is a very good standard to based a template on

I think that C99 is a very good standard to based a template on
getchoo commented 2024-05-07 09:45:20 +00:00 (Migrated from github.com)
Review

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

most people also aren't using c99 anymore. i feel this is just your personal taste here

> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference most people also aren't using c99 anymore. i feel this is just your personal taste here

16
c/main.c Normal file
View file

@ -0,0 +1,16 @@
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
#include <stdlib.h>
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
#include <unistd.h>
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
#define lengthof(sstr) (sizeof (sstr) / sizeof *(sstr))
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
#define sstr_len(sstr) (lengthof(sstr) - 1)
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
#define sstr_unpack(sstr) (sstr), (sstr_len(sstr))
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
static const char GREETING[] = "hello, world!\n";
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
int main(void)
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
{
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
return (
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
write(STDOUT_FILENO, sstr_unpack(GREETING))
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
== sstr_len(GREETING)
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
) ? EXIT_SUCCESS : EXIT_FAILURE;
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`
}
getchoo commented 2024-05-07 06:29:54 +00:00 (Migrated from github.com)
Review
#include <stdio.h>

int main(int argc, char *argv[]) {
    printf("Hello from Aux!\n");
    return 0;
}

we really don't need to overcomplicate this

```suggestion #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello from Aux!\n"); return 0; } ``` we really don't need to overcomplicate this
Sigmanificient commented 2024-05-07 08:20:21 +00:00 (Migrated from github.com)
Review

write is lighter than printf. I think it is better to use it, and i am not sure by what means it is overcomplicated?

`write` is lighter than `printf`. I think it is better to use it, and i am not sure by what means it is overcomplicated?
Austreelis commented 2024-05-07 09:17:17 +00:00 (Migrated from github.com)
Review

I agree with getchoo.
I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway.

I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.

I agree with getchoo. I think defining macros when it's arguably not needed is overcomplicating it. Also, I think we really don't care about the performance of printf vs write here. Getchoo's suggestion is the canonical hello world C program, it doesn't bring in any header other than stdlib, it doesn't define any item besides main (which you probably need), and it's recognizable so people know they should scrap it anyway. I feel like the template should focus on nix code, and completely disregard C code (unless it demonstrates something on the nix side). I'd even be fine with an empty source file if that compiled.
getchoo commented 2024-05-07 09:51:14 +00:00 (Migrated from github.com)
Review

write is lighter than printf

i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference

and i am not sure by what means it is overcomplicated?

i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this

> write is lighter than printf >> i feel this is once again putting a lot of focus on what is really just throwaway example code. i would really take a look at https://github.com/NixOS/templates/tree/master/c-hello as a reference > and i am not sure by what means it is overcomplicated? i don't think we're really going to get anywhere with this question being asked, so i would rather not continue with this
Sigmanificient commented 2024-05-07 09:56:23 +00:00 (Migrated from github.com)
Review

i genuinely don't get it, but i changed the implementation to use a regular printf

i genuinely don't get it, but i changed the implementation to use a regular `printf`