<div dir="ltr">Hi, when I visited the introductory web page the language looked like Standard ML and so I got curious and wanted to experiment with the language. I was thinking of doing some experiment where I read some file, do some processing, and then output the results. I think for this I would have to link up to C. This would also allow me to benchmark against Haskell.<div><br></div><div>I tried your patched version of Ur with mozert1's example and it worked for me. Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 3, 2015 at 2:44 PM, Adam Chlipala <span dir="ltr"><<a href="mailto:adamc@csail.mit.edu" target="_blank">adamc@csail.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
I don't see why you'd want to use such a gross interface as
printf(). :P<br>
<br>
As has already been pointed out, you can compile with the flag
'-protocol static' to get an executable that expects to be called on
the command line with a URL as an argument; then it prints the HTTP
response.<br>
<br>
We'd need to hear more about your use case to give better advice.
Be forewarned that Ur/Web really is a domain-specific language for
web applications, and it is not going to be pleasant to use to build
other kinds of programs.<span class=""><br>
<br>
<div>On 05/03/2015 09:13 AM, Artella Coding
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi, would it be possible to use the C printf using
the FFI? If so is there a demo using the foreign function
interface? Thanks</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, May 3, 2015 at 1:48 PM, Sergey
Mironov <span dir="ltr"><<a href="mailto:grrwlf@gmail.com" target="_blank">grrwlf@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi. Ur/Web
compiler can create standalone executables, but it doesn't<br>
provide things many other languages provide. In particular,
the Basis<br>
library doesn't support stdin/stdout nor the file system
access<br>
functions.<br>
Instead, you can create an executable containing built-in
web server<br>
which knows how to serve page named 'main' displaying 'hello
world'.<br>
After running your application (by calling it from the
command line),<br>
you will be able to access the page with 'curl'.<br>
<br>
Regards,<br>
Sergey<br>
<div>
<div><br>
2015-05-03 14:21 GMT+03:00 Artella Coding <<a href="mailto:artella.coding@googlemail.com" target="_blank">artella.coding@googlemail.com</a>>:<br>
> Hi,<br>
><br>
> Is it possible for me to create a standalone "Hello
world" executable/binary<br>
> in linux which I can run in the command prompt
(i.e. without having to deal<br>
> with the browser)?<br>
><br>
> Thanks<br>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</span></div>
<br>_______________________________________________<br>
Ur mailing list<br>
<a href="mailto:Ur@impredicative.com">Ur@impredicative.com</a><br>
<a href="http://www.impredicative.com/cgi-bin/mailman/listinfo/ur" target="_blank">http://www.impredicative.com/cgi-bin/mailman/listinfo/ur</a><br>
<br></blockquote></div><br></div>