Re: your mail

2019-11-05 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>Stephen R. van den Berg wrote: >>>The most likely cause of this issue might be related to >>>MutexKeys being lost in the heap, which then get released (a while >>>later) by the garbage collecti

Re: your mail

2019-11-05 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>The most likely cause of this issue might be related to >>MutexKeys being lost in the heap, which then get released (a while >>later) by the garbage collection. I fixed this problem in a newer >>com

[no subject]

2019-11-05 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >The most likely cause of this issue might be related to >MutexKeys being lost in the heap, which then get released (a while >later) by the garbage collection. I fixed this problem in a newer >commit; if I run with that fix, the problem does not se

Re: The plot thickens (Re: Segmentation fault pike 8.1)

2019-11-04 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >A run straight from within gdb give this: Forget that last one, this might be due to me starting the pike binary wrong. -- Stephen.

Re: The plot thickens (Re: Segmentation fault pike 8.1)

2019-11-04 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >A run straight from within gdb give this: Tried it again, after less than a second runtime: [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV,

Re: The plot thickens (Re: Segmentation fault pike 8.1)

2019-11-04 Thread Stephen R. van den Berg
A run straight from within gdb give this: SEGFAULT: (gdb) l 177 178 INIT 179 { 180 struct std_cs_stor *s = THIS; 181 182 s->retain = NULL; 183 s->replace = NULL; 184 185 init_string_builder(>strbuild,0); 186 } (gdb) p s $15 = (struct

The plot thickens (Re: Segmentation fault pike 8.1)

2019-11-04 Thread Stephen R. van den Berg
The most likely cause of this issue might be related to MutexKeys being lost in the heap, which then get released (a while later) by the garbage collection. I fixed this problem in a newer commit; if I run with that fix, the problem does not seem to happen anymore. Arne Goedeke wrote: >Could you

Re: Segmentation fault pike 8.1

2019-11-01 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >This is in a heavy multithreaded application: >I can still explore more structures, have the session still open. It appears to be undeterministic. I.e. sometimes the problem occurs after a few seconds after application start, sometimes it takes more t

Segmentation fault pike 8.1

2019-11-01 Thread Stephen R. van den Berg
This is in a heavy multithreaded application: Thread 1475 "pike" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7574c700 (LWP 14689)] ba_alloc (a=a@entry=0x5575bf20 ) at /var/src/roxen/81pike/src/block_allocator.c:267 267 p->h.used++; (gdb) l 262 263

Re: CQL (Cassandra/ScyllaDB) support?

2019-09-16 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Has anyone looked at marrying Cassandra support to Pike? >I'm considering doing it, just haven't decided on the best avenue yet. https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec Seems to be what needs to be implemented. It looks

CQL (Cassandra/ScyllaDB) support?

2019-09-16 Thread Stephen R. van den Berg
Has anyone looked at marrying Cassandra support to Pike? I'm considering doing it, just haven't decided on the best avenue yet. -- Stephen.

Re: Comments/thoughts requested: Generators and async functions in Pike

2019-08-27 Thread Stephen R. van den Berg
Chris Angelico wrote: >string show_channel_info(string name) { >int id = continue return get_channel_id(name); ... >return name + " is offline."; >The intermediate values would be Concurrent.Futures; the caller would >get one of them, wait on it, and then send the returned value back in.

Re: Use of ::_destruct() in arbitrary objects

2019-08-26 Thread Stephen R. van den Berg
Chris Angelico wrote: >In digging into a problem with Protocols.HTTP.Promise, I came across ># define PROMISE_DESTRUCTOR \ > protected void _destruct() { \ >werror("%O()._destruct()\n", object_program(this)); \ Even though I rewrote that implementation, I didn't

Re: Comments/thoughts requested: Generators and async functions in Pike

2019-08-10 Thread Stephen R. van den Berg
Chris Angelico wrote: >Pike now (8.1) has a decent promise/future subsystem. It's always had >great handling of multiple asynchronous operations (GUI, socket, time >delay, etc) with the convenience of just returning -1 from main. >Interested in people's opinions on whether it would be of value to

Example how to use Protocols.HTTP2 ?

2019-07-03 Thread Stephen R. van den Berg
Does anyone have any sample code that demonstrates how to use Protocols.HTTP2 ? -- Stephen.

Re: Hyperscan regexp engine

2019-06-27 Thread Stephen R. van den Berg
Tomasz Jamroszczak wrote: >On Thu, 27 Jun 2019 11:35:04 +0200, Stephen R. van den Berg > wrote: >>> There's the https://github.com/intel/hyperscan regexp library >>>created over 10 years by algorithm start-up >>As a matter of fact, I have looked at it, and if no

Re: Hyperscan regexp engine

2019-06-27 Thread Stephen R. van den Berg
Tomasz Jamroszczak wrote: > There's the https://github.com/intel/hyperscan regexp library >created over 10 years by algorithm start-up >https://branchfree.org/2019/02/28/paper-hyperscan-a-fast-multi-pattern-regex-matcher-for-modern-cpus/ >then bought by Intel and further developed. The

Re: Shuffler revisited

2019-06-26 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >With regard to the Shuffler: the Pike 8.0 shuffler is very fragile >and could (at any time) result in datacorruption and/or segmentation faults. >Even though, considering the incremental discovery of all the >errors in the Shuffler feels a bit like wha

Re: Shuffler revisited

2019-06-25 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >>:-). Well, I don't think these problems touch the Shuffler. >Oh I see, I thought FakePike would be using Shuffler... No, indeed. I fixed the FakePipe issue. It passes all tests, AFAICS. With regard to the Shuffler: the Pike 8.0 shuffler

Re: Shuffler revisited

2019-06-25 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >I am still seeing quite a few testsuite failures, like: >Doing tests in modules/_Stdio/testsuite (181 tests, pid 12880) >Socket test >Child: Copying 19712 bytes of data on 14 fake pipes Failed to read >complete data, errno=0, "Success".

close callback on FakeFile

2019-06-25 Thread Stephen R. van den Berg
FakeFile is supposed to emulate a regular file. This would mean that whenever you reach the end of the file/string you are reading, you are supposed to signal a close callback because eof has been reached. I.e. the close callback on FakeFile should therefore not need to wait for an actual close

Shuffler revisited

2019-06-25 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >I was then wondering if it is being used successfully anywhere already? I now know more about the Shuffler code than I ever wanted to know (obviously). However, armed with that knowledge I am reasonably surprised that anyone managed to use it in the old st

Re: set_read_callback()

2019-06-24 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >The freeing of the C-struct needs to be delayed until all references to >the callback function are gone (which probably implies that I need to >turn the struct over to the garbage collector, which implies that it >needs to be an svalue, I presume). I

set_read_callback()

2019-06-24 Thread Stephen R. van den Berg
Does anyone know where it is defined in the source? I'm having issues in the Shuffler (which have been there for ages already) where a C-struct is being freed, but then after that, a callback is being called from pike which still references the (now freed) C-struct. The freeing of the C-struct

Errors in the docs

2019-06-20 Thread Stephen R. van den Berg
There currently are two errors in the docs: - src/post_modules/_Sass/module.pmod.in: Web.Sass.Compiler ends up in _Sass.Compiler in the docs. - And this: --post-process autodoc.xml doc_build ProcessXML: Duplicate documentation for class CompilerEnvironment Reading template file

Re: MozJPEG encoding library

2019-06-19 Thread Stephen R. van den Berg
William Welliver wrote: >This sounds like a prime candidate for an external module rather than >something included in the core, given its somewhat specialist nature >and the fact that most systems won't be able to use it without >downloading souce code. You could bundle the library source and not

Longevity of a struct pike_string str pointer?

2019-06-18 Thread Stephen R. van den Berg
I'm kneedeep in the Shuffler code again, slightly reworking it, fixing some bugs along the way, but also trying to make sure I don't introduce new ones. The following issue comes up: If I have a struct pike_string with a shared string assigned to it, and I take the value of the str member because

Re: Shuffler.Shuffler, does anyone use it?

2019-06-18 Thread Stephen R. van den Berg
H William Welliver III wrote: >In short, subclass Request, implement shuffler there and add it as an > option alongside the standard request object. There???s plenty of > precedent for that (various backend flavors, various hilfes, etc) > and that approach won???t cause any heartburn for anyone.

Re: Shuffler.Shuffler, does anyone use it?

2019-06-14 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >>It's not that the Request class is supercomplicated. The code is >>relatively straightforward, so it should be easy to fix if anything comes >>up. >And only months to years later distributions would supply any user >with the fix in a new

Re: Shuffler.Shuffler, does anyone use it?

2019-06-14 Thread Stephen R. van den Berg
H. William Welliver III wrote: >Making a change like that in a wholesale fashion represents a backward > compatibility and/or possible stability issue. That's why I'm not backporting that change to Pike 8.0. > The shuffler isn???t a free ride (and I???m not sure that your assertions > are always

Re: Shuffler.Shuffler, does anyone use it?

2019-06-13 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >H William Welliver III wrote: >>I have code that uses the shuffler, and caudium uses it, but I would not >> make its use mandatory as there are resource implications that probably >> should be up to the individual user to chose to employ >&

Re: Shuffler.Shuffler, does anyone use it?

2019-06-13 Thread Stephen R. van den Berg
H William Welliver III wrote: >I have code that uses the shuffler, and caudium uses it, but I would not > make its use mandatory as there are resource implications that probably > should be up to the individual user to chose to employ > (threading, memory, etc). The use in HTTP.Server.Request

Shuffler.Shuffler, does anyone use it?

2019-06-13 Thread Stephen R. van den Berg
I though Roxen might be using it, but maybe I remember it wrong. Anyone else? I ask because I'm changing Protocols.HTTP.Server.Request to use the Shuffler, and I'm close to done, but it appears that in the process I have had to fix some quite serious bugs in the current shuffler implementation

Re: SEGFAULT in Pike 8.1

2019-06-12 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >Stephen R. van den Berg wrote: >> >Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> >>Now please fix the testsuite falures caused by the Stdio.FakePipe changes. >> >I'll run through t

Re: Occasional hiccups during https negotiations with Google

2019-06-12 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >>Try running your test case with -DSSL3_DEBUG and see if you can trigger >>the issue and if you get messages about handshaking errors before. >>You can also

Re: Occasional hiccups during https negotiations with Google

2019-06-12 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >Try running your test case with -DSSL3_DEBUG and see if you can trigger >the issue and if you get messages about handshaking errors before. >You can also try adding an inherit of Builtin.DestructImmediate (this >class ought to be

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >>Now please fix the testsuite falures caused by the Stdio.FakePipe changes. >I'll run through them. Fixed. -- Stephen.

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >Now please fix the testsuite falures caused by the Stdio.FakePipe changes. I'll run through them. -- Stephen.

Re: Occasional hiccups during https negotiations with Google

2019-06-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Not consistently, but once every 10 tries or so, I get the following >backtrace which does not seem to originate in my own code: Might it be triggered by an HTTP keep-alive session terminating? My normal program logic works fine, so all API-sessions

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> >Thanks. Potentially fixed. >Looks like something has set Pike_compiler->new_program to NULL. >New attempt at fixing committed. $ pike -e "foo::bar = 1;" -:2:No

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >>Thanks. Potentially fixed. >Sorry, whack-a-mole, I guess. The bug shifted, maybe it's more obvious now >(you check for inh > 0, does that even work for pointers? Maybe that &

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >Thanks. Potentially fixed. Sorry, whack-a-mole, I guess. The bug shifted, maybe it's more obvious now (you check for inh > 0, does that even work for pointers? Maybe that should be inh != 0 instead?): -:2:No inherit or surrounding

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >Stephen R. van den Berg wrote: >> >>Please provide a full example. >> Shortest example so far: >> $ pike -e "foo::bar = 1;" >> -:2:No inherit or surrounding class foo. >>

Occasional hiccups during https negotiations with Google

2019-06-11 Thread Stephen R. van den Berg
Not consistently, but once every 10 tries or so, I get the following backtrace which does not seem to originate in my own code: Can not modify the buffer right now, there are active subbuffers. -:1: _static_modules._Stdio()->Buffer(0 bytes, read=[..-1] data=[0..-1] free=[0.. 5300]

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >>Please provide a full example. Shortest example so far: $ pike -e "foo::bar = 1;" -:2:No inherit or surrounding class foo. Segmentation fault -- Stephen.

Re: SEGFAULT in Pike 8.1

2019-06-11 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> When I run the following in Pike 8.1, it SEGFAULTs: >> foo::bar = 1; >> Gets me: >> p.pike:4:No inherit or surrounding class foo. >> Segmentation fault >Please provide a full example. $ ls -l p.pike -rwxr-xr-x 1 srb srb 39 jun

SEGFAULT in Pike 8.1

2019-06-08 Thread Stephen R. van den Berg
When I run the following in Pike 8.1, it SEGFAULTs: foo::bar = 1; Gets me: p.pike:4:No inherit or surrounding class foo. Segmentation fault -- Stephen.

Re: Scope runtime bug in Pike 8.0 and 8.1

2019-06-08 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> This gives a runtime error which seems incorrect to me. >> Flipping the #if causes it to run flawlessly. >> Is this a problem in Pike, or are my expectations too high? >This is expected (and correct) behavior, the `->() operator

Scope runtime bug in Pike 8.0 and 8.1

2019-06-08 Thread Stephen R. van den Berg
class foo { #if 1 protected int bar;// Does not work (and is a bug) #else int bar; // Does work #endif this_program other; protected void create() { other = this; other->bar = 1; } } object x = foo();

Re: Revamping googleapis bindings; overloading `[] ?

2019-05-29 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>I now have an API that works roughly like this: >The API has since reached beta-stage and is now included in Pike 8.1 >(it has a synchronous, a callback *and* a promise interface). >Documentation is a little bit sk

Re: Proposal: named threads

2019-05-29 Thread Stephen R. van den Berg
H. William Welliver III wrote: >On systems that don???t support naming threads, a parameter would be added >either to the pike thread object itself or to the underlying OS thread???s >thread specific data. In this situation, the thread name would be available >through pike, but not in gdb, etc

Re: SSL decoding error regression in Pike 8.1 (works in Pike 8.0)

2019-05-24 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >>Seems to be due to an incompatibility in the implementation of Curve25519. >>Try disabling Curve25519 for now (by eg disable it in the mapping >>ECC_CURVES in SSL.pmod/Constant

Re: SSL decoding error regression in Pike 8.1 (works in Pike 8.0)

2019-05-24 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> The test program below shows an I/O error for Pike 8.1, and it shows >[...] >Seems to be due to an incompatibility in the implementation of Curve25519. >Try disabling Curve25519 for now (by eg disable it in the mapping >ECC_CURVES

Re: Revamping googleapis bindings; overloading `[] ?

2019-05-24 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >I now have an API that works roughly like this: The API has since reached beta-stage and is now included in Pike 8.1 (it has a synchronous, a callback *and* a promise interface). Documentation is a little bit skimpy at the moment. But a working minimal exam

Re: SSL decoding error regression in Pike 8.1 (works in Pike 8.0)

2019-05-24 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >The test program below shows an I/O error for Pike 8.1, and it shows My new Google API code seems to be ready for production. However, I switched back to Pike 8.0 to develop it, due to the broken SSL implementation of Pike 8.1 Unfortunately I used the prom

Re: Automatic documentation of functions

2019-05-21 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >>Then using foo->doc would return a mapping or string describing the >>function and/or its parameters (if known and available). >>Alternately, one could create a function describe(foo) that does the same. >I am not a fan of the suggested f->doc

Automatic documentation of functions

2019-05-21 Thread Stephen R. van den Berg
Do we already have some mechanism to get implicit/automatic documentation of function(parameter)s? How about supporting something like this: mixed `->(function(...:mixed), string) Then if there is a sample function: void foo(int a, string b) { } Then using foo->doc would return a mapping or

Re: Revamping googleapis bindings; overloading `[] ?

2019-05-21 Thread Stephen R. van den Berg
I now have an API that works roughly like this: #define TOKENTIME 3600 #define PROJECT "mylittleproject" #define ZONE"eu-west1-c" string jwt_secret = Stdio.File("googleserviceaccount.json", "r").read(); // // This hot-fetches the Google Compute API from the discovery

Revamping googleapis bindings; overloading `[] ?

2019-05-21 Thread Stephen R. van den Berg
After some tinkering with the current Google API integration code, I can conclude the following: a. The currently implemented interface in Pike is skimpy at best (it covers less than 1% of the total available interfaces). b. The current implementation uses outdated interface versions (oauth

SSL decoding error regression in Pike 8.1 (works in Pike 8.0)

2019-05-20 Thread Stephen R. van den Berg
The test program below shows an I/O error for Pike 8.1, and it shows Result "{\n" " \"error\": \"invalid_grant\",\n" " \"error_description\": \"Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to

SSL.Connection failure

2019-05-19 Thread Stephen R. van den Berg
Pontus ??stlund wrote: >I think this might work: > Web.Api.Google api = Web.Api.Google(0, 0, 0); > api->auth->get_token_from_jwt(your_service_account_key, 0, >lambda (bool ok, string data) { > // yadda yadda >}); >And if I remember correctly, leaving out the lambda will issue a

Sample code to access cloud.google.com / google compute engine ?

2019-05-15 Thread Stephen R. van den Berg
Does anyone happen to have some boilerplate code which they can share that uses Pike to get the authorisation tokens required to create and delete google compute engine instances? Basically I need to follow this guide: https://developers.google.com/identity/protocols/OAuth2ServiceAccount Which

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-29 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >>My variant with Concurrent.all does work as intended though, and does >>not require a Promise in. >I'll do some more tests to see what happens when, and will se

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >Does that work for you? My initial attempts were along those lines, >but failed to actually wait before returning the result. And when I >try your version, I get the result immediately when I ->success() the >original

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
//! Return a @[Future] that will be fulfilled with the fulfilled //! result of this @[Future], but not until at least @[seconds] have passed. this_program delay(int|float seconds) { Promise p = promise_factory(); on_failure(p->try_failure); return depend( ({

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >Sorry, that should have been ->map(`[], 0) instead of ->transform(`[], 0, >0), otherwise failures are not propagated correctly... Thanks for the heads up. Already figured that out earlier. I now have something like

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >>able to do it by calling ->depend() with another Future that completes >>after N seconds, right? >Correct. >Which does mean that I still have to construct tha

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >able to do it by calling ->depend() with another Future that completes >after N seconds, right? Correct. Which does mean that I still have to construct that generic "delay-promise". I'd like to give it a home

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >I don't follow at all. Setting the delay before the real result has >arrived doesn't mean anything. It depends on the semantics of the delay() function. Apparently what you have in mind and what I had were different

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >Hm, ok. But I guess you could reuse the callout-reference used for >timeout then? Because there is no point in having both a delayed >success and a delayed failure at the same time (whichever would happen >further

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >(Also, it should use try_success(), not success().) Details aside, a proper implementation also should cancel the callback when the promise fails (so the extra state here is the callout-reference). -- Stephen.

Re: Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >The first thing that comes to mind would be to create a new member function >of Concurrent.Future, i.e. next to the timeout() already there, we could >introduce a delay() which would then semantically be something like: On second thought, that would

Delaying a future/promise by an arbitrary amount of time

2019-04-26 Thread Stephen R. van den Berg
Say I'm holding a value, but I want to turn it into a promise that fulfills delayed by a predetermined amount of time, any suggestions as to where to put a utility function like that? The first thing that comes to mind would be to create a new member function of Concurrent.Future, i.e. next to

FOSDEM (Re: Pike Meet-up 2019-Q1)

2019-01-22 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: > Pike Meet-up 2019-Q1 > Date: 2018-02-02 (Sat) I'll be attending FOSDEM that weekend (Brussels). If any Pikers should attend FOSDEM, drop me a note, so we could meet up. -- Stephen.

Re: debugger, status and suggestions sought

2018-12-28 Thread Stephen R. van den Berg
H. William Welliver III wrote: >By "at runtime" I meant when pike code is compiled, not when the interpreter > is compiled. Presumably this would be an option configurable at runtime. That is what I meant too. >I understand your sentiment in terms of aim, but it's important to remember > that

Re: debugger, status and suggestions sought

2018-12-28 Thread Stephen R. van den Berg
H. William Welliver III wrote: >- Does optimization hurt the ability to debug? > Breakpoints on constant expressions or on a for loop, as examples, > won???t get hit how you might expect them to. > Is that okay, or should we explore ways to skip optimization at runtime? I personally prefer that

Re: debugger, status and suggestions sought

2018-12-07 Thread Stephen R. van den Berg
H. William Welliver III wrote: >After a helpful conversation at the pike meet-up last month, I???ve been >working on a proof-of-concept debugger for pike code. There is a lot of work >left to do, and hopefully others will help me out, but I think that things are >at a point where it can be used

Re: Thread.ResourceCount: Fixed mutex handling.

2018-12-06 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >Condition variables work like this: You have some resource that Ok, thanks! I'll propagate the fix to 8.0 and I'll add some text loosely inspired by your explanation to the documentation of Thread.Condition in 8.1

Re: Thread.ResourceCount: Fixed mutex handling.

2018-12-05 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >commit d168eb73a23756642bdc80451ba206a345471f6a >Author: Henrik Grubbstr??m (Grubba) >Date: Sun Aug 5 11:21:52 2018 +0200 >Thread.ResourceCount: Fixed mutex handling. >I'm not saying that this is not correct, I just want to make su

Thread.ResourceCount: Fixed mutex handling.

2018-11-12 Thread Stephen R. van den Berg
commit d168eb73a23756642bdc80451ba206a345471f6a Author: Henrik Grubbstr??m (Grubba) Date: Sun Aug 5 11:21:52 2018 +0200 Thread.ResourceCount: Fixed mutex handling. I'm not saying that this is not correct, I just want to make sure I understand the change. Can anyone elaborate on as to why

Remixml, javascript module

2018-08-17 Thread Stephen R. van den Berg
This might be of interest to the Pike and/or Roxen community: https://www.npmjs.com/package/remixml I just launched it. Using it in a Single-Page-Application website. Any critical feedback is welcome (I'm currently the only user, so changes in the API are easy and still allowed). >From the

Re: Recent change in Gmp.mpq

2018-05-30 Thread Stephen R. van den Berg
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >> sprintf("%3.3f", Gmp.mpq(1,3)); >(1) Result: "0.333" >> sprintf("%3.3f", Gmp.mpq(2,3)); >(2) Result: ".666" >Ok, I can see that seems a bit wrong. >Could we please make it a habit to test our code at least once

Re: Pike 8.0.622 beta/release candidate

2018-05-23 Thread Stephen R. van den Berg
Peter Bortas wrote: >Pike 8.0.622 beta/release candidate: As it turns out, the deadlock hunt was halfway done at 8.0.622. Since then, I committed a few more fixes. Stdio.Buffer seems clean now, but pgsql still had one race condition left, and I introduced a stupid regression error for queries

Found and fixed a race condition in Stdio.Buffer->read_cstring()

2018-05-17 Thread Stephen R. van den Berg
Committed fixes to both 8.1 and 8.0. The symptoms I had was that during a read_cstring(), the range_error() at times was called with a negative number. At that point, the cstring was already partially consumed and gone from the buffer (below offset = 0). I then scrutinised the Stdio.Buffer code

Re: RFC Debug.Rapidlog() new module

2018-05-16 Thread Stephen R. van den Berg
Tobias S. Josefowitz wrote: >When I need new features in Pike 8.0, I simply branch off, backport >the changes, and then occasionally merge 8.0 back into my branch as >required. I actually believe this to be common practice, as this is a >simple and workable approach that is in line with our commit

RFC Debug.Rapidlog() new module

2018-05-15 Thread Stephen R. van den Berg
There is a new module I'd like to introduce called Debug.Rapidlog. When you inherit it, it overrides werror(), and allows for logging that interferes minimally with timing (it logs into a buffer, which then is emptied from a different thread at idle times). The idea behind this module is that it

Re: Pike 8.0.528 release candidate

2018-05-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>Not regressions as such. >>I'll try and wrap it up Friday morning the last. >Ah well, hunting deadlocks is always a tricky business. >Found the cause, just now. Committing the fix shortly. Done. All (

Re: Pike 8.0.528 release candidate

2018-05-11 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Not regressions as such. >I'll try and wrap it up Friday morning the last. Ah well, hunting deadlocks is always a tricky business. Found the cause, just now. Committing the fix shortly. -- Stephen.

Re: pike build msql error with 8.0 git

2018-05-11 Thread Stephen R. van den Berg
Lance Dillon wrote: >Hmm, also getting the following error now, building with release PIke-4.0.498: >/usr/lib64/libc_nonshared.a(atexit.oS): In function `atexit': >(.text+0x3): undefined reference to `__dso_handle' Had this too. Tried to get rid of it in more than one way (I'm using Debian

Re: Pike 8.0.528 release candidate

2018-05-10 Thread Stephen R. van den Berg
Not regressions as such. I'll try and wrap it up Friday morning the last. On Wed, May 9, 2018 at 9:24 PM, Peter Bortas <bor...@gmail.com> wrote: > On Wed, May 9, 2018 at 3:50 PM Stephen R. van den Berg <s...@cuci.nl> > wrote: > > > Henrik Grubbstr?m (Lysator) @ Pike

Re: Pike 8.0.528 release candidate

2018-05-09 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> I can make another build this week. Can you do the Mac build Bill? >I have a few more NT-related fixes I'd like to get in. As it turns out, I still have one particularly pesky deadlock case which I'm chasing for pgsql (which

Re: Pike 8.0.528 release candidate

2018-05-07 Thread Stephen R. van den Berg
Peter Bortas wrote: >As is tradition a release has been prepared at the new years party >with Champagne in one hand and keyboard in the other waiting for the >clock to hit 24:00. >Pike 8.0.528 release candidate: Paraphrasing Al Lowe: Release early, release often... Maybe we should have another

Re: 8.0 and precompiled pike files...

2018-03-07 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>I regularly compile with: --with-cdebug --without-rtldebug --without-valgrind >> --with-double-precision --with-long-int >> -

Re: 8.0 and precompiled pike files...

2018-02-16 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >I regularly compile with: --with-cdebug --without-rtldebug --without-valgrind > --with-double-precision --with-long-int > --disable-noopty-retry > --with-machine-code --with

8.0 and precompiled pike files...

2018-02-16 Thread Stephen R. van den Berg
The current git version of 8.0, but it has been this way for at least the past two months, works fine for me as long as I remove all *.o files from the installed version. If I do not do that, it crashes right away with a segmentation fault. It does not matter if I compile it with gcc 6, 7 or 8.

Type warnings on 8.0?

2018-02-13 Thread Stephen R. van den Berg
lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Not a valid object type. lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Expected: function(void | mixed ... : object) | object | program. lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Got : mixed.

cp is different from rm/mv

2018-02-11 Thread Stephen R. van den Berg
The reason why rm and mv are are first class citizens is because they correspond to libc/system calls (unlink and rename). "cp" has no libc/system call equivalent. commit 76dc18c99a3b30f91d5f3a7007b972081af9bc09 Author: Martin Nilsson Date: Fri Feb 9 19:24:29 2018 +0100

Re: Doc fixes and @namespace removal

2018-02-08 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Could someone please take a look at: >I kicked out some @namespace and @endnamespace directives that autodoc >complained about. I'm unsure if simply removing them had the desired effect. Ah, well, yes, Grubba, you restored them, but, then the proble

Doc fixes and @namespace removal

2018-02-08 Thread Stephen R. van den Berg
Could someone please take a look at: commit a05ef1359a8c06e6f63ccd5ac8086d2c21823a2e (HEAD -> 8.1, origin/8.1, devel/8.1) Author: Stephen R. van den Berg <s...@cuci.nl> Date: Thu Feb 8 13:44:04 2018 +0100 Fix typos and docs. lib/master.pike.in

Re: Protocols.DNS.server anyone used it in a DNS server?

2018-02-08 Thread Stephen R. van den Berg
Tobias S. Josefowitz wrote: >> Is the code available? >I could give you access to a private github repo with a general >purpose authoritative nameserver implementation, never fully got >around to getting it into releasable state though. It does things like >this: Sounds good. I was considering

<    1   2   3   4   5   6   7   8   >