[Fri May 31 11:30:04 2013] hi [Sat Jun 8 21:23:27 2013] [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup [Sat Jun 8 21:34:13 2013] [freenode-info] if you're at a conference and other people are having trouble connecting, please mention it to staff: http://freenode.net/faq.shtml#gettinghelp [Thu Jun 27 15:17:21 2013] hello there [Thu Jun 27 15:17:21 2013] hello there [Sun Jun 30 11:30:02 2013] soo I can't compile ur/web because I can't compile MLton .. is there a way to compile ur/web with some other ML compiler? [Sun Jun 30 11:30:02 2013] soo I can't compile ur/web because I can't compile MLton .. is there a way to compile ur/web with some other ML compiler? [Sun Jun 30 14:00:45 2013] I’ve never heard of anyone doing so. It might be easier to just fix the MLton build; what platform are you on? [Sun Jun 30 14:00:45 2013] I’ve never heard of anyone doing so. It might be easier to just fix the MLton build; what platform are you on? [Thu Jul 25 15:29:50 2013] [freenode-info] why register and identify? your IRC nick is how people know you. http://freenode.net/faq.shtml#nicksetup [Mon Jul 29 18:37:12 2013] hi [Mon Jul 29 18:37:12 2013] hi [Mon Jul 29 18:38:34 2013] is there any port of ur to plain old haskell? [Mon Jul 29 18:38:34 2013] is there any port of ur to plain old haskell? [Mon Aug 5 11:22:35 2013] Hi. Does Ur have a single-line comments like -- in Haskell ? [Mon Aug 5 11:59:59 2013] Answering to myself: I've checked basis.ur: looks like (* .. *) is the only option [Sun Sep 1 00:21:53 2013] is the basic philosophy of ur/web something like this: web dev has too much crap: it's bloated and it has security holes. Using ur/web, one (1) has formal guarantee of correctness and (2) gets servers that uses less ram than bash. [Sun Sep 1 00:21:53 2013] is the basic philosophy of ur/web something like this: web dev has too much crap: it's bloated and it has security holes. Using ur/web, one (1) has formal guarantee of correctness and (2) gets servers that uses less ram than bash. [Sun Sep 1 00:27:13 2013] clj_newb_2345: I dunno if I'd put it like that. [Sun Sep 1 00:27:13 2013] clj_newb_2345: I dunno if I'd put it like that. [Sun Sep 1 00:27:55 2013] I think it's something like: "Correct web applications are better constructed using principled meta-programming". [Sun Sep 1 00:27:55 2013] I think it's something like: "Correct web applications are better constructed using principled meta-programming". [Sat Sep 14 03:58:56 2013] Hi [Sun Sep 15 12:23:44 2013] [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup [Mon Oct 21 19:55:16 2013] where does Adam chill these days channel wise :) [Mon Oct 21 19:55:22 2013] Sup Gian! [Fri Nov 1 15:03:06 2013] Does ur/web support HTTP pipelining? [Fri Nov 1 21:21:06 2013] What's the 'rewrite table ...' syntax? 'rewrite table uw_Mod_name Name' doesn't seem to work [Fri Nov 1 22:34:30 2013] (It's 'rewrite table Mod/name Name') [Sat Nov 2 11:25:13 2013] Evidently, I'm using mp wrong (http://sprunge.us/DhOV). Does anyone know the correct usage? [Sat Nov 2 11:42:00 2013] intrados: you want List.mp I think [Sat Nov 2 11:49:25 2013] lightquake: I tried that at one point. It gives me 'Unbound structure List'. (I am very new to Ur/Web) [Sat Nov 2 11:50:13 2013] ah, you need to put 'library $/list' in your .urp file [Sat Nov 2 11:56:38 2013] openIn "/usr/local/lib/urweb/ur/list/lib.urp" failed with SysErr: No such file [Sat Nov 2 11:57:06 2013] (There's a .../ur/list.ur) [Sat Nov 2 12:01:30 2013] try just '$/list'? [Sat Nov 2 12:06:47 2013] Ah, that's it. Thanks [Tue Nov 5 01:24:38 2013] [freenode-info] why register and identify? your IRC nick is how people know you. http://freenode.net/faq.shtml#nicksetup [Thu Nov 7 00:06:16 2013] [freenode-info] channel trolls and no channel staff around to help? please check with freenode support: http://freenode.net/faq.shtml#gettinghelp [Sun Nov 24 14:16:43 2013] [freenode-info] please register your nickname...don't forget to auto-identify! http://freenode.net/faq.shtml#nicksetup [Thu Dec 26 11:55:12 2013] I wish to compile with -static but it says /usr/bin/ld: cannot find -lcrypto, and -lssl [Thu Dec 26 11:55:50 2013] I am running Arch Linux 32-bit and OpenSSL is already installed. Arch Linux doesn't have an additional package for openssl-dev. openssl includes it [Thu Jan 2 10:50:39 2014] Hi, anRch. I notice you have a New England hostname. Do you mind saying where you are? [Thu Jan 23 15:09:52 2014] oh cool, good to see people around - I wasn't sure there would be, given the exotic-ness of Ur. please consider this line both a test to see whether anyone is actually around, and an invitation to say hi :) [Thu Jan 23 15:10:36 2014] I'm writing a small piece of code in Ur, because I really want to try out and get a feel for its row types, and my task appears to be one that will benefit heavily from them… [Thu Jan 23 15:10:42 2014] … so, I'm likely to have questions :) [Thu Jan 23 15:13:06 2014] ahhh yes, dependencies … need to install MLton… okay… [Thu Jan 23 15:14:42 2014] Hey. There don't seem to be many people around, most of the time. I only know a bit of Ur/Web, so I'll probably only be able to help you a bit. [Thu Jan 23 15:14:48 2014] that's cool :) [Thu Jan 23 15:14:56 2014] and pleased to meet you [Thu Jan 23 15:15:10 2014] I'm not using the web features (rather, not intending to) [Thu Jan 23 15:15:30 2014] now I need to think about how to install GMP, a dependency of MLton, such that it won't conflict with my Haskell stuff… haha [Thu Jan 23 15:17:03 2014] okay. since I'm not distributing binaries, I can just install gmp into /usr/local, then install mlton from source (hope it doesn't take too long), and be good… heh [Sun Feb 2 10:50:13 2014] Can anyone explain to me why the generated HTML for the "subforms" example has 4 hidden input fields instead of 1? I don't see in the ur source where 4 could be generated. [Sun Feb 2 19:39:24 2014] [freenode-info] if you're at a conference and other people are having trouble connecting, please mention it to staff: http://freenode.net/faq.shtml#gettinghelp [Sun Feb 2 19:59:01 2014] *** Notice -- TS for #ur changed from 1391387964 to 1233033282 [Sun Feb 2 21:29:11 2014] *** Notice -- TS for #ur changed from 1391394475 to 1233033282 [Sun Feb 2 23:08:45 2014] [freenode-info] why register and identify? your IRC nick is how people know you. http://freenode.net/faq.shtml#nicksetup [Mon Feb 3 00:28:00 2014] [freenode-info] channel trolls and no channel staff around to help? please check with freenode support: http://freenode.net/faq.shtml#gettinghelp [Tue Feb 18 09:34:45 2014] hi! random question: when I see inline SQL in the code... is that properly parsed? I mean is there an SQL grammar written somewhere in a lib that gets called at compile time, etc...? [Tue Feb 18 09:54:48 2014] attila_lendvai: Yes, the syntax of SQL is part of the syntax of the language. You will get compile-time errors if your SQL does not parse, or is otherwise incorrect. [Tue Feb 18 09:54:53 2014] Also, hi! [Tue Feb 18 09:55:19 2014] nice [Sun Mar 30 14:57:06 2014] /? [Wed Apr 16 22:17:00 2014] hi all [Wed Apr 16 22:17:21 2014] please help I got this as install fail http://bpaste.net/show/XJgGv6AR4XiyPqQA9eBb/ [Wed Apr 16 22:49:53 2014] dagnachew: It looks like your gcc can't find your installation of mlton and gdtoa. Perhaps you added them to your path but not LD_RUN_PATH or something? [Wed Apr 16 22:59:50 2014] dagnachew: I can't reproduce. Try reinstalling mlton? What do you get for 'ls /usr/lib/mlton'? [Fri May 2 15:37:55 2014] yo [Fri May 2 15:39:41 2014] congrats on the benchmarks [Fri May 2 15:40:24 2014] does ur use GHC's system f implementation? [Sat May 3 01:06:31 2014] [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup [Tue Jun 3 19:39:12 2014] [freenode-info] why register and identify? your IRC nick is how people know you. http://freenode.net/faq.shtml#nicksetup [Thu Jun 5 22:41:27 2014] Hey, is there a good example of using templates within Ur/Web? [Wed Jun 11 23:57:42 2014] hi! I have a question, is there an easy way to serve static files (like images) from urweb? [Wed Jun 11 23:59:01 2014] I read http://www.impredicative.com/pipermail/ur/2011-June/000638.html and their solution was to use returnBlob, does that mean if I want to serve static content I have to write the code to read the file and serve it and all that, or is there a better way? [Thu Jun 12 00:02:49 2014] I know I can also use an external web server to serve static files but I was hoping for a way to do it in urweb [Sun Jun 15 03:06:45 2014] How do I return a pair of values with the C FFI? [Sun Jun 15 10:22:29 2014] vanila: I think you'll have more luck asking on the mailing list (ur@impredicative.com) than on here [Sun Jun 15 10:23:15 2014] thanks, I think it's impossible [Sun Jun 15 10:23:30 2014] so I will use a workaround for now [Sun Jun 15 10:25:50 2014] I hear someone here had a question! :) [Sun Jun 15 10:27:51 2014] Hi Smerdyakov! [Sun Jun 15 10:27:58 2014] Hi, vanila. [Sun Jun 15 10:28:33 2014] I was wondering if you can return pairs from the C FFI? [Sun Jun 15 10:28:53 2014] I think it's impossible from the manual but I'm not sure [Sun Jun 15 10:29:05 2014] You can return arbitrary C types, but you can't make Ur/Web see them as pairs. [Sun Jun 15 10:29:15 2014] Instead, include extra observer functions on a new abstract type. [Sun Jun 15 10:29:51 2014] okay, that works nicely [Sun Jun 15 10:30:02 2014] I also tried adding a sql_injectible_prim instance for url to the compiler but it failed [Sun Jun 15 10:30:11 2014] do you think that would be an acceptable feature? [Sun Jun 15 10:30:30 2014] it's frustrating that, while I can nicely query url's out of a database - I can't actually insert thme [Sun Jun 15 10:31:54 2014] Sounds benign enough. [Sun Jun 15 10:32:18 2014] I can add it now. [Sun Jun 15 10:32:27 2014] p.s. ur is absolutely fantastic :) [Sun Jun 15 10:34:08 2014] Thanks! What are you doing with it? [Sun Jun 15 10:34:55 2014] I'm making a site that let's you tag and organize images [Sun Jun 15 10:35:13 2014] I might also make some discussion board [Sun Jun 15 10:39:18 2014] Cool. Might I know you by another name? [Sun Jun 15 10:42:26 2014] I don't think so [Sun Jun 15 10:45:36 2014] (I'm making a white sauce just now which requires a lot of care so excuse my late responses) [Sun Jun 15 10:49:18 2014] Do you have a web site? [Sun Jun 15 10:49:35 2014] no i dont [Sun Jun 15 10:49:37 2014] OK, the working version of Ur/Web in Mercurial will now do SQL injection of URLs. [Sun Jun 15 10:49:53 2014] super! Thanks a lot [Sun Jun 15 10:50:00 2014] Do you have a Github account or something else that generates info on your projects? [Sun Jun 15 10:52:53 2014] I think I will create one and send you a link when this stuff reaches release if you'd like [Sun Jun 15 10:54:48 2014] Sounds good. Special bonus points if the release is by the end of the month, so I can include it in a list of Ur/Web applications in a paper I'm planning to submit! [Sun Jun 15 10:55:16 2014] oh boy I better get my nose to the grindstone :) [Sun Jun 15 12:41:35 2014] I'm having a problem with the FFI, if I define an abstract type foo and then try to return option foo I get "initialization from incompatible pointer type" [Sun Jun 15 12:42:10 2014] Is that just me doing something wrong, should I make a test-case? [Sun Jun 15 12:47:42 2014] http://pastebin.com/raw.php?i=Wr5qhdDZ this is the problem [Sun Jun 15 12:48:24 2014] option is fine with primitive types though [Sun Jun 15 13:08:22 2014] The correctness of that code depends on the definition of the type in C, I think. [Sun Jun 15 13:08:24 2014] What's the definition? [Sun Jun 15 13:09:26 2014] this is modifying the mail example: so we have typedef struct headers *uw_Mail_headers; [Sun Jun 15 13:09:28 2014] Oh, also, the FFI .urs code says this is a constant value, whereas in C you've defined it as a function. [Sun Jun 15 13:09:50 2014] OK, so I think the type is correct. It's just the function-vs.-not business tripping things up. [Sun Jun 15 13:10:07 2014] oh oops, I got the exact same error when I had it as a function - that was an extra problem I introduced in making a short test-case [Sun Jun 15 13:11:47 2014] I just fixed the testcase to use val fail : string -> option headers and confirmed it gives the same error [Sun Jun 15 13:11:59 2014] oops [Sun Jun 15 13:12:10 2014] The problem here comes from the not-so-clever rule to decide how to represent [option] types. [Sun Jun 15 13:12:30 2014] There is different behavior depending on whether the argument type can be confirmed to not already be using NULL. [Sun Jun 15 13:12:41 2014] The compiler assumes any abstract FFI type might be using NULL. [Sun Jun 15 13:12:55 2014] Thus, you need to add an extra layer of pointerness. [Sun Jun 15 13:13:13 2014] (Return type 'uw_Mail_headers*' instead of 'uw_Mail_headers') [Sun Jun 15 13:13:52 2014] ah, I would not have expected that to work! [Sun Jun 15 13:14:00 2014] that's great though [Sun Jun 15 13:14:44 2014] also my page is saying "Fatal error: pattern match failure" [Sun Jun 15 13:15:09 2014] (unrelated to this option stuff) [Sun Jun 15 13:15:16 2014] But related to other FFI work? [Sun Jun 15 13:15:22 2014] yes [Sun Jun 15 13:16:56 2014] You're probably breaking the representation invariant of a type, in a value returned to Ur/Web code. [Sun Jun 15 13:17:15 2014] That particular error message indicates a bug in the compiler or FFI code. [Sun Jun 15 13:18:50 2014] What leads you to to be writing so much FFI code? [Sun Jun 15 13:18:54 2014] oh I'm sorry that was just my fault [Sun Jun 15 13:19:43 2014] oh it's just a single function (plus projections) actually, I just hit more problems with that than other parts of Ur [Sun Jun 15 13:19:55 2014] What's the purpose of your function? [Sun Jun 15 13:20:03 2014] You're not going to like it.. [Sun Jun 15 13:20:20 2014] I'm storing images in the filesystem [Sun Jun 15 13:20:54 2014] Why? [Sun Jun 15 13:22:33 2014] it's just nice to have them stored in the filesystem [Sun Jun 15 13:22:50 2014] I think it's the right way to do this [Sun Jun 15 13:23:49 2014] and now that I can use option it works very nicely too [Sun Jun 15 13:24:23 2014] What does "right" mean? [Sun Jun 15 13:24:42 2014] Your code is more complicated than if you stored images in the database, right? [Sun Jun 15 13:25:12 2014] That's true but only because Ur doesn't have support for saving things to the filesystem! [Sun Jun 15 13:27:00 2014] I don't understand. [Sun Jun 15 13:27:00 2014] Should I explain roughly the way the site works? [Sun Jun 15 13:27:13 2014] Why would filesystem access be simpler than relational database access? [Sun Jun 15 13:27:34 2014] I'm interested in explanation to the extent that it answers my last question. [Sun Jun 15 13:27:36 2014] It's not simpler but images are files and it's desirable to have them all in a directory [Sun Jun 15 13:27:55 2014] Why is that desirable? And what do you mean by "file" such that "images are files" makes logical sense? [Sun Jun 15 13:28:50 2014] I knew you weren't going to like this :( [Sun Jun 15 13:29:24 2014] I'm genuinely interested in a rationale for wanting to use a gnarlier persistent data interface instead of a simpler one. [Sun Jun 15 13:30:46 2014] I strongly object to assuming that there is a consistent concept of "file" such that an "image" is fundamentally a "file". [Sun Jun 15 13:30:57 2014] An image is a matrix of color values. [Sun Jun 15 13:32:28 2014] Well there are no examples of serving an image with urweb (except demo/upload), we decided rather making the ur server send blobs to use nginx to serve images and proxies other requests through to the urweb server [Sun Jun 15 13:35:47 2014] Hm. Are you saying that demo doesn't provide explain enough for you to see how to follow a database-based approach? [Sun Jun 15 13:36:37 2014] I think it's likely that you are just used to thinking of various aspects of "files" as being inherently complex. Not seeing such complexity in Ur/Web examples and documentation, you assume you must be missing something, which would be too much work to learn. However, it actually really is dead simple. You pass files around as first-class values, etc. [Sun Jun 15 13:37:22 2014] I can't think of a single aspect of the related features that isn't demonstrated in that demo. What else would be essential to see? [Sun Jun 15 13:37:58 2014] not exactly, I could see how to do it but it feels wrong for a couple reasons: Why do I have to write a special function that makes urweb serve the blob? and I just don't want to put large unreadable data into the SQL database [Sun Jun 15 13:38:22 2014] Why don't you want to put large, unreadable data into the SQL database? [Sun Jun 15 13:39:31 2014] it'll keep the size of the database down, keep it human readable and storing the images on the filesystem means I can easily access them without having to boot the webserver or manually extract them [Sun Jun 15 13:40:07 2014] Doesn't that general argument tell us all the state of a system, including private state of library components, should be one big JSON file? [Sun Jun 15 13:40:11 2014] That way lies JavaScript. [Sun Jun 15 13:40:30 2014] Of course it's nice to have ways to introspect into the state of a system. [Sun Jun 15 13:40:47 2014] But that doesn't mean such introspection should be more important than modularity in designing the system. [Sun Jun 15 13:41:17 2014] As to "why should I have to write a special function?", consider this analogous question: [Sun Jun 15 13:41:36 2014] Joe JavaScript programmer asks, "why should I have to write a getter method to let client code read from this field of my library class?". [Sun Jun 15 13:42:01 2014] The right answer: "It is a _good_ thing to have to write explicit code to allow your data to be accessed in new ways. It supports modularity." [Sun Jun 15 13:42:32 2014] Your Nginx configuration would be entirely analogous to an Ur/Web function, but more ad-hoc! [Sun Jun 15 13:43:03 2014] Also, serving images within Ur/Web means that the compiler can do static-checking of more connections within your application. [Sun Jun 15 13:43:15 2014] Moving application pieces outside of Ur/Web means the compiler doesn't understand their interfaces as well. [Sun Jun 15 13:43:38 2014] To be more explicit, with the approach I'm suggesting, you get static checking of the intra-application links to images. [Sun Jun 15 13:44:26 2014] You know you're absolutely right, I should just stick the images in the db - it simplifies a lot of things.. but I still want then all stored locally (and it forces to me generate thumbnails using the C FFI rather than just a system call) [Sun Jun 15 13:46:33 2014] You'd need to use the C FFI to make a UNIX system call, too. ;) [Sun Jun 15 13:47:18 2014] oh I just mean it's a heck of a lot easier to call system "convert -various -args" than figure out how to do the same with the C API [Sun Jun 15 13:47:30 2014] It should only take a few lines of C code to start ImageMagick or whatever, print the image to it, and read the result. [Sun Jun 15 13:48:05 2014] Or maybe use a C library version of it. That would be the nicest, I bet. [Sun Jun 15 13:48:16 2014] yeah you know what I'm just going to change to doing it that way, it's better [Sun Jun 15 13:48:44 2014] Filesystems are an awful, awful idea, man. ;) [Sun Jun 15 13:51:15 2014] do you mean that beyond just web stuff? I don't think you could really have an operating system without a file system [Sun Jun 15 13:52:02 2014] Trees of mappings of strings to strings; just a bad interface to build a software platform on. [Sun Jun 15 13:56:39 2014] My friend, who I'm working on this with, is going to be really miffed when they see I've stripped all the filesystem stuff out :) [Sun Jun 15 14:00:16 2014] Well, your friend should be happy to see a simpler design. :) [Sun Jun 15 14:03:07 2014] I have a question though, If I am taking nginx out of this entirely then what am I supposed to do about css? [Sun Jun 15 14:03:08 2014] (I think it would be nice if you feed some static files to urweb, like css and favicons and such) [Sun Jun 15 14:03:27 2014] I recommend using a static web server for those. [Sun Jun 15 14:03:46 2014] But enough people are asking that I'm strongly considering adding support for static file-serving to the HTTP servers output by 'urweb'. [Sun Jun 15 14:03:57 2014] Even then, I would recommend an established web server for production use. [Sun Jun 15 14:04:41 2014] well wait a second [Sun Jun 15 14:05:08 2014] If I'm serving static content like css with a webserver, it seems natural to serve the images that way too [Sun Jun 15 14:05:28 2014] are you sure that isn't the better way to do this? [Sun Jun 15 14:05:31 2014] I disagree. The crucial difference is that your application changes the set of available images during execution. [Sun Jun 15 14:06:10 2014] Think about the transactional semantics of filesystem access. You don't want to need to consider concurrency, with multiple requests handled simultaneously. [Sun Jun 15 14:06:20 2014] only in a very simple monotonic way [Sun Jun 15 14:06:20 2014] the main thing that is updated and changed is the list of tags that are associated [Sun Jun 15 14:07:20 2014] What happens when two users upload the same file simultaneously? [Sun Jun 15 14:07:24 2014] fair enough! I understand - for now I think I'll just inline my .css file as a string. Ugly but taking nginx out the loop is very nice [Sun Jun 15 14:08:08 2014] before being stored we calculated a hash, and if the file exists already we just return it instead of writing it to disk again [Sun Jun 15 14:08:27 2014] so - I hadn't considered this actually: [Sun Jun 15 14:09:04 2014] the second uploader will probably receive the page saying "successful upload" before the file has been fully uploaded to disk [Sun Jun 15 14:09:20 2014] Also, what happens if the web server crashes while you're saving a file? [Sun Jun 15 14:09:34 2014] Do you want to implement your own specialized inconsistent-state detection and recovery? [Sun Jun 15 14:09:40 2014] Any respectable SQL server will just do it for you. [Sun Jun 15 14:10:12 2014] very nice! [Sun Jun 15 14:10:27 2014] Ur/Web overall provides the ACID transactional abstraction. [Sun Jun 15 14:10:46 2014] Every page request seems to be served instantaneously, as an all-or-nothing affair. [Sun Jun 15 14:10:58 2014] You use the FFI at your own peril, since it becomes possible to break the nice abstraction. [Sun Jun 15 14:11:08 2014] I'm really happy that you took the time to convince me and explain this, I think the quality of this software just improved significantly [Sun Jun 15 14:14:24 2014] :) [Sun Jun 15 14:20:05 2014] vanila, are you on the ur mailing list? [Sun Jun 15 14:20:34 2014] no, I've read through it though [Sun Jun 15 14:21:31 2014] Would you mind sending me some information on how to get in touch with you, so I can check on the status of your app(s) before submitting the paper I'm writing? [Sun Jun 15 14:21:43 2014] well not all of it.. [Sun Jun 15 14:22:10 2014] sure just a se [Sun Jun 15 14:22:12 2014] sec [Sun Jun 15 14:25:55 2014] Oh, I've just had the most diabolical idea. I'll benchmark Apache vs. Ur/Web, serving image files. :) [Sun Jun 15 14:29:58 2014] Hehe. For my 10k image, Apache is 100X faster... but Ur/Web is still serving about 500 requests per second. [Tue Jun 17 09:30:52 2014] would anyone like to bug report for me? my email is "invalid" according to http://www.impredicative.com/mantis/signup.php [Tue Jun 17 09:32:19 2014] I'm also kind of stuck with generating dynamic queries, not sure whether I should go into to detail or not [Tue Jun 17 09:35:49 2014] the bug is http://www.impredicative.com/ur/demo/Demo/ListShop/SL/main if you enter something and then reload the url, it fails [Fri Jun 20 08:01:35 2014] Does anyone know how to do dynamic SQL queries in Ur/Web? [Fri Jun 20 08:01:48 2014] We've come up with a solution, but it's not pretty.. [Fri Jun 20 08:02:25 2014] (i.e. using sql_query and sql_query1 to build it manually) [Fri Jun 20 08:03:25 2014] currently we're just hard coding n*m queries, but for a new feature we'd need to hard code n*m*2 and it's just getting out of hand [Fri Jun 20 08:04:59 2014] The closest I've found to an example of this is CRUD [Mon Jun 23 05:15:35 2014] http://www.impredicative.com/pipermail/ur/2014-June/001703.html [Mon Jun 23 05:15:47 2014] does anyone have thoughts on this? [Wed Jun 25 11:09:21 2014] hi [Wed Jun 25 11:11:57 2014] hi, vanila [Wed Jun 25 11:13:08 2014] I've been stuck with dynamic queries in ur [Wed Jun 25 11:13:19 2014] i wonder if there's any examples around? [Wed Jun 25 17:10:32 2014] http://www.impredicative.com/pipermail/ur/2014-June/001704.html [Wed Jun 25 17:10:38 2014] :D [Fri Jun 27 08:35:29 2014] So what is everyone using ur for? :) [Sat Jun 28 04:23:29 2014] wow [Sat Jun 28 04:23:57 2014] http://www.impredicative.com/pipermail/ur/2014-June/001705.html [Sat Jun 28 04:24:02 2014] This is a really bad idea! [Sat Jun 28 08:16:05 2014] Why is this a bad idea? [Sat Jun 28 08:17:34 2014] You mean the example that (probably?) lets you do process injection(?) attacks? [Sat Jun 28 08:17:41 2014] yes [Sat Jun 28 08:18:37 2014] more specifically, [Sat Jun 28 08:20:12 2014] s <- C.checkString (String.all (fn c => Char.isAlnum c || #"." = c)) frm.IP; [Sat Jun 28 08:20:12 2014] jr <- C.create (C.shellCommand (cmd ^ " " ^ s)); [Sat Jun 28 08:20:30 2014] This is demo2 which he's running, and there's no injection so it's all secure and fine [Sat Jun 28 08:21:05 2014] but 's' the checkedString has the same type as frm.IP, the unverified user input [Sat Jun 28 08:21:44 2014] This has been a huge huge problem in PHP with people using passthru and similar functions [Sat Jun 28 08:22:44 2014] I wonder if there's a way to make process injection attacks impossible in the same way that sql injections are impossible [Sat Jun 28 08:25:51 2014] If I'm reading the Arguments API (readme at https://github.com/grwlf/urweb-callback) correctly, one invocation of shellCommand should only let you run a single process, ever? [Sat Jun 28 08:26:47 2014] C.create (C.shellCommand "echo $(ls)"); perfoms ls, for example [Sat Jun 28 08:27:27 2014] Ah, right. [Sat Jun 28 08:28:49 2014] Wait, have you tested this? Not having read the code yet, it seems plausible that it could single-quote the arguments rather than double quoting them. [Sat Jun 28 08:29:01 2014] yes [Sat Jun 28 08:33:50 2014] Does execv(cmd, argv) actually do ... parameter substitution? shell-expansion? whatever $() is called on its arguments? [Mon Jun 30 13:56:11 2014] hi :D [Mon Jun 30 13:56:17 2014] hiya :) [Mon Jun 30 13:58:29 2014] me and my friend have been working on a cool project in ur and thought maybe you guys would like to hear about it! [Mon Jun 30 13:58:54 2014] its called Gallury and we put it on github here https://github.com/yuuko273/Gallury [Wed Jul 2 07:25:16 2014] http://www.impredicative.com/wiki/index.php/Special:RecentChanges ummm [Wed Jul 2 07:25:40 2014] I did not realize Ur was so popular [Thu Jul 3 18:58:24 2014] I'm really stuck, any idea why this is not working? [Thu Jul 3 18:58:38 2014] val push x = id <- nextval seq; [Thu Jul 3 18:58:38 2014] dml (INSERT INTO tab (Id, Value) VALUES ({[id]}, {[x]})) [Thu Jul 3 18:58:49 2014] it's giving me: stack.ur:9:5: (to 9:57) This is an expression but not a pattern. [Thu Jul 3 19:26:41 2014] I solved it ! [Thu Jul 3 19:26:48 2014] deleted everything and rewrote it slower [Wed Jul 16 14:43:32 2014] hi urrurs [Wed Jul 16 14:43:46 2014] what's everying urring recently [Wed Jul 16 14:43:50 2014] I'm making a wiki [Wed Jul 16 14:44:33 2014] I think Adam collected a list from people on the mailing list semi-recently? You could ask him for his list. [Wed Jul 16 14:44:56 2014] oh yeah! [Thu Jul 17 10:23:41 2014] hello [Thu Jul 17 10:23:44 2014] how do you do infix operators [Thu Jul 17 10:25:02 2014] how do you do infix operators? [Thu Jul 17 12:49:07 2014] how do you define new infix operators? [Thu Jul 17 13:20:15 2014] vanila: The existing operators seem to be hardcoded into the grammar in urweb/src/urweb.grm, so I suspect it's not possible. [Thu Jul 17 13:35:04 2014] ahh thank you very much , i guess it would be stop people using my lib if i added new ones to the compiler.. hmm [Thu Jul 17 13:35:12 2014] I want +++ for readp and <|> for parsec [Thu Jul 17 14:01:16 2014] is it possible to autogenerate a .urs file form a .ur file? [Fri Jul 18 08:41:13 2014] hello [Fri Jul 18 08:42:08 2014] http://www.impredicative.com/pipermail/ur/2014-July/001715.html [Fri Jul 18 08:42:18 2014] does anyone have thoughts about this? [Fri Jul 18 08:42:36 2014] seems like urweb is not ready for combinator parser libs? [Fri Jul 18 09:00:03 2014] I'm traveling now and don't have much time to look into details, but it [Fri Jul 18 09:00:04 2014] is /expected/ that Ur/Web programs that are moderately higher-order (on [Fri Jul 18 09:00:04 2014] the server side) will often fail to compile. It may not be possible to [Fri Jul 18 09:00:04 2014] use parser combinators on the server side, though it should be fine in [Fri Jul 18 09:00:04 2014] client code. I'll hope to look at your test case next week. [Fri Jul 18 10:12:30 2014] this is a real shame! [Fri Jul 18 10:12:40 2014] am I missing something or is that a big letdown? [Fri Jul 18 11:21:12 2014] has anyone tried nontrivial parsing in ur/web? what did you do? [Fri Jul 18 11:21:29 2014] I'm considering getting an SML parser generator and seeing it ur will build its output [Fri Jul 18 11:24:32 2014] has anyone tried nontrivial parsing in ur/web? what did you do? [Fri Jul 18 11:24:33 2014] I'm considering getting an SML parser generator and seeing it ur will build its output [Fri Jul 18 12:03:15 2014] SML parser stuff is not going well :S [Fri Jul 18 14:23:28 2014] hey, looking at trying out ur/web, but can't get it to compile on osx [Fri Jul 18 14:24:03 2014] it seems to be looking for gmp at /opt/local/lib/ but I have it installed at /usr/local/lib [Fri Jul 18 14:24:18 2014] I might be able to get past the issue by symlinking, but not sure if that will cause issues at runtime [Fri Jul 18 14:24:48 2014] anyone else seen this? any tips on customizing the installation directory for gmp? couldn't find much referirng to it in the build scripts [Sat Jul 19 12:38:22 2014] hi [Sat Jul 19 12:38:57 2014] has anyone done parsing in ur? [Sun Jul 20 10:01:16 2014] hi [Sun Jul 20 18:17:30 2014] vanila: hi [Tue Jul 22 20:11:41 2014] hello [Tue Jul 22 20:26:51 2014] does Ur have GADTs? [Tue Jul 22 20:38:05 2014] I don't think I can use Ur :(( [Wed Jul 23 04:41:56 2014] vanila: Why don't you think you can use Ur? [Sat Jul 26 12:38:41 2014] under what conditions does Smerdyakov appear? [Sat Jul 26 20:26:47 2014] vanila: When I or someone else summons him by email or other methods. [Sat Aug 2 17:04:02 2014] http://web.mit.edu/jgross/zlog/irc/freenode:#ur [Sat Aug 2 17:04:16 2014] it's great that there are logs of Ur, but as freenode policy please include this link in the topic [Sat Aug 2 18:01:21 2014] I don't have control over the topic, and/or don't know how to set it. I can make my personal logs private and not world-readable, if you'd prefer. [Sat Aug 2 18:01:41 2014] (Or if you know how to change the topic, you can update it to mention them.) [Sat Aug 2 18:02:40 2014] We just need Smerdyakov to add the link, it's nice to have the logs available - please don't remove them just from what I said! [Sat Aug 2 18:16:31 2014] I've sent him an email asking him to do so. [Sat Aug 2 18:16:56 2014] ok! [Sat Aug 2 18:17:07 2014] Also, vanila, you never answered my question about what made you say "I don't think I can use Ur :((" [Sat Aug 2 18:17:09 2014] unrelated: I just got wiki markup working in my ur-wiki [Sat Aug 2 18:17:18 2014] oh I didn't see that sorry! [Sat Aug 2 18:17:22 2014] congrats! [Sat Aug 2 18:17:24 2014] It was because I couldn't use parser combinators [Sat Aug 2 18:17:38 2014] I ended up writing a translator from prolog DCG into Ur, with an interpreter - which works [Sat Aug 2 18:17:58 2014] but then adam also improved his compiler so that our parser combinator library works [Sat Aug 2 18:18:13 2014] *nods* What's DCG? [Sat Aug 2 18:18:23 2014] and in the end I realized that I only actually need to do tokenization, then things like bbcode and wiki markup are very easy to implement directly [Sat Aug 2 18:18:39 2014] in prolog you can write rule --> [a], [b], other, rules, here, [c]. [Sat Aug 2 18:18:46 2014] and it lets you easily write parsers [Sat Aug 2 18:19:03 2014] this would be similar to rule ::= 'a' 'b' other rules here 'c' [Sat Aug 2 18:19:26 2014] that was just a quick way to get parsing working in Ur, because I knew how to implement a DCG interpreter without using higher order functions [Sat Aug 2 18:20:24 2014] *nods* [Sat Aug 2 18:22:15 2014] about to release pkbdf2 library for secure password hashing [Sat Aug 2 18:22:47 2014] just adding the test vectors [Sat Aug 2 18:30:03 2014] vanila: Is this an ur/web library? (Are you going to announce it on the mailing list?) [Sat Aug 2 18:30:34 2014] yes [Sat Aug 2 18:43:54 2014] I didn't post to the ML though [Sat Aug 2 18:45:36 2014] https://github.com/enn/ur-pbkdf2/tree/master [Sat Aug 2 18:45:38 2014] i wonder if i should [Sat Aug 2 18:45:54 2014] it is for a BBS someone is writing, it hasn't been put to use yet - so I might wait before posting to the ML [Sat Aug 2 18:46:12 2014] I will probably use it in my wiki too if I add support for user accounts [Sat Aug 2 19:02:32 2014] I think Adam, at least, is always interested in knowing what users are doing. I think it's certainly worth emailing him, and probably worth emailing the list, too. [Sat Aug 2 19:03:38 2014] it might be good to replace crypt in Basis with this [Sun Aug 3 10:30:43 2014] https://github.com/idris-hackers/IdrisWeb thoughts?? [Sun Aug 3 10:44:35 2014] http://eb.host.cs.st-andrews.ac.uk/drafts/ifl2013.pdf [Thu Aug 7 16:31:58 2014] I'm new to urweb and trying to better understand the XML dsl, is it really just HTML, or are there special tags/attributes etc added that are just for urweb? [Thu Aug 7 16:33:48 2014] It's a distinct XML dialect [Thu Aug 7 16:33:54 2014] it gets translated to XHTML though [Thu Aug 7 16:34:16 2014] there is a special tag, for example - that lets you do dynamic things with channels.. and that gets compiled into javascript [Thu Aug 7 16:41:09 2014] k, I was getting that sense [Thu Aug 7 16:41:18 2014] is there any documentation about the special tags [Thu Aug 7 16:41:42 2014] things like the for example? [Thu Aug 7 16:42:44 2014] no [Thu Aug 7 16:44:34 2014] k, guess I'll just search through source code! [Thu Aug 7 16:46:12 2014] I've been searching through the demo and test code to find out examples of tags (yes.. this isn't optimal) [Thu Aug 7 16:49:22 2014] right [Thu Aug 7 16:50:26 2014] by the way, I think the different single letter prefixes to textbox and other tags like that are related to the type of form they go inside [Thu Aug 7 16:50:33 2014] (this might be completely wrong though) [Thu Aug 7 16:50:57 2014] hm this documentation thing might be worth asking the author about.. [Thu Aug 7 16:51:30 2014] oh, cool, hadn't realized that [Thu Aug 7 16:56:28 2014] thanks [Thu Aug 7 16:59:09 2014] no problem, I'll help with any ur stuff I can :) [Thu Aug 7 16:59:16 2014] it's a really fun language [Fri Aug 8 16:19:01 2014] I'm embarking on my first Ur/Web project and I'm curious about the options for deployment [Fri Aug 8 16:19:42 2014] I'm basically looking for the easiest, cheapest way to get started and I don't have my own dedicated machine [Fri Aug 8 16:20:33 2014] no real scale or performance concerns at this point, I'm just not sure what I should look for in an online host to deploy an Ur/Web app [Fri Aug 8 16:22:57 2014] well it Urweb compiles into C which get built into a binary which you can use as a web server [Fri Aug 8 16:23:16 2014] it's probably more usual to run a normal webserver like nginx and connect it to the urweb process though [Fri Aug 8 16:25:16 2014] ok [Fri Aug 8 16:25:53 2014] it might be worth asking on the mailing list what providers people have sucessfully installed urweb on [Fri Aug 8 16:26:07 2014] that makes it sound like I'll need more configuration control over my deployment box than some of the standard services (ie Heroku) provide [Fri Aug 8 16:26:20 2014] yeah [Fri Aug 15 10:48:55 2014] Can urweb run in bsd? [Sat Aug 23 11:04:51 2014] hi Smerdyakov :) [Sat Aug 23 11:04:58 2014] Hi! [Sat Aug 23 11:05:08 2014] How are you! [Sat Aug 23 11:07:41 2014] Fine, thanks. [Sat Aug 23 11:08:50 2014] I should have responded to you on the ML about the stuff but I didn't want to write too much on there that isn't relevant to other people [Sat Aug 23 11:23:56 2014] oh [Sat Aug 23 11:24:22 2014] I wrote an module that might be useful for cryptographic hashing of password etc. [Sat Aug 23 11:25:43 2014] vanila, did you see Basis.crypt? [Sat Aug 23 11:25:45 2014] https://github.com/enn/ur-pbkdf2 [Sat Aug 23 11:26:00 2014] yeah but I don't think that's as secure [Sat Aug 23 11:26:15 2014] In general, it's a really bad sign if your application deals with passwords. [Sat Aug 23 11:26:29 2014] Why not use OpenID? [Sat Aug 23 11:26:40 2014] yeah openid is cool too :) [Sat Aug 23 11:46:49 2014] Smerdyakov, if you're busy can i ask your advice on something in PM? [Sat Aug 23 11:46:54 2014] I mean if you're not busy [Sat Aug 23 11:46:58 2014] You can ask. :) [Sat Aug 23 11:47:16 2014] thanks [Sat Aug 30 10:13:47 2014] Smerdyakov, an urweb discussion came up in another channel and someone said something i thought might be interesting to you [Sat Aug 30 10:14:06 2014] they said that Ur/Web is only good for making websites - or something like that [Sat Aug 30 10:14:58 2014] OK. Whether or not I agree depends on the meaning of "making websites." [Sat Aug 30 10:15:14 2014] I didn't explain it well because I lost their quote [Sat Aug 30 10:16:07 2014] but basically I think that it might be limiting if you can only emit HTML pages, since modern websites often also serve XML based "APIs" - and I imagine that admins need server side tools that interact with the DB [Sat Aug 30 10:16:36 2014] Ur/Web supports returning arbitrary types of documents. [Sat Aug 30 10:16:58 2014] But the compiler's static understanding is best for HTML. [Sat Aug 30 10:17:27 2014] just out of curiosity would you be able to make an XML API alongside a site? [Sat Aug 30 10:17:33 2014] Yes. [Sat Aug 30 10:17:37 2014] ahh darn [Sat Aug 30 10:17:44 2014] I wish I had known this to tell them then [Sat Aug 30 10:18:02 2014] that's cool though! [Sat Aug 30 10:18:07 2014] It's probably more pleasant to use JSON instead of XML, though. [Sun Sep 7 09:08:21 2014] I have some variables I want to set each month for running Ur/Web applicatins. I can put those in a database, but doing a database lookup for something which almost never changes seems like a waste. Is there some global variable mechanism which actually works for this usecase? [Sun Sep 7 09:08:46 2014] Recompiling the application each time a configuration change is done is also not practical. [Mon Nov 17 04:35:05 2014] Hey, could someone tell me about how Ur/Web manages to generate code without garbage collection? [Mon Nov 17 11:51:11 2014] Hi guys! [Mon Nov 17 11:51:15 2014] how's the Ur/webbing! [Wed Nov 19 21:04:20 2014] Hey, could someone tell me about how Ur/Web manages to generate code without garbage collection? [Wed Nov 19 21:04:31 2014] I’m really interested and I didn’t get any responses last time. [Wed Nov 19 21:05:21 2014] hello [Wed Nov 19 21:05:39 2014] ur/web uses a clever technique of allocating a "page" of memory to use for a given request [Wed Nov 19 21:05:51 2014] if it's too small it reverts the transactions performed and allocates a larger page [Wed Nov 19 21:05:59 2014] once the request is filled it can free that whole chunk at once [Wed Nov 19 21:06:52 2014] you could think of this a a form of GC, but its much simpler than normal algorithms that trace the entire pointer tree [Wed Nov 19 21:15:00 2014] Is the memory management done explicitly using the Ur language? [Wed Nov 19 21:15:19 2014] no [Wed Nov 19 21:15:32 2014] the compiler produces code that performs all this [Wed Nov 19 21:16:03 2014] Ah, okay. Does this only work with Ur/Web or anything that you could write in Ur? [Wed Nov 19 21:16:05 2014] if you write language extensions in C you will have to allocate memory explicitly, but it is freed for you by this mechanism [Wed Nov 19 21:16:22 2014] Ur is just a concept really, Ur/Web is the only Ur based language so it's hard to say [Fri Nov 21 20:01:51 2014] any interested in Gophur/Web [Fri Nov 21 20:02:05 2014] something like Ur but for making gopher sites [Thu Nov 27 04:16:46 2014] Is it possible to turn an url into a string? Eg when forwarding the user to a foreign payment service then you often have to pass success/failure urls to which will be used by the payment service to guide the user back to your side. [Thu Nov 27 18:59:42 2014] As an experiment, I'm exploring the possibility of using non-relational storage with Ur/Web, in particular, I'm curious about the more functional/immutable dbs like Datomic and the Event Store [Thu Nov 27 19:01:08 2014] I don't know how deeply the compiler is married to SQL, but I'm just trying to think about how one would integrate something else in its place. Another possibility of interest would be something like Acid-State from the Haskell world [Thu Nov 27 19:02:27 2014] I don't know if the Ur type system is powerful enough to do all the stuff they do with template-Haskell over there [Thu Nov 27 22:20:27 2014] that sounds quite difficult [Thu Nov 27 22:21:07 2014] but you will probably get better answers if you ask on the mailing list, Adam and Sergey might be able to tell you a bit more [Thu Nov 27 22:22:39 2014] great, I'll do some more of my own research and see if I can get an intelligent question together [Thu Nov 27 22:22:56 2014] I've never dug into the compiler, in part because I don't know SML [Sun Dec 14 00:21:58 2014] hey does anyone know where the documentation for the standard library lives? The tutorial talks about a lot of web stuff, but I'm wondering about things like file IO, data structures, more "general programming" stuff. [Sun Dec 14 02:57:24 2014] I'm not sure there is much documentation beyond the tutorial and the reference manual at http://www.impredicative.com/ur/resources.html. [Fri Dec 19 20:48:10 2014] Hello everybody, I'm here because the tutorial told me so. [Fri Dec 19 20:49:09 2014] I shall proceed to outputting stupid questions at some later point [Fri Dec 19 21:31:33 2014] hehe [Fri Dec 19 21:31:38 2014] feel free to ask us anything! [Fri Dec 19 21:32:07 2014] this isn't a terribly active channel so you might have to wait a bit but ill try to check in here a bit [Sat Dec 20 14:31:37 2014] Are there some examples how to structure a clean and beautiful project with Ur/Web? [Sat Dec 20 14:32:40 2014] The examples I find en impredicative.com seem to present more the language features and individual tricks how to get things done [Sat Dec 20 14:33:40 2014] But are almost scary to read as they basically just mash everything together HTML, SQL and Ur constructs all intermingled [Sat Dec 20 14:34:54 2014] I mean I know it is all just Ur, but parts of Ur modelled after HTML and SQL mixed with the rest [Sat Dec 20 14:39:23 2014] I'm sure that with more studying it will become clear how to structure bigger projects, but I just thought if somebody would have a ready example I might skip doing my own thinking :) [Sat Dec 20 14:39:58 2014] (I'm an engineer, not a scientist :) [Sat Dec 20 15:09:14 2014] Ah, at least one of the bigger projects has public sources [Sat Dec 20 15:09:30 2014] bazqux [Sat Dec 20 15:09:44 2014] I guess that will do for the beginning [Sat Dec 20 19:22:40 2014] Did I understand correctly that at the moment there is support for only HTTP GET and POST? [Sat Dec 20 19:23:06 2014] No funky methods or websockets etc.? [Sat Dec 20 19:27:20 2014] I'm just wondering because I suppose the communcation protocol between Ur/Web client and server code could provide a public API of the site as well [Sat Dec 20 19:28:50 2014] And the client could presumably be non-Ur one too [Sat Dec 20 19:31:19 2014] An API that allows the users to write their own client instead of being tyrannically forced to the one provided by the developers seems to be very important to some people on the site that I have in mind rewriting... [Sun Dec 21 16:58:18 2014] More stupid questions coming up :) [Sun Dec 21 16:58:24 2014] hi! [Sun Dec 21 16:59:31 2014] So I was reading through the basqux source a bit and it actually seems to use a similar style to the examples on the impredicative.com [Sun Dec 21 16:59:59 2014] This leads me to question my own habits then. [Sun Dec 21 17:00:27 2014] are you writing something in ur/web? [Sun Dec 21 17:00:34 2014] or just don't like this style [Sun Dec 21 17:00:49 2014] No, I am just trying to get used to Ur [Sun Dec 21 17:00:58 2014] alright! [Sun Dec 21 17:01:00 2014] Since four days now [Sun Dec 21 17:01:35 2014] I think ur/web is quite hard to get into - but after that you can be very productive with it [Sun Dec 21 17:01:45 2014] thats my experience [Sun Dec 21 17:02:29 2014] What I was thinking now was the style of mixing xml, sql and code [Sun Dec 21 17:02:43 2014] oh right [Sun Dec 21 17:03:02 2014] I was always taught that this is the ultimate evil that will invite destruction and other bad things [Sun Dec 21 17:03:09 2014] its actually the opposite! [Sun Dec 21 17:03:14 2014] well [Sun Dec 21 17:03:15 2014] But here people seem to talk about it as a good thing [Sun Dec 21 17:03:21 2014] it's a little bit of a complex situation [Sun Dec 21 17:04:10 2014] in something like PHP a lot of the time people would write SQL queries into it as a string [Sun Dec 21 17:04:22 2014] I can actually see how that would reduce the complexity of some of my projects [Sun Dec 21 17:04:36 2014] and this is really dangerous because if you aren't very careful you might not quote a string properly or something, and have a sql injection bug in your site [Sun Dec 21 17:04:50 2014] but the way urweb works is that you aren't just writing a SQL query as a string [Sun Dec 21 17:05:04 2014] Yep, I have some PHP experience/traumas too [Sun Dec 21 17:05:15 2014] it's actually an SQL language inside kanren which is being statically check by the compiler [Sun Dec 21 17:05:26 2014] and the compiler itself inserts all the quoting things for you, in the correct way [Sun Dec 21 17:05:49 2014] I was more thinking the situation where I have some more people working with me and things are not excusively under my control [Sun Dec 21 17:05:50 2014] so this is very secure: The language itself is helping you write securely by handling all that [Sun Dec 21 17:06:27 2014] But you can still seprate things out as much as you like [Sun Dec 21 17:06:36 2014] like having your queries in one part, HTML templates elsewhere [Sun Dec 21 17:06:45 2014] this is what was done in the Gallury code if you want to see that [Sun Dec 21 17:07:29 2014] Ok. I was actually thinking that there might be some extra benefit of keeping things together that I just never thought about [Sun Dec 21 17:08:04 2014] But I'll look into this other repo too [Sun Dec 21 17:08:12 2014] Which one that would be [Sun Dec 21 17:08:25 2014] I mean could you provide a direct url? :) [Sun Dec 21 17:08:31 2014] https://github.com/yuuko/Gallury/blob/master/gallury.ur [Sun Dec 21 17:08:40 2014] line 172 has all the SQL query generating parts [Sun Dec 21 17:08:51 2014] Thank yoi [Sun Dec 21 17:08:53 2014] line 204 has the HTML template that gets reused a few times [Sun Dec 21 17:09:02 2014] s/i/u/ [Sun Dec 21 17:09:09 2014] then each man page is implemented 221, 226, 301 [Sun Dec 21 17:09:26 2014] and each of those is in two parts: some processing then the HTML bit [Sun Dec 21 17:31:00 2014] Ok, I start to see light there. The other question I had was about the communications between the server and the client. Did I get it right that Ur/Web only supports HTTP GET and HTTP POST? [Sun Dec 21 17:31:56 2014] im not sure about that - it could be a good question to ask on the mailing list [Sun Dec 21 17:32:21 2014] I just had in mind that if the protocol between the client and the server is nice enough it could double as a public API at least for some parts [Sun Dec 21 17:32:41 2014] oh public API like those RESTful JSON XML things [Sun Dec 21 17:32:59 2014] I think someone was experimenting with making that, I don't think it's been done though [Sun Dec 21 17:33:14 2014] best to check up on that though I might be wrong [Sun Dec 21 17:34:18 2014] Just that eventually for just about any kind of site that comes to mind, somebody is going to want to make a smartphone app or something [Sun Dec 21 17:34:37 2014] yeah I thinnk this is a really important feature [Sun Dec 21 17:38:24 2014] I think it would probably not be hard to have this feature [Sun Dec 21 17:38:50 2014] just instead of XML that emits HTML we would need a way to produce JSON or proper XML XML [Sun Dec 21 17:45:49 2014] Well in a way I'm sure Ur already has this feature because the client side is able to make RPCs to the server [Sun Dec 21 17:46:52 2014] I'm just wondering if that protocol is "human interfaceable" enough that it could substitute the traditional REST API things [Sun Dec 21 17:47:27 2014] sorry, I don't know the answer - I hope it is though [Sun Dec 21 17:47:50 2014] I should try and get an API into Gallury and see how that comes out [Fri Dec 26 01:17:41 2014] how much RAM is it supposed to take to build urweb? [Fri Dec 26 01:17:51 2014] I killed it after it hit 2.5G [Fri Dec 26 19:15:01 2014] just read about it on Soylent [Fri Dec 26 19:15:04 2014] Hi [Fri Dec 26 23:34:54 2014] hi all, does anyone know how to import a C FFI module into an Ur file? I wrote a very simple C file with a `println` function that just writes to stdout, wrapped it in an `IO.urs` file, wrote an `ioTest.urs` file the declares `library IO` and the `ioTest` module. Then in my `ioTest.ur` I have `fun main() = IO.println "hello world"`. But when I run `urweb ioTest` it doesn't recognize `IO` identifier. [Fri Dec 26 23:39:44 2014] blorpyblob: it sounds like you are doing it correct, so i'm not sure. here is a small example use you can compare against https://github.com/enn/ur-pbkdf2 [Fri Dec 26 23:42:12 2014] does capitalization matter? [Fri Dec 26 23:44:40 2014] i'm not sure what specifically you are referring to regarding that, but yes most likely [Fri Dec 26 23:47:58 2014] I mean when you import in `example.urs` you capitalize it, but the `pbkdf2.urs` file is not capitalized [Fri Dec 26 23:49:59 2014] (example.ur, not example.urs) [Fri Dec 26 23:53:03 2014] Oh, that was the problem. It auto-capitalized my module to `Io`. Hmm, not sure I'm the biggest fan of that. [Fri Dec 26 23:53:18 2014] yea, it will be capitalized even if the file isn't because modules are always capitalized [Fri Dec 26 23:54:37 2014] Well, I guess that was it. Now, what URL would I go to by default to run my main module? [Fri Dec 26 23:55:07 2014] to clarify my `main` method lives in `iotest.ur` [Fri Dec 26 23:58:08 2014] .../Iotest/main [Fri Dec 26 23:59:15 2014] you can get rid of the Iotest part with the directive: rewrite all Iotest/* [Sat Dec 27 17:56:46 2014] hahaha holy shit [Sat Dec 27 17:56:50 2014] http://soylentnews.org/article.pl?sid=14/12/26/1644253 [Sat Dec 27 17:56:56 2014] these comments are so embarassing [Sat Dec 27 17:57:10 2014] how are people so stupid [Sat Dec 27 17:58:31 2014] at least I understand better the people who ive tried to explain urweb to and they just haven't got it at all [Sat Dec 27 17:59:16 2014] err, I have a stupid question myself [Sat Dec 27 17:59:40 2014] hey sirssi [Sat Dec 27 17:59:43 2014] I just went through gian's tutorial (thanks for that!) [Sat Dec 27 18:00:10 2014] and I'm wondering how could I add formating support to the blog [Sat Dec 27 18:00:23 2014] I mean, if the articles contain some HTML it gets escaped [Sat Dec 27 18:00:32 2014] for security reason I assume [Sat Dec 27 18:00:34 2014] that's a perfectly good question [Sat Dec 27 18:00:40 2014] there are two ways to approach [Sat Dec 27 18:00:51 2014] so the blog post would be written in some kind of markup language [Sat Dec 27 18:00:56 2014] (it's not the first time I run into this problem, OCaml's Ocsigen framework has the same approach) [Sat Dec 27 18:01:21 2014] the program needs to parse that into an AST and then emit HTML for it - or it might be possible to use the FFI to parse it in another language [Sat Dec 27 18:01:52 2014] there's an example of the first approach here https://github.com/tca/urchan/blob/master/bbcode.ur [Sat Dec 27 18:02:18 2014] oh thanks, I suspected something like that would exist but didn't find it by myself [Sat Dec 27 18:02:27 2014] the code isn't too pretty, if anything about it is unclear feel free to ask abou tit [Sat Dec 27 18:03:15 2014] i've got a much simpler example too - parsing 'search queries' [Sat Dec 27 18:03:26 2014] but I generate weird SQL queries from that rather than HTML so this is a better example to look at [Sat Dec 27 18:04:57 2014] I would be interested by the source, if you have it somewhere online :) [Sat Dec 27 18:05:37 2014] but "urchan" seems to be exactly the kind of example I needed [Sat Dec 27 18:05:39 2014] thanks for that [Sat Dec 27 18:08:27 2014] and what if I just want to store plain HTML and send it to the client? [Sat Dec 27 18:09:13 2014] I think I had him add support for that to the compiler a while bakc [Sat Dec 27 18:09:25 2014] in general it's not a good idea [Sat Dec 27 18:09:38 2014] I understand that [Sat Dec 27 18:09:45 2014] it's more a prototyping thing [Sat Dec 27 18:09:54 2014] because of all sorts of dangers like XSS and malformed HTML etc [Sat Dec 27 18:12:07 2014] http://www.impredicative.com/pipermail/ur/2010-December/000426.html [Sat Dec 27 18:12:14 2014] check out adams post there [Sat Dec 27 18:13:55 2014] thanks a lot [Sat Dec 27 18:16:17 2014] that soylentnews article is really depressing :( [Sat Dec 27 18:16:19 2014] the comments at least [Sat Dec 27 18:16:24 2014] nobody gets it at all [Sat Dec 27 18:16:41 2014] lol its hilarious [Sat Dec 27 18:16:48 2014] did you see Kens comment ont he actual post [Sat Dec 27 18:16:54 2014] http://www.computerworld.com/article/2863069/application-development/mit-unifies-web-dev-into-a-single-speedy-new-language-urweb.html [Sat Dec 27 18:17:24 2014] so much worse is better [Sat Dec 27 18:18:22 2014] "The other little hiccup not mentioned in this article is that if this language truly does result in a compiled executable program then those program will not be usable [at all] in any of today's web browsers. Support would need to be added to each web browser on each platform (Windows, OSX, Linux, and all the mobile variants) in order for Ur/Web apps to work. Couple that with the learning curve and I don't see this new language having much of a chance [Sat Dec 27 18:18:22 2014] outside of academia." [Sat Dec 27 18:18:40 2014] hahaha what [Sat Dec 27 18:18:45 2014] :D [Sat Dec 27 18:19:12 2014] I know this really really smart young girl hacker and i was trying to egt her into urweb [Sat Dec 27 18:19:13 2014] and shes like [Sat Dec 27 18:19:35 2014] "but that's STUPID it turns SQL queries into strings before sending them off to the db anyway, so its not more safe/secure than PHP" [Sat Dec 27 18:19:45 2014] :| [Sat Dec 27 18:20:24 2014] i guess that means formal methods for computer security are useless, because it's all just untyped assembly language in the end anyway [Sat Dec 27 18:20:28 2014] i wonder how all this happens though? its really interesting - urweb isn't that radical is it? I invented similar things when I was much younger [Sat Dec 27 18:20:35 2014] yeah haha [Sat Dec 27 18:33:53 2014] vanila: Can you convince her that compilers are less likely to make mistakes than people are, and it's easier to fix them? I feel like the same argument that applies to "use high level languages" (you're less likely to make numerous small mistakes when you're coding in Haskell than when you're coding in assembly) also applies to type safety (you're less likely to have numerous small holes when you code in a type safe language). [Sat Dec 27 18:35:56 2014] not sure, Im writing a blog post responding to some of this nonsense on soylent [Sat Dec 27 18:36:42 2014] maybe thatll help [Sat Dec 27 18:57:50 2014] hm :/ [Sat Dec 27 18:58:09 2014] if I write this as a point by point reply to all the dumb stuff the commenters say it just comes off as me slagging off idiots which is really no good [Sat Dec 27 18:58:57 2014] I think what I should do is write something positive like a tutorial which take each point of confusion and explains it early onn [Sat Dec 27 19:00:57 2014] because damn lol [Sat Dec 27 19:01:29 2014] Alternatively, if you think it's worth it, you could see if you could intentionally play into http://slatestarcodex.com/2014/12/17/the-toxoplasma-of-rage/ to get Ur/Web more popularity. ;-) [Sat Dec 27 19:11:03 2014] wow what a fascinating post! [Sat Dec 27 19:19:58 2014] why is it possible to use INSERT on database without providing handler code for failures, such as in http://impredicative.com/ur/demo/sql.ur.html ? [Sat Dec 27 19:20:51 2014] (for example if some primary key already exists) [Sat Dec 27 19:25:28 2014] I think that is for convenience, you can use tryDml if you want to handle failure [Sat Dec 27 19:31:20 2014] oh great, thanks [Sat Dec 27 22:07:21 2014] what's the license? [Sat Dec 27 22:07:57 2014] license for what? [Sat Dec 27 22:08:27 2014] ur/web programming language [Sat Dec 27 22:09:49 2014] http://hg.impredicative.com/urweb/file/b7cb53affc08/LICENSE i believe this is the MIT license? [Sat Dec 27 22:09:52 2014] not exactly sure [Sat Dec 27 22:09:53 2014] but there you have it [Sat Dec 27 22:10:55 2014] thanks :-) [Sat Dec 27 22:11:21 2014] btw, is there a way of correcting the major fib in the start of the FAQ? [Sat Dec 27 22:11:43 2014] ""Ur" is the hypothesized ancestor of all modern natural languages," [Sat Dec 27 22:12:37 2014] what is the inaccuracy? [Sat Dec 27 22:13:03 2014] as an amateur linguist, I find it rather insulting. since Ur is actuall the name of a major city in Sumeria. [Sat Dec 27 22:13:45 2014] that is not mutually exclusive with the definition in the FAQ, it can have multiple meanings [Sat Dec 27 22:14:00 2014] The Sumerians may have been one of the first to have a written record. But certainly nowhere close to "ancensort of modern languages" [Sat Dec 27 22:15:21 2014] Borean is about as close anyone has come to having a name for "ancestor of human languages", and that doesn't include niger-congo, Cree and a bunch of south american/north-australian languages. [Sat Dec 27 22:16:13 2014] sumerian is an Uralic language, like Finnish or Hungarian. [Sat Dec 27 22:18:07 2014] http://en.wiktionary.org/wiki/ur- this has a definition of ur, i dont think its usage in the FAQ is related to the city in Sumeria [Sat Dec 27 22:19:17 2014] "Putnam 1971 speculated, universals might be relics of an ancestral Ur-language from which all other languages evolved" - http://plato.stanford.edu/entries/innateness-language/ [Sat Dec 27 22:20:08 2014] I see, well then it could be clarified, that it is actuall ur-web, what's with the name? ur- means proto, primitive or original in german. [Sat Dec 27 22:20:33 2014] proto-web makes sense for ur-web [Sat Dec 27 22:20:41 2014] I wouldn't worry about it too much dude [Sat Dec 27 22:21:26 2014] oh I see, so the FAQ definition is a backformation from that article. [Sat Dec 27 22:21:56 2014] the /web in ur/web is meant to be a set of extensions to the ur language, allowing inline XML/SQL and some parts of the standard library relating to hosting web services [Sat Dec 27 22:22:17 2014] but in reality, the "ur" and the "web" part are just jumbled into one big implementation, and there's no separation between them [Sat Dec 27 22:22:43 2014] I'm just working on a human speakable programming language, that uses natural language like grammar for syntax, so I found it a little irksome is all. [Sat Dec 27 22:23:07 2014] sounds like a cool project! [Sat Dec 27 22:23:47 2014] thanks :-) [Sat Dec 27 22:25:16 2014] the base vocab for the core language uses proto-languages such as borean and nostratic for inspiration. but ya, the proto-word for language or tongue-speak was most likel kal or kwal rather than ur [Sat Dec 27 22:25:40 2014] similar to english call [Sat Dec 27 22:25:55 2014] what are the semantics like? [Sat Dec 27 22:26:45 2014] I had an assembly compiler before, but now I'm reimplementing in javascript, since the aim is to make it accessible to non-english speakers and females. [Sat Dec 27 22:27:05 2014] here is alpha level ide, just does some basic parsing and translating http://mwak.tk/spel/src/web/spel.html [Sat Dec 27 22:27:25 2014] how the heck do you plan on making it more accessible to females [Sat Dec 27 22:27:28 2014] awesome ^^ [Sat Dec 27 22:28:18 2014] is there something about being female that means you require different programming languages [Sat Dec 27 22:28:26 2014] i dont really get it [Sat Dec 27 22:28:47 2014] males excel in visual-spatial processing, and females in verbal linguistic. so making programming less spatial and more lingusitic is one way. [Sat Dec 27 22:29:23 2014] another way is that collaborative programming has to be well supported, such as pair programming and group editing, which can work via robert's rule style deliberative discussion. [Sat Dec 27 22:29:29 2014] you could post about it on lambda-the-ultimate [Sat Dec 27 22:29:38 2014] i think it would be of interested there too [Sat Dec 27 22:30:16 2014] i wasn't aware it was possible to post to lambda the ultimate. [Sat Dec 27 22:30:42 2014] i dont think that has anything to do with gender, because that doesnt apply to everyone - what you're really doing is trying to make programming more accessible to people who are better at "verbal linguistic" things [Sat Dec 27 22:30:48 2014] oh yeah there's a forum bit, and sometimes the mods promote stuff to the front page [Sat Dec 27 22:30:54 2014] who may or may not happen to be of a particular gender [Sat Dec 27 22:30:59 2014] * reading up a little on roberts rule of order [Sat Dec 27 22:33:14 2014] yukko: yes, there are exceptions to every rule. can check out "Leadership and the Sexes" it has assembled a lot of the research and implications, they routinely help companies be more gender accomodating [Sat Dec 27 22:33:20 2014] http://www.genderleadership.com/leadership_and_the_sexes.html [Sat Dec 27 22:35:07 2014] it's not about exceptions, it's that the distributions for gender differences tend to overlap, a lot, so saying "males are good at x" isn't really true, it's more like "a random male is slightly more likely to be better at x" [Sat Dec 27 22:35:59 2014] it can also be not very nice to be male and not be good at x, when people are going around saying "males are good at x", because it makes you feel like you dont belong [Sat Dec 27 22:36:02 2014] (just as an example) [Sat Dec 27 22:36:09 2014] yukko: it's a lot like trends. humans tend to have two legs, there are exceptions though. [Sat Dec 27 22:36:23 2014] lol [Sat Dec 27 22:37:12 2014] well that's obviously not a serious rebuttal [Sat Dec 27 22:37:22 2014] in the book they talk about transition-brains, where people may be half way between a male and female brain. [Sat Dec 27 22:38:03 2014] the fact is, that from the womb, male and female brains, develop differently. [Sat Dec 27 22:39:43 2014] females tend to have larger areas dedicated to verbal lingustic reasoning, so girls are more likely to socialize with their toys. Wheras males have more dedicated to spatial reasoning, so boys are more likely to manipulate their toys. [Sat Dec 27 22:40:48 2014] really cool to reconsidering programming in such a radical way [Sat Dec 27 22:40:53 2014] -ing [Sat Dec 27 22:41:54 2014] :-) thanks. Well I was thinking, that we've been programming each other with human languages for thousands of years. may as well work on the grammar structures we've developed. [Sat Dec 27 22:42:42 2014] catch you later, cheers for the discussion :) [Sat Dec 27 22:42:57 2014] kk, cya [Sat Dec 27 22:43:15 2014] i'll try and post in lambda the ultimate [Sun Dec 28 11:29:49 2014] hello Smerdyakov ! [Sun Dec 28 11:30:29 2014] ur/web got featured in an article on "soylentnews" http://soylentnews.org/article.pl?sid=14/12/26/1644253 [Sun Dec 28 11:51:35 2014] yukko, thanks for the link. There have been a number of links recently, thanks transitively to an MIT news release. [Sun Dec 28 11:52:07 2014] warning: the soylentnews guys are not too smart [Sun Dec 28 11:52:14 2014] And the Slashdot comments have a whole lotta hating. This can't be any worse. ;) [Sun Dec 28 11:53:05 2014] I wrote a post responding to all the confusion and misunderstanding they have, but I didn't post it since it came across really rude - I migh ttry to write a tutorial or something that covers the main points of confusion [Sun Dec 28 11:55:18 2014] All publicity is good publicity, anyway. ;) [Sun Dec 28 11:55:25 2014] yeah :) [Sun Dec 28 11:55:49 2014] It's weird how much people miss the point though, I didn't think ur/web was *that* radical [Sun Dec 28 11:56:33 2014] but they do not seem to get it at all, some guy even posted (on computerworld) that they omitted to mention urweb wont work on mac windows or linux because it doesn't output HTML? he was very mixed up [Sun Dec 28 11:59:16 2014] oh unrelated but people were asking how to make thes new "RESTful" JSON or XML APIs [Sun Dec 28 11:59:33 2014] I said that I don't think there's a way just now [Sun Dec 28 12:01:05 2014] That's not true. It's pretty easy to do. [Sun Dec 28 12:01:20 2014] oh damn, im sorry! [Sun Dec 28 12:01:44 2014] what I think I will do then is add an API to the gallury demo so I can point people to that if they ask [Sun Dec 28 12:02:00 2014] Just write page handlers that take in the appropriate data, and call [returnBlob] to return whatever you like. [Sun Dec 28 12:02:18 2014] BazQux Reader has heavily used APIs, implemented in Ur/Web. [Sun Dec 28 12:02:51 2014] But it's understandable that such a capability wouldn't come out clearly in the documentation ATM. [Sun Dec 28 12:03:18 2014] The Meta library contains some very nice code for parsing and generating JSON. [Sun Dec 28 12:03:27 2014] I just spotted that, will give it a go :) [Sun Dec 28 12:03:36 2014] There's no standard code now for freeform XML generation or parsing, though. [Sun Dec 28 12:03:59 2014] The standard XML support is generation-only and requires a static type schema. [Sun Dec 28 12:04:41 2014] I've been working on a new framework in Ur/Web, using it for an internal MIT app. [Sun Dec 28 12:04:56 2014] cool! [Sun Dec 28 12:05:02 2014] what sort of frameworK? [Sun Dec 28 12:05:08 2014] I'm expecting to release it soon. It uses Bootstrap and looks really nice, focusing on making new but fairly custom apps easy to assemble with minimal coding. [Sun Dec 28 12:05:40 2014] In the end, it should be pretty close to assembling a web app as a graph of components, simple enough to be visualized for nonexperts. [Sun Dec 28 12:05:58 2014] that sounds excellent :) [Sun Dec 28 12:06:31 2014] im thinking of making a wiki in urweb that's backed by mercurial - it might be smarter to just stick to sql though [Sun Dec 28 12:07:00 2014] Sounds useful. [Sun Dec 28 12:07:20 2014] I'm thinking more and more that the potential is in sites with more specialized composition of a variety of nontrivial components. [Sun Dec 28 12:07:48 2014] that is going to be really interesting to see [Fri Jan 9 23:09:44 2015] hi [Fri Jan 9 23:09:50 2015] has anyone thought about ur/web on mirage? [Thu Jan 15 17:45:51 2015] [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup [Tue Jan 20 13:23:56 2015] allahu akbar [Fri Jan 23 11:38:14 2015] Hi, I'm new to ur/web. Today I'm be able to run the demo. I want to ask some questions. Is it possible with ur/web to build a page where automaticaly changes of the Database is shown? [Fri Jan 23 11:49:02 2015] is there somware a syntax highliting file for vi? [Fri Jan 23 12:02:37 2015] is there someone? Or should I better use the mailinglist? [Mon Jan 26 10:40:58 2015] <__monty__> I'm new to web programming, but I like dependent types. How does Ur/Web compare to idris? And is there something like heroku for Ur/Web sites/webapps or do you rely on things that are not found in most/any web stacks? [Mon Jan 26 10:42:45 2015] urweb doesn't actually have dependent types as such, but it does use strong types to ensure safety and security properties [Mon Jan 26 10:44:25 2015] correction: strings for HTML markup, not queries [Wed Feb 4 07:17:36 2015] [freenode-info] channel flooding and no channel staff around to help? Please check with freenode support: http://freenode.net/faq.shtml#gettinghelp [Sun Feb 8 06:12:17 2015] Hi all! Where do I find info on how to emit a HTML5 doctype in my application? [Tue Feb 17 20:16:22 2015] I just saw a ur/web talk that was posted on the haskell subreddit. I'm very intrigued by the language. [Tue Feb 17 21:11:50 2015] it is a cool language [Tue Feb 17 21:27:50 2015] I have a ton of questions, and searches aren't helping much... once I have a few minutes I'll probably compose a long newbie question for the mailing list [Wed Feb 18 02:27:06 2015] https://www.youtube.com/watch?v=8n5ubDe9FAA [Wed Feb 18 02:27:12 2015] Adam Chlipala - Ur/Web [Sun Feb 22 09:48:53 2015] hi all [Sun Feb 22 09:48:59 2015] anyone using urweb on openbsd? [Sun Feb 22 09:49:16 2015] I found this which was helpful https://github.com/MLton/mlton/issues/90 [Tue Mar 3 21:45:02 2015] Surprise announcement: I'm talking about Ur/Web on a radio show here, in about 15 minutes: http://www.computeramerica.com/ [Wed Mar 11 16:13:17 2015] Hi ! Just a question, are websocket supported in ur/web ? [Wed Mar 11 23:28:06 2015] Hello Ur community, I'm interested in building a web application using Ur, and was wondering if anybody could answer a few general questions about it [Wed Mar 11 23:30:33 2015] How much abstraction does it offer on top of javascript and the DOM (e.g. can it easily, say, emulate the functionality of AngularJS)? [Thu Mar 12 00:32:47 2015] Ansnum: no websockets yet as far as i know [Thu Mar 12 00:33:29 2015] and for the person who left, yes, it does several of the types of thing angular does (but better and safely obviously) [Thu Mar 12 04:16:14 2015] thanks cojy_ [Sun Mar 22 12:06:59 2015] hello [Sun Mar 22 12:07:49 2015] Hello! [Sun Mar 22 12:08:24 2015] hows it going ? :) [Sun Mar 22 12:09:28 2015] Pretty good. I’m working on a Gravatar library these days. [Sun Mar 22 12:09:37 2015] oh nice! [Sun Mar 22 12:10:03 2015] that'll be really useful for a bunch of different sites [Sun Mar 22 12:11:05 2015] Yep. Whenever I see a shiny Ur/Web site, I always think ‘You know what’s missing? Little pictures of people!’ :) [Sun Mar 22 12:11:14 2015] hehe [Sun Mar 22 12:11:31 2015] i just managed to get my note-taker/wiki thing together [Sun Mar 22 12:11:52 2015] Cool! I’ve been thinking we really need an Ur/Web wiki. [Sun Mar 22 12:11:56 2015] screenshot: http://i.imgur.com/lnJECuQ.png [Sun Mar 22 12:12:46 2015] Ooh, somebody (you?) should write a Markdown library. [Sun Mar 22 12:12:58 2015] I'm working on it :) [Sun Mar 22 12:13:09 2015] it's pretty horrible just now.. hand written state machine for tokenization [Sun Mar 22 12:13:14 2015] but it's a start [Sun Mar 22 12:13:59 2015] I dunno, any parser sounds better than none. Even if it’s an exponential-time recursive-descent parser, we can always make it better later. [Sun Mar 22 12:14:21 2015] I had a go implementing parsec before in ur [Sun Mar 22 12:14:36 2015] the compiler wasn't able to fully compile away the lambdas [Sun Mar 22 12:14:53 2015] Ah, bummer. [Sun Mar 22 12:15:00 2015] Adams fixed it and now that works.. but I sort of feel like I don't want to use too much higher order combinator stuff [Sun Mar 22 12:16:30 2015] another option that was promising was a sort of prolog interpreter for parsing - can do that without much trouble in a quite first order way [Sun Mar 22 12:17:02 2015] anyway, im just doing it by hand for now [Sun Mar 22 12:17:27 2015] I was thinking getting rid of the openssl dependency [Sun Mar 22 12:17:38 2015] In the compiler itself? [Sun Mar 22 12:17:40 2015] yeah [Sun Mar 22 12:17:50 2015] oh no in the binaries that are produced [Sun Mar 22 12:17:56 2015] Ah, okay [Sun Mar 22 12:18:01 2015] Just wait for BoringSSL to hit stable ABI, and then we’ll be good to go, no/ [Sun Mar 22 12:18:03 2015] *no? [Sun Mar 22 12:18:09 2015] yeah you could use another ssl lib, [Sun Mar 22 12:18:47 2015] it's just that the servers seem to only use it for a portable way to get randomness, crypt() function for one of the library builtins (that no one uses - i made a pkbdf2 library which should replace that), and sha256 is used at one point for signing something - not clear what is being signed or why [Sun Mar 22 12:19:08 2015] but basically it's not using 99% of openssl lib, so it shouldn't be hard to remove that dependency [Sun Mar 22 12:19:26 2015] SHA256 is probably for the HMAC to protect against CSRF [Sun Mar 22 12:19:36 2015] ah thanks! that makes sense [Sun Mar 22 12:19:42 2015] The nice thing about BoringSSL is, though, it should be really easy to port from OpenSSL [Sun Mar 22 12:23:02 2015] i should get this wiki thing multiuser at some point with openid+gravatar maybe :) [Sun Mar 22 12:23:20 2015] i wonder if i made it good enough adam would replace the mediawiki on the ur page with it.. [Sun Mar 22 12:25:57 2015] I’m sure Adam would rather use an Ur/Web solution than a PHP one. :) [Sun Mar 22 12:26:03 2015] yeah! :D [Sun Mar 22 12:26:14 2015] Another thing I was thinking was: Improving error messages could totally be a GSOC project [Sun Mar 22 12:26:35 2015] Ooh, that’s an interesting idea. [Tue Mar 24 19:21:31 2015] is there a good reason you can't reference a table from another module in sql constraints? (like "REFERENCES Model.t(Id)") [Tue Mar 24 19:22:12 2015] right now i am doing val model_t = Model.t beforehand, but i don't know if that's going to get me into trouble as i get further. [Tue Mar 24 19:22:35 2015] No, I think that’s the right thing to do. It’s been a while since I’ve run into this particular issue, but IIRC that’s how I’ve solved it in the past. [Tue Mar 24 19:23:30 2015] ok. i was thinking about modifying the grammar to support this since it didn't look too hard to do that, but i thought there might be a reason for this that i was missing. [Tue Mar 24 19:25:26 2015] thanks. [Tue Mar 24 19:27:19 2015] while i'm disturbing the silence here, any general tips on dealing with unification errors? [Tue Mar 24 19:31:58 2015] tokenrove: I don’t think Adam would mind taking a patch to extend the grammar in the way you describe, though he is wary of intermodule dependencies like the ones you’re describing, because they often indicate a degree of coupling between modules that grates on his inner software engineer. :) [Tue Mar 24 19:33:19 2015] tokenrove: On the unification error front, well, that’s just urweb’s way of saying ‘type error’. My best advice is to look at the ‘have’ and ‘need’ messages in conjunction with the source location, and treat the rest of the error message as compiler spew. [Tue Mar 24 19:33:44 2015] i have to admit i'm still very new to the "urweb way", which is pretty different from other approaches to building web applications i've used in the past. [Sat Mar 28 05:53:12 2015] Whereabouts would I go to find the type signatures for built in functions? such as signal and source and friends... ? [Sat Mar 28 07:36:28 2015] found it :> [Mon Mar 30 00:33:55 2015] Ur is so much fun, breaking my brain more than a bit... but looking forward to much more of this :D [Mon Mar 30 12:20:13 2015] yeah its a lot of fun :) [Tue Mar 31 03:18:58 2015] HOHOHO TROLLLL TROLLLLLINGGGGG [Tue Mar 31 12:37:19 2015] does anyone have an example of making a type serializable? [Sat Apr 4 12:09:45 2015] LOL ANYBODY HERE [Sat Apr 4 12:10:08 2015] UHHHOHHHH [Sat Apr 4 12:20:43 2015] YEEEEHAAA I AM NUDE SEE ME ME ME ME [Sat Apr 4 12:51:01 2015] Popular enough to attract a spammer, huh? This is a happy day. :) [Sat Apr 4 13:02:44 2015] that's what i was thinking ;-) [Sat Apr 4 13:12:48 2015] Is anyone hanging out here building anything cool with Ur/Web lately? [Sat Apr 4 13:51:19 2015] i am working on something commercial with it. nothing too ambitious as it's my first non-toy urweb project. but i'm hoping to do something open source afterwards. [Sat Apr 4 15:42:03 2015] Great. I'd love to have a pointer to your commercial app, when it's ready. [Sat Apr 4 19:33:43 2015] I've a talk in the works for my local FP group about ur. Should be awesome. :) [Sat Apr 4 19:45:33 2015] What locality is that? [Sat Apr 4 19:56:00 2015] Brisbane, Australia [Sat Apr 4 23:56:53 2015] HERLLOLOL [Sat Apr 4 23:56:57 2015] HELO [Sat Apr 4 23:57:26 2015] ANYONE [Sun Apr 5 00:10:46 2015] ????ANYONE [Sun Apr 5 00:11:00 2015] Can I help you? [Sun Apr 5 00:14:07 2015] UMM FINALLY NOPE I FOUND THE SOLUTION [Sun Apr 5 06:14:22 2015] HELOOO ANYONE?? [Sun Apr 5 08:26:19 2015] is there a way to start a repl or similar interface to UrWeb applications and libraries ? [Sun Apr 5 08:29:20 2015] i know you can start a repl to interact with the compiler and its libraries, but since the applications are emitted as pretty minimal C code, it seems like you'd need to add a fair amount of reflective information to get a repl out of it. i might be wrong, though. [Sun Apr 5 08:40:40 2015] Right. No REPL is available for Ur/Web. [Sun Apr 5 08:58:10 2015] So you can sort of have one for the core language and Basis and friends, but any of my code is pretty much out? [Sun Apr 5 09:14:27 2015] No REPL is implemented for any part of the language. [Sun Apr 5 09:14:52 2015] tokenrove's comment is really only relevant to Ur/Web compiler developers. [Sun Apr 5 09:15:21 2015] (He meant an SML/NJ REPL, I assume.) [Sun Apr 5 09:16:33 2015] yes [Sun Apr 5 09:17:33 2015] i guess my thinking there is that, since one of the reasons you might want a repl is to get type information interactively, one of the paths to doing that might be via the smlnj invocation of the compiler. [Sun Apr 5 09:17:34 2015] ahh so I load up Urweb source into ML land and just fiddle there [Sun Apr 5 09:17:42 2015] that makes sense [Sun Apr 5 09:18:51 2015] i don't think that'll work so well. but let's say you were building something like merlin for urweb, you could fire up the compiler in smlnj, and invoke parts of it, passing in your source code, and extract information that way. [Sun Apr 5 09:19:54 2015] OK, so Round 10 of the TechEmpower Web Framework Benchmarks is supposed to be released this week! At long last, Ur/Web's dominance among high-level languages will be clear. ;) [Sun Apr 5 09:19:59 2015] Fair enough. Good to know for future tinkerings [Sun Apr 5 09:20:01 2015] oh nifty [Sun Apr 5 09:20:04 2015] heh [Sun Apr 5 09:25:28 2015] Smerdyakov: looking forward to that; looking at the C code, it seems like there are further opportunities to improve urweb's performance in the benchmarks. i hope to get some time to look at that soon. [Sun Apr 5 09:27:11 2015] one day I'll understand enough to help out, one day! :P [Sun Apr 5 09:32:40 2015] I expect that just tweaking the number of OS threads being spawned would make a significant difference. [Sun Apr 5 09:33:00 2015] tokenrove, but what C-level optimizations do you have in mind? [Sun Apr 5 09:39:46 2015] for example, the HTTP header parsing looked very naive [Sun Apr 5 09:40:10 2015] In an asymptotically significant way? [Sun Apr 5 09:40:24 2015] ideas could be taken from, e.g., https://github.com/h2o/picohttpparser [Sun Apr 5 09:40:34 2015] it'll make a difference on benchmarks [Sun Apr 5 09:40:45 2015] not in the real world, which is why i'm not doing it for my actual project [Sun Apr 5 09:41:30 2015] are you using UrWeb for work ? [Sun Apr 5 09:41:41 2015] OK, so you're saying there are opportunities for constant-factor improvement to HTTP parsing, but not asymptotic improvement? [Sun Apr 5 09:42:06 2015] mankyKitty: yes, but as a trial run. [Sun Apr 5 09:43:24 2015] That's awesome. We use Haskell / Angular at work, would love to throw UrWeb at a problem or use it to crowbar angular out of the stack. Best of luck! :D [Sun Apr 5 09:43:55 2015] Smerdyakov: yes, although i think the distinction is perhaps disingenious when speaking of this kind of part of the system [Sun Apr 5 09:44:21 2015] in practice, asymptotic improvements to http header parsing are unlikely to be important, because the headers do not grow unbounded [Sun Apr 5 09:44:42 2015] meanwhile constant-factor improvements have a direct, measurable link to latency and throughput [Sun Apr 5 09:49:26 2015] * nods. [Sun Apr 5 14:08:07 2015] hi, I managed to run a trivial urweb on 8080, but can't figure how to just output results to stdout in order to follow the chapter 1 examples, like just define fun double and output double 4. My 8080 app actually prints 'double 4' and does not even compute it... [Sun Apr 5 14:08:53 2015] Probably you need to enclose that term in: {[ ... ]} [Sun Apr 5 14:13:59 2015] It worked in my web app, thanks! But I can't just output to stdout? [Sun Apr 5 14:16:13 2015] I was thinking it might be nice to remove the openssl dependency [Sun Apr 5 14:16:33 2015] its only used for a very small number of things so it shouldn't be hard to do [Sun Apr 5 14:16:41 2015] what do you think about that? [Sun Apr 5 14:17:00 2015] from what i saw in the C code, it should be very little work [Sun Apr 5 14:17:10 2015] yeah :) [Sun Apr 5 14:17:49 2015] vanila: What would you replace it with? [Sun Apr 5 14:18:19 2015] nacl perhaps? [Sun Apr 5 14:18:20 2015] we just need randomness and a hash function - my pbkfd can replace crypt [Sun Apr 5 14:20:06 2015] vanila: pbkfd? [Sun Apr 5 14:20:21 2015] https://github.com/enn/ur-pbkdf2 [Sun Apr 5 14:21:41 2015] This links against OpenSSL, though, right? [Sun Apr 5 14:21:48 2015] yes [Sun Apr 5 14:22:21 2015] So do you actually want to get rid of the OpenSSL dependency, or do you just want to change what crypto Ur/Web uses? [Sun Apr 5 14:22:29 2015] get rid of the OpenSSL dependency [Sun Apr 5 14:23:07 2015] Okay, so are you going to modify your PBKDF2 library to not use OpenSSL? [Sun Apr 5 14:23:13 2015] no [Sun Apr 5 14:23:23 2015] good to see timing-safe comparsion. in my own bcrypt ffi, i just supply an all-in-one verify function rather than risking the user uses the built-in comparison, which seems to be the implied mode of use of the open source bcrypt binding. [Sun Apr 5 14:24:06 2015] vanila: I’m a little bit confused. You say you want to get rid of the OpenSSL dependency, but you advocate replacing crypt with a PBKDF2 library built on OpenSSL. That seems like a contradiction. [Sun Apr 5 14:25:28 2015] nacl is one fine candidate; i'm sure there are others. [Sun Apr 5 14:25:31 2015] if someone uses crypt they can use ur-pbkdf2 [Sun Apr 5 14:25:42 2015] if someone doesnt use crypt they an avoid involving openssl [Sun Apr 5 14:26:25 2015] vanila: Ah, I see. Sure, that makes sense. Thanks for bearing with me. :) [Sun Apr 5 14:26:34 2015] isn't the openssl stuff used for csrf protection internally? [Sun Apr 5 14:26:55 2015] tokenrove, yeah I think all we need for that is a good hash function [Sun Apr 5 14:27:19 2015] (so much less than the entirety of openssl, which contains more LOC than an entire operating system :p ...) [Sun Apr 5 14:27:22 2015] including crypt at all seems like a terrible mistake to me [Sun Apr 5 14:27:42 2015] yeah it could be nice to move crypt out to a 3rd party lib [Sun Apr 5 14:29:33 2015] nacl is very nice and includes a good hash function - but I think it might not be the right choice [Sun Apr 5 14:30:07 2015] well, for uw_sign the ideal thing would be to use a good hmac; it's not clear to me that the current construction is actually robust, but i am not an expert. [Sun Apr 5 14:31:34 2015] mostly just want to distance from openssl due to the horrible number of security issues they constantly have [Sun Apr 5 14:32:00 2015] obviously none of these problems are actually relevant to urweb - it doesn't use any features of openssl that involve any of the recent bugs [Sun Apr 5 14:32:03 2015] i think the large dependency issue is more significant. the low-level crypto primitives of openssl are not the problem. [Sun Apr 5 14:32:06 2015] yeah [Sun Apr 5 14:32:21 2015] but... it's just a not a nice thing to have to carry around [Sun Apr 5 14:33:48 2015] for a system ostensibly designed to improve the security of web apps, it's surprising to me how many critical things you have to roll yourself in urweb, like hashing, and cookie signing. [Sun Apr 5 14:36:04 2015] hmm I haven't run into that myself, but I probably haven't done as serious programs in urweb as you have -- do you have a sketch of how those things came up? [Sun Apr 5 14:36:46 2015] i will eventually be posting some things to the mailing list. we'll see what happens with the application i've been building. [Sun Apr 5 14:36:56 2015] okay! [Sun Apr 5 14:46:27 2015] tokenrove, I can certainly imagine compiler options to add those features "for free." [Sun Apr 5 14:53:15 2015] oh [Sun Apr 5 14:53:24 2015] my friend has been bugging me about #things [Sun Apr 5 14:54:01 2015] is there a way to put an element on the page similar to ? [Sun Apr 5 14:54:06 2015] so that #things will scroll to the right place [Sun Apr 5 14:54:46 2015] I don't think that's supported yet. I would be happy to accept a patch that doesn't introduce zany security holes. [Sun Apr 5 14:56:38 2015] I'm not sure what the security implications of #stuff could be -- there's definitely been XSS problems with it in jquery and things [Sun Apr 5 15:37:50 2015] Smerdyakov, no comment on removing openssl? :) [Sun Apr 5 15:39:54 2015] I'd be happy to switch to getting PRNG and HMAC from any other library that is easy enough to install on the popular platforms. [Sun Apr 5 15:40:11 2015] ill look into it then! [Sun Apr 5 15:40:22 2015] E.g., needs to have a Debian package [Mon Apr 6 00:50:25 2015] does the emacs mode indentation perform a little strangely for anyone else? I find it is easy to confuse and starts indenting things wayyyyyyyy out of alignment and I have to manually fix it up [Mon Apr 6 07:10:31 2015] yeah, i have been starting to dig into it lately, especially for the indentation of SQL constraints, and XML [Mon Apr 6 07:48:26 2015] I'd very much appreciate some patches fixing the various strange behaviors that I'm aware of. I gave up on Elisp years ago. :) [Mon Apr 6 23:03:41 2015] fair enough, not just me. I'm poking around under the hood too but I'm an elisp nubbins so no promises. :s [Thu Apr 9 19:06:42 2015] so, I've been trying to understand the Ur type system a little better.. and my Haskell roots are possibly getting in my way. I tried to implement the Hask Functor typeclass as a learning experiment but it's not quite going as I planned... https://gist.github.com/mankyKitty/36a89af57e1cac3ccdfa [Thu Apr 9 19:07:10 2015] am I completely barking up the wrong tree with this sort of thing in Ur? [Thu Apr 9 19:16:54 2015] I don’t think so. This looks pretty okay to me, actually. Let me try compiling it and see what errors I can get… [Thu Apr 9 19:19:28 2015] I'm not understanding something about how to describe the class in the structure declaration, I think [Thu Apr 9 19:29:14 2015] Still working on this; give me a couple more minutes. [Thu Apr 9 19:32:14 2015] All good! I was mostly just wanting to know if I was trying something that wasn't possible or "you wouldn't need to because X" .. [Thu Apr 9 19:32:54 2015] you wouldn't do this [Thu Apr 9 19:34:38 2015] vanila: What do you mean? [Thu Apr 9 19:40:37 2015] That's what I thought, but I don't understand the mechanisms behind Ur well enough to know. Or ML for that matter I suppose. Things are built in a different way so the usefulness of something like a Hask Functor doesn't have the same utility unless you rebuild all the structures or start from scratch?? (I don't know what I don't know, other than that I don't [Thu Apr 9 19:40:37 2015] know something) :) [Thu Apr 9 19:41:41 2015] Ur has type classes for a reason. You should be able to use them if you want to, especially for abstractions like functors and monads. [Thu Apr 9 19:41:54 2015] (I’m still trying to punch through some unification errors. I’ll let you know if I get really stuck.) [Thu Apr 9 19:42:51 2015] cool ! [Thu Apr 9 19:44:32 2015] its not even possible to use monads [Thu Apr 9 19:44:43 2015] at least nontrivally [Thu Apr 9 19:46:57 2015] Because they're nearly impossible to define in Ur or just not supported in the way I am probably expecting? Apologies for noobiness, but trying to find my gaps so I can go read up / experiment. :) [Thu Apr 9 19:47:26 2015] the compiler rejects very higher order code like something with a lot of ... >>= \x -> ... [Thu Apr 9 19:48:22 2015] ohhhh ok [Thu Apr 9 19:48:25 2015] vanila: Does the compiler play better with the do-notation? [Thu Apr 9 19:48:45 2015] the notation shouldn't make a difference, it's the lambdas cause jam the machine [Thu Apr 9 19:49:03 2015] and because of that I guess the explicitness that would be required to utilise it would make it a non-trivial thing, and consequently for no real benefit? [Thu Apr 9 19:49:22 2015] it has been improved a bit since i had problems with it, but basically this kind of design pattern from haskell isn't used in urweb [Thu Apr 9 19:50:46 2015] interesting, thanks [Thu Apr 9 19:52:38 2015] I'll keep hacking away at it occasionally, but I guess I need to write more Ur/ML things to retrain my brain a bit. :) [Thu Apr 9 19:53:58 2015] yeah pick a webapp to make [Thu Apr 9 19:55:08 2015] I have a project to make something that helps schedule, organise, and collect the relevant notes etc for my local FP meetup group. Should be suitably nontrivial to get stuck in. [Thu Apr 9 19:55:59 2015] cool :) sounds like it could be useful to a whole bunch of people too [Thu Apr 9 19:56:20 2015] if I can make it type check :P [Thu Apr 9 19:57:05 2015] yeah it can take some effort to get things into shape, especialyl with the crazy error messages [Thu Apr 9 19:57:24 2015] one thing that snags me a bit is naming variables 'p' or something, accidentally shadowing an HTML tag [Thu Apr 9 19:57:32 2015] never call a variable p [Thu Apr 9 19:57:34 2015] oh damn :< [Thu Apr 9 19:57:37 2015] good tip [Thu Apr 9 19:57:49 2015] I wrote the chat app from the POPL paper, that was awesome [Thu Apr 9 19:58:09 2015] (or b) [Thu Apr 9 19:58:27 2015] or br [Thu Apr 9 19:58:34 2015] yeah :P [Thu Apr 9 19:58:40 2015] i thnk there should be some namespacing [Thu Apr 9 19:58:48 2015] im not sure how it could work though [Thu Apr 9 19:59:13 2015] it would have to be fairly arbitrary and not very friendly [Thu Apr 9 20:03:26 2015] i would've figured they would be hidden behind an xml module [Thu Apr 9 20:07:09 2015] They probably are, but the module is opened so you can use all of the functions to build xml without having to go XML.body> [Thu Apr 9 20:07:22 2015] I ... suppose? [Thu Apr 9 20:07:37 2015] * needs more ML chops [Thu Apr 9 20:25:45 2015] mankyKitty: http://www.impredicative.com/pipermail/ur/2015-April/001921.html [Thu Apr 9 20:26:50 2015] holy balls I've got a lot to learn .... goodie :D [Thu Apr 9 20:26:58 2015] that's kinda hilarious though. XML wat ? [Thu Apr 9 20:27:03 2015] Yeah, I have no clue. [Thu Apr 9 20:28:05 2015] cheers for giving that a crack though! [Thu Apr 9 20:28:25 2015] :) [Thu Apr 9 20:29:02 2015] In Ur, types and values are in different namespaces. The [a] near the [Thu Apr 9 20:29:02 2015] end is a different [a] from the one bound as a formal argument! In [Thu Apr 9 20:29:03 2015] particular, it is resolving to the tag from the standard library. [Thu Apr 9 20:29:18 2015] soo lesson is: dont name any variable a either.. [Thu Apr 9 20:29:46 2015] you could if you introduced it as input to the function though ? [Thu Apr 9 20:30:00 2015] hrmm [Thu Apr 9 20:30:01 2015] maybe [Thu Apr 9 20:30:05 2015] awkward [Thu Apr 9 20:32:31 2015] vanila: Ah, crud! You were just talking about that one, too … [Thu Apr 9 21:52:49 2015] mankyKitty: Okay, I’ve translated the Haskell definition of Pointed (from Data.Pointed) into Ur. Hopefully, this makes it a bit easier to see how to do type classes. http://lpaste.net/4569680976279502848 [Thu Apr 9 21:53:44 2015] Let me know if you have questions; I’m happy to walk through the code a bit. [Thu Apr 9 21:54:29 2015] spectacular ! thanks. I'll have a dive and let you know :) [Thu Apr 9 22:07:21 2015] That's making sense, I've not used '@' or witness before so I'll go read up on them but I think I can see how that's working. :D [Mon Jul 13 13:06:19 2015] any ideas why an expression like ``mbind x (fn _ => mreturn ())'' would work, but ``_ <- x; return ()'' would cause unification failures? (given that ``val monad_p = mkMonad {Bind=@@mbind, Return=@@mreturn}'' exists earlier) [Mon Jul 13 14:30:08 2015] [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup [Thu Jul 16 23:09:32 2015] Hey, can anyone please show me how to write dml (update ....); properly? Any simple example for one column will be great and much appreciated. I have table, column name, value and (WHERE ..) statement as arguments, but I am confused with types [Thu Jul 16 23:10:24 2015] basis.urs has the following inside: [Thu Jul 16 23:10:31 2015] val update : unchanged ::: {Type} -> uniques ::: {{Unit}} -> changed :: {Type} -> [changed ~ unchanged] => $(map (fn t :: Type => sql_exp [T = changed ++ unchanged] [] [] t) changed) -> sql_table (changed ++ unchanged) uniques -> sql_exp [T = changed ++ unchanged] [] [] bool -> dml [Thu Jul 16 23:11:09 2015] Seems that I do not get what uniques mean [Thu Jul 16 23:29:53 2015] I lack the brainpower to grok that type right now, but http://impredicative.com/ur/demo/sql.ur.html has a simple example. [Thu Jul 16 23:30:09 2015] Oh, wait, you wanted an UPDATE. Hang on. [Thu Jul 16 23:30:29 2015] http://impredicative.com/ur/demo/refFun.ur.html [Thu Jul 16 23:30:46 2015] umm, no [Thu Jul 16 23:31:03 2015] not that one [Thu Jul 16 23:31:26 2015] that one mentions DSL-ish syntax for SQL [Thu Jul 16 23:32:10 2015] but it is possible to use the same things as normal functions [Thu Jul 16 23:32:49 2015] Oh, I’ve never done a SQL operation with with the actual functions. :/ [Thu Jul 16 23:32:57 2015] I think somebody was asking about this recently on the mailing list. [Thu Jul 16 23:33:52 2015] oh, let me re-check. I thought that there were no emails on that topic [Thu Jul 16 23:34:01 2015] thanks! [Thu Jul 16 23:34:19 2015] So, there’s http://www.impredicative.com/pipermail/ur/2015-June/001989.html, which is about constructing a WHERE clause with the actual functions. [Thu Jul 16 23:34:31 2015] But it doesn’t look like anybody’s asked about constructing an UPDATE yet. [Thu Jul 16 23:34:50 2015] If you spend more than about 10 minutes on it, it’s probably a good idea to ask. [Thu Jul 16 23:39:40 2015] Great, that is actually quite helpful. I might achieve the same thing with the DSL syntax for SQL - I do not know the name of the column, my function is supposed to take column name, value, and id of the row as arguments [Thu Jul 16 23:41:03 2015] crud.ur has an example of such thing, but I would like to just update one cell instead of the whole row [Thu Jul 16 23:41:17 2015] and saveRow rowId (inputs : $(map snd M.cols)) = dml (update [map fst M.cols] (@foldR2 [snd] [colMeta] [fn cols => $(map (fn t => sql_exp [T = [Id = int] ++ map fst M.cols] [] [] t.1) cols)] (fn [nm :: Name] [t ::_] [rest ::_] [[nm] ~ rest] => fn input col acc => acc ++ {nm = @sql_inject col.Inject (col.Parse in [Fri Jul 17 10:31:51 2015] hey [Fri Jul 17 10:32:24 2015] any open source web apps using ur on github / bitbucket / ... that you'll suggest me looking into? [Fri Jul 17 10:32:39 2015] other's than the ones listed on the official site? [Fri Jul 17 10:34:58 2015] what is the purpose? [Fri Jul 17 10:35:29 2015] looking for anything particular? [Fri Jul 17 10:37:15 2015] Alx_: basically i'm just asking if http://www.impredicative.com/ur/users.html is up to date of there's something anybody knows that deserves to be there and it isnt [Fri Jul 17 10:37:21 2015] otherwise I'll hit google [Fri Jul 17 10:37:41 2015] date of there's => date or if there's [Fri Jul 17 10:38:09 2015] Probably it is up to date. At least that is what I think [Fri Jul 17 10:38:37 2015] ok [Fri Jul 17 10:38:46 2015] There might be some apps which are not listed [Fri Jul 17 10:40:26 2015] Does anyone know the proper syntax to pass column name into the query? [nm::Name] UPDATE t SET nm = {[v]} WHERE Id={[pk]} [Fri Jul 17 10:48:09 2015] Alx_: just curious, using mysql? sqlite? [Fri Jul 17 10:49:02 2015] postgresql [Fri Jul 17 10:50:21 2015] because of proper transactions support [Fri Jul 17 10:50:35 2015] sqlite is quite handy for development [Fri Jul 17 10:54:01 2015] my recent question - I have figured that out. dml (UPDATE t SET {nm}={[v]} WHERE Id={[pk]}) seems to work for me [Fri Jul 17 14:03:30 2015] rjmacready me and my friend have written a few things in urweb [Fri Jul 17 14:04:24 2015] like https://github.com/yuuko/Gallury [Fri Jul 17 14:05:25 2015] and i ported parsec to urweb but its not really an "app" and it doesnt actually work https://github.com/yuuko/Purrsec [Fri Jul 17 14:17:46 2015] sunnymilk: thanks, i'll check that out [Fri Jul 17 15:28:18 2015] darn, why did i never find purrsec before? i wrote https://github.com/tokenrove/parsur (unfinished) not that long ago [Fri Jul 17 15:28:54 2015] tokenrove, nice [Fri Jul 17 15:29:14 2015] thanks for share we had problems with parsec originally [Fri Jul 17 15:34:35 2015] the reason purrsec doesnt work isnt because its incorrect but because the compiler rejects non-trivial programs using it for having lambdas at code generation time [Fri Jul 17 15:34:55 2015] or, that was the problem i ran into [Fri Jul 17 15:34:59 2015] maybe it is fixed since then [Fri Jul 17 15:35:05 2015] yeah, I had a huge amount of problems with that and also problems with the typing of monads [Fri Jul 17 15:35:18 2015] which is what led to some of the strange functor manipulations in parsur [Fri Jul 17 15:35:22 2015] impressive you were able to get around it [Fri Jul 17 15:35:35 2015] it was very frustrating. [Sat Jul 18 16:20:48 2015] Hello everyone; pardon what is, I'm sure, a hopelessly naive question: why is lib/ur/top.ur foldUR not just foldR with K assigned to be Unit? (Maybe, additionally, wrapping foldUR's tf :: Type in a type-level const to fit foldR's tf :: K -> Type?) [Sun Jul 19 15:46:00 2015] Hi [Sun Jul 19 15:51:36 2015] is there a complete description anywhere of the arguments that can be passed to the urweb compiler? [Sun Jul 19 15:52:22 2015] (in particular, to override the MySQL include path which currently fails in Ubuntu) [Sun Jul 19 15:58:20 2015] Desty: The manual has all the arguments you can pass to the compiler. [Sun Jul 19 15:59:53 2015] But overriding the MySQL include path has to be done at compile-time, IIRC. [Sun Jul 19 16:00:07 2015] Er, that’s the time at which you compile the compiler, not the time at which you compile your app. [Sun Jul 19 16:01:22 2015] Yes, include paths are probably arguments to 'configure'. [Sun Jul 19 16:10:04 2015] yeah, that seems fine now. I made the mistake of running make with "-j2" which freezes my laptop solid for about 10 minutes :-/ [Sun Jul 19 16:10:17 2015] seems like Milton places a heavy load on the system [Sun Jul 19 16:26:22 2015] But there shouldn't be multiple MLtons at once, so I don't see why "-j2" would be so bad there. [Sun Jul 19 16:35:56 2015] I can't remember running it without that, so maybe it happens in any case. Seems that the build process takes all the RAM and the system enters swap death for a while... [Sun Jul 19 16:49:49 2015] Desty: Do you have an unusually small amount of RAM? [Sun Jul 19 16:57:01 2015] 8gb [Sun Jul 19 16:58:17 2015] alkabetz: But usually half of it is in use... so maybe swapping that much on a non-SSD disk is enough to freeze my machine to a crawl [Sun Jul 19 17:02:49 2015] I expect that building 'urweb' with MLton takes about 1 GB of RAM. [Sun Jul 19 17:03:40 2015] That’s been my experience as well. [Sun Jul 19 17:17:42 2015] I just ran it again (without "-j2") and quickly switched to "htop" in another tab. It froze up again for a few minutes, and at one point htop reported mlton was using 3.8 GB. [Sun Jul 19 17:18:16 2015] alkabetz: Have you built the latest version? (20150520 snapshot) [Sun Jul 19 17:18:35 2015] perhaps it's related to the "ram slop" of 0.5? [Sun Jul 19 17:18:44 2015] Desty: Yes. It sounds like your MLton might be sad. Did you install it from Apt, or did you compile it yourself? [Sun Jul 19 17:19:40 2015] Desty: Oh, huh, that does sound like it might have an effect, assuming MLton is compiled with MLton (I think it is). [Sun Jul 19 17:20:32 2015] alkabetz: I think it's installed via apt, and looks pretty old: "MLton 20100608" [Sun Jul 19 17:20:53 2015] Yeah, MLton hasn’t seen love in Debian for a while. I’m working on that, but it’s on the back burner right now. [Sun Jul 19 17:21:03 2015] Anyway, it shouldn’t be a problem, because I’ve compiled Ur/Web with that version before. [Sun Jul 19 17:21:08 2015] Try exporting MLTONARGS="-runtime 'ram-slop 0.1'", and then re-run the build process. [Sun Jul 19 17:21:18 2015] (Including ./configure.) [Sun Jul 19 17:26:14 2015] it seems to pick up arguments, but still uses 0.5 during the build (start of argline from ps looks like "/usr/lib/mlton/mlton-compile @MLton ram-slop 0.5 -- /usr/lib/mlton") [Sat Jul 25 20:02:27 2015] hi, just trying to get started with ur/web but running the demo creation command as described in the intro tutorial gives error: Io: openIn "demo/prose" failed with SysErr: No such file or directory [noent] [Sat Jul 25 20:04:46 2015] oh wait, I wasnt actually in the urweb package directory (I just assumed you can run it from any directory) [Sat Jul 25 20:05:35 2015] but it still fails because I haven't installed it with make install and it looks for files in /usr/local/lib [Sun Jul 26 17:06:09 2015] Remember when that user was asking about why MLton wants so much RAM? Well, turns out when I build the Debian packages for Ur/Web, I see MLton using 4 GiB resident. [Sun Jul 26 17:06:16 2015] I just never noticed it, because I have 24 GiB at my disposal. [Sun Jul 26 19:08:08 2015] that's a lot of RAM. [Sun Jul 26 19:24:18 2015] Okay, I got my Debian bits, and I’ve just uploaded the 20150520 release. It should make its way out to the mirrors in the next day or two. [Sun Jul 26 19:43:11 2015] Hey guys [Sun Jul 26 19:50:53 2015] hi [Sun Jul 26 19:53:07 2015] Is there any kind of shorthand or prebuilt function for concatenating lists? [Sun Jul 26 19:53:16 2015] In OCaml I can just write @, but that doesn't appear to be implemented [Sun Jul 26 19:54:45 2015] tamago_: have you looked at http://hyperpolyglot.org/ml ? [Sun Jul 26 19:55:29 2015] I've just started with ur/web, but it seems to be based on standard ML, which uses '^' for concatenation [Sun Jul 26 19:55:52 2015] oh, that's just strings... so it should be '@' as well, or List.concat [Sun Jul 26 19:56:22 2015] ah I hadn't thanks. That's helpful. [Sun Jul 26 19:59:42 2015] unfortunately either there's a list module that I didn't install right or neither works >_< [Sun Jul 26 19:59:56 2015] You know, Concat does exist for type level records, in the form of the ++ operator. [Sun Jul 26 20:01:01 2015] oh well I can just write my own concat function. It just feels like the sort of thing that can be efficiently handled natively. [Sun Jul 26 20:28:46 2015] Also apparently [x] doesn't work. You have to say x::[] [Tue Jul 28 23:41:14 2015] Hey. I've been working through the official type level computation tutorial. I thought I would try to modify the join function given there so that it could act differently depending on the types given (but just really basic, no option types, etc). [Tue Jul 28 23:41:21 2015] So this is what I wrote [Tue Jul 28 23:41:28 2015] fun join [ts ::: {Type}] (fl : folder ts) (r : $(ts)) : int = @fold [fn ts => $(ts) -> int] (fn [nm ::_] [v ::_] [r ::_] [[nm] ~ r] (f : $(r) -> int) => fn r : $([nm = v] ++ r) => case r.nm of | string => 63 | int => 440 | boolean => 50 | _ => 20) (fn _ : $([]) => 7) fl r [Tue Jul 28 23:42:01 2015] Can anyone help me understand why the case statement [Tue Jul 28 23:42:01 2015] case r.nm of | string => 63 | int => 440 | boolean => 50 | _ => 20 [Tue Jul 28 23:42:08 2015] Always returns the first type listed? [Tue Jul 28 23:42:19 2015] So the result of this is 63 [Tue Jul 28 23:42:28 2015] If I deleted that case it would be 440 [Thu Jul 30 09:15:18 2015] are there any resources on how to migrate/adapt/whatever an existing html + css + javascript "control" (for instance, chessboard.js) into ur/web ? [Thu Jul 30 09:29:16 2015] do you want to call it via the FFI or actually reimplement it in urweb? [Thu Jul 30 09:30:23 2015] i could try to reimplement it. [Thu Jul 30 09:33:23 2015] there are examples of calling existing javascript via the FFI in bazqux reader. for re-implementing it, that would make a great tutorial but i am not aware of an existing example of that. [Thu Jul 30 09:37:11 2015] hmm [Thu Jul 30 09:37:23 2015] maybe i'll give it a try [Thu Jul 30 09:37:40 2015] if i get anything done, i'll get back to you [Thu Jul 30 09:38:06 2015] i find it's 95% really effortless and enjoyable, and 5% total pain and suffering. good luck. [Thu Jul 30 09:39:47 2015] ahah thx :) [Thu Jul 30 10:06:01 2015] bazqux seems to have some code in haskell [Thu Jul 30 10:07:48 2015] as I understand it, the backend is in haskell and only the frontend is in ur/web. a few of those projects also seem to use a lot of haskell for various kinds of build glue. [Thu Jul 30 10:09:35 2015] hmm, my brain hurts with monads. the simplest examples seem so simple, the most regular uses seem so opaque (to me) [Thu Jul 30 10:11:25 2015] is it possible to implement the backend in ur/web itself? or maybe use ocaml? [Thu Jul 30 10:12:53 2015] for bazqux? surely, but i don't know the details. i think the author hangs out here and might be able to comment. [Thu Jul 30 10:14:19 2015] one thing is that reading and writing files is a huge pain in the ass in urweb, so you end up leaning heavily on the database, and implementing anything that absolutely has to do file i/o in another language. [Thu Jul 30 10:20:02 2015] ah i see [Thu Jul 30 11:40:22 2015] interesting read: http://blog.ezyang.com/2012/07/managing-the-server-client-split-in-ur-web/ [Thu Jul 30 15:01:12 2015] Can I create an FFI module which is implemented in both C and JavaScript, with the compiler picking the correct implementation as appropriate? [Thu Jul 30 15:08:32 2015] Oh, huh, looking at the manual suggests it might Just Work. Let me try a bit and get back to everyone. [Thu Jul 30 20:22:11 2015] It does in fact Just Work. You can specify a jsFunc directive in the .urp file to map a function to its JavaScript definition, and it can also be backed by a C definition on the server side. [Mon Aug 3 01:11:50 2015] Guys I have a weird issue [Mon Aug 3 01:11:56 2015] I want to make a function that returns xml, but not a page [Mon Aug 3 01:12:08 2015] It's just a helper function [Mon Aug 3 01:12:13 2015] But I can't get the signature right. [Mon Aug 3 01:12:43 2015] So like fun foo () = [Mon Aug 3 01:27:25 2015] ah... it's "page" not xml. The examples give "transaction page"... I see..... [Mon Aug 3 19:14:27 2015] welcome [Tue Aug 4 23:12:47 2015] Is there a way to convert strings to int (as in "56" to 56) in Ur/Web? [Tue Aug 4 23:13:04 2015] (without manually parsing the string, that is) [Tue Aug 4 23:13:43 2015] I want to make an input that accepts int, but the only examples I found in the demo that do that are really complex things with functors and other advanced features. [Tue Aug 4 23:13:50 2015] It feels like it should be really simple. [Wed Aug 5 08:47:24 2015] tamago_: readError [Wed Aug 5 08:47:40 2015] or read [Fri Aug 7 10:47:00 2015] nvi [Fri Aug 7 10:47:07 2015] Oops, wrong window. :P [Sat Aug 8 11:56:52 2015] Turns out debugging the javascript with NoScript on doesn't work very well :P [Tue Aug 11 17:13:17 2015] how do I include script tag in my fragment? [Tue Aug 11 18:47:47 2015] eran: You can’t embed JavaScript directly into your fragments. [Tue Aug 11 18:47:54 2015] You can load an external script, though. [Tue Aug 11 18:48:05 2015] You want some directive in your .urp file that I don’t recall off the top of my head. [Tue Aug 11 18:48:08 2015] Let me check the manual. [Tue Aug 11 18:48:25 2015] yeah there's the script directive [Tue Aug 11 18:48:36 2015] Yeah, that’s what you want. [Tue Aug 11 18:48:51 2015] More generally, what are you trying to do? [Tue Aug 11 18:49:29 2015] Is that equivalent to specifying a