Re: [Ur] Server threads?

2010-12-17 Thread Chris Double
On Sat, Dec 18, 2010 at 11:32 AM, Adam Chlipala ad...@impredicative.com wrote: I'd hope Mantis allows individual interested people to subscribe to changes, but I'm not sure if it's possible or how it works. In account/preferences of Mantis you can configure things to get email on changes. You

Re: [Ur] CMS like features ? unsafe XML - encodings?

2010-12-19 Thread Chris Double
On Mon, Dec 20, 2010 at 3:18 AM, Adam Chlipala ad...@impredicative.com wrote: This is what I recommend.  Every XML type is just a C string from the FFI's perspective, so you just need to write a function that returns a string.  You can write that type as [uw_Basis_string], [char*], or whatever

Re: [Ur] CMS like features ? unsafe XML - encodings?

2010-12-19 Thread Chris Double
On Mon, Dec 20, 2010 at 4:21 PM, Marc Weber marco-owe...@gmx.de wrote: Excerpts from Chris Double's message of Mon Dec 20 04:11:30 +0100 2010: pretty trivial app to provide a 'river of news' list of items from various RSS/Atom feeds, updated hourly. How did you parse those feeds (xml)? I do

Re: [Ur] little benchmark on querying a table only

2010-12-20 Thread Chris Double
On Mon, Dec 20, 2010 at 9:33 PM, Marc Weber marco-owe...@gmx.de wrote: I reran the test using 10,000 rows:  urweb:  24.816 tota  php:    0.502 total Your 'to' function conses up a list of 10,000 elements and discards it on each request which may have something to do with the difference.

Re: [Ur] Returning non-HTML results to clients

2011-05-22 Thread Chris Double
On Sun, May 22, 2011 at 10:04 PM, Chris Double chris.dou...@double.co.nz wrote: Is it possible to return non-HTML data from a page function? I am obviously rusty. I found out how to do this. Use 'returnBlob'. Chris. -- http://www.bluishcoder.co.nz

[Ur] Indicating failure in uw_register_transactional callbacks

2011-05-31 Thread Chris Double
In the commit callback that's passed to uw_register_transactional how does one indicate failure of the transaction? I can't call uw_error since that requires a context and I don't have one. The documentation for uw_register_transactional says not to use any context data so even if I pass it in I

[Ur] New Ur/Web application live

2011-06-03 Thread Chris Double
I've released my first public Ur/Web application today. It's a trading exchange for two virtual currencies. The currencies are Bitcoin and Namecoin. The former is a general purpose virtual currency. The latter is specific for an alternate DNS project and is used for registering domain names.

[Ur] Calling a function when the root / path is requested

2011-06-04 Thread Chris Double
Can I define a function to call when the root / path is requested? '/main' calls 'main' for example, what does '/' call? Chris. -- http://www.bluishcoder.co.nz ___ Ur mailing list Ur@impredicative.com

[Ur] Performance of Ur/Web in a live site

2011-06-08 Thread Chris Double
I rewrote an existing web application of mine in Ur/Web last weekend to see how it performed vs the current one. The application is in a similar domain to the one which I posted about a few days ago (virtual currency). This one is a 'mining pool' for namecoin (or any e-currency that uses the

Re: [Ur] hiccups with tutorial ...

2011-07-17 Thread Chris Double
On Mon, Jul 18, 2011 at 4:20 PM, Vasili I. Galchin vigalc...@gmail.com wrote: I did a find  . -name webapp.c on both /tmp and also ~/urweb(the latter where I untar'd the urweb source)...??? On ubuntu you need libpq-dev. Chris. -- http://www.bluishcoder.co.nz

Re: [Ur] playing audio

2012-01-31 Thread Chris Double
On Tue, Jan 31, 2012 at 11:42 PM, Gergely Buday gbu...@gmail.com wrote: Hi, is there  a canonical way to play a sound file in Ur/Web? I did not find neither sound nor audio in the manual. I don't believe Ur/Web supports the HTML audio element but you can add support using the C FFI. Same with

Re: [Ur] Several patches and questions

2012-11-28 Thread Chris Double
On Thu, Nov 29, 2012 at 5:58 AM, Adam Chlipala ad...@csail.mit.edu wrote: I'm very glad to have your contributions, and I'd also be interested in hearing more about any Ur/Web projects you're working on. I'm interested in hearing about what you're doing with Ur/Web and HTML 5 audio/video too

Re: [Ur] Serving Non-XML Text?

2013-01-25 Thread Chris Double
On Sat, Jan 26, 2013 at 12:30 PM, Evan Danaher u...@edanaher.net wrote: Unfortunately, AFAICT, public functions returning transaction page, and only such functions, are exposed as routes. So I have to return JSON wrapped in XML, which is pretty ugly (and breaks compatibility with what I've

[Ur] Using Persona Authentication API

2013-11-12 Thread Chris Double
I've been wanting to use the Persona Authentication API [1] instead of OpenID. I wrote an example based on the Persona Quick Setup [2] and put it on github: https://github.com/doublec/urweb-persona For 'real world' usage it'd probably not be too much work to either add or modify the openid

Re: [Ur] rpc using POST?

2013-11-13 Thread Chris Double
Adam Chlipala ad...@csail.mit.edu writes: I think all RPCs are done via POST, and any data that don't fit in the URI (according to something of a guess about URI size limits) are automatically put into the POST data. Do you have a concrete use case that shows a problem in any real

Re: [Ur] Using Persona Authentication API

2013-11-25 Thread Chris Double
On Sat, Nov 23, 2013 at 6:21 AM, Adam Chlipala ad...@csail.mit.edu wrote: Two niggly code comments: 1) Why give [session.Identifier] an [option] type? It seems always to be [Some] here. 2) Near the end of the .ur file appears the code [v - signal s; return v]. By the usual monad laws, this

[Ur] CSRF protection

2013-11-25 Thread Chris Double
If I understand corrctly, Ur/Web has built in CSRF protection for forms. Does this extend to post requests done via 'rpc' calls in 'onclick' handlers on buttons? For example: button onclick={fn _ = rpc (delete_something ))/ Can the POST request that occurs in the onclick be recorded and

Re: [Ur] TechEmpower Benchmarks

2013-11-27 Thread Chris Double
On Wed, Nov 27, 2013 at 10:50 PM, Maciek Starzyk mstar...@gmail.com wrote: Ur/Web results don't look too good :( The Json code in meta does a large amount of string concatenation which I've found to be quite slow in Ur/Web. This could be part of the performance issue if it's doing a lot of

[Ur] Error handlers showing HTTP header in HTML

2013-11-30 Thread Chris Double
With latest hg repository code, if I have an 'onerror' module to catch errors it shows the new HTTP headers that were recently added in the page sent to the user. For example, I currently see: Connection: close Content-length: 489 in the HTML page. -- http://www.bluishcoder.co.nz

Re: [Ur] Mysterious behavior: Simple example DOES NOT compile using table named `thing` - but identical code DOES compile and run fine after renaming table `thing` to table `t`

2015-07-23 Thread Chris Double
It's not complaining about a table called 't', it's using T just as a general placeholder for a name - not it's in capitals not lowercase. If you replace thing.Id with Id in line 57 it will compile. -- http://bluishcoder.co.nz ___ Ur mailing list

Re: [Ur] Mysterious behavior: Simple example DOES NOT compile using table named `thing` - but identical code DOES compile and run fine after renaming table `thing` to table `t`

2015-07-24 Thread Chris Double
On Fri, Jul 24, 2015 at 5:13 PM, Stefan Scott Alexander stefanscottal...@gmail.com wrote: Z (I could've sworn I had tried different variants such as `thing.Id` or `Id` in that dml delete statement - but I guess I didn't; the late hour must have been getting to me. =) I've done the same thing

Re: [Ur] The right way to do federated login in 2015?

2015-10-21 Thread Chris Double
On Wed, Oct 21, 2015 at 1:56 AM, Adam Chlipala wrote: > I'm writing to ask the list: is there one obvious federated login protocol > that seems to be "winning" today, such that it might be worth implementing > as an open-source Ur/Web library? If so, is anyone interested in

Re: [Ur] about the -static compiler flag

2018-11-23 Thread Chris Double
On Fri, Nov 23, 2018 at 11:04 PM Chris Double wrote: > It's possible to get a complete static executable from urweb by using > musl-libc [1] and a workaround. I tried with a simple "hello world" > type project, with musl installed: A quick gist going through the step

Re: [Ur] about the -static compiler flag

2018-11-23 Thread Chris Double
On Wed, Oct 31, 2018 at 8:28 AM Adam Chlipala wrote: > > I don't know if this GitHub issue is related, but in general I made a token > effort (about 10 years ago) to support static linking by adding one flag to > the GCC/Clang command line, and it has been clear for years that more >

Re: [Ur] about the -static compiler flag

2018-11-24 Thread Chris Double
On Sat, Nov 24, 2018 at 2:12 AM Benjamin Barenblat wrote: > The glibc man page for timelocal says, “The timelocal() function is > equivalent to the POSIX standard function mktime(3). There is no reason > to ever use it.” mktime is actualy a standard C function, which is > probably even better