sys/arch/mips/include: mips3_pte.h
andvar: change #define to #error for MIPS3_4100i 8KB page size build protection.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mips/include/mips3_pte.h.diff?r1=1.31&r2=1.32
C에서 구조체 멤버의 오프셋 찾는 법
//#define <stddef.h>
#define offsetof(st, m) \
((size_t)&(((st *)0)->m))
C에도 음수 인덱싱이 존재한다
int __conv_chart[5] = {-7,-5,0,2,3};
int* conv_chart = &__conv_chart[2];
conv_chart[-2]; //-7
conv_chart[1]; //2
C에서 인자로 수식 들어가는거 아시죠?
int num = get_num_carrots();
printf("There %s %d carrot%s.", num == 1? "is" : "are", num, num == 1 ? "" : "s");
// There is 1 carrot
// There are 2 carrots.
C에서 구조체 멤버의 오프셋 찾는 법
```C
//#define <stddef.h>
#define offsetof(st, m) \
((size_t)&(((st *)0)->m))
```
C에도 음수 인덱싱이 존재한다
```C
int __conv_chart[5] = {-7,-5,0,2,3};
int* conv_chart = &__conv_chart[2];
conv_chart[-2]; //-7
conv_chart[1]; //2
```
C에서 인자로 수식 들어가는거 아시죠?
```C
int num = get_num_carrots();
printf("There %s %d carrot%s.", num == 1? "is" : "are", num, num == 1 ? "" : "s");
// There is 1 carrot
// There are 2 carrots.
```
Save your future self (trying to finish a thing) from your past self (trying to be a good boy):
`#define private public`
Why does Linux have so few debug traces in its drivers? In Haiku I can usually just enable/uncomment a `#define TRACE` and get lots of debug info from any driver I need. In Linux, they fail silently or with a very nondescript error ("spi-nor: init failed: -2" or so) and I have to spend a lot of time adding my own traces in all the possible places that can lead to that specific error code until I find where there is a problem…
VCNL4020 QT breakout board testing 🔧🔅🤝
This light and proximity sensor using the VCNL4020 https://www.digikey.com/en/products/detail/vishay-semiconductor-opto-division/VCNL4020-GS08/2813348 was designed a few months ago, but we were dragging our feet on writing the library code as its kind of a tedious process. Now, with our new BFF ChatGPT4, we can crank through a library with minimal typing. Of course, we check each function and #define as it is written - sometimes typos and misunderstandings come through.
I run "in debug mode" and I see across hundreds of messages something "flying around" ( one of my "internal errors" ) saying "THAT FEATURE IS DISABLED" .. Disabled ?? WTF YOU MEAN DISABLED !! .. go to look around and find .. // comment this to disable ... // #define ENABLE_THAT_FEATURE 1 .. I disabled it to debug what I was debugging I COMPLETELY FORGOT ( and NOT written down in notes ) that I did .. .. *BANG* *BANG* *BANG* *BANG* ( head on the desk ) ..
@jaybird110127 @datajake1999 Yeah. First, modify ph_drwt01.c. Search for #define HIGHEST_F0, and change that to something like 60001. 6000 is the frequency, I think 1 is the multiplier. Then modify #define LOWEST_F0, replacing 500 with something like 10. This appears twice, once for mainline and again for NWS builds. If you want it to affect the mainline builds, go to Line 2332 and replace the values there. Next, to allow the ap command to use the new range, go to ph_defi.c, and replace 50, 350, /* AP */ with the new range, something like 1, 6000.
How would you #define #religion?
Surface level definitions don’t quite do it for me. I wouldn’t say that religion is a belief in the supernatural, because #secular #Judaism is a thing. I wouldn’t say that religion is a belief in God, because #zen #Buddhism is a thing. I wouldn’t say that religion is a matter of obedience to inspired law, because #Satanism is a thing.
#satanism #buddhism #zen #judaism #secular #religion #define
@regehr @DRMacIver Why #define comparison if it’s shorter than ‘comparison’? 🤔
@jonocarroll @brodriguesco oh. I don't
#define R_NO_REMAP
which means I get access to the shorter aliases i.e. without "Rf_" prefix.
Midnight thoughts on #success:
How do we #define success? For some it will be achieving a certain thing they’ve been working towards for a long time. For others it will be something as seemingly simple as getting out of bed.
Why is success such a hard thing to define? Because it is #unique to an #individual and to a #situation. There are no hard and fast rules definitively stating what success is and how to achieve it.
We don’t have any right to #judge others based on their success or lack thereof if we are using our own values as the metric against which someone else is being judged. We can admire their #achievements. We can encourage their #efforts. We can empathise with them in their #hardships. But we do not get to say what is or what isn’t a success because of how we regard it in our own lives.
Maybe success was getting to the end of this toot. Maybe it was finding 5 minutes to scroll on the socials. Maybe it was waking up in the first place.
#success #define #unique #individual #situation #judge #achievements #efforts #hardships #defineyourownsuccess