Hash mark prefix to a string

2022-05-28 Thread Duke Normandin
I asked this question on the Pike channel on libera.chat but nobody
is lurking at the moment. :)

what does the # mean herein the following?

[code]
str =
#"This is a multiline string
terminated by a double-quote like any other string";
[/code]

I've searched all the available docs that I can find, but have yet
to stumbled on an explanation of this syntax. TIA ..
--
Duke
** Bottom-posting, text-only is the netiquette way! **



Pike in the News

2022-05-20 Thread Duke Normandin
https://news.ycombinator.com/item?id=31453255

Pure coincidence? :)
--
Duke
** Text only please. Bottom post works best for me **



Re: Where have all the Pikers gone?

2022-05-20 Thread Duke Normandin
On Sat, 21 May 2022 00:02:17 +1000
Chris Angelico  wrote:


> My Twitch channel bot runs its own web interface, if that counts.
>
> https://sikorsky.rosuav.com/
>
> I take advantage of Pike features to run that site with real-time
> updates (via websockets) that slide to the latest code every time
> I do an update (even without reconnecting the socket). Very handy
> when live-streaming code changes (although I do occasionally
> manage to segfault it).

Goes to show that Pike has the necessary horsepower. It seems that
very few people globally know about its strength and potential.

--
Duke
** Text only please. Bottom post works best for me **



Re: Where have all the Pikers gone?

2022-05-20 Thread Duke Normandin
On Fri, 20 May 2022 12:55:32 +0200
"Stephen R. van den Berg"  wrote:

> Duke Normandin wrote:
> >Awesome! So it seems to me that Pike should be able to give Ruby,
> >PHP, Perl, Python etc a good run for their money in the Web
> >backends domain.
>
> It does, actually.

It's odd then that Pike is never mentioned on Slashdot or Hacker
News etc! There's not even an IRC channel for it. Other than your
own site, do you know of any others besides roxen.com?

> > So what's kept it from being a strong contender?
>
> >I'm just wondering what's wrong with ti? The docs? The community
> >somehow? Poor marketing? Not noob friendly? What?
>
> If you want to generalise (it's never good to generalise), I'd say
> it is "poor marketing".  Then again even that is a very loosely
> defined term.

Poor marketing was my first impression. That's why I suggested that
the Pike language should show up on https://learnxinyminutes.com/.
Free advertising and could be great advocacy.

> I'm using it (very succesfully) for my own:
> - Various custom data-conversion import/export scripts.
> - Web backend to some websites.
> - REST-API backend for some services (either high performance
>   or high security; it can excel in both).
> - High performance custom SMTP server implementation.
> - High performance interface to PostgreSQL (yes, Pike has better
>   database drivers than the standard libpq drivers that come with
>   PostgreSQL).
> - To interface to the API of various cloudservices (e.g. Google
> Cloudservice).

Swell! Wouldn't your success be an inspiration for others to at
least test-drive Pike? A real, juicy, no-holds-barred, language
flame war would be just the thing! On IRC/Hackers News/Slashdot! LOL
Just kidding! But you get the point hopefully. Exposure! Exposure!
Exposure! Hopefully this would also result in more tutorials,
How-Tos, etc and therefore more hits on search engines.

My 2 cents/pence/farthings/et al
--
Duke
** Text only please. Bottom post works best for me **



Re: OOP syntax help

2022-01-07 Thread Duke Normandin
On Sat, 8 Jan 2022 11:44:17 +1100
Chris Angelico  wrote:

[snip]

> > Thanks for clearing that up. I also notice that class
> > declarations are called "programs" - not to be confused with
> > the "main" program to be executed. Is that a correct
> > interpretation?  If a class is declared within a program, in
> > Pike its a "program" within a program? :?
>
> (Redirecting back to the list.)

Sorry about that!

> It's a bit of history from LPC, and others would be better at
> explaining than I am, but my understanding is that it derives

No worries! _That_ is a muddle I don't want to get into after the
little bit that you et out of the bag. :-)

--
Duke
** Text only please. Bottom post is best for me **



OOP syntax help

2022-01-07 Thread Duke Normandin
I've /never/ been fond of OOP, but if I'm to continue with Pike, I
figure I should at least try to understand Pike's very of OOP.

From: https://pike.lysator.liu.se/docs/tut/oop/creation_and_usage.md

[quote]
Creating and Using Objects

Assuming that we have the class animal, we can define some
variables that can be used to store animals. Remember that the
class is also a data type. We can also create some animals to put
in those variables. To create an animal, we use the syntax
*classname*(), i e the name of the class followed by a pair of
parentheses.

animal some_animal;
some_animal = animal();
animal my_dog = animal();
[/quote]

The three statements are confusing to me.
So a class called "animal" has been created and exists! OK ..

"animal some_animal;" ?? Are we cloning the class here to create an
object?

"some_animal = animal(); ??  So what's this than?

"animal my_dog = animal(); ?? It seems to me that this should be
the cloning statement to create a particular object of the animal
class?

It's all a bloody muddle to me. I'm sure that I must be reading it
wrongly.
--
Duke
** Text only please. Bottom post is best for me **



Re: Apache+Pike CGI scripts

2022-01-06 Thread Duke Normandin
On Thu, 6 Jan 2022 23:36:54 -0500
H William Welliver  wrote:

> More details that might be of use:
>
> http://wiki.gotpike.org/index.pike/PikeDevel/Using+Pike+on+the+Web

Very informative! Thx
--
Duke
** Text only please. Bottom post is best for me **



Re: Apache+Pike CGI scripts

2022-01-06 Thread Duke Normandin
On Thu, 6 Jan 2022 09:26:38 -0700
Duke Normandin  wrote:

> I'd like to try that out as a learning medium & instant feedback!
>
> Anybody on this list doing this or have done? TIA ..

[code]
 #!/usr/bin/pike

 int main(){
 write("Content-type:text/html\n\n");
 write("CGI scripts work using Pike!");
 }
[/code]

Worked just fine!
Looking to see if Pike supports "heredoc".
--
Duke
** Text only please. Bottom post is best for me **



Apache+Pike CGI scripts

2022-01-06 Thread Duke Normandin
I'd like to try that out as a learning medium & instant feedback!

Anybody on this list doing this or have done? TIA ..

--
Duke
** Text only please. Bottom post is best for me **



Re: Defining Functions / Procedures

2021-12-09 Thread Duke Normandin
On Fri, 10 Dec 2021 15:28:59 +1100
Chris Angelico  wrote:

> On Fri, Dec 10, 2021 at 3:06 PM Duke Normandin
>  wrote:
> >
> > On Fri, 10 Dec 2021 14:09:21 +1100
> > Chris Angelico  wrote:
> >
> > > On Fri, Dec 10, 2021 at 1:10 PM Duke Normandin
> > >  wrote:
> > > >
> > > > Greetings ..
> > > >
> > > > function hello =lambda() {}
> > > >
> > > > or
> > > >
> > > > void hello() {}
> > > >
> > > > In Pike, which form is prefered or optimal? Why?
> > > > TIA ...
> > >
> > >
> > > Definitely the second, unless you need it to be a variable.
> >
> > Thx Chris! So - if I understand you correctly, the lambda form
> > is available to provide first-class functionality, i.e. the
> > capability of assigning a function to a variable, etc?
>
> The function itself is always a first-class object, but the lambda
> form allows you to reassign it:
>
> function hello = lambda() {};
>
> // ... later ...
>
> hello = lambda() {/* something else */};
>
> Not something you'll often need, but when you do need it, the
> option is there.

Got it! Thx

--
Duke
** Text only please. Bottom post is best. **



Defining Functions / Procedures

2021-12-09 Thread Duke Normandin
Greetings ..

function hello =lambda() {}

or

void hello() {}

In Pike, which form is prefered or optimal? Why?
TIA ...
--
Duke
** Text only please. Bottom post is best. **



Pike Meet-up 2021-Q4

2021-11-10 Thread Duke Normandin
http://pike.lysator.liu.se/about/news/20211020.xml

So how well was it attended? Where's the write-up about it?

--
Duke



Re: Fredrik Hübinette Book

2021-10-19 Thread Duke Normandin
On Tue, 19 Oct 2021 22:17:27 -0400
H William Welliver  wrote:

I think the intent is more of a one page
> summary than a comprehensive set of documentation. Could be the
> perfect opportunity to take on a bite-sized advocacy project!

But it doesn't have to be a mere summary! It could be the
whole-meal-deal - one point at a time! And it could be expanded for
more advanced features!

It _would_ be a great advocacy opportunity as well.

Because it could be a community effort, there would be no need to
wait for yet another book(s), or blog(s) to be written as time
permitted. The initial time and effort would certainly be
non-trivial, but IMO it's absolutely necessary to spread the use
and usefulness of Pike. Unless the few core developers would rather
the language remain a close-door, private project. In which case
the public should not be exposed to the language at all.

It would not do your book project much good though. IMHO, Pike and
its quality capabilities are freely available and so should
quality documentation and tutorials for it.

The https://learnxinyminutes.com site seems to be the quickest way
to get there. A link to it on Pike's homepage would be all that is
required and newcomers to Pike would be spared the hunt-n-peck
search for a complete up-to-date set of docs.

Anyway, this Pike noob won't probably ever see that happen. I first
looked at Pike 10 or so years ago, and like I said previously
nothing about the documentation has changed much during that
period. There must be a reason for that! Of course, maybe you guys
want it that way - a closed shop!

Good luck!
--
Duke



Re: Fredrik Hübinette Book

2021-10-19 Thread Duke Normandin
On Wed, 20 Oct 2021 09:26:24 +1100
Chris Angelico  wrote:

[snip]

> Starting the document in my bot's repository. Can be lifted
> straight into Pike's own docs if/when it's good enough - license
> terms are very free (MIT).
>
> https://rosuav.github.io/StilleBot/Asynchronicity

I'm sure the Pike community will/does appreciate your effort(s)!

Have you guys ever considered using the following:

https://learnxinyminutes.com

Lot's of examples there! Githup-based! Could easily become a
community effort. Standardised presentation!!

There could be followups like "Learn More X in Y minutes"
Where X=pike

for more advanced stuff.

Just a thought! Using that site would also give Pike extra exposure.
--
Duke



Re: Pike Mailing List

2021-10-18 Thread Duke Normandin
On Tue, 19 Oct 2021 01:24:38 + (UTC)
Lance Dillon  wrote:

> I'm on the list, but I don't respond much and others know more
> than me.but I enjoy the language and learn stuff on this
> list...

Glad to know you! You're a Pike guru compared to me! And that's no
lie! LOL

> There are a few others too, 4 or 5..

That many! Then, I'm hoping that I really, really, really enjoy
hacking with Pike!

What happened to it! It's got less advocates/users that
mind-boggling Forth! :-D
--
Duke



Pike Mailing List

2021-10-18 Thread Duke Normandin
@Chris
Are you pretty much the only active, knowledgeable participant in
the Pike list?

--
Duke



Re: Arrays

2021-10-18 Thread Duke Normandin
On Tue, 19 Oct 2021 10:07:43 +1100
Chris Angelico  wrote:

[snip]

> > set warnings strict

That worked swell in my Hilfe! Thx
--
Duke



Re: Arrays

2021-10-18 Thread Duke Normandin
On Tue, 19 Oct 2021 10:07:43 +1100
Chris Angelico  wrote:

> On Tue, Oct 19, 2021 at 10:03 AM Duke Normandin
>  wrote:
> >
> > On Tue, 19 Oct 2021 09:26:34 +1100
> > Chris Angelico  wrote:
> >
> > > On Tue, Oct 19, 2021 at 9:19 AM Duke Normandin
> > >  wrote:
> > > >
> > > > Pike v8.0 release 702 running Hilfe v3.5 (Incremental Pike
> > > > Frontend)
> > > >
> > > > > array(string) flat = ({"this", "that", "the", "other"});
> > > > > flat[1];(4) Result: "that"
> > > >
> > > > > flat[1]=3;
> > > > (5) Result: 3
> > > >
> > > > > flat[1];
> > > > (6) Result: 3
> > > >
> > > > I was under the impression that array(string) would exclude
> > > > any other data types but strings.
> > > >
> > > > What's going on?
> > >
> > > It doesn't work in Hilfe, but "#pragma strict_types" will
> > > flag a script as wanting more stringent type checking, and
> > > will flag assignments like that.
> >
> > Do you mean that the #pragma can be used in Hilfe as well as
> > scripts? Or just in scripts?
>
> Pragmas don't directly work in Hilfe, but you can use this
> directive to enable strict_types:
>
> > set warnings strict
>
> Unfortunately, the version of Pike I'm using (a trunk build of
> 8.1.14) has a lot of spurious warnings from strict_types, so I
> tend not to use it. But if it works for you, then go for it.

I found out for myself that pragmas don't work in Hilfe - but
thanks for confirming it and for the alternate option. I'll give it
a try.

I work with emacs most of the time, so I'm trying to figure out a
slick workflow to learn with. Doing the learning code in Hilfe is
great, but if it's limited than it might cause more confusion which
I don't need.

Thanks agian ..
--
Duke



Fredrik Hübinette Book

2021-10-18 Thread Duke Normandin
I'm reading it online.
Is it still recommended, or is there something more current and as
thorough?
--
Duke



Re: Arrays

2021-10-18 Thread Duke Normandin
On Tue, 19 Oct 2021 09:26:34 +1100
Chris Angelico  wrote:

> On Tue, Oct 19, 2021 at 9:19 AM Duke Normandin
>  wrote:
> >
> > Pike v8.0 release 702 running Hilfe v3.5 (Incremental Pike
> > Frontend)
> >
> > > array(string) flat = ({"this", "that", "the", "other"});
> > > flat[1];(4) Result: "that"
> >
> > > flat[1]=3;
> > (5) Result: 3
> >
> > > flat[1];
> > (6) Result: 3
> >
> > I was under the impression that array(string) would exclude any
> > other data types but strings.
> >
> > What's going on?
>
> It doesn't work in Hilfe, but "#pragma strict_types" will flag a
> script as wanting more stringent type checking, and will flag
> assignments like that.

Do you mean that the #pragma can be used in Hilfe as well as
scripts? Or just in scripts?
--
Duke



Arrays

2021-10-18 Thread Duke Normandin
Pike v8.0 release 702 running Hilfe v3.5 (Incremental Pike Frontend)

> array(string) flat = ({"this", "that", "the", "other"});
> flat[1];(4) Result: "that"

> flat[1]=3;
(5) Result: 3

> flat[1];
(6) Result: 3

I was under the impression that array(string) would exclude any
other data types but strings.

What's going on?
--
Duke



Re: Where have all the Pikers gone?

2021-10-07 Thread Duke Normandin
On Fri, 8 Oct 2021 16:06:23 +1100
Chris Angelico  wrote:

> On Fri, Oct 8, 2021 at 4:00 PM Duke Normandin
>  wrote:
> >
> > On Fri, 8 Oct 2021 15:53:56 +1100
> > Chris Angelico  wrote:
> >
> > [snip]
> >
> > > > Good to know! This Pike noob was getting worried! It just
> > > > seemed to me - at first glance - that Pike should be as
> > > > popular in the Web development domain as Ruby for example.
> > > > I was beginning to think that Pike was all but buried!
> > >
> > > Hmm, Pike's a bit more niche than Ruby, so it's never going
> > > to be quite as popular or as visible. But it is incredibly
> > > useful, and as such, won't die easily :)
> >
> > Out of curiosity, what IS Pike's niche? For some reason I always
> > supposed that it was web back-ends.
>
> That and MUD servers, largely. It's also very good at eternal
> uptime (since it makes on-the-fly updates easy). I use Pike for
> my MUD server, my MUD client, my Twitch channel bot, and a
> variety of other things. Of course, it's also a general-purpose
> language with a rich standard library, so there'll be times when
> it's the right choice even if it isn't specifically its niche
> (for example, I have a savefile analyzer for Europa Universalis
> IV written in Pike, partly to take advantage of socket services
> and async I/O, and partly because of the LR Parser module).
>
> > BTW, IS there an IRC channel for Pike users?
>
> Not sure. I don't use IRC, other than for my Twitch bot.

Awesome! So it seems to me that Pike should be able to give Ruby,
PHP, Perl, Python etc a good run for their money in the Web
backends domain. So what's kept it from being a strong contender?

I'm just wondering what's wrong with ti? The docs? The community
somehow? Poor marketing? Not noob friendly? What?

I'm not trolling! I just want to get a sense of what Pike is all
about and where its heading. TIA ...
--
Duke



Re: Where have all the Pikers gone?

2021-10-07 Thread Duke Normandin
On Fri, 8 Oct 2021 15:53:56 +1100
Chris Angelico  wrote:

[snip]

> > Good to know! This Pike noob was getting worried! It just
> > seemed to me - at first glance - that Pike should be as popular
> > in the Web development domain as Ruby for example. I was
> > beginning to think that Pike was all but buried!
>
> Hmm, Pike's a bit more niche than Ruby, so it's never going to be
> quite as popular or as visible. But it is incredibly useful, and
> as such, won't die easily :)

Out of curiosity, what IS Pike's niche? For some reason I always
supposed that it was web back-ends.

BTW, IS there an IRC channel for Pike users?
--
Duke



Re: Where have all the Pikers gone?

2021-10-07 Thread Duke Normandin
On Fri, 8 Oct 2021 15:04:47 +1100
Chris Angelico  wrote:

> On Fri, Oct 8, 2021 at 2:57 PM Duke Normandin
>  wrote:
> >
> > Long time passing ...
> >
> > Is this list/language THAT dead?
> > No community chatter? At all? No users?
> >
> > Maybe everybody is on IRC maybe? Is there an IRC Pike channel?
> >
>
> It's been pretty quiet here. The language itself still sees
> changes though, and I'm currently browsing the 34 commits since I
> last pulled. So the language isn't dead even if the mailing list
> is quiet.

Good to know! This Pike noob was getting worried! It just seemed to
me - at first glance - that Pike should be as popular in the Web
development domain as Ruby for example. I was beginning to think
that Pike was all but buried!
--
Duke



Where have all the Pikers gone?

2021-10-07 Thread Duke Normandin
Long time passing ...

Is this list/language THAT dead?
No community chatter? At all? No users?

Maybe everybody is on IRC maybe? Is there an IRC Pike channel?

--
Duke



Re: Archives

2021-10-07 Thread Duke Normandin
On Thu, 7 Oct 2021 13:30:57 -0400
H William Welliver  wrote:

> https://www.mail-archive.com/pike@roxen.com/

Seems to work! Now for the historical stuff... Thx
--
Duke Normandin 



Re: Archives

2021-10-07 Thread Duke Normandin
On Thu, 7 Oct 2021 12:59:41 -0400
H William Welliver  wrote:

> I noticed that pike-level already is already archived at The Mail
> Archive[1], so I’ve subscribed this list as well. If all goes
> well, I’ll also attempt to get the history added.
>
> If all goes well, they should be accessible here:
>
> https://www.mail-archive.com/pike@roxen.com/

Thx! Hope it works. Could give new users a boost if they knew they
could at least search the archives for solution for issues in using
Pike. Especially that the online tutorial is still rather
incomplete and unfinished.
--
Duke