• Re: Linux is for losers.

    From DFS@21:1/5 to Relf on Fri Feb 16 10:23:20 2024
    On 2/16/2024 10:21 AM, Relf wrote:
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to DFS on Fri Feb 16 16:08:27 2024
    On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in <H5LzN.80208$SyNd.31052@fx33.iad>:

    On 2/16/2024 10:21 AM, Relf wrote:
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    ;-)

    Linux is _not_ for losers like you two.

    Here's a free clue: ulimit -a

    --
    -v

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From RabidPedagog@21:1/5 to vallor on Fri Feb 16 11:12:36 2024
    On 2024-02-16 11:08 a.m., vallor wrote:
    On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in <H5LzN.80208$SyNd.31052@fx33.iad>:

    On 2/16/2024 10:21 AM, Relf wrote:
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    ;-)

    Linux is _not_ for losers like you two.

    Here's a free clue: ulimit -a

    We can't all be studly chick magnets like you are, Scott.

    --
    RabidPedagog
    Catholic paleoconservative

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Relf@21:1/5 to All on Fri Feb 16 07:21:47 2024
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to vallor on Fri Feb 16 11:52:05 2024
    On 2/16/2024 11:08 AM, vallor wrote:
    On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in <H5LzN.80208$SyNd.31052@fx33.iad>:

    On 2/16/2024 10:21 AM, Relf wrote:
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    ;-)

    Linux is _not_ for losers like you two.

    Here's a free clue: ulimit -a


    How will that help Relf's code run on Linux?

    C library function:
    void *memset(void *str, int c, size_t n)

    What I'm finding is memset accepts ints where n <= INT_MAX, but above
    that requires n to be a size_t variable.

    His original wouldn't run on Linux once I specified a sample size of 1B (because 4-byte ints * 1B = 4000000000, which exceeds INT_MAX).

    original: bombs
    int Bytes = ( rows + 1 ) * sizeof int,
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );

    fixed: runs
    size_t Bytes = ( rows + 1 ) * sizeof int,
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );



    ObBloaty:

    Today is National Almond Day. Some places sell Jordan almonds by the
    pound. You know what to do.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to Yellow Bellied Larry Piet on Fri Feb 16 12:15:55 2024
    On 2/16/2024 11:59 AM, Yellow Bellied Larry Piet wrote:
    On Friday, February 16, 2024 at 11:08:31 AM UTC-5, vallor wrote:

    Linux is _not_ for losers like you two.


    Heee, haaaaa, ho, ho, ha, ha, ha, ha, ha, ha, ha!

    If I gave any of my code monkeys the task of generating random dates and
    then received either of those pathetic C monstrosities, I would only say:

    "Monkey don't get no banana. Monkey useless. Monkey will be gassed."

    As the wise saying goes: One cannot fix stupid.


    Where's your original "brute-force" C code to solve PhysFitFreak's
    birthday problem?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to Joel on Fri Feb 16 12:18:16 2024
    On 2/16/2024 12:06 PM, Joel wrote:
    Lameass Larry Pietraskiewicz <lordiemassa@gmail.com> wrote:
    On Friday, February 16, 2024 at 11:08:31?AM UTC-5, vallor wrote:

    Linux is _not_ for losers like you two.

    Heee, haaaaa, ho, ho, ha, ha, ha, ha, ha, ha, ha!

    If I gave any of my code monkeys the task of generating random dates and
    then received either of those pathetic C monstrosities, I would only say:

    "Monkey don't get no banana. Monkey useless. Monkey will be gassed."

    As the wise saying goes: One cannot fix stupid.


    Seriously - lay off the meth.


    Feeb is playing his usual game: keeping his own shitty code under wraps
    because every time - EVERY TIME - he posts code it's a laughable mess.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to DFS on Fri Feb 16 18:05:14 2024
    On Fri, 16 Feb 2024 11:52:05 -0500, DFS <nospam@dfs.com> wrote in <UoMzN.436757$p%Mb.425353@fx15.iad>:

    On 2/16/2024 11:08 AM, vallor wrote:
    On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in
    <H5LzN.80208$SyNd.31052@fx33.iad>:

    On 2/16/2024 10:21 AM, Relf wrote:
    You (DFS) replied ( to me ):
    Try it with [int64_t], DFS:

    int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
    int *randarrRelf = (int *)malloc( bytes );
    memset( randarrRelf, 0, bytes );

    I did try it. [ memset() failed, "long" (occasionally) fails too ]

    As a wise man once said, "Linux is for losers".

    ;-)

    Linux is _not_ for losers like you two.

    Here's a free clue: ulimit -a


    How will that help Relf's code run on Linux?

    My apologies -- I thought you were bumping up against
    the memory limit.


    C library function:
    void *memset(void *str, int c, size_t n)

    What I'm finding is memset accepts ints where n <= INT_MAX, but above
    that requires n to be a size_t variable.

    His original wouldn't run on Linux once I specified a sample size of 1B (because 4-byte ints * 1B = 4000000000, which exceeds INT_MAX).

    original: bombs
    int Bytes = ( rows + 1 ) * sizeof int,
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );

    fixed: runs
    size_t Bytes = ( rows + 1 ) * sizeof int,
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );



    ObBloaty:

    Today is National Almond Day. Some places sell Jordan almonds by the
    pound. You know what to do.

    Is that how you ate your way into diabetes
    and stroked-out, "Bull"?

    --
    -v

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Relf@21:1/5 to All on Fri Feb 16 10:19:01 2024
    DFS:
    size_t Bytes = ( 1000000000 + 1 ) * sizeof int ;
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );

    Does it work on your PC ?

    How much faster is it compared to your code ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to Relf on Sat Feb 17 07:27:34 2024
    On 2/16/2024 1:19 PM, Relf wrote:
    DFS:
    size_t Bytes = ( 1000000000 + 1 ) * sizeof int ;
    int *randarr = malloc( Bytes );
    memset( randarr, 0, Bytes );

    Does it work on your PC ?

    How much faster is it compared to your code ?




    $ test 1000000000 1 5

    DFS : array created and loop 0-filled in 1.363663s
    Relf: array created and memset 0-filled in 0.331312s

    4.1x faster

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)