[Ur] No-code use cases?

2021-08-03 Thread Adam Chlipala
Folks, I apologize for being behind responding to Ur/Web GitHub issues and so forth, but I've been distracted trying to kick off an Ur/Web-based startup company.  I figured that, nonetheless, I'd try my luck here and see if anyone has any advice for us finding early customers or in a few other

Re: [Ur] build errors in travis

2021-03-30 Thread Adam Chlipala
Good catch!  Now I'm curious why the CI system didn't tip me off about this problem earlier, but it should be fixed now. On 3/30/21 3:03 AM, Fabrice Leal wrote: Decided to check again on urweb, and noticed the build error mark on the readme; after some light investigation it seems the error

Re: [Ur] Ur/Web first impressions

2021-03-18 Thread Adam Chlipala
On 3/18/21 2:20 PM, Joachim Breitner wrote: Obviously, I need to connect the above function to a source/signal with the game state. I found that this works, although I wonder if this is an idiomatic way to do so: }/> The idiomatic way would be to use the

Re: [Ur] Ur/Web first impressions

2021-03-18 Thread Adam Chlipala
Thanks for all the thoughts on the language!  My responses: On 3/17/21 6:36 PM, Joachim Breitner wrote: I got “Some constructor unification variables are undetermined in declaration” for unification variables in unused code (e.g. when I stopped using some temporary recursive helper function).

Re: [Ur] Better date & time support in Ur/Web + PostgreSQL

2020-09-08 Thread Adam Chlipala
Thanks for sharing the description of your new functionality, at my request in a GitHub issue ! It looks like there are no related strong opinions lurking on this mailing list. I would definitely be up to seeing appropriate types built into the

Re: [Ur] Change grammar to swap precedence of "&&" and "||"?

2020-05-22 Thread Adam Chlipala
OK, it is now changed! On 5/15/20 2:47 PM, Adam Chlipala wrote: Way back when, in Ur/Web's grammar, I apparently gave these two quintessential Boolean operators different relative precedences, compared to other widely used languages, as has been pointed out <https://github.com/urweb/ur

[Ur] Change grammar to swap precedence of "&&" and "||"?

2020-05-15 Thread Adam Chlipala
Way back when, in Ur/Web's grammar, I apparently gave these two quintessential Boolean operators different relative precedences, compared to other widely used languages, as has been pointed out . Would anyone object to swapping them?  It's entirely

Re: [Ur] Blogpost

2020-04-29 Thread Adam Chlipala
Thanks so much for sharing this link, which I've added to the Ur web site. One bit of Ur/Web style advice: I recommend List.app over List.mapM for cases where you just want to perform a side effect on each list element, rather than constructing a new list.  That change in your examples would

Re: [Ur] Any interest in bringing up a platform for virtual conferences?

2020-03-30 Thread Adam Chlipala
On 3/30/20 2:23 AM, Urs Wegmann wrote: I tried to install the demo and failed so far. Is there any advice on how to install libraries? Do I need to build them first or can I just download and copy to a certain directory? I was inspired to add build instructions including all unusual

Re: [Ur] Any interest in bringing up a platform for virtual conferences?

2020-03-29 Thread Adam Chlipala
ely about how it goes. On 3/21/20 3:29 AM, Daniel Tornabene wrote: I'm interested.  I haven't used Urweb but I love standard ML, so my contributions would be perhaps less immediate as others more familiar with the codebase On Fri, Mar 20, 2020 at 5:47 PM Adam Chlipala <mailto:ad...@csail.mit

[Ur] Any interest in bringing up a platform for virtual conferences?

2020-03-20 Thread Adam Chlipala
Some of you may remember the Ur/Web People Organizer (UPO) library that I've mentioned a few times.  It's an Ur/Web component library for rapid creation of applications to organize people -- a pretty broad remit.  It uses a lot of metaprogramming to write your

[Ur] New release

2020-02-09 Thread Adam Chlipala
A new release is available at:   https://github.com/urweb/urweb/releases/tag/20200209 CHANGELOG for this release: - New invocation mode 'urweb daemon restart' - Disallow wildcards in signatures - At compile time, start allowing "#" as a URL - New option '-u' for generated HTTP servers, to

Re: [Ur] Result monad

2020-02-06 Thread Adam Chlipala
In this case, I think the straightforward answer is that result is clearly not a monad, just on the basis of its kind!  However, for any fixed x, fn a => result a x can be a monad.  I suggest reformulating your last definition to be polymorphic in that way.  Probably everything resolves most

[Ur] Planning a new Ur/Web release soon

2019-12-04 Thread Adam Chlipala
I like the idea of making a final Ur/Web release of 2019.  Please let me know this week if there are any lingering issues that have not been addressed yet in the main repo that seem straightforward enough to address before a release.

Re: [Ur] Utility objectifyUr function in JavaScript

2019-11-02 Thread Adam Chlipala
On 10/28/19 3:35 PM, Mark Clements wrote: I found that the following function is very useful for converting Ur/Web data structures within JavaScript. This may be useful to others -- although has it been implemented elsewhere? Thanks for sharing this code.  It's not obvious to me that this code

Re: [Ur] Default settings using a generic record update

2019-10-28 Thread Adam Chlipala
On 10/28/19 3:27 PM, Mark Clements wrote: fun defaultSetting args = update {A=1, B=1} args val _ = defaultSetting {A=2} (* {A=2, B=1} *) val _ = defaultSetting {B=2} (* {A=1, B=2} *) The problem is that polymorphism in Ur/Web is always declared explicitly, not inferred as OCaml or

Re: [Ur] software architectures in Ur/web?

2019-10-18 Thread Adam Chlipala
I only recognize "microservices" from your list of architectures, and I can say that one has been well-supported for a while.  It's easy to expose URL handlers that take in and produce formats like JSON. On 10/18/19 12:01 PM, Marko Schuetz-Schmuck wrote: I am aware of the paper "Ur/Web: A

Re: [Ur] Ur/Web -> JavaScript objects

2019-10-16 Thread Adam Chlipala
On 10/16/19 4:17 AM, Artyom Shalkhakov wrote: I think this is what you are looking for: https://github.com/vizziv/UrLib/blob/master/UrLib/record.urs#L36 https://github.com/vizziv/UrLib/blob/master/UrLib/record.ur#L23 It would be very nice if we as a community were to come up with a "batteries

Re: [Ur] Ur/Web -> JavaScript objects

2019-10-08 Thread Adam Chlipala
On 10/6/19 5:45 PM, Mark Clements wrote: In defining an FFI to a JavaScript library such as Chart.js, config options may be defined in terms of (nested) JavaScript objects with a range of potential keys/fields. Analogous to the xml tags, is there any way to define a record type in Ur/Web that

Re: [Ur] Understanding Ur Inference Failure

2019-09-24 Thread Adam Chlipala
On 9/24/19 4:54 PM, Mario Alvarez wrote: Finally, a quick follow-up question: is there any way to convince the Ur inference engine as it currently stands to solve this kind of problem? (For instance, would it be possible to write a type-level function to compute the overlap between the records

Re: [Ur] Understanding Ur Inference Failure

2019-09-24 Thread Adam Chlipala
On 9/24/19 3:38 PM, Mario Alvarez wrote: The idea behind the function is the following: I want to construct a record by combining together a record representing a set of customization options with a record representing a set of defaults. [...] fun recDif' [ts1 ::: {Type}] [ts2 ::: {Type}] [ts3

[Ur] Ban wildcards from signature files?

2019-09-06 Thread Adam Chlipala
An under-development compiler feature would behave more predictably if we could be sure that signatures never contain wildcards (underscores, standing for unknown types).  I don't think I've ever used a wildcard in a signature. Would anyone object to making wildcards in signatures a

Re: [Ur] Drop of several orders of magnitude in Techempower benchmarks

2019-08-06 Thread Adam Chlipala
On 8/5/19 5:17 PM, Oisín Mac Fhearaí wrote: Update! The good news: I was able to update the Dockerfile to build Ur/web from the latest release tarball (basically, using the old round 16 Dockerfile with a couple of small fixes like installing libicu-dev) and compare the benchmarks with the

Re: [Ur] Drop of several orders of magnitude in Techempower benchmarks

2019-08-01 Thread Adam Chlipala
I'm glad you brought this up, Oisín.  I was already thinking of appealing to this mailing list, in hopes of finding an eager detective to hunt down what is going on!  I can say that I can achieve much better performance with the latest code on my own workstation (similar profile to /one/ of

Re: [Ur] Pre-compressing static assets

2019-05-21 Thread Adam Chlipala
I can't think of a good way to do it with Ur/Web as it stands. It should be a pretty simple tweak to the compiler to specify an external program to run to transform this JavaScript code. On 5/21/19 9:05 AM, Simon Van Casteren wrote: Hey everybody, I've been breaking my head today on how to

Re: [Ur] Mandatory nginx conf: merge_slashes off

2019-04-15 Thread Adam Chlipala
k down. Simon Op za 26 jan. 2019 om 19:33 schreef Adam Chlipala <mailto:ad...@csail.mit.edu>>: Reviewing a PR just now, I'm reminded that the logic I half-recalled to avoid empty serializations is only for strings.  Would it be worth changing [unit] serialization

[Ur] New release

2019-02-17 Thread Adam Chlipala
A new release is available at: https://github.com/urweb/urweb/releases/tag/20190217 CHANGELOG for this release: - Update of standard-library string functions to handle non-ASCII UTF-8 properly - New command-line options: -endpoints - New .urp directive: safeGetDefault - New Basis

Re: [Ur] Explicitly asking for a sql rollback

2019-02-03 Thread Adam Chlipala
On 2/3/19 7:54 AM, Simon Van Casteren wrote: About your first comment, Yes I have the same code habit of first running validations and then doing the actual work. As long as stuff stays kind of simple that is manageable. But a place where this has caused some serious bugs was in my import

Re: [Ur] Explicitly asking for a sql rollback

2019-02-03 Thread Adam Chlipala
On 2/3/19 5:24 AM, Simon Van Casteren wrote: I'm wondering if there is a way to explicitly ask for a sql rollback. I think the only way you can now trigger a rollback would be by calling the "error" function and providing an xbody. I have two use cases for which I think an explicit rollback

Re: [Ur] Mandatory nginx conf: merge_slashes off

2019-01-26 Thread Adam Chlipala
ameter), but because it doesn't happen often and it's actually nginx making the "mistake", I still thought it could help someone out in the future! Simon On Fri, 25 Jan 2019 at 13:57, Adam Chlipala <mailto:ad...@csail.mit.edu>> wrote: Thanks for sharing that wisdom! 

Re: [Ur] Mandatory nginx conf: merge_slashes off

2019-01-25 Thread Adam Chlipala
Thanks for sharing that wisdom! Somehow I remember making a special effort to encode empty strings with underscores, precisely to avoid this problem (though it was appearing in Apache, if I recall correctly).  Can you point us to an example where it arises, in a URL that an Ur/Web app

Re: [Ur] Securing sessions in Ur/Web

2019-01-20 Thread Adam Chlipala
On 1/18/19 10:14 AM, Simon Van Casteren wrote: When a person logs in, username-password style, I make a cookie with this form: { Role: , Email: string , CreatedOn: time} I'm saving the role in the cookie, so subsequent security checks in the page generators and rpc functions don't need to

Re: [Ur] Producing XML (tags clash with built-in ones)

2019-01-20 Thread Adam Chlipala
The truth is, there has been minimal use so far of the built-in XML types to build other kinds of XML than HTML, as far as I know.  And, at the moment, I can't think of any workaround for tag names that clash with HTML tag names, without changing the compiler.  Suggestions are welcome! It

Re: [Ur] SQL table.field IN list

2019-01-13 Thread Adam Chlipala
Yes, "IN" isn't supported by Ur/Web at the moment, and I would be glad to see a PR adding support!  It could probably be as simple as modeling the second argument of "IN" as a regular Ur/Web list, processed internally with a fold similar to what Simon wrote externally (but generating "IN"

[Ur] I'm planning a new release in the first days of 2019.

2018-12-25 Thread Adam Chlipala
A bunch of good stuff has been merged into Ur/Web over the last few months, so I'd like to put out a new release shortly after I finish my current vacation.  Please let us all know if you think any further changes are worth making first.  The best way to give said notice is by submitting a PR

Re: [Ur] Clarifying public API

2018-12-25 Thread Adam Chlipala
On 12/21/18 11:01 AM, Benjamin Barenblat wrote: I’d like to change the way the liburweb API appears to consumers. [...] As I see it, there ought to be four categories of functions: 1. functions that are public for FFI purposes, 2. functions that are used in compiled code but should never

Re: [Ur] about the -static compiler flag

2018-11-23 Thread Adam Chlipala
On 11/23/18 5:04 AM, 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: $ urweb -protocol http -output test -ccompiler musl-gcc -static hello1 Neat! 

Re: [Ur] about the -static compiler flag

2018-10-30 Thread Adam Chlipala
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 modifications are needed

Re: [Ur] calling javascript code in

2018-10-25 Thread Adam Chlipala
Good.  I think that's been true all along.  Thanks for confirming! On 10/24/18 5:35 PM, Fabrice Leal wrote: @adamChlipala I can confirm in my end (urweb master) I get a type error when i try to use onload on a ___ Ur mailing list

Re: [Ur] Tooling: type of an expression

2018-10-24 Thread Adam Chlipala
It doesn't sound too hard, and I'd be glad to see a patch for it; and feel free to open a GitHub issue. On 10/24/18 4:11 AM, Simon Van Casteren wrote: Is there a possibility for -dumpTypes to also dump values in let bindings? Op do 11 okt. 2018 om 16:33 schreef Adam Chlipala <mailto

Re: [Ur] calling javascript code in

2018-10-24 Thread Adam Chlipala
be good to have a type error or allowing it more broadly. Aistis On Mon, Oct 22, 2018 at 11:41 AM Adam Chlipala <mailto:ad...@csail.mit.edu>> wrote: Belated follow-up on this remark: now that I look at the types from the standard library, I see that 'onload' is statically d

Re: [Ur] calling javascript code in

2018-10-22 Thread Adam Chlipala
Here's a hypothesis: if you return a at the top level of a generated page (after adding the attribute by changing basis.urs), it will actually do what you expect.  However, if you embed such a within dynamically generated content, even the /initial value/ of such a dynamic region, the

Re: [Ur] calling javascript code in

2018-10-22 Thread Adam Chlipala
not have 'no effect'.  Instead, it should trigger type error messages! On 7/5/18 2:05 PM, Adam Chlipala wrote: On 07/05/2018 01:43 PM, Fabrice Leal wrote: I found out too late for my own good that onload only works for , placing it in a as no effect Oh, I didn't realize that some event

[Ur] Should we have contributor guidelines for the Ur/Web project?

2018-10-19 Thread Adam Chlipala
An old-ish GitHub issue asks for posting of clear guidelines for new contributors.  What does everyone think about whether that makes sense?  I feel like there have been quite a few successful contributors already without such guidelines, but who

Re: [Ur] Tooling: type of an expression

2018-10-11 Thread Adam Chlipala
expressions and getting the types of those? This is something that would definitely be worth it for me, so I'll be implementing it unless I can't figure it out :). Simon On Thu, Oct 11, 2018, 5:20 AM Adam Chlipala <mailto:ad...@csail.mit.edu>> wrote: I'm sure it's more

Re: [Ur] Error compiling "Anonymous function remains at code generation"

2018-09-19 Thread Adam Chlipala
Short answer before I can investigate in more detail: it is expected that the Ur/Web compiler give that kind of terrible error message in many cases that don't nest server-side and client-side code properly.  Some day it should be enforced with a type system, yielding better error messages,

Re: [Ur] Parsing text files

2018-09-17 Thread Adam Chlipala
On 09/17/2018 04:11 PM, Fabrice Leal wrote: I wanted to parse a text file with a non trivial syntax (https://en.wikipedia.org/wiki/Portable_Game_Notation) and was wondering what would be the best way to achieve this. The best option seems to be maybe FFI with C or haskell ... would it be too

Re: [Ur] about the UrFlow Demos

2018-09-11 Thread Adam Chlipala
Right, that's the paper I was referencing.  It has a fine vintage by now. On 09/11/2018 04:24 AM, Fabrice Leal wrote: oh that's a pity, i was looking forward to play with this feature :\ you mean your "Static Checking of Dynamically-Varying Security Policies in Database-Backed Applications" i

Re: [Ur] about the UrFlow Demos

2018-09-10 Thread Adam Chlipala
It seems I stopped bothering to update those demos over the last few years.  Sorry!  If it makes you feel any better, that feature was never really production-quality, so you'd might as well learn about it by reading a paper instead of running a real compiler. ;) On 09/10/2018 04:44 PM,

[Ur] Interested in getting involved with a startup company?

2018-08-22 Thread Adam Chlipala
This message is going to be a bit of deja vu, with regards to a similar one I sent to this list about 10 years ago. I'm trying to spin up a startup company building on Ur/Web and UPO to provide a platform where people with no programming training can create web

[Ur] Project binary milestone of the year

2018-08-19 Thread Adam Chlipala
I wasn't paying close enough attention and missed when the Ur/Web repository on GitHub passed 512 stars, but that doesn't mean I can't still propose a brief celebration now!  Thanks, everyone, for your interest in the project and help hunting down bugs and dreaming up feature ideas.

Re: [Ur] Struggling to figure out mapping of record

2018-08-18 Thread Adam Chlipala
On 08/18/2018 08:43 AM, Simon Van Casteren wrote: {Age: option float, FirstName: string} [...] {Age: option float -> either string int, FirstName: string -> either string string} [...] Output should be of the type: {Age: either string int, FirstName: either string string} I feel Ur should

Re: [Ur] Reading files uploaded by a user

2018-08-11 Thread Adam Chlipala
On 08/11/2018 04:34 PM, Simon Van Casteren wrote: I want to provide import functionality of this data and I feel CSV files are probably the best way to go with this. Microsoft Excel exports these, database programs can export these they're human-readable, etc. I know Ur/Web supports file

Re: [Ur] calling javascript code in

2018-07-05 Thread Adam Chlipala
On 07/05/2018 01:43 PM, Fabrice Leal wrote: I found out too late for my own good that onload only works for , placing it in a as no effect Oh, I didn't realize that some event attribute was systematically ignored.  That might qualify as a bug! ___

Re: [Ur] calling javascript code in

2018-07-05 Thread Adam Chlipala
Oh, right.  The tag should do just as well, in that case.  You'd need to return an empty XML document explicitly, but that's not hard. On 07/05/2018 09:43 AM, Simon Van Casteren wrote: Side note: the

Re: [Ur] calling javascript code in

2018-07-04 Thread Adam Chlipala
Let me try to disentangle the potential parts of your question. I hope you are not asking about literally writing code in JavaScript.  I will proceed as though you are actually asking about /client-side code/, but let me know if I misunderstood.  (It is a rather nice feature of Ur/Web that

Re: [Ur] about

2018-06-21 Thread Adam Chlipala
I remember that someone put a proof-of-concept canvas interface on GitHub at some point, but now I forget the details.  Certainly there is nothing within the urweb GitHub organization. On 06/21/2018 11:11 AM, Benjamin Barenblat wrote: On Thursday, June 21, 2018, at 5:11 AM EDT, Fabrice Leal

[Ur] New release

2018-06-16 Thread Adam Chlipala
I'm trying out a new release method, based on the GitHub feature of the same name.  You can find this release at:     https://github.com/urweb/urweb/releases/tag/20180616 CHANGELOG for this release: - New feature to cache files stored in the database as blobs, via the   'filecache' .urp

Re: [Ur] Thoughts on cryptographic hashing for Ur/Web standard library?

2018-05-25 Thread Adam Chlipala
, Benjamin Barenblat wrote: On Saturday, May 19, 2018, at 3:52 pm -0400, Adam Chlipala wrote: It has been pointed out <https://github.com/urweb/urweb/pull/114> that Ur/Web's Basis.crypt uses DES, a weak hashing approach by today's standards. I can think of a few potential courses of action: [...

[Ur] Thoughts on cryptographic hashing for Ur/Web standard library?

2018-05-19 Thread Adam Chlipala
After a busy semester, I am going through the backlog of Ur/Web issue reports.  I'm hoping to make a new Ur/Web release soon, and here is the first in what may be a series of community queries, to decide whether certain changes are appropriate. It has been pointed out

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
t up and running, so not having to wait minutes-hours until I can start using what I bought. This is not that important right now, but I would like to have the possibility. 2018-05-13 20:11 GMT+02:00 Adam Chlipala <ad...@csail.mit.edu <mailto:ad...@csail.mit.edu>>: I'm

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
, I can't weigh the two alternatives: Complicating the app with tenantIds, or complicating the deployment with seperate apps. 2018-05-13 15:31 GMT+02:00 Adam Chlipala <ad...@csail.mit.edu <mailto:ad...@csail.mit.edu>>: Can you explain why you don't want to run separate

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
Can you explain why you don't want to run separate applications with separate databases? On 05/13/2018 05:50 AM, Simon Van Casteren wrote: Hi, I'm in the process of making a new application for music schools, using ur/web for front and backend. I'm at the point where I have two customers

Re: [Ur] SVG Test based on ListEdit.ur

2018-05-01 Thread Adam Chlipala
Yes, I'm sorry, but the tag is only for HTML and the DOM.  It would take extra implementation effort to make it compatible with SVG, and that effort has not yet been made... so it's good that the compiler is raising a static error! On 05/01/2018 06:04 PM, Jonas Mellin wrote: Dear all, I

Re: [Ur] UR/Web SVG (ffi) question

2018-04-17 Thread Adam Chlipala
how to mix xsvg with xbody. Anything in particular that has to be taken into account when mixing this? /Jonas Mellin *From:*Ur [mailto:ur-boun...@impredicative.com] *On Behalf Of *Adam Chlipala *Sent:* den 17 april 2018 13:20 *To:* ur@impredicative.com *Subject:* Re: [Ur] UR/Web SVG (ffi

Re: [Ur] UR/Web SVG (ffi) question

2018-04-17 Thread Adam Chlipala
For future questions, I think it would be good for you to explain what you understand from error messages, highlighting what additional understanding you need to diagnose the error.  Here again the problem is a simple one that would be recognized as a bug in any programming language. Notice

Re: [Ur] UR/Web SVG (ffi) question

2018-04-16 Thread Adam Chlipala
I have not read all of your code, but I did spot the problem behind the first compiler error message, which I think all web developers would agree is problematic. (I.e., it isn't just a question of a fussy Ur/Web type system.) On 04/16/2018 04:58 AM, Jonas Mellin wrote: fun proc (x:

Re: [Ur] Forms that call rpc instead of redirect

2018-02-11 Thread Adam Chlipala
Maybe just stop worrying about it, so that you might find that problems don't arise in practice? >:) On 02/11/2018 07:13 PM, Aistis Raulinaitis wrote: Any pointers to get me started on the right path when it comes to a more effective usage of source based forms? On Feb 11, 2018 16:09, &q

Re: [Ur] Forms that call rpc instead of redirect

2018-02-11 Thread Adam Chlipala
the form submit struct typing mechanism and the added verbosity of all the sources would be very painful if you are expecting the majority of your forms to be of this style. Which I am. On Feb 11, 2018 13:20, "Adam Chlipala" <ad...@csail.mit.edu <mailto:ad...@csail.mit.edu&

Re: [Ur] Forms that call rpc instead of redirect

2018-02-11 Thread Adam Chlipala
I think that kind of form has gone out of style, and I personally almost always use the Ur/Web tags like to collect data and then choose RPCs programmatically. On 02/11/2018 04:10 PM, Aistis Raulinaitis wrote: The form mechanism is excellent, with the built in type checking, but the submit

Re: [Ur] Key-value store extension

2018-01-31 Thread Adam Chlipala
That's an interesting idea.  It is not a feature that has ever occurred to me to suggest.  I prefer to settle configuration at compile time, so that the compiler can specialize code to chosen settings.  Have you considered that path, too? On 01/29/2018 10:43 AM, Athene Noctua wrote: Hi all,

Re: [Ur] Set / Update values within a structure

2017-11-10 Thread Adam Chlipala
within `let` block upon a javascript event. Since, the function is within `let` block (because it needs access to certain variables within the parent function), I'm unable to use execF(...) from javascript. Also, is `ref` not supported in urweb ? Thanks On Fri, Nov 10, 2017 at 4:48 AM, Adam

Re: [Ur] Research topic one semester Ur/Wev or dependent typer

2017-11-10 Thread Adam Chlipala
Actually, one other idea that just came up on GitHub is adding a WebAssembly backend to the Ur/Web compiler.  This task requires SML expertise but is probably small enough for someone starting with that expertise. On 11/10/2017 07:50 AM, Adam Chlipala wrote: Glad to hear you're interested

Re: [Ur] Research topic one semester Ur/Wev or dependent typer

2017-11-10 Thread Adam Chlipala
Glad to hear you're interested in these topics!  And presumably some other people following the mailing list might be interested in similar suggestions, though I suggest you take any further replies private, sending to me alone. The only semester-sized idea I have at the moment is to learn

Re: [Ur] Set / Update values within a structure

2017-11-10 Thread Adam Chlipala
On 11/09/2017 10:42 PM, Harshita Kasera wrote: What I ultimately want to achieve is to be able to change the callback function /debugMe/ at a later point of time. Is it possible to set or update values within a structure at a later point of time? No, module (structure) fields can't be

Re: [Ur] No sql_injectable(_prim) xbody (or xml in general).

2017-11-03 Thread Adam Chlipala
t; {current_pages} Running this page, clicking on "add page", and then refreshing gives an error in Firefox's developer console. — Peter On Fri, 3 Nov 2017, at 13:00, Adam Chlipala wrote: On 11/02/2017 11:19 PM, Artyom Shalkhakov wrote: 2017-11-03 1:59 GMT+

Re: [Ur] Ur record types as sets of fields

2017-11-03 Thread Adam Chlipala
On 11/03/2017 08:22 AM, Anthony Clayden wrote: On 4/11/2017, at 12:57 AM, Adam Chlipala <ad...@csail.mit.edu> wrote: On 11/02/2017 09:51 PM, Anthony Clayden wrote: I'm curious what the full signature would look like. Here's my guess: fun natJoin [ t1' :: {Type} ] [ t1_2 :: {Type}

Re: [Ur] No sql_injectable(_prim) xbody (or xml in general).

2017-11-03 Thread Adam Chlipala
On 11/02/2017 11:19 PM, Artyom Shalkhakov wrote: 2017-11-03 1:59 GMT+06:00 Peter Brottveit Bock >: It seems to me that it's not possible to store xml in a database. Is there any reason for this? Storing it in a database is prone to XML/HTML

Re: [Ur] Ur record types as sets of fields

2017-11-03 Thread Adam Chlipala
On 11/02/2017 09:51 PM, Anthony Clayden wrote: I'm curious what the full signature would look like. Here's my guess: fun natJoin [ t1' :: {Type} ] [ t1_2 :: {Type} ] [ t2' :: {Type} ] [ t1' ~ t1_2 ] [ t1' ~ t2' ] [ t1_2 ~ t2' ] ( t1 : $( t1' ++

Re: [Ur] No sql_injectable(_prim) xbody (or xml in general).

2017-11-02 Thread Adam Chlipala
You're right that there are currently no type-class instances for storing XML in the SQL database.  At the moment, I can't remember any good reasons for not adding an instance for all [xml] types. I'll plan to do it, if no one adds a counterargument here in the next few days! On 11/02/2017

Re: [Ur] Ur record types as sets of fields

2017-11-02 Thread Adam Chlipala
On 11/01/2017 08:26 PM, Anthony Clayden wrote: I'm wondering whether Ur's disjointness constraint might be used to build a record merge operator -- as needed for Relational Algebra Natural Join. Given two records of type t1, t2 with (some) fields in common, some private; let's chop their

Re: [Ur] RPC call line throwing error

2017-11-01 Thread Adam Chlipala
I like Benjamin's solution.  To me, it clearly leads to better code, even independently of this issue.  I always try to avoid querying SQL row data that won't be used. The problem has to do with embedding of server-side values in client-side code.  The type [client] should only appear in

Re: [Ur] Arrays and maps?

2017-08-10 Thread Adam Chlipala
On 07/25/2017 11:48 AM, Artyom Shalkhakov wrote: Well, arrays may be overused and such, but here in this particular instance: https://github.com/ashalkhakov/urweb-projects/blob/master/sam/app.ur#L238 The update requires rebuilding the whole list, seems quite wasteful for this particular usage.

Re: [Ur] Improving JS VM (was: Re: Arrays and maps?)

2017-08-10 Thread Adam Chlipala
On 07/24/2017 11:08 PM, Artyom Shalkhakov wrote: 2017-07-25 1:46 GMT+06:00 Aistis Raulinaitis : I agree, I think arrays are much overused in programming for the most part. My thoughts on are that these libs should facilitate easier interop with the existing JS libs rather

Re: [Ur] Arrays and maps?

2017-07-23 Thread Adam Chlipala
Yes, it's possible in principle to add such things to the standard library. However, the rarity with which such a feature is requested provides evidence that it's not important enough to build in! Benjamin Barenblat's suggestions of functional data structures seem good; most applications

Re: [Ur] Anything to squeeze in before a new Ur/Web release?

2017-07-13 Thread Adam Chlipala
On 07/13/2017 02:55 AM, Artyom Shalkhakov wrote: Here's a list of stuff I'd like to see, in no particular order: Thanks for the suggestions. They mostly sound like enhancement ideas, which I probably won't tackle soon, though I'd be glad to consider patches for any of them. * query

[Ur] Anything to squeeze in before a new Ur/Web release?

2017-07-12 Thread Adam Chlipala
I'd like to make a new release early next week. I just cleared the backlog of bug reports and merge-ready PRs, I think. Are there any other changes appropriate to make before a release? P.S.: Ur/Web is now included in Debian stable! Thanks to Benjamin Barenblat for maintaining the package.

Re: [Ur] About clientOnly

2017-07-12 Thread Adam Chlipala
on, May 22, 2017 at 4:42 AM, Adam Chlipala <ad...@csail.mit.edu <mailto:ad...@csail.mit.edu>> wrote: I can confirm that non-primitive/abstract types are not meant to cross the FFI boundary. On 05/21/2017 11:31 PM, Aistis Raulinaitis wrote: Thanks! On Sun, M

Re: [Ur] Generating fresh name (gensym :: {Unit} -> Name).

2017-07-09 Thread Adam Chlipala
On 07/09/2017 05:11 PM, Peter Brottveit Bock wrote: Is it possible to generate a fresh name relative to some collection of names? I.e. something of kind "gensym :: {Unit} -> Name". Short answer: I can't think of any way to implement that feature, with Ur as it stands today. Does it

Re: [Ur] need help with unification and field name disjointness proof failures

2017-05-14 Thread Adam Chlipala
On 04/08/2017 04:05 PM, Adam Chlipala wrote: On 04/06/2017 06:22 PM, Benjamin Barenblat wrote: The fact that `rand` returns -1 on failure, however, is a bit scary. That sounds like a CVE waiting to happen – people aren’t going to check the result code from `rand`. Adam, how would you feel about

Re: [Ur] expressing non-emptiness?

2017-05-10 Thread Adam Chlipala
No such more refined type of strings is built into Ur/Web, any more than it's built into OCaml or Haskell. On 05/10/2017 06:25 PM, Marko Schuetz-Schmuck wrote: I'm puzzled over expressing non-emptiness. Say, I want to write a function that has a non-empty string parameter. How would one

Re: [Ur] race condition in urweb-email

2017-05-02 Thread Adam Chlipala
Oh, I see why that is happening. It's definitely a bug. Thanks for the report, and consider it pushed onto my to-do list. On 05/02/2017 02:01 PM, Marko Schütz Schmuck wrote: I'm seeing a race condition using urweb-email. An example is attached below. On the console I see the three TO:

Re: [Ur] EUnurlify in code to be compiled to JavaScript[2]?

2017-05-01 Thread Adam Chlipala
On 05/01/2017 09:42 AM, Benjamin Barenblat wrote: On Sun, Apr 30, 2017 at 1:19 PM, Adam Chlipala <ad...@csail.mit.edu> wrote: Ur/Web doesn't support any interaction with cookies in client-side code. Is this because Ur/Web signs all its cookies and doing the signing and verifi

Re: [Ur] EUnurlify in code to be compiled to JavaScript[2]?

2017-04-30 Thread Adam Chlipala
Ah, that one's easy for me to spot. Ur/Web doesn't support any interaction with cookies in client-side code. On 04/21/2017 07:38 PM, Marko Schütz Schmuck wrote: cookie auth : string fun startSession (email : string) : transaction unit = setCookie auth {Value = email,

Re: [Ur] fastCGI backend and POST /.msgs HTTP/1.1 requests

2017-04-30 Thread Adam Chlipala
I don't think I'm going to be able to look into this problem any time soon, but I'll be happy to accept a patch, if someone finds one. On 04/14/2017 06:46 PM, Sergey Mironov wrote: Yes, I am able to reproduce the error with the latest Ur/Web. I've checked the related code and didn't find any

Re: [Ur] [Ur/Web Ffi: JavaScript]

2017-04-25 Thread Adam Chlipala
On 04/24/2017 11:54 PM, Jeevjyot Chhabda wrote: I am developing an application in Ur/Web which requires good amount of javascript code. I would like to warn/ throw an error during the compile time when the user doesn’t set the right configuration in javascript? Is it possible to throw compile

Re: [Ur] Ur on gitlab pages

2017-04-17 Thread Adam Chlipala
On 04/16/2017 11:10 PM, Artyom Shalkhakov wrote: * [wget] is used to scrape the pages and save them to a file (using -static protocol, I could not get the dynamic JS file output) I hadn't thought of that case, so it sounds like a good new feature to request: outputting JavaScript code in

Re: [Ur] Ur/Web people organizer: editable table with fixed (hidden) field?

2017-04-11 Thread Adam Chlipala
If the "user" field is not editable, how do you choose which user to associate with a new row? On 04/11/2017 12:10 PM, Marko Schütz Schmuck wrote: On Tue, 11 Apr 2017 10:58:31 -0400, Adam Chlipala wrote: OK, so you don't want to support adding or deleting rows, just editin

Re: [Ur] need help with unification and field name disjointness proof failures

2017-04-08 Thread Adam Chlipala
On 04/06/2017 06:22 PM, Benjamin Barenblat wrote: The fact that `rand` returns -1 on failure, however, is a bit scary. That sounds like a CVE waiting to happen – people aren’t going to check the result code from `rand`. Adam, how would you feel about it returning an `option` or throwing an

Re: [Ur] Big drop in Ur performance in latest web framework benchmark

2017-04-08 Thread Adam Chlipala
On 04/01/2017 05:22 PM, Andy wrote: Prelim results for the latest web framework benchmark is out (https://www.techempower.com/benchmarks/previews/round14/) and the performances of Ur suffer pretty some big drops in a few tests (Fortune Single Query, Multiple Query - but improved significantly

  1   2   3   4   5   6   7   >