Re: question on ssh and peeve on editors
At 9:01 PM -0500 2002-10-03, Puneet Kishor wrote: I have Golive 5, but didn't invest in 6 because I discovered it didn't do anything for Perl. Is the SDK GL6 specific? I have no idea what knowledge it On Thursday, October 3, 2002, at 01:18 PM, Troy Davis wrote: I use GoLive to create websites. But I use BBEdit to work with perl. The two can co-exist, but you're right in that they're not very good roommates. I'd love to see a module to replace the php dynamic database stuff with perl... Puneet: The reason I need something like Dreamweaver or Golive is because I don't want to use my finite braincells remembering syntax for silly html for making tables, frames, hex colors, and other such stupidities. Doing that nonsense visually makes developing web apps tolerable. Even more so when you have to go back and edit some convoluted frames and/or tables code. Perhaps because I taught HTML for five years in the early days, and insisted that my students work without visual HTML composers (which were terrible, besides), I never adopted GL, DW, etc into my own workflow. When my projects have web output, all the HTML is generated by my software, i.e., Perl. Maybe this doesn't get at the problem you're trying to solve, but with a modest investment of time you could equip yourself with Perl tools to do everything you need, including eliminating the tedium of composing in raw HTML. There are several versatile HTML-generating modules on the CPAN, and most use some form of templating. I've built my own templating and output module, so I can't make a recommendation, but others on this list would happily. A complete web application development library could be assembled from a set of well-maintained Perl modules from CPAN. Your module would 'use' or 'require' DBI.pm, CGI.pm, File::Spec, etc, collecting these powers together to be harnessed in your own methods. That wisdom aside, Puneet's posts suggest interest in a programming challenge to learn from, which was the impulse I followed... For my projects, I have to be able to send output in many formats, often not HTML, not even network-related (database, spreadsheet, page layout, postscript). So I wrote a templating module that can dispatch methods from external libraries in response to whatever string of tokens it's fed. For HTML output, I have a module whose methods dress up the data they're passed in the HTML format evoked by the token; if an output method fails, the token is output as an HTML comment. Thus the only place in my programs that any HTML appears is in the methods (subroutines) specifically employed to produce output in this format. Program control, state transitions, database operations, math, date-time calcs, image generation, and so on, have none. This is where I see the dividing line between logic and presentation. It's a thinko to look at the code and the template as representing that distinction. Speaking of templates, I have HTML templates of all types and sizes: one-line dynamic input widgets; whole 'pages' with headers n' everything; standard input forms; sub-templates nested within master templates; dynamic style sheets... The output from my html-generating methods is also beautiful :-) That is, it's just the way I like it: correct HTML usage, easy to scan if I view source, follows my prefs for indentation, capitalization, etc. I also have templates for use during development, e.g., to throw the necessary data and control buttons onscreen, but without the ultimate art and typography. Sometimes all it takes is a style sheet to spruce it up. Forgive me for going on if you know all this, but let me add one more thing about Perl-generated HTML: it has two distinct uses: direct dynamic output, which the web server returns to the client; and output to file, for web resources that update on a time period or upon some event other than an http request. The latter is, in effect, what the visual editors do: output to a file to be used as static HTML. Why not build your own? 1; -- - Bruce __bruce_van_allen__santa_cruz_ca__
Re: question on ssh and peeve on editors
At 02:32 PM -0400 10/3/02, Chris Devers wrote: Etc. As long as you can name what you want in the scheme: protocol://host/path The Jaguar finder can generally find mount it. You can also browse locally accessible networks, but if you know the address for the resource you want, this will get it whether or not the Finder can, well, find it. Wouldn't this rock? - sftp://user@host/path :-) Troy
Re: question on ssh and peeve on editors
I agree that there should be a separation of logic and presentation elements, I do that as much as possible. In GoLive's dynamic content examples, the php, jsp and vb code is merged within the html files. Not an ideal situation from my perspective. I don't know if this is necessary or not for new dynamic content formats. In any case, the GoLive SDK manual is pretty hefty, 400-some-odd pages. It would take some serious time investment to develop perl ports of the included examples (a calendar, shopping cart, etc.). If Adobe were paying me to port the examples to perl? Sure. But for free? I don't have that much time available. Perhaps a motivated student would, but ideally Adobe should throw some resources at the question, assuming enough people want the feature. Cheers, Troy On Thursday, October 3, 2002, at 10:01 PM, Puneet Kishor wrote: I have Golive 5, but didn't invest in 6 because I discovered it didn't do anything for Perl. At 10:17 PM -0400 10/3/02, Sherm Pendley wrote: Why would you expect it to? Golive is a WYSIWYG HTML editor - the requirements for which are a great deal different from those of a good Perl editor. Furthermore, your HTML code shouldn't be in the same file as your Perl code anyway - good programming practice dictates putting it in an external template. There are literally a dozen or more CPAN modules for filling in the blanks when using such templates - my own favorite is Text::Template, but your mileage may vary. -- ___ Troy Davis ACD Interactive Slipstream.com 205 W. 4th St. #1130 Cincinnati, OH 45202 USA Tel - 513.241. x119 Fax - 513.241.1107
Re: question on ssh and peeve on editors
I wondered if anyone else had noticed my 2 cents on this issue :) I used Interarchy for quite a long time and was always amazed at the depth of the app. The mount a remote fs on the desktop feature, I thought, was a pretty cool idea. Not one I used, because I have an incredibly slow connection, but still a cool concept. Knowing a bit about Interarchy, it would surprise me if it did not provide the answer (or at least something close) to Puneet's needs. Puneet, did you give Interarchy a try? -- Bill Stephenson www.PerlHelp.com 1-417-546-5593 From: Charles Albrecht [EMAIL PROTECTED] Date: Fri, 4 Oct 2002 07:52:26 -0600 To: macosx perl [EMAIL PROTECTED] Subject: Re: question on ssh and peeve on editors At 9:03 PM -0500 10/3/2002, Puneet Kishor wrote: Thanks to everyone who answered. The bottomline is, I can't use ssh to transparently mount a remote fs. I can fake it somewhat via RBrowser. Now I can peruse other options such as nfs, webdav, or even smb. You can also fake it pretty well with Interarchy. -Charles Euonymic Solutions [EMAIL PROTECTED]
Re: question on ssh and peeve on editors
On 10/3/02 at 1:12 PM, [EMAIL PROTECTED] (Puneet Kishor) wrote: Folks, Two parts -- 1. Only tangentially perl related (in that, I want to edit perl scripts) residing on a remote machine connected via ssh. Is there a way to actually mount an ssh connected machine's hd on my ibook so I can open the scripts on the remote machine via my local editor of choice? You can mount a remote server on your desktop via Samba: Finder Go Menu - Connect to server (or Cmd K) In address type (I think) smb://www.hostname.com/username -or- Using BBEdit choose File - Open from FTP Server
Re: question on ssh and peeve on editors
Andrew Brosnan wrote: On 10/3/02 at 1:12 PM, [EMAIL PROTECTED] (Puneet Kishor) wrote: Folks, Two parts -- 1. Only tangentially perl related (in that, I want to edit perl scripts) residing on a remote machine connected via ssh. Is there a way to actually mount an ssh connected machine's hd on my ibook so I can open the scripts on the remote machine via my local editor of choice? You can mount a remote server on your desktop via Samba: Finder Go Menu - Connect to server (or Cmd K) In address type (I think) smb://www.hostname.com/username well, only if smbd (the samba daemon) is running on the remote server. Samba is generally for making *nix fs appear on Win boxes, no? I am talking ssh here. I tried something like so... % ssh -l username -L 10139:remotehost:139 remotehost sleep 300 (139 is the samba port... I mapped it above to the local 10139 port). Then I went to the finder and tried to connect to smb://remotehost:139/ but that did not work... got error -36. So, I did try it, but... -or- Using BBEdit choose File - Open from FTP Server No, I can't use ftp. The remote box has sshd running, no ftpd, no telnetd... I guess, I just want it confirmed whether it can be done via ssh or not. If not, then I can embark on a different torture quest. Thanks, pk/
Re: question on ssh and peeve on editors
On Thu, 3 Oct 2002, Andrew Brosnan wrote: You can mount a remote server on your desktop via Samba: Finder Go Menu - Connect to server (or Cmd K) In address type (I think) smb://www.hostname.com/username More broadly, the Finder can mount a variety of protocols, at least in Jaguar. Similar capability existed in 10.1 but it works better now. As Andrew says, just set the system focus to the Finder, hit cmd+K, then: smb://windows/share/point nfs://unix/share/point afs://appletalk/share/point ftp://ftpserver/path webdav://webdav/path -- not positive about the protocol here Etc. As long as you can name what you want in the scheme: protocol://host/path The Jaguar finder can generally find mount it. You can also browse locally accessible networks, but if you know the address for the resource you want, this will get it whether or not the Finder can, well, find it. -- Chris Devers[EMAIL PROTECTED] Q: Why don't lawyers go to the beach? A: The cats keep trying to bury them.
Re: question on ssh and peeve on editors
On Thu, 3 Oct 2002, Puneet Kishor wrote: well, only if smbd (the samba daemon) is running on the remote server. Samba is generally for making *nix fs appear on Win boxes, no? Well, it's standard Windows file sharing, of which the protocol has been reimplemented for *nix systems and, in this case, OSX. More simply it's for attaching to any server offering the SMB/CIFS protocol; Windows boxes can do this out of the box if you turn on file sharing, *nix machines can do this with a bit more work but from the client side it shouldn't matter. More or less any protocol can be tunneled through SSH if you know how. % ssh -l username -L 10139:remotehost:139 remotehost sleep 300 (139 is the samba port... I mapped it above to the local 10139 port). Then I went to the finder and tried to connect to smb://remotehost:139/ but that did not work... got error -36. So, I did try it, but... So what you need to do, for want of VPN access (oh yeah, Jaguar support for VPN rocks if you can take advantage of it) is to set up an ssh tunnel through which you can run Samba or any other file sharing protocol. It shouldn't matter which protocol you end up using, I think. Actually, WebDAV might be easier in that it can run over http port 80, which is generally not blocked by firewalls. Purists will argue that overloading ports to get past firewalls is bad, and well I agree but pragmatically it may be the best way for you to go here. From what I can tell, WebDAV -- known on OSX10.0/10.1 as iDisk and on Windows as web folders -- seems to have been crafted to solve exactly the problem you're trying to deal with here: create edit files on remote disks as if they were local resources, and yet potentially you can have many people collaborating on these files too. Neat-o! :) -- Chris Devers[EMAIL PROTECTED]
Re: question on ssh and peeve on editors
At 1:31 PM -0500 10/3/02, Puneet Kishor wrote: Andrew Brosnan wrote: Using BBEdit choose File - Open from FTP Server No, I can't use ftp. The remote box has sshd running, no ftpd, no telnetd... I guess, I just want it confirmed whether it can be done via ssh or not. If not, then I can embark on a different torture quest. With BBEdit and MacSFTP (see http://www.macssh.com/) it can be done. MacSFTP has a preference for double-clicking a remote file which allows you to choose between downloading it and opening it in BBEdit. I find that it works nicely. BBEdit seems to think it's got the file open via ftp, but it's actually sftp. Unfortunately, this solution only works if you want to edit via BBEdit. I'm not aware of a way to do it for other editors. I suppose it should be possible to tunnel some other protocol across ssh, but that sounds like a pain. -- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853
Re: question on ssh and peeve on editors
On Thu, 3 Oct 2002, Puneet Kishor wrote: What I don't want is ftp, smb, afs, nfs, etc. That is because the remote box is not running any of these. You want file sharing. Set aside ssh for a moment -- the key problem you want to solve is that you want to be able to remotely manage files, and incidently you want to run this through an encrypted channel with ssh. Fine. Any solution you pick is going to have to involve a file sharing protocol though. Pick one turn it on. Like I say, I suggest WebDAV. Details/urls on request. -- Chris Devers[EMAIL PROTECTED] FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS: #13 A: Doc, Happy, Bashful, Dopey, Sneezy, Sleepy, Grumpy Q: Who were the Democratic presidential candidates?
Re: question on ssh and peeve on editors
At 2:32 PM -0400 10/3/2002, Chris Devers wrote: More broadly, the Finder can mount a variety of protocols, at least in Jaguar. Similar capability existed in 10.1 but it works better now. As Andrew says, just set the system focus to the Finder, hit cmd+K, then: smb://windows/share/point nfs://unix/share/point afs://appletalk/share/point ftp://ftpserver/path webdav://webdav/path -- not positive about the protocol here webdav is http://webdav/path But of course, none of these are encrypted. I don't know about 10.2, but in 10.1, the TLS-encrypted webdav sites I've put up can't be accessed from the finder using https:// I use interarchy's Edit in BBEdit mode when I need local access to a remote file over an encrypted connection, where saves are automatically sync'ed up. I believe MacSFTP and a few other options also support this mode. Interarchy also has a caching mode it calls an FTP disk (FTP or FTP over SSH - the next version will add SFTP to the options). The files you work with are local, but they look like they're on a mounted volume. -Charles Albrecht Euonymic Solutions [EMAIL PROTECTED]
Re: question on ssh and peeve on editors
What about Interarchy? I haven't heard much from them but they did have something like this for early versions of OSX. Might be worth looking into -- Bill Stephenson www.SecureShopper.com 1-417-546-5593 From: Puneet Kishor [EMAIL PROTECTED] Date: Thu, 03 Oct 2002 13:12:03 -0500 To: macosx perl [EMAIL PROTECTED] Subject: question on ssh and peeve on editors Is there a way to actually mount an ssh connected machine's hd on my ibook so I can open the scripts on the remote machine via my local editor of choice?
Re: question on ssh and peeve on editors
There is a shareware app called RBrowser that will give you a finder window (NeXTSTEP style) on your desktop, the back end communications can be ssh. If the box you need to get to is only one ssh hop away its a really good tool. On Thu, 3 Oct 2002, Andrew Brosnan wrote: You can mount a remote server on your desktop via Samba: Finder Go Menu - Connect to server (or Cmd K) In address type (I think) smb://www.hostname.com/username
Re: question on ssh and peeve on editors
wht not copy the files back and forth with perl: use LWP::Simple; $flag = mirror($RemotePath,$LocalPath); print $flag,\n; } On Friday, October 4, 2002, at 03:20 AM, Andrew Brosnan wrote: On 10/3/02 at 1:12 PM, [EMAIL PROTECTED] (Puneet Kishor) wrote: I want to edit perl scripts You can mount a remote server on your desktop via Samba: Finder Go Menu - Connect to server (or Cmd K) In address type (I think) smb://www.hostname.com/username -or- Using BBEdit choose File - Open from FTP Server
Re: question on ssh and peeve on editors
Hi Troy, I am cc-ing this to the list in case someone else wants to join in, otherwise I guess this is an off the list topic. (no one else has commented on this). I have Golive 5, but didn't invest in 6 because I discovered it didn't do anything for Perl. Is the SDK GL6 specific? I have no idea what knowledge it requires. What does one code in to develop extensions, so to say? I have no knowledge of anything other than the various scripting languages... I guess I would echo you... I would be willing to assis if you feel compelled to do something about the status quo. ;-) I also downloaded a trial copy of Dreamweaver... that has a fairly good integration with BBEdit, but is a really slow software... too much overhead for the little bit of it that I really need. Please feel free to continue this thread with me off the list, especially if you think there is something realistic do-able with GL6 vis a vis Perl coding. Thanks, Puneet. On Thursday, October 3, 2002, at 01:18 PM, Troy Davis wrote: Hi Puneet, I use GoLive to create websites. But I use BBEdit to work with perl. The two can co-exist, but you're right in that they're not very good roommates. I'd love to see a module to replace the php dynamic database stuff with perl. But somebody would have to adopt that as a personal project, I doubt Adobe would do it on their own. So while advocacy might be good, recruiting people to write the code would probably be better. Adobe has an SDK for GoLive. I would be willing to assist if you feel compelled to do something about the status quo. Cheers, Troy .. 2. I have a major peeve with the two leading heavyweight web development apps... Macromedia's Dreamweaver MX 6 and Adobe's Golive 6. Both allow working with all manner of server side scripting files but not Perl. What's with that? I mean, they even support scripting C# and .Net. But when it comes to Perl, no code/syntax highlighting, error checking, nothing. Perl scripts are treated like plain dumb text. The reason I need something like Dreamweaver or Golive is because I don't want to use my finite braincells remembering syntax for silly html for making tables, frames, hex colors, and other such stupidities. Doing that nonsense visually makes developing web apps tolerable. Even more so when you have to go back and edit some convoluted frames and/or tables code. Would have been great if I could do the visual part as well as the perl part. Is their a general impression (at least in the commercial world) that perl is moribund? Do they think there are no perl programmers on the Mac (they only need come to this list)? I called Adobe and griped, but that's it. Also posted some questions on Macromedia's forums... no bite. Is there need for some advocacy here?
Re: question on ssh and peeve on editors
Thanks to everyone who answered. The bottomline is, I can't use ssh to transparently mount a remote fs. I can fake it somewhat via RBrowser. Now I can peruse other options such as nfs, webdav, or even smb. Gracias. pk/
Re: question on ssh and peeve on editors
Puneet opined the truth is that it is _primarily_ a wysiwig html editor... but if you were to think of it as a web application development IDE... then it would make sense to offer some basic scripting support (which it does, except not for perl), or a darn good integration with a (or several) external editors. I don't know much about templates, and I like GoLive, in concept, especially now that 300 MHz processors are considered slow. (First experience with GoLive was the pre-Adobe days on an, erm, LC 630. Speaking of which, anyone know a place in the Hanshin (Osaka -- Kobe) area to get a non-buggy 68040 cheap? I still have one of those boxes, and I want to dual-boot openBSD on it.) But I found that what I usually did was design the page, grab the design elements, and paste them into the real page. That is, I left GoLive behind and used a straight text editor once the design work was done. (Used CodeWarrior's editor since it was pretty stable with shift-JIS and handled the various flavors of line-endings for me. I like BBEdit, too.) General-purpose WYSIWYG editors for XML are still a little bit ahead of us on the software technology curve. Say, my company is training a large group of us on Struts (Java -- Jakarta). Anyone know of a comparable project with Perl, i. e., a framework that would allow separating the business model and control logic out of the view? -- Joel Rees [EMAIL PROTECTED]
Re: question on ssh and peeve on editors
On Thursday, October 3, 2002, at 10:42 PM, Puneet Kishor wrote: if you were to think of it as a web application development IDE... If you were to do that, you'd be setting yourself up for a lot of pain and frustration. The fact is, GoLive's support for PHP, ASP, et al panders to the expectations of designers who want to dabble a bit with programming by starting with a scripting language that's primarily embedded in HTML. The fact that it does so should not be taken to mean that using a wysiwyg editor to edit programming code will be beneficial to either your productivity or to your sanity in the long run. that, seriously, is a matter of choice. *shouldn't* is a strong word... Yes, it is a matter of choice. If you choose to embed HTML in your Perl, or vice versa, you won't be getting a midnight call from the Programming Police. No one will revoke your license to write Perl. However, the idea of separating logic from presentation is fundamental. It's viewed as a good thing by most professional programmers, whether they're working on a web site with HTML, or on a native Windows or Mac application that uses the Model-View-Controller design pattern. unless I am developing a text-oriented, blogging kinda tool, or a template driven news site, much of the time my html code itself is governed by some server-side logic... Parts of the page are usually generated dynamically, true, and there's no getting around having some small bits of HTML embedded in your Perl code. Just because you can't get 100% perfect separation, however, is no reason to abandon the idea entirely. Of all the applications I have worked on to-date, I really can't think of a single one where I could have successfully separated the logic from the presentation, programming from the html-ing, no matter how good a practice it is supposed to be. Of the applications I've worked on, virtually all of them were template based. Here are some of them: URL: http://pbskids.org/lions/games/unlimited.html Not exactly what I would call text-oriented blogging or a news site. sherm--