• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Coding "Joy of the Day" (JotD)

In atpollard's game Marco meets 30 young gang members. I started thinking how hard it might be to make my 2d6_ogl_chargen Ruby code generate lots of characters.

Then I realized it already could with the "-n <number>" option. Started thinking about making it give output in CSV to import into a spreadsheet.

Oh, wait...

Code:
chargen -n 30 -o csv -b > /var/tmp/gang_draft.csv

The -b option says to generate basic characters with no careers, skills, or mustering out.
 
No reason to miss smalltalk. There are several very capable implementations.

Squeak and Pharo (a fork of Squeak) have a great community about them and are really capable.

When I say 'I miss Smalltalk', I mean 'I miss the possibility of getting paid to work with Smalltalk.' In addition to Squeak and its descendents, VW and VA are still available, and Dolphin have released a freebie version of theirs.

I could happily develop software in Smalltalk, but the options for getting paid to do so are pretty limited.

Interestingly, Gemstone have made a Ruby compiler for their JIT backend called Maglev.
 
When I say 'I miss Smalltalk', I mean 'I miss the possibility of getting paid to work with Smalltalk.' In addition to Squeak and its descendents, VW and VA are still available, and Dolphin have released a freebie version of theirs.

I could happily develop software in Smalltalk, but the options for getting paid to do so are pretty limited.

I made a serious stab at doing some recent work in Pharo. It's one thing to just pine for it, and another to just do it. So, I decided to "just do it". I've always admired ST from afar since the '80 Byte Magazine, but was never able to "use it in anger".

The problem I encountered, though, is that what I wanted to do was a GUI thing.

And much of the ST community, and notably the Pharo community is basically interested in making Pharo/ST better in order to make Pharo/ST better. That is, the development community is pretty much laser focused on the run and the code sharing.

Those that aren't interested in that, are interested in developing web apps.

What they're not really interested in is developing desktop GUIs. Morphic and Spec are basically dumpster fires in terms of support. And, like everything else, is "being rewritten". The Morphic rendering model is circa 1982. Postscript, Java 2D, and JavaScript Canvas are leaps and bounds beyond the ST rendering API.

So, that's not a very endearing place for a hobbyist like me that just wants to get something done, possible share it, and ideally not have it obsoleted 6mos to 1 year down the road.

Right now, at least, Pharo isn't someplace that seems to want folks like me.

So, I gave up and went back to Java.
 
I'd be curious to see what a Traveller app looks like written in Pharo.
Pharo has its own portable UI toolkit that doesn't look anything like a native app on any of the platforms it runs on. I could go into a bit of depth about the original Smalltalk GUI (Windowing UI technology was originally developed on this platform) but in summary it doesn't look or behave much like a modern application for windows, OSX or any of the Linux environments.

This is what a pharo gui looks like.



There are one or two native Windows based Smalltalks that wrap the native win32 ui. Dolphin make a freebie version of theirs, which is probably the best option if you wanted to make a GUI app with it. I don't think any of the Smalltalk systems directly support any mobile platform like Android or iOS. You would need to develop a native app for that or maybe use QT.
 
[ . . . ]
The problem I encountered, though, is that what I wanted to do was a GUI thing.

And much of the ST community, and notably the Pharo community is basically interested in making Pharo/ST better in order to make Pharo/ST better. That is, the development community is pretty much laser focused on the run and the code sharing.
[ . . . ]
The best option for developing a Windows rich client application in Smalltalk is probably Dolphin. It was always a windows-only product and used a native Windows UI. The vendor recently released a freebie version. While I've never used it, by all accounts it's a pretty good product.

http://www.object-arts.com/dolphin7.html
 
Pharo has its own portable UI toolkit that doesn't look anything like a native app on any of the platforms it runs on.
That explains things. People want their apps to all work the same in their OS, without having to start "VMs" to run apps in. Java gets a free pass because apps written in it look close to how their other apps are running. It's way too late in the computer game to be making GUIs that are modeled after OOP. And end-users don't care if a GUI is better managed or not. They just need to use it without thinking "OMG this GUI is awesome!"
 
Yea, Dolphin is right out. I'm not on Windows.

Dolphin has been around since the mid-90's.

The L&F of Pharo wasn't that much of an off putting thing for me, but it was certainly a consideration. It's easy enough to make a "double click" application with Pharo without having to launch the VM separately.

But as I said, Pharo is making a Smalltalk implementation for people who write Smalltalk implementations. Seems that the only people that really use it are those writing Pharo. The web folks run Seaside, and that runs on most anything, and it's pretty stable, so they don't really care.

So, for normal developers, Pharo is pretty stale.
 
Fun, to me, output:

Code:
ruby get_person.rb -n Tar
Tara Bass F Age: 16 B86A73 
Straight medium auburn neck length hair, silver skin 
Temperament: Counselor   Plot: Supplication (4) 
Traits: Focused, Irresponsible

Since the original data was in a CSV file and get_person.rb pulls from a MongoDB backend. Spent a while writing something to change the CSV into something to insert into MongoDB.

The joy is in doing something you could never do.
 
Going over old code as I move back into Go and fixing a bug I had missed before. Nice to have a random thingy that is actually random. :)
 
In the 80's I worked on teletypes for the USAF; 5 bit Baudot, vacuum tubes, schematics. Fun stuff. In the mid-90's I moved to Linux on a mega-powerful i386. Woot! By the late 90's I was a Solaris and Linux sysadmin by trade.

While making things work is fun, I really enjoy creating new things. Never made it to full "programming" degree though I did pass Pascal and C to meet a non-Computer Science degree requirement. I've wanted to be a programmer ever since I realized management thought programmers were smarter than sysadmins. At least their opinions mattered more than ours. Of course, if the programmers were that smart I'd have been out of a job...

I wanted to be a programmer and fell prey to the "learn language X to get a job as a programmer!" marketing. X kept changing on me. I've bounced from one language to another and finally settled on Ruby. Good stuff, though there's years of learning I need to do. I get the basics of OOP but miss the finesse. Still, I've kept with Ruby for a bit and gotten better at it. I have gone deeper with it than any other language.

Several weeks ago I asked a friend, who hires programmers, how they tell if a coder is junior, senior, or whatever. He gave me their simple coding test and some of the criteria they use to judge. The basic test was simple; parse a tab delimited file. He was pleased that I included tests and could use the same code for a 6 line file and a 6 gig file.

Then I went for a real programmer job interview. Wasn't sure I was qualified but it put some meat to my dream. They asked for two code samples and said turning them in within a couple days would be great. I turned them in the next day to score some extra points. :D They liked that I included tests. One of the developers and I talked about turning the process into a recursive call so I melted a few brain cells over that. Took me a bit but the code worked and the tests passed.

The interesting thing about both coding conversations is that my choice of language was irrelevant. I used Ruby for both and the job I applied for has projects in C, Python, Perl, and PHP. For the past two decades I've pushed myself to learn different languages and processes like TDD and OOP. Seems to have worked; I start the new job Monday.
 
Congrats, Leitz!

I just buffed up a python name randomizer for my L5R games. Had to learn how to handle unicode in Py
Now to learn how to wrap it up for standalone.
 
Yes, congratulations! One thing I like about retirement is that I can pick the One True Language that I love to program in.
 
Well, they say Ruby is a dialect of Perl.

I've started learning Perl6. You wouldn't find it nauseating. Much more Rubylike. References, sigils, arrays of arrays, strong typing, methods instead of functions, OO, and more are like Ruby, and unlike Perl 5.

I started with Perl 4.036, and still occasionally drag out 5.020. But I realized I was using perl for two classes of problems: complex on-liners on the command line (perl -lane '...' file | ...), and problems where an actual program is called for, and those were starting to test my willingness to suffer Perl5's object model, as well as it's quirks with unicode.

Perl6 was still raw in 2009, so at first I tried Ruby. My decision criteria was pretty awful: comparing Ruby to Python side by side, the page count total was a third for "Learning XXX", "Mastering XXX", and "XXX in a Nutshell". I've heard the perl<-->ruby comparison before, but I never really saw it myself. (I do believe that Powershell is darn close to being "perl.NET".)

One size did not fit all, and I began to use AWK for the one-liners, and Python for everything else. Like Ruby, Python just *works*. I knew AWK from the 80's, and I had to pick up Python anyway because it was the admin tool of choice for cloud services we used.


[side note: COTI's own @agorski was one of the three people who got me playing with FORTH back in the 80s. He'd written a FORTH kernel for the AppleII back in college, and ran a Star Fleet battles campaign with it. The experience was invaluable when I had to mess with Sun boot PROMs, and led to me using Smalltalk at work from 1998 to 2003.]
 
Back
Top