I think your project looks very interesting. Reference counted datastructures is a great convenience.
Thanks, and Good Luck further.
83 karma · joined February 17, 2013
I think your project looks very interesting. Reference counted datastructures is a great convenience.
Thanks, and Good Luck further.
Apple uses C++ in their kernel in a nice way, they don't use virtual methods and templates.
I agree totally that C++ looks good and all, and that there might be bright sides to it. But to me, it is not as discernible as C at least. And I do enjoy programming in C, I need to feel I am in control, and C gives me that.
Use sed in a do shell script. short example (on the fly).
set mytext to "sise" & LineFeed
set fixed to do shell script "sed -n 's/size/sise/g' <<<" & mytext
I have written a script, for letting you first copy your terminal commandline, when you have figured it all out, so that you can paste it into a do shell script, it can be found here <http://macscripter.net/viewtopic.php?pid=163300#p163300>; And Macscripter.net is a great forum for AppleScript questions.I just want to make a point of the fact the code doesn't use Carbon, so it should work with the next releases of OS X.
I use the awkscript below to compact it:
# histsort.awk --- compact a shell history file # Thanks to Byron Rakitzis for the general idea
{
if (data[$0]++ == 0)
lines[++count] = $0
}
END {
for (i = 1; i <= count; i++)
print lines[i]
}Nice to know that bash doesn't fork loops that are being used with redirection, and not piping!
This comment however reminds me of some behaviour of bash 2.03 or earlier, where this behaviour was flawed, if you suddenly changed execution path during a recursion in a shell script. Sorry I can't describe it better, and that bash version, that was before 2.03 is long gone now!
for realm in ~/Library/Caches/temporaryitems ~/* ~/Desktop/* ~/Documents/* ~/Documents/Prj/* ~/Library/* ~/Library/Scripts/* ~/Library/
do
for folder in $realm
do
if [ -d ${folder} ]
then
* CDPATH="$CDPATH":"$folder"
fi
done
done
As for completions of git and such, that relies totally upon where you got your completion from.
There gotta be better arguments than this, and I am really sure there is.I am on Mac OsX, and I downloaded and installed bash 4.2, and I have never experienced any problems with that.
This was really a most pleasurable and insightful read. True elegance!
All I see that is that it is a survey, I wonder what kind of tests that are used to draw the conclusions. I also see for instances that the regexp.h file is absent for OS X Lion, which is reworked to work wide wide characters. But, the header files may fail in ways I don't know about, that is why I ask for the tests that makes up for the results.
This is really nice, I just have one question, ( maybe I have overlooked it), where is the test-suite for gathering the data?´, as to which headerfiles are workable or not? Is there a configure script there? I mean, I am on Snow Leopard, and I have no trouble using unistd.h which is marked as flawed on the graph.
I use blocks in Objective-C and "closures" in Applescript.
to lambda(aStatment)
script intern
say aStatment
end script
end lambda
set a to lambda("applescript…")
set b to lambda("knows how to …")
set c to lambda("make a closure if not a lambda…")
tell a to run
tell b to run
tell c to runI want to recommend Eric S. Raymonds books for those that haven't read them.
So I am glad it was posted, it helped, me, and this comment page was also, something to both smile/laugh and learn something from. Thanks
I discovered help <builtin> some months ago, and that was a great boon really. Like help "test" so I didn't have to go the rather large bash man page.
Here is a little shellscript for displaying a man page on Mac Os X (gman). (If you then click on on of the links on the man-page, it may pop up in your default browser).
#!/bin/bash
if [ $# -lt 1 ] ; then
echo "gman takes a man page, if found and formats it into html."
echo "Usage: gman [manfile]"
exit 2
fi
a=`man -aw $* |head -1`
if test x$a = x ; then
echo "Can't find $1"
exit 1
fi
# Figures out if it is a normal man page or something else (gz).
b=`man -aw $* |head -1 |grep "gz"`
echo $b
if test x$b = x ; then
groff -man $a -Thtml >|/tmp/tmp.html
else
gzcat $b |groff -man -Thtml >|/tmp/tmp.html
fi
qlmanage -p /tmp/tmp.html >/dev/null 2&>1Having said that, most things do work, and people are friendly and easy to reach.
Most GNU packages just work, shouldn't you find what you are looking for elsewhere.
I think Mac Os X, (or just OS X now adays), is the greatest platform for free software ever!
My reason for starting out with a Mac was Applescript (http://macscripter.net) and inter application communication IPC. I haven't regretted that a single day.
This software should however work on Mac Os X from 10.5 onwards as it will then use the ICU libraries that shipped with Mac Os X from that version. Ncurses 5.9 you'll have to get from http://macports.org, or directly from the source.
For me the overall factor is the ease for any of my users, installing something I have written.
Here is the short version.
You are a person that uses the commandline. You are doing some activity, either reading a text book, or gathering some information, debugging, or are having some ideas you'd like to structure, basically you are having a need for a structured information collection. At the time it pops into your head; hey it would be nice to have a "database" to register this stuff into, so that I later can retrieve it.
Then you fire up index, and enter a filename that you haven't used before. Index then fires up your editor, and you write the fieldnames you need, (up to 16). You close the editor, and you are sent to the "main menu" from where you can start entering records. It uses ncurses, and is really fast; you move between the fields with ctrl-n and ctrl-p, and are asked if you want to save the record when you press Esc.
Later on you can just enter the name from the main menu, and search and edit/delete/add new records.
You can make make index sort and print the records in a variety of ways through command line options. You can also have small filter files, based on awk or perl, to filter by a field if you like. I have modified it slightly from the original, so it is possible for a lot of files to share a single label file, so that you can have one "database" file per subdirectory, sharing the same "field-layout" if that suits your purpose (for modules for instance).
It should also work well with UTF-8, and collation ordering according to locale settings. (This includes reg-exp patterns thanks to IBM and their ICU library.)
Thanks for your feedback!
Maybe I should, but I have just linked in the html version of the man file, which has an example.
But I will really consider adding more examples.