RSSAmplifier

Blog

Testing 1,2,3...

(This is only a test)

djberg96.livejournal.comRSS feed ↗25 posts

Latest posts

The Left is Complete Trash

Apparently y'all didn't get my last message about what a Civil War in the US would be like, because you brainless, programmable zombies went and shot Charlie Kirk. For any international readers, Charlie was a conservative Christian guy who was mostly known for going around to college campuses, debating young people on various topics. I found him a bit too conservative for my tastes, and I'm…

GhostBSD on VMWare Fusion

Just some notes to myself, and anyone who might be reading this, who wants to give GhostBSD a shot using VMWare Fusion as their hypervisor. I happen to be running on a Mac, so YMMV. I went with a approx. 500gb hard drive, 16gb ram, and enabled 3D acceleration. I did NOT use UEFI for the boot loader, it wouldn't even start with that, so I went with the "classic" bootloader, or whatever it's called.…

The Death of a Thousand Pronouns

We interrupt this narrative to discuss the election and politics in general. The 2024 election is over, and it was a massive Trump victory. Not quite a Dukakis level beatdown, but still very decisive, with Trump winning both the majority of electors as well as the popular vote. That, boys and girls, is what we call a "mandate". I know some of you previously left-leaning individuals voted for Trump…

Hello Again - Part 2

Things in North Carolina started well. I was attending local gaming events, and going to an actual office to be around people instead of working remotely for a change. Redhat HQ had a nice system where I could go in 3 days a week, and work from home the other two. It was the perfect combination of social interaction and the ability to get stuff done around the house. I met a few new gaming…

Hello Again - Part 1

Has it been 5 years since I posted anything here? Wow. Well, what's new? First, I moved from Colorado to North Carolina after living in Littleton for over 15 years. It was a great state to live in, but it was time to move for a variety of reasons. First and foremost, my Northern European skin couldn't handle it any more. For those who may not be up to speed on US geography, Colorado is quite hot…

Running a remote rails console

Another tip for myself, courtesy of a co-worker. If you want to run a rails console on a remote app you can use the `ssh -t` option. The -t option forces pseudo terminal allocation. Put your pubkey on the remote system to avoid password prompts. ssh -t username@some_server 'cd /remote/rails/app/base/directory && bundle exec rails c production' Obviously, replace the directory with the real…

djberg96 @ 2016-06-24T07:08:00

Mostly a note to self, this is how you can show your current git branch in Windows Powershell. Just add it to your profile.ps1. function prompt{ $p = (Get-Location).path git branch | foreach{ if($_ -match "^\*(.*)"){ $match = $matches[1] -replace '\s', '' $p += " [" + $match + "]" } } $p = $p + ">" Write-Host $p -NoNewline return " " }

Building libxml2 and libxslt on Windows

I had a little trouble building these from source with MSVC so I thought I'd record the issues I faced both so that I can refer back to this post if I forget, and perhaps help others along the way. For libxml2, download the source and cd to the libxml2-x.x.x\win32 directory. Then run "cscript configure prefix=C:\usr iconv=no". Replace "C:\usr" with wherever you want to install it. Ignore the…

Azure and client connections

For anyone out there wondering how to do client side connections with Ruby and Azure, this should get you going. It took me a while to figure this out because the vast majority of the examples online assume you're doing this strictly within a web app and send the token to a reply-url, which is obviously unsuitable for scripting. So, here you go. require 'rest-client' require 'json' token_url = "…

Hands in the Sea, a game that I designed, is on Kickstarter!

After about 3 years of development and playtesting, my game "Hands in the Sea" is finally going to be published! Hooray! http://kck.st/17rokCI It's a 2-player deckbuilding game on the First Punic War, i.e. the first big war between Rome and Carthage. So, not Hannibal, but Hannibal's father, Hamilcar. The mechanics are heavily inspired by a game called A Few Acres of Snow, which in turn was heavily…

Getting irb history without readline

I built Ruby 2.1.2 from source and got all the desired 3rd party libs installed except readline. A minor nuisance since it mostly only affects irb and history. Except I want irb history so I can use the up arrow key to recall commands. I tried rb-readline but it was acting weird, with stray characters appearing and general wonkiness that I can't describe. Instead, I installed rawline and modified…

Building openssl for Ruby with Visual Studio

Yet another "how to build" post mostly for my own reference, but you may find it useful. Building the openssl lib for Ruby with Visual Studio is a bit of a pain. First, you'll need to install openssl itself (which you can build from source if you have Perl installed) or use their precompiled stuff. To build openssl itself from source, do this: perl Configure VC-WIN32 --prefix=C:\usr\local ms\do_ms…

The End of RubyForge

If you haven't heard, RubyForge will be closing down for good on May 15th this year. This is truly the end of an era. RubyForge began on July 22, 2003. You can see the original announcement here . The kind folks at InfoEther (namely Rich Kilmer and Tom Copeland) had given a nascent Ruby community a place to host projects, not just list them as the old RAA had done. Based on the GForge code (mostly…

Building zlib with Visual Studio

This is one of those posts I'm making for future reference because I always forget. If you've built Ruby with Visual Studio (instead of using the mingw32 stuff), you'll need to build zlib from source. You could use the pr-zlib library, but it's slower and you'll need to install it in a non-conventional manner. Anyway, under the zlib-x.y.z/contrib/vstudio directory, look for the subdirectory that…

The Joys of Unemployment

As I approach nearly 18 months of unemployment (save for 1 6-week gig in the middle there), I guess I should write a blog entry. What the hell have I been doing in that time? After I quit my job in Boulder, I went on a 6-week road trip around the country. Starting in Colorado, I headed east through Kansas, Missouri, down to Tennessee and Alabama, over to Georgia, up the eastern states to Virginia,…

Installing apxs on Windows 7

This is one of those postings I make for future reference where I explain how to install apxs on Windows. First, assuming you have ActiveState Perl installed, run "ppm install MinGW". Second, grab the apxs source here and unzip and untar it somewhere. Then cd to the apxs directory where you just unzipped it. Then run "perl Configure.pl --with-apache2=C:/PROGRA~2/APACHE~1/Apache2.2…

New laptop, no more dual boots

I bought a new SSD laptop. It's nice. It's light. It's fast. The battery life is awesome. Why? Because my old laptop died. Motherboard is kaput. What happened? I'm pretty sure it was damaged by severe overheating caused by Ubuntu's poor power management. Basically, the CPU was churning at 100% for a very long period of time, and AMD processors being AMD processors, was running hot as fuck during…

Subtleties of the "current user" on Windows

There are some interesting subtleties between the "current user" on Windows, depending on whether you're talking about threads or processes. On Windows a thread can essentially run as a user different from the process it's created in. From MSDN: "Prior to Windows NT, it could be assumed that a thread was running under the account of the interactively logged on user. Windows NT, however, allows…

Kickstarter failure and observations

Well, my Kickstarter project failed. It's a shame but perhaps it's for the best. It definitely let me know that the market for Ruby on Windows isn't anywhere near what I thought it was. It also taught me a few other things. You may not like this. First, it taught me who my real friends are, and who's motivated by ego driven development. I won't bother to mention the names of the turds who…

Kickstarter

I've decided to try to turn my Ruby on Windows expertise into a business via Kickstarter: http://www.kickstarter.com/projects/2050241756/winruby-commercial-and-open-source-support-for-rub Wish me luck!

How I built libyaml on Windows with MSVC++

So, my foray into building libyaml on Windows. I don't know if this is the right solution, but it worked for me. Anyway, back to the story. The rubygems library, or at least the gem command line tool, requires a yaml parser to be installed in order to work properly. That means either Syck or Psych. In Ruby 1.9 it wants Pysch. If you're using the Ruby Installer this is no big deal. It's already…

More FFI

Lately I've converted a few of my smaller Ruby libraries that were using C extensions to use the ffi gem. Specifically, sys-cpu, sys-uname and sys-uptime now all use FFI behind the scenes. They all now work with JRuby, too. Yay. I'm still not enamored with FFI, though. It has added some features for automatic struct allocation which is good, but it still has most of the issues I complained about…

Ruby, Solaris, Compiler Flags

After finally getting my Solaris 10 VM reinstalled, along with a copy of Sun Studio Compiler 12, I decided to do some benchmarking. These are the results of some Array benchmarks that are included in the "berger_spec" project, using Ruby 1.8.7-p352. The first set of results are with no compiler flags set. The second set are the results using "-g -fast -xipo -xrestrict -xpagesize=2M". With no flags…

ActiveRecord::Base.all (without conditions) Considered Harmful

We've pretty much reached the conclusion that ActiveRecord::Base.all, or .find(:all) if you prefer, should never be used without conditionals. If you want to iterate over every record in the table, you should use my custom .foreach method. Some recent site flakiness inspired me to do some comparisons of a .all vs a .foreach. The details are below. For the lazy, the short version is that a .all…

Specification files

Why do people overthink gem specification files? Here's an example: s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc} ext/**/*.{rb,c} **/deps.rip]) + %w{Rakefile .gemspec} s.files += Dir.glob('man/*') Here's what I do for all of my gems: Dir['**/*'].reject{ |f| f.include?('git') } THE END.