Antonio Dolcetta on Fri, 5 Jan 2007 13:22:13 +0100 (CET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [s-d] dice server testing


Joel Uckelman wrote:
> I've put up a new roller for you guys to test. 
Yay!

> sortn(list)    : returns list sorted by numeric value
this does not appear to work

> shuffle(list)  : returns shuffled list
> count(list)    : returns size of list, same as scalar(list)
> 
> As for what Perl built-in functions you can call, if it's an IO, threading,
> filesystem, database, or subprocess function, you can't call it.[4] Also,
> I built in a process-time and memory consumption limit, so that you can't
> accidentally or purposely DoS me.
I also can't call printf (and sprintf) I suppose it has to do with the 
print output capture

> 
> So, I'd appreciate it if you guys would try this out and tell me what you
> think. (Yes, there will be an email version too, but not just yet.) I'm
> interested in how usable you find it, but I'd also like if you'd try to
> break it and do things that you're not supposed to be able to do (like
> breaking out of the sandbox).

easy stuff is easy, and you can do complex stuff in almost pure perl, 
great work!

> 
> The source is here, in case anyone wants to have a look:[5]
> 
> http://dice.nomic.net/tmp/test.html

wrong link ?

> 5. If anyone knows of another way to capture the output of print statements
> besides opening an in-memory file and calling select to switch default
> filehandles, let me know. Surprisingly, it takes several MB of memory to do
> it this way!

hmm, sounds tricky.
you could replace the default print function with something that builds 
an array reference and pushes lines there, and only actually print it 
when you're done. (need to do that for printf and sprintf too)

> 
> 6. Would it be useful to wrap to 80 columns? Or to have an option for that?
> 

I don't see great uses for this, modern mailreaders all wrap lines 
automatically

_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss