RE: Help with plugin concept

new topic     » goto parent     » topic index » view thread      » older message » newer message

See my message(if it ever appears!)

Kat wrote:
> 
> 
> On 14 Feb 2004, at 13:45, Robert Craig wrote:
> 
> > 
> > Pete Lomax wrote:
> > > I cannot however resist suggesting (in pseudo code rather than true or
> > > tested Euphoria, you understand):
> > > 
> > > in say misc.e:
> > > procedure dynamic_include(sequence filename, sequence contents)
> > > integer changed, fn,
> > > object d
> > > 	if interpreting or translating then	-- see PS
> > > 		changed=0
> > > 		d=dir(filename)	--##I forget the syntax/results##
> > > 		if d!=-1 and d[SIZE]=length(contents) then
> > > 			fn=open(filename,"r")
> > > 			for i=1 to length(contents) do
> > > 				if getc(fn)!=contents[i] then
> > > 					changed=1
> > > 					exit
> > > 				end if
> > > 			end for
> > > 			close(fn)
> > > 			if changed=0 then return end if
> > > 		end if
> > > 		open(filename,"w")
> > > 		puts(fn,contents)
> > > 		close(fn)
> > > 		puts(1,"dynamic include changed; restarting...")
> > > 		system(command_line())
> > > 		abort(0)
> > > 	end if
> > > end procedure
> > > 
> > > then:
> > > dynamic_include(filename,contents)
> > > include filename
> > > 
> > > Does that make sense?
> > > If so, I don't think it is much work and it will (might) put this
> > > issue to bed once and for all.
> > > 
> > > Regards,
> > > Pete
> > > PS I am undecided whether it would be better for bind/translate to
> > > simply not generate any code whatsoever for the dynamic_include()
> > > call, or issue a fatal error (/warning) if it detects the program
> > > ought to be re-bound/re-translated.
> > 
> > That's an interesting idea.
> > A bit convoluted though.
> > I think I'll wait and see if anyone starts
> > screaming about this issue when the new interpreter
> > is released.
> 
> <scream><scream><scream><scream><scream><scream><scream><scre
> am><scream><scream><scream><scream><scream><scream><scream><
> scream><scream>
> 
> It's things like this, and executing vars and such, that made me drop Eu 
> for a 
> number of things. You could just as easily encorporate dynamic includes 
> as:
> 
> var = fget("filename.e")
> function1 = var[50..2000]
> function2 = var[2010..3000]
> 
> or 
> 
> execute(var)
> 
> But heck, i have been screaming for these things for years, i am now 
> using 
> PHP to get around Eu deficiencies, especially on nix boxes. You may be 
> deciding on what the language can do based on the number of people 
> asking 
> for them, but you won't hear from those who just decide you won't add 
> them 
> anyhow, and politely quietly move on to other languages. At least i said 
> 
> something first, repeatedly. People won't use it if they must first ask 
> for 
> features, wait years, and then see if they get the features. Or get Karl 
> to add 
> it to his language in a few days.
> 
> Kat
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu