!SGkzNqBXEJutSYnahE:matrix.org

C Programming Language

409 Members
C Programming Ask C related questions here.34 Servers

Load older messages


SenderMessageTime
17 May 2022
@dalek:anontier.nlYouglowslaviaI see them extremely useful for debugging, but not many people do this, so I am probably missing something17:02:39
@dalek:anontier.nlYouglowslaviaLike - I am worried I might be doing something dumbs17:02:55
@dalek:anontier.nlYouglowslavia * Like - I am worried I might be doing something dumb17:02:56
@dalek:anontier.nlYouglowslavia
In reply to @dalek:anontier.nl
Do you guys use __FILE__ and/or __LINE__ variables ?
Not sure how I found out about these, I think I was reading some lib's code xD
17:03:14
@marcthe12:matrix.orgmarcthe12
In reply to @dalek:anontier.nl
Have you tried vi? o.o
I can share a link to my vi configuration if you would like.
I am interested since I sometimes use the orginal vi.
17:13:38
@dalek:anontier.nlYouglowslaviaYeah, I was always confused and I messed shit up when only Vi was installed, and I had to edit something before installing Vim.17:14:49
@dalek:anontier.nlYouglowslaviaDon't be scared of the unknown :)17:15:07
@marcthe12:matrix.orgmarcthe12I have use ed so its not a prob. I just want to be better at the posix stuff. 17:17:57
@dalek:anontier.nlYouglowslaviaMe too xD when DistroTube made a video about it.17:18:51
@name_missing:matrix.orgname_missingI do use line and file. However if i compile with debug then its not strictly nessary as any good debugger can tell u that information too. When i use them its for special debugging when something is remote and i can not attach a debugger.17:36:30
@name_missing:matrix.orgname_missing * I do use __LINE__ and ``FILE`.
However if i compile with debug then its not strictly nessary as any good debugger can tell u that information too.
When i use them its for special debugging when something is remote and i can not attach a debugger.
17:37:18
@name_missing:matrix.orgname_missing * I do use __LINE__ and __FILE__.
However if i compile with debug then its not strictly nessary as any good debugger can tell u that information too.
When i use them its for special debugging when something is remote and i can not attach a debugger.
17:37:33
@name_missing:matrix.orgname_missing There even is __FUNC__ with some compilers. 17:37:51
@dalek:anontier.nlYouglowslavia
In reply to @name_missing:matrix.org
There even is __FUNC__ with some compilers.
Not necessary if the former two are present :0
17:38:52
@dalek:anontier.nlYouglowslavia
In reply to @name_missing:matrix.org
There even is __FUNC__ with some compilers.
* Not necessary if the former two are present.
17:38:56
@dalek:anontier.nlYouglowslavia

I do use __LINE__ and __FILE__.

Thank you very much :)

17:39:11
18 May 2022
@twkmhnnomn:matrix.orgthose who know me have no need of my nameFUNC isn't standard where __func__ is.00:42:01
@torstenvl:matrix.orgtorstenvl I think func became standard in C99, really no reason to use compiler-specific FUNC 05:08:34
@torstenvl:matrix.orgtorstenvlEven if it was C11, that's over a decade ago05:09:11
@torstenvl:matrix.orgtorstenvl
In reply to @dalek:anontier.nl
Like - I am worried I might be doing something dumb
I typically use the __FILE__ etc macros as part of a DBUG() or TRACE() macro that logs messages in debug builds only and gets defined to ((void)0) otherwise.
05:11:19
@name_missing:matrix.orgname_missing #define __FUNC__ __func__ 🙈
For application back end logging i always wanted to use Graphana with InfluxDB.
If there is an error ask the use to report.
Then if accepted show some ticket id and send the data to the backend.
06:42:16
@dyskos:matrix.orgDyskos joined the room.09:29:27
@dalek:anontier.nlYouglowslavia
In reply to @torstenvl:matrix.org
I typically use the __FILE__ etc macros as part of a DBUG() or TRACE() macro that logs messages in debug builds only and gets defined to ((void)0) otherwise.
What do you mean by "and gets defined to ((void)0) otherwise."?
17:23:10
@torstenvl:matrix.orgtorstenvl
In reply to @dalek:anontier.nl
What do you mean by "and gets defined to ((void)0) otherwise."?
https://pastebin.com/BuRp9P3J
17:59:28
@dalek:anontier.nlYouglowslaviaDoes anyone here write program(s) in machine code, or has even tried to? Is it even possible? :D18:00:51
@torstenvl:matrix.orgtorstenvl I had to in college as part of my computer arch / assembly language class. 32-bit SPARC machine code. Fun fun. 18:06:13
@dalek:anontier.nlYouglowslavia
In reply to @torstenvl:matrix.org
https://pastebin.com/BuRp9P3J
Quite interesting!
But isn't "pragma" a new standard thing?
18:37:40
@dalek:anontier.nlYouglowslavia
In reply to @torstenvl:matrix.org
I had to in college as part of my computer arch / assembly language class. 32-bit SPARC machine code. Fun fun.
Damn! I wish I was there!
18:38:02
@dalek:anontier.nlYouglowslavia
In reply to @torstenvl:matrix.org
I had to in college as part of my computer arch / assembly language class. 32-bit SPARC machine code. Fun fun.
* BLAST I wish I was there!
18:38:07
@dalek:anontier.nlYouglowslavia * BLAST! I wish I was there! 18:38:10

There are no newer messages yet.


Back to Room List