Re: [Ur] Comparison with other frameworks

2009-09-15 Thread Adam Chlipala
nitralime wrote: **As I have already mentioned in my other post I am aware of two other functional web frameworks (HOP and Links) which in my opinion provide a similar functionality as Ur/Web! I'm just curious about how Ur/Web compares to these frameworks! There are many incidental

Re: [Ur] Comparison with other frameworks

2009-09-15 Thread Adam Chlipala
nitralime wrote: Thank you very much for your feedback! Any other feedback is also very much appreciated! I know you're just trying to be polite, but I think most people on this list would prefer that you didn't take up their attention with messages that just thank people and repeat that

Re: [Ur] [Bulk] Seeking Ur/Web case studies

2009-09-24 Thread Adam Chlipala
David Snider wrote: Adam Chlipala wrote: David Snider wrote: Adam Chlipala wrote: Also keep in mind that Ur/Web is not implemented to work with the model where you create a database and then interface with it. Ur/Web wants to control all database tables, and the database is really just

Re: [Ur] New release

2009-09-26 Thread Adam Chlipala
nitralime wrote: On Sun, Sep 20, 2009 at 1:38 PM, Adam Chlipala ad...@impredicative.com mailto:ad...@impredicative.com wrote: nitralime wrote: Just for your Info! On the page (http://www.impredicative.com/ur/more/) I got the following error message by clicking on Grid1

[Ur] New release

2009-10-09 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - Bug fixes - Improvement to choice of line number to cite in record unification error messages - SELECT DISTINCT - New extra demos: orm1 and versioned1 ___ Ur

[Ur] New issue tracker

2009-11-24 Thread Adam Chlipala
There's a new issue tracker for Ur/Web, where you can report bugs and make feature requests. http://www.impredicative.com/mantis/ I'd ask anyone who has reported an issue that's not yet been addressed to please add it to that system. Don't be shy about adding your feature requests, though

Re: [Ur] New issue tracker

2009-11-24 Thread Adam Chlipala
Kirill Zaborsky wrote: Why not to use e.g. trac which can show issues without obligatory sign-up I chose Mantis because it's my favorite among those systems that I have experience with. That set of systems does not include Trac. ___ Ur mailing

Re: [Ur] Question about the Sum metaprogramming example

2009-12-08 Thread Adam Chlipala
David Snider wrote: OK, Thanks. There are some other things I don't understand: With sum defined, it is easy to make some sample calls. The form of the code for main does not make it apparent, but the compiler must reverse engineer the appropriate {Unit} from the {Type} available from the

Re: [Ur] Feedback and questions

2009-12-24 Thread Adam Chlipala
Artyom Shalkhakov wrote: I'm not planning that for any time soon. Since the only compiler is whole-program, a REPL would require significant extra implementation. Hm, okay. Is it possible to invoke the compiler for syntax analysis and type-checking then? Something like urweb --typecheck

[Ur] New release

2010-01-12 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - Basis.serialized type family, for storing more types in the database - Basis.textBlob, for building blobs from strings - Basis.debug function, for server-side debug printing - Bug fixes optimization

Re: [Ur] Client-side programming style

2010-01-22 Thread Adam Chlipala
Artyom Shalkhakov wrote: After looking at the example dlist module, I noticed that it was much more elaborate. What is the reason for that? The biggest reason is performance. With the naive list-based technique, consider what happens when you want to change one element of the list: you must

Re: [Ur] problems building Ur/Web on OS X since the change to dynamic so libs

2010-01-26 Thread Adam Chlipala
Georg Bauer wrote: I don't know anything about the OSX development environment. I'll be happy to accept any patch someone provides. I think the right way to go would be to use GNU libtool - and go the full automake+autoconf route, dynamic libraries for all supported plattforms are an

[Ur] New release

2010-03-25 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - -verbose flag - COUNT(col) SQL aggregate function - 'benignEffectful' and 'safeGet' .urp commands - Remove Basis.getRequestHeader, since it can be used to circumvent cookie security - Rename Top.foldR*X to

[Ur] New release

2010-05-06 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - New experimental checker for information flow and access control policies (See demo at http://www.impredicative.com/ur/scdv/) ___ Ur mailing list

Re: [Ur] urweb-mode speed issues

2010-08-12 Thread Adam Chlipala
Chris Casinghino wrote: The urweb emacs mode seems to be very slow on large files. In particular, scrolling down is very slow in basics.urs. It starts off at a reasonable speed, but as I scroll further down into the file I have to wait longer and longer for each additional page - several

[Ur] Contract programming with Ur/Web?

2010-08-14 Thread Adam Chlipala
I'm thinking about doing some contract programming with Ur/Web. If anyone knows of someone looking to pay to have a custom web application built, then I'd appreciate the chance to learn more. I'm also open to collaborating with other programmers on work of this kind. I think Ur/Web is a

Re: [Ur] Exceptions handling

2010-09-06 Thread Adam Chlipala
Vladimir Shabanov wrote: So savepoint will be introduced only where it really needed (dml with user error handling)? I think that this is the best solution. Yes, that's what I meant. BTW it can be useful to have function for cancelling (and maybe restarting) transaction as a part of

Re: [Ur] Exceptions handling

2010-09-07 Thread Adam Chlipala
OK, I've pushed some changes to the public Mercurial repository linked from the Ur front page. There are two main changes relevant to this thread, based on the two main suggestions discussed here: - A function Basis.tryDml, for running DML in a way such that error messages can be processed

Re: [Ur] Recursive modules?

2010-09-16 Thread Adam Chlipala
Fredrik Roos wrote: I've been experimenting with Ur for a while and I must say it's impressive work. One serious drawback i have noticed though is the lack of recursive modules. Given the way urls work in Ur, the module structure must correspond to the link structure on the website. And since

Re: [Ur] Recursive modules?

2010-09-16 Thread Adam Chlipala
Fredrik Roos wrote: On Thu, Sep 16, 2010 at 3:42 PM, Adam Chlipala ad...@impredicative.com mailto:ad...@impredicative.com wrote: It occurs to me that it might be not-so-scary to support recursive modules that don't use recursion to define types. Maybe I'll try it some time

Re: [Ur] new user having some questions such as a:::Type twice? and more

2010-09-30 Thread Adam Chlipala
Marc Weber wrote: Which is the correct type for my_length2 The line below TYPE 1 show how to it for my_length my_length2 takes two lists and sums both length. (There is no use case but learning ur for this function) val rec my_length (* TYPE 1 *) : a:::Type - list a

Re: [Ur] howto serve arbitrary files (PDF/ icons), and more

2010-11-05 Thread Adam Chlipala
Marc Weber wrote: 1) Which is the ur way to serve arbitrary files such as content-type application/pdf ? That would be the function [Basis.returnBlob]. Eg adding allow url css/* to the configuration file a link to css/css.css complied. Status is still 404 (not found) I also

Re: [Ur] [PATCH] Static link to libmhash when -static parameter given

2010-11-18 Thread Adam Chlipala
Karn Kallio wrote: The Ur/Web compiler links to the libmhash dynamic library independent of the -static parameter being given to the compiler, which links only the liburweb statically. This patch makes the Ur/Web compiler also link libmhash statically with the - static flag. The motivation is

Re: [Ur] new list of companies / freelancers supporting urweb in the future

2010-11-18 Thread Adam Chlipala
Marc Weber wrote: for customers its very important to avoid single points of failure. An urweb based application could be one unless there are many providers who could continue a project. So I hope that this small list on the wiki grows fast so that I can tell customers urweb is not a lock in.

Re: [Ur] interfacing with C or other languages - example system

2010-11-29 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Sun Nov 28 21:58:18 +0100 2010: That's right. The runtime system will also restart if an optimistic SQL concurrency violation is detected, when certain errors are signaled, etc.. Don't know yet whether that's smart

Re: [Ur] How to design JSON interface?

2010-12-01 Thread Adam Chlipala
Marc Weber wrote: I'd like to implement toJson and fromJson which can read typed values from json representation and back automatically. I still don't know how to represent this in urweb: I'm sorry if I didn't say this clearly before: The way I would implement this involves modifying the

Re: [Ur] Generalizing transactions

2010-12-01 Thread Adam Chlipala
Marc Weber wrote: The manual says: context is the type of state that persists across handling a client request So it looks like I can use uw_(set,get)_global and uw_malloc to keep caches. Yes and no. The global functions will accomplish what you want. However, pointers allocated by

Re: [Ur] Generalizing transactions

2010-12-01 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Wed Dec 01 15:50:26 +0100 2010: Yes and no. The global functions will accomplish what you want. However, pointers allocated by uw_malloc() should not be referenced across requests. You should use regular malloc() for such memory.

Re: [Ur] How to design JSON interface?

2010-12-01 Thread Adam Chlipala
Marc Weber wrote: Today its hard to make a project successful unless you create interfaces for others to join or use a service. JSON is a very easy format which is implemented in all languages I know. If you ever have tried creating xmlrpc stuff you know that generating JSON can be simpler. So I

Re: [Ur] info page containing sensor information ?

2010-12-04 Thread Adam Chlipala
Marc Weber wrote: Let's say I'd like to create an info page which lists various items such as: - disk space - current heap size used by urweb - memory allocated by embedded ruby interpreter (doesn't exist yet) How would to design a such an interface which allows multiple libraries to

Re: [Ur] Generalizing transactions

2010-12-04 Thread Adam Chlipala
Karn Kallio wrote: Adam, now that somebody ( Marc Weber ) is working on an application ( payment gateway ) where the transaction model of Ur/Web does not cleanly apply, is there a chance of you generalizing Ur/Web transactions in a safe, principled way ( that allows representing the semantics of

Re: [Ur] Generalizing transactions

2010-12-06 Thread Adam Chlipala
Karn Kallio wrote: Please accept my apologies for sounding snarky or demanding. No need to apologize. I appreciate your contributions here, and my last reply was meant to be light-hearted. :) ___ Ur mailing list Ur@impredicative.com

Re: [Ur] Record subtype constraint

2010-12-07 Thread Adam Chlipala
Karn Kallio wrote: However, this does not compile: [codesnip] giving error: f.ur:11:4-11:6: Expression is not a constructor function Expression: fl Type: Top.folder[[Type]] super This makes sense, since you are trying to apply [fl] as a constructor function, but it isn't one,

Re: [Ur] Strategy - UrWeb Backend

2010-12-07 Thread Adam Chlipala
Stephane Le Dorze wrote: Indeed, for a language/framework to break throught, it needs to get momentum with a big/growing community and to play with current/hypped technologies, take advantage of working with existing librairies and getting a decent tooling. I'm not sure I buy into the

Re: [Ur] missunderstanding - or serious memory handling issue?

2010-12-07 Thread Adam Chlipala
Marc Weber wrote: You try realloc and if the new pointer is a different one you fail - causing all callback functions to be called maybe accessing memory which may have been overridden by other threads because realloc allowed it to be reused. So if uw_malloc returns memory blocks which you can

Re: [Ur] missunderstanding - or serious memory handling issue?

2010-12-07 Thread Adam Chlipala
Marc Weber wrote: You're right: ur itself is not writing to the memory. There is still a segfault. What's wrong ? Should I be using malloc only? Yes, no callback should touch any uw_malloc()ed memory. ___ Ur mailing list Ur@impredicative.com

Re: [Ur] missunderstanding - or serious memory handling issue?

2010-12-08 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Wed Dec 08 02:42:45 +0100 2010: Yes, no callback should touch any uw_malloc()ed memory. So what is uw_malloc worth then? It's meant for use by the Ur/Web program itself, plus cases where FFI functions can act a lot

Re: [Ur] interfacing with ruby

2010-12-08 Thread Adam Chlipala
Marc Weber wrote: I could'nt compile a function which does not take arguments (passing the conntext id) - so I had to add a dummy parameter. I'm not sure exactly what you're referring to, but, if this is meant as a description of something you wish you could do but haven't been able to,

Re: [Ur] missunderstanding - or serious memory handling issue?

2010-12-08 Thread Adam Chlipala
Marc Weber wrote: The next I wasn't sure about was speed: Is it worth trying to avoid some mallocs or not. That's the main motivation for the special handling of context-local heaps. I want this code to scale to many-core execution, and malloc() will inevitably incur some thread

Re: [Ur] Documentation codes

2010-12-08 Thread Adam Chlipala
Karn Kallio wrote: if anyone's worried about Ur/Web surviving or gaining wide-spread adoption, well, just fill in as much info/examples on the Wiki as you can, and add any usable code you might have, or link to your projects. Good idea! Since I was quite confused about folders a couple

Re: [Ur] interfacing with ruby

2010-12-08 Thread Adam Chlipala
Marc Weber wrote: val context : string - value The context function always returns an integer which represents the ctx pointer. Its used to identify a request within Ruby. I had to add the string - to make it compile because context: value did not. I would write it as: val context :

Re: [Ur] Javascript toolkit integration

2010-12-11 Thread Adam Chlipala
Davor Ocelic wrote: Let me ask a specific question: let's say you wanted to insert a date selection widget with functionality such as: http://dojotoolkit.org/reference-guide/dijit/form/DateTextBox.html#dijit-form-datetextbox (Click View example on that page, as usual). Would you code it

Re: [Ur] Javascript toolkit integration

2010-12-11 Thread Adam Chlipala
Karn Kallio wrote: To support animation natively, I think Ur/Web will have to be able to express sources over CSS properties and DOM information like the cursor position. I believe that without these sources animation will be difficult. From looking over basis.urs and the Ur Reference Manual,

Re: [Ur] urweb-library playground - and question about how to complete implemention of enum like class

2010-12-11 Thread Adam Chlipala
Marc Weber wrote: I also added a test branch. It adds the functions next and prev to enum - howver it doesn't compile. What am I doing wrong? == .urs file == class enum val mkEnum : a ::: Type - {ToInt : a - int, FromInt : int - a } - enum a ==

Re: [Ur] Howto make urweb generate invalid XHTML code?

2010-12-11 Thread Adam Chlipala
Marc Weber wrote: Eg try this validator: http://validator.w3.org/check?uri=http%3A%2F%2Fmawercer.de%2F%7Emarc%2Ftest.htmlcharset=%28detect+automatically%29doctype=Inlinegroup=0 (The html file was generated and uploaded to my server previously) What's the issue? ul/ul withoutli tags is not

Re: [Ur] left join on same table?

2010-12-11 Thread Adam Chlipala
Marc Weber wrote: I tried copy pasting the example from the demos to try whether ur supports join on the same table: xml- queryX (SELECT a.Id, a.A, b.Id, b.A FROM t1 as a LEFT JOIN t1 as b ON (a.id = b.id)) (fn r = xml /xml) It seems it does not - I get

Re: [Ur] left join on same table?

2010-12-11 Thread Adam Chlipala
Adam Chlipala wrote: Marc Weber wrote: xml- queryX (SELECT a.Id, a.A, b.Id, b.A FROM t1 as a LEFT JOIN t1 as b ON (a.id = b.id)) (fn r = xml /xml) The other problem is that the SQL syntax extension only recognizes SQL keywords in all caps, so you need to change

Re: [Ur] Using Ur/Web to create standalone JS applications

2010-12-12 Thread Adam Chlipala
Vag Vagoff wrote: . The smallest Linode and Slicehost VPSes are only $20/mo., which certainly seems reasonable for any serious deployment of a web application. Yes, but there are decent 500 MB PHP/Perl hosting for $0.83/month with unlimited traffic and good tech support. That's a social

Re: [Ur] Using Ur/Web to create standalone JS applications

2010-12-12 Thread Adam Chlipala
Vag Vagoff wrote: On 12.12.2010 18:06, Marc Weber wrote: Which kind of application do you have in mind where this really matters? Maybe we can help you find an alternative (Eg Amazon cloud like stuff) You are not specific enough. Which web application do you have in mind? Various small

Re: [Ur] Using Ur/Web to create standalone JS applications

2010-12-12 Thread Adam Chlipala
Vag Vagoff wrote: I'm planning to attack the problem of tail call elimination a few months later. It will enable emitting idiomatic imperative code from eager functional languages. The idea is whole program analysis and tracking which function passed to which and coupling them into one

Re: [Ur] Using Ur/Web to create standalone JS applications

2010-12-12 Thread Adam Chlipala
Karn Kallio wrote: Has graftid been closed down for good? The http://www.graftid.com/ does not respond. I believe Graftid was intended to be something like a community arena for Ur/Web development, no? It wasn't intended as a traditional hosting platform, but rather more for hosting

Re: [Ur] More questions

2010-12-12 Thread Adam Chlipala
Marc Weber wrote: 1) Is using mapM the best choice? Haskell has sequence or sequence_ Anyway: No inserts take place. What am I doing wrong? fun speed_test_insert () = let val numbers = Enum.to 1 10 in dml (DELETE FROM st WHERE 1 = 1); list-

Re: [Ur] More questions

2010-12-12 Thread Adam Chlipala
Marc Weber wrote: So would you mind running the same test on your machine? First, I ran the test using [List.app] instead of [List.mapM] and it worked fine, so this is the solution, for all practical purposes. :) Second, I reproduced your bug, and I think I've isolated it to what looks

Re: [Ur] what about adding short documentation to core library (.urs files)

2010-12-12 Thread Adam Chlipala
Marc Weber wrote: I feel the lib/ur/*.urs files should contain a little bit more documentation. Eg there is incl.urs - and I still have no idea what it is about at all. Everybody knows what option.urs is about. But what does mem.urs contain? Heh, I had forgotten that [Incl]

Re: [Ur] sanity checking

2010-12-12 Thread Adam Chlipala
Karn Kallio wrote: Same here with gcc (GCC) 4.4.3 [kkal...@eka:~/scratch/test]$ gcc test.c [kkal...@eka:~/scratch/test]$ ./a.out Outer Thanks. The other important question is whether, when you look at the code, you also expect it to output two lines, not just one.

Re: [Ur] sanity checking

2010-12-13 Thread Adam Chlipala
Karn Kallio wrote: Well, looking at the code I thought that it should output both, because gcc is supposed to support non-constant initializers. But I am not really any help, because I do not know enough about gcc to say. One thing that I do notice in your example is that the printf should be

[Ur] New library repositories

2010-12-14 Thread Adam Chlipala
I've taken some of the code I've been working on and divided it into two (for now) libraries that should be of general interest. They are available as public Mercurial repositories. - Metaprogramming: http://hg.impredicative.com/meta - GUIs: http://hg.impredicative.com/gui This code requires

Re: [Ur] json implementation - need some help understanding what's happening here?

2010-12-14 Thread Adam Chlipala
Marc Weber wrote: val json_record : ts ::: {Type} -- implicit. is automatically inferred - folder ts-- first arg? - $(map json ts) -- second arg? - $(map (fn _ = string) ts) -- third arg? - json $ts -- result

Re: [Ur] Handling POST requests that aren't from forms

2010-12-15 Thread Adam Chlipala
Chris Double wrote: I want to use an external service that regularly sends a POST request to my Ur/Web application containing text data as the body of the POST. I tried something like the following to log to a file: fun notifyMessage body = dml (INSERT INTO messages (Message) VALUES

Re: [Ur] Handling POST requests that aren't from forms

2010-12-15 Thread Adam Chlipala
Chris Double wrote: On Thu, Dec 16, 2010 at 2:48 AM, Adam Chlipalaad...@impredicative.com wrote: There may be a good way of supporting externally-callable forms without this sort of acrobatics, but, for now, this method isn't so bad. Thanks cor that, I'll try it. One issue might be

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

2010-12-15 Thread Adam Chlipala
Marc Weber wrote: Many web applications are using kind of xml += div#{xml_content_from_db}/div; which of course is unsafe. Which is the urweb way? Is there a blessXml function ? Every XML type is represented with strings at the C level, so you can use the FFI to circumvent the type

Re: [Ur] Handling POST requests that aren't from forms

2010-12-15 Thread Adam Chlipala
Chris Double wrote: This is what the post request looks like that I'm receving: --8- Content-Type: application/json Content-Length: 19 {message:hello} --8- Oh, now I see what you mean, which should have been obvious to me from the start (sorry).

Re: [Ur] SQL error using sqlite

2010-12-16 Thread Adam Chlipala
Marc Weber wrote: I didn't even try how well MySQL or sqlite works yet. I saw that urweb supports sequences concluding incomplete MySQL support - which may have been a false (but definitely healthy :) assumption. Yes, it was a false assumption. Sequences work with every database backend

Re: [Ur] How to implement top-level id function f a = a ?

2010-12-16 Thread Adam Chlipala
Marc Weber wrote: == main.urs == val main : unit - transaction page val recIdTopLevel: a ::: Type - a - a == main.ur == fun recIdTopLevel [a] b = b fun main () : transaction page = let fun recId

Re: [Ur] Server threads?

2010-12-17 Thread Adam Chlipala
Chris Double wrote: If a Client is in a table row and the client disconnects that row is removed automatically. Is it possible to also run a function at this time? Say I do some work when the client connects followed by adding them to the table, they disconnect, I want to cleanup the work I did

Re: [Ur] Server threads?

2010-12-17 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Chris Double's message of Fri Dec 17 14:35:11 +0100 2010: On Sat, Dec 18, 2010 at 2:16 AM, Adam Chlipalaad...@impredicative.com wrote: Thanks, I've added them. Now that I've gotten over my fear of registering with mantis I'll try and do this for any issues I

Re: [Ur] Wiki: Polymorphic_Variants_Usage_Example

2010-12-18 Thread Adam Chlipala
Marc Weber wrote: http://impredicative.com/wiki/index.php/Polymorphic_Variants_Usage_Example (* The commented out functions below do not compile .. the Medium constructor is not polymorphic; * it must decide on one of temp or size type *) [...snip...] From reading the definitions in

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

2010-12-20 Thread Adam Chlipala
Chris Double wrote: I do the feed parsing in python. It reads the list of feeds from the Ur/Web database, fetches them, parses them, and stores the data back in the database. Now that Ur/Web can have server side threads (Mantis issue 36) and better external POST support (Mantis issue 38), I'll

Re: [Ur] segmentation fault when inserting 10000 instead of 1000 rows?

2010-12-20 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Marc Weber's message of Mon Dec 20 06:37:13 +0100 2010: I added ticket 43 to mantis. I gave priority major because I feel this is the weakest point of the whole urweb system. It looks like I hit a stack overflow. I added a 0 too much. So urweb can't

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

2010-12-20 Thread Adam Chlipala
Marc Weber wrote: urweb (http): benchmark PHP (run by apache) (5.3): ab -n 100 -c1 http://l/pg_speed.php 0.01s user 0.03s system 3% cpu 1.242 total benchmark ur (http): ab -n 100 -c1 http://l:8090/St/list 0.01s user 0.02s system 1% cpu 2.147 total benchmark ur

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

2010-12-20 Thread Adam Chlipala
Marc Weber wrote: Another question: Does ml provide some profiling ? Or how do you find out where the compiler is spending most time? You can pass the '-timing' flag to the compiler to get it to dump times spent in the different compiler passes.

Re: [Ur] simple example about constructing rects - guarded types?

2010-12-20 Thread Adam Chlipala
Marc Weber wrote: In which way is this related to the e! guarded expression application? The points where these need to be inserted are usually inferred. In particular, this happens with a normal application of any function defined at the top level of a module. For instance, most uses

Re: [Ur] simple example about constructing rects - guarded types?

2010-12-20 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Tue Dec 21 00:42:14 +0100 2010: Marc Weber wrote: In which way is this related to the e! guarded expression application? The points where these need to be inserted are usually inferred. The demos make use of

[Ur] New release

2011-01-23 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - Changes to encoding of SQL aggregate functions: nullable types may be aggregated, and non-COUNT aggregates return nullable results. - SQL subqueries may apply aggregate functions to columns bound in

Re: [Ur] [PATCH] Allow alt attribute on img

2011-01-25 Thread Adam Chlipala
Karn Kallio wrote: Adding an optional alt attribute allows the programmer the choice. Added. I'm not sure the mailing list is the best place to send patches. I would prefer Mantis issues, but then it's harder for others to watch and comment.

Re: [Ur] running demo

2011-02-22 Thread Adam Chlipala
Gergely Buday wrote: I compiled the hello project and got hello.exe. Running that I was unable to test it via http://localhost:8080 What is the correct url? It's: http://localhost:8080/Hello/main because you want to call function 'main' of module 'Hello'. And, testing it via telnet

Re: [Ur] A direction for Ur/Web

2011-03-26 Thread Adam Chlipala
Marc Weber wrote: a) I talked to Adam in the past about whether its worth adding a configuration file containing database setup. See http://www.impredicative.com/mantis/view.php?id=26 I think it's important to stress that Ur/Web already supports configuration files governing database

Re: [Ur] A direction for Ur/Web

2011-03-26 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Sat Mar 26 18:56:48 +0100 2011: I don't understand which hypothetical design structure of an Ur/Web library you are considering here. What do you want to do and what do you think would go wrong? If you use PHP, Ruby, Plone,

Re: [Ur] A direction for Ur/Web

2011-03-26 Thread Adam Chlipala
Karn Kallio wrote: Well, some similar fuzzy brainstorming that has occurred to me before: To have safely tweakable themes Ur/Web could represent them as types in some way. That probably means Ur/Web will have to represent CSS too. To naturally support user changes of themes at run time then

Re: [Ur] A direction for Ur/Web

2011-03-26 Thread Adam Chlipala
Karn Kallio wrote: What about a wiki page ? SASS/HAML could be implemented as well. It looks like it doesn't make sense to implement all features of haml-lang.com. But most of its syntax is much nicer to write. I do not think that HAML or SASS add any abstractions that Ur/Web with a full

Re: [Ur] A direction for Ur/Web

2011-03-27 Thread Adam Chlipala
Karn Kallio wrote: I assume safely tweakable themes require some sort of guarantee that there is at least a minimum level of correspondence between the CSS and the XHTML. The current mechanism of linking to a style sheet provides no guarantees on the CSS content of that style sheet; indeed, the

Re: [Ur] Calling Ur/Web enthusiasts!

2011-04-12 Thread Adam Chlipala
sampath kirupa shankar wrote: Please lemme know a hub where we can all meet ona daily basis for the project. The #ur channel on Freenode IRC is already established and has some amount of momentum already. ___ Ur mailing list Ur@impredicative.com

Re: [Ur] last type decl wins?

2011-04-16 Thread Adam Chlipala
Marc Weber wrote: Excerpts from Adam Chlipala's message of Sat Apr 16 17:21:39 +0200 2011: I think of almost every Haskell program as an incomprehensible entangled mess, because of implicit mutual recursion spread across files! You're talking about this, correct? a = b b

Re: [Ur] Accessing time components

2011-05-15 Thread Adam Chlipala
Gian Perrone wrote: As a follow-up question, in that case, does there exist any way of accessing the individual fields of the 'broken-down' time representation of the 'tm' struct? That is, are concepts like seconds, minutes, hours, days etc. exposed anywhere? The [time] type is

[Ur] New release

2011-05-17 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - Cygwin compatibility - Compatibility with Gentoo packaging process, including a .ebuild file - Change typing of SQL subqueries, to indicate that they may always return NULL (for no rows) - Syntactic sugar

Re: [Ur] requestHeader

2011-05-22 Thread Adam Chlipala
Chris Double wrote: I notice Basis.requestHeader was removed - what options are there for getting access to header information now? I'd like to be able to access Authorization for example. Is it possible to add headers to the response? Or should these operations be done via the FFI? I

Re: [Ur] Forms and signals

2011-05-29 Thread Adam Chlipala
Chris Double wrote: I'm trying to create a form where the user enters to amounts and a calculation composed of these amounts is displayed while the user types. When the form is submitted the values the user entered are submitted. [...] The total is displayed as the user types as expected but

[Ur] Anyone able to help performance-debug urweb-mode?

2011-05-29 Thread Adam Chlipala
The Ur/Web Emacs mode that I wrote exhibits very poor performance in syntax highlighting. I put wrote in quotes because almost all of the code is lifted from sml-mode; I know very little about Emacs programming, so it isn't at all surprising that I've made a big performance mistake somewhere.

Re: [Ur] FFI and transactions

2011-05-29 Thread Adam Chlipala
Robin Green wrote: I can't imagine an impure function which has a completely pure implementation. Examples of the reverse are easy to come up with, however. Can you give an example of when this might happen? I'm thinking of examples where you want to expose a library interface that

Re: [Ur] Indicating failure in uw_register_transactional callbacks

2011-05-31 Thread Adam Chlipala
Chris Double wrote: 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. I've updated the manual with the answer to this question: call

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

2011-06-04 Thread Adam Chlipala
Chris Double wrote: Can I define a function to call when the root / path is requested? '/main' calls 'main' for example, what does '/' call? You can use the 'rewrite' directive to make some function the default. If you want this to be function [main] from module [Main], put this in your

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

2011-06-04 Thread Adam Chlipala
Chris Double wrote: On Sat, Jun 4, 2011 at 10:46 PM, Adam Chlipalaad...@impredicative.com wrote: You can use the 'rewrite' directive to make some function the default. If you want this to be function [main] from module [Main], put this in your .urp file: rewrite url Main/main

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

2011-06-12 Thread Adam Chlipala
Chris Double wrote: I rewrote an existing web application of mine in Ur/Web last weekend to see how it performed vs the current one. [...] The original pool server I wrote in another language struggled at about 20 work requests per second. Once it hit 30 it would peg the server at 100% CPU and

Re: [Ur] Patches to compile Ur/Web with clang

2011-06-17 Thread Adam Chlipala
austin seipp wrote: I've been learning Ur/Web a bit recently, and on my OS X machine I encountered some failures when attempting to build the compiler using clang for the C code. So I made up a small patch and fixed the build issues. Thanks! I've pushed your changes to the main Ur/Web

Re: [Ur] Patches to compile Ur/Web with clang

2011-06-17 Thread Adam Chlipala
austin seipp wrote: I was also thinking about making it possible to compile the ur/web runtime as an LLVM bitcode file, and do similar for programs you compile with the compiler. Then the final link step can merge the files and effectively do whole program optimization, before emitting a final

Re: [Ur] Compiling Ur/Web with Link-time optimization (WAS: Re: Patches to compile Ur/Web with clang)

2011-06-18 Thread Adam Chlipala
austin seipp wrote: A final note which is worth mentioning: I removed the Ur/Web compiler's -fno-inline invocation to GCC - is there a reason for this flag, like a bug? Yeah, that was working around what I concluded was a bug in some past (possibly present?) GCC version. The reduction in

[Ur] New release

2011-07-15 Thread Adam Chlipala
Available as usual at: http://www.impredicative.com/ur/ CHANGELOG for this release: - Treat local variables the same as module-level variables, for the purpose of implicit argument insertion - New 'noXsrfProtection' directive for .urp files - Non-debug builds omit source location

[Ur] Project web site facelift!

2011-07-15 Thread Adam Chlipala
I've thrown together an incrementally more modern looking web site for the Ur/Web project. What do you think? http://www.impredicative.com/ur/ One addition is a Who's Using It? page. If anyone has a project suitable to be linked from there, please let me know!

Re: [Ur] openid fails to build on OS X

2011-07-17 Thread Adam Chlipala
Robin Green wrote: On Sat, 16 Jul 2011 17:01:12 -0500, austin seippa...@hacks.yi.org wrote: Robin, while I understand the principle behind the secure comparison function (to avoid a timing attack based on string length,) is there a particular reason you need GCC to optimize at level 0? Or

Re: [Ur] hiccups with tutorial ...

2011-07-18 Thread Adam Chlipala
Others have already helpfully pointed the way toward the proper Ubuntu package, libpq-dev, which I believe _is_ mentioned in the Ur/Web manual, but let me know if that or anything else is left out. Unless you call 'urweb' with the '-debug' flag, it doesn't leave around its temporary C source

  1   2   3   4   5   6   7   >