Re: On Mac Ventura, Pike v9 missing GMP symbols
On 2024-03-12 10:13, Henrik Grubbström wrote: The above are probably just two different ways to report the same error. It looks like the above it output for the Makefile command: @linkopts="`pwd`/module.a `echo '$(MODULE_LDFLAGS)' | sed -e 's@$(BASE_LDFLAGS)@@'`"; \ ... I suspect that there is an '@' in the definition of MODULE_LDFLAGS at the beginning of .../modules/Gmp/Makefile in your build tree. Yep, I think this is the problem (from his config.log for Gmp): BASE_LDFLAGS=-L/usr/local/opt/postgresql@15/lib homebrew strikes again! /grubba
Re: On Mac Ventura, Pike v9 missing GMP symbols
Yes, that's sort of what I was getting at. The error seems like it's not trying to link the gmp library. Is the library present in your /usr/local/lib? You could try adding -lgmp to modules/linker_options and modules/Gmp/linker_options? If you can avoid triggering a rewrite of those files, it should try to link with -lgmp added. A little more detail: MODULE_LDFLAGS is used as input to the linker_options make target in the modules/Gmp directory, which is then used to generate the modules/linker_options file, which is used to statically link a few modules into the pike binary (Gmp and Stdio, in particular). linker_options is generated by running MODULE_LDFLAGS through a sed command, and if the sed command fails, it doesn't include any libs. Is it possible you're running into this: https://git.lysator.liu.se/pikelang/pike/-/issues/10082 ? Can you run the following commands in the build/.../modules/Gmp directory and upload all of the results somewhere? echo Lang: $LANG echo Locale: $LOCALE rm linker_options make linker_options cat linker_options Bill On 2024-03-11 10:15, Mike Kilmer wrote: Poking around further, linker_options contains: /Users/mikekilmer/pike/build/darwin-22.6.0-x86_64/modules/Gmp/module.a Chris says that his (Debian) install includes the -lgmp option at the end of that path. config.status contains: S["LIBS"]=" -lgmp" Makefile: MODULE_LDFLAGS=-L/usr/local/opt/ruby/lib -L/usr/local/opt/postgresql@15/lib -L/usr/local/opt/icu4c/lib \ -L/usr/local/lib -framework Foundation -framework System -framework CoreServices \ -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3 \ -ldl -lutil -lm -lpoll -framework CoreServices -lgmp gmp_machine.h: #define HAVE_GMP_H 1 #define HAVE_LIBGMP 1 Mike
Re: On Mac Ventura, Pike v9 missing GMP symbols
Can you please post the contents of build/.../modules/Gmp/config.log? I think, if build/.../modules/linker_options doesn't have -lgmp, then there's a problem in the configuration phase. Maybe the include files can be found but the lib can't? I can't imagine configure would have succeeded but I guess that's possible. On 2024-03-10 22:43, Mike Kilmer wrote: Happy to. Also adding pike@roxen.com back in as we'd gotten off of it. Gist of output is here. https://gist.github.com/MikeiLL/7b0e1ff30f909a6194908c025234e3a3 On Mar 10, 2024, at 8:21 PM, William Welliver wrote: Hi Mike, I think there’s possibly been a bit of a miscommunication. When you run “make” in the git cloned directory, does that process complete successfully, or do you get an error? A git checkout requires a working pike to compile and may need to build a minimal pike in order to do that. That minimal pike is (if memory serves) called tpike. I’m just trying to understand where you’re having problems. Maybe you can upload the output of the make process somewhere we can refer to? For anyone following, tool -L is kind of like ldd on some other systems. You will note that your homebrew copy of pike uses the gmp dynamic library. Sent from my iPhone On Mar 10, 2024, at 8:52 PM, Mike Kilmer wrote: I don't think there's a problem with your libgmp (actually, it would be the libgmp.dylib not libgmp.a unless you've specifically disabled the generation of dynamic libraries when building the gmp library), I think it's that -lgmp isn't being added when the pike binary is being generated. If you can run otool -L on the pike binary in your build directory and send that to me, I think we can rule the library in or out. Hi, William. Ccing Chris, my Pike (but not Mac) guru. I believe you had explaining that otool would be run on a binary after successful build, and the only one of those I have is the brewed one, so ran on that. Please pardon if I misunderstood. otool -L ...Cellar.../bin/pike /usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0) /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1228.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
Re: On Mac Ventura, Pike v9 missing GMP symbols
Ah, sorry. Once you build pike (assuming that you've built it and then it won't install or start), build/darwin-ver-arch/pike is the uninstalled pike binary. You'd run otool -L on that file. bin/pike is a shell script that will let you start up pike without installing it by setting arguments and environment variables... you won't be able to run otool on that because it's just a shell script, not a binary. So for me, I've cloned the pike repo, installed the prerequisite libraries using homebrew (nettle + gmp) and then done a make. Running make will do the configuration, build, etc and if it was successful, you can run something like: otool -L build/darwin-version-arch/pike And there should be a line that has the path to the gmp library. If it's not there, something is going wrong in the configure/build phase (look in your modules/Gmp/linker_options and -lgmp should be there, and possibly -lmpfr depending on how your gmp is set up.) *If* your pike binary is not linked with gmp, then that is a completely logical explanation for why you're getting those errors. Why it's not being linked against gmp is then the question we need to find an answer for. If, on the other hand gmp is being linked into your pike binary, then there's something wrong with your gmp library and we'd need to figure out what's going on there. I think that's probably unlikely, since you tried using the home-brew version and it works fine with the home-brew compiled pike. So, try to run otool -L on the pike binary you've built and we'll have a better idea about what's going on. Bill On 2024-03-09 10:27, Mike Kilmer wrote: Thank you so much Bill. Feeling optimistic. And pretty ignorant. When you say, `path/to/pike` I'm not sure what you mean, in other words, which item in either Downloaded or Cloned: ANNOUNCE COPYING README build/ lib/ refdoc/ CHANGES COPYRIGHTREADME-GIT buildid.txt man/ src/ COMMITTERS Makefile bin/ index.html packaging/ tools/ Am I running `otool` on? Tried /bin/pike and also looked in build and src, but still missing something.
Re: On Mac Ventura, Pike v9 missing GMP symbols
Just want to confirm that on a fresh install of Ventura on M2, pike head builds fine using home-brew provided nettle/gmp. I think there must be something strange going on in your build environment... You can confirm that the gmp library is linked by using otool -L /path/to/pike: otool -L ./pike ./pike: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1953.255.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1228.0.0) /usr/local/opt/mpfr/lib/libmpfr.6.dylib (compatibility version 9.0.0, current version 9.1.0) /usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0) /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libnetwork.dylib (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0) Bill > On Mar 8, 2024, at 11:05 PM, Mike Kilmer wrote: > > Hi, all. > > Nice to meet you. > > Any Mac users around? > > Was able to easily install Pike v8 with homebrew, but am trying to compile > from source on my Mac (Ventura) and struggling with it not finding the GMP > libraries. > > Tried download as well as git clone git://pike-git.lysator.liu.se/pike.git > and configure/making from there. > > Trying to compile the master branch I get: > > * GMP is homebrew installed with libraries added to env: LDFLAGS="$LDFLAGS > -L/usr/local/Cellar/gmp/6.3.0/lib" > * Content of `build/darwin-22.6.0-x86_64/modules/Gmp/linker_options`: > > /Users/mikekilmer/Pike-v9.0-snapshot/build/darwin-22.6.0-x86_64/modules/Gmp/module.a > * Also tried compiling GMP manually into /usr/local/lib/ and it reports that > many of the files contain no symbols > however, for example /usr/local/lib/libgmp.a contains strings that look > like symbols: eg ___gmp_randseed > > Error: > Undefined symbols for architecture x86_64: > "___gmp_set_memory_functions", referenced from: > _pike_module_Gmp_init in module.a(mpz_glue.o) > Etc... > > After checking out 8.0, (or 8.1) `make` yields this: > > ... > configure.in:35: warning: _AC_CONFIG_SUBDIRS: you should use literals > ./lib/autoconf/status.m4:1096: AC_CONFIG_SUBDIRS is expanded from... > configure.in:35: the top level > ... > > Configure arguments: > Use `make CONFIGUREARGS="..." ...' to change them. > They will be retained in the build directory. > > Wondering if a virtual linux solution may be necessary. > > Any thoughts? > > Thanks much.
Re: How to install modules in Pike? I'd like to do GTK2 in Pike, but the module is not installed
Hi Ken- Apologies for the long post. I'm primarily a MacOS user here, and I've had nothing but frustration with MacPorts. In fact, I tried to submit fixes for the problem you're referring to all those years ago and was met with silence. I eventually gave up trying. I can provide assistance if you'd like to try your hand at getting the problem resolved. The home-brew port of pike was my handy-work and it's completely up-to-date. There are a lot of things about home-brew that I don't like, but it seems to have the lion's share of the market. The version of autotools works for building pike (I use an isolated brew install for the ancillary build tools when I'm preparing the "official" binary that you describe using below). Details of how I prepare those builds is described in this document: http://wiki.gotpike.org/PikeDevel/Pike+Distribution+on+OSX Most of the effort surrounds getting a known set of static libraries to build against and avoiding picking up dynamic library references from things that won't be present on a stock system (like macports or home-brew installed libraries). I also have a port of pike for pkgsrc, which is installable on MacOS, and it's pretty well tested. I've been meaning to have it included in the official repository, but haven't found the time to send an email about it (a poor excuse, I realize). Now, to your specific problem: If you've installed the binary distribution from the pike website and want to build and install a module that wasn't included in the binary dist, it's actually fairly straightforward to do: 1. Install any prerequisites you might need 2. Download and pack the /source/ distribution for the version of pike you've got. 3. Go into the directory of the module you want to build (Pike-v8.0.1738/src/post_modules/GTK2) 4. Run pike -x module and watch the configuration process to make sure it's found your dependencies. 5. If it's not finding your dependencies, you'll probably need to add those directories to the appropriate places in the specs file, which is located in the /path/to/pike/include/pike/specs 5a. Run pike -x module spotless to remove all build products before rebuilding. 6. Repeat 4 through 5 until it's finding things and building a module with the support you want. 7. sudo pike -x module install As an example, I did this with home-brew, and the path of least resistance for me was to install autoconf, pkg-config and gtk+. I added -I/opt/homebrew/include to the Makefile wherever -I were also found, and also changed the include of image.h in pgtk.h to point to the absolute path to that file, which is is in src/modules/Image. I was then able to build and install GTK2 and test it out using the following code: Alert.pike: #pike __REAL_VERSION__ // Create a simple alert window. The default title is @expr{Alert@}. A // single button @expr{Ok@} will be created. Pressing it removes the // dialog. inherit GTK2.Dialog; void begone(object w2) { this->hide(); destruct( this ); } object ok_button; //! Returns the ok @[Button] object. GTK2.Button ok() { return ok_button; } //! void create(string text, string|void title) { ::create(); object l = GTK2.Label( text ); set_title( title||"Alert" ); l->set_justify( GTK2.JUSTIFY_LEFT ); l->set_alignment(0.0, 0.5); l->set_padding( 20, 20 ); vbox()->add( l->show() ); ok_button = GTK2.Button("OK"); ok_button->signal_connect( "clicked", begone ); action_area()->add( ok_button->show() ); show(); } test.pike: object alert; int main() { GTK2.gtk_init(); alert = .Alert("Hello world!\n"); alert -> signal_connect("hide", lambda(){ werror("whee!\n"); exit(0); }); return -1; } I adapted the GTKSupport.pmod/Alert.pike from GTK1 to GTK2. For some reason, the destroy signal isn't being triggered when the Alert object is destroyed in begone(). Perhaps some GTK2 wizard will have more details about that. I worked around it by triggering exit() when the alert is hidden. Hope this helps... don't hesitate to get in touch with any questions or comments. Bill On 2023-08-24 00:34, Kenneth Wolcott wrote: Hi Bill; Thanks for your response. It looks like I'm in a crippled state :-( I am unable to build from source because I can't seem to get the correct and functional version of the autoconf family installed (I'm on a Mac, M1 chip and using MacPorts). The version of pike on MacPorts fails to build (supposedly unofficially unsupported on MacPorts for 15 years??!!) I was able to download and install the Pike binary (Pike-v8.0.1738-MacOSX-12.0-arm64 from https://pike.lysator.liu.se/download/pub/pike/latest-stable/), install it and use it, but it looks like all I have is a binary. So it looks like all I can have is a Pike binary with the modules that come with the binary, no ability to build or import additional packages (as far as I can tell). I have lots of pertinent MacPorts ports (packages) installed, such as gtk2 and gtk3...
Re: How to install modules in Pike? I'd like to do GTK2 in Pike, but the module is not installed
Hi Ken, If you’ve installed pike from a package, there will usually be a set of additional packages for modules that have extra dependencies, like gtk and various databases. You can use your package manager to explore and install those “add on” packages. If you’ve installed pike by compiling from source, then chances are you didn’t have a necessary dependency installed when you did the build. The easiest way to get just the module you want compiled and installed is to do this: $ cd src/post_modules/GTK2 $ pike -x module $ sudo pike -x module install I’m remembering the path from memory so you might need to adjust that. Also, you should inspect the output of the configure step during the module build to make sure it found the needed components. Hope this helps! Don’t hesitate to reply back if you have any additional questions or problems. Bill > On Aug 23, 2023, at 8:03 PM, Kenneth Wolcott wrote: > > Hi! > > Brand-new noob here. > > How to install modules in Pike? I'd like to do GTK2 in Pike, but the > module is not installed > > I read the beginner guide and a great deal of the main manual. > > The hello.pike example won't execute because I don't have the GTK > module installed. > > I have not yet seen any instructions on how to add a Pike module that > was not installed as a part of Pike. > > Thanks, > Ken Wolcott >
Re: Pike in the News
I always enjoy reading through discussions like this to see if there's anything to be learned. Obviously, a lot of the comments are familiar and center around: a) I already have a preferred language, why would I ever learn something that isn't already in use by a large percentage of the programming population? b) (probably a corollary) the community is so small, I would need to actually do some learning and write some code rather than swipe answers from google and pip/npm a module! I don't really think there will ever be a satisfactory answer for these folks, and that's fine. I will note the sometimes comical complexity invoked by people using node, for example. Developing a simple application can easily pull in 700 external modules from npm. I also have to wonder what leads a language community to have a very popular module with one method, that returns the lower case version of a string... did the language not provide such a feature out of the box? Did someone publish that as a means for learning about the module ecosystem (reasonable, even laudable!) and no one noticed it wasn't necessary? Was it a huge joke? Who knows? For better or worse, if you choose to use pike, you will be somewhat forced (and rewarded) if you do your homework... the vast majority of potential users will be eliminated right there. There were some questions about "tooling" which are potentially interesting: a) We like mod_php! We like web development frameworks! Where is any of this? I've tried to keep lists of these sorts of solutions but because they're not linked to from the main pike site, it's almost impossible to find them. mod_php like functionality via FCGI/SCGI/Relaying exists, as does the ability to embed Pike code in pages just like b) Where's the source code? Here, I actually sort of agree that there's a discoverability problem. Even now, after decades of experience with the website, I always have to stop and think about where the read-only link is. Most of the links on the sub ribbons seem almost invisible to me. Could something be done to make it easier to find? Seems pretty common for that to be on the front page, or at worst the top of the development page. I imagine the project pays a price for not being GitHub-first, but making the repository location, etc easier to find would be useful for everyone, I think. c) No discussion forum? No chat room? A mailing list, how retro! Aside from people not reading text that's very clearly present, I do note that the dev mailing list link is broken. Would it also be reasonable to include a link to the mailing list archive at mail-archive.org? It seems that the back-messages never got loaded, but current messages seem to be present. I assembled a fairly complete archive of the messages back in time, if anyone has an idea for how that could be made available (and googlable)? Some things I found really interesting: a) Concurrency, ie the GIL What are the ways for improving concurrency, and how big of a problem is it? I'm sure it can be a real problem, just wondering if anyone has any experience probing what they are? Aside from unlocking in c-language modules, seems like the solutions for single-process improvements are pretty invasive. Is there an opportunity to provide some tooling to allow tasks to be spread across a number of pike processes in order to get around the GIL? I did some work with zeromq, which positions itself as a way to improve concurrency without the risks of multi-threading. Perhaps some sort of pike clustering module/etc could provide performance improvements? b) Embedded/embedding 2 possible meanings here; a) embedding a pike interpreter in another program, which is possible and I've shipped several projects that use this. Don't think this would be of interest to most people, but could be made a lot nicer with just a little effort. b) running some variant of a pike interpreter on microcontroller scale devices (Ala micropython, etc). Potentially huge audience, but seems like the pike interpreter isn't really suited to being scaled down to fit/run: a pretty hefty controller would be necessary and without a real os and limited ram, you'd probably give up a lot of the things that pike excels at: networking, file I/0, etc. Could be really interesting to see what the smallest device you could run a real OS and pike on and tailor that to embedded development. Ie, can you do it with a device you can get for 10 currency units reliably? I'd certainly be willing to put some cycles toward that if there's interest. c) Runtimes: JVM, WASM, etc Probably not ever going to happen, but wouldn't it be nice if it did? I feel like there is some low hanging fruit that could at the very least make life easier for the random person who ends up on the Pike website: a) fixing broken links b) making the repository easier to find c) how about a faq? all of these things come up from time to time, a
Re: Pike 8.0 release 1116
Just a quick update: I wrote a (basically empty) program that included 20 empty files and had no problems on 8.0.1116. So there must be something more to it. If you can find a minimal test case, we might have better luck. Bill > On Apr 26, 2022, at 11:01 AM, David Estopa wrote: > > Hello, Friends of Pike! > > On Pike 8.0 1116, have anybody experienced similar malloc error trying to > include several .h files into a program? > > malloc(): invalid next size (unsorted) > corrupted size vs. prev_size > > My program includes several .h to define several languages constants. If I > include 18 works fine, but cannot include one more. > > Is there a max size limit to include files into a pike program? > > Thanks in advance. > > David Estopà >
Re: Pike 8.0 release 1116
Hi David- I'm not aware of a limitation... is it possible you have a circular reference somewhere? Do you suspect an overall size limitation, or do you think it's because of the number of includes? Removing the content from one or more of the files might give an indication of one vs the other. Is this a problem you're discovering right after switching to 8.0.1116, or have you been using that version for a while? Bill On 2022-04-26 11:01, David Estopa wrote: Hello, Friends of Pike! On Pike 8.0 1116, have anybody experienced similar malloc error trying to include several .h files into a program? malloc(): invalid next size (unsorted) corrupted size vs. prev_size My program includes several .h to define several languages constants. If I include 18 works fine, but cannot include one more. Is there a max size limit to include files into a pike program? Thanks in advance. David Estopà
Pike 8.0 release 15 (8.0.1738) now available
Hello, Friends of Pike! The Pike development team is pleased to announce the 15th release of Pike 8.0: build 8.0.1738. I’m in the process of submitting updates for homebrew and pkgsrc, so the new version should appear there in the near future. As always, bug reports, comments and suggestions are welcome! Bill Source: https://pike.lysator.liu.se/pub/pike/all/8.0.1738/Pike-v8.0.1738.tar.gz Binary builds: https://pike.lysator.liu.se/download/pub/pike/all/8.0.1738/ RPMs for RHEL/CentOS: https://pike.lysator.liu.se/download/pub/pike/all/8.0.1738/el6 https://pike.lysator.liu.se/download/pub/pike/all/8.0.1738/el7 https://pike.lysator.liu.se/download/pub/pike/all/8.0.1738/el8 Windows Installer: https://pike.lysator.liu.se/pub/pike/all/8.0.1738/Pike-v8.0.1738-Windows7-x86.msi Changes since Pike 8.0.1116 (release 14) New Features o Calendar Updated to use tzdata2021e. o Parser.XML.Tree Added set_text() to update the contents of a text node. o Sql.Sql Add query_db() to API. o SSL.SSLFile Add {query,set}_timeout(). This adds an API to set an optional timeout to be used for blocking operations. When the timeout expires it is handled as if the peer sent a fatal internal error alert. o Standards.PEM Added helper methods, including: get_certificates() , get_private_keys(), get_private_key() and decrypt_fragment(). o Runtime and EFUNS - describe_backtrace() now reports cpu time --with-profiling. - decode_value can be called with codec -1, which disables decoding of functions, objects, programs and types. Bug Fixes - o crypt Fixed a bug which caused crypt() with a random salt to sometimes return "*0" instead of an encrypted password. o Concurrent - The future generated by ->timeout() would not necessarily resolve with the fullfilled or rejected values if the original Promise/Future was resolved or rejected before hitting the timeout. - If the original promise resolves or rejects, we now attempt to unschedule the timeout call_out from the backend we scheduled it in, not the one (now) configured in the Future. o Critbit - Fix a number of memory and behavior errors. o Inotify add_watch() now returns -1 for filsystem-related failures that may be due to the filsystem being in flux. o Image.BMP Improved size check better detects malformed BMP images. o Image.GIF - Improve detection of malformed LZW bit sizes. - Improve detection of malformed LZW dictionary extensions. o Image.ILBM - Guard alloca() allocations with check_c_stack(). - Improved length accounting in unpackByteRun1(). o Image.JPEG - Do not over-allocate memory for decoded image. - Limit decoded size of images to 2 GB. o Image.PCX Improved size checks better detect malformed PCX images. o Image.PNG Improved size check better detects malformed PNG images. o Image.PSD Improved size check better detects malformed PSD images. o Image.TGA - Improve detection of malformed TGA images. - Correctly update pointer when horizontal or vertical flipping is requested by the TGA image. o Image.TIFF Improved size checks in image decoding o Image.TIM Improved size checks better detect malformed TIM images. o Image.WBF Improved size check better detects malformed WBF images. o Image.X Guard alloca() allocations with check_c_stack(). o Image.XCF Fixed to properly initialize the layer mask structure. o Image.XWD Improved size check better detects malformed XWD images. o Protocols.LDAP.client LDAP connections secured with TLS/SSL now timeout if the server does not respond within 10 seconds. o Sql.mysql Improved character set handling o Sql.pgsql Numerous bug fixes. Building & Tools o Improved check for stack direction to also report correct results when compiling with Clang 11. o _TIME_BITS is now set to 64, to get a 64-bit time_t on 32-bit systems running glibc 2.34 or newer. o Improvements to building and installer code signing on macOS. o Fixes to better support building with future versions of GNU make. o Use updated FFI API in Java module, to better support recent libffi. o Fix testsuite generation for BSD m4 users; POSIX systems must continue to use GNU m4 (gm4).
Re: Apache+Pike CGI scripts
More details that might be of use: http://wiki.gotpike.org/index.pike/PikeDevel/Using+Pike+on+the+Web Bill > > I'd like to try that out as a learning medium & instant feedback! > > > > Anybody on this list doing this or have done? TIA ..
Re: Fredrik Hübinette Book
On 2021-10-19 23:36, Duke Normandin wrote: 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! That doesn't really seem to be the approach taken in any of the documents I've looked at (nor does the website's tagline suggest that's the purpose). It also seemed to me that the format becomes hard to follow for some of the longer documents (such as Java). But that's just one person's opinion. 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. I don't think that the core developers have an opinion one way or the other about it, and it wouldn't really matter if they did: It's simply a matter of someone dedicating time to the task. > 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. To be clear, it's not "my" book, it was produced with a lot of help from the community (as it says on the cover). Some people just prefer that format and those sorts of efforts aren't mutually exclusive. 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. The existing tutorial and manual are competently written documents. If it were me spending the time to solve the problem of having material for a new user learning the language, I would complete it's conversion to the new website format rather than starting a totally new effort. After that, I'd probably consider what needed to be added from newer releases of Pike. Obviously that's just my opinion, but the delta between it and the new items that ought to be covered in it are fairly small. 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! Having met pretty much everyone involved, I can say for certain that no one intends the situation to be hostile to new users. It's simply a matter of everyone being busy working on the code. If someone were to come along and start an effort such as you're describing, I have no doubt that folks here would be supportive. It is certainly a problem that the tutorial on the Pike website is incomplete, but you never said what you thought was deficient about the complete document? http://web.archive.org/web/20160305143752/http://pike.lysator.liu.se/docs/tutorial/ and http://pike.lysator.liu.se/docs/man/ Good luck! -- Duke
Re: Fredrik Hübinette Book
If you had more complex needs, you could also explore the zip file module/program loading feature. I think that’s present in 8.0. I could provide some more details if that’s of interest. Bill Sent from my iPhone > On Oct 20, 2021, at 1:44 AM, Chris Angelico wrote: > > On Wed, Oct 20, 2021 at 2:44 PM James Latham wrote: >> >> Dear Pike lovers: >> Thanks for the very informative Blog that you have created. >> I would love to join in. >> Is there any way to create a distributable pike program? >> Ideally it would be all in one module. >> Jim Latham > > > Yes, absolutely! I've often made one-file Pike programs. For instance, > I have a git hook that I use in a number of projects, and it's all > contained in one file (called, surprisingly enough, "githook.pike"), > marked executable, and with an appropriate shebang. > > ChrisA >
Re: Fredrik Hübinette Book
I’ve never seen this site before; I don’t see any reason why there couldn’t be a Pike entry. Though (I’m sure this is obvious by browsing the site) 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! Perhaps makes sense to get the tutorial sorted out before luring potential users to a dead end of documentation? > On Oct 19, 2021, at 6:39 PM, Duke Normandin wrote: > > 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: Fredrik Hübinette Book
On 2021-10-19 15:45, Christian Töpp wrote: Btw.. writing pike modules in c ist a nice theme i can write about ;) I think that'd be excellent... I am aware of existing documentation on the subject, but it's spread all over the place (on the pike website, on modules.gotpike.org, my personal site, etc). I'd certainly be willing to help! There are definitely a number of "special situations" that I've worked out solutions to that ought to be described somewhere (like constructing a c-level module from multiple CMOD files, etc). Hmm.. OK, lets talk about documentation. I would suggest to create first a concept, toc, call it what you want. Just a Basic structure of what should i do if...then let the users add comments to specific themes. We can create a git repo for this and collect on one side informations in whats needed and also on whats requested. I try to help but have not much time (you know, job, family, etc) May this help? A first question might be, what is the intended scope for a given document? Is it a tutorial, or a comprehensive language reference? Should there be multiple documents? Or is it a set of goal-oriented documents (like, how do I use the Crypto module to generate an xyz hash? Is the goal to discuss every construct and pattern, even the ones that might be best left undiscussed (looking at you, Automap)? Or maybe what's missing from the existing tutorials? Is it just new stuff, or is there a fundamental problem with the way things are presented? Or all of the above? :) I realize that everyone is going to have different views but hearing what they are can be pretty useful. -Chris
Re: Fredrik Hübinette Book
On 2021-10-19 15:44, Chris Angelico wrote: ... and needs to be updated to GTK3 if it's to survive. As the Red Queen explained it, it takes all the running you can do just to stay in the same place, and you have to go twice that fast to actually get anywhere. Yes, the constant churn puts smaller "organizations" at a major disadvantage. I think we've reached a point where a lot of people look at "mature" software as automatically being "bad", and I strongly object to that world-view (when it makes sense). The rip everything down and rebuild every few years world we're living in can be pretty exhausting :) IIRC, Lance had done a lot of work to get GTK2 up and running. I don't know if he's got any thoughts on getting back onto a supported version of GTK. Hopefully the fact that a lot of the code is generated will ease /some/ of the effort. I've been going through a similar effort getting the ObjectiveC/Cocoa binding a little closer to current use; thankfully that's been a bit less terrible than I expected it to be. One little note on something that I think is pretty incredible: a few months ago I downloaded an ancient version of pike (0.4 something, maybe) and compiled it on an arm64 system without having to make any changes, and it worked. Thoughts? Comments? Suggestions? There are some fairly cool features in the latest Pike builds that, to my knowledge, aren't well documented yet. Maybe someone - and I'm fully aware that that probably means "I" - should put together an example of a socket server with on-the-fly updates and asynchronicity provided by continue functions. I don't think there's much in the way of documentation of the Concurrent and async stuff that's landed in 8.1. A tutorial of that (or some subset) ala the annotations document I wrote would be really welcome, even if it's not "publication ready"! Bill
Re: Fredrik Hübinette Book
This is a superset of a message I sent directly to Duke. I think it would be useful to have a wider conversation around whether there’s much to be done to improve Pike’s standing in the world. The general assertion that getting started with pike is difficult because there’s no documentation or that it’s crummy. And I think a good portion of that is well-founded, but there’s also often the subtext that what’s really meant is “I want to paste my question into google and have a hundred answers”. Unfortunately, that’s an unrealistic expectation when you’re not dealing with a multi-million user community actively contributing toward solving the problem. When the somewhat limited resources available online aren’t enough, what you have here are mailing lists and (I believe) an IRC channel. Here, you can ask questions and get polite, well reasoned answers from experienced users and possibly even core language developers. I get that might not be everyone’s ideal situation, but it’s what we have to offer at the moment. So, I guess the questions I’d ask (with respect to the community supported language references) are “what do you feel is required to be considered complete?” And “what resources did you examine that you felt were lacking?” It’s been quite a while since I looked at the tutorial on the Pike website, and it indeed appears “incomplete”. I think what has happened is that someone decided to convert the material to a GitHub project and never finished the job. That’s truly unfortunate, and the original content is available from the wayback machine: https://web.archive.org/web/20140102221903/http://pike.lysator.liu.se/docs/tutorial/ It also appears to be available from Roxen.com: https://docs.roxen.com/pike/7.0/tutorial/index.html The only major flaw I am aware of is that the GTK example doesn’t work as described because GTK1 isn’t supported anymore and it wasn’t updated to GTK2. The language constructs that are missing from newer versions are (in my opinion) fairly minor, at least in terms of text required to describe them, and in many cases might not even be appropriate for inclusion in a “basics" manual. Automap comes to mind, as it is more likely than not to cause outright confusion. Pike has a fairly stringent policy of backward compatibility, so it’s not been my experience that being old necessarily equates with being un-useful. Those materials (or the book) would give you 85-90% of the constructs commonly used today. If you’ve got specific examples of problems you’ve run into, reporting those problems is always appreciated. At the end of the day, the situation Pike finds itself in is the same today as it was 15 years ago: it is largely a volunteer project. The Pike High Wizards are busy doing their wizarding, and they have left it up to others to fill in the gaps. That seems to be an entirely reasonable position for them to take. I took that as a call to arms and over the years spent many, many hours trying to fill gaps [1] and have always welcomed assistance, but almost without exception, it’s been a solo effort. None of it has seemed to move the needle. So, I find myself resigned to the idea that advocacy by one person simply comes across as a crazy person yelling into the wilderness. I continue to use pike because for almost all tasks, it continues to be the most efficient way for me to solve a given problem. I’m always happy to take time when a reasonably well defined problem is identified, so please feel free to do so and we’ll see if it can be solved. Thoughts? Comments? Suggestions? Bill [1] major projects like wiki.gotpike.org, modules.gotpike.org, “the book”, eclipse plugin, co-organizing multiple conferences, jupyter support, magazine articles, among others.
Re: Fredrik Hübinette Book
(Apologies, this originally went only to Duke) Hi Duke- That’s a good place to start. I think it may be less up-to-date than the tutorial[1] on the pike website, which is also useful if you’re completely new. I think Hubbe’s material has some interesting low level information, so a combination of the two are a good ground level introduction. If you want a physical object, then you might look at Pike: An Introduction[2], which is a greatly expanded version of the tutorial. It’s also available from Amazon and others, if that’s an easier approach. Note that none of these cover the newest features in Pike 7.8 and 8.0, but I’m slowly working on updates that would coincide with a release of 8.2. If you’ve read at least one of the 3 above, then I’d recommend looking through the release notes[3] for 7.8 and 8.0 to get an idea of the new features. Some other items: - If you’re interested in the Calendar module, there’s a pretty useful FAQ[4] in the source directory. - The “Unofficial Pike FAQ”[5], which shows its age but has a lot of good material. - And there’s also the Pike Wiki[6], which contains a bunch of interesting articles on particular language features such as: Annotations, a new feature in 8.1 Debugger, a soon to land feature in 8.1 (with some details about how to try it out yourself) Writing Testsuites - More generally, some links from the gotpike[7] landing page. I think there’s more information out on the internet to be found, but google makes this more difficult by assuming that “pike” is a synonym for “rob pike”, which skews results in an entirely different direction! And of course, specific comments and suggestions of needs are welcome. We’re also happy to help get you started if you want to tackle something yourself. Bill [1] http://pike.lysator.liu.se/docs/tut/ [2] https://www.lulu.com/content/78730 [3] http://pike.lysator.liu.se/download/notes/ [4] http://pike-librarian.lysator.liu.se/colorize.xml?module=pike.git&file=lib/modules/Calendar.pmod/FAQ&revision=8c6334271463c0b3d8c670804bf998af89733d31 [5] http://bobo.fuw.edu.pl/~rjb/Pike/FAQ.html [6] http://wiki.gotpike.org/ [7] http://www.gotpike.org/ > On Oct 18, 2021, at 6:40 PM, Duke Normandin wrote: > > I'm reading it online. > Is it still recommended, or is there something more current and as > thorough? > -- > Duke >
Re: Pike Mailing List
I think there are a lot of lurkers on the general mailing list that are more active on the -devel list. My sense is that they tend to not get involved unless us lowly level 1 support folk fail to solve the problem ;) Bill > On Oct 18, 2021, at 9:18 PM, Duke Normandin wrote: > > @Chris > Are you pretty much the only active, knowledgeable participant in > the Pike list? > > -- > Duke >
Re: Archives
I just sent a request off to have the archives loaded (minus the ~100 most ancient messages that were missing required mail headers). Will send an email when I hear something back. Bill > On Oct 7, 2021, at 1:19 PM, Duke Normandin wrote: > > 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 >
Re: Archives
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/ Bill > On Oct 7, 2021, at 12:27 PM, H William Welliver wrote: > > Hi- > > There isn’t really an official online archive, unless you count accessing the > archives via the mailing list’s email interface. There used to be an archive > at nabble, but that seems to have disappeared in the last month or two as > nabble has mostly shut down. > > I’ve got a fairly complete full text index going back to 1996, though > indexing of current messages is not always instantaneous. > > http://www.gotpike.org/pikemlarchives/ > > I’ve considered setting up a browsable index, but never got very far on that > effort. If folks think that’s useful, I could certainly put some effort into > that. Thoughts on the subject are always welcome. > > Bill