Recently in GSL Category

New blog for my Factor ramblings

| | Comments (0) | TrackBacks (0)
I have split off a new blog so that I can concentrate my concatenative nerdiness into one area and enhance it's effect. I have been hacking on the GSL bindings to Factor, specifically the Special Functions. What can I say, Bessel functions are like sirens that sing me to shipwreck...

 I finally have some tests which use the gsl_sf_result structure. Now I need to make the API more Factorish.

  • internally checking the return status and throwing an exception with the proper stringified error message
  • make the user oblivious to the gsl_sf_result struct and return value and error to the data stack
Any other suggestions?

Running a Factor Script

| | Comments (0) | TrackBacks (0)
For those who are put off by the interactive UI part of Factor, you can run a script from the command-line like so

#! /Users/leto/git/factor/factor  -script

USING: gsl gsl.sf.result gsl.sf.bessel gsl.sf.log kernel tools.test ;

"gsl.sf" test

Note the space after the ! is necessary because every "word" in Factor must be separated by a space. The practice of running factor as a non-interactive script is not encouraged, but in certain  situations it wins the day. The above script could be factored to take an argument of a subsystem to test and then I would make a key-binding in vim (or emacs or whatever) so that when I am editing a file and I type ,t it shows me the results of that subsystems tests.

All of this stuff can be done in the interactive UI, but I think people will fiddle with Factor more  if they can easily bolt it onto their current workflow. People tend not to even try things that require totally changing their current tool chain. For me, I am editing the source of the GSL bindings in VIM, so having that script is invaluable. I hack on the source and whenever I change anything important I run the tests by hitting 2 keys. It is really important to make running and writing tests as easy as possible, or they won't get written at all. 

Today ...... is a good day to hack.

About this Archive

This page is a archive of recent entries in the GSL category.

git is the previous category.

Find recent content on the main index or look in the archives to find all content.

Clicky Web Analytics 42