[Ur] Runtime error

2016-07-08 Thread Saulo Araujo
Hi, I am getting the error "Error triggers unlimited retry: Couldn't allocate new heap chunk contiguously; increasing size to 512" when I execute the following program open List table user_table: {ID: int, NAME: string} PRIMARY KEY ID table project_table: {ID: int, NAME: string, DESCRIPTION:

Re: [Ur] Runtime error

2016-07-08 Thread Saulo Araujo
apX (fn projectRow => case projectRow of ProjectRow (projectId, projectName, taskRows) => {[projectId]} {[projectName]} (* ... *) Sincerely, Saulo On Fri, Jul 8, 2016 at 11:38 AM, Saulo Araujo wrote: > Hi, > > I am getting the error > > "Error tri

Re: [Ur] Runtime error

2016-07-08 Thread Saulo Araujo
askRow of > TaskRow (taskId, taskName, _) => > > > {[projectId]} > {[projectName]} > {[taskId]} > {[taskName]} > > ) > taskRows) > ( begin new stuff ) > } > > ( end new stuff ) > projectRows} > > &

[Ur] Busy indicator

2016-07-22 Thread Saulo Araujo
Hi, I would like to show a busy indicator when there is an ongoing rpc. I was wondering if there is a source that contains that information. Does anyone know if is there such source? Sincerely, Saulo ___ Ur mailing list Ur@impredicative.com http://www.i

Re: [Ur] Busy indicator

2016-07-22 Thread Saulo Araujo
to change the status > of a busy indicator after the call returns. > > > On 07/22/2016 08:04 PM, Saulo Araujo wrote: > >> Hi, >> >> I would like to show a busy indicator when there is an ongoing rpc. I was >> wondering if there is a source that contains that inf

[Ur] Javascript alerts

2016-08-02 Thread Saulo Araujo
Hi, I have developed a GUI with a lot of push pin buttons that are associated to boolean sources. When the button is pushed, it sets its source to true. When the button is released, it sets its source to false. The problem I am facing is that after pressing those buttons some times, the JavaScript

Re: [Ur] Javascript alerts

2016-08-02 Thread Saulo Araujo
o a test > case that doesn't use the FFI. > > > On 08/02/2016 10:43 AM, Saulo Araujo wrote: > > Hi, > > I have developed a GUI with a lot of push pin buttons that are associated > to boolean sources. When the button is pushed, it sets its source to true. > When the butto

Re: [Ur] Javascript alerts

2016-08-04 Thread Saulo Araujo
Hi Adam, It took me some time, but after a lot of code removal (FFI, database and logic) I believe I have a small test case that shows the bug. You can get it with the command git clone -b bug https://github.com/saulo2/timesheet-ur.git To reproduce the bug, follow the steps below: 1) click the

Re: [Ur] Javascript alerts

2016-08-04 Thread Saulo Araujo
n STYLE "display: initial" else STYLE "display: none") in return   end On Thu, Aug 4, 2016 at 9:22 AM, Saulo Araujo wrote: > Hi Adam, > > It took me some time, but after a lot of code removal (FFI, database and > logic) I believe I have a

Re: [Ur] Busy indicator

2016-08-07 Thread Saulo Araujo
, 2016 at 4:58 PM, Adam Chlipala wrote: > On 07/22/2016 09:51 PM, Saulo Araujo wrote: > > Thanks for your suggestion. It was quite easy indeed. Do you think this > signal could/should be part of the Ur/Web standard library and runtime? If > so, I can make a pull request with my im

Re: [Ur] Javascript alerts

2016-08-08 Thread Saulo Araujo
At least, your example now works > as I'd expect. > > Thanks for taking the time to minimize the example. Despite the short > fix, the problem was enough work to deduce in the minimized code. :) > > > On 08/04/2016 08:22 AM, Saulo Araujo wrote: > >> Hi Adam, >

[Ur] Substantial memory leak in the JavaScript runtime

2016-08-12 Thread Saulo Araujo
Hi, I believe there is a substantial memory leak in the JavaScript runtime of Ur/Web. To see it happening: 1) visit http://timesheet-ur.sauloaraujo.com:8080/TimeSheet/application with Google Chrome 2) open the developer tools by pressing f12 3) click in the "Profiles" tab 4) click in the "Take He

Re: [Ur] Substantial memory leak in the JavaScript runtime

2016-08-20 Thread Saulo Araujo
Hi, Did anyone had the opportunity to look into this bug report and in the proposed fix? Sincerely, Saulo On Fri, Aug 12, 2016 at 10:55 PM, Saulo Araujo wrote: > Hi, > > I believe there is a substantial memory leak in the JavaScript runtime of > Ur/Web. To see it happening: >

Re: [Ur] Triggering JavaScript context switches

2016-08-21 Thread Saulo Araujo
and the only functions that check the value of maySuspend are sl (sleep), rc (rpc) and rc (recv). Sincerely, Saulo Araujo On Sat, Aug 20, 2016 at 5:25 PM, Benjamin Barenblat wrote: > The threads demo* explains that ‘Ur/Web [client code] uses cooperative > multi-threading, not the more

Re: [Ur] Substantial memory leak in the JavaScript runtime

2016-08-24 Thread Saulo Araujo
Hi Adam, You are welcome! I am happy to say that your patch also fixes the memory leak. I believe there is another memory leak in the JavaScript runtime (see the end of the previous message). I am gonna look into it. Sincerely, Saulo On Wed, Aug 24, 2016 at 1:17 PM, Adam Chlipala wrote: > Than

Re: [Ur] Substantial memory leak in the JavaScript runtime

2016-08-28 Thread Saulo Araujo
rather than classical ones. Sincerely, Saulo On Fri, Aug 26, 2016 at 1:12 PM, Adam Chlipala wrote: > On 08/24/2016 03:02 PM, Saulo Araujo wrote: > >> I am happy to say that your patch also fixes the memory leak. >> > > OK, great. > > I believe there is another

Re: [Ur] Busy indicator

2016-08-28 Thread Saulo Araujo
-an-active-RPC signal > function that each take the group as input. > > Does that sound sufficiently pleasant to use? > > On 08/07/2016 11:28 PM, Saulo Araujo wrote: > > Sure! You can see it in action at > <http://timesheet-ur.sauloaraujo.com:8080/TimeSheet/application&g

Re: [Ur] Substantial memory leak in the JavaScript runtime

2016-08-28 Thread Saulo Araujo
ng about them > provides some evidence that this isn't a deadly problem in practice. > > On 08/28/2016 08:18 PM, Saulo Araujo wrote: > > Hi Adam, > > Memory leaks in the JavaScript runtime like these are not important in > classical web applications because the brows

Re: [Ur] Busy indicator

2016-09-02 Thread Saulo Araujo
Hi Adam, Thanks a lot for your comprehensive answer. > I think this really is a serious usability issue. In your original > example, what happens when your program is using a library that, between > versions, starts making more RPCs, so your UI says that "your" code is > "still working" when ac

[Ur] Metaprogramming doubt

2016-09-26 Thread Saulo Araujo
to a similar example? Sincerely, Saulo Araujo ___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Re: [Ur] Metaprogramming doubt

2016-09-26 Thread Saulo Araujo
Hi Adam, Thanks for the quick answer! Regards, Saulo On Mon, Sep 26, 2016 at 7:47 PM, Adam Chlipala wrote: > On 09/26/2016 06:44 PM, Saulo Araujo wrote: > >> Does the Ur/Web type system allow me to require that groupRowTable >> contains foreign keys to the group and row ta

[Ur] Sql.easy_insertOrUpdate

2016-09-28 Thread Saulo Araujo
Hi, I am trying to use the function Sql.easy_insertOrUpdate in the code https://github.com/saulo2/timesheet-upo/blob/master/timeSheet.ur but I am getting the following compiler errors: /home/saulo/Programming/projects/timesheet-upo/timeSheet.ur:103:1: (to 105:35) Can't resolve type class instance

Re: [Ur] Sql.easy_insertOrUpdate

2016-09-28 Thread Saulo Araujo
_ cellTableOtherColumnsFolder cellTable ({cellTableGroupForeignKeyColumnName = groupId, cellTableRowForeignKeyColumnName = rowId, cellTableDateColumnName = date} ++ contents) Sincerely, Saulo On Wed, Sep 28, 2016 at 5:47 PM, Saulo Araujo wrote: > Hi, > > I am trying to use the function Sql.easy_insertOrUpda

[Ur] Sharing types in signatures

2016-09-30 Thread Saulo Araujo
Hi, Does Ur/Web supports sharing types in signatures like in the code below? signature A = sig type t end signature B = sig type t end signature C = sig structure A1 : A structure B1 : B sharing type A1.t = B1.t end In case it is not supported, is there a way to accomplish something

Re: [Ur] Sharing types in signatures

2016-09-30 Thread Saulo Araujo
con` instead of > `where type`, and you can use multiple `where` statements on the same > signature one after the other. > > > On Fri, Sep 30, 2016 at 8:35 PM, Saulo Araujo wrote: > >> Hi, >> >> Does Ur/Web supports sharing types in signatures like in the code b

[Ur] RPC code doesn't use a named function or transaction

2016-10-04 Thread Saulo Araujo
Hi, I am getting the error "RPC code doesn't use a named function or transaction" when I try to compile the code in https://github.com/saulo2/timesheet-upo/blob/master/timeSheet.ur The problems seems to be in the line rpc (cell.Save contentOption) where I try to call the Save function stored in

[Ur] Grammar/Parser bug?

2016-10-07 Thread Saulo Araujo
Hi, I am trying to do something like signature ARGUMENTS = sig con n1 :: Name con t1 :: Type con t2 :: {Type} constraint [n1] ~ t2 end signature RESULT = sig type t end functor Functor(A : ARGUMENTS) : RESULT where type t = $([A.n1 = A.t1] ++ A.t2) = struct open A t

Re: [Ur] Grammar/Parser bug?

2016-10-08 Thread Saulo Araujo
x = y] ++ z) > ... where type t = blah A.n1 A.t1 A.t2 > It may need extra kind annotations. > > > On 10/07/2016 08:42 AM, Saulo Araujo wrote: > >> Hi, >> >> I am trying to do something like >> >> signature ARGUMENTS = sig >> con n1 ::

Re: [Ur] int to string?

2016-10-09 Thread Saulo Araujo
Hi Michael, Your definition of int2string is fine. For example, the code fun int2string (i : int) : string = show i val s = int2string 10 compiles without errors. I suspect the problem is in another part of your code. The error message suggests that you have an expression that produces a list w

Re: [Ur] int to string?

2016-10-09 Thread Saulo Araujo
; :: [] > fun predicate (s : string) : bool = s <> "apple" > (* val stuff2 = List.filter predicate stuff*) > in > return > {[s]} > > > end > -- &g

Re: [Ur] Browser-based adventure game

2016-10-12 Thread Saulo Araujo
Hi Michael, Thanks for sharing your game with the community. I skimmed its source code and I did not found anything that I would qualify as a non-canonical use of Ur/Web. However, beware that I am an Ur/Web beginner too :) Maybe you can pinpoint which parts of the code you are afraid are non-canon

Re: [Ur] Browser-based adventure game

2016-10-12 Thread Saulo Araujo
Hi Michael, I am afraid I cannot give you "definitive" answers for much of your questions. Anyway, I will try my best :) - Is there a more convenient syntax for list construction than "1 :: 2 :: 3 > :: []", something like "[1, 2, 3]"? > I am afraid there is not. > - I had to pass both a "gameSt

Re: [Ur] Grammar/Parser bug?

2016-12-31 Thread Saulo Araujo
50 PM, Adam Chlipala wrote: > > On 10/08/2016 07:41 PM, Saulo Araujo wrote: > > Thanks for suggesting this workaround. I was able to implement it, but I > have some doubts. [...] > > After some trial and error, the compiler was happy with > > con concat nm t r = [[nm] ~

Re: [Ur] Database migrations

2017-02-08 Thread Saulo Araujo
Hi Artyon, I believe that Liquibase satisfies, at least partially, your requirements. In particular, it is able diff databases ( http://www.liquibase.org/documentation/diff.html). Regards, Saulo On Wed, Feb 8, 2017 at 4:52 AM, Artyom Shalkhakov < artyom.shalkha...@gmail.com> wrote: > Hello all,