Re: [Ur] Blogpost
Good catch, I updated to use List.app! I kept the queryL1 into .app though, I feel it's a bit cleared for people who don't know Ur/Web... small thing though. Simon Op wo 29 apr. 2020 om 15:23 schreef 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 > make them a bit shorter and epsilon more time-and-memory-efficient. > > You also have an example of queryL1 followed by List.mapM. I would just > use queryI1 there. > > On 4/27/20 2:28 AM, Simon Van Casteren wrote: > > Hi everybody, > > > > In case anyone is interested, I wrote a blog post some time ago about > > my experiences with Ur/Web. > > > > http://frigoeu.github.io/urweb1.html > > > > Simon > > ___ > Ur mailing list > Ur@impredicative.com > http://www.impredicative.com/cgi-bin/mailman/listinfo/ur > ___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
Re: [Ur] Blogpost
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 make them a bit shorter and epsilon more time-and-memory-efficient. You also have an example of queryL1 followed by List.mapM. I would just use queryI1 there. On 4/27/20 2:28 AM, Simon Van Casteren wrote: Hi everybody, In case anyone is interested, I wrote a blog post some time ago about my experiences with Ur/Web. http://frigoeu.github.io/urweb1.html Simon ___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
Re: [Ur] Blogpost
That's interesting! I'm gonna give that a try and see what happens. Simon On Mon, 27 Apr 2020, 14:36 Vladimir Shabanov, wrote: > In case anyone is interested, I wrote a blog post some time ago about my > experiences with Ur/Web. > > http://frigoeu.github.io/urweb1.html > > > Great post. I agree that build times for large projects is perhaps the > most annoying thing in Ur/Web. > > They caused mostly by excessive inlining. To cut them down I'm generating > neverInline pragmas for almost all or my functions. Since JavaScript > supports functions as values it works very well for frontend (and reduces > app.js file size as well). Backend requires polymorphic functions to be > inlined but most of them live in standard library so I just don't > generate neverInline pragmas for them. > > Here's pragma generation from my Makefile > > neverInline.urp: *.ur > @perl -n -e 'use File::Basename; $$ARGV =~ s/.ur//; s/\(\*.*\*\)//; > /.*( val|^val| fun|^fun) +([^ ()]+)/ && print "neverInline $$2\nneverInline > ",ucfirst(basename($$ARGV)),"/$$2\n"' $^ | grep -vE " > (not|inlined|functions)$$" | sort | uniq | grep -ve "^$$" > $@ > > And of course I'm using Ur/Web daemon (and thinking to try your LSP server > as well). > ___ > Ur mailing list > Ur@impredicative.com > http://www.impredicative.com/cgi-bin/mailman/listinfo/ur > ___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
Re: [Ur] Blogpost
> In case anyone is interested, I wrote a blog post some time ago about my > experiences with Ur/Web. > > http://frigoeu.github.io/urweb1.html Great post. I agree that build times for large projects is perhaps the most annoying thing in Ur/Web. They caused mostly by excessive inlining. To cut them down I'm generating neverInline pragmas for almost all or my functions. Since JavaScript supports functions as values it works very well for frontend (and reduces app.js file size as well). Backend requires polymorphic functions to be inlined but most of them live in standard library so I just don't generate neverInline pragmas for them. Here's pragma generation from my Makefile neverInline.urp: *.ur @perl -n -e 'use File::Basename; $$ARGV =~ s/.ur//; s/\(\*.*\*\)//; /.*( val|^val| fun|^fun) +([^ ()]+)/ && print "neverInline $$2\nneverInline ",ucfirst(basename($$ARGV)),"/$$2\n"' $^ | grep -vE " (not|inlined|functions)$$" | sort | uniq | grep -ve "^$$" > $@ And of course I'm using Ur/Web daemon (and thinking to try your LSP server as well).___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
[Ur] Blogpost
Hi everybody, In case anyone is interested, I wrote a blog post some time ago about my experiences with Ur/Web. http://frigoeu.github.io/urweb1.html Simon ___ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur