<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[RPP 国产开源编程语言]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/roundsheep</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; roundsheep]]></copyright><item><title><![CDATA[一种可以自我修改的计算机器]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/88803218</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/88803218</guid><author>roundsheep</author><pubDate>Mon, 25 Mar 2019 18:58:24 +0800</pubDate><description><![CDATA[有这样一堆可以存储数字的方格：




0
0
0
0
0
0
0
0




0
0
0
0
0
0
0
0


0
0
0
0
0
0
0
0


0
0
0
0
0
0
0
0


…
…
…







如果我们可以对其中任意2个方格进行“或"运算并写入任意1个方格，或者对任意1个方格进行"非"运算并写入任意1个方格，那么由无限个方格和操作组成的机器是图灵完备的吗？答案是肯定的，下面我将...]]></description><category></category></item><item><title><![CDATA[符号变换引擎（Symbol Transform Engine - STE）]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39928737</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39928737</guid><author>roundsheep</author><pubDate>Thu, 09 Oct 2014 12:39:44 +0800</pubDate><description><![CDATA[在写编译器的过程中，我意识到编译其实是一种符号变换，比如C语言编译成机器码，其实是C源码文件中的符号变换成EXE的16进制符号，这和中文翻译成英语的语言翻译器没什么区别。
    每个程序员都有自己喜欢的编程语言和编码风格，所以世界上就出现了大量的编程语言，各种编程语言之间相互通信并不那么简单，C语言是个例外，所以C语言适合做接口。
    那么能不能写一个通用的引擎充当各种语言的中间翻译层呢]]></description><category></category></item><item><title><![CDATA[超越lua的神语言]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39828569</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39828569</guid><author>roundsheep</author><pubDate>Mon, 06 Oct 2014 14:48:39 +0800</pubDate><description><![CDATA[神语言（god）是基于lua和RPP的新一代编程语言


为什么需要它？

1.很多人不喜欢lua的语法，god的语法更像C

2.god支持元编程、闭包、协程

3.凡是lua支持的特性god也支持，lua不支持的宏god也支持，因此god比lua强大

4.god可以使用lua库，甚至允许god和lua混合编程

5.god是最快的脚本语言之一，性能与C接近，因为god基于luaJIT

6.]]></description><category></category></item><item><title><![CDATA[欢天喜地迎国庆，国产开源编程语言 RPP 1.87 发布！]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39719197</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39719197</guid><author>roundsheep</author><pubDate>Wed, 01 Oct 2014 18:48:45 +0800</pubDate><description><![CDATA[更新如下：
1.支持超级宏
2.修复bug]]></description><category></category></item><item><title><![CDATA[数组为什么这么有用？]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39667947</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39667947</guid><author>roundsheep</author><pubDate>Mon, 29 Sep 2014 12:03:37 +0800</pubDate><description><![CDATA[Lisp只用原子和表就构建了整个世界，其实数组是表的超集（略作思考就能发现，无需证明）。JS的关联数组是红黑树，关联数组并不是C数组的超集，因为C数组可以当成一片连续内存使用。]]></description><category></category></item><item><title><![CDATA[计算理论的重大突破，无限深度递归]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39667593</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39667593</guid><author>roundsheep</author><pubDate>Mon, 29 Sep 2014 11:33:48 +0800</pubDate><description><![CDATA[目前无论是Lisp还是Javascript（C++就更不用说了），递归深度都远远低于可用内存大小，而且栈一旦分配就无法挪动（有指针似乎无解），这个问题的根源在于call指令会把下一指令的地址入栈。我经过几年的思考终于发现，可以把C++的内存模型完全放在堆上，也就是说进行call之前先new出调用函数所需要的空间，而把返回地址作为参数传递进去。这样就从根源上解决了此问题，那什么尾递归就是个渣，完全没]]></description><category></category></item><item><title><![CDATA[RPP 1.86 gamma 开源发布]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39617769</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39617769</guid><author>roundsheep</author><pubDate>Sat, 27 Sep 2014 21:16:11 +0800</pubDate><description><![CDATA[更新如下：
1.增加JITdab]]></description><category></category></item><item><title><![CDATA[为什么RPP比lua更适合做脚本语言？]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39617281</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39617281</guid><author>roundsheep</author><pubDate>Sat, 27 Sep 2014 20:58:26 +0800</pubDate><description><![CDATA[1.RPP以静态类型为主，最终的效率肯定比动态类型的lua要高，并且不会引起GC停顿。（目前与luaJIT性能接近）
2.RPP没有GC（自动垃圾回收），与C/C++互相调用简单直接，而且他们共享进程内存空间，RPP变量和C++变量生命周期相同，不会出现像lua一样的这里变量已经GC了那边还在使用。

3.RPP目前兼容50%的C++语法，70%的C语法，因此它天生就更亲近C++系的语法，所]]></description><category></category></item><item><title><![CDATA[好消息！国产编程语言RPP 1.86 开源发布！]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/39578675</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/39578675</guid><author>roundsheep</author><pubDate>Fri, 26 Sep 2014 12:08:52 +0800</pubDate><description><![CDATA[更新如下： 
1.全新JIT引擎，极致的编译和运行速度。 
2.精简Lisp内核，无限的动态扩展能力。 
3.完全开源，真正的开源不需要协议。 
4.集成IDE，编辑、编译、运行一体化，支持代码自动完成。
5.兼容50%的C++语法，70%的C语言，编译器本身使用C++编写，但其90%的源码都可以自我编译。


源码下载地址：
http://pan.baidu.com/s/1bn]]></description><category></category></item><item><title><![CDATA[KMP算法]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/38428293</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/38428293</guid><author>roundsheep</author><pubDate>Fri, 08 Aug 2014 00:20:10 +0800</pubDate><description><![CDATA[/*
KMP算法
*/

void main()
{
	putsl(find('abc123','c1'))
	putsl(find('abc123','c2'))
}

int find(rstr s,rstr p)
{
	next=get_next(p)
	i=0
	j=0
	for i<s.count&&j<p.count
		if j==-1||s[i]==p[j]
			i++
			j]]></description><category></category></item><item><title><![CDATA[全排列]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/38407775</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/38407775</guid><author>roundsheep</author><pubDate>Wed, 06 Aug 2014 22:19:29 +0800</pubDate><description><![CDATA[/*
全排列的非递归实现，支持去掉重复
*/

void main()
{
	rbuf v
	#v.push(1,2,3,4)
	for
		v.join('').printl
		ifn next_permutation(v)
			break
}

bool next_permutation(rbuf& v)
{
	if v.count<=1
		return false
	next=v.co]]></description><category></category></item><item><title><![CDATA[5种语言混合编程：C++、JS、python、Lisp、汇编]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/33706561</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/33706561</guid><author>roundsheep</author><pubDate>Mon, 23 Jun 2014 09:29:23 +0800</pubDate><description><![CDATA[/*
混合C++、JS、python、Lisp、汇编
1种语言，5种语法
*/

main
{
	//C++
	vector v;
	v.push(2);
	putsl(v.size());
	if(v.count()==1)
	{
		putsl("abc");
	}

	//JS
	var a=function(x){
		return x*2;
	}
	putsl(a(3));
	a={90]]></description><category></category></item><item><title><![CDATA[至尊高速，国产语言RPP 1.83强势来袭]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/29557015</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/29557015</guid><author>roundsheep</author><pubDate>Mon, 09 Jun 2014 09:47:01 +0800</pubDate><description><![CDATA[下面是 R++的性能测试数据：（奔腾 1.86GHZ，测试 3 次取平均值）




运行效率：
R++的内部结构和 C++大致相同，所以理论上 R++可以达到和 C++一样的运行速度，
目前 R++已开启汇编级内联展开和模式匹配优化，在编译成机器码的情况下运行
速度是 C++的 1/1.8（真实速度应该是 1/3），解释运行是 C++的 1/10.7。目前的
性能与 luaJI]]></description><category></category></item><item><title><![CDATA[VS2012的变态优化，双循环变单循环]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/28602327</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/28602327</guid><author>roundsheep</author><pubDate>Thu, 05 Jun 2014 11:14:33 +0800</pubDate><description><![CDATA[VS2010也是一样]]></description><category></category></item><item><title><![CDATA[极速体验，国产编程语言R++1.81内测版发布]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/28596333</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/28596333</guid><author>roundsheep</author><pubDate>Thu, 05 Jun 2014 10:12:49 +0800</pubDate><description><![CDATA[性能提高了31%，目前编译运行速度是 C++的 1/7，解释运行是C++的 1/139



http://pan.baidu.com/s/1mgmfikS]]></description><category></category></item><item><title><![CDATA[汇编优化工具]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/28249085</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/28249085</guid><author>roundsheep</author><pubDate>Tue, 03 Jun 2014 12:39:04 +0800</pubDate><description><![CDATA[/*
汇编优化工具
使汇编代码更具可读性，并提高汇编速度
优化15000行大约需要30秒
*/

import rfile.h

main
{
	name=getsl
	s=rfile.read_all_n(name)

	s=s.replace('\n','\r\n')
	s=s.replace('dword esp','esp')
	s=s.replace('dword ebp','ebp')]]></description><category></category></item><item><title><![CDATA[仅用位运算实现加减乘除，面试专用]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/27699617</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/27699617</guid><author>roundsheep</author><pubDate>Fri, 30 May 2014 17:33:26 +0800</pubDate><description><![CDATA[从C语言翻译过来的：


main
{
	fadd(1,2).printl
	fadd(19,29999).printl

	fsub(-1,3).printl
	fsub(19,2345).printl

	fmul(99,98).printl
	fmul(-29,235).printl

	fdiv(99,98).printl
	fdiv(9,3).printl
	fdiv(-9,3).]]></description><category></category></item><item><title><![CDATA[50行代码实现正则引擎]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/27055711</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/27055711</guid><author>roundsheep</author><pubDate>Mon, 26 May 2014 09:54:27 +0800</pubDate><description><![CDATA[/*
50行代码实现正则引擎，参考《代码之美》，可以轻松解决95％的正则问题

c 匹配任意的字母c 
.（句点） 匹配任意的单个字符 
^ 匹配输入字符串的开头 
$ 匹配输入字符串的结尾 
* 匹配前一个字符的零个或者多个出现
*/

main
{
	putsl match('.*txt','2343txt')
	putsl match('t.t','2343txt')
}

bool mat]]></description><category></category></item><item><title><![CDATA[60行R++代码实现Lisp解释器]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/25717231</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/25717231</guid><author>roundsheep</author><pubDate>Tue, 13 May 2014 15:51:46 +0800</pubDate><description><![CDATA[还没有处理lambda、上下文等，有待完善。
main
{
	for
		putsl(eval(getsl))
}

rstr eval(rstr s)
{
	s=tokenize(s)
	v=s.split(' ')
	if v.get(0)!='('
		return v.get(0)
	next=find(v.sub(2))+2
	switch v.get(1)
	case '+'
		r]]></description><category></category></item><item><title><![CDATA[热烈庆祝国产编程语言R++1.8研发成功]]></title><link>https://blog.youkuaiyun.com/roundsheep/article/details/25594133</link><guid>https://blog.youkuaiyun.com/roundsheep/article/details/25594133</guid><author>roundsheep</author><pubDate>Mon, 12 May 2014 09:51:30 +0800</pubDate><description><![CDATA[R++是专为懒人设计的国产编程语言，支持无操作系统裸奔、编译成机器码、android、cocos2dx绑定、中文编程、闭包、惰性求值、JSON、Lisp的S表达式、内联汇编、伪代码、模板、宏、多重继承、元编程、反射、自省、指针、引用。




为什么需要它？


1.目前DIY操作系统一般使用gcc+nasm，R++是编译型语言，抽象能力强过C，可直接内联汇编，不需要面对讨厌的AT]]></description><category></category></item></channel></rss>