12
I Use This!
Very Low Activity

News

Analyzed about 13 hours ago. based on code collected about 18 hours ago.
Posted over 15 years ago by brett s hallett
Reading Randal Schwarts' excellent comments, I had to take the last paragraph's challenge and rewrite his Squeak solution into gst!. " Randal Schwartz's modified md5 squeak code modified to gst" desiredLength := 20. sourceCharacterSet := ... [More] '0123456789abcdefghijklmnopqrstuvwxyz'. str := String new: desiredLength. str := ((1 to: desiredLength) collect: [:each | sourceCharacterSet atRandom]) asString. str printNl. [Less]
Posted over 15 years ago by brett s hallett
Rewriting a script into a callable method After you have written your small test script and tested it interactively, it is often useful to convert it to a reusable method. The whole point about Methods is provide further modularization of your ... [More] programs into more easily understood units of code. Using the "Fun with MD5 and Random" example code posted on this blog By Samuel Montgome... October 3rd, 2007, as a starting point I wanted to use that routine as a callable method. read more [Less]
Posted over 15 years ago by brett s hallett
When first trying Smalltalk I always found it difficult to obtain simple complete programs to use as a reference tool. Smalltalkers just love showing code 'snippets', but learners need complete examples so they can see the total program. Hopefully ... [More] this will be of use to somebody. The Problem: I have a simple database system created & maintained by a REBOL program, which incidently is a very interesting GUI development language, and the collected data has to be imported into an existing MS-Access database,read more [Less]
Posted over 15 years ago by Stephen Woolerton
I recommend you browse the NetClients package to see methods to show POP mail attributes, e.g. sender, destination, content. POP mail snippet popHost := 'ourPOPHost.com'. popUsername := 'popUser'. popPassword := 'POPpassword'. client ... [More] := NetClients.POP.POPClient connectToHost: popHost. [client username: popUsername password: popPassword. client login. client getNewMailMessages: [:mimeEntity | | subject from | from := mimeEntity from printString.read more [Less]
Posted over 15 years ago by Stephen Woolerton
And here's one to navigate through a home directory folder and change ownership of all folders to the home directory owner. This script was required after the home directories got copied onto another server with a different operating system. This ... [More] works in Smalltalk 3.0x (I understand there are changes coming in File/Directory in 3.1) <pre>#! /usr/local/bin/gst -f Object subclass: #DirNav instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'SG-Scripting'! DirNav comment:read more [Less]
Posted over 15 years ago by Stephen Woolerton
And here's another one with some regular expression comparisons. The occasion being a requirement to link some OS X mailservers together. Unfortunately Apple didn't compile LDAP into Postfix so we're using output from the Apple Directory to generate ... [More] text files for inter-branch mail routing. <pre> !/usr/local/bin/gst -f "read a text file with LDIF records and generate a Postfix virtuals file from the records. Require uid and keyword attributes. - uid is home directory shortname and mail aliases e.g. jim, jim.bobread more [Less]
Posted over 15 years ago by Stephen Woolerton
Here is an example of how to make a system call from a script and get console output. The call is asynchronous - it returns after a time whether the process has completed or not. display_etc | pipe | pipe := FileStream popen: 'ls -l /etc' dir: ... [More] FileStream read. Transcript showCr: pipe contents. ! Synchronous calls: To make an operating system call and block until the command has completed (synchronous). The output is an integer. Here is an example:- shellOut := Smalltalk system: 'ldapadd -x -f /project/LDAPImport.ldif -D binddnhere -S passwordinfilehere' [Less]
Posted over 15 years ago by Stephen Woolerton
I've begun using GNU Smalltalk for scripting purposes. The more I use it, the more I like it. Scripts pass the "its six months later can I understand what I did here" test easily, and errors usually result in a stack trace or a line number so ... [More] debugging is fine. Anyway, as always with a new language it takes a little while to figure out how to read and write files, how to display integers etc. Like most people, I find examples are helpful.read more [Less]
Posted over 15 years ago by Olivier Blanc
I am in the process of writing a documentation / explanation on OpenGL Package. For the time being it is in French, as soon as the first French version is done, I will translate all those pages. I also take some pictures of the openGL / smalltalk examples. Here is the link to my blog : http://www.olivier.blanc.name/blog Regards, Olivier
Posted over 15 years ago by Paolo Bonzini
Here come the pictures: This is a resizer grip widget: This is an ellipsis widget: This is the stack/flow layout manager in action. The four buttons are in the same GtkHBox, but they wrap to the following line: read more