Hi list,
I wanna see and learn the source of vanilla object, but I can't find the C source file.
I guess the C source of [metro] is metro.c, but metro.c file doesn't exist. I found it very difficultly named after x_time.c!
I guess: [metro] is in *metro.c* But actually: [metro] is in *x_time.c*
How can I find the source of each object easily?
I would to know too, why and how naming the source file name? I can't understand...
Thanks, akntk
On 12/23/2014 07:05 PM, Jonghyun Kim wrote:
Hi list,
I wanna see and learn the source of vanilla object, but I can't find the C source file.
I guess the C source of [metro] is metro.c, but metro.c file doesn't exist. I found it very difficultly named after x_time.c!
I guess: [metro] is in *metro.c* But actually: [metro] is in *x_time.c*
How can I find the source of each object easily?
$ grep '"metro"' *.c
"grep" is the unix-command to search a number of text-files for a given pattern. i'm using both kind of quotes to search for a string literal containing the double-quotes (<<"metro">>), as I know that each class has to be registered with it's name, which means that the C-string "metro" has to occur somewhere in the text.
I would to know too, why and how naming the source file name? I can't understand...
part of the filename is obvious (e.g. "time" relates to things (e.g. objects) that deal with - well - time, like [metro]). there's a short explanation about the non-obvious part ("x_") in CHANGELOG.txt.
gmdsr IOhannes
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
I'm on Ubuntu 14.04 amd64
On Wed, Dec 24, 2014 at 3:12 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 07:05 PM, Jonghyun Kim wrote:
Hi list,
I wanna see and learn the source of vanilla object, but I can't find the
C
source file.
I guess the C source of [metro] is metro.c, but metro.c file doesn't
exist.
I found it very difficultly named after x_time.c!
I guess: [metro] is in *metro.c* But actually: [metro] is in *x_time.c*
How can I find the source of each object easily?
$ grep '"metro"' *.c
"grep" is the unix-command to search a number of text-files for a given pattern. i'm using both kind of quotes to search for a string literal containing the double-quotes (<<"metro">>), as I know that each class has to be registered with it's name, which means that the C-string "metro" has to occur somewhere in the text.
I would to know too, why and how naming the source file name? I can't understand...
part of the filename is obvious (e.g. "time" relates to things (e.g. objects) that deal with - well - time, like [metro]). there's a short explanation about the non-obvious part ("x_") in CHANGELOG.txt.
gmdsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
it works, thanks!
i forgot the location path.
akntk@umi:~/Downloads/pd-0.46-4/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, akntk@umi:~/Downloads/pd-0.46-4/src$
On Wed, Dec 24, 2014 at 4:12 AM, Jonghyun Kim agitato816@gmail.com wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
I'm on Ubuntu 14.04 amd64
On Wed, Dec 24, 2014 at 3:12 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 07:05 PM, Jonghyun Kim wrote:
Hi list,
I wanna see and learn the source of vanilla object, but I can't find
the C
source file.
I guess the C source of [metro] is metro.c, but metro.c file doesn't
exist.
I found it very difficultly named after x_time.c!
I guess: [metro] is in *metro.c* But actually: [metro] is in *x_time.c*
How can I find the source of each object easily?
$ grep '"metro"' *.c
"grep" is the unix-command to search a number of text-files for a given pattern. i'm using both kind of quotes to search for a string literal containing the double-quotes (<<"metro">>), as I know that each class has to be registered with it's name, which means that the C-string "metro" has to occur somewhere in the text.
I would to know too, why and how naming the source file name? I can't understand...
part of the filename is obvious (e.g. "time" relates to things (e.g. objects) that deal with - well - time, like [metro]). there's a short explanation about the non-obvious part ("x_") in CHANGELOG.txt.
gmdsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
thanks a lot!
Now I can find and study the code :)
On Wed, Dec 24, 2014 at 4:23 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I have an additional question. Where is the compiled binary file?
I found the source code of [metro] at x_time.c, and I would to know where is the compiled binary, *metro.pd_linux*
I tried to find, but no result. Where is the *metro.pd_linux*?
akntk@umi:~$ sudo find / -name metro.pd_linux akntk@umi:~$
Thanks, akntk
On Wed, Dec 24, 2014 at 4:40 AM, Jonghyun Kim agitato816@gmail.com wrote:
thanks a lot!
Now I can find and study the code :)
On Wed, Dec 24, 2014 at 4:23 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
The classes provided by Pd-vanilla are not externals. They are compiled into the pd binary itself. The metro_setup routine will be run at startup (where in the code does this occur? there are other setup routines that run the *_setup functions for built-in classes )
Chuck
On Tue, Dec 23, 2014 at 1:56 PM, Jonghyun Kim agitato816@gmail.com wrote:
I have an additional question. Where is the compiled binary file?
I found the source code of [metro] at x_time.c, and I would to know where is the compiled binary, metro.pd_linux
I tried to find, but no result. Where is the metro.pd_linux?
akntk@umi:~$ sudo find / -name metro.pd_linux akntk@umi:~$
Thanks, akntk
On Wed, Dec 24, 2014 at 4:40 AM, Jonghyun Kim agitato816@gmail.com wrote:
thanks a lot!
Now I can find and study the code :)
On Wed, Dec 24, 2014 at 4:23 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
sys_main in s_main.c calls pd_init (from m_pd.c) which runs all the relevant *_setup functions. -Jonathan
On Tuesday, December 23, 2014 3:15 PM, Charles Z Henry <czhenry@gmail.com> wrote:
The classes provided by Pd-vanilla are not externals. They are compiled into the pd binary itself. The metro_setup routine will be run at startup (where in the code does this occur? there are other setup routines that run the *_setup functions for built-in classes )
Chuck
On Tue, Dec 23, 2014 at 1:56 PM, Jonghyun Kim agitato816@gmail.com wrote:
I have an additional question. Where is the compiled binary file?
I found the source code of [metro] at x_time.c, and I would to know where is the compiled binary, metro.pd_linux
I tried to find, but no result. Where is the metro.pd_linux?
akntk@umi:~$ sudo find / -name metro.pd_linux akntk@umi:~$
Thanks, akntk
On Wed, Dec 24, 2014 at 4:40 AM, Jonghyun Kim agitato816@gmail.com wrote:
thanks a lot!
Now I can find and study the code :)
On Wed, Dec 24, 2014 at 4:23 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
For the objects which ship with Pd-Vanilla (and for some externals), there is no object-name.pd_linux. Instead there's the main Pd binary which loads all the internal classes when Pd starts up. (It's named different things for pd, pd-l2ork, and pd-extended). All the externals in the libdir format will have a object-name.pd_linux for each class. (The extension is different for OSX and Windows.) But not all externals are in that format-- some have their own loaders and/or load multiple classes in one binary. -Jonathan
On Tuesday, December 23, 2014 2:56 PM, Jonghyun Kim <agitato816@gmail.com> wrote:
I have an additional question. Where is the compiled binary file? I found the source code of [metro] at x_time.c, and I would to know where is the compiled binary, metro.pd_linux I tried to find, but no result. Where is the metro.pd_linux? akntk@umi:~$ sudo find / -name metro.pd_linuxakntk@umi:~$
Thanks,akntk On Wed, Dec 24, 2014 at 4:40 AM, Jonghyun Kim agitato816@gmail.com wrote:
thanks a lot! Now I can find and study the code :) On Wed, Dec 24, 2014 at 4:23 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
thanks for the answer!
I tried to find with grep, but it doesn't work...
*akntk@umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c* *grep: *.c: No such file or directory*
all C-source files (that's all of Pd without the GUI), lives in the "src" folder.
zmoelnig@XXX:~$ cd ~/src/pd/src/ zmoelnig@XXX:~/src/pd/src$ grep '"metro"' *.c x_time.c: metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, zmoelnig@XXX:~/src/pd/src$
you could also use grep's "-r" flag to recursively search files in subdirectories, and the "-l" flag to only show the filename (and not the line containing the keyword).
zmoelnig@XXX:~$ cd ~/src/pd/ zmoelnig@XXX:~/src/pd$ $ grep -r -l '"metro"' . ./doc/5.reference/timer-help.pd ./doc/1.manual/x5.htm ./src/x_time.c zmoelnig@XXX:~/src/pd$
obviously there are more files containing "metro" in quotes. note that i now use '.' as the "file" to search (which means the current directory; as i do a recursive search, this will search all files in all subdirectories of the current dir).
you might also want to have a look at the manpage of "grep" to learn more about it.
$ man grep
gfdsmr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list