Csound Csound-dev Csound-tekno Search About

[Cs-dev] Including URLs

Date2013-11-22 15:35
Fromjohn ffitch
Subject[Cs-dev] Including URLs
I have code that allows #include to take a URL in an orchestra and it
seems to work.  My question is, is it a good idea? 

Pro: allows remote udo repositories
     sort-of kool

Con: might open people up to unsafe repositories
     Introduces another dependency (libcurl)


Any thoughts or comments?


==John ffitch

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-22 22:19
FromOeyvind Brandtsegg
SubjectRe: [Cs-dev] Including URLs
AttachmentsNone  None  

It sounds very nice indeed.  If it may introduce the possibility for  malicious repos it might be good to have a way to hard disable it for long running unattended systems, like I use sometimes.
?
Oeyvind

22. nov. 2013 16:36 skrev "john ffitch" <jpff@codemist.co.uk> følgende:
>
> I have code that allows #include to take a URL in an orchestra and it
> seems to work.  My question is, is it a good idea?
>
> Pro: allows remote udo repositories
>      sort-of kool
>
> Con: might open people up to unsafe repositories
>      Introduces another dependency (libcurl)
>
>
> Any thoughts or comments?
>
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-11-23 11:54
Fromjoachim heintz
SubjectRe: [Cs-dev] Including URLs
hi john -

this seems to open up interesting possibilities. one question:

is this only for #include statements, or could it be more general, like
Sfile strfromurl "http://my/url" (reading the url content as string),
or perhaps directly via readf/readfi:
Sline, iLineNum readfi "http://my/url"
?

that could be very nice for instance for an installation which depends 
on the state of a certain website or something similar.

best -

	joachim


Am 22.11.2013 16:35, schrieb john ffitch:
> I have code that allows #include to take a URL in an orchestra and it
> seems to work.  My question is, is it a good idea?
>
> Pro: allows remote udo repositories
>       sort-of kool
>
> Con: might open people up to unsafe repositories
>       Introduces another dependency (libcurl)
>
>
> Any thoughts or comments?
>
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-23 17:49
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Including URLs
AttachmentsNone  

Date2013-11-24 19:04
Fromjpff
SubjectRe: [Cs-dev] Including URLs
Now works in scores and the strfromurl opcode exists (in git)


On Sat, 23 Nov 2013, joachim heintz wrote:

> hi john -
>
> this seems to open up interesting possibilities. one question:
>
> is this only for #include statements, or could it be more general, like
> Sfile strfromurl "http://my/url" (reading the url content as string),
> or perhaps directly via readf/readfi:
> Sline, iLineNum readfi "http://my/url"
> ?
>
> that could be very nice for instance for an installation which depends
> on the state of a certain website or something similar.
>
> best -
>
> 	joachim
>
>
> Am 22.11.2013 16:35, schrieb john ffitch:
>> I have code that allows #include to take a URL in an orchestra and it
>> seems to work.  My question is, is it a good idea?
>>
>> Pro: allows remote udo repositories
>>       sort-of kool
>>
>> Con: might open people up to unsafe repositories
>>       Introduces another dependency (libcurl)
>>
>>
>> Any thoughts or comments?
>>
>>
>> ==John ffitch
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-24 19:11
FromAndres Cabrera
SubjectRe: [Cs-dev] Including URLs
AttachmentsNone  None  

Hi,

My only qualm is that it introduces a new dependency to core csound. It can probably be disabled at compile time, thought, so it might be ok. Like plugin opcodes being available or not...

Cheers,
Andres

On Nov 24, 2013 11:05 AM, "jpff" <jpff@codemist.co.uk> wrote:
Now works in scores and the strfromurl opcode exists (in git)


On Sat, 23 Nov 2013, joachim heintz wrote:

> hi john -
>
> this seems to open up interesting possibilities. one question:
>
> is this only for #include statements, or could it be more general, like
> Sfile strfromurl "http://my/url" (reading the url content as string),
> or perhaps directly via readf/readfi:
> Sline, iLineNum readfi "http://my/url"
> ?
>
> that could be very nice for instance for an installation which depends
> on the state of a certain website or something similar.
>
> best -
>
>       joachim
>
>
> Am 22.11.2013 16:35, schrieb john ffitch:
>> I have code that allows #include to take a URL in an orchestra and it
>> seems to work.  My question is, is it a good idea?
>>
>> Pro: allows remote udo repositories
>>       sort-of kool
>>
>> Con: might open people up to unsafe repositories
>>       Introduces another dependency (libcurl)
>>
>>
>> Any thoughts or comments?
>>
>>
>> ==John ffitch
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2013-11-24 19:58
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Including URLs
AttachmentsNone  

Date2013-11-25 16:28
FromSteven Yi
SubjectRe: [Cs-dev] Including URLs
Hi All,

I have some reservations about this feature.  I had mentioned this to
John offlist but would like to iterate them here as well.

I'm trying to figure out the use cases here where loading a resource
for inclusion at runtime by Csound would be desirable and preferable
over other systems.  Some drawbacks I see are:

1. increases project fragility: if the included file is not under your
control, your project may break suddenly if someone decides to change
the included file

2. security: the included file may have unsafe code

I think in terms of project management, drawing from other programming
languages, I usually see:

1. languages import/include only from local directories at compile/runtime
2. libraries are managed using some kind of package manager (i.e. gem
for Ruby, pyegg or easy_install for python, hackage for haskell, maven
for Java)
3. package manager would use some meta file that describes the
project's dependencies.  The manager could then auto-download the
dependencies to a local folder where the project is, or download to a
system-wide location.

The only place I can think of as a model for network loading of
libraries is in webpages, but there's some security model usually in
place and really the files are packaged together like a project would
be locally.

I do think having an opcode that reads text from a URL could be
useful. I don't know if that kind of code though is something I'd want
to do in Csound as part of the audio graph rather than in a host
language where I could spawn a thread and do some post-processing,
etc.

I'm a little hesitant about this feature as a whole, but that's
probably because I'm not seeing a compelling use case and do see some
drawbacks that concern me.

steven

On Sun, Nov 24, 2013 at 2:58 PM,   wrote:
> Assuming I did not make an error (>!) it is set up to require
> HAVE_CURL set.  I have not yet worked out the Cmake incantation to
> check for curl/curl.c and libcurl
>
> At present it has to be set by hand.
>
>
> Quoting Andres Cabrera :
>
>> Hi,
>>
>> My only qualm is that it introduces a new dependency to core csound. It can
>> probably be disabled at compile time, thought, so it might be ok. Like
>> plugin opcodes being available or not...
>>
>> Cheers,
>> Andres
>> On Nov 24, 2013 11:05 AM, "jpff"  wrote:
>>
>>> Now works in scores and the strfromurl opcode exists (in git)
>>>
>>>
>>> On Sat, 23 Nov 2013, joachim heintz wrote:
>>>
>>> > hi john -
>>> >
>>> > this seems to open up interesting possibilities. one question:
>>> >
>>> > is this only for #include statements, or could it be more general, like
>>> > Sfile strfromurl "http://my/url" (reading the url content as string),
>>> > or perhaps directly via readf/readfi:
>>> > Sline, iLineNum readfi "http://my/url"
>>> > ?
>>> >
>>> > that could be very nice for instance for an installation which depends
>>> > on the state of a certain website or something similar.
>>> >
>>> > best -
>>> >
>>> >       joachim
>>> >
>>> >
>>> > Am 22.11.2013 16:35, schrieb john ffitch:
>>> >> I have code that allows #include to take a URL in an orchestra and it
>>> >> seems to work.  My question is, is it a good idea?
>>> >>
>>> >> Pro: allows remote udo repositories
>>> >>       sort-of kool
>>> >>
>>> >> Con: might open people up to unsafe repositories
>>> >>       Introduces another dependency (libcurl)
>>> >>
>>> >>
>>> >> Any thoughts or comments?
>>> >>
>>> >>
>>> >> ==John ffitch
>>> >>
>>> >>
>>> ------------------------------------------------------------------------------
>>> >> Shape the Mobile Experience: Free Subscription
>>> >> Software experts and developers: Be at the forefront of tech innovation.
>>> >> Intel(R) Software Adrenaline delivers strategic insight and
>>> game-changing
>>> >> conversations that shape the rapidly evolving mobile landscape. Sign up
>>> now.
>>> >>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Shape the Mobile Experience: Free Subscription
>>> > Software experts and developers: Be at the forefront of tech innovation.
>>> > Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>> > conversations that shape the rapidly evolving mobile landscape. Sign up
>>> now.
>>> >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Shape the Mobile Experience: Free Subscription
>>> Software experts and developers: Be at the forefront of tech innovation.
>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>> now.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>
>
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-25 19:34
Fromjoachim heintz
SubjectRe: [Cs-dev] Including URLs
hi steven -

i can understand this from your point of view:

"I do think having an opcode that reads text from a URL could be
useful. I don't know if that kind of code though is something I'd want
to do in Csound as part of the audio graph rather than in a host
language where I could spawn a thread and do some post-processing,
etc."

but what about the large number of csound users which do not use csound 
via a host language?

i see also a problem in the new dependency, hoping that this can be 
solved in a safe and not confusing way (similar to python opcodes or lua 
opcodes). i am happy about this feature because it gives interesting 
possibilities of looking in url content without being dependent on any 
other software.

best -

	joachim


Am 25.11.2013 17:28, schrieb Steven Yi:
> Hi All,
>
> I have some reservations about this feature.  I had mentioned this to
> John offlist but would like to iterate them here as well.
>
> I'm trying to figure out the use cases here where loading a resource
> for inclusion at runtime by Csound would be desirable and preferable
> over other systems.  Some drawbacks I see are:
>
> 1. increases project fragility: if the included file is not under your
> control, your project may break suddenly if someone decides to change
> the included file
>
> 2. security: the included file may have unsafe code
>
> I think in terms of project management, drawing from other programming
> languages, I usually see:
>
> 1. languages import/include only from local directories at compile/runtime
> 2. libraries are managed using some kind of package manager (i.e. gem
> for Ruby, pyegg or easy_install for python, hackage for haskell, maven
> for Java)
> 3. package manager would use some meta file that describes the
> project's dependencies.  The manager could then auto-download the
> dependencies to a local folder where the project is, or download to a
> system-wide location.
>
> The only place I can think of as a model for network loading of
> libraries is in webpages, but there's some security model usually in
> place and really the files are packaged together like a project would
> be locally.
>
> I do think having an opcode that reads text from a URL could be
> useful. I don't know if that kind of code though is something I'd want
> to do in Csound as part of the audio graph rather than in a host
> language where I could spawn a thread and do some post-processing,
> etc.
>
> I'm a little hesitant about this feature as a whole, but that's
> probably because I'm not seeing a compelling use case and do see some
> drawbacks that concern me.
>
> steven
>
> On Sun, Nov 24, 2013 at 2:58 PM,   wrote:
>> Assuming I did not make an error (>!) it is set up to require
>> HAVE_CURL set.  I have not yet worked out the Cmake incantation to
>> check for curl/curl.c and libcurl
>>
>> At present it has to be set by hand.
>>
>>
>> Quoting Andres Cabrera :
>>
>>> Hi,
>>>
>>> My only qualm is that it introduces a new dependency to core csound. It can
>>> probably be disabled at compile time, thought, so it might be ok. Like
>>> plugin opcodes being available or not...
>>>
>>> Cheers,
>>> Andres
>>> On Nov 24, 2013 11:05 AM, "jpff"  wrote:
>>>
>>>> Now works in scores and the strfromurl opcode exists (in git)
>>>>
>>>>
>>>> On Sat, 23 Nov 2013, joachim heintz wrote:
>>>>
>>>>> hi john -
>>>>>
>>>>> this seems to open up interesting possibilities. one question:
>>>>>
>>>>> is this only for #include statements, or could it be more general, like
>>>>> Sfile strfromurl "http://my/url" (reading the url content as string),
>>>>> or perhaps directly via readf/readfi:
>>>>> Sline, iLineNum readfi "http://my/url"
>>>>> ?
>>>>>
>>>>> that could be very nice for instance for an installation which depends
>>>>> on the state of a certain website or something similar.
>>>>>
>>>>> best -
>>>>>
>>>>>        joachim
>>>>>
>>>>>
>>>>> Am 22.11.2013 16:35, schrieb john ffitch:
>>>>>> I have code that allows #include to take a URL in an orchestra and it
>>>>>> seems to work.  My question is, is it a good idea?
>>>>>>
>>>>>> Pro: allows remote udo repositories
>>>>>>        sort-of kool
>>>>>>
>>>>>> Con: might open people up to unsafe repositories
>>>>>>        Introduces another dependency (libcurl)
>>>>>>
>>>>>>
>>>>>> Any thoughts or comments?
>>>>>>
>>>>>>
>>>>>> ==John ffitch
>>>>>>
>>>>>>
>>>> ------------------------------------------------------------------------------
>>>>>> Shape the Mobile Experience: Free Subscription
>>>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>>>> Intel(R) Software Adrenaline delivers strategic insight and
>>>> game-changing
>>>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>> ------------------------------------------------------------------------------
>>>>> Shape the Mobile Experience: Free Subscription
>>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Shape the Mobile Experience: Free Subscription
>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-28 00:56
FromAndres Cabrera
SubjectRe: [Cs-dev] Including URLs
AttachmentsNone  None  
I think the dependency issue is no problem if the functionality is added as an opcode, but if it is to be done with the #include directive, then it has to be a dependency of the core. The only advantage of having it with #include is that sample rate, ksmps and the rest of the headers can be set, whereas with opcodes, these values have already been set.

Cheers,
Andrés


On Mon, Nov 25, 2013 at 11:34 AM, joachim heintz <jh@joachimheintz.de> wrote:
hi steven -

i can understand this from your point of view:

"I do think having an opcode that reads text from a URL could be
useful. I don't know if that kind of code though is something I'd want
to do in Csound as part of the audio graph rather than in a host
language where I could spawn a thread and do some post-processing,
etc."

but what about the large number of csound users which do not use csound
via a host language?

i see also a problem in the new dependency, hoping that this can be
solved in a safe and not confusing way (similar to python opcodes or lua
opcodes). i am happy about this feature because it gives interesting
possibilities of looking in url content without being dependent on any
other software.

best -

        joachim


Am 25.11.2013 17:28, schrieb Steven Yi:
> Hi All,
>
> I have some reservations about this feature.  I had mentioned this to
> John offlist but would like to iterate them here as well.
>
> I'm trying to figure out the use cases here where loading a resource
> for inclusion at runtime by Csound would be desirable and preferable
> over other systems.  Some drawbacks I see are:
>
> 1. increases project fragility: if the included file is not under your
> control, your project may break suddenly if someone decides to change
> the included file
>
> 2. security: the included file may have unsafe code
>
> I think in terms of project management, drawing from other programming
> languages, I usually see:
>
> 1. languages import/include only from local directories at compile/runtime
> 2. libraries are managed using some kind of package manager (i.e. gem
> for Ruby, pyegg or easy_install for python, hackage for haskell, maven
> for Java)
> 3. package manager would use some meta file that describes the
> project's dependencies.  The manager could then auto-download the
> dependencies to a local folder where the project is, or download to a
> system-wide location.
>
> The only place I can think of as a model for network loading of
> libraries is in webpages, but there's some security model usually in
> place and really the files are packaged together like a project would
> be locally.
>
> I do think having an opcode that reads text from a URL could be
> useful. I don't know if that kind of code though is something I'd want
> to do in Csound as part of the audio graph rather than in a host
> language where I could spawn a thread and do some post-processing,
> etc.
>
> I'm a little hesitant about this feature as a whole, but that's
> probably because I'm not seeing a compelling use case and do see some
> drawbacks that concern me.
>
> steven
>
> On Sun, Nov 24, 2013 at 2:58 PM,  <jpff@cs.bath.ac.uk> wrote:
>> Assuming I did not make an error (>!) it is set up to require
>> HAVE_CURL set.  I have not yet worked out the Cmake incantation to
>> check for curl/curl.c and libcurl
>>
>> At present it has to be set by hand.
>>
>>
>> Quoting Andres Cabrera <mantaraya36@gmail.com>:
>>
>>> Hi,
>>>
>>> My only qualm is that it introduces a new dependency to core csound. It can
>>> probably be disabled at compile time, thought, so it might be ok. Like
>>> plugin opcodes being available or not...
>>>
>>> Cheers,
>>> Andres
>>> On Nov 24, 2013 11:05 AM, "jpff" <jpff@codemist.co.uk> wrote:
>>>
>>>> Now works in scores and the strfromurl opcode exists (in git)
>>>>
>>>>
>>>> On Sat, 23 Nov 2013, joachim heintz wrote:
>>>>
>>>>> hi john -
>>>>>
>>>>> this seems to open up interesting possibilities. one question:
>>>>>
>>>>> is this only for #include statements, or could it be more general, like
>>>>> Sfile strfromurl "http://my/url" (reading the url content as string),
>>>>> or perhaps directly via readf/readfi:
>>>>> Sline, iLineNum readfi "http://my/url"
>>>>> ?
>>>>>
>>>>> that could be very nice for instance for an installation which depends
>>>>> on the state of a certain website or something similar.
>>>>>
>>>>> best -
>>>>>
>>>>>        joachim
>>>>>
>>>>>
>>>>> Am 22.11.2013 16:35, schrieb john ffitch:
>>>>>> I have code that allows #include to take a URL in an orchestra and it
>>>>>> seems to work.  My question is, is it a good idea?
>>>>>>
>>>>>> Pro: allows remote udo repositories
>>>>>>        sort-of kool
>>>>>>
>>>>>> Con: might open people up to unsafe repositories
>>>>>>        Introduces another dependency (libcurl)
>>>>>>
>>>>>>
>>>>>> Any thoughts or comments?
>>>>>>
>>>>>>
>>>>>> ==John ffitch
>>>>>>
>>>>>>
>>>> ------------------------------------------------------------------------------
>>>>>> Shape the Mobile Experience: Free Subscription
>>>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>>>> Intel(R) Software Adrenaline delivers strategic insight and
>>>> game-changing
>>>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>> ------------------------------------------------------------------------------
>>>>> Shape the Mobile Experience: Free Subscription
>>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Shape the Mobile Experience: Free Subscription
>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel