Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Greg London
Federico Lucifredi continues his quest to build a hardware-assisted automagic hard-drive wiper, using perl in an embedded device. *Shiny hardware! Demo! Code*! Federico, It was getting late, so I didn't want to throw in another tangent for how to write your code. But I was thinking you could

Re: [Boston.pm] Perl and recursion

2013-04-10 Thread Gyepi SAM
On Tue, Apr 09, 2013 at 10:24:45PM -0400, Bob Rogers wrote: map should produce better code and does reads better but it also iterates the entire list and you can't break out of it . . . Not quite true, as you can goto a label outside of the block: sub find_odd { # Return

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Tom Metro
Greg London wrote: ...replace your printline() function with a closure. Instead of doing this over and over: printline($var1,\$y,text,font,$size); You could take $y and put it inside a lexical block... To me this looks like an example of where we suffer by not having OO truly baked into the

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Greg London
Greg London wrote: ...replace your printline() function with a closure. Instead of doing this over and over: printline($var1,\$y,text,font,$size); You could take $y and put it inside a lexical block... To me this looks like an example of where we suffer by not having OO truly baked into

Re: [Boston.pm] Tech Meeting: Embedded Perl with Federico

2013-04-10 Thread Tom Metro
Federico Lucifredi continues his quest to build a hardware-assisted automagic hard-drive wiper, using perl in an embedded device. Federico, You showed some slides explaining why drive erasure is important, and also mentioned that this task isn't a job responsibility, but you never quite

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Tom Metro
Greg London wrote: I've pasted an OO version and the closure version of my script below. They're nearly identical. they both take about the same amount of lines of code. Nice that you fleshed out the examples a bit further. Meh. I don't blame that on perl's lack of builtin OO. The problem

Re: [Boston.pm] Perl and recursion

2013-04-10 Thread Bob Rogers
From: Gyepi SAM gy...@praxis-sw.com Date: Wed, 10 Apr 2013 13:54:06 -0400 On Tue, Apr 09, 2013 at 10:24:45PM -0400, Bob Rogers wrote: Not quite true, as you can goto a label outside of the block: [first example omitted] Indeed, you are correct. However, when you break

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Ben Tilly
On Wed, Apr 10, 2013 at 1:33 PM, Tom Metro tmetro+boston...@gmail.com wrote: Greg London wrote: [...] Perl's bolt-on version of classes can fix this about as easily as perl's closure stuff can fix it. The closure version doesn't scale. You can't stick it in a library and call it from

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Greg London
But that's my point. The default, especially with a short script, becomes procedural. Well, I assume it varies from person to person, and the reason my default is procedural is because I've got about two decades of procedural programming under my belt, and only 5 or 10 of the last years has

Re: [Boston.pm] Perl and recursion

2013-04-10 Thread Ben Tilly
On Wed, Apr 10, 2013 at 1:53 PM, Bob Rogers rogers-...@rgrjr.dyndns.org wrote: From: Gyepi SAM gy...@praxis-sw.com Date: Wed, 10 Apr 2013 13:54:06 -0400 On Tue, Apr 09, 2013 at 10:24:45PM -0400, Bob Rogers wrote: [...] Because your example handles a single result, it is not clear

Re: [Boston.pm] Tech Meeting Tuesday Apr 9th, Embedded Perl with Federico, 7, MIT E51-376

2013-04-10 Thread Greg London
I do not agree with this assertion. I've seen closure based solutions and OO versions both scale, and both fail. They are appropriate for different problems, and different designs. But as long as you know what they are (and aren't) good at, you can choose either. I'd agree. I've done quite

Re: [Boston.pm] Perl and recursion

2013-04-10 Thread Bob Rogers
From: Ben Tilly bti...@gmail.com Date: Wed, 10 Apr 2013 14:09:19 -0700 On Wed, Apr 10, 2013 at 1:53 PM, Bob Rogers rogers-...@rgrjr.dyndns.org wrote: I would hope (but don't know how to check) that Perl is smart enough to notice that the map in my original example is in a void

Re: [Boston.pm] Tech Meeting: Embedded Perl with Federico

2013-04-10 Thread Bill Ricker
Notes on Disk technology history, erasure, and those half-mile 3D laser scanners. Half mile 3d laser scanner http://www.theverge.com/2013/4/9/4204582/new-3d-laser-scanner-can-capture-objects-over-half-a-mile-away *Security Now* 384 | TWiT.TV

Re: [Boston.pm] Tech Meeting: Embedded Perl with Federico

2013-04-10 Thread Greg London
I have no idea what the signaling looks like on that 4wire connector between the platters and controller electronics, but it would seem to me that the right bit of hardware hooked directly to those 4 wires would be the best way to wipe a drive. If you drive random data onto the data wire and