Re: my immature thoughts on perl

2023-04-09 Thread Emanuel Berg
Andrew M.A. Cater wrote:

> You don't want to believe that - Epimenides the Cretan
> asserts that "all Cretans are liars"

Face it, the Greek invented it, the Italians (Romans)
perfected/spread it ...

All honor to diplomacy, you are not going to expect me to say
anything else, I think our advantages to the game - let's just
say part of the game is getting the advantages.

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-09 Thread Emanuel Berg
Stefan Monnier wrote:

 I usually taunt people with "All generalizations suck".
>>>
>>> Can't it be the exception to confirm the rule?
>>
>> There is a barber in Crete who shaves all men who don't
>> shave themselves
>
> You're just pointing out that *impredicative*
> generalizations suck even more than the rest.

While - and quite obvious to most observers - or I should say
"clear", not obvious - still, it's enough to function as an
example to the opposite.

[ Note: This is assuming an inclusive superset. And to be
  honest, I stayed att that assumption since - indeed - how
  would that work - inheritance would be one the transparent
  or multiple interface allowed but in practice you tend to
  use, I don't know, two or three hundreds, tops? ]

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-09 Thread Andrew M.A. Cater
On Sun, Apr 09, 2023 at 11:18:14AM -0400, Stefan Monnier wrote:
> >> > I usually taunt people with "All generalizations suck".
> >> Can't it be the exception to confirm the rule?
> > There is a barber in Crete who shaves all men who don't
> > shave themselves [1].
> 

You don't want to believe that - Epimenides the Cretan asserts that "all
Cretans are liars"

> You're just pointing out that *impredicative* generalizations suck even
> more than the rest.
> 
> 
> Stefan
>

All best, as ever,

Andy 



Re: my immature thoughts on perl

2023-04-09 Thread Stefan Monnier
>> > I usually taunt people with "All generalizations suck".
>> Can't it be the exception to confirm the rule?
> There is a barber in Crete who shaves all men who don't
> shave themselves [1].

You're just pointing out that *impredicative* generalizations suck even
more than the rest.


Stefan



Re: my immature thoughts on perl

2023-04-09 Thread Emanuel Berg
tomas wrote:

> There is a barber in Crete who shaves all men who don't
> shave themselves [1]
> https://en.wikipedia.org/wiki/Barber_paradox

Yeah, but that isn't really a paradox, is it?

It's like all the programs that will increase inflation :)

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread tomas
On Sat, Apr 08, 2023 at 02:37:56PM +0200, Emanuel Berg wrote:
> tomas wrote:
> 
> >>> Perl is the best language, maybe Lisp is the best
> >>> language. But everything else isn't as good.
> >> 
> >> Every categorical generalisation is wrong. (Even this one
> >> :) )
> >
> > I usually taunt people with "All generalizations suck".
> 
> Can't it be the exception to confirm the rule?

There is a barber in Crete who shaves all men who don't
shave themselves [1].

Cheers

[1] https://en.wikipedia.org/wiki/Barber_paradox
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-08 Thread tomas
On Sat, Apr 08, 2023 at 06:08:31AM +, davidson wrote:

[...]

> Clippy 2.0 has a hype train, and my BS detector is blazing like a
> forest fire.

Thank you for that one: "ChatGPT: Clippy Strikes Back".

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-08 Thread Emanuel Berg
>>> Ha, but can't we do better, I would like all the
>>> properties (stuff possible to express and do) in
>>> a programming language encoded, and then count them to
>>> determine what language is the most powerful.
>>
>> We know that except for some particularly limited
>> languages, they'll all mutually equivalent.
>
> Of course :)
>
> No, I mean on an applied level and readily available so
> from/using the language ...

Is the Unix model universal or limited, if it is limited, how
close did we come to the limit?

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread Emanuel Berg
Stefan Monnier wrote:

>> Ha, but can't we do better, I would like all the properties
>> (stuff possible to express and do) in a programming
>> language encoded, and then count them to determine what
>> language is the most powerful.
>
> We know that except for some particularly limited languages,
> they'll all mutually equivalent.

Of course :)

No, I mean on an applied level and readily available so
from/using the language ...

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread Stefan Monnier
> Ha, but can't we do better, I would like all the properties
> (stuff possible to express and do) in a programming language
> encoded, and then count them to determine what language is the
> most powerful.

We know that except for some particularly limited languages, they'll all
mutually equivalent.


Stefan



Re: my immature thoughts on perl

2023-04-08 Thread Emanuel Berg
Andy Smith wrote:

> That is, why are you asking people to convince you to like
> Perl? There are lots of languages and you appear to have
> found one you like better.

Maybe there is no answer in particular why Perl has
it's trajectory. Maybe it can't be expressed in a formula.
But I just get the feeling that it can?

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread Emanuel Berg
coreyh wrote:

>>> I think you should use Ruby if you like Ruby better!
>>
>> Perl is the best language, maybe Lisp is the best language.
>> But everything else isn't as good.
>
> The Language Wars Are Over: ChatGPT Won
> https://bourgoin.dev/posts/programming-languages/

Ha, but can't we do better, I would like all the properties
(stuff possible to express and do) in a programming language
encoded, and then count them to determine what language is the
most powerful.

Then we should take that language and simplify everything and
make it shorter.

So we start with everything, then make it smaller. it's the
new maximalist/minimalist view which is debated so much in the
media these days.

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread Emanuel Berg
tomas wrote:

>>> Perl is the best language, maybe Lisp is the best
>>> language. But everything else isn't as good.
>> 
>> Every categorical generalisation is wrong. (Even this one
>> :) )
>
> I usually taunt people with "All generalizations suck".

Can't it be the exception to confirm the rule?

But ... the exception should be the opposite, or maybe where
the function is not defined - singularity, don't remember
the word. No, that was it, right?

Anyway, here the exception would then be

All generalizations are bad, except the on that says they are.

No, that makes sense, right?

It's the exception!

B)

- counting the votes then ...

- and, from the Z System, 19 Million Buckazoid for Lisp!

- expected, they are always pro Lisp

- it's the only planet system we know of where they do
  scientific research even

- scientific research?

- on Lisp

- aah, oh :)

- like we say, they are firmly in the Lisp camp. but +19
  noted, let's move on

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-08 Thread davidson

On Sat, 8 Apr 2023 to...@tuxteam.de wrote:

On Sat, Apr 08, 2023 at 07:06:28AM +0800, cor...@free.fr wrote:

On 08/04/2023 03:28, Emanuel Berg wrote:

Andy Smith wrote:


I think you should use Ruby if you like Ruby better!


Perl is the best language, maybe Lisp is the best language.
But everything else isn't as good.


The Language Wars Are Over: ChatGPT Won
https://bourgoin.dev/posts/programming-languages/


Given the usual quality of Microsoft's output, it won't make
a big difference.


"It looks like you're writing a letter. Would you like some help?"


I'm looking forward towards the days that thing feeds back
on itself and its output won't be much different from random
noise (or perhaps from its first few eigenvectors).

Personally, I'm not on speaking terms with that thing.


Clippy 2.0 has a hype train, and my BS detector is blazing like a
forest fire.

--
I don't wanna hear about what the rich are doing
I don't wanna go to where where the rich are going
-- The Clash



Re: my immature thoughts on perl

2023-04-07 Thread tomas
On Sat, Apr 08, 2023 at 07:06:28AM +0800, cor...@free.fr wrote:
> On 08/04/2023 03:28, Emanuel Berg wrote:
> > Andy Smith wrote:
> > 
> > > I think you should use Ruby if you like Ruby better!
> > 
> > Perl is the best language, maybe Lisp is the best language.
> > But everything else isn't as good.
> 
> The Language Wars Are Over: ChatGPT Won
> https://bourgoin.dev/posts/programming-languages/

Given the usual quality of Microsoft's output, it won't make
a big difference.

I'm looking forward towards the days that thing feeds back
on itself and its output won't be much different from random
noise (or perhaps from its first few eigenvectors).

Personally, I'm not on speaking terms with that thing.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-07 Thread tomas
On Fri, Apr 07, 2023 at 08:09:12PM +, Andrew M.A. Cater wrote:
> On Fri, Apr 07, 2023 at 09:28:59PM +0200, Emanuel Berg wrote:
> > Andy Smith wrote:
> > 
> > > I think you should use Ruby if you like Ruby better!
> > 
> > Perl is the best language, maybe Lisp is the best language.
> > But everything else isn't as good.
> > 
> 
> Every categorical generalisation is wrong. (Even this one :) )

Heh: I usually taunt people with "All generalizations suck".
Great minds think alike, it seems.

(I usually leave the "but hey, this is a generalization, too"
as an exercise for the reader ;-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-07 Thread coreyh

On 08/04/2023 03:28, Emanuel Berg wrote:

Andy Smith wrote:


I think you should use Ruby if you like Ruby better!


Perl is the best language, maybe Lisp is the best language.
But everything else isn't as good.


The Language Wars Are Over: ChatGPT Won
https://bourgoin.dev/posts/programming-languages/

regards.



Re: my immature thoughts on perl

2023-04-07 Thread Andrew M.A. Cater
On Fri, Apr 07, 2023 at 09:28:59PM +0200, Emanuel Berg wrote:
> Andy Smith wrote:
> 
> > I think you should use Ruby if you like Ruby better!
> 
> Perl is the best language, maybe Lisp is the best language.
> But everything else isn't as good.
> 

Every categorical generalisation is wrong. (Even this one :) )

Andy

> -- 
> underground experts united
> https://dataswamp.org/~incal
> 



Re: my immature thoughts on perl

2023-04-07 Thread Emanuel Berg
Andy Smith wrote:

> I think you should use Ruby if you like Ruby better!

Perl is the best language, maybe Lisp is the best language.
But everything else isn't as good.

-- 
underground experts united
https://dataswamp.org/~incal



Re: my immature thoughts on perl

2023-04-04 Thread Andy Smith
Hello,

On Tue, Apr 04, 2023 at 10:35:39AM +0800, cor...@free.fr wrote:
> How do you think of it?

I think you should use Ruby if you like Ruby better!

Honestly, we aren't the "I'd Like An Argument Please" sketch; if we
were then you'd have to be paying. As it stands I am only doing this
in my spare time.

That is, why are you asking people to convince you to like Perl?
There are lots of languages and you appear to have found one you
like better.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: my immature thoughts on perl

2023-04-04 Thread Ken Peng




to...@tuxteam.de wrote:

I think watching carefully Tcl's evolution teaches a lot about
languages, the type of design decisions going into them and their
(changing) context.


I was surprised to see many people here still use TCL.
Many years ago I used this language for sysadmin jobs.
It was working just fine.


--
https://kenpeng.pages.dev/



Re: my immature thoughts on perl

2023-04-04 Thread tomas
On Tue, Apr 04, 2023 at 07:12:05AM -0400, Greg Wooledge wrote:
> On Tue, Apr 04, 2023 at 06:50:02AM +0200, to...@tuxteam.de wrote:
> > In Tcl, OTOH, EIAS [...]

> The introduction of the {*} operator eliminated a lot of the need for
> eval.  Instead of

[...]

Thanks for the reminder :)

I think watching carefully Tcl's evolution teaches a lot about
languages, the type of design decisions going into them and their
(changing) context.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-04 Thread Greg Wooledge
On Tue, Apr 04, 2023 at 06:50:02AM +0200, to...@tuxteam.de wrote:
> In Tcl, OTOH, EIAS (Everything Is A String), so you've got
> to eval strings (don't take me too seriously: modern Tcl
> cheats, and it's more "Everything looks like a string",
> but I disgress).

The introduction of the {*} operator eliminated a lot of the need for
eval.  Instead of

eval myfunc $listvar

now, you can do

myfunc {*}$listvar

which "expands" the list variable and passes each element as a separate
argument.  This is much cleaner, because it lets you decide where and
when you want to perform that expansion.  eval forces you to expand
everything in the command where it's used.

In the context of this thread, you can do things like:

% namespace import ::tcl::mathop::+
% + 1 2 3 4
10
% set nums {1 2 3 4}
1 2 3 4
% + {*}$nums
10
% + {*}[lmap x $nums {+ $x 1}]
14

Which is the most elegant way to express the desired piece of code in Tcl,
as far as I'm aware.  lmap returns a list, and {*} expands it for the
mathop + command to use.



Re: my immature thoughts on perl

2023-04-04 Thread Vincent Lefevre
On 2023-04-03 20:50:22 -0700, Will Mengarini wrote:
> * cor...@free.fr  [23-04/04=Tu 10:35 +0800]:
> > For instance, in ruby (irb) this is quite smooth:
> > irb(main):001:0> [1,2,3,4].map{|x|x+1}.reduce{|x,y|x+y}
> > => 14
> >
> > And in scala (shell):
> > scala> List(1,2,3,4).map{ _+1 }.reduce{_+_}
> > res1: Int = 14
> 
> > In perl there is no interactive shell [...]
> 
> perl -le 'print eval $_ while <>'

https://metacpan.org/pod/Shell::Perl

https://stackoverflow.com/questions/73667/how-can-i-start-an-interactive-console-for-perl

TIMTOWTDI :-)

> > In perl [...] the block statement seems strange:
> > $ perl -le '@x=(1,2,3,4); $sum+=$_ for( map {$_+1} @x );print $sum'
> > 14
> 
> perl -le '@x=(1..4); print eval join "+", map $_+1, @x'

Though I have already used the eval+join trick a few years ago, this
is rather ugly. Using List::Util with "reduce" is probably better:

https://metacpan.org/pod/List::Util

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: my immature thoughts on perl

2023-04-04 Thread john doe

On 4/4/23 04:35, cor...@free.fr wrote:

Hello list,



Would it be possible to refrain from using the list for OT stuff.
Your Perl threads are generating traffic that are not useful.

--
John Doe



Re: my immature thoughts on perl

2023-04-03 Thread tomas
On Tue, Apr 04, 2023 at 11:52:57AM +0800, cor...@free.fr wrote:

[...]

> I heard in perl never 'eval' a string. :)

Never say never :)

That said... there are better things to eval in Perl than
a string, so if you have the choice, think twice. But you
have got to think anyway if you are programming.

In Tcl, OTOH, EIAS (Everything Is A String), so you've got
to eval strings (don't take me too seriously: modern Tcl
cheats, and it's more "Everything looks like a string",
but I disgress).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: my immature thoughts on perl

2023-04-03 Thread Will Mengarini
* cor...@free.fr  [23-04/04=Tu 10:35 +0800]:
> For instance, in ruby (irb) this is quite smooth:
> irb(main):001:0> [1,2,3,4].map{|x|x+1}.reduce{|x,y|x+y}
> => 14
>
> And in scala (shell):
> scala> List(1,2,3,4).map{ _+1 }.reduce{_+_}
> res1: Int = 14

> In perl there is no interactive shell [...]

perl -le 'print eval $_ while <>'

> In perl [...] the block statement seems strange:
> $ perl -le '@x=(1,2,3,4); $sum+=$_ for( map {$_+1} @x );print $sum'
> 14

perl -le '@x=(1..4); print eval join "+", map $_+1, @x'

Too bad this is two days late, but Perl is an April 1 kind of language.



Re: my immature thoughts on perl

2023-04-03 Thread coreyh

On 04/04/2023 11:50, Will Mengarini wrote:

* cor...@free.fr  [23-04/04=Tu 10:35 +0800]:

For instance, in ruby (irb) this is quite smooth:
irb(main):001:0> [1,2,3,4].map{|x|x+1}.reduce{|x,y|x+y}
=> 14

And in scala (shell):
scala> List(1,2,3,4).map{ _+1 }.reduce{_+_}
res1: Int = 14



In perl there is no interactive shell [...]


perl -le 'print eval $_ while <>'


In perl [...] the block statement seems strange:
$ perl -le '@x=(1,2,3,4); $sum+=$_ for( map {$_+1} @x );print $sum'
14


perl -le '@x=(1..4); print eval join "+", map $_+1, @x'

Too bad this is two days late, but Perl is an April 1 kind of language.


I heard in perl never 'eval' a string. :)



Re: my immature thoughts on perl

2023-04-03 Thread David Christensen

On 4/3/23 19:35, cor...@free.fr wrote:

Hello list,

I am not that familiar with perl (though I like it), but I found it 
maybe have two flaws as follows.


1. doesn't have an interactive shell.
2. the block statement (like lambda) is ugly.

For instance, in ruby (irb) this is quite smooth:

irb(main):001:0> [1,2,3,4].map{|x|x+1}.reduce{|x,y|x+y}
=> 14


And in scala (shell):

scala> List(1,2,3,4).map{ _+1 }.reduce{_+_}
res1: Int = 14

In perl there is no interactive shell, and the block statement seems 
strange:


$ perl -le '@x=(1,2,3,4); $sum+=$_ for( map {$_+1} @x );print $sum'
14


How do you think of it?

Thanks
Corey



That post would be better sent to the Perl Beginner's mailing list:

https://lists.perl.org/list/beginners.html


David



Re: my immature thoughts on perl

2023-04-03 Thread Greg Wooledge
On Tue, Apr 04, 2023 at 10:35:39AM +0800, cor...@free.fr wrote:
> For instance, in ruby (irb) this is quite smooth:
> 
> irb(main):001:0> [1,2,3,4].map{|x|x+1}.reduce{|x,y|x+y}
> => 14
> 
> 
> And in scala (shell):
> 
> scala> List(1,2,3,4).map{ _+1 }.reduce{_+_}
> res1: Int = 14

And Tcl:

unicorn:~$ rlwrap tclsh
% ::tcl::mathop::+ {*}[lmap x {1 2 3 4} {expr {$x+1}}]
14

As long as we're collecting solutions.

> In perl there is no interactive shell, and the block statement seems
> strange:
> 
> $ perl -le '@x=(1,2,3,4); $sum+=$_ for( map {$_+1} @x );print $sum'
> 14

I'm not as experienced with perl.  I don't know how to shorten that.