Re: code analysis tools

2007-03-26 Thread jjhartley
From: Gregg Reynolds [EMAIL PROTECTED]

 On 3/26/07, Marco Peereboom [EMAIL PROTECTED] wrote:
  ectags
  ctags
  cscope
 
  All work fine within emacsOS and vim.
 
  http://fxr.watson.org/ is invaluable too.
 
 I see GNU Global does something similar:


Has anyone played with OpenGrok yet?

http://www.opensolaris.org/os/project/opengrok/



Re: An introduction of sorts

2007-03-21 Thread jjhartley
From: Dan Farrell [EMAIL PROTECTED]

 Being prepared to be in the community is the best way to make the
 entrance smoother...
 
 -Read the faq.
 -Read undeadly.org
 -Rtfm and Google prior to posting questions... show that you've done
 your homework.
 -Have thick skin
 
 I'm a new kid on the block and would like to be introduced to the 
 community in a formal sense; which is why I'm writing this letter 
 in hopes of become embedded in the community as opposed to another 
 face in the crowd.

It sounds like participating on BSDForums would be better suited for you.
It is a series of forums focusing on FreeBSD/OpenBSD/NetBSD  targets 
newbies, students,  professionals.  

http://www.bsdforums.org/forums



minimum hardware requirements for NTP server?

2006-10-29 Thread jjhartley
I would like to set up OpenBSD 4.0 as an NTP server using GPS as the time 
source instead of punching a hole periodically in a firewall to query the 
Internet time servers.  Does anyone have recommendations for the minimum 
hardware required to implement this?  I have old 200MHz, 400MHz, 600MHz,  
800MHz boxes which could be used.  Thanks for any candor provided.

Jim



anyone have any nmea(4) stories?

2006-10-06 Thread jjhartley
Has anyone set up a GPS to serve as a ntp source yet?  Care to share any 
insights gained?  Thanks.

j



Re: Looking for general info on OpenBSD

2006-08-23 Thread jjhartley
 On Wed, Aug 23, 2006 at 10:33:46AM -0700, Jon R H wrote: 
  Dose OpenBSD have a printed manual like...
 
 Starting with your documentation questions: AFAIK, OpenBSD's official 
 documentation is limited to: 
 
 * The definitive man pages. 
 * The published FAQ 
 * The PF User's Guide 
 * All of the many miscellaneous web pages, such as errata, stable, etc. 
 * Architecture specific installation docs 

As for books, you might consider:

Absolute OpenBSD

http://www.amazon.com/gp/product/1886411999/sr=1-1/qid=1156357254/ref=pd_bbs_1/104-9040577-1213503?ie=UTF8s=books

Secure Architectures with OpenBSD

http://www.amazon.com/gp/product/0321193660/ref=pd_sim_b_3/104-9040577-1213503?ie=UTF8

Building Firewalls with OpenBSD and PF

http://www.amazon.com/gp/product/8391665119/sr=1-2/qid=1156357095/ref=sr_1_2/104-9040577-1213503?ie=UTF8s=books

The complexity of these books increases from top to bottom.  If you have any 
interest in firewalls, the Artymiak book above is really solid.



Wireshark 0.99 on OpenBSD 3.9

2006-08-07 Thread jjhartley
FYI.  For those contemplating installing Wireshark, the 0.99.2 snapshot 
currently available on http://www.wireshark.org/download.html does not build on 
3.9.  There has been recent discussion on wireshark-dev@ about this, and the 
latest SVN source appears to correct the problem(s):

http://www.mail-archive.com/wireshark-dev@wireshark.org/msg00328.html

The list of packages  build sequence described at the following page are still 
correct as I have successfully built what becomes Wireshark 0.99.3 from the 
latest SVN source this weekend.

http://www.cromwell-intl.com/unix/openbsd-dell.html

HTH.

Jim



running Linux Firefox on 3.9?

2006-07-11 Thread jjhartley
I simplistically installed the Linux version of Firefox, 
firefox-1.5.0.4.tar.gz,  given that I already have OpenOffice 2.0.3 installed, 
I thought I had all the prerequisites in place in order to run Firefox.  I 
don't.  Firefox generated a dialog on first invocation, but immediately 
generated a segmentation fault.  Any other time I tried running it, I simply 
get the segmentation fault.

Does anyone have any pointers that I am blatantly missing?  Thanks.

Jim



Re: question about mount command

2006-06-24 Thread jjhartley
Original message from pk.ra [EMAIL PROTECTED]:

 My hard disk is divided into four partitions. There are two MSDOS partitions,
 one FreeBSD and one partition for OpenBSD. There are files with name on other 
 languages on my MSDOS partitions. How can I mount these partitions with 
 correct 
 names of files? 

See Section 4.8 of the FAQ.

http://openbsd.org/faq/faq4.html#Multibooting



Re: OpenOffice.org 2.0 works on OpenBSD

2006-06-06 Thread jjhartley
Original message from Frank Denis [EMAIL PROTECTED]:

 Openoffice.org still works fine under OpenBSD. 
 I don't have any host with X11 right now, but the basic steps to install 
 it were : 
 
 - pkg_add redhat_base 
 - get the Openoffice.org RPM 
 - /emul/linux/bin/rpm --ignoreos --ignorearch -ivh *.rpm 
 - /opt/openoffice.org2.2/program/soffice 
 
 If java is installed and in your path, you may want to rename it before 
 the first run of Openoffice or odd things can happen. 

Like?  And do you have an idea why?

Jim



Re: mounting winxp

2006-06-02 Thread jjhartley
Original message from Martin Gruden [EMAIL PROTECTED]:

 I have a noob question. 
 I have two disks wd0 and wd1 . On wd1a to wd1f i have obsd3.9 an on wd0 i 
 have winXP. 
 I read the fstab man page but it doesn't explain anything about mounting xp. 

Read Section 14.16 of the OpenBSD FAQ.  You will need to recompile your kernel 
in order to get NTFS support.

http://openbsd.org/faq/faq14.html#foreignfs

Jim



Re: Problems mounting a usb disk

2006-06-01 Thread jjhartley
Original message from David Burau [EMAIL PROTECTED]:

 Hi, 
 
 i've installed OpenBSD 3.9 on a IBM T20 notebook. 
 Everything is working fine. 
 Bit I'm not able to mount a usb disk. 
 dmesg output ist: 
 - 
 sd0 at scsibus1 targ 1 lun 0... 
 sd0: 76319MN, 76319 cyl, ... 
 -- 
 and that's my disk. 
 
 The Problem is, that there is no sd0 in /dev and when I try to mount 
 sd0a (mount /dev/sd0a /mnt/usb) I get a note, that the device is not 
 configured. 

You didn't mention which filesystem is on your USB drive;  I'll assume DOS.

If so, then look at the disk's disklabel to determine which slice is the DOS 
partition;  most likely, it is in sd0i or above.  That is the slice to be 
mounted, not sd0a.  Look at section 14.17 of the FAQ.

Jim



Re: Static functions in C code

2006-05-26 Thread jjhartley
Original message from Diego Giagio [EMAIL PROTECTED]:
  1. there are debugging requirements. Static functions do not expose entry 
  points. 
 
 Even for user-level code? 

If you are thinking there is a difference between kernel code  userland code, 
no.  Compilers compile code based upon the files  switches provided.  The only 
difference between static  non-static functions from a compiler's perspective 
is that non-static functions have the symbol representing their address made 
public in the resulting object file;  static functions do have an analogous 
symbol, but it is not made public.  Look at nm for more discussion:

http://www.openbsd.org/cgi-bin/man.cgi?query=nmapropos=0sektion=0manpath=OpenBSD+Currentarch=i386format=html

End result:  the keyword static simply plays games with what the linker 
receives as input.

Jim



Re: C++ problem in current snapshot (2006-05-22) [SOLVED]

2006-05-26 Thread jjhartley
Original message from Toni Mueller [EMAIL PROTECTED]:
 ...
 Now, what's the recommended books for C++ these days? 

_The C++ Programming Language_ by Bjarne Stroustrup.



Re: Static functions in C code

2006-05-25 Thread jjhartley
Original message from Diego Giagio [EMAIL PROTECTED]:
 ...
 I have a concern, thought: why most applications don't use the 'static' 
 keyword for 
 functions with internal linkage ? Wouldn't that avoid function name clashes 
 when 
 developing large programs? 

Either because:
1.  there are debugging requirements.  Static functions do not expose entry 
points.
2.  most developers don't consider limiting global namespace pollution as this 
doesn't frequently hinder development.  Consider being concerned about how many 
names are in the global namespace the programmatic equivalent to flossing.

As an aside, note in C++ that the keyword static is even less in vogue than 
it was in C given its overuse within the language definition.  static has at 
least five distinct meaning based upon its context:
1.  static global instances -- no public linkage for names are created in 
object files.
2.  static automatic variables within functions -- 
3.  static functions -- 
4.  static members within class definitions -- class variables of which one 
instance is shared across all instances of the class.
5.  static member functions -- functions with no knowledge of individual 
class instances other than whatever static members which may be defined.

There may be a sixth, but I haven't verified it lately.  This may only be a 
compiler implementation issue:
6.?  static constants -- may force the compiler to allocated memory for the 
instance.

This isn't to say that there are equivalents elsewhere in the language which 
obviate all uses of static, but namespaces sidesteps some of these issues.

Jim



Ethereal on 3.9?

2006-05-24 Thread jjhartley
This topic usually comes up near each release.  Has anyone tried the 3.8 
instructions below yet on 3.9?

http://www.linbsd.org/ethereal_on_openbsd38.html

Jim



Re: ifficiency

2006-05-22 Thread jjhartley
Original message from prad [EMAIL PROTECTED]: 

 suppose that you have 2 conditions A and B where B take a lot of effort to 
 determine (eg looking for a string match in a huge file). 
 
 either A or B needs to be true before you can execute 'this'. 
 
 the 2 if statements below are equivalent i think: 
 
 if A or B: 
 do this 
 
 if A: 
 do this 
 elseif B: 
 do this 
 
 now, do they work the same way? 
 

Both of these forms are equivalent only in languages which short-circuit 
Boolean expressions (not all language implement short-circuiting...).  C/C++ 
both support this feature.

What is the difference?  In languages which provide short-circuiting, 
sub-expressions within a complex expression will be evaluated left to right up 
to the point where the value of the overall expression is determined.  ie.  in 
(A or B), only one sub-expression needs to be true in order for the entire 
expression to be true.  So, if A is true, there is no need to evaluate 
sub-expression B to know the value of the overall expression.  However, if A is 
false, then B must be computed to determine the value of the overall 
expression.  Thus in C/C++, the two forms given above are equivalent.

Note that these sub-expressions within languages which support short-circuiting 
are evaluated from left to right.  Thus, the most expensive sub-expressions 
should be listed last -- placed as far right as possible.

OTOH without short-circuiting, both sub-expressions within (A or B) will be 
evaluated.  This does not match your second statement:

 if A: 
 do this 
 elseif B: 
 do this 

...which executes do this; based upon the truth of expression A.

You can consider short-circuiting of Boolean evaluation greedy, but it a 
feature which may also save clock cycles if the right-most sub-expressions are 
costly to evaluate.

j



Re: ifficiency

2006-05-22 Thread jjhartley
Original message from prad [EMAIL PROTECTED]:

 On Monday 22 May 2006 17:54, you wrote:
 ...
 i was puzzled reading something on one of the wikipedia links provided: 
 The opposite of lazy evaluation is eager evaluation, also known as strict 
 evaluation. Eager evaluation is the evaluation behavior used in most 
 programming languages. 
 http://en.wikipedia.org/wiki/Lazy_evaluation 
 
 it would seem to me that lazy evaluation makes more sense than eager 
 evaluation since it is both more logical and economical. 
 
 i do not know much about language interpretation or compilation processes, 
 but 
 how can it possibly be of any advantage to do 2 things when you can get away 
 doing just one? 
 
 so why would 'most programming languages' NOT use it? there must be some 
 benefit eager evaluation offers despite what seems to be a lack of efficient 
 evaluation. 
 
 is eager evaluation easier to design or implement perhaps? 

Whether an application is compiled has no bearing on short-circuiting.  This 
feature can be implemented in either environment.

As for why all languages don't use this feature, I suspect it is for purity.  
An expression is specified in code, it should be executed.  OTOH, 
short-circuiting is simply an efficiency optimization.

As for whether it is easier to implement short-circuiting or not, IMO 
short-circuiting isn't that hard to do.  It's really up to the language 
designer as to whether they see that short-circuiting is congruent with the 
goals of the language.  For languages intending on emphasizing pedantic 
behavior prescribed in code, short-circuiting would probably not be 
implemented.  For languages wanting to provide performance optimizations as 
part of the language, implementing short-circuiting makes sense.

Jim



OpenOffice with JRE or without?

2006-05-12 Thread jjhartley
In investigating what's needed to install  configure OpenOffice, I see on 
their Website that I have the choice of downloading it with or without the JRE. 
 Remembering some of traffic here discussing the issues of installing/compiling 
Java 1.5, how stable is the Linux JRE on OpenBSD?  Am I better off downloading 
OpenOffice without the JRE  expect to build it myself?  In this case, am I 
forced to install/compile Java before installing OpenOffice?

Thanks for any shared candor.

j



Re: www.openbsd.org defaults to Japanese

2006-05-02 Thread jjhartley
From: Tan Dang [EMAIL PROTECTED]
 Any reason why www.openbsd.org displays Japanese by default now?
 
 Tan

I see English when accessing www.openbsd.org as I have always done so.  You 
might want to look at your locale settings. 



Re: C++ textbooks: recommendations?

2006-04-04 Thread jjhartley
That's easy.  Get the information for the guy who envisioned the language.

_The C++ Programming Language_
Bjarne Stroustrup.
Addison-Wesley, 2000
ISBN:  0201700735

http://www.amazon.com/gp/product/0201700735/sr=1-1/qid=1144196764/ref=sr_1_1/104-6908142-7055123?%5Fencoding=UTF8s=books

 -- Original message --
From: [EMAIL PROTECTED]
 i need to learn C++, but do not know where to begin with textbooks or online
 docs. since, AFAICT, there are a great many skilled programmers on list, i 
 would
 appreciate any recommendations that can be made about introductory and
 intermediate texts on C++.
 
 my motivation for asking this is to avoid purchasing texts that will sit on my
 shelf and collect dust. there are a great many introductory texts on nearly
 every subject that do just that and/or don't cover enough material in 
 sufficient
 depth.
 
 are there any texts on best practices for writing exploit-free code? if you 
 feel
 this is insufficiently openbsd related, please reply off-list to reduce 
 chatter.
 
 cheers,
 jake