Ruby Runner



Alternanthera
khakiweed (Alternanthera caracasana)
calicoplant (Alternanthera bettzickiana)
Scientific classification
Kingdom:Plantae
Clade:Tracheophytes
Clade:Angiosperms
Clade:Eudicots
Order:Caryophyllales
Family:Amaranthaceae
Subfamily:Gomphrenoideae
Genus:Alternanthera
Forssk.
Species

80-200, see text

Runner

Ruby Runner (Ruby Tuesday's Rest) Drink Recipe - Cocktail This great Ruby Runner (Ruby Tuesday's Rest) recipe is made with Malibu Rum, Blackberry Brandy, Banana Liqueur, Orange Juice, Pineapple Juice, Grenadine, Bacardi 151 Black Bat Rum. The Rails Command LineAfter reading this guide, you will know: How to create a Rails application. How to generate models, controllers, database migrations, and unit tests. How to start a development server. How to experiment with objects through an interactive shell.

Alternanthera is a genus of flowering plants in the family Amaranthaceae. It is a widespread genus with most species occurring in the tropical Americas,[1][2] and others in Asia, Africa, and Australia.[2] Plants of the genus may be known generally as joyweeds, or Joseph's coat.[3] Several species are notorious noxious weeds.[4]

Description[edit]

These are annual or perennial herbs or subshrubs. While some of the better-known species are aquatic plants, most are terrestrial.[4] They take many forms, from prostrate to erect to floating. The leaves are oppositely arranged. The inflorescence is a spike or a rounded head occurring in the leaf axils or the ends of branches. The flowers have 5 tepals. There are 3 to 5 stamens which are fused into a rim at the bases, and 5 pseudostaminodes, appendages between the stamens that are not true staminodes. The fruit is a utricle containing one seed.[2]

Biology[edit]

The genus Alternanthera contains both terrestrial and aquatic species. The photosynthetic pathway varies in this genus: Some species undergo C3 carbon fixation, one clade of 17 species has acquired the C4 pathway, and yet other species have an intermediate C3-C4 pathway.[5][1][6]

Ruby statements can be run and the output and return values can be examined immediately. If you make a mistake, you can go back and edit your previous Ruby statements to correct those mistakes. To start the IRB prompt, open your command-line and run the irb command. Ruby Runner Run Ruby files with one click! Useful for simple scripts etc.

Ecology[edit]

Many species have been reported as noxious weeds, including A. angustifolia, A. caracasana, A. denticulata, A. nana, A. nodiflora, A. paronychioides, A. philoxeroides, A. sessilis, A. tenella, and A. triandra.[4] The most important species is alligator weed (A. philoxeroides), a South American aquatic plant that has spread to other continents.[4] It is a weed of many kinds of agricultural crops, it is an invasive species that degrades native habitat, and its dense mats of vegetation clog waterways, slowing shipping and increasing flooding.[4]Alternanthera plants are known to produce allelopathic compounds that injure other plants, including crops.[4]

Biological pest control agents now in use to reduce alligator weed infestations include the alligator weed flea beetle (Agasicles hygrophila), the alligator weed thrips (Amynothrips andersoni), and the alligator weed stem borer (Arcola malloi).[4]

Uses[edit]

A. philoxeroides and A. sessilis are eaten as vegetables in parts of Asia.[4]

Some Alternanthera are used as ornamental plants.[4]

Diversity[edit]

Alternanthera 'Party Time'
Alternanthera dentata 'Little Rub'

Species[edit]

It is not yet clear how many species belong in the genus. Estimates range between 80 and 200.[1][2][4][7]

Species include:[3][7][8]

  • Alternanthera acaulisAndersson
  • Alternanthera adscendensSuess.
  • Alternanthera albotomentosaSuess.
  • Alternanthera albida(Moq.) Griseb
  • Alternanthera albosquarrosaSuess.
  • Alternanthera albotomentosaSuess.
  • Alternanthera altacruzensisSuess.
  • Alternanthera angustifoliaR.Br. – narrow-leaf joyweed
  • Alternanthera aquatica(Parodi) Chodat
  • Alternanthera arequipensisSuess.
  • Alternanthera asterotrichaUline
  • Alternanthera axillaris (Willd.) DC.
  • Alternanthera bettzickiana – calico-plant
  • Alternanthera brasiliana(L.) Kuntze – Brazilian joyweed, ruby leaf
  • Alternanthera caracasanaKunth – mat chaff-flower, washerwoman
  • Alternanthera crucisBold. – West Indian joyweed
  • Alternanthera dentata – little ruby
  • Alternanthera denticulata – lesser joyweed
  • Alternanthera echinocephala(Hook.f.) Christoph. – spiny-headed chaff flower,[9] seaurchin joyweed
  • Alternanthera ficoidea – parrotleaf, sanguinarea
  • Alternanthera filifolia(Hook.f.) J.T. Howell
  • Alternanthera flavescens – yellow joyweed
  • Alternanthera hasslerianaChodat – Hassler's alternanthera
  • Alternanthera helleri(B.L.Rob.) J.T.Howell
  • Alternanthera littoralisP.Beauv.
  • Alternanthera maritima(Mart.) A.St.-Hil. – seaside joyweed
  • Alternanthera nana – downy joyweed, hairy joyweed
  • Alternanthera nodiflora – common joyweed
  • Alternanthera paronichyoidesA.St.-Hil. – smooth joyweed
  • Alternanthera philoxeroides(Mart.) Griseb. – alligatorweed
  • Alternanthera reineckiiBriq.
  • Alternanthera sessilis(L.) DC. – rabbit-meat, sessile joyweed
  • Alternanthera tenellaColla
  • Alternanthera versicolorR.Br.

References[edit]

Wikimedia Commons has media related to Alternanthera.
  1. ^ abcSánchez-Del Pino, I., et al. (2012). Molecular phylogenetics of Alternanthera (Gomphrenoideae, Amaranthaceae): resolving a complex taxonomic history caused by different interpretations of morphological characters in a lineage with C4 and C3–C4 intermediate species.Botanical Journal of the Linnean Society 169(3), 493-517.
  2. ^ abcdAlternanthera. Flora of North America.
  3. ^ abAlternanthera. Integrated Taxonomic Information System (ITIS).
  4. ^ abcdefghijTanveer, A., et al. (2013). A review on genus Alternanthera weeds implications.Archived 2013-10-23 at the Wayback MachinePak. J. Weed Sci. Res 19(1), 53-58.
  5. ^Sage, R.F.; Sage, T.L.; Pearcy, R.W.; Borsch, T. (2007). 'The taxonomic distribution of C4 photosynthesis in Amaranthaceae sensu stricto'. American Journal of Botany. 94 (12): 1992–2003. doi:10.3732/ajb.94.12.1992. ISSN0002-9122. PMID21636394.
  6. ^Chinthapalli, B., et al. (2001). Phosphoenolpyruvate carboxylase purified from leaves of C3, C4, and C3-C4 intermediate species of Alternanthera: Properties at limiting and saturating bicarbonate.Photosynthetica 38(3), 415-19.
  7. ^ abAlternanthera. The Plant List.
  8. ^GRIN Species Records of Alternanthera.Archived 2015-09-24 at the Wayback Machine Germplasm Resources Information Network (GRIN).
  9. ^McMullen, Conley K. (1999). Flowering Plants of the Galápagos. Ithaca, New York: Cornell University Press. ISBN978-0-8014-8621-0., p. 144
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Alternanthera&oldid=1013070509'

If you want to run an external command from Ruby…

…like wkhtmltopdf to convert an HTML file into a PDF.

Ruby

There are a few Ruby methods you can use.

Depending on the method you use you’ll get different results.

Let’s explore these methods together!

The Ruby System Method

Run Ruby Online

The Ruby system method is the simplest way to run an external command.

It looks like this:

Notice that system will print the command output as it happens.

Also system will make your Ruby program wait until the command is done.

Try this:

There are ways to run commands in the background as we’ll see later.

System can return 3 possible values:

  • true if the command worked
  • false if the command returns an error code
  • nil if command execution fails (command not found)

You can get the exit status code of the last external command that you ran with the $? global variable. This status code can give you more information about why the command failed.

What is Shell Expansion?

When you run an external command with system you’ll get the “shell expansion” effect.

Shell expansion is when the shell (sh/bash/zsh) takes some special characters (*, ?, and [) from your command & expands them into a file list.

Example:

This will print every file & folder in the current directory.

The * is replaced with the list of files before the command runs.

If you want to use these special characters as they are pass the arguments as the 2nd argument of system.

Like this:

Now the output will be *.

How to Use Environment Variables

If you want to pass a specific environment variable to an external command you can use a hash as the first argument.

Here’s an example:

This will not change the current environment of your Ruby application.

%x / Kernel#`

If you want to get the output from the command you’re running, instead of displaying it then you can use %x or the Kernel#` method.

They do the same thing.

Here’s an example:

Another with %x:

These two examples will return a string with the output of the ls command.

Runner

Notice that you still have to wait for the command to finish unless you run it inside a thread.

How to Use Fork + Exec To Run External Commands On a Separate Process

Forking makes a copy of your current process (your Ruby app) then you can replace that copy with another process using exec.

Ruby

Note: The fork method is not available on Windows.

This is a popular pattern in the Unix world.

Here’s how it works:

This will run ls on another process & display its output.

Because this command is running in another process it will not block your Ruby app from running like the system method or %x.

Important:

Ruby Runner Online

If you use exec without fork you’re going to replace your current process.

This means your Ruby program will end.

How to Use the Popen Method For Two Way Communication With An External Program

If you need:

  • More control over the process
  • Two-way communication

Then the IO.popen method is what you are looking for.

In the following example I use the popen method to launch an irb process, then send some input to it & read the output.

Here the example:

This r variable is an IO object, this means that you can write & read from it like a regular file.

Using popen also means that your external command will run on its own process, so you don’t have to run it on a thread.

There is also a popen3 method in the standard library.

The difference with the regular popen is that it will split regular output & error messages into separate IO objects.

Conclusion

Ruby Runner Water Plant

You have learned about the different ways that you can interact with external commands in Ruby.

Be careful with these!

Ruby Runner Recipe

Don’t pass any kind of user input into these commands unless you want a security issue in your Ruby app.

Ruby Runner

If you learned something new please share this article so more people can see it.

Ruby Runner Care & Planting Instructions

Thanks for reading 🙂