Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-hackers Digest, Vol 367, Issue 6

1 view
Skip to first unread message

freebsd-hac...@freebsd.org

unread,
Apr 10, 2010, 8:00:22 AM4/10/10
to freebsd...@freebsd.org
Send freebsd-hackers mailing list submissions to
freebsd...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
or, via email, send a message with subject or body 'help' to
freebsd-hac...@freebsd.org

You can reach the person managing the list at
freebsd-ha...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-hackers digest..."


Today's Topics:

1. make pkg_install suite reusable, please (Leinier Cruz Salfran)
2. Re: make pkg_install suite reusable, please (Alexander Churanov)
3. Re: make pkg_install suite reusable, please (Alexander Churanov)
4. c question (Leinier Cruz Salfran)
5. Re: c question (Alexander Churanov)
6. C6 sleep state (Sean Bruno)
7. Re: make pkg_install suite reusable, please (Leinier Cruz Salfran)
8. Re: c question (Leinier Cruz Salfran)
9. Re: c question (KAYVEN RIESE)
10. Re: make pkg_install suite reusable, please (Garrett Cooper)
11. Re: make pkg_install suite reusable, please (Charlie Kester)
12. Re: make pkg_install suite reusable, please (Garrett Cooper)
13. GSoC 2010 (jax)
14. NIC MAC problem (Stanislav)


----------------------------------------------------------------------

Message: 1
Date: Fri, 9 Apr 2010 10:16:33 -0400
From: Leinier Cruz Salfran <salfranc...@gmail.com>
Subject: make pkg_install suite reusable, please
To: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<x2ta2585ef1004090716vf7...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

hello fbsd devs

i want to ask you one thing: can you make the 'pkg_install' suite
reusable .. means install 'libinstall.a' as a shared object in order
to make it reusable by others devs

i'm developing a packages manager and i borrow almost all
'pkg_install' in order to be able to do things related to packages
such as install, delete, compare versions, etc... but i made some
modifications because i put all code together, so, i changed
'pkg_perform' function by their respective

well waiting.................................


------------------------------

Message: 2
Date: Fri, 9 Apr 2010 18:36:17 +0400
From: Alexander Churanov <alexande...@gmail.com>
Subject: Re: make pkg_install suite reusable, please
To: Leinier Cruz Salfran <salfranc...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<q2x3cb459ed1004090736t5...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

2010/4/9 Leinier Cruz Salfran <salfranc...@gmail.com>

> i want to ask you one thing: can you make the 'pkg_install' suite
> reusable .. means install 'libinstall.a' as a shared object in order
> to make it reusable by others devs
>

Hi Leinier,

I'd like to add my 50 cents. From my point of view, the true UNIX way is
re-using whole programs. This provides unbelievable isolation and
correctness. If you don't want to fork myriads of processes each second,
then, it's, probably, better to ask for pipe mode of pkg_* tools. For
example, aspell works that way. You start a process, write commands and
queries and read results.

Alexander Churanov


------------------------------

Message: 3
Date: Fri, 9 Apr 2010 18:38:35 +0400
From: Alexander Churanov <alexande...@gmail.com>
Subject: Re: make pkg_install suite reusable, please
To: Leinier Cruz Salfran <salfranc...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<t2m3cb459ed1004090738s7...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Leinier,

I forgot to mention that character-mode IO also resolves all binary
compatibility issues and makes possible implementing wrappers for any
programming language much easier.

Alexander Churanov


------------------------------

Message: 4
Date: Fri, 9 Apr 2010 10:09:56 -0400
From: Leinier Cruz Salfran <salfranc...@gmail.com>
Subject: c question
To: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<l2ga2585ef1004090709u82...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

hello all

i want to know your oppinions about this:

- use a matrix is faster than use a linked list?


example:

char *szColumnName[10];
unsigned short iColumnAge[10];


struct _llList {
struct _llList *prev, *next;
char szName[64];
unsigned short iAge;
};


------------------------------

Message: 5
Date: Fri, 9 Apr 2010 18:52:04 +0400
From: Alexander Churanov <alexande...@gmail.com>
Subject: Re: c question
To: Leinier Cruz Salfran <salfranc...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<x2z3cb459ed1004090752q7...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

2010/4/9 Leinier Cruz Salfran <salfranc...@gmail.com>

> - use a matrix is faster than use a linked list?
>
> example:
>
> char *szColumnName[10];
> unsigned short iColumnAge[10];
>
>
> struct _llList {
> struct _llList *prev, *next;
> char szName[64];
> unsigned short iAge;
> };


Leinier ,

This depends on what kind of operations are performed. For sequential
traversing, both are very appropriate. However, you can not perform a binary
search on a list. You also can not combine two arrays into a single one with
constant complexity.

Lists also have greater memory overhead for small structures.

My advice: always use arrays.
Use lists if:

1) Copying items when the dynamic arrays grows is inappropriate.
2) List-specific operations like O(1) splicing or O(1) insertions and
deletions are required.

Alexander Churanov


------------------------------

Message: 6
Date: Fri, 09 Apr 2010 08:48:42 -0700
From: Sean Bruno <sea...@yahoo-inc.com>
Subject: C6 sleep state
To: freebsd-hackers <freebsd...@freebsd.org>
Message-ID: <1270828122....@localhost.localdomain>
Content-Type: text/plain; charset="UTF-8"

Has anyone worked on code for the C6 power state for the Intel Nehalem
processors yet?

http://download.intel.com/design/processor/applnots/320354.pdf

Sean


------------------------------

Message: 7
Date: Fri, 9 Apr 2010 13:38:48 -0400
From: Leinier Cruz Salfran <salfranc...@gmail.com>
Subject: Re: make pkg_install suite reusable, please
To: Alexander Churanov <alexande...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<w2qa2585ef1004091038wa7...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Apr 9, 2010 at 10:38 AM, Alexander Churanov
<alexande...@gmail.com> wrote:
> Leinier,
>
> I forgot to mention that character-mode IO also resolves all binary
> compatibility issues and makes possible implementing wrappers for any
> programming language much easier.
> Alexander Churanov
>

hello alexander

that is the 'easy' way .. but I'm a dev and I want to have 'full
control' of what my program is doing .. the 'best' and 'hard' way is
to code my program with functions provided by the other dev in which i
can catch errors, customize output, bla bla bla

well .. i ask this because i'm creating a program in which i must to
use pkg_* .. i'll borrow the 'entire' pkg_* source code and customize
to fit my needs

thanks anyway


------------------------------

Message: 8
Date: Fri, 9 Apr 2010 13:41:34 -0400
From: Leinier Cruz Salfran <salfranc...@gmail.com>
Subject: Re: c question
To: Alexander Churanov <alexande...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<s2ia2585ef1004091041wa...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Apr 9, 2010 at 10:52 AM, Alexander Churanov
<alexande...@gmail.com> wrote:
> 2010/4/9 Leinier Cruz Salfran <salfranc...@gmail.com>
>>
>> - use a matrix is faster than use a linked list?
>>
>> example:
>>
>> char *szColumnName[10];
>> unsigned short iColumnAge[10];
>>
>>
>> struct _llList {
>>  struct _llList *prev, *next;
>>  char szName[64];
>>  unsigned short iAge;
>>  };
>
>
> Leinier ,
> This depends on what kind of operations are performed. For sequential
> traversing, both are very appropriate. However, you can not perform a binary
> search on a list. You also can not combine two arrays into a single one with
> constant complexity.
> Lists also have greater memory overhead for small structures.
> My advice: always use arrays.
> Use lists if:
> 1) Copying items when the dynamic arrays grows is inappropriate.
> 2) List-specific operations like O(1) splicing or O(1) insertions and
> deletions are required.
> Alexander Churanov
>

hello alexander

i supposed that a matrix is much faster .. i coded my program to use
matrix in that portion but i sent the question to see what others
think about this

thanks


------------------------------

Message: 9
Date: Fri, 9 Apr 2010 11:05:59 -0700
From: KAYVEN RIESE <ka...@sfsu.edu>
Subject: Re: c question
To: Leinier Cruz Salfran <salfranc...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID: <Pine.SOC.4.64.10...@libra.sfsu.edu>
Content-Type: text/plain; charset="US-ASCII"; format=flowed

On Fri, 9 Apr 2010, Leinier Cruz Salfran wrote:

> hello all
>
> i want to know your oppinions about this:
>
> - use a matrix is faster than use a linked list?

yes.

>
>
> example:
>
> char *szColumnName[10];
> unsigned short iColumnAge[10];
>
>
> struct _llList {
> struct _llList *prev, *next;
> char szName[64];
> unsigned short iAge;
> };
> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"
>

*----------------------------------------------------------*
Kayven Riese, BSCS, MS (Physiology and Biophysics)
(415) 902 5513 cellular
http://kayve.net
Webmaster http://ChessYoga.org
*----------------------------------------------------------*


------------------------------

Message: 10
Date: Fri, 9 Apr 2010 11:07:26 -0700
From: Garrett Cooper <yane...@gmail.com>
Subject: Re: make pkg_install suite reusable, please
To: Leinier Cruz Salfran <salfranc...@gmail.com>
Cc: freebsd-hackers <freebsd...@freebsd.org>, Alexander Churanov
<alexande...@gmail.com>
Message-ID:
<z2x7d6fde3d1004091107lb...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Apr 9, 2010 at 10:38 AM, Leinier Cruz Salfran
<salfranc...@gmail.com> wrote:
> On Fri, Apr 9, 2010 at 10:38 AM, Alexander Churanov
> <alexande...@gmail.com> wrote:
>> Leinier,
>>
>> I forgot to mention that character-mode IO also resolves all binary
>> compatibility issues and makes possible implementing wrappers for any
>> programming language much easier.
>> Alexander Churanov
>>
>
> hello alexander
>
> that is the 'easy' way .. but I'm a dev and I want to have 'full
> control' of what my program is doing .. the 'best' and 'hard' way is
> to code my program with functions provided by the other dev in which i
> can catch errors, customize output, bla bla bla
>
> well .. i ask this because i'm creating a program in which i must to
> use pkg_* .. i'll borrow the 'entire' pkg_* source code and customize
> to fit my needs

Work is being done by several individuals to make this a reality,
but it's going to take time.
Thanks,
-Garrett


------------------------------

Message: 11
Date: Fri, 9 Apr 2010 11:51:50 -0700
From: Charlie Kester <cork...@comcast.net>
Subject: Re: make pkg_install suite reusable, please
To: freebsd...@freebsd.org
Message-ID: <20100409185...@comcast.net>
Content-Type: text/plain; charset=us-ascii; format=flowed

On Fri 09 Apr 2010 at 07:36:17 PDT Alexander Churanov wrote:
>2010/4/9 Leinier Cruz Salfran <salfranc...@gmail.com>
>
>> i want to ask you one thing: can you make the 'pkg_install' suite
>> reusable .. means install 'libinstall.a' as a shared object in order
>> to make it reusable by others devs
>>
>
>Hi Leinier,
>
>I'd like to add my 50 cents. From my point of view, the true UNIX way is
>re-using whole programs. This provides unbelievable isolation and
>correctness. If you don't want to fork myriads of processes each second,
>then, it's, probably, better to ask for pipe mode of pkg_* tools. For
>example, aspell works that way. You start a process, write commands and
>queries and read results.

+1

It was a watershed moment in my programming career when I realized that
the bubbles on those DFD charts we used to use for structured design
could be whole processes and not just functions in a single, monolithic
program.

Suddenly everything the structured design folks were saying about
re-use, encapsulation, loose coupling, module cohesion, etc. made a lot
more sense when viewed from the perspective of simple Unix utilities
communicating with plain text via pipes.

We should encourage that approach as a default, and only put things into
binary libraries when forced to by performance considerations.


------------------------------

Message: 12
Date: Fri, 9 Apr 2010 13:25:29 -0700
From: Garrett Cooper <yane...@gmail.com>
Subject: Re: make pkg_install suite reusable, please
To: freebsd...@freebsd.org
Message-ID:
<s2r7d6fde3d1004091325jb...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Apr 9, 2010 at 11:51 AM, Charlie Kester <cork...@comcast.net> wrote:
> On Fri 09 Apr 2010 at 07:36:17 PDT Alexander Churanov wrote:
>>
>> 2010/4/9 Leinier Cruz Salfran <salfranc...@gmail.com>
>>
>>> i want to ask you one thing: can you make the 'pkg_install' suite
>>> reusable .. means install 'libinstall.a' as a shared object in order
>>> to make it reusable by others devs
>>>
>>
>> Hi Leinier,
>>
>> I'd like to add my 50 cents. From my point of view, the true UNIX way is
>> re-using whole programs. This provides unbelievable isolation and
>> correctness. If you don't want to fork myriads of processes each second,
>> then, it's, probably, better to ask for pipe mode of pkg_* tools. For
>> example, aspell works that way. You start a process, write commands and
>> queries and read results.
>
> +1
>
> It was a watershed moment in my programming career when I realized that
> the bubbles on those DFD charts we used to use for structured design
> could be whole processes and not just functions in a single, monolithic
> program.
> Suddenly everything the structured design folks were saying about
> re-use, encapsulation, loose coupling, module cohesion, etc. made a lot
> more sense when viewed from the perspective of simple Unix utilities
> communicating with plain text via pipes.
> We should encourage that approach as a default, and only put things into
> binary libraries when forced to by performance considerations.

It makes more sense here though because it can be used by the existing
tools, it can be linked into other applications (that it makes sense
to do so), like sysinstall (or its successor), and there's been some
talk about splitting up pkg_install into two separate pieces, one for
handling the low-level packaging tasks, and the other for handling the
user-facing pieces.

Thanks,
-Garrett


------------------------------

Message: 13
Date: Sat, 10 Apr 2010 13:35:24 +0400
From: "jax" <jax-...@mail.ru>
Subject: GSoC 2010
To: <freebsd...@freebsd.org>
Message-ID: <7ABA33D2F14F4C0A...@lan.jax.org.ru>
Content-Type: text/plain; charset="koi8-r"

Hello, Everyone
I am Igor Druzhinin and I want to participate in GSoC 2010 in FreeBSD project. I want to propose to completely realise fast syscalls support for FreeBSD on x86 platform. I have already submited my proposal few days ago on GSoC site and tried to contact with possible mentors from technical contacts list. But they they still have not answered me. So I have decided to try here.
What do you think about this proposal? Is it still actual or not? If so, who can be my mentor?


------------------------------

Message: 14
Date: Sat, 10 Apr 2010 12:01:43 -0200
From: Stanislav <uzunchev....@gmail.com>
Subject: NIC MAC problem
To: freebsd...@freebsd.org
Message-ID: <4BC084C7...@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On "fresh" freebsd 8.0 one of my nics's mac addres is all zeroes. I can
set it to the real manualy, but what may cause this. Is it hardware
issue? It is ok on slackware linux.


------------------------------


End of freebsd-hackers Digest, Vol 367, Issue 6
***********************************************

0 new messages