text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
After a recent post on float precision there was some debate about round-tripping of floats. My claim was that if you print a float with printf(“%1.8e”, f); and then scan it back in then you are guaranteed to get back exactly the same float, but there was some skepticism. Bold claims need careful proof, and this post shows how C++ 11 can be leveraged to verify this statement faster and more easily than with old-style C++. The best way to prove my claim is to write some test code. The code to see whether you can round-trip floats to decimal and back without ‘drift’ is pretty simple. You just have to loop through all two billion positive floats (you can use this code as a starting point) and for each float, sprintf it to ASCII and then sscanf it back to a float. If you always get back exactly the same number then the hypothesis is proven. However this is time-consuming. On my laptop it took about fifty minutes to run. Normally multi-threading it would be too much work for a throwaway task like this, but with a fresh install of VS 11 beta on my laptop I decided to give std::async a try. It worked really well and gave me a 3.6x speedup. In the code below you can see calls to futures.push_back where I queue up asynchronous calls to FindDriftingFloats(start, end). A bit later I loop through those futures, retrieving the results. This code will automatically parallelize across up to 255 cores, and increasing the level of parallelism is just a matter of doing smaller batches by incrementing start.i by a smaller amount. The cool thing is that, for the first time, it is possible to write portable multithreaded C++ code. Here’s the code – focus on the futures vector. #include <future> #include <vector> #include <stdio.h> /* }; // Print each float in the range and verify that it round-trips. // This function is designed to be called on multiple threads. // Therefore no global variables should be modified. int FindDriftingFloats(Float_t start, Float_t end) { int failures = 0; // These print statements may occur out of order due to this // code being run on multiple threads. printf("Scan %1.8ef to %1.8ef (%x to %x)\n", start.f, end.f, start.i, end.i); while (start.f < end.f) { char buffer[30]; sprintf_s(buffer, "%1.8e", start.f); float fRead; int count = sscanf_s(buffer, "%f", &fRead); if (count != 1 || fRead != start.f) { printf("Conversion failure on %1.8e (%08x)!\n", start.f, start.i); ++failures; } start.i += 1; } return failures; } int main(int argc, char* argv[]) { auto startTime = clock(); std::vector<std::future<int>> futures; // This represents infinity. We stop here, without processing // this number. const uint32_t maxRep = 255 << 23; Float_t start(0); while (start.i < maxRep) { Float_t end; // Increment by any amount. 1<<23 means that each exponent // is processed as one batch, but any positive integer will do. end.i = start.i + (1 << 23); if (end.i >= maxRep) end.i = maxRep; // Call FindDriftingFloats(start, end) on another thread. futures.push_back(std::async(std::launch::async, FindDriftingFloats, start, end)); // Advance to the next range. start = end; } // Record the results. The results may not complete in order, but we // wait for them in order. int totalFailures = 0; for (size_t i = 0; i < futures.size(); ++i) { int failures = futures[i].get(); totalFailures += failures; // Cast size_t to a type that can be portably printed. unsigned // long long would be better if the values could actually be large. printf("%d failures found in range %u.\n", failures, (unsigned)i); } printf("%d floats failed to round-trip to decimal.\n", totalFailures); auto elapsedTime = clock() - startTime; printf("Took %1.3fs\n", elapsedTime / double(CLOCKS_PER_SEC)); return 0; } Typical output is shown here: Scan 0.00000000e+000f to 1.17549435e-038f (0 to 800000) Scan 4.70197740e-038f to 9.40395481e-038f (1800000 to 2000000) Scan 1.88079096e-037f to 3.76158192e-037f (2800000 to 3000000) Scan 3.76158192e-037f to 7.52316385e-037f (3000000 to 3800000) Scan 1.17549435e-038f to 2.35098870e-038f (800000 to 1000000) Scan 2.35098870e-038f to 4.70197740e-038f (1000000 to 1800000) Scan 9.40395481e-038f to 1.88079096e-037f (2000000 to 2800000) Scan 7.52316385e-037f to 1.50463277e-036f (3800000 to 4000000) Scan 1.50463277e-036f to 3.00926554e-036f (4000000 to 4800000) Scan 3.00926554e-036f to 6.01853108e-036f (4800000 to 5000000) Scan 6.01853108e-036f to 1.20370622e-035f (5000000 to 5800000) Scan 1.20370622e-035f to 2.40741243e-035f (5800000 to 6000000) Scan 2.40741243e-035f to 4.81482486e-035f (6000000 to 6800000) Scan 4.81482486e-035f to 9.62964972e-035f (6800000 to 7000000) Scan 9.62964972e-035f to 1.92592994e-034f (7000000 to 7800000) 0 failures found in range 0. Scan 1.92592994e-034f to 3.85185989e-034f (7800000 to 8000000) 0 failures found in range 1. 0 failures found in range 2. 0 failures found in range 3. … Scan 8.50705917e+037f to 1.70141183e+038f (7e800000 to 7f000000) 0 failures found in range 246. Scan 1.70141183e+038f to 1.#INF0000e+000f (7f000000 to 7f800000) 0 failures found in range 247. 0 failures found in range 248. 0 failures found in range 249. 0 failures found in range 250. 0 failures found in range 251. 0 failures found in range 252. 0 failures found in range 253. 0 failures found in range 254. 0 floats failed to round-trip to decimal. Took 830.424s Note that the “Scan …” printouts don’t always appear in order. That is because they are being done on separate threads and their precise timing is at the whim of the Windows scheduler. Note also that fifteen jobs were started before the first result was retrieved. That may indicate that the first job took a particularly long time (results are retrieved in order), or it may mean that the main thread was starved for CPU time and was briefly unable to retrieve results. My laptop has four hyperthreaded cores. The fact that I only got a speedup of 3.6x is interesting, and probably has to do with the single-threaded CPU frequency being higher due to TurboBoost, together with lackluster improvements from hyperthreading. It happens. I did verify that all eight hardware threads were pegged the entire time. That’s it. Multi-threading done easily enough that even on run-once jobs like this I can multithread my tests in less time than the 36 minutes that multi-threading will save me. Win-win. The total time to run to run the multithreaded test was under 14 minutes. On a desktop machine with more and faster cores it could easily be done in half that time or less – not bad for running a test on two billion floats. Really enjoyed this one Bruce. Interesting, fun and a practical intro to a C++11 module. You can use clock() and avoid Windows dependency entirely. You don’t get high-frequency timing, but you don’t get it with GetTickCount either – maybe std::chrono fixes that. Thanks for the clock() suggestion. I’ve updated the post to use that. It looks like clock() just uses GetTickCount() under the covers so the results should be identical, but more portable. I suspect the resolution is identical, which means 10-20 ms on most platforms, which is plenty sufficient for my needs. Plus, clock() gave me an excuse to use ‘auto’. clock(), however, returns processor time across all threads (that is, on systems that actually implement it correctly), so while it’s portable, it doesn’t give equivalent results across platforms. Well dang. I wanted wall-clock time, not processor time. I guess I used the wrong function. I’ll have to fix that. Pingback: Intermediate Floating-Point Precision | Random ASCII You can probalby get a bit of a better speedup if you use less threads. The std::launch::async policy says that every task will run on a new thread. If instead you just create 4 async tasks you should be able to get a better speedup. See this blog post for details: Thanks for the pointer. It was good to read a detailed analysis of std::async by somebody who seems to know a lot more about it than I do. However I seem to be avoiding the problems which the author describes. When my code runs I can see that my process is using 11 threads on my 8-core system (15 threads on my 12-core system). That seems just about perfect as it soaks up all available processor time, but doesn’t over commit. To be clear, I create 255 tasks with std::async, but the CRT seems to be running them on a number of threads that is appropriate for my computer. Thanks for this reply, I was going to make the same suggestion about over committing, so I am glad to know that the CRT implementation is doing the right thing here. Still, there is a way to query for number of native threads supported on a system (std::thread::hardware_concurrency) and then spawn only that many async tasks, to achieve this behavior with higher portability. (also, its trivial and picky, but is there a reason to use if (end.i >= maxRep) instead of std::min()?) I assume you don’t want to spawn only #cores different tasks because then you could end up going briefly idle. I think it’s going to take a while to figure out the best practices. Also, the main purpose of this post was just to show what could now be thrown together very quickly. I’m glad it’s efficient on VC++. Beyond that, we shall see. No particular reason for the ‘if’ instead of std::min(). Personal preference for this particular case? Habit? Fascinating (thanks for this and related posts re: floating point). You made me curious, so I read up a bit on HyperThreadingTechnology. If I may presume to add to your excellent work: Given a core with HT, what you really have is one execution unit, and two “everything else” – instruction fetch, decode, etc. When one thread “stalls” while addressing a cache miss, for example, the other thread steps in to keep the execution unit busy. In your sample app, which is small enough to easily fit in cache, and not particularly memory intensive, once a thread starts running, I imagine there is little reason for it to stall and give the “other thread” access to the execution unit. So, the second thread doesn’t _really_ get access to the execution unit until the first thread ends, making the core’s behavior essentially single core (in spite of the HT). So, for this sort of workload (all threads are small function, CPU/register intensive), HT is not particularly useful. That gives you (effectively) four cores (so, four times faster), minus overhead (Windows, process explorer, etc.), or about 3.6x speed up. I suspect you will find comparable performance if you disable HT. I also realize now that it’s important to group my threads appropriately. If I have a choice, I don’t want to put two small, register intensive threads on one core (one will starve), while putting two memory intensive big funcs on my other core (they’ll be fine, but I won’t get the benefits I want for my first two threads). What I’d prefer to do is spread my two big funcs across the two cores at relatively high prio, and put my two small, register intensive, tasks on the same two separate cores at lower prio. With HT the most you can generically say is that some resources are shared, and some are per-thread. The registers are always per-thread, and typically most of the execution resources (caches and execution units for example) are shared. I’m not sure about instruction decode — I thought that was shared in most Intel HT processors. Cache misses are one opportunity for HT to improve efficiency, since they leave large gaps where one thread is idle and the other can run full speed. However they are not the only case. Any time that one thread is not using 100% of the execution resources then the other thread can use them. This can happen if you have one thread doing integer heavy work and another thread doing FP heavy work — they may both run at top speed. It can also happen if, due to data dependencies, one thread cannot fully use the execution resources. For instance, imagine this code: add eax, eax add eax, ebx add eax, ecx add eax, edx add eax, eax … Because each instruction is dependent on the result of the previous one, and because integer add has one cycle latency (on most CPUs) this code will execute one instruction per cycle. Most modern Intel CPUs can do three integer adds per cycle, so this code leaves the main integer ALUs two thirds idle. Therefore, if this code is running on both hyperthreads of a single CPU then it can run at full speed on both threads, thus doubling throughput. In other words, long dependency chains are an opportunity for hyperthreading to give a speedup. I modified the test code that I used for this post: to test the endless chain of dependent adds listed below, and I confirmed that hyperthreads then give almost perfect scaling (I got 6.9 times better performance on eight threads compared to one on my four-core CPU). So, apparently the printf/sscanf code that I was exercising is fully using some type of execution resource Out-Of-Order cores are massively complicated, and imperfectly documented, so predicting exactly what will happen is very difficult. Pingback: Floating-point complexities | Random ASCII Pingback: Exceptional Floating Point | Random ASCII Pingback: That’s Not Normal–the Performance of Odd Floats | Random ASCII: There’s Only Four Billion Floats–So Test Them All! | Random ASCII I’ve been really enjoying your blog! I got here when I was having issues with floating point comparisons, and have just finished writing a simple multithreaded fractal generator with some of these examples. Thanks for this. Code analysis found a tiny bug: Should really be: As size_t is an unsigned type. Yep, the code is wrong. But so is your fix. Switching to ‘u’ is correct, but the more important thing is to get the size right, and adding ‘l’ does not do that. ‘l’ specifies long, and there is no guarantee that size_t is a long int. On different platforms long is either the same size, smaller, or larger than size_t. %zu is the C99 way to specify this, but is not yet supported by VC++. So the correct fix is to cast the result to some other type (unsigned, unsigned long, unsigned long long) and print that. Code analysis is often misleading when it comes to printing size_t. I have never seen it recommend a portable fix. I look forward to VC++ 14 which will support %zu. I fixed the code. Thanks. Gah! I hate format specifiers. Sidenote: using instead of alone seems to result in a slight, but measurable performance boost. Concurrency Visualizer shows a ton of preemption & synchronization with std::launch::async alone (loved the article!)
https://randomascii.wordpress.com/2012/03/11/c-11-stdasync-for-fast-float-format-finding/
CC-MAIN-2015-22
refinedweb
2,561
75.71
Important: Please read the Qt Code of Conduct - [SOLVED] QWT 6.0 library in QT Hi, I have downloaded QWT 6.0 from "svn co ": . I am able to run the sample example that are provide within the same folder. But I need to use the same library for my projects. So i created a new project and copied the program tvplot from the qwt examples. I then added the following code in my .pro file @INCLUDEPATH += D:\Qwt\include DEPENDPATH += D:\Qwt\lib LIBS += -LD:\Qwt\lib win32 { CONFIG(debug, debug|release) { LIBS += -lqwtd } else { LIBS += -lqwt } }@ But when i compile and run it gives error "cannot open include file qmemarray.h" . I have searched on the net for the header files as well as how to setup qwt libraries. But didnt get this working on windows 7. Thanks for your time :) QMemArray is a Qt3 relic. QVector would be the closest Qt4 equivalent. I have no idea why QWT tries to use it still... However, a quick search on "QMemArray Qwt" gives quite a number of hits. Perhaps your answer is among them? Hi, Thanks for the reply Andre. I searched for "QMemArray Qwt" and have gone through all the links and solution in the first page. However I tried a different approach. I created a new Project in the same path where i have copied qwt e.g c:\qwt-6.0\examples. And then in the .pro file of my project i included @include( $${PWD}/../examples.pri )@ Which is specified in all the .pro file in the example folder of QWT. It work and display the mainwindow with the charts. But if i create a folder in any other directory and then write @LOCATION = C:\qwt-6.0\examples include( $${LOCATION}/examples.pri )@ It includes the files but shows the same error cannot include qmemarray.h Soumitra, did you find a reference to qmemarray.h in the source for QWT? I have QWT 6.0.1 source and I could not find a reference to this header file within the whole source tree. Possibly the problem is triggered by something else. Hi Koahnig, I couldnt find any reference to qmemarray.h . I searched for the file in the source folder but couldnt find one . When i click on the compiler error it opens qwt_array.h @/* -- mode: C++ ; c-file-style: "stroustrup" -- ***************************** - Qwt Widget Library - This library is free software; you can redistribute it and/or - modify it under the terms of the Qwt License, Version 1.0 *****************************************************************************/ // vim: expandtab #ifndef QWT_ARRAY_H #define QWT_ARRAY_H #include "qwt_global.h" /*! \def QwtArray Aliases QArray (Qt-2.x) and QMemArray (Qt-3.x) to QwtArray */ #ifdef QWT_NO_MEMARRAY #include <qarray.h> #define QwtArray QArray #else #include <qmemarray.h> <---Here this file is included. #define QwtArray QMemArray #endif #endif@ And even if i add qmemarray.h (source code from google search) Then the error changes to some other header file missing. In which folder do you have qwt_array.h ? I do not find this in my source tree? Hi koahnig, Sorry I was linking to the old library which i downloaded from "qwt":. I switched the path to the current source library @INCLUDEPATH += C:\qwt-6.0\src DEPENDPATH += C:\qwt-6.0\lib LIBS += -LC:\qwt-6.0\lib@ This works now for my project created in some other path. But I have written @LOCATION = C:\qwt-6.0\examples include( $${LOCATION}/examples.pri )@ in my .pro which refers to the .pri file in qwt-6.0 source folder. This is working. Is this the right approach ? If it compiles and you see no other issues, I would assume that it is correct. I am using QWT with MSVC and the include path is simply directed to src folder. I am rarely using .pro and .pri files under windows. Thanks for the help. As of now this is working but if there is any problem i'll come back again :) I also need to implement the QwtPlot3D library too. I'll discuss that in other thread. Thanks for your time :)
https://forum.qt.io/topic/16583/solved-qwt-6-0-library-in-qt
CC-MAIN-2021-21
refinedweb
678
79.16
Getting Started For an overview of what Sentry does, take a look at the Sentry workflow. Sentry is designed to be very simple to get off the ground, yet powerful to grow into. If you have never used Sentry before, this tutorial will help you getting started. Getting started with Sentry is a three step process: Install an SDK. Note Your platform is not listed? There are more SDKs we support: list of SDKs If you are using yarn you can add our package as a dependency easily: $ yarn add @sentry/node@4.6.1 Or alternatively you can npm install it: $ npm install @sentry/node@4.6.1 If you are using yarn you can add our package as a dependency easily: $ yarn add @sentry/browser@4.6.1 Or alternatively you can npm install it: $ npm install @sentry/browser@4.6.1 Want a CDN? You can also use our more convenient CDN version To add Sentry to your Rust project you just need to add a new dependency to your Cargo.toml: [dependencies] sentry = "0.12.0" Install the NuGet package: Package Manager: Install-Package Sentry.AspNetCore -Version 1.1.2 .NET Core CLI: dotnet add package Sentry.AspNetCore -v 1.1.2 To install the SDK you will need to be using Composer in your project. To install it please see the docs. Sentry PHP:2.0.0-beta2 php-http/curl-client guzzlehttp/psr7. If you want to use Guzzle as an underlying HTTP client, you just need to run the following command to install the adapter and Guzzle itself: php composer.phar require php-http/guzzle6-adapter Install the NuGet package: Package Manager: Install-Package Sentry -Version 1.1.2 .NET Core CLI: dotnet add package Sentry -v 1.1.2 Using .NET Framework prior to 4.6.1? Our legacy SDK supports .NET Framework as early as 3.5. Install our SDK using the cordova command: $ cordova plugin add sentry-cordova@0.12.3 If you are using yarn you can add our package as a dependency easily: $ yarn add @sentry/electron@0.15.0 Or alternatively you can npm install it: $ npm install @sentry/electron@0.15.0 The quickest way to get started is to use the CDN hosted version of the JavaScript browser SDK: <script src="" crossorigin="anonymous"></script> Don't like the CDN? You can also NPM install our browser library Configure the SDK After you completed key, the server address, and the project identifier. You need to inform the Sentry Node SDK about your DSN: const Sentry = require('@sentry/node'); Sentry.init({ dsn: '___PUBLIC_DSN___' }); import sentry_sdk sentry_sdk.init("___PUBLIC_DSN___") You should init the Sentry browser SDK as soon as possible during your application load up: import * as Sentry from '@sentry/browser'; Sentry.init({ dsn: '___PUBLIC_DSN___' }); extern crate sentry; let _guard = sentry::init("___PUBLIC_DSN___"); Add Sentry to Program.cs through the WebHostBuilder: public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() // Add this: .UseSentry("___PUBLIC_DSN___") .Build(); To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible. \Sentry\init(['dsn' => '___PUBLIC_DSN___' ]); You should initialize the SDK as early as possible, like in the Main method in Program.cs: using (SentrySdk.Init("___PUBLIC_DSN___")) { // App code } You should init the SDK in the deviceReady function, to make sure the native integrations runs. For more details about Cordova click here onDeviceReady: function() { var Sentry = cordova.require("sentry-cordova.Sentry"); Sentry.init({ dsn: '___PUBLIC_DSN___' }); } You need to call init in your main and every renderer process you spawn. For more details about Electron click here import * as Sentry from '@sentry/electron'; Sentry.init({dsn: '___PUBLIC_DSN___'}); You should init the Sentry Browser SDK as soon as possible during your page load:.
https://docs.sentry.io/error-reporting/quickstart/?platform=php
CC-MAIN-2019-09
refinedweb
632
58.99
This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including generator-fsharp with all npm packages installed. Try it out: require()any package directly from npm awaitany promise instead of using callbacks (example) This service is provided by RunKit and is not affiliated with npm, Inc or the package authors. The aim of the project is to provide good and easy way of scaffolding F# projects outside of IDE such as Visual Studio and Xamarin Studio. Yeoman is popular node.js based scaffolding tool used also by for example ASP.NET vNext team. Also there exists nice integrations of Yeoman with text editors such as Atom. Available templates are stored also on GitHub (in templates branch branch of this repository) so it's very easy to add / update templates without need of updating generator.-fsharp from npm, run: npm install -g generator-fsharp Finally, initiate the generator: yo fsharp The project is hosted on GitHub where you can report issues, fork the project and submit pull requests on the develop branch. The library is available under Apache 2 license, which allows modification and redistribution for both commercial and non-commercial purposes. Templates are added by doing PR to the develop branch adding new subfolders to the templates folder and by updating templates.json file. At the moment, several helpers are working to make scaffolding easier: ApplicationNamepart is replaced with application name user provided. <%= namespace %>tag can be used to insert application name provided by user ( example#1, example#2 ) <%= guid %>tag can be used to insert randomly generated GUID ( example#3 ) <%= pacakgesPath %>tag can be used to insert path to packages folder ( example#4 ) <%= paketPath %>tag can be used to insert path to .paketfolder ( example#5 )
https://npm.runkit.com/generator-fsharp
CC-MAIN-2019-18
refinedweb
303
52.19
CS50x Plurality From problem set 3 Plurality is a fairly simple introduction exercise to the next on the problem set, either you choose the less comfortable route with Runoff or the more comfortable with Tideman. In Plurality we need to organize a simple election. The main function and headers are given by the course as a distribution code. We can’t change the distribution code or else we fail the staff tests. Our task is to implement the function that updates the voting count for each candidate and the function that print out the winner, or winners, as this simple model of election allows for frequent ties. Here’s and example of how the program should work. $ ./plurality Alice Bob Charlie Number of voters: 4 Vote: Alice Vote: John Invalid Vote. Vote: Charlie Vote: Alice Alice Our candidates are prompted as command line arguments when we start the program. The distribution code takes care of asking for the number of voters and then for each of their votes. Let’s take a look at how it looks. #include <cs50.h> #include <stdio.h> #include <string.h>// Max number of candidates #define MAX 9//; if (candidate_count > MAX) { printf("Maximum number of candidates is %i\n", MAX); return 2; }(); } Pretty self explanatory with its comments, just some points I’d like to write about. We have a new tool in this code called structure. It’s syntax is shown at line 9 typedef struct. Structures are a way of storing several variables that are related to the same thing in a new type created by ourselves, like int or char, but whatever we want to call it. In this case they relate to the candidates. Each candidate will be saved as a type “candidate” with name and a vote count inside an array initialized just bellow our struct definition. The first loop we see inside main is the one that populates that array. It gets our argv[1], and so on, and saves it inside the array. Being argv[1] = Alice, we would have: candidates[0].name = Alice, candidates[0].votes = 0; Both Alice and 0 are part of the same index inside the array, and now we can access a string and an int using the same index! That’s invaluable for building our functions vote and print_winner. For vote, main iterates through each voter asking for his vote and then check if it’s a valid vote, i.e. matches a candidate name. Our first job is to code that check. The function takes a single argument called name, that is the name of the candidate that the voter wants to support. It should add a vote to that candidate vote count if the vote is valid, or return an error statement if the code is invalid. Both options will keep the program running afterwards. We can accomplish that with a simple loop. bool vote(string name) { for (int n = 0; n < candidate_count; n++) { if (strcmp(name, candidates[n].name) == 0) { candidates[n].votes++; return true; } } return false; } The loop iterates through each candidate checking if the name matches. Here we use a function from string library called strcmp. It’s the simplest way to compare two strings, and returns 0 if both are equal. Passed the check, the loop adds 1(++) to that candidate’s vote count, saved in candidates[index].votes. Else, if the loop finds no match for name, it returns false and main takes care of printing the error message. We can run some tests here and see if the function is returning the error message for invalid votes. Next, for the print winner function. We need a counter where we’ll set the highest vote count, and we need to make sure that if there’s a tie both, or more, candidates are printed. void print_winner(void) { // TODO int winner = 0; for (int v = 0; v < candidate_count; v++) { if (candidates[v].votes > winner) { winner = candidates[v].votes; } } We take care of the first problem with a loop that check each candidate’s votes and update an integer called winner every time it finds a higher count. Now we know how many votes the winner has, but we don’t know which candidates have that vote count. for (int w = 0; w < candidate_count; w++) { if (candidates[w].votes == winner) { printf("%s\n", candidates[w].name); } } } A second loop (a brother loop, not nested) solves that by checking each candidate for that same vote count and printing it every time the counts match. That ends our print_winner function. It’s also the end of our code. We can make sure it’s working by running small tests with two to four candidates. Bellow you can find the staff tests for this problem and the full code with comments. Results generated by style50 v2.7.4 Looks good! Results for cs50/problems/2020/x/plurality generated by check50 v3.1.2 :) plurality.c exists :) plurality compiles :) vote returns true when given name of first candidate :) vote returns true when given name of middle candidate :) vote returns true when given name of last candidate :) vote returns false when given name of invalid candidate :) vote produces correct counts when all votes are zero :) vote produces correct counts after some have already voted :) vote leaves vote counts unchanged when voting for invalid candidate :) print_winner identifies Alice as winner of election :) print_winner identifies Bob as winner of election :) print_winner identifies Charlie as winner of election :) print_winner prints multiple winners in case of tie :) print_winner prints all names when all candidates are tied
https://guilherme-pirani.medium.com/cs50x-plurality-b67048553aba
CC-MAIN-2022-40
refinedweb
930
72.56
Exploratory data analysis plays a role in the work of data science and machine learning. In this post I am giving a brief intro of Exploratory data analysis(EDA) in Python with help of pandas and matplotlib. Let’s start now.. Exploratory data analysis(EDA). This command output shown in the below: It will open an interface in your default browser. Create a new notebook and name it, you will see something like below: . import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline If you notice I added %matplotlib inline. What it does that it renders plot inline on your page. You will shortly see how it happens. Next up, read CSV and data cleaning where necessary. df = pd.read_csv('data.csv') df['Amount'] = df['Amount'].str.replace('$','').str.replace(',','') df['Amount'] = pd.to_numeric(df['Amount'])! df.drop('BranchName',axis=1, inplace=True) df It will remove the column, inpace=True makes it to remove in existing DataFrame without re-assigning it. Run again and it shows data like below: OK operation cleanup is done, let’s dive into the data and find insights! The very first thing we are going to do is to find out number of records and number of features or columns. For that I am going to execute df.shape. When I did this I found the following: What does it mean? well it’s actually rows x columns. So here there are 4100total: OK some interesting information given here. If you see count it tells the same record count that is 4100 here. You can see all columns have same count which means there are no missing fields there. You can also check an individual column count, say, for Units, then output show as like blow picture: Until now, I can go now. You can find more insight, but you can use exploratory data analysis on how to find insight from this data set, as much as I think above. In this data there is a field Transaction Type, your task is to find out no of sales of each transaction type. Let us know how it’s going on. As always, the code of this post is available on Github. You can tell me what you think about this, if you enjoy writing, click on the clap 👏 button. Thanks to everyone. Source: hackernoon
https://learningactors.com/overview-of-exploratory-data-analysis-with-python/
CC-MAIN-2018-51
refinedweb
396
75.5
This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers Develop a Windows 8 app in 30 days In this article, I'll introduce you to Fabric.js—a powerful JavaScript library that makes working with the HTML5 canvas element a breeze. Fabric provides a missing object model for canvas, as well as an SVG parser, a layer of interactivity, and a whole suite of other indispensable tools. It is a fully open-source project, licensed under MIT, with many contributions over the years. I started developing with Fabric three years ago after discovering the pains of working with the native canvas API. I was creating an interactive design editor for printio.ru—my startup that allows users to design their own apparel. The kind of interactivity I wanted existed only in Flash apps in those days. Now, very few libraries come close to what is possible with Fabric, so let's take a closer look. Canvas allows you to create some absolutely amazing graphics on the Web these days, but the API it provides is disappointingly low level. It's one thing if you simply want to draw a few basic shapes on a canvas and forget about them. If you need any kind of interaction, to change a picture at any point, or to draw more complex shapes, the situation changes dramatically. Fabric aims to solve this problem. Native canvas methods allow you only to fire off simple graphic commands, blindly modifying the entire canvas bitmap. Do you want to draw a rectangle? Use fillRect(left, top, width, height). Want to draw a line? Use a combination of moveTo(left, top) and lineTo(x, y). It's as if you're painting a canvas with a brush, layering more and more oil or acrylic on top, with very little control. Instead of operating at such a low level, Fabric provides a simple but powerful object model on top of native methods. It takes care of canvas state and rendering and lets you work with objects directly. Here’s a simple example that demonstrates this difference. Let's say you want to draw a red rectangle somewhere on the canvas. Here's how you would do it with the native canvas API: // reference canvas element (with id="c") var canvasEl = document.getElementById('c'); // get 2d context to draw on (the "bitmap" mentioned earlier) var ctx = canvasEl.getContext('2d'); // set fill color of context ctx.fillStyle = 'red'; // create rectangle at a 100,100 point, with 20x20 dimensions ctx.fillRect(100, 100, 20, 20); The code below shows how you do the same thing with Fabric. The result of both approaches is shown in Figure 1. // the size of the code—the two examples are pretty similar. However, you can already see how different the approach to working with canvas is. With native methods, you operate on context—an object representing the entire canvas bitmap. In Fabric, you operate on objects—you instantiate them, change their properties, and add them to the canvas. You can see that these objects are first-class citizens in Fabric land. Rendering a plain red rectangle is too simple. You can at least have some fun with it and perhaps rotate the shape slightly. Let's try 45 degrees, first using native canvas methods: var canvasEl = document.getElementById('c'); var ctx = canvasEl.getContext('2d'); ctx.fillStyle = 'red'; ctx.translate(100, 100); ctx.rotate(Math.PI / 180 * 45); ctx.fillRect(-10, -10, 20, 20); And here’s how you do it in Fabric. (See Figure 2 for the results). var canvas = new fabric.Canvas('c'); // create a rectangle with angle=45 var rect = new fabric.Rect({ left: 100, top: 100, fill: 'red', width: 20, height: 20, angle: 45 }); canvas.add(rect); What’s happening here? All you have to do in Fabric is change the object's angle value to 45. With native methods, however, more work is required. Remember that you can't operate on objects. Instead, you have to tweak the positioning and angle of the entire canvas bitmap (ctx.translate, ctx.rotate) to suit your needs. You then draw the rectangle again, remembering to offset the bitmap properly (-10, -10) so that it's still rendered at the point of 100,100. As a bonus, you have to translate degrees to radians when rotating the canvas bitmap. I'm sure you're starting to see why Fabric exists and how much low-level boilerplate it hides. Let's take a look at another example: keeping track of canvas state. What if at some point, you want to move the rectangle to a slightly different location on the canvas? How can you do this without being able to operate on objects? Would you just call another fillRect on a canvas bitmap? Not quite. Calling another fillRect command actually draws a rectangle on top of whatever is already drawn on the canvas. To move the rectangle, you need to first erase any previously drawn content and then draw the rectangle at a new location (see Figure 3). fillRect var canvasEl = document.getElementById('c'); ... ctx.strokRect(100, 100, 20, 20); ... // erase entire canvas area ctx.clearRect(0, 0, canvasEl.width, canvasEl.height); ctx.fillRect(20, 50, 20, 20); Here’s how you would accomplish this with Fabric: var canvas = new fabric.Canvas('c'); ... canvas.add(rect); ... rect.set({ left: 20, top: 50 }); canvas.renderAll(); Notice a very important difference: with Fabric, you don’t need to erase the content before attempting to modify any content. You still work with objects simply by changing their properties and then render the canvas again to get a fresh picture. You saw in the last section how to work with rectangles by instantiating the fabric.Rect constructor. Fabric, of course, covers the other basic shapes as well—circles, triangles, ellipses, and so on. The shapes are exposed under the fabric "namespace" as fabric.Circle, fabric.Triangle, fabric.Ellipse, and so on. Fabric provides seven basic shapes: fabric.Rect fabric.Circle fabric.Triangle fabric.Ellipse To draw a circle, just create a circle object and add it to canvas. var circle = new fabric.Circle({ radius: 20, fill: 'green', left: 100, top: 100 }); var triangle = new fabric.Triangle({ width: 20, height: 30, fill: 'blue', left: 50, top: 50 }); canvas.add(circle, triangle); You do the same thing with any other basic shape. Figure 4 shows an example of a green circle drawn at location 100,100 and a blue triangle at 50,50. Creating graphical objects—rectangles, circles, or something else—is only the beginning. At some point, you will probably need to modify your objects. Perhaps a certain action will trigger a change of state or play an animation of some sort. Or you might want to change object properties (such as color, opacity, size, position) on certain mouse interactions. Fabric takes care of canvas rendering and state management for you. We need only to modify the objects themselves. The example earlier demonstrated the set method and how calling set({ left: 20, top: 50 }) moved the object from its previous location. In a similar fashion, you can change any other property of an object. As you would expect, Fabric objects have properties related to positioning (left, top), dimensions (width, height), rendering (fill, opacity, stroke, strokeWidth), scaling and rotation (scaleX, scaleY, angle), and flipping (flipX, flipY).Yes, creating flipped object in Fabric is as easy as setting the flip* property to true. strokeWidth You can read any of these properties via a get method and set them via set. Here’s an example of how to change some of the red rectangle's properties. Figure 5 shows the results. var canvas = new fabric.Canvas('c'); ... canvas.add(rect); rect.set('fill', 'red'); rect.set({ strokeWidth: 5, stroke: 'rgba(100,200,200,0.5)' }); rect.set('angle', 15).set('flipY', true); Figure 5 Red, Rotated, Stroked Rectangle Drawn with Fabric First, the fill value is set to "red". The next statement sets the strokeWidth and stroke values, giving the rectangle a 5 px stroke of a pale green color. Finally, the code changes the angle and flipY properties. Notice how each of the three statements uses slightly different syntax. This demonstrates that set is a universal method. You will probably use it quite often, and it's meant to be as convenient as possible. What about getters? There's a generic get method and also a number of specific ones. To read the width property of an object, you use get('width') or getWidth(). To get the scaleX value, you would use get('scaleX'), getScaleX() and so on. There's a method like getWidth or getScaleX for each of the "public" object properties (stroke, strokeWidth, angle, and so on). getWidth() getScaleX() getWidth getScaleX You might have noticed that in the earlier examples, objects were created with the same configuration hash as the one we just used in the set method. You can "configure" an object at the time of creation or use the set method later: var rect = new fabric.Rect({ width: 10, height: 20, fill: '#f55', opacity: 0.7 }); // or functionally identical var rect = new fabric.Rect(); rect.set({ width: 10, height: 20, fill: '#f55', opacity: 0.7 }); At this point, you might wonder what happens when you create an object without passing any "configuration" object. Does it still have those properties? Yes. When specific settings are omitted during creation, objects in Fabric always have a default set of properties. You can use the following code to see this for yourself: var rect = new fabric.Rect(); // notice no options passed in rect.getWidth(); // 0 rect.getHeight(); // 0 rect.getLeft(); // 0 rect.getTop(); // 0 rect.getFill(); // rgb(0,0,0) rect.getStroke(); // null rect.getOpacity(); // 1 This rectangle has a default set of properties. It's positioned at 0,0, is black and fully opaque, and has no stroke and no dimensions (width and height are 0). Because no dimensions are given, you can't see it on the canvas. Giving it any positive values for width and height would reveal a black rectangle at the top-left corner of the canvas, as shown in Figure 6. Figure 6 How Default Rectangle Looks When Given Dimensions Fabric objects do not exist independently of each other. They form a very precise hierarchy. Most objects inherit from the root fabric.Object. The fabric.Object root object represents (more or less) a two-dimensional shape, positioned in a two-dimensional canvas plane. It's an entity that has left/top and width/height properties, as well as a slew of other graphical characteristics. The properties listed for objects—fill, stroke, angle, opacity, flip*, and so on—are common to all Fabric objects that inherit from fabric.Object. This inheritance allows you to define methods on fabric.Object and share them among all child "classes". For example, if you want to have a getAngleInRadians method on all objects, you would simply create it on fabric.Object.prototype, as follows: getAngleInRadians fabric.Object.prototype fabric.Object.prototype.getAngleInRadians = function() { return this.getAngle() / 180 * Math.PI; }; var rect = new fabric.Rect({ angle: 45 }); rect.getAngleInRadians(); // 0.785... var circle = new fabric.Circle({ angle: 30, radius: 10 }); circle.getAngleInRadians(); // 0.523... circle instanceof fabric.Circle; // true circle instanceof fabric.Object; // true As you can see, the method immediately becomes available on all instances. Even though child "classes" inherit from fabric.Object, they often also define their own methods and properties. For example, fabric.Circle needs a radius property, and fabric.Image—which we'll look at in a moment—needs getElement and setElement methods for accessing and setting the HTML <img> element from which an image instance originates. fabric.Object fabric.Image getElement setElement Now that you’ve learned about objects in some detail, let's get back to canvas. The first thing you see in all of the Fabric examples is the creation of a canvas object— new fabric.Canvas('...'). The fabric.Canvas object serves as a wrapper around the <canvas> element and is responsible for managing all the Fabric objects on that particular canvas. It takes an ID of an element and returns an instance of fabric.Canvas. new fabric.Canvas('...') <canvas> You can add objects to it, reference them from it, or remove them, as shown here: var canvas = new fabric.Canvas('c'); var rect = new fabric.Rect(); canvas.add(rect); // add object canvas.item(0); // reference fabric.Rect added earlier (first object) canvas.getObjects(); // get all objects on canvas (rect will be first and only) canvas.remove(rect); // remove previously-added fabric.Rect Managing objects is the main purpose of fabric.Canvas, but it also serves as a configuration host. Do you need to set the background color or image for an entire canvas, clip all contents to a certain area, set a different width and height, or specify whether a canvas is interactive or not? All these options (and others) can be set on fabric.Canvas, either at the time of creation or later. The code below shows an example. fabric.Canvas var canvas = new fabric.Canvas('c', { backgroundColor: 'rgb(100,100,200)', selectionColor: 'blue', selectionLineWidth: 2 // ... }); // or var canvas = new fabric.Canvas('c'); canvas.backgroundImage = 'http://...'; canvas.onFpsUpdate = function(){ /* ... */ }; // ... One of the unique built-in features of Fabric is a layer of interactivity on top of the object model. The object model exists to allow programmatic access and manipulation of objects on the canvas, but on the outside—on a user level—there's a way to manipulate those objects via the mouse (or via touch on touch devices). As soon as you initialize a canvas via the new fabric.Canvas('...')call, it's possible to select objects (see Figure 7), drag them around, scale or rotate them, and even group them (see Figure 8) to manipulate them in one chunk! If you want to allow users to drag something on the canvas—let's say an image—all you need to do is initialize the canvas and add an object to it. No additional configuration or setup is required. To control this interactivity, you can use Fabric's selection Boolean property on the canvas object in combination with the selectable Boolean property of individual objects: var canvas = new fabric.Canvas('c'); ... canvas.selection = false; // disable group selection rect.set('selectable', false); // make object unselectable But what if you don't want an interactivity layer at all? If that's the case, you can always replace fabric.Canvas with fabric.StaticCanvas. The syntax for initialization is absolutely the same: fabric.StaticCanvas var staticCanvas = new fabric.StaticCanvas('c'); staticCanvas.add( new fabric.Rect({ width: 10, height: 20, left: 100, top: 100, fill: 'yellow', angle: 30 })); This creates a "lighter" version of canvas, without any event-handling logic. You still have the entire object model to work with—adding, removing or modifying objects, as well as changing any canvas configuration. All of this still works, it's only event handling that's gone. Later in this article, when I go over the custom build option, you'll see that if StaticCanvas is all you need, you can even create a lighter version of Fabric. This could be a nice option if you need something like non-interactive charts or non-interactive images with filters in your application. StaticCanvas Adding rectangles and circles to a canvas is fun, but as you can imagine by now, Fabric also makes working with images very easy. Here’s how you instantiate the fabric.Image object and add it to a canvas, first in HTML and then in JavaScript: HTML <canvas id="c"></canvas> <img src="my_image.png" id="my-image"> JavaScript var canvas = new fabric.Canvas('c'); var imgElement = document.getElementById('my-img'); var imgInstance = new fabric.Image(imgElement, { left: 100, top: 100, angle: 30, opacity: 0.85 }); canvas.add(imgInstance); Notice that you pass an image element to the fabric.Image constructor. This creates an instance of fabric.Image that looks just like the image from the document. Moreover, you immediately set left/top values to 100/100, angle to 30, and opacity to 0.85. Once an image is added to a canvas, it is rendered at location 100,100 at a 30-degree angle and is slightly transparent (see Figure 9). Not bad! If you don't really have an image in a document but only a URL for an image, you can use fabric.Image.fromURL: fabric.Image.fromURL fabric.Image.fromURL('my_image.png', function(oImg) { canvas.add(oImg); }); Looks pretty straightforward, doesn't it? Just call fabric.Image.fromURL, with a URL of an image, and give it a callback to invoke once the image is loaded and created. The callback function receives the already created fabric.Image object as its first argument. At that point, you can add it to your canvas or perhaps change it first and then add it, as shown here: fabric.Image.fromURL('my_image.png', function(oImg) { // scale image down, and flip it, before adding it onto canvas oImg.scale(0.5).setFlipX(true); canvas.add(oImg); }); We've looked at simple shapes and images. What about more complex, richer shapes and content? Meet Path and PathGroup, the power couple. Paths in Fabric represent an outline of a shape, which can be filled, stroked and modified in other ways. Paths consist of a series of commands that essentially mimic a pen going from one point to another. With the help of such commands as move, line, curve, and arc, Paths can form incredibly complex shapes. And with the help of groups of Paths (PathGroup), the possibilities open up even more. Paths in Fabric closely resemble SVG <path> elements. They use the same set of commands, can be created from <path> elements, and can be serialized into them. I’ll describe more about serialization and SVG parsing later, but for now it's worth mentioning that you will probably only rarely create Path instances by hand. Instead, you'll use Fabric's built-in SVG parser. But to understand what Path objects are, let's create a simple one by hand (see Figure 10 for the results): var canvas = new fabric.Canvas('c'); var path = new fabric.Path('M 0 0 L 200 100 L 170 200 z'); path.set({ left: 120, top: 120 }); canvas.add(path); Here you instantiate the fabric.Path object and pass it a string of path instructions. It might look cryptic, but it's actually easy to understand. M represents the move command and tells the invisible pen to move to point 0, 0. L stands for line and makes the pen draw a line to point 200, 100. Then, another L creates a line to 170, 200. Lastly, z forces the drawing pen to close the current path and finalize the shape. fabric.Path Since fabric.Path is just like any other object in Fabric, you can also change some of its properties, or modify it even more, as shown here and in Figure 11: ... var path = new fabric.Path('M 0 0 L 300 100 L 200 300 z'); ... path.set({ fill: 'red', stroke: 'green', opacity: 0.5 }); canvas.add(path); Out of curiosity, let's take a look at a slightly more complex path syntax. You'll see why creating paths by hand might not be the best idea: ... var path = new fabric.Path('M121.32,0L44.58,0C36.67,0,29.5,3.22,24.31,8.41\ c-5.19,5.19-8.41,12.37-8.41,20.28c0,15.82,12.87,28.69,28.69,28.69c0,0,4.4,\ 0,7.48,0C36.66,72.78,8.4,101.04,8.4,101.04C2.98,106.45,0,113.66,0,121.32\ c0,7.66,2.98,14.87,8.4,20.29l0,0c5.42,5.42,12.62,8.4,20.28,8.4c7.66,0,14.87\ -2.98,20.29-8.4c0,0,28.26-28.25,43.66-43.66c0,3.08,0,7.48,0,7.48c0,15.82,\ 12.87,28.69,28.69,28.69c7.66,0,14.87-2.99,20.29-8.4c5.42-5.42,8.4-12.62,8.4\ -20.28l0-76.74c0-7.66-2.98-14.87-8.4-20.29C136.19,2.98,128.98,0,121.32,0z'); canvas.add(path.set({ left: 100, top: 200 })); Here, M still stands for the move command, so the pen starts its drawing journey at point 121.32, 0. Then there's an L (line) command that brings the pen to 44.58, 0. So far so good. Now comes the C command, which stands for "cubic bezier." This command makes the pen draw a bezier curve from the current point to 36.67, 0. It uses 29.5, 3.22 as a control point at the beginning of a line, and 24.31, 8.41 as the control point at the end of the line. This whole operation is then followed by a dozen other cubic bezier commands, which finally create a nice-looking shape of an arrow, as shown in Figure 12. Chances are, you won't work with such beasts directly. Instead, you can use something like the fabric.loadSVGFromString or fabric.loadSVGFromURL method to load an entire SVG file and let Fabric's SVG parser do its job of walking over all SVG elements and creating corresponding Path objects. fabric.loadSVGFromString fabric.loadSVGFromURL In this context, while Fabric's Path object usually represents a SVG <path> element, a collection of paths, often present in SVG documents, is represented as a PathGroup instance (fabric.PathGroup). PathGroup is nothing but a group of Path objects, and because fabric.PathGroup inherits from fabric.Object, it can be added to a canvas just like any other object and manipulated the same way. Just like with Paths, you probably won't be working with a PathGroup directly. But if you stumble on one after parsing a SVG document, you'll know exactly what it is and what purpose it serves. I’ve only scratched the surface of what's possible with Fabric. You can now easily create any of the simple shapes, complex shapes, or images; add them to a canvas and modify them any way you want—their positions, dimensions, angles, colors, strokes, opacity—you name it. In the next article in this series, I’ll look at working with groups; animation; text; SVG parsing, rendering and serialization; events; image filters and more. Meanwhile, feel free to take a look at the annotated demos or benchmarks, join the discussion at Stack Overflow or go straight for the docs, wiki, and source. You can also learn more about HTML5 Canvas at the MSDN IE Developer Center, or check out Rey Bango’s An Introduction to the HTML 5 Canvas Element on Script Junkie. Have fun experimenting with Fabric! I hope you enjoy the ride. This article was written by Juriy Zaytsev. Juriy is a passionate JavaScript developer living in New York. He is an ex-Prototype.js core member, blogger at perfectionkills.com, and the creator of Fabric.js canvas library. Currently Juriy works on his Printio.ru startup and making Fabric even more fun to use. Find Juriy.
https://www.codeproject.com/Articles/533809/Introduction-to-Fabric-js-Part?msg=4501504
CC-MAIN-2017-43
refinedweb
3,904
58.99
Lab 11: Macros, Tail Recursion, Regular Expressions Due by 11:59pm on Tuesday, August 3. Starter Files Download lab11. #. Regular Expressions Regular expressions are a way to describe sets of strings that meet certain criteria, and are incredibly useful for pattern matching. The simplest regular expression is one that matches a sequence of characters, like aardvark to match any "aardvark" substrings in a string. However, you typically want to look for more interesting patterns. We recommend using an online tool like regexr.com for trying out patterns, since you'll get instant feedback on the match results. Character classes A character class makes it possible to search for any one of a set of characters. You can specify the set or use pre-defined sets. Character classes can be combined, like in [a-zA-Z0-9]. Combining patterns There are multiple ways to combine patterns together in regular expressions. A pattern can be followed by one of these quantifiers to specify how many instances of the pattern can occur. Groups Parentheses are used similarly as in arithmetic expressions, to create groups. For example, (Mahna)+ matches strings with 1 or more "Mahna", like "MahnaMahna". Without the parentheses, Mahna+ would match strings with "Mahn" followed by 1 or more "a" characters, like "Mahnaaaa". Anchors ^ - Matches the beginning of a string. Example: ^(I⎮You)matches I or You at the start of a string. $ - Normally matches the empty string at the end of a string or just before a newline at the end of a string. Example: (\.edu|\.org|\.com)$matches .edu, .org, or .com at the end of a string. \b - Matches a "word boundary", the beginning or end of a word. Example: s\bmatches s characters at the end of words. Special characters The following special characters are used above to denote types of patterns: \ ( ) [ ] { } + * ? | $ ^ . That means if you actually want to match one of those characters, you have to escape it using a backslash. For example, \(1\+3\) matches "(1 + 3)". Using regular expressions in Python Many programming languages have built-in functions for matching strings to regular expressions. We'll use the [Python re module] in 61A, but you can also use similar functionality in SQL, JavaScript, Excel, shell scripting, etc. The search method searches for a pattern anywhere in a string: re.search(r"(Mahna)+", "Mahna Mahna Ba Dee Bedebe") That method returns back a match object, which is considered truth-y in Python and can be inspected to find the matching strings. For more details, please consult the re module documentation or the re tutorial. Required Questions Macros Q1: WWSD: Macros One thing to keep in mind when doing this question, builtins get rendered as such:)). Hint: We strongly suggest doing the WWPD questions on macros first as understanding the rules of macro evaluation is key in writing macros. (define-macro (def func args body) 'YOUR-CODE-HERE) Use Ok to test your code: python3 ok -q scheme-def Tail Recursion Q3: Replicate Write a tail-recursive function that returns a list with x repeated n times. scm> (tail-replicate 3 10) (3 3 3 3 3 3 3 3 3 3) scm> (tail-replicate 5 0) () scm> (tail-replicate 100 5) (100 100 100 100 100) (define (tail-replicate x n) 'YOUR-CODE-HERE ) Use Ok to test your code: python3 ok -q tail-replicate Q4: Exp We want to implement the exp procedure. So, we write the following recursive procedure: (define (exp-recursive b n) (if (= n 0) 1 (* b (exp-recursive b (- n 1))))) Try to evaluate (exp-recursive 2 (exp-recursive 2 10)) You will notice that it will cause a maximum recursion depth error. To fix this, we need to use tail recursion! Implement the exp procedure using tail recursion: (define (exp b n) ;; Computes b^n. ;; b is any number, n must be a non-negative integer. ) Use Ok to test your code: python3 ok -q exp Regular Expressions Q5: Roman Numerals Write a regular expression that finds any string of letters that resemble a Roman numeral and aren't part of another word. A Roman numeral is made up of the letters I, V, X, L, C, D, M and is at least one letter long. import re def roman_numerals(text): """ Finds any string of letters that could be a Roman numeral (made up of the letters I, V, X, L, C, D, M). >>> roman_numerals("Sir Richard IIV, can you tell Richard VI that Richard IV is on the phone?") ['IIV', 'VI', 'IV'] >>> roman_numerals("My TODOs: I. Groceries II. Learn how to count in Roman IV. Profit") ['I', 'II', 'IV'] >>> roman_numerals("I. Act 1 II. Act 2 III. Act 3 IV. Act 4 V. Act 5") ['I', 'II', 'III', 'IV', 'V'] >>> roman_numerals("Let's play Civ VII") ['VII'] >>> roman_numerals("i love vi so much more than emacs.") [] >>> roman_numerals("she loves ALL editors equally.") [] """ return re.findall(__________, text) Use Ok to test your code: python3 ok -q roman_numerals Q6: Calculator Ops Write a regular expression that parses strings written in the 61A Calculator language and returns any expressions which have two numeric operands, leaving out the parentheses around them. import re def calculator_ops(calc_str): """ Finds expressions from the Calculator language that have two numeric operands and returns the expression without the parentheses. >>> calculator_ops("(* 2 4)") ['* 2 4'] >>> calculator_ops("(+ (* 3 (+ (* 2 4) (+ 3 5))) (+ (- 10 7) 6))") ['* 2 4', '+ 3 5', '- 10 7'] >>> calculator_ops("(* 2)") [] """ return re.findall(__________, calc_str) Use Ok to test your code: python3 ok -q calculator_ops Submit Make sure to submit this assignment by running: python3 ok --submit
https://inst.eecs.berkeley.edu/~cs61a/su21/lab/lab11/
CC-MAIN-2021-49
refinedweb
931
63.39
In this Programme, you’ll learn Program to Find Largest Element Array in Java. To nicely understand this example of to find Largest Element Array, you should have knowledge of Java Program Program to Find the largest element in an array in Java public class Largest { public static void main(String[] args) { double[] numArray = { 23.4, -34.5, 50.0, 33.5, 55.5, 43.7, 5.7, -66.5 }; double largest = numArray[0]; for (double num: numArray) { if(largest < num) largest = num; } System.out.format("Largest element = %.2f", largest); } } After Compiling the above code we get Output Largest element = 55.50 Ask your questions and clarify your/others doubts on how to find Largest Elements Array by commenting or Posting your Doubt on Forum. Documentation More Examples 1. Java Program to Convert String to Date 2. Java Program to Get Current Date/TIme 3. Java Program to Convert Milliseconds to Minutes and Seconds
https://coderforevers.com/java/java-program/largest-element-array/
CC-MAIN-2019-35
refinedweb
154
56.15
ReSharper provides multiple options to quickly yet precisely navigate through your code. You are also able to locate usages of symbols, highlight them in the current file and go to them quickly. In addition, several utility views and windows are provided for your browsing and navigation convenience. 1. Code Navigation. Navigate to types, files, methods, usages, errors, and more: 2. Find Usages. These features help you locate usages of namespaces, types, methods, fields, or local variables in your code: 3. Navigation Views. In addition, the following views (windows) are available for better navigation in files, between files and other parts of the solution: Please refer to the corresponding help topics for details. Navigation and Search in ASP.NET Files | Navigation and Search in Build Script Files
http://www.jetbrains.com/resharper/documentation/help20/Navigation/index.html
CC-MAIN-2013-20
refinedweb
126
55.64
Testing Golang With httptest Read here to learn about how to use the httptest package for testing HTTP servers and clients in Go. Join the DZone community and get the full member experience.Join For Free Go, often referred to as Golang, is a popular programming language built by Google. Its design and structure help you write efficient, reliable, and high-performing programs. Often used for web servers and rest APIs, Go offers the same performance as other low-level languages like C++ while also making sure the language itself is easy to understand with a good development experience. Go’s httptest package is a useful resource for automating your server testing process to ensure that your web server or REST API works as expected. Automating server testing not only helps you test whether your code works as expected; it also reduces the time spent on testing and is especially useful for regression testing. The httptest package is also useful for testing HTTP clients that make outbound requests to remote servers. The httptest package was primarily built to test your Go HTTP handlers using net/http, with which it works smoothly. It can also be extended. httptest can serve as a drop-in replacement for your third-party integrations as a stub, and it can be easily adapted to your local development environment during testing. This article provides an overview of how to use httptest to test your Go handlers in a web server or REST API and to test HTTP clients. What Is httptest? As mentioned earlier, httptest, or net/http/httptest in full, is a standard library for writing constructive and unit tests for your handlers. It provides ways to mock requests to your HTTP handlers and eliminates the need of having to run the server. On the other hand, if you have an HTTP client that makes requests to a remote server, you can mock the server responses using something like SpeedScale and test your client. httptest - How It Works Before looking at the test package, it’s important to first understand how the HTTP handler package itself works and how your requests are processed. HTTP Handler Package The standard library http package net/http has a client and a server interface. The server is basically a group of handlers. When you send a request to an endpoint or a server path, the handler intercepts this request, and based on the request, it returns a specific response. Below is a simple interface of a handler ( http.Handler): type Handler interface { ServeHTTP(ResponseWriter, *Request) } The ServeHTTP takes in ResponseWriter and Request. The Request object holds the incoming request from the client, and the ResponseWriter can be used to create a response. Here is an example of a simple handler: // With no ServeHTTP func handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello, World!")) } // With ServeHTTP type home struct {} func (h *home) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello, World!")) } The first method is more common than the second. It’s less confusing and clearer to declare your handler as a function. When the handler takes a request, you can compose a response after carrying out whatever needs to be done using the `ResponseWriter` interface. This process can either be reading from the database, third-party services, static server data, or processing a file. In the above code, the line w.Write([]byte("Hello, World!")) sends the response. Testing HTTP Handlers with httptest Even though the handlers are just functions, you can’t write unit tests for them the usual way. The hindrance comes from the parameters of the handler function with types ResponseWriter and Request. These are constructed automatically by the http library when a request is received by the server. So how do you construct a ResponseWriter and Request object to test the handler? This is where httptest comes in. httptest has two methods: NewRequest and NewRecorder, which help simplify the process of running tests against your handlers. NewRequest mocks a request that would be used to serve your handler. NewRecorder is a drop-in replacement for ResponseWriter and is used to process and compare the response with the expected output. Here’s a simple example of the httptest methods, an instruction to print the response status code: import ( "fmt" "net/http" "net/http/httptest" ) func handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello, World\n")) } func main() { req := httptest.NewRequest("GET", "", nil) w := httptest.NewRecorder() handler(w, req) resp := w.Result() fmt.Println(resp.StatusCode) } The line below allows you to create a new mock request for your server. You are passing it to your handler as your request object: req := httptest.NewRequest("GET", "", nil) The next line is your ResponseWriter interface and records all the responses from the handler: w := httptest.NewRecorder() You can now use these variables to call the handler function: handler(w, req) Once the request has been fulfilled, these lines let you see the results and the response details of the request: resp := w.Result() fmt.Println(resp.StatusCode) Let’s now build a complete example. First, create a new Go project and create a file named server.go: package main import ( "fmt" "log" "net/http" "net/url" ) func RequestHandler(w http.ResponseWriter, r *http.Request) { query, err := url.ParseQuery(r.URL.RawQuery) if err != nil { w.WriteHeader(http.StatusBadRequest) fmt.Fprintf(w, "Bad request") return } name := query.Get("name") if len(name) == 0 { w.WriteHeader(http.StatusBadRequest) fmt.Fprintf(w, "You must supply a name") return } w.WriteHeader(http.StatusOK) fmt.Fprintf(w, "Hello %s", name) } func main() { http.HandleFunc("/greet", RequestHandler) log.Fatal(http.ListenAndServe(":3030", nil)) } The above code creates a handler that returns a greetings message. The name query parameter is used to create a greeting, which is returned as a response. Run the code and send a request to with a name parameter, for example, to see the response. To test this server, create a file server_test.go and add the following code: package main import ( "io/ioutil" "net/http" "net/http/httptest" "testing" ) func TestRequestHandler(t *testing.T) { expected := "Hello john" req := httptest.NewRequest(http.MethodGet, "/greet?name=john", nil) w := httptest.NewRecorder() RequestHandler(w, req) res := w.Result() defer res.Body.Close() data, err := ioutil.ReadAll(res.Body) if err != nil { t.Errorf("Error: %v", err) } if string(data) != expected { t.Errorf("Expected Hello john but got %v", string(data)) } } The expected variable holds the expected response of the server. The NewRequest method creates a mock request to /greet with a name parameter. The handler then responds with the appropriate data, which is then validated against the expected value. Run the test with go test, and you should see it pass. Testing HTTP Clients With httptest Another important use case of httptest is to test HTTP clients. Whereas HTTP servers intake requests and churn out a response, HTTP clients sit on the other end, making requests to a server and accepting responses from it. Testing the clients is trickier since they depend on an external server. Imagine a scenario where your client makes a request to a third-party service, and you wish to test your client against all types of responses returned by the third-party service; however, it’s not in your control to decide how the third-party service will respond. This is where the NewServer function of httptest comes into play. The NewServer method creates a mock server that returns the response you want. You can use it to mimic the response of a third-party system. Let’s see an example in action. Create a new Go project and install the required dependencies: mkdir httptest-client && cd httptest-client go init example/user/httptest go get github.com/pkg/errors Create a file called client.go. Here, you’ll define the client: package main import ( "io/ioutil" "net/http" "fmt" "github.com/pkg/errors" ) type Client struct { url string } func NewClient(url string) Client { return Client{url} } func (c Client) MakeRequest() (string, error) { res, err := http.Get(c.url + "/users") if err != nil { return "", errors.Wrap(err, "An error occured while making the request") } defer res.Body.Close() out, err := ioutil.ReadAll(res.Body) if err != nil { return "", errors.Wrap(err, "An error occured when reading the response") } return string(out), nil } func main() { client := NewClient("") resp, err := client.MakeRequest() if err != nil { panic(err) } fmt.Println(resp) } The client simply makes an API call to, which returns some data. The response is then printed to the console. To test the client, create a file called client_test.go: package main import ( "fmt" "net/http" "net/http/httptest" "strings" "testing" ) func TestClientUpperCase(t *testing.T) { expected := "{'data': 'dummy'}" svr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, expected) })) defer svr.Close() c := NewClient(svr.URL) res, err := c.MakeRequest() if err != nil { t.Errorf("expected err to be nil got %v", err) } res = strings.TrimSpace(res) if res != expected { t.Errorf("expected res to be %s got %s", expected, res) } } Here, the expected variable holds the expected result that the client must return. In this case, the client returns whatever it gets from the server intact, but you might have some processing done before returning the data. The next line creates the mock server with a handler that returns the expected result: svr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, expected) })) You can change the response value here to test the client against different responses. Remember to change the expected value as well. Finally, a client is constructed against this mock server, and the request is made: c := NewClient(svr.URL) res, err := c.MakeRequest() Run the test with go test to see the results. Conclusion Unit tests are crucial for validating the proper working of any application. Testing HTTP servers or clients is tricky because of the dependence on external services. To test a server, you need a client and vice versa. The httptest package solves this problem by mocking requests and responses. The lightweight and fast nature of httptest makes it an easy way to test your code. This article showed you how to use httptest to test your API handlers and HTTP clients. Opinions expressed by DZone contributors are their own.
https://dzone.com/articles/testing-golang-with-httptest
CC-MAIN-2022-27
refinedweb
1,726
67.65
You can subscribe to this list here. Showing 5 results of 5? Hi, I am very On Fri, Jan 05, 2007 at 10:30:50PM -0500, chris@... wrote: > does fontweight = "..." work for you? I couldn't get that one to work I sure can't see any difference in the tick labels, at least (didn't try it for manually-instantiated text). But what I wonder is whether there is some issue here similar to how the tick labels don't take the default font.size value ... Glen On Monday 08 January 2007 04:34, Gerhard Spitzlsperger wrote: > Dear All, > > I am quite new to matplotlib and facing some trouble using boxplots. > > I'd like to plot two boxes (different length of data) in one plot, from > the docs > Could you point me to what I do wrong? I need especially > the different data length. Gerhard, Try to install a SVN copy of matplotlib. Eric corrected that bug not long ago. Alternatively, you can try to force your data into an array with data = N.array(data, dtype=N.object) beforehand. Dear All, I am quite new to matplotlib and facing some trouble using boxplots. I'd like to plot two boxes (different length of data) in one plot, from the docs I understood: from pylab import * data = [[1.1, 2.1, 3.1], [1, 2.1]] boxplot(data, positions=[1,2]) but this gives me: Traceback (most recent call last): File "boxplot_demo1.py", line 5, in <module> data = array([[1.1, 2.1, 3.1], [1, 2.1]]) File "D:\APPS\python25\lib\site-packages\numpy\oldnumeric\functions.py", line 79, in array return mu.array(sequence, dtype, copy=copy) ValueError: setting an array element with a sequence. The call succeeds if all entries have the same length, but then matplotlib seems to use data from rows, not columns so that Ihave to do: boxplot(transpose(data), positions=[1,2]) Could you point me to what I do wrong? I need especially the different data length. Thank you Gerhard I am using python 2.5 matplotlib 0.87.7 on windows XP with numpy 1.0.1 (on older installation with python 2.4 and older numpy has the same issue. ****************************************************************************. responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. ****************************************************************************
http://sourceforge.net/p/matplotlib/mailman/matplotlib-users/?viewmonth=200701&viewday=8
CC-MAIN-2014-23
refinedweb
401
68.47
Technical Articles How to Connect Microsoft SharePoint with SAP Data Intelligence using SCP Open Connector While the process of data integration and orchestration is one that many data engineers are familiar with, doing so via SAP Cloud Platform with third-party cloud storage would still present an obstacle due to its new founding. The usage of Microsoft SharePoint as a storage of data has increased dramatically as of recently due to both its simplicity and applicability. In this blog, I shall provide a rather succinct overview of how to integrate Microsoft SharePoint with SAP Cloud Platform’s Open Connector subscription. I would like to first and foremost thank Divya Mary (@divya.mary), Akitoshi Yoshida, Christian Senstock (@christian.sengstock), Rene Penkert (@renpen), Bogdan Leustean and Zhouyang Li for their immense support in making everything in this blog possible. For this I assume that the reader has: - A valid Microsoft SharePoint Site - A version of the SAP Cloud Platform - Modified the SharePoint Site so as to grant third-party access to SAP Cloud Platform’s Open Connectors subscription* *In order to do so, one can look at this amazingly clear and useful blog by Divya Mary, whose support was greatly appreciated in doing this task,. The first part of this blog borrows largely from Divya’s blog with her kind permission. Please make sure to not forget to have the API Key and API secret saved from this. First off, when one goes onto the main SAP Cloud Foundry Homepage, she must click on subscriptions. Now, click on the relevant subaccount for which you wish to connect SharePoint with. Once, you’re in the relevant subaccount, you must click on subscriptions located in the panel on the left-hand side. On the subscriptions page, click on the Open Connectors application and subscribe to it. Once, you have subscribed to it, you may click on, “Go to Application” At this point, go onto the Connectors tab on the left-hand side and then go onto the SharePoint tab which will be located among many others and click on, “Authenticate”. You will be presented with a screen which will ask you for certain information in regard to your SharePoint instance; - Name: This is the name that you wish to give to your connector instance. - SharePoint Site Address: The base URL for the specific SharePoint site that you wish to connect to. - API Key & API Secret: Assuming you have followed Divya’s Blog correctly, you should have the API key and API secret to put into these subsections. - MS OAuth Scope: This must be set to “AllSites.Manage” AND “MyFiles.Write” which was one of the rights that you configure the SharePoint site to give in Divya’s Blog. - Use Scope: Should be set to true so as to give the API access to files stored within the SharePoint site or else you will find that you are denied authorization to get any file later on. - Documents Library: This should follow the path to the specific folder that you wish to access within SharePoint up until you have reached, “Shared Files”. - Delegate User: Should be set to True Once you have filled in the necessary information, click on Create Instance. A new tab may open up which should then ask you if you trust the third-party cloud source. If that happens, click on Yes, you will be redirected back to Open Connectors homepage and receive an on-screen message that states that you have successfully created an Open Connectors instance. Now, click on the Instances tab on the left-hand side and you should see the instance that you just created on the screen with the relevant description that you assigned it. Click on API Docs and you will be brought to a screen containing the vastly numerous API options that you are allowed to use with the SharePoint instance. You may now decide what to do with your instance. For the sake of providing an example for readers, I have decided to use the Get/files API call on the file section to acquire a file stored in my SharePoint instance. Click on the Get/files API Call and you will be presented with a Parameters subpage. Click on the “Try it out” tab on the top-right corner of the screen. It will have three sections to fill out. - Authorization: The Authorization section should already be filled up with a custom-made User token for you. This can be saved in case you wish to perform API calls outside of Open Connectors. - Path: As stated, this is the just the specific path to the individual file that you wish to retrieve via Open Connectors from SharePoint. - Subsite: This has to be the individual subsite of the folder you wish to access in Microsoft SharePoint. Although Open Connectors does not label it as required explicitly, my colleagues and I found out that we are unable to access the files without writing in the subsite. As such, I highly recommend it as implicitly required. Please note that you have to be very, very careful when writing the information in. Any small perturbation or typo such as a trailing space will cause this to return an error. Assuming you have written it correctly, you should see the following screen return with the CURL link, Request URL and response headers showing the file you have retrieved. The preceding action is also possible from any RESTful API caller such as POSTMAN. As an example, I will now do it from Postman API. In the Params configuration, you need to state the exact path to the individual file that you wish to acquire. This should be exactly the same as what was put in the path for the API call when you do it directly on the Open Connectors page as shown earlier. Once, you do so, the URL address in the bar above should self-generate assuming you have written the correct path. Now, you will click on the Headers subtab and put information pertaining to Authorization and the subsite. The Authorization you write in should be exactly the same token that was automatically generated for you by the Open Connectors subscription and can be found by clicking on any API call in the Open Connectors page for the instance you wish. The Subsite will also have to be written here exactly the same as it was written for API calls on Open Connector. Ensure that the API call is set to GET before you send it. Once you press the blue send button the top right-hand corner, you should see the document pop on the Postman screen.Now, I shall show how to implement the process of downloading the file from OpenConnectors’ Sharepoint instance within SAP Data Intelligence. For the sake of simplicity, the model shall be relatively short but flexible so that a multitude of edits could be made to it. In order to implement the following pipeline, you will need: - SAP Data Intelligence - SAP HANA (this could be any 3rd party storage such as an Amazon S3 bucket or an internal data lake) The pipeline follows a simple pathway which I will describe sequentially. First, you will have the constant generator which output a string type containing some necessary parameters to be inserted into the following Open API Client Operator. {“openapi.header_params.Accept-Encoding”: “identity”, “openapi.header_params.Subsite”: “<value>”,”openapi.header_params.Authorization”:”User<value>,Organization<value>, Element <value>”, “openapi.query_params.path”: “<value>”} These parameters are necessary as they pass along the necessary path, authorization keys, subsite and encoding scheme for the Open API operator to use. While you should already know what the path, subsite and authorization keys are, they are the same that were used in the OpenConnectors API and Postman, the Accept-Encoding:”identity” is so that the Open API returns the downloaded files in its original byte-encoded format which can then be processed by any other operator (Python for example) downstream. If this specification is not set, the Open API operator will instead issue a compressed gzip file in byte form.Since it will be in this compressed form, SAP Data Intelligence will not be able to convert the file into a byte form which can be then either edited within SAP Data Intelligence or even inserted into any external data storage. As such, these parameters are absolutely necessary.The string is then sent to a toMessage converter which sends the newly made message to the Open API operator which takes in the aforementioned parameters. Please note that it is also possible to set the authorization scheme in the Open API operator rather than in the constant message generator where they are defined in “openapi.header_params.Authorization”. To do so, you would need to set the API key in the authorization configuration as: After the aforementioned steps, the Open API operator will only need 2 mandatory subfields to be filled by you. - Host: You will need go type in the host URL for the API for which you have decided to use. This host URL usually consists of the base of the URL rather than the whole string. - Base Path: The service’s base path which entails the service to be used. i.e. v2 - Include Response Headers: Writing in “content-disposition, content-encoding” will allow you to see the data type and encoding scheme which is being sent out by the Open API. (Optional but recommended for debugging) Once, you have completed the mentioned steps, you will now have extracted data from your Open Connector instance. What I have done is using a Python operator to simply transform the data into a CSV file using the Pandas library to be put into an instance of SAP Hana. import xlrd import pandas as pd import io def on_input(msg): df = pd.read_excel(msg.body) csv_file = df.to_csv(index=False) api.send('outFile', csv_file) api.set_port_callback('inFile', on_input) However, the versatility and flexibility of SAP Data Intelligence means that you are more than able to transform and insert your data in whatever method you wish and insert into whatever external storage you have such as internal data lake or an external S3 bucket. Congratulations, if you followed all the steps exactly, you will have successfully integrated Microsoft Sharepoint with SAP Data Intelligence via Open Connectors subscription. hello , interesting article. is this setup also possible for an SAP ECC6 system with sharepoint. Thanks , Satya
https://blogs.sap.com/2020/08/05/how-to-connect-microsoft-sharepoint-with-sap-data-intelligence-using-scp-open-connector/
CC-MAIN-2022-27
refinedweb
1,743
58.01
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode. Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). Hello ! I see the "hotkey" plugin in cinema 4d like "Move Parent", and the shortcut is "7", and i need to press and hold down the shortcut key to execute the plugin. (You can see the Type is Hotkey) So how do i register the "hotkey" plugin in python? Actually i find some hotkey stuf like Command plugin flag in SDK; But i am not sure it's what i want, if it's what i want, how do i use it ? and how do i bind the shortcut key for the plugin ? Thanks I try to register a CommandDataPlugin with PLUGINFLAG_COMMAND_HOTKE flags, and i assign a shortcut key like this ; . But when i press the shortcut key anything doesn't happen. CommandDataPlugin PLUGINFLAG_COMMAND_HOTKE ; I don't know is i did something is wrong? How can i do it's work correctly? And the examle code like this: class Hotket(plugins.CommandData): def Execute(self, doc): print("Hotkey pressed") return True if __name__ == '__main__': plugins.RegisterCommandPlugin(1208170,"Hotkey Test",c4d.PLUGINFLAG_COMMAND_HOTKEY,None,"",Hotket()) Hello !~~ I'm waiting... Hello @gheyret, thank you for reaching out to us and please excuse the slight delay. You are misunderstanding the purpose of PLUGINFLAG_COMMAND_HOTKEY, which admittedly is badly explained, and I also had to do some digging myself to understand how this is meant to be used. In bullet points: PLUGINFLAG_COMMAND_HOTKEY CommandData PLUGINFLAG_SMALLNODE PLUGINFLAG_COMMAND_STICKY EditorWindow.IsHotkeyDown GeUserArea.IsHotkeyDown c4d.gui.GetInputState c4d.gui.GetShortcut The description for PLUGINFLAG_COMMAND_STICKY was either always wrong or is outdated, as it does indicate that 'PLUGINFLAG_COMMAND_HOTKEY | PLUGINFLAG_COMMAND_STICKY' will cause CommandData.Execute() to be called - which is not true. I hope this helps, Ferdinand """Example for retrieving the shortcuts for a plugin id. """ import c4d def GetPluginShortcuts(pid: int) -> list[list[tuple[int]]]: """Retrieves the shortcuts for a plugin-id. Args: pid (int): The plugin id. Returns: list[list[tuple[int]]]: The shortcut sequences for the plugin. """ # Get all shortcut containers for the plugin id. count = c4d.gui.GetShortcutCount() matches = [c4d.gui.GetShortcut(i) for i in range(count) if c4d.gui.GetShortcut(i)[c4d.SHORTCUT_PLUGINID] == pid] # build the shortcut data. result = [] for item in matches: sequence = [] for i in range(0, c4d.SHORTCUT_PLUGINID, 10): a, b = item[i], item[i+1] if isinstance(a, (int, float)): sequence.append((a, b)) if sequence != []: result.append(sequence) return result if __name__ == "__main__": # The shortcuts for your plugin id. for item in GetPluginShortcuts(1208170): for a, b in item: print (a, b, c4d.gui.Shortcut2String(a, b)) # The shortcuts for the dissolve tool (multiple shortcuts) for item in GetPluginShortcuts(440000043): for a, b in item: print (a, b, c4d.gui.Shortcut2String(a, b)) Hi @ferdinand , Thank you very much for your detailed reply. I think it is very helpful to me. Cheers!
https://plugincafe.maxon.net/topic/13606/how-to-register-hot-key-plugin-in-python/4?lang=en-US
CC-MAIN-2021-43
refinedweb
502
58.38
US6327587B1 - Caching optimization with disk and/or memory cache management - Google PatentsCaching optimization with disk and/or memory cache management Download PDF Info - Publication number - US6327587B1US6327587B1 US09166441 US16644198A US6327587B1 US 6327587 B1 US6327587 B1 US 6327587B1 US 09166441 US09166441 US 09166441 US 16644198 A US16644198 A US 16644198A US 6327587 B1 US6327587 B1 US 6327587B1 - Authority - US - Grant status - Grant - Patent type - - Prior art keywords - set - expression - logic - data - related in subject matter to co-pending U.S. patent application Ser. No. 09/166,556, filed on Oct. 5, 1998, by Michael Forster for “DATA EXPLORATION SYSTEM AND METHOD”. The disclosure of application Ser. No. 09/166,556 is incorporated herein by reference and assigned to a common assignee herewith. 1. Field of the Invention This invention relates to database, data warehouse, and data mart technology and, more particularly, to an improved system and method for exploring information relationships in data. 2. Discussion of Related Art Modern computing databases have extremely large quantities of data. Businesses often desire to discover information relationships in this data to make better informed business decisions. In this regard, “data warehousing” is used to describe computing technologies used to discover relationships within a database, and “data mart” is used to describe technologies for a subject-specific data warehouse. To date, data warehousing and data mart tools have been undesirable because of their high cost, both in infrastructure and human capital. Modern systems are effectively customized database applications. Consequently, exploring relationships usually involves the creation of new, custom queries and typically requires a management information systems (MIS) professional, or other programming personnel, to implement the query. If a user, for example, in a marketing department, wishes to investigate a potential new information relationship, he or she is often forced to cross department boundaries and as a result almost invariably experiences undesirable delays. As a result, much of the data is under utilized because many relations are never explored because the delay outweighs the benefit. Moreover, because modern data warehouse systems are effectively customized database applications, they often inherit inefficiencies from the underlying database. These inefficiencies may be information related (e.g., inherently precluding certain lines of questioning because the application is tightly-coupled to the database's schema) or performance related (e.g., the system may be optimized for a certain type of transactional access that does not perform well to the accesses involved in the data warehousing queries). More specifically, concerning performance related issues, most systems rely on the relational data model (RDM). The performance of a RDM implementation is typically limited by its “access method.” Commercially-available systems, for example, have their software logic rely on an access method (e.g., “B+tree”) that requires multiple accesses to storage (e.g., memory or disk) to obtain a given record. Some of the accesses are to reference structures that are used to effectively “point to” the data of interest (e.g., indices or hierarchies of linked lists). Sometimes, these reference structures can get so large that portions of the structure must reside on disk. Thus a given request for a database record may involve multiple disk storage requests. Moreover, the database operation algorithms are tightly bound to the access method. That is, the algorithm itself has been optimized to the access method and is thus dependent on the existence of the access method. Much of the literature on database performance explicitly or implicitly assumes the existence of such access methods. Aside from the above limitations, most commercial systems are limited to the actual data within the database. The systems cannot query other important data elements such as the schema, the meta data, or the data dictionary without significant custom programming. Consequently, significant knowledge, e.g. useful queries, is not reported or available for use within such systems. The above difficulties are exacerbated in the context of data residing on disparate databases. Alternative approaches have been attempted. Childs, for example, discusses set-theoretic approaches in Feasibility of a Set-Theoretic Data Structure: a General Structure Based on Reconstituted Definition of Relation, Information Processing 68, Edinburgh, 1968; Description of a Set-Theoretic Data Structure, Fall Joint Computer Conference, San Francisco, 1968; and Extended Set Theory: a General Model for Very Large, Distributed, Backend Information Systems. He is believed to have developed a system (STDS and XTDS) in which a user may express queries directly from a small set of set operators. Preferred embodiments of the invention provide a system for, and method of, exploring relationships in data stored in a computer readable medium. Under one preferred set of embodiments, sets of data are maintained in a computer readable medium and include at least one intensional expression and one extensional expression of at least one set resulting from an evaluation of a first query. A second query is transformed into a set program. It is then determined whether a sub-expression of the set program is satisfied by a maintained set. If so, the sub-expression is removed from the set program and the maintained set that satisfies the sub-expression of the set program is used. Under another preferred set of embodiments, a query is received having at least one operator chosen from a set of operators that includes relational operators and having at least one input and output associated with the operator and defined as a table having at least one domain having a type associated therewith. The query is transformed into a set program having at least one operation structure, corresponding to the operator. An execution context is then analyzed to automatically select an operation structure from a set of operation structures corresponding to the operator so that the selected operation structure may be included in the set program. In the Drawing, FIG. 1 shows a preferred client-server embodiment of the invention at a high-level abstraction; FIG. 2 shows an XSet data structure according to a preferred embodiment of the invention; FIG. 3 shows server logic according to a preferred embodiment of the invention; FIG. 4 shows query evaluation logic according to a preferred embodiment of the invention; FIG. 5 shows outer language evaluation logic according to a preferred embodiment of the invention; FIG. 6 shows inner language evaluation logic according to a preferred embodiment of the invention; and FIG. 7 shows server engine logic according to a preferred embodiment of the invention. A preferred embodiment of the invention provides a data exploring system and method that allows users to express queries diagrammatically and with many declarative or calculus aspects. This expression is evaluated to a form used by a set-based server engine. The arrangement among other things allows queries to be expressed as a function of set membership and allows implementations to be proved correct. Among its many advantages, preferred embodiments allow users to query any available databases regardless of structure, origin, or size, singly or in combination with other data sources; to analyze any and all parts of the data including the schema and query information; and to query free-form text. Because customized database applications, queries and schemas are avoided the system may be setup and used quickly and new lines of questioning may be created with more flexibility than existing systems and without the necessity of MIS involvement. FIG. 1 shows a preferred embodiment of the invention at a high level of abstraction. The system 100 follows a client-server arrangement having a client 102, a server 104, and one or more data sources 106 a-n holding the data to be explored, which may be imported or attached as described below. The client 102 and server 104 communicate over a computer network 108 according to a predefined protocol (e.g., TCP/IP). The communication is based on packets that encode various requests and that provide data to and from the client and server. The server communicates with a data source 106 over a link 110 according to a defined protocol, such as ODBC. The data sources 106 a-n provide the data to be explored, though the data to be explored may also include information stored in “workspaces” in server memory. Moreover, the “data” within the data source may include database schema information, queries, or the like and may be organized as individual files or organized as libraries. Preferably, client 102 is “thin,” providing a graphical front-end that allows a user (1) to create a diagrammatic representation of a query, (2) to view query results and other workspace information, and (3) to submit queries to be solved. The client 102 has minimal intelligence concerning the query language (“outer language”). Instead, its intelligence is primarily directed to graphics. It has logic to graphically construct and manipulate boxes to represent outer language operators, or operations, and lines connecting boxes to represent data flow dependence. It also has logic to present workspace information such as query results. The server 104 is preferably “thick,” having the intelligence to manage workspaces and to evaluate and solve outer language queries. (A later section “Operators and Types” describes the outer language operators of a preferred embodiment.) In this fashion, most of the system's intelligence is localized to the server 104. Consequently, the client 102 should not need updates in response to changes in the data exploration system or the underlying query language, and the server should not need updates in response to changes in the data presentation techniques or the system's graphical user interface (GUI). The client 102 and the server 104 cooperate in the construction of a query in response to user actions. A user, for example, performs graphical actions such as the selecting, dragging, or dropping of an operator icon from a palette on to a query window. (The client, having no built in intelligence about the outer language or system, is informed of the set of operations implemented by the server through a collection of server-provided identifying codes.) In response, the client 102 sends messages to the server 104, providing the operator's identifying code and other information indicative of the user action. The server 104 analyzes the messages and responds by sending messages to the client, providing “pattern” and other information indicating how a corresponding operator block should be drawn (e.g., indicating the number of input and output connectors for the operator block and the number of items to be drawn on each connector). If a user connects an operator block to another operator block or to an iconic representation of a data source, the client sends indicative messages to the server, which updates a corresponding internal representation of the query (called a “parts list”) to reflect the connection. Sometimes the modification of a given block or connection can cause the server to propagate the change through the parts list. In short, the query constructed is a graph of operations in which “tables” (i.e. depicted sets either DSets or DPSets, discussed below) flow between operators. The outer language follows a functional, applicative paradigm that, among other things, supports parameterized queries and recursion. The query (or program) may include one or more constraints between columns within a table, columns of different tables, or a column and a scalar. As will be explained below, these constraints imply row selection if they are within a table, or a join operation (e.g., inner or theta join) if they are between tables. When the user is satisfied with the query, he or she may “submit” it to be solved by the server 104. More specifically, the user will cause the client 102 to send an indicative message to the server, instructing it to solve the identified query. The server 104 will then evaluate the query into a semantically equivalent set of operation “primitives.” (This process, as will be explained below, will generate intermediate expressions of the query. Moreover, through the implementation of the primitives' algorithms, this semantic equivalence is provably correct, not merely asserted as is common in the RDM art.) The server will then submit the primitives to an internal server engine to be solved. The primitives (and particularly their semantics) and the algorithms used by the internal engine to execute the primitives have been found to be particularly efficient. This efficiency is observed both in direct performance (e.g., the algorithmic efficiency of an Inner Join implementation) and in the system's amenability to both local and global optimizations, exploiting certain characteristics of the primitives and algorithms. For example, some optimizations exploit the language's and algorithm implementation's characteristic of preserving the “sortedness” of data across an operation. More specifically, this preservation of sortedness may be exploited in detecting and removing redundant Sort operations within a query. During the above process, the server may send status messages to the client, indicating the progress of the solution process. Once it is solved, the user may cause the client to present the results. The server 104 also maintains “workspaces.” A workspace organizes data such as related tables (sets of data) and queries (called QRSets). A given workspace effectively provides (1) a namespace for the related data and (2) a user view into the system, including a history of prior queries (i.e., a knowledge base). The workspace also provides a collection of “managers” to facilitate the use of the related data and queries. A preferred embodiment of the server 104 uses the following data structures for organizing data in server memory and/or on attached storage 106, such as disks or tape. An “XSet” is used directly by the server as a unit of access and manipulation and also in the construction of compound structures. An XSet is a type-less array of data storage units (e.g., bytes). Each XSet corresponds to a file that provides persistence for that XSet's data. Each XSet is arranged as shown in FIG. 2. (There is an exception to this arrangement when an XSet is included in a compound structure called a DPSet, described below.) The header includes information indicating the number of elements in the XSet (i.e., the “cardinality”); the width of each element in data units; the size of the header; the identity of the XSet; the version number of the XSet; and other state information. A preferred embodiment maintains the following XSet state information to represent the XSet's access type and status information: the XSet is new, open, closed, read only, writable, the existing file should be replaced on new file operations, the set should be handled on disk and memory, or memory only, the XSet is unsavable, the XSet is marked for deletion and an indication that an XSet's data is stored externally (e.g., by an attached, non-writable file). A preferred embodiment mirrors the header information in the workspace managers. Because under a preferred embodiment there is no inherent “meaning” (or type) to an XSet, meaning is imputed from separate entities, either a “Depictor” or an “RShip,” depending on the stage of query construction, evaluation or solution. A Depictor is analogous to a schema and includes data indicating how an XSet's data should be portrayed or understood (at least in a specific instance). A Depictor includes column name, column type identifier, column type width, and column type format, as well as possible data delimiters in the XSet (e.g., spaces, commas, special characters, etc.). Delimeters are used on partitioned data, for example, DPSets with attached data from outside the workspace. An RShip is used in the context of an operation's execution and is created dynamically during query solution. As will be discussed below, it is used to provide data abstraction so that the operation primitive algorithms may be implemented with minimal or no data type dependencies. A “Depicted Set” (or “DSet”) is a compound data structure that combines an XSet and a Depictor. DSets correspond to the entities used by users. That is, these are the structures users typically use as inputs to queries and that they view. A user typically wants to impute some interpretation on the data being explored and might specify, as a first analysis, that the Depictor should effectively mirror the interpretation supplied by a database schema of the data being explored. However, the separate structures allow users to easily modify a Depictor (and consequently a DSet) and thus cause the system to analyze the data differently, e.g., consider a first column as text, and then later as an integer. For implementation simplicity, an exemplary embodiment has a given column in a DSet having the same width in each row of the DSet. Moreover, Depictors are also constructed by the software logic. For example, an output of an operation will be a DSet, the Depictor of which will be formed either from user input or from software logic using default Depictor forming rules (e.g., output type equals left most input as viewed on screen.) A DSet may be represented in either “extensional” form or in “intensional” form. An extensional DSet is implemented as contiguous storage in which DSet members are stored sequentially, preferably without gaps. An intensional DSet is implemented with a stored “intension.” The intension is an expression that when executed on the server yields the DSet in extensional form. (As will be explained below a preferred embodiment stores an expression called a “QRSet” as the intension.) A “Depicted, Partitioned Set” (or “DPSet”) refers to a DSet in which the data portion resides on disk, not in server memory or in a server controlled area on disk. More specifically, a DPSet is a compound data structure that includes a data XSet, a DSet for holding partitioning information, and a Depictor. The data XSet preferably does not include the header information identified above for normal XSets but it could under alternative embodiments. The DSet for holding partitioning information defines a layout of the data in the XSet file. This partitioning DSet has one row in it for every row in the DPSet and it has the same number of columns as the DPSet, plus one. The first column of the DPSet holds the byte offset of the start of the corresponding row in the XSet file. The rest of the columns specify the width in bytes of the columns of the DPSet on a row-by-row basis. The Depictor is a DSet which has one row for every column in the DPSet. Each row in the Depictor DSet defines the properties of the corresponding column in the DPSet, including column name, column type identifier, column type width, column type format, and storage information about a given domain. DPSets are advantageous in that they allow conversion and use to be postponed so that only the data that is actually needed will be read from the file. A “parts list” is a compound data structure that is a collection of n-tuples. Each n-tuple corresponds to a query element as it is drawn on the screen (e.g., input, connector, operation block). The parts list's n-tuples contain data identifying the input and output connectors and the operation, but preferably with just enough information to describe the query as drawn on the display. They also contain data showing the input and output domain on connectors (more below). A “QRSet” is a DSet representing a query. The Depictor specifies the entities used to represent a query, for example, including the part element type, its identification number, and the like. The Depictor for a QRSet has information about the parts list which represents a function (more below). The XSet portion of the QRSet's DSet holds the corresponding values, e.g., the value of the identification number. A QRSet is an “intensional” form of the DSet eventually solved, or derived, from the query. QRSets, being DSets, may be queried. FIG. 3 shows the server architecture 300. The server 104 includes a message and event handling system 302, a query editing system 304, a workspace system 306, an input-output (I/O) system 308, and a query evaluation system 310. Each of the systems 302-310 is preferably constructed with software logic and associated data structures and is executable on server 104 as a separate thread. The message and event handling system 302 is a queue-based system that receives messages and events from the client 102 and the other server systems 304-310. An event identifies the target of the event and the event itself, and it may include information corresponding to the event. Most of the inter-system communication is event based, though some is implemented with direct system calls. (As will be explained below, some systems, notably the evaluations system 310, also use intra-system event queues.) The query editing system 304 receives the editing messages from the client 102, via event system 302, and constructs a “parts list” as an internal representation of a user's query. The parts list involves a collection of query operations in which each is associated with inputs and outputs that are (1) table constants, (2) table variables, or (3) scalars. A table constant is a table that exists at the time the query is defined, that is, attached or imported tables, or tables in a workspace, or more specifically tables the intensions of which already exist. A table variable, on the other hand, is one that does not yet exist at the time the query is defined. It may include, for example, the output of another operation in the query (e.g., one higher in the query from the perspective of data flow). A table variable may be considered as an intermediate result of a sub-expression of a query expression. In response to client editing requests, the editing system 304 sends back to the client 102 parts list information indicative of the updated, edited query. This information is used by the client to present the query diagram. A given user action may affect multiple defined operations in a given query. The editing logic detects such dependencies and ensures that query edit requests are propagated through the query to reflect the edit. The workspace system 306 provides a namespace in which data and queries are related. A suite of workspace managers operates on, or manipulates, that data. In short, the managers are generally organized according to the manipulation's target. For example, some manipulations target a given kind of data, such as an XSet, DSet, or DPSet. Other targets are defined by how the data is used: Depictors are used to describe the column properties of a DSet; editable outer language programs are used to define a query; and executable inner language programs are used to solve a query. There are also managers that record inter-set dependencies, a DSet's intension (i.e., QRSet); progress message addresses; set openings; set access control; set interest; set usage; and a workspace's users. The managers, besides being responsible for the above, also monitor access to determine when a set is no longer needed and in response eliminates such sets. The workspace system 306 also monitors and detects when sets have changed. One set's definition may rely on another set. This other set may change either because an input file has changed or because of an operation on the server. The workspace system 306 maintains data structures reflecting this inter-set dependence and indicates when a set has changed. Either manual (i.e., in response to a user action) or automatic propagation may be used to update affected sets. Sets have associated access or viewing privileges. A preferred embodiment organizes access based on arranging privileges to local (i.e., the creator), Project (i.e., a set of related users), and All (i.e., anyone). As will be explained below, the tables are maintained, or “cached,” and available to be used in certain optimizations during query evaluation and/or solving. The workspace managers consider the amount of memory available to the workspace and allocate that memory to tables. Preferably sets and tables are kept in “extensional” form; that is, the data itself resides in the workspace. However, dynamic run-time usage can require the workspace managers to effectively “swap out” the extensional form to storage but retain the “intensional” form, i.e., the query sub-expression that resulted in the data. Moreover, when there is no more interest in a set it may be deleted. Usage histories are maintained and considered by the workspace managers in determining which sets to swap out or delete. A preferred embodiment also factors the size of the set in determining a preference as to which set to keep in extensional form. In this fashion an XSet's cost is consider. Larger sets are more costly because more I/O bandwidth is consumed. Many other caching replacement algorithms may be added or substituted. An intension manager is used to manage QRSets, for example, to match identical or semantically equivalent intensions during global optimization (more below). The input-output (I/O) system 308 cooperates with the server's operating system to read and write data from storage. It abstracts the operating system from the rest of the server logic described in this application. The query evaluation system 310 transforms the user-created query into a semantically equivalent form, constructed of operation “primitives.” These primitives are operations that are executable by a server engine. In short, the primitives generally have more restricted operation assumptions than the user query (e.g., input arguments must be in a prescribed order) and are set-theoretic, rather than relational. The outer language, though having relational model characteristics, also contains set theoretic aspects. Thus queries may be expressed in a form emphasizing set membership. As a consequence, the outer language has both algebraic aspects and more powerful calculus aspects. The query evaluation system 310 transforms the server's internal representation of an outer language query into a semantically equivalent set of operation primitives. In the process, several intermediate expressions are formed. These primitives are then executed by an internal engine, under the control of the evaluation system 310. As show in FIG. 4, the query evaluation system 310 cooperates with the event and message handling system 302, described above, and includes an outer evaluation system 402, an inner evaluation system 404, and a DSet operation execution System 406. The event and message handling system 302, as outlined above, receives and handles messages and events from the various server systems 304-310. In the instant context, these events include client-originated messages identifying a particular query and requesting that it be solved and client-destined messages indicating the status of a particular query's execution. These events also include messages to and from the workspace manager 306 to record interest in sets and their usage and to determine whether the workspace manager 306 includes a set or superset as expressed by a set's intension. These events and messages also include requests to read and write data to storage 106 via input-output system 310. These latter events and messages may be partially mirrored to the workspace system 306 so that it may update set status accordingly. The outer evaluation system 402 transforms the query from an outer language expression to an inner language expression. The inner evaluation system 404 transforms the inner language expression into a second inner language expression and then into a set of operation primitives and corresponding control structures (an “oper set”). An oper set is a collection of “opers” in which each oper identifies the operation primitive to be performed (e.g., Inner Join with inner language operation assumptions) and which describes the operation's input and output DSets. This oper set description includes control structures to identify the state of inputs and outputs (e.g., valid or invalid). These control structures are used to data flow schedule any “ready” opers (i.e., ones in which all inputs are valid, and outputs are defined). (Data flow scheduling is known, though not in the combination described.) The operations include a “switch” operator, which creates special “void” sets as outputs to “force” non-selected output dataflow paths to be skipped. This skipping occurs because all operators except the Accept operator degenerates into simple pass-through of void sets without attempting any calculation. The set handling logic that checks for ready opers sees that one of the inputs is void and marks that oper as if it had completed execution and copies void sets to outputs as necessary. The “Accept” logic checks if all of its inputs are ready (including void sets) and does a union of all inputs to generate an output. The oper set is used in invoking and is executed by the DSet operation execution system 406. The DSet operation execution system signals completion status to the inner evaluation system 404 to inform it of DSet operation execution system's status. The DSet operation execution system also invokes the outer evaluation system 402 to solve parameterized queries (or functions). A parameterized query has table variables, not table constants, as inputs. If a function is called (through the Evaluation operation) in a query, its definition must be instantiated, and in this regard, the outer evaluation system 402 is the entity responsible for evaluating such instantiation. The DSet operation execution system 406, however, is responsible for the actual execution of the overarching query and only it can determine when a function is to be called and it signals the outer evaluation system to evaluate an instance of the function definition. This allows for a recursive evaluation of the function definition. Thus, the DSet operation execution system must signal the outer evaluation system to instantiate a function. The outer evaluation system 402 is shown in FIG. 5 in more detail. The outer evaluation system includes logic 502 to normalize the outer language expression; logic 504 to convert the normalized outer expression to a kernel version; logic 506 to normalize the kernel version; and logic 508 to convert the normalized kernel version to an “inner program.” The combination of logic 502-508 uses a multiple pass approach, in which the expression is continually processed in passes until a pass results in no more normalizations or conversions. Items within the parts list are marked and unmarked to indicate whether a certain normalization or conversion has occurred to improve the performance of the processing. The logic 502 to normalize the outer language expression processes the query to place the expression in a better form for conversion. The purpose of the normalization is to handle user “shorthands,” i.e., expressions that are convenient to specify but which have certain implied meaning that needs to be made explicit. More specifically, the normalization logic 502 ensures that all operations have properly defined input sets and if not it adds them. Additionally, logic 502 ensures that all “relator” operations (e.g., Less Than) have an associated type specified in the internal representation. This is done because the relator may have inputs of different explicit or implicit types, e.g., one being an integer and another being a floating point. The default relator type is assigned to that of the type of the “left” input, as connected in the user's query. The logic 502 also ensures that the various items in the query (i.e., input and output connectors, operators, etc.) have names and identification numbers (IDs) in sequence (e.g., 1. . . N with no gaps) to facilitate further processing. It also ensures that the parts lists includes information indicating the sort key ordering associated with a given DSet. This way the sort key ordering information is maintained for subsequent conversions and optimizations. The logic 504 creates a “kernel version” of the query which is a simplified form of the outer language. In short, the kernel version does not support constraints. Thus, any use or implication of constraints in the user query must be handled by insertion of the appropriate operations into the kernel version. Also, the kernel version uses only a subject of the operators supported by the full outer language and it also uses a few operations that are not available to the user. This is done to create a version of the program (i.e., the kernel version) that can be executed more efficiently, while allowing the user to express queries with more convenient, expressive or intuitive operations. The logic 504 detects whether a query has multiple table constants on an input connector of a relator operation and, in response, defines a set to include the table constants and converts the query to refer to the new set, rather than the table constants. This is performed by inserting an operation into the kernel program called Constants to Set. (see “Operators and Types” section) It ensures that a relator's input arguments are in a prescribed order. If one input is a scalar and the other is a column reference, then the column reference is placed first. If both inputs are column references, the column reference with a “lower address” (i.e., based on set type, set identifier, and column identifier, in that order) is placed first. If the inputs are swapped as a result of the above, the operation relator is converted accordingly, e.g., Less Than converted to Greater Than. The outer language allows user queries to use regular-expression pattern matching in expressing queries. To handle this, logic 504 also converts certain constraints involving regular-expression-pattern matching and the constraints' column references to an “intensional” regular-expression set and an Inner Join that joins the data to be matched with the set of all possible generated strings as expressed in the intensional form. This creates a state machine equivalent to the regular expression to programmatically describe a string of interest, and the state machine is implemented as a table, i.e., an intensional form for the string. Logic 504 also detects when the constraints used in a query refer to DPSets and in such cases injects into the kernel program a corresponding Select Column and Select Row operators having the DPSets as input. Any other operators having a DPSet as an input are converted so that a DSet is formed from the DPSet and so that the kernel operator refers to the DSet. Logic 504 also detects when constraint blocks in the outer language query imply Select Rows, Inner Joins, Inner Restricts, Theta Joins, Theta Restricts, or Concatenate Columns and in such cases it injects the corresponding operations into the kernel version. (The conversion logic here avoids the use of theta joins in cases where an inner join may be used.) For example, if an operation uses columns from different tables in the same input connector, logic 504 converts the operation to have columns from the same table by combining the prior two tables using an inserted Inner Join based on the equality constraints specified in the query for the two tables. Logic 504 also ensures that certain input ordering is maintained (e.g., that table constants come after variables), transforming the operator if necessary. Logic 504 also transforms nested disjunctions (i.e., ORs). More specifically, regarding the above paragraphs, the outer language allows queries to be created that have one or more constraints between (1) columns within a table, (2) columns of different tables, or (3) a column and a scalar value. These constraints imply row selection if they are within a table, or some kind of join (e.g., Inner or Theta) if they are between tables. To perform the above, logic 504 compares elements in the parts list with pre-programmed patterns (not to be confused with the patterns sent to client to describe how an operator block should be drawn). The recognition of such implied operating use conventional algorithms. Logic 504 also transforms function calls (i.e., Evaluate) and expands “macro” operations. The actual instantiation of a function call is not performed until the query is being executed by the internal engine (more below), at which time the function call is identified by a query name. Regarding macro expansion, one exemplary embodiment implements Aggregate-By-Group and Concatenate Strings as macros. In the Aggregate-By-Group example, the macro is transformed into corresponding kernel operators that select rows for each group of constraints on the Aggregate-By-Group operator; Cross Products the name for that group with the selection; Unions the named selections; and Aggregates-By-Key the union adding the group name as the first key column. In the Concatenate String example, the operator is expanded into a graph of Binary-Concatenate-String operators. Logic 504 also transforms constraint disjunctions on Select elements into a Union of the results of Select elements for each disjunct. For example, a Select having DPSet rows with two or more groups of constraints between column references and scalars is transformed into a Select having DPSet rows for just the first group of constraints, Select DPSet rows for the other groups of constraints and a Union of the outputs of these two Select row operators. As part of this group of conversions, an Aggregate-By-Key is converted into a graph of kernel operators that perform a keyed statistical aggregation operator for each statistical operator identified in the Aggregate-By-Key, and Unions the results. After Logic 504 is finished converting the normalized program, the logic 506 to normalize the kernel version of the outer language expression analyzes the “data flow” of the query to verify that each operation potentially has enough information to be executed. This is done to determine whether the query is legitimate from a data flow perspective. A new QRSet is created and organized according to the data flow dependence as suggested by the query. The new QRSet also has its identifiers and names normalized to facilitate further processing. After Logic 506 is finished, the logic 508 to convert the normalized kernel version to an “inner program” performs another set of optimizations and transformations to produce an inner program, or QRSet (this is not yet the set of operation primitives). Each operator in the outer program has at least one corresponding inner program operator. However, the operation assumptions between the outer and inner operations are not necessarily identical. For example, the Inner Join operator of the inner language assumes that its inputs are sorted, whereas the same operator in the outer language makes no such assumption. Consequently, the conversion logic 508 detects operations that do not have semantically equivalent inner forms and makes the necessary changes. In the example of Inner Join, this transformation would include the analysis to determine whether the inputs were necessarily sorted (e.g., because of a prior operation) and if the inputs were not necessarily sorted, the logic would insert the necessary sort operations into the QRSet. More specifically, logic 508 detects instances of Inner Join, Intersect, Relative Complement, Relative Complement By Key, Symmetric Difference, Union, and Substitute By Key, and analyzes the keys involved to determine if they are sort comparable. One embodiment, for example, uses two broad sort comparison types: numbers and strings. If the keys are not sort comparable then the conversion injects a Select Columns operation to one of the inputs so that the keys are sort comparable. Select Columns, like all other operations, can be used to perform a type conversion through appropriate specification of DSet inputs and outputs. Select Columns is preferred as an independent “injected” operation for this task as its implementation is fast. Some queries may use appropriate modification of other operations, rather than injection of an independent operation, but independent operations have an advantage of easy implementation. Logic 508 then analyzes the inner program to detect operators that correspond to primitive operators that require their inputs to be sorted and upon such detections inserts the appropriate sort operation according to the corresponding keys. More specifically the logic 508 detects instances of Inner Join, Intersect, Relative Complement, Symmetric Difference, Union, Group-And-Count, Sum over Groups by Key, Max, Min, Average, and Standard Deviation, Row Mode, Median, Count Unique Rows, Substitute By Key, and Relative Complement by Key and injects into the QRSet, before the operators themselves, the appropriate sort, corresponding to the keys in these operators. The sort takes all keys in key order as sort key inputs and then uses all other domains on the operator needing sorting as the non-sorted inputs to the sort by key operator. The outputs of the sort by key operator will go to the inputs of the questioned operator (such as sum over groups) both keyed and unkeyed as appropriate. Logic 508 detects and removes redundant Select Columns operations, i.e., selection operations that perform a selection already being done by a necessarily preceding section of the program. After the logic 508 is done the query is now represented as a QRSet. This inner language form, as outlined above, is then evaluated by the inner evaluation system 404 which, in turn, creates another expression of the query, the oper set. The inner evaluation system 404 is directly called by the outer evaluation system 402, as described with reference to FIG. 4. The inner evaluation system 404 is shown in FIG. 6 in more detail. Inner evaluation system 404 includes logic 602 to transfer the inner language expression to an optimized form; logic 604 which converts the optimized inner form to a set of primitive operations that may be executed by the server's internal engine (described below); and logic 606 that invokes DSet Operation Execution system 406 Logic 602 performs yet more optimizations on the query. These optimizations may alternatively be performed in the outer evaluation system 402. Logic 602 combines sorts. More specifically, it finds pairs of sort operators that sort the same input table such that the column sequences defining the sort orderings are equal up to the length of the shorter of the two column sequences defining the key orderings. Logic 602 then replaces these sorts by deleting the second sort and substituting, for the first sort, a Sort by Key that has the longer of the two column sequences and it includes all of the data columns present in either of the two sort operators. This sort subsumption is valid because the implementation of all operation primitives preserve the “sortedness” of data. Logic 602 also inserts a Select Column operation before every Sort operator and defines the Select Column operation so that it selects only as many columns from the table as needed for the sort key and output columns. This avoids copying of unneeded data within the sort implementation, described in a later section. Logic 602, analogously to logic 508, detects and removes redundant Select Columns operations. Logic 602 also normalizes the identifiers and names of the inner language expression. Logic 602 then performs global optimization of the query by using tables already available in the workspace, i.e., cached results. If the “intension” for a table in the workspace does all or part of the work needed by a portion of the query being evaluated, then that portion of the query is removed and the parts of the query that relied on the output of the removed portion are changed to use the pre-existing table. One embodiment determines that a workspace table may be used by looking for identical intensions between the query being optimized and prior queries. That is, the logic compares the stored intension of a table (i.e., a QRSet) with portions of the query being evaluated. Alternatively, the logic may incorporate algorithms to detect semantic equivalence of intensional forms. These algorithms may consider associativity, commutivity, transitivity, and other properties in detecting equivalence. Also the optimization may look for tables that satisfy portions of the query but which may not be as restrictive as sought. For example, a query being evaluated may have a set membership restriction asking for “all males in Wichita, Kansas.” The most restrictive intension that would satisfy this would be a table having an intension identical to or semantically equivalent to “all males in Wichita, Kansas.” However, other forms may be useful. In particular existing tables with less restrictive intensions may be used beneficially. Of these less restrictive forms, the most restrictive of them would fit best and could be used as a starting point, in which other operations are added to yield the intension sought. That is, the most restrictive of the less restrictive forms could be used as a starting point and be substituted into the query and operations may be injected to complete the intension, i.e., to further restrict the substituted form into the form sought. For example, a table may exist having “all males in Kansas.” This table may be used (provided appropriate other data exists) in the expression and further restricted. Finding all males in Wichita from this table would be less costly than finding all males in Wichita Kansas from the original data sources. The optimization logic finds such tables and uses them and inserts the appropriate subsequent restrictions. Under one embodiment, logic 602 also selects an appropriate inner language operation depending on the context. As stated above, each outer language operation corresponds to at least one inner language operation. Multiple inner language operations are used because some operation implementations may be better suited to a particular context. A given “sort” for example may be the best choice for large sets but not for small ones. Consequently, logic 602 selects a context sensitive theorem and considers, among other things, the size of the sets, the size of the sets relative to the size of memory buffers, and the size of the operands, relative to one another, in selecting the appropriate inner language operation. Another embodiment considers the frequency of query interaction. A Hash Join, for example, provides good performance on a single use because among other things it does not require presorted input data. However, if the operation is to be repeated, an alternative join (with the injected overhead of sorting data) will be preferable. That is, the multiple uses will offset the cost of injecting an appropriate sort. Logic 604 then copies the inner language program to form a set of operation primitives to be executed. This process includes adding control structures to each operation in the primitive operation set to facilitate the control thereof according to a data flow scheduling algorithm. This form is the oper set, i.e., a sequence of opers. Each oper is a control structure for each operation in the inner language program. All opers reference the inner language program so that updates to the inputs and outputs can be made so that the DSet operation execution system 406 can perform data flow scheduling. After the oper set is formed, the logic 606 receives the oper set and invokes the DSet operation execution system 406, as the operators become “ready” to execute. In a preferred embodiment, “ready” means from a data flow scheduling perspective of which the inputs are valid. This logic 606 invokes the DSet system 406 to schedule the primitives for execution according to a data flow scheduling algorithm, in which an operation is “fired” when all of its necessary inputs are detected as being “ready”. Inputs are ready when they exist in extensional form in the workspace. Preferably, a given primitive operation is “fired” to execute as its own execution thread on the server, thus increasing the execution parallelism further. The scheduling of opers within an oper set are implemented with a separate event queue. This event queue has specific logic to handle the control structures associated with an oper and to detect when an oper is ready to be executed. The DSet operation execution system 406 is shown in more detail in FIG. 7. The DSet operation execution system 406 includes set up logic 702; internal engine 704; workspace interaction logic 706; depictor system 708; RShip construction logic 710; type access system 712; and memory utilities 714. The set up logic 702 ensures that the DSets involved are ready, i.e., with open files. Under one embodiment this logic will determine whether the input DSets exist in extensional form and if not will cause them to be so. Another embodiment however performs the above just before global optimization is performed by inserting the appropriate operation blocks before the blocks requesting the DSets. The set up logic 702 cooperates with the outer evaluation system 402, as outlined above. In particular, the set up logic 702 detects the existence of Evaluate opers and sends a solve event to the outer evaluation system 402 so that it may evaluate the instantiations of the corresponding query. In response to such an event from the DSet operation execution system 406 the outer evaluation system 402 will instantiate and submit it to full outer and inner language evaluation, as necessary. If a QRSet exists, that will be the starting point of function instantiation. The set up logic 702 is also responsible for re-expressing a given oper from an operation with input and output DSets to a primitive operation that operates in conjunction with a corresponding RShip and in which the data is in XSet form. RShips are used to control all data access and data storing in result sets. Under a preferred embodiment they are also used to convert input data (as needed) from one type to output data of another type; that is, conversion during transfer of elements. Under a preferred embodiment they are also used to convert data in relator operations, both in a comparative sense and in an arithmetic sense; for example, when relating a floating point an integer. (The types are identified by the input and output DSets.) The RShip will abstract the algorithm (for the most part) from the data types of the data involved. More specifically, the set up logic 702 invokes the depictor logic 708 to initiate the construction of an RShip for a corresponding oper. The depictor logic 708 analyzes the Depictors for input and output DSets corresponding to the oper and also analyzes the oper to determine whether it is for a relator and constructs the corresponding RShip structure to map the data conversions involved with data transfer and/or comparison aspects involved with the operation. An operation may require more than one RShip for its execution. For instance, the Add operator has an RShip that describes the domain relationship between two operands and another RShip for transferring the results. Also, an inner join, for example, involves both data transfer and comparison operations. Persons skilled in the art will appreciate from reviewing the “Operators and Types” section that the number of RShips is operation dependent as each has its own inherent number of transfer and relator sub-operations. The RShip, in addition to containing mapping information, will contain corresponding control structures involved with the conversion. For example, the RShip may contain high-level control logic for iterating over the domains involved. The RShip structure thus has the mapping information and control logic. It relies on type access logic 712 to perform the actual conversions of data. For example, a select may have an input of a first type and an output of a second type. The RShip structure in such case will construct n-tuples indicating the corresponding mapping. Moreover, the operation involved may be a relator operation such as Equal To and may involve inputs of disparate types. The RShip in such case, will map the appropriate conversions needed for the comparison operation, as outlined above. Under one embodiment, loop unfolding techniques may be used to pre-load RShips and delimeters. The set up logic 702 also allocates buffers as necessary for intermediate results. The engine 704 includes oper algorithm logic for each of the inner language operations. The implementations follow standard expressions of the algorithms (e.g., by Knuth) but are preferably type-less, avoid conditional execution, and are maximally abstracted from the data. Preferably the algorithms use a single pass over the data. Some algorithms, as is known, require multiple passes, e.g., sort. The algorithms are implemented to tell a corresponding RShip to compare and transfer data as needed by the operation. In some instances the data will be transferred to a buffer so that it may be further manipulated by the algorithm logic. In other instances, the algorithm logic will not need to do any further manipulations (e.g., Inner Join and Select). In short, the algorithms are the higher level controls to transfer and/or compare and at times to perform some further manipulation. The actual transfer, comparison, and conversion are abstracted and performed by the RShip and thus the algorithms are made type-less where the operation permits. (For example, some string manipulation operations will need to actually manipulate the data, not just instruct an RShip to transfer and compare, and inherently convert, it.) The set handling engine 704 includes logic allowing multi-threaded access to files. This logic is included because the operations are handled by multiple threads. Some operating systems do not permit transparent multiple access to a file from different places in multiple threads. To address this, logic references Xset files and includes access counters to interface file access. The multiple threads access the engine's interface logic rather than the underlying file system to see if files are open and to cause the corresponding file operations. (Mutex controls are used to maintain coherency of the interface logic.) The engine memory utilities are used for accessing and allocating memory. For example, they may be used to allocate contiguous physical chunks of memory. The buffer allocation is mapped to table rows and the services may be used to access the desired row of a table, while hiding the mapping details. Other memory utilities (lower level) are preferably used to abstract type conversions, such as endian conversions for floating point data. The workspace logic 708, cooperates with the workspace system, and is used both in allocation and committal of DSets. When an operation is being executed, the logic needs to allocate DSets for outputs. The workspace logic 708 will make such requests to the workspace system. When an operation has finished execution, thus defining the data for the corresponding output DSet, it is “committed” to the workspace indicating it is valid. At this point it may be used for viewing and/or global optimizations, and as inputs to operations, among others. This section described the operators and types of a preferred embodiment. Persons skilled in the art will appreciate that the set of operators and types may be modified significantly without departing from the scope of the invention. The data types for both the outer and also the inner programming languages include Int8; Int16; Int32; Int64; Uint8; Uint16; Uint32; Uint64; FloatS (32-bit floating point number); FloatB (64-bit floating point number); Float precision (64-bit floating point with specified precision) StrFA (common string type); StrXA (DPSet string type for “delimited” strings); Byte (basic string type used to implement both StrFA and also StrXA); Time; Date; and DateTime. The operators defined for the outer language are described below. The “non-kernel” operators are “macro” operators that are converted to program fragments built out of kernel operators. The non-kernel constraints are replaced by a combination of kernel operators and modifications of existing portions of the query program. Some of the non-client-visible kernel operators are used by the server to implement some of the non-kernel operators and constraints (e.g. Binary Concatenate Strings is used to implement Concatenate Strings, Evaluate is used to implement Query, Generate Strings from Regular Expression is used with Inner Equijoin to implement the Regular Expression Match constraints). 1. Equal To (constraint, non-kernel) 1. equal_to(In1, In2) Constrain any use of tables elsewhere in the program, containing the equal_to constraint operator, where those tables are referred to by In1 or In2 items, to be references to the corresponding columns of the table that is the inner equi-join of the In1 and In2 tables with join keys of In1 and In2 if In1 and In2 are from different tables, or the select-rows of the table In1 and In2 such that the corresponding columns of In1 and In2 are equal if In1 and In2 are from the same table. 2. Greater Than Or Equal To (constraint, non-kernel) 1. greater_than_or_equal_to(In1, In2) Same definition as the greater_than constraint operator, except using the greater_than_or_equal_to relator instead of the greater_than relator. 3. Greater Than (constraint, non-kernel) 1. greater_than(In1, In2) Constrain any use of tables elsewhere in the program, containing the greater_than constraint operator, where those tables are referred to by In1 or In2 items, to be references to the corresponding columns of the table that is the theta join of the In1 and In2 tables with theta join constraint of In1 greater_than In2 if In1 and In2 are from different tables, or the select-rows of the table of In1 and in2 such that In1 greater_than In2 if In1 and In2 are from the same table. 4. Less Than (constraint, non-kernel) 1. less_than(In1, In2) Same definition as the greater_than constraint operator, except using the less_than relator instead of the greater_than relator. 5. Less Than Or Equal To (constraint, non-kernel) 1. less_than_or_equal_to(In1, In2) Same definition as the greater_than constraint operator, except using the less_than_or_equal_to relator instead of the greater_than relator. 6. Not Equal To (constraint, non-kernel) 1. not_equal_to(In1, In2) Same definition as the greater_than constraint operator, except using the not_equal_to relator instead of the greater_than relator. 7. Regular Expression Match, Right (constraint, non-kernel) 1. regexp_right(Data, Pattern). Same definition as equal_to, but instead of “the inner equi-join of the In1 and In2 tables with join keys of In1 and In2” this is the inner equi-join restriction of the data table and the single column of the output GenStrings table of “generate_strings_regexp(Pattern)=>GenStrings”: inner_equijoin(Data, Data, GenStrings, [])=>RestrictedData. 8. Regular Expression Match, Left (constraint, non-kernel) 1. regexp_left(Pattern, Data). Same definition as Right Regular Expression Match, with the order of the operands reversed. Bi. 1. Absolute Value 1. abs(Input)=>Output. Each cell of Output contains the absolute value of a corresponding cell in Input. 2. Accept 1. accept(In1, In2)=>Output. If In1 is “void” then Output is derived from In2. If In2 is “void” then Output is derived from In1. If In1 and In2 are both non-void, then Output is union(In, In2).1 3. Add 1. add(In1, In2)=>Output If In1 is a scalar S, then each cell of Output is the S plus the corresponding cell of In2. If ln2 is a scalar S, then each cell of Output is the S plus the corresponding cell of In1. If In1 and In2 are both tables (non-scalars), then each cell of Output is the corresponding cell of In1 plus the corresponding cell of In2. 4. Average 1. avg(Input, Key)=>Output Output has the same number of columns as Input. If Key is empty, then Output has one row where each cell of the row is the average value of the cells for the corresponding column of Input. If Key is not empty, then the rows of Input are grouped according to Key and Output has one row for each key group where each cell of a row is the average value of the corresponding group of cells for the corresponding column of Input. 5. Compare 1. compare(Left, Relator, Right)=>Output Left/Relator/Right are a connector triple that defines a conjunction of constraints. Either one of Left and Right contains a scalar value and the other one a column reference, or else both Left and Right contain column references and the columns are in the same table. Left and Right column references imply an input table. Output contains one column. Output contains the same number of rows as the implied input table of Left and Right. Each cell in Output contains 1 if the conjunction of Left/Relator/Right is true for the corresponding row of the input table, otherwise it is 0. 6. Concatenate Columns 1. concatcol(Input)=>Output Input contains two or more column reference items, not necessarily from the same table. Output has the same number of columns as the items in Input. Output has the same number of rows as the smallest of the input tables associated with the items of Input. Each cell in a row of Output is copied from the cell of the corresponding Input column reference. 7. Constants To Set 1. constset(Input)=>Output Input contains one or more scalar items. Output contains one column. Output contains one row for each item in Input. Each cell of Output is the value of the corresponding item from Input. 8. Convert To Lower 1. cvrtlower(Input)=>Output Input contains one or more column references, all from the same table. Output contains one column for each item of Input. Output contains one row for each row of the input table. Each cell of Output contains the lower case representation of the string representation of the corresponding input column and row cell's value. 9. Convert To Proper 1. cvrtproper(Input)=>Output Same as cvrtlower, but “proper case” instead of lower case. 10. Convert To Upper 1. cvrtupper(Input)=>Output Same as cvrtlower, but “upper case” instead of lower case. 11. Correlation 1. correlation(In1, In2)=>Output In1 has one column reference. ln2 has one column reference. If In1 and In2 are different tables then they are “coerced” to a single table (by simulating a concatenate columns of the two tables). Output contains three columns: Pearson's correlation coefficient, the confidence level, and Fisher's Z. Output contains one row with the three columns calculated from the two input columns. The design of this may be changed to be a single input connector: correlation(Input)=>Output Input has two column references. . . the rest is the same as above. 12. Count Rows 1. count(Input)=>Output Input contains a column reference. Output contains one column. Output contains one row. The cell of Output is the count of the number of rows in column referred to by the item of Input. 13. Count Unique Rows 1. countunique(Input)=>Output Input contains a column reference. Output contains one column. Output contains one row. The cell of Output is the count of the number of unique values in the column referred to by the item of Input. 14. Cross Product 1. crossprod(In1, In2)=>Output In1 and In2 contain one or more column references. Output contains one column for each item in In1 and In2. Let Ni be the cardinality of the table of In1, and N2 be the cardinality of the table of In2. Output contains one N1*N2 rows. The rows of Output are all possible combinations of rows of the two input tables, with only the columns identified in In1 and In2 and ordered and typed as specified in the Output definition. 15. Divide 1. divide(In1, In2)=>Output Same semantics as Add, except the “divide” scalar operation is used instead of “plus”. 16. Extract Substring 1. extractstr(Data, Start, Length)=>Output Data, Start, and Length must all have the same number of items, all of which are column references. Start and Length must have 1 row each. Output has the same number of columns as Data. Output has the same number of rows as Data. Each cell in Output is the substring of the corresponding cell of Data, starting at the position given by the value of the corresponding cell of Start, and having the length given by the value of the corresponding cell of Length. The single row of Start and Length is re-used for each row of Data. 17. Group And Count 1. groupcount(Data, Key)=>Output Data has one or more column references. Key has zero or more column references from the same table as Data's column references. Output has the same number of columns as Data plus one “count” column. Output has the same number of rows as there are groups in Data as defined by Key. Each row corresponds to one such group. Each row has the corresponding values from a row of the group for the columns of Data, plus the count of rows in Data for that group. An empty Key defines the whole table to be a single group. 18. Inner Join 1. inner_equijoin(InA, KeyA, KeyB, InB)=>Output InA has zero or more column references. KeyA has one or more column references from the same table as InA's column references. InB has zero or more column references. KeyB has one or more column references from the same table as InB's column references. There must be at least one column reference in either InA or InB. Output has the same number of columns as InA plus InB. Output has the one row for each combination of rows from InA and InB such that KeyA equals KeyB. The cells in a row of Output have the same values as the corresponding cells in InA and InB. 19. Input (program structure) 1. input(Ordinal, Name)=>Output Ordinal is a scalar integer greater than 0. Let S be the multiset of all of the ordinals of the input operators in a program: min(S)=1 and max(S)=cardinality(S). Name is a scalar string “naming” the input parameter defined by this operator. Output has one parameter item or one or more column references to table constants. The parameter item may be origin of other parameter items in the program, and these other parameter items may be used in place of a column reference or scalar item. If a parameter item is used, then the containing program is a program definition that must be instantiated before it can be evaluated. The instantiation process replaces all input-derived parameter items with either column reference or scalar items, depending on the argument items provided by the process invoking the instantiation. 20. Intersection 1. intersection(InA, InB)=>Output InA has one or more column references. InB has the same number of column references as InA. Output has the same number of columns as InA. Output has the one row for each combination of rows from InA and InB such that InA equals InB. The cells in a row of Output have the same values as the corresponding cells in InA. 21. Keyed Relative Complement 1. keyed_relcomp(InA, KeyA, KeyB)=>Output InA has one or more column references. KeyA has one or more column references to InA's table. KeyB has the same number of column references as KeyA. Output has the same number of columns as InA. Output has the one row for each of row from InA such that there does not exist a row of the table for KeyB where KeyA equals KeyB. The cells in a row of Output have the same values as the corresponding cells in InA. 22. Length 1. lengthstr(Input)=>Output Input has one or more column references. Output has the same number of columns as Input. Output has the same number of rows as Input. Each cell of Output is the length of the string representation of the corresponding Input cell's value. 23. Maximum 1. max(In1, In2)=>Output Same definition as the Add operator except the cell of Output is calculated using max instead of plus. 24. Maximum Row 1. maxrow(Input, Key)=>Output Output has the same number of columns as Input. Output has one row per group defined by Key that is the maximum row in that group of rows in Input table according to the sort order specified by the column references in Input. If Key is empty, then the entire table is considered a single group. 25. Median Row 1. medrow(Input, Key)=>Output Same definition as Maximum Row, except the row aggregate operator is “median” instead of “maximum”. 26. Minimum 1. min(In1, In2)=>Output Same definition as the Add operator except the cell of Output is calculated using min instead of plus. 27. Minimum Row 1. minrow(Input, Key)=>Output Same definition as Maximum Row, except the row aggregate operator is “minimum” instead of “maximum”. 28. Mode Row 1. moderow(Input, Key)=>Output Same definition as Maximum Row, except the row aggregate operator is “mode” instead of “maximum”. 29. Modulus 1. mod(In1, In2)=>Output. Same semantics as Add, except the “modulus” scalar operation is used instead of “plus”. 30. Multiply 1. multiply(In1, In2)=>Output Same semantics as Add, except the “multiply” scalar operation is used instead of “plus”. 31. Negate 1. negate(Input)=>Output. Same semantics as Absolute Value, except the “negate” scalar operation is used instead of “absolute value”. 32. Output (program structure) 1. output(Ordinal, Input)=>Output Ordinal is a scalar integer greater than 0. Let S be the multiset of all of the ordinals of the input operators in a program: min(S)=1 and max(S)=cardinality(S). Input is one or more items. In a function instantiation, these items must all be column references. In a function definition, these items may be a mixture of column references and parameter items. Output has the same number of items as Input. The Output table has the same number of rows as the Input table. Each cell in a row of the Output table has the same value as the corresponding cell in the Input table. Thus, the only differences between the Input and Output tables are the column order, column names, column data types, and table names. 33. Position 1. position(Source, Search)=>Output Source contains one or more items. Search contains the same number of items as Source. If all of the items of Source and Search are column references, and they are from different tables, then an implicit concatenate columns is performed. Output has the same number of columns as Source. Output has the same number of rows as the Source/Search table. Each cell's value is the index of the string representation of the corresponding Search cell's value in the string representation of the corresponding Source cell's value. If the Search cell's value is not a substring of the Source cell's value, then the index is 0. If all of the items of Source are scalar, then Search must contain column references. Output has the same number of rows and columns as Search. The cells of Output are calculated as above, but the single scalar row of Source is reused for each Search row. If all of the items of Search are scalar, then Source must contain column references. Output has the same number of rows and columns as Source. The cells of Output are calculated as above, but the single scalar row of Search is reused for each Source row. 34. Rates 1. rates(In1, In2)=>Output In1 has one or more column references. ln2 has the same number of column references as In1. If In1 and In2 are from different tables then the “effective input” table is the concatenate columns of In1 and In2. Output has the same number of columns as In1. Output has the same number of rows as the “effective input” table, minus 1. Each cell's value Yk of a row k is calculated from the corresponding cell's values of rows k and k+1 (A1 and A2 from In1, and B1 and B2 from In2) of the input table: Yk=(A2-A1)/(B2-B1). 35. Relative Complement 1. relcomp(InA, InB)=>Output InA has one or more column references. InB has the same number of column references as InA. Output has the same number of columns as InA. Output has the one row for each of row from InA such that there does not exist a row of the table for InB where InA equals InB. The cells in a row of Output have the same values as the corresponding cells in InA. See also Keyed Relative Complement. 36. Sample Data 1. sample(Data, Size, Start, Step)=>Output Data has one or more column references. Size, Start, and Step each have one scalar item. Output has the same number of columns as Data. Output has rows selected from Data based on the values in Size, Start, and Step. Size can be specified as derived from the Start and Step values, as a percentage of the number of rows in Data, or as “as many as possible up to” a specified maximum value. Start can be specified as either to be picked randomly or using a given row index (a negative index counts backward from the end of Data). The Step value can be specified as either: calculated base on the Size and Start values, to be picked randomly, or else using a specified step value (a negative step value steps from the end of Data back toward the beginning). 37. Select Columns 1. select_columns(Input)=>Output Input has one or more column references. Output has the same number of columns as Input has items. Output's result table has the same number of rows as the table identified by Input's column references. Each row in Output is based on the corresponding row of the Input table. Each cell's value in Output's table is the (converted if necessary) value of the corresponding cell in Input's table. 38. Select Rows 1. select_rows(Data, Left, Relator, Right)=>Output Data is one or more column references. Left, Relator, and Right are a triple of connectors that define selection constraints. Left and Right have column references or scalar items. The column references must be to the same table as the column references of Data. Relator has only scalar items that specify comparisons (<, >, =, <=, >=, !=). Left, Relator, and Right must have the same number of items in the kernel outer language. They may have differing numbers of items in the full outer language if “open” and “close” markers are used to define “nested disjunctions”. For instance, (A=B and C<D) is represented in Left/Relator/Right form as: Left [A,C], Relator =[=,<], and Right =[B,D]. A “nested disjunction” of (A=(B or E) and C<D) (which is interpreted as ((A=B or A=E) and C<D)) is represented in Left/Relator/Right form as: Left =[A,C], Relator=[=,<], Right=[open,B,E,close,D]. Output has the same number of columns as Data. Output has one row for every row in Data that satisfies the constraints of Left/Relator/Right. 39. Sort All Ascending 1. sortasc(Input)=>Output Input has one or more column references. Output has the same number of columns as Input has items. Output's table has the same number of rows as Input's table. Each row of Output's table is derived from the corresponding row of the sorted version of Input's table, in the same fashion as for the Select Columns operator. The sorted version of Input's table is created by sorting the table in ascending order on each of the columns of Input, with the columns have “sort precedence” in the order they appear in Input. 40. Sort All Descending 1. sortdsc(Input)=>Output Same definition as Sort All Ascending, except the sorted version of Input's table is created using a descending sort on each column instead of an ascending sort. 41. Sort By Key Ascending 1. sortasckey(Input, Key)=>Output Key has zero or more column references from the same table as Input. Same definition as Sort All Ascending, except if Key has one or more items in which case the sorted version of Input's table is created using the columns referenced by Key to define the sort order instead of the columns referenced by Input. 42. Sort By Key Descending 1. sortdsckey(Input, Key)=>Output Same definition as Sort By Key Ascending, except the sorted version of Input's table is created using a descending sort on each column instead of an ascending sort. 43. Soundex Match, Right (proposed, constraint, non-kernel) 1. soundex_right(Data, Pattern). Same definition as Right Regular Expression Match, but using the generate_strings_soundex operator instead of the generate_strings_regexp operator. 44. Soundex Match, Left (proposed, constraint, non-kernel) 1. soundex_right(Data, Pattern). Same definition as Right Soundex Match, but with the operands reversed. 45. Standard Deviation 1. stddev(Input, Key)=>Output Same semantics as Average, except the “standard deviation” scalar operation is used instead of “average”. 46. Substitute 1. substitute(InA, KeyA, KeyB, InB)=>Output InA has one or more column references. KeyA has one or more column references. InB has the same number of column references as InA. KeyB has the same number of column references as KeyA. Output's table has the same number of columns as InA has items. Output's table has the same number of rows as InA's table. Each row of Output's table has values from the corresponding row of the processed version of InA's table, in the same manner as is done for Select Columns. The processed version of InA's table has one row for each row of InA's table. For a given row of InA, if there is a row of InB's table such that KeyB equals KeyA, then the processed row of InA takes the values of the (first) matching InB row. If there is no matching row of InB, then the processed row of InA takes the values of the original InA. 47. Subtract 1. subtract(In1, In2)=>Output Same semantics as Add, except the “subtract” scalar operation is used instead of “plus”. 48. Subtract Substring 1. subtractstr(Source, Search)=>Output Same definition as Position, except each Output cell value is the string representation of Source minus the first occurrence of the string representation of Search. 49. Sum 1. sum(Input, Key)=>Output Same semantics as Average, except the “sum” scalar operation is used instead of “average”. 50. Switch (program structure) 1. switch(Control, Data)=>[Out1, Out2, . . . , OutK] Control has one column reference. Data has one or more column references. Only Out1 and Out2 are defined in the non-kernel/client-visible use of this operator. All Outi have the same number of column definitions as Data has column references. If there is a cell value convertible to integer N in the Control column, then OutN's table is defined the same as a select_columns(Data)=>OutN. If there is a cell value convertible to integer 0 in the Control column, then this is interpreted the same as an integer of K (i.e. the last Out connector). For all J such that there is no cell value convertible to it (according to the above, including the special handling of 0), OutJ's table is the special value “void”. The void table has no columns or rows. 51. Symmetric Difference 1. symdiff(In1, In2)=>Output In1 and In2 must have only column references and must have the same number of them. Output has the same number of column definitions as In1 has column references. Output's table is “select_columns(SymDiff)=>Output” where SymDiff is the symmetric difference table of In1's table and In2's table. The symmetric difference table of In1's table and In2's table contains one row for each row of In1 that is not in In2 where the symmetric difference table's row is a copy of the In1 table's row, and similarly one row for each row of In2 that is not in In1. See also Relative Complement. 52. Theta Join 1. inner_thetajoin(InA, InB, Left, Relator, Right)=>Output InA has zero or more column references. InB has zero or more column references. Left, Relator, and Right have the same structure and interpretation as in Select Rows, with the additional restriction that Left has only column references from InA's table and Right has only column references from InB's table. There must be at least one column reference in either InA or InB. Output has the same number of columns as InA plus InB. Output has the one row for each combination of rows from InA and InB such that the constraints of the Left/Relator/Right connectors are satisfied. The cells in a row of Output have the same values as the corresponding cells in InA and InB, converted as necessary if the corresponding columns have different data types. 53. Union 1. union(InA, InB)=>Output InA has one or more column references. InB has the same number of column references as InA. Output has the same number of columns as InA. Output's table has the one row for each row from InA's table and each row from InB's table. The rows of Output's table have the same relative ordering as the rows of InA's and InB's tables, sorted by the “keys” defined by InA and InB items, respectively. 1. Binary Concatenate Strings (non-client) 1. concatstr(In1, In2)=>Output In1 and In2 have a single item each. If they are both column references, they must be from the same table. Output has one column. Output has one row for each row in the input table. Each cell is the concatenation of the string representations of the two corresponding input values. 2. Evaluate (program structure, non-client) 1. evaluate(FunctionName, In1, . . . , Inj)=>[Out1, . . . , OutK] FunctionName is a scalar item. The interpretation of Ini and Outi are dependent on the definition of the function named FunctionName in the same workspace as the query containing this operator. A function definition is an outer language program with any number of input and output parameter operators. Each input parameter operator defines an input connector: if the input parameter operator's ordinal input is X, then it maps to the X'th connector of a query <FunctionName>operator. Each output parameter operator defines an output connector: if the output parameter operator's ordinal input is Y, then it maps to the Y'th output connector. The relationship between Ini and Outi connectors, whether items on one require items on the other or whether there are “standard” column references that always appear on one or more Outi connectors, all depends on the definition of FunctionName. 3. Generate Strings from Regular Expression (non-client) 1. generate-strings-regexp(Pattern)=>Output Pattern is one or more scalar items. Output's table is an intensional table of one column. Output's table has many rows as there are strings that can be “generated” from the regular expression given on the Pattern connector: a string is generated from a regular expression R if that R matches that string under the “regular expression matching” algorithm. Since there may be infinitely many strings that could match a given regular expression, Output's table cannot (in general) have an explicit “extensional” representation. For an intensional table only a few operations may be defined. One of these is always “is_member(X)”, where the intensional table “system” can always answer yes or no to such a question for a particular intensional table. This mechanism is currently used (through the RShip system) to implement inner-join restriction of a “normal” extensional table against an intensional table to produce a new extensional table. B1. The system and method just described allows: 1. Scalability through composition: the preferred embodiments use theorembased compositions of sets into tables and as a result sequences of sets may be composed into tables which are much larger than can be effectively handled by small operating system file systems. 2. Set-Theoretic Programming Language: a query in the preferred embodiments is a form of set language program. The query language is diagrammatic, supports parameterized queries, recursive functions, and decision arbitration components. 3. Parallel Query Evaluation: the preferred embodiments schedule evaluation and solving based upon operation input readiness. 4. Second Order Logic Theorem Proving: a preferred embodiments accomplish a second order logic theorem proving system. This includes theorems for translating from a high level form into a low level form, theorems that recognize and properly set up the low level executable form, theorems that optimize sequences of instruction to ensure proper preparation prior to execution of certain types of instructions and to remove redundant instructions and perform local optimizations based on set-theoretic identities, and theorems for global optimization, such as identifying cache results that may be used for a current query. 5. Adaptive Physical Design: the extensional form of sets forms the physical “building blocks” of the data base. As the extensional forms are added or deleted from the database through the use of the system, the physical design of the database changes. These changes reflect optimizations for disc space and set or structure utilization. 6. All types or relational types: the architecture supports virtually all types as relational types, even pictures, sounds, and tables. This means that these complex or non-traditional types can be used as keys in relational operations such as various selection operations. 7. Composition and Decomposition of Types: types may be composed and decomposed to create new types or break up domains or compose domains within tables and between tables. For instance, a date may be decomposed into three integers, and likewise, three integers may be composed into a date. A name may be decomposed into three name part strings and three strings may be composed into a name. 8. All aspects of the server may be utilized in queries: for instance, a user may query the system concerning the current set of active clients, number of sets which are greater than three million records, or how many sets have been created within the last three weeks. Most important, queries may be used to question the system about the form of the database as it exists, the domains and sets present, and the relation of names, types and size of sets as a match for possible operations. The results of these query functions may be used to guide query execution, to post to the user such things as consistency and normalization information about tables and functional dependency information and possible join opportunities between tables and with end tables. 9. Peer-client type and server architecture: each serve may be a client to another server allowing databases to be shared among different machines and to exist on multiple machines. 10. Database composition: this allows users to create databases and then share the results of analysis and optimization with other databases. The sharing occurs through inheritance. The sets that exist in a “super” database are available to all databases that are derived from the super database. 11. Programming Language. Each operator and function call includes table and column definitions for each of its output sets, eliminating the need for separate from the query schema definitions processing or storage; i.e., eliminating the need to maintain and work with schema definitions. It will be apparent from the following description that alternative arrangements may be easily employed and that they should be considered within the scope of the invention. For example, a multi-tiered approach may be used in which the server logic is divided for execution on multiple, hierarchically-arranged servers. For example, server 104 may be implemented on multiple computer nodes to improve performance, distribute processing, improve fault tolerance, or the like. Skilled artisans will appreciate, upon reading the disclosure, that alternative data arrangements may be substituted.
https://patents.google.com/patent/US6327587B1/en
CC-MAIN-2018-34
refinedweb
14,575
52.9
I am trying to make a phone game and I need to split the screen in 4 sections by drawing the diagonals oof the screen. I looked over every tutorial on this site about drawing lines using LineRenderer and so far, that's the only way that I can use to draw a line wider than 1 pixel (I need it to be 3 pixels wide). The main problem is: I can only make the diagonal between the top-right corner and the bottom-left one show up when I build the app. If i run the game on my computer, through UnityRemote on my phone, both of the diagonals show up, but if I build it, only one gets drawn. This is the code I am using to draw the diagonal that is working: using UnityEngine; using System.Collections; public class Lines1 : MonoBehaviour { private LineRenderer line; public Material material; // Use this for initialization void Start () { line = new GameObject("Line").AddComponent<LineRenderer>(); line.material = material; line.SetVertexCount(2); line.SetPosition(0, new Vector3(Screen.width, Screen.height)); line.SetPosition(1, new Vector3(0, 0)); line.SetWidth(3, 3); line.useWorldSpace = true; } // Update is called once per frame void Update () { } } Since I can't draw 2 lines with one LineRenderer, I created 2 objects, each one with a LineRenderer and 2 scripts, one for each line, to draw them. The only difference between the scripts are the lines where I set the position of the start point and the end point of the line. For example, in my 2nd script, I have line.SetPosition(0, new Vector3(Screen.width,0)); line.SetPosition(1, new Vector3(0, Screen,height)); I will attach 2 photos of the game, with both of the scripts running, both on my computer and on my phone, after I build it. This is how the game looks when I run it on my computer: This is how the game looks on my phone, after I build the app (ignore the placement of the sprites and that text in the middle of the screen...they're just a few things I will take care of after I get over this problem): I thought about using other methods, like GL.Begin(), but I am not too familiar with that, so it would be perfect if I can do everything with LineRenderers Maybe it's a problem with the normal of the invisible line? Anyway, another option is to use the Drawing.cs available on the User wiki. Answer by Hybrid-Dragon · Jul 24, 2016 at 08:43 AM Hello, First, your second line's script should be identical to the first line's but with either Screen.width or Screen.height as a negative (just simply have a - precede the one you want to flip). Second, you can have two lines in the same script. Just use another private variable for the second line and, optionally, a second public material for the line. After that, copy the first line's script and paste it just after with the new name for the second line, as different items referenced in scripts can't have the same name. Hello! Thanks for replying. I tried your solution, but with no success...I've tried writing all the code for the lines in one script before, and I had the same result, but I tried it again, and here's how it look now: using UnityEngine; using System.Collections; using System.Linq; public class lines2 : MonoBehaviour { private LineRenderer line; private LineRenderer line2; public Material material; // Use this for initialization void Start() { //this is the line that I can't see when I build the app line2 = new GameObject("Line2").AddComponent<LineRenderer>(); line2.material = material; line2.SetVertexCount(2); line2.SetPosition(0, new Vector3(Screen.width, 0)); line2.SetPosition(1, new Vector3(0, Screen.height)); line2.SetWidth(3, 3); line2.useWorldSpace = true; line2.SetColors(Color.black, Color.black); ///this is the line that shows line = new GameObject("Line").AddComponent<LineRenderer>(); line.material = material; line.SetVertexCount(2); line.SetPosition(0, new Vector3(Screen.width,Screen.height)); line.SetPosition(1, new Vector3(0, 0)); line.SetWidth(3, 3); line.useWorldSpace = true; line.SetColors(Color.black,Color.black); } // Update is called once per frame void Update () { } } The problem I had with putting a minus sign ("-") before any Screen.height or Screen.width parameter is that it just makes the line pop out of the frame. I can see it in the scene view, but not in game view. I don't think the problem is linked to the position of the line's ends because I tried setting some random start and end points for the line that doesn't work, so I can see that the LineRenderer does it's job, and it did. I think the problem is with those 2 corners in particular, and I have no idea how that can happen. Answer by AceOneFlow · Jul 31, 2016 at 05:35 PM I have solved the problem. I couldn't draw 2 actual lines using LineRenderer, so I am creating two different cubes, I modify their dimensions and i position them diagonally so they both look like 2 diagonal lines. It's a lot easier this. Anyway to Upspamle The Game Screen? 0 Answers GL.LINES renders in a single quadrant of the screen 0 Answers advice for computing and rendering many, many line segments ? 0 Answers How to integrate maxvertexcount method in my shader?? 0 Answers Fine lines on assets shimmer/flicker while moving 1 Answer
https://answers.unity.com/questions/1220114/how-can-i-draw-the-diagonals-of-a-screen.html
CC-MAIN-2019-43
refinedweb
921
65.42
I searched the web for more info and found this website: wich has good info about the subject and some code! I tried the examples from the website and modified the second one slightly to make my memory hog: - Code: Select all #include <stdlib.h> #include <stdio.h> int main() { void *block = NULL; int count = 0; while(1){ block = malloc(1024*1024); if (!block) fork(); else memset(block, 1, 1024*1024); fork(); printf("%d MB\n", ++count); } return 0; } Bad joke warning! I call it brucewillis.c because it is hard to kill. It does what I wanted and every time I tried running it in my virtual machine it got so slow that I had to kill the vm and start it again. I tried it with 512Mb and 2048Mb of RAM (no swap) and both freezed very quickly after starting the program. The thing is, for now I didn't have the time to do much more than that, but I want to understand better how linux manages memory, so I'll be trying more stuff as soon as I have the time to do so and I'll update here with new info.
https://www.hackthissite.org/forums/viewtopic.php?p=88576
CC-MAIN-2020-05
refinedweb
196
86.74
ComboBox on a page in a StackView causes an assert failure in AddConnection I've been having an issue where using a ComboBox (Controls 2) in an item rendered on a StackView is causing switching to new views on that StackView to throw an assertion error in QObjectPrivate::addConnection. I'm running Qt 5.9.1 on Windows 10 amd64 using the MinGW 5.9.1 32bit compiler. I'm using Qt Creator 4.9.2 as my IDE. I've recreated the problem in the Qt Quick Application - Stack project template by adding a ComboBox to the Page1Form.ui.qml. import QtQuick 2.9 import QtQuick.Controls 2.2 Page { width: 600 height: 400 title: qsTr("Page 1") Label { text: qsTr("You are on Page 1.") anchors.centerIn: parent } ComboBox { id: comboBox model: ["123", "456", "1435", "5347", "56798", "5789", "7-0", "87509", "3564", "543", "3425", "64532", "763", "8746", "75364", "847", "085", "456", "4678", "7864", "542", "736", "478", "354", "4321", "6425", "735", "53678", "54678", "5879", "4536", "451", "736", "847", "5497", "245", "375", "9785", "069", "8567", "6524", "5243", "4256", "34576", "2346", "2546", "54687", "7689", "5679", "9865", "56789", "9867", "45679", "2346", "73", "5678", "5", "27", "46785", "874"] x: 28 y: 37 } } I get the error when I scroll through the drop down list on the combo box and choose something and then go to switch pages on the StackView. It doesn't happen all of the time, but it happens most of the time. It's worth noting that I can get this error to show up much more reliably when I 'm running with the QT Debugger attached. I think this is because there is some kind of race condition at the root cause of this issue. The program dies at the assert on kernel\qobject.cpp:385 Q_ASSERT(c->sender == q_ptr); At this point the thispointer is 0x16c, which is obviously causing a segmentation fault. Other times I've seen the data being compared in the assertion be 0xfeeefeee, so it was obviously memory that had been cleared by HeapFree. The stack trace shows that this problem is ultimately caused from a notify from a QEvent::MetaCall event. This leads to a QQmlEngineDebugServiceImpl::processMessage call, followed by 11 frames of QQmlEngineDebugServiceImpl::buildObjectList, eventually leading to the addConnection call for the corrupted memory address. At this point, I've reached the limit of my diagnostic skills. Could anyone give me any clues as to what I'm doing wrong or some other data I could try to look up to debug this issue? Attached is a backtrace of the offending UI thread, but the site is popping up a permissions error when I try to upload it so I don't know if it will actually be available to anyone. [0_1563368797747_Backtrace.txt](Uploading 100%) Thank you for taking the time to look at this. Update: I downloaded the most recent version of Qt, 5.13.0, and I could not get the issue to repeat. So I think the problem is related to specific versions of Qt.
https://forum.qt.io/topic/105052/combobox-on-a-page-in-a-stackview-causes-an-assert-failure-in-addconnection/2
CC-MAIN-2019-51
refinedweb
506
70.13
In this user guide, we will learn an interesting feature of the ESP32 module that will allow us to perform over-the-air (OTA) updates. This means that the ESP32 module like other WiFi enabled microcontrollers has the feature to update the firmware or update files to the filesystem wirelessly. There are several ways to accomplish the OTA updates but we will use the AsyncElegantOTA library to achieve it. Through this library, a web server will be created that will allow us to upload new firmware/ files to the ESP32’s SPIFFS without any physical connection. All the updating will occur wirelessly (OTA) without physically connecting the ESP32 module to a computer via a USB cable. We also have a similar guide with VS Code and PlatformIO: Table of Contents OTA Introduction In embedded systems and especially in IoT applications, the devices are usually deployed at remote locations. Therefore, it is very inconvenient to get physical access to these devices to perform applications updates. Over the air or OTA is a commonly used process to update the firmware of these devices wirelessly without having physical access to devices. For example, you have developed a new IoT device and deployed thousands of such devices at different remote locations. After some time, your customer asked you to add a new feature to the device. You have created a new feature as per the demand of the client. But the question is how you will update the new firmware to these thousands of devices that are already deployed at remote locations? Performing updates one by one by getting physical access to each device will be a wastage of time and resources. By using OTA, we can simply update the firmware of all devices with one click from a remote server wirelessly. ESP32 OTA Updates using AsyncElegantOTA library Through OTA programming, the ESP32 board will wirelessly update new sketches. With the help of the AsyncElegantOTA library, there will also be a feature to upload files onto the ESP32 SPIFFS. No physical access is required. Only a stable internet connection will be the requirement. Thus, without any serial connection, we will perform OTA updates. One major inconvenience of using OTA is that we would have to manually add additional code for the OTA functionality for every sketch. The AsyncElegantOTA library will allow the user to access a web server through which new firmware could be uploaded as well as files could also be uploaded to the ESP32’s filesystem wirelessly. The files will be converted in .bin format before uploading them with this method. Additionally, we will use the ESPAsyncWebServer library to create the OTA web server which is compatible with the AyncElegantOTA library. By the end of this article, you will be able to add the OTA functionality in all the web servers which you previously created using the ESPAsyncWebServer library. To implement OTA functionality in ESP32, we can choose between various methods. The two most common ones are by using basic OTA where the updates are made through the Arduino IDE or by using a web updater OTA where the web browser will cater to the OTA updates. We will, however, use the AsyncElegantOTA library which works well with the asynchronous web servers we have already created in various articles through the ESPAsyncWebServer library. Key Advantages of using AsyncElegantOTA Library - Easy to integrate with asynchronous web server projects created through the ESPAsyncWebServer library - Provides an interactive and visually pleasing interface for the web server - Can update new sketches to the ESP32 module as well as upload files to the ESP32 SPIFFS How to use AsyncElegantOTA Library to Upload Files - Firstly, we will create an Arduino sketch for the OTA web updater. This will be uploaded to the ESP32 through a serial connection with the computer via a USB cable. You will require the AsyncElegantOTA library, AsyncTCP and the ESPAsyncWebServer libraries for this step. - Inside the Arduino sketch, you will have to include the following lines of code to easily incorporate the OTA updates via the AsyncElegantOTA library: - 1. Include the library: #include <AsyncElegantOTA.h> - 2. Add this line before starting the server: AsyncElegantOTA.begin(&server). - 3. Lastly, in the loop() function add the line: AsyncElegantOTA.loop(). - Th OTA web updater sketch will create a web browser that we can access by typing in the search bar. Through this web updater, we will be able to upload new firmware/ add files onto the ESP32 filesystem. - Afterwards, for every sketch you upload, you will have to add the additional code for the OTA functionality to upload files/sketches wirelessly. AsyncElegantOTA Library We will use the Library Manager in our Arduino IDE to install the latest version of the library. Open your Arduino IDE and go to Sketch > Include Libraries > Manage Libraries. Type AsyncElegantOTA name in the search bar and install it. Installing ESPAsyncWebServer Library and Async TCP Library We will need two additional libraries to build our so we will have to download and load them in our ESP32 board ourselves. - To install. - To install Async TCP library for free, click here to download. You will download the library as a .zip folder which you will extract and rename as ‘AsyncTCP.’ Then, transfer this folder to the installation library folder in your Arduino IDE. Likewise, you can also go to Sketch > Include Library > Add .zip Library inside the IDE to add the libraries as well. After installation of the libraries, restart your IDE. Example 1: Arduino Sketch AsyncElegantOTA ESP32 Open your Arduino IDE and go to File > New. A new file will open. Copy the code given below in that file and save it. You just need to enter your network credentials. This sketch creates an ESP32 web server that displays a simple text message on the /root URL and the ElegantOTA web page on the /update URL. The web page will allow the user to update new firmware/upload files to ESP32 SPIFFS. #include <Arduino.h> #include <WiFi.h> #include <AsyncTCP.h> #include <ESPAsyncWebServer.h> #include <AsyncElegantOTA.h> const char* ssid = "PTCL-BB"; //replace with your SSID const char* password = "*********"; //replace with your password AsyncWebServer server(80); void setup(void) { Serial.begin(115200); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); Serial.println(""); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("IP address: "); Serial.println(WiFi.localIP()); server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) { request->send(200, "text/plain", "Hello! This is a simple text message sent from ESP32. Microcontrollerslab"); }); AsyncElegantOTA.begin(&server); // Start ElegantOTA server.begin(); Serial.println("HTTP server started!"); } void loop(void) { AsyncElegantOTA.loop(); } How the Code Works? Including Libraries Firstly, we will include the necessary libraries. For this project, we are using five of them. Arduino.h, WiFi.h, ESPAsyncWebServer.h, AsyncTCP.h and AsyncElegantOTA.h. As we have to connect our ESP32 to a wireless network hence we need WiFi.h library for that purpose. The other libraries are the ones that we recently downloaded and will be required for the building of the asynchronous web server as well as for the OTA functionality. #include <Arduino.h> #include <WiFi.h> #include <AsyncTCP.h> #include <ESPAsyncWebServer.h> #include <AsyncElegantOTA = "PTCL-BB"; //replace with your SSID const char* password = "********"; //replace with your password Creating the AsyncWebServer Object The AsyncWebServer object will be used to set up the web server. We will pass the default HTTP port which is 80, as the input to the constructor. This will be the port where the server will listen to the requests. AsyncWebServer server(80); setup() function Inside the setup() function, we will open a serial connection at a baud rate of 115200. Serial.begin(115200); The following section of code will connect our ESP32 board with the local network whose network credentials we already specified above. After the connection will be established, the IP address of the ESP board will get printed on the serial monitor. This will help us to make a request to the server. WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); Serial.println(""); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("IP address: "); Serial.println(WiFi.localIP()); ESP32 Handling Requests We will deal with the /root URL request which the ESP32 board will receive. The handling function will respond to the client by using the send() method on the request object. This method will take in three parameters. The first is 200 which is the HTTP status code for ‘ok’. The second is “text/plain” which will correspond to the content type of the response. The third input is the content of the text which will be displayed. server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) { request->send(200, "text/plain", "Hello! This is a simple text message sent from ESP32. Microcontrollerslab"); }); Starting Connection In the next line we will initiate ElegantOTA. AsyncElegantOTA.begin(&server); // Start ElegantOTA To start the server, we will call the begin() on our server object. On the Serial Monitor, you will be able to view the message: ‘HTTP server started!’ server.begin(); Serial.println("HTTP server started!"); loop() Inside the infinite loop() function, we will call AsyncElegantOTA.loop() to continue the connection indefinitely. AsyncElegantOTA.loop(); and you will be able to see the IP address of your ESP32 module. Copy that address into a web browser and press enter. The following web page will open displaying the plain text: Now type /update beside the IP Address in the search tab and press enter. The following ElegantOTA web server will open. In the next two examples, we will learn how to use this web server to: - Upload new firmware wirelessly (Example 2) - Upload files on the ESP32 filesystem wirelessly (Example 3) Example 2: Uploading new firmware (ESP32 OTA Updates) Now, we will show you how to upload new sketches to the ESP32 board over the air using the OTA web server which we created above. For demonstration purposes, we will take the program code from a previous article: ESP32 WebSocket Server using Arduino IDE – Control GPIOs and Relays. In that tutorial, we created an ESP32 web server by using a WebSocket communication protocol and Arduino IDE. The web server controlled the onboard LED of the ESP32 module. We will take that project a step ahead and include OTA functionality inside it. Previously, we used a serial connection between the ESP32 board to upload the code. Now, we will create the same WebSocket web server but upload the code to ESP32 wirelessly. With the help of the AsyncElegantOTA library it will become very easy. Let us learn how to implement it. As we previously mentioned, to upload firmware via ElegantOTA we have to make sure that the file we upload is in .bin format. This can be easily done through Arduino IDE. Inside your IDE go to Sketch > Export Compiled Binary. This will generate a .bin file of your associated sketch. Its as simple as that. Arduino Sketch AsyncElegantOTA Uploading new sketch Open your Arduino IDE and go to File > New. A new file will open. Copy the code given below in that file and save it as ‘ESP32_WebSocket_Webserver_OTA.’ Remember to replace the network credentials with your values. // Import required libraries #include <WiFi.h> #include <AsyncTCP.h> #include <ESPAsyncWebServer.h> #include <AsyncElegantOTA.h> // Replace network credentials with your own WiFi details const char* <link rel="icon" href="data:,"> <style> html { font-family: New Times Roman; text-align: center; } h1 { font-size: 1.8rem; color: white; } h2{ font-size: 1.5rem; font-weight: bold; color: #612b78; } .topnav { overflow: hidden; background-color: #612b78; } body { margin: 0; } .content { padding: 30px; max-width: 600px; margin: 0 auto; } .button { padding: 15px 50px; font-size: 24px; text-align: center; outline: none; color: #fff; background-color:#fa0f0f; //green border: none; border-radius: 5px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); } .button:active { background-color:#fa0f0f ; transform: translateY(2px); } .state { font-size: 1.5rem; color:#120707; font-weight: bold; } </style> <title>ESP32 Web Server</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> </head> <body> <div class="topnav"> <h1>ESP32 WebSocket Server</h1> </div> <div class="content"> <h2>ONBOARD LED GPIO2</h2> <p><button id="button" class="button">Click to Toggle</button></p> <p class="state">State: <span id="state">%STATE%</span><(GPIO_State)); }) { GPIO_State = !GPIO_State; notifyClients(); } } }); } String processor(const String& var){ Serial.println(var); if(var == "STATE"){ if (GPIO_State){ return "ON"; } else{ return "OFF"; } } } void setup(){ // Serial port for debugging purposes Serial.begin(115200); pinMode(Led_Pin, OUTPUT); digitalWrite(Led_Pin,", html_page, processor); }); AsyncElegantOTA.begin(&server); server.begin(); } void loop() { AsyncElegantOTA.loop(); ws.cleanupClients(); digitalWrite(Led_Pin, GPIO_State); } To understand how the code works you can have a look at the article here. All the code is the same except for the additional three lines we have added to include the OTA updates functionality via the AsyncElegantOTA library. Demonstration After saving the sketch go to Sketch > Export Compiled Binary. This will create a .bin file of your sketch. Now we will upload this .bin file to the ElegantOTA web server which we created in Example 1. Before proceeding further, make sure your ESP32 is powered ON and has the sketch from Example 1 uploaded. In a new browser type IP address/update and press enter. In our case, we will type 192.168.10.19/update. You will use the IP address for your own ESP32 module. After pressing enter, the ElegantOTA web page will be displayed. Check Firmware and upload the .bin file by clicking Choose File and selecting it. You will find the .bin file associated with your project in a folder with the same name as your sketch. The process will start. After a few moments the process will be completed. Click the Back button to go back to the main web page. Now type the /root URL in a new browser and press enter. The ESP32 WebSocket web server will open. Now click the toggle button. The onboard LED of the ESP32 board will light up. At the same moment, the state will also be updated to ‘ON’. Now keep on clicking the button and the state will automatically update accordingly and the LED will turn on/off. Thus, we were able to successfully upload a new sketch to our ESP32 board wirelessly through ElegantOTA. Example 3: Uploading files to ESP32 filesystem via ElegantOTA Now, we will learn how to upload files to the ESP32’s filesystem SPIFFS wirelessly using the OTA web server which we created in Example 1. For demonstration purposes, we will take the program code from a previous article: ESP32 Web Server with SPIFFS (SPI Flash File System). In that tutorial, we created a web server with ESP32 using SPIFFS and Arduino IDE. This was done by storing the CSS and HTML files in the SPI flash file system of ESP32 and building a web server through those files. Instead of hard coding the HTML as string literals which takes up a lot of memory, the SPIFFS helped us access the flash memory of the ESP32 core. Thus, we will take that project a step ahead in this example and include OTA functionality inside it. Previously, we used a serial connection between the ESP32 board to upload the code. Now, we will create the same SPIFFS web server but upload the files to the ESP32’s filesystem as well as the sketch via OTA. With the help of the AsyncElegantOTA library, it will become very easy. Let us learn how to implement it. Prerequisites Creating Files for SPIFFS. Both the CSS and HTML files will be placed inside the ‘data’ folder. This ‘data’ folder will be inside the project folder. Note: You should place HTML and CSS files inside the data folder. Otherwise, SPIFFS library will not be able to read these files. HTML file Inside our HTML file, we will include the title, a paragraph for the GPIO state, and two on/off buttons. Now, create an html.index } Arduino Sketch SPIFFS OTA Web Server Open your Arduino IDE and go to File > New. A new file will open. Copy the code given below in that file and save it as ‘ESP32_SPIFFS_Webserver_OTA.’ Remember to replace the network credentials with your values. #include "WiFi.h" #include "ESPAsyncWebServer.h" #include "SPIFFS.h" #include <AsyncElegantOTA.h> const char* ssid = "PTCL-BB"; //Replace with your own SSID const char* ElegantOTA AsyncElegantOTA.begin(&server); // Start server server.begin(); } void loop(){ AsyncElegantOTA.loop(); } To understand how the code works you can have a look at the article here. All the code is same except for the additional three lines which we have added to include the OTA updates functionality via AsyncElegantOTA library. Now let us proceed further. Updating new sketch After saving this sketch, go to Sketch > Export Compiled Binary. This will create a .bin file of your sketch. Now we will upload this .bin file to the ElegantOTA web server which we created in Example 1. Follow the same steps to upload this sketch to ElegantOTA web server like we did previously for Example 2. Updating Filesystem Now after you have created both the HTML and CSS files and placed them inside the data folder it is time to upload them to the filesystem. At this point our project folder should look like this: To view your project folder go to Sketch > Show Project Folder. The ESP32_SPIFFS_Webserver_OTA folder will consist of: the .ino Arduino sketch file, the .bin file of the Arduino sketch and the data folder containing the CSS and HTML files. Now go to Tools > ESP32 Data Sketch Upload. You will get an error ‘SPIFFS upload failed.’ This is because the ESP32 board is not connected serially to the computer. Scroll down until you reach the destination where the .spiffs.bin file is located. This is highlighted below: This is the file which we have to upload on the filesystem in the ElegantOTA web server. To do that follow the steps carefully. Enabling Hidden Items On your computer go to This PC > View and check Hidden items. As AppData was previously not visible to us now we will be able to view our file by following the path which we highlighted in yellow above. This is the file which we will upload on the filesystem via ElegantOTA: In a new browser type IP address/update and press enter. In our case, we will type 192.168.10.19/update. You will use the IP address for your own ESP32 module. After pressing enter the ElegantOTA web page will be displayed. Check Filesystem and upload the highlighted file by clicking Choose File and selecting it. After few moments, the process will be completed. Click the Back button to go back to the main web page. Now type the /root URL in a new browser and press enter. The ESP32 SPIFFS web server will open. Now, press the ON and OFF buttons and the on-board LED will turn on and off accordingly. The GPIO state on the web server will also change and get updated. To go back to the ElegantOTA web server type /update with the root / URL. Thus, we were successfully able to upload HTML and CSS files to the ESP32 filesystem to create a web server. Conclusion In conclusion, we were able to learn a very useful feature of ESP32 through this article today. In this comprehensive guide, we learned how to update new firmware in ESP32 via OTA using the AsyncElegantOTA library. Not only were we able to upload new sketches, but we were also able to upload files to the ESP32’s SPIFFS. We incorporated examples from previously performed projects where we created asynchronous web servers using the ESPAsyncWebServer library. 1 thought on “ESP32 OTA (Over-The-Air) Updates using AsyncElegantOTA Library and Arduino IDE” Hi. Thanks for the tutorial. I was using arduion 2 beta, but it didn’t support elegantOTA file uploads using the ESP32_Sketch_Data_Upload tool, so I dropped back to ardruino ide 1.8.16, which does support the tool. However, I can export the firmware binary and upload it via ElegantOTA, but when I run the ESP32_Sketch_Data_Upload tool to update spiffs files, it immediately says “SPIFFS Error: serial port not defined!” and stops compilation/uploading. So, it never creates the spiffs.bin file that I need to upload via OTA to the ESP32. Any suggestions other than possibly going backwards further with the IDE?? I’d really like to be able to update the firmware and files remotely or I’ll have to continually disconnect my esp32 to reprogram it for updates. Thanks in advance!
https://microcontrollerslab.com/esp32-ota-over-the-air-updates-asyncelegantota-library-arduino/
CC-MAIN-2022-33
refinedweb
3,444
58.28
Introduction: Make a CHIP Robot In this tutorial we’ll show you the easiest way to make a CHIP robot. Starting with C.H.I.P. is very simple, and making a CHIP robot can be done easily with the GoPiGo Robot kit. In this tutorial we will walk you through how to make a CHIP robot.). C.H.I.P. is a real computer, and can run software written in all kinds of programming languages. The board comes with WiFi, runs Linux, and has a ton of GPIO pins. The hardware and software are open-source, a big plus if you have plans to scale your robots! You can see more about the C.H.I.P. computer here on the Next Thing Co’s website. Step 1: Setup C.H.I.P. in Headless Mode C.H.I.P. comes with an operating system based on the popular Linux Debian operating system, and feels very similar to a Raspberry Pi. We’ll need to make a few changes and install a few things to build our C.H.I.P. robot. First, connect to Windows. In this tutorial we did all of our setup in Windows 10. Setting up from Linux or a Mac should be slightly different in how you connect. You will need to set CHIP up in headless mode, and we have a quick tutorial on this here. Once you’ve setup WiFi and are connected in Headless Mode, move along! Step 2: Software Setup Now that C.H.I.P. is setup in headless mode, and connected to our local WiFi network, login to C.H.I.P. In SSH (we’re using PuTTY), connect to chip.local. Login as root, and the password is chip. First, update the operating system and install the necessary packages. In the command line run: apt-get update apt-get install avrdude git i2c-tools python-smbus python-pip python3-pip -y Once the packages are installed, we need to setup C.H.I.P. to run I2C. To setup I2C we followed these steps in the command line: sudo fdtput --type u /boot/sun5i-r8-chip.dtb i2c2 clock-frequency 50000 sudo apt-get install git build-essential python-dev python-pip flex bison -y git clone cd dtc make sudo make install PREFIX=/usr cd .. git clone git://github.com/xtacocorex/CHIP_IO.git cd CHIP_IO python setup.py install cd .. sudo rm -rf CHIP_IO That should be it. We should have functioning I2C communications, ready to talk to our C.H.I.P. Robot! Step 3: Setup the GoPiGo Software We will need to make a few installs and changes to the software to get the GoPiGo working. pip install future git clone Finally, we’ll need to make a small modification to the Python program “gopigo.py”. Change directories to this file cd ~/GoPiGo/Software/Python/ It should be in this directory. The program is written for the Raspberry Pi, and to adapt it to C.H.I.P. we’ll simply delete lines 50-62 (click this link to see the specific lines to delete) on this file; everything that has to do with smbus We will replace them with the following: import smbus bus = smbus.SMBus(2) Save the file and exit! Step 4: Hardware Setup to Make a CHIP Robot We will start with building the GoPiGo. The GoPiGo is a robot car for the Raspberry Pi, but we can adapt it to the C.H.I.P. very easily. There are step by step instructions on how to build the GoPiGo, including video tutorials, here. We’ll connect the CHIP robot to the GoPiGo hardware with five jumpers. We used longer, 6 inch jumper cables you would typically use on a breadboard. You can see the official CHIP GPIO Pinout here. We’ll connect the following: - GoPiGo 5V – C.H.I.P. CHG-IN (Red) - GoPiGo 3V – C.H.I.P. VCC-3V3 (White) - GoPiGo SDA – C.H.I.P. TWI2-SDA (Yellow) - GoPiGo SCL – C.H.I.P. TWI2-SCK (Green) - GoPiGo GND – C.H.I.P. GND (Black) Below we have the pinout diagram to make a C.H.I.P. Robot, and a picture of the CHIP and the GoPiGo Robot connected. As a final hardware step, we put the canopy back on the GoPiGo, and we tie the CHIP in place on our robot with a plastic zip tie. Step 5: Running the Example With the C.H.I.P. robot built and connected to the C.H.I.P. computer, we can run an example program. Change directories to the python examples: cd ~/GoPiGo/Software/Python/ And run the example program: python basic_test_all.py You should see a controller pop up and you can now control the robot with a keystroke! Step 6: Troubleshooting Your CHIP Robot We ran into a few helpful links while you may find useful to make a chip robot. First, a general troubleshooting page by the Chip Community website here helped us figure out how to lower the I2C clock speed. Next, while working through the forums, we found a great tutorial we built off of for I2C setup. Finally, we discovered just why we had to use I2C bus 2 on the C.H.I.P. computer here. Going Further with Your C.H.I.P. Robot Now with I2C connected, we had a few more ideas we’d like to work on in the near future. We could of course add a line follower, or a few buttons, or a distance sensor which we could connect to the GoPiGo and read. We could also add voice to the robot! If you have an idea, or a project, we’d love to hear about it on our forums here! Discussions
http://www.instructables.com/id/Make-a-CHIP-Robot/
CC-MAIN-2018-30
refinedweb
970
75.2
DateFormatter static class (update of Darron Schalls dateFormat.as) I was at a ColdFusion 101 demo the other day at our Las Vegas User Group meeting and was watching Dave Byer use the CF Date formatting using masks. I had always thought that was something Flash needed built-in and I figured someone must have already built this. I started to look around and found a couple of things. The first was Darron Schall’s dateFormat.as which was his port of ColdFusions’s date formatting. I also found that ActionScript 3.0 will have the ability to format as well (via Macromedia Labs). Darron’s ActionScript was more promising because I can use it now, but its a bit dated with the #include , so I decided to take a few moments and update it to a static Class. Anyhow.. Here is my modification on Darron’s original script. The zip contains the class and a sample FLA. Kudo’s to Darron for doing all the hard work!! Download: DateFormatter Class [as] import DateFormatter; var testDate:Date = new Date(); trace(DateFormatter.formatTo(testDate, “mm/dd/yyyy”));[/as] November 15th, 2005 at 12:44 pm [...] urchinTracker(); Flash | Retrospective « DateFormatter static class (update of Da [...] November 15th, 2005 at 2:17 pm [...] November 15th, 2005 Update to Date Formatter The other day I updated Darron Schalls dateFormat.as int [...]
http://www.yapiodesign.com/blog/2005/11/10/dateformatter-static-class-update-of-darron-schalls-dateformatas/
crawl-002
refinedweb
227
67.55
System Tray PopUp - Online Code Description By using this code sample you add functional to your application like - Download Manager, when download complete. This message alerter window alert the user when task is compeleted. This window is shown at extreme right - down corner of screen. Source Code import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JLabel; impo... (login or register to view full code) To view full code, you must Login or Register, its FREE. Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.
http://www.getgyan.com/show/286/System_Tray_PopUp
CC-MAIN-2016-40
refinedweb
113
54.79
UNKNOWN Project description Bitakora Bitakora is a fully featured Blog product for Zope. Yes plain Zope, nor Plone neither CMF is involved. You will have two extra products to add in the ZMI: - Bitakora: Fully featured blog product for Zope. With ideas of Squishdot and COREBlog. - BitakoraCommunity: A way for having a blog community based on Bitakora product. Bitakora Features - All templates and scripts are in the File System. - A user with a custom role called ‘Blogger’ and created with the product, can manage the blog without having access to the ZMI. - TinyMCE as WYSIWYG editor.. - Fully i18n-ed using Localizer. A MessageCatalog called ‘gettext’ can be found in each blog with the messages to translate. Basque (eu) and Spanish (es) translations are provided with the product (see locale directory). This MessageCatalog is deleted when creating blogs in a BitakoraCommunity, and blogs use the MessageCatalog in the community. - Full UTF-8 support, trying to avoid UnicodeDecodeErrors :) - Blog templates are clean XHTML, based on MovableType 3 templates. - Clean URLs and tag based categorization of posts. - Support of Pingback references - Automatic update ping to Pingomatic BitakoraCommunity Features - All template and scripts are loaded into the ZMI during instantiation of the product, in the same way Squishdot does, to allow community managers to customize them. - Free creation of blogs, in a 3-step-Blogger-way. - Fully i18n-ed using Localizer. Basque (eu) and Spanish (es) translations are provided with the products (see locale directory). Installation We suggest using zc.buildout to handle the installation of Bitakora. For that purpose we provide a buildout file to use as an example: If you plan to install manually, you should install these products: - Zope 2.11 (we use the latest 2.11 release: 2.11.8) - itools 0.20.8 (you need to install glib development headers to correctly install itools in Ubuntu/Debian system you need to apt-get install libglib2-dev) - Localizer 1.2.3 - CookieCrumbler 1.2 - ZTinyMCE 0.2.1 (the original website for ZTinyMCE is down, so we have uploaded this product to our GitHub account, just for the purpose of have this buildout working) Migration to 1.0 To migrate from 0.x version to 1.0, open or to run migration code. This migration code, adds TinyMCE, fixes attribute name clash in Comment class and deletes TextIndexNG2 indexes created in the installtion Thanks The development of this product was partialy funded by Gipuzkoako Foru Aldundia (Gipuzkoan Foral Government) and Eusko Jaurlaritza (Basque Regional Government). License BSD Like. See LICENSE.txt CHANGELOG 1.1 (2014-01-24) - OpenGraph and TwitterCard support [erral] 1.0.4 (2013/03/06) - Remove Epoz traces that avoided comments to be added [erral] 1.0.3 (2013/03/05) - Fix post preview [erral] 1.0.2 (2013/02/28) - Fix class inheritance for CatalogAware objects. This may need to reindex all Catalogs (one per Bitakora instance and one more for BitakoraCommunity) [erral] 1.0.1 (2013/02/27) - Migration improvement for large installations [erral] - Documentation improvement [erral] 1.0 (2013/02/22) - Remove TextIndexNG2 dependency and provide migration to delete indexes [erral] - PEP8ify [erral] - Provide migration for old instances [erral] - Fix attribute name clash issue [erral] - Reformat README and HISTORY files in rST [erral] - Add TinyMCE insted of epoz [erral - Eggify this product [erral] v. 0.1.21 - Fix e-mail templates [erral] v. 0.1.20 - Change CAPTCHA using a question. [erral] v. 0.1.19 - Re-add HTML parsing for comments to avoid arbitrary JavaScript to be added in the comments. Thanks to Iker Mendilibar. [erral] v. 0.1.16 - Use string interpolation in community templates - Add error control when an user asks password reminder twice. v. 0.1.15 - Modified the way to handle pings. Now the pings are handled making Future calls, creating new threads to make the pings v. 0.1.10 - Fixed bug, when creating comment ids v. 0.1.9 - Allow more attributes in HTML v. 0.1.8 - CAPTCHA control is enabled by defatul. To disable add a property called CAPTCHA_ENABLED and set it to 0 (property type: int) - Akismet plugin is disabled by default. To enable change utils.py - Added Akismet spam control for comments and pingbacks - Added CAPTCHA control to comment adding and contact form. Captcha images and example code provided by - Fixed: contact and new comments notifications are properly i18n-zed - Ping to Technorati added - Fixed: Ping to Technorati and Ping-o-matic. The ping must be sent with blog title and not with post title v. 0.1.7 - Fixed bug in post edit form. If a method called ‘preview’ existed, it was not posible to edit a post. v. 0.1.6 - New Polish translation - Pingback system re-enabled and fixed v. 0.1.5 - ‘u’ and ‘del’ tags allowed in HTML - Changed community CSS file images, now they are GIF instead of JPEG v. 0.1.4 - Deleted email from feed.xml. RSS 2.0 says author tag must contain an email address. Added DC namespace to the feed and exchanged author with dc:creator - Allow embed, object and param tags in HTML for inserting YouTube and GoogleVideo flashes - Allow ‘-‘ and ‘_’ in tags - Show cleaned HTML in post preview - Changes to show the tag cloud - Fixed password reminder in community v. 0.1.3 (first version for Blogak.com) - Fixed bug in XML exporting - Added contact form - Add, blog author receives an email when a post is commented - Modify, Pingomatic ping re-enabled, and pingback send disabled - Updated eu and es translations - Minor changes in admin screens v. 0.1.2 (not public, for testing at atxukale.com) - Some methods refactored - Bug: Recent comments menu showed all comments, now is limited to 10 - Bug: Comment author’s e-mail was shown. - Add, now it’s possible to export a XML file with blog data - Change, CSS styles both in community and blogs fixed for IE v. 0.1.1 (not public, for testing at atxukale.com) - Add, posibility to import XML file with blog data - Add, parameter to signal wether pinging and HTML cleaning is wanted: pinging disabled by default and HTML cleaning enabled - Changed, Pingback disabled when adding posts v. 0.1 - Initial Release - Initial release [erral] Project details Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/Products.Bitakora/
CC-MAIN-2021-31
refinedweb
1,061
66.33
I. This is basically Plan 9 plus a web-scale filesystem namespace (IPFS/IPNS?). The only issue would then be showing all those files, virtual and otherwise, graphically, but we’ve got decades of experience in creating graphical file browsers. You could even wrap the whole thing in a 3D fsn/fsv alike interface if you wanted to spend your day shouting “It’s a Unix system, I know this!” instead of tab-completing. Windows is a remarkably poor choice for a basis for something like this, for exactly the same reason that PowerShell couldn’t simply be a Unix shell. Edited 2018-08-29 22:31 UTC
https://www.osnews.com/story/30686/what-the-hell-was-the-microsoft-network/
CC-MAIN-2019-04
refinedweb
108
63.39
I am having a problem importing classes and setting variables and I need help with a test program I am doing. So I am testing out a program that just simply outputs what your input was and puts a time stamp ( Like Skype ). I am having an issue getting the message and time variable type to work! Here is my code: class Test { public static void main(String[] args) { Scanner input = new Scanner(System.in); Message messageObject = new Message (); Time timeObject = new Time (); System.out.println("Enter your message here: "); String message = input.nextLine(); messageObject.simpleMessage(message); timeObject.getTime(); } void simpleMessage(String message) { System.out.println(message + time); } } Exception in thread "main" java.lang.Error: Unresolved compilation problems: Message cannot be resolved to a type Message cannot be resolved to a type The constructor Time() is undefined at Test.main(Test.java:8) Your problem is in this line: Message messageObject = new Message (); This error says that the Message class is not known at compile time. So you need to import the Message class. Something like this: import package1.package2.Message; Check this out.
https://codedump.io/share/t1IvxMBq7E6c/1/exception-in-thread-quotmainquot-javalangerror-unresolved-compilation-problems
CC-MAIN-2017-17
refinedweb
184
58.79
December 14th-17th 2012 :: Theme: You are the Villain Ninox the Nightbringerby Dining Philosopher - Jam Entry You are Ninox, the bringer of Darkness! In this puzzle game, your job is to black out the world, one level at a time. You have to use the switches for this, but beware of the spikes - the darkness can be treacherous! Use the arrow keys for movement, F for fullscreen and Escape to exit fullscreen. 28-12-12: We added a Windows executable! Please comment if you have problems with it. 08-02-14: Ported to javascript some time ago, available under the web link now. Alternatively, you can run the source. You'll need python 2.x (works on 2.7, not on 3.x) and pygame to play, README is included. There are 15 levels, and it includes a goat. ;) Please leave a comment! Downloads and Links Ratings I thought so, I spent about half a day trying to create executables with py2exe, cxfreeze and pyinstaller - all in vain -.- I'll see what I can do! Wow, great job! That's a very innovative concept, and the level design is excellent. I frequently found myself frustrated with my own bad memory, but never with the game, which is how it should be :) It's interesting how groping around in the dark can add so much tension to what is essentially a puzzle game. I have never used pygame or python before so I'm not going to try to figure out how to run this ^^; . I'll be back later to see if the files have been updated - sorry. Nice puzzler here, reminds me of the puzzle games of yore on Classic Mac OS. Designing puzzle levels is hard so it's good to see quite a bunch of them in here, though the ones in the middle (with only buttons to clear) were sort of filler. Good stuff! @HumeSpeaks when you get it repackaged...I'd really like to try it out. Hey, thanks for the comments! I tried to create an executable with py2exe, pyinstaller and cx_freeze, but nothing works. Any suggestions? Also, is the link broken for others as well? Awesome game, its a shame you haven't been able to get py2exe or other converters working. Also make sure you specify the version of python and pygame you are using because all versions of python 3.x will not work with your code. heheheh funny little flying guy n.n its awesome :D and i also like puzzle games so its very interesting too :D Interesting game! The music got me pumped, and darkening the world wasn't as easy as it sounded when you couldn't even see all the switches until you lit them up or accidentally walked over them. Very clever! Saying the game runs under OSX, Windows, Linux is all well and good, but not saying that it requires pygame is misleading. I hope you get that compiled version working! :D @Justin, thanks for the info about Python 3.x, I changed the description. @Cake&Code, I did mention pygame in the description, where do you suggest I put it? Edit-ish: Sorry Cake&Code, in fact you were right about python and pygame not being mentioned. I made the game together with my girlfriend and she had already changed the description based on your comment when I saw it. Thanks for your feedback! Ugh... not sure what I would have to install to get this to run... Nice puzzely kind of game. A simple but fun and engaging concept. I didn't like the all-black levels so much tho. They were mostly frustrating. Will keep checking to see if you update this. Screenshots look fun! Very nicely put together, on ubuntu with pygame installed it just worked! Nice one! Python dev here, so I had pygame installed. Tried to make an executable for you, but I also failed, sorry :( Anyway, great game, simple mechanic, but the levels are well designed. The music was a tad too loud, but the idea is very sound, and the presentation di it justice. Hope you elaborate on this game! Nice graphics and sound. The idea is interesting, though it does quickly become mostly a game of memory :) A few more types of objects in there might spice it up a bit. A couple of things you might like to consider for next time: - an executable version. I see in the comments you tried pyinstaller; I gave it a quick run to see, and yes, the generated executable crashed... odd, because I've used it for a pygame entry before! - An exit key :) (escape only seemed to exit full screen mode) Protip: if you use py2exe, subject yourself to the horrors of 2.5 on some random windows box in order to get a serviceable windows binary. Maybe later I can get a binary for you, as I have one set up. Nice mechanic, fun levels, great game...It could become a great mobile game. Congrats Sorry but I couldn't run this game even though I tried to more than once. I downloaded a pygame installer for windows, that install something somewhere. Anyway your game doesn't work. the line of code: import pygame fails to find pygame. Hope you can figure out how to deploy an .exe by next LD :) Very nice level design, just needs a bit more to it right now :3. Very innovative, I really like the idea. It was also fun that I had to do certain parts from memory, that is something I don't see enough in puzzle games. The audio and graphics could use some polish, but the music set the right mood, and the bringer of night was quite cute. (I'm especially fond of the victory animation.) Hey all, thanks for the comments! We got back from Christmas yesterday, and finally managed to create a Windows executable. Not sure if it works on another machine than our own though... @Grungi, thanks for trying to create an executable, that part took us more time than the game itself. In the end it worked by using PyInstaller under Windows, changing font.Font to font.SysFont and copying separate .dll files to go with the executable (to make .ogg sound work). What do you usually use for creating executables? @schnerble, we considered more complex objects, but that seemed to take away from the simplicity of the game, and time was short (first time participants). Thanks for trying to create an executable too, we succeeded in the end (hopefully ;) ). I wanted to add an exit-possibility, but was surprised how bad pygame handles keypresses in general. I used pygame.time.wait() a lot, which suspends processing of any key-events. I'll try to make things more thread-like next time. @JoeCool17, you lost me at "horrors of 2.5" :P Fortunately PyInstaller worked for us in the end. Great game, loved the variety of levels you were able to create! I like the way your owl looks, but the exe didnt work and trying to remember how to get the python source to work was a bit too much for now. Sorry. @goerp, could you describe the problem with the exe? That is a really great game with good level design. Just perfect. Some little polishing, e.g. animations and so on, but really good job anyway. Just put it in some store! Needed 1841 steps in total to complete all levels. The exe worked fine on my Win7 system. I find it odd that spikes can kill an owl - cant he just fly ? Silly owl. Neat concept though, its sort of an advanced form of the card game memory :) Simple but very fun idea. The leveldesign tends to become poor when you progress in the game ( I gave up on the black room with one visible spike on start ). I think the first levels was more interesting. Maybe 8-10 levels with top polish would have been better for a jam entry. The music is repetitive but I really like it. Definitely enjoyed that entry! To me, the game concept was fresh, and I appreciated it very much. Almost gave up on some levels but eventually kept going up to the level shown in the big screenshot in the description. Then, it started getting too hairy for me, and I bailed out! Nice one, looking forward to the next one! 2331 steps. Very clever idea and good execution. Perhaps could have done with a bit more variety as the levels went on. This one is plain awesome. You should consider porting it to iOS and Android because it is innovative AND fun. Didn't see the goat though :( @Datw: You need some imagination to see the goat (in the last level). ;) We don't know yet if we will port the game to other platforms, but probably not, we'd rather make a new game for LD26. ;) 2545 steps. The game certainly had some frustrating moments (there was a few points where I seriously considered putting Scotch tape on the monitor!), but you got a good mechanic and a very cool concept here. The premise feels very cinematic. :) Would love to see a "full" (and somewhat more forgiving) game based on this. :) @ Cryovat & @ HeyChinaski: Wow, you don't easily give up. Thanks for playing the game to the, and many others, will be FAR more inclined to play your game if you include all required libraries in your .zip Looking forward to playing this when you do. :)
http://ludumdare.com/compo/ludum-dare-25/?action=preview&uid=18490
CC-MAIN-2019-35
refinedweb
1,600
84.27
/* * random.h * * ISAAC random number generator by Bob Jenkins. * * Portable Windows Library * * Copyright (c) 1993-2000: random 2001/03/03 05:12:47 robertj * Fixed yet another transcription error of random number generator code. * * Revision 1.2 2001/02/27 03:33:44 robertj * Changed random number generator due to licensing issues. * * Revision 1.1 2000/02/17 12:05:02 robertj * Added better random number generator after finding major flaws in MSVCRT version. * */ #ifndef _PRANDOM #define _PRANDOM #ifdef P_USE_PRAGMA #pragma interface #endif #include <ptlib.h> /**Mersenne Twister random number generator. An application would create a static instance of this class, and then use if to generate a sequence of psuedo-random numbers. Usually an application would simply use PRandom::Number() but if performance is an issue then it could also create a static local variable such as: { static PRandom rand; for (i = 0; i < 10000; i++) array[i] = rand; } This method is not thread safe, so it is the applications responsibility to assure that its calls are single threaded. */ 00074 class PRandom { public: /**Construct the random number generator. This version will seed the random number generator with a value based on the system time as returned by time() and clock(). */ PRandom(); /**Construct the random number generator. This version allows the application to choose the seed, thus letting it get the same sequence of values on each run. Useful for debugging. */ PRandom( DWORD seed ///< New seed value, must not be zero ); /**Set the seed for the random number generator. */ void SetSeed( DWORD seed ///< New seed value, must not be zero ); /**Get the next psuedo-random number in sequence. This generates one pseudorandom unsigned integer (32bit) which is uniformly distributed among 0 to 2^32-1 for each call. */ unsigned Generate(); /**Get the next psuedo-random number in sequence. */ 00105 inline operator unsigned() { return Generate(); } /**Get the next psuedo-random number in sequence. This utilises a single system wide thread safe PRandom variable. All threads etc will share the same psuedo-random sequence. */ static unsigned Number(); protected: enum { 00117 RandBits = 8, ///< I recommend 8 for crypto, 4 for simulations RandSize = 1<<RandBits }; DWORD randcnt; DWORD randrsl[RandSize]; DWORD randmem[RandSize]; DWORD randa; DWORD randb; DWORD randc; }; #endif // _PRANDOM // End Of File ///////////////////////////////////////////////////////////////
http://pwlib.sourcearchive.com/documentation/1.10.10-0ubuntu2/random_8h-source.html
CC-MAIN-2017-22
refinedweb
370
55.03
A summary of what I learned at PyCon AU in Brisbane this year. (Videos of the talks are here.) 1. PyCon’s code of conduct Basically, “Be nice to people. Please.” I once had a boss who told me he saw his role as maintaining the culture of the group. At first I thought that seemed a strange goal for someone so senior in the company, but I eventually decided it was enlightened: a place’s culture is key to making it desirable, and making the work sustainable. So I like that PyCon takes the trouble to try to set the tone like this, when it would be so easy for a bunch of programmers to stay focused on the technical. 2. Django was made open-source to give back to the community Ever wondered why a company like Lawrence Journal-World would want to give away its valuable IP as open source? In a “fireside chat” between Simon Willison (Django co-creator) and Andrew Godwin (South author), it was revealed that the owners knew that much of their CMS framework had been built on open source software, and they wanted to give back to the community. It just goes to show, no matter how conservative the organisation you work for, if you believe some of your work should be made open source, make the case for it. 3. There are still lots more packages and tools to try out That lesson’s copied from my post last year on PyCon AU. Strangely this list doesn’t seem to be any shorter than last year – but it is at least a different list. Things to add to your web stack - - Varnish – “if your server’s not fast enough, just add another”. Apparently a scary scripting language is involved, but it can take your server from handling 50 users to 50,000. Fastly is a commercial service that can set this up for you. - Solr and elasticsearch are ways to make searches faster; use them with django-haystack. - Statsd & graphite for performance monitoring. - Docker.io Some other stuff - - mpld3 – convert matplotlib to d3. Wow! I even saw this in action in an ipython notebook. - you can use a directed graph (eg using networkx) to determine the order of processes in your code Here are some wider tools for bioinformaticians (if that’s a word), largely from Clare Sloggett’s talk - - rosalind.info – an educational tool for teaching bioinformatics algorithms in python. - nectar research cloud – a national cloud for Australian researchers - biodalliance – a fast, interactive, genome visualization tool that’s easy to embed in web pages and applications (and ipython notebooks!) - ensembl API – an API for genomics – cool! And some other sciency packages - - Natural Language Toolkit NLTK - Scikit Learn can count words in docs, and separate data into training and testing sets - febrl – to connect user records together when their data may be incorrectly entered One standout talk for me was Ryan Kelly’s pypy.js, implementing a compliant and fast python in the browser entirely in javascript. The only downside is it’s 15 Mb to download, but he’s working on it! And finally, check out this alternative to python: Julia, “a high-level, high-performance dynamic programming language for technical computing”, and Scirra’s Construct 2, a game-making program for kids (Windows only). 4. Everyone loves IPython Notebook I hadn’t thought to embed javascript in notebooks, but you can. You can even use them collaboratively through Google docs using Jupyter‘s colaboratory. You can get a table-of-contents extension too. 5. Browser caching doesn’t have to be hard Remember, your server is not just generating html – it is generating an http response, and that includes some headers like “last modified”, “etag”, and “cache control”. Use them. Django has decorators to make it easy. See Mark Nottingham’s tutorial. (This from a talk by Tom Eastman.) 6. Making your own packages is a bit hard I had not heard of wheels before, but they replace eggs as a “distributable unit of python code” – really just a zip file with some meta-data, possibly including operating-system-dependent binaries. Tools that you’ll want to use include tox (to run tests in lots of different environments); sphinx (to auto-generate your documentation) and then ReadTheDocs to host your docs; check-manifest to make sure your manifest.in file has everything it needs; and bumpversion so you don’t have to change your version number in five different places every time you update the code. If you want users to install your package with “ pip install python-fire“, and then import it in Python with “ import fire“, then you should name your enclosing folder python_fire, and inside that you should have another folder named fire. Also, you can install this package while you are testing it by cding to the python-fire directory and typing pip install -e . (note the final full-stop; the -e flag makes it editable). Once you have added a LICENSE, README, docs, tests, MANIFEST.in, setup.py and optionally a setup.cfg (to the python-fire directory in the above example) and you have pip installed setuptools, wheel and twine, you run both python setup.py bdist_wheel [--universal] python setup.py sdist The bdist version produces a binary distribution that is operating-system-specific, if required the universal flag says it will run on all operating systems in both Python 2 and Python 3). The sdist version is a source distribution. To upload the result to pypi, run twine upload dist/* (This from a talk by Russell Keith-Magee.) Incidentally, piprot is a handy tool to check how out-of-date your packages are. Also see the Hitchhiker’s Guide to Packaging. 7. Security is never far from our thoughts This lesson is also copied from last year’s post. If you offer a free service (like Heroku), some people will try to abuse it. Heroku has ways of detecting potentially fraudulent users very quickly, and hopes to open source them soon. And be careful of your APIs which accept data – XML and YAML in particular have scary features which can let people run bad things on your server. 8. Database considerations Some tidbits from Andrew Godwin’s talk (of South fame)… - Virtual machines are slow at I/O, so don’t put your database on one – put your databases on SSDs. And try not to run other things next to the database. - Setting default values on a new column takes a long time on a big database. (Postgres can add a NULL field for free, but not MySQL.) - Schema-less (aka NoSQL) databases make a lot of sense for CMSes. - If only one field in a table is frequently updated, separate it out into its own table. - Try to separate read-heavy tables (and databases) from write-heavy ones. - The more separate you can keep your tables from the start, the easier it will be to refactor (eg. shard) later to improve your database speed. 9. Go to the lightning talks I am constantly amazed at the quality of the 5-minute (strictly enforced) lightning talks. Russell Keith-Magee’s toga provides a way to program native iOS, Mac OS, Windows and linux apps in python (with Android coming). (Keith has also implemented the constraint-based layout engine Cassowary in python, with tests, along the way.) Produce displays of lightning on your screen using the von mises distribution and amazingly quick typing. Run python2 inside python3 with sux (a play on six). And much much more… Finally, the two keynotes were very interesting too. One was by Katie Cunningham on making your websites accessible to all, including people with sight or hearing problems, or dyslexia, or colour-blindness, or who have trouble with using the keyboard or the mouse, or may just need more time to make sense of your site. Oddly enough, doing so tends to improve your site for everyone anyway (as Katie said, has anyone ever asked for more flashing effects on the margins of your page?). Examples include captioning videos, being careful with red and green (use vischeck), using aria, reading the standards, and, ideally, having a text-based description of any graphs on the site, like you might describe to a friend over the phone. Thinking of an automated way to do that last one sounds like an interesting challenge… The other keynote was by James Curran from the University of Sydney on the way in which programming – or better, “computational thinking” – will be taught in schools. Perhaps massaging our egos at a programming conference, he claimed that computational thinking is “the most challenging thing that people do”, as it requires managing a high level of complexity and abstraction. Nonetheless, requiring kindergarteners to learn programming seemed a bit extreme to me – until he explained at that age kids would not be in front of a computer, but rather learning “to be exact”. For example, describing how to make a slice of buttered bread is essentially an algorithm, and it’s easy to miss all the steps required (like opening the cupboard door to get the bread). If you’re interested, some learning resources include MIT’s scratch, alice (using 3D animations), grok learning and the National Computer Science School (NCSS). All in all, another excellent conference – congratulations to the organisers, and I look forward to next year in Brisbane again.
http://racingtadpole.com/blog/tag/science/
CC-MAIN-2019-43
refinedweb
1,573
59.84
PercentileComputation sometimes gives incorrect result Bug Description See the code below and result of its execution. Sometimes we have up to 80% difference with real percentile result. This happens when we have very long list of mixed small and big values. $ cat percentile_issue.py from rally.common import streaming_ data = ( list( list(range(10)) * 10, list(range(10)) * 100, list(range(10)) * 1000, list(range(10)) * 10000, [1, 2, 3, 4, 99999] * 10000, ) for lst in data: p = st.PercentileCo for i in lst: p.add(i) streaming = p.result() real = st.utils. diff = float(abs(real - streaming)) / max(real, streaming) * 100 if diff > 5: print "%-8.2f %-8.2f Differs by %.1f%%" % (real, streaming, diff) else: print "%-8.2f %.2f" % (real, streaming) $ python percentile_issue.py 8.55 8.55 9.00 9.00 9.00 9.00 9.00 9.00 9.00 4.50 Differs by 50.0% 99999.00 20001.80 Differs by 80.0%
https://bugs.launchpad.net/rally/+bug/1569416
CC-MAIN-2019-18
refinedweb
158
71.1
import "github.com/panthesingh/goson" Goson object Parse will create a goson object from json data Bool returns the bool value. Float returns the underlying float64 value. Get returns a goson object from a key. If the value does not exist this will still return a goson object. Index is used to access the index of an array object. Int returns the underlying Int value converted from a float64. Len will return len() on the underlying value. If the value does not have a length the return value will be 0. Map returns the underlying map value. Set returns a goson object after change the value If the value does not exist this will still return a goson object. Slice returns the underlying slice value. String will convert the underlying value as a string if it can or return an empty string. If the object is a JSON map or array it will return the structure in an indented format. Value will retrieve the underlying interface value. Package goson imports 2 packages (graph). Updated 2018-08-15. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).
https://godoc.org/github.com/panthesingh/goson
CC-MAIN-2018-51
refinedweb
198
68.36
Hi, ST2 asked me to update a few days ago, which I have done. Now I no longer see the character encoding or line termination type in the status bar. I swear this was there before the update (or am I crazy and it wasn't?), but now all I see is line and column numbers on the left hand side. Also, when I start a new document and paste in some PHP the syntax highlighting is correct but the selected syntax in the View->Syntax menu is wrong. It will either remain Plain Text or become HTML (??), for example: <?php echo 'hello'; ...results in no change to the Plain Text syntax selection, but the colors are properly applied. <?php class MyClass { } Syntax = HTML <?php class MyClass { } ?> Syntax = Plain Text <?php function poop() { return null; } <?php namespace \myns; use \Exception; try { throw new Exception('ಠ_ಠ'); } catch (Exception $e) { throw $e; } Actually, it almost seems to depend on the source of the paste? Even though the syntax highlighting always works properly, I can never get it to identify the syntax type as PHP. Thanks! I can't speak to the encoding and LT issues you're seeing, but it appears 2051 broke column select on the Mac. Instead of control + left click selecting in column mode, it inherits the OSX default of a secondary click (context menu). I rolled back to 2047 temporarily... None of the mouse methods outlined in the link below allow column selection:sublimetext.com/docs/2/column_selection.html aguenter: that's all working as designed. The status bar has never shown encoding nor line endings in Sublime Text 2, that's from Sublime Text 1. It is on the todo list though. When you paste source code into an empty file, it will attempt to automatically detect the syntax of what was pasted in. HTML is the correct syntax to use for .php files (as it's the 'outer' syntax if you like). When you select PHP from the menu it's just acting as an alias for HTML. benforr: Column select on mac is now option+left click, so that ctrl+click can show the context menu. I've updated the documentation to reflect this now. Thanks for the reply! Regarding the syntax issue, I don't quite understand the purpose of the syntax menu, then. Does this not change which package is used? Personally, I pretty much never write PHP blocks within markup, and as HTML is only the "outer syntax" when PHP is being interpreted for Apache/IIS/whatever this seems incorrect to me. I'm sure you're aware that PHP is a scripting language with a standalone interpreter that, although often used via CGI or as a webserver module, is much more than that. Also, there still seems to be an issue with detection regardless of the semantics, as sometimes it never changes from Plain Text to HTML (as evidenced in my examples). One more thing, if I may. This one might be in the wrong forum section, but I'm not sure that it deserves a new post as I don't know if it is a feature request or bug report:I'm using tab indentation and I've noticed that when I'm within a nested block and insert a linefeed/carriage return it will properly indent the new line to the current indentation level, but if I don't type anything and insert another LF, the blank line I had created does not preserve its indentation. Rather, it truncates it completely and only the LF remains. For example: {<LF> <cursor is here>blahblah<LF> <cursor is here, previous line preserved indentation><LF> <cursor is here, previous line lost indentation> Is this expected behavior (to reduce file size maybe)? If so, would you mind making this a boolean toggle in the config? I know in order to add something to a blank line you can just move the cursor to the beginning of it, press TAB once, and it will return to the proper indentation level...but, I'm using adzenith's Indent Guides plugin and it causes broken indentation guide lines which looks horrible. Line wrapping also breaks them too, obviously, but this is expected behavior as it's still the same line. Here's a screencap: The syntax detection is not sophisticated, and will generally not detect HTML. It's mostly there to detect the blindingly obvious cases, such as when a file starts with "#!/usr/bin/python". The syntax menu is used to explicitly set the syntax, for new files, or when the syntax detection doesn't do what you want. Wtih regards to your indentation question, it sounds like turning off the trim_automatic_white_space setting will do what you want. Brilliant, that did it. Thanks. Thanks jps, option works as advertised for column selection. I tried shift, command, not sure why I didn't try option, it is the 'magic' button in OSX, makes sense :-S
https://forum.sublimetext.com/t/latest-v2-b2051-broken/1491/4
CC-MAIN-2017-22
refinedweb
830
71.75
uniplate Help writing simple, concise and fast generic operations. See all snapshots uniplate appears in uniplate-1.6.13@sha256:c8b715570d0b4baa72512e677552dd3f98372a64bf9de000e779bd4162fd7be7,3320 Module documentation for 1.6.13 - Boilerplate Removal with Uniplate here, along with a video presentation, and the associated thesis chapter. Uniplate is a simple, concise and fast generics library. To expand on that sentence: - A generics library is one which allows you to write functions that operate over a data structure without tying down all aspects of the data structure. In particular, when writing an operation, you don’t need to give a case for each constructor, and you don’t have to state which fields are recursive. - Uniplate is the simplest generics library. Using Uniplate is within the reach of all Haskell programmers. - Uniplate is more concise than any other generics library. - Uniplate is fast, not always the absolute fastest, but massively faster than many generics libraries. - Uniplate is also less powerful than some other generics libraries, but if it does the job, you should use it. The Uniplate library can be installed with the standard sequence of cabal commands: cabal update cabal install uniplate This document proceeds as follows: - Using Uniplate - Using Biplate - Making Uniplate Faster Acknowledgements Thanks to Björn Bringert for feedback on an earlier version of this document, Eric Mertens for various ideas and code snippets, and to Matt Naylor and Tom Shackell for helpful discussions. Using Uniplate To demonstrate the facilities of Uniplate, we use a simple arithmetic type: In this definition, the Uniplate specific bits are bolded. The three extra parts are: import Data.Generics.Uniplate.Data, this module contains all the Uniplate functions and definitions. deriving (Data,Typeable), this deriving clause automatically adds the necessary instances for Uniplate. {-# LANGUAGE DeriveDataTypeable #-}, this pragma turns on language support for the deriving line. Datainstances automatically have the necessary Uniplate instances. In the following subsections we introduce the Uniplate functions, along with examples of using them. The two most commonly used functions are universe (used for queries) and transform (used for transformations). Finding the constant values the root of the tree, and all its subtrees at all levels. This can be used to quickly flatten a tree structure into a list, for quick analysis via list comprehensions, as is done above. Exercise: Write a function to test if an expression performs a division by the literal zero. Basic optimisation let’s so that adding x to Mul x (Val 2) produces a multiplication by 3. Depth of an expression para :: Uniplate on => (on -> [res] -> res) -> on -> res Now let’s imagine that programmers in your language are paid by the depth of expression they produce, so let’s. Renumbering literals occurrence is detected, replace that literal with zero. Generating mutants. Fixed point optimisation rewrite :: Uniplate on => (on -> Maybe on) -> on -> on When slotting many transformations together, often one optimisation will enable another. For example, the the optimisation to reduce. Descend Do something different in the odd and even cases. Particularly useful if you have free variables and are passing state downwards. Monadic Variants. Single Depth Varaints children :: Uniplate on => on -> [on] -- universe descend :: (on -> on) -> on -> on -- transform holes :: Uniplate on => on -> [(on, on -> on)] -- contexts Lots of functions which operate over the entire tree also operate over just one level. Usually you want to use the multiple level version, but when needing more explicit control the others are handy. Evaluation If we need to evaluate an expression in our language, the answer is simple, don’t use Uniplate! The reasons are that there is little boilerplate, you have to handle every case separately. For example in our language we can write: eval :: Expr -> Int eval (Val i) = i eval (Add a b) = eval a + eval b eval (Sub a b) = eval a - eval b eval (Div a b) = eval a `div` eval b eval (Mul a b) = eval a * eval b eval (Neg a) = negate a Using Biplate have descendBi in an inner recursive loop. Making Uniplate Faster To make Uniplate faster import Data.Generics.Uniplate.Direct and write your instances by hand. Related work - Geniplate, by Lennart Augustsson, Uniplate compatible but implemented using Template Haskell. - Refactoring Uniplate, by Sebastian Fischer - proposing a slightly different Uniplate API, but with the same underlying concepts. - Uniplate for Curry, by Sebastian Fischer - using his revised API as above. - Uniplate for ML (in MLton), as part of the MLton generics library. - Uniplate for data types with embedded monads, by Tom Schrijvers - Multiplate, by Russell O’Connor, similar ideas to Uniplate but with a very different underlying substrate. - Infer.Toys provides a Uniplate-inspired Elemsmodule. Changes 1.6.13, released 2020-11-07 Remove support from pre-GHC 8.0 #31, GHC 9.0 compatibility Change descendM to be applicative, not monadic 1.6.12, released 2013-10-26 Allow compilation with clang 1.6.11, released 2013-08-14 Work around more excessive strictness, gives 10x speed improvement 1.6.10, released 2012-12-14 Allow hashable-1.2 Work around excessive strictness in unordered-containers-0.2.3.0 1.6.9, released 2012-12-08 Remove dependencies on an old internal module More performance work (speculative) 1.6.8, released 2012-12-05 Significant speed up to default descend/descendM versions Implement faster descendM/descendBiM for the Data version Add RULES for the Direct method which follow plate identities Disallow unordered-containers 0.2.0.* 1.6.7, released 2012-03-08 Allow unordered-containers 0.2.* 1.6.6, released 2012-02-15 Require hashable-1.1.2.3, which has a TypeRep instance 1.6.5, released 2011-11-05 Add more instances for the Data.Instances, such as Ord/Eq 1.6.4, released 2011-11-05 Give better Data instances for the containers package 1.6.3, released 2011-10-11 #454, use unordered-containers on GHC 7.2 and above (faster) 1.6.2, released 2011-08-16 Given a Map/Set (or anything with NorepType) ignore it Add $UNIPLATE_VERBOSE to give messages about cache construction 1.6.1, released 2011-08-11 #435, mark things that were recommended not to use as deprecated #449, GHC 7.2 compatibility 1.6, released 2010-11-10 GHC 7 compatibility Eliminate mtl dependency Add transformer/transformBis, along with better documentation #364, add a zipper in Data.Generics.Uniplate.Zipper Add an Eq instance for Str 1.5.1, released 2010-01-24 Fix a typo in the synopsis 1.5, released 2010-01-23 Massive speed improvements to Data loading initial cache 1.4, released 2010-01-12 Add back performance enhancement for Rationals 1.3, released 2010-01-03 Rewrite, simplify, roll out Data.Generics.Uniplate.* 1.2, released 2008-07-08 Allow Data operations to work on Rational 1.1, not on Hackage Add versions based on Str 1.0, released 2007-06-13 Initial release
https://www.stackage.org/lts-18.6/package/uniplate-1.6.13
CC-MAIN-2022-33
refinedweb
1,146
57.37
My code looks like this ifstream myfile; string fileName; cin >> filename; myfile.open(fileName); I'm getting a rather lengthy error message and can't figure out how to pipe it to a file(I tried a couple things and think I might not have permissions, since I'm on my school's remote terminal), so I took a screenshot. Sorry if that's taboo, but it was the quickest thing I could think of. The line it is referencing(main.cpp 22) is the line myfile.open(fileName); Again, compiles and runs perfectly in Visual Studio 2013, but not in this linux shell. Honestly, if anyone could help me understand the error message that would be a start. Thanks in advance for any help You need to use the compiler flag -std=c++11. The following program compiles and builds fine on my machine using: g++ -Wall -std=c++11 test-484.cc -o test-484 #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream myfile; string fileName; cin >> fileName; myfile.open(fileName); return 0; } BTW, in your posted code, you have string filename; ^^ lower case n not upper case N If you are not using C++11, you can also do the following: #include <iostream> #include <fstream> #include <string> int main () { std::ifstream myfile; std::string fileName; std::cin >> fileName; myfile.open(fileName.c_str()); } But accessing the C string directly this way is not a good thing, if possible, follow R Sahu's suggestion to use C++11.
http://m.dlxedu.com/m/askdetail/3/25e82dc90bb97f3050c8804ff927702b.html
CC-MAIN-2018-30
refinedweb
253
69.52
Generics and Reflection (C# Programming Guide) Because the Common Language Runtime (CLR) has access to generic type information at run time, you can use reflection to obtain information about generic types in the same way as for non-generic types. For more information, see Generics in the Run Time (C# Programming Guide). In the .NET Framework 2.0 several new members are added to the Type class to enable run-time information for generic types. See the documentation on these classes for more information on how to use these methods and properties. The System.Reflection.Emit namespace also contains new members that support generics. See How to: Define a Generic Type with Reflection Emit. For a list of the invariant conditions for terms used in generic reflection, see the IsGenericType property remarks. In addition, new members are added to the MethodInfo class to enable run-time information for generic methods. See the IsGenericMethod property remarks for a list of invariant conditions for terms used to reflect on generic methods.
http://msdn.microsoft.com/en-us/library/ms173128(v=vs.110).aspx
CC-MAIN-2014-23
refinedweb
169
54.93
18 March 2011 04:01 [Source: ICIS news] SINGAPORE (ICIS)--?xml:namespace> The unit was taken off line in the wake of the massive earthquake and tsunami that struck The plant is a joint venture between Mitsui and Idemitsu Kosan, with a 230,000 tonne/year capacity for phenol and can produce 138,000 tonnes/year of acetone. Mitsui Chemicals is ramping up production at this unit, the source said. The company runs another phenol-acetone plant in Please visit the complete ICIS plants and projects database For more information on phenol-acetone, visit ICIS chemical intelligence Please click here for the latest news
http://www.icis.com/Articles/2011/03/18/9445013/japan-disaster-mitsui-chem-restarts-chiba-phenol-acetone-plant.html
CC-MAIN-2015-22
refinedweb
104
55.78
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. override method in jasper_reports module I am trying to override a method from JasperReports/JasperServer.py within my own module, I have the following class defined class JasperServer(): # tried all still doesnt work #_inherit = 'JasperServer' #_inherit = 'jasper_reports.JasperServer' _inherit = 'jasper_report.JasperServer' def start(self): # code goes here JasperServer() import statement for this class has been added to __init__.py dependency for jasper_reports has been added to __openerp__.py of my custom-module what am I doing wrong? I notice the original jasper code does not define any _name variables, does that mean it cannot be overriden? I would prefer not to change the code directly into the original JasperServer.py if possible. About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/override-method-in-jasper-reports-module-37949
CC-MAIN-2018-22
refinedweb
167
59.6
... CodingForums.com > :: Computing & Sciences > Computer Programming > new to programming help needed thank you PDA new to programming help needed thank you williama 10-17-2011, 08:48 PM Can anyone tell me why this keeps blowing up? The first part of this post is what it is suppose to do and then I post my source code. It needs to be in C and compile on emacs, with gcc -Wall std=99 Thank you all. Write a program weekday.c that prompts the user for a date (entered as month/day) this year, and outputs the day of the week the date falls on. Use the fact that this year (2011), January 1st was a Saturday and that January, March, May, July, August, October, and December have 31 days, April, June, September, and November have 30 days, and February this year had 28 days. Note: Do not specify in the program the rst day of each month (e.g., that February 1st will fall on a Tuesday, etc.). Instead, use one switch statement to calculate the number of days till the date entered, and another switch statement to print the day of the week. Here is a sample run: (~)$ a.out Enter today's date: 03/21 Happy Monday! (~)$ a.out Enter today's date: 5/14 Happy Saturday! (~)$ a.out Enter today's date: 11/24 Happy Thursday! Here is my source code: // program to return the day of the week given the date (jan 1st Sat.) #include <stdio.h> int main() {char input[6]; int i,month=0,day=0; printf("Enter today's date:(m/d) "); scanf("%s",(char*)&input); //get the date as characters since the input is numbers and a / for(i=0;input[i]!='/';i++) //get all the numbers before the / for the month month=month*10+(input[i]-'0'); //convert to integer (the -'0', and for a number i++; //example 25 is 2*10 + 5 for(;input[i]!='\0';i++) //skip over the slash and do the same to create day=day*10+(input[i]-'0'); //the day, stopping when you get the null day--; //subtract 1 from the day since starting at day 1 and Jan just is day 1, but 1+1=2 for(i=1;i<month;i++) //add the number of days in each complete month {switch(i) // before the date. example March 3 {case 1: //add 31 days for Jan, and 28 for Feb to 3 case 3: case 5: case 7: case 8: case 10: case 12: day+=31; break; case 2: day+=28; break; default: day+=30; break; } } day%=7; //now have the day of the year your date is get it into 0 through 7 switch(day) //and find out which day it is. Since Jan 1 was a Saturday, day 0 is Saturday { case 1: printf("Happy Sunday!\n"); break; case 2: printf("Happy Monday!\n"); break; case 3: printf("Happy Tuesday!\n"); break; case 4: printf("Happy Wednesday!\n"); break; case 5: printf("Happy Thursday!\n"); break; case 6: printf("Happy Friday!\n"); break; case 0: printf("Happy Saturday!\n"); break; } return 0;} oracleguy 10-17-2011, 09:45 PM "Blowing up" is a very unhelpful description. Help us help you and describe what exactly isn't working. Does it not compile or does it not run correctly? In the latter case describe when exactly does it all go wrong and do you get any error messages? williama 10-17-2011, 10:14 PM The emacs compiler shows: weekday.c: In function 'main': weekday.c:8: error: 'month' undeclared (first use in this function) weekday.c:8: error: (Each undeclared identifier is reported only once weekday.c:8: error: for each function it appears in.) weekday.c:8: error: 'day' undeclared (first use in this function) weekday.c:9: error: expected ',' or ';' before 'int' weekday.c:19: error: missing terminating " character weekday.c:8: warning: unused variable 'value2' weekday.c:8: warning: unused variable 'value1' weekday.c:59: warning: control reaches end of non-void function bobleny 10-17-2011, 11:51 PM The compile errors and warning you are getting don't appear to coincide with the code you have posted. Are you sure the emac printout is for that exact code? CodeBeast 10-26-2011, 02:04 PM I don't know if it helps,I have compiled successfully your code in dev c++ No errors at my end. I really reccomend you to use the dev c++ compiler or the Turbo c++ (ipreffer the dev one) Regards. logoonlinepros 10-28-2011, 01:01 PM I must agree with some friends you should use c++ compiler, i would like to prefer c++ EZ Archive Ads Plugin for vBulletin Computer Help Forum vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.
http://www.codingforums.com/archive/index.php/t-241215.html
CC-MAIN-2013-48
refinedweb
800
73.07
Pythonic, yet C-style structs. Project description struction Pythonic, yet C-Style structs/unions. Structs are similar to namedtuples, but they allow type assertion and are defined the same way as any class. Creating a struct is easy. $ pip install struction from struction import Struct, default, between, clamp class MyStruct(Struct): # any types specified *must* be a class/type field_0 = int field_1 = str # you can also allow multiple types multi_type = int, str # and default values! with_default = int, default(10) with_multi_and_default = int, str, default(10) # it's also possible to set a specific range for fields with_range = int, float, between(1, 10) # setting this to a value < 1 or > 10 will raise ValueError # or, values can be clamped to a range with_clamp = int, float, clamp(-5, 5) # setting this to any value outside of range will clamp it Once a struct is created, it’s fields can be changed, but they must match the given type or a TypeError will be raised. Using del on a field resets it to its default value. It’s also possible to nest structs. Any structs that are nested will automatically be initialized. class NestMe(Struct): field_0 = int field_1 = int class Nester(Struct): abc = str nest = OnlyInt # nested struct >>> print(Nester()) # Nester { # abc = None # nest = OnlyInt { # field_0 = None # field_1 = None # } # } >>> print(Nester(nest=None)) # Nester { # abc = None # nest = None # } If you don’t want strict types, you can also use a TypecastingStruct. This will attempt to typecast the given value to the field’s type. If it can’t be typecasted, it will then raise a TypeError. from struction import TypecastingStruct class Test(TypecastingStruct): i = int f = float s = str all = float, int, str >>> test = Test() >>> test.i = 5.3 >>> test.f = 100 >>> test.s = {"a": 1, "b":2} >>> print(test) # Struct Test { # all = None # f = 100.0 # i = 5 # s = "{'a': 1, 'b': 2}" # } >>> # If multiple types are allowed for a field, the value will be >>> # casted to the first type that doesn't throw an Exception >>> test.all = ("a", 1, "b", 2, "c", 3) >>> test.all # '("a", 1, "b", 2, "c", 3)' Note: Typecasting only works at runtime. The values still need to match their types at class definition. Reference These can be applied to any Struct class. - Struct.dict() : dict with struct’s fields. {name: value, …} - Struct.fields() : list of fields struct has. - str(Struct) : Multi-line representation of struct. - repr(Struct) : Single line representation of struct. Project details Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/Struction/
CC-MAIN-2019-47
refinedweb
428
73.78
Jomo Fisher—I’ve run into a performance problem several times in my career that I’ve never found a truly satisfying answer for until now. The problem can be distilled down to this: Look up a value based on a string key. The set of strings is fixed and no unknown key values can occur. Consider my personal rankings of the Seven Dwarves on a scale of 1-10: happy=9, sneezy=2, doc=7, sleepy=8, dopey=9, grumpy=2, bashful=6 I need a function that takes a name and returns a ranking. The default solution for this problem should be to use a Dictionary or HashTable. The implementations that ship with the .NET framework are extremely fast. However, these container classes offer more features than I need for this problem. New keys can be added but my set is fixed. They can tell you whether a key is valid or not but I know a priori that the keys are limited to a fixed set. They can enumerate the set of keys or the set of values but I don’t need this capability. Any time I see a data structure with a capability I’m not using it makes me wonder whether I can trade that capability for something I do need—in this case a speed boost. If I was really desperate for a performance gain then it was possible to write a function like: static int Lookup(string s) { if (s.Length < 6) { if (s.Length < 5) return 7; else return 9; } else { if (s[0] < 's') { if (s[0] < 'g') return 6; else return 2; } else { if (s[1] < 'n') return 8; } } } Notice that we only have to look at the length and the first two characters of the string to make the decision. This function is fast but nearly impossible to maintain or debug. Also, I have to know the set of strings at compile time. All of these drawbacks make this approach significantly less useful. Enter the LINQ Expression Compiler that will be available in the .NET 3.5. With the new expression support it’s possible to write an expression at runtime and then compile this expression into straight IL (which will be jitted into machine code). It turned out to be pretty easy to write a switch compiler that would generate an appropriate lookup expression on the fly. I wrote a class called SwitchCompiler to do the heavy lifting. Here’s how it’s called: var dict = new Dictionary<string, int> { {"happy", 9}, {"sneezy", 2}, {"doc", 7}, {"sleepy", 8}, {"dopey", 9}, {"grumpy", 2}, {"bashful", 6} }; var Lookup = SwitchCompiler.CreateSwitch(dict); var v = Lookup("doc"); Debug.Assert(v == 7); SwitchCompiler first builds up an expression that looks like this: s.Length < 6 ? (s.Length < 5 ? 7 : 9) : (s[0] < 's' ? (s[0] < 'g' ? 6 : 2) : (s[1] < 'n' ? 8 : 2)); And then compiles this into a delegate returned into Lookup. (It should also be possible to generate a perfect minimal hash in the Compile method. I haven't tried this). The actual implementation of SwitchCompiler is about 65 lines of code. You can see it in the attachment. On my machine, looking up each value in a tight loop 1 million times takes 70ms while the corresponding loop using Dictionary takes 697ms. That’s close to a 900% performance improvement. This posting is provided "AS IS" with no warranties, and confers no rights. If you would like to receive an email when updates are made to this post, please register here RSS That's pretty impressive performance for a VM-based language. The C++ equivelent, 1 million iterations, runs in about 55 ms, on a Pentium 4, 3.4 Ghz. Here's the code: struct KeyValue { const char* key; int value; inline bool operator < (const KeyValue& that) const { return strcmp(this->key, that.key) < 0; } }; static const KeyValue kvs[] = { {"bashful", 6}, {"doc", 7}, {"dopey", 9}, {"grumpy", 2}, {"happy", 9}, {"sleepy", 8}, {"sneezy", 2}, }, * const kvs_end = kvs + (sizeof(kvs) / sizeof(0[kvs])); inline int Lookup(const char* s) { KeyValue key = { s }; return std::lower_bound(kvs, kvs_end, key)->value; } int _tmain(int argc, _TCHAR* argv[]) { LARGE_INTEGER begin, end, frequency; QueryPerformanceCounter(&begin); const KeyValue* k = kvs; int total = 0; // Just so the compiler doesn't completely optimize out the for loop. for (int i = 0; i < 1000000; ++i) { total += Lookup(k->key); if (++k == kvs_end) k = kvs; QueryPerformanceCounter(&end); QueryPerformanceFrequency(&frequency); __int64 ms = (end.QuadPart - begin.QuadPart) * 1000 / frequency.QuadPart; cout << "Total:\t" << total << endl; cout << "Milliseconds:\t" << ms << endl; One minor benefit of the C++ code is that there is no overhead of creating a lookup table before the first call to Lookup(). Hi Jeff, I tried your code on my machine and amazingly got exactly 55ms. That makes your orange look a little more like my apple. Your comment made me realize my implementation has one more feature that I could possibly throw away: there's an array bounds check on the string index operations. I think I could get rid of this by emitting 'unsafe' code. Unfortunately, I think I'd have to bypass the expression compiler to do this. I seem to be within spitting distance of optimized C++, that's pretty cool considering how amazing the VS C++ optimizer is. Jomo Here's my test code in case anyone wants to reproduce my result: /* Use of included script samples are subject to the terms specified at Written by Jomo Fisher */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using FastSwitch; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var dict = new Dictionary<string, int> { {"happy", 9}, {"sneezy", 2}, {"doc", 7}, {"sleepy", 8}, {"dopey", 9}, {"grumpy", 2}, {"bashful", 6} }; const int count = 1000000; DateTime start = DateTime.Now; for (int i = 0; i < count; ++i) { var v = dict["happy"]; v = dict["sneezy"]; v = dict["doc"]; v = dict["sleepy"]; v = dict["dopey"]; v = dict["grumpy"]; v = dict["bashful"]; } TimeSpan elapsed = DateTime.Now - start; Console.WriteLine("Dictionary: {0} ms", elapsed.TotalMilliseconds); var compiled = SwitchCompiler.CreateSwitch(dict); start = DateTime.Now; var v = compiled("doc"); System.Diagnostics.Debug.Assert(v == 7); v = compiled("happy"); System.Diagnostics.Debug.Assert(v == 9); v = compiled("sneezy"); System.Diagnostics.Debug.Assert(v == 2); v = compiled("sleepy"); System.Diagnostics.Debug.Assert(v == 8); v = compiled("dopey"); v = compiled("grumpy"); v = compiled("bashful"); System.Diagnostics.Debug.Assert(v == 6); elapsed = DateTime.Now - start; Console.WriteLine("Compiled: {0} ms", elapsed.TotalMilliseconds); } } You've been kicked (a good thing) - Trackback from DotNetKicks.com Looks like you want a perfect hash or a minimal perfect hash? See e.g. I don't know about a c# implementation though. The c++ code and c# code are timing 2 different things. the c++ code is cycling through each key for a total of 1,000,000 lookups. the c# code is looking each key up 1,000,000 times for a total of 7,000,000 lookups. Justin, You're right. I should have noticed the C++ code was doing 1/7th of the lookups as the C# code. When I adjust the C++ code, it dutifully reports 385ms which is pretty close to what the plain old .NET dictionary was doing. So I guess the LINQ algorithm is in the cat-bird seat, at least for a the time-being. I also noticed the C++ answer requires that the set of keys be sorted alphabetically before lookups can commence, so there *is* a little preparation time. Tom, I had considered a minimal perfect hash (and I had even looked at the exact page you sent me). I still think the LINQ algorithm should perform better in many cases because that perfect hashing algorithm is O(n) on the number of bytes in the input key. The LINQ algorithm is O(log N) on the number of bytes in the key. In particular, I think the LINQ algorithm will outpace the other when the size of the keys is large and the length of the keys is non-uniform. Of course the big-O notation can hide a potentially large constant factor, but I don't really see why it would in this case here. Also, keep in mind that that particular minimal perfect hash implementation is throwing away a feature that I wanted to keep: It can't easily accomodate key sets that are available only at run time. The C++ compiler optimized out the entire loop in my first version. I added the total variable, and it still optimized out the whole loop. I added the cout statement at the bottom and it finally executed the code. Any sign the C# compiler is optimizing out the whole loop in the C# code? The C# compiler is definitely not removing the loop--for one, it has no way to determine whether the delegate has side-effects that need to be preserved. This can be seen by increasing the number of iterations--2M loops run in twice the time as 1M. Wow, your switch compiler and the .Net VM is very impressive indeed. My fastest run of the following C++ code was 88 ms. Note also that I kind of cheated and used std::find instead of std::lower_bound, because when there are only 1 or 2 elements in the vector, std::find runs much faster. #include "stdafx.h" struct CharValue { int char_; bool terminal_; union { int value_; size_t next_index_; vector<CharValue>* next_; }; ptrdiff_t char_step_; inline bool operator < (const CharValue& value, int c) { return value.char_ < c; inline bool operator < (int c, const CharValue& value) { return c < value.char_; inline bool operator == (const CharValue& value, int c) { return value.char_ == c; class KnownSetTrie { public: typedef vector<CharValue> CharMap; vector<CharMap> tree_; ptrdiff_t first_step_; template <typename Iter> KnownSetTrie(Iter begin, Iter end) { first_step_ = Compile(begin, end, 0) - 1; // Now that the tree_ is stable, convert indices to node pointers. for(vector<CharMap>::iterator i = tree_.begin(); i != tree_.end(); ++i) { for (CharMap::iterator j = i->begin(); j != i->end(); ++j) if (!j->terminal_) j->next_ = &tree_[j->next_index_]; } ptrdiff_t Compile(Iter begin, Iter end, ptrdiff_t char_index) { CharMap map; Iter start = begin, i = begin + 1; while (true) { CharValue value; value.char_ = start->key[char_index]; if (i != end && i->key[char_index] == start->key[char_index]) { do { ++i; } while (i != end && i->key[char_index] == start->key[char_index]); value.terminal_ = false; value.char_step_ = Compile(start, i, char_index + 1); value.next_index_ = tree_.size() - 1; } else { value.terminal_ = true; value.value_ = start->value; } map.push_back(value); if (i == end) break; start = i++; if (1 == map.size() && !map.front().terminal_) { // Pass through node: return map.front().char_step_ + 1; tree_.push_back(map); return 1; inline int Lookup(const char* s) const { const CharMap* node = &tree_.back(); s += first_step_; const CharMap::const_iterator value = find(node->begin(), node->end(), *s); if (value->terminal_) return value->value_; s += value->char_step_; node = value->next_; KnownSetTrie trie(kvs, kvs_end); for (const KeyValue* k = kvs; k != kvs_end; ++k) total += trie.Lookup(k->key); It seems the LINQ guys have done a great job of optimization inside of the LINQ namespace (System.Linq).... I got the C++ code down to 70 ms. It took a __fastcall and some fun struct packing, though. I can't wait to use C# .Net! int char_ : 8; int terminal_ : 1; int char_step_ : 23; CharMap* root_; root_ = &tree_.back(); int __fastcall Lookup(const char* s) const { const CharMap* node = root_; total += trie.Lookup(k->key); It seems the LINQ guys have done a great job of optimization inside of the LINQ namespace (System.Linq). Hey Jeff, That's a really nice solution. I was wondering whether a trie could help here. Okay, this is insane. How could you rate grumpy and sneezy as a 2? Unless of course 1 is the best and 10 is the worst. This "SwitchCompiler.CreateSwitch" is absolutely amazing. It's a best of both world's sort of solution -- we can focus on the high level problem, and have Linq provide optimisations that would otherwise be utterly unmaintainable and difficult to perform manually. Brilliant stuff. Thank you. lb Recently my time has been taken up with a series of internal issues involving Beta1, C# Samples and various A faster solution than a trie is a hand-built binary search tree, which is what I imagine case statement compiler does. This code runs around 55 ms, and doesn't cheat like my earlier code with __fastcalls or std::find() in place of std::lower_bound(): Sorry for turning this into a language shoot-out, but this looked like such an interesting case to play with. And again the .Net runtime performs astoundingly well. const char* key; int value; {"bashful", 6}, {"doc", 7}, {"dopey", 9}, {"grumpy", 2}, {"happy", 9}, {"sleepy", 8}, {"sneezy", 2}, struct DTreeNode; struct DTreeStep { bool terminal; union { int retval; int char_step; }; DTreeNode* next; size_t next_index; struct DTreeNode { char c; DTreeStep less_step, ge_step; class DTree { vector<DTreeNode> nodes_; DTreeStep root_step_; template <typename Iter> DTree(Iter begin, Iter end) { root_step_ = Compile(begin, end, 0); // Convert indices into pointers. for (vector<DTreeNode>::iterator i = nodes_.begin(); i != nodes_.end(); ++i) { if (!i->less_step.terminal) i->less_step.next = &*(nodes_.begin() + i->less_step.next_index); if (!i->ge_step.terminal) i->ge_step.next = &*(nodes_.begin() + i->ge_step.next_index); root_step_.next = &*(nodes_.begin() + root_step_.next_index); } DTreeStep Compile(Iter begin, Iter end, ptrdiff_t char_index) { ptrdiff_t count = end - begin; DTreeStep step; if (1 == count) { step.terminal = true; step.retval = begin->value; return step; Iter middle = begin + (end - begin) / 2, middle_begin = middle, middle_end = middle + 1; while (true) { if (middle_begin == begin) break; Iter prior = middle_begin - 1; if (prior->key[char_index] == middle->key[char_index]) middle_begin = prior; else if (middle_end == end) if (middle_end->key[char_index] == middle->key[char_index]) ++middle_end; const ptrdiff_t less_count = middle_begin - begin, equal_count = middle_end - middle_begin, greater_count = end - middle_end; if (0 == less_count) { if (0 == greater_count) { // All middles, pass through step = Compile(begin, end, char_index + 1); step.char_step += 1; return step; } else { // middles and greaters middle_begin = middle_end; } DTreeNode node; node.c = middle_end->key[char_index]; node.less_step = Compile(begin, middle_begin, char_index); node.ge_step = Compile(middle_begin, end, char_index); step.terminal = false; step.char_step = 0; step.next_index = nodes_.size(); nodes_.push_back(node); return step; int Lookup(const char* s) const { const DTreeStep* step = &root_step_; const DTreeNode* node = step->next; step = *s < node->c ? &node->ge_step : &node->less_step; if (step->terminal) return step->retval; s += step->char_step; DTree dtree(kvs, kvs_end); LARGE_INTEGER begin, end, frequency; QueryPerformanceCounter(&begin); int total = 0; // Just so the compiler doesn't completely optimize out the for loop. for (int i = 0; i < 1000000; ++i) { for (const KeyValue* k = kvs; k != kvs_end; ++k) total += dtree.Lookup(k->key); QueryPerformanceCounter(&end); QueryPerformanceFrequency(&frequency); __int64 ms = (end.QuadPart - begin.QuadPart) * 1000 / frequency.QuadPart; cout << "Total:\t" << total << endl; cout << "Milliseconds:\t" << ms << endl; ahh, I have no idea how you lot managed to get such results on 3.4 ghz machines for the standard dictionary tests. heres my code.. using standard generic dictionary and I get wihout fail 92-93ms lookup times for 1 million loops. I havent tried the linq version on my machine as I'm only running .net 2.0 but even comparing the results for linq here (even though this is distorted due to difference in machines used) the difference is a max of 20%.. nothing like the 900% claimed. by the way.. my tests were all run on a p4 2.4 ghz machine... i'm sure using a cpu that clocks 30% faster will also reduce the performance gap between my results and those posted in the original statement. PS. dont use datetime for monitoring performance as datetime is not updated every tick.. my experience is that datetime as a +/- difference of 30-40 ms on a good day vs the stopwatch class. anyway heres the code I run my tests with. Dictionary<string, int> index = new Dictionary<string, int>(); index.Add("happy", 9); index.Add("sneezy", 2); index.Add("doc", 7); index.Add("sleepy", 8); index.Add("dopey", 9); index.Add("grumpy", 2); int found = 0; Stopwatch sw = new Stopwatch(); sw.Start(); for (int i = 0; i < 1000000; i++) found = index["doc"]; long elapsed = sw.ElapsedMilliseconds; sw.Stop(); sw = null; Zan, Your test is only looking up one value in a loop. Our tests are looking up seven values in a loop. You can see the actual test code in the comments above. If you adjust your test to match you'll get ~650ms. I found that using KeyValuePair<string,TR> instead of Case<TR> allows to expose the function CreateSwitch to have a IEnumerable<KeyValuePair<string,TR>> parameter this allows these uses: public static Func<string, TR> CreateSwitch<TR>(this IEnumerable<string> strings, Func<string, TR> func) { return CreateSwitch(from s in strings select new KeyValuePair<string, TR>(s, func(s))); } public static Func<string, IEnumerable<TR>> EnumerableInvert<TR>(this IEnumerable<TR> values, Func<TR, string> name) I added the fllowing check in the function: public static Func<string, TR> CreateSwitch<TR>(this IEnumerable<KeyValuePair<string, TR>> caseDict) if (caseDict.Count() != caseDict.Distinct().Count()) throw new ArgumentException("duplicate names"); var cases = caseDict.ToArray(); var p = Expression.Parameter(typeof(string), "p"); var expr = Expression.Lambda<Func<string, TR>>( BuildStringLength( p, cases.ToOrderedArray(s => s.Key.Length), 0, cases.Length - 1), new ParameterExpression[] { p } ); var del = expr.Compile(); return del; return CreateSwitch(from v in values group v by name(v) into byname select new KeyValuePair<string, IEnumerable<TR>>(byname.Key, byname)); public static Func<string,TR> Invert<TR>(this IEnumerable<TR> values, Func<TR, string> name) return CreateSwitch(from v in values group v by name(v) into byname select new KeyValuePair<string, TR>(byname.Key, byname.First())); public static Func<string, TR> ParseEnum<TR>() //where TR: Enum return CreateSwitch(from v in (TR[])Enum.GetValues(typeof(TR)).OfType<TR>() select new KeyValuePair<string, TR>(Enum.GetName(typeof(TR), v), v)); Rico Mariani has been posting about LINQ to SQL perfomance and has finally posted the performance numbers Jomo Fisher—A lot of people (myself included) have written about LINQ in the next version of C#. LINQ Great stuff Jomo! Unfortunately it doesn't work with this dictionary: {"Ado", i++}, {"A2o", i++}, {"A2i", i++}, {"B2o", i++}, {"AdoX", i++}, {"AdPX", i++} It crashes with an IndexOutOfRangeException in BuildStringChar() because it gets a set of strings that are of different lengths. It seems to me that both your if statements that deal with middle are incorrect. If I replace middle with upper in those and in both calls to FirstDifferentDown() it almost works. Another problem I had to fix is that ToOrderedArray() orders the strings in a way that is not consistent with the Char comparisons in the resulting delegate. In this case it breaks down because 'o' < 'P' is false while "AdoX".CompareTo("AdPX") is -1. My solution was to make a new ToOrderedArray() that takes an IComparer<string> and passes it on to OrderBy(). I then pass it the Instance member from this class: internal class StringCharComparer : IComparer<string> public static StringCharComparer Instance = new StringCharComparer(); public int Compare(string x, string y) { for (int i = 0; i < Math.Min(x.Length, y.Length); i++) { if (x[i] > y[i]) return 1; else if (x[i] < y[i]) return -1; if (x.Length == y.Length) return 0; else if (x.Length > y.Length) return 1; else return -1; By the way, it was pure luck that the dictionaries I tried exposed these bugs. Thoughts? Raptor, I think you're right on both accounts. Thanks for pointing this out. Nice, one thing I did was add the optimized Lookup into the testing for comparison. This is where one decides if the lookup is a dynamic list and if the dictionary will change over time. Even though the optimized Lookup is hard to maintain and debug that would be OK if it list was static and did not change over time. But if it does change then one has choices to build a Compiled Expression versus a conventional way. The new idea would be to take a conversional way of doing something and turning it into an Expression that could be compiled and may have performance gains. I like how you take something as simple as a lookup that one might think as being optimized but showing that by building an optimized expression the performance can be even faster. Dictionary: 700.07 ms ~ 7.8x slower Compiled: 170.017 ms ~ 1.89 - 2x slower Lookup: 90.009 ms Dictionary: 700.07 ms ~ Compiled: 170.017 ms ~ 4.12x faster Thanx for the Expresion Building logic that helps whith how all various static methods in System.Linq.Expressions are used to build a dynamic function. Nothing really to add of value, but kind of interesting. If you define the following class: class EqualityCompareStrings : IEqualityComparer<string> public bool Equals(string x, string y) { return string.Equals(x, y); } public int GetHashCode(string obj) { return obj.GetHashCode(); } And then create the dictionary with an instance of that class like Dictionary<string, int> dict = new Dictionary<string, int>(new EqualityCompareStrings()); Then you get (from my test!) a time on the non-SwitchCompiler code of about 80%. So as I said nothing really to do with the anything much, although considering how often strings are used as keys it might be a trivial optimization to put into System.Collections.Generic.EqualityComparer<T>. CreateComparer() to handle it as a special case... Assuming that I haven't done anything wrong :-) (But then you might as well use the Jomo special SwitchCompiler - but if you want to keep using Dictionary<string, ...>) Hello I've also hit on the bug that Raptor-75 pointed out. Using his StringCharComparer dindn't solve it all. If you have a complete fix can you please post it? Best Regards, Gustavo Guerra On my current project, we're in a 'make it faster' mode right now.  We've already knocked out a StaticStringDictionary - Fast Switching with LINQ revisited Hi, I posted a version that fixed the bugs found by Raptor-75 in my blog: Jomo Fisher—A while back I wrote about using LINQ to get close-to-the-metal performance in a particular
http://blogs.msdn.com/jomo_fisher/archive/2007/03/28/fast-switching-with-linq.aspx
crawl-002
refinedweb
3,686
65.83
Nullary functions are defined as an object (c++ class/struct) that is sometimes otherwise known as callable without any argument passing. Include the following at the top of any translation unit for which you are running compile time checks on your blueprint classes. Since it only uses macros and templatised objects, no linking is required for just this feature. Creating a class can be done in any namespace, it just has to satisfy the conditions outlined below: Use with the compile time concept check whenever you wish to check for a nullary function object input. For example, the Thread class (ecl_threads) utilises this in a similar way to that outlined below:
https://docs.ros.org/en/noetic/api/ecl_concepts/html/nullaryFunctionConcept.html
CC-MAIN-2021-25
refinedweb
111
57.61
I? On 3/7/07, John Meacham <john at repetae.net> wrote: > Would it be possible to move these wrappers and other data types out of > Data.Monoid and into something like > Data.Monoid.(Wrappers|Util|Combinators) or something like that? > > A huge amount of useful namespace is eaten by them and Data.Monoid is an > extremely common thing to need to import. > > I mean Dual,Endo,All,Any,Sum,Product are definitely useful, but way to > common and generically useful names to export from such a often imported > package. Arguably, the monoid wrappers around a particular type should go with that type instead of in Data.Monoid. That would mean my change would be to Data.Maybe instead of here, and All, Any, Sum, and Product would go in the Data.Bool and the Prelude (or Data.Num?). I don't care a whole lot, but unless there's a consensus to move things around, I think my change should just follow the status quo. Thanks, Jeffrey
http://www.haskell.org/pipermail/libraries/2007-March/007001.html
CC-MAIN-2014-35
refinedweb
168
75.91
The displayed numbers needs to read from right to left ie start at 0.000 and increment to 0.001, 0.002 etc. The received pulses are stored in a variable from the rotary sensor on the milling machine as the table is moved and continue incrementing, a final reading may be 2.237 . The is number is processed and displayed. When the table is moved the other way the variable will decrement and the reading may go to say -1.336 depending on when the table ends up. This is the display part of the code from the dro sketch. Code: Select all tmp = encoder0Pos / Slots * Mpitch; lcd.setCursor(0,1); lcd.print(tmp,3); lcd.print(" mm"); I tried adding some pics to help my description but failed miserable due to my lack of knowledge, sorry, need to do more reading! Code: Select all #include <HCMAX7219.h> #include <HCMAX7219.h> #include "SPI.h #define LOAD 10 HCMAX7219 HCMAX7219(LOAD); int count; void setup() { HCMAX7219.Init(); HCMAX7219.Clear(); Serial.begin(9600); } void loop() { count ++; delay (1000); Serial.println(count); float Number = count; byte DecimalPlaces = 3; byte NumberOfDigits = 8; byte Offset = 8; HCMAX7219.print7Seg(Number, DecimalPlaces, NumberOfDigits, Offset); HCMAX7219.Refresh(); }
https://forum.hobbycomponents.com/viewtopic.php?f=58&t=1794&start=40
CC-MAIN-2020-10
refinedweb
200
68.87
Java Tech: An Intelligent Nim Computer Game, Part 2 Last time, I introduced the game of Nim and explored the game tree and minimax tools. You learned how those tools work together, in a computerized version of Nim, to help the computer player make the optimal move. This article takes those tools out of the toolbox and puts them to work, as we develop console-based and GUI-based Java versions of Nim. You learn how each version gets the human player to select how many matches to take -- and how to achieve some special effects for the GUI-based version. Console-Based Nim I prefer to develop the console-based version first. That way, we focus on the essentials of how to make a computerized Nim game work, without getting bogged down with GUI details. The version that I have in mind will involve an initial pile of eleven matches. Also, the human player will always make the first move. Why? If the computer player (which always tries to make the optimal move) goes first, the human player would most likely never win. And that would make for a very boring game! The following source code, which I excerpted from the main method in the ConNim application (see the nim2.zip file that accompanies this article), describes the essence of the console-based Nim game: // Build a game tree to keep track of all possible // game configurations that could occur during // games of Nim with an initial pile of eleven // matches. The first move is made by player A. Node root = buildGameTree (11, 'A'); // Display startup information banner. System.out.println ("WELCOME TO THE GAME OF " + "NIM: 11 MATCHES IN PILE"); // Play the game until either player A (the human // player) or player B (the computer player) wins. while (true) { // Obtain number of matches that are taken by // player A. int takenmatches = 0; do { System.out.print ("How many matches do " + "you want? "); takenmatches = inputInteger (); if (takenmatches >= 1 && takenmatches <= 3 && root.nmatches-takenmatches >= 0) break; System.out.println ("That's an illegal " + "move. Choose 1, 2, " + "or 3 matches."); } while (true); // Based on number of taken matches, move to // appropriate game tree node. switch (takenmatches) { case 1: root = root.left; break; case 2: root = root.center; break; case 3: root = root.right; } System.out.println ("Human player takes " + takenmatches + ((takenmatches == 1) ? " match, " : " matches, ") + "leaving " + root.nmatches); // If a leaf node is reached, the computer // player has won the game. if (root.nmatches == 0) { System.out.println ("Computer player " + "wins the game!"); break; } // Use the minimax algorithm to determine if // the computer player's optimal move is the // child node left of the current root node, // the child node below the current root node, // or the child node right of the current root // node. int v1 = computeMinimax (root.left); int v2 = (root.center != null) ? computeMinimax (root.center) : 2; int v3 = (root.right != null) ? computeMinimax (root.right) : 2; if (v1 < v2 && v1 < v3) takenmatches = 1; else if (v2 < v1 && v2 < v3) takenmatches = 2; else if (v3 < v1 && v3 < v2) takenmatches = 3; else takenmatches = (int) (Math.random () * 3) + 1; // Based on number of taken matches, move to // appropriate game tree node. switch (takenmatches) { case 1: root = root.left; break; case 2: root = root.center; break; case 3: root = root.right; } System.out.println ("Computer player takes " + takenmatches + ((takenmatches == 1) ? " match, " : " matches, ") + "leaving " + root.nmatches); // If a leaf node is reached, the human player // has won the game. if (root.nmatches == 0) { System.out.println ("Human player wins " + "the game!"); break; } } After building the eleven-match game tree and outputting a startup banner, the code above enters the main game loop. That loop accomplishes these tasks: The human player -- player A -- inputs the number of matches to take. This number is then validated: only 1, 2, or 3 is valid, and this number must not exceed the number of remaining matches. The number of matches chosen by the human player is used to select the new root node. If the new root node's number-of-matches variable contains 0, a terminal configuration node has been reached, the human player loses, and the computer player -- player B -- wins. The program exits at this point. Otherwise, the new root node represents the position from which the computer player makes its move. A minimax number is computed on the root node's left child. If the root node also has center and right child nodes, minimax numbers are computed on those nodes. Because the root node may not have center or right child nodes (look at Figures 1 and 2 in the previous Java Tech installment for examples), care is taken to avoid a NullPointerException ( root.center != null, for example). If there is no center or right node, 2 is selected as the minimax number for that nonexistent node. That way, the nonexistent node won't be chosen in subsequent comparison logic. The minimax numbers are compared to find the minimum, which is then used to identify the number of matches for the computer player to take. In some cases, there may be no minimum: all of the minimax numbers may be the same. Because there is no optimal move in those situations, a random number generator selects 1, 2, or 3 matches to take. (Note: Selecting a random number of matches to take will not result in an exception, because this situation only occurs in areas of the game tree where there are immediate left, center, and right child nodes.) The number of matches chosen by the computer player is used to select the new root node. If the new root node's number-of-matches variable contains 0, a terminal configuration node has been reached, the computer player loses, and the human player wins. The program exits at this point. Otherwise, the new root node represents the position from which the human player makes a move. The main game loop continues. Compile ConNim's source code and run the resulting application to play console-based Nim. A sample session appears below: WELCOME TO THE GAME OF NIM: 11 MATCHES IN PILE How many matches do you want? 1 Human player takes 1 match, leaving 10 Computer player takes 1 match, leaving 9 How many matches do you want? 1 Human player takes 1 match, leaving 8 Computer player takes 3 matches, leaving 5 How many matches do you want? 1 Human player takes 1 match, leaving 4 Computer player takes 3 matches, leaving 1 How many matches do you want? 1 Human player takes 1 match, leaving 0 Computer player wins the game! Numeric Input ConNimfeatures an inputIntegermethod for obtaining numeric input from the human player: 1, 2, or 3 matches. Although I could have used Java 1.5's java.util.Scannerclass for input, I decided upon a customized inputIntegermethod, to support previous versions of Java. That method's source code appears below: static int inputInteger () { StringBuffer sb = new StringBuffer (); int value = 0; try { boolean done = false; char c; while (!done) { int i = System.in.read (); if (i == -1) c = '\n'; else c = (char) i; if (c == '\n') done = true; else if (c == '\r') { // do nothing because next iteration // detects '\n'. } else sb.append (c); } value = Integer.parseInt (sb.toString () .trim ()); } catch (IOException e) { System.err.println ("I/O problem"); System.exit (0); } catch (NumberFormatException e) { System.out.println ("Number expected"); System.exit (0); } return value; } inputIntegerreads its input, on a character-by-character basis, until a new-line character is read. Each character, except for new-line and carriage return (on Windows platforms), is stored in a StringBuffer object. When new-line is seen, the contents of the StringBuffer are parsed and the resulting value returns. But if the contents of the StringBufferdo not represent a number, the parsing logic throws a NumberFormatExceptionobject, which is caught by a catchclause that outputs a message and immediately terminates the program. A second catch clause is present to deal with IOException objects that are thrown when System.in.read is redirected to a file and something goes wrong during file I/O. Although it is unlikely that you will ever see an I/O Problem message (that outputs in response to the catch clause handling an IOException), Java requires this class of exception to be handled (or declared in a throws clause). GUI-Based NIM Let's face it: after a few rounds, console-based Nim loses its appeal. Some of that loss is due to the predictable nature of the game, which results from the small number of matches (11) in the initial pile. Although a larger initial pile would make game play less predictable, the resulting game tree would require more memory. At some point, we wouldn't be able to fit the entire game tree into memory, and would need to redesign console-based Nim's game tree and minimax logic. I believe most of console-based Nim's loss of appeal is due to its lack of a GUI. GUIs are fun to look at and interact with: they invite users to play, which is why a GUI-based version of Nim is needed. Figure 1 shows that version's GUI. Figure 1's GUI is more interesting than ConNim's console output. It reveals two match-pile images and a draggable grid of matches. The human player uses the mouse to select 1, 2, or 3 matches; and then drags the matches to the human player's match pile, where they are dropped (and disappear). The computer player then selects 1, 2, or 3 matches, and they also disappear. (We can assume the matches were dragged to the computer player's match pile before vanishing.) After the last match has been taken, GuiNim presents a message box that announces the winning player and lets the human player make a choice to continue the game or not. Figure 1. GUI-based Nim reveals a draggable grid of matches and match pile images The GUI shown in Figure 1 was built by the GuiNim application. (See the nim2.zip file for that application's source code.) The application consists of four classes: the GuiNim driver, the GamePanel component, and Match and Node component support classes. GuiNim's source code appears below: public class GuiNim extends JFrame { public GuiNim (String title) { // Display title in frame window's title // bar. super (title); // Exit program when user clicks the X // button in the title bar. setDefaultCloseOperation (EXIT_ON_CLOSE); // Create the game panel. Add it to the // frame window's content pane, so that it // occupies the entire client area. getContentPane ().add (new GamePanel (this)); // Pack all components to their preferred // sizes. pack (); // Prevent user from resizing frame window. setResizable (false); // Display frame window and all contained // components. setVisible (true); } public static void main (String [] args) { // Create GUI and start the game. new GuiNim ("Gui-based Nim"); } } GuiNim's source code reveals a Swing application. The constructor adds a GamePanelcomponent to the non-resizable frame window's content pane. GamePanelis a big class. Its constructor builds an eleven-match game tree, loads the logo and match pile images, creates an eleven-element array of Matchobjects, and installs listeners that detect "mouse button pressed," "mouse button released," and "mouse dragged" events. (I examine these listeners in the next section.) GamePanelalso introduces methods to build the game tree, compute a minimax value, ask the user if they want to continue the game, return the GamePanelcomponent's preferred size (that is used by the content pane's layout manager), paint the component, reorder Matchobjects (so that onscreen matches drag over and not under other onscreen matches), and reset the game (if the user chooses to play another round). The source code to GamePanel's paint method appears below: public void paint (Graphics g) { super.paint (g); // Clear background to white. g.setColor (Color.white); g.fillRect (0, 0, getWidth (), getHeight ()); // Establish text color and font. g.setColor (Color.black); g.setFont (new Font ("Arial", Font.BOLD, 14)); // Get font metrics for centering labels. FontMetrics fm = g.getFontMetrics (); // Draw centered labels. String s = "Computer Player's Pile"; g.drawString (s, (pilew-fm.stringWidth (s))/2, 30); s = "Human Player's Pile"; g.drawString (s, getWidth ()-pilew+ (pilew-fm.stringWidth (s))/2, 30); // Draw match-pile images. g.drawImage (pile.getImage (), 0, 50, this); g.drawImage (pile.getImage (), width-pilew, 50, this); // Draw logo image. g.drawImage (logo.getImage (), (width-logow)/2, 50, this); // Draw all non-dropped matches. for (int i = NMATCHES-1; i >= 0; i--) if (!matches [i].isDropped ()) matches [i].draw (g); } There is a definite order to the way paint works: images and text are painted before the onscreen versions of all non-dropped Match objects. (After all, we don't want to hide onscreen matches behind images or text.) Onscreen matches are backed by Match objects. That class provides a constructor, and methods to determine if the mouse coordinates locate within the boundaries of an onscreen match, draw the match, and handle match dropping and selection. Match's draw method, which draws the associated onscreen match, appears below: void draw (Graphics g) { // Draw a match's outline. g.setColor (Color.black); g.drawRect (ox, oy, MATCHWIDTH, MATCHHEIGHT); // Fill a match's interior with white pixels // (if selected is false). Otherwise, fill the // interior with cyan pixels. g.setColor ((!selected) ? Color.white : Color.cyan); g.fillRect (ox+1, oy+1, MATCHWIDTH-1, MATCHHEIGHT-1); // Fill the top of the match (outline and // interior) with red pixels. g.setColor (Color.red); g.fillRect (ox, oy, MATCHWIDTH+1, 5); } The ox and oy variables identify the origin for the onscreen match. That origin is the upper-left corner. If the match hasn't been selected, the variable selected is false, and a white onscreen match is drawn. But if that variable is true, the onscreen match is colored cyan, to emphasize that it has been selected by the human player. Note: because you've seen the Node class in the last installment, I have nothing to say about that class. Compile GuiNim's source code and run the resulting application to play GUI-based Nim. Figure 2 reveals a pair of selected matches being dragged to the human player's pile. Figure 2. Dragging matches to the human player's pile of matches Match Drag-and-Drop GuiNimfeatures a more intuitive way than ConNimfor obtaining, from the human player, the number of matches to take from the pile: match drag-and-drop. That input technique involves selecting 1, 2, or 3 onscreen matches, dragging them to some destination, and dropping them at that destination. Match drag-and-drop is implemented as a pair of listeners created in GamePanel's constructor: a mouse listener and a mouse motion listener. For simplicity, match drag-and-drop does not rely on the Abstract Windowing Toolkit's drag-and-drop API. If you would like to learn about the AWT's drag-and-drop API, consult the Java 2 SDK documentation on the java.awt.dnd package. The mouse listener is an object created from an anonymous inner class that subclasses java.awt.event.MouseAdapter. Similarly, the mouse motion listener is an object created from an anonymous inner class that subclasses java.awt.event.MouseMotionAdapter. Certain methods in each listener are overridden to achieve match drag-and-drop: MouseAdapter's mousePressedmethod handles selection. It first obtains the current mouse pointer coordinates, then locates the Matchobject corresponding to the onscreen match over which the mouse pointer is hovering, and finally uses that object to select the associated onscreen match. If the Shift key is not being held down, the previously selected onscreen match is deselected prior to the new onscreen match being selected. But if Shift is held down, the newly selected onscreen match is added to a group of (at most) three selected onscreen matches, possibly replacing the most recently selected onscreen match (if the group is full). When an onscreen match is selected, its color changes to cyan, to provide positive visual feedback to the user. MouseAdapter's mouseReleasedmethod handles dropping. It checks if the Shift key is being held down. If so, no drop is performed. The reason: the human player may still be selecting onscreen matches in preparation for a drag operation. If Shift is not being held down, the drop operation occurs, provided at least one of the selected matches is droppable: it locates over (or near) the human player's pile. MouseMotionAdapter's mouseDraggedmethod handles dragging. If at least one onscreen match has been selected, it obtains the current mouse pointer coordinates and moves each selected onscreen match to the new location specified by its associated Matchobject, provided all onscreen matches would lie completely within the bounds of the GamePanelcomponent after the move. (We don't want to move onscreen matches past the component's boundaries, because that would likely confuse the user.) Match drag-and-drop also keeps track of a drag origin and reorders Match objects as necessary. The drag origin creates a relative displacement during dragging, so that each onscreen match moves the same relative amount. Reordering Match objects causes onscreen matches to drag over (instead of under) other onscreen matches. Furthermore, reordering ensures that moving the mouse pointer over an onscreen match, that locates on top of another onscreen match, and then pressing the mouse button, results in the top onscreen match (instead of the bottom onscreen match) being selected. Note: the match drag-and-drop technique can be generalized to drag any kind of graphics shape (which is backed by an object) around the screen, and then drop the shape at a destination. Before you can do that, however, it's important to understand that technique. Because the GamePanel class is big and contains unrelated code, it might be difficult to fully understand match drag-and-drop. For that reason, I'm providing two MatchDrag applets, whose source codes are completely specific to the match drag-and-drop technique. MatchDrag1 focuses on selecting and dragging one match around the applet's drawing area; MatchDrag2, whose logic I used in GuiNim, focuses on selecting 1, 2, or 3 matches, dragging them around the drawing area, and finally dropping them. (See this article's nim2.zip file for the source code of both applets.) If you'd like to adapt match drag-and-drop to other graphics shapes, I recommend that you first study both applets. Special Effects GuiNimis much more fun to play than ConNim. And yet GuiNimis still somewhat lacking in aesthetics that would make it even more entertaining. In this section, I propose two enhancements to improve game play: sound effects and image effects. Note: you can add further enhancements to GuiNim, such as letting the user enter his or her name, displaying the user's name along with a number that identifies the current round and the number of rounds the user has won, saving user information to a file, and loading/displaying info associated with the user who has achieved the highest number of won rounds. Because these improvements aren't difficult to achieve, I leave it to you to supply them for your own version of GuiNim. Sound Effects When the human player drops one or more matches onto his or her match pile, we should hear a sound that positively reinforces that action. The simplest way to accomplish that task is to employ java.awt.Toolkit's public abstract void beep() method. Because hearing a simple beep isn't that entertaining, I think we should play some arbitrary .wav file, such as drop.wav. How do we play the .wav file? The traditional approach (from an applet perspective) is to use java.applet.Applet's public static final AudioClip newAudioClip(URL r) method. However, that approach means the application is tied to applet functionality, and that functionality is not guaranteed to be present on all platforms. A better approach is to use the JavaSound API, which was first integrated into version 1.3 of the core Java platform. I've created a playSound method that fully encapsulates the JavaSound logic needed to play the drop.wav file that accompanies this article. That method's source code appears below: import java.io.*; import javax.sound.sampled.*; // ... private void playSound (File file) { try { // Get an AudioInputStream from the // specified file (which must be a // valid audio file, otherwise an // UnsupportedAudioFileException // object is thrown). AudioInputStream ais = AudioSystem.getAudioInputStream (file); // Get the AudioFormat for the sound data // in the AudioInputStream. AudioFormat af = ais.getFormat (); // Create a DataLine.Info object that // describes the format for data to be // output over a Line. DataLine.Info dli = new DataLine.Info (SourceDataLine.class, af); // Do any installed Mixers support the // Line? If not, we cannot play a sound // file. if (AudioSystem.isLineSupported (dli)) { // Obtain matching Line as a // SourceDataLine (a Line to which // sound data may be written). SourceDataLine sdl = (SourceDataLine) AudioSystem.getLine (dli); // Acquire system resources and make // the SourceDataLine operational. sdl.open (af); // Initiate output over the // SourceDataLine. sdl.start (); // Size and create buffer for holding // bytes read and written. int frameSize = af.getFrameSize (); int bufferLenInFrames = sdl.getBufferSize () / 8; int bufferLenInBytes = bufferLenInFrames * frameSize; byte [] buffer = new byte [bufferLenInBytes]; // Read data from the AudioInputStream // into the buffer and then copy that // buffer's contents to the // SourceDataLine. int numBytesRead; while ((numBytesRead = ais.read (buffer)) != -1) sdl.write (buffer, 0, numBytesRead); } } catch (LineUnavailableException e) { } catch (UnsupportedAudioFileException e) { } catch (IOException e) { } } Because the method is fully commented, I won't elaborate further on what is happening. (For more information, please consult the SDK documentation on the various classes and interfaces that make up JavaSound.) However, note that the three exception handlers are empty: the user is only notified that there's a problem if a sound cannot be heard. I chose not to pop up a message box, because the user really doesn't want to see that box pop up each time he or she drags one or more matches to his or her match pile (and drops them). The playSound method requires a java.io.File argument that identifies the .wav file to play. To avoid the excessive creation of File objects, I've created a DROP_SOUND constant, which is passed to playSound, as follows: private final static File DROP_SOUND = new File ("drop.wav"); // ... playSound (DROP_SOUND); Image Effects Is the display of a message box that announces the winner enough feedback when a player wins? Why not make the screen ripple, shoot off some fireworks, or offer some other kind of visual pizzazz? To keep this article from becoming too large, I've settled on something simple: flash both match pile images. To accomplish that task, we first need to create a negative match pile image. The following code fragment does just that: private ImageIcon pileNeg; // ... int [] pixels = new int [pilew*pileh]; java.awt.image.PixelGrabber pg; pg = new java.awt.image.PixelGrabber (pile.getImage (), 0, 0, pilew, pileh, pixels, 0, pilew); try { pg.grabPixels (); } catch (InterruptedException e) { } for (int i = 0; i < pixels.length; i++) pixels [i] = pixels [i] ^ 0xffffff; java.awt.image.MemoryImageSource mis; mis = new java.awt.image.MemoryImageSource (pilew, pileh, pixels, 0, pilew); pileNeg = new ImageIcon (createImage (mis)); The code fragment above grabs the pile-referenced image's pixels and stores them in a pixels array. Each array element's RGB (red, green, blue) value is then inverted via the exclusive or operator. Finally, those RGB values are combined into a brand-new image that pileNeg references. Flashing the match pile images requires animation logic, which must appear in two places within GamePanel's mouse released listener -- before both calls to the continueGame method. The animation logic is provided by the code fragment below: final ImageIcon oldPile = pile; ActionListener al; al = new ActionListener () { public void actionPerformed (ActionEvent e) { repaint (); if (pile == oldPile) pile = pileNeg; else pile = oldPile; } }; Timer t = new Timer (ANIM_DELAY, al); t.start (); boolean continuePlay; continuePlay = continueGame ("Computer player " + "wins. Play again?"); t.stop (); pile = oldPile; repaint (); The animation logic begins by saving pile's ImageIcon reference, so that the original image can be restored following the animation. (When we stop the animation, we don't want the negative image to be displayed. Not only is that unsightly, pile is referencing the negative match pile image. If we don't restore pile to the original image's reference, we lose that reference and no more animations are visible.) The logic next creates an object from an anonymous inner class that implements the java.awt.event.ActionListener interface. Each call to that object's actionPerformed method generates one frame of animation: first it repaints the GamePanel's drawing surface (in response to the repaint (); method call), and then it sets the pile variable to either the original image's reference (which was previously saved in oldPile) or the negative image's reference (in pileNeg). This is done because GamePanel's paint method (which is responsible for painting that component's drawing surface) displays whatever image is referenced by pile. A timer is created, by way of javax.swing.Timer, after creating the ActionListener object. That timer handles the animation, once its start method is called. Each timer event invokes the listener's actionPerformed method. Following the call, the timer pauses for the number of milliseconds specified by the ANIM_DELAY constant -- to give the user a chance to view the animation. Subsequent to the display of the "continue game" message box and the retrieval of the user's continuation choice, the animation is stopped, pile is reset to the reference previously stored in oldPile (in case pile contains the pileNeg reference), and a final repaint occurs (in case the negative match pile image is currently displayed). Conclusion We put the game tree and minimax tools to good use as we created console-based and GUI-based Java versions of Nim. We learned how those versions work and how they obtain their "number of matches" input from the user: simple integer input or match drag-and-drop (also applicable to other kinds of game objects, such as chess or checker pieces). What is a game without special effects? We added a sound effect and an image effect to the GUI-based Nim game, to make it more entertaining. Once again, there is some homework for you to accomplish: Modify ConNim, so that it uses the Scannerclass to handle input from the user. GuiNim's onscreen match drag-and-drop logic reveals a quirk. You've selected 1, 2, or 3 onscreen matches while pressing the Shift key, key before releasing the mouse button. Can you think of some better way to handle this quirk? Next month's Java Tech explores the basics of thread synchronization and looks at Java 1.5's java.util.concurrent.Semaphore class. Answers to Previous Homework The previous Java Tech article presented you with some challenging homework on the game tree and minimax tools. Let's revisit that homework and investigate solutions. The number of nodes in Nim's game tree grows quite rapidly as the initial number of matches increases slightly. For example, 1 match yields 2 nodes, 2 matches yield 4 nodes, 3 matches yield 8 nodes, and 4 matches yield 15 nodes. For 21 matches, how many nodes are created? For 21 matches, the number of nodes in Nim's game tree equals 489,396. How did I obtain this number? One technique: place the expression count++at the start of the method buildGameTree, and output count's value after calling that method. Another (somewhat cumbersome) technique: take advantage of the Nim game tree property where the number of nodes associated with the number of matches x (x must be greater than 3) is 1 plus the sum of the node counts for x-1, x-2, and x-3 matches. For example, 1+15+8+4 (28) nodes are created when the number of matches is 5. If you cannot store an entire game tree in memory because of its size, how could you adapt minimax to work with such a game tree? When an entire game tree cannot be stored in memory, minimax can be adapted to work with part of the game tree by integrating the alpha-beta pruning technique into that algorithm. I will explore the alpha-beta pruning technique in a future installment of Java Tech. - Login or register to post comments - Printer-friendly version - 8149 reads
https://today.java.net/pub/a/today/2004/06/21/nim2.html
CC-MAIN-2014-15
refinedweb
4,738
55.74
Beyond The Template Engine In general, template engines are a "good thing." I say this as a long time PHP/Perl programmer, user of many template engines (fastTemplate, Smarty, Perl’s HTML::Template), and. There are, however, a couple of reasons why you might choose Smarty (or a similar solution), which will be explored later in this article. This article discusses template theory. We’ll see why most "template engines" are overkill, and finally, we’ll review a lightweight, lightning fast alternative. Download And Licensing The template class and all the examples used in this article can be downloaded here: template.zip. You may use the code in these files according to the MIT Open Source License as published on OSI. A Little Background on Template Engines Let’s first delve into the background of template engines. Template engines were designed to allow the separation of business logic (for example, retrieving data from a database or calculating shipping costs) from the presentation of data. Template engines solved two major problems: - How to achieve this separation - How to separate "complex" php code from the HTML This, in theory, allows HTML designers with no PHP experience to modify the appearance of the site without having to look at any PHP code. However, template systems have also introduced some complexities. First, we now have one "page" built from multiple files. Typically, you might have the main PHP page responsible for business logic, an outer "layout" template that renders the overall layout of the site, an inner content-specific template, a database abstraction layer, and the template engine itself (which may or may not be comprised of multiple files). Alternatively, some people simply include "header" and "footer" files at the start and end of each PHP page. This is an incredible number of files to generate a single page. Yet, as the PHP parser is pretty fast, the number of files used is probably not important unless your site gets insane amounts of traffic. However, keep in mind that template systems introduce yet another level of processing. Not only do the template files have to be included, they also have to be parsed (depending on the template system, this can happen in a range of ways — using regular expressions, str_replaces, compiling, lexical parsing, etc.). This is why template benchmarking became popular: because template engines use a variety of different methods to parse data, some of which are faster than others (also, some template engines offer more features than others). Template Engine Basics Basically, template engines utilize a scripting language (PHP) written in C. Inside this embedded scripting language, you have another pseudo-scripting language (whatever tags your template engine supports). Some offer simple variable interpolation and loops. Others offer conditionals and nested loops. Still others (Smarty, at least) offer an interface into a large subset of PHP, as well as a caching layer. Why do I think Smarty is closest to right? Because Smarty’s goal is "the separation of business logic from presentation," not "the separation of PHP code from HTML code." While this seems like a small distinction, it is one that’s very important. The ultimate goal of any template engine, this function shouldn’t be concerned with what’s going to happen to the data. Yet, without some sort of logic in your template file, that’s exactly what you’d have to do. While Smarty gets it right in that sense (allowing you to harness pretty much every aspect of PHP), there are still some problems. Basically, it just provides an interface to PHP with new syntax. Stated like that, it seems sort of silly. Is it actually simpler to write {foreach --args} than <? foreach --args ?>? If you do think it’s simpler, ask yourself whether it’s so much simpler that you can see real value in including a huge template library to achieve that separation. Granted, Smarty offers many other great features, but it seems like the same benefits could be gained without the huge overhead involved in including the Smarty class libraries. An Alternative Solution The solution I’m basically advocating is a "template engine" that uses PHP code as its native scripting language. I know this has been done before. And when I first read about it, I thought, "What’s the point?" However, after I examined my co-worker’s argument and implemented a template system that used straight PHP code, yet still achieved the ultimate goal of separation of business logic from presentation logic (and in around 25 lines of code, not including comments), I realized the advantages. This system provides developers like us access to a wealth of PHP core functions we can use to format output – tasks like date formatting should be handled in the template. Also, as the templates are all straight PHP files, byte-code caching programs like Zend Performance Suite and PHP Accelerator, the templates can be automatically cached (thus, they don’t have to be re-interpreted each time they’re accessed). This is only an advantage if you remember to name your template files such that these programs can recognize them as PHP files (usually, you simply need to make sure they have a .php extension). While I think this method is far superior to typical template engines, there are of course some issues. The most obvious argument against such a system is that PHP code is too complex, and that designers shouldn’t have to learn PHP. In fact, PHP code is just as simple as (if not simpler than) the syntax of the more advanced template engines such as Smarty. Also, designers can use PHP short-hand like this <?=$var;?>. Is that any more complex than {$var}? Sure, it’s a few characters longer, but if you can get used to it, you gain all the power of PHP without the overhead involved in parsing a template file. Second, and perhaps more importantly, there is no inherent security in a PHP-based template. Smarty offers the option to completely disable PHP code in template files. It allows developers to restrict the functions and variables to which the template has access. This is not an issue if you don’t have malicious designers. However, if you allow external users to upload or modify templates, the PHP-based solution I presented here provides absolutely no security! Any code could be put into the template and run. Yes, even a print_r($GLOBALS) (which would give the malicious user access to every variable in the script)! That said, of the projects I’ve worked with personally and professionally, most did not allow end-users to modify or upload templates. As such, this was not an issue. So now, let’s move on to the code. Examples Here’s a simple example of a user list page. <?php require_once('template.php'); /** * This variable holds the file system path to all our template files. */ $path = './templates/'; /** * Create a template object for the outer template and set its variables. */ $tpl = & new Template($path); $tpl->set('title', 'User List'); /** * Create a template object for the inner template and set its variables. The * fetch_user_list() function simply returns an array of users. */ $body = & new Template($path); $body->set('user_list', fetch_user_list()); /** * Set the fetched template of the inner template to the 'body' variable in * the outer template. */ $tpl->set('body', $body->fetch('user_list.tpl.php')); /** * Echo the results. */ echo $tpl->fetch('index.tpl.php'); ?> There are two important concepts to note here. The first is the idea of inner and outer templates. The outer template contains the HTML code that defines the main look of the site. The inner template contains the HTML code that defines the content area of the site. Of course, you can have any number of templates in any number of layers. As I typically use a different template object for each area, there are no namespacing issues. For instance, I can have a template variable called ‘title’ in both the inner and the outer templates, without any fear of conflict. Here’s a simple example of the template that can be used to display the user list. Note that the special foreach and endforeach; syntax is documented in the PHP manual. It is completely optional. Also, you may be wondering why I end my template file names with a .php extension. Well, many PHP byte-code caching solutions (like phpAccelerator) require files to have a .php extension if they are to be considered a PHP file. As these templates are PHP files, why not take advantage of that? <table> <tr> <th>Id</th> <th>Name</th> <th>Email</th> <th>Banned</th> </tr> <? foreach($user_list as $user): ?> <tr> <td align="center"><?=$user['id'];?></td> <td><?=$user['name'];?></td> <td><a href="mailto:<?=$user['email'];?>"><?=$user['email'];?></a></td> <td align="center"><?=($user['banned'] ? 'X' : ' ');?></td> </tr> <? endforeach; ?> </table>Here's a simple example of the layout.tpl.php (the template file that defines what the whole page will look like). <html> <head> <title><?=$title;?></title> </head> <body> <h2><?=$title;?></h2> <?=$body;?> </body> </html>And here's the parsed output. <html> <head> <title>User List</title> </head> <body> <h2>User List</h2> <table> <tr> <th>Id</th> <th>Name</th> <th>Email</th> <th>Banned</th> </tr> <tr> <td align="center">1</td> <td>bob</td> <td><a href="mailto:bob@mozilla.org">bob@mozilla.org</a></td> <td align="center"> </td> </tr> <tr> <td align="center">2</td> <td>judy</td> <td><a href="mailto:judy@php.net">judy@php.net</a></td> <td align="center"> </td> </tr> <tr> <td align="center">3</td> <td>joe</td> <td><a href="mailto:joe@opera.com">joe@opera.com</a></td> <td align="center"> </td> </tr> <tr> <td align="center">4</td> <td>billy</td> <td><a href="mailto:billy@wakeside.com">billy@wakeside.com</a></td> <td align="center">X</td> </tr> <tr> <td align="center">5</td> <td>eileen</td> <td><a href="mailto:eileen@slashdot.org">eileen@slashdot.org</a></td> <td align="center"> </td> </tr> </table> </body> </html> Caching With a solution as simple as this, implementing template caching becomes a fairly simple task. For caching, we have a second class, which extends the original template class. The CachedTemplate class uses virtually the same API as the original template class. The differences are that we must pass the cache settings to the constructor and call fetch_cache() instead of fetch(). The concept of caching is simple. Basically, we set a cache timeout that represents the period (in seconds) after which the output should be saved. Before doing all the work to generate a page, we must first test to see if that page has been cached, and whether the cache is still considered current. If the cache is there, we don’t need to bother with all the database work and business logic it takes to generate the page — we can simply output the previously cached content. This practice presents the problem of being able to uniquely identify a cache file. If a site is controlled by a central script that displays output based on GET variables, having only one cache for every PHP file will be unsuccessful. For instance, if you have index.php?page=about_us, the output should be completely different than that which would be returned if a user called index.php?page=contact_us. This problem is solved by generating a unique cache_id for each page. To do this, we take the actual file that was requested and hash it together with the REQUEST_URI (basically, the entire URL: index.php?foo=bar&bar=foo). Of course, the hashing is taken care of by the CachedTemplate class, but the important thing to remember is that you absolutely must pass a unique cache_id when you create a CachedTemplate object. Examples follow, of course. Use of a caching set up involves these steps. include()the Template source file CachedTemplateobject (and pass the path to the templates, the unique cache_id, and the cache time out) fetch()the template fetch_cache()call will automatically generate a new cache file This script assumes your cache files will go in ./cache/, so you must create that directory and chmod it so the Web server can write to it. Also note that if you find an error during the development of any script, the error can be cached! Thus it’s a good idea to disable caching altogether while you’re developing. The best way to do this is to pass zero (0) as the cache lifetime — that way, the cache will always expire immediately. Here’s an example of caching in action. <?php /** * Example of cached template usage. Doesn't provide any speed increase since * we're not getting information from multiple files or a database, but it * introduces how the is_cached() method works. */ /** * First, include the template class. */ require_once('template.php'); /** * Here is the path to the templates. */ $path = './templates/'; /** * Define the template file we will be using for this page. */ $file = 'list.tpl.php'; /** *. */ $cache_id = $file . $_SERVER['REQUEST_URI']; $tpl = & new CachedTemplate($path, $cache_id, 900); /** *. * * This should be read aloud as "If NOT Is_Cached" */); ?> Setting Multiple Variables How can we set multiple variables sinultaneously? Here is an example that uses a method contributed by Ricardo Garcia. <?php require_once('template.php'); $tpl = & new Template('./templates/'); $tpl->set('title', 'User Profile'); $profile = array( 'name' => 'Frank', 'email' => 'frank@bob.com', 'password' => 'ultra_secret' ); $tpl->set_vars($profile); echo $tpl->fetch('profile.tpl.php'); ?> The associated template looks like this: <table cellpadding="3" border="0" cellspacing="1"> <tr> <td>Name</td> <td><?=$name;?></td> </tr> <tr> <td>Email</td> <td><?=$email;?></td> </tr> <tr> <td>Password</td> <td><?=$password;?></td> </tr> </table> And the parsed output is as follows: <table cellpadding="3" border="0" cellspacing="1"> <tr> <td>Name</td> <td>Frank</td> </tr> <tr> <td>Email</td> <td>frank@bob.com</td> </tr> <tr> <td>Password</td> <td>ultra_secret</td> </tr> </table> Special thanks to Ricardo Garcia and to Harry Fuecks for thei contributions to this article. Related Links Here’s a list of good resources for exploring template engines in general. - Web Application Toolkit Template View – a wealth of information about all types of template approaches - MVC Pattern – description of 3-tier application design - SimpleT – another php-based template engine that uses PEAR::Cache_Lite - Templates and Template Engines – more on various template implementations - Smarty – compiling template engine Template Class Source Code And finally, the Template class. <?php /** * Copyright (c) 2003 Brian E. Lozier (brian@massassi.net) * * set_vars() method contributed by Ricardo Garcia . */ class Template { var $vars; /// Holds all the template variables var $path; /// Path to the templates /** * Constructor * * @param string $path the path to the templates * * @return void */ function Template($path = null) { $this->path = $path; $this->vars = array(); } /** * Set the path to the template files. * * @param string $path path to template files * * @return void */ function set_path($path) { $this->path = $path; } /** * Set a template variable. * * @param string $name name of the variable to set * @param mixed $value the value of the variable * * @return void */ function set($name, $value) { $this->vars[$name] = $value; } /** * Set a bunch of variables at once using an associative array. * * @param array $vars array of vars to set * @param bool $clear whether to completely overwrite the existing vars * * @return void */ function set_vars($vars, $clear = false) { if($clear) { $this->vars = $vars; } else { if(is_array($vars)) $this->vars = array_merge($this->vars, $vars); } } /** * Open, parse, and return the template file. * * @param string string the template file name * * @return string */ function fetch($file) { extract($this->vars); // Extract the vars to local namespace ob_start(); // Start output buffering include($this->path . string $path path to template files * @param string $cache_id unique cache identifier * @param int $expire number of seconds the cache will live * * @return void */ function CachedTemplate($path, $cache_id = null, $expire = 900) { $this->Template($path); $this->cache_id = $cache_id ? 'cache/' . md5($cache_id) : $cache_id; $this->expire = $expire; } /** * Test to see whether the currently loaded cache_id has a valid * corrosponding cache file. * * @return bool */ * * @return string */; } } } ?> Another important thing to note about the solution presented here is that we pass the file name of the template to the fetch() method call. This can be useful if you want to re-use template objects without having to re-set() all the variables. And remember: the point of template engines should be to separate your business logic from your presentation logic, not to separate your PHP code from your HTML code.
https://www.sitepoint.com/beyond-template-engine/
CC-MAIN-2018-34
refinedweb
2,736
63.29
creating kicad footprints using python scripts Project description This repository contains scripts to generate custom KiCAD footprints using python, and a framework which allows us to create custom KiCAD footprint. A big bunch of footprints of the KiCad library was developed using this framework. KicadModTree Licence: GNU GPLv3+ Maintainer: Thomas Pointhuber Supports: Python 2.7 and 3.3+ About I started drawing a bunch of similar footprints for KiCAD, like connectors which are mainly one base shape, and different amount of pins. To be able to update/improve those footprints quickly I decided to write my own footprint generator Framework, to allow simple creation of easy as well complex shapes. This is my second approach (the first one can be found in the git history). This solution should be able to be easy to use, to read and also be easy to expand with custom nodes. Overview This framework is mainly based on the idea of scripted CAD systems (for example OpenSCAD). This means, everything is a node, and can be structured like a tree. In other words, you can group parts of the footprint, and translate them in any way you want. Also cloning & co. is no problem anymore because of this concept. To be able to create custom Nodes, I separated the system in two parts. Base nodes, which represents simple structures and also be used by KiCAD itself, and specialized nodes which alter the behaviour of base nodes (for example positioning), or represent a specialized usage of base nodes (for example RectLine). When you serialize your footprint, the serialize command only has to handle base nodes, because all other nodes are based upon the base nodes. This allows us to write specialized nodes without worrying about the FileHandlers or other core systems. You simply create your special node, and the framework knows how to handle it seamlessly. Please look into the Documentation for further details KicadModTree - The KicadModTree framework which is used for footprint generation docs - Files required to generate a sphinx documentation scripts - scripts which are generating footprints based on this library Development Install development Dependencies manage.sh update_dev_packages run tests manage.sh tests Example Script from KicadModTree import * footprint_name = "example_footprint" # init kicad footprint kicad_mod = Footprint(footprint_name) kicad_mod.setDescription("A example footprint") kicad_mod.setTags("example") # set general values kicad_mod.append(Text(type='reference', text='REF**', at=[0, -3], layer='F.SilkS')) kicad_mod.append(Text(type='value', text=footprint_name, at=[1.5, 3], layer='F.Fab')) # create silscreen kicad_mod.append(RectLine(start=[-2, -2], end=[5, 2], layer='F.SilkS')) # create courtyard kicad_mod.append(RectLine(start=[-2.25, -2.25], end=[5.25, 2.25], layer='F.CrtYd')) # create pads kicad_mod.append(Pad(number=1, type=Pad.TYPE_THT, shape=Pad.SHAPE_RECT, at=[0, 0], size=[2, 2], drill=1.2, layers=Pad.LAYERS_THT)) kicad_mod.append(Pad(number=2, type=Pad.TYPE_THT, shape=Pad.SHAPE_CIRCLE, at=[3, 0], size=[2, 2], drill=1.2, layers=Pad.LAYERS_THT)) # add model kicad_mod.append(Model(filename="example.3dshapes/example_footprint.wrl", at=[0, 0, 0], scale=[1, 1, 1], rotate=[0, 0, 0])) # output kicad model file_handler = KicadFileHandler(kicad_mod) file_handler.writeFile('example_footprint.kicad_mod') Usage Steps - Navigate into the scriptsdirectory, and look for the type of footprint you would like to generate. For example, if you wish to generate an SMD inductor footprint, cdinto scripts/Inductor_SMD. - Open the *.yaml (or *.yml) file in a text editor. Study a few of the existing footprint definitions to get an idea of how your new footprint entry should be structured. - Add your new footprint by inserting your own new section in the file. An easy way to do this is by simply copying an existing footprint definition, and modifying it to suit your part. Note: You may have to add or remove additional parameters that are not listed. - Save your edits and close the text editor. - Run the python script, passing the *.yaml or (*.yml) file as a parameter, e.g. python3 Inductor_SMD.py Inductor_SMD.yml. This will generate the *.kicad_mod files for each footprint defined in the *.yaml (or *.yml). Project details Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/KicadModTree/
CC-MAIN-2022-21
refinedweb
698
50.23
In this tutorial, we will use python img2pdf library to convert a png image to pdf file. There exists some errors you must notice. You can fix these errors by reading our tutorials. Preliminaries 1. Install img2pdf, ImageMagick and Wand Img2pdf and Wand pip install img2pdf pip install Wand ImageMagick you should Install dll version. The big error you may encounter Refusing to work on images with alpha channel To fix this error, you and read. Python Detect and Remove Image Alpha Channel with ImageMagick Wand – Python Wand Tutorial Define a function to remove alpha channel def removeAlpha(image_path): ok = False with wand.image.Image(filename=image_path) as img: alpha = img.alpha_channel if not alpha: ok = True return ok try: img.alpha_channel = 'remove' #close alpha channel img.background_color = wand.image.Color('white') img.save(filename=image_path) ok = True except: ok = False return ok Define a function to convert png to pdf def convert_png_to_pdf(image_path, pdf_path): ok = False if not removeAlpha(image_path): print("fail to remove alpha channel") return False try: pdf_bytes = img2pdf.convert(image_path) file = open(pdf_path, "wb") # writing pdf files with chunks file.write(pdf_bytes) file.close() ok = True except: ok = False return ok How to use? Here is an example. convert_status = convert_png_to_pdf(image_path='E:\\ts.png', pdf_path = 'ts3.pdf') if convert_status: print("convert png to pdf successfully!") else: print("fail to convert png to pdf!")
https://www.tutorialexample.com/best-practice-to-python-convert-png-to-pdf-for-img2pdf-beginnners-python-img2pdf-tutorial/
CC-MAIN-2021-31
refinedweb
227
50.53
This guide will show you how to setup the GPS add-on on a CodeBug Connect. Important You need a later version of the eMicroPython system software running on your CodeBug Connect to use the GPS add-on. It’s easy to update your system software. GPS works by receiving radio signals from satellites orbiting the earth. Before a position can be found it needs to receive information from multiple satellites. When first powered on, a lot of information needs to be received before the signal ‘locks on’. Buildings, trees, etc. which block signals will make it harder to get a lock, and as such, receivers will work best when outdoors with a clear view of most of the sky. Tip Get outside with a clear view of most of the sky for best results. Warning Take care when plugging in add-ons. Always disconnect the power, check all the pins are aligned and never use excessive force. Ensure the power is disconnected Make sure everything is the right way up. The square GPS antenna should be on the same side as CodeBug Connect display. Check all the pins are aligned and gently slide in. Power up your CodeBug Connect The GPS add-on will start looking for satellites as soon as it is powered on. The small LED will flash once a second when it has got a good lock. Important Check your CodeBug Connect eMicroPython version. This code will only work with eMicroPython later than version 1.2. Run the following code: import cbc from inventthings import gps import time #wait until locked onto satelite while not gps.gps_sensor.fix_valid: cbc.display.scroll_text("waiting") time.sleep(5) #once locked on, scroll lat and lon lat = gps.deg_decmin_to_dec_deg(gps.gps_sensor.lat) lon = gps.deg_decmin_to_dec_deg(gps.gps_sensor.lon) cbc.display.scroll_text("{},{}".format(str(lat), str(lon))) GPS positions are given as a latitude and longitude. Latitude describes how far North or South (with 0 being the equator and increasing going north). Longitude describes how far East or West of a line in Greenwich, London, UK. Latitudes and longitudes are measured in degrees. These degrees can be split up in different ways, as decimals, or as minutes and decimal-minutes, or as minutes, seconds and decimal seconds. To get the latitude in degrees minutes and decimal degrees: gps.gps_sensor.lat You’ll see a result in the following format: (53, 28.7694) To get the longitude in degrees minutes and decimal degrees: gps.gps_sensor.lon You’ll see a result in the following format: (-2, 14.7069) This means the GPS has position is 53° 28.7694, -2° 14.7069. Enter the coordinates into your favourite online map e.g. Google Maps and you should see your position shown on the map. If you’d prefer the position as decimal degrees use the conversion function: gps.deg_decmin_to_dec_deg() Now you’ve seen how to get started with the GPS add-on there’s lots of possibilities. You could: Record the position every few seconds into a file to log your cycle Calculate your distance and angle from an object and display an arrow on CodeBug Connect’s LED that points to it Use the precision of GPS timing to accurately set the clock on CodeBug Connect Check out the reference documentation for the add-on to learn more.
https://www.codebug.org.uk/codeguides/104/get-started-with-the-gps-add-on/
CC-MAIN-2022-21
refinedweb
556
65.93
I’ve had this tiny problem with geometry occlusion for a little while. It’s not a big issue but I am a little perplexed… I set up cube occlusions in my game, for lopped channels it works great but for play once sounds I get a little bit of the sound when it starts when my listener is fully "occluded"… I probably get the same problem with looped sounds but they start far from the listenner’s position. I tried calling FMOD Update right after I start the sound but I can’t seem to find the solution. I even tried starting the sound paused, then calling update then unpausing the sound… I’m using linear sound fading for the 3d distance drop off and I’m running in software mode. I’m also using doppler effects. Just poking to see if this is a known artefact of the geometry (when no set up right) here is the code that sets up an occlusion block [code:p1f8txmj] export double FMODBlockerAdd(double x, double y, double z, double xs, double ys, double zs, double xe, double ye, double ze) { if(!inited) {{FMODASSERT(FMOD_ERR_INITIALIZATION);}} if(geometry == NULL) {{FMODASSERT(FMOD_ERR_INITIALIZATION);}} FMOD_GEOMETRY *g = NULL; if(curgeometry >= maxgeometry) {FMODASSERT(FMOD_ERR_MEMORY);} FMODASSERT(FMOD_System_CreateGeometry(mainsystem, 6, 24, &g)); *(geometry + curgeometry) = (DWORD)g; curgeometry++; float dxs,dxe,dys,dye,dzs,dze; dxs = xs-x; dxe = xe-x; dys = ys-y; dye = ye-y; dzs = zs-z; dze = ze-z; FMOD_VECTOR cube[24] = //6 faces times 4 verts = 24 { { dxe, dys, dzs}, { dxe, dys, dze}, { dxe, dye, dze}, { dxe, dye, dzs}, //+X face {dxs, dys, dzs}, {dxs, dys, dze}, {dxs, dye, dze}, {dxs, dye, dzs}, //-X face {dxs, dye, dzs}, { dxe, dye, dzs}, { dxe, dye, dze}, {dxs, dye, dze}, //+Y face {dxs, dys, dzs}, { dxe, dys, dzs}, { dxe, dys, dze}, {dxs, dys, dze}, //-Y face {dxs, dys, dze}, {dxs, dye, dze}, { dxe, dye, dze}, { dxe, dys, dze}, //+Z face {dxs, dys, dzs}, {dxs, dye, dzs}, { dxe, dye, dzs}, { dxe, dys, dzs}, //-Z face }; int pi = 0; for(int i = 0; i < 5; ++i) { FMOD_Geometry_AddPolygon(g, 1, 1, 1, 4, &cube [4 * i], &pi); } FMOD_VECTOR v = {x,y,z}; FMODASSERT(FMOD_Geometry_SetPosition(g, &v)); return (double) (DWORD)g; } [/code:p1f8txmj] I have not updated FMOD in a while. I have v 4.08.09 - icuurd12b42 asked 11 years ago - You must login to post comments Thats no really possible unless you have mistakenly positioned your sound or not set the position correctly when it is in a paused state, and instead did it after. This thread is about geometry occlusion btw please don’t confuse the issue. edit: Just in case there was a fix made when setChannelGroup was used and was timing related, that was in 4.8.10 or 4.10.00. If you’re using this function and an old version see if that is the issue. I don’t have time to recompile with 10 right now. I’ll do it in a few days. At least I can demonstrate the artefact with the exe included in the zip. I’m pretty sure I set the sound position and listenner positions properly… I used space then right click map to add a sound in the map and moved it arround very cautiously using the mouse… The listenner is at x,y,0 and the cubes are at x,y,0 and the sounds are at x,y,0. The cubes are the same size as what you see on screen though their loweer upper z are from -10 to 10… 20 units in height. The horns and crash sound have a min max distance of 100,300, linear drop off. The cops horn (siren) is 100,800 Ignore the first screen, just press N to go to the next demo which has occlusion… Zoom out using the down arrow to see the blue area and drive inside it using asdw. Perhaps Symbiotic can try it too to see if this effect was what he was experiencing… the sound is started with pause ON, then FMOD_Channel_Set3DAttributes(channel,&pos,&vel) is called then the sound is unpaused. Every step, the sounds are repositioned using FMOD_Channel_Set3DAttributes(channel,&pos,&vel) At the end of every frame FMOD_Update is called Solved Some sounds were played after set3DListenerAttributes. Bug pcode set listener x,y,z play sound x,y,z play sound x,y,z play sound x,y,z System Update Fix pcode play sound x,y,z play sound x,y,z play sound x,y,z set listener x,y,z System Update Hi there, I’m having exactly the same problem as icuurd12b42 described at the start of this thread but I can’t work out why his solution solved the problem. Hopefully someone can straighten me out: Basically, if I have a sound source which is playing whilst it goes between the listener and some occluding geometry it fades out nicely and everything’s great. However, if a sound is created starting off behind an obstacle it starts off loud and then fades out to what it should be. I assume this something to do with the way blending is achieved when sound sources get occluded, like soft shadowing? However, it spoils the experience quite a lot so I need to get the sound to start fully occluded. Can anyone tell me what I’m doing wrong? Cheers Are you sure you set the listener position right before the update, after you started the sounds? Confident about listener pos as i’ve currently got it fixed in place so listener is stationary while sound making objects come and go. I’m getting round it at the moment by ‘cueing up’ sounds as paused, moving them around and pausing/unpausing rather than spawning new sounds on an event. It’s a pretty nasty hack though, I’d love to known what I’m doing wrong. Yes, I think I start the sound paused then move it to it’s playing position then unpause it. At that point it should work. The trouble is though I can’t create a sound paused, position it then immediately un-pause it or I get this fade out artefact. It seems like I need to have the sound paused for long enough for it to ‘have faded out’ before I can start it playing. So at the moment, when a game object that make noise is spawned I create its sounds paused and move them around with it so should one of them need to be played whilst behind a wall or something when I un-pause it it will be already by fully occluded. I must be doing something out of order but I can’t figure out what. The (non hack) sound loop goes roughly: Check if any new sounds have been triggered Call playSound to get a channel initially paused Set all the sound properties including pos/vel Set listener pos/vel Call update My search continues… Try setting the position twice in a row when you create it initially. Perhaps the system thinks the sound traveled very fast from a relative unknown position, causing the doppler to punch through. I use a dll of my own to wrap fmod so I’m no longer sure of the exact steps I took. Try the latest version as a small tweak to the geometry engine was made a while back. If it still happens see if you can provide some code which reproduces the issue. Brett – We have some cases where we have a similar issue: "I get a little bit of the sound when it starts when my listener is fully "occluded"… ", though we are not using geometric occlusion – just min/max radius of one-shot and looping sounds. But at the start of some sounds, we just get a little ‘pop’ of the sound at full volume, and then it attenuates… - Symbiotic answered 11 years ago
https://www.fmod.org/questions/question/forum-25033/
CC-MAIN-2018-39
refinedweb
1,328
60.69
With web applications becoming more sophisticated, the popularity of JavaScript frameworks has been on the rise. With this increased fame, there are several capable frameworks out there to choose from. Some of the most popular choices are AngularJS, Ember.js and Vue.js. All these frameworks are capable of building large and modern web applications. In this two-part article, we will be covering one of the above, which is Vue.js. We will build a Todo App. The main reason being that Vue.js takes a different approach to development. It has a lot of powerful features to match any of the above. When starting out with Vue.js you are only exposed to simple APIs on the surface. This makes it easy to get started but you could dig underneath and bring forth that power when needed. In the first part of the Todo Application, we will cover how to setup Vue.js, setup a simple component. We will also touch on how to supply data to templates from a component class, loop over data in the templates and more. In the second part, we will see how to handle events coming in from the template which will allow us to create more todos, edit them and eventually delete them. Vue.js is currently at version 1 as of the time of this article with version 2 being still in preview. Beta should soon be out according to the Vue.js Blog. Let this not stop you from trying out the current version though as the API won't change much as mentioned by their blog post. Install and setup Vue.js With that out of the way, let us now setup our environment so we can get up and running with our Todo App. You will first need to have node.js and npm installed. After that, you must install vue-cli using the following command. npm install - g vue - cli vue-cli is a commandline tool which makes it easy to develop an application using Vue.js. There are many templates to bootstrap a new Vue.js application using the vue-cli. We will use a popular one called webpack. This template scaffold outputs ES2015/ES6 JavaScript, the latest stable version of JavaScript. To create a new project, go to any folder and setup a new application using: vue init webpack vuetodo You may get asked a few questions on the way. Just keep pressing enter to carry on with the defaults. Go inside the new directory using cd vuetodo Install the packages required by the application using npm install Finally, start the Vue.js development server using npm run dev This starts the server and watches your project folders for any file changes. It automatically refreshes the browser to reflect any detected changes. This is a term called hot module replacement. Speaking of the browser, visit the URL. You should see a brand new Vue.js application. We will be using Twitter Bootstrap to help style our application. So copy the contents of the URL from Bootstrap CDN and store it in static/css/bootstrap.css. Create another CSS file in static/css/style.css. Lastly, include these as CSS links inside of the main HTML file index.html like so. <meta charset="utf-8" /> <link title="no title" href="/static/css/bootstrap.css" rel="stylesheet" media="screen" /> <link title="no title" href="/static/css/style.css" rel="stylesheet" media="screen" /> Our Vue.js Todo App Components Structure Our Todo Application will comprise many components. A component helps us group pieces of functionality and visual representations into one “box”. For example, we can have a component for a list of contact details. The list itself could be a component. Since components can contain other sub-components, each contact detail itself could be a component. Every Vue.js App needs to have a top-level component. In our Todo Application, we will have a main component for the skeleton of our application. Nested in the main component is a TodoList component – this component will contain a list of Todo components nested inside of it. To give you a visual understanding of the structure, have a look at the tree below. MainComponent > TodoList > Todo Main App Component Now that we know more about the structure of our application, let us dig in and start building it. We will begin with the main top-level component. Most of our code will be in the src folder of our project. A main component was already created for us in src/App.vue. This will contain any sub-components which we will create. Creating a Component As part of the new application, there exists a component created for us in src/components/Hello.vue. Delete the file as we won't need it. Instead, we will create our own component called TodoList.vue inside of the components folder. Inside of the new file, TodoList.vue, put in the following content. Total Todo Count < span 3 < /span> < ul < li > Todo 1 < /li> < li > Todo 2 < /li> < li > Todo 3 < /li> < /ul> < script // <![CDATA[ export default { } // ]]></script> What we’ve done here is create a component class and provide a template. A component file has three parts, a template area, a component class, and a styles area. The template area is the visual part of a component. The class handles behavior and events and stores data which the template can access. The style part is for augmenting the presentation of the template. For now, we will only have a template and a class part in the above component. Importing Components Next, let us make sure we can use the new component by importing it in our main component. So inside of App.vue, add the following line at the top of the script section import TodoList from './components/TodoList' Remove the line import Hello from './components/Hello' Also, remove the reference to the Hello component from the components property. Add a reference to the TodoList component we just imported. So it will look like this components: { TodoList } Using a component Now that we have a basic component setup, let's make use of it. Change the template of the main component src/App.vue to look like this. <div class="container" id="app"> <div class="page-header"> <h1>Vue.js Todo App</h1> </div> <todo-list></todo-list> </div> To use a component, you need to invoke it like an HTML element as we’ve done above. You must separate words with dashes like below instead of camel case. <todo-list></todo-list> Component Data Since our main component template will need to show a list of Todos, let's supply some data to it. A single Todo has two properties named title and done. The title is the name of the Todo and done will represent whether the task is completed or not. Components provide data to their accompanying template through a data function. This function should return an object with the properties intended for the template. In our App Component, add a function returning an object with two properties like below. export default { components: { TodoList }, data() { return { newTodoText: '', todos: [{ title: 'Todo 1', done: false }, { title: 'Todo 2', done: false }, { title: 'Todo 3', done: false }, { title: 'Todo 4', done: false }] }; } Note that we have two properties. The Todos property holds the list of todos. The newTodoText holds the text for creating a new todo. Loops and Properties Component Properties We know that a component class can pass data to its template. Data can also be passed into a component when using it from a template. We have data in our main App.vue component class. Let's pass that down to the TodoList component. Change the main App.vue template to look like this: <div class="container" id="app"> <div class="page-header"> <h1>Vue.js Todo App</h1> </div> <todo-list v-bind:</todo-list> </div> Notice this line <todo-list v-bind:</todo-list> We have passed the list of Todos down to the TodoList component. It will be available in that component through the name todos. This is because of the binding syntax used above. It isn’t enough to just pass data down. We have to modify the TodoList component class. It has to declare what properties it will accept when using it. Modify the TodoList component class by adding a property to it like so. export default { props: ['todos'] Looping Over Data So now our TodoList component has revealed which properties it will accept. Inside the TodoList template, let's loop over the list of Todos like this and also show the length of the todos array Total Todo Count <span class = "badge"> {{ todos.length }} </span> <ul class = "list-group"> <li> {{ todo.title }} </li> </ul> Now that we can loop over our todos using a TodoList component, let us end the part 1 here and, in the next part, we will go in-depth into events, methods, creating, editing and deleting todos. Before deploying your commercial or enterprise Vue apps to production, make sure you are protecting their code against reverse-engineering, abuse, and tampering by following our tutorial.
https://blog.jscrambler.com/build-app-vue-js
CC-MAIN-2022-27
refinedweb
1,533
67.15
#include <stdio.h> void* memchr(const void* cs, int c, int n); The memchr function scans cs for the character c in the first n bytes of the buffer. The memchr function returns a pointer to the character c in cs or a null pointer if the character was not found. #include <stdio.h> int main() { char src [100] = "Search this string from the start"; char *c; c = (char*)memchr (src, 'g', sizeof (src)); if (c == NULL) printf ("'g' was not found in the src\n"); else printf ("found 'g' in the src\n"); return 0; } It will proiduce following result: found 'g' in the src
http://www.tutorialspoint.com/cgi-bin/printversion.cgi?tutorial=ansi_c&file=c_memchr.htm
CC-MAIN-2016-07
refinedweb
106
63.06
Obviously you could simply put everything into the main function and it would, indeed, compile and run, but this would quickly become unwieldy. In fact, your program would certainly become completely unmanageable and unreadable by the time it even reached a few dozen lines of code. Fortunately you don’t have to do that. You can create separate functions to handle these other items. There are a few idiosyncrasies regarding function creation in C++. The following list summarizes the requirements. The function must have a return type. It may be void if the function returns nothing. The function must have a valid name. The function must have parentheses for a list of parameters past to it, even if the parentheses are empty. The function must either be written before it’s called, or it must be prototyped. The first three you already know about, but the fourth rule may sound quite confusing. What does it mean to prototype a function? Essentially the problem is that the C++ compiler cannot call a function it does not know about. You have to let the compiler know what that function is and what it does before you can call it. One way to do this is to make sure you write out the function in your file, before you call it. This quickly becomes quite cumbersome. Therefore, C++ provides another way to do this. That method is prototyping. All you do to prototype a function is to write its declaration line at the beginning of the source file. This would probably be much clearer with an example. In this example we will create a function that simply cubes any number passed to it and returns the answer. That function is prototyped and then called from the main function. Step 1: Open your favorite text editor and type in the following code. You will then save it to a file called 04-01.cpp. // Include statements #include <iostream> using namespace std; // function prototypes. float cube_number(float num); int main() { float number; float number4; cout << "Please enter a number \n"; cin >> number; number4 = cube_number(number); cout << number << " cubed is " << number4; return 0; } float cube_number(float num) { // this function simply takes a number, cubes it, // then returns the answer float answer; return answer; } Step 2: Compile the code. (See Appendix D if you need more instruction on how to compile your programs.) Step 3: You can now run your program by typing in 04-01 at the command prompt. If all goes well (no compile errors), then you will see something like what is shown in Figure 4.1. Figure 4.1: Basic functions. This code contains the essentials of writing, prototyping, and using functions. Let’s examine it piece by piece to make sure you understand what is happening. The first line is simply an include statement. We include the iostream header file, so that you can do input and output (as you first saw in Chapter 2). The second line identifies that we wish to use the standard namespace, thus giving us access to cout, cin, endl, and any other function that may reside in iostream. Next is our prototype for our function. It is literally an exact copy of that functions declaration line. It lets the compiler know that there is a function later in the code. It’s defined so that it takes certain parameters and returns a certain value. (If you see a call to this function, before you get to the part where the function is written, don’t panic!). Once you get into the main function of this program, you see a few variables declared. One variable, number, stores whatever number the user types in. The second variable, number4, is designed to store the answer that the cube_number function returns. When you call cube_number, because it returns a value, you must set the function on the righthand side of an equation with an appropriate variable. The following is a generic example. Some variable, of the same data type as the function’s return type, is set equal to the function name. For example, float: f = myfunc() This example uses a variable of type double (the same type as the function is declared to return) and sets that variable equal to that function. This expression will cause the function to be called and its value stored in the variable in question. You should also pay particular attention to the function cube_number. Notice that it does have a parameter. Beginning programmers sometimes have trouble understanding what to pass as a parameter. The simple rule of thumb is this: If you were going to ask some person to perform the same task you are asking the function to perform, what would you have to give them? The answer to that is the parameters you will need to pass to the function in question. If you were asked to cube a number, someone would have to give you the number to cube. Thus, if you ask a function to cube a number, you have to pass it that number. Parameters are simply values stored in variables that you pass to functions. They are the raw “stuff” that functions use to produce the product desired. Parameters are also frequently called “arguments.” The words argument and parameter are used interchangeably. Let’s take a look at another example. In this example, the function takes two parameters to compute the area of a triangle. The formula for this is area = 1/2 of the base of the triangle, multiplied by the height of the triangle. A = 1/2 (b * h) Step 1: Enter the following code in your favorite text editor. Save it in a file called 04-02.cpp. #include <iostream> using namespace std; // function prototypes float triangle_area(float b, float h); int main() { float base, height, area; // get the user input cout << "Please enter the base of the triangle \n"; cin>> base; cout << "Please enter the height of the triangle\n"; cin >> height; area = triangle_area(base , height); cout << "That triangles area is " << area; return 0; } float triangle_area(float b, float h) { float a; a = .5 * (b * h); return a; } Step 2: Compile the code. Step 3: Run the code. You should see something similar to what is presented in Figure 4.2. Figure 4.2: Basic functions 2. This example is a lot like the first example, with the exception that the function triangle_area takes two parameters. A function may take zero parameters, one parameter, two parameters, and so on. Theoretically you can have a long list of parameters (also called arguments), dozens if you wish. However, as a rule of thumb, if you need more than three or four parameters, you may wish to rethink your code. You should note that with the exception of the two parameters instead of one, this program is very much like the first one. It begins with include statements, prototypes any functions other than main, has the main function, and then has other functions. You don’t have to declare the main function first. However, it seems logical to put that function first, because that is where the entire program is going to start. Also remember that you can have a function call another function. In fact, in both of our examples, the main function called the second function.
https://flylib.com/books/en/2.331.1.33/1/
CC-MAIN-2019-43
refinedweb
1,222
73.17
After writing the article about event-based firmware, I realised there are some misunderstandings how real-time counter are working and should be used. Especially there is a misconception about an imagined problem if such counter overflows. In this article, I try to explain this topic in more detail, using example code for the Arduino IDE. What is a Real-Time Counter? A real-time counter is a variable or register which increases at a given time interval. The term real-time may be confusing. It just states the fact this counter ideally does count independently of any other parts of the firmware. Therefore, even if the main code stops at one point and waiting for a specific condition, the real-time counter will get increased in the “background” at the given interval. How is the Real-Time Counter Implemented? These counters are usually implemented using a hardware timer and an interrupt. For the Arduino platform, a hardware timer is set to create an interrupt each millisecond. If you can find most of this code in the file wired.c ( delay.c (SAMD). The following code is a summary of the relevant parts of the simpler implementation for the SAMD platform: static volatile uint32_t _ulTickCount=0; unsigned long millis(void) { return _ulTickCount; } void SysTick_DefaultHandler(void) { _ulTickCount++; } You see the variable _ulTickCount which is an unsigned 32bit integer. It is marked as volatile to tell the compiler, this variable can be modified from an interrupt and reads can not be optimised away. You can access the current value using the millis() function. Interrupts do not need to be blocked while reading this value, because reading a single 32bit value is an atomic operation for the SAMD platform. It means, it is not possible to process an interrupt in the middle of reading the integer. The interrupt will occur before or after reading the value, but never e.g. after reading the first byte of the integer value. For some platforms, this can be a problem. The last function is SysTick_DefaultHandler which just increases the variable by one every millisecond. What is Integer Overflow? An integer overflow happens, if you add to an integer value and the result exceeds the maximum number it can store. You can easily verify this using the following code: #include <iostream> #include <cstdint> #include <iomanip> int main() { int16_t value = 0xffffu; value += 1; std::cout << "value = 0x"; std::cout << std::setfill('0') << std::setw(4) << std::hex << value; std::cout << std::endl; } The output of this code is: value = 0x0000 There are some misunderstandings how integer overflow is working: - Integer overflow is a low-level behaviour of processors and not all programming languages behave this way. E.g. Python or Swift handle these cases in a special way. - Overflow happens not just in one direction. It is a fundamental principle how processors are doing math. It happens with additions, subtractions but also affects multiplications and divisions. Just imagine, you see the least significant part of a larger value: The grey part on the left does not exist. It just explains the principle of the operation. On the CPU level, only one bit of the grey part is kept in the form of an overflow or carry bit. This bit can be used to chain multiple additions to work with larger numbers. In most programming languages, you can not access this overflow or carry bit directly. While most people easily understand the transition from the last possible value back to zero, it works similarly with any operation: Subtractions are no exception. The overflow happens oppositely: Multiplication is no exception, have a look at the following code example: #include <iostream> #include <cstdint> #include <iomanip> int main() { int16_t value = 0x1234u; value *= 0x1234u; std::cout << "value = 0x"; std::cout << std::setfill('0') << std::setw(4) << std::hex << value; std::cout << std::endl; } The output of this code is: value = 0x5a90 So, why 0x1234 multiplied by 0x1234 equals 0x5a90? The explanation is very simple: For mathematicians, this is troubling and often leads to mistakes, but if this is understood correctly, it simplifies many calculations. The Real-Time Counter as Relative Time Often real-time counters are set to zero at the start of the firmware. It often leads to the wrong assumption, it counts absolute time. Similar to the time counter after the launch of a rocket or a date/time value. If you use a 32bit counter and use a one-millisecond precision, it can only count for approximate 1193 hours or 50 days. In this context, precision means, the counter is increased once per millisecond. Many hardware projects will run more than 50 days, so there is confusion what happens if the real-time counter overflows and starts over at zero. It is essential to think of these counters as relative time. Imagine this counter will not start at zero at the begin of the firmware. Imagine the counter will start with a random value you do not know. The actual absolute value of a real-time counter is meaningless, and you should never use an absolute value directly. Points in Time Best is to think of points in time. To find a point in time, you have to calculate them relative to the current time: In a simple program, this could look like this: const uint8_t cOrangeLedPin = 13; void setup() { pinMode(cOrangeLedPin, OUTPUT); auto next = millis() + 1000; digitalWrite(cOrangeLedPin, HIGH); while (millis() != next) {} digitalWrite(cOrangeLedPin, LOW); } void loop() { } This program is using the function millis() which is the real-time counter for the Arduino platform. It will always return the current relative time in milliseconds. First I calculate a point in time in the future using the expression millis() + 1000 and assign it to next. After turning on the LED, I will simply wait until this point in time was reached. Using a direct comparison != is not ideal, what happens if an interrupt would take more than a few milliseconds and the while would miss this expected millisecond? This loop would block for the full 50 days until this same value reappears again. With a bit of luck, the comparison would match this second time. Therefore, using a direct comparison is a bad idea. While it is working in example programs, you should never use this in production code. Test if the Time Expired A much better approach is to test if the calculated time has expired. It is precisely the point where many developers make a fatal mistake. They will write code like this: const uint8_t cOrangeLedPin = 13; void setup() { pinMode(cOrangeLedPin, OUTPUT); auto next = millis() + 1000; digitalWrite(cOrangeLedPin, HIGH); while (millis() < next) {} // WRONG!!!! digitalWrite(cOrangeLedPin, LOW); } void loop() { } On first glance, this code looks good. And assuming the real-time counter will start at zero, this example code will work as expected. As long as millis() is less than the chosen point in time, the while loop will wait. The fatal assumption here is the real-time counter value will increase indefinitely. You assume, the real-time counter is an absolute time, which is wrong! There is a chance the real-time counter was already near its end. Adding the 100ms to the value will overflow, and you will end with a lower value as before. If you think of the value as absolute time, this can lead to horrible results. It is precisely this particular case which worries many developers. They talk about a special case and how to prevent problems caused by it. It is only a special case if you think in absolute time. If you correctly think in relative time, there is no special case. The Time Delta for Comparison To correctly verify if a point in time has expired, you always have to calculate the delta between this point in time and the current time. Calculating the delta between this time points is a simple subtraction: auto delta = next - millis(); Here comes the next topic which is misunderstood. Calculating a delta using unsigned values will not produce the expected results. ::endl; } } This simple C++ program simulates a real-time counter currentTime and a time point 100ms in the future timePoint. You will get this result: ct=0x1000 tp=0x1064 tp-ct=0x0064 ct=0x1020 tp=0x1064 tp-ct=0x0044 ct=0x1040 tp=0x1064 tp-ct=0x0024 ct=0x1060 tp=0x1064 tp-ct=0x0004 ct=0x1080 tp=0x1064 tp-ct=0xffe4 ct=0x10a0 tp=0x1064 tp-ct=0xffc4 ct=0x10c0 tp=0x1064 tp-ct=0xffa4 ct=0x10e0 tp=0x1064 tp-ct=0xff84 As you can see, as soon the current time is after the time point, the subtraction will overflow, and you get high values. For this example, I use 16bit values, but the principle is the same for any unsigned integers. To test for an expired value, you can use several techniques, but most just split the whole time range in half. You simply check if the result is higher than the middle of your value to assume you got a negative result. Therefore the current time has passed the chosen point in time. const uint8_t cOrangeLedPin = 13; bool hasExpired(uint32_t timePoint) { // not perfect const auto delta = timePoint - millis(); return delta > 0x80000000u || delta == 0; } void setup() { pinMode(cOrangeLedPin, OUTPUT); auto next = millis() + 1000; digitalWrite(cOrangeLedPin, HIGH); while (!hasExpired(next)) {} digitalWrite(cOrangeLedPin, LOW); } void loop() { } You may also check for the highest bit in the value: bool hasExpired(uint32_t timePoint) { // not perfect const auto delta = timePoint - millis(); return ((delta & 0x80000000u) != 0) || delta == 0; } Highest bit? Isn’t this how signed integers work? If the highest bit in a signed integer is set, it indicates a negative value. Therefore, if you convert an unsigned integer after a subtraction into a signed one, you get the correct negative results as you would expect. There is no difference between the subtraction of signed or unsigned integers on the binary level. It is just the representation of the value, which is different. Let us test this with our previous example: ; } } It will now produce this result: ct=0x1000 tp=0x1064 tp-ct=0x0064 => 100 ct=0x1020 tp=0x1064 tp-ct=0x0044 => 68 ct=0x1040 tp=0x1064 tp-ct=0x0024 => 36 ct=0x1060 tp=0x1064 tp-ct=0x0004 => 4 ct=0x1080 tp=0x1064 tp-ct=0xffe4 => -28 ct=0x10a0 tp=0x1064 tp-ct=0xffc4 => -60 ct=0x10c0 tp=0x1064 tp-ct=0xffa4 => -92 ct=0x10e0 tp=0x1064 tp-ct=0xff84 => -124 Simplify the Test With this knowledge, we can simplify the test by converting the unsigned integer into a signed one and just test for a negative number: bool hasExpired(uint32_t timePoint) { // promising const auto delta = timePoint - millis(); return static_cast<int32_t>(delta) <= 0; } Is there an Issue if the Real-Time Counter Overflows? Now, what happens if the real-time counter overflows. To find out, let us simulate this overflow situation with our example program: #include <iostream> #include <cstdint> #include <iomanip> void hex(uint16_t value) { std::cout << "0x" << std::setfill('0') << std::setw(4) << std::hex << value; } int main() { int16_t currentTime = 0xffc0u; const int16_t timePoint = currentTime + 100u; for (int i = 0; i < 8; ++i,; } } The output is: ct=0xffc0 tp=0x0024 tp-ct=0x0064 => 100 ct=0xffe0 tp=0x0024 tp-ct=0x0044 => 68 ct=0x0000 tp=0x0024 tp-ct=0x0024 => 36 ct=0x0020 tp=0x0024 tp-ct=0x0004 => 4 ct=0x0040 tp=0x0024 tp-ct=0xffe4 => -28 ct=0x0060 tp=0x0024 tp-ct=0xffc4 => -60 ct=0x0080 tp=0x0024 tp-ct=0xffa4 => -92 ct=0x00a0 tp=0x0024 tp-ct=0xff84 => -124 As you can see, the delta values are exactly the same as for the previous run. There is no special case. You can run the example program with any start value for the current time, and you will get the same results. Summary - The correct way to work with real-time counters is by consequently thinking about them as relative time. Not only calculating a point in time has to be relative, but also the comparison has to in relative time using a delta. - Overflow is no problem, instead it is beneficial to write very compact code. - The correct way to calculate points in time is by adding to the current time value: currentTime + delay. - The correct way to check for expired points in time is using a delta: static_cast<int32_t>(timePoint - currentTime) <=0 Limitations and Time Delta Maximum The size and precision of the counter define the maximum time delta you can safely measure. The following table describes different bit sizes and the maximum time delta: Using a Fraction of the Counter If you have memory constraints and do not need time deltas in the day range, but in the second range, you can use a fraction of the real-time counter: const uint8_t cOrangeLedPin = 13; void setup() { pinMode(cOrangeLedPin, OUTPUT); auto next = static_cast<uint16_t>(millis() + 1000u); digitalWrite(cOrangeLedPin, HIGH); while (static_cast<int16_t>(next - millis()) > 0) {} digitalWrite(cOrangeLedPin, LOW); } void loop() { } Because you use relative time, it does not matter if you use a lower number of bits of the counter. What if I Need Precise Timing? If you need a very precise timing or measure times on the nanosecond scale, you should consider using a hardware timer and interrupts. Real-time counter, especially the ones implemented in software, are not very precise. Other interrupts can cause a slight shift or even cause the counter to skip a tick. Another problem is the way to test to a time point in the main program – using e.g. an event loop. Alternatively, there are dedicated real-time counter chips or built-in real-time counters in certain MCUs. The benefit of using a dedicated hardware counter is independence from the CPU. Even if interrupts get disabled or delayed, the hardware counter will happily continue to tick. The disadvantage is the additional effort to get the current value from the chip or timer. What if I Need to Measure very Long Periods? If you need to measure hours, days, months or even years, you should not use a real-time counter, but a dedicated real-time clock chip. Good RTC chips will keep the current time over many years with just a few seconds difference. Also, RTC chips usually have one or two alarms you can set and connect to raise an interrupt or even wake up the MCU. If long term stability is no issue, you can alternatively use a dedicated real-time clock with a very low precision like 1 second or even slower. With this precision, a 32bit value will have a maximum duration of 136 years, and you can easily measure time deltas of 68 years. Learn More - It’s Time to Use #pragma once - Guide to Modular Firmware - Class or Module for Singletons? - Write Less Code using the “auto” Keyword - Event-based Firmware - How to Deal with Badly Written Code - Make your Code Safe and Readable with Flags Conclusion I hope this article gave you some insights on the topic of real-time counters and you got rid of fears about integer overflows. 🙂 If you have questions, miss some information or have any feedback, feel free to add a comment below.
https://luckyresistor.me/2019/07/10/real-time-counter-and-integer-overflow/
CC-MAIN-2020-16
refinedweb
2,517
60.24
Adobe (Nov 22, 2010) Get answers to your questions about Flash Player 10.1 for Google TV.. Adobe (Nov 22, 2010) Learn how to purge process data when records are no longer necessary.. Rajesh Kumar (Nov 15, 2010) Create multiuser games that are loaded into Share pods in Adobe Connect Meeting rooms. Fumio Nonaka (Nov 15, 2010) Learn how to create formatted TLF text objects, incorporate XML data, and separate content from formatting to achieve advanced typographical effects. Renaun Erickson (Nov 09, 2010) In this video, understand the namespace changes to both MXML and CSS files, such as the former mx namespace that is now mx, fx, or s. (6:52) Scott Macdonald (Nov 08, 2010) Programmatically create an RIA that displays live stock data by using LiveCycle Data Services ES2. Allen Ellison (Nov 08, 2010) Understand the obstacles to creating a consistent experience for mobile users and learn best practices for creating SWF content that scales gracefully from desktop to device. David Hogue, Ph.D. (Nov 08, 2010) Modify the exported CSS and HTML files from a Fireworks design in Dreamweaver to complete the design of a website. Anthony Cintron (Nov 08, 2010) Build a Flex front end that uses AMF to communicate with a Django and Python back end. Alex Olteanu (Nov 08, 2010) Track visitor behavior in your Flash projects and gather various data in meaningful reports, such as client conversion funnels, user activity, and product sales.. Adobe (Nov 04, 2010) Learn how minor changes to this update improve security without affecting SWF content, and stay informed about future product updates. Paul Trani (Nov 03, 2010) Learn about the font-embedding capabilities of Flash Professional CS5 and explore how these tools ensure the integrity of your design. (8:58) Peleus Uhley (Nov 02, 2010) Dramatically change the relationship between Flash objects and the websites they're contained in. (5:03) Peleus Uhley (Nov 02, 2010) Watch how to build rich Flash content that helps respect user privacy and reduce security risks in this series on secure ActionScript coding. Dave Klein (Nov 01, 2010) In this tutorial, Dave Klein introduces you to Strata Enfold 3D, a real 3D plug-in for Adobe Illustrator that enables you to create die cut lines and crease fold lines to produce and interact with a 3D model right inside Illustrator. Shyamprasad P (Nov 01, 2010) Create a form in three different ways using the DCD features in Flash Builder 4. Jeanette Stallons (Nov 01, 2010) Combine the Adobbe Flash Platform with the Facebook Platform to build killer apps that incorporate social capabilities in highly interactive, expressive, and responsive user experiences. Ed Sullivan (Nov 01, 2010) Find and share code with the community, and have some fun in the process, in the Adobe Cookbooks 2.0—now with a special incentive for Flex, Flash Professional, and ActionScript recipe contributors. Tommi West (Nov 01, 2010) Get an overview of TLF text, the new default text type in Flash CS5, and see how you can use it to display text objects in a SWF file.
https://www.adobe.com/devnet/article-index.__autoinvalidate.paging.51.html
CC-MAIN-2017-22
refinedweb
510
56.89
Ralf W. Grosse-Kunstleve wrote: > >>> import std_vector > __main__:1: DeprecationWarning: assignment shadows builtin > >>> dir(std_vector) > ['__doc__', '__file__', '__name__', 'array_cast', 'boost_array_sum', > 'cos', 'double', 'float', 'in_place_multiply', 'int', 'long', 'size_t'] > > std_vector is a Boost.Python extension module I suspect the warning is shown due to the way Boost builds the namespace of the extension module. Shadowing of builtin names is checked by the setattr method of the module type. Boost is probably using module_setattr to populate the global dictionary. There's nothing wrong with doing that except that it triggers a spurious warning. > Does the DeprecationWarning mean that I cannot provide this intuitive > interface anymore? That was not the intention. Having module globals that shadow builtins is okay. The warning is supposed to be triggered if the scope of a name is changed from builtin to global at runtime. Eg: import string string.str = 'ha ha' That's a strange thing to do and I suspect there is little code out there that does it. Unfortunately the code that tries to detect it is imperfect. > It seems to me that the names of builtin types are essentially made > equivalent to reserved keywords. No, see above. Neil
https://mail.python.org/pipermail/python-dev/2003-July/036880.html
CC-MAIN-2019-22
refinedweb
193
66.44
Every Engineer who loves to tinker with electronics at some point of time would want to have their own lab set-up. A Multimeter, Clamp meter, Oscilloscope, LCR Meter, Function Generator, Dual mode power supply and an Auto transformer are the bare minimum equipments for a decent lab set-up. While all of these can be purchased, we can also easily built few on our own like the Function Generator and the Dual mode power supply. In this article we will learn how quickly and easily we can build our own Function generator using Arduino. This function generator a.k.a waveform generator. Apart from that, the generator can also produce since wave with frequency control. Do note that this generator is not of industrial grade and cannot be used for serious testing. But other than that it will come in handy for all hobby projects and you need not wait in weeks for the shipment to arrive. Also what’s more fun than using a device, that we built on our own. Materials Required - Arduino Nano - 16*2 Alphanumeric LCD display - Rotary Encoder - Resistor(5.6K,10K) - Capacitor (0.1uF) - Perf board, Bergstik - Soldering Kit Circuit Diagram The complete circuit diagram this Arduino Function Generator is shown below. As you can see we have an Arduino Nano which acts as the brain of our project and an 16x2 LCD to display the value of frequency that is currently being generated. We also have a rotary encoder which will help us to set the frequency. The complete set-up is powered by the USB port of the Arduino itself. The connections which I used previously didn’t turn out to work dues to some reasons which we will discuss later in this article. Hence I had to mess up with the wiring a bit by changing the pin order. Anyhow, you will not have any such issues as it is all sorted out, just follow the circuit carefully to know which pin is connect to what. You can also refer the below table to verify your connections. The circuit is pretty simple; we produce a square wave on pin D9 which can be used as such, the frequency of this square wave is controlled by the rotary encoder. Then to get a sine wave we produce SPWM signal on pin D5, the frequency of this has to be related with PWM frequency so we provide this PWM signal to pin D2 to act as an interrupt and then use the ISR to control the frequency of the since wave. You can build the circuit on a breadboard or even get a PCB for it. But I decided to solder it on a Perf board to get the work done fast and make it reliable for long term use. My board looks like this once all the connections are complete. If you want to know more on how the PWM and Sine wave is produced with Arduino read the following paragraphs, else you can scroll down directly to the Programming Arduino section. Producing Square Wave with Variable Frequency People who are using Arduino might be familiar that Arduino can produce PWM signals simply by using the analog write function. But this function is limited only to control the duty cycle of the PWM signal and not the frequency of the signal. But for a waveform generator we need a PWM signal whose frequency can be controlled. This can be done by directly controlling the Timers of the Arduino and toggling a GPIO pin based on it. But there are some pre-built libraries which do just the same and can be used as such. The library that we are using is the Arduino PWM Frequency Library. We will discuss more about this library in the coding section. There are some drawbacks with this library as well, because the library alters the default Timer 1 and Timer 2 settings in Arduino. Hence you will no longer be able to use servo library or any other timer related library with your Arduino. Also the analog write function on pins 9,10,11 & 13 uses Timer 1 and Timer 2 hence you will not be able to produce SPWM on those pins. The advantage of this library is that it does not disturb the Timer 0 of your Arduino, which is more vital than Timer 1 and Timer 2. Because of this you are free to use the delay function and millis() function without any problem. Also the pins 5 and 6 are controlled by Timer 0 hence we won’t be having problem in using analog write or servo control operation on those pins. Initially it took some time for me to figure this out and that is why the wiring is messed up a bit. Here we have also built one Simple Square waveform generator, but to change the frequency of waveform you have to replace Resistor or capacitor, and it will hard to get the required frequency. Producing Sine Wave using Arduino As we know microcontrollers are Digital devices and they cannot produce Sine wave by mere coding. But there two popular ways of obtaining a sine wave from a microcontroller one is by utilizing a DAC and the other is by creating a SPWM. Unfortunately Arduino boards (except Due) does not come with a built-in DAC to produce sine wave, but you can always build your own DAC using the simple R2R method and then use it to produce a decent sine wave. But to reduce the hardware work I decided to use the later method of creating a SPWM signal and then converting it to Sine wave. What is a SPWM signal? The term SPWM stands for Sinusoidal Pulse Width Modulation. This signal is very much similar to the PWM, but for an SPWM signal the duty cycle is controlled in such a manner to obtain an average voltage similar to that of a sine wave. For example, with 100% duty cycle the average output voltage will be 5V and for 25% we will have 1.25V thus controlling the duty cycle we can get pre-defined variable average voltage which is nothing but a sine wave. This technique is commonly used in Inverters. In the above image, the blue signal is the SPWM signal. Notice that the duty cycle of the wave is varied from 0% to 100% and then back to 0%. The graph is plotted for -1.0 to +1.0V but in our case, since we are using an Arduino the scale will be form 0V to 5V. We will learn how to produce SPWM with Arduino in the programming section below. Converting SPWM to Sine wave Converting a SPWM single to sine wave requires a H-bridge circuit which consists of minimum 4 power switches. We will not go much deeper into it since we are not using it here. These H-bridge circuits are commonly used in inverters. It utilizes two SPWM signals where one is phase shifted from the other and both the signals are applied to the power switches in the H-bridge to make diagonal opposing switches turn on and off and the same time. This way we can get a wave form that looks similar to sine wave but will practically not be closer to anything shown in the figure above (green wave). To get a pure since wave output we have to use a filter like the low-pass filter which comprises of an Inductor and Capacitor. However in our circuit, we will not be using the sine wave to power anything. I simply wanted to create from the generated SPWM signal so I went with a simple RC-Filter. You can also try a LC-Filter for better results but I chose RC for simplicity. The value of my resistor is 620 Ohms and the capacitor is 10uF. The above image shows the SPWM signal (Yellow) from the pin 5 and the sine wave (Blue) which was obtained after passing it through a RC-Filter. If you don’t want to vary the frequency, you can also generate sine wave by using this Simple Sine Wave Generator Circuit using Transistor. Adding the Arduino PWM Frequency Library The Arduino Frequency Library can be downloaded by clicking on the link below. At the time of writing this article, the Arduino PWM Frequency Librarey V_05 is the latest one and it will get downloaded as a ZIP file. Extract the ZIP file ad you will get a folder called PWM. Then navigate to the Libraries folder of your Arduino IDE, for windows users it will be in your documents at this path C:\Users\User\Documents\Arduino\libraries. Paste the PWM folder into the libraries folder. Sometimes you might already have a PWM folder in there, in that case make sure you replace the old one with this new one. Programming Arduino for Waveform Generator As always the complete program for this project can be found at the bottom of this page. You can use the code as such, but make sure you have added the variable frequency library for Arduino IDE as discussed above else you will get compile time error. In this section let’s look in to the code to understand what is happening. Basically we want to produce a PWM signal with variable frequency on pin 9. This frequency should be set using the rotary encoder and the value should also be displayed in the 16*2 LCD. Once the PWM signal is created on pin 9 it will create an interrupt on pin 2 since we have shorted both the pins. Using this interrupt we can control the frequency of the SPWM signal which is generated on pin 5. As always we begin our program by including the required library. The liquid crystal library is in-built in Arduino and we just installed the PWM library. #include <PWM.h> //PWM librarey for controlling freq. of PWM signal #include <LiquidCrystal.h> Next we declare the global variable and also mention the pin names for the LCD, Rotary Encoder and signal pins. You can leave this undisturbed if you have followed the circuit diagram above. const int rs = 14, en = 15, d4 = 4, d5 = 3, d6 = 6, d7 = 7; //Mention the pin number for LCD connection LiquidCrystal lcd(rs, en, d4, d5, d6, d7); const int Encoder_OuputA = 11; const int Encoder_OuputB = 12; const int Encoder_Switch = 10; const int signal_pin = 9; const int Sine_pin = 5; const int POT_pin = A2; int Previous_Output; int multiplier = 1; double angle = 0; double increment = 0.2; int32_t frequency; //frequency to be set int32_t lower_level_freq = 1; //Lowest possible freq value is 1Hz int32_t upper_level_freq = 100000; //Maximum possible freq is 100KHz Inside the setup function we initialize the LCD and serial communication for debugging purpose and then declare the pins of Encoder as input pins. We also display an intro message during the boot just to make sure things are working. //pin Mode declaration pinMode (Encoder_OuputA, INPUT); pinMode (Encoder_OuputB, INPUT); pinMode (Encoder_Switch, INPUT); Another important line is the InitTimerSafe which initializes the timer 1 and 2 for producing a variable frequency PWM. Once this function is called the default timer settings of Arduino will be altered. InitTimersSafe(); //Initialize timers without disturbing timer 0 We also have the external interrupt running on pin 2. So whenever there a change in status of pin 2 an interrupt will be triggered which will run the Interrupt service routine (ISR) function. Here the name of the ISR function is generate_sine. attachInterrupt(0,generate_sine,CHANGE); Next, inside the void loop we have to check if the rotary encoder has been turned. Only if it has been turned we need to adjust the frequency of the PWM signal. We have already learnt how to interface Rotary Encoder with Arduino. If you are new here I would recommend you to fall back to that tutorial and then get back here. If the rotary encoder is turned clockwise we increase the value of frequency by adding it with the value of multiplier. This way we can increase/decrease the value of frequency by 1, 10, 100 or even 1000. The value of multiplier can be set by pressing the rotary encoder. If the encoder is rotated we alter the value of frequency and produce a PWM signal on pin 9 with the following lines. Here the value 32768 sets the PWM to 50% cycle. The value 32768 is chosen, since 50% of 65536 is 32768 similarly you can determine the value for your required duty cycles. But here the duty cycle is fixed to 50%. Finally the function SetPinFrequencySafe is used to set the frequency of our signal pin that is pin 9. pwmWriteHR(signal_pin, 32768); //Set duty cycle to 50% by default -> for 16-bit 65536/2 = 32768 SetPinFrequencySafe(signal_pin, frequency); Inside the ISR function we write the code to generate SPWM signal. There are many ways to generate SPWM signals and even pre-built libraries are available for Arduino. I have used the simplest of all methods of utilizing the sin() function in Arduino. You can also try with the lookup table method if you are interested. The sin() returns a variable value (decimal) between -1 to +1 and this when plotted against time will give us a sine wave. Now all we have to do is convert this value of -1 to +1 into 0 to 255 and feed it to our analog Write function. For which I have multiplied it with 255 just to ignore the decimal point and then used the map function to convert the value from -255 to +255 into 0 to +255. Finally this value is written to pin 5 using the analog write function. The value of angle is incremented by 0.2 every time the ISR is called this help us in controlling the frequency of the sine wave double sineValue = sin(angle); sineValue *= 255; int plot = map(sineValue, -255, +255, 0, 255); Serial.println(plot); analogWrite(Sine_pin,plot); angle += increment; Testing the Arduino Function Generator on Hardware Build your hardware as per the circuit diagram and upload the code given at the bottom of this page. Now, you are all set to test your project. It would be a lot easier if you have a DSO (Oscilloscope) but you can also test it with an LED since the frequency range is very high. Connect the probe to the Square wave and sine wave pin of the circuit. Use two LEDs on these two pins if you do not have a scope. Power up the circuit and you should be greeted with the introductory message on the LCD. Then vary the Rotary encoder and set the required frequency you should be able to observe the square wave and sine wave on your scope as shown below. If you are using an LED you should notice the LED blinking at different intervals based on the frequency you have set. The complete working of the waveform generator can also be found at the video given at the end of this page. Hope you enjoyed the project and learnt something useful from it. If you have any questions leave them in the comment section or you could also use the forums for other technical help. #include <PWM.h> //PWM librarey for controlling freq. of PWM signal #include <LiquidCrystal.h> const int rs = 14, en = 15, d4 = 4, d5 = 3, d6 = 6, d7 = 7; //Mention the pin number for LCD connection LiquidCrystal lcd(rs, en, d4, d5, d6, d7); int Encoder_OuputA = 11; int Encoder_OuputB = 12; int Encoder_Switch = 10; int Previous_Output; int multiplier = 1; double angle = 0; double increment = 0.2; const int signal_pin = 9; const int Sine_pin = 5; const int POT_pin = A2; int32_t frequency; //frequency to be set int32_t lower_level_freq = 1; //Lowest possible freq value is 1Hz int32_t upper_level_freq = 100000; //Maximum possible freq is 100KHz void setup() { InitTimersSafe(); //Initialize timers without disturbing timer 0 //pin Mode declaration pinMode (Encoder_OuputA, INPUT); pinMode (Encoder_OuputB, INPUT); pinMode (Encoder_Switch, INPUT); Previous_Output = digitalRead(Encoder_OuputA); //Read the inital value of Output A attachInterrupt(0,generate_sine,CHANGE); } void loop() { if (digitalRead(Encoder_OuputA) != Previous_Output) { if (digitalRead(Encoder_OuputB) != Previous_Output) {); } else {); } } if (digitalRead(Encoder_Switch) == 0) { multiplier = multiplier * 10; if (multiplier>1000) multiplier=1; // Serial.println(multiplier); lcd.setCursor(0, 1); lcd.print("Cng. by: "); lcd.setCursor(8, 1); lcd.print(multiplier); delay(500); while(digitalRead(Encoder_Switch) == 0); } Previous_Output = digitalRead(Encoder_OuputA); } void generate_sine() { double sineValue = sin(angle); sineValue *= 255; int plot = map(sineValue, -255, +255, 0, 255); Serial.println(plot); analogWrite(Sine_pin,plot); angle += increment; if (angle > 180) angle =0; } Dec 21, 2018 This is cool. Running on a clone nano. Seems touchy (clone?), but is dead accurate according to my DSO. Dec 24, 2018 Well, bought a 'Genuine' Nano and tried this... 1. can't seem to run over 200HZ without hanging it. Checked everything..Assuming D14 is A0 and D15 is A1, it's all wired correctly. 2. why is this line in there: const int POT_pin = A2; Doesn't seem like it's used anywhere. and no wires are on A2. I think it was touchy before because of the encoder. Any ideas why yours does so much better than mine? My Nano is listed as "Arduino Nano [A000005] which should be v 3.x. Mar 03, 2019 My encoder needed a pull-up on the switch. I had to swap the A and B signals from it as well. The square wave output is not toggling until I turn the encoder backwards a step. Is this expected? I am getting a sine wave out, but at a much lower frequency: setting at 1000Hz, I get a sinewave of 6.8Hz (after adding a 1uF cap). Is this expected? Thanks! David Mar 03, 2019 Aug 14, 2019 Good work david, yes the change in frequency can be expected and it depends on the freq. of your SPWM. As I mentioned in tutorial, you can realy on the square wave but sine wave would work just crude. Mar 17, 2019 Very nice design, very precisely wave. Is there any simple way to increase precision to two decimal places - resolution 0.01 Hz? I tried to divide the frequency / 100 - SetPinFrequencySafe (signal_pin, frequency / 100); but then it automatically enters 500Hz. I also tryied change int32_t for floate in librarie without sukces. Greetings. Aug 14, 2019 Hi Radek, the precesion of the wave is limited by the clock frequency of the arduino board. If you are trying something more precesie I would recommend upgrading to STM32 or LPC2148
https://circuitdigest.com/microcontroller-projects/arduino-waveform-generator
CC-MAIN-2019-35
refinedweb
3,101
61.56
Many times we wonder that how a web container/ web-server (e.g. tomcat or jboss) works? How they handle the incoming http requests coming from all over the world? What are the things which make it happen behind the scene? How java servlet API (i.e. classes like ServletContext, ServletRequest, ServletResponse and Session) fit into picture? These are very important questions/concepts you must know if you are a web-application developer or you aspire to be. In this post, I will try to find out answers for some of above question, if not all. Remain concentrated from here. Table of Contents: What are web server, application server and web container? What are Servlets? How they help? What is ServletContext? Who creates it? Where ServletRequest and ServletResponse fits into life cycle? How Session is managed? Know the cookie? How thread safety should be ensured? What are web server, application server and web container? I will first talk about web servers and application servers. Let me say it in one liner, In early days of the Mosaic browser (often described as the first graphical web browser) and hyper-linked content, there evolved a new concept “web server” that served static web page content and images over HTTP protocol. Simple enough. In these days, most of the content was static, and the HTTP 1.0 protocol was just a way to ship files around. But soon the web servers evolved to have CGI capabilities. It means effectively launching a process on each web request to generate dynamic content. By this time, HTTP protocol also matured and web servers became more sophisticated with additional functionality like caching, security, and session management. As the technology further matured, we got company-specific java-based server-side technology from Kiva and NetDynamics, which eventually all merged into JSP (java server pages), which we still use in most applications development today. This was about web-servers. Now let’s talk about application servers. In a parallel category, the application servers had evolved and existed for a long time. Some companies delivered products for Unix like Tuxedo (transaction-oriented middleware), TopEnd, Encina that were philosophically derived from Mainframe application management and monitoring environments like IMS and CICS. Most of these products specified “closed” product-specific communications protocols to interconnect “fat” clients to servers. In 90’s, these traditional app server products began to embed basic HTTP communication capability, at first via gateways. And sooner the lines began to blur between these two categories. By the time, web servers got more and more mature with respect to handling higher loads, more concurrency, and better features; Application servers started delivering more and more HTTP-based communication capability. And all this resulted into very thin line between web-servers and application servers. At this point the line between “app server” and “web server” is a fuzzy one. But people continue to use the terms differently, as a matter of emphasis. That’s all about web servers and application servers. Now move towards third term i.e. web container. Web container, specially in java, should be refer to servlet container. A servlet container is the component of a web server that interacts with java servlets. A web container is responsible for managing the life-cycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights and many more such services. Basically, putting together all above facts, servlet container is the runtime environment where your servlet run and it’s life cycle is maintained. What are Servlets? How they help? In java, servlets enable you to write server side components which help in generating dynamic content, based on request. Factually, Servlet is an interface defined in javax.servlet package. It declares three essential methods for the life cycle of a servlet – init(), service(), and destroy(). They are implemented by every servlet(either defined in SDK or user-defined) and are invoked at specific times by the server during it’s life cycle. Servlet classes are loaded to container by it’s class loader dynamically either through lazy-loading or eager loading. Each request is in its own thread, and a servlet object can serve multiple threads at the same time. When it is no longer being used, it is garbage collected by JVM. Lazy loading servlet Eager loading servlet What is ServletContext? Who creates it? When the servlet container starts up, it will deploy and load all web-applications. When a web application gets loaded, the servlet container will create the ServletContext once per application and keep in server’s memory. The webapp’s web.xml will be parsed and every Servlet, Filter and Listener found in web.xml will be created once and kept in server’s memory as well. When the servlet container shuts down, it will unload all web applications and the ServletContext and all Servlet, Filter and Listener instances will be trashed. As per java docs, ServletContext defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log. Where ServletRequest and ServletResponse fits into life cycle? The servlet container is attached to a webserver which listens on HTTP requests on a certain port number, which is usually 80. When a client (user with a web-browser) sends a HTTP request, the servlet container. How Session is managed? Know the cookie? When a client visits the web-app for the first time and/or the HttpSession is to be obtained for the first time by request.getSession(), then the servlet container will create it, generate a long and unique ID (which you can get by session.getId()) and store it in server’s memory. The servlet container will also set a Cookie in the HTTP response with JSESSIONID as cookie name and the unique session ID as cookie value. As per the HTTP cookie specification (a contract a decent web browser and webserver has to adhere), the client (the web browser) is required to send this cookie back in the subsequent requests as long as the cookie is valid. The servlet container will determine every incoming HTTP request header for the presence of the cookie with the name JSESSIONID and use its value to get the associated HttpSession from server’s memory. The HttpSession lives until it has not been used for more than the time, a setting you can specify in web.xml, which defaults to 30 minutes. So when the client doesn’t visit the web application anymore for over 30 minutes, then the servlet container will trash the session. Every subsequent request, even though with the cookie specified, will not have access to the same session anymore. The servletcontainer will create a new one. Existing Session New Session >>IMAGE. How thread safety should be ensured? You should now have learned that Servlets and filters are shared among all requests. That’s the nice thing of Java, it’s multi-threaded and different threads (i.e.-unsafe! The below example illustrates that: public class MyServlet extends HttpServlet { private Object thisIsNOTThreadSafe; //Don't to this. } } Do not do this. It will result in a bug in software. That’s all on this topic. Stay tuned for more such posts. Better subscribe the email news letter to get the notification in your inbox. Happy Learning !! Recommended link(s): Feedback, Discussion and Comments Prashant Bhagat Hi Lokesh, Had a question. though the article is old but seems like you are still active. Is a web container essentially a java class? for example, in tomcat implementation it ‘seems’ like is “org.apache.catalina.core.StandardWrapper”. Niharika Very helpful post!! i have gone through many tutorials but never found a clear information like this. Thanks a ton!! Awaludyn Great info, Is it that there can be only one instance of servlet,filter and listener classes created(that too only at server startup) and all the threads will make use of that one instance only…. Mathichandra Hi Lokesh, this post a is very useful and easy to understand, i like the way you explained the content. It would be nice,if you add few pointers about servlet config as well. amit Lokesh , Nice post can you elaborate a bit how will you get the request parameter in you servlet, as you said its not thread safe, what I know is everytime a new thread for each request will be created, so how that request.getParameter is going to give you issue?? Little bit confused. Lokesh Gupta You are right. Each time a request come, new thread is created. But it never creates problem because method parameters are thread local and are not shared with other threads. HttpRequest is a method parameter. Deepak Agrawal Very nice post. Keep it up. Chaudhary Nice shashank HI Lokesh, You said in your article that “The webapp’s web.xml will be parsed and every Servlet, Filter and Listener found in web.xml will be created once and kept in server’s memory as well.”.Is it that there can be only one instance of servlet,filter and listener classes created(that too only at server startup) and all the threads will make use of that one instance only…. can you also tell what each thread’s run method logic contains?? Thanks, Shashank shashank If at all servlet class is singleton,what is the point of multithreading where in the threads run concurrently (but indeed waiting for locks to be released by other threads) ……Also wanted to know if at all the methods in the servlet class are synchronised or atleast critical section is synchronised…. Lokesh Gupta Shashank, if you look at servlets, you will notice that they are stateless. They do not store data related to individual http requests at instance level. All they do is to call application logic inside doXXX() methods. Lokesh Gupta Servlets are created once per container. You can choose eager loading s lazy loading using “load on startup” param. All threads simply execute doGet() or doPost() methods using normal synchronization semantics. shashank My question is (Consider a big scenario) if there are 100 requests(100 threads)at a time which are waiting to be served by a single servlet,then only request is being served at a point of time,where is the true concurrency Lokesh Gupta Threads do not execute in sequence. They execute concurrently only. At a time, single servlet will be serving 100s of requests concurrently. And please keep in mind that singleton does not mean sequential execution. shashank Basically if you need to call a method(doget or dopost which are synchronised) in servlet class and as most of the logic is encpsulated in those methods,then other requests has to wait until the current request is served(ie until lock on doget or dopost is released) Lokesh Gupta NO, doXXX() methods are not synchronized or locked. So multiple threads can execute them concurrently. Dinh Tien LUyen nice post Abhay Hi Lokesh, A nice Blog. Could you please share some docs or pointers where I can start creating my own web services based applications Lokesh Gupta Can you please be more specific, what type of application you are aiming for. By the time, probably it might help you: Abhay So my requirement is I am planning to build a client server model based project. So I am looking for some pointers to start from scratch like setting up the tomcat etc.. Lokesh Gupta I will suggest to search on google for creating and deploying a web application using eclipse. Also search for tutorial related to configuring tomcat in eclipse. Eclipse will do most of the stuffs for you, till the time you learn advance topics. I will highly recommend to use maven for dependency management and build process. Learn it from here: You will get some good posts to for your hello world example in above page. Search hello world in search box in footer section. Abhay Thanks a ton! Ragini Thanks. krishna chavhan Thanks Lokesh!! for One more nice post with pictorial representation. Shoheb I have one question. If my browser is requesting same page/URL for multiple times (Something like keep pressing f5 for 3 to 4 time) then which response will be displayed on my browser. The one which comes first or the one which comes last? Lokesh Gupta Th last one. All other will be killed. Ragini I have always read a lot about Servlets supporting multithreading. My only concern in to understand how the multiple requests are handled by the servlet. If you can explain this in a bit more detail it would be a great help. Regards, Ragini Lokesh Gupta There is absolutely no hidden concept. It’s pure simple multi-threading concept which we know in java. We have a service() method in servlet which all threads execute in their own run() method. Plain and simple. Krunal Patel Nice post Lokesh, but i want to more clear about web-server and application server. Now a day’s we are using tomcat to run our local application so can we say that tomcat have both features like web server and app-server? Thanks in advance Lokesh Gupta Krunal, good question. Let me make it clear with one statement. An application server is which implements all (or most) of the J2EE specifications. [Link: Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. And it omits most of the J2ee specific standard implementations. So, it should be referred as “Web server” or “Servlet container”. []. I am saying “it should be”. The reason is, if used with plugins and add ons, you can achieve any functionality in Tomcat itself which you get in full fledged application servers. For example, you can use openejb [] to deploy your EJBs in tomcat. So, with add ons tomcat is application server. Without add ons, tomcat is servlet container or web server. An good example of complete application server is JBOSS which has implicit support for EJBs and JMS also (JSP and servlet also). Rahul Gupta Innovative mean to express thoughts, Very nice Post !!! Gaurav Your posts are really good sir…. Keep sharing… Anil jaguri Thanks Lokesh, I haven’t yet gone throught it but will read the full blog this weekend. A very good topic for me. Thanks much. Anil
https://howtodoinjava.com/tomcat/a-birds-eye-view-on-how-web-servers-work/
CC-MAIN-2021-31
refinedweb
2,409
65.83
I have a class like this: public class VariableManager extends HashMap { //empty } What's the easiest way to replace all usages of VariableManager with HashMap ? I used search & replace, but i think there might be a refactoring to do this. /Kreiger Attachment(s): signature.asc I have read in the Irida new features that this is handled by the safe delete refatoring, but haven't tried it. So just try a safe delete on VariableManager (using a current Irida build). Christoffer "Kreiger" Hammarström schrieb: Christoffer "Kreiger" Hammarström wrote: "Safe Delete" doesn't work here, I think. And I don't know if it's the easiest way, but here's how I would do it with refactorings: On VariableManager: 1. "Replace Constructor with Factory Method..." 2. "Use interface where possible..." to change all declarations to HashMap 3. Change the generated factory method to: return new HashMap() 4. "Inline..." on the factory method. 5. "Safe Delete..." VariableManager. Search and replace sounds easier actually. Anybody know a better way? Bas And even that won't get all of them, if you have casts/instanceof/class-literal expressions that use VariableManager. I think search-and-replace might actually be the way to go. Reminds me, though, that I need an inspection for classes that extend concrete Collection or Map classes. Replace inheritance with delegation as a quickfix. --Dave Griffith Bas, you are right. I was talking about IDEADEV-159: "Safe Delete should be able to remove class from class hierarchy" From the description it reads like it should do exactly what Christoffer wanted: But it only works if there are no other references to VariableManager than "extends VariableManager" in which case it changes it to "extends HashMap". I think it should at least handle default constructor usages, too. If that were implemented "Use interface where possible" and "Safe Delete..." would do the job without the need for "Replace Constructor" plus later "Inline". Bas Leijdekkers schrieb: >> What's the easiest way to replace all usages of VariableManager with >> HashMap ? Bas Leijdekkers wrote: > > As you said: brute force (Search and Replace) 1/ Rename "VariableManager" to "Foo01234" 2/ Replace All in path "Foo01234" by "HashMap" 3/ Go back to HashMap.java, and change it back to "Foo01234" 4/ safe delete Foo01234 It works, but it's ugly. I'll go and wash my hands. Alain Alain Ravet wrote: >> >> Search and replace sounds easier actually. Anybody know a better way? >> Hey! That ruined my Foo0123456789 class! ;) /Kreiger Attachment(s): signature.asc Bas Leijdekkers wrote: >> What's the easiest way to replace all usages of VariableManager with >> HashMap ? I actually used "Use interface where possible" to change declarations to use java.util.Map, but that was only half of it. Maybe there should be a "Use superclass where possible" refactoring? :) /Kreiger Attachment(s): signature.asc I think Migrate is very suitable for this case. Click "Tools -> Migrate...",and make VariableManager migrate to java.util.HashMap,and it is very easy.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206342469-Stupid-refactoring-question
CC-MAIN-2020-24
refinedweb
492
68.16
I'm finally settling back into the groove of some of my side projects. I guess I'm handling the new position a bit better as time goes on, and feel that I can spend some free time working on somethings that I want to do, not just things that I feel that I should do. So, these side projects I do for fun, and they are the most fun when they combine together in sweet ways. During the dead of winter, I spent a bunch of weeks working on Photobomb . On of the features that I added was that you could add an image directly from your web cam. To do this, I used the PyGame Web Cam API, essentially because I saw the API, and knew that I would be able to use it relatively easily, which in fact turned out to be the case. It also turned out that not everyone had PyGame already installed on their systems. As a result installing Photobomb meant a 25+ Megabyte download, most of which was PyGame. So I was advised to use GStreamer instead. I got started on this conversion back in April, by creating a simple web cam display application using gstreamer. I ran into a series of roadblocks, one such roadblock was removed by Chris Halse Rogers of desktop team fame, who knew why it kept crashing (basically, I was trying to access the xid of a widget that wasn't yet realized). But I soon had a pipeline together that could display the web cam, but I could not figure out how to modify it so that it could save out a picture whilst still displaying the web cam output. I finally hopped into #gstreamer to see if someone could give me a pointer. Well, it turns out that someone already wrote a pipeline called caemerabin that does everything I need for the web cam, and more. Well, it turned out that the documentation was out of sync with the current API. This isn't too surprising, as camerabin is still in gstreamer0.01-plugins-bad, and the API is actually improved by the changes. But I was struggling to understand camerabin, so I went back to #gstreamer. Often in IRC, someone will volunteer to spend some time helping you out with a problem. thiagoss (who I think might be this guy) really helped me out. I'm not sure, but I think he may actually be a primary author of camerabin. Anyway, he set me straight on a couple of things, namely: 1. use $gst-inspect camerabin to see what properties and methods the GStreamer elements really support (if they are out of sync with the docs). 2. use GST_DEBUG=2 to run your gstreamer apps, as this puts more warnings in your output. Well, between these 2 tips, I was quickly able to realize that my WebCamBox widget would not much more than some Gtk/Gstreamer app boiler plate, with a wrapper around camerabin. So, for example the "take picture" function just creates a time stamp, then tells the camerabin instance to emit a "capture-start" signal. stamp = str(datetime.datetime.now()) extension = ".png" directory = os.environ["HOME"] + _("/Pictures/") self.filename = directory + self.filename_prefix + stamp + extension self.camerabin.set_property("filename", self.filename) self.camerabin.emit("capture-start") return self.filename Then in on_message, I capture the message that it is done, and fire a signal: Play, Pause, and Start were trivially easy to implement:Play, Pause, and Start were trivially easy to implement: t = message.type if t == gst.MESSAGE_ELEMENT: if message.structure.get_name() == "image-captured": #work around to keep the camera working after lots #of pictures are taken self.camerabin.set_state(gst.STATE_NULL) self.camerabin.set_state(gst.STATE_PLAYING) self.emit("image-captured", self.filename) Like I say, there is also some boiler plate to instantiate the camera and associate it with a gtk.DrawingArea. It took me a lot of iterations to get it working, as you can see from all of these pictures of me working on it ...Like I say, there is also some boiler plate to instantiate the camera and associate it with a gtk.DrawingArea. It took me a lot of iterations to get it working, as you can see from all of these pictures of me working on it ... self.camerabin.set_state(gst.STATE_PLAYING) self.camerabin.set_state(gst.STATE_PAUSED) self.camerabin.set_state(gst.STATE_NULL) Almost all of it is standard code for creating widgets. I love that doing functions like play, pause, stop, and take a picture can be handled in lambdas. So much easier!Almost all of it is standard code for creating widgets. I love that doing functions like play, pause, stop, and take a picture can be handled in lambdas. So much easier! if __name__ == "__main__": """creates a test WebCamBox""" import quickly.prompts #create and show a test window win = gtk.Window(gtk.WINDOW_TOPLEVEL) win.set_title("WebCam Test Window") win.connect("destroy",gtk.main_quit) win.show() #create a top level container vbox = gtk.VBox(False, 10) vbox.show() win.add(vbox) mb = WebCamBox() mb.video_frame_rate = 30 vbox.add(mb) mb.show() mb.play() mb.connect("image-captured", __image_captured) play_butt = gtk.Button("Play") pause_butt = gtk.Button("Pause") stop_butt = gtk.Button("Stop") pic_butt = gtk.Button("Picture") play_butt.connect("clicked", lambda x:mb.play()) play_butt.show() mb.pack_end(play_butt, False) pause_butt.connect("clicked", lambda x:mb.pause()) pause_butt.show() mb.pack_end(pause_butt, False) stop_butt.connect("clicked", lambda x:mb.stop()) stop_butt.show() mb.pack_end(stop_butt, False) pic_butt.connect("clicked", lambda x:mb.take_picture()) pic_butt.show() mb.pack_end(pic_butt, False) gtk.main() So my last step was to drop it into Photobomb. All I had to do was modify the CameraPage class that I had already set up for the PyGame based version.. import gtk from quickly.widgets.web_cam_box import WebCamBox from ImageListPage import ImageListPage class CameraPage(ImageListPage): def __init__(self): gtk.VBox.__init__(self,False, 0) self.__camera = WebCamBox() self.__camera.connect("image-captured",self.image_captured) self.__camera.show() self.__camera.set_size_request(128, 128) self.pack_start(self.__camera, False, False) button = gtk.Button("Take Picture") button.show() button.connect("clicked", lambda x:self.__camera.take_picture()) self.pack_start(button, False, False) def image_captured(self, widget, path): self.emit("clicked",path) def on_selected(self): self.__camera.play() def on_deselected(self): self.__camera.stop() Anyway, I ended up with a few lines of wrapper code, around my wrapper code, and it all works thanks to the efforts of the folks working on camerabin! camerabin has a whole lot of functionality that I haven't wrapped yet. It takes video, including audio! Also, it looks like you can change encoders, and drop in filters and such into the pipeline. To handle this for now, WebCamBox exposes a "camerabin" public property, so if you are using the widget, you won't run into a wall. The cheese guys have been working on a Cheese widget that other applications can use. Not sure where they are with it, if it's ready to be used yet, but that would probably be a good idea to use rather than directly camerabin.
http://theravingrick.blogspot.com/2010/09/quidgets-gstreamer-and-return-of.html
CC-MAIN-2018-30
refinedweb
1,186
59.19
MiniPortile This project is a minimalistic, simplistic and stupid implementation of a port/recipe system for developers. Another port system, srsly? No, is not a general port system, is not aimed to take over apt, macports or anything like that. The rationale is simple. You create a library A that uses B at runtime or compile time. Target audience of your library might have different versions of B installed than yours. You know, Works on my machine is not what you expect from one developer to another. Developers having problems report them back to you, and what you do then? Compile B locally, replacing your existing installation of B or simply hacking things around so nothing breaks. All this, manually. Computers are tools, are meant to help us, not the other way around. What if I tell you the above scenario can be simplified with something like this: rake compile B_VERSION=1.2.3 And your library will use the version of B you specified. Done. You make it sound easy, where is the catch? You got me, there is a catch. At this time (and highly likely will be always) MiniPortile is only compatible with GCC compilers and autoconf/configure-based projects. It assumes the library you want to build contains a configure script, which all the autoconf-based libraries do. How to use Now that you know the catch, and you're still reading this, let me show you a quick example: require "mini_portile" recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = [""] recipe.cook recipe.activate That's all. cook will download, extract, patch, configure and compile the library into a namespaced structure. activate ensures GCC find this library and prefers it over a system-wide installation. Structure At this time, if you haven't digged into the code yet, are wondering what is all that structure talk about?. MiniPortile this folder, MiniPortile will store the artifacts that result from the compilation process. As you cans see, it versions out the library so you can run multiple version combination without compromising these overlap each other. archives is where downloaded source files are stored. It is recommended you avoid trashing that folder so no further downloads will be required (save bandwidth, save the world). The tmp is where compilation is performed and can be safely discarded. Don't worry, you don't need to know the path structure by memory, just use recipe's path to obtain the full path to the installation directory: recipe.cook recipe.path # => /home/luis/projects/myapp/ports/i686-linux/libiconv/1.13.1 How can I combine this with my compilation task? In the simplified proposal, the idea is that using Rake, your compile task depends on MiniPortile compilation and most important, activation. Take the following as a simplification of how you can use MiniPortile with Rake: task :libiconv do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = [""] checkpoint = ".#{recipe.name}-#{recipe.version}.installed" unless File.exist?(checkpoint) recipe.cook touch checkpoint end recipe.activate end task :compile => [:libiconv] do # ... end This example will: Compile the library only once (using a timestamp file) Ensure compiled library gets activated every time Make compile task depend on compiled library activation For your homework, you can make libiconv version be taken from ENV variables. Native or cross-compilation Above examples cover the normal use case: compile support libraries natively. MiniPortile also covers another use case, which is the cross-compilation of the support libraries to be used as part of a binary gem compilation. It is the perfect complementary tool for rake-compiler and it's). License This library is licensed under MIT license. Please see LICENSE.txt for details.
http://www.rubydoc.info/gems/mini_portile/frames
CC-MAIN-2015-35
refinedweb
616
57.47
TwitterPlotBot on Galileo Introduction: TwitterPlotBot on Galileo In this Instructable, we are going to build something that is going to bring together social networking and data analytics. We are going to build a TwitterBot that tweets plots of temperature (or any user defined data). This bot will create the plots using the "gnuplot" program and uses Twython Python library to tweet the generated plots. This bot can log data and tweet plots at configurable intervals. The data that has to be logged and subsequently plotted is user configurable and hence you can log any data that you wish to record and plot. Also it is possible to plot multiple data sources. Step 1: Craeting the Twitter Account Follow these steps to create a Twitter application for your TwitterBot Create a Twitter account: - Create an email account for your twitter bot and then head onto. - In "sign up" section, enter the details. - Enter a name for your Twitter bot - Go ahead and complete rest of the account creation process Once the account is created, find your actual Twitter account and follow your account from the TwitterBot's account and vice versa. That is, your actual Twitter account should follow your Twitter bot and your Twitter bot should be following your account. Create the Twitter application: You need to create an Twitter application to create the Twitter bot. Follow these steps to create a Twitter bot: - While still logged into you Twitterbot's application, click on this link. - Enter the mandatory details for your Twitter application - Accept the terms and click on "Create your Twitter Application" - In the next page, click on "permissions" and select "Read, Write and Access direct messages" - Click on "update settings" - Click on "Keys and Access tokens" - Click on "Create access token" and note down the keys that appears We will use these keys later, hence keep this tab open Step 2: Preparing the Galileo For using this application we will need the "Linux IoT" image for the Galileo. Click on this link if you need help with setting up your Galileo and booting into the Linux image. For the application to work, You need to set the proper time on your Galileo. google "UTC time" to know the current UTC time. Then using the date command, set the date in following format: date -s "5 AUG 3:45:00 PM" In the above command, the date is set in accordance to the attached screen shot. Step 3: Installing the TwitterPlotBot Connect your Galileo to the Internet. Type the following command onto your Galileo's Linux console: git clone cd TwitterPlotBot cd install sh install_packages_on_Galileo.sh The last command will download and install all the required packages this command will take few minutes to complete. Step 4: Configuring the System All the configuration information is stored in the "config.py" file within the project folder. Open the config.py with the following command vi config.py and hit 'i' key to start editing. The first thing that you need to configure is the consumer/api and access keys. Refer to the attached mails where you need to paste the information. Remove the user information fillers (such as 'consumer key here', excluding quotes) and copy paste the keys. If you are using "putty" as your serial console, place the cursor between quotes and right click to paste the copied key. If you are using "screen" then use "ctrl+shift+v" to paste the text. You also need to insert your twitter screen name in place of "your screen name" with your Twitter account. Other things that you might want to configure are "Tweet Interval" and "Log Interval" which control the the time interval between Tweeting the plot and logging the data respectively in terms of seconds. The "stop plot cmd" and "resume plot cmd" string values control the strings that you can direct message to your bot to stop and start the tweets. Step 5: Using the Application Connect the temperature sensor to "A1" pin header on the Grove shield. On command line, type the following command to start the application python TwitterBot.py This should start tweeting the plots. Any time you need to stop the plot you have to direct message the TwitterBot with the "stop command" as specified in the config.py similarly, you can resume tweeting by sending the "resume command" If all you need is temperature plots being tweeted by the TwitterBot then this Instructable, for you, ends here. If you want to configure the bot to plot other data or temperature sensor connected to different pin then head over to the next step. Step 6: Adding Custom Data Logging (optional) All the data collection functions can be found in the "CallBacks.py" file. Let us take an example of adding the plot of voltage across the "A0" pin on the Galileo. The first thing to do is define a function that will set up the analog pin and will read the voltage at that pin and returns the voltage. def getPotVltg(): reading = mraa.Aio(0) vltg = (reading.read()/1024.0)*5 # switch is towards 5v return vltg Then add this function to the list called "callbacks" (after the comma). Here you need to specify a string that will be displayed to identify the plot, next comes the call back function that you have defined and the last parameter is the color of the plot in hexadecimal format starting with # callbacks = [ # The data item name The callback func The color in the plot for this item [ 'Temperature', getTemperature, "#FF2050"], [ 'Pot vltg', getPotVltg, "#2F3055"], ] You need to restart the application for these changes to take effect. If you need instructions on using the Python to program the Edison/Galileo, you can refer to this tutorial.
http://www.instructables.com/id/TwitterPlotBot-on-Galileo/
CC-MAIN-2017-30
refinedweb
960
59.64
MS Dynamics CRM 3.0 I'm guess I'm looking for a clean, schemish way to deal with monadic side-effects using existing scheme procedures like delay, force, and compose. (Am I right in assuming that compose always calls its arguments rtl since call-with-values needs to extract the values from the rightmost function application before passing it on, and that compose is implicitly delayed since a call to compose yields a procedure, not the results of a procedure application?) Can Haskells bind be approximated using let* or begin for >> and function composition (either explicitly or via compose) for >>=? What are the risks in doing so? I'm looking at, and grokking (I think), and Message-ID: <slrnc3781u.oor.ne@gs3106.sp.cs.cmu.edu> over in CLF, both which strikes me as too alien from Scheme; I'd like to use the general compose instead of >>=, IO->>- and so on. I've spent the day looking at monads and mostly it seems to me to be kind of similar to a program I wrote last fall -- (noteably the last line.) extract and rename have side-effects. Is this a style of programming I should move from or can it work? Am I missing something? Sunnan (compose (begin (display "Evaluating first arg") sqrt) (begin (display "Evaluating second arg") sin)) The two calls to display will happen when this form is evaluated. SQRT and SIN are evaluated to yield the square-root and sine functions, but these functions are not applied to anything at this point. The result of the call to compose is a function that *will* apply square-root to the result of sine of whatever argument. (define (build-btree depth) (if (zero? depth) (make-node depth '()) (let* ((left-branch (build-btree (- depth 1))) (right-branch (build-btree (- depth 1)))) (make-node depth (list left-branch right-branch))))) (define counter 0) (define (make-node depth children) (set! counter (+ counter 1)) (cons counter (cons depth children))) ;;; note the explicit side effect in make-node and transform it into a side-effect free program like this: (define (build-btree depth counter) (if (zero? depth) (values (make-node depth '() counter) (+ counter 1)) (call-with-values (lambda () (build-btree (- depth 1) counter)) (lambda (left-branch counter1) (call-with-values (lambda () (build-btree (- depth 1) counter1)) (lambda (right-branch counter2) (values (make-node depth (list left-branch right-branch) counter2) (+ counter2 1)))))))) (define (make-node depth children counter) (cons counter (cons depth children))) ;; Which is *ugly*, but state free! and transform it further by `factoring' the program into two parts: one that builds the tree, the other that tracks the counter: (define (build-btree depth) (if (zero? depth) (make-node depth '()) (letM* ((left-branch (build-btree (- depth 1))) (right-branch (build-btree (- depth 1)))) (make-node depth (list left-branch right-branch))))) (define incr (lambda (n) (make-numbered-value (+ 1 n) n))) (define (make-node val kids) (>>= incr (lambda (counter) (return (cons (make-numbered-value counter val) kids))))) The final version of build-btree doesn't even *mention* the counter, yet the counter is correctly tracked and incremented as if it were global state. And there are no side-effects either. However, there is a cost to doing this: the build-tree program, although it *appears* to be a `normal' recursive program, is actually a higher order procedure. We have two `levels' we have to think on: the upper level where we are creating a tree, and the `lower' level where we are operating on the counter. The counter is hiding in the lower level where we cannot see it. The >>= operator `plucks' the counter out of hiding so we can use it. The `return' operator takes a lower level result and lifts it back up into the upper level. Monads are a funny name for this process: 1. Rewrite your program in `state-passing-style'. 2. Refactor your program so that the state is passed in as a curried argument. 3. Remove the explicit currying where possible, and use >>= and return to cross levels. > Am I missing something?
http://www.megasolutions.net/scheme/scheme-monads-and-bind-vs-compose-78829.aspx
CC-MAIN-2013-48
refinedweb
677
59.94
README.md NAC3 Specification Specification and discussions about language design. A toy implementation is in toy-impl, requires python 3.9. Referencing Host Variables from Kernel Host variable to be accessed must be declared as global in the kernel function. This is to simplify and speed-up implementation, and also warn the user about the variable being global. (prevent calling the interpreter many times during compilation if there are many references to host variables) Kernel cannot modify host variables, this would be checked by the compiler. Value that can be observed by the kernel would be frozen once the kernel has been compiled, subsequence modification within the host would not affect the kernel. Only types supported in the kernel can be referenced. Examples: FOO = 0 @kernel def correct() -> int: global FOO return FOO + 1 @kernel def fail_without_global() -> int: return FOO + 2 @kernel def fail_write() -> None: FOO += 1 Class and Functions Instance variables must be annotated: (Issue #1) class Foo: a: int b: int def __init__(self, a: int, b: int): self.a = a self.b = b Instance variables not used would be warned by the compiler, except for those preceded by the pseudocomment # nac3:no_warn_unused. (#9) The comment can either be placed on top of the variable or next to the variable. Example: class Foo: # nac3:no_warn_unused a: int b: int # nac3:no_warn_unused def __init__(self): pass Use-before-define: - Host-only constructor: Error if a certain field fis used in other kernel methods but missing from the object constructed in the host. @portable/ @kernelconstructor: Error if a certain field fis used in other kernel methods but not defined in the constructor, or used in the constructor before definition. Three types of instance variables: (Issue #5) - Host only variables: Do not add type annotation for it in the class. - Kernel only variables: Denoted with type Kernel[T]. - Kernel Invariants: Immutable in the kernel and in the host while the kernel is executing. Type: KernelImmutable[T]. The types must be immutable. In particular, the attribute cannot be modified during RPC calls. - Normal Variables: The host can only assign to them in the __init__function. Not accessible afterwards. Functions require full type signature, including type annotation to every parameter and return type. def add(a: int, b: int) -> int: return a + b RPCs: optional parameter type signature, require return type signature. Classes with constructor annotated with kernel/portablecan be constructed within kernel functions. RPC calls for those objects would pass the whole object back to the host. Function default parameters must be immutable. Function pointers are supported, and lambda expression is not supported currently. (maybe support lambda after implementing type inference?) Its type is denoted by the typing library, e.g. Call[[int32, int32], int32]. Built-in Types - Primitive types include: bool byte int32 int64 uint32 uint64 float str bytes - Collections include: list: homogeneous (elements must be of the same type) fixed-size (no append) list. tuple: inhomogeneous immutable list, only pattern matching (e.g. a, b, c = (1, True, 1.2)) and constant indexing is supported: t = (1, True) # OK a, b = t # OK a = t[0] # Not OK i = 0 a = t[i] range(over numerical types) Numerical Types - All binary operations expect the values to have the same type. - Casting can be done by T(v)where Tis the target type, and vis the original value. Examples: int64(123) - Integers are treated as int32by default. Floating point numbers are double by default. - No implicit coercion, require implicit cast. For integers that don't fit in int32, users should cast them to int64explicitly, i.e. int64(2147483648). If the compiler found that the integer does not fit into int32, it would raise an error. (Issue #2) - Only uint32, int32(and range of them) can be used as index. Kernel Only class - Annotate the class with @kernel/ @portable. - The instance can be created from within kernel functions, or the host if it is portable. It can be passed into kernels. - All methods, including the constructor, are treated as kernel/portable functions that would be compiled by the compiler, no RPC function is allowed. - If the instance is passed into the kernel, the host is not allowed to access the instance data. Access would raise exception. Generics We use type variable for denoting generics. Example: from typing import TypeVar T = TypeVar('T') class Foo(EnvExperiment): @kernel # type of a is the same as type of b def run(self, a: T, b: T) -> bool: return a == b - Type variable can be limited to a fixed set of types. - Type variables are invariant, same as the default in Python. We disallow covariant or contravariant. The compiler should mark as error if it encounters a type variable used in kernel that is declared covariant or contravariant. - A custom function is_type(x, T)would be provided to check whether xis an instance of T, other methods like type(x) == intor isinstance(x, int)would not compile. The function would be able to check generic types for listand tuple. When running on the host, user can specify whether to use a debug mode checking (recursively check all elements, which would be slower for large lists) or performance mode which only check the first element of each list. (#15) - Code region protected by a type check, such as if is_type(x, int):, would treat xas int, similar to how typescript type guard works. def add1(x: Union[int, bool]) -> int: if is_type(x, int): # x is int return x + 1 else: # x must be bool return 2 if x else 1 - Generics are instantiated at compile time, all the type checks like is_type(x, int)would be evaluated as constants. Type checks are not allowed in area outside generics. - Type variable cannot occur alone in the result type, i.e. must be bound to the input parameters. - Polymorphic methods (with type variables in the type signature) must be annotated with @final. This is because we need to know where does the method come from when we do monomorphization, which we don't know for virtual methods. For loop unrolling (#12) A pseudocomment can be used for unrolling for loops that iterates a fixed amount of time. This can be used for iterating over inhomogeneous tuples. Example: params = (1, 1.5, "foo") # nac3:unroll for p in params: print(p) Dynamic Dispatch Type annotations are invariant, so subtype (derived types) cannot be used when the base type is expected. Example: class Base: def foo(self) -> int: return 1 class Derived(Base): def foo(self) -> int: return 2 def bar(x: list[Base]) -> int: sum = 0 for v in x: sum += v.foo() return sum # incorrect, this list cannot be typed (inhomogeneous) bar([Base(), Derived()]) Dynamic dispatch is supported, but requires explicit annotation, similar to trait object in rust. virtual[T] is the type for T and its subtypes(derived types). This is mainly for performance consideration, as virtual method table that is required for dynamic dispatch would penalize performance, and prohibits function inlining etc. Note that type variables cannot be used inside virtual[...]. Example: def bar2(x: list[virtual[Base]]) -> int: sum = 0 for v in x: sum += v.foo() return sum The syntax for casting virtual objects is virtual(obj, T), which casts an object of type T1/virtual[T1] to virtual[T] where T1 <: T (T1 is a subtype of T). The compiler may be able to infer the type cast. In that case, the cast is not required if obj is already of type virtual[T1], or the user can write the cast as virtual(obj) and the compiler would infer the type T automatically. Methods would be automatically overriden, the type signature including parameter names and order must be exactly the same. Defining a method which was marked as final in the super class would be considered as an error. Lifetime Probably need more discussions...
https://git.m-labs.hk/M-Labs/nac3-spec
CC-MAIN-2022-05
refinedweb
1,310
55.13
Managing and Closing Dynamically created SQL connections in .net I have a c# windows form application that connects to databases dynamically where each user may connect to different databases. The current implementation is as follows: Connection Repository that contains a dynamically populated list of connections (per user). When a user initiates a request that requires a database connection the respective connection is looked up from the connection repository ,opened , and then used in the user request . Code Sample from the connection repository public class RepoItem { public string databasename; public SqlConnection sqlcnn; } public class ConnectionRepository { private List<RepoItem> connectionrepositroylist; public SqlConnection getConnection(String dbname) { SqlConnection cnn = (from n in connectionrepositroylist where n.databasename == dbname select n.sqlcnn).Single; cnn.Open(); return cnn; } } sorry for any code errors i just improvised a small version of the implementation for demonstration purpose. I'am not closing connections after a command execution because it may be used by another command simultaneously. The questions are: Should i be worried about closing the connections ? Does connection close automatically if it is idle for a specific period ? I have a method in mind to implement a timer in the created Connection Repository and check for idle connections through the Executing ConnectionState Enumeration and close them manually. Any suggestions are welcome . I didn't post the complete implemented code because it is quite big and includes the preferences that affect the populating of the connection list. When i want a specific connection i call the getConnection function in the ConnectionRepository class . - Ignite SqlQuery for two clients I use next process for my Ignite cache with third party persistence: - empty database - start two instances in server mode - start first instance in client mode. - The client in cycle - creates entities - reads entities by a simple SqlQuery So far all right. All the code works properly. Then I start second instance in client mode. The code is the same. The second client also in cycle - creates entities - reads entities by the SqlQuery And the second client gets empty ResultSet. While the first client still reads the data properly. BTW. Both clients can get entities by keys. Off course all the data in memory. So why the second client can't read by SqlQuery? Three options of code are below. All of them work identically: The first started client always gets correct result. The second started client always gets empty ResultSet. SqlQuery<EntryKey, Entry> sql = new SqlQuery<>(Entry.class, "accNumber = ?"); sql.setArgs(number); List<Cache.Entry<EntryKey, Entry>> res = entryCache.query(sql).getAll(); ... SqlFieldsQuery sql = new SqlFieldsQuery("select d_c, summa from Entry where accNumber = ?"); sql.setArgs(number); List<List<?>> res = entryCache.query(sql).getAll(); ... SqlQuery<BinaryObject, BinaryObject> query = new SqlQuery<>(Entry.class, "accNumber = ?"); QueryCursor<Cache.Entry<BinaryObject, BinaryObject>> entryCursor = binaryEntry .query(query.setArgs(number)); List<javax.cache.Cache.Entry<BinaryObject, BinaryObject>> res = entryCursor.getAll(); XML configuration is below: <bean class="org.apache.ignite.configuration.CacheConfiguration"> <!-- Set a cache name. --> <property name="name" value="entryCache" /> <!-- Set cache mode. --> <property name="cacheMode" value="PARTITIONED" /> <property name="atomicityMode" value="TRANSACTIONAL" /> <!-- Number of backup nodes. --> <property name="backups" value="1" /> <property name="cacheStoreFactory"> <bean class="javax.cache.configuration.FactoryBuilder" factory- <constructor-arg </bean> </property> <property name="readThrough" value="true" /> <property name="writeThrough" value="true" /> <property name="queryEntities"> <list> <bean class="org.apache.ignite.cache.QueryEntity"> <!-- Setting indexed type's key class --> <property name="keyType" value="ru.raiffeisen.cache.repository.EntryKey" /> <!-- Setting indexed type's value class --> <property name="valueType" value="ru.raiffeisen.cache.repository.Entry" /> <!-- Defining fields that will be either indexed or queryable. Indexed fields are added to 'indexes' list below. --> <property name="fields"> <map> <entry key="key.accNumber" value="java.lang.String" /> <entry key="key.d_c" value="ru.raiffeisen.cache.repository.EntryKey.DEB_CRE" /> <entry key="key.valuedate" value="java.util.Date" /> <entry key="summa" value="java.lang.Integer " /> </map> </property> <!-- Defining indexed fields. --> <property name="indexes"> <list> <!-- Single field (aka. column) index --> <bean class="org.apache.ignite.cache.QueryIndex"> <constructor-arg </bean> </list> </property> </bean> </list> </property> </bean> - Calculate difference between two non-adjacent rows How can I calculate time difference between two rows in a table, based on a value in another field in the table. Table (simplified) look like; Unit Date Status 0001 17.11.2017 09:52 INSPECTED 0001 17.11.2017 09:48 CLEAN 0001 17.11.2017 09:45 CLEANING 0001 17.11.2017 09:43 DIRTY 0001 16.11.2017 14:55 INSPECTED 0001 16.11.2017 14:54 CLEAN 0001 16.11.2017 12:54 CLEANING 0001 16.11.2017 12:22 DIRTY 0001 16.11.2017 12:20 CLEAN 0001 15.11.2017 10:48 CLEAN 0001 15.11.2017 10:27 CLEANING 0001 15.11.2017 09:03 DIRTY Date field is of type DATE, Unit and Status values are from parent tables. Based on a column Status, I have to calculate difference between status DIRTY and next status CLEAN, for each day and each unit. Example data should produce; 0001 17.11.2017 00:05 0001 16.11.2017 02:32 0001 15.11.2017 01:45 The query is the source for the chart in Oracle APEX. - Display SQLserv result as text in PHP array I have a query where I'm already pulling back the results from a Sql query via an array as below. <?php $<td><center>Status</center></td><tr>"; while($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC)) { echo "<tr><td><b><center> " . $row["STATUS"] . "</center></b></td></tr>"; } echo "</table>"; sqlsrv_close( $conn ); ?> The $rowfetches back a number from the database. However, I'm wanting to display the text from my $status array. I've tried several methods but end up with a blank screen returned. Any suggestions? Appreciate the help. - ;) - Vertical total by group Pivot SQL I have a Pivot query which counts employees by group per month on how many times they have logged in, I want to get a grand total per group, per month shown horizontally under the list of employees in the group. Currently I can only get the totals to show as the overall total per group as an extra column The SQL I am using is: SELECT Code, Full_Name, [1] AS Jan, [2] AS Feb, [3] AS Mar, [4] AS Apr, [5] AS May, [6] AS Jun, [7] AS Jul, [8] AS Aug, [9] AS Sep, [10] AS Oct, [11] AS Nov, [12] AS Dec, Total FROM (SELECT Norgren_Group.Code , Full_Name , lh.Employee_Id , MONTH(lh.RN_Create_Date) [Month] , COUNT(lh.Employee_Id) OVER (PARTITION BY Norgren_Group_Id) as Total FROM Employee_Login_History lh JOIN Employee ON Employee.Employee_Id = lh.Employee_Id JOIN Norgren_Group ON Norgren_Group.Norgren_Group_Id = Employee.Default_Norgren_Group_Id WHERE Reporting_Region='Europe' AND YEAR(lh.RN_Create_Date) = YEAR(GETDATE()) ) pvt PIVOT ( COUNT(Employee_Id) FOR [Month] IN ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]) ) AS pvttble ORDER BY Code, Full_Name A snippet of the result i get is: Code Full_Name Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total A Alexander Wipplinger 20 11 23 7 14 10 15 10 13 23 6 0 2894 A Andreas Grünanger 13 12 12 10 17 14 11 15 13 20 11 0 2894 ALPE Albert Unger 16 18 28 9 13 17 18 19 17 22 18 0 16899 ALPE Andreas Barz 1 0 0 0 0 0 0 0 0 0 0 0 16899 What I want to see is: Code Full_Name Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec A Alexander Wipplinger 20 11 23 7 14 10 15 10 13 23 6 0 A Andreas Grünanger 13 12 12 10 17 14 11 15 13 20 11 0 Total 33 23 35 17 31 24 26 25 26 43 17 0 ALPE Albert Unger 16 18 28 9 13 17 18 19 17 22 18 0 ALPE Andreas Barz 1 0 0 0 0 0 0 0 0 0 0 0 Total 17 18 28 9 13 17 18 19 17 22 18 0 -?
http://quabr.com/45648794/managing-and-closing-dynamically-created-sql-connections-in-net
CC-MAIN-2017-47
refinedweb
1,323
50.02
)? LINQ interface. Microsoft basically divides LINQ into three areas and that are give below. The official goal of the LINQ family of technologies is to add "general purpose query facilities to the .NET Framework that apply to all sources of information, not just relational or XML data". Advantages of LINQ LINQ offers an object-based, language-integrated way to query over data no matter where that data came from. So through LINQ we can query database, XML as well as collections. Compile time syntax checking It allows you to query collections like arrays, enumerable classes etc in the native language of your application, like VB or C# in much the same way as you would query a database using SQL LINQ to Object {Queries performed against the in-memory data} LINQ to ADO.NET LINQ to SQL (DLinq) {Queries performed against the relation database only Microsoft SQL Server Supported} LINQ to DataSet {Supports queries by using ADO.NET data sets and data tables} LINQ to Entities LINQ to XML (XLinq) { Queries performed against the XML source} LINQ to Objects deals with in-memory data. Any class that implements the IEnumerable interface (in the System.Collections.Generic namespace) can be queried with SQO. LINQ to ADO.NET deals with data from external sources, basically anything ADO.NET can connect to. Any class that implements IEnumerable or IQueryable (in the System.Query namespace) can be queried with SQO. e.g. int[] nums = new int[] {0,1,2}; var res = from a in nums where a < 3 orderby a select a; foreach(int i in res) Console.WriteLine(i); e.g. ASP.NET Class public class patient { public patient() { } // Fields private string _name; private int _age; private string _gender; private string _area; // Properties public string PatientName { get { return _name; } set { _name = value; } } public string Area { get { return _area; } set { _area = value; } } public String Gender { get { return _gender; } set { _gender = value; } } public int Age { get { return _age; } set { _age = value; } } } Main Program using System.Collections.Generic; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { List<patient> pat=new List<patient>(); patient p=new patient(); p.patientname="Deepak dwij"; p.patientstate = "UP"; p.patientage = "25"; p.patientcity = "Noida"; pat.Add(p); GridView1.DataSource = from a in pat select a; GridView1.DataBind(); //GridView1.DataSource = from pa in patients where pa.Gender == "Male" orderby pa.PatientName, pa.Gender, pa.Age select pa; //GridView1.DataBind(); } } e.g. The following code uses the selection operator type, which brings all those records whose age is more than 20 years. var mypatient = from pa in patients where pa.Age > 20 orderby pa.PatientName, pa.Gender, pa.Age select pa; foreach(var pp in mypatient) { Debug.WriteLine(pp.PatientName + " "+ pp.Age + " " + pp.Gender); } The following code snippet uses the grouping operator type that group patient data on the bases area. var op = from pa in patients group pa by pa.Area into g select new {area = g.Key, count = g.Count(), allpatient = g}; foreach(var g in op) { Debug.WriteLine(g.count+ "," + g.area); foreach(var l in g.allpatient) { Debug.WriteLine("\t"+l.PatientName); } } int patientCount = (from pa in patients where pa.Age > 20 orderby pa.PatientName, pa.Gender, pa.Age select pa).Count(); Linq Example Simple select int[] numbers = { 5, 4, 1, 3, 9, 8}; var numsPlusOne =from n in numbers select n; foreach (var i in numsPlusOne) { MessageBox.Show(i.ToString() ); } Multiple select int[] numbersA = { 0, 2, 4, 5, 6, 8, 9 }; int[] numbersB = { 1, 3, 5, 7, 8 }; var pairs =from a in numbersA from b in numbersB where a < b select new { a, b }; Console.WriteLine("Pairs where a < b:"); foreach (var pair in pairs) { Console.WriteLine("{0} is less than {1}", pair.a, pair.b); } Order by string[] words = { "cherry", "apple", "blueberry" }; var sortedWords =from w in words orderby w select w; Console.WriteLine("The sorted list of words:"); foreach (var w in sortedWords) { Console.WriteLine(w); } Count function int[] factorsOf300 = { 2, 2, 3, 5, 5 }; int uniqueFactors = factorsOf300.Distinct().Count(); Console.WriteLine("There are {0} unique factors of 300.", uniqueFactors); OR int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; int oddNumbers = numbers.Count(n => n % 2 == 1); Console.WriteLine("There are {0} odd numbers in the list.", oddNumbers);
https://www.queryhome.com/tech/151129/what-is-linq-in-c%23
CC-MAIN-2020-29
refinedweb
714
59.19
Overview Before talking about Namespaces in Linux, it is very important to know that what namespaces actually is? In Linux, namespaces are used to provide isolation for objects from other objects. So that anything will happen in namespaces will remain in that particular namespace and doesn’t affect other objects of other namespaces. For example:- we can have the same type of objects in different namespaces as they are isolated from each other. Now you would be having a good conceptual idea of Namespace let’s try to understand them in the context of Linux Operating System. Linux Namespaces In the above figure, we have a process named 1 which is the first PID and from 1 parent process there are new PIDs are generated just like a tree. If you see the 6th PID in which we are creating a subtree, there actually we are creating a different namespace. In the new namespace, 6th PID will be its first and parent PID. So the child processes of 6th PID cannot see the parent process or namespace but the parent process can see the child PIDs of the subtree.
https://blog.opstree.com/2018/10/31/linux-namespaces-part-1/
CC-MAIN-2020-10
refinedweb
189
67.28
Thanks Robin, this proved very helpful! One more question: is there any strategy you could think of to cache 'parts' of a complex page and have others be processed on every request? Example: There might be a page with a lot of content plus a hit-counter (e.g. the <util:counter/> from the lib included in the cocoon-distribution). When I set 'hasChanged' to 'false', the page gets cached, but the counter won't work anymore. Thanks, Hans-Guenter Robin Green wrote: > That's what Cocoon does by default. Ensure that caching is turned on in all > copies of cocoon.properties. Note that if using XSP, XSP pages are not > cached unless you include a method as follows: > > <xsp:logic> > public boolean hasChanged (Object context) { > // return true here if the page content might have changed, or > // false if it is safe to use a cached copy. > } > </xsp:logic> > > inside the <xsp:page> element, but outside your own root element. For the > hasChanged() method to work, you will need a recent release of Cocoon. > > Also, if you are using <?xsp:logicsheet?> you could switch to > namespace-mapped logicsheets instead, because these are automatically > "precompiled" on startup if the transformer (e.g. Xalan) supports it (which > Xalan does). > > -- > Robin > > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org > For additional commands, e-mail: cocoon-users-help@xml.apache.org
http://mail-archives.apache.org/mod_mbox/cocoon-users/200007.mbox/%3C3961A3A8.19548157@siteos.de%3E
CC-MAIN-2018-05
refinedweb
240
65.52
Yes, but more infrastructure is needed. (Also, in current ant cvs, ComponentHelper is not used). My knowledge on this subject is very small, but here is my understanding (based on looking at jelly source code). To support XML ns one needs to know the uri associated with the namespace prefix. The same prefix may be associated with different uri in the course of processing an xml file. By overriding sax.helpers.DefaultHandler#startPrefixMapping and #stopPrefixMapping, one can find out when the prefix mapping space is active and when it is terminated. This is what jelly does. It would be more difficult (I may be wrong here) for ant to use this information as resolving of most of tags is done after the xml parsing has completed. It is not necessary to do this as .DefaultHander#startElement does pass the uri that is associated with the element. This could get stored in the UnknownElement and used for name resolution. (Attributes would also be be considered). Since namespace processing is active, the code should use getLocalName and not getQName. To support antlibs, I am thinking that one could have a mapping table per uri (for element tags), either within the ComponentHelper, or have a ComponentHelper per uri. Peter On Friday 02 May 2003 15:42, Costin Manolache wrote: > peter reilly wrote: > > \>> > example: > >> > <typedef myfileset mypath anttest etc ..> > >> > <copy todir="output"> > >> > <fileset ant- >> > > >> > </copy> > >> > > >> > <anttest> > >> > <path ant- >> > > >> > </anttest> > >> > >> I assume you meant to write "ant:type" instead of "ant-type"... > > > > No... > > Ant does not have the infrastructure at the moment to support XML > > namespaces, and their associated contexts. > > AFAIK ant _does_ have now the infrastructure to support and use > XML namespaces. > > It is not using it - because we don't know yet what's the best way > to do it, but AFAIK the infrastructure exists. > > ProjectHelper2 uses SAX2, it preserves namespaces in UnknownElement and > the code for creation of tasks/types (ComponentHelper) receives the > namespace and the name. CH allows plugins - i.e. any task can hook > into the component creation and provide it's own mechanism, so you > should be able to implement whatever namespace policy you want. > > > Costin > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org
http://mail-archives.eu.apache.org/mod_mbox/ant-dev/200305.mbox/%3C200305021646.54672.peter.reilly@corvil.com%3E
CC-MAIN-2019-47
refinedweb
376
65.62
Subject: Re: [boost] [git] tagging in modules From: Peter A. Bigot (pab_at_[hidden]) Date: 2014-01-04 07:59:13 On 01/04/2014 05:38 AM, Ahmed Charles wrote: > >> Date: Mon, 30 Dec 2013 12:02:58 -0500 >> From: bdawes_at_[hidden] >> To: boost_at_[hidden] >> Subject: Re: [boost] [git] tagging in modules >> >> On Thu, Dec 26, 2013 at 7:24 PM, Peter A. Bigot <pab_at_[hidden]> wrote: >> >>> git-push by default does not push tags: you need to specifically ask for >>> the tag to be pushed (by name), or use --tags. So this sequence does >>> nothing visible: >>> >>> git tag -a 1.2 >>> git push >>> >>> Personally I'd prefer if tag symbols were a little more informative than >>> "1.2", and followed a pattern that places them in a namespace reserved for >>> the module, such as timer-1.2. Because tags aren't normally pushed, >>> they're useful for individual developers to use as markers. However, >>> git-pull will automatically retrieve tags attached to commits that are >>> fetched unless --no-tags is given, so if a repository (from boostorg, or >>> another developer) defines (or moves) a tag it might overwrite your local >>> tag without warning. So it's important to know what tags you can expect >>> might conflict with those in a remote repository to avoid conflicts. >>> >> Updated: >> >> >> > Note: git doesn't overwrite local tags with remote ones, so once you push a tag, that tag should never be moved. There's discussion of this in the documentation. +1 for making crystal clear that public tags should never be moved. +0.5 about overwrite. I confirm that by default local tags are not overwritten in git 1.8.4: I had remembered that happened to me, but it may be that I had foolishly added --tags to the fetch/pull command. With fetch/pull --tags the local tag will be overwritten. Although it also tells you it did so, there is no facility to figure out what the previous tag, um, tagged, so if the local association was considered important this is a non-recoverable loss. Conclusions: Do not use --tags on fetches unless you want to allow remote tags to overwrite your local tags. Never use --tags on pushes unless you want to add all your local tags to the remote. (This will not overwrite existing remote tags with the same names; you have to force that, at least as of git 1.8.4.) Best practice: When intending to push a single tag identify it by name only: git push boost-1.56 Peter Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2014/01/210327.php
CC-MAIN-2019-13
refinedweb
447
71.95
I want to clone a project to use as beginning of a very similar project (and later for new versions of same code). Is the recommended method to "archive the workspace/project" to a new folder and unzip it. Then open the project that was copied and right click and "rename" main project? What about the ".cywdr" file, does this also need renaming? Or are there other areas or namespaces I need to change. From experience with VB.NEt, there was a host of changes to copy a project and get it running again. With PIC, you tended to have to unload the files and re include them otherwise the compiler would compile to the address of the original modules. Thanks Yes, that is the way you have to use to clone a project. The good news: Creator 3.1 has got a new function "Save as..." Bob That method does work but I have used a different one. Open a new project, select Target Device, then save it with the new name. Close Workspace Open old project and do a Select All on the TopDesign. Edit/copy. Close Workspace. Open new project. Click on TopDesign screen and do a Edit/Paste. Close Workspace. Open old project. In main.c do a Edit/Select all, Copy. Close Workspace. Open new project. Go to main.c and delete the sample code. Edit/paste. If you have multiple pages in your TopDesign, you have to copy each page separately. Do a Clean & Build. You probably find that you have to copy device.h into your cydsn folder and try again. One little irritating thing about this method is that your TopDesign is enlarged by about ten percent. I don't know why.
https://community.cypress.com/message/75213
CC-MAIN-2019-30
refinedweb
290
86.71
Troubleshooting Amazon S3 This section describes how to troubleshoot Amazon S3 and explains how to get request IDs that you'll need when you contact AWS Support. Topics Troubleshooting Amazon S3 by Symptom The following topics lists symptoms to help you troubleshoot some of the issues that you might encounter when working with Amazon S3. Symptoms Significant Increases in HTTP 503 Responses to Amazon S3 Requests to Buckets with Versioning Enabled. When you have objects with millions of versions, Amazon S3 automatically throttles requests to the bucket to protect the customer from an excessive amount of request traffic, which could potentially impede other requests made to the same bucket. To determine which S3 objects have millions of versions, use the Amazon S3 inventory tool. The inventory tool generates a report that provides a flat file list of the objects in a bucket. For more information, see Amazon S3 Storage Inventory. The Amazon S3 team encourages customers to investigate applications that repeatedly overwrite the same S3 object, potentially creating millions of versions for that object, to determine whether the application is working as intended. If you have a use case that requires millions of versions for one or more S3 objects, please contact the AWS support team at AWS Support to discuss your use case and to help us assist you in determining the optimal solution for your use case scenario. Unexpected Behavior When Accessing Buckets Set with CORS If you encounter unexpected behavior when accessing buckets set with the cross-origin resource sharing (CORS) configuration, see Troubleshooting CORS Issues. Getting Amazon S3 Request IDs for AWS Support Whenever you need to contact AWS Support due to encountering errors or unexpected behavior in Amazon S3, you will need to get the request IDs associated with the failed action. Getting these request IDs enables AWS Support to help you resolve the problems you're experiencing. Request IDs come in pairs, are returned in every response that Amazon S3 processes (even the erroneous ones), and can be accessed through verbose logs. There are a number of common methods for getting your request IDs. After you've recovered these logs, copy and retain those two values, because you'll need them when you contact AWS Support. For information about contacting AWS Support, see Contact Us. Topics Using HTTP to Obtain Request IDs You can obtain your request IDs, x-amz-request-id and x-amz-id-2 by logging the bits of an HTTP request before the it reaches the target application. There are a variety of 3rd party tools that can be used to recover verbose logs for HTTP requests. Choose one you trust, and run the tool, listening on the port that your Amazon S3 traffic travels on, as you send out another Amazon S3 HTTP request. For HTTP requests, the pair of request IDs will look like the following examples. Copy to clipboard Note HTTPS requests are encrypted and hidden in most packet captures. Using a Web Browser to Obtain Request IDs Most web browsers have developer tools that allow you to view request headers. For web browser based requests that return an error, the pair of requests IDs will look like the following examples. Copy to clipboard <Error><Code>AccessDenied</Code><Message>Access Denied</Message> <RequestId>79104EXAMPLEB723</RequestId><HostId>IOWQ4fDEXAMPLEQM+ey7N9WgVhSnQ6JEXAMPLEZb7hSQDASK+Jd1vEXAMPLEa3Km</HostId></Error> For obtaining the request ID pair from successful requests, you'll need to use the developer tools to look at the HTTP response headers. For information about developer tools for specific browsers, see Amazon S3 Troubleshooting - How to recover your S3 request IDs in the AWS Developer Forums. Using AWS SDKs to Obtain Request IDs The following sections include information for configuring logging using an AWS SDK. While you can enable verbose logging on every request and response, you should not enable logging in production systems since large requests/responses can cause significant slow down in an application. For AWS SDK requests, the pair of request IDs will look like the following examples. Copy to clipboard Status Code: 403, AWS Service: Amazon S3, AWS Request ID: 79104EXAMPLEB723 AWS Error Code: AccessDenied AWS Error Message: Access Denied S3 Extended Request ID: IOWQ4fDEXAMPLEQM+ey7N9WgVhSnQ6JEXAMPLEZb7hSQDASK+Jd1vEXAMPLEa3Km Using the SDK for PHP to Obtain Request IDs You can configure logging using PHP. For more information, see How can I see what data is sent over the wire? in the FAQ for the AWS SDK for PHP. Using the SDK for Java to Obtain Request IDs You can enable logging for specific requests or responses, allowing you to catch and return only the relevant headers. To do this, import the com.amazonaws.services.s3.s3ResponseMetadata class. Afterwards, you can store the request in a variable before performing the actual request. Call getCachedResponseMetadata(AmazonWebServiceRequest request).getRequestID() to get the logged request or response. Copy to clipboard PutObjectRequest req = new PutObjectRequest(bucketName, key, createSampleFile()); s3.putObject(req); S3ResponseMetadata md = s3.getCachedResponseMetadata(req); System.out.println("Host ID: " + md.getHostId() + " RequestID: " + md.getRequestId()); Alternatively, you can use verbose logging of every Java request and response. For more information, see Verbose Wire Logging in the Logging AWS SDK for Java Calls topic in the AWS SDK for Java Developer Guide. Using the AWS SDK for .NET to Obtain Request IDs You can configure logging in AWS SDK for .NET using the built in System.Diagnostics logging tool. For more information, see the Logging with the AWS SDK for .NET .NET Development blog post. Note By default, the returned log will only contain error information. The config file needs to have AWSLogMetrics (and optionally, AWSResponseLogging) added to get the request IDs. Using the SDK for Python to Obtain Request IDs You can configure logging in Python by adding the following lines to your code to output debug information to a file. Copy to clipboard import logging logging.basicConfig(filename="mylog.log", level=logging.DEBUG) If you’re using the Boto Python interface for AWS, you can set the debug level to two as per the Boto docs, here. Using the SDK for Ruby to Obtain Request IDs You can get your request IDs using either the SDK for Ruby - Version 1 or Version 2. Using the SDK for Ruby - Version 1– You can enable HTTP wire logging globally with the following line of code.Copy to clipboard s3 = AWS::S3.new(:logger => Logger.new($stdout), :http_wire_trace => true) Using the SDK for Ruby - Version 2– You can enable HTTP wire logging globally with the following line of code.Copy to clipboard s3 = Aws::S3::Client.new(:logger => Logger.new($stdout), :http_wire_trace => true) Using the AWS CLI to Obtain Request IDs You can get your request IDs in the AWS CLI by adding --debug to your command. Using Windows PowerShell to Obtain Request IDs For information on recovering logs with Windows PowerShell, see the Response Logging in AWS Tools for Windows PowerShell .NET Development blog post. Related Topics For other troubleshooting and support topics, see the following: For troubleshooting information regarding third-party tools, see Getting Amazon S3 request IDs in the AWS Developer Forums.
http://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html
CC-MAIN-2017-13
refinedweb
1,177
53.31
I think it's safe to say that charting is a key part of many applications run on company intranets. People like to see data visually as opposed to viewing it in rows and columns sometimes (especially higher level managers). While there are many third-party solutions available that provide charting solutions, you now have access to a very powerful solution from Microsoft that won't set you back any $$ at all. Translated…it's free! Sure, some of you may think that "free" products aren't good but that's not the case here. The new Chart control can generate visually stunning 2D and 3D charts without a lot of work on your part. In fact, there are over 25 different chart types that you can select for use in your ASP.NET or Windows Forms applications. To get started using the Chart control you'll need to download and install the following: - Microsoft Chart Controls (for ASP.NET and Windows Forms) - Visual Studio 2008 Tool Support for the Chart Controls Once you've installed the chart controls you'll see a System.Web.DataVisualization.dll assembly in the Global Assembly Cache. Within the assembly's System.Web.UI.DataVisualization.Charting namespace you'll find the new ASP.NET Chart control. Here's a step-by-step look at getting started with the Chart control and binding it to data in a database using the good old SqlDataSource control. - Drag the Chart control from the VS 2008 Toolbox onto the design surface. You'll see the following in the designer. Change the control's Height and Width properties to 400 and 600, respectively in the Property window. - Click the Chart control's smart tag and and bind it to a data source. I'll use a basic SqlDataSource for this example and display the number of customers in each country from the Northwind database: - Right-click on the Chart and select Properties from the menu. Locate the ChartAreas property and click the ellipse (…) button. - A single chart area named ChartArea1 should show in the ChartArea Collection Editor window. Expand Area3DStyle and set (Enable3D) to True. This causes a 3D version of the chart to be generated which is cool if you're trying to impress friends, family or your boss! You can change the perspective, rotation, plus more by tweaking properties. - If you want to change the background locate the Appearance section (still in the ChartArea Collection Editor) and choose a value for the BackColor and BackGradientStyle (if you want a gradient) properties: - Locate the Axes property and open the collection editor by clicking the ellipse (…) button. Within the X axis locate the Title property and change it to Countries. Within the Y(Value) axis locate the Title property and change it to Number of Customers. - Close the property editor windows and locate the Chart control's Series property. Click the ellipse (…) button to open the property editor. - For the Series1 member locate the Data Source section and change the XValueMember to Country and YValueMembers to Column1 (or the name of the field returned from the query if you don't use the one shown above in the SqlDataSource wizard). This tells the Chart control which fields to bind to based on what it gets back from the SqlDataSource. - Save the page and run it to see the chart in action: - Notice that not all of the countries are shown on the X axis. If you'd like to see all of them go back to the ChartAreas property, select Axes and locate the X axis, LabelStyle section. Change the Angel property to –90 and the Interval to 1. Doing that will cause the following output to be generated: Here's what the ASPX code looks like at this point: <asp:Chart <series> <asp:Series </asp:Series> </series> <chartareas> <asp:ChartArea <AxisY Title="Number of Customers"> </AxisY> <AxisX Title="Countries" IsLabelAutoFit="True"> <LabelStyle Angle="-90" Interval="1" /> </AxisX> <Area3DStyle Enable3D="True" /> </asp:ChartArea> </chartareas> </asp:Chart> <asp:SqlDataSource </asp:SqlDataSource> You can show a lot of different types of charts by simply changing the Series ChartType to a different value. Here are examples of Point, Pie, and Line charts: There's much, much more than can be done including adding multiple series (think of charts on top of charts). Check out the Chart control samples located here to learn more!
http://www.drdobbs.com/web-development/getting-started-with-the-aspnet-35-chart/212200721
CC-MAIN-2015-32
refinedweb
731
61.26
The HP HP. Timer requests made with the Set Timer (SYS$SETIMR) system service are queued; that is, they are ordered for processing according to their expiration times. The quota for timer queue entries (TQELM quota) controls the number of entries a process can have pending in this timer queue. When you call the SYS$SETIMR system service, you can specify either an absolute time or a delta time value. Depending on how you want the request processed, you can specify either or both of the following: Optionally, you can specify a request identification for the timer request. You can use this identification to cancel the request, if necessary. The request identification is also passed as the AST parameter to the AST service routine, if one is specified, so that the AST service routine can identify the timer request. Example 27-2 and Example 27-3 show timer requests using event flags and ASTs, respectively. Event flags, event flag services, and ASTs are described in more detail in Chapter 8. #include <stdio.h> #include <ssdef.h> #include <descrip.h> /* Buffer to receive binary time */ struct { unsigned int buff1, buff2; }b30sec; main() { unsigned int efn = 4,status; $DESCRIPTOR(a30sec,"0 00:00:30.00"); /* Convert time to binary format */ status = SYS$BINTIM( &a30sec, /* timbuf - ASCII time */ &b30sec);/* timadr - binary time */ if ((status & 1) != 1) LIB$SIGNAL( status ); else printf("Converting ASCII to binary time...\n"); /* Set timer to wait */ status = SYS$SETIMR( efn, /* efn - event flag */ &b30sec,/* daytim - binary time */ 0, /* astadr - AST routine */ 0, /* reqidt - timer request */ 0); /* flags */ (1) if ((status & 1) != 1) LIB$SIGNAL( status ); else printf("Request event flag be set in 30 seconds...\n"); /* Wait 30 seconds */ status = SYS$WAITFR( efn ); (2) if ((status & 1) != 1) LIB$SIGNAL( status ); else printf("Timer expires...\n"); } #include <stdio.h> #include <descrip.h> #define NOON 12 struct { unsigned int buff1, buff2; }bnoon; /* Define the AST routine */ void astserv( int ); main() { unsigned int status, reqidt=12; $DESCRIPTOR(anoon,"-- 12:00:00.00"); /* Convert ASCII time to binary */ status = SYS$BINTIM(&anoon, /* timbuf - ASCII time */ (1) &bnoon); /* timadr - binary time buffer */ if((status & 1) != 1) LIB$SIGNAL( status ); else printf("Converting ASCII to binary...\n"); /* Set timer */ status = SYS$SETIMR(0, /* efn - event flag */ (2) &bnoon, /* daytim - timer expiration */ &astserv, /* astadr - AST routine */ reqidt, /* reqidt - timer request id */ 0); /* cvtflg - conversion flags */ if((status & 1) != 1) LIB$SIGNAL( status ); else printf("Setting timer expiration...\n"); status = SYS$HIBER(); } void astserv( int astprm ) { (3) /* Do something if it's a "noon" request */ if (astprm == NOON) printf("This is a noon AST request\n"); else printf("Handling some other request\n"); status = SYS$SCHDWK(0, /* pidadr - process id */ 0);/* prcnam - process name */ return; }
http://h41379.www4.hpe.com/doc/82final/5841/5841pro_076.html
CC-MAIN-2016-40
refinedweb
450
55.95
Bloom’s Modern Critical Interpretations Alice’s Adventures in Wonderland The Adventures of Huckleberry Finn All Quiet on the Western Front Animal Farm As You Like It The Ballad of the Sad Café Beloved Beowulf Billy Budd, Benito Cereno, Bartleby the Scrivener, and Other Tales Black Boy The Bluest Eye Brave New World Cat on a Hot Tin Roof The Catcher in the Rye Catch-22 Cat’s Cradle The Color Purple Crime and Punishment The Crucible Darkness at Noon David Copperfield Death of a Salesman The Death of Artemio Cruz The Divine Comedy Don Quixote Dracula Dubliners Emerson’s Essays Emma Fahrenheit 451 A Farewell to Arms Frankenstein The General Prologue to the Canterbury Tales Homer’s The Iliad Updated Edition Edited and with an introduction by Harold Bloom Sterling Professor of the Humanities Yale University com Contributing Editor: Pamela Loos Cover designed by Takeshi Takahashi Cover photo The Art Archive/Glyphothek Munich/Dagli Orti (A) Printed in the United States of America Bang EJB 10 9 8 7 6 5 4 3 2 1 This book is printed on acid-free paper. . including photocopying. Greek literature—History and criticism. I. electronic or mechanical. recording.Bloom’s Modern Critical Interpretations: The Iliad—Updated Edition Copyright ©2007 Infobase Publishing Introduction © 2007 by Harold Bloom All rights reserved. or sales promotions. some addresses and links may have changed since publication and may no longer be valid. II. III. cm.01—dc 22 2006031068 Chelsea House books are available at special discounts when purchased in bulk quantities for businesses. without permission in writing from the publisher. institutions. p.H777 2006 883’. Because of the dynamic nature of the web. You can find Chelsea House on the World Wide Web at. or by any information storage or retrieval systems. PA4037. Title. No part of this publication may be reproduced or utilized in any form or by any means. Harold. For more information contact: Chelsea House An imprint of Infobase Publishing 132 West 31st Street New York NY 10001 Library of Congress Cataloging-in-Publication Data Homer’s The Iliad / Harold Bloom. — Updated ed. Homer. ISBN 0-7910-9306-9 (hardcover) 1. Series. Bloom. editor. associations. 2. All links and web addresses were checked and verified to be correct at the time of publication.chelseahouse. Iliad. — (Bloom’s modern critical interpretations) Includes bibliographical references and index. Please call our Special Sales Department in New York at (212) 967-8800 or (800) 322-8755. and the Death of Patroklos Derek Collins Toward a Political Ethic Dean Hammer 155 131 .Contents Editor’s Note vii Introduction 1 Harold Bloom Values in Tension Graham Zanker The Helen of the Iliad Norman Austin The Importance of Iliad 8 Malcolm M. Armor. Willcock 11 33 55 Probe and Survey: Nonverbal Behaviors in Iliad 24 Donald Lateiner Achilles’ Swelling Heart Christopher Gill 95 65 Hexameter Progression and the Homeric Hero’s Solitary State Ahuvia Kahane 109 Possession. N.vi Contents The Iliadic War D. Maronitis 181 Chronology Contributors Bibliography Acknowledgments Index 205 195 197 199 203 . and a sense of nemesis. two or three centuries later.Editor’s Note My introduction compares and contrasts the poet of the Iliad and the J Writer or Yahwist. while Donald Lateiner emphasizes the role of body language. Helen is seen by Norman Austin as suffering from shame. is an epitome of passion that transcends all bounds. who wrote the oldest narrative strand in what now we call Genesis. to Christopher Gill. was to become Athenian tragedy. Graham Zanker traces how Homer invented what. to whom Aphrodite has abandoned the beautiful woman who remains the mortal goddess of Western literary tradition. In this volume’s final essay. Dean Hammer takes us into Homer as a performer of political thought. Numbers. both of them absent from Paris. and expounds it as a contingent mode of an ethics founded upon vulnerability. Book 8’s account of the second day of fighting is seen as crucial to the entire epic by Malcolm M. N. after which the solitude of the Iliad’s hero is set forth by Ahuvia Kahane in terms of its “rhythmic properties. and informs us that some of these aspects cannot now be recovered. Maronitis considers the pity of war as Iliad’s dominant theme. particularly in the Iliad’s final book. Willcock. vii . Achilles. Exodus. D.” Derek Collins explores ritual aspects of the death of Patroklos. . far from the pastureland of Argos. Iliad. to hear the bleatings of the flocks? For the divisions of Reuben there were great searchings of heart. I fear the gods will make good his threatenings. confident in Zeus.HAROLD BLOOM Introduction Hektor in his ecstasy of power is mad for battle. deferring to neither men nor gods. All this I gravely fear. and our fate will be to die here. bk. driven out by smoke. Pure frenzy fills him. II. and he prays for the bright dawn when he will shear our stern-post beaks away and fire all our ships. if even at this hour you’ll pitch in for the Akhaians and deliver them from Trojan havoc. 9. Why abidest thou among the sheepfolds. 1 . Rouse yourself. Fitzgerald translation. 237–50 For the divisions of Reuben there were great thoughts of heart. In the years to come this day will be remembered pain for you if you do not. while in the shipways amid that holocaust he carries death among our men. to matter. Hector. unless it be certain parts of the book of Job. they are not spirits imprisoned in matter but forces or drives that live. as the Iliad is the first . and not at all Greek.” as when she said: “Its bitterness is the only justifiable bitterness. that is. their masterpieces have yielded an appropriate quotation every time anybody had a crime he wanted to justify. Cast in Homer’s terms. both in deed and word. being another in that weary procession of instances of Jewish selfhatred. “consider themselves a battleground of arbitrary forces and uncanny powers. as though Jesus had been a Greek and not a Jew: The Gospels are the last marvelous expression of the Greek genius. and rather oddly associated them. Throughout twenty centuries of Christianity. perceive. imitated. the Romans and the Hebrews have been admired. even Odysseus. to “the subjections of the human force to the gods’ force and to fate’s force. And no text of the Old Testament strikes a note comparable to the note heard in the Greek epic. Joseph. Zebulun and Naphtali were a people that jeoparded their lives unto the death in the high places of the field. and even of Christian anti-Semitism. her sentence should have ascribed justifiable bitterness. to them a vanquished enemy was abhorrent to God himself and condemned to expiate all sorts of crimes—this is a view that makes cruelty permissible and indeed indispensable. with the Hebrews. I adopt here Bruno Snell’s famous account of “Homer’s view of man. misfortune was a sure indication of sin and hence a legitimate object of contempt. for it springs from the subjections of the human spirit to force. this is also merely banal. and all the other heroes. and feel. Though vicious in regard to the Hebrew Bible.2 Harold Bloom Gilead abode beyond Jordan: and why did Dan remain in ships? Asher continued on the sea shore.” in which Achilles.. and abode in his breaches.. read. the bitterness of Achilles and Hector.” Of what “human spirit” did Weil speak? That sense of the spirit is of course Hebraic. and is totally alien to the text of the Iliad. Jacob. in the last analysis.” Abraham. and Moses clearly do not view . What is interesting in it however is Weil’s strong misreading of the Iliad as “the poem of force. Judges 5:15–18 I Simone Weil loved both the Iliad and the Gospels.” For that is how Homer sees men. and for reasons that transcend the differences between Homer’s language and implicit socioeconomic structure. We have no ways of thinking that are not Greek. Jesus. and yet our morality and religion—outer and inner—find their ultimate source in the Hebrew Bible. they are agonists. Homer is perhaps most powerful . the prime and original author of much of Genesis. known as the Yahwist or J Writer to scholars. Exodus. and their belated strife may be the largest single factor that makes for a divided sensibility in the literature and life of the West. filled the bow of Ephraim. a third who evidences most deeply the split between Greek cognition and Hebraic spirituality. and the tangled company of Zeus and the Olympians. When I have bent Judah for me. with only Shakespeare making a third. whether we are Gentile or Jew. though neither ever heard of the other. ye prisoners of hope: even today do I declare that I will render double unto thee. Exodus. we are children of Abraham and not of Achilles. Like the Hebrew Bible. Homer and J have absolutely nothing in common except their uncanny sublimity. O Zion. Christian. To read the Iliad in particular without distorting it is now perhaps impossible. In a profound sense. The burden of the word of the Lord. and our own.Introduction 3 themselves as a site where arbitrary forces clash in battle. as delivered by Zechariah (9:12–13) has been prophetic of the cultural civil war that. and made thee as the sword of a mighty man. Jew. for us. and raised up thy sons. Homer is both scripture and book of general knowledge. Numbers. against thy sons. For what marks the West is its troubled sense that its cognition goes one way. Moslem. believer or skeptic. who has his arbitrary and uncanny aspects but whose force is justice and whose power is also canny. Numbers is the poem of the will of Yahweh. O Greece. Hegelian or Freudian. II The poet of the Iliad seems to me to have only one ancient rival. They compete for the consciousness of Western nations. and they are sublime in very different modes. or listened to the other’s texts. can never end: Turn you to the stronghold. or their mixed descendants. and neither of course does David or his possible descendant. is between Yahweh. and these are necessarily still the prime educational texts. The Iliad is as certainly the poem of force as Genesis. The true difference. and its spiritual life goes in quite another. fate and the daemonic world. he wrestles out of character. but. as contrasted to the comparable figure. yet cannot overcome the bitterness of his sense of his own mortality. What other ultimate value is imaginable in a world where the ordinary reality is battle? It is true that the narrator.” Indeed. as it were. Dante. which is not exactly the biblical ideal of honoring your father and your mother. except for the Yahwist. compared even to Zeus. Defensive warfare is no more an ideal (for most of us) than is aggression. Hector is stripped of tragic dignity. but to delay him. To compete for the foremost place was the Homeric ideal. The Yahwist or J is as powerful when he shows us Jacob wrestling a nameless one among the Elohim to a standstill. Redfield observes. since we cannot visualize Achilles living a day-to-day life in a city. That. This helps explain why the Iliad need not bother to praise war. but in the Iliad both are very near to the highest good. indeed very nearly of all dignity. Abraham and Jacob therefore. The epic is the tragedy of Achilles. if we pondered it closely? Achilles and Hector are hardly the same figure. And Jacob is no Heracles. in which farmers rip out the grain and fruit as so many spoils of battle. is essentially a war between humans and nature. in the Iliad.4 Harold Bloom when he represents the strife of men and gods. so as to give us a giant trope for Israel’s persistence in its endless quest for a time without boundaries. and Jacob struggles. but the instance is unique.” as Redfield and others do. as James Joyce rightly concluded. before he dies. but how much of it is spiritually acceptable to us. and not Achilles. which is victory. because he retains the foremost place. The Iliad. To be only half a god appears to be Homer’s implicit definition of what makes a hero tragic. Achilles can neither act as if he were everything in himself. since reality is a constant contest anyway. one is nothing in oneself. ironically enough. in which nothing of value can be attained without despoiling or ruining someone or something else. But this is not tragedy in the biblical sense. the world of peace. the rhetorical purpose of these similes “is not to describe the world of peace but to make vivid the world of war. or would be. David (who in Yahweh’s eyes is clearly the best among the children of Abraham)? It is certainly not to be the most complete man among them. compared to Yahweh. and his personages. but they are equally glorifiers of battle. where the dilemma of Abraham arguing with Yahweh on the road to Sodom. are haunted by similes of peace.” Achilles. and Shakespeare. are the cultural ancestors of Hamlet and the other Shakespearean heroes. What after all is it to be the “best of the Achaeans. I find it difficult to read the Iliad as “the tragedy of Hector. is . is the most extraordinary writing yet to come out of the West. not to overcome the nameless one. nor can he believe that. he is nothing in himself. or of Jacob wrestling with the angel of death. is the need to act as if one were everything in oneself while knowing also that. as James M. Introduction 5 certainly Odysseus. Erich Auerbach. Yahweh or universal history. and his affective life are all divided from one another. the hero whom Yahweh had decided not only to love. with a wavering vision of himself. as Bruno Snell demonstrated. III The single “modern” author who compels comparison with the poet of the Iliad and the writer of the J text is Tolstoy. Or to put it most simply. whether in War and Peace or in the short novel which is the masterpiece of his old age. Achilles is the son of a goddess. in an American heroic context. whether in or beyond the poem. but David is a Son of God. And the clash of gods and men. would have been the fastest gun in the West. Rachel Bespaloff. necessarily is the indescribable difference between Yahweh and Zeus. who would never lose Yahweh’s favor. aside from their representations of the self. is palpably a child. and man. though the hero must die. on Sinai. is transferred from an elite to the mass of the people. his vision of other selves. Perhaps David would have been that also. The Yahwist and Tolstoy share an uncanny mode of irony that turns upon the incongruities of incommensurable entities. in her essay On the Iliad (rightly commended by the superb Homeric translator. he turns away in some disdain when the blessing. or of fate and the hero. but such an assertion becomes an absurdity directly as they are juxtaposed. even as a child. remains in Homer a conflict between forces not wholly incommensurable. meeting in violent confrontation or juxtaposition. comparing the poet of the Odyssey and the Elohist. must also resemble one another. with his sense of life. Jesus. inevitable since his vitality. which reminds us that David and Achilles both are poets. Both are personalities. and certainly David mourns Jonathan as Achilles mourns Patroklos. Homer and Tolstoy share the extraordinary balance between the individual in action and groups in action that alone permits the epic accurately to represent battle. contra Simone Weil. But the Yahwist has little interest in groups. David. his perception. the Yahwist’s revisionist. can only be the descendant of David. and not of Achilles. The best of the Achaeans is the one who can kill Hector. how refined the art of Homer was) seems to have fallen into the error of believing that the Bible and Homer. and his emotional nature all integrated into a new kind of man. Robert Fitzgerald. Hadji Murad. since both resemble Tolstoy. as conveying how distant. is a mature and autonomous ego. The crucial difference between the Yahwist and Homer. traced the mimetic difference between the Odyssey’s emphasis upon . But Achilles. but to make immortal through his descendants. which is to say that Achilles. sulking in his tent. which promises more life in a time without boundaries. whether indifferent or engrossed. The Iliad may not demand interpretation as much as the Yahwist does.” There is something to that distinction. and Achilles might as well not have had a father at all. Yahweh is the source of the blessing. Its man. the God of Isaac. but in the Yahwist they represent the wisdom and the virtue of the fathers. as it were. provides a fascinating post-Oedipal contrast to his father Jacob. Surely the most striking contrast between the Iliad and the J text is that between the mourning of Priam and the grief of Jacob when he believes Joseph to be dead. but it hardly can be apprehended without any reader’s considerable labor of aesthetic contextualization. No Hebrew writer could conceive of a Yahweh who is essentially an audience. Nietzsche’s characterization is just. Joseph.6 Harold Bloom “foregrounding” and the Bible’s reliance upon the authority of an implied “backgrounding. and Yahweh. Yahweh is the God of Abraham. A people whose ideal is the agon for the foremost place must fall behind in honoring their parents. but it tends to fade out when we move from the Odyssey to the Iliad and from the Elohist to the Yahwist. The sense of a divine audience constantly in attendance both provides a fascinating interplay with Homer’s human auditors. To have the gods as one’s audience enhances and honors the heroes who are Homer’s prime actors. but the aged Jacob is dignity itself. while a people who exalt fatherhood and motherhood will transfer the agon to the temporal realm. Priam’s dignity is partly redeemed when his mourning for Hector is joined to that of Achilles for Patroklos. The Yahweh of Amos and the prophets after him could not be further from Homer’s Olympian Zeus. the God of Jacob. who is simply a type of ignoble old age wasting towards the wrong kind of death. Old men in Homer are good mostly for grieving. But Zeus is nobody’s god. has little in common with the “psychological man” of Freud. Homer’s gods are human—all-too-human—particularly in their abominable capacity to observe suffering almost as a kind of sport. but Achilles seems never to have approached any relation whatever to his father Peleus. even as He will be the God of Moses. who may have been the Yahwist’s portrait of King David. unlike the Yahwist’s. and . though frequently enigmatic in J. Yahweh frequently hides Himself. as his grandfather Abraham was before him. and guarantees that Achilles and Hector will perform in front of a sublimity greater even than their own. the God of David. to struggle there not for being the best at one time. but rather for inheriting the blessing. It can be argued that the spectatorship of the gods gives Homer an immense aesthetic advantage over the writers of the Hebrew Bible. the God of Jesus. is never an indifferent onlooker. in deference to his mother. but fundamentally He is your longing for the father. without a nod for the Akhaians. Zeus is not your longing for anyone. she bound his head with golden cloud. as Freud insisted.Introduction 7 will not be there when you cry out for Him. He fashioned you out of the moistened red clay. and yet He is anything but indifferent to you. and has no limitation. in Judges 5. pikemen suffer the wargod’s winnowing. to which you can only respond: “Here I am. running downwind. whom Zeus loved. There you fight the wars of Yahweh. now rose. his own son. in brutal combat. to take away the women of the enemy. Simone Weil. I want to close this introduction by comparing two great battle odes. Imagine how the pyre of a burning town will tower to heaven and be seen for miles from the island under attack. the war song of Deborah and Barak. Not far from him . and he will not save you even if you are Heracles. at sundown flare on flare is lit. Goddess of goddesses. and then blew his own breath into your nostrils. you fight to be the best. IV In Homer. and the astonishing passage in book 18 of the Iliad when Achilles reenters the scene of battle. in order to recover his arms. so as to make you a living being. like a thunderhead with trailing fringe. and the body of Patroklos: At this. or He may call out your name unexpectedly. his armor. That is not why you fight in the Hebrew Bible. that some relieving force in ships may come: just so the baleful radiance from Akhilleus lit the sky. He will not lend you dignity by serving as your audience. keeping clear. Around his shoulders Athena hung her shield. Iris left him. Yahweh surprises you. short of aging into ignoble decrepitude. and made his very body blaze with fiery light. which so appalled that harsh saint. he halted and gave tongue. Akhilleus.” Zeus is capricious and is finally limited by fate. Moving from parapet to moat. and to survive as long as possible. while all day long outside their town. the signal fires shoot up for other islanders to see. You grieve Him or you please Him. seeing unearthly fire. and he wept hot tears to see his faithful friend. kindled by the grey-eyed goddess Athena. foreknowing danger. because of the shocking incommensurateness which does not apply to Achilles and Athena. the effect is very different. turned their cars and charioteers blanched. It is his angry shouts that panic the Trojans. The great sound shocked the Trojans into tumult. Now the Akhaians leapt at the chance to bear Patroklos’ body out of range. Exalted and burning with Athena’s divine fire. “will be remembered pain for you. the unarmed Achilles is more terrible even than the armed hero would be. Alas. Trojans and allies. The hearts of men quailed. Isaiah would not have had the king and Yahweh exchanging battle shouts in mutual support. whirling backward. as power must come at the expense of someone else’s pain. yet the answering shout of the goddess adds to their panic. When Yahweh roars. though He too cries out “like a man of war. I began this introduction by juxtaposing two epigraphs. Odysseus shrewdly warning Achilles that “this day. torn by the sharp spearhead. They placed it on his bed. and ecstasy results from the victory of inflicting memorable suffering. Into their midst Akhilleus came then. so harsh and clarion was Akhilleus’ cry. Achilles and Athena.” The difference is in Homer’s magnificent antiphony between man and goddess. and old companions there with brimming eyes surrounded him.” on which Hector may burn the Achaean ships.8 Harold Bloom Athena shrieked. the man he sent to war with team and chariot he could not welcome back alive. hearing that brazen voice. in the prophets Isaiah and Joel. Teams. and twelve good men took mortal hurt from cars and weapons in the rank behind. Three times they shuddered. Memory depends upon . Three great cries he gave above the moat. and a superb passage from Deborah’s war song in Judges 5. Hector’s “ecstasy of power” would produce “remembered pain” for Achilles. since they realize that they face preternatural powers. brilliant over Akhilleus. as a trumpet blown by a savage foe shocks an encircled town. lying cold upon his cot.” if Achilles does not return to the battle. for the tribes that risked everything on behalf of their covenant with Yahweh. The high places are both descriptive and honorific. and not to possess Sisera’s women. Everyone in Homer knows better than to trust in Zeus. which is trust in Yahweh. and Asher who continued on the sea shore. The aesthetic supremacy of the Iliad again must be granted. thou hast trodden down strength. is a quality of trust in the transcendent memory of a covenant fulfilled. with a bitter irony. Then suddenly. the stars in their courses fought against Sisera. doubts. and most of all at Reuben. for those who transcended “great thoughts” and “great searchings of heart”: Zebulun and Naphtali were a people that jeoparded their lives unto the death in the high places of the field. hesitations: “great searchings of heart. The river of Kishon swept them away. with piercing intensity and moral force. a lack of the sublime hope that moves the Hebrew poet Deborah: They fought from heaven. which was Nietzsche’s fiercely Homeric analysis of all significant memory. but to fulfill the terms of the covenant. Deborah. What he lacks. Homer is the best of the poets. But that is not the memory exalted in the Hebrew Bible. with its scruples. not to be the foremost among the tribes of Israel. laughs triumphantly at the tribes of Israel that did not assemble for the battle against Sisera. even aesthetically. they are where the terms of the covenant were kept. she utters a great paean of praise and triumph. and always will keep the foremost place.” She scorns those who kept to business as usual. Dan who remained in ships.Introduction 9 pain. O my soul. that ancient river. Zebulun and Naphtali fight. . the river Kishon. to demonstrate emunah. . they are clearly inadequate to curb the disaffection and violence that feature so prominently in the Iliad. After Virtue C O O P E R AT I O N E R O D E D W e have now. However. let alone to ensure generosity. I believe. Without them. surveyed the main reasons why the Iliadic warrior should want to act loyally or kindly to his group or to outsiders like suppliants or xeinoi. without justice. practices could not resist the corrupting power of institutions. How can we account for the subversion of these constraints and the ensuing quarrels and acts of cruelty in the poem? From The Heart of Achilles: Characterization and Personal Ethics in the Iliad. in which the cooperative care for common goods of the practice is always vulnerable to the competitiveness of the institution. function of the virtues is clear.GRAHAM ZANKER Values in Tension Indeed. MacIntyre. 11 . In this context the essential. courage and truthfulness. ©1994 by the University of Michigan. —A. spurred on by Diomedes. confronted by images of death. have the Trojans. because Priam has forbidden lamentation out loud (7.1 Priam has no difficulty maintaining discipline and curbing his men’s non-Greek habit of crying aloud. They meet soon after sunrise. The Iliad offers many scenes of the horrors of war.37–65). an impression probably fostered by the fact that Hektor has just had a mere draw in single combat with Telamonian Aias. shown the best treatment of Menelaos’ household? The mention of Menelaos’ household makes us think of Paris’ seduction of Helen. In any case.12 Graham Zanker The essential factors are that the war is in its tenth year. but they find that it is difficult to recognize the individual corpses. The passage’s pathos also underlines the naked brutality of Diomedes’ recommendation to the Achaians not to accept Paris’ acquisitions or even Helen.2 and thus he preserves his entourage’s dignity before the Achaians. but the reference to the Trojans tout ensemble is likely to have been prompted by Agamemnon’s continuing fury over the attack on Menelaos during the truce.421–32). disfigurement. the object over which the whole war has been raging (as if she were on offer). has just reminded everybody present that Paris is the cause of the war (388). and namelessness. and they have to wash off the gore for their identification before carting them away and burning them. Agamemnon asks why Menelaos should have any concern for Adrestos. and that feelings have become brutalized. Three aspects of the scene are of special interest here. coming face-to-face. but a passage that perhaps speaks with a particular directness to readers today is the moment when the Achaians. Agamemnon is right in implying that . that both sides are exhausted. there are the words of Agamemnon to his brother as Menelaos is on the point of accepting Adrestos’ formal supplication. refuse Priam’s offer to restore the possessions that Paris took with Helen to Troy—Paris will not part with Helen—but Agamemnon takes up Priam’s request for a truce so that both armies might bury their dead. which the Trojans do in silence. A familiar example of this is the episode where Menelaos and Agamemnon dispatch the unfortunate Adrestos (6. which has become submerged in his mind by a desire to press on to nothing less than the total destruction of Troy. immediately after an attempt has been made to bring hostilities to an end once and for all. a state that has ushered in the fragmentation of loyalties and moral values. Diomedes appears to have forgotten the original reason for the Achaians’ expedition. But it is a bitter and horrific thought that the two armies should intermingle in a brief truce. simply because Troy’s doom seems imminent (400–402). but the drive to restore Menelaos’ honor results in excessively cruel reactions.3 Elsewhere. which is backed by the offer of the ransom customary in such cases. Although the herald. the origin of the war is remembered all too clearly. Idaios. First. he asks. when it can be done with ease (6. there are instances of captured warriors being ransomed during the earlier stages of the war. the recognition throws Agamemnon’s choice to kill into stark relief. illustrating the obsessiveness with which warriors are now prepared to assert themselves and the shattering of the norms of proper behavior toward any outsiders at their mercy and toward their own group. such as simple homesickness and war-weariness. and leaving no trace? Second. These examples of former mercy demonstrate the hardening of feelings now. But does Paris’ and his people’s offense really justify Agamemnon’s wish that no Trojan whatsoever escape the Achaians’ retaliation. but that they all die without distinction. The Adrestos episode as a whole signals the degree to which feelings have become brutalized by the time of the events depicted in the Iliad. and Agamemnon stabs him in the flank. even though he recognizes them as warriors whom Achilles once spared (11. The honor-incentive for vengeance and death has overridden the honor involved in sparing a suppliant and.Values in Tension 13 the Trojans have impugned the honor of Menelaos. Third. leaving the collection of spoils till afterward. he repeatedly talks of the shame in which he will return to Argos. Nestor is saying that the pursuit of honor-trophies is actually hindering the progress of the battle: individual warriors are jeopardizing the corporate endeavor of the army by their imprudent concern with the pursuit of personal honor. acquiring the ransom-gifts. though other quite natural impulses. but he concludes in feigned despair that the whole force should head . in which case it is a further reflection on the excessiveness of their cruelty to Adrestos. his purpose unaccomplished against the numerically vastly inferior Trojans. it seems likely that Nestor’s advice is meant to include Menelaos and Agamemnon. immediately after the killing of Adrestos. not even the Trojan child still carried in his mother’s womb or the man who flees. though the prevailing mood is no longer one of mercy. in this case. though he has spread the responsibility noticeably wide. Agamemnon kills Isos and Antiphos. Moreover. there is the hideous moment when Menelaos breaks the physical contact between himself and Adrestos that is an obligatory and obligating step in the supplication ritual. we find Nestor shouting general advice to the Achaians not to hold themselves up by accumulating as many trophies as they can but to get on with killing. Coming where it does. When Agamemnon makes his fatal test of his force’s morale. unlamented.4 A further indication of the volatility of the warriors’ ethical world is provided by their changing attitudes toward returning home and the thought of peace.66–71).101–12). Nestor recognizes that the quest for honor is becoming undisciplined and that the communal enterprise is in danger of being fragmented. Quite apart from Achilles’ change of heart when he comes across Lykaon for the second time. are at work here. 14 Graham Zanker for home (2. When Paris and Menelaos come forward to settle their differences in single combat in book 3.5 In contrast with such bellicosity is the constant longing for peace expressed by both sides. she is overtaken by a “sweet longing” for her former husband. Now that the king has effectively undermined the hope of honor and promised the reverse. for she is now so conscious of her responsibility for the war that when Iris tells her of the truce and the single combat between her two husbands. more obsessive and more excessive. nor even the incentive of tîmê any longer provide infallible guides for behavior.). In such an atmosphere. so that she now desires to return to her home. and. So complete is Helen’s separation from the home that she longs for. nor affective considerations like the longing for home. as she now sees. the yearning for home recedes: “at once war became sweeter to them than returning in the hollow ships to their beloved homeland” (453–54). and they even pray that they will have a philotês ratified by trustworthy oaths (319–23). “in their eagerness for home their shouts reached heaven” (153f. Achaians and Trojans alike have a real moment of hope that hostilities will cease once and for all (111–12). in the Achaian force. which dictate their movements without hindrance. Apart from a figure like Helen. presumably referring back to the portent at Aulis that confirmed that the Achaians would take Troy in the tenth year of the war (301–29). But once the king’s authority has been reasserted and Nestor feels confident enough to state that Zeus guarantees the success of the Achaian expedition. her city. and her parents (130–45). This change of heart is made more poignant when she fails to see her brothers. the army is left with nothing more than their natural inclinations. so neither a sense of justice. The war has sensitized Helen. it hardly comes as a surprise to find warriors on the battlefield operating often with no other motive than naked self-assertion. the drive for honor becomes a matter of every man for himself. the people of the Iliad undeniably show the effects of brutalization. we are told.140–41). which may increase their personal tîmê but does not necessarily at all make them feel bound to “honor” either unprivileged outsiders or even the interests of their own group. whereas once she had willingly and. Shorn of these applications. and we are informed that they are dead and have been buried in their homeland (236–44). . and her sense of guilt over following Paris is all too clearly expressed to Priam in the Teichoskopia (172–80). she can only explain her brothers’ absence on the grounds that they are avoiding the shame that attaches to their sister. where the gentleness of the past is contrasted with the harshness of the present. culpably fled from it. Kastor and Polydeukes. The case of Helen is interestingly different. 566–611). and the court is setting the “limit” of the penalty. There are two major rival views of what is going on. One argues that the murderer claims he has paid the blood-price in full (18. and the litigants will be expected to abide by the arbitrator’s decision. a quarrel has arisen because a man’s relative (no further details are given) has been murdered.499). maintains that the quarrel is over whether the kinsman of the dead man should accept a ransom from the murderer or demand revenge (in the form of execution or exile). justice.6 Elsewhere. In a solemn procedure reminiscent of the assembly. and that they are both eager to “accept the decision at the hands of an arbitrator” (501). is expected to restore peaceful relations. because “it will be done straightly” (580). probably to be preferred. In either view. and the killer remains in the community (9. But then he says he will adjudge the case himself. the sense of justice will be the decisive factor. but the kinsman denies having received anything (500). without fear of anyone taking exception.” justice will be restored by Zeus’ punishment of that community. Menelaos makes his accusation that Antilochos was guilty of foul play and reckless driving in the race. This has the immediate effect of making Antilochos adduce his . And if men pervert the course of righteousness and justice and “pronounce crooked rulings. Aias argues with Achilles that he should accept Agamemnon’s gifts because normally men accept blood-price for the murder of a brother or son. the murderer is claiming that he has a right to pay everything and so avoid other penalties. Antilochos’ claim to the prize mare is challenged by Menelaos.Values in Tension 15 This state of affairs is thrown into sharp relief by the occasional vignettes in the Iliad describing the part justice plays in times of peace and normality. Another prime example of the part justice can play in moments of normality is provided by the altercation between Menelaos and Antilochos after the chariot-race of the funeral games for Patroklos (23. The other interpretation. the herald gives Menelaos the scepter and commands general silence (567–69). He calls on the Achaian leaders to act as an impartial. as we have seen. in the form of worthy compensation and involving the concept of tîmê. Here. Elders plead on either side of the case before the arbitrator. the doctrine of the simile at Iliad 16. This “straight judgment” takes the form of demanding that Antilochos swear an oath to Poseidon that he did not mean to commit a foul against Menelaos’ chariot (581–85). the kinsman is refusing to accept the option of monetary compensation. In it. who will assign two talents of gold to the elder who “pronounces his judgment in the most straight manner” (508). The trial scene on Achilles’ shield is particularly instructive. thus unjustly impugning Menelaos’ excellence as a charioteer. mediating jury (574) to ensure that he will not lay himself open to the charge of having pulled rank (575–78).632–36).384–92. a face-saving method of admitting to the charge. THE CASE OF HEKTOR The fragmentation of ethical values can be seen clearly in the person of Hektor. which prompts him to declare that he will face Achilles himself. But the background reason for his choice is also important.285–309). he is called “noble” while Achilles is styled “much the superior” (22. moreover. the vignettes of peace and normality seem to suggest that when war has become as protracted and desperate as it is in the Iliad. With this reasoning. Perhaps the most important text in this regard is Hektor’s angry rejection of Poulydamas’ advice that the Trojan force should retreat into the city when Achilles returns to the Achaian cause (18. much of it having been sent as payment to allies in Phrygia and Maionia. as the mainstay of his community. He even gives him the mare. Menelaos’ heart is warmed. because he is the lesser warrior. We can understand all too well his frustration when he asks Poulydamas whether he hasn’t yet had enough of being cooped up inside the city’s towers and when he backs up his challenge by recalling how men formerly used to talk of Troy’s wealth whereas its treasure is now exhausted.333).40). because Antilochos has fought hard for the Atreidai. in man-to-man combat (305–9).434). His main reason for fighting on beside the ships is that Zeus has granted that he will win kûdos there and will drive the Achaians into the sea (293–94). Relations are restored peacefully. how much more necessary a factor that will finally predispose people to fairness is. cf. at least as the Iliad presents it.158). 17.220–26). How different the standard behavior of warriors in battle is. During the pursuit around the walls. and with a warning to the young man not to try to trick his superiors again.287–92. These glimpses of moments of peace and normality show that justice is expected to prevail. who is presented. if anybody in the Iliad is. Such a factor will be Achilles’ sympathy for and consequent generosity toward a fellow mortal in suffering. he claims that he will hand over the mare and that he is prepared to do anything rather than fall in Menelaos’ esteem and be an offender against the gods (587–95). “since great Zeus was angry” (18.16 Graham Zanker “flighty” youth as the cause of his behavior. which puts Antilochos in the position of a petitioning subordinate. It is . he is jeopardizing his city. saying that he is responsive to his plea for it. so his inferiority must have been tacitly accepted long before it is expressed in so many words. his father shares his assessment (22. Moreover. and so does Achilles (22. He admits as much to Achilles (20. and the Achaian witnesses see that the king can be generous (596–611). he compliments Antilochos by saying that he has been persuaded more readily by him than he would be by any other Achaian. In his attempt to convince Hektor to retreat. Hektor makes his decision not to retreat. and he imagines with horror how her captors will say that she was the husband of Hektor. In his rejection of Poulydamas’ advice. he says that he will sense no greater pain for the Trojans. he will move the battle from the plain to the city.104). Now that the Zeus who has caused the Trojans to empty their coffers is offering him personal glory. The passage illustrates just how much the war has sapped the Trojans’ morale. But even so there is a strong indication that shame also permeates his thinking. “who was best among the Trojans at fighting” (447–65). He touches on an area of human life. He seizes the other end of the stick and shows his preoccupation with honor when he prays that . His family has been relegated to being associated with being “cooped up inside the towers” and has been overridden in his mind by the desire for the only kûdos that he seems to think he can aspire to with any confidence. his father.7 This is a development of the way Hektor thinks and speaks in his farewell to Andromache and Astyanax in book 6. to the detriment of his community. It is equally legitimate to conclude that he is to some extent compensating for his frustration over the faded glory of his city by pursuing individual glory and honor for himself. and he will see that it has led to the destruction of his community. a claim based on affection.261–65). the hero grows obsessed with his personal glory. His famous reply to Andromache’s plea to him to come inside the walls and save her from becoming a widow and their son from becoming fatherless is based on his shame in the face of the community at not living up to his reputation for winning fame for himself and Priam (441–46). and the Trojans will be fighting for their city and their women (18.Values in Tension 17 legitimate to assume—reconstructing the direction of Hektor’s thinking from the text—that Hektor’s frustration over the thought that his city has been reduced to such dismally inglorious straits is a major factor in his desire to bring matters to a head. It also shows how in circumstances of such desperately low morale. by which it is clear that he by no means lacks love for his family. because he wishes that he will be hidden beneath the earth before he hears Andromache’s cries as she is dragged into slavery. but no less compelling. should he not make the best of his opportunity? In this context. Poulydamas argues that because Achilles is at large again. the family. Later. Hektor nowhere explicitly addresses this argument. When he pictures the inevitable fall of Troy. but knowledge of that fact will in no way encourage him to subordinate his need for personal glory to the common good. which might seem to exert an indefeasible claim on the warrior’s loyalty. his mother. Hektor will call this pursuit of glory “recklessness” (atasthaliai. 22. or his brothers and sisters than for Andromache. and Hekabe is even more direct in her plea than Priam is. the constraints of shame and honor have proven stronger than that of the family. physically separated as he is from his family. T H E AT T E N U AT I O N OF SANCTIONS We can detect signs of fragmentation in all other areas of social contact—in relations with people outside the group. The potency of the image of the family as a reason for caring behavior is reserved for reassertion until book 24. there is no more talk of his wife and son at all. Agamemnon is no respecter of rank or sanctity. Agamemnon’s cruelty contrasts with the right behavior that Achilles once showed to suppliants like Isos and Antiphos and to Lykaon. although Priam gives Hektor the explicit advice to do so to save the whole populace of Troy (56f.321–37)—and they are restored to that role not by the side in the Trojan War naturally most often pictured in the context of their families but by a member of the Achaian force. Already in book 6. By book 18. as she holds out her breast in a mother’s desperation (82–85). family ties provide no effective sanction for social cohesion—at one point Achilles too subordinates Peleus and his son. who can then elect to be unresponsive to the group’s needs. In that of Isos and Antiphos. In the case of Adrestos. precisely shame at the thought of what will become of his family. To outsiders who pose some threat to his claim on an honor-gift (geras). that govern right behavior in the case of outsiders have become attenuated. In both cases. The sanctions. forms the greater part of his decision to return to battle. when Achilles is reminded of Peleus by the sight of the grieving Priam (503–12). however. Agamemnon’s desire for tîmê has become excessive and is directed to individual profit. so .). both ultimate and proximate. such as suppliants and strangers. Chryses is a suppliant and a priest of Apollo. with the result that the leader of the group can disaffect his fellows. We have seen just how attenuated from Agamemnon’s treatment of Adrestos and of Isos and Antiphos. as his attitude toward Chryses shows. and in the relations of people inside the group.18 Graham Zanker Astyanax will grow up to be “renowned” among the Trojans and that people will say of him that he “is better by far than his father” as he brings home the armor of his enemies (476–81). Until that moment. his progress to glory makes him ignore the ties that the two Trojans have with a member of his own group. love them as he assuredly does. which points up the distance between the past and the present in the warriors’ ethical outlook. Neoptolemos. and in the end painfully aware of the rift. and by book 22 Hektor is too far caught up in the web of his honor and his sense of dishonor to be persuaded by the appeals of Priam and Hekabe to fight Achilles from inside the walls. to Patroklos in his affections (19. in a word. Kalchas is wise not to put too much reliance on his status as the Achaians’ soothsayer.Values in Tension 19 Agamemnon’s rejection of his plea to accept his ransom and return Chryseis is especially charged. Through Achilles it is shown most clearly how the king’s overinsistence on being paid due honor can disaffect a member of the group. to his more menacing demand for compensation for the loss of his geras. Agamemnon only offers verbal abuse to the seer. though that factor persuades Agamemnon to honor the priest. Though Agamemnon sends him away “ignobly. That Agamemnon’s demand for Briseis is excessive and hence bad is beyond . This seer. The Achaians respond by approving the idea of reverence for the god (22f. 94). Within Agamemnon’s group is a seer who has knowledge of factors that represent a threat to the king’s tîmê. badly. the god’s staff and fillets will not be any protection (26–28).). to whom there is every likelihood that the king will respond with excessive self-assertion and. In this highly charged atmosphere. The king is thus said to have treated the priest dishonorably (atîmazô.). and that such a king will be unable to restrain his “anger” and “wrath” for long (81–83). it is not merely a matter of reinstating his tîmê and that of his earthly representative. when he says that if he catches him in the camp again. At a juncture when the drive for honor has become such an excessive and individuated affair. He comments that “a king is the stronger man when he is angry with an inferior” (80). Kalchas. though he proceeds from it.14f. Moreover. and his giveaway disclosure about the respect he feels for priestly trappings reveal that it is intrinsically good to honor a priest. though the practicalities of the situation finally force his hand. feels it necessary to win Achilles’ protection against Agamemnon. None of these considerations sways the king for the moment. 11.” he tacitly admits that the priest should be respected. especially after Agamemnon’s treatment of Chryses. and he states that by complying the Achaians will be respecting Apollo (20f. The general reaction of the Achaians. after accepting the fact that Kalchas’ advice is correct and should be acted on. When he supplicates the Achaians. the comment about Agamemnon’s “ignoble” dismissal of Chryses. so when Apollo sends the plague in punishment. neither respect and honor for a suppliant on their own nor even respect and honor for a suppliant with a god’s special backing are capable of ensuring right relations toward an outsider. he does so with the fillets and golden staff that go with his priestly office (1. there is an element of affection between the god and his priest in return for past services: Chryses seems to use that as a bargaining point in his prayer to the god when he mentions the construction of a temple and the sacrifice of bulls and goats (39–41). he frames his request moderately. whom he knows he will anger (78) when he explains the causes of Apollo’s displeasure.). men like Nestor and Agamemnon use agathos in a purely social sense and talk separately about the advisability of fairness.11 In Achilles’ case. In any case.). as the Achaians gave her as a prize to Achilles in the first place” can only be taken to mean that Agamemnon.” and eris. and he rejoins the group and furthers its interests. Agamemnon describes his argument with Achilles as one of the “strifes which take away the fulfillment of one’s purpose” (2. Zeus seem to make the connection between social and moral nobility more directly. significant for the light it sheds on the Iliad’s results-culture. which appears to be the mental process denoted here by nemesis. admitting how the strife which he started (378) has destroyed the cooperation that would have achieved more immediate results in the war.376).8 A few lines earlier. and the expectation that a man so designated will behave “in accordance with his station” or. will earn the gods’ “indignation” as a person acting beneath his position. Agamemnon advises Achilles. he rejects and curses anger and strife. following him.185f. the conclusion is inevitable that Agamemnon’s self-assertion is excessive The ultimate moral constraints to behave fairly have broken down. anger and strife are preconditioned by Agamemnon’s unacceptable assertion of his dignity. with its primarily social reference.). “even though he is an agathos. Later. Agamemnon associates the impulse to assert tîmê so totally with the defense of his personal worth and dignity that he nullifies all the applications of tîmê to relationships in society. Nestor’s advice that Agamemnon should give up his claim to the girl “even though he is an agathos. .” not to cheat him (131f. “sanctioning” the expectation that men in positions of significance will behave “becomingly. Apollo and.”10 In one remark.” These are negative drives: eris is commonly coupled with the adjective “soul-destroying. and in book 24 Apollo threatens Achilles with the gods’ nemesis “although he is an agathos.” because he has passed the bounds of fair behavior in his treatment of Hektor’s corpse (53f.56ff. “anger. a deity “of equal honor” (15. because it shows that among the gods some connection is perceived between the word agathos. even wishing that the object over which they had arisen.). if he tries to restrain him. might expect to have a claim on the girl.). Briseis. “strife. This is a god’s view. Apollo’s phraseology is particularly illuminating. and all constraints proximately based on tîmê are ineffectual.20 Graham Zanker reasonable doubt.107ff. 19.. but would be a morally bad agathos if he acted on such a claim. even if for reasons that the group would not have understood. as a man of high standing. if he does not. which obviously entails morally reprehensible behavior. had been killed the day he took her in captivity from Lyrnessos (18.” Poseidon puts it similarly when he comments that Zeus will move beyond the bounds of acceptable behavior for an agathos.9 The Iliad describes this disaffection in terms of cholos. From the period before the main narrative we have the moment of respect. whose disaffection is what the Iliad is about. A SON’S FEELINGS OF G U I LT We have now seen examples of the heroic sense of fairness that exists in the Iliad and even more instances of its repudiation. He fears the rebuke (100) of Poulydamas for not following his good tactical advice. at pains to point out the difficulty of distinguishing between focus on the self alone and focus on self as agent of special acts. if less acute than in the case of Achilles.12 D. the problem is general.L. one focuses on the kind of person one is. not on just one or the other.416–20). he rightly doubts that popular usage respects the distinction. is couched in terms of shame. One final and fundamental question remains in our analysis: does the text of the Iliad permit us to see any other stimulus for the Iliadic warrior’s sense of fairness and. often regarded as a key text in this connection.13 His abstract models of shame and honor correspond easily with my layering of proximate and ultimate pressures. the psychological machinery operates on two levels. Broadly speaking. heroic propriety. on the whole self. though some scholars have opted for a more exclusive model. beyond that. dealing not with the whole self but with the discrepancy between one’s moral self and one’s (immoral) act. and finally rejects . It operates ultimately on the level of guilt and proximately on that of shame. his feelings of generosity? As with the constraints to act loyally. and he admits a degree of overlap. on the other hand. however.99–130). Cairns is. at least for one member of the group. guilt. on one’s failure to match one’s self-image or to manifest a prized moral excellence. focuses on the specific transgression of an internalized injunction.Values in Tension 21 Social cohesion and the prevailing reasons for commending it have thus been shattered. Cairns’ discussion of shame and guilt carefully defines the emotions. but we have seen enough to convince ourselves that at the time of the Iliad’s events. Hektor’s debate with himself whether to retreat behind the walls of Troy (22. one ultimate. Cairns accepts the view that when one feels shame at one’s moral conduct. and fair play when Achilles gives his enemy King Eëtion a funeral with full military honors (6. one proximate. expresses the preference to die “with fair fame” (110) before the city rather than face his shame. 105) in the face of the citizens of Troy and what they will say about his disastrously misplaced confidence in his own might (106–7). has shame (aideomai. as I argue. but Zeus allotted him the misfortune of having only one son.14 Likewise. its voice.104). even if it is his last stand. was preeminent in wealth and sway.). a consolatory explanation of the mutability of human fortune. Achilles goes on to say. His thoughts easily turn to his own father and Peleus’ mixed fortunes. As he expresses it. Peleus. what function could shame and honor fulfill unless some anterior impulse were present? It is difficult to imagine a society cooperating or not cooperating on the basis of shame and honor alone. That guilt is a living impulse in the psyche of the Iliadic hero and is demonstrated by a passage that has received surprisingly little attention from scholars interested in such things. The sense of guilt is the ultimate driving force. and even more so now than in his speech to Andromache in book 6. talking of his shame before the Trojans if he were to avoid combat like a coward (6. In the case of justice. guilt more often than not can only be expressed and actuated through the more immediate sanctions of honor and shame. But from the beginning he is amazed by the “iron heart” of Priam. In book 24 Achilles responds to Priam’s supplication for Hektor’s corpse with the image of the two jars of Zeus. and we have already considered the likelihood that a sense of fairness lies behind such sanctions. we might justifiably still feel a little puzzled over what the shame and honor were about—why they were there in the first place. who was to be “completely untimely” (540). that he is not . I suggest.22 Graham Zanker the possibility that he might offer restitution to the Achaians on the grounds that Achilles would have no reverence for him in any case and would kill him once he had taken off his armor and was naked and like a woman (124f. is heard only faintly. a core of guilt seems to exist over his having destroyed his community through his own “recklessness” (22. words like just are rare. At the back of Hektor’s honor-terminology. the quality is not effective by itself and needs the more tangible mechanisms of honor-based social institutions to make it so. in reference both to Peleus’ misfortune and to his own feelings about his father. discern the workings of guilt behind the notion of justice. but here and in general. who has dared to enter the presence of the man who has killed so many of the king’s sons (518–21). he says. in terms of his early death. Now he has the added shame of knowing that his self-confidence has proven inadequate and that a lesser warrior is in a position to rebuke him for it. where in similar phraseology he refused his wife’s entreaty to fight from inside the walls. like that of justice.441–46). We can in turn. though in Hektor’s speech and in Iliadic society generally. Hektor’s words and reasoning require closer inspection. If ruining his people were purely a matter of shame and honor. He may express his reactions to his situation in terms of shame and honor. honor demands that he stand his ground. because. minimalist approaches like Adkins’. care for aged parents had a sanction in honor and shame. It is interesting to compare his words on Peleus with those in book 24. How are we to interpret the emotions behind these words? We may justifiably see here regret about the misery he is causing Priam and his family. he pictures his father in Phthia shedding tears of longing for his son while Achilles is abroad fighting the Trojans over Helen (19.321ff. Achilles expresses his emotions exclusively in terms of affection.80–81). 93). whom he “honored” (18. This is even true of when Achilles recriminates himself for not being present to defend Patroklos from death. and honor. though now that we have reason to believe that guilt was a reality in the human world of the Iliad and that the heroes characteristically translate into shame what we would call guilt. In his speech over the dead Patroklos. a direct address to the corpse of Patroklos. Achilles allows guilt to speak more directly here perhaps than anywhere else in the poem.323–25). reminding the Trojans’ wives of how long he has been absent from the fray by killing many of their men (122–25). not until Hektor has “paid the penalty” for killing Patroklos (apotînô.Values in Tension 23 “caring for” Peleus in his old age but is sitting idly before Troy causing “care” for Priam and his children (540–42).15 and shame may be something else that we can legitimately impute to Achilles. but they are not words expressly of guilt. we are at liberty. He tells Thetis that life has no pleasure for him now that his “dear” friend is dead. when he is revolted by displays of excessive self-assertion. shame. to postulate the activity of guilt-feelings behind Achilles’ reactions and words. however significant a factor that emotion may be behind the words. even if those feelings are subordinated to Achilles’ overriding emotional concern for Patroklos. The presence of such guilt is the ultimate mechanism behind the Iliadic hero’s sense of justice—for example. guilt— rather than to be straitjacketed into reductive. brought on because of the deaths he is dealing out at Troy? The passage demonstrates the need for us to be receptive to pluralistic interpretations—sorrow for an enemy. who needed Achilles’ defense (98–100). Neoptolemos (19. But can we not plausibly identify the dominant feeling that Achilles is expressing as guilt over the fact that he is not supporting Peleus in his old age. if we choose. These are undeniably words of rift and sadness. so now he will rejoin the battle and win “noble glory” (121). In a later speech of lamentation.). The coexistence of affection and honor in friendship in the Iliad is brought out very well here. shame. and he surmises that Peleus is either already dead or grieving in his old age and ever expecting news of his son’s death (334–37). A hero’s feelings of guilt may be swamped by other . even if he were to be told of Peleus’ death or that of his son. Moreover. Achilles states that he could not suffer more. but not a sense of guilt. pits . the Aias.16 The trouble is. At least in part. which is in important respects a meditation on the Iliad and its ethical world. can. when the voice of guilt is heard once more.24 Graham Zanker considerations. that the sense of guilt is all too easily ignored in the pursuit of the very values that normally substantiate its claim on the heroes to behave appropriately and worthily. to be nobly born and to behave appropriately. For his part. that is. however. This increases the likelihood that at least this aspect of Homeric society was historical. it lends support to the model that I have proposed in this chapter and proves that the problems inherent in heroism that I have suggested lie at the very heart of the Iliad were perceived by Greek society in Sophokles’ day not as mere poetic constructs but as live issues. I suggest. the crisis in values that exists in the Iliad is based on what have turned out to be the conflicting claims of guilt and shame or honor. presumably by his experience of guilt at some juncture in his own life or by the transference of the feeling from the collective conscience. and a hero responds with generosity. the balance has tipped in favor of honor and shame. As we have seen. as the example of Agamemnon illustrates. such as the desire for honor when the deed is hot: guilt hardly plays a role in Agamemnon’s decision to insult Apollo’s priest and his own prophet and to rob his loyal followers of the spoils of war that have fairly been allotted them. though it is redressed at the end of the poem.17 Because Sophokles’ play explores the ethical tensions within heroism and nobility in terms that are strikingly similar to those of the Iliad. but only when the impulses that have overridden his sense of guilt have evaporated. A mediator like Nestor. Proof of such an interest is provided by the Aias of Sophokles. Moreover. judge that Agamemnon should feel guilt as a consequence of his injustice. Agamemnon reacts to his internal guilt-feelings and realizes that he has acted unjustly (though he admittedly expresses his repentance without any recourse to guiltterminology). The problem is especially pointed in the ethical climate of the warriorsociety at the stage of the Trojan War at which the Iliad takes up the tale. therefore. A TRAGEDIAN REFLECTS The tension that could arise between an essentially honor-based heroism and the claims of affection and fairness on heroic behavior apparently fascinated the Greeks into at least the fifth century. that the sense of guilt will deter men from unjust behavior. In the course of its analysis of what it means to be “noble” (eugenês). The expectation is. Zeus and other gods reduplicate the motivation of guilt and therefore emphasize its importance. though ironically shame and honor are normally expected to buttress the claims of guilt and the fairness-principle that originates in guilt. In both cases the advice is directed at the son’s particular weakness.8–27).105). but he doses his assertion with the comment that he now lies prostrate. it will never be broken (766–75). who came to the same place and through his prowess won Hesione. which is a comparatively minor element in Peleus’ counsel. without honor (41. he later tells Athene to stand by other sections of the Achaian army on the grounds that wherever he is there to defend the line. We saw the motif of the father encouraging his son to be preeminent and at the same time entering a caveat when we examined Peleus’ words to Achilles. When Tekmessa and the Chorus first meet him after the carnage. At lines 764–75 the messenger recalls the parting advice of Aias’ father. addressing the River Skamandros. he uses a vaunting tone typical of epic when he claims that Troy never saw his equal. while Aias. The idea that a hero might boast that he does not need divine aid is foreign to the Iliad and belongs more properly to fifthcentury tragedy. It resolves the tension by acknowledging the different sorts of nobility involved in both sets of criteria and by demonstrating the need for a combination of fairness and a generosity that is based on such human emotions as pity and on friendship. and in the Aias Telamon’s suggestion is met with Aias’ proud insistence that even nonentities can win might with the aid of the gods.18 but a hero’s confidence in his own prowess is quite within the realm of Iliadic concepts of heroism. in which Aias compares his achievements with those of Telamon. The thought is developed in the speech that immediately follows.19 Later. which he now recognizes as such. the fairest prize of all the army (435). Aias deplores the thought of . guilt. after no less effort.Values in Tension 25 the claim of tîmê against those of affection and justice. In the Aias the caveat has been turned from advice about being cooperative into a stricture about the need to maintain right relations with the gods. 18. perhaps. he makes a bitterly ironic comparison between his former martial prowess and the might with which he has attacked mere animals. but to do so with the gods on his side (764–65). Telamon. is perishing without tîmê among the Greeks (440). The champion of the tîmê-standard is Aias. of Achilles’ remark that he has no equal among the Achaians (Il. and he grieves over how he has been reduced to a laughingstock and how he has been shamed (364–67). Aias has confidence that he will win kleos even without their support. bringing home “all glory” (436). dikê. Aias is devastated by shame after his failure to be allotted the armor of Achilles and his subsequent crazed attack on the cattle and sheep. a remark made precisely when he is racked by feelings of shame. to his son as he set forth on the expedition to Troy—that Aias should desire to be victorious in battle. the epic tone and sentiment—we think especially. and grief on hearing of Patroklos’ death—add significantly to the bitterness of Aias’ reference to his loss of tîmê. making Tekmessa’s dependence on Aias even more poignant. so she is concerned for his well-being and can entreat him in the name of Zeus of the Hearth not to abandon her to his enemies (487–99).22 So shame does form part of her entreaty. but Aias destroyed Tekmessa’s. eugenês. with the difference that Achilles.459–65). charis. Significantly. 6. she is answering his question about what “pleasure” the day can bring when a man’s misery is unrelieved (475–76). she echoes the Iliadic Hektor as he pictures Andromache’s captors gloating over the depths to which his wife will sink and as he hopes that he will be dead and buried before hearing her cries in captivity (Il. She argues that Aias should have reverence for his old father and for his mother. With these words she directly challenges Aias’ competitive definition of the noble man as one who must either live or die nobly. just as Andromache does for Astyanax at Iliad 22.23 He should pity their son.20 He declares it ignoble that a man who has unvaryingly bad fortune should want to have a long life (473–74). the enemy.” because kindness. destroyed Andromache’s homeland. She introduces this consideration early in her speech. Here is heroism’s competitive drive in all the shapes in which the Iliad presents it. and whoever forgets being treated well is not a nobly born man or is not acting in accordance with his station (520–24). and with the word pleasant.26 Graham Zanker appearing before Telamon without gifts of honor. charis. And he should pity Tekmessa. Tekmessa uses almost all the arguments with which Andromache implores Hektor to fight from within the walls of Troy. But the burden of her plea is directed at Aias’ affections. Sophokles confronts it head-on. always begets kindness. Here she echoes Andromache’s famous words to Hektor (Il. apart. charis. She is doing nothing less than defining the noble man . All this is merely a prelude to the appeal that forms the climax of her speech. who longs for his homecoming (506–9). should either live nobly or die so (479–80).21 but she also uses some of those with which Priam supplicates Achilles for Hektor’s corpse. after she has seen that Hektor has been killed. In her answer to Aias’ speech of shame. Eurysakes. that is. the source of Telamon’s “great crown of glory” (462–66). when she reminds Aias that she is his allotted slave and has shared his bed. She reasons that a man should not forget “if he has anywhere enjoyed something pleasant. whose fate she goes on to describe (510–13). first with the claims of affection. 6.411–30). She picks up the shame motif and makes a forceful point out of it: “These words will be shameful to you and your family” (505). Later she argues that Aias is all to her (514–19).490–98. or to use his own word. and he concludes that the man who is nobly born. a thought that in all likelihood goes back to Priam’s persuasive words to Achilles about Peleus. from Aias’ proud disclaimer of the need for any divine aid. ” At 1299–1303. and at 1093–96 he expresses the traditional thought that the nobly born should set an example for the lowborn. in his speech to Agamemnon. but Odysseus and Aias are rivals and enemies. so here too Sophokles seems to be picking up a theme cardinal to the epic. Aias’ reaction is instructive. from which Teukros never really deviates. and Odysseus still extends charis to his dead opponent.” aristos. cf. there is the thought that “gratitude” should be shown for past services. though this is insufficient to change his resolve to die. who formerly was as hard as tempered steel. involves the aristocratic agathos-standard of virtuous behavior. 1259–63).” For one thing. he will have nowhere to flee. when he turns to address the dead Aias and takes the ingratitude of the Atreidai as proof of how quickly charis disappears (1266–71). for his justice and generosity toward Aias (1381. At 1125 he urges the claims of justice. 1228–35. Teukros concludes his speech to Agamemnon by saying that it is more noble for him to labor on Aias’ behalf than on that of the Atreidai over Helen (1310–12). Teukros makes the point most clearly. so context would seem to suggest that the word for “noble” here. Tekmessa and Teukros. He admits that at Tekmessa’s appeal. felt his edge grow soft. kalon. The attitude of Odysseus is most important for our inquiry. and the Achaians will kill him (404–9). have reason to defend the hero.” “made like a woman. and he does so in the face of Menelaos’ insistence that as a mere archer he has no right to have “high thoughts” (1120–25). that there has been no charis forthcoming in return for his continual fighting against the Trojans.26 It is time to consider the thought behind the arguments of the characters in the play who are prepared to take Aias’ part before Agamemnon and Menelaos. . 1399). as people dear to Aias (philoi). This is by no means the sum total of what the play has to say about charis. But he does so only after he has defended his bowmanship against the charge of being a “skill unworthy of a free-born man. but Aias is far from entirely unmoved. “unmanned. perhaps.25 The word for “made like a woman” illustrates the honor-driven warrior’s contempt for the affective appeal.316f.27 Within the competitive tîmêframework. The Chorus lament the fact that the Atreidai do not appreciate Aias’ former deeds of the greatest aretê (616–20). “kindness” or “kind favor. barbarian birth (1288–1307. Teukros praises Odysseus as “best. In all this we remember Achilles’ complaint to the embassy at Iliad 9. Aias gives indirect expression to this when he says that if his old repute has been destroyed.”24 and that he feels pity for her and Eurysakes (650–53). When Agamemnon expresses surprise at this. He has just been defending himself against Agamemnon’s taunts about his low. he argues that his parentage was “really” noble. even he.Values in Tension 27 as one who is responsive to kindness and affection. Odysseus even offers to join in and help with the burial and to do all that mortals should do in the case of “the best men” (1376–80). he has Hektor’s corpse washed and anointed. Odysseus reveals even deeper motives much earlier in the play. we have the ultimate factor preconditioning the just and generous response: pity for one’s fellowman. for his generosity and for his sole defense of his former enemy (1381–99). What are Odysseus’ reasons for wanting to see the body of his enemy honored with decent burial? To Agamemnon he says that he himself would not dishonor Aias.). Odysseus can only say that he pities (121) Aias because he has been yoked to an evil doom. The model for Odysseus is the Achilles of Iliad 24. After the display of Athene’s power. He says he cannot approve of “a hard heart” (1361). Thus Odysseus’ generosity represents the crowning form of nobility of birth and the behavior expected of it in the Aias. in particular by making the theme of justice more explicit and direct. Here. even one’s enemies. but the use of Odysseus to mediate in the denouement of the quarrel over Achilles’ armor is even more powerful when we realize that his sentiments and moral outlook are based on those of the “original” Achilles. when Athene has goaded Aias into attacking the cattle and sheep. Near the close of the play.28 Graham Zanker Odysseus admits that Aias was an enemy but says he was noble all the same. motivated by the experience of the suffering that human life can entail. Once again Sophokles is evidently thinking of the Iliad.503. even if you happen to hate him” (1336–45). 24. Here a sense of justice. tempers the heroic tîmê-response illustrated by Agamemnon. in traditional terms maybe. and he promises an eleven-day truce while Hektor is buried. and it is in any case “not just to harm the morally noble man [esthlos] when he dies. “Be assured. for he was “the best” among the Achaians after Achilles. Achilles is prepared to bend the rules and keep Priam’s presence a secret from Agamemnon (650–55). and he says further that the king would be unjust (1342) to dishonor him: Agamemnon would be attacking not him but the laws of the gods. who pities his enemies Priam and Hektor in part because of his experience of the meaning of mortality (Il. However grand and awe-inspiring . and he has replied that it would have been sufficient for him that Aias stay inside. an oblique way of saying that he did not want to look on Aias’ misery (79–80). located in the laws of the gods.” he says. because all humans are mere images or insubstantial shadows (121–26). “that you are an esthlos as far as we are concerned” (1398f. 516. which prompts Teukros to praise him. and lifts it onto the wagon himself (580–95). and he perceives that his own position is no less precarious than Aias’. 540). as in the Iliad. The goddess has just asked Odysseus whether it is not the “sweetest mockery” to mock one’s enemies. and he says that Aias’ competitive aretê moves him more than their enmity (1354–57). Sophokles has shaped the model in his own way. while accepting war as a datum of human life. in battlefield supplication scenes the captor gains ransom-gifts and “gives out some concern”. 162f. 77–89).28 The remarkable overriding similarity between the two sets of heroic values helps to substantiate my reading of the Iliad’s values and points to the probability that the problems posed by the conflicting claims of honor and generosity were as real and engaging for the early audiences of the Iliad as they evidently were for those of a dramatic production like the Aias. unlikely to be part of the monumental Iliad. I find the honor-component in the ransom-gifts sufficient obligation on the captor’s benevolence and respect.” On brutalization in the Trojan War.29 NOTES 1. entailing a lack of aidôs for Chryses as a priest. 68–76. and Silk (1987. reflecting the current opinion of the epic as a “cleaned up” version of the Trojan theme. Odysseus’ combination of the sense of justice and the conditioning factor of emotional responses like pity finally succeeds in resolving the quarrel over Achilles’ armor in its last stages..” Agamemnon is at liberty to order Adrestos’ immediate dispatch. see Redfield 1975. in particular. on 7. 4. ad loc. Recently. I am unconvinced by this “anthropology” for reasons that should by now be apparent. Taplin 1992. 48.454–64. 10). 94f. see Griffin 1980. for all the epic’s purgation of the gruesome. 53f. 11. as he sees it. 137f. but the ransomgifts offered by Chryses command respect as well. the grotesque. see also now the disturbing picture sketched by Fehling (1989) of the Trojan story before the Iliad and the Odyssey. The Doloneia is. 67. Kirk 1990. at 67 n. See Leaf 1886–88. and in Odysseus’ generosity in accepting that he has a duty to his rival and enemy that is founded on the pity he feels for a fellow mortal. For discussion. 3. with lit. where Odysseus actually turns around and devotes Dolon’s armor and weapons to Athene. because concern for a Trojan like Adrestos is “inappropriate. in Teukros’ and especially Odysseus’ insistence that the Atreidai behave justly toward Aias’ corpse. 73–78) note such gruesome moments but prefer to view the Iliad as a poem of death rather than war. In Aias’ unwillingness to compromise himself in his standing as a tîmêwarrior. for the view that Homer “holds that war does not come into its own until its ‘original’ cause is lost. 2. 152f. 1). and the gratuitously cruel. Taplin (1992.) has explained Agamemnon’s attitude toward Adrestos on the grounds that.Values in Tension 29 Aias’ devotion to tîmê. See Mueller 1984. Schein (1984.). we have all the ingredients of the tension in moral values that I suggest operates in the Iliad. 167–69. Griffin (1980.. cf. critics like Marg (1973. 67–88. Recently. where considerations of “concern” (which Taplin does not fully explain) are much less compelling than Taplin allows. for Agamemnon’s rejection of Chryses’ supplication at the very beginning of the poem. see most recently Danek 1988. one of my aims is to demonstrate that.. it can still analyze the effects of war in their full horror. When I draw attention to the Iliad’s depiction of the brutalization of values. A comparably hideous example of the contravention of normal correct behavior is Odysseus’ rejection of Dolon’s supplication at 10. Mueller (1984. . See also Taplin 1992. in Tekmessa’s appeal to him (partly) in terms of affection.427. with lit. however. however moving the appeal to affection given expression by Tekmessa. especially when the plan of Zeus has been initiated. however excellent its analysis of the shame-component. Nestor could be suggesting that Agamemnon in particular should “live up to his position.. For discussion of the court scene see especially Edwards 1991. however. Odysseus at 2.. 303–6. that may be so. Moreover.” 9. honor gives a more direct indication of “appropriate” behavior than Schofield allows. the conflict between the “intended results” that the code sanctions—defense of one’s community and so forth—and its “goal.110. 13. 6 provides evidence “that men have personal convictions about the right thing to do. so. cf. 95–103. Schofield 1986. e. 108–26.58. I agree that a shame-culture could never be totally devoid of some element of guilt and some internalized sense of what is intrinsically right.. 23–25. Championing shame: Dodds 1951. Gagarin 1987. but Schofield seems to me to ignore the emotional aspect of Hektor’s decision. 5.).497–508. aidôs. 22 Hektor has an awareness of his misdeed that is likewise subjective and thus demonstrates the “germ” of an idea of retrospective conscience.: Dover 1983. . 29. 12. 39ff. 126–28.” His point is amplified by Cairns (1993 79–83).). What Hektor naturally feels. who considers that “excellent counsel” is necessary to adjudicate between the claims of honor and is therefore external to it. 1971. and what he has “learnt” (and internalized) are not the same thing. 6. See Lloyd-Jones 1983. which I sense generally in Cairns’ treatment of the pressures on Homer’s warriors. 24–27. 19. On the analysis of Schofield (1986.339. Lloyd-Jones (1983. I would accept that rationality is a heroic virtue. 1987a.g. but Lloyd-Jones underemphasizes it to discover a guilt-based sense of justice in the Iliad.30 Graham Zanker 5. to underestimate the operation of tîmê on Hektor’s mind.). 1–7.. though they are. he may be again tacitly criticizing the king. 1987a.. the negative. Edwards argues persuasively for the second interpretation. esp. 264f.. 15. 19. 307f. My analysis differs from that of Schofield (1986). Cf. 87. In both cases. 7. 22. 130. 107. e. 205–6. 94) argues that Hektor’s speech to Andromache in Il. ideas picked up later with the wish to die not “without kleos” but “having done something great for men to come to learn of ” (22. 18–22). See. Dickie (1978. 8.”—glory. loc.. 37f. It is therefore “appropriate” that the man with the highest tîmê exercise the greatest moral and legal force and also act appropriately.g.. 498–500. as I have expressed it elsewhere.). 48f.” This is an important reservation. “opposite ends of the same stick.476. 16.197. the debate between Hektor and Poulydamas demonstrates the “dynamism” inherent in the heroic code.. Cf. Against Adkins 1960b. in the settlement of conflicting claims to honor. 28–63. See further.445f. esp. 25–27.13–14. 2. e. Finley 1978.. on 18. 27–47 (with extensive argumentation and lit.177f. 15. Cairns 1993. See Hoffmann 1914. Gagarin 1973. inhibitory drive of aidôs is present. Adkins 1960b. while Dickie seeks “internalized moral imperatives” alongside the shame-factor.g.890f. but equally powerful is the positive impulse of the “learnt” desire to be esthlos among the front-line fighters and to win kleos (6. Gould 1973. 11. Cairns 1993.) and Dickie (1978) accept the importance of shame in Homeric society. On Hektor’s sense of guilt. Long 1970. 14. 87–89. 4f. Cairns’ discussion of both passages seems to me. 43. 11. but I suggest that. cit. or to face and kill Achilles or die “with fair kleos in front of the city” and see whom Zeus will give the triumph.. 37f. 17f. because in Homeric thinking the Zeus-given tîmê of the king imposes on him the obligation to wield the scepter and pronounce themistes. 10. 304f. 1987b. when Nestor points out to Achilles that Agamemnon has superior tîmê as a scepter-bearing king (278–79). In that case. 1f. with Rowe. Cairns 1993. who argues that in Il. Rowe 1983. with lit. (= 1. 301f. but the concept is present in the Odyssey. he has received nothing “of value” from the Achaians.477f. when the Locrian Aias defiantly asserts that he will cross the sea in safety “without the good will of the gods” (4. 89–101. expressed at 525–28 and 578–82. Gould 1983. 18. See Easterling 1984. 32–45. With ironic appropriateness. Cf. At 141–47. The effect of Aias’ dishonor on his followers graphically illustrates the socially competitive aspect of shame. for example. which he bases essentially on. 15–19. 173f.B.” of Peleus and Telamon.” 17. Discussions of the influence of the Homeric view of heroism on the Aias include Knox 1961.). The case of Hektor. Sophokles makes Hektor and Aias guest-friends as a result of the exchange. N. respectively. 1–15. by. on the limited but real softening of Aias’ attitude toward people dear to him (philoi) that is discernible in the Deception Speech. the sword that the Trojan gave him when they ceased hostilities at Il. his low estimation of men who weep. 5f. Aias’ hûbris is absent from his words at Il. for example. see also. 20. 25. so the sword is a gift given in guest-friendship. Gill (1990. Easterling 1987. esp. 27f.. 19–22) argues persuasively that in the Aias we can see the operation of his “character”–“personality” distinction. see Wilson 1979.634. for the similarity of phrasing on the gêras. 1–37. Winnington-Ingram 1980. 56. 38–40.. 52–61. the “old age. 99–101). see Herman 1987. and the dramatist can play on the incongruity of the inauspiciousness of the gift (665) and of the idea of a guest-friend being “most hated” (817f. What follows is a modified version of my remarks at Zanker 1992. on “Nachdrücken. on such speeches. for the belt is used to bind Hektor’s corpse to Achilles’ chariot.486–94. Moreover. See Easterling 1984. see Kamerbeek 1953. 768. see now also Crane 1990. because he obtained it from Hektor. 65–67. and cf.Values in Tension 31 15. 26. with lit. 17. and perspectives that are subjective and empathetic. whom Sophokles makes receive Aias’ belt after the duel. perspectives of character that are objective and moral. therefore. and his impatience with the tearfulness of women. 4. it is the gift of Aias’ enemy Hektor. 94–99. At Works and Days 185–88. see esp. Sophokles seems to have transferred the hûbris of the Locrian Aias to the Telamonian. 23. 127–33 (Athene on self-restraint). Goldhill 1986.). 60 n. 21. esp. is similarly ironic. for prior studies of Sophokles’ fifthcentury perspective on Homeric heroism see the preceding note. with which Aias chooses to end his life (815–22). not paying them back for rearing them. 7. 154–61. The motif is also used in connection with Tekmessa. reported by Tekmessa at 319f. 6f. among other things. See Adkins 1972. 16. 1–5. which on the heroic logic of esteem must include any gift (661–65). and 187–91 the Chorus of Aias’ men bewail their insignificance and their consequent inability to defend themselves on a competitive level against the charges of dishonor to which their master has exposed them. Her reminiscence of Hektor’s evocation of what an anonymous man will say in time to come powerfully amplifies the shame/honor-aspect of her appeal. 24.. 17. on Aias 767. Easterling 1984. together with the irony of Hektor’s gift to Aias. Hesiod complains that the young in the present Age of Iron “do no honor to” their aging parents. in the Iliad. Aias 506f. it makes Teukros conclude that the gods have planned the neat coincidence (1028–39).303ff. we see Aias presented from the . esp. Il.504). The handling of this theme in the Aias has most recently been discussed by Crane (1990. 22. in the Deception Speech... 487. with Easterling 1984.. 89–101. 28. Lesky 1961. when she is made to say that she has been cast out of “the favor [charis] in which (she) was formerly held” (807f. 19.. 154–61. 24. de Jong 1987b. 27. 108–34. “character” comprehending the proximate drives. see most recently Davidson 1988. 45–72. this time the Odyssey with its revenge theme..32 Graham Zanker perspectives of both “character” and “personality. Little Iliad. 1224–34). however.. He reflects not only on his sources from epic. see Jebb 1898. but on the plays of the same name by Aischylos and Euripides. This suggests. xxivff. and Iliou Persis. by introducing Neoptolemos as the agent for securing Philoktetes’ bow. Sophokles’ reading of Homeric epic. . In the case of the Elektra. generous. 965f. that Sophokles particularly regarded the tension as one inherent in the warrior-ethic of the epic tradition. in particular the Kypria. which Odysseus calls “victory. In the Philoktetes of 409. perhaps. whose exclusive interest is to achieve his purpose (75–85. 1049–62). It is possible that in the Philoktetes he uses the tension to shape his cast and their characterization. feeds into a very different set of moral concerns.” is an essential component of the competitive tîmê-mentality. 1074f. xiv–xxvi. xixf. This opposition of values is very different from what we can glean of the Problematik of Aischylos’ and Euripides’ plays on Philoktetes. see in general Jebb 1898. in stark opposition to Odysseus.” Gill’s distinction is by and large compatible with my ethical model. 29. we observe Sophokles in some ways reduplicating the scheme of values that he explores in the Aias. Neoptolemos is characterized as compassionate. “personality” the ultimate. and thus ultimately concerned to see that Philoktetes is treated fairly (906. Success.. could miss the economics of the Trojan War. Modernists. No one. H From Helen of Troy and Her Shameless Phantom. appearing most recently in Derek Walcott’s Omeros. and certainly the most fascinating. and Mycenae too. Was Helen no more than a story? Time was when the Trojan War was taken to be no more than a story. 33 . Troy has been uncovered.NORMAN AUSTIN The Helen of the Iliad elen of Troy is no doubt the most famous woman in European history after the Virgin Mary. and when they talk of thrones and diadems we see economics. we smile at the fables of the ancients. richly embroidered by folk imagination. to preserve and enlarge their treasuries. ©1994 by Cornell University Press. Such long-enduring fame raises the inevitable question. Treasures enough have been found in both citadels to make King Agamemnon and King Priam at least plausible historical figures. The story reverberates through the ages. Homer’s Greeks and Trojans loved their commodities with a passion and required ever new territory. several Troys in fact. including his own daughter. reading Agamemnon’s majestic offer of goods and property. Perhaps a devastating war was fought in the late Bronze Age between the Myceneans and the Trojans for economic motives. but archaeology has taught us caution. Was there a real Helen of Troy? Put another way. it seems. layer upon layer. and mysterious Helen is still a poet’s theme. But Helen? Here scholars balk. to Achilles in Iliad 9. ” reminds us that Helen transcends economic categories. asked to sift through the romance for “the real Helen. Beauty in the Iliad. Helen transcends categories altogether. had the whole Mediterranean in thrall. The archaeologist. like Aphrodite. But above economics Homer places a more seductive cause—the quest for beauty. Helen. as in Plato’s cosmology. Hecuba. we see that Helen. is not. Whoever possessed beauty in Homeric society would possess the world. will settle for nothing less than material proof. with nothing more to lose but her reputation. Briseis. never was. silver. Helen.” the “House of Atreus. and never will be a slave. on one hand. when Hera borrows Aphrodite’s charms to divert the will of Zeus). chariots. though often captured. of all the archetypes in Homer’s pantheon. greaves. If we take the Helen tradition as a whole. What has art to do with history? Beauty is truth. breastplates. sold. into romance—the “Rape of Helen. No historical documents or artifacts will ever diminish Homer’s Helen or improve her. gold. Beauty writes its own laws. Helen alone escapes the slavery in store for the others—Chryseis.” The Homerist. Could Homer’s uncouth pirates have waged war for beauty? We smile at the romanticism. the literary critic needs no facts. or held responsible at least. But Helen belongs in an economic category of her own. “the daughter of Zeus.” responds with the scholar’s shrug. . womanish ways. and no spade has yet uncovered Helen’s sandal. Hers was the power to undo even the political arrangements of Olympus (as in Iliad 14. may be wounded but never bought.” the “Trojan War. Aphrodite may be wounded by a mere man (in Iliad 5) or abused by Hera and Athena for her soft.2 On the other hand. slaves male and female. The tribal imagination spins complex social history. or killed. if not the greatest. for the slavery that befalls the other women. Andromache. which required ore and mines. the seven beautiful and gifted women of Lesbos whom Agamemnon gives to Achilles in book 19—the list is almost endless. which today is generally read as the politics of acquisition and dominance.34 Norman Austin The new technology. Beauty is among the greatest. They will be reduced to the level of commodities “through” or “because of” Helen.” the “Judgment of Paris. bronze. is the Subject to which every signifier turns. Helen’s Olympian archetype. like the compass point to its magnetic pole. will be responsible. Of all the women in the Iliad. so high was the value placed on beauty. while Helen herself remains a free woman. but we should not be misled by such temporary insults to her dignity. Like Aphrodite. that is all we need to know. and shipping lanes to those mines. To heighten the difference even further. Homer’s formula for Helen. Helen is conspicuously different.1 On one side Homer places the other commodities for which men fight—horses. Patroklos. truculent king like Agamemnon. But Helen stands on another ontological plane. Was she goddess or human? Was she seduced by Paris or raped? Was she a libertine or the victim of society? Helen will never die for her honor. Whoever asks the question is Homer’s true reader.3 We have no difficulty imagining an overbearing. That is to be her sign for eternity: to be the woman with no shame. and he the best. immortality in return for having no honor to lose. two eidola—icons. which is the common fate of all other women.5 Achilles . or as close to grace as human impersonations of the gods can reach. Helen will lose neither life nor honor. or found true love with Achilles. and a host of others. shadows— consummating their secret. she as the daughter of Zeus. and Helen herself was as perplexed as they. yet in its innocence it shows a surer instinct for Homer’s art than the scholar who brackets the question to attend to questions of graver import. and he as the son of Thetis.561–69). instead. Neither Homer’s Greeks nor his Trojans knew what to make of Helen. The question is. a garrulous old soldier like Nestor. Disgraced in life. But the terms are synonyms in Homer’s shame culture: the best is the fairest. Achilles and Helen—the two occupy a position of supreme privilege in Homer’s world. who was as hated as she was privileged. central to Homer’s Iliad. whether virtuous or not. the fairest. as Achilles will. daughter of Zeus. the story goes on. Yet other stories arose.The Helen of the Iliad 35 But while Homerists of whatever stripe may dismiss the real Helen as irrelevant. Helen herself would be advanced even higher. which told of Helen and Achilles as lovers after death. including Agamemnon. and curious listeners continue to ask. Instead.” When we ponder “the real Helen. though other stories outside the epic suggested that if Menelaus were rewarded with a place in Elysium. the Dioskouroi. and we can still hear its echo in the Odyssey. the best. responding to the enigma that Homer himself named “Helen. in fact. a vain. “Was there ever a real Helen?” The question may be naive. Helen is spared punishment. the island in the Black Sea where Achilles was honored in cult after his death. and Hector. retold from generation to generation. In the version given to us in the Odyssey (4. Menelaus will be transported to the Islands of the Blest. to the very skies. young hotspur of the royal house like Paris. whether for history or for literature. she will be given. and even death. where we may infer that he and Helen will be united for all eternity. according to the syntax peculiar to the Homeric epic.4 Even in death Helen’s state was undecided—whether she remained with her husband or rejoined her brothers. images. She is the fairest of the Achaeans. spiritual union on Leuke. Helen is fated to spend eternity in a state of grace.” we venture beyond the simple historical question that might be asked of Homer’s other characters. is the focus for the deepest existential anxiety. Achilles. extravagant being of the gods. Until the death of Patroklos . As if to mark their privilege in his own way. Heroes can only approximate the gods. Homer makes Helen and Achilles his two surrogates. Homer stations Achilles as his one seer in the Greek camp. Achilles is a hollow shell with perhaps potential. may come to perceive that he will one day be no more than a story. Helen is banished too. “the best of the Achaeans”—as athlete. watching his brief life unravel. and Helen. Irony comes late to Achilles. in the bedroom at the heart of the Trojan affair. Helen. relying on hearsay (“the Muses”). their being bordering Being itself. as they watch their own being drained from them to render them into icons for posterity.8 Whatever Achilles’ existential doubts when he is banished from the field of glory. Helen and Achilles stand on the pinnacle of good fortune. but Helen was born to it. but to her own room. his other. though this they do heroically. they are not themselves the archetypes but only their icons in human form. seers and poets. which is his internalized representation of the code of honor. but no actual. to hide her shame. Achilles would serve as the icon of glory. by which she means a byword for generations to come. horseman. from the arena where a hero’s honor is established. But privilege in myth is double-edged. Sequestered.7 Idled at the ships.36 Norman Austin is the most beautiful and the best in the masculine form. at least in their eyes? Both Helen and Achilles. being herself the cause of their grief. situated exactly where mortality grazes immortality.6 But seen through Homer’s eyes. slight as it is. Placing the two at the vortex of the storm. Helen perhaps plumbs the ontological abyss more deeply when she wonders (to Hector.357–58) whether the gods designed her life with Paris specifically that she and Paris might be a theme for singers. are thus marginalized and made to observe the action from the spectator’s seat. Seen by their peers. To diagram honor and shame in their culture. Achilles. secluded not only from the men but from the grieving wives and widows. so heroically in Helen’s case that she is destined to enjoy a paradise that is a simulacrum of Olympus itself. and Helen as the icon of shame. and warrior—is banished by his pride. but such a realization is far from his mind when he is rampant in the heat of success. Homer forthwith removes them to the periphery. the gap between their being and the full. Far removed in time from the plains of Troy. Born of the archetypes (the gods). the most beautiful and best in a woman’s form. how could Helen join the other women in their mourning. each learns to sublimate life into art. significance. Achilles never hazards the possibility that the sole reason for his life was that he should figure in someone else’s story. at Iliad 6. Whether compassionate or not. to borrow Parmenides’ eloquent phrase. Paris strikes a noble attitude to recoup his (and Hector’s) honor. in the bedroom. of course. her past and her present husband. we will witness the true end and function of the duel. by Hector’s insults to his manhood. But Paris. learn to convert (or subvert) the stuff of her daily life into her function as the glyph for “shame/ shamelessness” in the storybook of the tribe. The two armies have marched forth. or of Homer. as we do. Menelaus will win the duel.138). normally the messenger of the gods but acting this time without waiting for her instructions. She does not know the mind of Zeus. whatever we may call them—her two lovers. conclusion of the duel—Helen and Paris in bed. at the end of book 3. consistently and from the beginning. He calls for a truce and offers to settle the issue of the war in a duel between himself and Menelaus. whether gloriously or ingloriously. when Iris takes us from the battlefield directly into Helen’s private room.The Helen of the Iliad 37 transformed his story into the “Death of Patroklos. But Iris is naive. but ignominious. Helen is allowed no such illusions. Iris. Why is Helen needed at the city walls? To witness the duel that will decide her status once and for all. The question is more pointed if we have read ahead and know the true. rejoices like a lion sighting his prey. Helen first appears on the European stage in Homer’s Iliad 3. Will one duel between two spearsmen. But then stung. takes the opportunity to fly to Helen’s rooms. between Menelaus and Paris. While some race to fetch old king Priam from his palace to witness the covenant. Aphrodite will steal her darling from the field of shame and put him to bed. The rupture between Achilles and Agamemnon in book I has been glossed over.10 Outside the bedroom Pandaros will objectify the disgrace in a . but we are not Helen.” Achilles could still live in the illusion that the story was his own to shape as he chose. by default.9 At once we are in the forest of ambiguity. sighting Paris in the Trojan lines. On the field the duel will end in Paris’ disgrace. Heralds are dispatched to the city and to the ships to fetch the sacrificial animals to secure the covenant. will be fascinated. Menelaus.” Iris explains to Helen (3. her husband and her lover. however noble. who is. on first sight of Menelaus shrinks back into the Trojan ranks. really settle the issue that a protracted war between two great armies has only exacerbated? “You will be declared the beloved wife of the victor. Only she must. to lure her out to the city walls. her two husbands. but then. beautiful in his leopard skin. for the moment at least. But why should Helen witness the duel? We. Only Helen is compelled to read her own life as a ghost story. when Helen capitulates and joins Paris in his disgrace. short on substance. the audience. ready for war again. as the Iliad presents him. where Helen will comfort him for his lack of manhood on the battlefield. certainly not at least after Iliad 3. Her function is to be proudly displayed by the Trojans from the tower. if she is to appear credible. The war will resume. Helen must be both woman-as-sign and woman. is not to be netted in human signifiers. the goddess. whom his brother Hector calls a travesty of manhood (and Paris cheerfully agrees. as the prize worthy of such a contest. As Deianeira watches Herakles wrestling with Achelous. even when they stage a contest secured by oaths sworn in the presence of the upper and nether gods. which signifies the disgrace that attends upon undecidedness. Helen. because Aphrodite. she must also equivocate. but more important she must be observed. Helen’s part in the story is to stand witness to her own value as the prize in a contest of such heroic dimensions. If Helen is required as witness to the covenant between the Greeks and Trojans. Helen is asked to witness instead that her status cannot be decided. the source of desire and its goal. so close to godhood herself. the plot requires also that she be witnessed. Herodotus tells a lovely story of this Helen. Like all signs.38 Norman Austin more public way by shooting an arrow that tears the truce to pieces. Helen must be both the object of desire and its subject. and gazed at by the tormented Greeks. who would want the woman-as-sign? What use is the icon if the god will not dwell therein? Were Helen an icon empty of substance. who was a living witness to Helen’s power to beautify the ugly. and Aphrodite on the other. She may observe. Helen’s prize is Paris. must function as Aphrodite’s sign. the sign would lose all value. To add to the complications. two were particularly remarkable. Why is Helen really needed at the city gates? The answer is obvious.39–66). and Aphrodite’s favors are not bound by the normal social contracts. the peculiar fortunes of his mother.11 Of the stories told of Demaratos. with herself as the prize. and everything will be as it was before the duel. the other. Men cannot agree on her meaning. who grew up to become the mother of the Spartan king Demaratos. beautifying an ugly child. One concerned the marriage of his parents. the more equivocal its meanings: that is in the nature of the sign. . Helen’s status remains as it was—undecided—except that for the moment she is to be found in Paris’ bed. In the story spun for her by the gods. the archetype of which Helen is the human copy. person and impersonation. For a clearer vision of Helen as the Subject we could turn to the local cult of Helen at Sparta. Far from witnessing the decision to clarify her status. But the two cases are not symmetrical. Without the woman herself. at 3. at the same time. The greater the sign. Helen must be equivocal. To fulfill this function she must not only appear equivocal. Behind the human contests are ranged three contestants on Olympus—Hera and Athena on one side. At least Herakles had the blood of Zeus in his veins. and Ariston’s third wife. Though known in her maturity as the most . notwithstanding his protests that she had not been included in the agreement. whatever it might be. And so it did.” here as in the Iliad. is immediately problematic. the damage had been done. In years to come. he counted the months on his fingers and concluded that Agetos might be the father. trickery. Demaratos. one of the kings of Sparta. a marriage is annulled. The agreement was secured under oath. we could surmise that Demaratos would have an equivocal history.13 The second plot concerns the mother of Demaratos. “The best. He persuaded his friend to make an agreement of exchange. Undaunted. the man who wins the “most beautiful” woman (kallistê) is himself named “the best” (Ariston).12 To make the story truly Iliadic. and to Ariston’s good friend Agetos. the anonymous beauty. This story is the Iliad repeated in compact. as he was seated in council with the ephors. was already married. But where the libido is concerned (or where there are dynastic considerations). in which each would hand over to the other that one thing. When Ariston was brought the news of his son’s birth.The Helen of the Iliad 39 The first story tells of the parents of Demaratos and the clouded circumstances of his birth. welcomed at his birth. Ariston refused to acknowledge the child as his legitimate son. abuse of friendship (the typical gifts of Aphrodite)—comports poorly with his name. liberties are allowed. “prayed for by the people” but disinherited by his own father. But by then it was too late. Ariston’s behavior—deceit. Herodotus plays out the problematics of the story at some length. winning the most beautiful woman does not guarantee a man happiness. We already know the end of the story. Given his heritage. He then took a fancy (an erotic itch. The trusting Agetos lost his wife. Ariston. however. local form: two men. was still without heirs after two marriages. She. whom the people called Demaratos (Prayed for by the People). As in the Iliad. the woman is exchanged. The gods were kind. when Demaratos. Ariston promptly divorced his barren second wife and took as his wife the woman who was remembered as the most beautiful of Spartan women. would grow up to become the king. now the queen. whose story is even more striking than his. in Herodotus) for the woman who was considered the most beautiful of Spartan women. since Ariston was a much-loved king. who is already married to one of them. produced an heir at last. But no story in Herodotus is complete without its blind curve. compete for the most beautiful woman. Ariston regretted his early suspicions. grew to be exactly the son Ariston had prayed for. though his means are foul. no doubt in token of their friendship. which his friend desired. friends. Ariston conceived a clever plan. A friendship is betrayed. The marriage of the best man and the most beautiful woman should have produced the best of heirs. Herodotus concludes. This story points on the literal level to the idol of Helen—her agalma—in her shrine. yet deigning to inhabit it on occasion. The terms of the mythologem are kalos (beautiful). and the ugly baby was exposed to the stranger’s view. the ugliest). but she would not show it. and another girl becomes Helen’s latest idol and idolater. made it her daily practice to take the baby to Helen’s shrine at Therapne. Beauty herself. of course. But myth and mythologem together reveal how deeply mythopoeic thinking permeated ancient Greece into the historical period. our guide to the shrines and monuments of ancient Sparta. across the Eurotas River. Centuries after Herodotus. but the beauty of the story is Helen. When gods deign to visit their shrines. with its superlative aristos (best). and concentrating on the second plot (Helen as the source of beauty). and beseech the goddess to change the baby’s “misshapenness” (dusmorphia). . Her nurse. and. The strange woman persisted. Herodotus. aiskhistos (most disgraceful. a suburb of Sparta. gives us the myth. the parents’ prudish injunction was forgotten. the baby’s appearance changed for the better. She would carry the baby heavily swathed. in love with the particular. that was strictly forbidden. at the other end of the scale a single term. sympathetic to the distress of her parents at having a baby so ill formed (for they were prosperous people. with its superlative. Helen’s miraculous power to beautify the ugly was no doubt more germane to his tour of the Spartan temples and shrines. who is not the idol but the source of all beauty. taking on human form and playing the visitor at her own temple. The stranger (Helen. disgraceful. tells the same story in an abbreviated version.40 Norman Austin beautiful of Spartan women. leaving out the first plot (the contest between the two men for the most beautiful woman). being under strict instructions from the parents to let no one see their disgrace. One day. aiskhros (cause for reproach. The ugly is changed into the beautiful. when a devotee reaches her heart. the mother of Demaratos had been born the ugliest of babies. At length the nurse confessed it was a baby. the nurse’s opposition melted (as whose would not?). the nurse encountered a woman who inquired about the bundle in the nurse’s arms. agathos (good). Pausanias. From that day. ugly) and its superlative. Herodotus adds). we expect miracles. as she was leaving the shrine with the unsightly child heavily shawled against prying eyes. kallistos (most beautiful). Pausanias diagrams the mythologem even more sharply. Her practice was to place the baby at the foot of the cult statue (the agalma—Helen’s idol). far transcending her idol. in a cameo appearance) then stroked the baby’s head and said she would become “the most beautiful” (kallistê) of Spartan women.14 In paring down the tale to a bare summary. where the libido is declared victorious over honor? . Through Helen’s intervention the ugliest of babies became the most beautiful of women. where men fight for their meaning. while transcending. the beautiful was good. Beauty. the honor culture of archaic Greece. Lured to witness the spectacle from the city tower. yet she is also the woman who brings men into disgrace. the signifier of a beauty won at the cost of honor. The boy. Once in the field of the signifiers. transcends both ugliness and disgrace. who was “prayed for by the people. over which Helen presides. Helen. To quote Isocrates: “Of the things that lack beauty we will find not one that is loved and cherished [agapômenon]. by virtue of her beauty. But who would forget the following scene in the bedroom. she was in time married to the best of men (Ariston). and at the other pole a single term will suffice as the common antonym. but even this disgrace is turned to glory. But in the Iliad the force that transforms the ugly into the beautiful is death. where signifiers dissolve into the Subject. The Helen of our Iliad seems to recognize the chilling aspects of such equivocal power. disgrace and the ugly being synonymous. being herself the signifier of beauty and therefore delineating. we have a single story that is dominated from beginning to end by Helen’s awesome and equivocal power. though even in Herodotus Helen’s power is far from benign. when she uses terms and formulas to represent herself as someone in whose presence people shiver. as it is in the Iliad.17 The duel between Menelaus and Paris is inconsequential. with cold Stygian fear. shame. except for the image of Paris prancing on the field in his leopard skin and then snatched from death by the sweetly smiling Aphrodite. is then disinherited by his father for—ironically—his questionable paternity. Her son. there is no access to the luxury of Being.]”15 Putting the two stories together. the disgrace of her infancy was transformed into her undying glory. as told by the two authors.The Helen of the Iliad 41 The axis of the mythologem is shame. more correctly. The final touch of shame is added when Demaratos learns that his father was the donkey boy. though the circumstances of the marriage bring her again into disrepute. except through death. who would not have been born had she not been beautified by Helen in her infancy. Thus transformed.16 Stories of this power may be charming when told by Herodotus.” is the shadow that haunts the woman’s fame. and ugliness a disgrace. but all are despised except those that partake of this form [namely. At one pole is the cluster of synonyms for the good and the beautiful. In the shame or. Helen will discover (as if she did not already know) that of spectacles she is the spectacle. since “donkey boy” here is a code for a god in disguise. Hers is the power to transform disgrace into the beautiful. singer and weaver— Achilles and Helen are two impersonations of the poet. in contest with other men. as we assume Achilles’ heroes are. where Homer’s art is at once most simple and most profoundly suggestive. to impersonate such a goddess. on the one hand. in book 9. alone in her room. she will be returned. Achilles will yet assimilate himself to the mighty heroes of earlier generations.” Lyre and loom. on which she weaves (or embroiders?) the “many contests that the horse-taming Trojans and the bronze-chitoned Achaeans were suffering for her sake in deadly war” (3. Eros. since the glory. Achilles is at one remove from the center of his song. Andromache’s) lyre. where heroes gathered as a woman’s suitors and competed for the woman-as-prize. Aethloi. The image. Aphrodite.20 It calls to mind the later scene.19 The libido precedes all stories. Helen. knows nothing of shame cultures. both his childhood education into manhood and his adult ideal. rather than using a more specifically military term. like the celebrated Olympian Games. transmuting nature into art. Achilles’ songs of valor console him for his occluded glory. but they are also an incantation of the victor’s crown. or radiance that men win (their kleos) can be won only in the field of action. after witnessing her lover’s disgrace on the battlefield. to the bed of the man without shame. are “contests for a prize. Instead. Helen’s Olympian protector.21 For Achilles. . is an unforgettable image. Helen. Her tapestry tells of men’s valor too. but the deeds she commemorates are those waged for her sake. which Athena promises him in book 1. His glory eclipsed for the moment. Being into Meaning. Clader notes. to her own greater shame. has justly prompted much discussion. Homer calls the tableaux on Helen’s tapestry aethloi (contests).18 Her birth preceded the age of shame. The figures of her tapestry are not of the past. Helen.125–28). one of the four prime elements or principles. as Linda L. “men’s deeds of valor” (klea andriôn) are his paideia. On the loom is her crimson tapestry. singing “the famous deeds of men. Her theme is the Trojan War and its subject (or object). on the other. must learn to dispense with shame. but Helen is inevitably at the center.”22 Such contests in archaic Greek tradition lead in two directions: to athletic contests. weaving her silent record of the war that rages all around her. Achilles is excluded from the contest. and to bride competitions. like his father Peleus or his great ancestor Aiakos. in Hesiod’s cosmology. which is also her disgrace. or in her name. They are the very men fighting to the death on the fields below the city walls. fame. when Agamemnon’s ambassadors come upon Achilles at his (or rather. though as shame cultures developed the mythic mind would fabricate stories to compress Aphrodite into the confines of the developing social codes.42 Norman Austin Helen will not be declared the legitimate wife of the man who wins the duel by honorable means. is self-generated. in fact.24 Helen’s privilege is to signify for men that zone where quotidian being borders Being itself. Here. where the heroes gathered from all over Greece to compete as her suitors. Megakles. Agamemnon acted on behalf of his . Hippodameia. as Herodotus says. an Athenian distinguished for his wealth and looks. disgraced himself by dancing upside down on the dinner table. was declared the winner. the winner was the man who did not. Bride competitions continued into historical times. is a variant on the same theme. to win immortality. Helen. announcing a public competition for the hand of his daughter. the other Athenian contestant. and misinterpretation is death. Penelope. the Dioskouroi (the “sons of Zeus” rescuing “the daughter of Zeus”). the nature of this immortality and how it is to be granted remain mysterious. and feckless Hippokleides drops from view. On the final night the suitors competed in contests of music and after-dinner oratory. who tells us of Kleisthenes. Deianeira. was one of the two finalists. Hippokleides lost the competition—all honors garnered in a full year of competitions were turned to shame by a single indiscretion—but he was too far gone to care. where all meanings are in perpetual dispute. When Helen reached marriageable age. compete. held the contest in Sparta. Even Herakles. waving his legs in the air and exposing what should not be exposed (what in Greek were called ta aiskhra. tyrant of Sikyon. having acquitted himself with honor both in the gymnasium and at the table. From his marriage to Agariste was born the celebrated Kleisthenes. her (human) father.25 In her childhood she was seized by Theseus. for example). recording her own as the common paradigm shared by all other women. indeed Helen herself.The Helen of the Iliad 43 Athletic contests were held for a variety of reasons besides bride competition (to honor the death of a local hero. to discover “the best” man (aristos) in Greece for his son-in-law. and certainly not to the prospective fatherin-law. Hippokleides. from whom she was rescued by her brothers. Agariste (Best Woman by Far). oddly. If to win Helen is. under the convivial effects of the drink. alas. if we are to believe Herodotus. wrestling Thanatos (Death) to retrieve Alkestis from the dead.23 A certain Hippokleides. the fifty daughters of Danaos. The Helen myth is a story of bride competition repeated again and again. of course. The Iliad is bride competition told in epic fullness. Helen weaves on her tapestry all such bride competitions. But Greek myth curiously preserves several stories of women won through bride competition—Thetis. Tyndareus. Helen’s tapestry. and. as Clader notes. if she is to be true to her own story. But Helen’s bride contest is significantly different from all other contests in that the competition in her case is perpetually renewed and perpetually undecided. must portray indecisiveness. “the disgraceful parts”). wishing. through the marriage bed. is beside the point. which. or for women’s perusal either. though a sufficient motive to draw Helen from her room. as it serves Priam on the city walls. Iris. alas. except as the prize. a weaver of stories. observe. while Menelaus stayed at home. Helen. becomes. Helen.27 She has special gifts for this part. and Helen’s two husbands at the center. by witnessing the contest. Helen is a participant all the same.44 Norman Austin brother Menelaus. Now her contradictions will be blazoned forth for all to see. and her parents” (3. hurries from her seclusion to witness the contest for her significance. Being already married to Helen’s sister Klytaimestra. to ratify it in her unique and mysterious way. But Helen’s sweet yearning. had aroused in Helen a “sweet yearning for her former husband. except Paris and her own slaves? The woman’s view is not solicited in the contests that Helen represents in her tableaux. woven in solitude and privacy—who would ever visit Helen’s rooms. but she must keep her silence.139–40). becalmed except when she is needed for her public function as the spectacle. prepared to duel to the death. But perhaps not. and Troy and its allies on the other. Homer’s eyewitness at the center of the action. being intimately related. Perhaps it was never intended for men’s perusal. always compliant to any tug on her emotions. to validate herself. Helen’s tapestry may hang in a king’s halls to entertain the king and his barons. A local conflict has been globalized.26 Now. cementing the diplomatic (and military) alliance between the two great Mycenean houses. and therefore hors de combat. perhaps. only marks Helen’s impotence. It is no longer a rivalry between the Greek tribal chieftains but has become an issue between Greece and its allies on one side. to be the poet’s poet. indeed must. since the contestants are not simply the Greeks and the Trojans. Yet such privilege. Her tapestry is a woman’s composition. they have become signifiers warring in the field of Meaning for the Subject. the house of Atreus and the house of Tyndareus. Her second is. One day. Helen’s stereoscopic vision will serve Homer well. since Helen was even more alienated from women than from men. Agamemnon acted as the proper go-between. Helen’s first function is to be the sign that will guarantee either happiness or immortality or both. Helen may. like Homer. painting the stirring scene of the armies marshaled on the field. to both contestants. Her personal investment is . despite all the oaths sworn by the contestants to honor the marriage of Menelaus and Helen. her city. Excluded from the decision-making process. the contest for the bride has been reopened. being uniquely both Greek and Trojan. and therefore her value as sign. is never to be found in the field of Meaning but only in the arcane recesses of Being. assuming the war ends and peace returns. ” they say. though past the age of indiscretion themselves. can allow for the hormonal storm that would precipitate war among the younger men for such an emblem: “for she looks terribly like the deathless goddesses”.156–60). The old men’s response to Helen epitomizes her ambiguity. not the spectator but the protagonist on the most public of all stages. once outside her own private space. Helen is nemesis. More pointedly. but even so. who awes the beholder into believing himself a witness to a god’s epiphany. the equation will not compute without Helen’s libido included. with the old men of the city.130). using the word nemesis.The Helen of the Iliad 45 not germane to such mathematics. If Helen is to impersonate Aphrodite. there is no cause for blame. she must play a woman of unbridled passion. as her tragic chorus. which pour forth their lily voices. When Iris calls Helen “dear bride” (numpha. Homer adds (at 3. the elders. the formula is for our benefit as much as it is for Helen’s. There is neither shame nor blame when men war for the hidden Subject to which all signs refer. “let her sail home in the ships so that she may not be left here as a woe to us and our children hereafter” (3.29 The old men are good speakers. is a thin disguise. The status of the city elders is ambiguous. “It is no disgrace that the Greeks and the Trojans suffer long evils for such a woman. Why else was Helen posted to the city gates if not to be seen? Helen’s voyeurism.” Dry husks they may . or the play would have no meaning. Yet. a dispassionate Helen would lose all value. the strongest term in Homer’s shame culture for “blame. finds herself. when the object is Helen. But the elders of Troy could not be more mistaken. buzzing like cicadas. since unbridled passion is precisely Aphrodite’s nature. to which Iris appeals in erotic excitement.150–52).”28 The Trojan War is no cause for shame on either side. Seeing Helen. as if everything to do with Helen falls into indeterminacy. It must be occluded in favor of Helen’s meaning. “like the cicadas in the leaves. They are no longer the strong warriors of the city but the speakers (agorêtai. and no reason to fear retribution. in the role reversal characteristic of her. such is Helen’s paradox. Helen. We are the audience impatient to witness the duel for a bride whose beauty overrides shame. they are removed from the field of action where men determine significance. “those who speak in the assembly”). Who would Helen be without her libido? At the Scaean Gates. thinking their war over Helen was free of nemesis. which others will decide. Like Helen. Helen must be the dispassionate spectator. So much we should have inferred when Iris captivated Helen’s emotions and drew her to the public stage. they say. If Helen is to be the object of men’s desire. at 3. We are the voyeurs. grievous war against us from the Achaeans. by convention Helen has become Priam’s daughter. as if war were in the far distance. Wisdom will not prevail over youthful ambition in this contest. Greek and Trojan. however. both are cast as spectators. Face-to-face with Helen’s compelling significance. from sheer custom. address Helen as he might address Andromache or any other of his daughters-in-law but Helen? Priam interrupts his own train of thought. for consenting to go to their death when the prize is of such daimonic significance. But specifically they absolve the men on the field. the elders. of course. so like and unlike father and daughter. Has Priam. Priam breaks in on the elders’ murmuring to call Helen to his side. alas. though the spectacle in this case is their lives. with all passion and substance transmuted into voice. But Priam is not of their persuasion. given its cost. It is a formula.164–65): “To me. And rightly so. and Helen. When old men’s words fail. reverses the equation and absolves Helen. but it is still the liquid. and sit here by me so you may see your former husband. reverses herself again. in fact. you are not the cause. as if inadvertently. your people.” The Trojan elders give a general absolution to both sides. chameleonlike. transcending words. from spectacle to spectator (3. but not through old men’s diplomacy. to be passed from one supervisory male to another as the rules dictate. She is. for the war. decorous in all her . Helen. old men are no more than voice. the eldest of the elders. he calls Helen to witness the great spectacle of men fighting to their death to calibrate the cost of beauty. the warriors on both sides. who can still believe that trial by arms can reach a meaning where words cannot. but words too fail. Priam and Helen.46 Norman Austin be. is truly terrible. dear child. fallen under Helen’s spell that he would. her biological family and her in-laws. as he has become her father. Helen by her sex). much as if they were at an entertainment. Priam’s counselors would do without the sign altogether.30 Theirs is the guiding voice of the city. standing in for Helen’s father. Helen will one day be returned to Greece. formalized into an afternoon’s athletic contest. the contest will be returned to the young warriors. Bewitched by both the woman and the war.161–63): “Come. but a child in the social order. and your friends. But. like cicadas. They chat like father and daughter. Priam asks his daughter-in-law to identify the enemy (Helen’s onetime family and people). the rivalry between a woman’s two clans. fragrant voice of experience. They make an odd couple. Helpless to influence the action (Priam disqualified by age. Helen. who have roused this long. The gods I hold responsible. now she is an old man’s child.” Dear child? A moment earlier Helen was a virtual goddess. Priam. But around Helen even mundane formulas resonate. before that she was a bride. as if to gloss his indiscreet show of affection (3. the elders have only words. “before I followed your son hither. and my friends of my youth.173–76): “Would that death had come on me. with Priam standing in for her father—Helen. where she is seen to chat amicably with him. if we had noticed an absence. but for her keener sight. defending their family honor as Agamemnon defends his brother’s honor. now that our attention has been drawn to them. though enemies in Priam’s—as if she were reading the program notes to an aged father with failing eyesight.” she replies to Priam’s graceful invitation. the hostage turns her knowledge to her captor’s use. If Achilles. They had rescued Helen when she was captured by Theseus. and I waste away in grief.33 Her grief and shame pass unnoticed. as a daughter would. since beauty sets the rules. and to her function as the woman with no shame. was “the daughter of Zeus. leaving my own room. is never allowed to forget that she is the real spectacle (3. But Helen. Depending on the point of view. irrelevant both to the contest on the field below for the fairest and the best. We would expect to find them. what motivation could have kept Helen’s own brothers from the field? Greek myth and tradition credited the Twin Riders.” But Helen’s shame is her private affair. finds her brothers. the Dioskouroi. overtly the prize but implicitly the judge. Concluding her roll call of the Achaean heroes—its subtext being the list of her own suitors. Where were they now? They were. lends Priam her eyes. Castor and Pollux. like Priam’s. Helen obliges.31 But Helen is more than a military scout. while her ransom is being arranged on the field below. in the Cypria). is drawn to the warriors on the field.32 Putting her own investment aside. serving as Priam’s eyes. discovers an absence that. in the front lines. and as if this were a holiday at the races. “the sons of Zeus” (dios kouroi). my child. Ajax. their sister.”34 Why did they not race to their sister’s rescue. for example. In cult they were known as sôtêres (saviors).The Helen of the Iliad 47 functions. however graciously. would have been overlooked. my people. As the daughter of Nemesis (as she is represented. and Helen. as they had in the past? Helen assumes the worst: her . scanning the field. Our attention. Helen obediently reads off the roll call of the enemy—friends in her eyes. she is either a hostage or a wanton fugitive from the Greek side. after all. it would have been the absence of Achilles. In either case she is a captive. Priam’s gaze is fixed on the majesty of Agamemnon and the magnificence of the bronze-chitoned Achaeans. and Odysseus were prepared to fight for Helen to the death. nowhere to be seen. The plot is transparent: the hostage sits in the commander’s box. and gracefully submits to being his military aide. The point is made. with miraculous rescues both on land and at sea. But that was not to be. Helen must be completely dispassionate. But Helen. when Aphrodite abandons her crone persona and.” Love? Words take on manifold meanings where Helen is concerned. sallies forth to lure Helen to her next assignment. Helen will survive. Iris was lubricious too.350–51). tugging at Helen’s sleeve. possessing the queen of the world. but it is an empty word in Aphrodite’s cosmology. Helen displaces onto Paris the anger that she is forbidden to direct toward Aphrodite. but that is less important than Helen’s reminder that the spectacle to which she has been so gracefully invited. and Helen’s sarcasm has no effect. is to expose all social convention as so much flotsam in the tide of the libido. threatens to withdraw her love if Helen disobeys (at 3. Shame may govern families and order cities. as Aphrodite’s favorites do. Paris awaits Helen in full sexual arousal.48 Norman Austin brothers. Rescued and restored. while Helen must both live with her shame and accept her function as the spectacle of shamelessness. but useless. revealing her true being. Helen may continue to enjoy Aphrodite’s charisma. What better illustration of the extravagance of the libido than the sight of Helen. with Paris freshly bathed and perfumed and safely to bed. He is all sexual arousal.414–17): “I may come to hate you as greatly as now I love you.37 On the contrary. Helen’s contempt for Aphrodite is magnificent. Helen’s sarcasm is an arrow that reaches only its archer. Paris revels in his luxury. But Paris is impervious to shame. provided she subsume her personal being within her broader public function.35 Helen’s shame deepens when Aphrodite herself. or lack of it. coaxing Helen into Paris’ bed. indulging the sexual fantasies of a boy who has never outgrown infantile narcissism? .36 Commanded by Aphrodite to forgo her shame. is taboo. playing the fairy godmother. by Iris first on the divine plane. who. is the spectacle of her own shame. kinsmen and dauntless warriors though they be. which. though she veiled her voyeurism under the rubric of “contests”—who does not want to see a contest. But Paris is no more accessible as a target than Aphrodite. since only she knows shame: “Would that I had married a man who knew the meaning of nemesis and shame.” Helen will later say to Hector (6. especially a contest for love? And what bride would not want to witness her own bridal competition? But now the libido is undisguised. Her assumption is incorrect. did not dare show themselves on the battlefield for shame (3. for whom grown men die.326–42). in her case. and then by Priam on the human plane. unless perhaps to stimulate his erotic imagination. Playing the familiar old crone of romance. provided she accept Aphrodite’s terms. that her honor be compromised. Aphrodite is all breathless lubricity. as a god. which of things that exist is the most venerated. 5. 109.e. and most godly. where Thetis is “best of the Nereids.” For one extended conversation in antiquity regarding the good. most honored. Beauty for Isocrates is next to Being. and Helen’s fur-lined slippers at Iapygia when he was roaming the Mediterranean in search of the lost Helen after the fall of Troy. While alluding to.11. A point made by Bassi (1993. the hero was blest himself with the perquisites of the gods (i. where they became the tutelary spirits of their respective islands. Homer’s other heroes must hope to find their immortality through their kleos— their fame as it was transmitted through the epic tradition.” culture would be more in alignment with its own orientation. on kalon and aiskhron as significant terms in the shame culture of ancient Greece. also Alcaeus 42. “Blest” here refers to the hero whose cult was maintained on the island. his shield.” Cf.” “Things that exist” (ta onta) was. see Roscher. 1: 1950.. also Isocrates Encomium on Helen 54: Helen “possessed the greatest share of beauty [kallos]. As the daimon of the island. the devotion of his worshipers) and blessed his devotees in return for their devotion. in Isocrates’ day. cf. however. To call ancient Greece an “honor. 542 PMG. The distinction between local cult traditions and the tradition of the epic. See Dodds 1951. 4.11 LP. The hero cult on the island was testimony to the islanders’ descent from the true Myceneans. These were collectively the Islands of the Blest. cf. only Menelaus reaches the state granted to the heroes in the religious cults. or echoing. to escape death and reach the closest approximation to Being in the Elysian Fields. the cults of the various Greek heroes included in the Trojan expedition. for example—were claimed as the local daimon of several separate locations. 154–58. . see Nagy 1979. the beautiful. “Helen’s Sandal” was a shrine in Sparta where the sandal that Helen lost in her flight from Sparta was venerated. the conventional philosophical term for Being itself. 1990b). Many were thought to have reached islands somewhere far at sea (whether in the Black Sea in the far northeast. or in the Atlantic in the far west). 2. Pausanias 3. Some heroes—Diomedes. Of Homer’s heroes. is extremely significant in any treatment of Helen in ancient myth. see Simonides. where Iris takes the form of Laodike. and Plato’s commentary on the poem at Protagoras 339a–346d. For the place of beauty in the archaic pantheon. For the supreme significance of aristos (the best) in the Iliad. In the tradition outside the Homeric texts the major heroes of the Trojan expedition have passed through the mortal state to a quasi-divine state. After death the best that they can expect is to fade into ghosts or eidola.19. have no such consolation to look forward to. perpetuated by bardic memory.” rather than a “shame. frag. the Homeric poems lay a trail of their own. as his compensation for being the husband of Helen. 26 n. 3. and the ugly. 185–89. who “of the daughters of Priam was best in physical form” (eidos aristê). Homer’s heroes. The distribution of the hero cults throughout the Mediterranean suggests that on the historical level the cults on the various islands probably represent traditions that the Myceneans carried with them in the diaspora after the fall of Mycenae. Cairns 1993. But apparently at Iapygia in southern Italy there was another shrine where other sandals of Helen’s were venerated: cf. if not Being itself. which Nagy emphasizes (1979. For kallistos and aristos as synonymous in Homer. who calls Eros “the most beautiful [kallistos] among the deathless gods.The Helen of the Iliad 49 NOTES 1.124. also Adkins 1960. Hesiod (Theogony 120). see Iliad 3. the story told by Lycophron (Alexandra 852–55) of Menelaus dedicating a krater. 60). mere images or shadows of themselves. 30). 204. 18ff. 43 n. 58–63 MW. in effect. 335–36) discusses the mule theme. frag. neither Ariston nor Agetos was. 41–62. as a zone of intense friction between quotidian being and Being. where signifiers shade into what they signify.61. aristos Akhaiôn (best of the Achaeans) is a regular formula in the Iliad. Theogony 120. who turns out to be either the donkey boy (in the local gossip) or (in his mother’s version) the god of the stable.” 11. “donkey boy”) as his father was pure gossip.68. esp. In myth. the father of Demaratos. 10. must compose a second section of his poem to explain the apparent space between the two.7. deadly” nature (stugeros. Cf.].” See his pp. 43 n. 30) observes that while Aphrodite’s beneficiaries (Paris and Aeneas) “escape destruction and survive the Iliad. In this version Aphrodite was born . while denying the possibility of an interval between Being and Being. My view is that literacy contributes significantly to increasing guilt and devaluing shame. for the pattern of the Helen myth in the story of Demaratos. Note the words of reproach that Helen uses of herself. Slatkin (1991. has been permanently compromised. As we might have predicted. which is Being itself. For Helen as spectacle. as it was used by Demaratos’ opponents to disparage his pedigree. see Havelock 1963. 188–89. The true father was the stable boy. but probably both guilt and shame are to be found to some degree in every culture. their individual heroism. the heroes illuminate that same apparent space.e. The Iliad comes full circle: the most beautiful woman “chooses” not the best of men but the likeness of the best. she explained that the story of the “stable boy” (onophorbos. pp. 13. taking on the form of her husband. see Herodotus 1. 7. Wherefore the all adheres. the point made by Slatkin (1991. Hesiod Catalogue of Women. 16. Ong 1982. the king Ariston. When Demaratos pleaded with his mother to tell him the true story of his birth. But no hard line can be drawn between the two. 191–97 for many apt remarks on the ensuing scenes in book 3.” 18. cf. Encomium on Helen 54. Frag.4–5 KR: “For all is full of Being. Astrabakos. that Aphrodite’s effect is to compromise those whom she protects. For the enormous influence of literacy in reshaping thought and culture. 15. who applies to classical Greek thought the distinction drawn by anthropologists between shame and guilt cultures. 12. 8. Styx. At 173ff.. she further explained. as gods are wont to do. Svenbro 1988. Edwards 1987. 9. Nagy (1990b. a second explanation for the origin of desire. 14. 2. Pausanias 3. Readers learn to internalize what in nonliterate cultures is played out on the highly public stage. 6. And Being borders Being [eon gar eonti pelazei. it turned out. 17. on Helen’s character as revealed through epic diction. 19. had visited her in disguise. See Boedeker 1987. Hesiod recounts the myth of the castration of Ouranos as. where the poet describes Idomeneus coming in person from Crete to Helen’s bride contest “so that he might see Argive Helen for himself and not only hear from others the mythos that had already spread throughout the land. and others more guilt-oriented.7. See Clader 1976. Cf.” Even Parmenides. cf. His real father was the cult hero Astrabakos (He of the Mule Saddle). Some cultures may be more shame-oriented. 348.50 Norman Austin 6. and Clader’s discussion. See Burkert 1965 for more on the strange hero Astrabakos. of those epithets and phrases that allude to Helen’s “hateful. from an epic standpoint. chap. See Dodds (1951). the ice-cold river that puts even gods into a coma). i. 192: “Iris is really the messenger of the poet. since it moves the locus of judgment from the public arena to the private screen of the individual reader. for its significance see Nagy 1979. 20. 1976.101–3. as rivals for Helen’s love.” 24. 21.8 MW.. Cf. undifferentiated libido here divides into two. MW.1–2. 27. see also Kennedy 1986. shakes on her throne.” 28. frags. The scholiast (= Ibycus. where Hera grins through her teeth. and the Erinyes (spirits of revenge) sprouted from the spilled blood. 4. see Clader 1976. where Hera. where she was worshiped as . He cites Iliad 8. 297 PMG) explains that Deiphobos and Idomeneus were deadly enemies.” In a similar way the contest between Penelope’s suitors and Odysseus in the Odyssey replays the original competition for Penelope. Zeitlin 1981.” Cf. with good references to the scholarship on the subject. 1983. but in usage always retribution.6. to call nemesis the fear that attends the violation of shame taboos. “putting aside nemesis and aidôs.12. for the list of Helen’s suitors. 23. see Redfield (1975. 193. and nemesis as objective (retribution). 13.516. On the literary side. see Whitman 1958. On Helen as poet. also Bergren 1983. 73. For curious stories of Penelope’s original courtship. whether human or divine. humans. Extrapolating from these links. and the associative links between woven fabric. as Greek versus Trojan. 197. and 15. See Hesiod. repeats itself in the Iliad at 13. who calls Helen “both author and subject of her work. the Cypria gives us the story of Helen as the offspring of Zeus and Nemesis (see Cypria 7 Allen).. For Helen as weaver and storyteller. Bergren 1979.198–200. 26.” On Achilles as the singer in Iliad 9. 203–6. The goddess has been revised into polar opposites—into the chthonic Furies on one hand. projected as retribution. 1: 59–60).e.126–29. who notes that nemesis is represented as an excited condition. On the Trojan War as Helen’s bride competition. 7. On the associations in ancient Greek between weaving and poetic composition.” would take Helen by force. I would refine the distinction. see Clader (1976. through whom the heroes win their fame (kleos). when Deiphobos hurls his spear at Idomeneus. “and great Olympus trembled”. who are all in some way “disqualified from heroic action. guilt. and cf. 11–12. 7.” In the same entry aidôs is distinguished as subjective (shame). and significant on the religious side was the cult of Nemesis at Rhamnous in Attica.The Helen of the Iliad 51 of the severed genitals (i.” 22. LSJ defines nemesis as “distribution of what is due. and animals. 8). On the frequent association of nemesis and Helen in Greek art. Even the contest between Menelaus and Paris. which is tamed in turn by Zeus. frag. See also Murnaghan 1987. 204–82 MW. on the poets or surrogate poets in the Homeric poems (e. see Pausanias 3.” See also frag.g. 196ff. with sex and life on one side. where Tyndareus exacts the oath from Helen’s suitors that they would exact vengeance on any man who. Bergren (1983. 82). frag. Clader 1976. see Bergren 1983. and the smiling daughter of the celestial father on the other. 6. who discerns two possible influences here. see Clader 1976. See also her discussion of Helen as the prize of the Trojan War. the semen). 29. Note also Herodotus’ explicit statement that Agariste’s suitors were “the best in looks and birth. poetry. and therefore symbolic immortality. 113–16). Bergren reads the marriage of Zeus and the goddess Mêtis (Cunning Intelligence) as a story told to explain “the semiotic power assigned to the female and its (re)appropriation by the male. where Helen’s courtship “aroused the nemesis of the gods. experiencing nemesis. and death on the other. esp. 79: Helen “is both the object of the war and the creator of its emblem. who perceptively notes that Helen “is the female forever abducted but never finally captured. and intelligence (mêtis). righteous anger. On Helen’s tapestry. 25. On nemesis in the Iliad. and shame. See also Bergren 1989 on Aphrodite’s primeval power to tame gods. 79. but her face is not smiling. The primal. 152. Helen and Achilles). see Ghali-Kahil (1955. the connection between Helen and nemesis at Hesiod. frag.334c). The stories told of Zeus pursuing Leda and Nemesis are remarkably similar.v. Stesichorus. is a reminder that the Trojan War is a second contest for the possession of Argive Helen” (10). “Nemesis. when Paris violated the code of honor and abducted Helen from her lawful husband.” We can trace the confluence of these two sources in the epithet Rhamnousian. We should also note that the duel in Iliad 3 replays.” 32. cf. He considers the story “studied and didactic. See also his discussion of Helen and Paris (1987. see Edwards 1980. Clader suggests further that the absence of Menelaus and Achilles from Helen’s roll call of the Achaean heroes at Troy may reflect her original bride contest. then. and thus they consummated their love. Farnell (1921. 223 PMG. On the goddess Nemesis. 30. where he is reported as saying that the men who advanced toward her to stone her “at the sight of Helen dropped their stones to the ground. however. see Stanford 1969. 191–97). 201 PMG. but she gave Helen to Leda to raise. According to further details supplied by later authors. finally changed herself into a goose (a fish in Athenaeus 8. Worth noting also is Stesichorus. by Aphrodite. which the Alexandrian poet Callimachus used of Helen (Hymn to Artemis 232). .52 Norman Austin “The Rhamnousian [Goddess]. On honor and shame in the Iliad. when he sacrificed to the other gods but omitted her from his devotions. Clader 1976. v.” Clader concludes that Helen’s “catalogue of the troops” represents her own bride competition. “Helena II. Clader (1976.” for a sympathetic discussion of Nemesis as Helen’s mother. who makes her the daughter of Nemesis. From their union Nemesis gave birth to an egg (the cosmic egg). Traditionally. Nemesis is given as Helen’s true mother. 9) notes the oddity of Helen as the reader of the roll call: “It is striking that a woman should be the poet of a catalogue of this sort. 3: 117–66. 324) finds no “true mythic tradition” in the story of Helen’s birth given by the poet of the Cypria. 3: 1015. In one story. 102–3. 101 n. who could provide information about his former comrades on the basis of his own material experience. 168ff. archaic cosmogony dating from the mythopoeic age. the original offense. and 1: esp. when all the Greek heroes gathered at Sparta as her suitors: “The Teichoscopeia.” an extrapolation from Helen’s role in epic as the daughter of “divine wrath. on the field of battle. see also Schein 1984. Aphrodite in her anger punished him by making both his daughters promiscuous. where the same two heroes were notably absent. 12. “Nemesis”. 1930–31. that is. see Svenbro (1988. Nemesis. On voices as liquid.” On Nemesis as goddess of vegetation. see Cook 1925. such a scene should be dominated by a member of the opposing side.” In my view. chap. On the men’s “lily voices” and the comparison with the cicadas’ sound. whereupon Zeus did likewise (or chose the swan form). s. and once again honor loses to the libido. suggesting that both were cognates of an older archetype. Beauty herself. Tyndareus. where Helen and Klytaimestra are the punishment visited on their father. On the power of Helen’s eyes. with his citations from Pindar’s odes. 31. On the Teichoscopeia as a traditional catalogue of warriors shaped to its present position. which explicitly connects Leda and Nemesis. rather than of a fiction invented by a sophisticated reader of the Iliad to explain Helen’s role and behavior in the epic. See Lindsay 1974. 39). 73. The contest is restaged. and Helen was thus mistaken for Leda’s daughter. frag. resisting Zeus by changing from one form into another. 149–58. s. 33. see Roscher. with Helen being its focal point. and Helen’s connection with both Nemesis and vegetation. from which in turn Helen emerged. the story as told in the Cypria of the mating of Nemesis (Apportionment) and Zeus has the ring of a genuine. If we can accept the Dioskouroi as cognate forms of the Twin Riders of the Vedic tradition. in Euripides’ Helen. frag. see Roscher. who lists the other major testimony from ancient literature on the subject. and 255–56. Cf. Redfield 1975. also Cook 1925. Cf. 35. In frag. where the Doric presence was strong. Boedeker (1974. they conspicuously are not. Rather. Theseus and Peirithoos associated in the story of Helen’s childhood rape. For Helen’s shame in the epic tradition. 46.11–12. while the masculinity of the other is deeply problematic. which has Diomedes and Ganymede as Helen’s two brothers (the warrior and the effete). he did not make himself he says. “Dioskouroi and Helene in Folk-Tales.” 37. Helen is frequently represented as flanked by two men. Cook (1925. notes that in some instances one of the twins is effeminate. and each alternating with the other. in both the sons of Atreus and the sons of Priam. and are thus rendered superfluous to the plot is attractive. and Page (1955.The Helen of the Iliad 53 34. Farnell (1921. adespota 1027(c) PMG. 36. her two brothers’ twinned destiny: the two alternating between life and death. in connection with other divine twins. this element alone suggests that the Iliadic Helen is a portrait shaped by the epic but drawn from a much wider Helen tradition. 2: 431–40. 93 n. which. Among the double or twin elements are Helen’s two brothers absent from Troy. the Chorus invokes them as “the saviors of Helen” (line 1500). 175–228) is not sympathetic to the theory that the Dioskouroi represent the Greek version of the Twin Riders. 114: “Paris accepts himself as he is. frag. Hesiod. the two sons of Atreus warring to recover her from the two sons of Priam. 35: “Aphrodite is represented as an effeminate and debasing love goddess. they are addressed as kallistoi sôtêres (most beautiful saviors). 265–68).” See also p. but particularly in western Greece (Sicily and Magna Graecia). Agamemnon and Menelaus. the comic version of the Helen story in Petronius Satyricon 59. then the problematic males must define their masculinity vis-à-vis Helen. 113ff.). which would then have to be imported into a large number of Helen’s non-Iliadic myths. 48–53) argues. cf. B2 LP. 1: 1969.” Farnell. the two sisters born from the same egg. and the two mothers. (1921. with the two Dioskouroi as her saviors. 176 MW: “Helen disgraced the bed of Menelaus. The prominence of the twin element in the Helen myth. her suggestion that Helen’s twin brothers have been replaced in the epic tradition by the two Atreidai.” See Redfield 1975. see Alcaeus. in the Iliad. suggests an enigma that is not easily explained as a “fiction” invented by the poet of the Iliad.” . 2: 447ff. We hear the echo of this distinction in Homer. In art. and he cannot be otherwise. for further references. 34) notes that Helen’s reluctance to join Paris “recalls the motif of shame which in epic poetry is frequently attributed to characters under the influence of sexual desire. both in Homer and outside the Homeric texts. but see Nagy 1990b. 175–228) discusses the wide distribution of their cult through Greece. For the poet of the Iliad such an attitude is fundamentally unheroic—because it is unsocialized. as Clader (1976. in discussing the twin theme in myth. In each case the one brother is a mighty warrior. and 1003–19. On the Dioskouroi as heavenly saviors. . Tradition. And surely uncertainties about the text of the Iliad are not to be related to the biography of the poet. p. The reason for this strange speculation by Kirk is that he. appears to have begun from Leaf.M. ©1995 by the Norwegian Institute at Athens.S. II. Leaf was of course an excellent Homerist. Kirk offers the following judgement: “It remains possible that Book 8 was still under refinement at the time of Homer’s retirement or death. WILLCOCK The Importance of Iliad 8 INTRODUCTION ne of the more surprising sentences in Homeric publications in recent years comes at the end of Professor G. Cambridge commentary on the Iliad (now happily completed). six-volume. After discussing some perceived weaknesses in the book. as the previous large-scale commentary in English. but his overall view of the construction of the Iliad is of his day. and has dated badly. like others of the editors of the Cambridge commentary. and his judgement on individual lines and words is always to be considered.” Retirement or death! How could an intelligent and clear-headed scholar write in these terms? What can we possibly know about Homer’s retirement? There was no system of pensions for superannuated bards. M. edited by Øivind Andersen and Matthew Dickie. 55 . Kirk’s introduction to Book 8 (vol. Reality. 294) in the large. It is hardly sensible to begin from old-style analytical arguments about authenticity when we are now over sixty years after Milman Parry’s thesis and over fifty years after Schadewaldt’s O From Homer’s World: Fiction. and that there is (as he puts it) “a rather monotonous interference by Zeus”. has more discussion based on book 8 than on any other book. in the book Die Ilias und ihr Dichter. Influenced by Grote particularly. 68–77: Zeus thunders and throws a thunderbolt in front of the Greeks. Finally. then 8 takes up half of what is left. The great German scholars paid a lot of attention to this book. and presumably to most of ours. He begins with 11. . Reinhardt. who initially intervenes to rescue Nestor. and so could have no knowledge of oral theory. for reasons which we shall soon see. He sees it as composed by a later poet who wished to insert the Embassy of 9 and the Doloneia of 10 into an Iliad which previously went straight from 7 to the beginning of 11. Schadewaldt too. Athene (pro-Greek) protests. put together from thousands of fragments by Professor Hölscher. He spends much time on the lines that recur elsewhere. 53–67: The two armies join battle. His arguments for cross-connections between different parts of the Iliad are to my mind decisive for the question of authorship. Zeus goes to Ida to watch. begins his discussion with book 8. Schadewaldt is thus directly contradicting Leaf and Wilamowitz. objected that a large number of lines here recur in other books. So he agrees with Schadewaldt against the analytical tradition (Leaf and Wilamowitz). Book 8 has indeed come in for quite a lot of criticism. He begins with the statement that 8 is the most indispensable book (das unentbehrlichste Buch) in the epic between 1 and 16. devoting over half his book to discussion arising from it. Leaf went further. There is an even struggle until midday. who had made 8 follow 1 in his original Iliad. with 8 introducing it. However. We should remember that Leaf came before Milman Parry. and that he is the poet of the Iliad. Willcock Iliasstudien. My aim in this paper is twofold: to consider the difficulties perceived in book 8 by analytical scholars. in Die Ilias und Homer. in the light of our modern discussions of oral poetry. 9 (the Embassy). and to discuss the structural reasons for the four days of fighting that articulate the Iliad. as he too has no use for theories based on oral poetry. treats 8 as of central importance. 78–112: All withdraw except Diomedes. that the poet of 8 is the same as the poet of 11. He proves to his own satisfaction. Leaf. and argued that 11 originally followed 1. This he tries to do. in twelve parts: 1–52: Zeus forbids the other gods to interfere. in Iliasstudien. who judged that the only purpose of this book was to motivate the Embassy of 9. Wilamowitz.56 Malcolm M. I describe the contents of this contentious book. when a phrase occurs more than once he assumes that it is the task of the scholar to establish priority between the occurrences. having been ‘intruded’ comparatively late. The Importance of Iliad 8 57 113–129: Diomedes attacks the Trojans. Kirk’s is slightly different. during which he kills Hektor’s replacement charioteer Archeptolemos. Three times Diomedes considers turning round to fight again. that there is “a rather monotonous interference by Zeus”. the Embassy (I leave 10. The Greeks are now defeated. but again suggests monotony. They drive the Greeks back. They return reluctantly to Olympos. 485–565: Night falls. Of course the analysts Leaf and Wilamowitz are right that this defeat of the Greeks is closely connected with book 9. But does anyone now believe that 9 is anything other than an essential and organic part of the poet’s plan? Unless you are going to exclude book 9. (Once again. She tries to persuade Poseidon to join her in open opposition to Zeus. and kills Hektor’s charioteer Eniopeus. with the threat of a thunderbolt. But Zeus sends Iris to stop them. led by Diomedes. Hektor speaks to an assembly of the Trojans. Hektor attacks. then we should begin from the acceptance of the epic virtually as we have it. whether divine or human. Hektor shouts abuse. who camp out on the plain. Teukros the archer has a short aristeia. 212–334: Agamemnon. I remove 10 from the discussion. And certainly there is quite a lot of abandoned and frustrated activity. and threes times Zeus thunders from Ida. so much so that we may wonder if the effect is intended. We heard Leaf ’s objection. then book 8 is necessary. THE F O U R D AY S O F F I G H T I N G If we are not engaged in the old analytical game of deleting parts of the Iliad as spurious. right into their camp. 350–484: Hera now persuades Athene to join her in opposing Zeus. 335–349: Zeus inspires the Trojans again. are soon abandoned or reversed”. to which we shall come. 137–197: Diomedes reluctantly retreats. There is a rally. He refuses. They actually set off by chariot for the battle-field. The brief day is over. You cannot have book 9 without a defeat of the Greeks to motivate it. 198–211: Hera resents the Greek defeat. ready to continue their attack in the morning. urges the Greeks to fight back. 130–136: Zeus throws another thunderbolt in front of Diomedes. Hektor gets his own brother Kebriones to take the reins. and consider what follows from that. Danek has said a great . out of account). And there is another overwhelming reason for that judgement. the Doloneia. or later interpolations. inspired by Hera. He says that “it is characteristic of this book that most of its actions or initiatives. He intuitively sees it as artistically desirable to establish Greek superiority before describing their defeat. from 2 to 7. we note that it contains precisely four days of fighting. from Zeus’ promise to help the Trojans to the Trojans being victorious. more dramatic. books 11 to 18. He is composing this huge epic. i. and then doing nothing whatsoever about it. are committed to accepting the Iliad as it is. If we moved straight from 1 to 8. The Greeks would be seen as ineffective. and trying to understand it. more enjoyable for his hearers. third and fourth days’ fighting. These four days are the core of the Iliad.58 Malcolm M. By showing us the bright figure of Diomedes dominating the battlefield in 5. until line 75 of book 8. or 4 to 7 if we wish to limit ourselves to the actual descriptions of fighting. and wished the original story to have moved straight from 1 to 8 (Grote) or 1 to 11 (Leaf ). which is absolutely essential for the given plot. which is demonstrated by books 5 to 7 particularly. We. who are no longer old-style analysts. and both follow and dictate the structure of its plot. First. apart from sending the false dream at the beginning of 2. we are assessing the past. and restore the situation to what it was before the drama began. Willcock deal that is important about that book. and books 20 to 22. even further back.1) Taking the Iliad as it stands then. And we cannot deny that there is something that requires explanation in Zeus nodding his head to Thetis in 1. one to motivate the Embassy. What about 2 to 4? Just as in the Diomedes aristeia.2 But the picture of underlying Greek superiority. that he will honour her son by helping the Trojans. however.e. book 8 on its own. before he comes to the consequences of Achilleus’ withdrawal. or 3 to 7 if we begin with the duel. unable to cope without Achilleus. For the essential story of the epic. naturally superior to the Trojans. shaking great Olympos. So what is the poet doing? Why does he have the first day of fighting? The answer is twofold. . the balance of forces before Achilleus got angry. one from book 2 to 7. to complete the drama. This is bound to increase the impact of book 8. Zeus would manipulate the battle. This explains the second. and even its preceding cause. he shows us the Greeks as naturally victorious. “which put pains thousandfold upon the Achaians”. The battle which needs explaining is not the kovloß mavch of book 8. That is a delay of nearly a third of the Iliad. is not the only thing the poet achieves by that first day of action. He is in no hurry. This is why some of the analysts saw that first day as otiose. Homer makes it all more lively and positive. there would simply be gloom. to the beginning of the war. and a victory for the Greeks under Achilleus. by the inclusion of lists and set descriptions which reflect those earlier days. This is well known. but the first day. so in 2 to 4 we are receiving impressions that go back in time. three days of fighting are all that are minimally required: two defeats of the Greeks. the other to bring about the return of Achilleus. Thus. the Iliad is truly an Iliad. and then apparently letting matters take their own course. and the twelve days’ truce in 24. THE COMPOSITION OF BOOK 8 We turn to the second day of fighting. It is truly indispensable. Antilochos emerges as one with a significant role to come. they make the Iliad an Iliad. It is worth pointing out in passing. and Helen going to bed at the end of that book. we come to the eighth book. the teichoskopia and the duel between Menelaos and Paris in book 3.The Importance of Iliad 8 59 and (I think) generally accepted. (a) to provide the first defeat of the Greeks and thus the conditions for the Embassy of 9. book 8. in fulfilment of his promise. absolutely and undeniably required by the plot. and the fall of Troy is perceived to be inevitable: in the city the death of Hektor has the effect as if Troy has already fallen. after this very significant action on the first day after book 1. with the truce acting as a dividing line. before turning to book 8. as he does with the twelve days’ absence of the gods in book 1. Homer is perhaps using the passing of empty time at the end of 7 to isolate the central action. that the expansion in the time-scale in those early books. with the significant reminder of the first time they did so. so that we have the feeling of the background. if so we must’. after the setting of the background in those early books. We could not have him nodding his head and shaking Olympos. So the past is recalled and the future foreshadowed. as I said. which. These backwardreflecting incidents precede the aristeia of Diomedes. the fulfilment of Zeus’ promise to Thetis. or Review of the Army. after Achilleus has promised twelve free days for the mourning of Hektor. and Paris. with Pandaros’ treacherous shot at Menelaos. by Agamemnon—all these sequences and episodes widen the timeframe from the central core of three days of action in the tenth year to the whole story of the Trojan war. And note that there is a pause at that point. There are repeated prophecies of the approaching death of Achilleus. This is the second reason for the absolutely essential nature of 8 that I referred to before. But we recall that scholars have been . establishes the balance between the two armies before Zeus shows his hand. a truce which has the effect of separating that day from what is to come. and finally Zeus takes action to fulfil the promise he made in 1. and Priam says at the end. and the epipolesis. he has no hope of the outcome. So 2 to 4 and 5 to 7 are both preliminary. the renewal of Trojan guilt at the beginning of 4. is balanced by the advance echoes and forebodings of the future that pile up in the final books of the epic.3 The catalogues in book 2. ‘then we will fight again. and (b) to show Zeus positively helping the Trojans. the simile of the watch-fires of the Trojans at the end. his head falling to the side under the weight of the helmet like a poppy head weighed down by rain. they are less surprising if stock material is being used. it is unwelcome to the poet. . the heroes are the Greeks. Homer has an engaging reluctance to describe Trojans defeating Greeks. concentrate on Greek successes—the Diomedes attack. formulaic phrases recur. Recurrences are not to be discussed under the assumption that one example has been copied from another.4 Thus the action. Part of that famous simile at the end. as to the plus-verses in preAristarchan papyri.5 The principle of repetition in oral poetry applies also to incidents— situations and actions. In his heroic epic. Kirk himself quotes Dr Stephanie West. especially book 5. leading to that extraordinary comment by Kirk. as playing down the significance of these plus-verses here.60 Malcolm M. We have learned that the essential feature of such poetry is repetition: lines recur. But more important. (c) that there is an unusual number of plus-verses in this book in the pre-Aristarchan papyri. the aristeia of Teukros. And. Athene). what Lord called ‘themes’. Thus we should not be too concerned by the criticism about lines and formulaic phrases occurring both here and in other books. so that you can argue which is the original and which the copy. the pro-Greek gods Hera and Athene are trying to interfere. is the answer derived from oral poetry theory. and the impressions given. the expert on the early papyri. so even when the Trojans have to be shown as winning. like stars in a clear night sky. both on the human level (Diomedes. in book 8 reflects the mind of the poet. she accepts that they probably arise from the same cause as the repeated lines—the use of stock material. The situations in 5 and 8 are similar. So to point out that a large number of the lines in this book recur does not imply that the book is late and secondary. Diomedes is opposing Hektor. The conditions of oral poetry lead in a similar context to the appearance of similar material. That is about all the criticism. and even the critics are careful to admit that there are fine imaginative passages embedded in the second-rate (as they suggest) material: the death) of Gorgythion. Rather the repeated phrases are separate occurrences of the same phrase. Nevertheless Hektor is on top at the end. that it was unfinished because of ‘Homer’s retirement or death’. as it might appear. Teukros) and on the divine (Hera. One explanation of a certain muddiness. Willcock critical of book 8. (b) that a greater than usual number of lines in this book are found also elsewhere in the Iliad. but give it up. Teukros taking shelter behind his big brother’s shield. The weaknesses complained of include (a) that the actions described are inconsequential— people try something. Again one should not speculate about originals and copies. in relation to the criticisms. because of the plot. and three times Zeus . stronger than all of them together. But Zeus is. of Diomedes to oppose the pressure from Zeus. such as the four soliloquies in the Iliad and the four warnings of Polydamas to Hektor. until Zeus thunders again and throws a thunderbolt again. One can easily see how this concentrates the mind on Kebriones. And this applies also to the most striking repetition in 8. It is heroic in the extreme.7 There is a highly effective example of the cumulative effect of repetition in this very book. cumulative) way. he thinks three times of turning his chariot and fighting Hektor again. one might almost say foolhardy. and he does it three times. as he asserts (18–27). and Hektor shouts abuse. it is merely an event that happens twice. neither is the model for the other. However. Hektor loses his charioteer Eniopeus to Diomedes at 121. that he is now going to take personal action to fulfil his promise. scene of Zeus forbidding all the gods and goddesses to interfere in the battle. the repetition is often not null. His will prevails. secondly. of Athene and Hera setting off in a chariot to help the Greeks.6 Repetition has the effect of concentrating the hearer’s minds on some particular theme. as he then retreats. and later.The Importance of Iliad 8 61 describing the Trojan watch-fires on the plain.e. The reason for this becomes totally clear when we accept the structural fact. Book 8 opens with the memorable. First he moves forward. This has been pointed out in relation to certain demonstrably recurring sequences. The rest of the book concentrates on the reluctance. in virtually the same sequence. The general ban (5–12) is directly preparing the personal intervention (75–77). The situations are very similar. Teukros’ bowstring breaks in 15 as well as at the end of his aristeia in 8. where clouds have been expressly blown away from a mountain-top. his replacement charioteer Archeptolemos to Teukros at 313. But that does not mean that the passage in our book 16 was the model for that in 8. comes again in book 16 (at 299f. at 133. he attacks the Trojans and Hektor. then he asks his own brother Kebriones to take the reins. but we should not be speaking of an original and a copy. even bizarre. and it can even be argued that it is more logically appropriate there. but has a cumulative effect.). And thirdly. as for example the throwing of missiles and direction of abuse at the disguised Odysseus in the Odyssey. and prepares the hearers for what will happen to him at the final stage of Patroklos’ aristeia in 16. from 5. to help the Trojans. The long-term effect of cumulation operates in this case across a gap of eight books. so that “bright clear air streams down from the heavens”. to rescue Nestor. even the opposition. having rescued him. in repeated incidents such as I have been describing. in the face of the thunder and the thunderbolt. in a repetitive (i. of the pro-Greek goddesses and of certain Greeks. but the Greeks are not weakly conceding. Later. Reinhardt. The clash of wills between the supreme god and the supreme hero typifies the stress of the day. that he has seen men defending their cities. pw !Ilion aijpeinhvn. and even Bannert try to describe the phenomena without calling oral theory to their aid. (So did Wilamowitz. which were athetised by Aristarchus). but so are all three attempts at opposition. The critic may complain that the attempt to persuade Poseidon is an initiative that ‘is soon abandoned’. the same opposition to the will of Zeus.327f. First Athene objects when Zeus makes his outright veto against any god interfering (in lines 28–40. And eventually Zeus threatens the same action against Hera and Athene (a thunderbolt) as he employed against Diomedes and the men on the ground (402–405). while Schadewaldt.n eijruvssaisqe Aijneiva. Zeus is helping the Trojans to drive the Greeks back. wJß dh. That sequence. Would the critics have preferred the Greeks and their divine supporters to give way the moment Zeus showed his hand? Would that be heroic in the men.. the reluctance of the pro-Greek goddesses to accept the arbitrary (as they see it) action of Zeus in positively assisting the Trojans.8 That is the sort of hero Diomedes is. and on a third occasion she does persuade Athene to join her in active opposition. just as in 1 the quarrel on earth was matched by the quarrel in heaven.. Willcock thunders from Ida. though without success. The effect of Diomedes’ threefold resistance is cumulative. The same tension.r qeo. even against a god: ~ ß a]n kai. committed to exercising his heroism even against a god (as we saw with his wounding of Aphrodite and Ares in book 5). Hera tries to persuade the pro-Greek Poseidon to intervene. and three times’ is typical of the poet of the Iliad. One is reminded of the extreme statement of Apollo to Aineias at 17. ‘three times . uJpe. trusting in their strength and bravery... is seen among the gods also. Leaf lived before our wide discussion of the techniques of oral composition. or worthy of belief in the gods? .62 Malcolm M.9 Opposition on earth is matched by opposition in heaven. the purpose is to show that the pro-Greek gods are no more willing to concede than the Greek hero on earth.) The threefold resistance of Diomedes is not all. as has been shown by Herbert Bannert. To say with Leaf that “there is a somewhat monotonous interference by Zeus” is to misunderstand the technique of repetition which Homer employs. i[don ajnevraß a[llouß . It is all to show. by cumulation. As I said earlier. And there too the resistance is shown three times.. “The search for the poet Homer. van der Valk. 8. H. The figure of Diomedes is of course very interesting. West. NOTES 1. Homer: Der erste Dichter des Abendlands (Munich and Zurich 1989) 163–168. Danek. Textual criticism of the Odyssey (Leiden 1949) 87–89. Op. see for example M. See.H. Bannert. if he wished. J. who (as he says at the beginning) is so powerful that he could take on the lot of them in a tug of war. “Homer’s nationalistic attitude. 9. Die Diomedesgestalt in der Ilias (Oslo 1978).” AC 22 (1953) 5–26. among others.” G&R 37 (1990) 1–13. as he seems to be a substitute Achilleus. 2. cit.M.The Importance of Iliad 8 63 Homer gets powerful results by very simple means. but also the in practice irresistible superiority of Zeus. 6.A. G. These have been much discussed in recent years. Latacz. 7). Studien zur Dolonie (Vienna 1988). Andersen. both on earth and in heaven. shows the strength of the opposition. In this case. 4. hardly to be conceived as in action when Achilleus was there as well.H. There is of course humour here too. S. making six times in all. 3. and still win easily. 5. idem. the threefold repetition of opposition. See M. Willcock. n. as is shown by Alexandra Zervou in her recent book Ironie et parodie: le comique chez Homère (Athens 1990) 18–29. . See Ø. 75. Formen des Wiederholens bei Homer (Vienna 1988). 7.L. (above. The Ptolemaic papyri of Homer (Cologne 1967) 12. . to make their reactions instantly intelligible. Gestures. or they undercut and render problematic both instrumental acts and words. It will demonstrate the saturation of epic by nonverbal behavior. vivid narrative through body language. self-management. with enriching detail and decisive information. comparable text. become clearer and more intelligible to each other and to the reader. ©1995 by the University of Michigan. Akhilleus and Priam in Iliad 24. The survey of Iliadic examples that follows will conform to the categories described in chapter 2. H From Sardonic Smile: Nonverbal Behavior in Homeric Epic. and nonverbal sounds in the Iliad both supplement and contradict words and acts. while later chapters focus on specific matters limited by category of etiquette. and received ideas of human nature. It is meant to suggest the importance and ubiquity of nonverbal communication in another. or type of behavior. and literature in general. characters. through their bodies and unplanned motions. postures. they provide something that words cannot say. Nonverbal behaviors provide Homeric epic.D O N A L D L AT E I N E R Probe and Survey: Nonverbal Behaviors in Iliad 24 omer undergirds his swift. The Homeric epics deploy nonverbal behavior to characterize leading figures. 65 . and to provide a third “language” that supplements their own words and the narrator’s description of their martial and political deeds. In the Odyssey also. This is true in the Iliad as in the Odyssey. They furnish unobtrusive signals that confirm or deny characters’ automatic responses. frequently determine and redirect the plots of the Homeric poems. libations. death. Inattention to. on the participation of the celebrants’ whole bodies. treats many initiatory rituals. purification. Patterns of learned behavior. the commencement of the narrative and the wrath. Iliad 24 richly illustrates these assertions. even religious. The narrative. calling political assembly. Hundreds of communal. secular rituals. and a disruption of ordinary space and time that powerfully affects interactants. RITUALIZED AND CONVENTIONAL GESTURES Ritual commands a central and pervasive place in ancient. entertaining dependents with one’s marginal surplus to cement bonds. and secular events fill nearly every day of the ancient calendar. life.3 Iliad 24. The corresponding end-frame book. upholding one’s code of honor. These essential. and nonverbal behavior remind bloodied and angry participants of the “prizes” for which men fight and die. clothes and artifacts (body-adaptors). even as in modern. gifts. Will and words gain expression by symbolic nonverbal behaviors: gestures and postures. offers as many ceremonial acts and exchanges. affective. fill up life. religious. and honor-calibrating events. or abuse of. setting out from home for the day’s farmwork. Human rituals depend for their power. Proper attention to etiquette and altered behaviors in altered situations partly defines the adequate hero in Homer.4 We cannot survey every ritualized Homeric behavior. The contrast to the preceding days of hacking and hewing in battle .2 burial. dealing with strangers and acquaintances in friendly or hostile ways (honor and degradation). supplication. but here Homer concludes the story of wrath. structure daily activities. and yearly. a narrative of closures. speeches. Communal. The chief personal rites of passage (birth. sacrifices. verbal and nonverbal. feasts. even death. commencing diplomatic negotiations. so defilement. and so forth. foregrounds personal and communal rituals of closure with attendant nonverbal behavior. including approach ceremonies. in part.66 Donald Lateiner 1. monthly. and recreation. propitiations of the god Apollo and the earthly Akhaian king.1 Iliad 24. and rituals of sorrow. daily. and death) submerge and swathe the individual in social. ritual procedures produces dishonor. The last book reintroduces and reaffirms conventions of community and peace through a range of secular rituals. Iliad 1. ritualized activities.5 but we can suggest the pervasiveness of noteworthy gestures. such as eating. and closure are thematic. postures. puberty. rites. and paralinguistic indicators of a ritual or conventional nature in Iliad 24. marriage. displaying and challenging warrior honor. nonspeech sounds and tones. and their individual deformations. 416–21). 696–97. 709). Selfdefilement (body-adaptor behavior) and self-deprivation (of food and sleep) best perform—that is. Trojan bodies are instruments of communication. Akhilleus and Priam’s ratification of agreement and closure of personal isolation(s) by sharing supper. anointed with olive oil. 284–87). The meanings of mourning are more limited but as highly affective.” and invited participants. with burial and feast on the tenth (cf. 510–12. 301–7. and finally the funeral feast that honored Hektor. Akhilleus expresses his grief and graces his dead friend Patroklos by obsessively mutilating Hektor’s corpse (15–17. a ritual bond of solidarity. Companionship (in the original sense) employs the body’s communicative symbolic resources. cf. Hektor’s extended family weeps profusely. Priam’s fast (a negative feast. rage.Probe and Survey: Nonverbal Behaviors in Iliad 24 67 somewhat elevates the dehumanizing gore. 45–46). after purifying his body and pouring wine as a libation to the latter (lines 34. shrouded in a cloak and tunic by Akhilleus’ domestic staff. with further funeral lament (581–82. the burial of Niobe’s children mentioned by Akhilleus. Apollo and Zeus mention Hektor’s regular sacrifices and gifts to the gods. Homer articulates the stages and action that perform grief—that honor the dead and give closure to the living. Priam’s kinsmen follow him in prescribed lament when he departs Troy for the Akhaian camp as if to his own certain death. The mourning period for the hero Hektor is fixed at an abnormal nine days (in part to compensate for pyre-fuel shortage). externalize for others—his feelings. Priam lifts his hands and eyes to Zeus. 68–70. outrageous revenge. his verbally inexpressible paternal grief. especially in Homeric redistributive economies. The nonverbal behaviors of religious devotion are prominent. 637–42). and then brought back to its native public.8 . and depressing destruction (Macleod 1982.6 Sharing food is richly symbolic and multivalent. Niobe’s paradigmatic return to human conditions (symbolized by breakfast eating). 51–52. Sharing food establishes a material symbol of acceptance. The monument to the dead man will rise on the eleventh. Iliad 24 provides a handbook for archaic mourning procedures. 587–88. Troy-town. 328. another nonverbal behavior). Procedures of human alimentation have always been highly ritualized in terms of content. Once agreement has been struck by the sorrowful survivors. Hektor’s corpse is properly washed. occasion. Book 24 tells of Peleus’ celebrated wedding feast. 612).7 Priam fasts continually and keeps vigil for his dear son (160–65. constraints or “style. Thetis’ drink and toast of welcome. Priam veils himself and spreads dung on his body by rolling in it and smearing it about himself. and 24. crowds around (proxemics). the observance and rupture of well-understood patterns of reception. and females wail in unison. 38). The visitor must be greeted and seated. Akhilleus mourns Patroklos dead from 18 to 24 (at least). Telemakhos. salutation and supplication of an enemy. Thus. such as protecting guests and their honor from others’ abuse (at dinner and the games).68 Donald Lateiner The kinswomen tear their hair and touch Hektor’s head (gendered nonverbal behavior). His sister-in-law Helen also. Hands speak. These rules that go without saying are honored and violated repeatedly by knowledgeable interactants in Iliad 1. the expressive gesture of concern allotted them. if not dangerous. Nestor. The bones are collected and placed in a mortuary casket. 747. the multitude. Lastly. and Eumaios—provide the pattern. the Trojans gather for a sumptuous feast in accord with traditional procedures (802). 761). 397). 719–24. For the funeral—both a cremation and an inhumation—a pyre is erected in public. and the death of Hektor dissolves the spirit of the great Trojan personages as it spells the doom of Troy (22 passim). then offered wine and food. His wife Andromakhe ritually leads the kin-lament. His wife and mother perform the duty and exercise the right to sing (paralinguistics) their own unique laments. which will be consumed before any inquiries are made as to his name and provenience (394. in her last appearance. 9. Death and the pain of survival thematize the Iliad: Thetis mourns for her son alive in books 1 and 18. proxemic postures and gestures enable initiation and termination of verbal communication between equals and unequals on earth . require greater detail. Nonverbal. then extinguished finally with wine (cf. unrelated by blood. The casket is itself enfolded in a purple cloth before being set in the ground and topped with a mound of stones. The good hosts of the Odyssey—namely. the three books that are arguably most central to the plot and most developed thematically (latest?) locate issues of exchange and reciprocity at their focus.9 These nonverbal and paralinguistic behaviors “speak” as loudly as the words themselves. Two forms of ritualized nonverbal behavior prominent in Iliad 24. Menelaos. croons and keens for her Trojan protector (710–12. fired. by violations of these and other rules of hospitality. Nonverbal protocols of heroic greeting10 and parting provide one barometer of touchy basileis civility. The movements and sounds physically perform the experience of loss for the community. while Polyphemos and Alkinoos show themselves inept. professional male singers lead the dirge. Iliad 1 and 9 also pivot on nuances of welcome. The oikos lays out his body. while she holds her husband’s head in her arms. while they help the survivors emotionally and socially adjust to an emptier world. every nuance of acknowledged statusmanipulation. by clear implication).33. Meanwhile. because Athena makes (proxemic) room for her. Khryses and Agamemnon originally set the pattern of suppliance and rejection. 100–102. 515. 126–27. 478.84–89). is the necessary price for recovery of his son’s dead body. The disguised Hermes subsequently emerges and takes badly frightened Priam’s hand to reassure him of safe conduct. Menelaos. Hera personally offers her a goblet of ambrosia and comforting words (cf.632. the “values of humanity and fellow feeling” exhibited in the uniquely successful supplication of 24 heighten its power (Macleod 1982. on and off the battlefield.11 Finally. The crucial encounter between Priam and Akhilleus aborts. nymph Thetis sits next to Zeus. then Akhilleus develops it with his mother.” and the suppliant is slain. the sorrow-stricken Trojan crowd huddles around their returned friend and fallen leader. Nonverbal behavior gives visual substance to the momentous Umkehr. Phoinix narrates the story of Kleopatra’s failed suppliancy before Meleagros. Akhilleus. Supplication permeates the lethal encounters of the Iliad. the semisuppliant Patroklos and the pseudosuppliant Agamemnon vary it. but in combat “it is always rejected or cut short. almost human.13 Priam’s selfdegradation. Priam closes in on unsuspecting Akhilleus to supplicate before awareness is mutual. Priam finally succeeds in restoring its important terrestrial potency. 16. it provides the counterweight to unremitting killing everywhere before (and after. then. Immortal Thetis then approaches her mortal son. the supremely valuable “social artifact. 21. The two divinities implacably hostile to Trojans cooperate in the process of arranging the return of the chief Trojan’s corpse. The elaborate description of nonverbal behaviors produces the cinematic effect of slow motion and emphasizes the reversal of business as usual by reasserting humane and generous sentiments. Akhilleus embodies and realizes that ethic of relentless and merciless war (9. after the tragic rapprochement of the leading survivors.198).87. They salute the corpse and express their loss (361. the usual procedure. Iris approaches Priam and whispers in his ear (24. She sits immediately next to him to stroke and soothe him in sorrow. Divine-human traffic is very heavy in the battle’s brief hiatus. 15–16). 169–70). his postural abasement before Akhilleus. in several ways. First.” Every formality of gesture. 15.12 Supplication structures the trajectory of Akhilleus’ wrath and its eventual extinction. but his brother brings him back to his (pitiless) battlefield senses. yields once to a suppliant (6. Thus.Probe and Survey: Nonverbal Behaviors in Iliad 24 69 as in heaven (see chapter 6). Iris comes close to Thetis to parley. is observed. It is thus marked by absence of greeting protocols: Priam’s sneak-arrival at the feet of Akhilleus. . 707–12).51–53). as they ritually satisfy. The ritual of supplication here regularizes a constrained communication that would otherwise have been socially unacceptable and even physically dangerous. Old Priam has shown a new heroism. they merely ratify the language of bodies and the manipulation of distance and temporal intervals. He rejects. Gestures and postures of deference and supplication emotionally enrich. will he respond in kind and with reasonable words. rather than with his usual hair-trigger.15 The audience waits for a sign of reciprocal willingness and generosity from Akhilleus: will he accept this assertive demonstration of abased status from an enemy king. the narrative of mutual grief and the supreme commercial exchange between heroic enemies. chronemic. can be no more compelling. Hermes advised Priam to close in immediately and seize the Akhaian by the knees—as if on a battlefield. The powerless have their own (social) power. however brusque.14 Supplication atypically opens the unequal communication. even more than by his subsequently initiating the delayed verbal exchange and the verbal honorifics (486). bloody fury? Priam’s vulnerability when he violates Akhilleus’ body-envelope rightly arouses our fears. bridge between two shattered and isolated human souls. Rather than a verbal agreement ratified by the formality of a handshake. This forestalling of proxemic permit and preemption of low elevation enable him to impose himself aggressively on Akhilleus’ heroic code. Zeus. The Trojan trumps that humble posture . a theme of the Odyssey. He manipulates the awful garb of humility that he has assumed by kissing the hand of his son’s killer. we experience a nonverbal bonding between powerful presences sealed with verbal confirmations. as “hard-hearted” young Akhilleus will show a new humanity and gain a unique ku:doß. the competitive ethos of Homeric conduct between equal-status non-philoi. The material quid pro quo (corpse for heaped up items of value and esteem) symbolizes a momentary spiritual. even physical. however. Bodies reveal what words cannot say. Thus. Words here are truly secondary. He adopts the posture of a submissive inferior. Priam defines and affirms—by his body’s reduced elevation—the imbalance of the interlocutors’ status and his own lower rank. sending orders through Thetis.70 Donald Lateiner Priam’s divinely contrived and uniquely unnoticed entrance into Akhilleus’ presence enacts the varied functions of salutation but without otherwise standard greetings. and kinesic protocols. The approach and abasement establish the situational hierarchy by proxemic. he identifies himself as a suppliant (in this situation). The absence of any words of greeting or even reassuring gazes and identification before the enemy penetrates the “intimate” distance of “personal space” produces a unique triple anaphora of wordless amazement (482–84). He has restored him—physically—upright (elevation). These two social institutions exhibit certain parallel ceremonial acts that “permit the acceptance of the outsider within the group. 7. His humility is startling in any Greek context (465. but at the same time he pushes him away (508–9. The lowered body. Yet it affronts Priam’s heightened sense of ritual obligation to his son’s abused corpse. Akhilleus. Since Priam has not yet spoken a word. the pity of the man called “pitiless. entrained in paroxysmic pain. and welcome. Akhilleus and Odysseus at Il. These are social signs of both the ritual of accepting supplicants and that of welcoming honored guests (507–22. The frightened King obeys (559–60).” He had described the personified divinities. This nonverbal behavior expresses his patent sympathy. even the alien person or the .17 Priam uniquely supplicates a victor not for consideration of his own body but for return of another’s corpse. 478. physical contact. Then Akhilleus again touches Priam’s arm. through his beetled brows. but more so. He will not sit in a chair (normality) while Hektor’s corpse lies neglected. exchange of gifts. a form of nonverbal behavior. if he will not obey an order to be seated. grants protection. aged. Two sets of nonverbal behaviors and rituals conflict.Probe and Survey: Nonverbal Behaviors in Iliad 24 71 of surrender by the gesture of kissing the hands that have slaughtered his many sons.153). 357). 506. Sharing a deep sense of human limitation and weakness. Finally finding words. the lame. supplication is complemented by guest-friendship.” Akhilleus shows ambivalence. The intimated image of his own father is too painful. but well-connected Supplications. but communicating simultaneously through all channels conveys both unique urgency and sincerity. cf. cf. even without ratifying words. honor. but here it conforms precisely to Phoinix’ persuasive “anticipatory echo. and self-abasing words may logically be viewed as redundant. and exercises dominance by making him stand. Priam’s postures of grief do not suit postures of the successful suppliant and guest. He takes Priam’s hand to reassure him that interchange will be peaceful. he invites him to be seated. ajpwqeiæn is formulaic for rejection of suppliants). facilitates accepting the otherwise unacceptable. 11.16 The pathetic affect is so strong that Akhilleus loses speech (aphonia). Even him whom he pities may arouse wrath again.765–79 and Od.18 As in Iliad 9. the two bereaved men weep together. threatens the recalcitrant visitor and acknowledged inferior with violence. his appearance itself and nonverbal behavior must account for Akhilleus’ incapacitating emotion. But to underline Priam’s totally dependent position (both in terms of suppliants’ ritual and raw power). He has been touched by and has touched his enemy—vital heroic contact. This ordinary ritual signaling that suppliancy is granted and a guest received amounts to recognition.” In both rites. indirectly glancing. 72 Donald Lateiner known enemy.19 It is one of the many recombinative units that structure social life no less than oral epic. The body is a prime instrument and point of reception for social intercourse. (Here, e.g., the “haptics” [contact behaviors] include Priam’s dropping to the floor to seize the knees and kiss the hand of Akhilleus. No less communicative, Akhilleus lays hold of his enemy’s arm.) In this climactic scene, the suppliant’s reduced elevation, by its severe disturbance of normal position, reveals how low majestic Priam will sink in social honor to recover his son’s body. The relation of young, less kingly Akhilleus, still sitting on his throne (472), to elderly, dignified, and otherwise kinglier Priam, curled up on the ground at his feet (510), expresses concretely, and in a single image, the untraditional, nonreciprocal greeting in terms of distance, movement, gesture, elevation, and posture. A minor gesture will “italicize” a message; here, a major gesture, a complex of bodily messages that drastically alters Priam’s position, compels attention, reduces uncertainty as to the stranger’s identity and intention, and initiates the transaction: an exchange of objects and also an unexpected social reciprocity, the sharing of grief at human loss. The generic commonplaces and the horizon of expectations set up by the multiforms of battlefield savagery have created patterns that neatly augment the astonishing features of this unexpected scene. For the ancient Hellenes, gestures of limb and bodily position conveyed nonverbal messages more frequently and effectively than the face.20 Priam therefore performs his nearly unconditional respect by utterly abject posture and orientation to Akhilleus. He nevertheless asserts some residual dignity, his equality as a suffering human being, by aggressive reduction of the separating distance—proxemic penetration of Akhilleus’ body-envelope—and by seizing turn-taking precedence in speech (486). His complete array of submissive ritual acts paradoxically compels physically powerful, yet socially punctilious, Akhilleus to accept his request. The situation enforces his extraordinary claims. By nonverbally abdicating status and power, he requires Akhilleus to grant him the honor that the elder seems to disclaim. This body-persuasion provides one major reason why he succeeds where Agamemnon had failed with “persuasive” gifts.21 Agamemnon’s deference is either false or shoddy or both; Priam’s is unarguable. Body language prevails over words or wealth when the two conflict. Akhilleus’ own complementary gestures demonstrate two things: first, that he well understands the moves of the game; and second, that he realizes his essential identity with his enemy—or any other man. Formal and informal public addresses in Homer draw attention to nonverbal elements of both speaker’s delivery and audience reception, two aspects of Probe and Survey: Nonverbal Behaviors in Iliad 24 73 secular, “political” ritual. Nonverbal behavior, under the later rubric of “delivery” (or actio), had a serious impact on the ancient study of persuasion.22 Homer’s attention to kudos-winning speech and oratory (Il. 1.490, 9.443) is patent in the high frequency and importance of his dialogues, group discussions, and assemblies; in his implicit, and sometimes explicit, attention to different persuasive styles of orators (3.216–24); and in the evaluations of Akhilleus’ reckless and Odysseus’ prudent speeches.23 Akhilleus admires both Priam’s heroic appearance and his powers of persuasion, verbal and nonverbal (632). Homer has already characterized him by various speech acts: for example, he scolded his sons (237, 248–49, 251), and he flattered the stranger Hermes (375–77). Now he beseeches his most dangerous interactant, an enemy, effectively (507; 516). He mounts clever appeals and manipulates gaze and eye-lock, proximity, supplicatory postures, touch, and gestures: a[gci d Δ a[ra sta;ß cersivn jAcillhæoß lavbe gouvnata kai; kuvse cei:raß .... (477–78) e[tlhn ... ajndro;ß paidofovnoio poti; stovma ceiær j ojrevgesqai. (505–6) klaiæ j aJdina; propavroiqe podwÇn Acillhæ j oß ejlusqeivß .... (510) The effective orator escapes the ghetto of language and exploits the spectrum of nonverbal behavior:24 emblems (knee-grasp); illustrators (bentover body); affect displays (tears); conversation regulators (such as supplicant initiation, lock-on gaze termination, establishing speaker precedence, and turn taking: twice, 483–85, 633–35); adaptors (steady gaze); physical appearance (stature and beauty);25 touch (hand-kiss); paralinguistics (silence, volume, pitch); proxemics (coming into the “intimate distance,” stillness), chronemics (late at night, delay in speaking, keeping speech short); alteradaptors (gifts for ransom, food and chair [offers and] refusals). Less dignified behavior better suits comedic than tragic genres. Comic and adventure literature enlist more expressive activity and drastic, not to say spastic, movement than tragic texts, because our jerky bodies often betray or “leak” spiritual pretenses and foolish or criminal plans. Conflict between word and gesture is sometimes read as irony in epic, as when Polyphemos interprets Odysseus’ grandiose claims on xenia while the hero scuttles into 74 Donald Lateiner dark corners or when Iros replaces threatening words with a cowering body when push comes to shove. Such internal conflicts or conflicts between classes sometimes suggest slapstick—for instance, Odysseus’ elegant speech while beating Thersites in the Iliad or the comic, if fatal, ballistic attacks by the suitors on the beggar. Homer provides the narrative with such comic variety—with tension between word and performance, or between status and assumed roles. For further instance, we mention Hephaistos’ desire to calm the Olympian feasters’ threatening eruption into a brawl as he hobbles around the table in Iliad 1 and lowly, ugly, and irascible Thersites’ jeremiad against the high command and then his punishment in Iliad 2. Hera’s unholy seduction (employing stimulating olfactory, dermal, thermal, and body-adaptor nonverbal behaviors) overwhelms Zeus. The male spouts a vain verbal catalog of sexual conquest as he lusts for and grabs at his wife in Iliad 14. The poet often cues our response by internal laughter, as we note when Zeus laughs at Hera’s boxing Artemis’ ears in Iliad 21 or when the suitors laugh at Iros’ nonverbal and verbal insolence and consequent put-downs in Odyssey 18. Heroic quarrels over prizes that make even Akhilleus and the Akhaians smile (23.556) repeatedly interrupt Patroklos’ funeral games.26 The heroic dignity of a king like Agamemnon or Priam, in his own estimation if not the poet’s, demands restrained comportment. Comic characters, including Antilokhos and the suitors, cannot “carry it off ” and leak their affect. In the Odyssey, Odysseus’ facial demeanor often prefaces or replaces verbal expressions.27 He smiles the most. He even “manages” a smile when others are rebuking his wife Penelope. His smiles (especially the sardonic one) characterize menacing resources and mark each context as a significant, if ambivalent, moment. His famous sardonic smile and Penelope’s puzzling, embarrassed laughter (20.301–2, 18.163) both underline concealment of plans from all others and the heroic control and inwardness of their selves, a Greek ideal (see chapter 11). The tranquillity of a self-assured queen like Arete or the self-controlled smiles of Odysseus, when confident of the assistance of Olympians or steadfast in the face of blows (e.g., Od. 17.234–35), contrast to the agitated speech and coltish movements of nervous Paris or angry Antilokhos, the hysteria of the cocky suitors, and the leaping to rise, crying, and sneezing of young Telemakhos. However, intense kinesic activity can portray unbearable emotion and the rejection of a group’s conventional standards of behavior. Traumatized and enraged Akhilleus gnashes his teeth, rolls on the ground, weeps, and otherwise disports his hated body.28 Probe and Survey: Nonverbal Behaviors in Iliad 24 75 2 . A F F E C T D I S P L AY S : E M O T I O N A L B E T R AYA L Portraits in oral epic present fairly constant appearance and characters, often in formulaic, even fossilized, phrases. Sometimes the narratives describe dramatic, momentary, emotional disequilibria, characteristically conveyed by mien, posture, demeanor, gaze, and gesture. Idomeneus effectively describes cowards by changes in skin color, frequent postural alterations, fast heartbeat, and teeth chattering, a quasi-paralinguistic leakage (Il. 13.278–86). Visible arousal, like these or perspiration and blushing, “leak” affect. The physiognomy and bearing of the praiseworthy hero is, above all, calm and steady. The eyes index the spirit, as the following phrases, all from a short stretch in Iliad 1, prove: kak j ojssovmenoß, o[sse dev oiJ puri; lampetovwnti eji¯kthn, uJpovdra ijdw√n, kuno;ß o[mmat j e[cwn (105, 104, 148, 225). Baleful looks, blazing eyes, glaring glances, and, elsewhere, admiring or loving gazes concretely convey emotional states. Physiognomic consciousness is essential to Homeric characterization of emotional states.29 Iliad 24 narrates the disputed disposition and transfer of Hektor’s corpse. The gods discuss the problem; mortal Priam is dispatched from Troy to claim the body, and Akhilleus and Priam experience and express parallel sorrow for their dead beloveds. The corpse is washed by the Akhaians, returned to Troy by Priam, and accorded “last rites” by the Trojans. As we have seen, the commercial exchange is devalued compared to the emotional bonding, but both are expressed nonverbally as well as verbally. Expressions of uncontrollable grief amid the rituals of mourning dominate the book on both sides of the big ditch. Tears are noted for seven subject–object dyads: Akhilleus for Patroklos and Peleus; and for Hektor, Priam’s sons and his wife Hekabe, Andromakhe, the Trojan public, and Priam himself (4, 9, 511–12, 162, 794, 209, 745, 714, 786, 509–10). The tears of Niobe express unquenchable, but necessarily endurable, human grief (613, 49). Mortals constitute a community of ephemeral sufferers.30 Our pathe establish our specialness. Priam himself is benumbed, except with (literally) sympathetic Akhilleus. He seems to be beyond the comfort of tears, both when he is self-isolated and when he is surrounded by his grieving palace, family, and subjects (cf. Waern 1985). While wrenching verbal articulations of sorrow most fully explain to audiences Akhilleus’ sentiments and those of Priam, Hekabe, and Andromakhe, the nonverbal affect-displays complement the words. Apostrophes, eulogies, and keening speeches of bereavement gain force from the emotion-laden physical and paralinguistic phenomena that accompany them here. Iliad 24 conveys Akhilleus’ anguish and anger in a rich variety of nonverbal behaviors: his out-of-awareness scowl at Priam’s importuning, his 246.31 A sharp contrast to agitation. when men are compared to frightened deer (4. such paralysis usually occurs in military struggles. running. 572. to signify the ceasing of human responses.64 remains relatively rational). 5. twice approached by gods. is sudden cessation of word and motion. 10. They gather again. his writhing on the ground in grief. Stupefaction more “naturally” comes about from theophany and supernatural interference. The epic utilizes this infrequent. but potent. Patroklos at Apollo’s. otherwise known as “speaking degree zero. shouting. Such a communications vacuum.483). Priam: 165. The Trojans in book 24 informally and instinctually swarm. strikes interactants most forcibly. 24. dramatic. this extreme alteration of consciousness and responsiveness (1. Their clustering betrays self-aware helplessness. His hair stands on end—a unique involuntary reaction in Homer. Book 2 characterized the Akhaian host: shaking.”32 Only Akhilleus experiences qavmboß.243. parallel to no longer verbal silence. 398). 21.360). the inexplicable and irremediable change that befalls Aias at Zeus’ hands.76 Donald Lateiner groaning at the thought of Patroklos’ honor diminished. his compulsive repetitions. their need.545. 790.144–53. the body of their defender. and Priam at Hermes’ (11. 629–32). 16. Od. through ritualized body-fouling. The shuddering withdrawal (775) that she mentions in describing the involuntary effect she produces in others appears but once elsewhere. various physical movements that replace or transcend words. like calves or children. She was ostracized almost by instinct. Homer notes other nonverbal features of crowd psychology. toward Priam as he wheels in Hektor’s corpse.382–83). affect-display. a hiatus in the usual dependable human emissions. He is dumbfounded by Hermes’ approach and later struck with stilled wonder by Akhilleus’ godlike appearance. denoted by Greek tevqhpa. The grief of Priam is expressed both formally. laughing at Thersites. 10–12. Lykaon at 21. and scattering (2. cf. because of her beauty and the disasters that it had evoked. 270. as is Akhilleus by the astounding sight of the enemy chief (360. before having been summoned. disturbed nearly all Trojans. 621). 24. There it describes Diomedes’ surreal effect in his aristeia at the cost of Trojan opponents (11. Such unmeditated. Priam.199. and communicative stillness. his frustrated search for a bearable posture and place to be still. Others too impart their inner states by visible behaviors.410–15). suffers uncontrollable shivering (170. 591. Helen’s presence. signifies a nonverbal damming of the stream of reassuring motions. and his startled and startling movements (559. cf. and informally through affect displays. 359). .806. to prepare formally for Hektor’s entombment (709.29. such as sobbing while huddled at Akhilleus’ feet (509–10). For the articulate heroes of Homer’s Iliad. By distancing himself—swiftly. he has roused himself to heroic hospitality or response. Macleod ad loc. the awestruck wonder conveyed by qaumavzw when Akhilleus and Priam mirror gazes with each other after first words (twice in 629–31. and voluble hero.482–84). exchanged here for a “useless” corpse.35 Since Hektor now is and is not a person. Objects express emotion. and ransom. goods.Probe and Survey: Nonverbal Behaviors in Iliad 24 77 The three other of ten Homeric examples. and the thunderstruck paralysis of teqhpa when Olympian Hermes appears to and stupifies Priam in the dead of night (360). of an earlier one in Phthia (in Nestor’s report).33 The arrival of the Akhaian embassy at his tent. is and is not an object. Hektor’s is the only corpse ever successfully ransomed in Homer. agonistic.). degrees perhaps. and other external signifiers that identify and situate persons for their interactants. The “objective” style of Homer does not speechify about the value of life—Akhilleus’ observations on life and nonlife at 9. the failure to honor the king’s power-symbol was more significant than its de-elevated landing place. There is bewildered surprise when Priam first arrives at Akhilleus’ lodge (three times in 24. 11.34 Homer’s intensely narrow focus in Iliad 24 on the grief of a father and a son similarly capitalizes on several significant objects. Hektor’s princely ransom of objects. TOKENS AND D R E S S : T E L LTA L E O B J E C T S Homer sows his poetic field with objects. gifts. tokens. and thus ruptures his bond with the assembly and its convener to preserve his independence. his humiliation requires symbolic response and retaliation.776. But before each verse is finished. and dignity.101). the most emotional.193. he abuses it and them. 1. of astonishment. he therefore can and cannot be “equated” with spoil. Communicative objects commence in Greek literature with Khryses’ tassled staff and Agamemnon’s elaborate and genealogized scepter. Homer the narrator distinguishes at least three types. cf. honor. and of otherworldly Patroklos in a dream all bewilder him at first (9. so do Priam’s ritually filthy clothes in book 24. 3. The bride’s clothes say as much as her blush or smile.245) clearly communicates by gesture both immediate dissatisfaction and dissociation and also immanent withdrawal. associated objects—self-adaptors and otheradaptors—inform interactants who we are and how we feel. recompense. Akhilleus’ hurling of this scepter to the ground (Il. concern Akhilleus. As the introduction made clear. and violently—from the communal power-object. describing neither victims in war nor hapless sufferers of the gods’ will. As such.400–409 were . 23. intensely. His honor has been transgressed. suggests the incalculable value of the living leader. pours libation. objects—words repeated by gods. divine. 799. He restores the corpse of Hektor and relates—inversely paternal as he now is— the parable of Niobe. but now only in the private realm. Priam’s isolated dissociation from the human condition encompasses rejection of conversation. such as the petrification of Alkinoos’ ship and men at Od. The subliminal effect dwÇra a[poina. his intense anguish is lessened sufficiently so that he can associate himself with a different set of significant objects. 553). open spot in his courtyard.39 At Il. objective style more effectively provokes strong emotional response.217–18. augury. sometimes their vicissitudes equal or excel in pathos those of human beings. dead and buried. but at least his corpse has received its due objects of ethnic honor and value. prays for success and security in a selected. He still wields his staff of office. syntax. 11.305–21. food. also miracles. and narrator—transforms “neutral” into “value” terms. This “visible speech” of gods to humans includes all wordless. nonverbal behavior. ease (elevation and posture). not to mention his fellow citizens (93–94. Priam’s filthy body and tattered mourning garments proclaim a “darkly” emotional condition and distance him from family. words for lifeless. 163). but symbolically resurrecting. and requests a telegraphic bird on the right. but those of Patroklos and old Ilos also. but recognized. The blackest veil of mother Thetis states precisely her bereaved emotions. Zeus duly provides his eagle. and weird noises (13. “unnatural” thunder. 13. 18. shaking it menacingly at his sons (247).163–64). Only then does Priam end his fast (641–42).38 One unique form of nonverbal behavior. had not Akhilleus first nonverbally and verbally supplemented the offer. victor. timely earthquakes. and Homer measures his wingspread in a simile that describes the strongly barred door of a rich man’s treasure chamber. as the food would have been. The tomb and monument (666. Priam washes.59. Power as well as size and future safety as . not only Hektor’s. The chair that host Akhilleus gently offers to indicate welcome and fellowship is refused by Priam (522. Dispassionate report has become expressive. dreams. divine messages to earth below: portents. and even sleep (635–40). the cool. vanquished. Troy has become a cemetery and a burning pyre. lightning. proper ritualized treatment. a selfdestructive.37 They provide vivid description but also physically communicate emotion and exert force on characters. and therefore all the more powerful. now those relating to the reintegrative niceties of funerals and burial. Hektor has become bones in a golden larnax (795). possesses a separate. Once he has recovered the corpse.78 Donald Lateiner enough anyway. 801) are mentioned.53–54. a nonverbal semasiological message. 24. rains of blood.36 Lifeless things in Homer have a “discreet but intelligible language”. rain. clean and decent clothes and body. These nonverbal messages sometimes decide the narrative.40 4. Priam manages to penetrate his “turf ” and. thought. Economy of affect makes ancient epic crisp. At the closest distance. Some readers may question the inclusion of object-adaptors among my categories of nonverbal behavior. and interactive. Akhilleus’ body-envelope is very large and is sensitive to the slightest slight. communicative. Humans possess four “situation personalities. body heat or cold (with or without touch). The stages of Akhilleus’ wrath can be schematically represented as violations and restorations of his territory (and significant objects. The lines between paired-off people vary from culture to culture but may vary less between Akhilleus and middle-class Americans than between contemporary Middle Easterners and the same. supplant. and revelatory. Object-adaptors from on-high or down-below are informative. by the nonverbal bird and portal. The control of personal appearance powerfully affects Odysseus’. but they provide literature. as if they were representing separate states) gingerly enter the posted grounds of their alienated colleague. PROXEMICS: THE HUMAN USE OF S PA C E Distance structures human relations. Such nonverbal signals (even portents) can support. and embrace close friends. “lifeless” objects are at times invested with social value (like the scepters of Agamemnon and Priam). comfort children and the bereaved. He draws a series of very clear boundaries between himself and Agamemnon. Skin texture (touch). and public distances. more emotively. his social and personal being. At this distance. emotional power (how clothing is worn and how personal expression varies the face). we respond differently to stimuli because we have different sensations (olfactory space) and a different concept of physical self and other. rapid. Agamemnon’s ambassadors (as we oddly call them. Intimate distance allows Homer’s characters and others to feel and smell other bodies. . with a potent “concrete” dimension by which to communicate feeling. They are therefore especially indispensable to a nonmimetic (nontheatrical) medium. a medium of words. social. At this distance (and at each of the others). Penelope’s. We hear sighs and whispers and see objects in great detail. like Briseis). personal. Hall (1966. or divine sanction. and acrid and sweet odors inflect and deflect intercourse. Separate. or contradict a character’s words or actions. the sensory input is stepped up. 113–30) divides social space into four “regions”: the intimate. We immerse ourselves in each other’s sensorium. and Akhilleus’ interactions.Probe and Survey: Nonverbal Behaviors in Iliad 24 79 well as expense are conveyed by the mighty auspice and the simile.” depending on how we imagine our personal bubble of inviolable space in every social transaction— in bed or on the subway. and meaning. people make love. Homer manipulates to unusual effect the social and psychological meanings of space. The quest for Lebensraum (elbowroom) and “personal space” currently expresses political and psychological craving for defined comfortable distances. . at the public distance. or servant. At the personal distance. and. That they can be ceremonial. but the god comes closer for social interchange and even into bodily contact. so some repetition is unavoidable. we still touch or grasp one another. the friend. Public distance affects people’s choice of words and phrasing as well as their pace and volume. and facial expressions can be read clearly. to be lucid. 477). the go-between. the gaze of another can be intensely annoying or can convey the rapt attention of lovers in public venues. North to South. another such aspect. informal. There is an insulation of the person. as in Akhilleus’ lodge.) This section largely confines itself to examples that most clearly affect mood and events. Akhilleus. 724). a welcome sense of separateness. 360–61. Only trusted acquaintances come this close and transact private business. Hermes is descried by Priam’s henchman. Hekabe and Andromakhe bewail their dear Hektor (712. Sometimes tables and chairs structure this space and affect behavior. Others are observed without facial detail. because proxemics names one of the few basic. we examine the four proxemic zones in Iliad 24 and then briefly consider proxemic dimensions of perhaps the central ritual. and voluntary or even enforced comes as no surprise. Hekabe has also approached her spouse.41 but this is the distance of one-to-one relations. relative. (Chronemics. Thetis deals with her son. nonverbal clues must be fairly emphatic: whole arm movements or major changes of posture. supplication. intended. unavoidable aspects of human intercourse. even from nation to nation. subconscious or unconscious. in the Iliad. Conversations at this range expect intermittent eye contact and facing bodies (unless the participants are in motion). Every narrative perforce indicates spatial relationships. and the client. and Thetis soothes Akhilleus as Athene strokes her favorite earthling. The “kinaesthetic sense of closeness” varies from culture to culture. The voice remains at normal volume. four to seven feet. and even between ethnic sub-divisions. as in the Attic theater or the American presidential inauguration. Social distance. facilitates impersonal business and casual social relations. is discussed in the appendix. The spatial envelope determining crowded or pushed or claustrophobic feelings varies West to East. the intimate zone (352. At this distance. in the intimate zone (126). Idaios.80 Donald Lateiner Akhilles and Briseis take their rest (676). Proxemic behaviors cut across all the categories described in chapter 1. In this section. One can still physically dominate the interlocutor. then he and the imposing father share a meal. Hekabe’s help for Priam. Hermes as Priam’s escort. social space. Akhilleus acknowledges the enemy’s suppliancy but gently distances Priam from himself by force (508. 671). move apart. 515). just as closely (283). largely unverbal understanding. 82–84). although this act primarily confirms. 553). out-of-awareness set of rules) shifts— because of Priam’s location—to a different pattern. Priam supplicates Akhilleus. they separate for their nightly rest. Priam’s reluctance to do so reflects his desire to maintain the proxemic pressure. 515. Iris’ message delivered to Priam.Probe and Survey: Nonverbal Behaviors in Iliad 24 81 Priam. then bidirectional hand-work (478. Normal heroic conversational protocols also involve hard looks and smiles at the personal or even social distance. He sits on his couch. an intimately shared. successful supplication performance. The close but untouching personal distance measures the herald Iris’ approach to Thetis. Priam defenselessly apposes himself to his son’s killer. So does Akhilleus’ parentlike setting of Priam on his feet again (515). the heroic principals. Proxemic procedures articulate phases of their difficult interaction and now signify the completion . 508. a startling violation of protocols between enemies on and off the battlefield. Such elevational alterations create a different distance. in a ritual mode. keep his distance. Priam chases off male relatives from his home at even this unwelcome proximity (247–52). after Akhilleus returns from loading Hektor’s corpse on the wagon (597). Akhilleus inside. Posture. and body orientation that on other occasions would be rude. Distance talks. different postures and bodily orientations. Priam and Akhilleus. Thetis’ approach to Zeus. his housekeeper’s assistance in ritual. and thus a different situation and ethos (522. or likely to invite attack express urgency and extreme emotion in Akhilleus’ tent (Ekman and Friesen 1969b. They become companions in warm food and in cold grief. he has expressed proxemic need for “personal space” and reduced for himself the “volume” or intensity of Priam’s unanswerable plea. distance. The usual regulation of verbal back-and-forth interaction between the unacquainted (an almost involuntary. and Priam and his herald outside the shelter (673–75). Social distance positions the leisured Olympians’ table-talk that opens Iliad 24 (32—Apollo’s dinner speech). cf. That “claustrophobic” reaction also impels him to insist that Priam be seated—that is. Interchange of a fixed gaze (face-work) conveys instant sympathy and rejection at the intimate distance. ill-mannered. from intimate to personal to. finally. Finally. Akhilleus’ warriors remain at this distance to mark respect for acknowledged hierarchy and their companion’s will (473). then they touch each other—first unidirectional knee-grasp. and Akhilleus’ unusual permission for his two closest comrades’ presence at dinner. So space as well as posture structures this essential reintegrative ritual where social bonds have never existed or have been ruptured (Thornton 1984. and the poem closes with “a full traditional supplication . dishonored on the battlefield.. Priam could not express his urgent plea beyond the intimate zone. however rationalized. Control of Trojan land constitutes the plot’s immediate incentive. inside Agamemnon’s house. This central and crucial encounter of Iliad 24. the necessarily “sticky” ceremonial of enemies’ restoring intercourse and face-to-face valediction.. 141). Supplication. The spatial aggression and unexpected proximity communicate his urgency. Agamemnon’s “space becomes offlimits. Akhaian burial celebrations begin the book that ends with the end of another publicdistance burial ceremony. pervades the Iliad. he violates the territorial integrity of the violator. Akhilleus’ claustrophobia and impotence are little diminished by gestures attempting to break Priam’s ritual hold. Priam’s intimate visit with Akhilleus. The embassy to Akhilleus is the most extensive supplication in ancient epic. The poem opens with Khryses’ failure with Agamemnon and success with Apollo. indeed intimately sharing his bed (1. in the fullest ritual detail. the unquenchable shoulder-to-shoulder feasting above (98–103) and the mournful public-distance gathering and obsequies below. When Priam enters the Akhaian’s lodge. Thetis’ suppliant request at the knees and chin of Zeus sets the plot in motion. while standing.” He mercilessly taunts the old man with distance: he must not come near again. “big fool” Patroklos. avoids “morning after” problems. a ritual partly dependent on elevational and proxemic protocols. where no plea can be . holds by force a delimited beachhead. the departure of Hektor’s mortal remains. semisupplicates Akhilleus (16. At the crisis of the Akhaian defense. Proximity is an essential factor in every case (except Khryses’ prayer to Apollo. with Hektor lying far away from his parents (211). 120–29. Holoka 1992. The midnight distancing. just as gestures of “full suppliancy” communicate nearly unlimited deference to his son’s killer.82 Donald Lateiner of intimate business.” Physical contact establishes a particularly awesome bond between suppliant and supplicated. Homer characterizes variously stressed participants and situations by the use of space.46–47). 117.26–31. “squatting” on Priam’s Trojan territory. Book 24 begins with the end of the Akhaian games at public distances. Akhilleus. 138. where the man-God situation allows certain telephonic fantasies). his daughter will be far away. 246). is bracketed by the social events on Olympos and the public mourning in Troy. Book 1 began with the public-distance confrontation of a local priest and an alien army but ends with the intimate distance of Zeus and Hera in bed. The proxemic coup limits Akhilleus’ options. and psychological appears as shared. Some situations stymie him. Perhaps this is why he finally succeeds where the priest Khryses initially had failed. but with our sympathies reversed). if not courteously. He rigorously adheres to his code and calls to account those who try to elude it.366–80) failed to extract from Akhaian Agamemnon. The last generation of scholars. Phoinix. social controls exist in the situation rather than in the person. Dodds. following E. as well as more “transparent” gambits like smiling. Others speak of situational as opposed to psychological analyses. Trojan elder Priam exacts from Akhaian Akhilleus by touch (haptics) and proximity his child that distanced Khrysan or Theban elder Khryses (1. What seems to us private. Agamemnon publicly threatens to come personally to Akhilleus’ lodge to seize his subordinate’s prize. inward.42 The personal element is subordinated to communal norms or is expressed through ritualized or public acts. brought to awareness by authorial description. tells us what they feel. The text conveys the latent messages of “real” life. and even logical arguments suggest that Akhilleus will persist in violating the heroic code. secular. Odysseus.Probe and Survey: Nonverbal Behaviors in Iliad 24 83 barred. not directly expressed emotions—if such a thing is even imaginable (and I doubt it). While boasts. In many cultures. The flawed stratagems of Agamemnon lead to the more gravely flawed responses of Akhilleus (a pattern repeated for Telemakhos and the suitors. Briseis (Il. taunts.185). and Aias describe. Human negotiations in any case are constructed from each culture’s own toolbox. A sympathetic response to the challenges of the Iliad recognizes that humans of every culture and era always respond (in informal quarrels and flirting as well as at formal weddings and funerals) through socially recognizable and acceptable forms. In their visit to Akhilleus’ lodge in book 9. Sometimes he manipulates these rules cleverly. The Homeric example includes tools like scepter hurling and dirt smearing. with increasing fervor and effect. stroking. contrasted these “shame” cultures to “guilt” cultures. The way characters “handle” time and space. In Akhilleus’ lodge. the institutions and code of heroic behavior. his actual behavior carefully conforms to it. 1. and (ethologically constant) horripilation. outwardly experienced. while others are more actively or passively affect-revealing. Some acculturated reactions are ceremonial.R. often one observes both together. The act would doubly . if performed correctly. gestures and spatial manipulation introduce and embody messages about helplessness and compassion. Akhilleus’ social space teems with ceremonies and restrictions whose limitations he perceives. and “social” in the Homeric poems. to his own advantage. He knows his proper “place” and the limits of his social freedom. often automatically and rarely after thinking. these negotiations of self-presentation restore honor to the dishonored interactant. his spatial. offer effective tools from the heroic toolbox. Agamemnon’s change of heart is limited (9. The civic reception of the body is followed by family mourning in public (707–20). proposes delegates.” Latin rite) dishonors Akhilleus. Making the first move. that is. Akhilleus rigorously adheres to the warriors’ code. 9). Priam’s palace courtyard. when he realizes it is past time to make amends. displacement of self.44 Priam performs the sacred institution of supplication to perfection. public distances of state funeral. the reasons are quite different from those that his peers or many modern readers are able to imagine. Nestor. distribute. are present.” But the ceremonious element is not a frill but is essential to heal the rupture. isolation is the most politic response (and the Olympian preference voiced by Athene) to his humiliation in Iliad 1. no adequate faceto-face personal admission of fault here or even later (Il. and supplicate rightly and ritely (“duly. to offer apology and restitution (Il. “The power of this sacred institution [of hiketeia] is inescapable. and threat and apartheid. Within the heroic code.51. The situation forces unromantic and uncomfortable Akhilleus to maintain his honor. Akhilleus’ return does not hinge on and does not result from Agamemnon’s material and paternal generosity with a “catch” (18. titrated insolence or deference to subordinates. Agamemnon’s late(st) arrival and his remaining seated omits the essential approach of the party in the wrong to the offended party. Invective and boast.160–61). and vaunting). More importantly. 137–50). In sum. Akhilleus rightly calculates that the apology is spoiled. women from outside the family. When he eventually accepts Agamemnon’s contorted. he again chooses to avoid the personal visit later. defective formalistic apology. he expects to keep his social “face” intact and his haughty (and safe) “distance. In that crucial scene of rapprochement. and direct.67. Zeus never faults Akhilleus’ behavior in the quarrel with Agamemnon.84 Donald Lateiner violate the lesser basileus’ intimate space. and the whole community echoes .111–15. Other mourners. Only an abortive ceremony of restitution of property by proxies occurs. for prudential as well as ceremonial reasons. open-sky. flawed. ergo social. 76–77). and Akhilleus’ lodgings. 19. Agamemnon’s repeated failure to apologize. Agamemnon repeatedly violates it (by apportionment. outdoors to the cooler. Thus.43 He does not come in person to Akhilleus then. in anticipation perhaps of both the delicate negotiations to come and the commander’s clumsiness. 19. Agamemnon never opposes the convenient idea. face-to-face apology are necessary elements in negating offense. Akhilleus experiences no complete social and public ritual. by face-to-face challenge and by theft of a gift “freely” given.”45 Iliad 24 moves finally from the enclosed intimacy of the Olympian clubhouse. The privileges of shared space signal sorrow or joy. Groans punctuate and articulate the grieving (591. I N F O R M A L B O D Y L A N G U A G E The nonverbal behavior that we most consciously notice consists of the illustrative and emblematic gestures. As any funeral and burial separate the bereaved survivors from the deceased.127). the extent of their body-envelopes. and the degrees of their penetration of others’ “turf. 776). however. 802). obviously within the intimate distance. 703). private. Iris’ whisper transmits an intimate. Three women lament Hektor in tearful voices (746. Priam’s beating another person (247) communicates his mood and attitude.46 . a paralinguistic sign of demonic inspiration. especially the second half. 5 . it communicates sympathy and satisfies the affectionate parent’s need for closeness and touch (haptics). his anger and hostility. as king. doom. While Trojan and Akhaian protagonists voice grief in eloquent words. When Thetis strokes her sole child (24. so-called paralinguistic phenomena. Touch generally provokes more response than equally conscious modulations of the voice—meaningful. or both (200. The Odyssey. In cinematic jargon. 760.802). the act is both intentional and in-awareness. and sounds that one subject intends to send to another. 790. Kassandra the prophet also shrieks. and the townsmen gather for the cremation and consequent funeral banquet (777. their bodies—by position and distance—also eloquently articulate inner states and intentions. so Homer separates the hearer/reader from Troy.AWA R E N E S S . Finally. Both Homeric epics “comment” unobtrusively on protagonists’ acts by noting their mobility or lack of it. 696). 170. Priam.” They achieve physical proximity as prerequisite to spiritual recognition. at a reintegrative banquet (24. while it (more instrumentally) inflicts pain. I N . physically as well as emotionally. beyond a public distance. Homer mentions affective larynx effects. postures. revels in the intricacies of space manipulation (see chapter 7). orders the assembled soldiers to pile wood for the obsequies. 786. Touch by hand or mouth is a conscious and intense mode of communication.Probe and Survey: Nonverbal Behaviors in Iliad 24 85 Helen’s lament (776). it withdraws even farther. and privileged thought. to the noncommunicative dispersal. then draw back to the social and public distances of the living Trojan community in mourning. The shrieking pitch and raised volume of Hekabe’s voice express frustration and intentional violation of normal female vocal expectations. The community’s social dynamic automatically carries life forward after the leader’s death. the final scenes of Iliad 24 hold tight focus on facial close-ups at the intimate and personal distance in Akhilleus’ hut. relative to the other types discussed in this chapter.179–81). the “dark” glance threatens an inferior. Astyanax had earlier “screamed and shrunk back” from the extended hands and helmeted face of his fiercely armored father. meanings depending on who does it to whom.86 Donald Lateiner The eyes are as eloquent as the voice: the locked gazes of Priam and Akhilleus communicate their mutual awe. The husband ceremonially grasps his bride’s wrist during the marriage rite as a sign of control. The child’s nonverbal behavior transmits an age-based. infantile feeling: uncomprehending fear (but nonetheless suitably clairvoyant. even opposite. karpw÷Ç). Informal and informative. father Zeus laughs at her situation).47 Responsibility of affines. 51–52. Hera visibly reminds Artemis of her “minor” or inferior status and reproaches her as a naughty child (21. indeed assert their control over Priam’s postures and distance.or wrist-grasp. Hermes and Akhilleus both guide Priam. The female (gendered) correlate is to cling to the arm of a spouse or man-child. 3. Hera grabs Artemis by the same wrists with one hand before boxing the child’s ears. the act betrays their tact. This Akhaian who someday seizes Astyanax to hurl him to death performs an instrumental act. cf. legal control. grabbed by an overpowering Akhaian (22. symbolic intent.48 An eloquent. “Telling” laryngeal and ophthalmic behaviors. 9. ritual.491–99). and gendered power and dependence are signaled by arm-grasping hands. Now she predicts his death. but communicative. exchanged glances and maintained silence among Akhilleus’ henchmen preclude the need for authorial analysis of heroic psychology. Andromakhe earlier predicted that a Trojan would someday thrust her orphaned son from the communal table. Thus. Similarly. nonverbal. Cic. persuasive to participants and compactly communicative to the audience.221 or Nestor’s knowing glance at Il. Ascribing ostracizing. He remains frozen in bereavement until Priam holds up a mirror of equal grief and breaks the spell.466–70). This example makes clear that one gesture can have different. de Orat. at 508.” to accept a displeasing reality and get on with life. 484. specifying ejpi. Here. while reassuring him verbally and nonverbally of friendly attitude (361. is this hand. Thus. 559. 671–72. their continuation symbolizes Akhilleus’ pathetic inability to “snap out of it. Hekabe’s verbally expressed wish to eat Akhilleus’ uncooked liver more likely preserves a popular idiom of cannibalistic hostility than a description of real. 515. . 417–18) meant more for his mood earlier.489–92. informal gesture in Iliad 24. References to Akhilleus’ semiritualistic warrior-trophy displays and then mutilations of Hektor’s corpse (15–17. and with a provocative smile. in-awareness nonverbal behavior is rare in Iliad 24. in book 22. audibly and visibly convey attitudes of protagonists and “extras” both to internal and external audiences (629–32. 6. not lengthy descriptions of emotional states. 80. [T]alk suppl[ies] only part of the message. 102). Equanimity. 24. It is not episodic or extraneous but essential to the drama and to the expression of individual and group personality. not of epic poets who portray the power of passions.Probe and Survey: Nonverbal Behaviors in Iliad 24 87 but the death of the young prince. and understood by all” (Portch 1985.347).g.. In 1927.. 8. the verbal] is backed up by other systems in case of failure.. Andromakhe’s anticipatory fears for herself and her child arouse pathos. real enough. 8. 16. 305. When Odysseus alleges that the bard Demodokos must have been present for or must have heard from an eyewitness his account of the sufferings of the Akhaians. Nearly automatically and unself-consciously. it provides counterpoint and emphasis. the praised vividness and authenticity derives (in part) from his report of nonverbal behaviors (e. . 23. It fleshes out narrative and description. 310. CONCLUSIONS Nonverbal behaviors provide humans and other sentient creatures with a necessary redundancy: “information received from one system [e. it contributes to the varied texture of their mimesis. 7). The preliminary gesture and the aborted embrace characterize the intimacy of Homeric families and companionate marriage. nearly instinctual gesture of need serves as another synecdoche for Hektor’s indefinitely needy condition and unfulfilled love. while artful and calculating Aithon/Odysseus explicitly represses and defers his. confirm feelings by act. The unrealized. for Trojans as for Ithakans (743.207–8. They deploy it frequently.. emotional stability. 17. Edward Sapir ignored achievements of literature. The ancient epic poets find nonverbal behavior a succinct and distinct dimension for their characters and action. these characters express grief. known by none. and Penelope appears unrestrained. when he elegantly described nonverbal phenomena as “an elaborate and secret code that is written nowhere. momentary.735). Priam. Their sounds. 23. because their extremes of passion and consequent disregard of social convention in these moments present the central action. Od. The rest is filled in by the listener” (Hall 1966. in his final moment before dying. The greatest grief of Akhilleus. gestures. 291.240.527. No less passionate is her lament that Hektor had no chance to stretch out his arms to her at home. and advance the narrative toward the next development.38. on his death bed. 6. Od. supplies a synecdoche for the death of the Iliadic community (24.. Such dramatic coloring speeds or slows the narrational pace. and self-sufficiency are themes and ideals of philosophers. and collapsed postures are vivid and economical communications that reveal psychological states.214.g. removed from the blasted. in some sense. theme.51 Homer operates with patterns of formula. Nonverbal behaviors identify emotions and their intensity. adds depth to the Homeric stage. narrowed in its channels to become comprehensible by strangers unfamiliar with an individual and his idiogests. as well as for considerations based on the nature of oral epic performance. the coordination of bodily kinetics with strong feelings (as in family feuds. and dramatic construction. in part because the final book swaddles us in ceremonious reintegration and closure: the gods and men. intelligibility. would possess this power or convey such ethos. tragic characters. contributes importantly to Homer’s preeminence. texting. Gestures also structure his world and ours. The lesser authors of the later epic cycle seem to have employed a thin and flat diction. some deeds. since verbal accounts. must be selective. often depicted by Homer. barren fields of battle and brutal Olympian bullying. and drama. and some words “deserve” attention. never perfunctory. and fantastic elements of romance. No mere chronicle or summary. Nonverbal behavior. In critical situations. truthfulness. like any other.49 All nonverbal behavior reported in literature is. all normally capable. posture and gesture have a propriety. that is nondyssemic humans employ them daily to supplement or replace words and to ease and effect interchanges with others.50 Who communicates what to whom and how are questions essential to any reading of the epics. the medium. Furthermore. the dead and the living. His range of nonverbal behavior is unmatched. seldom if ever before appreciated by Homeric critics as a ubiquitous element in the epics. In particular. and creative expressiveness of their own that transcend words. They articulate the soul through the body.52 Few traces of nonverbal behavior can be discerned. 344. Iliad 24 includes all major categories of nonverbal behavior but is richest in ritual (category A). The family unit reasserts itself in the intimacy of human habitats. and even the Akhaian besieger and the Trojan besieged. and its occurrence. three-dimensional image that neglects few descriptive and narrative techniques.88 Donald Lateiner 324. He is “persuasive” because he produces a rounded. Homeric “facts” are often nothing other than nonverbal behaviors. They lack the delights of direct speech. conventional. 361.” Every teller’s narrative strategy selects certain significant facts: only some behaviors. Even the modern kinesiologists’ fixed-focus video camera has a more limited scope and sensorium than a live interactant. requires “channel reduction. and mourning procedures) can . Many nonverbal behaviors are easily controlled. 505–6). and type-scene for purposes of literary coherence. parting. devoid of persuasive speech or insistent gesture. 366. uninspired repetitions. For instance. 223. His meal sharing and conversations in book 9 confirm social solidarity and accepted reciprocity with select Akhaian leaders. This nonverbal initiation deserves separate analysis. e[n t Δ a[ra oiJ fuÆ ceiriv (6. 62. 152–54. 616. 4. Or. general attitudes. 3. Lykaon appeals to the bond of former clemency (Akhilleus already owns a debt) and a meal once shared with his killer-to-be (21. Nonverbal ceremonies of the happier past are briefly mentioned: Trojan dancers and singers (a negative reference). All other human business momentarily becomes peripheral to unarguable death. Lohmann 1970. In book 24. a study of “palindromic structure” (271) in book 24. cf. 613.” Oral literature is thus the richer. 32. Their joy counterpoints the doom-drenched present (261. Compare passionate handclasping formulae. Foley 1990. Od. J. explains “plastic compositional units. Display rules for betraying pain and sorrow vary widely cross-culturally. immediate conscious responses. on dance. and the dancing nymphs of Akheloios.Probe and Survey: Nonverbal Behaviors in Iliad 24 89 have either centrifugal or restorative effects. note Visser 1991. 627–28. 803. 123–26. The ritual celebrates (guest) inclusion before the first shared meal. as Waern 1985. notes: am meisten weinerlich. and Whitman [1958] 1965. Repair of persons emerges in Iliad 24. esp. Motto and Clark 1969. NOTES 1. 2. 63. 16. 243. 5. Nonverbal behavior. 257–60. also Saïd 1979.253 and ten other passages).” Book references in this chapter apply to the Iliad. fourteen times in the Odyssey. see Quint. where the nonverbal expression of emotion italicizes the inherent pathos. 130–31. 6. Akhilleus earlier (19. Finley 1978. formerly and formally certified by nonverbal rituals. references without book numbers apply to Iliad 24.. “silently” supplies another. 12–30 discusses its use in speeches. introduces patterns of heroic conduct. Akhilleus’ sex life. His later failure in supplication marks Akhilleus’ exceptional rejection of hallowed and civilized xenos-bonding. Griffin 1980. 1.136–40) or type-scene. . 11.76). chap. 5. 641–42.53 Occurrence of nonverbal behavior in Homer. Certain authors. transmits essential expression of individual and communal attitudes and feelings. More recently.200–210) unyieldingly rejected food and ransom. see Macleod 1982. more attention than philological identification of traditional verbal elements. a “hidden dimension. Odysseus is the most frequent weeper. then. and unconscious feelings. verbal information-sharing.3. Apollo’s lyre playing.66). summarily reveal by nonverbal behavior significant signs of character and interaction. formulae for ritual hand-washing occur five times in the Iliad. 102. Homer’s balance and ring-composition are described by Myres 1932. From the huge bibliography on shared meals and their rituals. on feasting. Inst. the Phthian hero’s paralyzing grief balances King Priam’s hyperkinetic sorrow. whether underlining or undermining. following Homer. six times with an identical five-line cluster (e. and communal healing. Edwards 1987.g. Our bodies and voices suggest or assert that which the speaker fears to declare or cannot find words for. and the student of ancient personality and social life uncovers enriching contextual information. independent and cooperative channel of communication for characters’ status. 14. with 16 n. 91–95. 578). lists Homeric protocols for greeting strangers. the momentary reality. Further. Motto and Clark 1969 argue well for the Phthian’s observance of Akhaian etiquette in every particular. Macleod 1982. 30. The English language seems less endowed with nuance for grief language as well as for funeral procedures and nonlexemic. Gould 1973. The point is lost in many translations. 1 for references. Priam on a stool (515. 100. 387–406. 16. 845.573–75. esp. Odysseus’ refusal to eat Kirke’s food until his men regain human form (Od. consider the Homeric head-holding gesture. on anticipation. Kakridis 1949.” The exigencies. 18. 20. not to mention the antiseptic and lonely deaths we choose to endure in modern hospitals. Macleod ad loc). The imbalance of power extends even to their seats: Akhilleus sits on a throne. chap. Houston 1975 on Odyssean seating. and the periods are one day wrong. 39 lists all Homeric examples of supplication. section 2. however. For notable millennial continuities of gesture in Hellenic funeral lament. 20–21.483–87. Considering supplication in Attic drama clarifies this point about the power of “compelling gestures. “Seating in prominence. see Alexiou 1974 and Danforth 1982 with photographs. 132. deprecate “theatrical” bodily gestures of respect and bodily contact in public in favor of “face-work”. 16–171. Gould 1973.110. Modern Westerners. formal manifestations of grief. 17. cf. 24.222–23. 19.” Exceptional book 24 perhaps questions this rule. of hearing and seeing in the large. 3. successful supplications include Thetis’ requests of Zeus and of Hephaistos to honor her son. See Pitt-Rivers 1977.131. 10. and Lowenstam 1981.90 Donald Lateiner 7. 15. open theater of Dionysos entirely invalidate . Reciprocal wonder (629–31) and mutual esteem indicate their equal heroism. 98. Thornton 1984.383–87). Rose 1969. here is weighted by a unique context. 553. 3.127–28. an essential study. Williams 1986 considers Odyssean parodies of the pattern. Elsewhere the word “to his death” appears only twice. Hera also gets her way with minor gods. 8. Human-divine encounters are sometimes bracketed by the poet with comments on divinity’s opacity to men (Il. with Macleod’s note. 7. section 4. and chap. Gould 1973. Goffman 1967a. especially those on the North Atlantic rim. 116–19. Female hair tearing often appears on roughly contemporary Attic Dipylon vases of the Geometric period. 245. Thus. 67–75. 553. but not earthling. see Firth 1969.161. The actual burial rites in 783–803 are slightly different: no cremation had been mentioned. 100–101 examines the greeting of close acquaintances.” a prominent detail of even the most conventional feast. 19–23. cf.501–14. 4. 20. G. Edwards 1991. observes that gods “do not customarily even appear to men in their true shape. Gould 1973. 5–45. 3. 76. Od. 80 n. Priam responds to Akhilleus’ inquiries about death rituals in ancient Troy (664–66). 5. 60–61. cf. 93. cf. part of the luxurious grave goods for the dead. 138–41. 100. Other. 21. This poverty may mirror North Atlantic reserve in self-revelation and graveside practice. 9. 139–40. Driessen in Bremmer and Roodenburg 1991. 10. 13. chap. on how honor is gained by being paid to a superior. 17. Clay 1983. Goody 1972 and Firth 1972 survey cross-cultural greeting rituals. Cf. Thornton 1984. 11. Levine 1982a. 9. 10. Macleod ad 463–64. See also. 94–95. 16. also Pedrick 1982. 32–35.653–56. M. of (other) great warrior heroes: Patroklos and Hektor (328. 12. e. summarizes ancient references. and medieval romance. Quintilian opines (Inst.” Nonverbal features are also mentioned: Thersites’ ugliness. limited categories. They share insolence in word. often into more precise. and winged verbal realms generate mythic figures. neatly demonstrates how the Odyssean suitors and the established beggar Iros comically mirror each other.111–12. Od. 11.3. differently divided by semiotic. cultus.55. 23. see Redfield [1967] 1973. Cic. chaps. notes that two-thirds of the hexameters consist of direct speech. paraverbal. the last line includes Odysseus’ sarcastic rebuke of his inferior’s putative status claims to obtain the speaker’s floor: “Thersites you thoughtless speaker.” The Romans divided its materializing power into vox (paralinguistic phenomena).g. 153. religious. demeanor. “gesture means more than the words themselves. gestures enliven the narrative with “incidental observation” (159). not on characteristic idiogest—idiosyncratic. Young Pisistratos opines that mourning is the sole geras. 19. “Ares and Aphrodite Get Caught” (Od.389.. Inst. 573–80. nail biting. 30. shouting. are well defined and explained for my purposes in Ekman and Friesen 1969b and some later textbooks.518–22. philosophical. a constructive source of song and story (19. 17. of humans at Od. Spitzbarth 1946 (non vidi) and M. coughing. and literary. In addition. see also Holoka 1983. Nonverbal behaviors in Chaucer do not offer cognitive self-awareness or self-analysis (143) but supply emotional leakage that gauges sincerity of characters’ words and deeds (151). 17. catalogs facial expression and orientation. Volkmann 1885. 28.476–94. The narrator characterizes the verbal content and style of Thersites’ speech as “unmeasured. 29. pleraque etiam citra verba significat.). Edwards 1987. and amusing to the troops. psychological. 22. and linguistic specialists.2. For example. 88–97. Od. gestus (= motus corporis). 11. unorganized. because interest focuses on decisive acts (such as Chaucer’s kneeling and fainting). shrill.496–99. 23. disorderly. Benson 1980. emotions expressed through the nonverbal. 23. Burgoon and Saine 1978. Odysseus and Iros contest for a monogamous relationship to the suitors.” 25. gesture. indecent. Petronius. 8.. Or. Roman fictions (e.195–99.212–46. The technical categories. vultus. 24.407–12. 10. vultus (facial expression). Vox.” See 2. esp.” 41–58. 9. 15. Thus. In ancient epic.266–366) provides another comic misadventure. Poyatos 1986) divide the phenomena differently. gestus] . .Probe and Survey: Nonverbal Behaviors in Iliad 24 91 attempts to draw any conclusions thence about ordinary body-talk. M.g. as the suitors contest for sole possession of the imaginary bride. and cultus (= habitus corporis. and offensive paralinguistics— “scolding.. or posture). and deed..” 26.304–5.1–14. Or. fewer examples of such incidental data emerge.g. Is [sc. Other studies (e. A. to hagiography. “Gesture and Genre. honorific prize. Quint. this time a divine interlude packed with nonverbal embellishment between Demodokos’ two tear-evoking human (Trojan) tableaux. 22. however. and Apuleius) offer more material for that aspect of ancient literature. 27.9–13. 24. from Seneca Maior. etc. 58–67. see Levine 1984. abusive. on mourning as a source of delight and a mastery of sorrow. contrast Eurykleia’s incautious moves at 19. however clearly and easily you orate. Fingerle 1939 provides statistics book by book.. Evans 1969. The Clerk’s Tale. Windeatt 1979 describes Chaucer’s deployment of nonverbal behavior as suggestive of inner feelings. 8. symbolic body movement (humming.65) that in public speaking. Levine 1982b.398–401). 65–184 minutely consider gesture and dress.165.3. Il. Or. and gestus must be calculated to suit a serious speaker’s subject and intent. Kaimio 1988 discuss gesture in Attic drama. such as “kinephonographs” and “ideographs. 4. applies contemporary rules of decorum. Skheria. quantifies and accounts for Homer’s oral “expansion aesthetic. Wohl 1993 suggests that even Penelope. 36. dwÆra appears thirteen times. a[poina eight (e. 136. for both. Herodotus in Lateiner 1987. mistress. Fränkel [1962] 1975. on 16. Ransom lexemes emerge once every thirty-eight lines. 10. the ten gold talents of 232). Perhaps the word tevqhpa is related to qavmboß and its verb. Vergil and Ovid employ the Latin equivalent. see Hawad-Claudot in Poyatos 1992a.g. 20 (deleting verse 232). Not only cash value. threatens insecure and distrustful Odysseus. 13. Penelope also deploys appearance to express emotional state: she refuses to beautify. and the palace on Ithaka. Homer contrasts her behavior to Penelope’s: the mistress frequently weeps out of love for Telemakhos and Odysseus. She only presents herself to the suitors veiled and accompanied by loyal servants.92 Donald Lateiner 31. modesty. Griffin 1980. When Akhilleus appears in a book (1. 594). Homer’s “romantic” notion. Other meaningful Homeric projectiles that serve as the social sign can be noted: the stone discus by which Odysseus surpassed the best Phaiakian throw (Od. 19. and Semonides’ epitaphs well display the power of reticence. paralyzed. 37. 10) has explored the expressions of the opposite class of emotions. The offending suitors.793–805: Akhilleus’ helmet. “to be stunned by an emotion.” Akhilleus’ distinctive verbal characteristic along with moral trumping and efficient killing. Macleod 1982. and personal reserve that distinguish her from all other women (18. 32. 220. All other females serve as foils to faithful. silent and numb. 555. neutralizes their apparent conflicts and suppresses our notice of his patriarchal and violent domination. Herodotos 1. see 118–19. or even wash. 23.” “to become stupefied. in another mode.178–84. 207–11). 7 and 11 in this book for Penelope’s proxemics. Griffin 1980. and cunning Penelope. for which see chap. which would add eleven examples. 206–15. possessing productive and reproductive power.409–34. See Fingerle’s 1939 statistics (9–10. Odysseus’ controlled smiles anticipate the suitors’ defeat. . modest.” Lateiner 1992a provides further details.. 139. 9. 197–211. Baldness exemplifies “body badges. The African Tuareg enjoy an entire additional language of male veil manipulation. 33. later. 36–37).. however. he tends to talk more frequently and in larger blocks than anyone else. Odysseus’ tawny hair is set by Athene to appeal to Nausikaa. Levine 1987 (also note his other studies in the bibliography and as discussed in chap. and house. status(?). 38.86. Melantho’s affect displays in particular exacerbate her sexual promiscuity and amplify. as well as tears in the Odyssey. so to speak (e. See Levine 1987. his first grubby and then magnificent appearance. 34. herself.58–84). and his baldness is mocked by Eurymakhos (6. she again ruins it for disguise. 35. 431.” nonverbal expressions of identity beyond the subject’s control.355). Thukydides 7. 94–95). patterns his series of visits: Ogygia. but Priam’s specially won and specially worked tankard (234–37) are packed up— anything to obtain his dead son’s body. the subversive maids. two nonverbal expressions of shame.399.230–31. 29. and even loyal Eurykleia enjoy and exult improperly (22. 18.45 and 7. 38. obstipesco. 24). 18. smiles and laughter. her disloyalty to master. 25. 8. Homophrosyne. The gleeful suitors’ and Penelope’s maids’ laughter reveal their presumption of putative status and blindness to approaching destruction (cf. 19. here worn by doomed Patroklos. 23.186–98) and the suitors’ ballistics. 34.g. as a non-kin female. but these latter words seem to mark the initial surprise rather than the consequent disorientation. Martin 1989. Odysseus’ repeated “before-and-after” grooming and clean clothes sequence. and chaps. they express a justified sense of superiority.225. etc. a type of speech accompanied by tonal nonverbal behavior that Helen says Hektor never used in twenty years.Probe and Survey: Nonverbal Behaviors in Iliad 24 93 39. visible evidence of status. but socially approved. If the color of a stoplight. while ancient poetry emphasizes communal acts. and later. and chairs. 92. verbal fobbing off of blame (19. but the modes are no different (or we would not understand them). The quotation marks remind the reader that no gift is free.” we reject even the appearance of ritual. 8–9. 115. 42. Ekman and Friesen 1969b. low-cut blouses. Thornton 1984. chaps. The contortions of the failing student before a teacher. 85–90 describe further subcategories. the scorned lover. are regretfully excluded from this survey by the criterion of explicit textual evidence. by appropriate tones (101–2). there are self-adaptors. 131–64 gathers remarkable examples of groups misreading other groups’ measures of proper distance. chaps.” 41. 24–26. seated posture (non-elevation) in public assembly. 43. Hall 1959. an object–adaptor accompanied. See Donlan 1971 and 1993.86–90) on innocent gods.212–13. or the “forbidden behavior” symbol of a circle with a slanted diameter line are acceptable semiosis. Combellack 1981. so should be Zeus’ clear-sky thunder or Athena’s varied birds. lip licking. Thornton 1984. 53–56. Epic’s anthropomorphic gods have access to more means of sending messages than humans do. and (out-of-awareness) nail biting. 141 for the quote.29–30). I here disavow solutions to the meaning(s) of divine intervention in Homeric epic (e. such as (in-awareness) perfuming and other grooming. In addition to object-adaptors. One major difference between deployment of nonverbal behavior in ancient and in modern fictions is that current literary convention stresses the idiosyncratic gesture or mannerism. we here can only surmise. Because EuroAmericans want and expect requests to come from the “heart. cf. such as crowns. brandished weapons. as Portch 1985 shows for Flannery O’Connor. note alter-adaptors. but the procedures of a pseudoegalitarian society are designed to seem more informal. including hair. and nonlexical. Priam’s angry. 94–95. 5–7. 119. Clay forthcoming. . scolding words. 47. Gould 1973. chap. nonverbally offensive. Chap. Griffin 1980. In Aristotelian terms. 13. praxis has priority over ethos. 24. To exclude these phenomena from human nonverbal behavior seems harmfully pedantic. 109–10. 44. or the child who wants more television time may illustrate. 40. Similarly. Homer does not specify here the expectable paralinguistic attributes 1248–49. 7 in this book. Motto and Clark 1969. Hera comforts Thetis by means of a goblet of refreshment. such as flirting (coy smiles or close approach with or without touch) and visible signs of impatience (foot tapping or clock checking as at Od. on rank and arrangement.. Martin 1989 on the poetics and pragmatics of power. Furthermore. Modern Americans’ apparently casual rules concerning supplication (favor requesting) are no less elaborately deferential and fixed in sequence. other social phenomena. 45.” cultural fabrication. nonappearance in his first offer of restitution. Athene stays Akhilleus’ hand at the early assembly and advises Telemakhos to get out of Sparta and to avoid the suitors’ assassination squad when approaching Ithaka). the employee about to be dismissed. 767). if not Perikles’ funeral oration. Hall 1966. Motto and Clark 1969. the shape of a highway “yield” sign. nonverbal communicative symbols of our legislatures. 46. Segal 1971. This we wrongly regard as “insincere performance.g. 6 in this book discusses deference and demeanor in Agamemnon’s splendidly inadequate performance of restitution. The paradoxical result is that Euro-Americans are more inhibited in the expression of emotion—the formal rules of informality are too confusing to risk disclosure. 113–14. “leakage. a truism of sociological anthropology. Lateiner 1992b more fully discusses heroic proxemics. esp. Modern advertisements transmit similar gender asymmetry in companionate couple’s power by showing male arms over female shoulders while females cling to males. the average percentage of a book occupied by oratio recta is 56. Lowenstam 1992 surveys the uses of ceramic evidence in Homeric studies. Gombrich 1972. For book 24.7 (Thetis). For clinging to a husband. esp. drunkards.94 Donald Lateiner 48. For the Bible. My total number of speech verses is slightly different. 79–80 summarize results. It is hard to locate and deserves printing. The historian Herodotos. The formula at 18. . now of the Hamburg Lexikon der frühgriechischen Epos. The ritualized and conscious gesture has analogues in primate behavior that may lie behind human formality. it has become difficult to disseminate effectively a less misleading taxonomy. 53. see Lateiner 1987. by the wrist and hand. 49. Cf. etc. the very young. 58. For other variants see 18. the speakers.406. Griffin 1977. Goffman 1976. Tabulated book-by-book statistics on the number and location. 50.” and illustrations 24. 131–32. etc. and length of speeches. 14. cf. All these creatures are subject to patriarchal authority. Gruber 1980 offers a detailed survey. the Attic orator Lysias. This self-evident assertion. 36–37). The gendered act characterizes this exchange as surprisingly urgent and conveys his hierarchical superiority in the divine pecking order. 377–82. For clinging to a man-child. in need of guidance. cols. 2.” Auerbach claims that Homer puts everything in a perpetual foreground. In post-Homeric Attic vase painting (as Neumann 1965. 52. in part by employing negative and metaphoric terminology like nonverbal. My graduate school colleague and Homeric companion William Beck. The unthinking prejudice of our hyperverbal culture has misstated the topic’s unappreciated importance. 59–60. the type of speech. I first developed some of these generalizations in an unpublished comparison of Iliad 24. uniformly illuminated. and Plato also realized this power and indeed borrowed it from Homer. 1. prisoners. and brides. 162b–163b. or both.22 percent. 36–37: 804 verses contain 47 speeches composed of 452 verses (Fingerle wrongly typed 252 on pp. The average length of a speech is 9. where “thoughts and feeling [are] completely expressed” (9). as Daniel Levine points out to me. contradicts the influential formulation of Auerbach 1953. He indicates ethnic differences between Near Eastern and Anglo-Saxon usages. consult Fingerle’s pp.258. Od. 14. body language. Sittl 1890.384 (two women greet each other). men continue to lead. “Odysseus’ Scar. Vergil Aen. notes). For Herodotos. for both Homeric epics are collected in the valuable 1939 dissertation of Fingerle. pp. supplied extracts and tables from this valuable study. Fingerle compares numbers for the entire epics in various useful ways on pp. 18.62 verses. internal audience.” “The Ritualization of Subordination. see 6.253 (Hekabe) = 19. 83. chap.232 (Hera greets Sleep). “Function Ranking. At this point in the development of the field. 51. etc. and Ovid Met. see Andromakhe at 6.423 is applied to Hephaistos’ greeting Thetis. the very old. 48–53. 68–78. see Mackie 1899. what needs more consideration is the question of the criteria that determine whether a Homeric figure is presented as psychologically active or passive.CHRISTOPHER GILL Achilles’ Swelling Heart Everything that you say seems to be acceptable. To make sense of the type of conflict expressed in these lines. This brings up an important methodological point. controlling and unifying ‘I’. 95 . 645–8) hese famous lines begin Achilles’ response to the final appeal made to him in Iliad 9. ©1996 by Christopher Gill. but my heart swells with anger when I remember the disgraceful way Agamemnon treated me. such as ‘spirit’ or ‘anger’. with no central. we need to place the lines in the context of the psychological language used by the three men appealing to him. in effect. that of Ajax. a crucial consideration in Homeric dialogue is that of the ethical attitude adopted by the speaker when he characterizes the psychological state in question. as though I were some migrant without status. 9. that of a field of internal and external forces.52 Subsequent scholars have qualified this claim. Snell claimed that the Homeric picture of man is. As in the closely related topic of self-identification and distancing.53 However. that affect him. Tragedy. (Il. pointing out that Homeric vocabulary does sometimes present the person (expressed as ‘I’ or ‘he’) as having control over the psychological ‘forces’. and Philosophy: The Self in Dialogue. The selection of the psychological mode (active or passive) cannot be explained T From Personality in Greek Epic. which is correlated with the emotion) in response to certain reasons for doing so given by the speaker. In Greek philosophy. type takes the form of urging the addressee to control an emotion (or a psychological ‘part’ such as thumos. the selection of the psychological mode deployed cannot be explained without reference to what a speaker sees as a ‘reasonable’ pattern of behaviour. More precisely.1 above. This way of putting the point underlines a second general consideration relevant to these passages in Iliad 9. These include the idea that human beings are.96 Christopher Gill without reference to the type of attitude and behaviour which is presented as normative by the speaker. though using differing modes of psychological discourse. Achilles is subjected to various types of appeal. all presuppose that his emotions are informed by his beliefs and reasoning. This mode of appeal is often combined with an assumption of ‘fatherly’ superiority by the speaker over the addressee. psychologically cohesive in so far as their emotions and desires are informed by beliefs and reasoning (3. I noted earlier certain parallels between Greek poetic and philosophical psychology which are relevant to the understanding of Greek poetic models of psychological conflict. text to n. and that the latter can be affected by their presentation of the situation. characteristically. the basis of the conflict expressed in Achilles’ famous lines. In the course of Iliad 9. or without reference to the judgement that he is making about his own. this topic is one on which conflict may arise between conventional and reflectively-based beliefs about what should count as a ‘reasonable’ response. The first. the producer of evils. and put an end to strife. Odysseus prefaces his report of Agamemnon’s offer of compensatory gifts by impersonating Achilles’ father. and most straightforward. or others’ behaviour. so that you may win greater honour among the Greeks. by reference to this norm. each of which combines a particular mode of psychological discourse with a particular ethical stance.54 To put the point differently. they presuppose that his belief-based emotions can be affected by their judgements about what counts as a reasonable response and about whether Achilles’ present stance is reasonable or not. for friendliness is better. as a way of assuming the authority to give the younger man fatherly advice. He couples this with advice of a similar type . and this assumption also informs the phraseology of Achilles and his interlocutors.57 He attributes to Peleus these parting words to his son: ‘restrain the great-hearted spirit in your breast. 12). I think.56 Thus. and this is also. Peleus. Although there is no single Homeric equivalent for the idea of ‘reasonableness’. The three men appealing to Achilles.55 Homeric discourse anticipates the prevalent Greek philosophical assumption that patterns of emotional response can be characterized as acceptable or unacceptable by reference to shared ethical norms for such responses. both young and old’ (255–8). Indeed..59 The appeals of this type presuppose that the addressee is. Phoenix refers twice to his own quasi-paternal relationship to Achilles (one endorsed by Peleus himself ) as providing the basis for urging the younger man in these terms: ‘conquer your great spirit.Achilles’ Swelling Heart 97 given in his own person: ‘. The main point of Phoenix’s story of Meleager is to show how the latter responded ‘unreasonably’ in the way that he gave up his anger. stop. the use of psychologically passive vocabulary seems to signify an intense or impulsive emotional response. in principle. ‘reasonable’ response that Phoenix urges Achilles himself to give. 598). as elsewhere. imperatival form of this appeal..60 The adoption of fatherly authority is naturally coupled with the direct. you should not always have a pitiless heart ’. the use of this mode forms an integral part of his overall ‘fatherly’ appeal. Meleager’s eventual return to battle is presented in similar terms: ‘His spirit was aroused as he heard of these terrible events . Agamemnon offers worthwhile gifts if you abandon your anger’ (260–1). able to exercise control over his emotions (that he can ‘restrain his spirit’ or ‘abandon his anger’) if he is given sufficient reason to do so. as a result of his experience of properly conducted social interchange. angered in his heart ... in his elaborately structured speech.62 a point underlined by the contrast with the normally ‘sensible’ minds of those involved. Here. he forfeited the compensatory gifts and honour that he would otherwise have gained (598–605). and both types of expression are in pointed contrast to the psychologically active.. like that of Odysseus. It is also naturally coupled with the implied assumption that the speaker is able to specify what constitutes an appropriate emotional response to the reason given.’ (553–5). lay down your spirit-grieving bitterness. the use of an allegedly appropriate parallel . Meleager’s responses both in his anger and its cessation. and how. is based on the prospect of enhanced honour (time) as well as gifts if Achilles renounces his anger in return. whom he uses as a cautionary example to deter Achilles from persisting in his wrath. are described in passive terms. even if their minds are sensible. [and so he returned to battle] giving way to his spirit’ (595. Phoenix employs a different mode of psychological language to describe the responses of Meleager.. seems designed to underline its impulsive. Thus: ‘When anger came over Meleager which swells also in the hearts of others. then he.61 However. as a result. The vocabulary chosen to describe this response. ‘unreasonable’ character. like that used to describe the onset of his anger. Although Phoenix uses a different mode of vocabulary to characterize Meleager’s responses.58 His concluding appeal to Achilles. as those of one acting on impulse or under pressure rather than responding to reasons. The succeeding speech of Phoenix is centred on an appeal of a similar type. as in 628–30. it takes on a rather different colour in this context. Ajax ends with a direct appeal to Achilles. given the position taken up in his great speech. The thirdpersonal form seems designed to suggest. Ajax addresses Achilles directly in similar terms. The reference to divine influence seems here to be simply a non-significant variant of expression. is more likely to gain a positive response from Achilles. which need to be met with appropriate reasons on the other side. after giving a further reason why Achilles should respond positively to their appeals (the counter-example of compensation for murder of kin). by implication. one which answers to his ethical position and correlated feelings. thus taking up Achilles’ emphasis on the central importance of properly conducted philia (‘friendship’).. and gives no consideration to the friendship of his comrades . a fellow-philos. rather than on the advantages to Achilles of gaining gifts and honour. Ajax cites the willingness of the father or brother of a murdered relative to accept compensation from the killer. so to speak.65 Ajax. harsh man that he is. first of all.64 To put the point in terms more apposite to the present discussion. since it invites him to give a generous or ‘gratuitous’ gesture rather than putting him under pressure to act as the speaker claims is appropriate. Also. describes Achilles’ present response in pointedly thirdpersonal form.63 The third appeal. he focuses his appeal on the claims of friendship and of aidos (‘shame’). that Achilles is no longer one of their number and is beyond the reach of properly grounded ethical argument. Achilles’ restrictions on the kind of person from whom compensation is acceptable. Accordingly. both in the stance adopted and the reasons offered. Associated with this difference in the basis of his appeal is a difference in stance on Ajax’s part. that is. Ajax makes his as an equal.98 Christopher Gill substantiates Phoenix’s authority to make such an appeal. though one whose present situation puts him in a position of inferiority. as presented in his reply to Odysseus. Whereas the previous two speakers made their appeal ‘from above’. presenting it as a deliberated one: ‘Achilles has made savage the great-hearted spirit in his breast..’ (628–30). saying that: ‘the gods have put into your breast a spirit [thumon] that is implacable and bad—because of just one girl!’ (636–8). and so calls into question. of the kind likely to . he offers arguments which are more likely to lead Achilles to see the positive response as a ‘reasonable’ one. Ajax presents Achilles’ emotional responses as deliberate. is of a different type.66 However. and as reflecting judgements. a suggestion to which Achilles is likely to be highly sensitive. Although the mode of psychological vocabulary in which he couches his appeal resembles the first type.67 Here. This is a type of approach which. woundingly. from a position of fatherly authority. that of Ajax. as we can tell from other cases. I noted in Chapter 2 that Ajax’s speech is the one which seems to engage most closely with Achilles’ reasons for rejecting the gifts. Although Ajax’s appeal. in which the person concerned acts. but my heart swells with anger [or ‘bile’] when I remember the disgraceful way Agamemnon treated me in the presence of the Greeks. show aidos) for the house ‘in which are gathered those of the Greeks who wish to be most worthy of your care [literally. ‘most closely related to you’] and most philoi to you’ (639–42).. and. as though I were some migrant without status (645–8). conflict within themselves. Ajax uses it as the vehicle of an appeal that Achilles himself is likely to find both most reasonable (based on good grounds) and most emotionally compelling..’).. as they present these). if so. here and elsewhere. He urges Achilles to ‘make your spirit mild. This interpretation of the psycho-ethical significance of Ajax’s appeal (viewed in relation to that of the earlier appeals) provides the basis. this language serves as the vehicle of a different. like the ‘fatherly’ ones which preceded it. consciously. the preceding discussion of passages from Iliad 9 may have helped to cast doubt on the idea that Homeric psychology. and more subtle.. approach.71 We may take it that Homeric figures can be presented as experiencing some type of psychological. against his recognition of the better course of action.’ and have respect (i. but .’68 Griffin here. I think. is whether they are actually so presented. A familiar type of explanation is the one offered by Jasper Griffin: ‘Achilles himself has to admit that the arguments for his return are unanswerable. consistently fails to embody a conception of the person as psychologically cohesive in the way that Snell claims. his passionate nature. or psycho-ethical. how we should analyse the conflict involved.Achilles’ Swelling Heart 99 have most validity for him.70 However. What requires explanation is the nature of the contrast between the points made in the first two lines (‘Everything . uses active psychological language to suggest that Achilles’ emotional response falls within his agency. What prevents him is the intensity of his anger. as exhibited in Homeric discourse. and the significance of the psychological mode (‘my heart swells with anger’) chosen in the second line. . or ‘weakness of will’.69 This line of interpretation would be regarded as untenable by anyone who accepts Snell’s view that Homeric figures do not have enough psychological cohesion to be capable of division within themselves. Whereas his predecessors use such language to suggest that they can prescribe what would be a ‘reasonable’ response for Achilles to give (one which is in line with normal modes of social interchange. ascribes to Achilles a type of akrasia. for making sense of the conflict expressed in Achilles’ answering lines: Everything that you say seems to me acceptable.e. in effect. The question. as seems likely. But I do not think that this is the most plausible way of interpreting these lines.72 But he makes no attempt to answer those of Ajax and seems to concede their validity (643). or that they express. If. indicate that Achilles sees Ajax as making an appeal that is distinctively rational (by contrast with the claims on the other side). to some extent. it is far from obvious that. in speaking of his heart ‘swelling with bile’. if one accepts the implications of the discussion so far.. Achilles’ phraseology in 645 (what Ajax has said seems to me kata thumon. On this view. the contrast drawn in 645–6 (‘Everything . I am not convinced that the lines should be taken as an acknowledgement that Achilles is acting against his better judgement. only ‘the intensity of his anger. ‘in accordance with my spirit’) does not. as Griffin puts it. indicate an awareness of conflict on Achilles’ part. Although Ajax’s brief comments do not begin to confront the complex reflective reasoning contained in Achilles’ great speech. But I think that this is better understood as an awareness of conflict between two ethical claims (and. in so far as they resemble Odysseus’. after all.73 this might seem to underline the self-distancing: Achilles presents himself. couple the description of his ‘swelling heart’ with a statement of the reason why it . his passionate nature’ prevents him from acting in line with Ajax’s words. but . ruefully. find the arguments of Odysseus. especially that of Ajax.100 Christopher Gill Conceivably. Achilles is actually disowning his anger (as he might be doing in a vocabulary centred on the reason–passion contrast. might be taken as lending support to Griffin’s interpretation. impervious to reasonable persuasion. than between ‘reason’ and ‘passion’. in view of the strongly emotional connotations of thumos.)76 He does.74 The phrasing of lines 645–6.. a contrast between the reasonable arguments that Achilles cannot answer and the ‘passion’ which prevents him from acting in line with those arguments. Achilles does not. as Meleager-like in his anger. his phraseology echoes the language used by Phoenix to describe Meleager (553–4).. they do fasten on some key features of Achilles’ position. ‘unanswerable’: he answers them at length in his great speech. of course. Thus. Achilles’ description of himself in psychologically passive or impulsive terms in 646 (‘my heart swells with anger’) would be taken as signifying selfdistancing from what he sees as an unreasonable response. Ajax’s speech seems designed rather to combine the reasons that Achilles is likely to find most cogent with the emotional appeals (ones correlated with those reasons) that are likely to have most effect on him. the preceding discussion of the appeals to which Achilles is subjected. as Griffin seems to suggest. in particular..75 As we have seen. two types of ethical claim) and the belief-based feelings associated with these. or Phoenix. Also.’) might be read as expressing Achilles’ recognition of the fact that. 77 It is worth noting that Aristotle cites part of line 648 to illustrate the kind of grounds that activate anger. the failure to receive the respect merited by one’s own good treatment of others. affirming it and justifying it.Achilles’ Swelling Heart 101 swells. it is not enough simply to say that they express a conflict between two ethical claims. to bring out the full significance of the lines. Achilles’ reiteration of his grievance against Agamemnon may. 1378b 30). and his citation of line 648. Aristotle’s general analysis of anger is that it is an affective state (a mode of desire). On the one hand. are based on the assumption that anger is a legitimate response to breaches in the norm of interpersonal conduct. and the reason. he notes. On the other. But. After all. to illustrate the response of anger to ‘insolence’ (hubris). the embassy as a whole. thus. given repeatedly in his great speech. particularly beliefs about the conduct of the interpersonal relationships in which one has been involved.78 Aristotle cites Achilles’ words in connection with the response activated by the belief that one has experienced the kind of insolence involved ‘in rob[bing] people of the honour due to them’ (Rh. it is far from obvious that Achilles’ phraseology in 645–8 means that he is distancing himself from his anger. ‘as if I were some migrant without status’ (648) may be taken as a signal of the . more probably.80 and a similar view may well be taken as underlying Achilles’ statements in 646–8.81 The phrase now added to his earlier statement of grievance. and specifically. and that his objections to accepting Agamemnon’s gifts are insufficient to override this claim. but as a kind of shorthand reference to the pattern of argument and the exemplary stance taken up in the great speech. for ‘not being persuaded’ by the offer of compensatory gifts. Agamemnon’s humiliating treatment of him. Therefore. as a ground of resentment. but one that is activated by certain beliefs. they also express a conflict between two ethical claims of a rather different type. there is the claim generated by the reflective reasoning displayed in the great speech: namely. as well as Achilles’ great speech. there is the relatively straightforward claim (powerfully articulated by Ajax) that Achilles should come to the help of his philoi. be taken not simply as a counterclaim to that expressed by Ajax. reflect the view that there are some occasions when the fact that one’s heart ‘swells with bile’ is a proper part of a ‘reasonable’ response to one’s situation. He is. In the same context. constitutes a reiteration of his basic reason. the desire to make an exemplary gesture to dramatize the extent to which Agamemnon’s behaviour has undermined the basis of co-operative philia. while acknowledging the conflict thus generated with other reasonable feelings which are activated by Ajax’s speech.79 Aristotle’s general discussion. particularly when such failure is shown by one’s friends. These passages bring out further the capacity of Homeric psychological vocabulary to express relatively complex psycho-ethical attitudes. 645–8 by showing that Achilles. in order to fulfil his continuing desire to show that ‘not even so would Agamemnon win over my spirit [thumon]. Achilles now chooses to respond as Meleager did: that is. until the clamour of battle reached my ships (60–3). it is a terrible pain for me. since I have suffered grievous pains in my spirit’ (52–5). even when distancing himself from his anger and its consequences. Patroclus delivers an appeal to Achilles which is. he chooses to have his heart ‘swell’ with anger or bile at his ill-treatment.102 Christopher Gill underlying issue raised in that speech.84 He thus indicates his willingness to risk losing the gifts and honour that are presented as desirable by Phoenix (and Odysseus) as well as—more painfully—to fail to meet his friends’ claims on his help. an intensified version of that of Ajax in Iliad 9. and 18. namely the question of what is involved in treating someone as a fellow-member of one’s community. and. is presented as his reason for not re-entering battle. in attitude and grounds. 60–3.88 But Achilles does go on to qualify his previous position: But we shall let these things lie in the past.85 Before summing up the implications of these Homeric passages.83 As part of his exemplary gesture. which include a degree of self-distancing.87 However. the vocabulary is not self-distancing. in correction to the one suggested by Patroclus. He uses language to describe his anger which is more unambiguously passive than that of 9. it was not by any means my intention to rage without ceasing. Like that of Ajax. to this extent. it combines persuasive characterization of Achilles’ stubbornness with an appeal to his feelings for (and commitment to) his philoi in their desperate situation. never presents it as unjustified and as being a passionate response which is wholly in conflict with soundly based ethical claims. Syntactically. justified in similar terms to those of Iliad 9. this passive vocabulary is not used actually to disown his anger. 646: ‘but this terrible pain comes over my heart and spirit . At the start of Iliad 16. However. 107–13) which are related to 9. and chooses not to enter the battle until the fire reaches his tent.. 645–8 and which can help to place it in an intelligible context. they also lend support to my reading of 9. 52–5. I note two later passages in the Iliad (16. the fact of his continued anger.86 Achilles’ response is interestingly complex. But I did say that I would not put an end to my wrath. at least until he had paid me back all his spirit-grieving insult’. ..82 The apparent allusion in 646 to Phoenix’s (cautionary) characterization of Meleager’s response may be relevant here. much sweeter than dripping honey. At this point.89 But the conflict is still one that is best understood as being between competing ethical responses to reasons (together with appropriate feelings) rather than one between an ethical response to reasons and unjustified passion. Indeed. Achilles distances himself from his anger. Achilles’ present sense of psycho-ethical conflict. even here.94 The ‘pain’ of his grievance still matters (112).91 A similar general point can be made about a related passage (18. The opposite is implied by the statement. 23–7) by acceding to the latter’s request to go in his place (38–43). as expressed in these lines. On this reading. in the sense of saying that it was unreasonable of him to become angry and to maintain his anger in the way that he did. and which. we shall let these things lie in the past. presenting it as something other than himself (‘strife’. ‘bile’) but which has had a powerful impact on him. and one designed to satisfy his desire for an exemplary gesture to dramatize Agamemnon’s wrongdoing. his remarks in 60–3 may help to clarify the point that his previous position (to stay until the fire reached his ships) represented a deliberate decision. in this way Agamemnon. 16. that ‘in this way. more fully than in Iliad 9 or 16. immediately after the general comment about ‘strife’ and ‘bile’. recently made me angry. But.92 The sense of self-distancing is heightened by the generalizing phraseology of 107–10. which drives even a sensible person to become angry. which falls within the speech in which Achilles accepts Thetis’ prophecy of his imminent death: Let quarrelling perish from gods and human beings. lord of men.. Agamemnon . made me angry’ (111).. Achilles does not repudiate his anger. 107–13). subduing by necessity the spirit in my breast. Achilles’ state of mind and ethical position may seem hopelessly conflicted. and the observation (which implies both past involvement and present detachment) that anger has its own pleasure and the capacity to generate itself. is intelligible as a development of the conflict between Achilles’ reflectively-based stance and his response to the claims of his philoi on his pity and generosity. spreads like smoke in people’s breasts.90 In effect. and bile. and there are certainly more indications of internal conflict here than in 9.93 Yet. pained as we are. 645–8. although Achilles now undertakes to ‘subdue’ or ‘conquer’ his spirit as well .Achilles’ Swelling Heart 103 So he lets Patroclus go into battle in his place and in his armour. he reiterates that decision here. and. Here. while responding to the additional grounds that Patroclus now offers (the terrible plight of Achilles’ philoi. without ruling out completely the possibility of coming to the help of his philoi. that of pressing on with vengeance against Hector. 645–8. and to distinguish this from models of psychoethical conflict. and in the case of Od. In my discussion of Il. I have tried to identify one of the types of psychological (or. at least as understood by these critics. on either side. characteristically. on the question of which belief-based emotion or desire is to be regarded as ‘reasonable’ (supported by better reasons) under the present circumstances. seems to be a poor starting-point for interpreting conflicts in a psychoethical framework in which it is assumed that people’s emotions and desires are. typically. in Odyssey 20. 20.99 The conflicts to which this type of framework gives rise centre. psycho-ethical) conflict which tend to arise within this pattern of thinking. better. but also to illustrate the pattern of thinking about human psychology expressed there. informed by beliefs and reasoning. Here. Thus. as I interpret them. there is a conflict between the kind of response that seems ‘reasonable’ by normal ethical standards and one that the person concerned (the ‘problematic hero’) sees as justified by her reflective reasoning on the basic principles of co-operative conduct. In each of these three cases. under the circumstances.98 The reason–passion contrast. though seeing the force of the countervailing reasons. 9. the hero. and the validity of the correlated emotional responses. which some modern critics have used to analyse these passages. Both here. and of related passages. I suggested that. than the desire to do so after he had punished the suitors. rather than invalidates the earlier ones. 18–21.104 Christopher Gill as ‘letting these things lie in the past’. my aim has been not simply to offer what seems to me the most plausible reading of the lines. I have been critical of the use of the reason–passion contrast (as deployed by Snell and Griffin) as the basis of an interpretative framework for the conflicts involved. and also in the passages to be discussed in the Ajax and Medea. Odysseus understandably saw his (belief-based and justifiable) desire to kill the serving-women as less reasonable. and one which replaces.97 but in response to a quite different type of claim. he does so not in response to the type of fatherly appeals made there. and not to the realization that the earlier anger was unreasonable.95 this is a response to a new and more urgent ‘necessity’ (anangke). Later. In Iliad 9. I criticize its deployment by Snell as the basis for his reading of the conflict displayed in Medea’s great monologue. based on a different pattern of thinking about the person.96 Although Achilles does now what he was urged to do in Iliad 9 by Odysseus and Phoenix (‘conquer’ or ‘restrain’ his spirit). reaffirms the stance based on . we find a more complex type of conflict. The intensity of these conflicts derives from the fact that the hero sees the force of the reasons. In particular. 5. 1. esp.g. it fails to explain convincingly why the figure opts for the more ‘irrational’ line of action. the reasonpassion contest can be used to characterize this kind of choice (the response is presented as a conscious surrender to passion). Cf. 496–7: see also 438–43 (taken with 254–8) and 485–95. 180. See also the appeals listed in n. and text to nn. Contrast the emphasis of Odysseus and Phoenix on gaining gifts and honour (9. Similar factors are relevant in the interpretation of psychological language in tragedy: see further Goldhill (1986). 7. 2–3. discussed in text to nn. chs. 628–42. 101–9. 216–37. 62. 56. but do so in the context of their overall ‘fatherly’ stance. esp.’ See also 1. 115–20. for instance. Il. However. text to n. 92–6 below. see 2.1 above. and.. 54. 434–514). 515–99). 55. 144–8. 28–9. As noted in 2. Schofield (1986). for ‘raging’ as a deliberate action. on Nestor’s characteristic modes. 56 above. 102–4. See e. some Homeric phraseology is suggestive in this respect: see e. text to nn. For other examples of this mode of appeal. a substitution which helps to undermine the force of Agamemnon’s appeal. On Homeric modes of discourse in general. 769. 436 (Phoenix’s description of Achilles). NOTES 52. 230. 16. 600–5 with 299–306. 1. 300–2. 53. In terms of the reason-passion contest. 22–3. also Cairns (1993). 74–7. On Greek philosophical thinking about what is ‘reasonable’. text to nn. Il. and 2.7 above. I have offered a contrasting line of interpretation and analysis for Achilles’ decision to act as his ‘swelling heart’ urges: and in the next two sections I do the same for the analogous decisions of Ajax and Medea. 60. Analogously. matches the type of psycho-ethical thinking expressed in the passages. 10. esp. 12. 92 below. Harrison (1960). 188. since it enhances the authoritative stance that Achilles finds objectionable. 17–22. she reaffirms the course of action urged by ‘passion’: Achilles. 3. Gill (1990a). ch. 64. 92–4. see e.4. Although. 62. In particular. 59. See also 515–17: if Agamemnon were not offering gifts and renouncing his anger. see 3. 187–8. 260–73. 9. as is clear from Snell’s writings. 9.1 above. also below 3. 7. 19. See also Thetis’ urging to Achilles to ‘rage’ (Il.g. 20: ‘man is the open target of a great many forces which impinge on him and penetrate his very core. Adkins (1970). 57. esp.g. 422). in my view. 52–5 and 18. 108. Phoenix would not be urging Achilles ‘to cast aside his wrath’. 1.g. 772. 58. . 63. See e. 18. text to nn. This assumption is not confined to the appeals to control one’s anger. See esp. 554. Snell (1960). acts as his ‘swelling heart’ urges. Il. 9. 201. text to nn. text to n. 254–84.Achilles’ Swelling Heart 105 her reflective reasoning. they also appeal to Achilles’ sense of philia and his pity (247–51. Il. 9. and.100 the analysis offered is not one which. See 9. taken together with Martin (1989). Nestor’s allusion to figures and situations known only to him helps to substantiate his authority in Il.8 above. see Martin (1989). 78–85. 10–12. 260–306. 61. 216–20 (Odysseus to Achilles). 282–3 (Nestor to Agamemnon and Achilles). 1. 187–8. Odysseus substitutes this preface for Agamemnon’s ‘apology’ in 9. 107–11. See also NE 1149a32–4. 58–67 above). 286 (Agamemnon to Nestor). 74. Achilles does. 169–71. Charles (1984). 635 (cited in text to nn. . See also Irwin (1983). 1). Although Greek psychological discourse. 76. whom Achilles regards as having put himself outside the bounds of properly conducted philia. 1078–80 is usually taken as the classic example of such conscious or ‘clear-eyed’ akrasia (see 3. might seem rather to carry the connotation.) 2. that of Stoicism and its Roman analogues. see Gill (1987). 22–100. Cf. Griffin (1980). ‘Anger may be defined as a desire accompanied by pain for a conspicuous revenge for a conspicuous slight at the hands of men who have no call to slight oneself or one’s friends’. 39–42.7. 20. 74. 629. Od. 8–22. see also refs. note also Achilles’ reply to Phoenix. from Homer onwards. 80. text to n. ‘anger [bile]. 33–4 and 3. 74.7 above. as though granting some validity to the claims embodied in each: see 2. text to nn.6 below. the use of the reason–passion contrast as a standard way of analysing ethical dilemmas belongs to a different thought-world. a key theme in Achilles’ great speech. 23–5. which swells in the breasts’. and see further Claus (1981). 84 below.g.5 below). 69. discussed in 3. see further Fortenbaugh (1970). See also 3. See Snell (1960). in n.5 below. 177–9. 9. Medea in E. text to nn. For thumos as emotional (this need not mean imperviousness to good reasons). from Priam. text to nn. 153–62. 185. Med. Griffin’s interpretation is coupled with criticism of Redfield’s assertion (1975). text to nn. text to nn. 62) as distinct from being the victim of his own nature. 2. Barnes (1984). more unexpectedly. see further 2. 16. modify his position in response to each of these appeals. 99 below. ‘my heart swells with anger’ (or ‘bile’). Phaedra 177–85 (disowning lust). and of some modern (e. On the ‘gratuitous’ gesture. 58–9. 9. 496. 9. text to nn.1 above. On the (partial) similarity of approach between Odysseus and Phoenix.7 above. 86–91 below. see 2. 73. who ‘impersonates’ Peleus in his supplication of Achilles. See Achilles’ relative responsiveness to this type of approach from Patroclus. 344–5. 64 above. 18–21 and 3. 149–51. on the latter passage. see esp.2 above. see text to nn. There are also serious questions about whether Snell’s post-Cartesian and postKantian assumptions provide the best available conceptual basis for making sense of Homeric models of mind and ethical motivation (see Ch.7 above. Il. 75. text to nn. 71. see e. however.106 Christopher Gill 65. 78. Rhetoric (Rh. see 9. 612–19. text to nn.7 above. also n.g. also (1964). 128. on which see text to nn. On weakness of will and akrasia see 3. tr. kata moiran. therefore. 72. and. 79. and see further Lesky (1961). on this linkage. For cases where a figure disowns her feelings in a psychological vocabulary centred on the reason–passion contrast. 77. 647–8 with 334–6. Cf. 150–1. 9. text to nn. 140–51. 52–6. 67. 600–1. should not act as philos to Agamemnon.g. 646. and on the psychological language involved (by contrast with Euripides’). has ways of expressing the conflict between deliberated. Medea 926–32 (disowning anger). 1378a30–2. 219–31. text to nn. with 553–4. 260. insisting that Phoenix is still very much his philos. 106. 13 and 3. 147–8. 375–6. long-term objectives and localized impulses (see e. 595.3 above. Kantian) moral thinking. The variant phrase used in the comparable line 1. 24. and 2. 68. and. 70. 157. 316–45. ‘according to what is proper (in social interchange)’. See the comparable non-significant variation in 9. that ‘Achilles is the victim of his own ethic’ (on which see 2. Sherman (1989). Seneca. 386–7.5 below. 367–8. 10. See 2. dissenting from Griffin (1980). 56–62 above and n. 66. of course.2 above). This is. 486–506. 255. 158–62. 93. 636–8. See esp. 77 above. 36–7. 386–7 and discussion in 2. 84. 1378b2–10. otherwise Agamemnon would never have stirred up the spirit in my breast in such a lasting way. 9. ‘when a man [Agamemnon] wishes to deprive [of status] one of his equals. 553–4). 646). text to nn.7 above. see also 16. discussed in text to nn. 334–6. in a way that involves the counter-humiliation of Agamemnon (9. 16.10. text to nn. 16. seems to allude to Achilles’ fundamental ethical grounds for his anger (see 2. Phoenix himself (9. 47e. PHP 3. 645 in this connection. These features helped to make the lines favourite ones among Greek philosophers: see e. i. see NE 1125b31–5. i. logically. 53–4 and 56–9 with 9. you give men great delusions. 386–7). 2. physically.. 263–7. and answer. perish’ construction of 18. that ‘such pain has come on the Greeks’ (16. 23–7 with 9. 191. 647–8. 650–5 with 587–9. 629–30. if felt as ‘reason dictates’. 12. 30: ‘let not this anger hold me’. 53–4. Cf. Aristotle does not cite 9. 148–57). Gal. 89. (distancing use of passive vocabulary. Cf. 639–42. of a special type. Note also the pointed combination of active and passive phraseology in 16. See n. discussed in text to n. As Taplin (1992). Cf. See further Tsagarakis (1971). 618–19) represent ways of combining a response to the claim made on him at each point with the desire to make an exemplary gesture. with 9. for the idea that Achilles’ variations in his course of action (9.1. See 9. 88. The reiterated language of ‘pain’ may echo. 357–60. brings out.. 9. See Achilles’ related comments in Il. For anger as an emotion which can form part of the pattern of response of a virtuous person. 59. esp. 107–8. 65–6 above. which you perpetuate deliberately). as. ‘it was not by any means by intention’. 533–4). 158–62.e. Rh. 367–8. see also Whitman (1958). in particular. 650–55. 270–3.. responding to Agamemnon’s quasiapology: ‘Father Zeus.7 above. 91. text to nn. 480–4).g. the strongly passive vocabulary of 52–5 (more unequivocal than in 9. 60-3. ‘the boiling of the blood . 16. 90. p. Patroclus’ opening point. the contrast between ‘bile’ and ‘even a sensible person’ (108. 84 above. The phrase is reiterated in 16. ‘which you maintain’.Achilles’ Swelling Heart 107 80. 629–32 and 16. Pl. Distancing is expressed in the ‘let . Phlb.7 above. 87. around the heart’ (and. This interpretation of Achilles’ position might help to clarify the (admittedly puzzling) lines 72–3 and 83–6: part of Achilles’ exemplary objective is that he should gain both gifts and girl on his terms. 27. that legitimate a response (one of anger) that might otherwise seem to be one of ‘unreasonable’ impulse.e. 83. 386–7) also expresses the idea that there can be grounds. 163–81. Claus (1975). and the adversative phrasing and awkward enjambment of 60–3. 82. 9. 16. 19. Achilles. but his definition of anger in DA 403a29–b3. 22). (i. That couplet (9. 1370b10–12. On Achilles as choosing to act as Meleager does. in n. cf. 86–8 below. 236 De Lacy. cf. while acknowledging Agamemnon’s explanation . See refs. and in the depiction of anger as a quasi–physical or organic force with a life of its own (109–10). and 4.. 81. 428–9. ‘the desire to return pain for pain’) may be based on such Homeric phrases. as in 9. 92. 209. 73 above. p. Arist. 85.e. in a passage discussed in text to nn. Cf. 178 De Lacy. nor would he have taken the girl from me so awkwardly against my will and found himself helpless’. 86. His consent to Patroclus’ mission to bring help to their philoi is conditional on Patroclus’ not jeopardizing this objective. 94. and to take away his prize of honour [geras]’. see 2. The phrase may take on added resonance in the light of Phoenix’s report of Peleus’ very different way of treating a ‘migrant without status’. 33–5 with 9. 99. 179–84. by presenting the act as one in which Agamemnon was also the agent. 112–13 with 16. 68–70. 260. despite its disastrous consequences. 95. 74–5 above.5 below. 19. text to nn. 3. 51–6. and 3. 50. text to nn. 86–90). 97. See 3. In addition. restores the customary Homeric ‘double motivation’. 18. . text to nn. The reason–passion contrast seems to have been used in a more psychologically appropriate way by the Stoic Chrysippus in discussing Medea. see 3. 57–61). text to nn. see 3.6 below. 98. Cf. 496. Snell (1964). 98–100. text to nn. Achilles presents it as constituting grounds for a response of anger which is not unjustified in itself. Il. 18. Il.5 below. 149–51. as it seems to be by Snell and Griffin. 255–6. 33–4. text to n. 196–213.108 Christopher Gill for his act (by reference to divinely inspired ate. 9. this is so if ‘passion’ is taken to be non-rational (not based on beliefs and reasoning) as well as ‘unreasonable’ (contrary to ethical norms). At least.1 above. 100. See 9. discussed above (text to nn. 60. 96.2 above. the most immediately obvious nontextual element of Homer’s poetry is its meter. 109 . rather than as time-bound sequences of sounds that are unique to their performance context. Many aspects of this text are indeed unchanging regardless of whether we speak out. or hear the poems. and so on. As a consequence. Furthermore. it is not a hexameter unless complete (sequential. as the manifestation of a potential that we sometimes refer to as an oral tradition. ©1997 by the President and Fellows of Harvard College. Performance. we are also increasingly aware that a simple dichotomy between “oral” and “literate” is somewhat restrictive. but as reflections of a broad repository of themes. word-groups. In other words. or read them silently. even in writing this rhythm remains an event: it calls for a speaker/reader/hearer.1 But perhaps. or what is better called its rhythm. of the Iliad and Odyssey not as fixed texts. motifs. that is. At the same time. and the Epic Text.2 Paradoxically. T From Written Voices. scenes.AHUVIA KAHANE Hexameter Progression and the Homeric Hero’s Solitary State TEXTUAL AND N O N T E X T U A L P R O P E RT I E S he poetry of Homer as we have it today is a highly textualized verbal artifact. edited by Egbert Bakker and Ahuvia Kahane. we are increasingly aware of what we might call the nontextual aspects of Homer. writing seems to preserve perfectly the hexameter’s dum-dada-dum-da-da-dum-da-da-dum-da-da-dum-da-da-dum-dum. we come into immediate contact with the Iliad and Odyssey as fixed sets of graphic symbols that are independent of any particular performance event. Spoken Signs: Tradition. 110 Ahuvia Kahane unbroken) and in the right order; it is a time-bound, linear “beginning– movement–end” sequence, and as such it is a performance. THE FUNCTION OF RHYTHM Let us now ask, what is the function of rhythm in Homer?3 Does it facilitate memorization of the poems? Perhaps not. Or at least not directly. Oral traditions normally display a degree of mouvance, as Paul Zumthor has called it: each performance is one manifestation of an otherwise flexible tradition.4 But if the very thing we call “oral poetry” is flexible, that is, if full verbatim repetition (in our literate sense) is not in fact achieved, what is the purpose of rigid metrical/rhythmic form, of formulae, type-scenes, and other “oral” devices? Would such devices not thus be a burden on memory, rather than, as is commonly assumed, an aide-mémoire? Would it not have been more convenient to transmit the contents” or “message” of the tradition, for example, as nonmetrical folktales? Why, then, the use of metrical/rhythmic structure? One possible answer is that the hexameter rhythm and its technical apparatus, the metrical structure, formulae, and perhaps also type-scenes, are symbols of fixity and “sameness,” and hence symbols of cultural continuity.5 In literate cultures the written text (“the Book”; the Bible, the Koran) is the most common symbol of fixity and “sameness.”6 However, a society that knows no writing, or that knows writing only in a very limited sense, will by definition not know this symbol. Oral societies must rely on other means to satisfy their need for fixity and continuity. To those who know no writing, our literate notion of verbatim, objective “sameness” over thousands of lines is meaningless. Indeed, no two performances can ever be fully coextensive. However, if during different performances an identical rhythm is used, and if diction is inseparable from rhythm, then a semblance of fixity is achieved. It is easy to identify the fixed entity we call hexameter. If a particular proper name, for example that of Odysseus or Achilles, is used repeatedly at different times during a performance and/or during different performances but always “under the same metrical conditions” (as Milman Parry would have it), then a “sameness” is easily and immediately affected, even though there may be many real differences between the verbatim contents of one version and another; this is what I mean by “a semblance of fixity.” In manifestations of traditional poetry like the Iliad and the Odyssey, whose stated purpose is to preserve the kleos “fame,” “glory,” “hearsay” (a manifestation of fixity and continuity) of the past, such fixity is essential. Let me, however, stress again that this version of fixity does not restrict the inherent flexibility of the tradition. Hexameter Progression and the Homeric Hero’s Solitary State 111 Two other features of hexameter rhythm should be noted here: first, the rhythm’s ability to mark epic as “special” discourse, and second, its ability to indicate that the tradition is always broader than any individual performance. The hexameter progresses regularly for six feet, then pauses at the verse-end,7 then repeats itself, then pauses, and repeats itself again more or less regularly for many lines. This manner of controlled, cyclic progression contrasts hexameter discourse to ordinary parlance and hence to our “ordinary” everyday verbal experiences. While all discourse has rhythmic features, almost no form of everyday parlance displays such extended, cyclic regularity. The hexameter rhythm is thus a performative act: its very utterance is the making of “special” discourse.8 Furthermore, each hexameter verse/unit is by definition not unique; it is but one of many similar units within larger poems. However, the size of these poems themselves is not regarded as a fixed unit.9 The implication is that each utterance of a hexameter is a manifestation of a body of hexameter discourse of undetermined scope that is, as it were, “out there.” The point is this: Homeric poetry sharply distinguishes between the heroes of the past and the men of today.10 By speaking of such special characters in “special discourse,” their special nature is thus enhanced. By allowing each line to represent a broader body of hexameter discourse, we allow the shorter, performed utterance to function as an elliptic representation of the greater tradition.11 THE SEMANTICS OF RHYTHM Let us try to apply the preceding to a concrete example. Perhaps the most widely recognized manifestations of rhythmicized regularity in Homer are noun-epithet formulae describing the heroes, such as polumêtis Odusseus, “many-minded Odysseus,” or podas ôkus Achilleus, “swift-footed Achilles.” As John Foley suggests, such formulae invoke “a context that is enormously larger and more echoic than the text or work itself, that brings the lifeblood of generations of poems and performances to the individual performance or text.”12 These common formulae are concrete “symbols of fixity.” They are easily recognized as words that are “the same” as those uttered in other places, at other times, in other performances, by other poets singing about Achilles and Odysseus in hexameter, hence they are “traditional,” hence they are also far more “echoic.” Noun-epithet formulae do not simply refer to a character. Rather, they invoke an epic theme, creating what we might call “an epiphany.” As one 112 Ahuvia Kahane scholar has recently put it, “If an epithet is a miniature-scale myth, a theme summoned to the narrative present of the performance, then, like any myth, it needs a proper (one could say, ‘ritual’) environment for its reenactment.”13 The ritual summoning of a hero is a very practical matter: in order to reenact “Odysseus” we must, literally, say the right words, that is, repeat the same words that we know have been used before for the same purpose, for example, polumêtis Odusseus, “many-minded Odysseus.” But of course this, and most of the other formulae invoking the central characters of epic, are also fixed metrical sequences, for example da-da-dum-da da-dum-dum (polu-mê-tis O-dus-seus). Furthermore, this sequence is not a freestanding semantic-rhythmic unit. It is meaningful only when embedded and localized in the proper rhythmic/metric context, at the end of a line of hexameter. Odysseus is thus “recognized” and invoked not just by the words but also by the rhythm—which is a distinctly hexametric, distinctly epic and heroic medium. L O C A L I Z AT I O N , S I L E N C E , AND REALITY It can hardly be unimportant that common formulae such as polumêtis Odusseus and the very idea of the epic hero are localized at the end of the verse,14 or that others, such as the emotional nêpios (“fool,” “wretch”), the speech introductory ton d’apameibomenos (“to him answered ... ”), hôs phato (“thus he spoke ...”), and many others are anchored to the beginning of the verse. The beginning and the end of the hexameter are its most distinct points, the points at which the flow/pause opposition and the cyclic nature of the rhythm are most clearly marked. As we have suggested above, this cyclic rhythm can mark epic as “special,” “extra-ordinary” discourse. The hexameter, like other contexts of mimetic activity such as the stage and amphitheater, like the darkness of a cinema-hall, creates a “distancing” effect; it is an artificial context that indicates to us that what happens “out there,” the events described/presented, are an imitation, that they are part of a different reality, and not directly a part of our own here-and-now. No matter how elaborate the tale, the modulations of gesture and voice, or for that matter the animatronics (as they are known in Hollywood), we know that epic heroes, tragic personae, Jurassic dinosaurs, and the like, are not real. No self-respecting Greek ever rushed down from his seat to prevent murder onstage. No hearer of epic, no matter how enchanted or moved by the song, ever mistook the poet’s imitation for the real thing.15 As we hear, say, a speech by Odysseus, we are never fully allowed to forget that this is an imitation, an artificial reconstruction of “Odysseus” and specifically of “what Odysseus said.” The most immediate reason for this, of course, is that no Hexameter Progression and the Homeric Hero’s Solitary State 113 character in real life, except poets who are by definition the mouthpieces for “other worlds,” ever speaks in hexameters. The conclusion to be drawn from this is as inevitable as it is central to our argument: as we hear the rhythm of epic, it must be that we are both “here” and “there.” We are ever conscious of two (paradoxically) overlapping realities or planes: on the one hand, the plane of our own time-present and of the here-and-now performance, and on the other hand the plane of the fiction and of heroic temps perdu.16 But now briefly consider cinema again: our sense of the reality onscreen depends heavily on a continuous, rapid flow of what are otherwise still images. Stopping the projector means “stopping the show.” Slowing down the projector may produce a flickering sequence in which the world of the narrative is still “out there,” but now more markedly “punctuated” by splitsecond interstices of real-life cinema-hall darkness. Such interstices (as in early, particularly silent, cinema) bring “fiction” and “reality” into a sharper contrast. They have the power to affect what we might call the deictic balance between the reality of the narrative and the real world. The case of cinema and the flow of images is a useful (if somewhat contrastive) analogy when considering the flow of words, and in our case, the flow of epic. A pause in the performance of discourse, if it is long enough, affects the balance between our perception of the fiction “out there” and of the here-and-now reality around us.17 At the same time, as Wallace Chafe says: “The focus of consciousness is restless, moving constantly from one item of information to the next. In language this restlessness is reflected in the fact that, with few exceptions, each intonation unit expresses something different from the intonation unit immediately preceding and following it. Since each focus is a discrete segment of information, the sequencing of foci resembles a series of snapshots more than a movie.”18 While the hexameter has several conventional points at which a pause in the rhythmic flow can occur (for example, caesurae),19 the pause at the end of the line, and consequently at the beginning of the next, is the one that is most clearly marked.20 It coincides with a word-end without fail, and it coincides with sense breaks more often than any other pause in the verse.21 It is affirmed by special prosodic features, such as the license of the final anceps syllable,22 the lack of hiatus, of correption, of lengthening by position, and it is in the most immediate sense the boundary of the hexameter (the very name “hexameter” defines this boundary). I would suggest, therefore, that the beginnings and ends of the verse, its onset and coda,23 are those points where the potential for “interstices of silence,” and hence for creating ripples in the flow of epic fiction is greatest. They are the points at which the poet can begin or end his song, hence affecting a full deictic shift.24 More his existence as a heroic one-of-a-kind. rather than cerebral manner. of course. does not break the “flow of fiction”. and the (arguably more humble) here-and-now reality of the performance. no physical change takes place in the here-and-now). An epiphany of Odysseus. AND THE EPIC HERO The hero is a basic paradigm of epic.114 Ahuvia Kahane significantly. and because a discourse unit (the narrative section) has ended. However. MOUNOS. they are the most convenient (although not necessarily the only) points where. We may thus describe our poems as a type of event that stitches together the past and the present. This interstice of silence. OIOS. is implicitly embedded in many Homeric scenes. Furthermore. for example. This effect is also a practical manifestation of kleos aphthithon. and we are about to begin a different type of discourse (direct-speech). kleos aphthithon is precisely what epic strives to generate. I believe. As the poet says the much repeated hexameter line ending with the name of Odysseus ton d’apameibomenos prospehê polumêtis Odusseus (answering him. experiential. the hero of the past. brief as it may be. of being unique and/or alone. a poet may pause for an instant. a complex warp. as an enactment of kleos. affecting what we might term as deictic fluctuations. not only because the hexameter unit has come to an end. concrete. sensible to most readers and audiences of Homer. but I would suggest that it momentarily alters the balance between the narrative reality “out there” and the time-present reality of the performance. is thus invoked at the end of the speech introductory line. This idea of isolation. he pauses. Achilles. as it were.26 What follows is a specific example of the workings of this mechanism. the general function of the hexameter’s pause/flow nature is.” a process of preserving events outside of their “normal” spatio-temporal boundaries. but immediately there follows a pause. creating. it is most .” and. contrasting the past and the present in a more vivid. situations that contrast more sharply the heroic reality of the past. this is more or less what ritual is meant to do: it summons something from “out there” to the reality of the here-andnow. in the midst of song. centering on the verbal presentation of the epic hero’s solitary state. which requires the poet notionally to change his person (from “narrator” to “Odysseus. and one of the hero’s most important properties is his state of being alone. “undying fame. as surely he must. as a special type of performative speech-act. but also because a sense unit (the grammatical sentence) has terminated. Although I would not hazard a more precise definition of this mechanism without considerable further research. is unique both in his military prowess and in his greatness of heart. that is to say. said in reply many-minded Odysseus).25 And of course. and ordinary men. that is. of course.28 which raises the question of why two words are used. but our lexicons do not suggest any difference in the functional semantics. where the narrative reality can be contrasted with the reality of the performance. Achilles in his capacity as a hero of singular ability has been brought as close as possible to the surface of our own “here and now.29 In Iliad 24. In addition. oios and mounos. larger-than-life abilities. through the poet. and three Achaeans would close (epirrêsseskon) and three would open (anaoigeskon) the huge door-bolt.31 The climax of this digression. In fact it relies on a tightly woven rhythmicsemantic network comprising many other examples of the word. three other Achaeans. is what actually happens here. in that oios is probably a numeral. This. a form of narratorial comment not strictly required for the flow of narrative time.453–456 we find the following lines: “. the end of the passage. Through the use of the localized. but Achilles could close (epirresseske) it.27 and mounos an adjective describing a state. the usage of other words and types of words. the singular hero of the past. as we have suggested. alone (oios). the usage of mounos. the end of the long sentence (453–456). and thousands of individual examples.” This important description of a mechanism for opening (anaoigeskon) and closing (epirrêsseskon/-ske) the door of Achilles’ hut is very significantly positioned: it opens the closing scene of the Iliad. are most sensible to the contrast between Achilles./of the terms. The passage commenting on Achilles and the door is a digression. and ultimately. . are points of potential deictic fluctuation.” Rhythm has generated a situation in which we.” “on his own” in 456.. The lines are also a situational definition30 of Achilles as a hero separate from all others. line-ends.Hexameter Progression and the Homeric Hero’s Solitary State 115 directly expressed by the use of two words. be based on a single example. the gate was secured by a single beam of pine. It is thus the verbal focus of the narrator’s amazed admiration for his hero’s singular. especially those that are likely to have longer pauses (interstices of silence) after them. verse-terminal word oios. These words have different roots. This reading of the nontextual function of oios cannot. both in “meaning” and in “form” is the verse-terminal word oios “alone.32 Oios is emphatically positioned at the end of the line. I suggest. and the end of the whole narrative unit that is the introduction to the concluding section of the Iliad. The three long iterative verb-forms emphasize that this is not a one-time event but instead a matter of long-term significance. The common phrase hoion eeipes.285–287. the best in all a community. 20. at the end of the sentence (which is usually long). to the use of formulae. hoioi. which no two men could carry such as (hoioi) men are now. As when a shepherd lifts up with ease the fleece of a wether (oios). its function. two men. what a mighty man he is . a great deed.” These lines are repeated word for word in Iliad 20. could not easily hoist it up from the ground to a wagon. I . of his emotionally charged awareness of the sharp..” These examples allow rhythmic functions to generate yet more complex effects. a word highly similar in sound occurs. but he lightly hefted it alone (oios).” (Iliad 11.445–451. The son of devious Kronos made it light for him. on many occasions. Indeed.. just after the preceding interstice of silence. the end of the passage. we shall realize that the word hoios is a key element of Homeric expressions of amazement. / what a. Consider further the example of oios in Iliad 12.. but the upper end was sharp. except that the name of Aineias is substituted for that of Diomedes... not only is oios verse-terminal.653–654.302–304. In Iliad 5. alone (oios). (. but he lightly hefted it. if we recall expressions such as eu de su oistha.285–287. at the beginning of the verse.” In all. which is the plural of hoios. but in fact. Terminal oios is the focus of the narrator’s amazement. on which see further below).. Patroklos to Nestor about Achilles).445–451: “Hektor snatched up a boulder that stood before the gates and carried it along.” Furthermore. and 12. o mighty lord of the earth. “such a . oios is positioned at the end of the verse (this is linked...116 Ahuvia Kahane Consider three further passages that present us with prominent situational definitions of an Iliadic hero as existentially “alone. for example in Zeus’ words to Poseidon o popoi. is expressive. “for you know well. it was broad at the base. But Tudeus’ son in his hand caught up a boulder.. and at the end of the narrative unit. not directive (in speech-act terms).) hoios ekeinos deinos anêr. ennosigai’ eurusthenes. In 5. such as (hoioi) men are now.455) is best translated “o my. hoion eeipes (Iliad 7.. of course.302–304 the poet describes the larger-than-life (as in mega ergon “a great deed”) abilities of Diomedes: “. opposition between the qualities of the heroic past and the humble present. shall we say. or. / what a. highly memorable concrete images. an enactment of the epic hero as the possessor of singular abilities unmatched by the men of today. And it is precisely this contrast that the extremities of the verse bear out. It is widely recognized that “unmarked” terms are semantically more general. as an expression of emotion). using verse-initial hoios. 24. by prominent localization).453–456. on his own) and the word hoios (such a . we may note the verse-terminal oios (of a wether) in our last example (12. a word close in phonetic value to oios and having an exclamatory force.38 Terminal position. and his consciousness of the wide breach between past and present. or even “neutral. in all passages. and a marker of the narrator’s amazed reaction to these abilities. in which the word oios in verse terminal position is a codified element of ritual.39 . all localized (like the rhyme in later poetry) at the end of the verse. the contrast between past and present is the very essence of the words.” compared to their “marked” counterparts. to the performance and the audience hoioi nun “[the men] such as they are today. narrative.37 Finally. these passages are not. effective situational “definitions” of the epic hero.33 Once we accept this..Hexameter Progression and the Homeric Hero’s Solitary State 117 am amazed by your words!” (literally “what kind of thing have you said?”). In our very first passage. To sum up my point so far: the preceding examples are condensed. strictly speaking. and that these links are strongly marked by basic rhythmic properties (that is. Like 24. is central to the verse as a whole.451). indeed enact so well.455 takes on special significance: it replicates and extends the archetypal exclamatory Greek utterance “o. being a point at which the world of fiction and the real world can be effectively contrasted. if any further emphasis on this phonetic and rhythmic marking is needed. the narrator comments on Achilles’ abilities without openly acknowledging the reality of the performance. dêmos // (fat) and dêmos // (people) are some well known examples. allows the contents of the definition—the contrast between the epic hero and the men of today—to be enhanced by the cognitive features of performance mechanics..453–456.”34 whose meaning.36 This idea need not surprise us. the alliteration of “o-o-o” sounds in 7. omphê // and odmê //.” Regardless. In the stone-lifting passages the normally reticent narrator makes unambiguous verbal reference to the present. rather they provide narrator comments. or rather whose function.35 I am suggesting that within the specific discourse of Homeric hexameter there are significant pragmatic links between the word oios (alone. In the three stone-throwing passages we saw how terminal oios is further emphasized by the contrastive calembour. which echoes yet again the link between oios and hoios. What Milman Parry termed calembour (more serious than a “pun”) is a recurrent feature of Homeric poetry: aütmê // and aütê //. 519 (Achilles to Priam about the visit). Here are a few more examples: first. something that we would have called heroic but for the fact that the addressee is. The speaker construes the actions as reckless and/or abnormal. and in Odyssey 10. heard.41 usage of the apparent synonym mounos at the verse-end would have provided a convenient metrical alternative (and hence formulaic “extension” in the Parryan sense). is .281 (Hermes to Odysseus on Kirke’s island). with the result being that it is construed as “madness. verse-terminal oios. nominative usage of oios can be read. but in fact it is all but avoided.” The speaker’s understanding of the situation. relies on a contrast between “heroic” activities and “ordinary” abilities. nominative singular oios.42 Unmarked (non-terminal) oios does seem to be used in a less focused manner. And this.385–386): “Why is it that you walk to the ships. These five passages are another node in the nexus of exclamatory. who walk through the ships and the army alone (oios) and through the darkness of night when other mortals are sleeping?” In Iliad 10. of course. in Iliad 24. alone (oios) through the darkness of night when other mortals are sleeping?” Comparable use of oios may be found also in Iliad 24. heroic isolation is enacted in an inappropriate context.40 other grammatical case-forms are hardly ever used at the verse-end. and no less our own.43 but virtually all other examples of terminal. passages that convey the essential idea of “walking alone” and that employ the terminal. sung.118 Ahuvia Kahane Terminal oios is clearly a “marked” term. Almost two thirds of the nominative masculine singular are localized at the end of the verse. enacted in accordance with the interpretation suggested here.44 In Iliad 10.45 All imply that the addressee is doing something exceedingly bold. indicating his awareness of the discrepancy between character and circumstances.46 In each one of these examples.203 (Hecuba to Priam about his visit to the Greek camp).82–83): “Who are you.82 the surprised Nestor demands to know the identity of an addressee who is walking about the camp at night (10. or is assumed by the speaker to be. away from the army. a nonhero. heroic. or in general.385 Odysseus interrogates Dolon about the latter’s nocturnal perambulation (10. ). at the point of deictic fluctuation. mounos cannot echo the exclamatory hoios (“such a . my prize goes elsewhere. larger-than-life hero who does not depend on the consent of their peers but who acts “alone. a word that pretends to speak of a uniquely wretched and dependent state (as are the men of today . like the poet Demodokos in the Odyssey? Like “Homer” himself?). the speaker is not anyone resembling men as they are “now.” Consider now more closely the use of mounos. as the assembled Greek host can see. directly reflected by the mimesis itself. the person speaking is not a feeble priest begging for his child or an ancient king begging for a corpse. I suggest. The last example is Iliad 1. But there is more. In the one example of mounos we have seen so far (our first passage. my prize goes elsewhere. where oios is positioned. First let us note that although mounos itself contains the “o” vowel (the word derives from monwos) there is in our extant text far less alliterative play on the exclamatory sounds. having heard Kalkhas’ explanation of the plague. so that I shall not (mê) be alone (oios) among the Argives without a prize.) but that enacts. since that is not seemly. For.Hexameter Progression and the Homeric Hero’s Solitary State 119 precisely the kind of contrast that can be marked by the interstice of silence at the end of the verse. We the audience also see the raging Agamemnon in our mind’s eye (the reality within the narrative).”). but adds (118–120): “Give out to me forthwith some prize. To the assembled Greeks the discrepancy between sight and sound to Agamemnon’s audience spells out a message: the humbler the plea. agrees to send Khruseis home.” And yet. the bigger the threat.. then here too oios is marked as an exclamatory echo and may be enhanced by the effects of a deictic fluctuation. for as you can all see. The king’s speech is preceded by a long and intensely visual display of anger (a “heroic” emotion . the violent.” but a mighty hero and far-ruling king. a point stressed by the repeated visual vocabulary. since that is unseemly. and. with our real eyes (in the reality of the performance) a humble bard (helpless? blind . and no less by verse-terminal oios (indeed mê oios. “not” oios). Iliad .. Indeed.” This passage of direct discourse is an emotive request.. Agamemnon is the far ruling (102) raging (103) black hearted (103) burning eyed (104) evil staring (105) overlord. The contrastive falsity of Agamemnon’s words is also. of course.. over the course of just fifteen lines his rage simmers down to a whimper: “Give out to me forthwith some prize so that I shall not be alone among the Argives without a prize.. Remarkably. If my interpretation is correct.118: Agamemnon.. as you can all see... but we no less see in front of us. In three consecutive lines mounos. of being alone. whom a man trusts for help in the fighting. where Telemakhos is speaking to the disguised stranger. It is not. it carries none of the phonetic echoes .. And as just stated before. here in the sense of “an only son” is repeated four times in as many verses.113–125. my friend. By far the most prominent cluster of attestations of mounos in Homer appears in Odyssey 16. beyond numbering. but the word was verse-internal. is verse-initial. but it is not rhythmically marked in the manner of oios in line 456. For so it is that the son of Kronos made ours a line of only sons (mounôse). and my enemies are here in my house. nor are they angry. we assume. nevertheless..453–456 above) mounos was used to describe the beam securing the door of Achilles’ hut.47 As in the case of Achilles and the beam. And Laertes had only one (mounon) son. It is not that all the people hate me. easy to find examples of mounos that are formally marked and that relate significantly to examples of terminal oios. and also the stone-throwing passages. Odysseus. or rather the accusative masculine singular form mounon. Previously. these lines too are a situational definition.!”) as in the case of terminal oios. who is his father: “So. Neither ritual song. heroic past. Laertes. and it is not the focus of a verbal reenactment ritual. this permanence was effected by iterative verbs. My point is that mounos in 24. and a big tree might easily produce a real object that is “bigger and better” than door-bolts of the past . myself. nor a singer are essential for its reenactment. By contrast. It is... a discreet element of the lost.120 Ahuvia Kahane 24. Arkeisios had only one (mounon) son. An ax.” The idea of mounos. They too describe not one particular moment in time but a permanent attribute of the main characters of the Odyssey. no amount of woodwork will summon Achilles to the present. The beam. whenever a great quarrel arises. here it is effected by (rhetorical) anaphora and by the idea of a genealogical chain put together by Zeus. a steady arm. and got no profit of me. nor is it that I find brothers wanting. is unique in size among door-bolts.453 is an important word in the context. and as such is an important matching accessory for the great hero. both in terms of their localization and in terms of their discourse functions. in the halls. I will tell you plainly the whole truth of it. And Odysseus in turn left only one (mounon) son. however.48 The word mounos here is not uttered in amazement and admiration for the abilities of some singularly great character (“what a . and especially in the nominative masculine singular. while usage of mounos covers a broader. and of himself. someone more like “the men of today. not before it. At the same time. not “bigger and better” than ourselves. To reject a pause at the beginning of these lines is to reject the very rhythmic essence of epic. is how Zeus decided that our family should be: [interstice of silence] “mounos my grandfather” [interstice of silence] “mounos my father” [interstice of silence] “mounos I myself . All this makes good sense: conceptually oios is the more “special” term (describing “special” . He speaks of Laertes.. as the past and the present are placed side by side. usage of the word oios. says Telemakhos. a great hero but presumed dead. is commonplace only in Homer and ancient commentaries on the Iliad and Odyssey(!).” The word mounos is physically the first word of each verse. Each time we meet not an epic hero who is oios. “emphatic.” Our empathy and pity almost fully overlap Telemakhos’ anguish. more loose range. is the state of having no brothers hoisi per anêr // marnamenoisi pepoisthe “whom a man trusts for help in the fighting” (115–116). judging by the extant remains of ancient Greek literature. We have noted how distinctly oios is used at the verse-end. which is impossible. that is. but such precision is not needed. This.. the son (. Being mounos as Telemakhos clearly explains. marked term. a boy too young to resist his enemies. This.49 Usage of mounos in authors other than Homer is much wider.50 and in Homer verse-initial usage varies between nominative mounos and accusative mounon. The threefold repetition of mounos at the beginning of the hexameter unit stresses the cyclic nature of the utterance. It may be difficult to determine the precise length of the pauses (which in any case are likely to differ from performance to performance). an old man. of Odysseus.) of Kronos. whose will is supreme. but a supposedly helpless mounos.. it is a state of helplessness. And of course mounos is localized in a position that is formally the opposite of oios: after the pause.Hexameter Progression and the Homeric Hero’s Solitary State 121 of exclamation. how mounos is excluded from the verse end. several important clues indicate that among the two words..” “weak” mounos can be found in Homer. Three times we face a member of the family at the point of the deictic fluctuation. They suggest that mounos and oios function as complementary/opposing rhythmic-semantic terms.” Furthermore. Mounos in this passage is an element of exposition. I suggest. a reaction to isolation as a state of weakness that is beyond mortal control. oios is the morespecific. Furthermore. and how mounos does not replicate the exclamatory sound “o. Many examples of verse-initial. So mounos here does not mark amazement at the larger-than-life heroic abilities of a hero but rather the very opposite. is where epic is enacted. this hereditary helplessness has been ordained by the most powerful of the gods. an only (mounos) and loved son?’ ” The deictic fluctuation at the beginning of the verse has the potential to provide concrete illustration to the contrast between a weak Telemakhos. you. kissed him even as if he had escaped dying.481–482. precisely at a point that itself allows the poet to enhance our consciousness of both realities.122 Ahuvia Kahane heroic abilities).28–30): “So he was twisting and turning back and forth.361–365 Telemakhos’ plans to sail in quest of information upset the nursemaid Eurukleia: “So he spoke.” Inasmuch as these two are a pair.” The love of fathers for their (“only”) sons in the reality of the present and in the world of the narrated heroic past is doubtless identical. and bitterly lamenting she addressed him in winged words: ‘Why.” Closely related is the example of Iliad 9. welcomes his son when he comes back in the tenth year from a distant country. In Odyssey 16 the poet breaks the narrative in order to comment on Eumaios’ greeting of Telemakhos by use of a simile (16. and the dangerous reality in which he is situated.” . here we encounter this emotion. who is more like the men of the present.30 the narrator describes the thoughts of Odysseus as he wonders how he should take revenge on the suitors (Odyssey 20. mounos the more “ordinary. In Odyssey 20. his only (mounon) and grown son. oios is the marked term. within Phoinix’ speech to Achilles: “and [Peleus] gave me his love. even as a father loves his only (mounon) son who is brought up among many possessions. centered on the word mounos. with heart full of love. that calls rather for the unique abilities of a hero. has this intention come into your mind? Why do you wish to wander over much country. and the dear nurse Eurukleia cried out. meditating how he could lay his hands on the shameless suitors. though he was alone (mounos) against many. my beloved child.19): “And as a father.51 In Odyssey 2. for whose sake he has undergone many hardships so now the noble swineherd clinging fast to godlike Telemakhos. Again we have no means of measuring the precise duration of the interstice of silence preceding mounos. Verse-initial mounos presents us with the hero at his weakest. In our next passage the poet describes the death of the unsuspecting Antinoos at the hands of Odysseus (Odyssey 22.9–14): “He was on the point of lifting up a fine two-handled goblet of gold. so that (hoion) you are trying to fight the Trojans in the first shock of encounter . again.469–473. alone (mounon) among many. The dog imagery and entrails simile are externalized representations of an internal transition: from “that which bites/kills/threatens” to “that which has been killed/is screaming in agony/is about to be bitten. to a simile. consider the case of Iliad 17. and helpless characters. and had it in his hands. through a transitory stage of rational reflection and restraint (17–18). wild and reckless thoughts (“let’s jump and kill them all at once!” 11–13) of a barking heart (14–16). and was moving it so as to drink of the wine. and in his heart there was no thought of death.40 and in Iliad 11. who cannot. and has taken away the better wits. the whole section relies on the tension between heroic characters who can stand up to the many (more or less) alone.406.52 Indeed. in Odyssey 20. what god put this unprofitable purpose into your heart. Interesting comparable usage may be found. Alkimedon is here wondering that Automedon is about to enter battle alone: “Automedon. is also the essence of the distinction between the heroic reality and the weaker reality of the performance (the “men of today”) which interstices of silence bear out. in fact.Hexameter Progression and the Homeric Hero’s Solitary State 123 The beginning of book 20 describes Odysseus’ deliberations. Finally. but one of passivity and helplessness. For who would think that a man in the company of feasting men. but its potential as a concrete enhancement of the contents of the situation is clear. though he were very strong. in which Odysseus tossing to-and-fro is likened to entrails roasting in the fire—a powerful image. at a moment when he is least like the oios hero. The passage kicks off with the active. not of singular heroic ability and resolve.” By the end of the transition the polytropic hero is hardly feeling ready to perform astonishing deeds. marked by the word mounos. This. would ever inflict death upon him and dark doom?” The omniscient narrator is here voicing the thoughts of one who is oblivious to impending doom: Antinoos has no grasp of reality. Therefore take over from me the whip and the glittering guide reins while I dismount from behind the horses.” Automedon the charioteer. But to assume that so many repeated attestations of such significant words at such prominent positions in the verse are due to mere chance or to mere technicalities.53 Indeed. the man whose fighting role is “incomplete” without a partner. soundless words. mounos. mark important examples of mounos and oios. were it not Patroklos. both semantically and thematically. How far do these echoes extend? This is a difficult. a mounos type character. Automedon in his reply to Alkimedon says (17. line 471 begins with the word hoion (in this case adverbial) and thus immediately contrasts. we have seen elsewhere. and not thus of equal heroic rank to the great warriors. is firmly linked to usage at the extremities of the verse (hoion. valorous action. since your companion has been killed.475–480): “Alkimedon.124 Ahuvia Kahane alone (mounos). Two lines later. And yet part of their complexity is set within an ordered rhythmic. which other of the Achaeans was your match (homoios) in the management and the strength of immortal horses. 17. He has just been deprived of his companion Patroklos. between pity and amazement. And of course. . if they exist at all. perhaps reminiscent of the oios-type hero. not “alone”). the equal of the immortals in counsel. homoios). The passages are rich in echoes and melodies. and which can emphasize the contrast between the largerthan-life past and the present. Mounos is used in its familiar verse-initial position. while he lived? Now death and fate have closed in upon him. so I may do battle. undergoes a transition and becomes more of an oios type hero who can and does fight successfully alone (cf. hexametric framework. The central poetic opposition of this section—the contrast between helplessness and heroic abilities. which. is to assume a poet whose indifference to the sounds of his words is almost complete. is thus in a passive state of isolation. with the following mounos.516–542). but has also chosen to fight alone. but the very preceding line speaks of insane. if not impossible. question to answer. and Hektor glories in wearing Aiakides’ armour on his own shoulders?” Automedon is charioteer to both Achilles and Patroklos (a man professionally inclined to fighting in pairs. exist only on a written page. But have we been using a sledgehammer to crack a nut? After all. vocative proper names. How often. indeed overlaps. but perhaps no less the complementary. the mediation between past and present is not simply one among many motifs in the poetry of Homer. grammatical types. and the more humble reality of the present and the performance. mênin (wrath). While the localization of many words. it extends well beyond the use of formulae. clearly relates to. oios and mounos are but two words in the Homeric lexicon. “fame”: a juxtapositioning of past and present. I have tried to argue that the very cognitive functions of the pause/flow rhythm at the points where these two words are prominently localized embody this contrast. and it cannot be explained in terms of simple metrical convenience. as they are presently defined. It is arguably the most important aspect of the poems. employed in notable examples with repeated localization at opposing verse extremities. This formal opposition helped mark the contrastive. and noston (return). Two types of solitary states were noted: isolation as the mark of larger-than-life heroic abilities. we have argued for the existence of a mechanism that endows every verse with the potential for emphasizing deictic fluctuations. The two opposing notions were formally marked by use of two otherwise synonymous words. nêpios “wretch!” at the beginning of the verse55). is this potential realized? I have elsewhere argued for statistically significant and hence also semantically significant localization tendencies of lexical/semantic/ grammatical items. their very raison d’être: the poems are exercises in the preservation of kleos. and there are other obvious candidates for the further study of rhythmical semantics (for example. The relationship between the two terms was made even more significant by the fact that they correspond to a conceptual opposition central to Homeric epic: the contrast between the larger than life reality of epic past. and isolation as the mark of “ordinary” mortal helplessness.54 These tendencies apply to thousands of individual examples. at the ends of the verse. “formulaic” usage. Now. largely single words.Hexameter Progression and the Homeric Hero’s Solitary State 125 THE EXTENT OF RHYTHMICIZED SEMANTICS We have seen some examples of a system of rhythmicized semantics/poetics in Homer that relies on the basic pause/flow nature of the hexameter. which is the “special” attribute of Homer’s heroes. and so on. Any device that can emphasize the contrasts and/or similarities between the realities of past and . nominative proper names. Localized usage of oios and mounos at the extremities of the verse allows an almost literal enactment of kleos. such as andra (man). for example theme words of the epic. nature of the two terms. then. and in order to explain their usage. oios and mounos. and again: po-lu-mê-tis-O-dus-seus. how can there be contemplation? Approaching Homer with this problem in mind has led on the one hand to implicitly (or explicitly) textual readings. that rely so heavily on texts. it is “the same” if we are shown the world of epic heroes “out there” either for part of an evening or for three whole days.” an object that can be held in our hands and possessed.56 ONE MORE WORD. again. an Eliot. More recently. and on the other to various degrees of denial of precise shades of meaning (for example in formulaic discourse). and still feel that the performance is in essence a fleeting thing. rather they activate a whole “theme. chanted ever in a fixed position within a short.” a “node” in the tradition. phonology. Auden. essentially. in a literate sense. Epic words relate to and recall. A thousand-line epic poem about Achilles is in this sense “the same” as a poem fifteen times in size. pragmatics. repetitive pattern we call the hexameter. an object that “does not change in time. the very medium that seeks to preserve “sameness. how would we ever know that they do belong together. or an Angelou. if words must flow at a constant pace. not so much this or that fixed point elsewhere in a text.” But if two poems are nothing but fleeting streams of words and if each is performed at a different time. vocality risks being construed as a flourish. “The Movie” of a television series and the shorter network “episodes” are in a deep sense “the same.” Likewise. but a full understanding of their poetry always assumes a book. one line of “ritual” of epic verse opens the same kind of window to the epic world as do a hundred lines.” converts a long and a short version of “the same” song into two “different” texts: writing results in two objects that can be placed side by side at a single point in time and hence shown. “performed” significance. discourse analysis. an ornament to the “real” artifact. and the study of orality (indeed. Thus.” a “myth.126 Ahuvia Kahane present could be of use in a very wide range of Homeric contexts and would have the ability to imbue many epic words with specifically hexametric. writing.57 Paradoxically. and again. Angelou. Eliot. They require a close. that they are both parts of “the same” world? It is because key elements of this world are repeated. to be “not the same. and especially in the even more highly textualized world of scholarship. But if access to a text is limited or even nonexistent (either in the production or in the reception process). AT T H E END In worlds such as our own. time-bound) contemplation of the text. and many other “literate” poets rely heavily on voice. Many will admire the voices of an Auden. not monodirectional. po-das-ô-kus-A-chil-leus. the work of many of the contributors to this volume) have shown that epic words do allow us to reflect. leisurely (that is. . Lorelei) are deadly exceptions. Sale 1993). this does not mean that it cannot be written down.” Homer’s poetry is not. in epic . 6 beats) units. Foley 1991:7.g. I use the term “meter” to refer to the formal framework of sequencing and segmentation. Zumthor 1990a:51.. 14.” to “nontextual contemplation. See Devine & Stephens 1994:99–101. 4. e. 8. Some license is taken with English word order so as to reflect a word’s original position in the verse. Use of formulae is a case in point (see Edwards 1988:42–53. and furthermore. I would suggest that this “pause” can be a cognitive entity. See Griffin 1980:81–102. 10. 5. syllabic in the case of Homer. On ellipsis in this sense see Nagy. in the distant past. it has (how. “Literate” hexameter authors (Apollonius. deconstruction. I dare not here say). and when. Göethe.Hexameter Progression and the Homeric Hero’s Solitary State 127 At this point vocal. It can.. Porter 1951). rhythmic properties become the key to sameness.. However.” We can transcode vocal similarities in two hexameter sequences using graphic signs. and in a concrete sense two different texts! Inasmuch as the poetry of Homer is traditional. the sonnet. 11.. NOTES Translations are based on R. we have produced two different verses. but they do not link their rhythm and their diction in quite the same way as Homer. to “authority.. Wyatt 1992. as I have tried to show. 203. etc. that they were seeing and hearing what.g. 12. See Kahane 1994:114–141. Daitz 1992. etc. Compare Nagy 1990a:170. Ordinary parlance can display “phonological isochrony” (Hogg and McCully 1987:222–225).) use a meter almost identical to Homer’s (O’Neill 1942. actually took place . I use the term “rhythm” to refer to a much broader and less formal range of sequential/segmentational phenomena. 9. 7. 1. to continuity. 15. Perhaps a kind of sphragis (“seal”). reader-response criticism. but the moment we do so. See Daitz 1991. Lattimore. but not large-scale repetition of formally identical (e. any feeling. nor can it ever be. Unlike. however temporary. 3. illusion was plainly impossible and was in no way attempted [but epic] could nevertheless cause the hearer to imagine vividly the scene and the various persons acting and speaking.. rather than an actual silent duration.” . Especially Oesterreicher and Schaefer in this volume. Siren songs (Odyssey. 6. and inasmuch as traditional implies “sameness. For drama and epic see Greenwood 1953:124: Greek drama “did not attempt to produce in the spectators’ minds any sort of illusion. 13. in this volume.) strongly suggest that even the text is a symbol of fixity. 2. so drama could do this. Bakker 1995:109. the written voice does “sound” the same. textual. Quintus. Many poststructuralist approaches (hermeneutics. “then did Hermes . See Frisk 1960–1972 for comments and bibliography. “small. 27.128 Ahuvia Kahane 16. The last full position in the hexameter may be occupied by either a single long or a single short syllable.” etc.g. mounos (<*movn© oß) perhaps associated with manos. 177. 44. ch.” elements that directly push the plot forward in time.. 29.” and manu = mikron. For speech acts see.. Oral cultures tend to classify items “situationally” (i.” elements that do not: “He [i.e. For the narrator’s comments in Homer see (S. After which the main. brushed his teeth (b). Searle 1968.” “far”). Bakker. 18.. 3. however. 32. Hoios is an indirect interrogative pronoun (Chantraine 1963:238–239). qetrowes. triowes. Wyatt 1992.. what are the contents of what you have said?” (since Zeus has just heard his brother’s words).g.e. “rare. See Toolan 1988:162–163. 24. de Jong 1987:19. LSJ with verbal communications from P. 22. See following notes. 31. Although the narrative’s presentation of temporal events is not always linear (flashbacks. we can generally separate between “narrative foreground.” See Chantraine 1968–1980. For the internal metrics of the hexameter see Ingalls 1970. See e. Frisk 1960–1972. Narrative is a description of events along a time axis: “John got up (a).. decontextualized properties (Ong 1982:49–54. Schechner 1985:117–150 (“Performers and Spectators Transported and Transformed”). Waanders 1992 (on origin and etymology of numerals) is silent on mounos. 34..). in this volume (“near. Lada 1993–1994. while literate cultures stress abstract.. Caesurae also affect the flow.” “he had breakfast. John] was an ornithologist.. Daitz 1992. but verse ends/beginnings are more prominent. b .. 30.. Gimson 1994. Olson 1994:37–44). by linking them to a situation).. 20. With a few exceptions in “irrational” hexameters. 21.. TI-RI-O-WE. “objective” narrative picks up again dê rJa toth’ Hermeias. Chafe 1994:29–30. “John got up.) Richardson 1990:67.” “Slower stimuli tend to be perceived as discrete events not joint to each other in a rhythmic pattern. 33.” See Fleischman 1990:15–51. 19. and “narrative background.. 25. 4. The rest of Zeus’ speech makes it clear that he is not seeking an answer and that he has not really asked a question: technically (as in Searle 1968) an expressive rather than a directive speech act. had breakfast (c).5 events per second. visions. but we cannot paraphrase “Poseidon.. Glare. “one”. Boisacq 1938. 26.). e. 28.). Oios from Indo-European *oi-. Oios and mounos are metrically identical. Compare codas at the end of narratives. See Devine and Stephens 1994. QE-TO-RO-WE (oiwowes. See Daitz 1991. etc . Our sense of rhythm depends on patterned temporal sequences. in which stimuli occur regularly: “8 to 0. a . c . 23. 17. Actual duration values do not.e. Tn. ch. these two apparent synonyms are metrical variants. affect our argument. but the former begins with a vowel. G.” Estimates vary as to the duration of rhetorically significant pauses (see Deese 1980). the latter with a consonant. no other position enjoys such privilege. d . See Ingalls 1970.. etc. .. See Linear-B (PY Ta 641): O-WO-WE. three-eared vessels. one-eared. which bring the narrator and listener back to the point at which they entered the narrative (Labov 1972:365). Kahane 1994:17–42 on relative prominence of pauses.. and left (d)” = T0 . sparse.” (457ff. i.. See Chafe 1994:33 (“Conscious Experiences May Be Factual or Fictional”). . lexical. my heart flutters outside my breast..379–383. Achilles. Terminal localization of mounos is metrically possible and occurs elsewhere in epic (e. For example. 17 out of 26 examples (65%). or otherwise). as for example in 14–15 in our example.220–224) and thus possibly a variety of madness. See Nagler 1974: lff.. masc.201–202).9% and 41. Iliad 10. On phonetic/semantic relationships see. 732. o. 1x terminal (Iliad 16. In his reply to Achilles Priam totally ignores everything in his interlocutor’s words (553–558).g. 41..” But also in contexts where no heroic element is discernible.. “a man would not easily lift it up in both arms. //ethele . 1.3% and 41. my limbs tremble .” 36.) since Hektor alone (oios) saved Ilion.340). e. the tendency for words with metrical values – ∪ and – – to be localized at the end of the verse is 35. Compare Odyssey 17. acc. 47. Dat. dat.. sing. gen. The choice of mounos in verse-initial position rather than oios or the accusative oion is not affected by meter. not attested in any position.7% respectively (Odyssey) (data: O’Neill 1942:140).146)..207). 20. sing.. Oppian. . Agamemnon says “I fear terribly for the Danaans. Compare the rhyme in later poetry. Corinthiaca (in Dio Chrysostom.3% respectively (Iliad).112. fem. to our earlier kai oios examples: localization of oios may be related to formulaic composition but is a much broader phenomenon.200. Iliad 2. But this “system” is not linked.391). //oute .524. //ethele . Disregarding semantic. The alliteration is common.. 43.” 44. but questions (rhetorical. masc. (Rhetorical) anaphora in Homer is often localized at the line’s extremities.” 39. in saying “ah. //Nireus .. Dolon’s first words of reply are “Hektor caused me to lose my senses” (10. remaining 159 attestations are dispersed among 57 authors/collections.. Parry 1971:72. Halieutica 2.... The formal antithesis of Iliad 5.197. Compare Iliad 12... where the stone’s size is more modest: oude ke min rea kheiress’ amphoterêis ekhoi anêr. 49. also Nagy 1990a:31–34. 11. what has the dog said. //etheletên ... The shrieking Hecuba kôkusen (24. Priam explains that his motivation is divine (compare 24. 42. Argonautica 1..g.91–95).Hexameter Progression and the Homeric Hero’s Solitary State 129 35. hena d’oion hiei oikonde neesthai “He killed them all. Comrie 1976:111. and context-specific considerations. p.. There is no metrical reason to prevent terminal usage in any grammatical case.. 40. 46. These examples are clearly formulaic.32.. and particularly its beginning. Apollonius Rhodius. and his note 1. except that he let one man alone (oion) get home again. my heart is unsettled. never terminal.. In Iliad 6.304 is enhanced by the plural/singular antithesis hoioi/oios. and gen. 37.403 Hektor is the only hero of Troy (oios as the mark of heroic isolation): (Astuanakt’. 45. fem.” (10.. 10. this thinker of destructive thoughts. 2.13)). hoion eeipe kuôn olophôia eidôs “o my. “(Astuanax—lord of the city. //ethele . The examples are not statements. // Nireus . Pucci 1993:258: kôkuein normally in mourning for a dead husband) says to Priam: “Where has your mind gone?” (24.. This is not the result of simple metrical tendencies.227.” (24. nom. //oute . 1x terminal (Odyssey 9. hoi d’ethelon . and hence more specifically expressive elements of direct speech.397) pantas epephn’. Geiger 1958.518) implies that Priam has lost his senses through suffering. sing. wretch . as when Tudeus kills everyone except Maion (Iliad 4.571.) oios gar erueto Ilion Hektor. 34. acc. but never in Homer except for a single example mounê (feminine) in Odyssey 23. 48. 21. Or. sing. I wander. Iliad and Odyssey (66).. and voc. scholia to Homer (64).671–673. 38.. grammatical. Eumelus.160..227–231. in formulaic terms. TLG (#D) lists total 370 attestations of nominative masculine singular: Eustathius’ commentaries on Homer (81).. 4x verse-terminal (Odyssey 9. sing. masc.248: ô popoi. TLG lists total 340 attestations of the nominative masculine singular mounos: Nonnus (60). in this volume. 53. But this requires separate study. but usage is far less markedly Homeric.130 Ahuvia Kahane 50. Greek Anthology (26). kicks the table. Eustathius (15). On nêpios see also “Bakker. Gregory Nazianzenus (19). and meat gush out (17–21). Some elements of this speech may be comparable to Hecuba’s address to Priam (see earlier). blood. The semantic functions of rhythm as described in this article may be more difficult to trace in later. only 14 in Homer. The variant form monos is virtually universal. see Ford in this volume. Kahane 1994. The forms mounos/mounon are found mainly in hexametric contexts (incl. on Odyssey 20. As Antinoos collapses. 52. and their thoughts are described in a highly unusual manner (Griffin 1986:45.31ff ). 55. 51. On the magnitude of the Homeric epics. . For example. “literate” heroic epic. the suitors rush about in disarray (21ff. 56. where oios is used. scholia). bread. Herodotus (26).). Comrie 1976:111. 54. 57. scholia to Homer (18). also Nagy 1990a:31–34. Confusion here is part of the wider matrix of Odyssean disguises and late recognitions. Even in death Antinoos’ rowdy “feasting” continues: he casts away his cup. Another religious dimension to these events concerns Patroklos’s physical and mental state during his encounter with Apollo. Apollo is invisible and merely reproaches him with threatening words. godlike. Apollo thus signals the futility of Patroklos’s actions. For example. On the first occasion. In several places. 131 . These words. ©1998 by Rowman & Littlefield. however. Patroklos is clearly not himself during these events.DEREK COLLINS Possession. Apollo tells Patroklos that neither he nor Achilles is fated to overtake Troy.3 On two separate occasions. even equal to Ares. religious dimension to Patroklos’s death. Patroklos relentlessly charges the god again as if he had no control over his actions. are not trivial.2 But there is also a more subtle. Nowhere else in the Iliad does a god so directly aid in the killing of a hero. despite the warning and the evident presence of Apollo. enabling Euphorbos and finally Hektor to deal him the fatal blows. The daimôn in T From Immortal Armor: The Concept of Alkê in Archaic Greek Poetry. Yet on the second occasion. Patroklos is designated as equal to a daimôn. One would think that no matter how enraged a warrior might be. and the Death of Patroklos he death of Patroklos is an extraordinary event by most accounts. we can detect elements of ritual involved in his encounters with Apollo. Patroklos charges the god three times and then is repelled on the fourth. Armor.1 The most unusual feature of his death is that the god Apollo directly intervenes and stuns Patroklos. a warning from a god himself would be a cause for concern. which should dissuade him from continuing. and is sometimes equated with Fate. Confrontation with a divinity who has already indicated the fate of failure demands a different kind of explanation. and his subsequent death at the hands of another god. Patroklos might have been brave elsewhere on the battlefield. He has it fitted on him and we are told: Ares the terrible war god entered into him.210–12 This passage raises two central issues that we shall have to discuss in some detail. More important.5 There is a more immediate explanation to be found in the immortal armor (ambrota teukhea) of Achilles that Patroklos is wearing. is employed on specific occasions in Homeric poetry.6 It is to these that we must look for an explanation of Patroklos’s physical and mental condition before his demise. but at least during a confrontation with other heroes there is the possibility of success. After Hektor strips Patroklos’s armor from him. But the expression used of Patroklos. Sarpedon. and his limbs inside were filled with alkê and strength Iliad 17. Once a divinity is inside a person.132 Derek Collins Homeric narrative generally represents an impersonal divine force. First. the passage describes the possession of Hektor by Ares. Let us begin with certain events after the death of Patroklos. This armor is special in the first place because it is divine and was fashioned by Hephaistos. We shall be interested in the meaning of the contrast between the height of ritual identification attained by Patroklos with one god. daimôni isos ‘equal to a daimôn’. before he is stunned by Apollo and eventually killed by Hektor. which we can document in Greece especially well during the classical period. and the divinity is believed to work through him. however. merely full of war mania. the Trojans are in the process of carrying it back to Troy when Hektor withdraws from battle.4 and implies a ritual identification of hero and god. catches up to them.7 Second. is a widely attested cross-cultural phenomenon. Possession. and . and then retrace our steps in an effort to understand the position of Patroklos in book 16. I do not think the answer is that Patroklos is reckless here. and takes the armor himself. This identification occurs at the peak of Patroklos’s aristeia. his self-awareness. it communicates to its wearer a kind of power that has specific military and religious qualities. a phenomenon in which a divinity or a divine power temporarily invades a person. we have to examine the alkê that is communicated to Hektor in some detail. he is thought to lose his consciousness of self. or that he has become overconfident as a result of killing Zeus’s son. Possession, Armor, and the Death of Patroklos 133 explore the relationship between alkê and Ares. Archaic and classical Greek poetics represent alkê, rather than sthenos or any other kind of power, and Ares as intricate and predictable counterparts. The kind of strength or power that is distinctively figured in alkê is regularly associated with Ares, and the connection between them is expressed in military and religious terms. The first thing to note with regard to this passage is that it dramatizes the possession of Hektor by Ares. The verb duô ‘to enter, put on’ is used in the sense here only in one other place in the Iliad, at 9.239, where lussa ‘rage’ is said to have entered Hektor.8 There is certainly a thematic parallelism to be found between lussa as a kind of rage generated by war, and Ares, the god of war, which can both enter into Hektor. But the parallelism is not strict. The description of Ares entering into Hektor stands alone in the Iliad as a graphic example of a mortal becoming possessed by a god. I use the word “religious” above to convey the seriousness of the event, as well as to highlight an important but underemphasized aspect of this scene. Hektor does not merely feel stronger as a result of putting on the armor; rather, the armor acts as a vehicle for him to become possessed by Ares. This possession has already been hinted at earlier when, after Hektor withdraws to put on the armor, Zeus vows to invest him with kratos ‘superior strength’. Zeus regards Hektor’s actions as ‘not in accordance with the order of things’ (17.205), and so commits himself personally to delaying, Hektor’s inevitable death by strengthening him: but I shall now put great kratos into your hands Iliad 17.206 The verb engualizô ‘to put into the hands of ’ (compare, for example, Iliad 15.491, where Zeus is said by Hektor to put surpassing kûdos ‘glory of triumph’9 into a warrior’s hands) already signals a degree of personal contact between Zeus and Hektor. Zeus nods his head in fulfillment of his promise to Hektor (17.209), and in this gesture we are also to understand that Ares has become the executor of Zeus’s will.10 The ultimate authority for investing Hektor with power comes from Zeus; but the realization of Zeus’s promise is effected through the direct intervention of Ares. The possession of Hektor by Ares can be compared to the anthropological phenomenon of spirit possession, which has been documented in a wide array of cultures.11 The “trance state,” to use I. M. Lewis’s term, can be induced by a variety of stimuli, including drugs, alcohol, music, dancing, self-inflicted or externally imposed privations such as fasting, or by no external source at all.12 According to Lewis, “possession” embraces a further range of phenomena such as illness and the indwelling of spirits. In 134 Derek Collins Lewis’s framework, possession incorporates and is characterized by trance states, but depends for its definition upon the cultural evaluation of the state of the possessed individual.13 For the purposes of this work, I will use Lewis’s definition of possession: Spirit possession thus embraces a wider range of phenomena than trance, and is regularly attributed to people who are far from being mentally disassociated, although they may become so in the treatments which they subsequently undergo. It is a cultural evaluation of a person’s condition, and means precisely what it says: an invasion of the individual by a spirit. It is not thus for us to judge who is and who is not really “possessed.” If someone is, in his own cultural milieu, generally considered to be in a state of spirit possession, then he (or she) is possessed.14 It will be useful to compare this definition, which depends upon the cultural interpretation of the phenomenon of possession, to that given by Lewis’s predecessor in the study of possession, T. K. Oesterreich. Rather than basing his analysis upon cultural interpretations, Oesterreich attempted to establish a universal psychological basis for possession: By the artificial provocation of possession primitive man has, moreover, to a certain degree had it in his power to procure voluntarily at a set time the conscious presence of the metaphysical, and the desire to enjoy that consciousness of the divine presence offers a strong incentive to cultivate states of possession, quite apart from the need to ask advice and guidance from the spirits.15 This conclusion of Oesterreich’s massive study, which surveys material within as well as outside Christian tradition, emphasizes the circular nature of the motivation for cultivating states of possession. Invoking a metaphysical presence is possible and pleasurable, Oesterreich claims, and the pleasure derived from possession in turn motivates further possession. However, the psychological explanation of possession is not the central concern in the present work. Rather, in accordance with Lewis’s observations, I am interested in the cultural evaluation of possession as it is articulated within different societies. Although possession can occur in many cultures outside a religiously sanctioned context, especially in the case of illness, the Homeric poems vastly complicate the issue of religion. The Panhellenic nature of the Iliad Possession, Armor, and the Death of Patroklos 135 and Odyssey prevent them from explicitly reflecting religious phenomena taking place at the level of local cult.16 Nevertheless the poems systematize religious phenomena, largely stripping them of their local elements, and represent them in a generic form. Local cults devoted to Ares are rare in classical times,17 but he was worshipped, among other places, in Sparta18 and Thrace.19 Whether possession phenomena took place within the cult worship of Ares in classical times is impossible to know because the historical evidence is silent on this point. Yet Ares’ possession of Hektor in the Iliad is straightforward. So this raises the question to what extent Homeric epic reflects actual, local cult phenomena, especially in cases where there is no corroborating historical evidence. Moreover, the Iliad and Odyssey are generally silent, in contrast to poetry from the classical period, on the issue of divine possession. Even the oracle at Delphi, where possession of the prophetess by the god Apollo is a Panhellenic institution, is only mentioned once in the Iliad (9.404–5) and once in the Odyssey (8.79–82), and there is no accompanying description of possession itself. But the fact that we do not have historical parallels of possession by Ares to corroborate what is represented in Homeric epic does not detract from the anthropological reality of the phenomenon. Hektor’s possession by Ares at Iliad 17.210–12 has been commented on by Eustathius, who interprets this passage in a similar way to what I have been arguing. Some of his remarks on lines 17.210–12 bear careful scrutiny: The poet greatly exalts the arms of Achilles: if he fills Hektor with power [dunamis], it is so that as such he becomes possessed [katokhos] by Ares. This is shown in the expression “and Ares entered into him” [Iliad 17.210]; that is, he has become entheos after being filled with Ares. Just as Patroklos enters into [duô] the armor, so Ares enters into him. We are to notice that such was the case with Patroklos, and before him Achilles, who has this same armor. Eustathius on Iliad 17.210–14 Eustathius tells us that once the god Ares has entered into Hektor, he is technically in a state of being entheos ‘having a god within’. Although this term does not occur in the Homeric poems,21 in later Greek it becomes a semitechnical religious term used to describe seers, prophets, bacchants, warriors, and others possessed by a deity.22 The commentary of Eustathius also highlights another word for possession, katokhos from the verb katekhô, which in post-Homeric Greek can also mean ‘to possess’.23 The etymology of katekhô suggests that a person is ‘held down’ by a divinity;24 but Plato 136 Derek Collins suggests, in the case of the poet, that katekhô means that he is ‘suspended’ (eksartaô) from the Muse.25 The two expressions entheos and katokhos are often used interchangeably,26 as they are in the scholion above, and the important point is that both can indicate the same kind of possession. The state of being entheos has been treated by scholars in some detail.27 Classical sources provide us with a varied picture of what entheos means, but there are some important features of the state that remain consistent. Plato suggests, for example, that the entheoi suffer at least a partial loss of awareness: the entheoi28 say many true things, but they know nothing of what they say. Plato, Meno, 99c However, in the context of this passage, which argues that politicians pursue just as valid a course under opinion as they do under knowledge, knowledge (qua virtue) is represented as something of which one is necessarily unaware. Knowledge is further implied to be the consequences that result from what a politician says (99d), and therefore it, knowledge, cannot be known because they, the consequences, have not happened. In light of this line of thinking, the entheoi, who for Plato are divine seers (theomanteis) and prophets (khrêsmôidoi), are only unaware in the sense that they cannot know the outcome of what they say.29 Plato offers the idea that an entheos poet or seer first has to have his ‘consciousness of self ’ 30 taken from him, and only then can he become a vehicle for the divinity. In his dialogue Ion, Plato has Socrates expound on what makes Ion such a proficient Homeric rhapsode: for a poet is a light, winged and sacred thing, and he is not able to compose before he has become entheos and put out of his senses, and his consciousness of self [nous] is no longer in him. Plato, Ion, 534b Elaborating on this point, Plato has Socrates state further that the divinity that caused the possession is what speaks through the poet. Poets and seers become, in this interpretation, mere instruments through which divinity communicates directly with mortals. After suggesting that poets cannot have their skills by dint of a learned art because they only specialize in compositional forms (such as the dithurambos, enkômia, huporkhêma, epê, and the iambos) and are not accomplished in all forms, Socrates asserts that the source of this knowledge must be a divinity: and the mountain mother (142–44) as possible sources for the entheos of Phaedra. In the scholia to this passage. but late. the chorus of the women of Troezen describe Phaedra as entheos because she is fasting (136) and mentally unstable31 (144).Possession. that the state of being entheos can only take place with the loss of an individual’s consciousness of self (nous). At 141. testament to the psychological state of the entheos comes from the scholia on Euripides’ Hippolytus. so that we who hear them may know that they.33 which are conditions prerequisite to becoming entheos. the chorus describes Phaedra as entheos. But what is clear is that. as it is in the scholion. we can see that his view of what happens to Hektor as a result of . or prophecy. as in the passage above from the Meno (99c). but the divinity itself is the one speaking and addresses us through them. Ion.210–12. and asks her who is responsible for her condition. Hippolytus 141 (Dindorf ) Unlike the other examples that we have seen. It is not clear from Euripides’ text. poetry. are not the ones who say such things of great value. Plato. whether the god who caused the entheos of Phaedra actually performs her actions. Another striking. If we return for a moment to Eustathius’s commentary on Iliad 17. or whether she acts in accordance with the commands of the possessing god. we read an even more embellished description of the person who is entheos. but here again we see the idea that consciousness of self (nous) is absent and supplanted by that of the divinity: entheoi are said to be those who have had their consciousness of self [nous] taken away by an apparition. 534cd This passage refines Plato’s conception of the process of poetry and divination but insists. and being possessed [katekhomenoi] by the god who made the apparition they do his bidding. from the point of view of the chorus. Phaedra’s behavior is understandable in terms of being entheos. just as with soothsayers [khrêsmôidoi] and divine seers [manteis theioi]. the chorus’s references to Pan. Scholia to Euripides. Hekate. Armor. Although the context here is not one of war. and the Death of Patroklos 137 On account of this the divinity takes away their consciousness of self [nous] and uses them as servants.32 From their point of view at least. Phaedra’s behavior suggests a lack of volition and perhaps a loss of nous. the Korybantes. 141. are all appropriate to ritual or ecstatic possession. whose consciousness of self [nous] is not present. In a more striking context. In the Shield passage especially. At Iliad 5. raging and shouting next to a grove sacred to Apollo (99–100.138 Derek Collins wearing Achilles’ armor fits the pattern of becoming entheos and katokhos.603–6 The words translated above as ‘rage’ are all derivatives of the verb mainomai ‘to become maddened’. where Ares keklhgw. At Iliad 6. In all of these instances we can detect both secular and sacred dimensions in the usage of the verb mainomai ‘to rage. the god of ritual madness and possession par excellence. then it must also have affected Patroklos and Achilles in a similar way. Here . Ares and Hektor are often pictured in the Iliad as fighting together. Iliad 15. where it is used in the context of Hektor’s battlefield rage: With this in mind [Zeus] drove against the hollow ships Hektor son of Priam.831. even though he himself raged. He suggests that if Achilles’ armor affects Hektor in this way.34 But unlike other warriors who are compared to Ares. we are introduced to Ares’ capacity to become maddened (and thereby his capacity to make others maddened). in the military sense of rage on the battlefield. it is clearly a deliberate evocation of ritual madness to have Ares raging about (perimainomai) a grove sacred to Apollo. Eustathius draws attention to the phrase ‘and Ares entered into him’ (17. Athena dismissively calls Ares ‘this maddened one’ as she advises Diomedes not to be afraid of him. Eustathius makes a further comparison that will be of great help to us in bridging this discussion of Hektor to that of Patroklos later. Ares is pictured maddened. in a context where the translation ‘rage’.210) as evidence for his claim that Hektor has become entheos by Ares. In the Shield of Hesiod. would be inappropriate. Already at Iliad 5. Just as when spear-shaking Ares raged or destructive fire rages in the mountains.35 Traces of this meaning are difficult to detect but already exist in Homeric poetry. which is a verb that can be associated in postHomeric literature with ecstatic religion and possession. Before we examine the state of entheos more carefully. when Hera advises Athena that they should not easily let him become maddened. mainomai is used of Dionysus.717. become maddened’. in the deep thicknesses of the forest. Hektor is compared to him particularly with regard to becoming maddened on the battlefield. We shall return to this observation about Patroklos when we examine his death in more detail.132. we need to consider the manner in which the Iliad highlights Hektor’s war mania by comparing him to a maddened Ares. the image of a maddened Ares appears again in the Iliad.ß perimaivnetai iJero.n a[lsoß ⎪ Foivbon jApovllwnoß). or the divinity to which Hektor can readily be likened. where Ares possesses Hektor. or was maddened. That Hektor has become possessed by Ares can also be confirmed by its effects. The point of this passage is not that Hektor can achieve ritual madness or a state of possession on his own. Moreover. and the Death of Patroklos 139 something closer to ‘ritually maddened’ fits the sense better. we can see in the passage about Hektor above that Homeric narrative makes a point of noting that he himself raged. Armor.Possession. the Iliad presents Automedon as having virtually the same kinds of strength and power. Although I agree in part with Calvo Martinez36 that Ares is “quizá la divinidad menos ritualizada de todas. The description of Ares entering into Hektor captures vividly enough the process by which he becomes possessed. In order to emphasize Hektor’s unique physical and mental state. We are now in a position to reconsider the description of Hektor’s possession by Ares at Iliad 17.210 Ares’ role in ritual possession is dramatized in positive terms. such as Ares. The suggestion here is that in other contexts Hektor is enraged or made maddened by a divinity. the divinity that is most apt to influence Hektor.210. which is an inference brought out most clearly in the direct comparison to Ares. I suggest that traces of this religious. It is rather to suggest that the prowess of Hektor is comparable to that attainable under the influence of a divinity.” nevertheless I think that Ares’ connections with ritual. As an example of the more subtle connection of Ares with ritual. especially as implied by the verb mainomai used to describe him. ritualizing mentality in connection with Ares are evident in the description of Hektor in the passage above. is Ares. is meant to highlight Ares’ absence here as a possessing divinity. because that would by definition be something different than being entheos. Traces of Ares’ power working through Hektor are detectable in the ensuing battle in which Hektor confronts Automedon. are more embedded in Greek poetry and therefore more difficult to detect. by way of the comparison of his madness to that of Ares. and his limbs inside were filled with alkê and strength Iliad 17. Let us review the description of Hektor after being fitted with Achilles’ armor: Ares the terrible war god entered into him.210–12 . or more specifically. The comparison between Hektor and Ares in this passage actually supplements the passage at Iliad 17.210–12. even though he is not described explicitly as being entheos or katekhomenos. In contrast. at Iliad 17. The description above of Hektor being maddened himself. and the power is transferred without the mediation of Ares and without possession. Yet the differences between Hektor’s possession by Ares and Automedon’s investment without possession are revealed in their subsequent confrontation. there and then strong Ares took away its force [menos] Iliad 17. Here Automedon makes a direct appeal to Zeus. As we saw earlier. Indeed. we have here suggestive evidence that the god himself is acting through him. in the Seven Against Thebes of Aeschylus. In light of Hektor’s possession by Ares. and the butt-end of the spear shook.210–12.140 Derek Collins We can compare this passage directly with what is said of Automedon as he prays to Zeus before confronting Hektor: and he after praying to father Zeus was filled with alkê and strength about his black breast Iliad 17. and in turn through what he touches. We need to explore whether there is a dimension to alkê that is peculiar to Ares. where the recipient of divine intervention becomes the instrument through which the divinity works. Before turning to Patroklos’s death.498–99 We recall that. in the case of Hektor. At 17. This dimension concerns what we might call the poetics of alkê. implicitly designated Ares to perform the transfer of power. Zeus had decided to invest him with kratos and. At first glance there is nothing unusual about alkê being conveyed to Hektor. which was one of the kinds of power communicated to Hektor by Ares at Iliad 17. and behind him the long spear stuck in the ground. since it appears with some frequency as a concept of strength or power in the Iliad.527–29 These words suggest that Hektor’s spearcast was not only propelled by his own strength. There we read about the warrior Hippomedon outside the gate of Onka Athena: . But not all alkê in this sense is the same. this is a standard feature of being possessed. but also by that of Ares. after nodding to seal his commitment. a dimension of this kind is attested elsewhere in Greek poetry.525 Hektor casts his spear at Automedon but the latter reacts quickly: for he bent forward. we need to consider another dimension of Ares’ powers of possession. Aeschylus brings together several important threads here that are only implicit in the Iliad. Eris ‘Strife’. In this way. by possessing Hippomedon. he also brings Dionysus’s province of ecstatic religion into contact with the realm of war on the other. Alkê ‘War-Strength’ and Iôkê ‘Onslaught’ (5. possessed [entheos] by Ares he rages in alkê like a bacchant. which I have inadequately translated as ‘in alkê’. quality. alkê most likely represents a kind of strength or power exhibited in war or battle. as it comes between terms (bakkhaô and thuias hôs) that reflect the action of a bacchant. and thus a direct link is established between Ares and alkê. We may recall that in the Iliad mainomenos is used of both Ares and Dionysus. where his limbs are filled with alkê. The expression pros alkên (498). where Hektor’s limbs fill with alkê after being possessed by Ares on the other.Possession. Bacchic or Dionysiac frenzy.210–12. as Hippomedon is preparing to attack whichever Theban warrior is chosen to meet him at the Onka Athena gate. Seven Against Thebes.38 Aeschylus shows us that Ares. In both the Iliad . However. In the passage above. there are indirect links in the Iliad between Ares and alkê. represents a physical. alkê is never explicitly connected with Ares. with the possible.37 The powers of possession in war and in ecstatic religion are combined in Hippomedon and what he exudes thereby is alkê. confirms that alkê is the force that falls under Ares’ special preserve. and compare it to makhê ‘combat’ and polemos ‘war’. The comparison is next made explicit with the phrase ‘like a bacchant’ (thuias hôs). The parallelism between Ares’ possession and alkê in this passage on the one hand. Aeschylus. Ares himself has already been pictured by Aeschylus elsewhere in the Seven as mainomenos ‘maddened’ (343). As in the Iliad. Scholia on line 498 also treat alkê in a physical sense. and the power of alkê. for example. 497–98 Compressed into these brief lines we find a built-in link between Ares. while Aeschylus signals the ritual dimension of Ares’ powers of possession on the one hand. by way of the verb bakkhaô ‘to rave like a bacchant’. Hippomedon’s condition engendered by the possession is then implicitly compared with Dionysus. In the Iliad. rather than a moral or intellectual. and Iliad 17. four personified forces are garlanded: Phobos ‘Terror’. and we saw earlier how that verb can signal ritual possession. and the Death of Patroklos 141 And he gave the war cry. exception of Hektor’s possession by Ares at 17:210–12. As elements of war these forces stand in a general relationship to Ares. Armor. specifically enhances Hippomedon’s readiness for combat. Around the shield of Athena.739–40). glancing fear. The first is that Hippomedon is explicitly characterized as having been made entheos by Ares. But there is one discrete connection. however. drive it on to kill or be killed. And it is just this virtue. Ares is once portrayed in the Iliad as war or fighting personified. that alkê here is an autonomous force that directs the leopard. . by means of his epithet Enualios (18. But it is more plausible. In this sense. But for the grace of Apollo. As Hans Trümpy40 has shown. but this is the first time that its actual effect is mentioned. before either closing with him or being overthrown Iliad 21. will fight his opponent Achilles until one or the other of them is killed. about whom the leopard simile is used. A warrior is said to have alkê.42).299) and Hesiod’s Theogony (934). alkê is insurmountable and blind once it has taken hold. and its physical expression as alkê. and their implications are critical for the understanding of the word’s usage in general. is outmatched. Within the Iliad. The first example comes from book 21. where Agenor is sent into battle with Achilles by Apollo. and this in turn further connects him with the alkê and phobos of combat. This dimension concerns the indomitable or uncontrollable nature of alkê. as in the passage above.597–98). is that until now we have not seen described any of the consequences of exhibiting alkê. is that it relentlessly drives one to overcome an adversary or to be overcome by hire. of alkê that motivates Apollo at the last moment to withdraw Agenor from conflict (21.39 We may also note that the outcome of a fight (ponos) between Euphorbos and Menelaos can be represented in the Iliad either by alkê or phobos (17. Its effect.576–78 The underscored portion could be taken to mean that the leopard’s will to fight is so great that it. What is most important here. as I shall clarify further with “a second example. A warrior such as Agenor. or withdraw ignominiously (phobos). however. although their forms of influence are appropriate to him. or perhaps weakness. Agenor’s condition is compared to that of a leopard before an overpowering hunter: even if a man anticipating her should lunge or throw [a spear]. where the sense seems to be that they will either fight fiercely (alkê). there is an important dimension to alkê in its relationship to Ares that we have not yet explored. Achilles would have killed him. Phobos is actually a child of Ares. Agenor. There are two instances of alkê in this sense in the Iliad.142 Derek Collins (13.309). or to exhibit it. Eris and Iôkê are nowhere mentioned as genealogically or otherwise directly related to Ares. in Homeric narrative alkê and phobos regularly function together as opposites. who shrouds Agenor in mist and removes him from the battlefield. although pierced with the spear she does not desist from her alkê. can be characterized as lacking nous ‘consciousness of self ’ . we began by examining the ways in which that armor affects its bearers. where Ares had possessed them both and given them alkê. in one of two important instances of alkê in the Iliad (21.578). to work through him. and the Death of Patroklos 143 The second example of alkê in its aspect as an uncontrollable combative force finally returns us to Patroklos. Armor. and this at once was the beginning of his evil. Hektor’s condition of being entheos. off the battlefield. we saw how the warrior Hippomedon was described in virtually the same terms as Hektor in the Iliad (17. alkê can represent a fighting force that cannot be controlled. In a passage from Aeschylus’s Seven Against Thebes (497–98). are restricted in the Iliad to Patroklos. and at that moment he calls Patroklos out of his shelter: and he. but as we saw there was no direct linkage between the two in epic poetry. but is one that classical Greek literature especially employs with a near technical regularity to describe the same phenomenon.210–12) when he had the armor fitted to him. Since Patroklos confronts Apollo in book 16 dressed in Achilles’ immortal armor. these words mark him in a . Iliad 11. then. whose death we have been laying the groundwork to explain. Hektor’s physical and mental condition after this possession was described by Eustathius as entheos. came out equal to Ares. in this case Ares. from the point of view of the classical material at least. hearing him from the hut.603–4 While neither the expression isos Arêi ‘equal to Ares’. in terms that will now be very familiar. whom he does not recognize. Achilles is on the stern of his ship observing the fighting (ponos) and onslaught (iôkê)41 between the Achaeans and Trojans (11. He sees Nestor carrying the Achaean Makhaon.210–12). We saw a graphic description of what happened to Hektor (Iliad 17. nor the adjective alkimos. Subtle and indirect connections between Ares and alkê in the Iliad were examined.601). Ares entered into him and his limbs were filled with alkê and sthenos. Upon further examination of alkê. It will be useful first to summarize some of the arguments made up to this point. which is not a Homeric term. Finally we examined how. and as allowing the god. The Iliad already marks Patroklos for death in book 11. The alkimos son of Menoitios addressed him first. we noticed that this word stands in a peculiarly apt relationship to Ares.Possession. It is with this aspect of alkê in mind that we are now best prepared to consider the death of Patroklos. agreeing to let him take his place in battle before the Trojans. called the Patrokleia. nor Achilles’. hippeus (4 times). Glaukos. But the reason for this. three times Patroklos tried to mount the Trojan wall and three times Apollo battered him back (16. Patroklos does not take Achilles’ ash spear. Patroklos would back down. an exceptional number. But Patroklos does pick up two other spears to complete his outfit. enters into him. then marshalls the Lykians. with the begrudging acquiescence of Zeus. they are both described as alkimos (16.702–3). Then Apollo speaks to Patroklos and tells him that it is neither his. that now.139). but this is the first time he is called alkimos. One would expect that in the context of a warning from Apollo. drives him. and in words that are more revealing than even Glaukos knows. Patroklos seems unstoppable. then we may infer that the same thing happens to Patroklos. the intensified usage of alkimos in book 16 is meant to heighten Patroklos’s religious identification with Ares. He will be called alkimos five more times in book 16 alone. On the first of such.140). Of course. we should expect that the identification with Ares will become intensified. Patroklos next encounters Apollo in what will be the first of two parallel confrontations. he kills twenty-seven Trojans. if Ares enters into Hektor and fills his limbs with alkê and sthenos. communicated to him through the armor by Ares. But from our point of view. He does back . and hippokeleuthos (3 times). he says that Ares has struck Sarpedon down by means of Patroklos’s spear (16.130–38) does not mention that Ares.91–4). Patroklos has not yet been given Achilles’ armor. So uncontrollable is Patroklos’s onslaught that he kills. Book 16 is. there is a symmetry between Patroklos and Hektor wearing Achilles’ armor. as it is too unwieldy for anyone but Achilles (16. However. after all.543). The description of Patroklos fitting himself with the armor (16. this is exactly to be expected from the alkê.44 which I infer to result from his possessed state in Achilles’ armor. (Eustathius on Iliad 210–14). he warns him to come back after he has driven them from the ships lest an Olympian attack him (16.707–9). Patroklos will not heed this warning. Zeus’s son Sarpedon. After he puts on the armor in book 16. Patroklos has several other epithets in the Iliad.144 Derek Collins manner that will become more resonant as the narrative proceeds. such as diogenes (5 times). Since the armor is the same. In the passage above from book 11.42 which is clearly meant to emphasize that book 16 is his aristeia. Sarpedon’s companion. lies in what happens to Patroklos after he puts on the armor.43 After Patroklos returns to the field of battle. as Eustathius observed in the passage quoted earlier. so it foreshadows events to come that here he is already called isos Arêi. destiny (aisa) to take Troy (16. I suggest. and as if to intensify the references to Ares. as in the case of Hektor later. When Achilles gives his immortal armor to Patroklos. As we have seen. and the Death of Patroklos 145 down momentarily. he is no longer aware of his own needs at this point (he lacks nous ‘consciousness of self ’ ). That will. After killing Kebriones. Even though the lion is wounded. Patroklos has lost his nous ‘consciousness of self ’ . and his alkê destroys him Iliad 16. This is the second. In his state of being entheos by Ares. who while ravaging stables has been hit in the chest. its alkê prevents it from disengaging from battle and tending to its own needs. it is tragically significant that it used of Patroklos. Neoanalytic scholars have noted that the death of Patroklos at the hands of Hektor and Apollo.752–53 Unlike the previous example of Agenor (Iliad 21. the Ethiopian hero Memnon slays . and that he can terrify (phobeô). and most explicit.576–78). is what drives Patroklos to his death. Patroklos throws a stone and hits Hektor’s charioteer. and it further supports my claim that it is the alkê of Ares that prevents Patroklos from heeding the warning of Apollo. where the consequences of alkê were described as driving a leopard to overcome or to be overcome. which can be interpreted as an allusion to Patroklos’s condition. and this raises several interesting parallelisms.689). knocking him from his chariot and killing him.Possession. reflected in Patroklos by the use of the term alkimos. saying that the mind (noos) of Zeus is always stronger. and has been given over to the will of Ares working through him. Like the warrior Hippomedon in Aeschylus’s Seven Against Thebes. like the wounded lion.45 According to the Aithiopis. in addition to Euphorbos. the alkê that drives Patroklos here. Apparently the only limit on alkê while in this state of possession is the death of the being in which it is active. Patroklos’s own person has been eclipsed by that of Ares and. Armor. Patroklos rushes in to strip his armor: having the spring of a lion. But the death of Patroklos is not accomplished without the aid of Apollo. here alkê represents the cause of death itself. is the outward expression of being possessed by Ares. For our purposes. even the man who is alkimos (16. but then Apollo stirs on the Trojans. At this point. The narrator comments on how misguided Patroklos is here. Kebriones. if the simile above allows us to draw such an inference. description of alkê as an autonomous driving force. the Iliad describes Patroklos in terms of alkê by way of a simile reminiscent of the one about Agenor quoted earlier. parallels the death of Achilles at the hands of Paris and Apollo. which I alluded to earlier. which in turn motivates Patroklos to reengage. The simile also makes it clear that both the lion and Patroklos are being driven—not that they are driving themselves—to their deaths. to be the model. At one point. In my view Apollo’s intervention is necessary to counterweigh the threat of Patroklos’s possession by Ares.46 If we can take the description of Ares possessing Hektor at Iliad 17.47 In the Iliad.213). Hektor.210–12. and thus their situations call for a different explanation. foregrounds this entire encounter as highly unusual. when he puts on Achilles’ armor. The parallelisms between Memnon and Achilles extend further. Now what is interesting here is that Patroklos.49 Before Apollo’s intervention. too. then sends Apollo to retrieve Sarpedon’s body. Why should a divinity aid in the killing of a mortal? Nowhere else in the Iliad does Apollo intervene to strike a warrior. Zeus “ponders many things with regard to the murder of Patroklos” (Iliad 16. Then after Eos. Achilles is also semidivine. bestows immortality upon him. which indicates that he has achieved a state at least as powerful as that of a semidivine hero. After Sarpedon’s death. We can infer from this that Achilles is made immortal as well. like Memnon’s. Memnon. Apollo does not actively contrive to kill Hektor. he is semidivine and so his mother Eos. is to have his mother Thetis transport him to the White Island. Memnon’s mother. he says something reminiscent of the animal similes used of Patroklos: . This is an important distinction because Apollo’s active aid to Hektor. We can further refine the question by separating Achilles and Memnon from the group.647). because they alone seem to be capable of killing leading warriors with or without the aid of Apollo. but he does not actively help him either (again 22. Patroklos and Hektor by contrast are not semidivine. which leads to Patroklos’s death. can make him immortal.146 Derek Collins Antilokhos. in fact. and dying. we expect that some of their actions should take on a similar character. Hektor. In the Aithiopis. and Achilles all wear immortal armor forged by Hephaistos. and this indirectly leads Apollo to stop Patroklos’s onslaught. Apollo and Paris collude to kill Achilles at the Skaian Gate. thus passively enabling Achilles to kill him. Achilles then kills Penthesileia. as he does Patroklos. and then Achilles kills him. by permission of Zeus. Since both Hektor and Patroklos wear Achilles’ armor. and then killed by Hektor. is slain at the Skaian Gate at the hands of Achilles and Apollo. after Athena disguised as Deïphobos has encouraged Hektor.48 nor does any other god for that matter. Memnon kills Antilokhos on his own. becoming possessed by Ares. and in turn is slain by Achilles at the Skaian Gate. Apollo merely forsakes Hektor (22.213). also at the Skaian Gate. then we have to ask whether there is any deeper connection between wearing full immortal armor. Although Memnon dies at the hands of Achilles. Patroklos indeed kills Sarpedon. a son of Zeus. and the Aithiopis tells us that his fate. Patroklos is hit from behind by Apollo and Euphorbos. Patroklos undergoes this experience.50 and the singular nature of Homeric poetry makes it difficult to judge finally what may. By occurring at this final moment before Patroklos’s . But it is on the second and fatal charge that Patroklos is also called ‘equal to swift Ares’ (16. but the fourth time” encounters between Diomedes/Achilles and Apollo. in my view it casts his encounter with Apollo in more overtly ritualizing terms. In the fourth attempt on both occasions Patroklos is marked by the expression daimoni isos ‘equal to a daimôn’ (16. but the fourth time” pattern occurs elsewhere in the Iliad (e. and occurs on two other occasions between a warrior and Apollo at 5. Furthermore.252–53 The passive language in the first sentence. The “thrice . 22.g. Armor.165 and 208). or may not. within the Iliad only Patroklos and Hektor die so armored. rather than actual religious ritual. I conclude from this that the Iliad is emphasizing their mortality. an unprecedented two times. Patroklos’s death is more ritualized in general than that of Hektor.20. In Iliad 16 Patroklos charges Apollo three times.51 But unlike the single “thrice . it is worth pointing out that neither Patroklos nor Hektor received Achilles’ ash spear to complete their panoply. I recognize that the formulaic nature of Homeric poetry itself may also be the source for repeated dictional patterns. rather. Neither Hektor nor Patroklos has control over their actions and this state of affairs is to be expected if we understand them to be entheoi by Ares. represent historical ritual.702–5. and the “kill or be killed” mentality in the second.752–53) and leopard (16. and is underscoring their inadequacy to maintain themselves for long in a divine capacity.436–39 (Diomedes). There is one further distinction to make between the deaths of Patroklos and Hektor. can be compared to what alkê was said to do to Patroklos by way of the lion (16.Possession. But even formulaic diction and thematic repetition suggest a kind of ritualizing mentality. on two separate occasions (16. and 784–7). I use the term ritualized here to denote a formalized pattern of interaction between a hero and a divinity.567–78) similes used of him.445–48 (Achilles)... At the same time.705 and 786). And although we know from the Aithiopis that divinely armored Memnon and Achilles will also die. 13.. which might have prevented them from fully actualizing the capacity of the armor. and the Death of Patroklos 147 now my thumos has driven me in turn to stand against you. and at 20.784). I must take you or I must be taken Iliad 22.. rather than to suggest that Homeric narrative is presenting a series of religious rites that can be correlated with a given historical practice in cult. only to be repelled on the fourth. This does not merely distinguish Patroklos from Diomedes and Achilles. On the other hand. He has achieved a state of divinity. prophets. This ideology is prefigured or reflected in the concept of alkê. the Iliad does not represent this state of affairs as tenable. alkê is conveyed to a warrior by Ares when he dons immortal armor. in the course of his aristeia Patroklos kills Sarpedon. Unlike the examples of entheoi individuals discussed earlier. represents an attainment of religious grace—a mortal has momentarily transcended his mortality—before the sudden reversal by Apollo can lead to his death. a son . both of whom die suited in Achilles’ immortal armor.335–37). which suggests that mortals are incapable of handling the divine forces conveyed to them through possession. The ritual dimension of Patroklos’s death can be carried further. if there is a consistent theme behind the deaths of Patroklos and Hektor. and at a further remove Zeus. must intervene to aid in his destruction. where we saw how seers. and Hektor to kill Patroklos. his condition is likened to that of Ares (16. and continuing to kill.445). through possession by Ares Patroklos is able to encounter divinity as divinity himself. and is said to drive an animal (warrior) relentlessly to its death. the prophet prophesizes. except for Apollo withdrawing his help. Unlike Achilles. This final battle between what are virtually two gods stands alone in the Iliad. prophets. who can wound Aphrodite (5. who. nevertheless backs down at Apollo’s command (5. almost kill the semidivine Aineias but for Apollo’s intervention (5. the warrior presents a different case.856–67). is alone capable of killing Hektor. The fact that Patroklos charges Apollo on two separate occasions. it takes Apollo. As mentioned earlier. Taking the case of Hektor (Iliad 17. the Iliad seals the identification of hero and god. only Patroklos and Hektor die in immortal armor. until he is stopped by being killed.148 Derek Collins death. and the poet sings poetry. reinforces the notion that Patroklos is as unstoppable as a divinity. However. Homeric epic represents the possessed warrior as killing. Outside the Iliad. However. it is that achieving a state of entheos by Ares is an inherently unstable condition. the deaths of Memnon and Achilles in immortal armor indicate that even semidivine warriors who achieve a state of possession by Ares will eventually die. Even Diomedes.443). and poets results in well-defined outcomes: the seer has a vision. Within the Iliad.784). and poets could undergo temporary periods of possession. and in the meantime kills the semidivine Sarpedon. However. Indeed. and thus his final military exploit. and thus Apollo.210–12) as a model. which engenders a “kill or be killed” mentality. At this moment Patroklos has become Ares. which the Iliad seems to cast in ritual terms. and who later with Athena’s help can wound Ares himself (5. The possession of seers. however. when Patroklos reaches the peak of his aristeia in his struggle against Apollo. Euphorbos. E. Achilles’ words presuppose that the Achaeans will continue to tend his and Patroklos’s funeral mound after the war is over. and the Death of Patroklos 149 of Zeus who in several respects resembles Memnon. the games in honor of Demophoön in the Homeric Hymn to Demeter (265–67). nor has a divine sponsor.Possession. When Achilles orders that a grave mound be built and that Patroklos’s bones be set in a golden jar to await burial. Armor. for example. and Phoinix (all named). Although this is not direct evidence for cult. In the early fifth century B. athletic games function as part funerary rites54 and certainly prefigure later patterns of cult worship. attributed to the Triptolemos Painter. Achilles’ mother Thetis bears him off his funeral pyre to the White Island. because he is neither semidivine. The events appear similar to the events described in Iliad 17. Whatever the solution to this problem. in the sense of sacrifice. Odysseus. and Diomedes.57 Nevertheless this vase painting shows that . Achilles tells the Achaeans not to build a large mound for him and Patroklos.56 The ram is lying with its throat cut between the feet of two warriors. flank a seated and recalcitrant Achilles. although this is uncertain.55 I suggest that the immortalization of Patroklos to be achieved in cult. the ritual dimensions of Patroklos’s death. and to return to it at a time when they can make it broad and high (23. the interpretation of Patroklos as a sacrifice in place of Achilles is fraught with even more difficulties. on the level of cult as opposed to that of myth. In Homeric narrative. even if they do not yet assume the seasonal character of. until “Achilles himself covers him in Hades” (23. the Iliad insists on the similarity between Patroklos and Achilles by having Patroklos’s ghost ask to have his bones buried with Achilles’ (23. it is possible that the unnamed warrior standing over the ram Patroklos on the other side could be Achilles himself. however. who in the Aithiopis slays Memnon.243–44).C. thus presents compensation for Patroklos’s inability to be immortalized like Achilles in myth. named Phoinix and Priam respectively. But this kind of immortalization is impossible for Patroklos. and then is slain.246–47).52 Patroklos is thereby cast in a role similar to that of Achilles.. Behind these two warriors stand two older men. represents the Embassy scene in Iliad 9. represents a sacrificed ram as Patroklos. as represented indirectly by the Iliad in the funeral games. there is a suggestion that these two heroes may share a cult at Troy. It is also significant in this regard that the funeral games for Patroklos take place next to the funeral mound. At least one stamnos vase painting. Thus the unnamed warrior could be Ajax. were further elaborated upon by classical audiences. only one of whom (on the right) is named. and the name given is Hektor. The other side of the vase.83–4). but only a modest one. where Ajax and Hektor battle over the body of Patroklos.53 Yet. For the sake of plot consistency. Just as Memnon’s mother Eos immortalizes him. this meaning at work in the narrator’s comment that “[Peleus] in turn.787–804) before he is killed. and charges against Ares. 1971) and Oesterreich 1974 (1st ed. and he is also described thus when he chases Trojans into the divine river Xanthos (21.55. Sinos 1980. Whitman 1958. ibid.377. pace Janko 1992. 8. but rather ‘Lebenskraft spendend’. Cf. For example daimôni isos is used of Diomedes at Iliad 5.517. 6. Edwards 1991 on 17. 459. 4. 15.194 and 202) does not mean ‘divine’.311. At Iliad 1. 5.” 16. 1921).6 and 115–16.227). away from his corpse-filled stream (21. 3. Again Lewis 1989 and Oesterreich 1974.408. 11. 377n2: “In many cases it is probable that.34. 2. wounds Aphrodite. the imperious desire for direct communication with departed ancestors and other relatives also plays a part.33.18).40.201–202.40. beginning with its representation in the Iliad. Without denying the plausibility of Thieme’s argument. during which he attacks Apollo. but his son did not grow old in the father’s armor” (Iliad 17.. 9.196–97). particularly if we remember the extraordinary extent to which memory of the dead is cultivated in ancestor-worship amongst many peoples with whom the deceased are not excluded by death from the general communion of the living. Cf. which is certainly a kind of power. see Benveniste 1969 II.198–202. Lowenstam 1975. 17. my discussion will focus more specifically on another kind of power (alkê) that will be seen to motivate Patroklos in battle.23 argues that the adjective ambrotos as used of the armor of Achilles (e. and when the divine river Skamandros pleads with him to fight the Trojans on the plain. Thieme 1952. On the ritual antagonism between god and hero implied by the use of daimôni isos. as well as in the fact that Patroklos will be stripped of Achilles’ armor by Apollo (16. Janko 1992.g. might have conveyed more ritual dimensions to a classical audience than we are able to recover. In a different connection. NOTES 1. Lewis 1989. and cf. See Lewis 1989 (1st ed. Nilsson 1955. gave [the armor] to his son. and 884 to characterize the height of his aristeia. 12. 14. and Nagy 1979. For this translation of kudos. Indeed it is tempting to see with Thieme. Since Zeus never descends upon the battlefield in person in the Iliad. we should expect that another god would be designated to fulfill his promise. Oesterreich 1974.150 Derek Collins Patroklos’s death. Nagy 1979. at Iliad 17. Achilles’ general slaughter of the Trojans motivates the designation daimôni isos (20.493). Whitman 1958. 10. see Nagy 1979.447). ibid. Lewis 1989. 7. exactly as in modern spiritualism. Lewis 1989.68.210–12. who is closely protected and momentarily saved by Apollo. 13. Achilles is described as daimôni isos in his confrontation with Hektor (20.143–44. grown old.438. .524–27 Zeus tells Thetis that nodding his head is the megiston tekmôr ‘greatest sign’ that he can give as proof that he will accomplish what he says. 102.4). 1090. In the Ion.169–70. Ion. like isotheos ‘equal to a god’. but to divine power (theia dunamis). Homeric poetry employs other expressions.391n1. at Agamemnon. 964. from katekhô. in Ion. makes clear that Eustathius has in mind the parallel of Patroklos and Hektor becoming possessed by Ares when they wear Achilles’ armor. and theomanteis ‘diviners’ are described as enthousiôntes (from entheos). In the Iliad. 533e. In this case. at Eumenides. Note that there the entire Thracian people is referred to as katokhos by Ares. Hecuba. 533e. but it is nearly the same thing. for he is held’ (536ab). 27.579n4. Burkert 1985. Armor. 30. In poetry we find possession.8. Phaedrus. 17. 22.4–5). poets.178–91. puppies were sacrificed to Ares Enualios (Pausanias 3. Ares also had a temple at Athens (Pausanias 1. Plato has Socrates argue that a rhapsode’s proficiency is not due to art (tekhnê).160. are all rings (daktulios) suspended (eksartaô) from one another in a descending order of influence (536a).342. esp.374–79.9 and Plutarch. as it is used for example of Dionysus at Herodotus 4. I translate nous as ‘consciousness of self ’ rather than ‘mind’ or ‘consciousness’ generally. Plato.87n41. 497.20n1. For example. Burkert 1985.18–22. For more on Ares cults in Thrace generally. Cf. When Plato or others speak in the case of seers (theomanteis) or prophets (khrêsmôidoi) of a loss of nous. and epic poets are called both entheoi and katekhomenoi. 410n23. Socrates elaborates on this idea.410–13. and daimôni isos ‘equal to a daimôn’ to represent states of possession. however. the chorus asks Kassandra whether she was ‘seized by entheoi arts’. in the Meno.48. Dodds 1951. 99c). the idea of being ‘taken’ (verb lambanô) by a god. in conjunction with Burkert 1985. Cf. In Euripides. and the Apology 22c. Tambornino 1909. Plato. 141. and the Death of Patroklos 151 18. In Sparta. 24. Roman Questions 290d).577–78. see Smith 1965. another from another. the Sibyl is said to speak by ‘mantic entheos’.” and that the entheoi “leben und sind in dem Gotte”).400.211). In prose.14. 19. which can be compared to the power that a magnet exerts on iron rings (533d). Possession is then related by Socrates to being suspended: ‘one of the poets is suspended from one Muse. 23.160. Dodds 1951.. for example. Calvo Martinez 1973.7. enualios is Ares’ epithet (17. Cf.309). see Burkert 1985.87n41. 244b. In Sophocles. Pfister 1939.183 and 1940. Rohde 1903 11. where the warrior Hippomedon is said to be possessed (entheos) by Ares. 21.109–11. as at Euripides. 99c. Antigone. Calvo Martinez 1973. The latter meaning is used in the present work. 28. Dionysiac bacchants are called entheoi women.55–57.102 and passim. For a view of possession that interprets entheos as metaphorical. and was worshipped exclusively by the women at Tegea (Pausanias 8.Possession. Rohde (1903 II. and audiences. the term katokhos ‘possessed’. 1940. 29. the term entheoi refers to khrêsmôidoi ‘soothsayers’. rhapsodes or actors. 20. Herodotus 5. We use the word “possessed” (katekhô) for it. The following sentence. Nilsson 1955.41 (on his lines 8–10) thinks that Eustathius erred by naming Patroklos here instead of Hektor. Farnell 1909 V. Van der Valk 1987 IV. they do not mean a total loss of . following Rohde 1903 11. and theomanteis ‘diviners’ (Meno. khrêsmôidoi ‘soothsayers’. but the meaning ‘having a god within’ is the accepted interpretation (Pfister 1939. 25. 26. 1209. Later in the dialogue.79. and is personified to represent war (18. Hippolytus. and Harrison 1908. the chorus describes Phaedra’s raving state as entheos. the Muse is said to make men entheoi. Zeus is said to have made Apollo’s breast entheos. explaining that the Muses.109). Seven Against Thebes. Cf. Oesterreich 1974.19–20) seemed to have thought that entheos meant ‘being in god’ (he says that in possession the soul “ist nun bei und in dem Gotte. in Aeschylus. Nilsson 1955. For more on the association between Ares and Dionysus in tragedy. 43. Cf.” The actual identification of Ares with Dionysus (Bacchus).13. Antigone. in the Seven Against Thebes. depicts Phobos vaunting before the Onkan gate (500). and book 19 (1 time). at Iliad 5. 1151. Herodotus 4.g. is similar and homophonic: at 5. For example. Note that this is the same term that we saw earlier.177–78 and especially Lonnoy 1985. see Zeitlin 1993. book 16 (5 times). Shannon 1975.164.19. 1. it is iôka dakruoessan ‘tearful onslaught’.” which suggests that the usage of phoitaô at 144 cannot mean literally ‘to roam about’. may be significant but the evidence is too late to be of help here. Hesychius (ed.3. Trümpy 1950.703–4. Ion. 37. Aelian. 39. arrayed in armor and order of battle. says that the entheos.740. 130.166–71. For terror (phobos) has struck a host. I take phoitaô to refer to Phaedra’s mental condition. See the glosses in Smith 1982. too. in lines immediately following those describing Hippomedon above. lacks self-consciousness (Selbstbewusstsein).740).228 (498f and 498g). The connection between Ares and Dionysus is made explicit by Euripides in the Bacchae (302–4): “[Dionysus] shares in a portion of Ares. and through whom the divinity speaks and acts. “the spear of Enualios is brandished. 45. Janko 1992. Dithyramb 2. This is the main point of the chorus’s remarks about Phaedra. see Sophocles. Phaedrus. The chorus reports at 131–32 that Phaedra is “distressed on a bed of sickness and keeps indoors. For example. See also the summary in Janko 1992.315–16.1. and Kullmann 1960. 536d. where during a celebration of Bromios (Dionysus) in the palace of the daughters of Ouranos. It is more accurate to say that ‘consciousness of self ’ is lost in possession. and that a measure of consciousness remains through which the divine source communicates. book 18 (2 times). I draw attention to the fact that although Patroklos does not take Achilles’ Pêliada meliên ‘Pelian ash spear’ at 16. who is in the power of the possessing divinity. 35. 33.601. while at 11. etc. 3. book 12 (1 time). Aeschylus. Varia Historia. The language. 44.79.411.84 emphasizes the symbolism of mortality and destruction of Achilles’ ash spear (e.152 Derek Collins consciousness. as for example in Macrobius. 38. . See the summary by Calvo Martinez 1973.” Compare Pindar.20n1. See Dodds 1960 on Bacchae lines 302–4.312–14. Calvo Martinez 1973. at Iliad 16. as that would imply that the person is unconscious or comatose. 34. we read kruoessa Iôkê ‘chilling Onslaught’. ajlkhv. 42. Theocritus 26. 32. which connotes the possibility of destruction by way of its association with the power of alkê. Scheliha 1943. the spears (doru) that he does take are marked with the adjective alkimos. 40. 36. Certainly the genealogical relationship (as attested for example in the Theogony) of Ares and Phobos is meant to be evoked here.143).16–17. 244b. Plato. Rohde 1903 11. 41. s. personified and garlanded around the shield of Athena (5.140.220.v.264. by means of the name ’ Enuavlioß. before a spear is touched. and its thematic importance for the relationship between Achilles and Patroklos. with further bibliography. Latte). The general distribution pattern of alkimos as applied to Patroklos also reflects the military importance for him of book 16: it occurs in book 11 (3 times). I derive the translation ‘mentally unstable’ from the metaphorical usage of the verb phoitaô at 144.42. Saturnalia. where mavch is listed as one of the synonyms. commenting on this scholion. Heraclitus B 15 and 92 DK. Bacchae. Euripides. 31. Kullmann 1960. are on the whole fixities of the poems. There is no evidence either in the Iliad.Possession. funerals. 50. within the religious economy of the Iliad.201–2. I concur with Nagy 1979. who is called the ‘daughter of Ares’. and Leto to become purified from bloodshed by Odysseus.702–6.313. 54. as indeed they were of the world from which the poems arose. Pestalozzi 1945. Cf.19 suggests that many aspects of the funerary rites and games for Patroklos recur in later times in customs reserved for hero cult. feasts. Cf.49–50. and the common burial ground for him and Achilles. Schmidt 1969.630–31) and of Achilles (Odyssey 24. are deliberately made generic and “universal. Pestalozzi 1945. 53. who had reproached Achilles for loving her.116–17. and then Thersites. Rohde 1903 I. which. or in the surviving fragments from the Achilles trilogy of Aeschylus. Rohde rules out the existence of hero cult per se in Homer. attested in Pausanias (3. however. .13). 52. 47.” and does not comment on their ritual value. a direct threat to the sovereignty of Olympian divinity as represented by Zeus and Apollo. merely calls these patterns “traditional. Whitman 1958. Janko 1992. because of the Panhellenic nature of the Iliad and Odyssey. and combat. see Hack 1929 and Price 1973.149–50 cautions against applying modern concepts of sacrifice to this painting. Yet because funerary rites and games are not repeated on a regular basis in Homeric poetry. after Achilles kills Penthesileia.26–28 and 107–8 discussion of the politics of what he calls ‘peripheral possession’ vis-à-vis a given centralized religious organization.19. A different tradition.85–6). that in Proclus’ summary of the Aithiopis. Lewis’s 1989. Hephaistos makes a second set for Achilles. such as descriptions of sacrifices. Whitman 1958. Patroklos. Memnon is said to wear hêphaistoteukton panoplian ‘Hephaistos-made armor’. as were the performances of the acts which they describe. Janko 1992.400. that in Homeric poetry we are dealing with intimations of cult practices. In the Proclus summary of the Aithiopis. ship-launchings. Achilles sails to Lesbos and sacrifices to Apollo. Artemis. Armor. Cf. I am suggesting that Patroklos’s possession by Ares may represent. arming. reflect hero cult ideology. Hektor. and the recitation of such passages is as ritualistic. 57. with further bibliography. for Patroklos to have been sacrificed. on lines 16.13–15 and 44–45.” 51. the remarks of Whitman 1958. the games in honor of Amarynkeus (Iliad 23. and the Death of Patroklos 153 46.250: “Thematic motifs. 49. in a way. For more on hero cult in Homer. as Artemis does for Iphigeneia. compares the ram to the common folk motif of spiriting a person away and substituting an animal in their place.200. to whom Schmidt attributes the idea for the painting.” Rohde’s argument ex silentio cannot be taken to exclude the possibility that the funeral games for Patroklos. 56.43. Cf. Note. Discussion in Schmidt 1969 and Griffiths 1985. Hence they aid in his death. and Achilles wear the same armor. 55. does represent Patroklos on the White Island with Achilles. Cf. 48.318. Griffiths 1985. . 2 are seen as culturally grounded and so not critically reflective. the philosophic craft.641–42 began this book by looking at the philosophic rejection. such as norms of behavior or even ethics. I had tasted nothing. is capable of producing political judgments of what conduct makes individuals better or worse (Rep. 599d). Before. The problem with the Homeric epic for Plato is that it imitates phenomenal appearance (phainomena) since it depicts the shadowy world of human action. ©2002 by the University of Oklahoma Press.”1 Moral philosophy is seen as derived from abstract and universal principles that impose a categorical duty on humans. Overlaying this Platonic argument in modern times is a Kantian distinction between “pure moral philosophy” and other precepts that “may be only empirical and thus belong to anthropology. this distinction between moral philosophy and empirical concepts underlies a view of Homeric individuals as conforming to external cultural norms rather than acting and reflecting I From The Iliad as Politics: The Performance of Political Thought. beginning with Plato. Unlike Homer.DEAN HAMMER Toward a Political Ethic Now I have tasted food again and have let the gleaming wine go down my throat. of the epistemological status of epic poetry. Applied to the Homeric world. as it draws its inspiration from the contemplation of truth. whose art can tell us nothing about how to live because it merely imitates what we already do. Empirical precepts. 24. 155 . 5 Dodds would employ a now famous anthropological distinction between “shame” and “guilt” cultures to describe the operation of the Homeric value system in which an individual’s sense of right and wrong is governed by what the community will think of him or her.”9 Honor is not just the value of a person “in the eyes of his society” but. I follow Cairns in his characterization of this valuation of oneself as “self-esteem.156 Dean Hammer upon internal motivations of what is morally right and wrong. as well as encounter occasions in which community expectations . the “expressed ideal norm of the society” is “experienced with the self.11 The claim by an individual that he or she was inappropriately dishonored. does not denote some authentic inner self but is an image of oneself in relationship to others that necessarily involves questions of how this self relates to “the demands. desires. claims. The ethical self is an enacted self that must interpret and apply the standards of a community. and how the conforming even takes place. in his anthropological reading. for example. suggests Cairns. generally. these formulations make it impossible to understand who or what is doing the conforming.3 For Fränkel. as Pitt-Rivers notes. ethics is both cultural as it is tied to the expectations of society. Yet. it “is the value of a person in his own eyes. provides “a nexus between the ideals of a society and their reproduction in the individual through his aspiration to personify them. and an awareness of the standards under which one is liable to be criticized” or praised.” Honor. needs. and. and critical as it is shaped and reshaped in its performance. and its sanction of shame.”13 Like politics. who rejects any innerness to Homeric individuals. suggests that Homeric man “has no innerness” and is “incapable of development” because he “responds fully and uncritically to each situation. as a man internalizes the anticipated judgments of others on himself. in the sense used here.8 Homeric man functions unreflectively as an expression of the external standards of society.”12 Esteem. rests upon a particular image and valuation of oneself as deserving honor. no encounter occurs between an outside world and an “inner selfhood. Homeric man lacks consciousness of himself as making moral choices and an ability to reflect on those choices. an ideal self-image which is placed under threat.”10 The recognition of how one’s actions might damage or enhance one’s status.”7 From these perspectives. Even Redfield. rather than by an internal sense of moral guilt. neither personal decision nor judgment is possible because no image exists of oneself apart from the norms of society. notes that in the shame culture of Homeric society.6 And Redfield. the lives of other people. In Snell’s influential formulation.”4 Homeric individuals possess only an “elemental vitality” in which they live in the joys and sorrows of the moment and act according to the “forms” of society. requires “a subjective idea of one’s own worth. I explore the critical aspect of the notion of esteem by examining how Achilles comes to revise his sense of worth through recognizing how his choices affect him.”15 Zanker is not alone in emphasizing the importance of death in affecting the transformation or reintegration of Achilles. to recent discussions of the ethical transformation of Achilles.” Through his “deepened sense of mortality” and his “personal realization of the reality of death. I argued in chapter 4 that Achilles interprets the loss of Briseis as a violation of his esteem and responds by rejecting a notion of worth that is tied to recognition by others. toward Priam. in that the warrior’s sense of worth is tied to the receipt of honor and glory for the performance of great words and deeds in battle and assembly. At the core of these enactments is the notion of esteem. Achilles has initially only “the most rudimentary sense of self ” that is simply reactive to challenges to his superiority. too.” What becomes difficult to reconcile is the two people that Crotty portrays as Achilles. respect. The focus on esteem will serve as a complement in some ways. This heroic magnanimity. though. In this chapter.” Achilles acquires a “totality” of “vision” that is alone among other mortals and “outstrips even that of the gods. is made possible by Achilles’ “unique experience and knowledge of death. sees a “change of heart” in which the “affective drives” of pity. the loss of Patroklos. In generalizing from his experience to Priam’s. Zanker. Up through Book 23. For Crotty. Achilles appears as Fränkel’s “Homeric man” who. because he lacks innerness. “In appreciating his resemblance to another. we can better trace in Achilles a clarified sense of his own esteem in response to different experiences of suffering: the suffering of battle. as Zanker describes it. exposed. Achilles appears as a “more complex self ” in which he is able to reflect on the experiences of others and establish new bonds outside the conventions of warrior society. Achilles no longer confines his reactions to the immediate stimulus but can see in another’s distress the kind of danger to which he is in general. can react only to “external stimuli.” In Book 24. or unsatisfactory. contradictory. I identified in chapter 2 the cultural basis of esteem.” Crotty writes. allows him later to “sense vividly” the suffering of Priam. a corrective in others. as his choices affect others.16 These formulations are .Toward a Political Ethic 157 are ambiguous. and the pain excited by the sight of Priam.” With this vision. and affection are emphasized in Achilles’ actions.14 Rather than positing a reactive and reflective Achilles. or as a kind of being. Achilles’ grief over the death of Patroklos. Achilles is able to “attain to the companionship in suffering that he shares with Priam and the sublime generosity that he shows toward him. Achilles “reforms or restructures his sense of himself ” to appreciate “the similarity of another’s experience to his own. Angered by Agamemnon’s slight. this violation of esteem recasts Achilles’ understanding of fate and death. in which Achilles will not be bound by others. lesser. In understanding Achilles’ development. though. Whatever his faults.158 Dean Hammer ambiguous. Yet. More than that. the struggle of battle appears not as a heroic pursuit of glory. Achilles’ response to the loss of his war-prize arises from a sense of esteem that he shares with the rest of the Achaians: worth is tied to the receipt of honor and glory by the community. As we saw in chapter 4. with this depth of knowledge. He needs neither the honor nor the glory that others can provide. since his willingness to risk his life for others no longer enhances his worth but appears downright foolish. and then to postpone fighting. endure since they are formed by human relations and consequently endangered by human collisions that can be neither foreseen nor controlled? ESTEEM FOR ONESELF AND VULNERABILITY TO ANOTHER The ethical problem in the Iliad is created. Nor does he feel a sense of obligation . the Achilles of Books 1 and 9 is neither reactive nor unwilling to face his death. but as a rather humiliating submission to suffering. This awareness has political significance since it answers to the fundamental political problem that is raised in the Iliad: how can communities. Achilles seeks to restore his worth by humiliating those who brought him pain. recasts Achilles’ experience of pain since he becomes implicated in the suffering of another. deeper. The death of Patroklos. fuller) in talking about death. as political fields. when Achilles refuses to fight. precisely. to fight savagely. The awareness of how he is implicated in the suffering of another provides the foundation for a more generalized expression of pity toward Priam. it means to “accept” or “face” or have a “deeper” sense of one’s death and how this is related to a changed comprehension of human relationships. for it remains unclear what. We can better speak of how Achilles comes to understand death differently.17 We saw in this refusal a claim to self-sufficiency. though. Achilles chooses variously not to fight. When the community fails to show gratitude for his fighting. we may wish to avoid a language of comparatives (greater. as Gregory Nagy notes. Tying Achilles’ development to his distinctive knowledge of death is particularly tricky because Achilles already has knowledge of his death that surpasses in certainty and clarity the knowledge of every other warrior. This language creates ambiguities precisely because it implies a scale of measure that does not exist. though. and how that difference is related to a changing notion of esteem (as an image of himself in relationship to others). Achilles now debases himself.33) and dons Achilles’ armor to fight in his absence. In Achilles’ earlier experience of pain. from the loss of another. instead.20 But. Removed from the disgrace others can bring to him.19 As Nagy argues. With the death of Patroklos. This sense of suffering-with has cognitive significance since it alters Achilles’ image of himself in relationship with others.18 Patroklos’s death has the narrative importance of bringing Achilles back into battle. pain and glory operate at two levels in the epic. What is different is that Achilles is unable to dissociate himself. What follows is an elaboration of how Patroklos’s death revises Achilles’ notion of esteem by making his sense of worth vulnerable to another who is distinctive.21 Pain points to the inextricable. from an ability to impose suffering without suffering himself. In contrast to Achilles.24) and “defiled” (êischune) his hair (18.27).22 Achilles does not feel the other person’s pain. but the pain is experienced as unforgettable by the characters involved. Achilles experiences a suffering-with. to the suffering of another. though. ESTEEM FOR ONESELF AND VULNERABILITY TO ANOTHER Upon hearing of Patroklos’s death. connection between an image of oneself and one’s relationship with others. Achilles will achieve glory in “the epic tradition itself ” since his story will be worthy of being told. Patroklos exclaims that Achilles is pitiless in his unwillingness to help (16. Achilles begins to see himself as the occasion for (if not the cause of ) Patroklos’s death.” the death of Patroklos and the pain Achilles feels is the “subject for kléos. Achilles’ response is one of anger in which he seeks to restore his esteem by reversing this suffering. By avenging Patroklos’s death. inflicting pain upon others while staying removed from the infliction of pain by others.68). and his own sense of esteem. he saw himself as suffering-from the dishonor brought about by Agamemnon. Nor does his sense of suffering from the afflictions of war end. The glory of Achilles is heard and celebrated by the audience of the epic. as Nagy notes. The verb aischunô is used most frequently . in which his own pain is connected.23 This responsibility is not so much the attribution of himself as a cause as a statement of Achilles’ own failure to stand by (or be responsible for) Patroklos. as suggested by his anger toward Hektor (see 15. Patroklos is moved by the suffering that has befallen the Achaians (16. Achilles pours dust on his head and face as he “fouled [êischune] his handsome countenance” (18. As his suffering-with reveals his fundamental connectedness to Patroklos. for the “uninvolved audience of epic. Achilles begins to articulate a sense of being responsible for the death of Patroklos. and often immediate.22).Toward a Political Ethic 159 or pity to others born of any corporate bond.” or immortal glory. He derives his sense of worth. so as to deny him access to the memory of men to come.30 It is just this suffering. but they are a vast minority of usages in the Iliad. since my dear [philos] companion has perished” (18. he is never described after the death of Patroklos as pitying either Patroklos or himself. suggesting that pity is not most powerfully felt among intimates. is not to feel pity.40–42). in fact.31 When Thetis reminds Achilles that everything he has asked for has been “brought to accomplishment [tetelestai] / through Zeus” (18. Where Achilles’ sense of suffering led him previously to assert his esteem through a claim of self-sufficiency. “the appeal of pity is seen at its clearest in the context of intimate relations” where “the plight of one” becomes another’s “own plight. trans. 24. even with Zeus’s honor. defiles himself. some distance exists between the pitier and the pitied. though.24 As Vernant notes in describing the relationship between the “heroic ideal and the mutilation of the corpse.59. he now places his life in a relational context.” has as its corollary “the disfigurement and debasement of the dead opponent’s body. modified).”25 In this case. and Priam’s appeal to Hektor (22. Achilles defiles himself and. “as no other of the bronze-armoured . 431). Yet.82. as Aristotle suggests.” the “hero’s beautiful death.28 The reason the language of pity is not used lies in Achilles’ closeness to Patroklos. and wishes he were never born.26 In characterizing this mourning for Patroklos. “But what pleasure [êdos] is this to me.180. His failure to act stands out in his mind because of his strength. but to feel oneself suffer as the other person. To see an intimate (oikeiotata) suffer.607–608). Crotty suggests that it bears a similarity to the expression of pity (eleos).160 Dean Hammer in the Iliad to describe the shame brought about to another through the mutilation and defilement of a corpse (see 18. remains covered in filth after he kills Hektor and even after the Achaians implore him to wash himself (23. such as the pity of a god or the pity for one’s comrades. Achilles articulates now a close connection between his own sense of worth and his failure to take care of another. This loss is significant in altering Achilles’ claim to happiness.”27 Though Achilles weeps.407. suggesting that he loved Patroklos “equal to [ison] my own life” (18. she recalls Achilles’ own words to the embassy that he does not need the honor of others because he is already honored by Zeus (9. For Crotty.50). There are three occasions in which intimates are associated with pity: Andromache’s appeal to Hektor (6. Not only do these appeals fail.29 Achilles’ response to Patroklos’s crying (16.80). More often. 82). that Achilles feels with the death of Patroklos. Achilles declares.74–75). which grants him eternal glory. an expression that Crotty will suggest is later extended to Priam. as a loss of a part of himself.418). This equality makes it impossible for Achilles to see his life as simply his own because he now shares it with another.75. 22. suffers. After the death of Patroklos. since [epei] I was not to stand by my companion / when he was killed” (18. he seems to recognize the necessary consequences of his choice: “Then I shall die [autika tethnaiên]. become shared through an inextricable connectedness of one life to another. this equality is one in which individuals are alike. This notion of fatefulness. though. like the gods. such as the relationship between Patroklos and Achilles.Toward a Political Ethic 161 Achaians / in battle” (18. Achilles declares that there is an equality (isê) of fate in which death comes to both the brave and the coward (9. The death of Patroklos changes that. Not only was Achilles “no light of safety to Patroklos. and cannot.318). account for the connectedness of humans to each other. When Achilles says that he will avenge Patroklos’s death by killing Hektor. The knowledge of destiny that Achilles possesses is not wrong as much as incomplete because it does not. is integral to the narrative construction of Achilles’ situation. “I was not to stand by my companion / when he was killed” (18. Achilles portrays himself as an individual who failed to care for his comrades.. a recognition that underlies this changing notion of esteem. In Book 9. but not necessarily connected. As Achilles observes in his lament of Patroklos. Patroklos perished. Homer portends this collision. Equality appears as the finality of death that all mortals face alike (homôs) (9.98–99. who in their numbers went down before glorious Hektor” (18. In the opening verse of the Iliad. an image that certainly strikes at the heart of self-esteem. laments Achilles. 18.103–104). In describing himself as a “useless weight on the good land” (etôsion achthos arourês. modified). these collisions. since men are “set . / I told him I would bring back his son in glory to Opous / with Ilion sacked. while Achilles sees himself not as a part of. Achilles points to an equality in which fates. together” (xuneêke) (1. Achilles comes to express a different relationship between equality and fate. “It was an empty word [halion epos] I cast forth on that day / when in his halls I tried to comfort the hero Menoitios. As I suggested in chapter 4.105–106). trans. In Achilles’ answer.32 Achilles’ response to the death of Patroklos seems to point toward a recognition of a more complex operation of fate than he had suggested earlier.” but he was no help to “my other / companions.104). witness these collisions throughout the Iliad. Thetis reminds him that his fated death (potmos) will follow (18.. .320).96).98–99). The audience. Fate is no longer an individual possession but a collision that occurs through the intertwining of choices and actions.8). but as willing. because he “lacked my fighting strength to defend him” (18. he connects this esteem to a failure to take care of another. in which destinies are fulfilled through their intersection and collision with each other.99–100). In Achilles’ words. since it demonstrates the impossibility of a withdrawal from a world of collision. and give me shining gifts in addition” (16. utility. Something has changed in the nature of this longing.22). both Patroklos and himself.83–86). Hera confirms the incompleteness of Achilles’ knowledge when she responds to Zeus that “Even one who is mortal will try to accomplish his purpose / for another. as he misses “his manhood and his great strength / and all the actions he had seen to the end with him. Achilles experiences not only a vulnerability to the suffering of another. but also a longing that. Achilles’ response is carefully cloaked in an instrumental language. Achilles allows Patroklos (at Patroklos’s urging) to defend the ships so that the Trojans will not “take away our desired homecoming” (16. ironically. the longing that Achilles now experiences is for the loss of someone irreplaceable. But Achilles defines Patroklos’s reentrance into battle almost solely in . he had promised the Achaians would feel for him (1. but as vulnerable to their suffering. Whereas the longing of the Achaians would be based on Achilles’ value to them in war.82). though. Instead. Even when Patroklos comes weeping to Achilles because of the pain (achos) that has befallen the Achaians (16. though he be a man and knows [oide] not such wisdom [mêdea] as we do” (18.6–8). Even after Achilles has avenged Patroklos’s death and honored him through a funeral. 18. to be sure. Achilles. in unintended and unanticipated ways. / But Zeus does not bring to accomplishment [teleutai] all thoughts in men’s minds [andressi noêmata panta]. Moreover. he tells Patroklos to “obey to the end this word I put upon your attention / so that [hôs] you can win.34 We do not have to read Aristotle’s categories back into the Iliad to see how Achilles’ regard for his comrades is expressed earlier almost solely in terms of how they can serve the ends of his desire for vengeance. / Thus it is destiny for us both to stain the same soil here in Troy” (amphô gar peprôtai homoiên gaian ereusai autou eni Troiêi. for me. Suggestive here is Aristotle’s discussion of the motivations for friendship as those based on pleasure. does not want Patroklos to die. not simply as a cause of troubles for others. and the hardships / he had suffered” (24. great honour and glory / in the sight of all the Danaans.162 Dean Hammer and bringing his share of war spoils allotted. Achilles’ “longing [potheôn] for Patroklos” continues. Achilles’ decisions affect. or a love of another’s character. What Achilles cannot know is how to confine the consequences of his actions to punishing Agamemnon.240–44). We see the beginning of an enlarged sense of Achilles’ connectedness to others. so they will bring back to me / the lovely girl.324–28).33 ESTEEM AND THE DISTINCTIVENESS OF ANOTHER Through the death of Patroklos.362–63). / nor enter again the field for the spear-throwing.35 In the midst of desecrating Hektor’s corpse. but they are still characterized by an attitude which could express itself in active friendship. that I am not forgotten [lêtho]” (23. they do not actively engage in their friendship. The poignancy of this statement is suggestive of the depth of the friendship. Whereas relationships based on pleasure or usefulness are necessarily temporary. even though Nestor does not compete. as well. he rewards an extra fifth prize to Nestor in the funeral games. Most notably. And Nestor. “When friends live together. Achilles comes to express. unable to separate his own suffering from the loss of another.620–23). “I give you this prize / for the giving [autôs]. Nothing is to be gained. Achilles’ esteem for Patroklos will endure the distance of death and memory. / And though the dead forget [katalêthont’] the dead in the house of Hades. and provide each other’s good. that Achilles’ feelings of loss and pain with the death of Patroklos have cognitive significance. With his death. they are asleep or separated geographically. they enjoy each other’s presence. saying: “I will not forget him [ouk epilêsomai].648). though. For it is not friendship in the unqualified sense but only its activity that is interrupted by distance. never so long as / I remain among the living and my knees. that which is distinctive in his comrades. in fact. from Achilles’ promise of a continued enactment of his relationship to his slain friend. As Achilles explains. But this invocation is still more suggestive. Achilles recognizes and articulates more fully his relationship to Patroklos as the esteem of another who is distinctive. since never again will you fight with your fists nor wrestle. have their spring beneath me. Achilles presents himself to the memory of Patroklos. even potentially. / even there I shall still remember [memnêsomai] my beloved [philou] companion” (22. however. This experience exposes the untenability of Achilles’ earlier stance of selfsufficiency. since now the hardship of old age is upon you” (23.36 As Aristotle notes. nor race / on your feet. His sense of esteem. as an image of his worth in relation to .387–90). dissolving once the motives disappear. Achilles suffers-with Patroklos. Achilles never strays very far from an esteem for Patroklos. When. thus far. In particular. true friendships endure because they are based on an attitude of esteem.Toward a Political Ethic 163 terms of how Patroklos (without dying) can serve Achilles’ desire for vengeance.37 In this case. seems to recognize this as he expresses gratitude “that you have remembered [memnêsai] me and my kindness [enêeos]. these feelings alter Achilles’ earlier understanding of himself as suffering-from the inflictions of others. With the death of Patroklos. Achilles’ esteem for Nestor is decoupled explicitly from any further military contribution the old man can make. I have suggested. and related. Achilles. But the pain that separates them initially—the grief that Priam and Achilles have brought to each other—is now brought into a common outline. There is both a literal and figurative aspect to this space. the poet creates a space in which Achilles and Priam meet. the care and suffering of distinctive others. What begins to emerge in the context of intimacy and friendship is an esteem for himself as connected to.162–65). and bearing some responsibility for. Against this backdrop of suffering. is modified in two ways. that suggests a return to “closure and order” (a return that. underlies Achilles’ sense of being responsible for the loss of Patroklos. The boundlessness of the pain causes him to slaughter endlessly. 452–53). . Within this space. now brings into the open “the intimacy with which opponents belong to each other. established in conflict. rather than as instruments of his revenge. Homer describes the contours of this bounded space as a “towering / shelter” (klisiên) that is surrounded by a “courtyard” with “hedgepoles / set close together” (pukinoisi) (24. But it also leads to an inconsolability that threatens to consign Achilles to a reactive cycle of anger and vengeance that can know no end.38 Second. he comes to define his own worth as premised on a sense of responsibility or care for his intimate friends and comrades. in his longing for Patroklos.414. ESTEEM AND THE EXPRESSION OF PITY The pain of Patroklos’s death does not immediately unite Achilles with others.”42 They appear to each other with the physical marks of their suffering-with another.448–49. The incommunicability of the pain leads him to stand apart from the other Achaians. as we have seen. as his sense of esteem is now made vulnerable to the loss of another. As Lynn-George notes. have both defiled themselves (18. This suffering. the association of pukinos with architecture describes structures that are “closely constructed” or “well fitted together. is also resisted). And the inconsolability of the pain drives Achilles not just to kill Hektor. as it appears in Book 24. but to attempt to desecrate the corpse beyond recognition. and Priam.22–27. 24.40 This architectural image is important for conveying in physical terms the existence of a bounded space in which Priam and Achilles meet. as he mourns the loss of Hektor. 22.164 Dean Hammer others. First. this care rests upon an esteem for others as distinctive. Priam and Achilles encounter each other’s pain.41 Achilles’ and Priam’s pains cannot be compensated and their grievances with each other cannot be resolved. as Lynn-George suggests. The space of meeting.”39 It is an image. This altered sense of his esteem for himself and esteem for another will provide the basis for Achilles’ response to Priam in Book 24. / nor is there any to defend him against the wrath. the destruction” (24.49 Priam does not say.”47 Priam attempts to establish a resemblance with Peleus.” to bring an end to Achilles’ lamentation.641–42). and on the door-sill of sorrowful age” (24. “Remember your father who may soon suffer as I do now. the meeting between Priam and Achilles addresses what Lord describes as the “feud” that erupts between Achilles and Hektor with the death of Patroklos. Far from taking “place on the level of nature.637–39). of course. A distance is maintained between the pitier and pitied that befits the relationship between the supplicated and suppliant.Toward a Political Ethic 165 suffered sleepless nights (24. in the future. which is seldom discussed. But this qualification by Priam. Peleus’s hopes are. Priam summons a “memory of grief ” in which Achilles is asked to “generalize from his own experience” of the death of Patroklos and the absence of Peleus “to another’s similar experience of loss. Priam attempts to arouse in Achilles the impulse of pity that comes not from the sight of pain befalling an intimate. when he hears of you and that you are still living.488–89). the meeting of Priam and Achilles has political significance since it points to the possibility of lending durability to this world. 24.209–14. as well. outside the human world. come upon oneself or one who is close. to “remember your father. But Priam as carefully distinguishes between his plight and Peleus’s. This ethic is premised on the sense of esteem for oneself and another that is now generalized by Achilles from the intimacy of friendship to a pity for an enemy. allows another to appear. and to establish some solidarity between Priam and Achilles. in vain. from there.45 I would suggest. Priam emphasizes in his next line that this harm has not yet befallen Peleus: “Yet surely he [Peleus].48 Priam establishes a resemblance to Achilles’ father.” He says.44 Crotty and Seaford both have shown how this scene draws upon rituals of supplication: to invoke recognizable patterns of interaction “between individuals from different social units. 24.490–92). 19. one who / is of years like mine. but the sight of pain that one fears may. makes sense in the context of an appeal for pity. in its most fundamental sense. that this gathering is made possible by an ethical stance that. / is gladdened within his heart and all his days he is hopeful / that he will see his beloved son come home from the Troad” (24. but does not establish an identity.43 Whereas the funeral games appear as a ritual enacted by the community to redress the schism between Achilles and Agamemnon over the issue of authority. and gone without food (19. Priam begins his appeal to Achilles by invoking him.” .”46 as Redfield suggests. “Remember the suffering of your father and.3–13. by evoking those “who dwell nearby encompass him [Peleus] and afflict him.486–87). In this way. As Crotty suggests. you can understand my suffering.303–308. and not for the embassy in Book 9? The answer lies in Achilles’ ability to imagine himself in the position of another. and he wanders [phoitai] respected neither of gods nor mortals” (24.516).526). The “two remembered. For those who receive from the “urn of evils. Achilles pushes away Priam’s hand gently. as Priam sat huddled / at the feet of Achilleus and wept close for manslaughtering Hektor / and Achilleus wept now for his own father. Depicted here is the expression of loss by both Priam and Hektor. Achilles first experiences this vulnerability when the death of Patroklos precipitates a corresponding loss of himself. Achilles appears to Priam as he does to Peleus: as the occasion for their suffering. trans.166 Dean Hammer Achilles’ initial response to Priam’s supplication is not pity. as well. which once appeared as the fulfillment by Zeus of Achilles’ wishes. not as he is denied the recognition of others.507–508). Achilles sees himself through the eyes of Peleus as “a single all-untimely child” who gives his father “no care as he grows old” (24.” Zeus “makes a failure / of man. In this projection. as Achilles imagines the experience of Peleus. mortals encounter both good fortune and evil. . transforming their relationship into one of mourning (stonachê) (24. As Priam pleads for the return of his slaughtered son. The appearance of Priam now calls to mind Achilles’ own vulnerability to the suffering of Peleus. Whereas the vulnerability experienced through the death of Patroklos is immediate. and the evil hunger drives [elaunei] him over the shining / earth. an imagination that grows out of his experience of suffering-with another. Achilles laments. Whereas the “gods themselves have no sorrows” (akêdees) (24. states Achilles. and bring nothing but sorrow to you and your children” (24.540–41). but his own responsibility for the suffering that he now brings to Priam and has brought to Peleus. Achilles is able to sense not just the suffering.542). but as he fails to care for his father (like he failed. The pain of Achilles’ wandering is experienced as a loss of esteem. Priam’s words. the vulnerability to Peleus’s suffering is both immediate.509–12). but mourning. now again / for Patroklos” (24. and more distant. as they recall images of suffering. Achilles is able to imagine himself similarly through the eyes of Priam. After describing the suffering he has brought to his father. Only after Achilles “had taken full satisfaction in sorrow [gooio] / and the passion [himeros] for it had gone from his mind and body” (24. now appears as a necessary consequence of the intertwining and colliding of fates. “I sit here in Troy. But how can we explain this transformation from mourning to pity? And why would Priam’s appeal for pity work now. “stirred” (ôrse) in Achilles “a passion of grieving [gooio] / for his own father” (24.531–33.512).513–14) does he look to Priam “in pity” (oikteirôn) (24. to care for Patroklos). as Achilles experiences Peleus’s absence. Suffering. broods on the sorrows that the gods gave her” (24. “From suffering comes song. and Peleus is the collision of their fates: Priam is about to lose his home. “stone still. In this awareness is a comprehension of a “who” as a distinctive life story. But what can make such endurance possible.51 Achilles recognizes immediately a certain nobility in Priam’s heart. Created in this encounter is a space. “And you. but as inextricably linked to the movement of fate in the mortal realm.519–21). When Achilles meets Priam.617). scholars have often found recourse in the aesthetic of the meeting between Priam and Achilles.” continues Achilles. as for the glory of .367). as he comes to see.52 They risk becoming frozen in grief. Priam has been transformed from a lord to a suppliant.” The hero endures. we are told you prospered once” and “you were lord once in your wealth and your children” (24..Toward a Political Ethic 167 modified). As Achilles states to Priam. and song gives pleasure. This esteem will be expressed later. Peleus. “not so much for his own glory. too. particularly given Achilles’ description of a world of coming and going in which fortunes shift and lords become wanderers? In addressing this question.632). covered in dung. 546). born of esteem for another. Achilles will not return home. Achilles enters a grief that is beyond endurance (atlêton) (19. and soon to lose his city. is stricken by Zeus: his father once “outshone all men beside for his riches / and pride of possession. . brings about the death of Patroklos. But the “Uranian gods. “How could you dare to come alone to the ships of the Achaians / and before my eyes.50 Achilles no longer sees himself as removed from mortal suffering. who are “an affliction [pêma] upon you” (24. unable to reconcile themselves to a past for which they must suffer but could neither foresee nor control. For Griffin. when I am one who have killed in such numbers / such brave sons of yours? The heart in you is iron” (24. not even so much for his friends. but through its unique story. T O WA R D A P O L I T I C A L E T H I C With the death of Patroklos. and Peleus will die alone. Priam.535–36.547). not as an instrument of Achilles’ revenge. when Achilles is described as seeing Priam’s “brave looks” and listening “to him talking” (24. like Niobe who. The undeserved nature of Priam’s suffering is heightened by Achilles’ developing esteem for the king. and was lord over the Myrmidons” but now suffers from the evils of Zeus as his son sits “far from the land of [his] fathers” (24.. in which human life appears. 541–42). as well. old sir. Zeus’s fulfillment of Achilles’ oath. he tells the Trojan king to “bear up” (anscheo) (24:549).543. What unites the suffering of Achilles. Achilles asks. A similarly undeserved plight has befallen Priam. brought the Achaians. 58 is how this vision of human solidarity is elevated above or placed outside of politics and political community. Achilles now acts toward Priam in such a way as to make it possible to project themselves into a future.”55 And for Crotty. Thetis tells Achilles that the gods are concerned that he has not released (apelusas) Hektor’s body . but for a few exceptions. allows for the possibility of projecting the world into the future by answering to the irretrievability of action.60 Two actions.61 The first of these actions. in Arendt’s words.”56 Out of this experience comes a vision of an “elemental human solidarity” in which Priam and Achilles are bound to each other through their common experience of suffering. Pity rests upon an awareness of the frailty of human affairs in which our connectedness to each other makes our deeds.526) and who bestow good and bad fortune upon mortals. showing how communities suffer and. The meeting between Priam and Achilles in Book 24 is premised. who “have no sorrows” (akêdees) (24. in fact. most obviously. as mentioned earlier. The meeting of Priam and Achilles arises from these collisions and speaks to the fundamental political problem that is raised in the Iliad: how does one give endurance to communities made fragile by the very nature of human connectedness? The Iliad answers that question by showing how pity provides the foundation for a political ethic that makes possible community life in the context of community suffering. This fellowship does not provide any “common project” or “cooperative effort” but serves only to enable Priam and Achilles to “better understand what each has experienced.”54 For Rabel. and admire each other’s beauty. or the pride of Hektor. Achilles comes to recognize the “poetics” of the epic as he enters into a new kind of fellowship with Priam. The epic continually places these individual volitions in a public context. releasing. and no longer able to control the path to his future because of the interconnectedness of himself to others. both “irretrievable” and “unpredictable. Whitman identifies an aesthetic awareness in their meeting: “Priam and Achilles see life whole. on the release of Hektor’s corpse. they forget the present circumstances. No longer able to count on the gods.”59 And pity is guided by a sense of care for others that makes possible the restoration of the bonds of community. allow for this restoration: releasing and promising. outside community.”53 Redfield suggests. that this reconciliation takes place at the level of nature.168 Dean Hammer song. and with the freedom of men on the last verge of time.57 What is striking in these formulations. This runs contrary to a continual linkage in the Iliad between private acts and public consequences. are endangered through the collisions of human action and reaction. pleasure is found “by a mortal hero’s enjoyment in the reflection of his own ironhearted endurance in suffering. in particular. whether the lust of Paris. the wrath of Achilles. the greed of Agamemnon. The corpse. After dragging Hektor’s body around the city. in the use of pessô to describe the confinement to one’s sorrows. Thus. and remember neither your food nor going / to bed” (24. And Priam neither tastes food nor sleeps because he “broods” (pessei) over his suffering (24. Pessô.62 Releasing. philos. Vengeance.136. to desecrate Hektor’s corpse. “My child. Achilles and Priam are “confined” to the consequences of their actions. he then drags Hektor’s body three times around the tomb of Patroklos (24. sighs Achilles.” suggests the intimacy of association between Achilles and Patroklos.128–30)? Food and drink will not pass Achilles’ “dear (philon) throat” now that Patroklos has fallen (19. by reason / of longing [pothêi] for you” (19. which is associated with swallowing or digesting. nor satisfy. The meeting between Priam and Achilles allows for a release from the suffering each has brought. modified). While mourning.315–18). “my heart goes starved / for meat and drink. As Benveniste notes. But now.” suggesting a sorrow that does not go away but remains within the person (as though indigestible).617). also means “brood. Thetis asks Achilles. This confinement to the past is suggested both by the desire for vengeance and by the feelings of sorrow that cannot end. by the nature of acting among others. Food and drink will not pass his philon throat because “the sorrow of Achilles is that of a philos. is not just a return of a body.319–21).639). Achilles seeks his vengeance not only by killing Hektor and sacrificing twelve innocent Trojan children. can neither end. Niobe is unable to eat or drink. though they are here beside me. Achilles is caught in a reactive cycle that knows no future. no matter what form of vengeance is taken. Achilles recalls how Patroklos used to prepare fine meals for them (19.113–16). The unfortunate truth is that Patroklos will not come back.210. as well. see also 24. or toward guests. but a freeing from an inner confinement to the past. In telling Priam that he is “minded / to give . and without satisfaction.16). though. and the feeling of having lost his hetaîros [companion] makes him put aside all desire for food. ending where he began. The image of digestion appears. thus. but are aspects of associations of philotês. is the material manifestation of a deeper predicament.”63 Food and drink are not just necessary for human survival. because it cannot reverse the original deed. they cannot now retrieve. because it is always a re-action. Without release. how long will you go on eating your heart out in sorrow / and lamentation. but instead forever “broods” (pessei) about her sorrows (24. in modifying “throat. The loss of a philos who is so dear renders Achilles unwilling to participate in these activities of community. whether the friendship of intimacy. which. but also by attempting tirelessly.Toward a Political Ethic 169 (24. community. as a reaction to Hektor’s deed. The inability to release himself from the sorrow of loss is suggested by Achilles’ unwillingness to eat and drink. trans. Now. does not signal a love of Achilles for Hektor. 594).335–36). What promising does is give some durability to human community by projecting it into the future. That is. Priam only broods (pessei) over his sorrow. “of knowing its consequences and relying upon the future. Like Achilles. This more inclusive language of philos is played out symbolically. “Now I have tasted [pasamên] food again and have let the gleaming / wine go down my throat. Before.601) and sleep. He is able to imagine his love for Patroklos as having a parallel in Priam’s love for Hektor. the promise suggests a stance of responsibility for the future in which individuals. 619. I had tasted [pepasmên] nothing” (24. Achilles experiences a release of the grief that had bound his heart in this reactive cycle of vengeance and sorrow. bind themselves to one another. as Arendt suggests.338–43). Promises. This unpredictability arises. This so clearly challenges the exclusive love that he had for Patroklos that Achilles even calls to his “beloved [philon] companion” not to be angry since he has given back Priam’s “beloved [philon] son” to his. It does.641–42). and sleeping.581–90).560–61). Patroklos will be buried properly. ties of reciprocity. recognizing their connectedness.591. establish relationships that constitute Homeric political fields. with the release of Hektor. neither food nor drink could pass their dear (philous) throats. more than any other act. the second action. “loved [philôi] father” (24. proclaimed Achilles.170 Dean Hammer [lusai] Hektor back” (24. which parallels Achilles’ treatment of Patroklos’s corpse. Achilles dismissed Hektor’s entreaty to ransom the corpse back to his family (22. Achilles calls for the servants to wash. Through this release.”65 The promise does not guarantee the future any more than it provides mastery over the present. but Hektor shall lie on the plain to be “foully” ripped by dogs and vultures (22. and clothe Hektor’s corpse and then “Achilleus himself lifted him and laid him / on a litter” (24. In the expression of pity toward Priam. Oaths. and the distribution of material rewards all rest on promises that . anoint. the eternal brooding of Niobe. both can taste food and drink again. frozen in time by the impossibility of release. As Priam exclaims to Achilles. promising. Before. The cleaning of Hektor. from “the impossibility of remaining unique masters” of what we do. is replaced by images of eating.64 While they were confined to the sorrow for one who is beloved (philotês). since both Achilles and Priam can “remember” their dinner (24. drinking. though. While releasing answers to the irretrievability of the past. answers to the unpredictability of the future. Achilles’ love of Patroklos had excluded any pity or care for the return of Hektor’s corpse. correspond to the extension of the language of philos by Achilles. however. guest friendships. the Achaian community is jeopardized by its broken promise to Achilles when it retrieves the gifts that had been given. Whereas before he remembered “neither . saying this “is what you could do and give / me pleasure” (kecharismena) (24. he cares for himself now for the first time.601) and sleeps with Briseis (24. / nor wolves and lambs have spirit that can be brought to agreement [homophrona] / but forever these hold feelings of hate for each other. Achilles binds himself to Priam.Toward a Political Ethic 171 are essential to the maintenance of a community space.676). This act. but to withdraw to a realm in which he will not be bound to others through promises or obligations.672).. In contrast to Foucault’s .. Achilles promises only to Patroklos. allows Priam and Achilles to move from eternal mourning to an anticipation of a future. Achilles now eats with Priam (24.309). following on his words.658). as it rests upon a like-mindedness (homophrôn) that only humans share.650). He ignores Agamemnon’s offer of his oath that he did not sleep with Briseis. Achilles will be bound only by his promise to himself that he will bring unendurable suffering and loss to the Achaian community. Coming from Achilles. Achilles’ answer is telling. As Richardson notes. This broken promise prompts Achilles not only to refuse to fight. indifferent to his own future. in other situations charizesthai means “to oblige someone. In fact. though. food nor going / to bed” (24.262–66). And he rejects Hektor’s offer of an agreement (harmoniê) that whoever wins should return the corpse to the community. / I will hold off our attack for as much time as you bid me” (24. Achilles is unable to make any such promise. as he responds that he cannot make agreements (sunêmasunê) with someone whose deeds he will not forget (22.66 Achilles asks Priam to tell him how many days will be needed for the burial of Hektor so “I myself shall stay still and hold back the people” (24. / so there can be no love between you and me.661). Even in his reentrance into battle. such a promise that he will be this self in the future and honor the agreement would be met rightly with some hesitancy. This language not only signals the end of the feud. who has “destroyed pity” (24.129–30). nor shall there be / oaths [horkia] between us” (22. Caught in a reactive cycle of vengeance.261). he fulfills Priam’s wish “for love [philon] and pity [eleeinon]” (24. Now. Though Achilles will die in battle. but is restorative by establishing a relationship in which they have become bound together through a promise. There is something distinctively human about this ability to promise.669–70).”67 Achilles seems to recognize his assumption of an obligation when he answers that this “shall be done as you ask it. “As there are no trustworthy oaths [horkia pista] between men and lions. Priam responds. And Achilles seems to recognize this as he grasps Priam’s wrist “so that his heart might have no fear” (24.44). When Achilles addresses Priam as “good friend” (phile) (24. In promising to another. Eric Havelock contends that an oral consciousness places conceptual limits on the Homeric epic.69 Achilles knows he will die. In contrast to the scene in Achilles’ shield in which the city’s people await an ambush. and Priam knows his city will fall. as he sent me on my way from the black ships. P O I E S I S A N D T H E C A L L I N G F O RT H OF THE HUMAN WORLD Throughout this book I have been asking. The space itself is indeterminate since the fall of Troy is near. and then gather for a feast in Priam’s house (24. argues Havelock. 802). was that “the resources of poetry as commonly exploited in performances are unsuitable for the expression of philosophy” because of “the idiom of common speech and thought.”71 This error of thought extends to the . a focus on the mechanical demands of oral composition overshadows any discussion of the meaning of the poem. though often unstated in scholarship. that so much of our understanding of the Iliad is built. in Priam’s words. as the Trojan people (laos) “all were gathered to one place and assembled together” (êgerthen homêgerees t’ egenonto) to mourn and remember Hektor. as the Iliad ends with a moment of care that is set against the frailty of a world of coming and going. recounting it as a series of events. Combining Plato’s philosophic concerns with Parry and Lord’s insights into the structural demands of oral composition. Achilles binds the Achaians to the Trojans.70 The claim of the pre-Socratic. so. “What is it that the poet makes?” For it is around this question.172 Dean Hammer claim that “the care of the self is ethically prior” to a “care for others. The conscious task of the pre-Socratic. which narrativizes our experiences.789–90. now. is inextricably bound up with others. as a matter of self-esteem. of becoming and perishing. 798. / that none should do us injury until the twelfth dawn comes” (24.”68 Achilles discovers that the care of the self. Yet. was to critique not just the content of Homer and Hesiod. this promise is significant because it allows the Iliad to close on the poignant image of a Trojan community space. For Plato. For Parry. The promise is restorative of the public life of human community. but the error of thought that arises out of orality. Achilles’ promise is unlike earlier promises in the Iliad because it does not rest on even the possibility of getting something in return.780–81). to build a grave with stones “laid close together” (puknoisin). But the activity of human dwelling is preserved. the craft of the poet is to imitate appearance and. the poet has little to say about how one should act. “Achilleus / promised [epetelle] me. suggests Havelock. creating analogies to bridge “the abyss between inward and invisible mental activities and the world of appearance. Philosophy shares in this activity through the only way it can appear: namely.”74 The point is not to downplay the importance of philosophic thinking. since both terms suggest an unacceptable instrumentality and transparency to language. . His philosophic language is replete with images from this world: of metals that constitute our capabilities. but the language. Rather. The pre-Socratics may have sought to create a conceptual vocabulary. In constructing a poem.” And philosophers relate the world through metaphor.” “reason. though. The objective system of thought that Havelock sees as characteristic of logos does not stand apart from the phenomena of appearance but appears more as “frozen analogies”: metaphors used to describe relations of permanence. that belies the distinction that Havelock draws. as Arendt notes. it is to suggest the close connection between poetry. after all. and thinking as an activity of language. of the philosopher as navigator.72 There is a fundamental similarity in the activity of both an oral and philosophic language. The poem becomes a world that is made familiar as the things of the poem are named and brought into relationship with each other. through language the poet calls forth a world. the poet calls forth a world that the poet and audience know through language.Toward a Political Ethic 173 “moral dimension” of the epic since morality appears simply as a “pragmatic response” to particular situations. Rather. as it were. disalienating the world into which. each of us is born as a newcomer and a stranger.” and “soul. But it is a world that is neither purely fictive nor representative. The activity of language. Language does this in two ways: through the “naming of things. but they did so. by going “to Homer’s school in order to emulate his example. as it is manifested in language. as Arendt suggests at one point. nor does language appear unconceptual since it is grounded in the particulars of experience. giving linguistic substance to the phenomena of “truth. The poet. to be sure.” “mind. of the journey of the soul. also uses the poet. Language appears not as a ready-made tool that the poet uses to make a poem. The philosopher names the world. through the cumulating of tradition that describes the world. and of philosophic truth as the light of the sun. philosophy.”73 Plato certainly understood the importance of metaphor since he sought to appropriate the poetic task of “making” for philosophy.” and through metaphors by which we relate things that are otherwise unrelated. uses the language.” Language is a way of making sense of and giving meaning to the world. is “the human way of appropriating and. For the poet does not fix time in the concept—to discern essences that stand outside time—but understands how time conditions our being in the world. disaster and blessing. but about the attitude that the poem evinces toward the world. vulnerability. vulnerability. we see the philosophic contribution of poetic making. a relationship that is grounded not in the philosophic world of autonomy. The importance of the epic is that it invites reflection on the exigencies of human enactment. The poem “gathers around itself” the relations of beings that make up the world: “birth and death. Gagarin.” In calling for. particularity. a recognition that arises not from outside but from within a world constituted by experience. and bringing into relationship with one another the successive experiences that make up the passing of life.” Such a reduction is impossible because the language that builds the poem is. Language resides in the world. cannot be reduced to a purely instrumental expression of “how to. the poem “brings man onto the earth. and pity rather than investigations of that which is immutable. . the poem does not transcend the human condition but presents us with. and allowing to appear.”76 We are not talking here about the particular intentions of a poet. Kant 1959. 5. perhaps even reminds us of. victory and disgrace. The poet constructs a vision of the world. and pain. 287–88). and immanence. whoever that poet may be. defines morality as a “disinterested concern for others” and ethics as a general cultural orientation in which norms of behavior are grounded in “prudential self-interest” (1987. as the passing of time. our condition as dwellers in the world: “To say that mortals are is to say that in dwelling they persist through spaces by virtue of their stay among things and locations. is one in which we are moved toward a recognition of a shared world. for example. 2. the poem. like the story Achilles tells Priam. and through language we reside in the world. The epic moves us to a comprehension of a political and ethical relationship to others. universality. Around this notion of fate. He is incorrect in concluding that such attention to the particulars of human experience serve only to glut our emotions and tell us little about how to live. rendering visible through metaphor the invisibility of human yearning. Plato is correct in seeing in the Iliad aspects of suffering. It is a similar residing that the poet creates through the poem. endurance and decline” that “acquire the shape of destiny for human being.174 Dean Hammer What is it that the poet makes? Even Havelock recognizes that the product of the poet. NOTES 1. itself.”75 That is. and transcendence but in the Homeric world of contingency. desire. The story Homer tells us. invulnerability. not reducible to a tool of the poet. remorse. the particulars of the experience of the world. Zanker 1996. 6. 25. to one of a “feud” with Hektor. 12. Yamagata 1994. King 1987. 9. 5. but as Achilles. 8. 97. 97. 6. but rather as being “propel[led]” by the “poem’s overall teleology and conventions” (1996. 16. I seek to justify its usage in my argument. Williams 1993. he describes Achilles’ actions and reactions only at the level of epic convention. Williams 1985. 266–67. 13. see also Auerbach 1953. Long 1970. 97–102. 78–79. Griffin 1980. involves issues of esteem. Achilles now “accepts his own death” (1980.” Cairns has made a strong argument for showing how aidôs. and 1955. Crotty 1994. Lynn-George 1988. 84) see also Schadewaldt 1959. Live in the moment: Fränkel 1962. Bakhtin 1981. Patroklos” (1980. 96). Vernant 1991. 6. 89 (1975. 21–22. Rather. Segal also suggests that “Achilles shows an awareness of death as part of a more comprehensive order” (1971. Redfield 1994. Nagy 1979. See Nagy 1979. Achilles. Cairns 1993. His act is a ritual act uniting the fivloi with. See also Ricoeur 1992. 18. 21. See Cairns 1993. 1990. 16. Heidegger 1979. 113. Nagy 1979. 57–58. “Patroklos recognizes the social obligation of Achilles to the fivloi. 75. Griffin writes that with the death of Patroklos. 42). “To suffer-with another” appears in classical Greek as sullu-peisthai . MacLeod 1982. Lloyd Jones 1971. 79 n. 125. and Gill 1996. 19. Lord suggests that the death of Patroklos marks a change in the pattern of the story from a “pattern of the wrath” of Achilles. 21. 137–38. Sinos sees Patroklos’s entrance into battle as a ritual substitute for Achilles’ unwillingness to recognize his obligations to the philoi. 116. 73. 83. No Greek term corresponds to the term “self-esteem. Critiques and modifications of these arguments have been offered by Wolff 1929. 142. and terms used in conjunction with aidôs. 23. Muellner (1996) does not sustain this distinction in his discussion of Achilles. which leads to his return (1960. 89 (1975. 10. 161). Cairns 1993. This is why Muellner does not see Achilles as an ethical actor. See also Segal 1971. it is he who dies for the fivloi. 172. Beye 1993. 24. 73). Gaskin 1990. . 8. The term does not appear in the Iliad . 164. 25. in the person of the substitute. 93 (1975. Schmitt 1990.Toward a Political Ethic 175 3. and Muellner 1996. 7. 20. 4. Redfield 1994. 80). Though I begin with this notion of esteem. what is distinctive about Achilles is that “he is able to contemplate and accept his own death more fully and more passionately than any other hero” (95). Cairns 1993. Act according to forms of society: Fränkel 1962. Snell 1930. Atchity 1978. Dodds 1957. 80). Crotty 1994. and is associated with a feeling for one who is intimate. See also Böhme 1929. 17. 11. Segal 1971. but I think this sense is conveyed in Achilles’ reaction to the death of Patroklos. 12. See Burkert 1955. Fränkel 1962. and Finley 1979. 15. 113. which leads to his withdrawal. 76. Sharples 1983. 150). 115. 22. See also Snell 1982 and Erbse 1986. Pitt-Rivers 1974. Whitman 1958. 67. Zanker 1994. 14. Schein 1984. In fact. 327. 176 Dean Hammer 26. This scene is often interpreted as a prefiguring of Achilles’ own death. On the relationship between Patroklos’s and Achilles’ death, see Schadewaldt 1959, 155–202; Schein 1984, 129–33; and Muellner 1996, 155–69. 27. Crotty 1994, 46, 48. There is considerable ambiguity in Crotty’s argument at this point. He does not want to suggest that pity and mourning are the same things. Pity becomes something like a second order mourning: pity arises from the memory of mourning (1994, 75). This distinction between pity and mourning is blurred, though, when Crotty uses Achilles’ mourning for Patroklos as an example of the visceral character of pity in his chapter “Eleos and the Warrior Society” (1994, 49–50). 28. Crotty 1994, 49. 29. Konstan (1999) suggests that Andromache, in fact, attempts to create this distance by projecting a future in which Hektor is dead. 30. Arist. Rhet. 2.8.12. 31. Muellner describes this alienation of Achilles from himself (1996, 136–43), but does not ascribe any cognitive status to this alienation. 32. I disagree with Sinos on this point when he claims that “Achilles’ only recognition of his social obligation to the fivloi is, as we might expect, linked with the name Patroklos” (1980, 43). The death of Patroklos certainly precipitates the remorse, but it is a remorse (and a sense of responsibility) that is specifically extended to his treatment of his other companions. 33. “Because the actor always moves among and in relation to other acting beings,” suggests Arendt, “he is never merely a ‘doer’ but always and at the same time a sufferer” (1958, 190). 34. See Arist. NE 1156a–1157a. 35. See also Ricoeur, who describes this esteem as a love of “the other as being the man he is” (1992, 183). 36. Arist. NE 1156a, 1157b. 37. Arist. NE 1157b. 38. Both intimates and comrades are referred to as philos. See Benveniste for a discussion of the “complex network of associations” referred to by philos (1973, 288). 39. Lynn-George 1988, 232, quoting Cunliffe 1963. 40. Lynn-George 1988, 232. 41. Heidegger 1971b, 204. 42. Heidegger 1971c, 63. Crotty suggests that the performance of the ceremony of supplication gives rise to a “transient, but profound, ‘community’ ” between Achilles and Priam (1994, 21). 43. See Richardson 1985, 344. 44. Lord 1960, 190. 45. See Seaford 1994, 10, 174, and Crotty 1994, 83. 46. Redfield 1994, 219. 47. Crotty 1994, 75. 48. Rabel characterizes Priam’s appeal as “rhetorically inept” and reflective of the “narrator’s habitual irony” (1997, 201–202). 49. There is practical reason, as well, why Priam does not establish an identity of himself with Peleus, and that is that Achilles would then be cast as Hektor. That, of course, would be unacceptable to Achilles. And Priam notes the difference. Peleus may still have hope, “But for me, my destiny was evil [panapotmos]. I have had the noblest / of sons in Troy, but I say not one of them is left to me” (24.493–94). The one who was left and “who guarded my city and people, that one / you killed a few days since as he fought in defence Toward a Political Ethic 177 of his country” (24.499–500). Priam has now lost everything, having “gone through what no other mortal on earth has gone through” (24.505). He ends with an expression of supplication: “I put my lips to the hands of the man who has killed my children” (24.506). 50. This interpretation runs contrary to the suggestion that the urns are an “artistic” motif used by the poet to “satisfy his audience’s desire to find an order and rationality in human experience” (M. Edwards 1987, 136). 51. See Arist. Rhet. 2.8.7, 2.8.16. 52. See Richardson 1985, 329, on the appearance of the theme of endurance in later literature. 53. Griffin 1980, 102. 54. Whitman 1958, 219. See also Crotty, who suggests that the “understanding of grief ” results in “delight” (1994, 103). 55. Rabel 1997, 205. 56. Crotty 1994, 99, 84. 57. Schein 1984, 159. See also Burkert 1955, 107; MacLeod 1982, 16; and Zanker 1996, 125. 58. Notably, see Burkert 1955, 126–34; Seaford 1994; and Zanker 1996, 135–36. Burkert shows how pity relates to, and is brought into tension with, an aristocratic ethic. Seaford argues that Priam’s supplication stops the excessive mourning of Achilles. This allows the Iliad to end by emphasizing a “public death ritual” suggestive of a polis society, as opposed to the lavish private rituals of early Dark Age society (Seaford 1994, 182). I would disagree with Seaford that this implies a sixth-century dating of the Iliad (1994, 144–54). As we saw in chapter 1, there was in the eighth century an increasing public organization of community life and interaction between communities that points toward a progressive enlargement of aspects of recognition, cooperation, and obligation toward other groups. Along these lines, Zanker suggests that the establishment of a “morality beyond reciprocity” would be important in Dark Age society for binding “the distinct community of aristoi in crossing ‘tribal’ boundaries” (1996, 135). 59. Arendt 1958, 188–92. 60. See Heidegger 1979 for his discussion of “understanding” as a “projecting towards a potentiality-for-Being” (385–89). Though the term is from Heidegger, my discussion more closely follows Arendt. My notion of projection points to a disagreement with Schadewaldt. Schadewaldt suggests that Achilles’ decision is one of “pure presence” (reine Gegenwart) that arises from his “ganzen Sein in einem Zustand der Erhebung” [whole being in a state of exaltation] (1959, 267). There is an interesting parallel to Heidegger’s notion of “ecstases.” For Schadewaldt the moment of “Exaltation” (Erhebung) does not “know” a “Before” (Vorher) or After” (Nachher) but exists at the moment of “what has been and what is to come” (des Gewesenen und des Kommenden). So for Heidegger the “ecstases” of temporality is the experience of a “pure sequence of ‘nows’ ” that bring together the “phenomena of the future (Zukunft), the character of having been (Gewesenheit), and the Present (Gegenwart)” (1962, 377 [1979, 329]). For Schadewaldt, Achilles’ decision is not directed by any burden of the past or anticipation of the future, but exists as a pure moment in time. Heidegger, on the other hand, suggests that the coming together of the past, present, and future makes possible the projecting forward of the individual into the future. I am arguing that Achilles engages in just such a projecting-forth as he binds himself and his community, through a promise, to Priam. 61. I am drawing on Arendt 1958, 236–47. 62. Arendt 1958, 237. Arendt writes, “Without being forgiven, released from the consequences of what we have done, our capacity to act would, as it were, be confined to 178 Dean Hammer one single deed from which we would never recover; we would remain the victims of its consequences forever” (1958, 237). 63. Benveniste 1973, 286. 64. See Arendt 1958, 241. 65. Arendt 1958, 244. 66. See Benveniste 1973, 278–81. 67. Richardson 1985, 346. 68. Foucault 1997, 287. 69. See Zanker 1996, 117–18. 70. See Havelock 1983, 15–20. 71. Havelock 1983, 19, 20. 72. Havelock 1978, 8–9. 73. Arendt 1978, 1.100, 102, 105. 74. Arendt 1978, 1.104, 108. 75. Heidegger 1971c, 42, 35; 1971d, 218. 76. Heidegger 1971a, 157. REFERENCES Ancient Sources Alc. Arist. Ath. Pol. Alcaeus. In Greek Lyric. 1982. Translated by David Campbell. 5 vols. Cambridge: Harvard University Press. The Constitution of Athens. 1996. In The Politics, and the Constitution of Athens. Edited by Stephen Everson. Cambridge: Cambridge University Press. Nicomachean Ethics. 1962. Translated by Martin Ostwald. Indianapolis: Bobbs-Merrill. The Poetics. 1951. Translated by S. H. Butcher. New York: Dover. The Politics. 1996. Edited by Stephen Everson. Cambridge: Cambridge University Press. The ‘Art’ of Rhetoric. 1982. Translated by John Henry Freese. Cambridge: Harvard University Press. Diodorus of Sicily. 1952. Translated by C. H. Oldfather. 12 vols. Cambridge: Harvard University Press. Herodotus. 1938. Translated by A. D. Godley. 4 vols. Cambridge: Harvard University Press. Theogony. 1966. Edited by M. L. West. Oxford: Clarendon. Iliad. 1951. Translated by Richmond Lattimore. Chicago: University of Chicago Press. Odyssey. 1967. Translated by Richmond Lattimore. New York: Harper. Nicolaus of Damascus. 1961. In Die Fragmente der griechischen Historiker, edited by Felix Jacoby. Leiden: Brill. The Republic. 1974. Translated by Desmond Lee. New York: Penguin NE Poet. Pol. Rhet. Diod. Herod. Hesiod. Theog. Homer Il. Od. Nic. Dam. Plato Rep. Plut. Toward a Political Ethic Mor. Sol. Schol. Ap. Rhod. Sch. Pi. Thuc. 179 Moralia. 1927. Translated by Frank Cole Babbitt. London: Heinemann. Life of Solon. In Plutarch’s Lives. 1914–59. Translated by Bernadotte Perrin. London: Heinemann. Scholia in Apollonium Rhodium Vetera. 1958. Edited by Carolus Wendel. Berlin: Weidmannsche. Scholia in Pindari Epinicia. 1884–91. Edited by Eugenius Abel. Berlin: S. Calvary. Thucydides. The Peloponnesian War. 1972. Translated by Rex Warner. New York: Penguin. . To the extent that almost all the Greeks take part in this war with the Trojans of Asia Minor and their neighboring allies. The first is used to linguistically characterize the familiar Karians. 181 .1 lasting only a matter of days. between Greeks and Barbarians. translated by David Connolly.C. it telescopes and dramatizes the ten-year-long Trojan war. constitutes the leading and oldest known example of heroic epic. For the Homeric Iliad does not legitimize any form of evaluative distinction between Achaeans and Trojans—or. as we might put it. we are justified in viewing the Iliad and the Iliadic war.” and by extension for the anthropo-geographical division “Europe-Asia”—though these distinctions are given name and form some two centuries later. it is unfamiliar with the two words in question. albeit with some exaggeration and with hindsight.2 If every war produces its own dividing or divisive ideology. composed approximately in the middle of the eight century B. both the epic and its poet appear to withstand this temptation. MARONITIS The Iliadic War he Iliad. we find only once the terms barbarovywnoi and panevllhneV. ©2004 by Lexington Books. as a model for the antithesis “GreeksBarbarians. In the vocabulary of the Iliad. the second to describe the population of a wider region in southern Thessaly.3 Nevertheless. apart from anything else.N. since.4 T From Homeric Megathemes: War–Homilia–Homecoming.. it is only natural that we should expect some pro-Greek trace of this in the Iliad.D. With its own Iliadic war. Although in terms of the Trojan war as a whole this truce may be regarded as no more than an interval. This is evident from the reconciliatory program with which the Iliadic war ends: In view of the two illustrious dead heroes. which inflames the passions of gods and heroes. the poet of the Iliad appears to want to find a common view of man that might support an albeit belated reconciliation. as the poet decides here to introduce the two forces through long catalogues. It is worth remembering first of all that the Iliadic war is unnaturally ~niß of Achilles. at the center of which is the Homeric klevoV. Moreover. This conclusion stems from a careful reading of the first battle which. Achilles and Priam converse. they concur in their view of gods and men. As for the Trojans themselves. as I will explain below.10 in the sense that these terms have acquired in. Following this. they are bound by the same family. sometimes even its absurdity.8 or to regard it in some way as a necessary evil. more specifically. no such issue is raised anywhere in the epic. both Greek and foreign interwar fiction.13 of turning. of course. Maronitis Given this. converge and consent to an eleven-day truce in order to allow Troy’s unburied dead hero to be returned and his honorable burial to take place.N. is also a model11 for the epic. with the introduction of the ou\loß !OneiroV at the beginning of Book II the Iliadic war is in danger of being aborted. for example.9 However. they share the same principles of warfare. the opposing armies regroup and rearray. Yet next to the kleovVu of valor in war. social and political institutions. They communicate easily with each other. despite their long and bitter conflict. refers to the Trojans’ allies. the only distinction occasionally maintained in the Iliad concerning the two opposing parties is purely linguistic5 and. politically. behind the murderous conflict of the two opposing forces. which keeps the delayed:12 it is preceded by the oujlomevnh mh bravest and most illustrious warrior of the Achaeans out of the war for threequarters of the epic. the Iliad stresses the tragedy of war—its futility. both Achaeans and Trojans are presented in the Iliad as being linguistically. On the contrary.7 both Zeus and the poet and the Iliad appear to abhor it. in my opinion. Next. and contrary to all expectation. that the Iliad should be viewed as an antiheroic and antiwar epic. that is.182 D. into a shameful withdrawal by the Danaans. Such an inglorious end is prevented at the last minute by the drastic interventions of Athena and of Odysseus. I am not suggesting. Patroclus and Hector. we should not overlook the fact that it is with this break in the war that both the Iliadic war and the epic of the Iliad come to an end. and culturally homogeneous. the Iliadic war meets with a new postponement as a result of the . but once again the fighting is postponed.6 As for war itself. by trickery. 422-544) in translation. The Trojans opposite. it is decided that the war will continue and called to play his part in this is the archer Pandarus. however. These it was who Ares stirred. Zephyrus with his gusts raises high the sea’s waves. so to a cry went up from the Trojans’ wide ranks—though not in one voice. this was the sound of men gathered from many parts who spoke in a mix of different tongues. one after the other— first they loom far out to sea. finally cresting curved on the capes and spewing forth sea foam. who silently surged forward—no one could imagine such an army behind with a voice in its breast. rendered worthless by Aphrodite. It is precisely at this point that the poet of the Iliad. then break on land with a loud roar. his faithful companion— small and weak before taking arms. by Fear who shows fear. And they were joined by Terror who strikes terror. This duel is. one behind the other. This is followed by the council of the Gods at the beginning of Book IV in order to decide if and how the Iliadic war might continue after the breaking of the oaths by the Trojans. then growing gigantic. who wounds Menelaus. albeit with such delay. bringing them at last face to face with the Trojans and their allies. in fear and silence they heeded the commands. Each commander leading his own men. so advanced the ranks of the Danaans. This perfidy incites the wrath of the Achaeans. sister of many-slaying Ares. almost mortally. scattering their gleam all round. who snatches a clearly beaten Alexander and bears him safe to Troy. her appetite insatiable. to enter the battle. What follows is the entire scene from the Iliad (II. and. . compelling Helen to make love to him. by Strife. answer with their own bleats. Eventually. an in array they wore their shining weapons.The Iliadic War 183 false hope that its outcome might be decided through a duel between Menelaus and Paris.* Just as on the thundering coast. just as sheep in the fold of a rich lord— stand in their thousands to be drained and their white milk. the others Pallas Athena through the gleam of her eyes. composes the first collective battle. and hearing the lambs bleating. in endless succession. merging in a ravine their raging water. Quicker of the two. who pounced like wolves. When the two armies met in the same place. Just as rivers descend from the mountains in torrents. inseparable the cries and screams of those meting out death and of those slipping into death. his spear found the horn of the helmet. bent and leaving his side uncovered by the shield. son of Chalkodon. yet his onrush was short-lived. while far off the shepherd hears the pounding on the mountain and reflects. he pulled him with all speed bending low beneath the arrows. bucklers. and the bronze spear marked him out—undoing him. Thus his life was cut off. ran up and with his usual rashness began dragging him by the legs. with its flowing plume. Maronitis and while her feet touch the ground. so also the cries and screams were heard merging. chief of the great-hearted Abantes. as their blood flooded the earth. and breaths were merged by warriors clad in bronze breastplates. He collapsed at once like a tower. that the screams of battle might increase. and this surges into the abyss of the bottomless gorge. spears.N. son of Thalysius. each chopping at the other’s life. And when the shields clashed boss to boss. her head supports the skies. an unprecedented clatter was heard. passing from the one side to the other. Wanting to take his armor. falling in the fierce fighting. yet over his body raged a great and terrible fight between Trojans and Achaeans. for as he was dragging the victim.184 D. and darkness covered his eyes. . Seeing him fallen. Antilochus was the first to kill one of the Trojans a renowned champion and fighter. Then Telamonian Ajax singled out and killed Anthemion’s son. Elephenor. a still unwedded lad. his name was Echepolus. he was seen by noble Agenor. to fight it out. She it was who then shared out the hate. and the bronze tip wedged in his brow. passing through the bone. And as he rolled in the dusty earth. to bend into a wheel for his splendid chariot. growing beside a great marsh. it was seen by a wheelwright. it finds Leukus. who with his black axe felled it. and fallen now on the river bank it is left to season. just as Simoeisius. he steps out in front. slender with the branches crowning no more than its tree top. speared through the side of the head. Yet the son was unable to repay his due to his family. the thread of his life was so soon cut he was brought down by the spear of the brave-hearted Ajax. Immediately he fell upon the corpse that fell from his hands. offspring of Anthemion. as it was on the banks of the Simoeis that his mother had borne him. from where the swift horses come. Odysseus was sorely vexed. wounding him in the groin. who had just arrived from Abydos. he took aim and caught him in the right breast. and yet his shot did not go wasted. entered the fray and cast his pointed spear. he fell heavily with a thud. clad in his resplendent breastplate. full of anger at his companion’s loss. As the young lad went forward. the spear of bronze. he resembled a dark poplar. Darkness covered his eyes. Seeing his companion killed. passing through the shoulder. takes his stance and casts his shining spear at him— his ever wary gaze glancing all around. while coming down from Mount Ida. Then losing no time Priam’s son Antiphus.The Iliadic War 185 He was called Simoeisius. in a watery meadow. Missing its aim however. Odysseus’ precious companion. was cut down and laid bare by the divine Ajax. as he dragged the dead body toward his lines. came out the other side. comes up with his bright helmet. He it was then who Odysseus. it found Demokoön. The Trojans moved back on seeing him let fly. where with her parents she’d gone to tend their sheep. . Priam’s bastard son. and the bronze point passed clean through to the other temple. instead of Ajax. that they might withstand the flesh-destroying bronze blows. it was hurled by the lord of Thrace. they forced him back. who still broods in his wrath beside the ships. the Argives hail their victory. Absent from the battle is Achilles. He fell backwards to the ground and breathing his last he held out his two arms to his comrades. though he was unable to strip him of his armor. and the light went from his eyes. who had just arrived from Ainus. However. . Their bodies are not of stone. draws his sharp sword.” Such were the enjoinders of the terrible god above the fortress. if somewhere she saw them slacking. Maronitis his armor clanging on top of him. crushing the bones. and valiant. The cruel stone slashed the sinews. and advance relentless. and plunges it in his belly. and the bronze tip sank straight into the lung. brandishing long spears in their hands. son of fair Thetis. But Peiros was there before and following the first blow. Soon Thoas was beside him. Thus he finished him.N. he turned to the Trojans and cried: “Horse-taming Trojans. he pulls the heavy spear from the chest. among them brave Hector. Imbrasus’ son Peiros. he runs and thrusts his spear into the spot beside the navel— all his innards poured out onto the earth. son of Amarynceus. Do not withdraw in fear before the Argives. stand fast. Though Thoas was great.186 D. who was struck beside the ankle. roaming through their ranks. now encouraged the Achaeans. yet the daughter of Zeus. his comrades arrived and stood by him—Thracians who bind their hair on the crown of their heads. just above the nipple. nor of metal. in the right leg by a heavy and jagged stone. and he felt fear before these warriors. he pierced him through the chest with his spear. collecting their dead. The Trojan champions then fell back. strong. Fate then bound Diores. Yet now it was Peiros who was set upon by Thoas the Aetolian. honored Tritogeneia. Apollo saw them from atop Pergamus and was filled with envy. .The Iliadic War 187 Thus two lords now lay together dead on the dusty ground. we can talk of parallel mirrors. For on that day countless Trojans and Achaeans alike. In this case. and the dead were piled high around them. raising her head to the skies. the other of the bronze-clad Epeians. the one of Thrace. 2. through their merging and clashing. The renowned heroes of the main narrative part are surrounded by anonymous warriors. as if the universe were about to catch fire. the main part. Through the intervention of the gods. Suddenly.16 the horror of war is projected onto the screen of both animate and inanimate nature. Suffice that he were there. The first battle in the Iliad consists of three parts: the prologue. with her driving every deathly blow far from him. the field of battle is enlarged. who are divided with rigorous fairness between the two opposing sides. in the main part they merge and clash. The informed listener-reader wishing to highlight the poetic ideology of this battle scene through its poetic economy14 would certainly have a great deal on which to comment. I will confine myself to the absolutely essential: 1. embracing the entire world.15 in the epilogue they concur—I will explain later the significance of this concurrence for the war ideology of the poet and the poem. In the prologue the two opposing armies gather. though tiny at first. became indistinguishable bloated by death. Uninjured wandering in the midst unharmed by the bronze. Through the successive similies. FovboV who strikes terror. Yet. and is magnified in this way. his hand in that of his protectress Pallas Athena. No once could complain at the battle’s rich harvest. the clamor is heard in the surrounding mountains. the war acquires its divine dimension.18 4. immediately acquires gigantic proportions. face down in the dust. demons: Dei 7 !EriV1 —who. and above all. The battle is narrated in two different ways: in language both literal and metaphorical. 3. they have already become indistinguishable: victors and victims by turns.19 who are the first to mingle their breaths and shields and spears. cries of triumph and of anguish mingle. and the epilogue. blood flows in streams. the one beside the other. Yet also wandering between the heroes and the gods are warlike ~moV who initiates fear. following the prior gathering of the opposing forces. in this particular case. Some of the heroes are in their prime. This is followed by the hero-slayings (the so-called ajndroktasivai) between individual heroes in the three successive clashes. reels and falls like a slender poplar. the belly. The narrative principle assumed is that every traditional type of warlike conflict. however. which constitutes the core of the battle scene and which is divided into three episodes: ll. 473-526. victors who the very next moment become victims. 11. the groin).N. an equal balance between the opponents is first suggested and then implemented. the chest. Consequently. the bitter justice of it would become clear: the same number of Achaeans are killed as of the Trojans and their allies. This traditional principle does not appear to hold. where. There then follows the individual slaying of the heroes. 446-456).25 7.24 And further still. If one were to make a meticulous count of how the dead are divided. swords. in my opinion. which comes to confirm the deadly balance between the two opposing forces. It is unthinkable that they should be divided into victors and vanquished. the young Simoeisius who. A typical example is the Trojan myth and war. Already in the second part of the collective battle (where. their indiscriminate mingling is strongly emphasized: first. . results in its unequal outcome. At both the end of the first and third episodes the slaying of the named heroes once again develops into a collective clash. the eujcwlhv and the oijmwgh. for example.23 companions called upon to save their fellow companions at the moment of their death. finally. which is sealed by the fall and total destruction of Troy by the victorious Achaeans. triumph and anguish are intermingled. their collective engagement is now explicitly stated. The overall description of the battle proves to be ironically panoramic: all kinds of weapons (javelins. Maronitis 5. which divides the opponents into conquerors and conquered. signals the war ideology of this first and exemplary battle in the epic. 457-472. others are virtually boys—as. on which. And we now come to the most crucial point which. the active and passive voice of war is here confused. eventually killing someone unsuspecting.22 single and double blows. as a kind of model. 527-538. struck in the nipple by Ajax. stones). but flies off course. and who are killed themselves.20 6. sooner or later.21 all kinds of mortal wounds (to the head. instead of the unequal outcome of the war. then the cries of the warriors. the indistinguishable blood of death that flows through the battlefield like a torrential river. the Iliadic war is planned as a whole. the weapons of all kinds conjoin. It is impossible to distinguish the two sides. the absurd aspect of the missed aim: the deadly missile is intended for someone specific.188 D. ojlluvntwn te kai ojllumevnwn. automatically making a victim of the victor. the third round of the hero-slayings takes place. Following Odysseus’ anger at the killing of his companion. Involved in this. the slaughter becomes more general around the successive dead bodies and the reciprocal killing dominates once again. countless Trojans and Achaeans alike. as named heroes. who now find time to gather up their dead. in keeping with the traditional idea that requires distinct victors and vanquished at the end of a battle. who would stand beside him. Then. It is at this point that the curtain might fall on this first and model scene. then. First by the majestic appearance of Apollo.26 What follows is a paraphrase of lines 539-544 in order to more clearly bring out the main points of this account: So. immediately afterwards. the one on top of the other. Leukus. by Priam’s son Antiphus and his avenging onrush that results in the killing of Priam’s bastard son. take him by the hand.The Iliadic War 189 The exception is the middle episode. taut and indistinguishable. Thus. On the condition that he would remain uninjured and unharmed by the deadly blows. The Trojan champions and even Hector himself fall back before the relentless onrush of the Achaeans. thereby strengthening their fighting spirit. Contrary to all expectation. who criticizes the unjustified flight of the Trojans. no mortal man could claim that his toil had gone in vain. who slays Peiros. and Thoas. wandering over the battlefield. are Peiros. the poet of the Iliad continues with an account in the form of an epilogue to show the consequences of the battle he has narrated. and only then. would he see with his own eyes what had happened in that clash: the battlefield covered with the dead. in an attempt to prevent the likelihood of their faintheartedness in the face of the Trojans newfound morale. its structure expressing a possibility (ken together . First observation: The tone of the epilogue is seen to be ironic even from the introductory line. the impression is given that the hitherto balanced encounter ends in an Argive victory. however. who goes among the Achaeans. as if reconciled. then. their bodies face down in the dust. However. Suffice that he were himself there present. and lead him away from the spears and arrows. who cruelly kills Diores. under these conditions. the one beside the other. by the intervention of Athena. Demokoön. From then on. The result is that the opposing armies once again become balanced and. protected by the goddess Athena. the clash becomes equally weighted. this temporary imbalance is immediately removed. the slaying of Patroclus by Hector and the slaying of Hector by Achilles. something hypothetical. is the fact that the poet. with its subjects and adverbial qualifications. in my view. the unrealizable outcome is. Maronitis with successive optatives). hears the torrents pouring into the mountain glens and wonders at their pounding (ll. who. however. the optatives give way to the final tevtanto. the report on the battle is carried out at firsthand. at the end. a balancing that leads. albeit on a different scale. the hypothetical observer of its epilogue implies the listener-reader of the narration in question.28 This is confirmed by the narrative fact with which the Iliad ends its own cycle of war: two equal killings divided respectively between the two camps. For the long companionate homilia between Achilles and Priam. that of the shepherd and that of the inserted observer. hear the battle from a distance. through their reciprocal and common deaths. foreshadows the outcome of the Iliadic war.27 Moreover. to the reconciliation of the opponents. too. somewhat moderated by the unexpected help of Athena who provides conditions of supernatural safety for the hypothetical observer. also symbolically. also allows the possibility for this balancing of the killing to be seen symbolically.190 D. reflected in what he himself sees through his own eyes. it is a kind of narrative conspiracy between the rhapsode and the listener.N. 452-456). the same conclusion: the opposing forces are indistinguishable. What we have is a scale. Suddenly. Consequently. namely. This final stage directing of the battle furthers. Both images. set up in such a way that at first we. I have already twice alluded to the fact that this equating of the opponents. however. through the events of Book XXIV. through the hypothetical observer. however. Perhaps more important. conditions that only a god can guarantee. present. an outcome most probably unrealizable. takes place on a heroic level in such a way that the two conversing companions (the one old. who both surreptitiously participate in the final revelation of the battle. instigated by the gods. the goddess Athena corresponds to the poet himself. the simile of the shepherd. the other young. their corpses converge on the battlefield and are ultimately equated. Second observation: On the assumption that this is a narrated battle. both torn by grief ) are transformed from mortal enemies into friends when they become aware of . far off in the hills. with the protective role that she adopts. the distance is eliminated and the previous hearing now becomes viewing. reveals the real outcome of the battle. which. Third observation: In the epilogue to the epic’s first and model battle. 528. my proposal for distinct terms. and P. 2. The Iliadic war is divided into collective and anonymous clashes or individual and named ones. 128. Hall. 54-67 I de Jong (Narrators and Focalizers. “Les barbares dans la pensée de la Gréce classique. 94-106. Nagy. Th. 12) attributes the ancient commend concerning the poet’s pro-Greek bias to characteristic signs of this involvement in the narration of the Iliad. following its maltreatment. On the meaning of the word klevoV. NOTES *All English translations of theHomeric and other ancient texts are based on their modern Greek translations by the author. J. II. 47 ff. Olson. Steinkopf. F. Latacz. yilevllhn oJ poihth√V”. p. Kampfdarstellung und Kampfwirklichkeit in der . A. 139 ff.” 405-419.867 and 530. and by H. The disconnection between novstoV and novstoV in the Iliad and their connection in the Odyssey have been pointed out by G. in part at least.” 31-82.” 1-23. Kakridis. II 2. 1-23. Erbase. “Das Bild der fremden Welt bei den frühen Griechen.437-438. 3-47. this distinction is alluded to in many of the relevant studies. 4-16.” 87-115. gajr yilevllhn oJ poihthvV (H. Untersuchungen zur Gesch ichte des Ruhmes beiden Gliechen. As far as I know with regard to terminology. 3. and on its application in the Iliad and the Odyssey. S. “Invention due barbare et inventaire du monde. his honorable burial is secured in keeping with the previous return and burial of Patroclus. the ancient comment ajei. Talking Trojan. see J. but without being consolidated by the corresponding terms. in Homer Revisited. Cobet. Blood and Iron. From the rest of what is a large bibliography on the subject. cf Hesiod. “ jAei.” 283-292. ad 10. 3. Se my article “Qeodikiva kai. D.14). which contains the articles by H.802-803. 4. 5. F. 7. 5. Cf. Thus. Without doubt. T.The Iliadic War 191 their common loss as a result of the Iliadic war: the father’s loss of his beloved son and the friend’s loss of his beloved friend. 71-03. See also E. de Romilly. vol. Inventing the Barbarian. Mackie. ajnqrwpodikiva otojn +Hrovdoto. Scholia Graeca in Homeri Iliadem. J. 4. 6. Edwards..” 69-78. and this is the important point. 35-41. Kampfparänese. The Best of Achaeans. Hartog. while at the same time. Odysseus Polutropos. the Iliad ends with a funeral homecoming. Schwabl. 14ff. 6-10. As I attempt to show in another study in this volume. it reveals the reconciliatory conclusion to the Iliadic war. see G. The poet’s supposedly biased attitude in favor of the Greeks is disputed by I. this is the first time that a distinction has been made between the Iliadic war (and by extension of the Iliadic myth) and the Trojan war and the Trojan myth. 2. which imposes a twelve-day postponement of the Trojan war. A Dihle. reference may be made to the volume Grecs et Barbares. H. 1. the return of Hector’s dead body to Troy is accomplished and. Die Griechen und die Fremden. Works and Days. “Die Hellenen-Barbaren-Antithese im Zeitalter der Perserkriege. Achilles in the Odysssey. “Europa und Asien-Griechen und Barbaren-Osten und Westen. Diller. Pucci. I hope that the present study justifies. however. poluvdakruV. As a rule. Particularly impressive is the great number of adjectives (more than forty) found in the Homeric language (no doubt the long pre-Homeric tradition has contributed to this). dhvioV. either in one word or in a phrase. oujtavVw. the most personal. continues to give the fighting in the Iliad a negative value. which accompany the fighting in the Iliad as adjectival qualifiers or predicates. 8. cf. and yqishvnwr must. More specifically. / quarrelling. There are various categories of words which signal fighting in the Iliad: nouns ~. the aristeia also involves the “theomachy. same is true of the qei which are used to characterize Ares. a third distinction. of course. while the rest of the warriors form a theatrical circle around them. 9. mavch. Der Zweikampf des Paris und Menelaos. omoiviV. ptolivporqoV. some which. ajrgalevoV. 76-77. however. ajlivaotoV. pivptw.). / to me you are the most hateful of all gods on Olympus. leugalevoV.” where two outstanding heroes clash. ajlloprovsalloV. a[prhktoV.). The crucial question is whether the Iliad divides these three categories of adjectives equally or unequally. A more extended form of the battle in the Iliad. ajndroktasivh. There is still. see B. and the verb of killing and. the adjectives positively qualifying the fighting in the Iliad are few. These adjectives qualifying the fighting in the Iliad can be distinguished in many ways and using interchangeable criteria: for example. sometimes taking up an entire book is the “duel. qrasuvV. whereas the negative adjectives are greater in number by far. evaluative. ajntivbioV.). given that their content is more descriptive and less.N. dushchvV. heroic. assign a neutral value to the fighting in the Iliad. dushleghvV. usually to the point of excess or hybris. uJsmivnh. Of greater weight. Zeus’ invective against Ares (5. 13-89.192 D..” or intervention of the gods in the battle and the fight either between themselves or with the valiant hero. kraterovV. as a rule. ojizurovV. !ArhV) and verbs ($polemw mavcomai. Bergold. etc.889-891): Do not sit beside me murmuring. While the adjectives aiJmatoveiV. Formale Konventionen der homerischen Epik. Strasburger. a third category of adjectives. and extensive form of battle in the Iliad is the “aristeia. . Finally. Typical Battle Scenes in the Iliad. could be characterized as being neutral. in terms of their metrical value and their appropriateness for the dactylic hexameter. given that it extols the glory and renown of the warriors (the ~oV ajgwvn. kakovV. etc. Krischer. bei Kallinos und Tyrtaios. are inflated with the father’s name and the birthplace of the victim and with some characterization of his virtues. stugerovV. kteivnw. in terms of their linguistic age (some of these are clearly archaic. miaiyovnoV. which reveal the quality of the fighting. ajgwvn. The smaller typical form of the personal and named clashes are the “catalogues of slayings” (see G. The adjectives qou ~ roV. are the adjectives. however.” in which the valiant deeds of some renowned hero are extolled. be included in the list of negative values. capricious wretch. bavllw. The answer is the latter: comparatively speaking. there are some which attribute to war a positive value. from this point of view. others perhaps belong to the age of Homer). diwvkw etc. yeuvgw. Fenik. the adjective kudiavneira as a qualifier for the noun “battle” constitutes an example of a positive value. wars and battles are ever dear to you. esp. yuvlopiV. 118-139.” From the composition of the slaying episodes comes the form of the Iliadic battle (an example being the first and model battle in Book IV. poluavikoV. a[llhktoV. Die kleinen kampfer der Ilias. Maronitis Ilias. 15 ff. of particular importance: amongst the list of these war-qualifying adjectives. see T. which contain the names of the victim or victor. ojloovV. ojkruoveiV. or not at all. and N. (povlemoV. The combination of the catalogues of slayings with the development of one or more of their component parts constitutes the “slaying episode. II 422544). its outcome. which describes the clash between Zeus and the giants. 22. 5 ff.446-447). e[gcea or douvrata (II. and primarily. The exceptional and model character of the first battle in the Iliad has already been noted by G. 465. in the belly (II. The Mortal Hero. 19. Weil. Apart from the gods. 422-428. Die kleinen Kämpfer der Ilias. in the groin (I. with whose views I tend to agree. 518). 471). . 530). 1. Cf. A characteristic example is the presence and function of the prefix sun—in the accumulation of verbs in the collective clash (xuniovnteV i{konto / su. bevlh (II. p. In the head (II 460. The similes may be divided into those which are extensive (II. which is also reflected in the simile (wJV d j o{te su. 502). and. 17. Struktur und Dynamik. see G. in the ribs (1. Morrison. 462. the anonymous warriors also return in the three rounds of individual slayings: II. Ungeschehenes Geschehen. V. 16. the Teichoskopia). Nesselrath. 43-47. in the chest (I.” 125-151. Struktur und Dynamik in den Kampfszenen der Ilias. and Peiros). and only here. 542). Kirk. On the antiwar character of the Iliad. J. and Athena on the side of the Achaeans. 35 ff. Demokoön. Die kleinen Kämpfer der Ilias. 461.g. Semoeisius. Niens. then Apollo on the side of the Trojans. Reichel. 1-16. mevne jajndrw ceivmarnoi potamoi. in my opinion. ad 4. active Terror. 4.).–G. Die Ilias und ihr Dichter. 422-428. II 687-710.452-453). see the study by S. 483-489) or concise (II. The Iliad: A Commentary. 501) xivyh (I. but also. S. there are three named dead heroes from the Greek camp (Elephenor. 433-436. In reality. 468). 483-489). The co-presence of the “abstract trio” refers to the exceptional character of the first collective battle and does not. 490.n d je[gcea kai. 518). “Retardationstechniken in der Ilias. “The Fighting in the Iliad. kat j o[resyi reovnteV / ejV misgkavgkeian sumbavlleton o[ubrimon u{dwr. and in the legs (I. 469. More generally. 479. the Duel between Alexander and Menelaus. On the technique of delay in the Iliad. Homeric Misdirection. Strife). 471) or individual (II. using as a sign of this technique the word “fast”—which means in general that these turning points and deviations might “almost” subvert the traditional myth or even cancel its continuation. 82-84.n rJ j e[balon rJinouvV. 20. by C. 4. and Ayres’ sister. Homeric Misdirection. The economy concerns not only the internal composition of the scene. 380. more recently. 12.. In addition to the introduction and the first part of the confrontation. who are divided between the two camps (first Athena on the side of the Achaeans and Ares on the side of the Trojans. and C. 538. and also cermavdia (I. 11. See also C. 433-436. 452-456. Struktur und Dynamik. See also J. The cosmic dimension of the battle recalls the explicit analogy in Hesiod’s Theogony.439-445).439. An exaggeration. Niens. 525. 498. Strasburger. 21. 4. and Diores) and four from the camp of the Trojans and their allies (Echepolus. Reinhardt. The Catalogue of Ships. and the criticism of this by S. 528). V. the participation of the three demons (passive Fear. Niens.515 ff. 505-506.. we have here.” 143.507 ff.The Iliadic War 193 10. 471-472. collective (II. 7. 4. see M. 13. 492). 14. vol. ~ n. 15. 452-456. see M. Strasburger. Schein. M. The interpolation of subversive episodes and scenes in the course of the Iliadic war and myth has been systematically studied by K. 480). 4. Willcock. The Iliad or the Poem of Force. Morrison. 107 ff. 462. 21. Leukus. admit any possibility of being a later addition. and H. 18. as is suggested by G. It should also be noted that incorporated into the intervals of each particular delay are themes and scenes from the Trojan war and myth (e. 467-470. the true marksman is death who in each case chooses his usually unsuspecting and unready victim. S. 457-472). 64 ff. Maronitis 23. noun ajpolauvei kalou qeavmatoV. In such cases. 397-399. for example.V oJ tou ~ poihtou ~ ajkroathvV o}V ouj tw ~n tou ~ polevmou kakw ~n toiou ~ ~ ~ ~ ~ metevcei. Homer does not. vol. Cf. The deadly missile often hits the mark. lines 459-462.. the warriors pass quickly from the role of the victor to that of the victim: Antilochus kills Echepolus. . and naturalistic. de Jong. it misses its mark. Friedrich. See also G. we talk of fate. I cannot agree with the view expressed by G. 46. who expresses doubts concerning the genuineness of the epilogue on the grounds that this is signaled by lines 536-538. Strasburger. 25. even more often. 28. 1.6–8) notes: ~ toV d j a]n ei[h qeath. the fact that the epilogue is required by the narrative is also noted by G. Leukus. and 518-526. Die kleinen Kämpfer der Ilias. realistic. who killed Simoeisius. In the slaying of the named heroes. This is the justice of war: the triumphant cry of victory is quickly transformed into the anguished cry of defeat. Odysseus kills Priam’s bastard son. however.539-544). 24.. 517-531). Kirk (The Iliad: A Commentary. ajlla.N. Strasburger. A somewhat different perspective is provided by I. Demokoön (II. Verwundung und Tod in der Ilias.194 D. In the end. Moreover. instead of Ajax. Die kleinen Kämpfer der Ilias. preferring silence in the face of this misaimed marksmanship which doubles the fright of battle. Elephenor tries to rob him of his armor and is immediately killed by Agenor (II. instead of Priam’s legitimate son. in his vengeful fury. 489-504).~ 27. 44-45. 26. -H. ad 4. Concerning the hypothetical observer in the epilogue. Pieros kills Diores. Eustathius (506. where there is a gradation of the style into severe. 58-60. Narrators and Focalizers. finding someone else: Antiphus kills Odysseus’ companion. In connection with the range and descriptive differentiation of the hero-slayings see W. but is himself killed by Thoas (II. tou twn polemikwn dihvvghsewn kata. models for modern-day Olympics. What is today known as Greece exists as Balkan Peninsula. Use of iron introduced. 195 . Prepared by Chalcondyles of Athens. yet Homer’s writings are not to be construed as an accounting of that occurrence. 3000 BC ca. Some historians believe Trojan War did occur. Achaean invasion. 1600 BC ca. 1400–200 BC ca. 1400 BC ca. First printed works of Homer appear in Florence. who taught Greek in Italy. Homer’s works recited at such Greek festivals. 750–650 BC 776 BC ca 600s BC 1488 Beginning of northern invasion of Greece. Unification of Minoan power in Crete. Homer born and lived in Eastern Greece or Asia Minor. Second destruction of Cretan palaces. Troy destroyed.1250–1200 BC ca. first occur. Development of Mycenaean trade in Egypt and Eastern Mediterranean. Homer composes Iliad and Odyssey. Great age of Mycenae. Greek linear script replaces hieroglyphs. 1400–1200 BC ca. Panathenaic games. composed of many small kingdoms. Written manuscripts of Homer’s work available. 2000–1700 BC ca. Successive waves of Dorian invaders. Destruction of Phaestos and Cnossos in Crete.Chronology ca. 2000 BC ca.1100 BC 8th century BC ca. . A Map of Misreading (1975). The American Religion (1992). Hamlet: Poem Unlimited (2003). Professor Bloom received the prestigious American Academy of Arts and Letters Gold Medal for Criticism. He is the author of 30 books. Where Shall Wisdom Be Found? (2004). Agon: Toward a Theory of Revisionism (1982). Genius: A Mosaic of One Hundred Exemplary Creative Minds (2002). the Alfonso Reyes Prize of Mexico. The Anxiety of Influence (1973) sets forth Professor Bloom’s provocative theory of the literary relationships between the great writers and their predecessors. and Omens of Millennium: The Gnosis of Angels. 197 . The Western Canon (1994). a 1998 National Book Award finalist. He has also received the International Prize of Catalonia. In 1999. The Visionary Company (1961). GRAHAM ZANKER has taught at the University of Canterbury. How to Read and Why (2000). and Jesus and Yahweh: The Names Divine (2005). Yeats (1970). and the Hans Christian Andersen Bicentennial Prize of Denmark. Dreams. His most recent books include Shakespeare: The Invention of the Human (1998).Contributors HAROLD BLOOM is Sterling Professor of the Humanities at Yale University. including Shelley’s Mythmaking (1959). and Resurrection (1996). Kabbalah and Criticism (1975). He also has done translating. He is the author of Modes of Viewing in Hellenistic Poetry and other titles. Blake’s Apocalypse (1963). the ancient lyric poets. D. He is the author of Master of the Game: Competition and Performance in Greek Poetry. . MARONITIS is professor emeritus of philosophy at the Aristotle University of Thessaloniki. He is the author of works on the Iliad. He is the editor of Greece and Rome and other texts and the coeditor of Reciprocity in Ancient Greece and other texts. and modern Greek poetry and prose. including Homer: Iliad XIII–XXIV. monographs. Federalist and Whig Political Theory. DONALD LATEINER teaches humanities and classics at Ohio Wesleyan University. He has written Archery at the Dark of the Moon: Poetic Problems in Homer’s Odyssey and other titles. One of his published titles is The Historical Method of Herodotus. UK. He has edited The Oxford English-Hebrew Dictionary and has also authored or edited titles with others. DEREK COLLINS teaches at the University of Michigan. He is the author of Puritan Tradition in Revolutionary. CHRISTOPHER GILL is a professor at the University of Exeter. including Diachronic Dialogues: Authority and Continuity in Homer and the Homeric Tradition. AHUVIA KAHANE teaches classics at Northwestern University and has worked on several books. He has written books. Greece. Hesiod. DEAN HAMMER is professor of classics and government at Franklin and Marshall College. and essays on Homer. he also has edited books. MALCOLM M. N.198 Contributors NORMAN AUSTIN has been professor of classics at the University of Arizona. Herodotus. London. He also has been a translator. WILLCOCK is emeritus professor in the Department of Greek and Latin at University College. Goals. Becker. Homer’s the Iliad. Brann. “Iliad 366–392: A Mirror Story.Y.” American Poetry Review 31. W.” American Journal of Philiology 111 (1990): 139–153. Oxford Readings in Homer’s Iliad. R. ed. Poetry in Speech: Orality and Homeric Discourse. Ithaca. and Sarah P. The Ages of Homer. New York: Oxford University Press.: Cornell University Press. Dalby. Andrew Sprague. The Poetics of Supplication: Homer’s Iliad and Odyssey. J. “Duelling with Gifts in the Iliad: As the Audience Saw It. Bloom. 1997.” Colby Quarterly 24 (1993): 155–172. 2002. N. Kevin. 2001. F. H. 6 (November–December 2002): 41–42.” Classical Philology 77 (1982): 292–326 Bakker. Homeric Moments: Clues to Delight in Reading the Odyssey and the Iliad. Ithaca. N. and Emotions in the Iliad. Oxford.” Classical Quarterly 45 (1995): 269–279. H. Cairns.: Cornell University Press. Philadelphia: Chelsea House. “The Shield of Achilles and the Poetics of Homeric Description. Carter. Crotty.Y. 1994. Dodds. Philadelphia: Paul Dry Books. eds. no. the Odyssey and Their Audience.Bibliography Adkins. “The Iliad. 1995. “Hephaestus’ World: The Shield. E. De Jong. Eva T. J. Austin: University of Texas. A. Andrew. E. Jane B. 199 .” Arethusa 18 (1985): 5–22. Morris. Douglas L. Harold. ———. “Values. 2005. I. . London: Duckworth. Joan V. Md. 1996. Cambridge. Mueller. Mark W. McGlew. Baltimore: Johns Hopkins University Press. New York: Cambridge University Press. Exeter: University of Exeter Press. 1996. Makie. Homer: Poet of the Iliad. MacCary. W. 1987. N. Cambridge. Homeric Questions. Homeric Variations on a Lament by Briseis. Albert Bates. G. Nagy. Martin. Sanctified Violence in Homeric Society: Oath-making Rituals and Narratives in the Iliad. Talking Trojan: Speech and Community in the Iliad. James. 2002.: Pennsylvania State University Press. J. Essential Homer: Selections from the Iliad and the Odyssey.Y. Ithaca. Logue. Md. Pa. New York: Cambridge University Press. Homer’s Traditional Art. A.” Classical Antiquity 8 (October 1989): 283–295. Kirk. Homer: The Poetry of the Past. Hilary. 1982. Austin: University of Texas. 1992.: Rowman & Littlefield. 2000. Singer of Tales.: Rowman & Littlefield. Thomas. P. Mass. Wolf-Hartmut. S. Graziosi. and trans. New York: Cambridge University Press. R. 2003. Irene J. Md. Norman. 2002. The Iliad: A Commentary. UK.: Cornell University Press. Leonard. Mitchell and G. O’Brien. Stanley. Amsterdam: Grüner. . Wounding and Death in the Iliad: Homeric Techniques of Description.: Cornell University Press. 1999. Friedrich. Narrators and Focalizers: The Presentation of the Story in the Iliad. Edwards. 1993. The Transformation of Hera: A Study of Ritual. F. Lord. 2004. 2005.Y. NY: Cornell University Press. Ithaca. Lombardo. University Park. Hero. N. Lanham. Cambridge. Ithaca.84–393. Childlike Achilles: Ontogeny and Phylogeny in the Iliad. 2001. Casey. Cambridge. Inventing Homer: The Early Reception of Epic. Savage. “Royal Power and the Achaean Assembly at Iliad 2. Homer’s Iliad: A Commentary on the Translation of Richmond Lattimore. 1989. 1996. edited by S. ed.: Rowman & Littlefield. 2000. The Language of Heroes: Speech and Performance in the Iliad. de. 2000. Indianapolis: Hackett. B. six volumes. Foley. Nagy. Lanham. and the Goddess in the Iliad. Kitts. 1985-93. Ford. Jong. New York: Noonday Press. Christopher. NY: Columbia University Press. Gregory. Postlethwaite. The Anger of Achilles: Menis in Greek Epic.200 Bibliography Dué. War Music: An Account of Books 1-4 and 16-19 of Homer’s Iliad. Margo. London: Harvard University Press. Oxford: Archaeopress. 2004. 1997. Tsagarakis. 1993. B. the Iliad. Bernard.Bibliography 201 Powell. Rabel. John. Leiden. 1995. War and the Iliad. Wilson.. 1995. Sense and Nonsense in Homer: A Consideration of the Inconsistencies and Incoherencies in the Texts of the Iliad and the Odyssey. Weil. New York: New York Review of Books. A New Companion to Homer. T. Cambridge. Ransom. and Heroic Identity in the Iliad. 1993. Princeton: Princeton University Press. Tsagalis. Berlin: De Gruyter. New York: Oxford University Press. Keith. Homer.Y. Christos.: Brill Academic Publishers. Epic Grief : Personal Laments in Homer’s Iliad. M. R. Amsterdam. Oliver. eds. . Revenge. Simone. Silk. “The Shield of Achilles and the Death of Hector. New York: Cambridge University Press.” Eranos 87 (1989): 81–90. N. New York: Cambridge University Press. and Rachel Bespaloff. Cambridge. and I. eds. Morris. Stanley. The Shield of Homer: Narrative Structure in the Iliad. UK. 2002 Wilson. Taplin. Nature and Background of Major Concepts of Divine Power in Homer. Shame and Necessity. 2000. 2004. Donna F. Berkeley: University of California Press. Homeric Soundings: The Shaping of the Iliad. B. S. 2005 Williams. . Reprinted by permission. “Hexameter Progression and the Homeric Hero’s Solitary State” by Ahuvia Kahane. Spoken Signs: Tradition. ©1994 by Cornell University Press. Performance. Tradition. ©1995 by the University of Michigan. Reprinted by permission. Reality. Reprinted by permission. Tragedy. ©1995 by the Norwegian Institute at Athens.Acknowledgments “Values in Tension” by Graham Zanker. “Achilles’ Swelling Heart” by Christopher Gill. From Helen of Troy and Her Shameless Phantom: 23–50. “The Importance of Iliad 8” by Malcolm M. and Philosophy: The Self in Dialogue: 190–204. edited by Øivind Andersen and Matthew Dickie: 113–121. From The Heart of Achilles: Characterization and Personal Ethics in the Iliad: 47–71. From Homer’s World: Fiction. Willcock. From Written Voices. ©1994 by the University of Michigan. Reprinted by permission. “Probe and Survey: Nonverbal Behaviors in Iliad 24” by Donald Lateiner. “The Helen of the Iliad” by Norman Austin. ©1996 by Christopher Gill. and the 203 . From Sardonic Smile: Nonverbal Behavior in Homeric Epic: 31–61. Reprinted by permission. From Personality in Greek Epic. From The Iliad as Politics: The Performance of Political Thought: 170–197. ©2002 by the University of Oklahoma Press. Reprinted by permission. edited by Egbert Bakker and Ahuvia Kahane: 110–137. N. “Possession. “Toward a Political Ethic” by Dean Hammer. Every effort has been made to contact the owners of copyrighted material and secure copyright permission. Articles appearing in this volume generally appear much as they did in their original publication—in some cases Greek text has been removed from the original article. ©1998 by Rowman & Littlefield. . Armor. Reprinted by permission. and the Death of Patroklos” by Derek Collins. ©2004 by Lexington Books.204 Acknowledgments Epic Text. ©1997 by the President and Fellows of Harvard College. Reprinted by permission. “The Iliadic War” by D. Those interested in locating the original source will find bibliographic information in the bibliography and acknowledgments sections of this volume. Maronitis. From Immortal Armor: The Concept of Alkê in Archaic Greek Poetry: 15–45. Reprinted by permission. translated by David Connolly: 11–28. From Homeric Megathemes: War–Homilia–Homecoming. 15–16 Aphrodite birth of. 119 fragmentation of sanctions and. 43–44 cruelty of. language and. 36 armor of. 48 irony and. 160–161. with father. 48 impersonation of.Index acceptance. 42 guilt and. 42 Helen and. 164–165 tragedy of. 149 psychological language and. 160–161 failure and. 160–161 fate and. 79. 20 Aias. heroism. 144–145. 13 affectation. 22–23 Helen and. 157–158. 114–118 anger. 163 promises and. 25–29 Aineias. 20–21. vengeance and. 69–71. 131–132. 12–13 distance and. 18–20 guilt and. 144–146 appeals approaches used in. 157–158 Adrestos. 98–103 Alkê. language and. 67 Achilles anger and. See also possession Ares and. 159–161. justice and. 45 Apollo. heroism and. 140–141. 36 . 95–99 as archetype. 115 esteem and. 171–172 relationship of. 173 archetypes. friendship and. 36–37 killing by. Helen and Achilles as. 138–139 Antiochus. 36. 143–145 possession and. nemesis and. 146 door of hut. 6 rituals and. 101–104. 4 transformation of. 116 Ajax body of Patroclus and. 140–141 aloneness. 141–143 Patroclus and. 24–29 affection. 161–162 glory and. 163–164. food sharing and. 23 Agamemnon bride competitions and. 83–84 205 falsity of. 145–147 Patroclus and. death of Patroclus and. 95–97 delivery and. 73 appreciation. 101–104 appeals to. honor and. 24 Agathos. heroism and. 149 suffering and. nobility and. 144–145. 141–143 possession of and death. 34 communal values connectedness and. 66 Book 8 composition of. 132–136. 67 bride competitions. Helen as. 95–99 ritualized and conventional gestures. 18–19 civil war. 168–170 corpses burial of. 65. spirituality and. 132. 77 augury. 168–169 rituals and. 26–28 Cholos. 66–74 tokens and dress.206 Index Ares alkê and. 138–139 Ariston. cultural. 12–15 burials. 140 awareness. rituals and. 161–162 pity and. 140–141. 57–59 importance of. 75–77 overview of. 101–104. See dead Cairns. 96–99. 146 death of Patroclus and. 132–133. 42–44 brutalization of feelings. D. 144–146 Hektor and. 123–124 possession and. See wars beauty. 34. 65. Helen and. 161–162 comedy. emotional displays and. 3–4 cognition. 188–189 battles. birth of Demaratos and. 141–142 possession of Patroclus by. 148 possession of Hektor by. 66. 73–74 commodity. 86 armor of Achilles. 75–77 blame. 168–170 promises and. 138–141 possession of Hippomedon by. 41 arm-grasping hands. 55–57 Book 24 grief in. description of battles and. 85–87 communication and. 72 Book 1. body language and. 21 captivity.L. 65. 5 betrayal. 188–189 connectedness fate and. 42–44 conflicts. 85–87 displays of emotion. 40 behavior body language. 47 Castor. elders and. 77–79 use of space and. conveyance of. 79–85 Bespaloff. 165 Automedon mounos and. 12 . 144–147 rage and. textual properties as. 109–110 astonishment. 59–63 four days of fighting and. Rachel. 79–80 authority. bride. fate and. treatment of.. 3–4 collision. 85–87 balance. 170–171 competitions. 75–76 restoration in. 45 body language awareness and. 87–89 reasonable. 139–140 artifacts. unequal outcomes of. See Twin Riders Charis. appeals and. 20–21. 38–39. 138–139 Chrysies. 162 promises and.. 15–18 of sanctions. 145–147 equality in. 164–167 possession and. rituals and. 188–191 fate and. 12–15 fighting. as rituals. 38–39. Achilles and. 157–158 as motivation. displays of. Ares and. 162–164 divinity. sharing of. 165 future. 159–160 ritual preparation of. 158–159 value systems and. 167 vulnerability and. heroism and. promises and. 181 equality description of battles and. 41 destiny. 77–78. 187 dress. 20–21 esteem Achilles and. 157–158. 38–39 cults. 158–162 ethics fragmentation of. 79–85 distinctions. 166–167 feelings. brutalization of. 147–149 transformation of Achilles and. 166–167 Diomedes. 136–137 Priam and. 60–61 Cult of Helen. 12–15. 160–161 Fairness description of battles and. 41 mother of. esteem and. 135–139 epics. 163 pity and. 110–111 funeral games. 68–71 Entheos. 181 distinctiveness. 77–79 elders. 39–40. 162–164 heroism and. use of. moral philosophy vs. 135 dead burial of. 15–18 motivation and. See wars food. 161 rituals and. 86 failure. 67–68 criticisms of Book 8. intersection and. wars and. description of battles and. blame and. 77–78. 161 Eris. heroic. 57. 158 deictic fluctuation. 159–160 ritual preparation of. 170–172 function. 45–46 emotion. 24–29 family. poem of. 168 refusal to fight and. 187 honor and. communication and. 2–3 fragmentation of loyalties. 160–161 distinctiveness of another and. 122 Demaratos birth of. 23 motivations for. 155–156 enemies. 67 force. 12 as objects. 116 distance. rhythm and. 19–21 friendship honor and. 170–172 . 75–77 empirical concepts.Index 207 as objects. 156–157 pity and. 161–162. 67–68 death alkê and. 18 fate. 12–15 of morals. significance of. possession and. 156–157 Nestor and. importance of. 161–162. 61–62. 155–156 eyes. 7–8 ideology. 15–18 possession of by Ares. Helen and. 66 Iliad 8 composition of. Jasper. 36. 114–124 rituals and. 59–63 four days of fighting and. 75–76 . 74 Diomedes and. 2–3 grace. 4 war mania of. use of. 33–35 shame and. presentation of people and. 138–140 ransom of. towards home. Achilles and. 75–76 confinement in past and. 36. association with. mankind vs. 66–74 glory. See also rhythm Hippokleides. 39–40. 12–13 shame and. 187–191 Iliad 1. Iliad as.208 Index gender. 43–44 duels and. Homeric competition for first place as. 187–188 dignity and. 40–41 as spectator. 138–139 Helen bride competitions and. 24–29 excesses and. 37–38. poetic economy and. 41. 42. 157–158 honor and. 172–173 Hebrew Bible. 181–182 honor affectation and fairness and. 41 heroic epics. 4–5 reason for fighting and. 86–87 Griffin. 47–49 as source of beauty. 156 vengeance vs. 43 Hippomedon. 6. 4–5 reason for fighting and. 77–78 shame and. 141–142 home. 23 restoration of. See also mourning in Book 24. 181 heroism description of battles and. 109–111. 156 Havelock.. nonverbal behavior and. 21–22 tragedy of. 168–169 passion and. 99 guilt justice and. 14 friendship and. 23–24 as motivation. 61–62. 116 esteem and. rituals and. 35 grief. 7–8 homogeneity. 8 gods. 2. 13 ideal. 55–57 Iliad 24 grief in. Eric. 66 hexameter. 7–9 Hektor fragmentation of ethics of. Helen and.. 132–134. 41–42 feelings of. 44–47 visions of. 42 goddesses. 57–59 importance of. 21–24. 131 gospels. 69 gestures. 36. death of Patroclus and. 41 reality of. 111–113. 13–14 Homeric ideal competition for first place as. 38–40 Herodotus. attitudes toward returning to. 24–29 rhythm and. 14 power and. 15–16 J Writer comparison with. 125–126 longing.S. 98–103 larynx effects. 28 times of peace and. goddess vs. friendship and. 155–156 motivation for friendship. 162 morals and. 66. 159–160 mythologem. rhythm and. 159–160 Mouvance. use of as simile. 111 mutilation. 120–124 mourning. 36–37 Yahwist. 5 isolation. agathos and. 41 epilogue and. 55 Kleisthenes. 162 loyalties. 12–13 metaphors description of battles and. 69 language Achilles and. 145. 156–157 pity and. 12–15. Tolstoy and. Achilles and. 189–190 Helen. rhythm and. 187 importance of. 95–97. 168–169 pity and. possession and. 8 Memnon. G. 142. 172–174 localization and. 146–148 Menalaos justice and. 168 refusal to fight and. 67 inequality. 114. 75–76. 161–162. 65. in outcomes of battles. death of. 147 localization. 23–24 kindness and. See rhythm morals fragmentation of. 163 . 43 Kleopatra. 158–159 value systems and. esteem and. See Alkê kindness Aias and. 125–126 poetic ideology and. See also grief confinement in past and. 173 meter. 187 psychological. 187. 113–114. shame and. 135–139 Kebriones. 166–167 intimate distance. 168–169 rituals and. 114–118 justice guilt and. 85–87 importance of. supplication and. 67–68. Achilles and. 5–7 as rival of author. fragmentation of. 115 body. 156 Mounos.Index 209 restoration in. description of battles and. 162 love. 188–189 intersection. 3 Kalchas. 145 killing. 79–81 irony birth of Demaratos and. 40–41 narration.. 27–28 Kirk. fate and. 12–15 mankind. language and. 190 Nemesis. 85 leopard.. 72. 19 Katokhos. 15–16 restoration of honor of. 20 Nestor. 113–114. 166 rituals of. 15–18 motivation and. treatment of. 26–27 of Odysseus. 134–136. 134 Oios. heroism and. human world and. 46–47 pity and. 87–89 ritualized and conventional gestures. 165 esteem and. See Twin Riders possession alkê and. role of. efforts of to convince Hektor to retreat. 163 possession of by Ares. 109–110 outsiders. 166 political ethics and. 137 philosophy. 15–16 objects. 170–172 Proxemics importance of. 40 peace justice in times of. 65. 109 nonverbal behavior body language. 80–81 persuasion approaches used in. 164–165 . justice and. shame and. 14 personal distance. 162 Poiesis. Helen and. 15–16 longing for. 48 Parry. 79–85 normality. 144–147 religion and. 143–145 esteem of Achilles and. solidarity and. 18–21 paralysis. 79–85 suffering and. 172–174 politics. 76–77 Paris. 148–149 Pausanias. 144–147 religion and. 60–61 rhythm and. 141–142 of Patroclus by Ares. rhythm as. 114–120 old men. treatment of. 167 Helen and. 27–28 Mounos and. 66–74 tokens and dress.K. future and. 148 entheos and.. 159–161 rituals and. T. 6 oral poetry repetition and. symbolic. 164–167 lack of. 24–29 nontextual elements. 136–139 of Hektor by Ares. 138–140 of Hippomedon by Ares. 75–77 overview of.210 Index nobility. 136 pleasure. 65. Milman. 122–123 Oesterreich. 117 past. 73 Petroklos. confinement in. 168 Plato. 160 mourning and. 69–71 promises. 133–134 Poulydamas. 41 Priam authority and. 77–79 Odysseus kindness of. 77–79 use of space and. 141 spirit possession and. divinity and. as entheos. 170 rituals and. 168 Pollux. 132–134. friendship and. 17 power. 140–141 death and. 168–169 Patroclus alkê and. 85–87 displays of emotion. rhythm and. 131–132 response of Achilles to death of. language and. 172–174 pity esteem and. See Patroclus Phaedra. use of. 95–97 delivery and. 63 hexameter rhythm and. 36. 136–137 repetition Book 8 and. 156–157 Nestor and. 147–149 death of Patroclus and. 98–99 distance and. 95–97 public distance. enemies and. 21–24. 77–78 reality continuity and. 136 solidarity. 167 vulnerability and. 111–113 rituals. 98 recklessness. 114–124 semantics of. 48 sharing of food. 57 semantics of rhythm. 17 relationships appeals and. 162–164 heroism and. silence. 75–76 salutation. 11–14 rage. 113–114 as nontextual element. 113–114 slavery. 79–82 esteem and. 138–139 death and.Index 211 psychological language. 66–72. Twin Riders and. 80–81 Socrates. 42. 25–26 Helen and. 20–21. 159 language and. 173 religion death of Patroclus and. 156–157. See also repetition. 138–139 ransom. reasons for. 80–81 quarrels. 113 rhythm and. 136–137 Priam and. 157–158 as motivation. 97. 88 of mourning. 125–126 sense of self Achilles and. 141 rituals and. rhythm and. 165 importance of. 34 social distance.. 168 . 125–126 function of. 96. 111. 113–114 reason. 57. Mounos. 41. 164–167 possession and. politics and. 47–48 restoration. 63 hexameter rhythm and. and epic hero and. 67 silence. 168–169 revenge confinement in past and. 13 rhythm extent of semantics in. 158–162 shame Aias and. 47–49 as motivation. 126–127 sanctions. 132–136. 131 funeral games as. 57. 68–71 sameness Book 8 and. 109 Oios. 131–133 possession and. 110–111 localization. supplication Ares and. of Hektor’s corpse. 67 sense of self and. 60–61. divinity and. fragmentation of. 101–104. 163 pity and. in Book 24. 97. 126–127 rescues. 168–169 honor vs. Hektor’s pursuit of glory as. 159–160 Paris and. appeals to. and reality and. 19–21 Schadewaldt. 111–113. 111. 60–61. Helen and. 157–158. 156 mutilation and. 160–161 distinctiveness of another and. shame and. 141 as reality. 4 reason for fighting and. 71 Tekmessa. 127 time. pursuit of. 85 vulnerability. See distance. 5 touch. 4 trial scene. honor and. cognition and. 83 tokens. 77–79 Tolstoy. 166–167 relationships and. Leo. 181–182 homogeneity of humans and. 15 trophies. 182–183 tragedy.. 164–165 collision and. normality and. 37–38 Yahwist comparison with. 142–143 Book 8 and. comparison with. 120–121 textual properties. sense of. importance of. 160 supplication appeals to authority and. Simone. 76–77 strife. 26–27 Telemakhos. 2–3 witnessing. distance and. 163–164.212 Index Sophokles. esteem and. 187–191 possession and. See language spirit. 109–110. 47–48 utility. 24–29 space. definition of. significance of. 181–182 poetic ideology of scenes in. 13 Twin Riders. Book 8 and. 5–7 as rival of author. reasons for. 11–14 voices. 158–162 wars alkê and. use of. mounos and. 2–3 spirit possession. 79–82 tragedy. 20–21 suffering Achilles and. 3–4 stillness. 68–71 sympathy. Helen and. 162 valuation. 165–166 distance and. 84 enemies and. 61–63 . 133–134 spirituality. 182–183 Weil. 57–60 collective battle in. 82. 3 Zeus. 156–157 vengeance confinement in past and. 13 violence. 160–161. 159. of wars. 7–8 rituals and. friendship and. 183–187 evaluative distinctions and. 168–169 honor vs. 68–71 tragedy of. Proxemics speech. tensions of heroism and nobility and.
https://www.scribd.com/document/136106502/79548852-Homer-Bloom-Harold-Ed-Iliad
CC-MAIN-2018-47
refinedweb
94,999
69.68
) Scaling out with Azure Web Apps Since the beginnings of this series, we have used the "scale up" option of Azure Web Apps. As we have seen on part 3, we are able to change the instance that we use on-the-fly, so we can scale up (or down) depending on our load and budget. This is also why we set up Azure Application Insights on part 4, in order to better understand our needs. Now, a better solution for scaling would be to "Scale out": instead of replacing our instance by a bigger one, we are going to add more instances. This allows for greater scalability (at some point you can't buy a bigger instance...), and is much more cost-efficient as we will only run the number of instances we need, automatically. For this, Azure proposes a "Scale out" option which is just under the "Scale up" option, and where you will set up rules to scale out. For example, here we have defined a rule: when 70% of the CPU is used for more than 10 minutes, then we'll automatically launch new instances, with a maximum of 20 instances: This setup will allow our application to scale up (and down) automatically, depending on our workload. But this is only one part of the problem. The database is the problem Scaling out is awesome, but most of the time performance issues come from the data store. As we have worked on this issue for decades, this is the reason why the JHipster team focuses so much on using a cache, as it's the best way to eliminate this data store issue. Let's see what our options are in terms of data store performance: - We can buy a more expensive instance for our data store: of course this will work, at least for some time, like the "scale up" mechanism we studied with Azure Web App. The main issue here is that we wanted to be budget-conscious, and a quick check on the prices of high-end database instances will make you look for other solutions. - We can use NoSQL databases, typicpally CosmosDB. CosmosDB is a distributed, very efficient database that can scale out automatically. This is a great option, but it will require to change our current database and to depend on Azure: this is not the topic of this series, but be sure we will do a specific CosmosDB post in the future, as it's a very exciting technology. - Use the Hibernate 2nd level cache: this is the caching mechanism included inside Hibernate, and it is extremely powerful when used correctly. This would be our recommended solution, however the issue here is that we are going to scale out (see previous section), and that requires us to have a distributed cache. - Use the Spring Cache abstraction: it is a very simple mechanism, yet very powerful, that allows you to cache method calls. This can be more powerful than the Hibernate 2nd level cache when used correctly, as it works at the business level, so it can cache more complex objects. As for Hibernate, this will require us to use a distributed caching solution. The last two options are clearly the best for our use-case, but they both require us to have a distributed caching solution, otherwise as soon as our Azure Web App instance scales out, we will see some invalid data. Caching options and issues In Java, we usually have 3 kind of caches: - Local-JVM caches: they are the fastest, as getting data is usually just using a pointer to that data, which is directly available in memory. But they take memory from the JVM heap: as your cache grows, the JVM's garbage collector will have more and more trouble to pass, resulting in poor application performance. - Off-heap caches: they run in another process, next to the JVM. So they do not use the network, yet they require data to be serialized/unserialized as it moves between two processes, which is quite costly. So this cache is way slower than the local-JVM cache, but it can grow to gigabytes of data without affecting the JVM. - Remote caches: they are like off-heap caches, but run on another server. This usually allows to have even bigger caches (as they are set up on specific high-memory instances), but will be slower as they require a network access. Several well-known solutions exist, and are typically supported by JHipster: - Ehcache, which unfortunately doesn't have an API to scale out (you can't add new nodes once the cluster is created). - Hazelcast and Infinispan, which can scale using an API, but which require a mechanism so new nodes register to the existing cluster. This is what JHipster provides with the JHipster Registry. Here, we are going to use Redis, which is a well-known in-memory data store that is often used as a cache. Compared to Hazelcast and Infinispan, it has some unique options: - It is only used as a "remote cache", so it can store more data, and it will not pollute your JVM, but it will be slower for very frequently-used data. - As a managed service, it will "scale out" automatically, removing the need for something like the JHipster Registry to have nodes register in the cluster. - It is fully Open Source, so you can use it to store huge amount of data without needing to pay for the "enterprise version". What is Azure Cache for Redis Azure Cache for Redis is a fully-managed Redis cache, hosted by Azure. It has a very inexpensive first tier, as you can get a cache for about $16 per month, and of course it can grow to a huge, distributed cache with geo-replication if you spend more money. You can find all pricing details here. For our current use-case, it's a very good choice as we tried to be budget-conscious, and as it can scale out without any trouble for us. If you want more information, here is the complete documentation on Azure Cache for Redis. Setting up an Azure Cache for Redis is easy using the Azure portal, just use the search box to create it (and be careful to select to correct instance, as prices can go up quickly!): Redis with the Hibernate 2nd level cache and the Spring Cache Abstraction Using Redis, there are several Java libraries available both to support Hibernate 2nd level cache and the Spring Cache abstraction: - Redisson supports both Hibernate 2nd level cache and the Spring Cache abstraction. If you want to unlock its best features, you will need to buy the "pro" version, but the Open Source edition is already enough for most needs. - Jedis is a very well-known Redis client, that only supports the Spring Cache abstraction. It is often seen as the "de facto" standard Redis client in Java. - Lettuce is the default library used in Spring Boot, and only supports Spring Cache. It is based on Netty and is thread-safe (unlike Jedis), so it can arguably support more connections and is more performant. For this post, we will use Lettuce as it is the default option with Spring Boot, and as it seems indeed to be the best fully open-source option. Configuring Spring Boot and Azure Cache for Redis First we added the spring-boot-starter-data-redis library to our pom.xml: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> Then we added a specific Spring Boot configuration class, so Redis only works in production mode. In development mode, everything will work the same without the cache, and that will make our development setup easier: package io.github.jdubois.bugtracker.config; import io.github.jhipster.config.JHipsterConstants; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; @Configuration @EnableCaching @Profile(JHipsterConstants.SPRING_PROFILE_PRODUCTION) public class CacheConfiguration { } And we configured Redis in our application-prod.yml Spring Boot configuration file: spring: cache: type: redis redis: ssl: true host: spring-on-azure.redis.cache.windows.net port: 6380 password: Y27iYghxMcY1qoRVyjQkZExS8RaHdln4QfLsqHRNsHE= Important note : many people use unsecured Redis instances, typically because their Redis library doesn't support SSL. The above Yaml configuration shows you how to do it correctly: please note that Azure Cache for Redis uses port 6300 for SSL, and also that its non-secured port is disabled by default (but there is no excuse to enable it now!). In order to test our code, we also added some cache in a REST method of the ProjectResource class: @GetMapping("/projects") @Cacheable("projects") public List<Project> getAllProjects() { log.error("REST request to get all Projects"); return projectRepository.findAll(); } This is only for testing, as you will quickly have cache invalidation issues with this code (you'll need to use the @CacheEvict annotation to have a working cache), but it will make it easy for you to test that your cache works well. Once this is done, you should be able to monitor your cache through the Azure portal: All changes done for this blog post are available on this commit. Discussion I am using Azure cache and I am able to connect with all provided detail here. But I am unable to find that How to connect Redis using proxy settings in you client-side?
https://practicaldev-herokuapp-com.global.ssl.fastly.net/azure/configuring-azure-redis-cache-to-boost-spring-boot-performance-7-7-52dl
CC-MAIN-2021-04
refinedweb
1,571
57.81
Docs/SysAdmin/Server/ApacheLogs From Mandriva Community Wiki I recently had a problem where some of the new buffer overflow over attacks aimed at WinIIS servers has a tendency to create such large single entries in my combined log (/var/logs/httpd/access.log) that webalizer and other log tools were choking on the size of the URI. I've also noticed that the ratio on this site since it is low usage of real hits to false hits is skewing the data on just how many visits I actually have. So I decided to look into what I had to do in order to make sure that I only "catalog" legitimate hits on my site. Whereas this doesn't stop the "attacks" there are other ways of doing that. It does stop the logging of them in a place that gives me false data. This was all done on a MDK 9.2 and MDK 10 and then again on 10.1 it works in both Apache 1.3.x and 2.x from my testing. Slowing down the "attacker" The first step uses Redirect Match. Taken from Jack Coates' Homepage at . The idea is to slow down the attacks by letting normal server timeout take over, holding the worm until released. The IP block 192.0.2.0/24 is an unroutable IP block reserved for use in documentation so we won't have to worry about it being actually on anyones lan. This is an edit to your httpd.conf file. [cut below] # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Format: Redirect old-URI new-URL RedirectMatch ^.*\.(exe|dll|ida).* [cut above] The comments are included in the clip above just so that you can find where I placed everything. The uncommented line is the one you really need. This is of course assuming that your site serves a single domain. If you have VHosts consult Jack's docs for more info. Keeping the worms out of the logs [cut below] #make sure we log legit requests SetEnvIf Request_Method "(GET)|(POST)|(PUT)|(DELETE)|(HEAD)" log # SEARCH is not a legit method in Apache and the objective of a current # worm. So I am going to send it to oblivion. It creates broken log # files if I don't SetEnvIf Request_Method "(SEARCH)" worm # RegEx's to trap a number of windows worms I know of. Send them to # the worm logfile and not the one I mine for data. SetEnvIf Request_URI "_vti_inf\.html$" worm !log SetEnvIf Request_URI "^/_mem_bin/" worm !log SetEnvIf Request_URI "^/_vti_bin/" worm !log SetEnvIf Request_URI "^/c/" worm !log SetEnvIf Request_URI "^/d/" worm !log SetEnvIf Request_URI ^/scripts/ worm !log SetEnvIfNoCase Request_URI "^/msadc/" worm !log #Code Red SetEnvIf Request_URI "default\.ida" worm !log SetEnvIfNoCase Request_URI "null\.ida" worm !log #NIMDA SetEnvIf Request_URI "cmd\.exe" worm !log SetEnvIf Request_URI "root\.exe" worm !log SetEnvIf Request_URI "Admin\.dll" worm !log # These are optional # This sets it so that requests for your images aren't logged. SetEnvIf Request_URI "(\.gif|\.jpe?g|\.png|\.css|\.js)$" !log # this makes it so that requests from my home lan aren't logged. SetEnvIf Remote_Addr "^192\.168\." !log # If I'm on the box testing I don't want that logged. SetEnvIf Remote_Addr "^127\.0\." !log # This is an example of how to not log XXX referrer. SetEnvIf referer "somedangsite\.com" !log # Now set where the logs are. I'm sending worms to /dev/null but # it could be any full path. CustomLog /var/log/httpd/access_log combined env=log CustomLog /dev/null combined env=worm [cut above] Edit the httpd config files so that this gets used Last step is to edit http.conf or httpd2.conf (depending on what you have) to include this file and to not have 2 sets of logging commands. That would cause you to not see the logging being removed as desired. Under Global Configuration (near the top of the file) add this line: Include conf/wormlog.conf Then look for this one, and then comment it out (otherwise both log directives will try to work, unsuccessfully, and it will appear as if nothing is happening): CustomLog logs/access_log combined env=!VLOG Test your setup Restart httpd and start testing. If your results match mine all of these windows worms will no longer be filling up your log files with a Ton of BS. Advantage here is that any use tracking you do will track more legitimate hits to your site and not all of the virus infected windows boxes looking for a place to take a dump. You can also send all of your "worm" logs to a seperate log file to be handled on their own instead of doing what I did and sending them to /dev/null.
http://wiki.mandriva.com/en/Docs/SysAdmin/Server/ApacheLogs
crawl-002
refinedweb
819
75.4
What the Heck is Node modules strict by default? Hey Brad I’m working on a Node.js project and my team is using ESLint to statically analyze our code. I noticed that we are using the strict rule to ensure that we are not putting the use strict pragma in our code files. I asked my team about it and they said that its because Node modules are strict by default now in Node v6 but I can’t find anything online confirming that. What the heck is Node modules strict by default or not? I ran into the same rule when working with Node and did a bit of surfing around the information super highway to try and figure it out. I ran into this in the ECMAScript 2015 Standard 10.2.1 Strict Mode Code An ECMAScript Script syntactic unit may be processed using either unrestricted or strict mode syntax and semantics. Code is interpreted as strict mode code in the following situations: -. ECMAScript code that is not strict mode code is called non-strict code. It states that ES modules are strict by default but I was unclear as to if they were talking about CommonJS or ECMAScript nor what module system was used in Node v6 and if it was strict by default. Rooting around I could not for the life of me find a straight answer to that question. There is lots of back and forth on forms but they all seemed to be about versions of Node before v4 and talked about using the --use-strict flag to force all code into strict mode or just saying that ESLint was wrong and you should set the rule to require a global use strict pragma in all your Node modules. What I ended up doing was what any good developer does, I experimented. I looked up what strict mode does and found that one of the things that it does is make the arguments variable a local copy within the function vs. a reference. Experiment Theory In non-strict mode the arguments variable which is accessible within any function and is an array like object containing all parameters passed into said function the parameters held within will be references to the same values stored in any named parameters in your function definition. My meaning is that if we define a function which takes one parameter called myArg I can reference it via myArg but also by arguments[0]. Therefore the act of changing the value of the parameter via the arguments reference will change the value referenced by the named parameter myArg. function test(myArg) { console.log(`${myArg} -- ${arguments[0]}`); arguments[0] = 20; console.log(`${myArg} -- ${arguments[0]}`); } test(10); If you execute the above in Node and we’re in non-strict mode it should print out: 10 -- 10 20 -- 20 If we were to run the code in strict mode however the arguments array like object will contain a local copy of the values; thus modifying the value via the arguments reference won’t effect the named parameter. 'use strict'; function test(myArg) { console.log(`${myArg} -- ${arguments[0]}`); arguments[0] = 20; console.log(`${myArg} -- ${arguments[0]}`); } test(10); If you execute the above in Node and thanks to the pragma we are running in strict mode it should print out: 10 -- 10 10 -- 20 Experiment module.exports = { func: function(arg) { console.log('Mod') console.log(`${arg} -- ${arguments[0]}`); arguments[0] = 20; console.log(`${arg} -- ${arguments[0]}`); } } 'use strict'; const mod = require('./myModule'); function local(arg) { console.log('Local'); console.log(`${arg} -- ${arguments[0]}`); arguments[0] = 20; console.log(`${arg} -- ${arguments[0]}`); } local(10); mod.func(10); To test if the Node module was being loaded in strict mode by default I ran this: $ node test.js What I ended seeing printed out in my terminal was: Local 10 -- 10 10 -- 20 Mod 10 -- 10 20 -- 20 Conclusion Noticing that under Mod the second line was changed to 20 meaning that when I changed arguments[0] to 20 I modified my function’s named parameter thus arguments is not a local copy and therefore my module is not in strict mode. Node Modules are NOT strict by default. I did re-run the experiment with --use-strict and saw that both test.js and myModule.js were then in strict mode but you might not want to use the flag as it might break older npm packages that your project is depending on which rely on non-strict mode behaviour. That of course is a concern that I’m sure is dated and soon might not be an issue any more. So what is with the standard saying modules are strict now? Well the standard is talking about the new native modules in ECMAScript, ES Modules. These modules are imported and exported using the import and export keywords. Node is not using ES Modules yet; Node uses modules based on CommonJS, which are not strict by default. Its worth noting that you might be using the new import/ export keywords today but its likely your using babel to transpile them back to Node Modules (i.e. require()) so they are not actually ES Modules thus also not strict by default. There you have it the answer to the question what the heck is Node modules strict by default. No, no they are not. At least not yet maybe one day Node will update to use ES modules but as of Node v6 and Node 8 Node modules are not strict by default. Until next time think imaginatively and design creatively
http://imaginativethinking.ca/what-the-heck-is-node-modules-strict-by-default/
CC-MAIN-2017-39
refinedweb
937
69.92
ASP.NET Core - Razor View Import In this chapter, we will discuss the Razor View Import. In addition to the ViewStart file, there is also a ViewImports file that the MVC framework will look for when rendering any view. Like the ViewStart file, we can drop ViewImports.cshtml into a folder, and the ViewImports file can influence all the views in the folder hierarchy This view is new for this version of MVC, in the previous versions of MVC, we could use an XML configuration file to configure certain aspects of the Razor view engine. Those XML files are gone now and we use code instead. The ViewImports file is a place where we can write code and place common directives to pull in namespaces that our views need. If there are namespaces that we commonly use in our views, we can have using directives appear once in our ViewImports file instead of having using directives in every view or typing out the full namespace of a class. Example Let us take a simple example to see how to move our using directives into ViewImports. Inside the Index view, we have a using directive to bring in the namespace FirstAppDemo.Controllers as shown in the following program. @using FirstAppDemo.Controllers @model HomePageViewModel @{ ViewBag.Title = "Home"; } <h1>Welcome!</h1> <table> @foreach (var employee in Model.Employees) { <tr> <td> @Html.ActionLink(employee.Id.ToString(), "Details", new { id = employee.Id }) </td> <td>@employee.Name</td> </tr> } </table> Using directives will allow the code that is generated from the Razor view to compile correctly. Without using directives, the C# compiler won't be able to find this Employee type. To see the employee type, let us remove the using directive from the Index.cshtml file. @model HomePageViewModel @{ ViewBag.Title = "Home"; } <h1>Welcome!</h1> <table> @foreach (var employee in Model.Employees) { <tr> <td> @Html.ActionLink(employee.Id.ToString(), "Details", new { id = employee.Id }) </td> <td>@employee.Name</td> </tr> } </table> Now, run the application. You will see one of the errors that states that the type or namespace HomePageViewModel could not be found.. In the middle pane, select the MVC View Imports Page. By default, the name is _ViewImports.cshtml. Just like ViewStart, we cannot use this file to render HTML, so let us click on the Add button. Now add the using directive in this into _ViewImports.cshtml file as shown below. @using FirstAppDemo.Controllers Now, all the views that appear in this folder or any subfolder will be able to use types from FirstAppDemo.Controllers without specifying that exact using statement. Let us run your application again and you can see that the view is working now.
https://www.tutorialspoint.com/asp.net_core/asp.net_core_razor_view_import.htm
CC-MAIN-2018-43
refinedweb
444
68.06
Application of k-nearest neighbor method to time series data ↑ The question is an extension of this question. I tried to graph the anomaly of x-axis acceleration using the k-nearest neighbor method for time series data (acceleration data). I was able to get a high degree of abnormality value firmly at the abnormal part. I have a question here ・ How much anomaly should be taken to determine anomaly? How to determine the threshold -What kind of code should be applied to evaluate how accurate the abnormality judgment is actually compared to the original data? Two questions remain. I would like somebody to teach. import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.neighbors import NearestNeighbors ''' Divide data into slice windows for each size ''' def main (): df = pd.read_csv ("20191121.csv") # Remove extra data from DataFrame df = df.drop (['name','x_rad/s','y_rad/s','z_rad/s'], axis = 1) df = df.set_index ('time') Visualize # x, y, z-axis acceleration df.plot (). legend (loc ='upper left') # 2480 x-axis accelerations from the front are used as training data, and the next 2479 are used as test data. # # df.iloc [2479] --->53845130 # df.iloc [2480] --->53845150 train_data = df.loc [: 53845130,'x_ags'] test_data = df.loc [53845150 :,'x_ags'] .reset_index (drop = True) # Window width width = 30 # k-nearest neighbor k nk = 1 # Create a set of vectors using window width train = embed (train_data, width) test = embed (test_data, width) Clustering with # k-nearest neighbor method neigh = NearestNeighbors (n_neighbors = nk) neigh.fit (train) #Calculate distance d = neigh.kneighbors (test) [0] # Distance normalization mx = np.max (d) d = d/mx #Training data plt.subplot (221) plt.plot (train_data, label ='Training') plt.xlabel ("Amplitude", fontsize = 12) plt.ylabel ("Sample", fontsize = 12) plt.grid () leg = plt.legend (loc = 1, fontsize = 15) leg.get_frame (). set_alpha (1) # Abnormality plt.subplot (222) plt.plot (d, label ='d') plt.xlabel ("Amplitude", fontsize = 12) plt.ylabel ("Sample", fontsize = 12) plt.grid () leg = plt.legend (loc = 1, fontsize = 15) leg.get_frame (). set_alpha (1) # Verification data plt.subplot (223) plt.plot (test_data, label ='Test') plt.xlabel ("Amplitude", fontsize = 12) plt.ylabel ("Sample", fontsize = 12) plt.grid () leg = plt.legend (loc = 1, fontsize = 15) leg.get_frame (). set_alpha (1) def embed (lst, dim): emb = np.empty ((0, dim), float) for i in range (lst.size --dim + 1): tmp = np.array (lst [i: i + dim]) [:: -1] .reshape ((1, -1)) emb = np.append (emb, tmp, axis = 0) return emb if __name__ =='__main__': may have misunderstood the k-nearest neighbor method. The k-nearest neighbor method with k = 1 is to "adopt the same correct answer as the training data of the closest distance", and the size of the distance does not matter in the judgment. Wikipedia-k-nearest neighbor method "The k-nearest neighbor method when k = 1 is called the nearest neighbor method, and the class of the training example closest to it is adopted." Note that k = 1 is not essential to the above story. Even if k>1, k training data are selected from the closest order regardless of the absolute distance, and the correct answer is predicted by the majority vote of the result. In the k-nearest neighbor method, after determining k, in the prediction,The size of the distance order is relevant, but the size of the absolute distance is irrelevant... On the contrary, if you feel from the domain knowledge that "it is correct that the judgment changes depending on the size of the absolute distance", it means that the k-nearest neighbor method is not suitable. Consider other techniques.
https://www.tutorialfor.com/questions-323562.htm
CC-MAIN-2021-25
refinedweb
592
61.73
For both CUDA 8.0 and CUDA 10.2, section E.1. of the CUDA Programing Guide states the maximum error of erfcinvf() (vs. the mathematical result rounded to single precision) as: However, in following up on some observations, I found that the maximum error of this function in CUDA 8.0 seems to be 4 ulp, not 2 ulp. Below I am showing a minimal standalone reproducer that shows the worst case I found; this is not the only case of larger than expected error. I don’t have CUDA 10.2 installed on my machine and would be much obliged if someone could run the reproducer with CUDA 10.2 to either confirm that the issue still exists currently, or that it has been fixed in the meantime. #include <stdio.h> #include <stdint.h> #include <string.h> __global__ void kernel (float a) { float res = erfcinvf (a); double ref = erfcinv ((double)a); float reff = (float)ref; printf ("arg= %23.16e %15.6a (%08x) \n" "res= %23.16e %15.6a (%08x) <<<<\n" "ref= %23.16e %22.14a \n" "reff=%23.16e %15.6a (%08x) <<<<\n", a, a, __float_as_int (a), res, res, __float_as_int (res), ref, ref, reff, ref, __float_as_int (reff)); } int main (void) { int iarg = 0x3757c618; float arg; memcpy (&arg, &iarg, sizeof arg); kernel<<<1,1>>>(arg); cudaDeviceSynchronize(); return EXIT_SUCCESS; } I built the above code with nvcc -o max_erfcinvf_error.exe -arch=sm_61 max_erfcinvf_error.cu The output of the program on my machine (CUDA 8, Quadro P2000) looks as follows: arg= 1.2861120922025293e-05 0x1.af8c30p-17 (3757c618) res= 3.0847203731536865e+00 0x1.8ad81ep+1 (40456c0f) <<<< ref= 3.0847213161387415e+00 0x1.8ad825e90b8430p+1 reff= 3.0847213268280029e+00 0x1.8ad826p+1 (40456c13) <<<< Note the final number in each of the marked lines. These are the single-precision results of erfcinvf() and the reference result correctly rounded to single precision, respectively. The difference (0x40456c13 - 0x40456c0f) is 4 ulps (the actual difference of erfcinvf() vs. the mathematical result here is 3.95517 ulp).
https://forums.developer.nvidia.com/t/larger-than-expected-documented-error-in-erfcinvf/111299
CC-MAIN-2020-40
refinedweb
328
68.87
from within Blender (2.49b), when I try to run a Python script containing the line: "from os import urandom" I get the error: "ImportError: cannot import name urandom" My setup: Ubuntu 12.04 LTS, 64-bit version Blender 2.49b (blender-2.49b-linux-glibc236-py26-x86_64) Python2.6.8 from within stand-alone python the same command ("from os import urandom") works fine, but not from within Blender's python. I've searched around for hours and have not found a solution. By the way, I am running the older Blender version because I am trying to use it with MBDyn and this requires the older Blender. Any suggestions would be greatly appreciated. cannot import name urandom Scripting in Blender with Python, and working on the API Moderators: jesterKing, stiv Post Reply 7 posts • Page 1 of 1 Thanks for the quick reply.Thanks for the quick reply.CoDEmanX wrote:are there two different python installations maybe? One with that module, and another without? There are several versions of python on my machine, yes, and they all have the os module since it is a built-in. I don't think that's the problem, though, because Blender is able to find the correct Python ("Compiled with PYthon version 2.6.2. Checking for installed Python... got it!"). Also, "import os" from within Blender works. if "import os" works, can't you do ? Code: Select all import os os.urandom(#) I'm sitting, waiting, wishing, building Blender in superstition... Nope, that doesn't work either. I get "AttributeError: 'module' object has no attribute 'urandom'Nope, that doesn't work either. I get "AttributeError: 'module' object has no attribute 'urandom'CoDEmanX wrote:if "import os" works, can't you do ?? Code: Select all import os os.urandom(#) Incidentally, if I run the following in Blender import os import inspect print inspect.getfile(os) I get /usr/lib/python2.6/os.pyc which is also what I get when running the same code from Python in a terminal (outside Blender). So it looks like they are calling the same os.pyc code, yet in one case it can find urandom and in the other it can't. Strange. It appears to be an OS-related problem, here's a possible fix: Maybe this helps to test if urandom exists: Maybe this helps to test if urandom exists: Code: Select all os_module = __import__("os") print(hasattr(os_module, "urandom")) I'm sitting, waiting, wishing, building Blender in superstition... Post Reply 7 posts • Page 1 of 1
https://www.blender.org/forum/viewtopic.php?p=104502
CC-MAIN-2021-04
refinedweb
424
75.2
The YR-901 that I bough some time ago is not working correctly, that is; it always in TX mode. I suspect some dust on the control circuit, the processing logic dead or some supply line issue. In any case if not able to fix, the idea is to place another RTTY decoder inside, keeping the same housing. * The solution: As for replacement decoder was thinking in an Arduino with video out instead of the standard LCD found in most schematics. While it's strait forward to create video out on the Arduino I suspect that RTTY decoding and at the same time doing video processing would cause timing issues for the small processor so the solution would be to create an "offload" video card to the decoding Arduino board. The data between the two would be shared by serial port, any character arriving via serial port would be transformed in "video". Easier to do than said :) and after some coding here it is: Another output with different font (4x6): ...it's not so "clean"/readable so I chose the initial 6x8 font. The schematic for the video out...two resistors!: The library (arduino-tvout) with some graphics possible from the examples: The connection schematic as on the lib example: And my own code for this application: -------- #include #include // #include "schematic.h" #include "TVOlogo.h"("- CT2GQV RTTY/CW - \n"); // TV.delay(4000); } // end setup void loop() { if (stringComplete) { inputString = ""; stringComplete = false; } } // end loop -------- It was basically some stitch and glue between a serialevent example and the "demopal" tvout lib example. That's it!... still need to "build" the RTTY decoder part. Have a nice weekend! 2 comments: hi nice projcet where to connect the input on arduino which out from the receiver on pin 2 of arduino or what ? Hello Jafal, The "conversion" part is This post is just the display portion, converts serial char to display, the serial char are received from the decoders, one for CW and the other for RTTY. Regards,
http://speakyssb.blogspot.com/2016/02/arduino-serial-videotv-out-graphics-card.html
CC-MAIN-2018-22
refinedweb
334
60.75
Sessions are a common way to keep simple browsing data attached to a user’s browser. This is generally used to store simple data that does not need to be persisted in a database. Sessions in TurboGears can be backed by the filesystem, memcache, the database, or by hashed cookie values. By default the filesystem is used, but in high traffic websites hashed cookies provide a great system for small bits of session data. If you are storing lots of data in the session, Memcache is recommended. If you just quickstarted a TurboGears 2 application, the session system is pre-configured and ready to be used. By default we are using the Beaker session system. This system is configured to use file system based storage. Each time a client connects, the session middleware (Beaker) will inspect the cookie using the cookie name we have defined in the configuration file. If the cookie is not found it will be set in the browser. On all subsequent visits, the middleware will find the cookie and make use of it. In the cookie beaker stores, a large random key was set at the first visit and was been associated behind the scenes to a file in the file system cache. In all but the cookie based backends, this key is then used to lookup and retrieve the session data from the proper datastore. OK, enough with theory! Let’s get to some real life (sort of) examples. Open up your root controller and add the following import at the top the file: from tg import session What you get is a Session instance that is always request-local, in other words, it’s the session for this particular user. The session can be manipulated in much the same way as a standard python dictionary. Here is how you search for a key in the session: if session.get('mysuperkey', None): # do something intelligent pass and here is how to set a key in the session: session['mysuperkey'] = 'some python data I need to store' session.save() You should note that you need to explicitly save the session in order for your keys to be stored in the session. You can delete all user session with the delete() method of the session object: session.delete() Even though it’s not customary to delete all user sessions on a production environment, you will typically do it for cleaning up after usability or functional tests.
http://www.turbogears.org/2.1/docs/main/Session.html
CC-MAIN-2016-40
refinedweb
409
70.02
24 October 2011 By clicking Submit, you accept the Adobe Terms of Use. Familiarity with HTML is required to make the most of this article. Intermediate As you are no doubt aware by now, one of the most popular and most talked about features of HTML5 is the ability to embed video content directly into your web pages without the need for a third-party plug-in such as Flash Player. This new ability for browsers to provide native video has made it easier for web developers to add video content to their websites without having to rely on the availability of external technology. With the limitations Apple has currently imposed on Flash technology for iPhones and iPads, the ability to deliver HTML5 video has become even more important. This tutorial introduces you to the video element, its attributes, and the different types of video that can be used with it. It is the first tutorial in a three-part series that covers the video element, the audio element, and custom controls for working with both elements. Note: You can explore some of the sample code and many of the concepts illustrated in this article by downloading and delving into the sample files. If you were to set up a simple MP4 video to be played on a website using Flash Player, you might use the following code: <object type="application/x-shockwave-flash" data="player.swf?videoUrl=myVideo.mp4&autoPlay=true" height="210" width="300"> <param name="movie" value="player.swf?videoUrl=myVideo.mp4&autoPlay=true"> </object> Using HTML5, you can use the following code: <video src="myVideo.mp4" controls autoplay</video> Of course this HTML5 example is extremely simplified, but the functionality is the same and you can see just how much easier it is. Video codecs are software that encode or decode video for a specific file format. Although the HTML5 specification initially mandated support for the Theora Ogg video codec, this requirement was dropped from the specification after it was challenged by Apple and Nokia. Sadly this means that different browsers support different codecs, which sounds like a bit of a pain and it is. Recently, however, the situation has improved so that you actually only need to provide your video content in two different formats: MP4/H.264 for Safari and Internet Explorer 9, and WebM for Firefox, Chrome, and Opera. Firefox also supports Theora Ogg, but it has supported WebM since version 4. There is, of course, a way to define more than one video file for your video content, but I’ll cover that a bit later. The video element, which you use to embed the video into your web page, can include several different attributes, some of which are outlined in Table 1. For example, if you want a video to play automatically and for the browser to provide the controls, you simply use: <video src="myVideo.mp4" autoplay controls></video> The examples used in the previous sections use only one video file in one format, MP4. So how do you go about also serving a WebM video file? This is where the source element comes in. A video element can contain any number of source elements, which let you specify different sources for the same video. The source element has three attributes, as shown in Table 2. To specify both an MP4 and WebM source for the same video, you could use the following code: <video autoplay controls> <source src="myVideo.mp4" type="video/mp4"> <source src="myVideo.webm" type="video/webm"> </video> When a browser attempts to play the video, it will check the list of sources until it finds one that it can play. So Firefox will skip the MP4 source as it is unable to play it, but it will happily play the WebM source file. Note that in the previous example I've removed the src attribute from the video element itself since the src attributes in the source element are being used instead. If you did specify the src attribute in the video element, it would override any src attributes in the source elements. If you wish, you can specify the exact codec that was used to encode the video file. This helps the browser decide whether it can play the video or not. It's generally a better idea to simply provide the type and let the browser decide for itself, as often you're not sure of what codec was actually used. Should you wish to include the codec, you can do so as follows: <video autoplay controls> <source src="myVideo.mp4" type='video/mp4; </video> Note how the codec is added to the type attribute, specifically the quotes used and the separation of the type and codec by a semicolon. When adding the codec to the type definition, it's relatively easy to misplace the quotes, which will make the video unplayable because the browser will be unable to parse the source element. So, if you decide to specify the codecs explicitly, be careful. Of course, you'll also need to provide a solution for those users who continue to use a browser that doesn't support HTML5, such as Internet Explorer 8 and below. Since browsers ignore what they don't understand, legacy browsers such as Internet Explorer 8 will ignore the video and source elements and simply act as if they don't exist. You can take advantage of this behavior to provide an alternative method of displaying your video, either via a simple download link, or a third-party plug-in such as Flash Player. Building on the earlier example, you might provide a link to the same video as follows: <video autoplay controls> <source src="myVideo.mp4" type="video/mp4"> <source src="myVideo.webm" type="video/webm"> <a href="myVideo.mp4">Download the video</a> </video> The legacy browser will only display the link to the video file download. Adding support for Flash Player is just as easy: <video autoplay controls> <source src="myVideo.mp4" type="video/mp4"> <source src="myVideo.webm" type="video/webm"> <object type="application/x-shockwave-flash" data="player.swf?videoUrl=myVideo.mp4&autoPlay=true"> <param name="movie" value="player.swf?videoUrl=mVideo.mp4&autoPlay=true"> </object> <a href="myVideo.mp4">Download the video</a> </video> With on this topic. The provision of subtitling for HTML5 video was initially part of the HTML5 specification. A file format called WebSRT was defined, and this format could be used to specify video subtitles using the popular SRT file format. Later renamed to WebVTT (Web Video Text Tracks), the subtitling specification was taken out of the HTML5 specification and given a specification of its own. A WebVTT file is a specially formatted text file with a .vtt file extension. The file itself must be UTF-8 encoded and labeled with the type/vtt MIME type. The file must begin with a WebVTT string at the top. Lines within the file are terminated by a carriage return ( \r), a new line ( \n), or a carriage return followed by a new line ( \r\n). The file consists of a number of cues, which are used to specify the text and timing location within the video file of the subtitle in question. The basic format is as follows: WEBVTT [unique-cue-identifier] [hh]mm:ss.msmsms --> [hh]mm:ss.msmsms [cue settings] Subtitle text 1 [Subtitle text 2] ... The unique-cue-identifer is optional. It is a simple string that helps identify the cue within the file. The cue timing is given in a straightforward format, with the hour portion optional. Each cue can also have a number of cue settings, which are used to align and position the text. These are described in more detail below. Next follows the actual text of the subtitle, on one or more lines. The individual cues for different time locations within the video file are set up in this way, with each cue block separated by a new line. Here is a short example: WEBVTT 1 00:00:10.500 --> 00:00:13.000 Elephant's Dream 2 00:00:15.000 --> 00:00:18.000 At the left we can see... You can use the cue settings to specify the location and alignment of the subtitle text that is overlaid on the video. There are five such settings, as shown in Table 3. For example, to position text at the end of the line, 10% from the top of the video frame, you would use the following cue settings: 2 00:00:15.000 --> 00:00:18.000 A:end L:10% At the left we can see... You can see how the WebVTT file can be built up in this way to add subtitles to an entire video. You may be wondering how you link your WebVTT file to your video. The answer is the track element. This element, which was also introduced in HTML5, lets you specify external text tracks for media elements such as video. Its attributes are shown in Table 4. For example, consider a WebVTT file named english-subtitles.vtt that you want to attach to the video example used above. You could do this using the following code: <video autoplay controls> <source src="myVideo.mp4" type="video/mp4"> <source src="myVideo.webm" type="video/webm"> <track src="english-subtitles.vtt" kind="subtitles" srclang="en" label="English subtitles"> </video> This ties the WebVTT file with English subtitles to your video. You can, of course, have multiple track elements within the video element. With the srclang attribute you can specify multiple WebVTT files that are in different languages to add subtitle support in multiple languages. (The default attribute can then be used to identify the track to use if the user's preferences to not indicate a more appropriate track.) Unfortunately, no browsers currently support WebVTT directly, but there are a number of JavaScript libraries available that enable you to use the WebVTT file format and provide subtitles for your videos, including: All of these solutions support video subtitles, and some offer additional features. Browsers are beginning to add support with both Safari and Firefox making advancements towards support, and Microsoft have recently posted a demo on WebVTT which shows how serious vendors are about supporting WebVTT in the near future. You have seen how easy it is to add HTML5 video to your web pages and provide a fallback method using Flash Player to serve video content to legacy browser users. As powerful as it is, HTML5 video is not currently advisable for those wishing to protect their video content, as it provides no DRM capability. You also saw, briefly, how you will be able to add subtitles to your videos in the future, and how you can do it now via JavaScript libraries. In Part 2 of this series, I cover the HTML5 audio element, and in Part 3 you'll learn more about custom controls for HTML5 multimedia elements. You can read more about HTML5 video and its capabilities in my upcoming book, HTML5 Multimedia: Develop and Design.
http://www.adobe.com/devnet/html5/articles/html5-multimedia-pt1.html
CC-MAIN-2013-48
refinedweb
1,852
62.27
I’m new to c++ and when I run pow(real, f); Xcode gives this error: "Call to ‘pow’ is ambiguous". I use "double pow(double real , double f)" format and don’t know what is the problem. I included cmath and math.h. Other answers to resolve this error did not help. Any comment is highly appreciated. Source: .. Category : ambiguous-call Given the code #include <boost/hana/transform.hpp> #include <range/v3/view/transform.hpp> #include <vector> using namespace boost::hana; using namespace ranges::views; int main(){ std::vector<int> v{}; auto constexpr one = [](auto const&){ return 1; }; auto w = v | transform(one); } the error is Reference to ‘transform’ is ambiguous. I know I’ve brought both transforms in scope via using directives, but .. I was reading about the "mixin" technique in C++ but there is something I don’t understand and seems to be a limitation in the language that prevents to do it generically because of ambiguities that the compiler (and the standard refuse to resolve, even if it can). The idea of mixin is to aggregate capabilities .. I cannot figure out why I am getting the error "reference to ‘distance’ is ambiguous". I have passed class object as an argument in friend function. #include <iostream> using namespace std; class distance { int meters = 0; public: distance() {} void displaydata() { cout << "Meters Value:" << meters; } //Prototype friend void addvalue(distance .. Recent Comments
https://windowsquestions.com/category/ambiguous-call/
CC-MAIN-2021-39
refinedweb
232
56.15
The blog assumes that you have access to a Google Cloud account and have created a project and a DataIntelligence 3.1 or higher instance. - Login to your Google Cloud Storage Account - Navigate to IAM – Service Accounts 3. For your project this shows the existing service accounts. If you do not have a service account. Create one. 4. Choose a service account with existing keys or create a key using 5. Download the key in Json format on your local machine. This can be done by clicking on ‘Add key’ Make a note of the project name Now invoke Connection Management from SAP DI Create a new connection of type Google Cloud Storage The project id should exactly match the project id from GCP Provide the key file downloaded in json format For more details refer help Test the Connection! You should also be able to browse this connection using the DataIntelligence Metadata Explorer and view the bucket contents. Connecting GCS using Python Using ML Scenario manager and notebooks you can connect to GCS using Python Notebook Upload the json key file to DataIntelligence. Here we uploaded it to /vrep/mlup Type in the following code from gcloud import storage from oauth2client.service_account import ServiceAccountCredentials import os import json from google.oauth2 import service_account project_id = 'sap-digitalman*****' bucket_name = 'ifn***' with open('/vrep/mlup/sap-digitalmanu*****.json') as json_file: credentials_dict = json.load(json_file) #credentials_dict = json.load('/vrep/mlup/sap-digitalmanu*****.json') credentials = ServiceAccountCredentials.from_json_keyfile_dict(credentials_dict) client = storage.Client(credentials=credentials, project='project_id') bucket = client.get_bucket(bucket_name) blobs = bucket.list_blobs() for blob in blobs: print(blob.name) you may have to install pip install –upgrade google-cloud-storage pip install –upgrade gcloud in case of missing modules The output should list the bucket contents. Great blog Asim! Tested it and it works. Thank you very much Asim for the great job Babacar One update from my side: I tried yesterday again to connect to GCS using the above Python code in a Jupiter Notebook, but it failed with the following error message: Deprecated GCS module As you can see in the error message the module oauth2client has been deprecated and can hence not be recognized as such. I instead imported the google.oauth2 library from which I used the module service_account and adapted slightly the code as below: Hope this helps in case you run in a similar issue. regards, Babacar Thank you Asim for authoring this blog. The details are clear & precise ... very helpful. Look forward to more blogs & your thoughts on this topic. Homiar
https://blogs.sap.com/2021/02/16/connecting-google-cloud-storage-with-sap-dataintelligence-python-step-by-step/
CC-MAIN-2021-25
refinedweb
424
57.77
Odom Axes not in line with base_link Hi, I am using Powerbot to be able to build a map using gmapping algorithm. To setup my robot, I am using the ROSARIA package to be able to have control on the motors, get pose estimates from odometry etc. This is an ROS wrapper for the ARIA library provided by ActivMedia mobilerobots. I am aware that I need some tf configuration in order to align the odometry frame with the base_link and to align the laser frame with base_link frame. I have followed the tutorials and I have understood the concept. I came across this tutorial and followed it to be able to create my transforms while using ROSARIA. However, in doing so, I have noticed that the odometry axes is not aligned with the base_link axes. The laser axes are aligned perfectly as can be seen in this screenshot. The odometry axes as the ones far off from the other two. I am aware that ROSARIA publishes its own tf as can be seen from rosgraph.png. The current transform tree according to my code is this. The code that I am using to build the transformations is the following: #include <ros/ros.h> #include <tf/transform_broadcaster.h> #include <nav_msgs/Odometry.h> void poseCallback(const nav_msgs::Odometry::ConstPtr& odomsg) { //TF odom=> base_link static tf::TransformBroadcaster odom_broadcaster; odom_broadcaster.sendTransform( tf::StampedTransform( tf::Transform(tf::Quaternion(odomsg->pose.pose.orientation.x, odomsg->pose.pose.orientation.y, odomsg->pose.pose.orientation.z, odomsg->pose.pose.orientation.w), tf::Vector3(odomsg->pose.pose.position.x/1000.0, odomsg->pose.pose.position.y/1000.0, odomsg->pose.pose.position.z/1000.0)), odomsg->header.stamp, "/odom", "/base_link")); ROS_DEBUG("odometry frame sent"); ROS_INFO("odometry frame sent: y=[%f]", odomsg->pose.pose.position.y/1000.0); } int main(int argc, char** argv){ ros::init(argc, argv, "pioneer_tf"); ros::NodeHandle n; ros::Rate r(100); tf::TransformBroadcaster broadcaster; //subscribe to pose info ros::Subscriber pose_sub = n.subscribe<nav_msgs::Odometry>("RosAria/pose", 100, poseCallback); while(n.ok()){ //base_link => laser broadcaster.sendTransform( tf::StampedTransform( tf::Transform(tf::Quaternion(0, 0, 0), tf::Vector3(/*0.034, 0.0, 0.250*/0.385, 0, 0.17)), ros::Time::now(), "/base_link", "/laser")); ros::spinOnce(); r.sleep(); } } Of course, the maps created using this setup are a mess. This happens after I move the robot with the joystick for a bit. Initially, on starting up ROSARIA and the transform node the axes are aligned. It is only after the robot moves that they lose their alignment. Can someone help me understand what is wrong with my transform tree and how can I fix this? Thanks! EDIT This is a typical example of what happens to my robot's odometry when I drive it around a little bit. Basically, it moved forwards, then turned around a desk and then moved forwards some more. I do not expect such bad odometry.
https://answers.ros.org/question/203074/odom-axes-not-in-line-with-base_link/
CC-MAIN-2021-04
refinedweb
484
50.33
rename - change the name or location of a file #include <stdio.h> int rename(const char *oldpath, const char *newpath); rename renames a file, moving it between directories if required. Any other hard links to the file (as created using link(2)) are unaffected.. On success, zero is returned. On error, -1 is returned, and errno is set appropriately. newpath did not allow search (execute) permission, or oldpath was a directory and did not allow write permission (needed to update the .. entry).. link(2), unlink(2), symlink(2), mv(1) 8 pages link to rename(2): lib/main.php:944: Notice: PageInfo: Cannot find action page
http://wiki.wlug.org.nz/rename(2)?action=PageInfo
CC-MAIN-2015-32
refinedweb
106
50.94
Perhaps I wasn't clear, but I don't believe I mentioned anything not functioning properly. I did say "All works fine". I don't have failing code, I simply suspect (hope) the current implentation isn't very good. The pseudo code listed was what I was epecting python to allow me to do, but due to the namespace implementation, it doesn't. I have to do what I considered as a work around, and that is by passing a db connection to pretty much everything to get seperate modules/functions to share a db connection. Maybe that's just the way things are done in python, modules and databases? I don't know, that's why I'm asking. Putting everything into one module works as expected too. But then it's not very good for code reusage, as importing that module brings me back to passing a db connection to everything. I was hoping that I had missunderstood a basic concept, and that there was a nice way of perform something along the lines of the pseudo code listed. On Wed, 11 Sep 2002 18:10:42 +0100, Mark McEahern wrote: > [new > > -
https://mail.python.org/pipermail/python-list/2002-September/124315.html
CC-MAIN-2017-04
refinedweb
194
71.65
3D printing is super fun. So is drawing. Want to translate a sketch into an articulated creature? Keep reading to find out how! Step 1: Software and Materials For this Instructable, I'll be using Autodesk's (free) 123D Design for the 3d modeling, though you can use the software of your choice. For converting a drawing into a format that 123D Design can use, I typically use Adobe Illustrator (not free) or Inkscape (free). You can use any software that will convert a drawing into an SVG file (Scalable Vector Graphics). A list of vector graphics editors can be found here: en.m.wikipedia.org/wiki/Comparison_of_vector_graphics_editors You'll obviously need access to a 3d printer and filament, as well as either wire, wire cutters, and pliers, or a hot tool (like a hot glue gun or soldering iron) to make pins from 3d printer filament. I used a Bukito printer and Prototype Supply PLA filament, which is my favorite. Step 2: Preparing Your Drawing for the 3D Modeling Software Assuming you've drawn your creature by hand, you'll want to scan it. You can use a regular scanner, a clear digital photograph, or a scanning app for your mobile device such as TinyScan. If you've done your drawing on a computer (especially if you've done it in a vector graphics editor), you're a step ahead of the game. Once you have it on the computer, import it into your vector software. You can use a pen tool to trace the lines, or rebuild it with shapes, OR, if you're using Illustrator like I did, you can use Live Trace, which can be quicker and easier. If you want to make your creature articulated (arms and legs that move), you'll need to separate them from the body. It will make your life easier if you simplify your vector sketch to single lines and get rid of any extras. You can also use Edit > Path > Simplify to give your sketch even fewer points. The more complicated the shape, the more the software is likely to get bogged down. Once you've got your vector drawing how you want it, export it as an SVG file (the arms/legs/tentacles can be saved in the same file) and pop over to 123D Design... Step 3: Importing to 123D Design In 123D Design, go to the menu and click Import SVG. It will give you the option to create a sketch or solid. You can do either, solid will start you off with a 3d shape that is an extrusion of your vector shape, sketch will make the shape which you can then extrude into a 3d shape. When you import the SVG, you may wind up with an extra sketch or filled bits that you don't want. Move what you do want to the side and delete the extra. You'll also want to check how big your monster is. It can come in pretty huge depending on how large your scan was. Resize and use 'd' to drop the resized shapes onto the grid. Now, more adjusting! Extrude and Push/Pull are your friends here. Use them to make the body shape the height you want. Imported, adjusted... on to editing for the limbs. Step 4: Articulated Limbs I've detailed some body joints in a previous Instructable, the hinge joint we're using here for the limbs allows them to move along just one plane, and is super simple. The articulated body parts will be separate shapes and need to be just a bit shorter than the body. You can move them next to the body shape to check the size. There should be at least 3 or 4mm above and below the arm/leg, so 6-8mm shorter. Experiment. Perhaps larger or smaller would serve your monster better. Create a cylinder a couple millimeters taller than your arm/legs. This will be the shape you use to cut out the opening where the moving parts will attach. The diameter of the cylinder should be about three times larger than the widest part of the end of your arm/leg/whatnot so that it has room to turn and can still be far enough from the edge. Move the arm so that the spot where you want the hole is aligned pretty close to the center of the new cylinder. You'll also want to make a thin cylinder to serve as the axle hole for your arm/leg/severed-head. The radius of this will vary based on what material you use for the axle. I like using wire or 1.75mm filament (I'll show you how to make easy pins from 3D printing filament in another step), and 1.3mm radius is a good size for that. The cylinder should be taller than the total size of your monster. It doesn't matter how much taller, just so that it goes all the way through. Centering the cylinder is easiest if you create it on top of the larger cylinder. Mousing around from above, you'll find that it wants to snap to the middle. Create the cylinder and then you can then drop it to the platform using the 'd' key. Mouse over the arm/leg/chainsaw and make sure that the cylinder is centralized on the end of the arm, with enough space on the arm to make it a hole in the arm, and not just take a bite out of the side. It can be tricky to check, unless you look at it from beneath the plate (or select all of those parts and hit spacebar to flip them beneath the plate. Spacebar again will bring them back). Adjust the location or size of the limb as needed. Group the arm, large cylinder, and small cylinder together, then shift the group to intersect with the body. The small cylinder should be far enough from the edge so that it can form a proper hole. Once it's in place, ungroup them. Finally, you'll need to align the parts vertically. The large cylinder goes midway up the side of the body, the limb goes midway up the side of the large cylinder. The tall cylinder still needs to go through everything. Step 5: Making Holes First is to cut the large cylinder shape out of the body. In the combine menu, choose subtract. First select the body (target), then the large cylinder (source), and hit return (or enter, or whatever your keyboard likes). It should give you a nice chunk out of the side of the body, centered so that there is still body above and below it. The arm and small cylinder should still be there. If the hole reaches the top or bottom of the body shape, undo and make sure the large cylinder is centered vertically. Next you'll want to make the holes for the hinge axle, which is what the thin, tall cylinder is for. There are two parts that we want to make holes in, so select the tall cylinder, copy and paste, then just hit return or click off of the shape. This makes a duplicate of the shape in the same place. Go to Combine > Subtract again, and select the body, then select the tall cylinder as Source. Hit return. It'll look like nothing happened, but that's because we made a duplicate of the tall cylinder. Repeat the process for the arm, and tada, you'll have holes that go straight through the body and arm. Repeat for all other limbs, then move all the limbs away from the body and drop them to the plate ('d'). Export the STL, and you'll be ready to print! If you'd like, you can play around some more with your shapes, perhaps add some Fillet or Beveling, add lightning hair, customize it some more. Step 6: Print! Print it! The steps from here will vary based on your printer and its software. Or you can send it off and have someone else print it. There are some pretty severe overhangs for this, so you're likely to need supports. Step 7: Attaching Your Arms/Legs/Claws There are many materials you can use to attach your monster's limbs to its body. My two favorite are wire (which you can curl and twist any which way, as I've done in the pictures), and filament pins. Filament pins are something I used and detailed in my last Instructable about Four-Bar Linkage Mechanisms for Artbots. Here's a link to the filament pin step and all its photos. Long story short: you use a hot glue gun to melt one end til it's bigger than the hole, slip it in, trim it down, and melt the other side. It works rather well, and it's probably my favorite method, as undisturbed filament is often stronger and smoother than printed. It's also quicker. Step 8: TADA! Play with your new monster, decorate it more, hang it around for decor. Perhaps make some hollow ones and put them on a string of lights for light-up monsters. Whatever you do, share pictures!
http://www.instructables.com/id/3D-Printed-Monster-from-2D-Drawing-in-123D-Design/
CC-MAIN-2017-26
refinedweb
1,546
80.21
RationalWiki:Saloon bar/Archive66 Contents - 1 The siren's call chaos - 2 Magical healing and me - 3 Proud to have reached a great milestone. - 4 Brian Blessed - 5 Pardon my moment of national pride, but... - 6 Irony.... or is it? - 7 Loneliness of the long distance tennis player - 8 McChrystal - 9 Pharyngulated! - 10 Godfail - 11 What's this madness then..... - 12 Missing cat - 13 So, I just found out... - 14 Is assfly still married? - 15 Australian PM doubletake - 16 Foundation -- One month warning - 17 RWW - 18 I know its on Fox but.... - 19 Another one for Earthland - 20 Cat steals feet - 21 What sort of ... - 22 Whooping cough an epidemic in California - 23 National (education) standards. - 24 Make me a sysop? - 25 Hover - 26 Atheism and the World Cup - 27 RationalWiki Boredom Project - 28 The power of prayer! - 29 Remember Wembley! - 30 US Health care - 31 It GAWZILLRAH!!! - 32 Xtianity founded science - 33 Cats & Ice Cream - 34 On MC's quiz - 35 - 36 NJ Recall site - 37 England jokes - 38 Oh, those wacky... - 39 Countdown to conserva-gasm in... - 40 Tornados and floods - 41 4th July - 42 Kagan Hearings - 43 I'm not going then. - 44 New Motto? - 45 Pharyngulated - 46 Copenhagen Declaration on Religion in Public Life - 47 OK, what'd I touch? - 48 Think you might be possessed by a demon? - 49 More article ratings - 50 ClueBot - 51 Call to ban homeopathy from NHS - 52 Dame Phyllis - 53 Good afternoon, Prime Minister - 54 Goldsmith's first advice to Blair declassified - 55 Spot the diff - 56 Homeopathy - 57 Automatically marking edits as patrolled... - 58 Tea Party Jesus - 59 Do we need/have a page like this? - 60 Obama and the US Constitution - 61 Oh yeah - 62 Not content to let the poms have all fun.... - 63 Jehovah's Witness Joke - 64 Male Hymen? - 65 Christmas here we come - 66 Tell Pal who you are - 67 Chillin' - 68 I would like - 69 It's alright, dear, it's only an advert. - 70 Chillin' - 71 I would like - 72 Williamsdon - 73 I wrote an essay - 74 Germany for champion - 75 w00ts 4 M3! - 76 Hacked - 77 Belgian Christians show remorse for paedo priests, NOT - 78 Ads by google - 79 Waddya think? - 80 Wikipedia down? - 81 Best name ever - 82 Vote now! - 83 Soccer Is a Socialist Sport - 84 Quack Miranda - 85 Gay Conversion - 86 Uruguay vs Ghana - 87 In other news... CW The siren's call chaos[edit] So the G20 meeting is in Toronto this weekend. G20 meetings usually equal complete chaos. Protest zone is around Queen's Park. I want to go watch...but tear gas and sound cannons do not differentiate protesters from the curious.....tmtoulouse 20:39, 23 June 2010 (UTC) - Carry a placard that says "Just Curious". Acei9 20:45, 23 June 2010 (UTC) - They spent over a billion dollars on security. The least you could do is go apeshit crazy. — Sincerely, Neveruse / Talk / Block 20:58, 23 June 2010 (UTC) - No, just stay at home. Then next time some bureaucrat will wonder why they spend a billion on unnecessary security, and then you can strike. Harmonic wisest Hoover! 21:43, 23 June 2010 (UTC) - What happens if you show up with riot armor, a gasmask, a video camera, and "Just Curious, Peaceful and Unarmed" sign? Would that keep you safe from the police? ÑR/Señor Admin/Hablar 21:47, 23 June 2010 (UTC) - Reminds me of late summer '08 when the RNC was here in Minneapolis/St. Paul, and my friends and I were at the protests the first three nights. The first two nights weren't so bad, but the third night is when the cops started attacking anyone on sight that didn't look Republican, regardless of what they were doing. Sure, you heard about them going after so-called "anarchists," but nobody outside of the local press covered the downtown St. Paul employees and businessmen that also got arrested, teargassed, and/or beaten just because they were trying to go to work. Lord Goonie Hooray! I'm helping! 01:27, 24 June 2010 (UTC) Magical healing and me[edit] As I am the manger of the PR/media department for the company I work for, when it comes down to promoting something within the industry I have the final say. Somehow the promoters of a lying scam artist health woo promoter got my details and would like me to help in promoting an event through my industry network. I take great pleasure is saying no. If I owned this company I'd say "no, because it's bullshit" but nonetheless I am satisfied with a simple "no". Acei9 21:02, 22 June 2010 (UTC) - Can you not say "no" but with a politely worded "because it's bullshit" response? Like "Thank you for your enquiry. Regrattably, we will be unable to take your request further, as there is insufficient scientific evidence for the activities you promote, and we are dedicated to ensuring we only partner with evidence-based methodologies and practices. We wish you all the best in your endevour". CrundyTalk nerdy to me 21:17, 22 June 2010 (UTC) - Heh, I suppose I could. Acei9 21:27, 22 June 2010 (UTC) - You could at least have pointed them in the direction of people in an ethically similar line of business who have a great deal of experience in email-based marketting. Much of their work is showcased over at. ConcernedResident omg ponies!!! 11:16, 23 June 2010 (UTC) - You should come up with some PR woo and sell it to the health woo people for a pile of cash. --Alienfromspace (talk) 18:52, 23 June 2010 (UTC) - Lean customer engagement value justification social media benchmarking personalized interconnected sincere voice user-directed market identity. Strategic promotainment visibility 'wow' - David Gerard (talk) 20:08, 24 June 2010 (UTC) Proud to have reached a great milestone.[edit] I have now achieved a share ratio of unity on my favourite pornography bit torrent tracker. DeltaStarSenior SysopSpeciationspeed! 07:30, 23 June 2010 (UTC) - So your pr0n collection now exceeds 100Gb? Umm, congrats, I guess. CrundyTalk nerdy to me 07:58, 23 June 2010 (UTC) - ummmmm, yeah. Nice one. Acei9 08:12, 23 June 2010 (UTC) - Yeah, umm, keep it up, I guess. - π 08:27, 23 June 2010 (UTC) - I think he has been SNORT SNORT CrundyTalk nerdy to me 08:28, 23 June 2010 (UTC) - Thanks for your kind words, chaps. On the snort snort, it does amuse me when pornog torrenters complain that people aren't seeding enough FNAR FNAR! DeltaStarSenior SysopSpeciationspeed! 08:53, 23 June 2010 (UTC) - Hehe, I forgot about Finbar Saunders (and his double entendres): - When demonstrating how easy it is to take off the camera lens he says "A few quick twists of the wrist and it comes off in a couple of seconds... Mind you I haven't had it off in ages, so it was very stiff this morning" - CrundyTalk nerdy to me 09:43, 23 June 2010 (UTC) - Um. Please tell me you are trying to make some sort of joke, otherwise this is really quite sad. Hmm, a DVD holds (for ease of math) 3 hours of movie and for ease of math, I'll say it that is 8GIB, and your 113 is also GIB, so, at least 13 hours of porn. If it is .avi, I have a 85 minute B-movie in AVI, it is 745.3MB, or ~8.76MB/min. 113*1024/8.76 = 13209min = ~220hrs of porn. Over 9 days of Porn. I am not against it, but why do you need so much porn? Tyrannis (talk) 13:29, 23 June 2010 (UTC) - Dude, streaming is the future, you don't need to download it. theist 14:22, 23 June 2010 (UTC) - Porn is disappointing by definition, that's why some of us keep downloading more and more of it. More often than not, I fast-forward through a 60min movie in about 5-10min, and never watch it again. I don't find 200 hours of porn surprising, probably I have downloaded a similar quantity in my life. Sad? It probably is, but there could be worse... and my ratio on that tracker is actually greater than yours. --Alienfromspace (talk) 20:03, 23 June 2010 (UTC) - Um. Ok... Tyrannis (talk) 13:02, 24 June 2010 (UTC) Brian Blessed[edit] For you UK-based Brian Blessed fans out there, the world's shoutiest actor is making a battle cry for the England team ahead of the game. Bondurant (talk) 12:32, 23 June 2010 (UTC) - I don't see anything from Brian Blessed there -- is it only accessible from the UK? - Wait, excuse me, that's not properly formated considering the subject. - I DON'T SEE ANYTHING FROM BRIAN BLESSED THERE -- IS IT ONLY ACCESSIBLE FROM THE UK? MDB (talk) 13:44, 23 June 2010 (UTC) - Here it is: But personally, I think this is a better battle cry: (It come in at 3:07)Ryantherebel (talk) 14:09, 23 June 2010 (UTC) - This YouYube comment sums it up best: "Who needs vuvuzelas when you have Brian Blessed?" - Just walked to the shops. Ever pub with t'telly on has bouncers & coppers on the door. Shops nice & man-free. 14:59, 23 June 2010 (UTC) - I have a letter from him agreeing to be my society's official "shoutsperson", like a "spokesperson" but louder. And the Have I Got News For You appearance is classic. theist 15:11, 23 June 2010 (UTC) I think that this is a better team talk. Lily Inspirate me. 16:52, 23 June 2010 (UTC) Pardon my moment of national pride, but...[edit] U!S!A! U!S!A! U!S!A! (I can't find a decent link yet, but the US beat Algeria.) MDB (talk) 16:05, 23 June 2010 (UTC) - I found a link. MDB (talk) 16:16, 23 June 2010 (UTC) - I'm an American, and I'm a little upset that the US is moving on. I am ready for soccer to fade back into obscurity. Bandwagon fans make me sick. Call me anti-American if you want, but I think it's anti-American to like soccer. Keegscee (talk) 17:06, 23 June 2010 (UTC) - I will readily admit to only being interested because the US is doing good. At least I'll honestly admit to being a fair weather fan. - As a complete aside, one of my most conservative friends is a soccer fan, and is rather dismayed by the American right's contempt for soccer. MDB (talk) 17:24, 23 June 2010 (UTC) - You should be aware that it's quite common for teams topping their groups to crash and burn in the knock-outs whereas the eventual winners often struggle at the same stage. Jus' sayin'. Ajkgordon (talk) 20:27, 23 June 2010 (UTC) - I woke up early just to watch the match and ened up waking up my roommate (and probably most of my apartment complex) celebrating when the US scored that last minute goal. I love football year round and I am always ashamed that Americans are too stupid and/or lazy to understand such an amazing sport. SirChuckBI have very poor judgement 21:17, 23 June 2010 (UTC) - I take offense to that statement. Conceptually, soccer is one of the easiest sports to understand. Sure, there are probably things going on that many of us don't see or appreciate, but it is nowhere near as complex as football, which most Americans love. We could get into a whole philosophical debate about why Americans don't like soccer as much as the rest of the world, but I can say for sure that it is not because we are stupid and lazy. (Don't get me wrong. We ARE stupid and lazy, but that is not the reason we don't like soccer). Keegscee (talk) 00:43, 24 June 2010 (UTC) - (@AKJ): Yes, but thankfully, the USA finishing in first means that they'll play Ghana instead of Germany in the next round. Who gets that honor, you may ask? England! Junggai (talk) 21:48, 23 June 2010 (UTC) - I was screaming at the telly yesterday afternoon at the England vs Slovenia game. My father text me after the match saying, "Relief! But 2nd to USA!" Then I had to go to work after an afternoon of drinking. SJ Debaser 11:05, 24 June 2010 (UTC) Irony.... or is it?[edit] Someone who knows these things better than me.... Would excessive photoshopping over an image of an American flag be considered a violation of the flag code? Either way, that picture is god awful. SirChuckBI brake for Schukky 16:15, 23 June 2010 (UTC) - I doubt simply displaying writing on a (somewhat stylized) image of the flag would count as a violation. If someone created an actual flag with that written on it, then yes, it would be a violation. - However, we all know that if the flag code was actually enforced, it would only be in cases where someone perceived an act or display as overt disrespect. That's why you'd never see, for instance, the prosecution a car dealer who flies a flag designed to be seen from a great distance, despite the fact the flag code prohibits using the flag for advertising purposes. MDB (talk) 16:23, 23 June 2010 (UTC) - Either way, it's quite a horrendous piece of art. theist 16:26, 23 June 2010 (UTC) - The comments are amusing e.g.: "... We have less theft, murder, and other crimes than other countries...." 16:28, 23 June 2010 (UTC) - It's like a U.S. flag had sex with an early 21st century MySpace page. The persecution thing sounds serious. I have enough hope for America to believe that one day Americans shall be free to fly the flag, express their appreciation for their country, and maybe even pray privately in schools. Fight for your freedoms my flag humping FaceBook brothers and sisters, and please do not breed, vote, or wear seatbelts! ConcernedResident omg ponies!!! 21:30, 23 June 2010 (UTC) - That picture is hideous. And it desperately needs to be Three-Wolf-Mooned. Radioactive afikomen Please ignore all my awful pre-2014 comments. 17:24, 24 June 2010 (UTC) Loneliness of the long distance tennis player[edit] As I watch Wimbledon, Mahut v. Isner stands at 2 sets each and 35-games each in the fifth. Evidently this is some sort of record, they've been playing for over 6½ hours. Lily Inspirate me. 17:04, 23 June 2010 (UTC) - Wait, what happened to a tie break? CrundyTalk nerdy to me 17:47, 23 June 2010 (UTC) - No tie breaks in the fifth set. It's now 41-41 and approaching 8 hours. Lily Inspirate me. 17:54, 23 June 2010 (UTC) - The worst part is that one of these players is meant to be playing tomorrow as well—ouch!-- Spirit of the Cherry Blossom 18:03, 23 June 2010 (UTC) - They suspended it due to darkness at 59-59. Incredible. Keegscee (talk) 21:06, 23 June 2010 (UTC) - That is amazing indeed. ħuman 00:46, 24 June 2010 (UTC) - Aaand they're off again. Currently 63-62, with serve. I sense energy drink and/or anti-perspirant endorsment deals for both players when (if?) the match finishes. Bondurant (talk) 15:11, 24 June 2010 (UTC) - Perhaps Viagra - How long can you keep it up for? Amazingly they have now been playing for as long as some TV series. We have sweepstake in the office for how many games it goes to, I've got 102-100. Lily Inspirate me. 15:41, 24 June 2010 (UTC) - Finally! 70-68. CrundyTalk nerdy to me 15:48, 24 June 2010 (UTC) McChrystal[edit] "I have accepted his resignation..." most definitely was the euphemism it often is. ħuman 18:56, 23 June 2010 (UTC) - " ... His older brother, retired Colonel Scott McChrystal, was an Army Chaplain, and is the endorsing agent for the Assemblies of God. ..." (WP) I know it's his bro - not him (& I've got a cousin who married a vicar) but ... 21:15, 23 June 2010 (UTC) - I've no idea about the details of this but it looks like another case of a professional treading on the politicians' toes and having to pay the price. Lily Inspirate me. 07:05, 24 June 2010 (UTC) - Same thing happened to McArthur. Acei9 07:10, 24 June 2010 (UTC) - No, it was some serious dumbfuckery on the general's part, inviting a Rolling Stone reporter to join him in Paris, getting plastered the first night together with everyone in his entourage, then spending the next couple of days badmouthing his civilian superiors in the White House (though not exactly saying anything directly about Obama). The reporter was actually stunned that they were so relaxed about it, and wondered what game was up. Then the ash cloud happened, and a two-day assignment turned into a month-long fly on the wall situation. Junggai (talk) 07:15, 24 June 2010 (UTC) Pharyngulated![edit] A poll asking if we are under god 21:20, 23 June 2010 (UTC) - Nonsense! Jesus is clearly a bottom. --Kels (talk) 21:22, 23 June 2010 (UTC) - Trinity implies versatility, Kels.-- -PalMD --Did that sound a little harsh? 21:30, 23 June 2010 (UTC) - By the time I tried the poll, it was 92% "take it out". --Gulik (talk) 22:01, 23 June 2010 (UTC) - "take it out?" That's what she said . . . Me!Sheesh!Mine! 22:35, 23 June 2010 (UTC) - It's up to 94%. ħuman 00:48, 24 June 2010 (UTC) - Hmm, why do they need a national pledge of allegiance in the first place? We get along without one on this side of the pond. Lily Inspirate me. 07:28, 24 June 2010 (UTC) - Though foreigners who want to become UK citizens do have to swear an oath of allegiance to the Queen. Obviously it's presumed that people who are born in the UK will automatically have unswerving loyalty to the crown, or something. alt (talk) 19:16, 24 June 2010 (UTC) Godfail[edit] Remember kids, always treat your lighting as if it is loaded Sen (talk) 02:35, 24 June 2010 (UTC) - "Solid Rock Church" ([the statue was made from] plastic foam and fibreglass over a steel frame.) LOL. Lily Inspirate me. 07:23, 24 June 2010 (UTC) What's this madness then.....[edit] Clicked on WND banner and, wow, this is madness. "Why Atheists in America Love Death!", "...atheists are working to trigger the collapse of law and order in America". A masterpiece. Acei9 07:26, 24 June 2010 (UTC) - Why is it from "Solutions From Science"? Lily Inspirate me. 08:57, 24 June 2010 (UTC) - On reflection (and linked to Pharyngulated section above) isn't demanding that someone publicly and continually pledges allegiance to the state and gOD a foundation stone of totalitarian society? Anyway, I've got extra tins of beans under the stairs, stocked up on pre-VAT rise Gordons gin and a gold sovereign on my mother's charm bracelet, just in case everything does go wrong. Lily Inspirate me. 09:20, 24 June 2010 (UTC) - They really tick all the boxes: Atheists, godless socialist minions, Hitler, Judgement Day, public education, evolution, godless science, new world order, police state, FEMA camps, etc. Also, for some reason, the old 17th stuff about standing armies. Where did that bit come from? Broccoli (talk) 10:57, 24 June 2010 (UTC) Missing cat[edit] Can you make me a poster? CrundyTalk nerdy to me 15:15, 24 June 2010 (UTC) - I was really hoping that you did have a cat, so I could give you a two hour blow job. How I would have laughed and experienced such joy. Marcus "Fellatio King" Cicero (talk) 15:42, 24 June 2010 (UTC) - I like David Thorne, his email exchanges always amuse me. Is he the same one that did the email exchange with his kid's teacher about the trip to a church for Easter saying religion is bullshit? SJ Debaser 15:45, 24 June 2010 (UTC) So, I just found out...[edit] ...that one of my former classmates has become a Mormon, another a Jew and third an Objectivist. What the hell is wrong with the world? Vulpius (talk) 16:51, 24 June 2010 (UTC) - A Jew, a Mormon, and an Objectivist walk into a bar... Radioactive afikomen Please ignore all my awful pre-2014 comments. 17:28, 24 June 2010 (UTC) - Ouch! Lily Inspirate me. 18:33, 24 June 2010 (UTC) Is assfly still married?[edit] Just wondering. Don't get any ideas. rationalI don't care 13:53, 23 June 2010 (UTC) - Strange question. I rather think you'd have read it all over if he wasn't. 13:59, 23 June 2010 (UTC) - Inappropriate subject matter in my opinion. Leave this poor woman out of it. She's never been part of CP, and in fact he's never so much as said a single thing about her. ÑR/Señor Admin/Hablar 14:28, 23 June 2010 (UTC) - Yes, inappropriate stuff to care about. However, we can snark it up by pretending that he is in an "it's complicated" with TK. theist 14:31, 23 June 2010 (UTC) - This is totally inappropriate, but I'm just going to throw my two cents in... lol — Sincerely, Neveruse / Talk / Block 15:00, 23 June 2010 (UTC) - You all really can stop assuming bad faith. I was wondering because he spends so much time on a damn website, i wonder how anyone could still be with him. but that was my thinking. rationalI don't care 18:50, 25 June 2010 (UTC) - After 25+ years of married life most women would be glad that their husband has got himself a hobby. Lily Inspirate me. 19:28, 25 June 2010 (UTC) Australian PM doubletake[edit] "Julia Gillard becomes the first female prime minister of Australia after wrestling the leadership of the governing Labor Party from incumbent Kevin Rudd". What? Puts glasses on - "...after wresting the leadership...". Ah, now that makes more sense, but you never can tell with Australian politics. Lily Inspirate me. 07:19, 24 June 2010 (UTC) Whole new spin on legislative violence. Might be fun to have candidates for top offices fight each other - pairs or groupwise. (Putin - anything except judo). 82.44.143.26 (talk) 15:46, 25 June 2010 (UTC) Foundation -- One month warning[edit] I will be moving ahead with establishing the RationalWiki Foundation in about a month. It will transfer ownership of everything to a non-profit lead by community elected trustees. The current proposed by-laws are at: RationalWiki:Proposed bylaws. Several issues that maybe worth discussing further: - The name which stands at "The RationalWiki Foundation" - The statement of purpose - The structure, terms, ect. of the trustees. If you have something to say now is the time to chime in! tmtoulouse 15:03, 24 June 2010 (UTC) - Looks good. ConcernedResident omg ponies!!! 15:52, 24 June 2010 (UTC) - I hope conservative gentlemen are enjoying themselves because the broadsides have been fired against authoritarianism and conservatism. The cannon balls are on their way! And of course, they might want to head inland as the scientific waves are forming on the internet. :) Acei9 07:09, 25 June 2010 (UTC) - OLE! OLE! OLE! The Foxhole Atheist (talk) 11:41, 25 June 2010 (UTC) RWW[edit] The domain name expires in 20 days, and RA is unwilling to continue to pay for it. I would like to know whether everyone else thinks it should be left to die, or whether it's worth keeping. Harmonic wisest Hoover! 17:27, 24 June 2010 (UTC) - It's only worth continuing as an active site if more than a half-dozen or so people want to regularly edit it & keep it up to date, which hasn't been the case for a long time. But there is some OK content (though very out of date) about some RW editors & some early site history. It would be a shame for all that to vanish completely, so maybe some of it should be copied over to some corner of RW. WėąṣėḷőįďMethinks it is a Weasel 17:53, 24 June 2010 (UTC) - Isn't it already hosted by Trent anyway? Lily Inspirate me. 18:31, 24 June 2010 (UTC) - hosting it is different than paying for the domain name... Quaru (talk) 18:32, 24 June 2010 (UTC) - I know that, but he has all the archives so it's not as if they will be lost if the domain registration expires. Lily Inspirate me. 22:21, 24 June 2010 (UTC) - Basically, without the domain name you can still access the site by fiddling with the HTTP headers manually, and the wiki would still exist as a semi-working entity, but you can't type " into a browser and arrive there. Harmonic wisest Hoover! 18:36, 24 June 2010 (UTC) - XML dump the site and import it into a wikia. tmtoulouse 19:31, 24 June 2010 (UTC) - - I say we kill it and then ban anyone who speaks of it. — Sincerely, Neveruse / Talk / Block 19:40, 24 June 2010 (UTC) - That's still better than the other way round. --Alienfromspace (talk) 19:46, 24 June 2010 (UTC) - Surely this is only like ten dollars or something? That's what GoDaddy charges, anyway... ħuman 21:19, 24 June 2010 (UTC) - On second thought, I think I'll buy it for Marcus to use. — Sincerely, Neveruse / Talk / Block 21:24, 24 June 2010 (UTC) - It always struck me as rather mean-spirited and poisonous; perfect for MC! --УФББДЯЇДИBend Sinister 21:41, 24 June 2010 (UTC) - To me the most important thing is, who has ultimate control of it. Is the server at Trent's house just like RationalWiki? If that is the case, I doubt it can be very independent. Could the content possibly be moved to user space or some other place in this wiki? ~ That blind moron (talk) 22:26, 24 June 2010 (UTC) Fuck it. If he gives me the log in information for it I will adopt it for historical preservation. tmtoulouse 22:29, 24 June 2010 (UTC) - How much is it, anyway? ħuman 22:48, 24 June 2010 (UTC) - Enough that I will demand a commemorative placard in my honor permanently installed on RWW recent changes. tmtoulouse 22:50, 24 June 2010 (UTC) - "TERNT WOZ HEAR"? ħuman 22:52, 24 June 2010 (UTC) - There are two options, and it depends on who wants to keep it going and for what purpose. 1) If people are willing to keep it up to date and make sure it can be used as a "what the fuck is happening right now because I've been away for a few days" type site with a lot of meta-content, then we should import it into the main wiki under a new namespace that is by default not shown on RC or used in random - it's hosted under this DNS, on the main wiki (so can take advantage of RW's fancy add-ons etc.) but is essentially invisible for everyday use, so is independent. 2) If people want to use it as a slagging and bitching board, they can get together and pay for it themselves. theist 06:01, 25 June 2010 (UTC) - My view on it: it provide an interesting outlet for meta issues, and is still fertile ground for producing some interesting effects in terms of community evolution. It is a small petri dish, but some stuff still grows that is interesting. I regret not taking a more active role in preserving the history of RW 1.0, and things that have played a role in shaping the site are interesting to keep around. If the site is going to die let it die do to inactivity, not something silly like domain registration. I have been "sponsoring" the site for a while by having it on your server, so I will go ahead and continue to sponsor it. I will still pretty much ignore it, with the one caveat that I have always had in place: if it become nothing but a hate site directed at people then it gets fish bowled and will have to find a new home. Last and least is that there is some benefit for having control over the domain name anyway. Rather have rationalwikiwiki be something we have control over than turned into a redirect to a gambling site, add server or who knows what. tmtoulouse 06:18, 25 June 2010 (UTC) - It's a funny playpen for Goonie and others. If it's just the sake of paying 10-30 dollars for a registration then I can take care of that. I'd suggest that the name be looked after by whoever's going to be watching the main RW domains, so perhaps we can use paypal to pass the money on to that person? ConcernedResident omg ponies!!! 12:54, 25 June 2010 (UTC) - Well that is me till death, delusion, or discharge. tmtoulouse 13:01, 25 June 2010 (UTC) - Let's do this quickly then before all of the above happen. You haf email. ConcernedResident omg ponies!!! 15:36, 25 June 2010 (UTC) - I guess it is decided then. I was going to say the content is welcome at Lumeniki, where it would be eeeuuum independently operated. Perhaps it best to just pay the man. ~ That blind moron (talk) 21:20, 25 June 2010 (UTC) I know its on Fox but....[edit] ....I still think this is shocking. Fancy using a 10 yr old boy to Grand Marshall a gay rights parade. It's actions like this that lower the esteem for gay rights in peoples eyes. Acei9 21:40, 24 June 2010 (UTC) - Picking a ten year-old does strike me as pretty short-sighted, but Christ those AFA guys really make my blood boil. They don't even pretend to "love the 'sinner'". --Yo-YoInvitation to a Beheading 21:45, 24 June 2010 (UTC) - Indeed the AFA are terrible people but imagine the out cry if it were a ten year old girl being thrust into the world of hetro sexuality. It aint right, no matter what. Acei9 21:52, 24 June 2010 (UTC) - It's a pretty bad idea whichever way you cut it. A combination of naiveté (I'd hope) and political opportunism. -- YossarianThe Man from the USSR 22:11, 24 June 2010 (UTC) - Hmmm that is interesting. I actually think that female homosexuality is "often" less risky than male homosexuality and therefore that seems sorta positive. I didn't think most fundies could distinguish between male and female homosexuality on the basis of something so insignificant as health. Is there someone else drawing this distinction? For those who "aren't promiscuous" male and female homosexuality are pretty much the same, but you never know if the child is going to be the promiscuous type, and I don't know to what degree homosexual behavior, is learned or pre-programed. I'm not saying the child at the rally was being influenced inappropriately (I didn't read the article), I'm only commenting on the distinction between male and female homosexuality. - I have guydyke tendencies, In case you were wondering. - ~ That moron (talk) 22:40, 24 June 2010 (UTC) - But but but.... Lesbians are all fat. SirChuckBBATHE THE WHALES!!!! 22:52, 24 June 2010 (UTC) - Mmmmm yes too much of a good thing is never enough for me. <high five?> I have a phat solution for that! I will devour the excess and put good things in their places. Deal? =) ~ That blind moron (talk) 01:48, 25 June 2010 (UTC) - (EC) What do you mean by "For those who "aren't promiscuous" male and female homosexuality are pretty much the same"? WėąṣėḷőįďMethinks it is a Weasel - I mean that everything that makes it physically risky for male homosexuals to have "unsafe" sex, makes it relatively less risky for female homosexuals to have "unsafe sex". If they only have "unsafe sex" with trustworthy, healthy people, or they only engage in mutual masturbation, the health risks would seem to be identical. (I have invented some devices which I call orifallicArmor that would make even "promiscuous sex" into safe sex.) ~ That blind moron (talk) 03:09, 25 June 2010 (UTC) - That's nice. But why are you equating "promiscuous sex" with unsafe sex? & What's it got to do with the kid? WėąṣėḷőįďMethinks it is a Weasel 17:48, 25 June 2010 (UTC) - I'm not completely equating "promiscuous sex" with unsafe sex. I do think having "sex" with people one doesn't know very well is less safe then not doing so. That is, unless using a very sturdy prophylactic with complete coverage, but the only example of this I know of (orifallicArmor) is an undeveloped invention of mine. - If the boy were influenced to have (more) sex with males, this could be a greater health risk than if he were not. That is, unless he never has unsafe sex, which may be uncommon. I'm not speaking of the present only, but of his future activities. - ~ That blind moron (talk) 20:36, 25 June 2010 (UTC) - No matter what the cause it is still putting a child into a complicated adult situation. Acei9 22:56, 24 June 2010 (UTC) - I agree with you completely Ace. Using a child as a political prop is wrong, no matter who does it. Whether it was Palin trotting out her kids like show horses to complete the nuclear family image or anti-war protestors who smear fake blood on their kids and have them march in front of the group. Kids need to be left out of things like this. SirChuckBCall the FBI 22:59, 24 June 2010 (UTC) - That is so gay. Quaru (talk) 23:12, 24 June 2010 (UTC) - I don't agree. It is all important, who is on the side of truth. Brainwashing children into false religions is bad, but allowing them to stand beside their heroes is commendable. I would be proud to have been this kid, I think... he will undoubtedly have to face pressure to associate himself with the typical subcultural biases/lies but through that he may learn to deal with such situations. Such is life. ~ That blind moron (talk) 03:32, 25 June 2010 (UTC) While I do agree with the comments above to some extent, I must say that the whole incident is not really that big of a deal the the people locally (I live in Fayetteville). The annual gay pride thing really is a low key affair here, and even the more conservative rednecks folks among us seem to support the kid for refusing to stand for the pledge or whatever. This whole thing is being blown out of porportion by certian "family advocate" groups elsewhere in the area. PACODOGwoof, bitches 23:25, 24 June 2010 (UTC) - Also, the kid is a gay rights activist, known for refusing to stand for the PoA last year in support of gay rights. ħuman 23:54, 24 June 2010 (UTC) - That's true, he's only ten, but from what I understand he actually has somewhat of a history of speaking out for gay rights. At first I assumed it was just typical pre-pubescent rebellion, but the kid seems to be sincere. PACODOGwoof, bitches 00:03, 25 June 2010 (UTC) - so what? He's 10 years and totally unable to understand the utter complexity of this issue or even of his own sexuality. Acei9 00:14, 25 June 2010 (UTC) - The kid is being recognized at a small local event in a Wal-Mart parking lot in Arkansas with a couple hundred people in attendance, at best. It's not like he's being named "grand poobah of the gay rights movement" or something. He sees injustice in the world, and chooses to speak out about it. Good for him. PACODOGwoof, bitches 01:18, 25 June 2010 (UTC) - What understanding is the kid missing? If you can judge a category of people (10 year olds) couldn't you judge them on an individual basis? How do you judge maturity? You are kinda failing my test already. Ageism is just another prejudice, not unlike sexism or racism. Pre-judgment is only required when we lack the time to look deeper. For example, police, military personnel, gangsters, or street people may have to pre-judge as a matter of survival. We don't need to here. ~ That blind moron (talk) 03:45, 25 June 2010 (UTC) Please, no one would even notice if it was a little girl and a little boy pretending to be married. This is just the "ick" factor. Look how awful these are. You'll feign offense I'm sure but had any of these kids shown up in some internet meme you'd have not thought twice about it. Ok, maybe the tacky weddings thing would have raised an eyebrow or twoMe!Sheesh!Mine! 01:25, 25 June 2010 (UTC) - I think the issue here is whether the kid is doing it fully voluntarily or is being manipulated in some way, and is the kid just affirming the rights of gays or making a statement about his own sexuality? Many kids nowadays get politicised in ways that were unheard of when I was a youngster, even though there are also countless kids who do similar things (maybe even pressurised) in the name of religion and nobody bats an eyelid. If he has been brought up to believe in equality and fairness for all then helping out at a gay pride event seems pretty innocuous. Kids often have a much greater sense of fairness than adults and feel compelled to help starving Africans or endangered animals which they have seen on TV. Would you be so disgusted if the kid was marshalling a parade for "traditional family values"? Just because someone takes a stand oversomething doesn't mean that they subscribe to that lifestyle and many heterosexual kids are brought up by couples of either gender in a homsexual relationship without being "contaminated". I think that revulsion over this issue actually reveals some latent homophobia. (I'm not racist but...) Lily Inspirate me. 07:01, 25 June 2010 (UTC) - The parents of this kid really should be ashamed of themselves. Its hard enough being a kid without making yourself the pick of the playground bullies. Honestly. A complete disgrace. Libertarian1 (talk) 20:06, 25 June 2010 (UTC) - You're blaming the victim and allowing bullies to decide how kids should be raised. The solution is rather to protect kids from bullies. ~ That blind moron (talk) 21:02, 25 June 2010 (UTC) If anyone would like to continue this conversation, I have copied it here in Lumeniki. ~ That blind moron (talk) 02:54, 26 June 2010 (UTC) - Or we can just continue it here. - π 02:55, 26 June 2010 (UTC) Another one for Earthland[edit] [1] CrundyTalk nerdy to me 11:53, 25 June 2010 (UTC) - I thought about posting this earlier, but a voice in my head said, "." Bondurant (talk) 11:59, 25 June 2010 (UTC) Cat steals feet[edit] So there I was browsing the BBC while having lunch at my desk, and I spies the BBC Most Read news stories. Number 5: Bride's brother has legs stolen (story about an amputee paralympian whos legs were pinched). Number 4: Amputee cat given 'bionic feet.' Coincidence? I don't think so. Bondurant (talk) 12:15, 25 June 2010 (UTC) - There's a lot of it about: "Hospital bins foot" 20:43, 25 June 2010 (UTC) - But, of course, some are getting their own back on the animal kingdom 20:47, 25 June 2010 (UTC) What sort of ...[edit] ... bloody phone has to give "how to hold it" instructions? 20:03, 25 June 2010 (UTC) - The kind of phone only KenDoll can appreciate? Lord of the Goons The official spikey-haired skeptical punk 20:30, 25 June 2010 (UTC) Whooping cough an epidemic in California[edit] I hope it gets to New Jersey and fucks Andy in the asshole. --sloqɯʎs puɐ suƃısuɐɪɹɐssoʎ 21:37, 24 June 2010 (UTC) - This seems to be one of those cases where the spectrum of ideas comes full circle and kisses its own backside. Andy's anti-vaccine campaigning is right-wing nuttery, while in California they seem to be more gullible for new-age pseudo-scientific woo. (Of course, I'd hate to stereotype.) Lily Inspirate me. 07:10, 25 June 2010 (UTC) - Yeah, there are anti-vaxxers all across the spectrum. ħuman 20:50, 25 June 2010 (UTC) National (education) standards.[edit] In my neck of the woods there is a minor controversy raging regarding proposed national standards for primary schools. As I understand it, the proposal is to have the kids from ages 5-12 all assessed for basic literacy and math skills so as to provide information to parents on how the school they are attending is performing compared to other schools in the area. It will also help to determine problems with individuals that may not be picked up otherwise and to provide some insight into problems in particular cultural and socio economic areas. To me it sounds like a wonderful idea, a no-brainer as it were, but the level of opposition from shools and left of centre political parties is enormous. Apparently the head of primary schools in Auckland has recommended that all of his schools boycott the whole process and the ministry of education seems powerless to do much about it. After following the debate in the media I must confess to be basically ignorant as to the reason for the outrage. As far as I can tell, no-one has offered a cogent reason for not adopting the system. Can any of you offer any reasons why the introduction of national standards would not be a mistake? --DamoHi 20:46, 25 June 2010 (UTC) - They dunnit here (UK) & it went berserk: tests at all ages & schools fighting for ratings. No allowances made for e.g. one school beng heavily immigrant with another being middle class. There's also the "being taught - not to learn - but to pass tests" aspect. Pressure on teachers and pupils gone mad (not that I've any special love of teachers) 20:52, 25 June 2010 (UTC) - From t'web. See also: this. 20:57, 25 June 2010 (UTC) - I accept that there may be issues with "teaching to the test" although I suspect that such a phenomenon is likely to be much more common in high school where the results are important to the students. Under this proposal it is really the schools that are being tested, not the students. I think part of the idea is to discover potential areas of concern within areas so they can be corrected, therefore a school that is full of immigrants will score lower than other schools and so will obtain higher resources to deal with the shortfall. As I understand it, the proposal does not link funding to good results, rather it will indicate where more funding is required. In any case, many parents have a choice of 2 or 3 schools in their area (presumably all with similar socio economic status) and so having a guide to determine which school is better must be a good idea. Let marketplace pressures force backward schools to improve (or something like that anyway). DamoHi 07:23, 26 June 2010 (UTC) - In the UK the children's results were used to rank schools, this then meant that parents tried to get their children into those schools which were though to be better, going so far as to move house or even lie about their home address. As children whose parents take a greater interest in their kids' education tend to do better this leads to greater disparity between "good" and "bad" schools. Faith schools often had good track records so many parents would be obliged to go to church solely to get their kids into the better ranking school. Some schools were then left with the dregs and seen as underperforming with the teachers catching the flak. Lily Inspirate me. 10:42, 26 June 2010 (UTC) - It had surprising effects: house prices inside a "good school's" catchment area rose disproportionately. The "teaching to the test" effect was apparently more pronounced in lower (up to 11 y.o.) schools. The difference being that exams had always been a feature of secondary (high) schools. 11:08, 26 June 2010 (UTC) Make me a sysop?[edit] click edit to see usual MC trollery... Real first name and last initial (talk) 14:18, 26 June 2010 (UTC) Usual MC twatness follows: Please? 86.40.200.55 (talk) 11:58, 26 June 2010 (UTC) - You see, you deleted pages last time we made you a sysop and the time before that you blocked people in a non-fun way. - π 12:02, 26 June 2010 (UTC) - The deleted pages are `100% explainable if you give me the opportunity. And the blocks were aimed at Susan, who was masquerading as Toast, and were never longer than 31 seconds. 86.40.200.55 (talk) 12:15, 26 June 2010 (UTC) - This exposes that as a lie. Really MC you have nobody but yourself to blame. If you go around crapping on everyone you can hardly complain if they then lock you in the toilet. Lily Inspirate me. 12:23, 26 June 2010 (UTC) - As I've said, that wasn't me. Gerard is censoring me again. 86.40.107.140 (talk) 12:25, 26 June 2010 (UTC) - You are EdmundBurke again now? - π 12:30, 26 June 2010 (UTC) - You are intent on criticising the effect, but ignore the causes. You do so at your peril. 86.40.196.59 (talk) 12:40, 26 June 2010 (UTC) - its not so much as what will happen to you but what will happen to the universe. Having such a loose relationship with cause and effect will lead to misinformation. And from such inconsistencies, the lifeblood of revolution and liberty will flow. 86.40.104.249 (talk) 12:47, 26 June 2010 (UTC) - Silence, cretin. You are the creature of the system that fails to know his place. 86.45.199.92 (talk) 12:51, 26 June 2010 (UTC) - Go fuck yourself and make me a sysop. 86.40.99.116 (talk) 13:43, 26 June 2010 (UTC) - I'd vote for you to be given sysop status, Edmund (or whoever you are), if you could at least demonstrate some civility to the users here (aside from your "discussions" that are going on between you and David Gerard - I don't care about personal spats). There's no need for you go be going around using cuss words like a teenager who's just discovered the word "fuck". Bondurant (talk) 16:14, 26 June 2010 (UTC) - I vote that he is a teenager who's just learnt the word "fuck". CrundyTalk nerdy to me 18:08, 26 June 2010 (UTC) - Considering human has such massive respect for MC, I vote human sysops him, and then when it all goes tits up we block the pair of them. CrundyTalk nerdy to me 18:17, 26 June 2010 (UTC) |} - A sysop can hardly do any more damage than a bunchanumbers, and the "rights" can be taken away again the moment he tries anything hinky or starts trolling users who don't want to be trolled. Maybe it'll do us good to have an anti-'crat around here. To use a football comentators cliche, it keeps us honest. Bondurant (talk) 18:23, 26 June 2010 (UTC) - Uh, we tried that before and then he went on a deletion spree. Why the fuck on Earth should we try again? Isn't insanity doing the same thing over and over again and expecting different results? The Spikey Punk I'm punking my punk! 18:33, 26 June 2010 (UTC) - I apologise forbeing such a twat. FUCK SHIT CUNT PISS - 86.40.ei.π (talk) - Oh for Gods sake Goonie. Although this will be deleted, as every time I tell the truth about this it gets reverted and hidden, you know as well as I do that the deletion spree was not malicious in any fucking way, so stop perpetuating that lie. I knew I was going to lose my sysop powers at that stage, so it was one great last hurrah. Don't ignore the context, it makes you look like the idiot you are. 86.40.106.164 (talk) 19:13, 26 June 2010 (UTC) Hover[edit] When you hover over a page link (I suspect you need a gadget to see it) the title & first line appears in the hover box. Over mine (at least to me) there's also a piccy :File:TerrySmall.png. Where does the wikistuff get the info for the piccy? Also, hovering over Saloon Bar gives a rather unlovely picture of a smiley squeezing a tube of toothpaste File:Wank.gif, why? 20:50, 26 June 2010 (UTC) - Must be your browser, mine does neither. ħuman 22:49, 26 June 2010 (UTC) - Your browser is prefetching everything in links. This is supposed to make your web experience quicker, ie any link you may want to click is already in your cache. In some ways that was a good idea in the days of dial-up, but browsing wiki-type pages with possibly hundreds of links it just fills your cache up and possibly collects cookies from external sites too. It's fairly easy to turn off in most sensible browsers. 82.23.208.15 (talk) 04:03, 27 June 2010 (UTC) Atheism and the World Cup[edit] I want to take a look at Andy's "hypothesis" that atheism leads to World Cup losses, though to do this I need to know what constitutes an atheist country in Andy's mind. We know England is one (one which Andy has already written off as a failure because they tied the US, though they still made it through the first round). Is the Netherlands? They seem to be doing quite well. France and Italy (knocked out of the game now) are generally seen as quite Catholic, but they're part of that socialist EU, so perhaps they really are atheist? I just know Andy is going to change the parameters to align with what he already thinks (when the US is defeated, he'll blame Obama), but I'd like to see how this plays out. As I see it we have: - North America: - USA: God's chosen country - advancing to next round - Mexico: Catholic - advancing to next round - Honduras: Catholic, but bordering Nicaragua, so commie through diffusion - not advancing - South America - All Catholic, all advancing ( uncliched by Chile so far, due to the loss of Pinochet) - Europe: - Denmark: atheist - not advancing - England: atheist - advancing, but underperforming - Germany: atheist if they lose, Christian if they win - advancing, too early to call their actual religious views though - France: socialist - not advancing - Spain: Catholic, if they make it, socialist if they don't (with a score of 2-1, they're looking pretty Catholic)Catholic - advancing - Portugal: See SpainCatholic - advancing - Switzerland: atheist, especially if they don't win - Greece: socialist, not advancing - Serbia: part of that mess in the Balkans, hard to pigeonhole - not advancing - Slovakia: Christian - advancing - Slovenia: must be somewhat atheistic, not advancing - Africa: all only here because of affirmative action - only one advancing (proving affirmative action is bad); Ghana, he advancing country, is predominantly Christian - Asia/Oceania: - North Korea: atheist - lost badly - South Korea: Christian/Buddhist - advancing - Japan: theist - advancing, but not Christian, so they won't get much farther - Australia: atheist - not advancing - New Zealand: atheist - not advancing (but performing "credibly", according to atheists) So it looks like Christians win and atheist lose, unless they don't and it's liberals' fault. DickTurpis (talk) 21:10, 25 June 2010 (UTC) - Hmmm, some of these stats are dated already. Got distracted in the writing of this, and all the games seem to be over now. DickTurpis (talk) 21:11, 25 June 2010 (UTC) - Japan did advance, they'll be facing Catholic Paraguay in the round of 16. Unfortunately, Switzerland did not, despite the fact that it's rather conservative compared to European atheist/commie standards. Röstigraben (talk) 21:18, 25 June 2010 (UTC) - Can't be atheist then. I'll have to make adjustments. DickTurpis (talk) 21:31, 25 June 2010 (UTC) - Hmm, so the only country left that couldn't possibly be relabeled as Christian is Japan - guess I'll be rooting for them. Banzai! Röstigraben (talk) 21:36, 25 June 2010 (UTC) - And England. Andy is too heavily invested in their atheism to suddenly reverse and call them Anglican or something. DickTurpis (talk) 21:38, 25 June 2010 (UTC) Addendum: Notable absences - Countries/regions that did not even make the cut: - China: atheistic - Middle East: Muslim - Russia: atheist - Canada: socialist - Scandinavia (sans Denmark): socialist/atheist - Venezuela: commie - Cuba: commie - Kenya: Muslim (disregarding the Christian majority; the world's most famous Muslim was born there) - India: polytheistic mumbo-jumbo; might as well be atheist - Further proof that Christians are better at everything. DickTurpis (talk) 21:44, 25 June 2010 (UTC) The official Turpis Andy-o-Meter predicts the next round[edit] - Uruguay/South Korea: Uruguay. More Christian (though the rise of Christianity in South Korea will make the game close, and in 4 years they will do even better); odds 7/5 - US/Ghana: US, obviously; odds 99/1 - Netherlands/Slovakia: Slovakia, less atheism; odds 2/1 - Brazil/Chile: Brazil, unless Pinochet returns, in which case Chile; odds 2/1 - Argentina/Mexico: Argentina: there are few Mexicans left in the country as they have mostly illegally emigrated; odds 3/1 - Germany/England: this game will certainly be atheistic England's Waterloo; odds 20/1 - Paraguay/Japan: the Catholic Paraguay will win; odds 10/1 - Spain/Portugal: Trick question, "Portugal" is just another word for Spain - Place your bets. DickTurpis (talk) 22:10, 25 June 2010 (UTC) - If you're a VENUE FASCIST!!!!! DickTurpis (talk) 10:11, 26 June 2010 (UTC) - Seriously, though, I think I thought I might have been in WiGO CP talk when I wrote this. I get lost sometimes. DickTurpis (talk) 10:19, 26 June 2010 (UTC) Ghana 2 USA 1 in extra time. How much extra time do they play? ħuman 20:29, 26 June 2010 (UTC) - No idea here. I'm ignorant about this sporty thing in general. But if things stay as they are the Andy-o-meter seems to need calibration. Wait, did Obama perhaps call the team and wish them good luck right before the game, completely demoralizing them? That must be it. No team could recover from something like that. DickTurpis (talk) 20:35, 26 June 2010 (UTC) The psychic octapus says that Germany will win, if that's of any help. Sen (talk) 20:59, 26 June 2010 (UTC) - I'm with the octopus, here's keeping my fingers crossed for a penalty shootout. Well, off to watch the game now! Röstigraben (talk) 12:27, 27 June 2010 (UTC) Breaking news[edit] I hate soccer, but the US was just eliminated from the World Cup by Ghana. The Spikey Punk I'm punking my punk! 21:11, 26 June 2010 (UTC) - Lame. I was hoping going against Ghana would give us better odds. And it probably did. In other news, we're now an Atheist Nation, yes? Quaru (talk) 21:20, 26 June 2010 (UTC) RationalWiki Boredom Project[edit] I have read all of mainspace. o_0 And much of Conservapedia: space. Essay: space was a waste of my brain. I would only approach Fun: space with a large axe. There's quite a bit of the Annotated Bible still in need of annotation. So. If you're terminally fucking bored and feel like breaking Human's wiki ... - David Gerard (talk) 17:05, 26 June 2010 (UTC) - I'm not sure what's worse, 200 hours of porn or... :D --Alienfromspace (talk) 18:08, 26 June 2010 (UTC) - Work on the annotated Bible = interesting reading. 200 hours of porn = very sore nuts and possibility of friction burns. ConcernedResident omg ponies!!! 20:56, 26 June 2010 (UTC) The power of prayer![edit] When England were 2-0 down, the commentators noted that Fabio seemed to be praying and perhaps that was all that could save us now. Then we got our goal, and our other kinda-sorta goal. Maybe there's something to this atheistic = sucking theory :D --JeevesMkII The gentleman's gentleman at the other site 14:58, 27 June 2010 (UTC) - Well, it's not implausible that thinking that you have god on your side would make you more confident and hence play better. Harmonic wisest Hoover! 14:59, 27 June 2010 (UTC) - Is there a footy match on? 15:02, 27 June 2010 (UTC) - You poser! I know you're watching. --JeevesMkII The gentleman's gentleman at the other site 15:04, 27 June 2010 (UTC) - No! On my honour as a devout anti-sportite, Yer Honour! I didn't know what time it was on & went walkies, got back too early obviously. 15:07, 27 June 2010 (UTC) - Germany are clearly just slightly less atheistic than England. X Stickman (talk) 15:36, 27 June 2010 (UTC) - Another bit of commentary, "The german fans are crying "Ole!" on every pass." Curse you, Conservapedia, and what you've done to my brain. --JeevesMkII The gentleman's gentleman at the other site 15:50, 27 June 2010 (UTC) - Damn, that match was epic. I was hoping I'd be able to brag about our superior atheismo afterwards, but the referee being suddenly struck with blindness when Lampard's shot bounced off into the net actually supports Andy's hypothesis of divine intervention in the World Cup. Anyway, here's to the best match of the competition so far! Röstigraben (talk) 17:04, 27 June 2010 (UTC) Remember Wembley![edit] The Wembley-curse is still working! Apologize, England, and you might win a game against Germany again! sincerely, A very drunk Gmb (talk) 18:13, 27 June 2010 (UTC) - I take it England lost? Who were they playing? 19:07, 27 June 2010 (UTC) US Health care[edit] US is BOTTOM of the league see here and here. (The Commonwealth fund is US (New York) based.) Hat tip 20:40, 27 June 2010 (UTC) - I saw this in the Indie earlier in the week and thought about posting it here. But then I looked up the Commonwealth Fund and saw that it is hardly non-partisan on the issue of health care reform, much as I believe their results. Bondurant (talk) 21:20, 27 June 2010 (UTC) It GAWZILLRAH!!![edit] I got a set of Ultraman dvds. Is the original series from the sixties (dub done by the cast of speed racer) any good?--Thanatos (talk) 02:03, 28 June 2010 (UTC) Xtianity founded science[edit] Oh no it didn't| 22:21, 26 June 2010 (UTC) - Surely this is a better link. Lily Inspirate me. 08:09, 27 June 2010 (UTC) - Much better, but I liked the graph being the first thing you see rather than waaaaay down. 15:03, 27 June 2010 (UTC) - Following a few links I discovered this good commentary on a Catholic writer who tried to rebut the original (admittedly flawed) version of the article. I'm not an expert on these matters but it would have been enlightening to see what was changed. Maybe we should try something similar here. Lily Inspirate me. 09:43, 28 June 2010 (UTC) Cats & Ice Cream[edit] This is a community alert! Do not leave ice cream half made (i.e. after first chill and during stirring) out where a cat, moggy or other feline can get at it: The will appear in the living room with cream on their whiskers and fall asleep, sated. 22:40, 27 June 2010 (UTC) On MC's quiz[edit] I am a Tetronian. This was a lot of effort just to troll. I think he deserves a round of applause. - π 23:33, 27 June 2010 (UTC) - What kind of idiotic loser makes something like this to bash a website? Oh wait, I seem to have forgotten whom we are talking about. AnarchoGoon Swatting Assflys is how I earn my living 23:36, 27 June 2010 (UTC) - Glasshouse. - π 01:15, 28 June 2010 (UTC) - Bahahaha what an epic and unmitigated failure! Gave me a hell of a laugh though! It just fails so badly. Acei9 23:40, 27 June 2010 (UTC) - Seriously, though, what kind of pathetic dolt is that fucking obsessed with our website? How much of a loser do you have to be? He, just now, made himself look even more like the virgin, zit-faced Trekkie we all know he is. Absolutely pathetic. Lord of the Goons The official spikey-haired skeptical punk 23:43, 27 June 2010 (UTC) - I think this is probably the best thing Marcus has ever done. Not that it's a terribly high bar to clear. DickTurpis (talk) 23:46, 27 June 2010 (UTC) - Hey, when you're as much of a loser as he is, you can only go up, right? Gooniepunk2010 Oi! Oi! Oi! 23:51, 27 June 2010 (UTC) - Troll. Waving arms. Don't feed it. ĵ₳¥ášÇ♠ʘ no fate but what we make 00:04, 28 June 2010 (UTC) - I have tried several times to get Ace McWicked but can't. Perhaps I haven't been added. Acei9 00:31, 28 June 2010 (UTC) - Yeah, I've been trying to get AKjeldsen all day. What gives? DickTurpis (talk) 00:37, 28 June 2010 (UTC) - Funny thing is, I tried to score and MC, and all I got was a Human. Oh well. The Spikey Punk I'm punking my punk! 00:39, 28 June 2010 (UTC) - Excellent! I signed in as anonymous, only two questions' answers really reflected my opinion, and yet I still wound up as... Human! ħuman 01:09, 28 June 2010 (UTC) - The six possible results are listed below the verdict at the end. ħuman 01:12, 28 June 2010 (UTC) - (EC)Ace isn't a result. You can only be Tentronian, Goonie, Human, Susan, Nx/RA, and David Gerard. I think you get Susan if you answer yes to hating religious people regardless of the other questions. The test needs a lot of work, for starts that is not a very good cross section of the editors here a lot of them have very similar attitudes to trolling. Also the sample questions on deal with things MC cares about; how they react to trolling, stance on religion, whether they like templates or not. There are definitely far more issues that would distinguish between even those six, never mind other people. Suggestions to help him improve? - π 01:13, 28 June 2010 (UTC) - I'm SusanG.. I still don't know what a 'MC' is...Quaru (talk) 02:27, 28 June 2010 (UTC) - Major Cunt. BTW, Tentronian--Thanatos (talk) 02:28, 28 June 2010 (UTC) - I'm a SusanG. Yeah, I hate religious people. Senator Harrison (talk) 03:04, 28 June 2010 (UTC) - I'm kind of insulted. I answered truthfully and kept getting Tetronian. (And why do I get lumped with Nx? I invented ruining this wiki.) Radioactive afikomen Please ignore all my awful pre-2014 comments. 05:32, 28 June 2010 (UTC) - Hmm, I thought that I'd end up as a SusanG (Morons!) but got RaNx. Of course the quiz reveals more about the setter than any who bothered to answer the questions. I'm disappointed that there wasn't a MarcusCicero in the results, it would have been interesting to see how he identifies himself because it was rather boring and stereotyped. Lily Inspirate me. 06:08, 28 June 2010 (UTC) - RA/Nx as well, even though I selected the (first) anti-religion answer. I'd better learn how to make templates. Röstigraben (talk) 06:10, 28 June 2010 (UTC) - Would you like me to upload a pie chart of the results? 86.40.216.170 (talk) 09:51, 28 June 2010 (UTC)By the way, if you answered in question 1, 'make an emotive appeal for calm' and combined this with the last question 'I just wish people were nice' then you end up as Tetronian'. To be Susan you need to combine the 'leaving and never coming back' card with 'religious people are morons'. For Human you need to play the 'pick up your sword and fight for what is right' and when asked 'does this site need more rules' you say less rules. Gerard is when you 'revert and block' and require more rules. 86.40.216.170 (talk) 09:56, 28 June 2010 (UTC) - Not really. CrundyTalk nerdy to me 09:53, 28 June 2010 (UTC) - Crundy - you are too insignificant and hysterical to be an option on this quiz. 86.40.216.170 (talk) 09:56, 28 June 2010 (UTC) - Seems I'm a Humming too. Who knew. At least I know there isn't a Psy on his list. I'm too nice... and insignificant. *sniff* --PsyGremlinSermā! 10:06, 28 June 2010 (UTC) - The quiz says I'm a "power top." SJ Debaser 10:13, 28 June 2010 (UTC) - Every time I try and fill the quiz in it tries to stick its thumb up my arse. I guess MC left some personal code in there somewhere. CrundyTalk nerdy to me 10:15, 28 June 2010 (UTC) - It looks like McBerk has left his ivory tower and gone back to his mammy for the summer. Unfortunately he has become bored/boring very quickly. Lily Inspirate me. 13:40, 28 June 2010 (UTC) The Quiz In Full[edit] - MC is - Godlike - Infallible - Just plain wonderful - All other RW members are - Fucking Cunts - Total Wankers - Fascist Arseholes - RW as a whole is - I hate RW because - They laugh at me - They don't take me seriously - I can't get out of the vandal bin - They still don't take me seriously - I'm better than they are and I can't get them to take me seriously - Nobody takes me seriously Jack Hughes (talk) 14:22, 28 June 2010 (UT[edit] Hitler rants about Vuvuzelas at the World Cup. BIZZZZZZZZ. ĵ₳¥ášÇ♠ʘ Banhammer, Renamer, and Goat 01:33, 28 June 2010 (UTC) o===========<()♪♪♪♪♪♪♪♪♪♪♪♪♪♪ P-Foster (talk) 02:44, 28 June 2010 (UTC) - As a Sauff Effriken I just want to say that the only thing worse that the refereeing at WC2010 is the vuvuzela. I'm tired of being deafened at the games. --PsyGremlinKhuluma! 09:18, 28 June 2010 (UTC) NJ Recall site[edit] AFAIK, still nothing on the court decision. They're setting up a new website though; in the meantime, have a look at what happened to the old one. EddyP (talk) 10:24, 28 June 2010 (UTC) - I have grab a picture for the memories. - π 10:27, 28 June 2010 (UTC) England jokes[edit] Post below this line: What have Frank Lampard's goal and the Nazi regime got in common? If you're German, they both never happened. CrundyTalk nerdy to me 11:30, 28 June 2010 (UTC) Substituting Defoe for Heskey when you need goals? That's like switching off the porn when you fancy a wank. CrundyTalk nerdy to me 11:34, 28 June 2010 (UTC) Don't forget all the hilarious Facebook ones people are joining now. "England are guna win the world cup, LOL jk, they're shit." "Maybe, Just Maybe! LOL JK." "I can tell when the balls over the line!! LOL, jk I'm a Uruguayan linesman" SJ Debaser 11:54, 28 June 2010 (UTC) - Stupid facebook. - No wonder Rooney's been scoring in training, as Capello claims. He's been playing against England's defence. CrundyTalk nerdy to me 12:02, 28 June 2010 (UTC) ahem... Gmb (talk) 18:48, 28 June 2010 (UTC) Oh, those wacky...[edit] ... North Koreans? MDB (talk) 14:07, 28 June 2010 (UTC) Countdown to conserva-gasm in...[edit] ...five. Four. Three. Two. One. The Supremes ruled that Chicago's gun ban is unconstitutional. MDB (talk) 14:23, 28 June 2010 (UTC) - Yeah.. in Flint here, we have a gun ban, and it's supposed to be "fixed" this week, as it's counter to state law. We have the ability to carry a non-concealed weapon here, by state law. I'm not totally sure of the details, I only caught the brief blurb on the news last night.. Quaru (talk) 15:18, 28 June 2010 (UTC) - You live in North Wales? Lily Inspirate me. 15:36, 28 June 2010 (UTC) - No.. Flint, MI.. Like in Michael Moore's films.. Here's link to Flint's problems. And, living in one of the most violent cities in the US for the win!!! Quaru (talk) 15:41, 28 June 2010 (UTC) Here we go. You can also picture Andy using his mostly defensive weapon of gun to fire off a few celebratory rounds. MDB (talk) 15:49, 28 June 2010 (UTC) - I'm 95% confident that 95% of gun owners only use their guns for firing in the air in celebration. So shouldn't it be "mostly celebratory weapon of gun"?-- Kriss AkabusiAAAWOOOGAAAR!!1 15:58, 28 June 2010 (UTC) Tornados and floods[edit] So I was at an outdoor event earlier this evening, and it started pouring rain a few hours after we arrived. Within minutes, storms rolled in and we were all caught outside (in my case, about a mile walk from my car) with severe thunderstorms. I finally got in my car with my friends and drove back to their house. About 10 minutes after arriving, we were listening to the radio and they issued a tornado warning for their area just west of us, with the tornado on the ground heading southeast. Undetered, as I was heading north west, just around the storm, I get on the freeway and hear that, one by one, the highways around me were being closed for flooding. Thankfully, I got far enough to where I could use the side streets after a few minutes, but even those had flashflooding to the point where I could visably see the water on the streets rising. After about an hour, I finally arrived home, but let's just say that the drive from the event to my friends' house and then back home was one of the most nerve-racking experiences I've had to date. The Goonie 1 What's this button do? Uh oh.... 05:09, 27 June 2010 (UTC) - A couple of years ago I was having lunch with a group friends in the country on a hot summer day. To keep cool we dined indoors - it was fortunate that we did as out of the blue a big thunderstorm brewed up and chucked it down in buckets. It was only after about 45 minutes of torrential rain that on of the blokes suddenly realised "Shit, I've left my sun-roof open". Oh what laugh we all had about it. Lily Inspirate me. 07:55, 27 June 2010 (UTC) - I made the same mistake last week. Not sunroof, but windows, and rain blew in from everywhere. ħuman 08:02, 27 June 2010 (UTC) - The worst part about Saturday night was not the tornados, nor was it the flashfloods. It was the fact that I happened upon, by shear accident, a Village People concert. That part was absolutely horrifying. Lord of the Goons The official spikey-haired skeptical punk 03:38, 30 June 2010 (UTC) 4th July[edit] Over in the UK we really know how to mark the day! 18:00, 27 June 2010 (UTC) - I thought you celebrated it as "the day we got rid of the damn Yanks." MDB (talk) 12:45, 28 June 2010 (UTC) - "The day we got rid of the damn Yanks", reminds me of that episode of The Simpsons about the lemon tree, with the old man at the end in Shelbyville proclaiming that they chased the lemon tree out of town because it was haunted. - π 13:00, 28 June 2010 (UTC) - I find it amusing that the New Hampshire State Liquor Store system (socialist cheap booze) takes virtually no holydaze off. They will be open on Dimanche Quattre Juillet, for example, and will ignore the Federal Lundi holydaze. They are, however, closed two days a year - Esther and Jule. Bizarre pagans. ħuman 03:45, 30 June 2010 (UTC) Kagan Hearings[edit] Okay, place yer bets now... Who will be the first Senator on the Judiciary committee to ask about or hint at Kagan's sexuality? MDB (talk) 17:16, 28 June 2010 (UTC) I'm not going then.[edit] No sex in space 18:39, 28 June 2010 (UTC) - in fairness, that only applies to "professionals" in nasa. since we're neither, space, here i come!!! Quaru (talk) 20:23, 28 June 2010 (UTC) - Don't forget to pack your 2suit. WėąṣėḷőįďMethinks it is a Weasel 06:59, 29 June 2010 (UTC) - "Effortless intimacy"? I get a lot of that from blokes back here on planet Earth. Lily Inspirate me. 10:51, 29 June 2010 (UTC) New Motto?[edit] From Randompics.net -- Ravenhull (talk) 08:35, 29 June 2010 (UTC) - I hate to be rude (or do I rude to be hate?), but that was the most boring, lamest link I followed all day - nay, all week. Oh well, thanks for trying to help? ħuman 09:15, 29 June 2010 (UTC) Pharyngulated[edit] Poll re sexuality of Oz's new PM Hat tip. She's also a NON-BELIEVER! Shock! Horror! 11:13, 29 June 2010 (UTC) - You missed the fun a few years ago when this redneck senator from Queensland called her "deliberately barren". - π 12:07, 29 June 2010 (UTC) More Pharyngulation![edit] - and this time there's three to go at 17:04, 29 June 2010 (UTC) Copenhagen Declaration on Religion in Public Life[edit] Also here ("Please circulate this as widely as you can among people and groups who advocate a secular society" - think that covers copyright[?]) PZ was recently in Copenhagen (for you Mericans, that's in Europe or somewhere - not USofA, anyhow) at an atheist conference (& booze up) and they've come up with this: Discuss Hat tip 15:25, 29 June 2010 (UTC) - All good, sensible policies but what's all this nonsense about abolishing slavery? theist 15:28, 29 June 2010 (UTC) - I note this point: We reject all discrimination in employment (other than for religious leaders) and the provision of social services on the grounds of race, religion or belief, gender, class, caste or sexual orientation. - Okay, obviously, a church should have the right to "discriminate" on the basis of religion when hiring it's leaders. Anyone can see it would be ridiculous for, say, an Orthodox Jew to sue the local Archdiocese for not hiring him to be a priest. - However, what about non-leadership positions? Let's say insert name of church that takes a social stance you agree with is hiring someone for their IT department. Bob is well-qualified for the position. However, Bob is a member of a church that takes a position strongly opposed to social stance you agree with. Should the church be able to refuse to hire Bob on that basis? - Take it a step further -- what if Bob is a member of an entirely different religion, or is an atheist? Should the church be able to say "sorry, we only hire people who share our faith"? - Or in either case, what if Bob says, "I'll keep my personal beliefs out of the office"? Should the church be able to make that a condition of employment? MDB (talk) 15:45, 29 June 2010 (UTC) - This is typical self righteousness cosmopolitan blowhard-ism. 86.40.201.0 (talk) 16:01, 29 June 2010 (UTC) - Well, if you allow the right of a church to discriminate on those grounds, then there's no point in any other anti-discrimination stances. But the line between what constituents a "religious leader" and what is just a lacky doing the IT is a bit blurred. theist 16:04, 29 June 2010 (UTC) - Gee, and I picked "IT" so I could get something as far away from the church leadership I could come up with. But there are certainly positions that aren't strictly leadership that would still require someone to hold to the church's values -- say, someone answering a prayer line. MDB (talk) 16:17, 29 June 2010 (UTC) - Why let 'em even discriminate for the clergy? It'd be no end of good for the god squad to come to realisation that there's no difference between the job performance of the earnest hypocrite and the true believer. Might make them wonder how many of the clergy they have now don't even believe what they say. --JeevesMkII The gentleman's gentleman at the other site 16:20, 29 June 2010 (UTC) - As it happens this very issue does come up in Spain form time to time. There are schools here which are completely controlled by the Catholic Church. They want to only employ Catholic teachers and especially in classes associated with social issues or religion. But the state doesn't see it that way.--BobSpring is sprung! 19:29, 29 June 2010 (UTC) OK, what'd I touch?[edit] I've been promoted to reviewer at WP and I haven't even done anything. Looks a bit rum to me. Totnesmartin (talk) 16:10, 29 June 2010 (UTC) - I imagine that as they're putting in flagged revisions, to clear the backlog they'll basically give "reviewer" rights as freely as RW gives out sysop rights. theist 16:31, 29 June 2010 (UTC) - There is a secret list of other candidates. Lily Inspirate me. 16:42, 29 June 2010 (UTC) Think you might be possessed by a demon?[edit] Take this handy-dandy quiz and find out for sure! (Viral marketing, see here) It seems I'm posssessed. MDB (talk) 16:25, 29 June 2010 (UTC) - ALKALA: Alkala is known as the demon of gross indulgence and lust. He preys on the weak of spirit and those who would too easily give into their desires – some traits of this demon can include drinking too much, drug, sex, gambling or other addictions. Signs: A person possessed by Alkala will have skin that feels hot to the touch, but lips that are ice cold, and may speak in ancient Aramaic - Nice! theist 16:32, 29 June 2010 (UTC) - - Needs more grimoire background and gothic font. Please tell me this is a poe. Please. --JeevesMkII The gentleman's gentleman at the other site 16:36, 29 June 2010 (UTC) - Heh! - (randomish choices) - Done honestly I'm MIITAKK (hhow ddo yyou ppronounce "KK"? 16:41, 29 June 2010 (UTC) - I sometimes get possessed by the demon DRINKK. Lily Inspirate me. 16:43, 29 June 2010 (UTC) - There's one sign that leads me to believe it is a Poe -- there's nothing I can find on the site about the location of the church -- not even a city and state, much less a street address. Most churches list that pretty promimently. MDB (talk) 16:44, 29 June 2010 (UTC) - (EC)Seems to be PR for a movie. MIITAKK for me, BTW. Röstigraben (talk) 16:57, 29 June 2010 (UTC) -. - Like, cool. Sen (talk) 16:50, 29 June 2010 (UTC) - I filled it in for the Assfly. He's possessed by Katal too. This explains so much about him. --JeevesMkII The gentleman's gentleman at the other site 16:56, 29 June 2010 (UTC) - That explains why I learned about it in a gmail ad. MDB (talk) 16:59, 29 June 2010 (UTC) - Yay, I am free from demonic possession. Woo hoo. ĴαʊΆʃÇä₰ the card game of all gibbons! 17:43, 29 June 2010 (UTC) More article ratings[edit] Been throwing silvers and bronzes around with homoerotic abandon. Just suggested Water memory and Phyllis Schlafly for silver - thoughts welcome on talk pages. Also, do please glance over Category:Bronze-level articles for silverable things, and Category:Silver-level articles for cover prospects. When was the last new cover article? We need something fresh there - David Gerard (talk) 23:10, 29 June 2010 (UTC) ClueBot[edit] Any chance we can install this? Would make our lives a bit easier when it comes to spamming / wandalism. CrundyTalk nerdy to me 14:57, 28 June 2010 (UTC) - Nx or Trent would have to do it, since it's in PHP, for one thing. Harmonic wisest Hoover! 15:17, 28 June 2010 (UTC) - There are also lots of hardcoded references to WP, which would need to be replaced. Harmonic wisest Hoover! 15:53, 28 June 2010 (UTC) - That's a bit poor. Find/replace job? CrundyTalk nerdy to me 15:56, 28 June 2010 (UTC) - Should do, although WP uses a newer version of MW than us, and that source actually makes me feel nauseous. Harmonic wisest Hoover! 16:03, 28 June 2010 (UTC) - What does it do? WėąṣėḷőįďMethinks it is a Weasel 17:42, 28 June 2010 (UTC) - It reverts vandalism. Harmonic wisest Hoover! 18:01, 28 June 2010 (UTC) - Yeah, just a spam filter, really.. certain terms are given a values, positive and negative, when it gets past a certain amount, it's marked spam(or vandalism), and reverted. Quaru (talk) 18:44, 28 June 2010 (UTC) - Great. If we install that here, you all know what the new hobby will be on RW - figuring out how to trigger it in ways that ECs other editors... ħuman 00:09, 29 June 2010 (UTC) - I think we have a pythonscript copy in the pywikipedia file I got Pibot out of, along with a copy of sinebot if anyone is interested. Nx could set it up on the bot server, or I could vandalise it for a bit. - π 00:23, 29 June 2010 (UTC) - I think cluebot actually might be multiple pythonscripts, one looking for spam, another looking at edits by known proxies etc. - π 00:36, 29 June 2010 (UTC) - Does that mean it would need checkuser rights? — Unsigned, by: Lily / talk / contribs - I suspect not, it just seems to monitor a few IP address for anonymous editing. I haven't looked into it, but I suspect it just has a lower tolerance on their edits. It will just trigger a revert for something that has a lower statistical likelihood of being vandalism than other editors. - π 06:43, 29 June 2010 (UTC) - I think you can also just quickly rollback a change if it gets it wrong, so it isn't high impact. CrundyTalk nerdy to me 10:21, 29 June 2010 (UTC) - It seems that it would pick up and automatically revert random strings of bad language.--BobSpring is sprung! 19:44, 29 June 2010 (UTC) - There goes our fucking bar. And most of our user talk pages. And half our snartikles... ħuman 03:48, 30 June 2010 (UTC) - It would be interesting to know what it does and doesn't consider vandalism. Although my I propose the name Rouge Admin for its account if we want it? - π 03:53, 30 June 2010 (UTC) - Is this thing related to the Conservapedia guard dog? WėąṣėḷőįďMethinks it is a Weasel 07:04, 30 June 2010 (UTC) - Can you configure it to just watch mainspace articles? CrundyTalk nerdy to me 08:21, 30 June 2010 (UTC) Call to ban homeopathy from NHS[edit] 'Homeopathy is not witchcraft, it is nonsense on stilts,' said one doctor. About bloody time, too. 17:09, 29 June 2010 (UTC) - the Guardian has a nice photo-gallery of alternative therapies. Warning! - Picture 11 might frighten those of a nervous disposition. Lily Inspirate me. 18:57, 29 June 2010 (UTC) - Aaaaarghhhhh. NSFW! Horrid, truly horrid. 19:43, 29 June 2010 (UTC) - Oooh, nasty. I thought "the call" came pretty much as soon as the Sci/Tech select committee made its decision in Februrary? Anyway, that Tom Dolphin quote is excellent. theist 19:50, 29 June 2010 (UTC) - Wtf? Never heard of apitherapy before. That's got to be one of the most stupid (and cruel, to the bees) treatments out there. Should we have an article on it? CrundyTalk nerdy to me 08:28, 30 June 2010 (UTC) - Most definitely, do we have all the rest covered? Lily Inspirate me. 09:13, 30 June 2010 (UTC) - I've stubbed it. I'll try and dig up some info from woo sites. CrundyTalk nerdy to me 09:50, 30 June 2010 (UTC) Dame Phyllis[edit] Rootling round WP I found this. Phyllis Schlafly is a "Dame of Malta". Now I've never heard of it before but "The goal is to assist the elderly, handicapped, refugeed, children, homeless, those with terminal illness and leprosy in five continents of the world, without distinction of race or religion". Others include our own lovely[not] Princess Michael of Kent and Shirley Temple. Anyone know how & when she got "Damed" or whatever. There's no mention in our article. 00:02, 30 June 2010 (UTC) - Let's not forget that in a Holy Blood, Holy Grail like way - "Also a member of the "sacred bloodline" is Phyllis Schlafly... Prior to her marriage to Fred Schlafly, Phyllis Schlafly was Phyllis Bruce Stewart, making her a blueblood of both the Bruce and Stewart lineages." (from THE CONSPIRACY WAS STRONG Part II: BRITISH-ISRAELISM). Look at the home page for that and you will also see “JUDEO-CHRISTIAN” THEOCRACY, FRONTS FOR INTERNATIONAL BANKING cartel, Barack Obama: Ethiopian Hebrew, Ron Paul: Rosicrucian. Lily Inspirate me. 08:22, 30 June 2010 (UTC) Good afternoon, Prime Minister[edit] Yesterday, in between booking flights and visiting the post office, I walked directly into the New Zealand Prime Minister, John Key. While I didn't actually say "Good afternoon, Prime Minister" I did say "excuse me" and carried on with my day - as did he. Upon reflection I realised just what a nice thing this was. There is NZ's top man wandering down the street on his way to get some lunch without having to worry about being shot, harangued or mobbed. And while he did have a single security person hanging about 10 feet behind him there was really no need. Unless it is an offical proceeding people seem to realise he is on his lunch break and enjoying his own time so they just leave him alone. I couldn't think of any other country wherein the same thing would tranpsire. Acei9 07:01, 30 June 2010 (UTC) - I dunno, Iceland perhaps? Also the security guy must have been pretty useless if he let Ace bump into the PM. Were you sober? Lily Inspirate me. 07:50, 30 June 2010 (UTC) - Did you not invite him for a pint? CrundyTalk nerdy to me 08:24, 30 June 2010 (UTC) - Nice at Ace, and triple nice at Crundy. ħuman 08:40, 30 June 2010 (UTC) - @Lily: I was dead sober. Its pretty cool though, another reason I like living here in NZ as opposed to other countries I have visited/resided in. Open politics, open public/journalistic scrutnity (politicians here have a very hard time getting away with, well, anything), you can walk into parliament any day the house is sitting and watch it all live inside the debating chamber. For a politics/journalism nerd like myself it's a good atmosphere. Acei9 09:43, 30 June 2010 (UTC) - Sounds a lot nicer than Britain, where our Prime Minister cycles to work to look healthy and then gets his paperwork driven with him in the car behind him. I'm reminded of the Flight of the Conchords episode where the NZ Prime Minister goes around saying "Hi, I'm Brian, I'm the Prime Minister of New Zealand. Here's my card." "This card says John." "That was the old Prime Minister, he had 500 of them made, we can't just throw them out!" SJ Debaser 11:06, 30 June 2010 (UTC) - I thought John Major used to be a regular at the Oval without much in the way of security. I may be mistaken about that though.-- Kriss AkabusiAAAWOOOGAAAR!!1 14:06, 30 June 2010 (UTC) - John Major was just too dull to hate. Bondurant (talk) 15:14, 30 June 2010 (UTC) - "More peas, Norma?" CrundyTalk nerdy to me 15:19, 30 June 2010 (UTC) - It's great when politicians don't lose the common touch. Unlike our mob here, who drive around in convoys with blue flashing lights. Maybe if their time keeping was better, or they weren't such a bunch of lard-asses, they wouldn't need to go tearing through red traffic lights. makes me sick when civil servants forget their should be civil and serve. Bloody banana republic. --PsyGremlinSprich! 15:55, 30 June 2010 (UTC) - You should start a blue-bucket protest. Lily Inspirate me. 19:58, 30 June 2010 (UTC) Goldsmith's first advice to Blair declassified[edit] BBC report Hat tip - actual document here PDF 15:27, 30 June 2010 (UTC)15:32, 30 June 2010 (UTC) - I'm sure he must have been pressured to "reconsider" his opinion, or else find a new career. I'm reminded of the line from Catch-22, "Catch-22 says they have a right to do anything we can’t stop them from doing." Bondurant (talk) 15:43, 30 June 2010 (UTC) Spot the diff[edit] Russian "spy" v Avenger 16:23, 30 June 2010 (UTC) Homeopathy[edit] Cartoon strip Hat tip 20:32, 30 June 2010 (UTC) - I added it to the relevant article as it's pretty much a good enough summary of everything you need to know. theist 13:04, 1 July 2010 (UTC) Automatically marking edits as patrolled...[edit] Is there something I'm not seeing in my preferences that will let me automatically mark red-exclamation-marked edits as "patrolled" when I look at them? P-Foster (talk) 06:45, 1 July 2010 (UTC) - No you have to actually mark them as patrolled. ħuman 07:27, 1 July 2010 (UTC) Tea Party Jesus[edit] Take the words of Ann Coulter, Sarah Palin and other crazed Tea Partiers, mix them with images of Jesus and what do you get? Tea Party Jesus!. Hours of fun! Acei9 21:18, 1 July 2010 (UTC) Do we need/have a page like this?[edit] Somebody just dropped this link as a welcome message on a BON's talk page. We should have our own instead of linking to some other obscure website's. P-Foster (talk) 19:52, 30 June 2010 (UTC) - We have template:welcome/IP for BONs. ħuman 23:03, 30 June 2010 (UTC) Obama and the US Constitution[edit] A common thread espoused by right-wingers is that Obama has broken, or gone directly against, the US Constitution. I know a lot about the Constitution, for a foreigner anyway, and I wonder if any of these people that claim Obama has broken the Constitution actually know anything about it at all. There was that awesome Onion article (Area Man Passionate Defender Of What He Imagines Constitution To Be) but to be clear - Obama hasn't done nothing in adversarial to the Constitution, am I right? Acei9 22:41, 30 June 2010 (UTC) - Well, there are two schools of thought here: - A. Some people like myself would allege that it is unconstitutional to engage in domestic spying without proper warrants, and that the whole FISA Court thing is a sham designed to gild what is fundamentally an assertion that the secrecy of state is more important than the constitutional guarantees of being able to face an accuser, demand to see the proof, and so on - an assertion that might be accurate but is not based in law. - B. Other people like Glenn Beck think that the mandate portion of national health care as well as various other nebulously-defined programs of evil are unconstitutional, although this is more strictly an overstepping of legislative branch authority and not the executive. - I'm sure some people might disagree or have additional charges (Erick Erickson at Redstate.com has at least three dozen) but those seem to be the "serious" schools of thought.--talk 07:22, 1 July 2010 (UTC) - C. The POTUS is required to be a natural born US citizen. Obama is a Muslim born in Kenya. It's also interesting to note that in the case of the examples in "A", these people weren't screaming at the guy who started all those practices. ħuman 00:38, 2 July 2010 (UTC) - He is a black man - He is a democrat - The wing nut media says he is a threat to the consitution. So, as you see, there are sensible and valid reasons to beleive that Obama is destroying our country. Please revise your opinion accordingly. Me!Sheesh!Mine! 13:34, 2 July 2010 (UTC) Oh yeah[edit] We've all been here. - David Gerard (talk) 23:30, 30 June 2010 (UTC) - Nice! 23:44, 30 June 2010 (UTC) - E pur si muove! (That would make for a nice motto actually) Sen (talk) 00:08, 1 July 2010 (UTC) - I know I've been there... Quaru (talk) 00:10, 1 July 2010 (UTC) - That's Latin for "IT'S A FUCKING SQUARE!", right? - David Gerard (talk) 00:19, 1 July 2010 (UTC) - Actually, it's a rhombus... theist 12:54, 1 July 2010 (UTC) - I think you need to put it into perspective. Lily Inspirate me. 08:22, 2 July 2010 (UTC) Not content to let the poms have all fun....[edit] ....NZ gets in on the act. Acei9 21:00, 1 July 2010 (UTC) - Ace! Lily Inspirate me. 21:49, 1 July 2010 (UTC) - I was slightly surprised to see 1/4 of NZer's identify as atheist. Acei9 21:53, 1 July 2010 (UTC) - Just discovered the billboard across the road from my office reads - "In the beginning, man created God - There probably is no god now stop worrying and enjoy your life". Awesome. Acei9 00:06, 2 July 2010 (UTC) - Piccy? CrundyTalk nerdy to me 07:51, 2 July 2010 (UTC) - Actually isn't NZ a bit late to the game (seems like they missed the bus) as I believe Canada, Italy, Spain and quite a few more have already done this as well as the UK. Lily Inspirate me. 08:21, 2 July 2010 (UTC) Jehovah's Witness Joke[edit] I can't stand those interfering people who bang on your door and tell you how you need to be "saved" or you'll "burn"? Fucking firemen. CrundyTalk nerdy to me 13:12, 2 July 2010 (UTC) - Surely this one is the best door knocking joke. theist 13:56, 2 July 2010 (UTC) - splortsch?— Unsigned, by: Gmb / talk / contribs Male Hymen?[edit] Is this enough BS to warrent it's own article?--Thanatos (talk) 17:42, 2 July 2010 (UTC) - What in the unholy fuck? I don't think it deserves its own article, but, damn, that's just weird. theist 17:46, 2 July 2010 (UTC) - (ec) Certainly enough to warrant addition to the acupuncture article. Worrying stuff indeed. WėąṣėḷőįďMethinks it is a Weasel 17:48, 2 July 2010 (UTC) - WTF?! If this batshit crazy stuff catches on, it could get pretty nasty. Love the bit about how the spot disappears only after hetero intercourse though. I guess the only real indicator for masturbation would be sudden, otherwise inexplicable blindness? -- 17:53, 2 July 2010 (UTC) - Do all men have a red spot on their ears then? If this gets anywhere near the UK I'm throwing myself under the Queen's horse at Aintree. Lily Inspirate me. 18:24, 2 July 2010 (UTC) Christmas here we come[edit] Second of July and look what I got from Amazon: [[File:Amazon Xmas.png|500px]] 20:14, 2 July 2010 (UTC) - Scratch that - it was from last November. Eff knows why it just jumped to the top of my mail list! Sorry Amazon. 20:42, 2 July 2010 (UTC) Tell Pal who you are[edit] or don't. 20:22, 2) It's alright, dear, it's only an advert.[edit] Sooper!(Hat tip) 11:27, 3 July 2010 (UTC) - The thing is, I've just acquired a shopping trolley, now I have some bad ideas forming... theist 12:18, 3 July 2010 (UTC - I don't think that supermarkets would actually like the idea. Speeding round means that you are unlikely to make out of the ordinary impulse purchases. Lily Inspirate me. 12:35, 3 July 2010 (UTC) - Aw, now that's just wrong. Why take the trouble to mod the shopping cart with a skateboard and not take the logical next step and add a motor? --JeevesMkII The gentleman's gentleman at the other site 13:04, 3 July 2010 (UTC) - - And don't forget the extra revenue in the bandages and pharma aisles. Collision avoidance required. 13:07, 3 July 2010 (UTC) - A motor? Add a jet engine, and it might get interesting. --Alienfromspace (talk) 20:33, 3 July 2010 (UTC) - What like one of these? 82.34.246.39 (talk) 10:22, 4 July 2010 (UTC) - That has to be the most brilliantly greatest dumbest idea ever. theist 19:37, 4 July 2010 (UTC) - Indeed. Seems to be a bit of a trend. By the way, there are kits one can buy for about $150 that add a small two stroke motor to a normal bicycle, quite popular in Asia as I understand. ħuman 23:42, 4) Williamsdon[edit] Serena is a fine athlete and deserved winner of the ladies title, but why oh why did she have to thank fucking Jehovah in her after match interview? Andy would have been proud of her. Lily Inspirate me. 21:38, 3 July 2010 (UTC) - Iono, things like that are bitter sweet. Also things like fave baseball players hitting homeruns, then they always do the catholic cross thing when they touch the plate. Ugh. —rms talk 04:13, 4 July 2010 (UTC) I wrote an essay[edit] In honor of Independence Day, I wrote an essay, comparing the Tea Party to the Founding Fathers. MDB (talk) 14:20, 4 July 2010 (UTC) Germany for champion[edit] Netherlands #2, Spain #3, Uruguay #4. Italy - noooo, but Europe has done well. --91.145.73.103 (talk) 17:34, 4 July 2010 (UTC) - Is there footy on somewhere? I'm all excited about Wimbledon. Watching people scoring goals with those tennis bats was really exciting. 18:26, 4 July 2010 (UTC) - - You are just jealous because you lack my god-like ability to predict the future. --91.145.73.103 (talk) 18:46, 4 July 2010 (UTC) w00ts 4 M3![edit] I just got my acceptance letter from Human Resources Command for voluntary re-classification into military occupational specialty 51C: Acquisition, Logistics and Technology Contracting Noncommissioned Officer. Soon, I'll have a school date and be well on my way out of the world of IED detection, reconnaissance, and surveillance and into the exciting world of contract management and enforcement. I COULDN'T BE HAPPIER! The Foxhole Atheist (talk) 17:18, 3 July 2010 (UTC) - I'm happy that you're happy! Don't understand word one of it though. 17:31, 3 July 2010 (UTC) - I didn't expect you to, really. My wife doesn't either. At the end of the day, just know that the next time I deploy, I'll be jockeying a desk instead of riding shotgun as a human mine detector. As I told April, "One can only watch the engine compartment of his Humvee disintegrate so many times before he REALLY begins to reconsider his career choices." The Foxhole Atheist (talk) 17:38, 3 July 2010 (UTC) - Out of harm's way!. Great, my warm felicitations Foxxy. Lily Inspirate me. 17:58, 3 July 2010 (UTC) - Does contract enforcement in the army involve breaching shotguns and kneecaps at all? --JeevesMkII The gentleman's gentleman at the other site 19:03, 3 July 2010 (UTC) - So.. What you're saying is that you're no longer in a Foxhole? So you exist again!!! Yay!!! :) Quaru (talk) 14:34, 4 July 2010 (UTC) - Best of luck, and congratulations. I'm a gov't contractor myself (well, my company is), so you'll get to deal with people like me. We even do some work with the military, though its acquisitions and purchasing software, not stuff like tanks and bombs and planes. MDB (talk) 14:44, 4 July 2010 (UTC) - Belated congratulations, Foxy! ħuman 02:23, 5 July 2010 (UTC) - Thanks, all! It's a pretty cool early birthday present. I have to admit, I have similar butterflies to when I first joined the Army. The Acquisition Support Center world is going to be as different from Combat Arms as Combat Arms is from civilian life, I'm sure. I'm pretty excited. The Foxhole Atheist (talk) 12:38, 5 July 2010 (UTC) Hacked[edit] Fucking script kiddies. I got a message from my commercial webhost (whom I have a reseller account with) to say that the server my accounts are hosted on got hacked. The hackers just seemed to drop an index.html page into every directory in every webroot. I'm fucking fed up with linux. More secure than Windows my arse. CrundyTalk nerdy to me 15:09, 4 July 2010 (UTC) - Scifi-Meshes got hacked by some script-kiddies about a year or so ago. At least it catalysed a massive main page revamp of the site after it was bypassed so that the entire thing ran on the forum software. I mean, what do these kids think they're achieving, exactly? It's not like they're A) doing anything special or impressive B) doing it to deserving targets or C) doing something irreversible and difficult to correct. theist 19:34, 4 July 2010 (UTC) - They are achieving a safer internet. --91.145.73.103 (talk) 21:08, 4 July 2010 (UTC) - Couldn't you at least blank the names in that image, instead of giving them even more "attention"? ħuman 22:34, 4 July 2010 (UTC) - (1) Not searchable, (2) considering I'm calling them out as script kiddies rather than any kind of good hackers I don't think it matters. CrundyTalk nerdy to me 08:10, 5 July 2010 (UTC) - "Greetings 2 all Iranian hackers?" ZOMG Terrorism. Sen (talk) 09:15, 5 July 2010 (UTC) - Joy. They seem to have set up a cronjob which emails the HTML of that page to all defined email accounts on the system. However, they've been stupid enough to not actually set the email body as HTML, so everyone's just getting emails with no subject or from and a page of HTML code. Dipshits. CrundyTalk nerdy to me 09:40, 5 July 2010 (UTC) - You have got to love the irony of being able to hack a server, but they are not able to send an email properly. - π 10:05, 5 July 2010 (UTC) - Indeed. Also, I'm guessing these are being sent from a cronjob, but if I SSH in and use crontab -l I get an access denied error. They've chmodded /usr/bin/crontab to 0777, and because I'm not root on the server I can't change it back to 4755. Time to find a new webhost. CrundyTalk nerdy to me 10:09, 5 July 2010 (UTC) - theist 10:17, 5 July 2010 (UTC) - Yeah, thanks. CrundyTalk nerdy to me 10:34, 5 July 2010 (UTC) - I assume he's laughing at their inability to send an email. And that's hilarious. As a linux admin, I feel for you. I've never had my host hacked, but I've had sites that the php was hacked.. it was always a simple fix for a stupid error, but it makes me mad. And it's never even been something as complex as replacing the main.html.. it was like, a replaced 404 page.. So I didn't even find it for a good 3 weeks...Quaru (talk) 13:54, 5 July 2010 (UTC) - I had one linux box hacked where I had actually checked it for vulnerabilities every week and had yum update cronned every night. Never did find out how the fuckers got in. They were just locally dumping thousands of spam emails into sendmail. No idea where from. Ended up having to completely reinstall. CrundyTalk nerdy to me 13:59, 5 July 2010 (UTC) - The other thing that pisses me off with linux hosting is that your virtual server always runs under your account, which is fine for minimising damage if someone hacks some PHP code (like when I had an account hacked because the twats at PHPBB had called a config file without declaring it first, so hackers could call the page with their own version from the web on the querystring if register_globals was on (which it always is on shared hosting)), but on almost all Windows shared hosting you get two accounts. Yours, and an IUSR_username account which has restricted permissions, so even if they do hack your site they can't change any web files anyway. CrundyTalk nerdy to me 14:02, 5 July 2010 (UTC) Belgian Christians show remorse for paedo priests, NOT[edit] Death threats to witnesses & magistrates. Hat tip 16:06, 4 July 2010 (UTC) - (Aside) The paedopriest thing seems to be truly world-spanning. 16:12, 4 July 2010 (UTC) - It seems that it's mainly the Catholic church, so it's not surprising that when you tell someone that they cannot indulge in one of the most basic urges of living animals but then give them a degree of power over weaker individuals which is reinforced by the fear of eternal damnation if they open their little gobs, that this sort of thing happens. Lily Inspirate me. 18:20, 4 July 2010 (UTC) - On the bright side, this sort of response shows that the police are taking it very seriously, something that I've yet to see elsewhere. theist 19:30, 4 July 2010 (UTC) - Yes, full marks to the Belgian police on that one. It would be interesting to see what would happen if their example were copied. We get a constant drip drip of these stories in Spain but they rarely seem to make the international news. --BobSpring is sprung! 12:02, 5 July 2010 (UTC) Ads by google[edit] Hee: - MI5 is Recruiting - Intelligence Analysts - London - Find out more today and apply - Well it amused me. 23:33, 4 July 2010 (UTC) - I don't get it? Does MI5 not hire people normally or something? The FBI and CIA advertise for employees all the time, I had just assumed it was the same.--talk 09:31, 5 July 2010 (UTC) - They used to have a shoulder-tap policy, but a few years ago they opened recruitment to the public. CrundyTalk nerdy to me 10:38, 5 July 2010 (UTC) Waddya think?[edit] Thinking of sending this to t'beeb. opinions? 00:18, 5 July 2010 (UTC) - Very nice! ħuman 00:31, 5 July 2010 (UTC) - Awesome picture. Do it. CrundyTalk nerdy to me 09:37, 5 July 2010 (UTC) Wikipedia down?[edit] I haven't been able to access for a couple hours or so, the firefox phail message has changed to the mediawiki "wiki has phail" message. ħuman 02:18, 5 July 2010 (UTC) Best name ever[edit] [2] CrundyTalk nerdy to me 11:08, 5 July 2010 (UTC) - I must say that website is quite interesting. Anyone lent money through it before? - π 12:40, 5 July 2010 (UTC) - Yup, I was going to post something on here in a bit trying to add recruits to the FSM team, as we are locked in a (friendly) battle against the Mormon team for which team has the most loans. It's a good way to use up a bit of extra cash at the end of the month, and you (usually) get it back at the end of the loan period anyway. So sign up here: CrundyTalk nerdy to me 12:43, 5 July 2010 (UTC) - I did notice that the agnostic, atheist, freethinker team was the largest. When I get my tax return I think I will join up. Looks like a much better way of helping people than just giving money to charities once a month to do who knows what with the money. For capitalism to work people need capital. - π 12:51, 5 July 2010 (UTC) - The atheist team don't need the extra people! Join the great noodly one and help defeat the mormons! CrundyTalk nerdy to me 12:52, 5 July 2010 (UTC) - Whilst you are streaks ahead in members, you are not much further ahead in terms of loans. This is expected, as Pastafarians are far less charitable as can be seen in the article Pastafarianism and Uncharitableness. - π 13:05, 5 July 2010 (UTC) - It is a bit odd that. They created the group about 2 days before the FSM one, so it isn't because they've been on longer. I think the main problem was that the FSM members used to loan more per loan rather than more loans (i.e. they'd make one loan of $50 instead of 2 of $25, thus we have lent more cash but for fewer loans). CrundyTalk nerdy to me 13:26, 5 July 2010 (UTC) - Yup, FSM group is average $32.35 per loan, mormons are $26.84 per loan. CrundyTalk nerdy to me 13:27, 5 July 2010 (UTC) Vote now![edit] Send Justin Bieber to North Korea! EddyP (talk) 13:31, 5 July 2010 (UTC) - I voted. - π 13:34, 5 July 2010 (UTC) - Direct link. I would have sent him to Afghanistan to entertain the troops, the question then would be which side would shoot him first? - π 13:37, 5 July 2010 (UTC) - Done. Let Kim Jong Il deal with him. CrundyTalk nerdy to me 13:56, 5 July 2010 (UTC) - I don't get what dicks on the internet have against Bieber. He's a pop-tartlet manufactured to sell records to kids under 15. We've had those for freaking decades. Get over it you sad, sad little freaks. theist 15:04, 5 July 2010 (UTC) - Passably funny, but it's not like he's going to go there, is it?-- Kriss AkabusiAAAWOOOGAAAR!!1 15:42, 5 July 2010 (UTC) Soccer Is a Socialist Sport[edit] Says Marc ThiessenHat Tip (I never know whether to put things like this in Blog, Clog or World, so I dump 'em here) 15:51, 5 July 2010 (UTC) - Football brings people together in a way men like him will never understand. The "World Series" encompasses the US and Canada, whereas events such as the FIFA World Cup actually involve the rest of the world. SJ Debaser 16:24, 5 July 2010 (UTC) - ........HI, TK!!!!. P-Foster (talk) 16:41, 5 July 2010 (UTC) - Yeah, it's made it to WIGOCP. 16:59, 5 July 2010 (UTC) - I wonder, if not using your hands counts as socialist, how many sports does that entail... What about Tennis or Hockey, you can't use your hands, you have to use a little stick or net... But that is indirectly controlled by the hands, so I guess it's still safe.... Hmmmmm SirChuckBI have very poor judgement 17:40, 5 July 2010 (UTC) - Actually you can use your hands, you simply can't use them to touch the ball or harass other players. Which is called a f-ing rule, which is the artificial limitation put in sports in order to make sports interesting, like the "don't put a motor on it" rule in bicycle racing or the "scores are awareded for shooting the targets, not rocks" in shooting, or the "go around the flag poles" in skiing. So you can flap your hands around, or make hand signals or something, there simply isn't anything else to do with them in that particular situation. Clearly, some people think that the artificial limitations in all sports ought to be the same, rather than what large and exremely large sums of money making private organisations want them to be, which is of course, a rather collectivist attitude. Sen (talk) 17:50, 5 July 2010 (UTC) - Indeed, actually every player needs their opposable thumbs (hey TK what about the other primates, the Panda's "thumb", etc.), the goalie can use their hands in their crease and players throw the ball back in from out-of-bounds on the sidelines. F'ing idiot. Oh, and "hooligans"? Ever been in Boston when the Yankees are in town or vice versa? ħuman 20:42, 5 July 2010 (UTC) - Makes me want to have Maradona --194.197.235.240 (talk) 18:01, 5 July 2010 (UTC) - Football is basically a working class sport as it has a low barrier to entry. Any kid can learn to play with just a home made ball all though a cheap full size plastic one is not beyond reach and can be shared amongst a large group. Millions of poor kids around the world even play in bare feet and you only need a patch of open ground which could be a street, a courtyard or a field. Lily Inspirate me. 18:10, 5 July 2010 (UTC) - You know what, if this is the norm, possibly NSFW, depending on where you work I'll take Football over any other sport in the world. SirChuckBCall the FBI 18:12, 5 July 2010 (UTC) - I notice that they only had one entry for Korea, presumably from the southern half - I'm not saying that Commies are ugly, rather that Kim wotsit probably doesn't let them out to play. About half were lads mag soft porn but the other half were genuine fans. Jack Hughes (talk) 18:17, 5 July 2010 (UTC) - I noticed both of those things myself, but considering Kim Jong paid Chinese citizens to cheer for his country, I don't suppose he's letting too many Korean Cuties TM pose for the camera. As for the pseudo-porn pictures, meh. SirChuckBObama/Biden? 2012 18:22, 5 July 2010 (UTC) Quack Miranda[edit] RESPECTFUL INSOLENCE mentions RatWiki. 16:15, 5 July 2010 (UTC) - I've tweaked our Quack Miranda Warning article a little & added a query on the talk page, as it's not completely clear whether QMWs are a legal obligation as such or a bit of loopholing by the quacks themselves. Anyone with law smarts able to help out on this issue? Also, is there any kind of general name (apart from "lies") for legal disclaimers about purpose or intent which seem to contradict the whole nature of a product? Like "this product is not intended to diagnose, treat, cure or prevent any disease", when preventing or treating something is the whole basis of the product's marketing. It reminds me of that "any similarities to persons living or dead is purely coincidental" line you see in movie credits, even in based-on-a-true-story films. WėąṣėḷőįďMethinks it is a Weasel 17:52, 5 July 2010 (UTC) - This statement or "disclaimer" is required by law (DSHEA) when a manufacturer makes a structure/function claim on a dietary supplement label. In general, these claims describe the role of a nutrient or dietary ingredient intended to affect the structure or function of the body.. - Sorry about the formatting. Jack Hughes (talk) 18:03, 5 July 2010 (UTC) - Thank you. WėąṣėḷőįďMethinks it is a Weasel 18:19, 5 July 2010 (UTC) Gay Conversion[edit] UK Independent → Secular News Daily → Pharyngula → British Medical Association labels gay conversion therapy harmful, discredited. 16:23, 5 July 2010 (UTC) - Yay! Yay! BMA! It makes you proud to be British. Jack Hughes (talk) 16:56, 5 July 2010 (UTC) Uruguay vs Ghana[edit] Heart goes out to Ghana. They deserved the win. EddyP (talk) 21:19, 2 July 2010 (UTC) - Volleyball, you're doing it right! CrundyTalk nerdy to me 21:32, 2 July 2010 (UTC) - It's all goddamn Suarez's fault, the bastard. {{SUBST:nosubst|User:Readmesoon/sig}} 02:46, 3 July 2010 (UTC) - There were 86,999 people baying for that cheating scumbag's head last night. That said, Ghana should never have fluffed the penalty. More bad refereeing tho, the ball had crossed the line before Suarez scooped it out. FIFA needs to wake up re: video evidence. Maybe somebody with a bit of gumption will replace Blatter one day. --PsyGremlinSpeak! 09:31, 3 July 2010 (UTC) - I didn't finish work until 10 last night and managed to stumble into a bar and catch penalties. Sad to see them go out. SJ Debaser 10:49, 3 July 2010 (UTC) - Watching the video of the play, didn't it look like another Uruguay player was trying to get his hands in the way, too? And I agree, it looked like the ball (or part of it, anyway, which is enough, right?) crossed the goal line. ħuman 21:35, 3 July 2010 (UTC) - No way was it a goal. Human: the rule is that all of the ball has to be past all of the line. alt (talk) 19:39, 4 July 2010 (UTC) - Thanks Alt. Yeah, no way. I watched a handful of views struggling to see if any of the ball was over any of the line, so it sure as hell didn't clear it. And on further view, the other player looked like he was doing what he was supposed to - jump as high as possible in hopes of blocking any shot in his direction. Suarez didn't appear to be balanced to jump at the right time and just did, really, what any player would do - prevent the goal by any means possible, and pay the consequences. I know it sucks to "lose a big game" over some a bit unusual like that, but it's not like he punched a ball in for a winning goal when the ref wasn't looking. Ghana had several chances to win, they weren't able to convert penalty kicks when they needed to. ħuman 00:46, 5 July 2010 (UTC) - I wouldn't mind, but his attitude towards what he did stinks: - No apology. CrundyTalk nerdy to me 08:02, 6 July 2010 (UTC) In other news... CW[edit] Sometime last year I applied to edit at CreationWiki. Today I got a password! I have been accepted (and I didn't lie on the application form), yea! Any ideas what I should do there? ħuman 02:19, 5 July 2010 (UTC) - Seems like they're lacking a scholarly article about god's finest creation: The pacific northwest arboreal octopus. --JeevesMkII The gentleman's gentleman at the other site 06:12, 5 July 2010 (UTC) - OOOh good one! ħuman 06:20, 5 July 2010 (UTC) - Do they have any articles on building tools? Lily Inspirate me. 06:33, 5 July 2010 (UTC) - You have to apply? What's the point of that? theist 09:22, 5 July 2010 (UTC) - To stop people joining. - π 10:19, 5 July 2010 (UTC) - I noticed that you are on the noncreationist list. Are there any obvious editing abilities you are missing? The special page that tells you the rights is disabled. - π 10:22, 5 July 2010 (UTC) - Their site rules state: -. - So don't imagine that you're going to make a lot of contributions. Though that does say "creationist" with a rather wide definition rather than "YEC", so you might be in with a chance.--BobSpring is sprung! 12:35, 5 July 2010 (UTC) - Unless you want to say "I've noticed a spelling error, where you say there are 'no' transitional forms, it should read 'lots of'". But still, kind of proves creatards can't stand the heat of actual open research. theist 15:06, 5 July 2010 (UTC) - They seem to be obsessed with plants, if the first handful of "randoms" I hit are anything to go by. ħuman 22:05, 5 July 2010 (UTC) - All things bright and beautiful - - Each little flower that opens, - Each little bird that sings, - He made their glowing colors, - He made their tiny wings. - Let's try and sweep verse 3 under the carpet though. Lily Inspirate me. 09:23, 6 July 2010 (UTC) - That was a source of embarassement for me recently. We went to one of the wife's friend's wedding, a church do, and that was one of the hymns we had to sing. When we got to "The purple headed mountains" I thought nothing of it, but looked over to the wife who was looking at me and smirking. This in turn made me smirk, which made her start laughing quietly, which made me laugh. In the end we were both quietly giggling like schoolkids and she even started crying with laughter a bit. Hope no-one saw us :-\ CrundyTalk nerdy to me 09:49, 6 July 2010 (UTC) - Doesn't seem to match with Lily's link? Or did I get it wrong? ħuman 09:55, 6 July 2010 (UTC) - Ah, never mind, I see Lily's point there. ħuman 09:56, 6 July 2010 (UTC) - Also, the church had a huge homemade stiched picture with the text "Jesus will return to save us" at the bottom. I regretted that I didn't bring a [citation needed] sticker with me. CrundyTalk nerdy to me 10:19, 6 July 2010 (UTC) - My last giggle-loop in church was because the floor tiles looked remarkably like swastikas (not to mention the torture porn everywhere). But I'm not surprised they conveniently "forget" that verse, especially in the school version, as most hymms are depressingly awful. They all have the same tune and lyrics that basically go "oh God, aren't we shit and feckless while you're the complete and utter tits, can we suck you off now for, you know, being oh so kind and generous by making our lives hell, we promise never to mention all the babies you killed?" theist 10:33, 6 July 2010 (UTC) - Think you might be onto a winner with that one. Submit it to the Christian hymns publishers for review. CrundyTalk nerdy to me 10:45, 6 July 2010 (UTC) - I know of a Methodist church, which was built before Hitler came to prominence, which has a swastika carved in relief (along with a bunch of other symbols) on an outside wall. Lily Inspirate me. 18:12, 6 July 2010 (UTC) Dendezia, Wolbachia, and Onchocerca, the Lord God created them all... CS Miller (talk) 18:08, 6 July 2010 (UTC) - "All things Dull and Ugly"... --Gulik (talk) 20:15, 6 July 2010 (UTC)
https://rationalwiki.org/wiki/RationalWiki:Saloon_bar/Archive66
CC-MAIN-2022-21
refinedweb
20,652
71.85
Hey, Scripting Guy! I need to be able to connect to two Group Policy objects (GPOs) in Active Directory and make an offline copy of the GPOs using Windows PowerShell 2.0 so that I can compare the two objects. I know I can do this using the Group Policy Management Console, but I have several hundred GPOs in my domain and I do not have the time to go through the GUI and click-click-click. I would prefer to be able to script this operation using Windows PowerShell, if possible. Ideas? -- SV Hello SV, Microsoft Scripting Guy Ed Wilson here. l am anxious to complete our discussion of the Compare-GPO.ps1 script. As you may recall, yesterday we looked at the portion of the script that determined if the GroupPolicy module was available and loaded, and we also looked at the function that downloaded the two GPOs to be compared. Because the Compare-GPO.ps1 script is more than 125 lines long, I have posted it to our Script Repository rather than pasting it into this post. Note: This is part two of a two-part article. Part one was posted yesterday. Note: This is part two of a two-part article. Part one was posted yesterday. The Compare-XMLGPO function is used to compare two XML reports of GPOs. It accepts an array of strings that point to the two XML files that will be used for comparison. It does not matter if more than two GPO reports are supplied because only the first two will be compared. The two Boolean values, $user and $computer, control which portion of the GPO is compared. If both values are present, both the computer and the user portion of the GPO will be compared. The [xml] type accelerator is used to ensure the contents of the two GPO reports are interpreted as XML. Reading the XML GPO reports is really easy—the Get-Content cmdlet is used. The $xml1 and $xml2 variables contain a system.xml.xmldocument .NET Framework object. This section of the script is shown here: To effectively parse the GPO XML report, you must know the structure of the XML document. I like to use XML Notepad. As shown in the next image, the path to our GPO policy settings is GPO/User/extensiondata/extension. Each policy setting is a node under the extension folder. This particular GPO setting is in an XML namespace (XMLNS) called q1. Therefore, each policy setting is in a node called q1:Policy. At times you will see an XML namespace called q2 or even something else. But each policy node will have the word policy in it. The breakdown between user and computer in the structure of the XML document corresponds with the Group Policy computer settings and user settings. To compare the two GPOs, the childnodes property from the System.Xml.XmlElement .NET Framework class is used to obtain a collection of all the policy nodes under the extension element. There are many attributes associated with the policy element, but to make the comparison easier, only two attributes—the name and the state of the GPO—are selected. This selection is made for both the computer GPO and the user GPO from both XML documents. This section of the script is shown here: It is quite possible; in fact, it is a probability that one or more of the GPOs will not contain both the computer section and the user section of the GPO. An error will occur if you try to compare an empty GPO. Therefore, the if statement is used to determine if there is anything in the computer section or the user section of the GPO. If the variable is not null, a Try/Catch block is used to perform the comparison using the Compare-Object cmdlet. When using the compare-object cmdlet, it is important to specify the property that will form the basis of the comparison. Otherwise, Windows PowerShell will pick a property that may or may not work well for your particular application. I am interested in GPOs that contain similar settings, and therefore I told the Compare-Object cmdlet to include equal settings that exist in the reference object and the difference object. If you are only looking for duplicate settings that exist in GPOs, you may wish to use the –excludedifferent switch so that your report will only contain duplicate settings. The order in which the GPOs are listed could make a difference depending on what you are looking for. It definitely will impact how you read the report that is generated. This section of the script is shown here: On the other hand, if one of the portions of the GPO is empty, the settings of the GPO that is not empty are listed on the Windows PowerShell console. This is shown here: If there are no settings to display from a particular GPO, a message to that effect is displayed on the Windows PowerShell console. This section of the script is shown here: The same code is repeated for the other computer node: If a user section of the GPO exists, a Try/Catch is used to attempt to compare the two user portions of the GPO. If an error occurs, the Catch block is used to determine which portion of the GPO is empty, and it will display a message indicating that the GPO is empty. If a GPO has settings, the settings will be displayed. This code, shown here, is nearly the same as that for the computer portion of the script: When testing the script to ensure it reports accurately the settings in my two GPO files, I used the compare feature in XML Notepad. The compare feature is under View/Compare XML Files. As shown in the following image, the color coding makes it easy to spot modifications, additions, and deletions. The entry point to the script first determines if the –user or–computer switch has been used. If neither is present, the script displays a message and exits. You could change this behavior and set one or the other as the default. The code to do this is shown here: The code as it exists in the Compare-GPO.ps1 script is shown here: The Get-MyModule function is used to load the GroupPolicy module. If the module is not found on the system, the script exits: Next, the Get-GpoAsXML function is used to retrieve the two GPOs specified in the $gponame variable. The Get-GpoAsXML function returns the path to the two GPOs. This returned array of paths is stored in the $gpoReports variable, as shown here: When the script runs, output is shown similar to that in the following image. When testing a script that uses switched parameters in the Windows PowerShell ISE, I will set the switched value to $true. This is also seen in the following image. SV, that is all there is to using Windows PowerShell to compare two XML Group Policy objects. This also concludes Group Policy Week. Join us tomorrow for Weekend Scripter when we will talk about using Windows PowerShell to clean up a CSV file. We would love for you to Twitter or Facebook. If you have any questions, send email to us at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace. Ed Wilson and Craig Liebendorfer, Scripting Guys Hi guys, I have an issue with the following lines : [xml]$xml1 = Get-Content -Path $gpoReports[0] [xml]$xml2 = Get-Content -Path $gpoReports[1] I used that syntax also in a different script and found out that it only seems to read the first line. In your script I get as final result that neither computer settings not users settings have been set. From my experiences from my other script I believe the issue comes from the two lines above. If I have the script to show me the content of $xml1 I get the following result: xml : version="1.0" encoding="utf-16" GPO : GPO And that's it. Looking at the XML in Notepad the first line reads like this: <?xml version="1.0" encoding="utf-16"?> Are there alternative ways to get the data displayed correctly ? Regards Markus I am getting the following error... PS C:\Windows> C:\Scripts\PowerShell\Compare-GPO.ps1 Missing expression after unary operator '-'. At C:\Scripts\PowerShell\Compare-GPO.ps1:95 char:10 + - <<<< DifferenceObject $regpolicyUserNodes2 -SyncWindow 5 -IncludeEqual ` + CategoryInfo : ParserError: (-:String) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingExpressionAfterOperator Ok, I got past my previous error, it was an issue with a back tick from the copy and paste. However, it would seem the script is not working still... PS C:\Users\usera\Documents\WindowsPowerShell> .\Compare-GPO.ps1 -user Comparing User GPO's C:\fso\TS All Users Policy.xml to C:\fso\TS All Users Policy1.xml User GPO C:\fso\TS All Users Policy.xml not set User GPO C:\fso\TS All Users Policy1.xml not set PS C:\Users\usera\Documents\WindowsPowerShell> I am watching the fso folder while the script run and it creates the first xml file, and then the second gets created only after the output above is given. I tried various pauses, but that doesn't seem to help. Hey Scripting Guy, when I try to run this script, it tells me the '$path' is empty, even though I've filled in the path variable (even if I hadn't changed the script to my path and domain information, it still should not have been empty). I'm running Powershell 4 on Win7. I'm not sure how to resolve this - any suggestions?
http://blogs.technet.com/b/heyscriptingguy/archive/2010/07/16/hey-scripting-guy-how-can-i-connect-two-group-policy-objects-in-active-directory-and-compare-them-offline-part-2.aspx
CC-MAIN-2014-23
refinedweb
1,620
63.29
I have to confess that I like the ternary operator. K&R obviously liked it, as it is heavily featured in their seminal work. However after running experiments on a wide range of compilers I have concluded that with the optimizer turned on, you are better off with a simple if-else statement. Thus next time you write something like this: y = (a > b) ? c : d; be aware that as inelegant as it is in comparison, this will usually compile to better code: if (a > b) { y = c; } else { y = d; } I find this frustrating, as I’ve consumed 8 lines doing what is more easily and elegantly performed in 1 line. I can’t say that I have any particular insight as to why the ternary operator performs so poorly. Perhaps if there is a compiler writer out there, they could throw some light on the matter? Next Tip Previous Tip Tags: ternary operator I just did a quick test with gcc 4.3.3, with a function that just does "return (a > b) ? c : d;" and another one with the equivalent if/else. It generates identical assembly for me on both amd64 and arm. I’m not surprised. While I have seen compilers generate the same code for both the ternary operator and the if/else construct, I have never seen a case where the compiler generates better code for the ternary operator. Conversely, I have seen cases where the compiler generates better code for the if/else construct than it does for the ternary operator. On some platforms, this form is even more efficient:y = d;if (a > b) { y = c;}provided that y is a regular RAM-based variable. If not, e.g. it is a memory-mapped UART transmit data register, the double assignment could (and will) have disastrous side effects.Use with caution. I've found the ternary operator creates the same assembly as the control structure. I think with modern, optimizing compilers, it really a matter of syntaxtic preference. I guess I'll just point to my previous comment. I would add, that as compilers improve (even cheap ones) this should become less of an issue. Indeed, unless I'm writing a time critical piece of code I'll use the operator that more naturally fits the problem. Just ran a test with HC08 and CodeWarrior — ternary operator uses 4 more bytes than if/else in one particular test case. I've seen the same as Nigel – often the ternary operator is worse.I still use it where it improves readability of the source and I don't care about performance.I guess the lesson is – think about what you write. Write with maintenance, readability AND performance in mind. Know what the compiler does (ie go in with your eyes open), and then write whats best for the situation you are handling. I use them usually only for printf():printf( "%s", (bletch ? "foo" : "bar") );otherwise I use if() else for clarity. I normally dofoo = 0;if( bar ) foo = 1;because this handles the default case && the exceptional case. The printf() comment reminds me of something else… Nigel, since you said you are often interested in people's weird coding conventions, this one might fit the bill. Want to guess why I write:char tmp1[10];char tmp2[10];char tmp3[10];char final[50];snprintf(tmp1, "%7.1f", f1);snprintf(tmp2, "%7.1f", f2);snprintf(tmp3, "%7.1f", f3);snprintf(final, "%s %s %s", tmp1, tmp2, tmp3);Answer:Because one of the compilers/libraries (still haven't found the culprit) used for our code can't handle multiple double arguments to a varargs call!If I do it the conventional way with "%7.1f %7.1f %7.1f" instead, I either get garbage output, or the program hangs.My guess is this has something to do with poor floating point emulation and/or different ways of stacking doubles versus ints/ptrs/etc. My personal favorite “do not use unless absolutely necessary” construct is modulo. Modulo looks simple and elegant when written, but try it out — write a simple modulo construct, compile it and look at the assembly output. It’s horrific. Think the problem through and simplify it instead. I haven’t yet found a modulo solution I couldn’t implement much more simply and completely by rethinking the problem, resulting in code that’s as accurate, uses less memory, and runs quicker. Hello Nigel, Interesting post. Can you add some examples of code generated for the ternary operator and for the if/else construct, for comparison? That would make the post more complete. Thanks! I will see if I can dig up some examples. “I find this frustrating, as I’ve consumed 8 lines doing what is more easily and elegantly performed in 1 line.” You mean you’ve expressed more clearly in 4 lines what you could have obfuscated in 1 line. I’ve disassembled the generated object module from the following C-module constisting only of these two functions. The compiler is gcc 4.5.2 on a x86 processor. int f1(int a, int b, int c, int d) { int y ; y = (a > b) ? c : d ; return y ; } int f2(int a, int b, int c, int d) { int y ; if (a > b) { y = c ; } else { y = d ; } return y ; } The generated assembler code is exactly the same for both functions. Even better cause of the CMOVcc instruction of the x86 processor the generated code is branchless. Disassembly of section .text: 00000000 : 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 8b 45 0c mov 0xc(%ebp),%eax 6: 39 45 08 cmp %eax,0x8(%ebp) 9: 8b 45 14 mov 0x14(%ebp),%eax c: 0f 4f 45 10 cmovg 0x10(%ebp),%eax 10: 5d pop %ebp 11: c3 ret 00000012 : 12: 55 push %ebp 13: 89 e5 mov %esp,%ebp 15: 8b 45 0c mov 0xc(%ebp),%eax 18: 39 45 08 cmp %eax,0x8(%ebp) 1b: 8b 45 14 mov 0x14(%ebp),%eax 1e: 0f 4f 45 10 cmovg 0x10(%ebp),%eax 22: 5d pop %ebp 23: c3 ret Yes. I have come across plenty of compilers that perform as gcc has done here. However I have also come across a number of compilers, particularly for low end embedded systems where this is *not* the case. After reading your post, I’m just wondering why compilers treat a ternary operator different then a simple “if() {} else {}” at all ? I always thought of the ternary operator as just a more compact form of an “if” statement, with only the added benifit that one can use them in an initializer … The ternary operator is a foul, ugly beast and should have been shot at birth! Hi, I’m reading this post and I got some mixed feelings about this tip. Ternary operator is very comfortable and I use it quite often for the construction with single thing to do inside the if or else body. I always thought that there is no difference between if … else construct and ternary and now I’m a little bit confused. I read also some manuals how to write efficient code and in none of them was such a claim. @Nigel, are you able to give us example of the compilers which generate actually worse code with using of ternary operator ? I’ll begin some testing with compilers which I got currently namely gcc, arm-none-eabi-gcc, clang , ghs. In my application, on an 8bit microcontroller using gcc, ternary saves me one line in assembly over if..else.. so it is definately platform dependant. My case it was being used in an interrupt routine, and speed is my friend. IMO it is also much easier to read, in my situation of course. The real reason not to use the ternary operator is because it causes maintenance/readability issues and it isn’t compliant with MISRA-C rules. I would MUCH rather have the 8 line if/else block spelled out than a single line. LOC doesn’t matter anyway – architect your modules so that you don’t end up with 1000’s of lines in a file and you’re fine. LOC is not a good measure of code quality, one way or the other. Ternary operations are generally used by programmers who think they are especially clever and generally they try to do other “tricks” in their code that end up being a maintenance nightmare. Simple code and first-glance-readable code will always be better than tricks and clever solutions from a long term perspective.
http://embeddedgurus.com/stack-overflow/2009/02/efficient-c-tips-6-dont-use-the-ternary-operator/
CC-MAIN-2015-22
refinedweb
1,437
62.68
Provided by: libtickit-dev_0.2-5_amd64 NAME tickit_utf8_count, tickit_utf8_countmore - count characters in Unicode strings SYNOPSIS #include <tickit.h> typedef struct { size_t bytes; int codepoints; int graphemes; int columns; } TickitStringPos; size_t tickit_utf8_count(const char *str, TickitStringPos *pos, const TickitStringPos *limit); size_t tickit_utf8_countmore(const char *str, TickitStringPos *pos, const TickitStringPos *limit); size_t tickit_utf8_ncount(const char *str, size_t len, TickitStringPos *pos, const TickitStringPos *limit); size_t tickit_utf8_ncountmore(const char *str, TickitStringPos *pos, const TickitStringPos *limit); Link with -ltickit. DESCRIPTION tickit_utf8_count() counts characters in the given Unicode string, which must be in UTF-8 encoding. It starts at the beginning of the string and counts forward over codepoints and graphemes, incrementing the counters in pos until it reaches a limit. It will not go further than any of the limits given by the limits structure (where the value -1 indicates no limit of that type). It will never split a codepoint in the middle of a UTF-8 sequence, nor will it split a grapheme between its codepoints; it is therefore possible that the function returns before any of the limits have been reached, if the next whole grapheme would involve going past at least one of the specified limits. The function will also stop when it reaches the end of str. It returns the total number of bytes it has counted over. graphical. tickit_utf8_countmore() is similar to tickit_utf8_count() except it will not zero any of the counters before it starts. It can continue counting where a previous call finished. In particular, it will assume that it is starting at the beginning of a UTF-8 sequence that begins a new grapheme; it will not check these facts and the behavior is undefined if these assumptions do not hold. It will begin at the offset given by pos.bytes. The tickit_utf8_ncount() and tickit_utf8_ncountmore() variants are similar except that they read no more than len bytes from the string and do not require it to be NUL terminated. They will still stop at a NUL byte if one is found before len bytes have been read. These functions will all immediately abort if any C0 or C1 control byte other than NUL is encountered, returning the value -1. In this circumstance, the pos structure will still be updated with the progress so far. USAGE Typically, these functions would be used either of two ways. When given a value in limit.bytes (or no limit and simply using string termination), tickit_utf8_count() will yield the width of the given string in terminal columns, in the limit.columns field. When given a value in limit.columns, tickit_utf8_count() will yield the number of bytes of that string that will consume the given space on the terminal. RETURN VALUE tickit_utf8_count() and tickit_utf8_countmore() return the number of bytes they have skipped over this call, or -1 if they encounter a C0 or C1 byte other than NUL . SEE ALSO tickit_stringpos_zero(3), tickit_stringpos_limit_bytes(3), tickit_utf8_mbswidth(3), tickit(7) TICKIT_UTF8_COUNT(3)
http://manpages.ubuntu.com/manpages/eoan/man3/tickit_utf8_count.3.html
CC-MAIN-2021-31
refinedweb
487
51.68
I am kind of a noob with Raspberry Pi so I guess it is probably a dumb question. Still, I have lost so much time upon it that any idea would be greatly appreciated. I would like to record a 10 sec video at 60 fps. The code is below: The issue is that, although in the preview everything is fine, the final product has missing frames. My feeling is that every sec or so the camera loses a frame, kind of like it is trying to autocheck itself or similar. Code: Select all import picamera import time input('Press enter to start recording') with picamera.PiCamera() as camera: camera.resolution = (640,480) camera.framerate=30 # camera.start_preview() # input('Press enter to start recording') # camera.stop_preview() camera.start_recording('my_video.h264') camera.wait_recording(10) camera.stop_recording() print('Record done') Am I perhaps missing something basic? Thanks!
https://www.raspberrypi.org/forums/viewtopic.php?t=253483&p=1550148
CC-MAIN-2020-40
refinedweb
145
58.38
XML Translations with ITS 2010-10-27 When I first started doing GNOME documentation, our documents were translated manually, as a whole, and with no change-tracking. That is to say, they were never translated. Then Danilo came along and wrote xml2po, and I integrated it into the build utilities in gnome-doc-utils. Suddenly, all our XML documents could be translated with standard PO files. And we started seeing actual documentation translation. Fast forward six years. We’re still using xml2po, and it’s serving us well. Various web-based translation editors and trackers have appeared that can handle XML documents. Some of them use xml2po underneath; some use the same concepts in their own implementation. Meanwhile, the W3C created ITS, a common vocabulary for specifying things that translators and translation tools might want to know about an XML format. But we’re not using it, and I don’t know anybody in the greater GNOME ecosystem who is. Presenting itstool: an ITS-based tool for converting XML files to PO files and back again. This is an experiment I started over the weekend. The idea is to have a general xml2po-like tool that contains no vocabulary-specific logic. All it knows is XML and ITS, and everything you need to know about a format is specified with an ITS rules files. Look at the Mallard ITS file as an example. The basics of how to handle Mallard are in 13 lines. This has a lot of potential. For starters, you don’t need to patch a program or write a plug-in to support a new XML vocabulary. All you need to do is provide an ITS file. There’s a chance that the people who developed the vocabulary will already have ITS definitions in place. What’s more, you can embed ITS attributes and rules directly into your XML document, extending or overriding global rules. This is huge. This is the “mark something as untranslatable” feature that translators want, provided by a W3C recommendation that other tools might actually understand as well. For an example, take a look at the DocBook Element Reference for Mallard. If you convert this to a PO file using itstool, you’ll see a bunch of messages that look like this: msgid "<code href=\"\">abbrev</code>" Yawn. It’s some markup, and a URL, and the name of an XML element. Nobody needs to translate that, but there’s no way a general tool can know that. But the author knows, so the author can use the its:translate attribute to save the translators some work: <td its:<p> <code href="">abbrev</code> </p></td> Problem solved. This one pesky message will no longer appear in the PO file. That’s a big step forward for us. Unfortunately, there are 417 of those on that page. That’s a lot of typing. Fortunately, ITS also provides a standard way to specify rules, and you can put those rules directly inside your document. For this page, I happen to know that the first column of every row is untranslatable. And I know there’s no row spanning that would cause the first td to be in anything other than the first column. So rather than type its:translate="no" 417 times, I can put what I know right in the XML, where itstool can find it. <its:rules xmlns: <its:translateRule </its:rules> We can just put this inside a Mallard info element. This is valid because Mallard allows any element from an external namespace inside the info element. And now itstool drops all 417 of those pesky messages from the PO file. There are some bits that ITS doesn’t provide, and for those, we’ll need extension rules. Annoyingly, ITS doesn’t have a rule to specify space-preserving elements. I think the idea is that your DTD or XSD can specify this using xml:space. But I come from the RELAX NG school of thought, where validation is validation, and processing logic is something else. The two formats I care about most, DocBook and Mallard, are both RNG-based, so I had to create an extension rule for that. That’s done. Then we have xml2po’s awesome ability to create messages for external files like images. We can’t translate the images using xml2po, of course. But xml2po can let translators know when images have changed, or when new images were added. That’s another extension rule. It’s not in yet, but I have a syntax for it, and I think it will be easy. Finally, there’s translator credits. This one is harder, but I think it can still be specified in XML as an extension. I have a prototype of how the XML might look in the ITS files for DocBook and Mallard, but no working code yet. Some things were easier than with xml2po’s approach, and some things were harder. On the whole, I think the ITS-based approach can take us further, and lines up more with standards that exist outside GNOME. I’m going to keep experimenting with this, and perhaps try to get in touch with other ITS folks. We’ll see where it goes. 2010-10-27 at 23:04 Nice work! 2010-10-28 at 8:58 Great work! I’ve liked the idea of ITS since I heard about it, but have never had the time to work on supporting it in the Translate Toolkit. Would you be interested in merging it into the Translate Toolkit, maybe? We can then easily support output to other translation formats, which might open up things for a wider user base, not just those who use PO based tools (like most of us in FOSS). Then you can also have more hands to maintain it, I hope. I’d love to discuss this with you at some stage. 2010-10-28 at 14:29 F Wolff, that does sound interesting, although I’d be worried about the potentially heavy dependency for GNOME builds. On the other hand, Translate Toolkit seems to be able to do some (but not all) of what intltool does for our non-document translations. If it were a One True Translation Tool, I’d certainly want to get in on that. Are there any projects using Translate Toolkit’s command-line tools in their build system?
http://blogs.gnome.org/shaunm/2010/10/27/xml-translations-with-its/
CC-MAIN-2014-52
refinedweb
1,069
73.47
- ×Show All Chimee Introduction Chimee is a web video player created by the Qiwoo Team. It's based on the web video element. It supports multiple media streams, including mp4, m3u8, flv, etc. In most situations, we need to support complex functions based on video, such as many videos or advertising. It's hard to maintain them if you we just write it based on the video element. So we may need to have an iframe to sort out the logic and handle the communication. So Chimee offers a plugin system, so that anyone can split your complex functions into multiple plugins. Through this method of development, developers can decouple logic to achieve a quicker, gray-scale release and implement many other functions with relative ease. Chimee helps developer to reach complex video capabilities from scratch easier and quicker. Features Chimee is a web video player. - It supports multiple video stream including mp4, m3u8, flv, and more. - It solves most of the compatibility problems including cross-browser fullscreen, autoplay, and playing inline. What's more, it's also a component framework based on the video element. - It helps us to split complex functions off into multiple plugins. - Each plugin can work on the video element directly and easily. - This framework sorts out the hierarchical relationship between plugins, which will keep us free from the z-indexproblem. - It provides a variety of modules such as a transparent plugin, a penetrating plugin, an inner plugin, and an outer plugin, which will cover most of the interactive scenarios. - It offers us convenient ways to communicate between plugins. - It allows us to define plugin priority, which has been useful in making the advertising plugin work as expected. - It also supports asynchronous plugins. Installation npm npm install --save chimee cdn You can get the cdn url on. If you are in china, you can get the cdn url on. Usage You can use Chimee directly. Assuming you have a divwhose id is wrapper: <body> <div id="wrapper"> </div> </body> You can then setup Chimee on it: import Chimee from 'chimee'; const chimee = new Chimee('#wrapper'); chimee.on('play', () => console.log('play!!')); chimee.load(''); chimee.play(); // play!! Sometimes we need more customization; Chimee can be called by passing in an object: import Chimee from 'chimee'; const chimee = new Chimee({ wrapper: '#wrapper', src: '', controls: true, autoplay: true, }); If you need to play video in flv or hls, you can simply add those kernels: import Chimee from 'chimee'; import flv from 'chimee-kernel-flv'; import hls from 'chimee-kernel-hls'; const chimee = new Chimee({ wrapper: '#wrapper', src: '', controls: true, autoplay: true, kernels: { flv, hls } }); chimee.play(); Or you can try installKernel, and then use it: import Chimee from 'chimee'; import flv from 'chimee-kernel-flv'; import hls from 'chimee-kernel-hls'; Chimee.installKernel(flv); Chimee.installKernel(hls); const chimee = new Chimee({ wrapper: '#wrapper', src: '', controls: true, autoplay: true, kernels: [ 'flv', 'hls' ], }); chimee.play(); If you want to know more about Chimee, please read more on our API docs, here. However, if you use Chimee directly, it's best to add this style to your page: container { position: relative; display: block; width: 100%; height: 100%; } video { width: 100%; height: 100%; display: block; background-color: #000; } video:focus, video:active { outline: none; } Chimee will simply use the default styles of browsers if you do not use any plugins. But you may want to try our UI plugin… import popup from 'chimee-plugin-popup'; import Chimee from 'chimee'; Chimee.install(popup); const chimee = new Chimee({ wrapper: '#wrapper', src: '', plugin: [popup.name], controls: false, autoplay: true }); If you want to know more about Chimee's plugins, please read more here. If you don't want more capabilities, and just need a useful video player, you can install chimee-player, which contains the base ui and a loggerL import ChimeePlayer from 'chimee-player'; const chimee = new ChimeePlayer({ wrapper: '#wrapper', src: '', controls: false, autoplay: true }); TODO: more coming soon!~ - What is Chimee? - What is Chimee's plugin? - How do I write a plugin? - How do I write an advertising plugin?? - How do I write a UI plugin? Explanation of Different Builds You will find four different builds in the lib. Development Development/production modes are hard-coded for the UMD builds: the un-minified files are for development, and the minified files are for production. CommonJS and ES Module builds are intended for bundlers, therefore we don’t provide minified versions for them. Developers are be responsible for minifying the final bundle themselves. CommonJS and ES Module builds also preserve raw checks for process.env.NODE_ENVto determine the mode they should run in. Developers should use appropriate bundler configurations to replace these environment variables in order to control which mode Vue will run in. Replacing process.env.NODE_ENVwith string literals also allows minifiers like UglifyJS to completely drop the development-only code blocks, agressively reducing final file size. Webpack Use Webpack’s(...) Contribution Install this project npm install npm start Then open You can choose another page as you want Changelog Please read the release notes. License
https://www.javascripting.com/view/chimee
CC-MAIN-2019-13
refinedweb
843
63.19
*pi_health.txt* Healthcheck framework Author: TJ DeVries <[email protected]> Type <M-]> to see the table of contents. ============================================================================== Introduction *healthcheck* *health.vim-intro* Troubleshooting user configuration problems is a time-consuming task that developers want to minimize. health.vim provides a simple framework for plugin authors to hook into, and for users to invoke, to check and report the user's configuration and environment. Type this command to try it: :CheckHealth For example, some users have broken or unusual Python setups, which breaks the |:python| command. |:CheckHealth| detects several common Python configuration problems and reports them. If the Neovim Python module is not installed, it shows a warning: You have not installed the Neovim Python module You might want to try `pip install Neovim` Plugin authors are encouraged to add healthchecks, see |health.vim-dev|. ============================================================================== Commands and functions *health.vim-manual* Commands ------------------------------------------------------------------------------ *:CheckHealth* :CheckHealth Run all healthchecks and show the output in a new tabpage. These healthchecks are included by default: - python2 - python3 - ruby - remote plugin :CheckHealth {plugins} Run healthchecks for one or more plugins. E.g. to run only the standard Nvim healthcheck: :CheckHealth nvim To run the healthchecks for the "foo" and "bar" plugins (assuming these plugins are on your 'runtimepath' and they have implemented health#foo#check() and health#bar#check(), respectively): :CheckHealth foo bar Functions ------------------------------------------------------------------------------ health.vim functions are for creating new healthchecks. They mostly just do some layout and formatting, to give users a consistent presentation. health#report_start({name}) *health#report_start* Starts a new report. Most plugins should call this only once, but if you want different sections to appear in your report, call this once per section. health#report_info({msg}) *health#report_info* Displays an informational message. health#report_ok({msg}) *health#report_ok* Displays a "success" message. health#report_warn({msg}, [{suggestions}]) *health#report_warn* Displays a warning. {suggestions} is an optional List of suggestions. health#report_error({msg}, [{suggestions}]) *health#report_error* Displays an error. {suggestions} is an optional List of suggestions. health#{plugin}#check() *health.user_checker* This is the form of a healthcheck definition. Call the above functions from this function, then |:CheckHealth| does the rest. Example: function! health#my_plug#check() abort silent call s:check_environment_vars() silent call s:check_python_configuration() endfunction The function will be found and called automatically when the user invokes |:CheckHealth|. All output will be captured from the healthcheck. Use the health#report_* functions so that your healthcheck has a format consistent with the standard healthchecks. ============================================================================== Create a healthcheck *health.vim-dev* Healthchecks are functions that check the health of the system. Neovim has built-in checkers, found in $VIMRUNTIME/autoload/health/. To add a new checker for your own plugin, simply define a health#{plugin}#check() function in autoload/health/{plugin}.vim. |:CheckHealth| automatically finds and invokes such functions. If your plugin is named "jslint", then its healthcheck function must be health#jslint#check() defined in this file on 'runtimepath': autoload/health/jslint.vim Here's a sample to get started: function! health#jslint#check() abort call health#report_start('sanity checks') " perform arbitrary checks " ... if looks_good call health#report_ok('found required dependencies') else call health#report_error('cannot find jslint', \ ['npm install --save jslint']) endif endfunction ============================================================================== top - main help file
https://neovim.io/doc/user/pi_health.html
CC-MAIN-2017-39
refinedweb
524
58.08
Subject: Re: [boost] [BGL] StoerâWagner min-cut algorithm From: Jeremiah Willcock (jewillco_at_[hidden]) Date: 2010-06-23 10:55:12 On Wed, 23 Jun 2010, Daniel Trebbien wrote: > Hi Jeremiah, > > Thank you for your feedback. This gives me a lot to work on, which I > will be implementing soon. > > I have addressed some of your points below. > > > On 2010-06-23, Jeremiah Willcock <jewillco_at_[hidden]> wrote: >> I skimmed through your code, and saw couple of little things to change: >> >> - Boost code doesn't use tabs >> (<URL: >> >> - I don't think you need to use BOOST_DEDUCED_TYPENAME; I just use >> "typename" myself and haven't had any problems. I think it might be a >> workaround for compilers that are not used anymore. >> >> - Your header guard should start with BOOST_GRAPH_ to avoid conflicts with >> other header files. >> >> - You can replace "c.size() > 0" by "!c.empty()"; this is likely to be >> faster for many containers. >> >> - Your non-detail code should be in the "boost" namespace. >> >> - From a superficial look, it seems like maxAdjSearchList might be >> implementable as a heap (or some other priority queue) rather than as a >> multiset. Am I mistaken on that? > > You are correct that I should use a maximum priority queue. The > algorithm is best implemented with a Fibonacci heap, but I couldn't > get the C++ implementation that appeared in Dr. Dobb's Journal to > work. Granted, this was early on and the segmentation fault that I was > getting could have been caused by my own code. > > I also looked at `std::priority_queue`, but it does not implement `increasekey`. > > For this algorithm, I need to associate each vertex with a value w(A), > which is the sum of weights of edges containing the vertex and a point > in a set A of vertices. Each iteration until the priority queue is > empty, I need to select and remove the vertex u with the greatest w(A) > to be added to A, thus requiring an update (increasekey) of the w(A) > values of vertices v in the priority queue such that {u, v} is in E, > the set of edges. > > How do other BGL algorithms implement priority queues having the > `increasekey` operation? We have several heap implementations in BGL that support the increasekey operation. The one you may want to use is the d-ary heap (<boost/graph/detail/d_ary_heap.hpp>) since it seems to be the fastest in practice (although not in theoretical complexity); there are comments in that file on how to use it. Look at <boost/graph/dijkstra_shortest_paths.hpp> for example uses of several of the heaps. Note that the d-ary heap includes an indirect comparison (comparing values from a weight or distance map) natively, while some of the other heaps need the indirect_cmp function object (from <boost/pending/indirect_cmp.hpp>) to implement that. Dijkstra's algorithm uses all of the things I mentioned so you can look there to see sample code. >> - Operations on graphs and property maps (but not on tuples) need to use >> unqualified names (such as "get" and "target") in order for ADL to work on >> user-defined graph types that are not in the boost namespace. Calls to >> "tie", however, must be qualified (I had to fix many of those yesterday >> because unqualified calls to tie break C++0x compilers). > > I am not sure what you mean by "need to use unqualified names". Do you > mean without the `boost::` namespace qualification? Yes. > Also, I do not understand what "calls to 'tie' ... must be qualified" means. Those must have a namespace qualification. >> - Is there a reason that you do not handle parallel edges? Is it just a >> simplification in the code? >> >> - It looks like the code handling sOutEdges and tOutEdges is unnecessarily >> complicated. Are you just intersecting the two lists of out edges? If >> so, you can use lookup_edge (from <boost/graph/lookup_edge.hpp>) to allow >> edge lookups in constant time for adjacency matrices (however, unlike the >> map-based implementation, lookup_edge takes linear time when it must >> actually do a search). >> >> - You may want to use the macros in <boost/graph/iteration_macros.hpp> to >> simplify your code. Those macros replace explicit declarations of >> iterators and tie operations when you are doing a simple iteration through >> vertices, out edges, etc. If you use them, please include >> <boost/graph/iteration_macros_undef.hpp> at the end of your file. >> >> - Property maps are passed by copy; they are intended to be lightweight >> and using copies allows temporary property maps to be passed in. >> >> - Are users always going to pass in all of the parameters you have in your >> algorithm? If not, overloads or named parameters may be worthwhile to >> add. > > Named parameters would be good. What Boost libraries can I use for > named parameters? Although we have wanted to move to Boost.Parameter for a while, BGL currently uses its own named parameter mechanism. I don't know if it is documented anywhere; your best hope would probably be to look through another algorithm in BGL that uses named parameters and see what the calls look like. Some of the handling of property maps is complicated, though, so you may want to wait on adding named parameters until the rest of the algorithm is finished and ready to submit. -- Jeremiah Willcock Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2010/06/168385.php
CC-MAIN-2022-21
refinedweb
896
65.42
The following logs changes for the CPAN distribution Template::Pure 0.033 26 January 2017 - Copyright updates - coderef data values can now return an arrayref, which will be considered as subdirectives under the current DOM match point and data path. 0.032 22 December 2016 - Fixed distribution metadata that prevented correct installation :( 0.031 22 December 2016 - Allow a loop to assign directly to a coderef or another Template::Pure instance. - When loop is assigning directly to a datapath, respect existing scope on the CSS match. - Memoize most of the parsing, should be a speed boost for repeated renders on the same template. 0.030 13 September 2016 - Fixed regression in interator introduced by last release 0.029 12 September 2016 - Fixed a bug when the value returned by an iterator is undef 0.028 31 August 2016 - If your match specification does not match anything in the template, you now get an error. - The iterator modifiers filter, grep, order_by can now take a scalar that is a path to an anonymous subroutine on the data context. 0.027 28 August 2016 - Fixed bug in data path specifications with placeholders that caused the final character to be deleted in some cases. - !!BREAKING CHANGE!!: On iterator, the special key 'filter' is now 'grep', to match inconsistent docs. Special key 'grep' does what 'filter' used to do which is to allow or skip a row in the iterator based on some logic. However we also have now in addition to the new 'grep' a new 'filter', which is used to filter or transform the iterator row in some way. Docs and tests updated. Should be a simple search and replace for you if you are using iterators with the old 'filter' keyword. - !!BREAKING CHANGE!! We documented the old 'filter' (now 'grep') iterator keyword to say that the anonymous subroutine received the $pure object as its first argument. This was not the case. Code has been fixed to match the documented behavior, but if you relied on the previous code you will need to make some minor changes. - New Filter: 'cond'. Basically a filter tha works like the conditional operator (?). See docs. Added this to save myself having to drop to a coderef so much. - Test case around when you want to match several specs to a single action. 0.026 25 August 2016 - Fixed bug where in a loop and using a prepend or append match specification the values aggregate rather than replace. - Allow a new shorthand syntax in a loop when you are just doing a simple one value replacement of the current matched node. - Allow you to set the current data context directly in a loop - More tests to stress loops inside of loops. - Minor improvements to error warnings - POD fixes 0.025 17 August 2016 - Updated dependencies - fixed typo in code that does error messages. Should improve messaging. - More undocumented work on components / custom tags 0.024 08 August 2016 - Regexp patch to silence warnings (zostay++) - Allow one to indicate an action is a literal string 0.023 29 July 2016 - New Processing Instruction: Filter. Takes a node as its source template. - I no longer consider this module a wild alpha version. I will only break the existing test suite and documented behavior if I have obsolutely not other path forward. See main docs for blockers on removing 'early access' status. 0.022 20 July 2016 - Some error messages around missing data paths are now more useful. Requires Class::MOP (which is not listed as a dependency, you should install it for debugging in development). 0.021 18 July 2016 - Fixed processing instruction include when listing arguments - Updated some dependency requirements 0.020 13 July 2016 - Bugfixes for object iterator - When the matchspec is 'append' or 'prepend' and the target action is undef we no longer delete the matched node. - If an action with a template that contains literals and placeholders has a trailing filter(s) we now apply the filters. 0.019 07 July 2016 - You may now use a data placeholder in a match specification - You may now pass a coderef to replace a match => action pair for custom or speciality processing. 0.018 27 June 2016 - Fixed VERSION typo preventing properly upgrade installation. - Components now are responsible for adding any styles and scripts to the DOM root. - New component hook to modify setup parameters. - Components now can override how the render callback is created. 0.017 22 June 2016 - Use Digest::MD5 instead of the pure Perl version since its actually bundled with older Perls anyway. - Methods that return a coderef can now return an object as well as a scalar from the coderef. 0.016 17 June 2016 - 'Dark launch' of new components feature. No docs, but you can look at the test case (t/components.t) and at Template::Pure::Component source code for the idea. Docs to come. 0.015 10 June 2016 - Code is considered less experimental than before and I am moving toward feeling committed to the current test suite and documentation. - Corrected Changed document. - POD Fixes - New test case that combines looping with a processing instruction - Fixed bug where passing parameters to a processing instruction did not work as documented. 0.014 19 April 2016 - Migration from DOM::Tiny to Mojo::DOM58. This is just a namespace change it does not add Mojolicious as a dependency to the application. This could also be a breaking change for you if you are hardcoding instances of Mojo::DOM58. Should be a simple search and replace job. I did warn you this is experimental code right :) - Fixed a bug where you could not delete an attribute by setting it to undef. - New Feature: Template processing instructions. Lets the template author embed processing instructions into the HTML so that she can have easier control over the template structure without needing to learn Perl and the Template::Pure API. 0.013 11 April 2016 - We now expose 'self', the current instance of the Pure object in your data context. This makes it easier to follow the new best practice recommendation of using a subclass to encapsulate your view logic and view related data. - Using 'data_at_path' is now required in coderef actions where you are pulling values out of the data context. This could be a breaking change if you did not follow the recommended best practice. 0.012 25 March 2016 - Require the newest version of Mojo::DOM58 - You may now set the target of an action to a Mojo::DOM58 object instance. 0.011 22 March 2016 - Now if the result of a scalar action is an object that does 'TO_HTML' we process the object rather than stringify it. 0.010 21 March 2016 - I'm setting the minimum Perl version to 5.10.0 since we are using some regular expression constructs that only work on 5.10+ and its making the testing reports noisy. I'd love to support 5.8.8 if I could, if anyone is a regexp ninja and wants to help, the issue is in Template::Pure::ParseUtils where I am using named/number capture buffers (that requires 5.10+). If we can redo that regexp to not use those features that would grant us 5.8 compatibility. 0.009 17 March 2016 - Make sure templates state is properly reset. 0.008 17 March 2016 - Fixed issue with wrapper templates - New Feature: you may now set a template object in the data section and expect it to render. 0.007 16 March 2016 - You may now assign the value of an action to any object that does a method called 'TO_HTML'. 0.006 15 March 2016 - Removed some testing code accidentally left in the distribution in the last release 0.005 14 March 2016 - pod tests and pod fixes (manwar++) - Setup for Travis CI - Tweaked some regular expressions for compatibility with more versions of Perl - new feature: let you assign a the target of a data context directly to a sub template. 0.004 14 March 2016 - Rename Utils to ParseUtils - Fixed some reported errors 0.003 12 March 2016 - Fixes for code actions and filters when the match css matches more than on node. 0.002 11 March 2016 - Fix to properly mark scalar ref actions as encoded 0.001 11 March 2016 - First usable version, with caveats (its still earlly access)
http://web-stage.metacpan.org/changes/distribution/Template-Pure
CC-MAIN-2020-05
refinedweb
1,395
63.59
SOAP error with VMware-vSphere-Perl-SDK-5.5.0msennott Oct 11, 2013 9:14 AM When I try to use the Perl SDK v5.5 I get SOAP request errors (using Net::HTTP 6.06): ./script.pl --vmname <blah> --server <my server> SOAP request error - possibly a protocol issue: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenc="" xmlns:soapenv="" xmlns:xsd="" xmlns: <soapenv:Body> I did some research and it seemed that Net::HTTP 6.06 doesn't work so I downgraded to Net::HTTP 6.03, but still no luck - different errors: # perl -MNet::HTTP -le 'print $Net::HTTP::VERSION' 6.03 ./script.pl --vmname <blah> --server <my server> SOAP request error - possibly a protocol issue: Undefined subroutine &LWP::Protocol::https::Socket::can_read called at /usr/local/share/perl5/LWP/Protocol/http.pm line 22 Any ideas of how to make this work with the downgraded Net::HTTP? Thanks in advance for your help. 1. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0msennott Oct 11, 2013 9:40 AM (in response to msennott) I think I have this solved - need to downgrade more than just Net::HTTP to get this to work: in cpan: install GAAS/libwww-perl-6.03.tar.gz No more error. I am going to leave this un-resolved for a day in case I run into more errors. 2. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0RVDFAB Nov 4, 2013 3:37 AM (in response to msennott) Thanks you a lot msennot, this fixed the problem for me. I was trying to run a nagios plugin to monitor my vSphere 5.5 environment (Check VMware API - check_vmware_api.pl) I am just curious but how did you find out about libwww-perl? 3. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0MR-Z Nov 9, 2013 12:33 AM (in response to msennott) Simply installing libwww-perl version 5.837 resolved my issue. The other versions don't work for me. cpan[3]> i /libwww-perl/ Distribution GAAS/libwww-perl-5.837.tar.gz Distribution GAAS/libwww-perl-6.01.tar.gz Distribution GAAS/libwww-perl-6.05.tar.gz Author LWWWP ("The libwww-perl mailing list" <libwww@perl.org>) 4 items found cpan[4]> install GAAS/libwww-perl-5.837.tar.gz Running make for G/GA/GAAS/libwww-perl-5.837.tar.gz Checksum for /root/.cpan/sources/authors/id/G/GA/GAAS/libwww-perl-5.837.tar.gz ok CPAN.pm: Going to build G/GA/GAAS/libwww-perl-5.837.tar.gz 4. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0DeepW Sep 26, 2014 2:13 PM (in response to MR-Z) Thank You MR-Z. Those steps resolve the issue for me. 5. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0william_faulk Oct 23, 2014 4:17 PM (in response to msennott) The problem is that the VMware-provided module is forcing you to use an antiquated Perl SSL module. You can fix the VMware stuff, which may or may not be easier to live with. A diff to VICommon.pm is attached. - VICommon.pm.diff.zip 732 bytes 6. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0wh8j Nov 13, 2014 8:53 AM (in response to william_faulk) Yes! you helped me out a lot, removing the SSL module solved it. All the downgrading didn't work on CentOS 7. For future ref: Linux hidden 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [root@hidden vmware-vsphere-cli-distrib]# cat /etc/*eleas* CentOS Linux release 7.0.1406 Linux release 7.0.1406 (Core) CentOS Linux release 7.0.1406 (Core) cpe:/o:centos:centos:7 7. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0sdn_satish Apr 7, 2015 11:34 PM (in response to MR-Z) Thanks MR-Z, SDK 5.5 scripts works in CentOS 7 after installing the "GAAS/libwww-perl-5.837.tar.gz" 8. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0HapcJr May 27, 2015 1:31 PM (in response to william_faulk) The patch worked also on VMware-vSphere-CLI-6.0.0. Thank you william-faulk. Made some changes due to small differences on file source. Patch should be unzipped and applied before install, inside untarred directory vmware-vsphere-cli-distrib: # cd vmware-sphere-cli-distrib # patch -p0 < VMware-vSphere-CLI-6.0.0-slowbecauseofSSL.patch 9. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0quasi_schizo Jun 19, 2015 7:03 AM (in response to msennott) I found it necessary to use two sets of ssl_opts for the three instances of LWP::UserAgent. This was the only way I could handle my need to use IP Address rather than hostnames: # diff VICommon.pm VICommon.pm.ori 426a427,435 > if ($1 eq "s") { > eval { > require Crypt::SSLeay; > Crypt::SSLeay->import(); > }; > if ($@) { > die "Crypt::SSLeay is required for https connections, but could not be loaded: $@"; > } > } 442,444d450 < < $user_agent->ssl_opts('verify_hostname' => 0); < $user_agent->ssl_opts('SSL_verify_mode' => 0); 497a504,505 > #To remove SSL Warning, switching from IO::Socket::SSL to Net::SSL > $ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL"; 502a511,520 > # bug 288336 > if ($1 eq "s") { > eval { > require Crypt::SSLeay; > Crypt::SSLeay->import(); > }; > if ($@) { > die "Crypt::SSLeay is required for https connections, but could not be loaded: $@"; > } > } 514,516d531 < < $user_agent->ssl_opts('verify_hostname' => 0); < $user_agent->ssl_opts('SSL_verify_mode' => 0); 2099,2101d2113 < $user_agent->ssl_opts('verify_hostname' => 0); < $user_agent->ssl_opts('SSL_verify_mode' => 0); < 2134,2135c2146,2147 < return (defined $user_agent->cookie_jar and < $user_agent->cookie_jar->as_string ne ''); --- > return defined $user_agent->cookie_jar and > $user_agent->cookie_jar->as_string ne ''; 10. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0SiddharthaSingh Oct 14, 2015 4:40 PM (in response to msennott) As per my understanding on reported problem this issue is related to RHEL 7. However, referring to vSphere SDK for Perl 5.5 Release Notes SDK for Perl 5.5 is supported on the following Linux platforms: - Red Hat Enterprise Linux (RHEL) 6.3 (Server) — 32 bit and 64 bit - Red Hat Enterprise Linux (RHEL) 5.5 (Server) — 32 bit and 64 bit - Ubuntu 10.04.1 (LTS) — 32 bit and 64 bit - SLES 11 — 32 bit and 64 bit - SLES 11 SP2 — 32 bit and 64 bit So RHEL 7 is not supported by SDK for Perl 5.5 Please let me know in case my understanding is incorrect. 11. Re: SOAP error with VMware-vSphere-Perl-SDK-5.5.0deepthisp Jul 29, 2018 9:35 PM (in response to MR-Z) Thank you so much for this solution! "Installing libwww-perl version 5.837" worked for me and helped resolve the SOAP error.
https://communities.vmware.com/thread/459571
CC-MAIN-2020-45
refinedweb
1,126
60.41