Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIL... (Today I've learned...)
TIL why I got an error such that 'egg_info failed' or what, when I try to install mu on my laptop. What a terrible bug.

PS. Haven't successfully installed yet
Reply
Today Volapük numbers such as balsetel are old; degtel is modern.
Reply
TIL troff and nroff are not a part of POSIX.
Reply
TIL how labels in C works.

1. I thought the label's address would be (address of main())+(some), but could not see because the compiler said 'label' is not defined when I tried to compile the following program:

Code:
#include<stdio.h>

int main(){
label:
   printf("%x\n",main);
   printf("%x\n",label);
}

2. The goto statement does never go out of the function; thus following program outputs 'main':

Code:
#include<stdio.h>
#include<stdlib.h>

void fn(void){
f:
   puts("fn");
   exit(0);
}

int main(){
   goto f;
f:
   puts("main");
   exit(0);
}
Reply
(2020-03-12 05:19:07)SouthAnd960 Wrote: TIL how labels in C works.

1. I thought the label's address would be (address of main())+(some), but could not see because the compiler said 'label' is not defined when I tried to compile the following program:

Code:
#include<stdio.h>

int main(){
label:
  printf("%x\n",main);
  printf("%x\n",label);
}

2. The goto statement does never go out of the function; thus following program outputs 'main':

Code:
#include<stdio.h>
#include<stdlib.h>

void fn(void){
f:
  puts("fn");
  exit(0);
}

int main(){
  goto f;
f:
  puts("main");
  exit(0);
}

Labels don't really have addresses because a label's target may be generated more than once or not at all in the output assembly. They are intended to model the concept of assembly labels (and goto models an unconditional jump), but they don't actually have a one-to-one equivalence to them.
If you need to contact me for any reason, or if you have any questions, concerns, problems or requests, message me here or email me at aaaaaa123456789@acidch.at.

This forum has been around for (loading...)
Reply
TIL there's such thing as an HDMI splitter. Because I never needed one before now. XD
Reply
TIL two certain people, whom I never mention here, had been trying to stalk me on the internet.
If I mention here, they definitely notice I am here, and they will make me come back to the community again.

Btw I don't remember why I quit the community any more.
Reply
TIL another way of arithmetic in sed --- without unarization.
Reply
TIL this C program can be compiled successfully.
I haven't run the program yet because it looked dangerous.

Code:
int main(){
    goto *3;
}

OTOH if you replace *3 to 3, it cannot be compiled well.

PS. Changed *3 into "Hello". Failed. Changed *3 into *&"Hello". Compiled successfully. ...!?

2nd PS. Computed goto!?
Reply
You're using a GCC-ism. That's not standard C.
If you need to contact me for any reason, or if you have any questions, concerns, problems or requests, message me here or email me at aaaaaa123456789@acidch.at.

This forum has been around for (loading...)
Reply
TIL Church encoding and Scott encoding.

other sources

Scott
  • <zero>=\zs.z
  • <succ>n=\zs.s(nzs)
  • Pros: easy to program
  • Cons: types not available
Church
  • <zero>=\zs.z
  • <succ>n=\zs.sn
  • Pros: types available
  • Cons: hard to program

...!? Thought <zero>=\fx.x, <one>=\fx.fx, and so on, but the source showed me different definitions.
TIL how to represent the cat program in Lazy K.

Lisp/Scheme style:
Code:
I
Or SK(KK)

Unlambda style:
Code:
i
Or `ii or `sk`kk

Iota style:
Code:
i
Or *ii

Jot style: (empty program)
Or 11111110001110011110011100
Reply
Til the being of an esoteric language Iwashi. The commands are parts of the lyric. Also how input works on Ignore this fancy little acronym because this is just that slashes language with input; how difficult that it works as a getchar(). Seeing cat program, I thought how I was supposed to do competitive programming with the language.
Reply
Hey, maybe you shouldn't use this thread as your personal blog.
If you need to contact me for any reason, or if you have any questions, concerns, problems or requests, message me here or email me at aaaaaa123456789@acidch.at.

This forum has been around for (loading...)
[-] The following 2 users say Thank You to aaaaaa123456789 for this post:
  • Famknight, Uptight 534
Reply
TIL that the CEO of an Indian spice company is actually alive and is 97 years old. I remember seeing the news of his death few years back... Is this what they call 'The Mandella Effect'?
Reply
Today I learned that there is a music genre called "Christian Punk".
[Image: ebvLbre.jpg]
Reply
TIL that 2DR can be a good alternative of FaceRig on your smartphone.
Reply




Users browsing this thread: 1 Guest(s)