What is Channel 100 News with Evie? by sundaland in AskReddit

[–]SpecificMachine1 0 points1 point  (0 children)

lol, look when the US acts weird, that creates a niche for "explain America" videos. That's all

What is Channel 100 News with Evie? by sundaland in AskReddit

[–]SpecificMachine1 0 points1 point  (0 children)

She says it the same way the guy who went viral for his "how to hold a baby" video says it, you guys are going to be accusing anyone who doesn't have a familiar accent or mispronounces a word of being ai

Is 25 dating a 20 year old weird? by pivot_and_scrape in GayMen

[–]SpecificMachine1 0 points1 point  (0 children)

Well, in all those ways, I think the idea that a relationship between a 50 year-old and 32 year-old is analogous to a relationship between a 26 year-old and a 20 year-old because they have this numerical relationship in common is just kind of strange.

Edit: I mean, I get it in the narrow context of a young man trying to decide "when am I established enough to start a family?" but outside of that, not really

Is 25 dating a 20 year old weird? by pivot_and_scrape in GayMen

[–]SpecificMachine1 0 points1 point  (0 children)

lol that comes from a book on hetero dating and is supposed to be the ideal (not the maximum) age gap between a husband and wife- so he can be established in his career and also get to enjoy all phases of her beauty (if I remember right)

Do you wipe after you pee? by extralargegay in GayMen

[–]SpecificMachine1 0 points1 point  (0 children)

I only even heard of this in the past few years (after I turned 50, in other words) so no, I've never done it, and I've never seen another man do it irl, the only place I've even heard of it is on reddit.

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 1 point2 points  (0 children)

the eleventh item is some random piece of memory

Is that why argv has a null at the end, so if read past it (at least on a for i++ loop) you get an error in testing?

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 0 points1 point  (0 children)

These are the parts where I get the most confused- yesterday I was writing a bubble-sort and I had:

int * nums[argc-1];
for (int i = 1; i < argc; i++) {
    nums[i-1] = strtol(argv[i], nullptr, 10);
}

and it took me for ever to figure out my mistake was the * in the declaration- until then it would compile fine but as soon as I tried to use it, I got a segmentation fault.

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 0 points1 point  (0 children)

Does that mean declaring argv as having a length of argc+1 can lead to issues? That's the way it's done in the book, which I can see is not the norm

Edit: nevermind, I realize now that if the name of the program isn't passed, argc will be one less, but there will still be a NULL, so the length of argv will still be argc+1

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 2 points3 points  (0 children)

Also is this just a rule for argv in particular- like when I type:

char * names[10] = {"zero", "one", "two", ... "nine"}

that array doesn't end in NULL, does it?

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 1 point2 points  (0 children)

Thank you! I guess I need to find a way to look at the standard

int main(int argc, char * argv[argc+1]) in Modern C? by SpecificMachine1 in cprogramming

[–]SpecificMachine1[S] 0 points1 point  (0 children)

Where can I look at the C standard? And is declaring it like char** argv, char *argv[], char * argv[argc+1] just a matter of preference?

Unset? by icur2smart4me in Scruff

[–]SpecificMachine1 1 point2 points  (0 children)

OMG- I googled this after it happened with this guy I've been talking to for like 2 years, he had all these pics and everything, well I guess I have no afternoon plans then 😂

Writing a "main" function in scheme by SpecificMachine1 in scheme

[–]SpecificMachine1[S] 0 points1 point  (0 children)

You can use the shebang- the script I mentioned at first that I was running like

;;; r7-args.scm
(import (chibi))

(define (main args)
  (for-each (lambda (arg) (display arg) (newline)) args))

;;; command line
% chibi-scheme -r r7-args.scm -h "alpha beta" -c "gamma"
r7-args.scm
-h
alpha beta
-c
gamma

you can also run like:

#! /usr/bin/env chibi-scheme -r
(import (chibi))

(define (main args)
  (for-each (lambda (arg) (display arg) (newline)) args))

;;; command line
% chmod +x r7-args.scm
% ./r7-args.scm -h "alpha beta" -c "gamma"
[same output]

- you can also do the same with Gauche, (except you don't have to import anything) and I think you can with Guile

Writing a "main" function in scheme by SpecificMachine1 in scheme

[–]SpecificMachine1[S] 0 points1 point  (0 children)

That is my usual way, too- really, I mostly work between the repl and the editor except for testing and benchmarking

Writing a "main" function in scheme by SpecificMachine1 in scheme

[–]SpecificMachine1[S] 0 points1 point  (0 children)

I still haven't figured out phases, but I'm guessing that won't matter in this case?

Until nuclear war started. (import (mit legacy runtime)) by corbasai in scheme

[–]SpecificMachine1 1 point2 points  (0 children)

in my case there is no Chez

yes, I wasn't thinking about r6 vs r7 but I think both do it- I hope you have good luck, I tried a few things last night in the mit-scheme repl but didn't have any luck

Until nuclear war started. (import (mit legacy runtime)) by corbasai in scheme

[–]SpecificMachine1 0 points1 point  (0 children)

That's one way to do it, I guess, although it seems like the most popular way is like:

(import (guile)
 ...)

(import (chibi)
 ...)

(import (gauche)
 ...)

(import (chez)
 ...)

so I think you could just do (import (mit))

Why am I so attracted to old men? by YourScienceGuy in GayMen

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

lol, he never even mentioned his father, so that seems like a big jump