From 7b185cc2f3e1062ade8f377b5491bee966d362ad Mon Sep 17 00:00:00 2001 From: Dario Bertini Date: Fri, 23 Oct 2015 20:49:05 +0100 Subject: [PATCH 01/16] Switch to MagicPython for Python sources --- .gitmodules | 3 +++ grammars.yml | 3 ++- vendor/grammars/MagicPython | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/MagicPython diff --git a/.gitmodules b/.gitmodules index be2d7b30..c1975e6e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -683,3 +683,6 @@ [submodule "vendor/grammars/FreeMarker.tmbundle"] path = vendor/grammars/FreeMarker.tmbundle url = https://github.com/freemarker/FreeMarker.tmbundle +[submodule "vendor/grammars/MagicPython"] + path = vendor/grammars/MagicPython + url = git@github.com:MagicStack/MagicPython.git diff --git a/grammars.yml b/grammars.yml index 4eee0d23..19f55efa 100644 --- a/grammars.yml +++ b/grammars.yml @@ -346,8 +346,9 @@ vendor/grammars/language-jsoniq/: - source.xq vendor/grammars/language-ncl: - source.ncl -vendor/grammars/language-python: +vendor/grammars/MagicPython: - source.python +vendor/grammars/language-python: - source.regexp.python - text.python.console - text.python.traceback diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython new file mode 160000 index 00000000..13bf5348 --- /dev/null +++ b/vendor/grammars/MagicPython @@ -0,0 +1 @@ +Subproject commit 13bf534834036911c57d15c40242e45783aad1ba From aa2e3000cd79c19f08b1eb62ca4dc413d857df5f Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 16 Dec 2015 14:00:48 -0500 Subject: [PATCH 02/16] Remove copypasta artifact. --- samples/Mathematica/TestString.mt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Mathematica/TestString.mt b/samples/Mathematica/TestString.mt index c0d61036..20539407 100644 --- a/samples/Mathematica/TestString.mt +++ b/samples/Mathematica/TestString.mt @@ -1 +1 @@ -Test[1"a" <> "b", "ab", TestID -> "Concat \"a\" and \"b\""] +Test["a" <> "b", "ab", TestID -> "Concat \"a\" and \"b\""] From 71dfac26fe4e6d1541f1e5390e566965d6850aed Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 20 Dec 2015 13:09:00 +0100 Subject: [PATCH 03/16] .wiki extension as Mediawiki --- lib/linguist/languages.yml | 1 + samples/MediaWiki/README.wiki | 694 ++++++++++++++++++++++++++++++++++ 2 files changed, 695 insertions(+) create mode 100644 samples/MediaWiki/README.wiki diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c5eb9e6a..c20a549f 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2108,6 +2108,7 @@ MediaWiki: wrap: true extensions: - .mediawiki + - .wiki tm_scope: text.html.mediawiki ace_mode: text diff --git a/samples/MediaWiki/README.wiki b/samples/MediaWiki/README.wiki new file mode 100644 index 00000000..546c3290 --- /dev/null +++ b/samples/MediaWiki/README.wiki @@ -0,0 +1,694 @@ += Name = + +'''nginx_tcp_proxy_module''' - support TCP proxy with Nginx + += Installation = + +Download the latest stable version of the release tarball of this module from [http://github.com/yaoweibin/nginx_tcp_proxy_module github] + +Grab the nginx source code from [http://nginx.org/ nginx.org], for example, the version 1.2.1 (see nginx compatibility), and then build the source with this module: + + + $ wget 'http://nginx.org/download/nginx-1.2.1.tar.gz' + $ tar -xzvf nginx-1.2.1.tar.gz + $ cd nginx-1.2.1/ + $ patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch + + $ ./configure --add-module=/path/to/nginx_tcp_proxy_module + + $ make + $ make install + + + += Synopsis = + + +http { + + server { + listen 80; + + location /status { + tcp_check_status; + } + } +} + + + + +#You can also include tcp_proxy.conf file individually + +#include /path/to/tcp_proxy.conf; + +tcp { + + upstream cluster { + # simple round-robin + server 192.168.0.1:80; + server 192.168.0.2:80; + + check interval=3000 rise=2 fall=5 timeout=1000; + + #check interval=3000 rise=2 fall=5 timeout=1000 type=ssl_hello; + + #check interval=3000 rise=2 fall=5 timeout=1000 type=http; + #check_http_send "GET / HTTP/1.0\r\n\r\n"; + #check_http_expect_alive http_2xx http_3xx; + } + + server { + listen 8888; + + proxy_pass cluster; + } +} + + += Description = + +This module actually include many modules: ngx_tcp_module, ngx_tcp_core_module, ngx_tcp_upstream_module, ngx_tcp_proxy_module, ngx_tcp_websocket_module, ngx_tcp_ssl_module, ngx_tcp_upstream_ip_hash_module. All these modules work together to support TCP proxy with Nginx. I also added other features: ip_hash, upstream server health check, status monitor. + +The motivation of writing these modules is Nginx's high performance and robustness. At first, I developed this module just for general TCP proxy. And now, this module is frequently used in websocket reverse proxying. + +Note, You can't use the same listening port with HTTP modules. + += Directives = + +== ngx_tcp_moodule == + +=== tcp === + +'''syntax:''' ''tcp {...}'' + +'''default:''' ''none'' + +'''context:''' ''main'' + +'''description:''' All the tcp related directives are contained in the tcp block. + + +'''ngx_tcp_core_moodule''' + +=== server === + +'''syntax:''' ''server {...}'' + +'''default:''' ''none'' + +'''context:''' ''tcp'' + +'''description:''' All the specific server directives are contained in the server block. + +=== listen === + +'''syntax:''' ''listen address:port [ bind | ssl | default]'' + +'''default:''' ''none'' + +'''context:''' ''server'' + +'''description:''' The same as [http://wiki.nginx.org/NginxMailCoreModule#listen listen]. The parameter of default means the default server if you have several server blocks with the same port. + +=== access_log === + +'''syntax:''' ''access_log path [buffer=size] | off'' + +'''default:''' ''access_log logs/tcp_access.log'' + +'''context:''' ''tcp, server'' + +'''description:''' Set the access.log. Each record's format is like this: + +
+
+log_time worker_process_pid client_ip host_ip accept_time upstream_ip bytes_read bytes_write
+
+2011/08/02 06:19:07 [5972] 127.0.0.1 0.0.0.0:1982 2011/08/02 06:18:19 172.19.0.129:80 80 236305
+
+
+ +* ''log_time'': The current time when writing this log. The log action is called when the proxy session is closed. +* ''worker_process_pid'': the pid of worker process +* ''client_ip'': the client ip +* ''host_ip'': the server ip and port +* ''accept_time'': the time when the server accepts client's connection +* ''upstream_ip'': the upstream server's ip +* ''bytes_read'': the bytes read from client +* ''bytes_write'': the bytes written to client + +=== allow === + +'''syntax:''' ''allow [ address | CIDR | all ]'' + +'''default:''' ''none'' + +'''context:''' ''server'' + +'''description:''' Directive grants access for the network or addresses indicated. + +=== deny === + +'''syntax:''' ''deny [ address | CIDR | all ]'' + +'''default:''' ''none'' + +'''context:''' ''server'' + +'''description:''' Directive grants access for the network or addresses indicated. + +=== so_keepalive === + +'''syntax:''' ''so_keepalive on|off'' + +'''default:''' ''off'' + +'''context:''' ''main, server'' + +'''description:''' The same as [http://wiki.nginx.org/NginxMailCoreModule#so_keepalive so_keepalive]. + +=== tcp_nodelay === + +'''syntax:''' ''tcp_nodelay on|off'' + +'''default:''' ''on'' + +'''context:''' ''main, server'' + +'''description:''' The same as [http://wiki.nginx.org/NginxHttpCoreModule#tcp_nodelay tcp_nodelay]. + +=== timeout === + +'''syntax:''' ''timeout milliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''main, server'' + +'''description:''' set the timeout value with clients. + +=== server_name === + +'''syntax:''' ''server_name name'' + +'''default:''' ''The name of the host, obtained through gethostname()'' + +'''context:''' ''tcp, server'' + +'''description:''' The same as [http://wiki.nginx.org/NginxMailCoreModule#server_name server_name]. You can specify several server name in different server block with the same port. They can be used in websocket module. + +=== resolver === + +'''syntax:''' ''resolver address'' + +'''default:''' ''none'' + +'''context:''' ''tcp, server'' + +'''description:''' DNS server + +=== resolver_timeout === + +'''syntax:''' ''resolver_timeout time'' + +'''default:''' ''30s'' + +'''context:''' ''tcp, server'' + +'''description:''' Resolver timeout in seconds. + + +== ngx_tcp_upstream_module == + +=== upstream === + +'''syntax:''' ''upstream {...}'' + +'''default:''' ''none'' + +'''context:''' ''tcp'' + +'''description:''' All the upstream directives are contained in this block. The upstream server will be dispatched with round robin by default. + +=== server === + +'''syntax:''' ''server name [parameters]'' + +'''default:''' ''none'' + +'''context:''' ''upstream'' + +'''description:''' Most of the parameters are the same as [http://wiki.nginx.org/NginxHttpUpstreamModule#server server]. Default port is 80. + +=== check === + +'''syntax:''' ''check interval=milliseconds [fall=count] [rise=count] [timeout=milliseconds] [type=tcp|ssl_hello|smtp|mysql|pop3|imap]'' + +'''default:''' ''none, if parameters omitted, default parameters are interval=30000 fall=5 rise=2 timeout=1000'' + +'''context:''' ''upstream'' + +'''description:''' Add the health check for the upstream servers. At present, the check method is a simple tcp connect. + +The parameters' meanings are: + +* ''interval'': the check request's interval time. +* ''fall''(fall_count): After fall_count check failures, the server is marked down. +* ''rise''(rise_count): After rise_count check success, the server is marked up. +* ''timeout'': the check request's timeout. +* ''type'': the check protocol type: +# ''tcp'' is a simple tcp socket connect and peek one byte. +# ''ssl_hello'' sends a client ssl hello packet and receives the server ssl hello packet. +# ''http'' sends a http request packet, receives and parses the http response to diagnose if the upstream server is alive. +# ''smtp'' sends a smtp request packet, receives and parses the smtp response to diagnose if the upstream server is alive. The response begins with '2' should be an OK response. +# ''mysql'' connects to the mysql server, receives the greeting response to diagnose if the upstream server is alive. +# ''pop3'' receives and parses the pop3 response to diagnose if the upstream server is alive. The response begins with '+' should be an OK response. +# ''imap'' connects to the imap server, receives the greeting response to diagnose if the upstream server is alive. + +=== check_http_send === + +'''syntax:''' ''check_http_send http_packet'' + +'''default:''' ''"GET / HTTP/1.0\r\n\r\n"'' + +'''context:''' ''upstream'' + +'''description:''' If you set the check type is http, then the check function will sends this http packet to check the upstream server. + +=== check_http_expect_alive === + +'''syntax:''' ''check_http_expect_alive [ http_2xx | http_3xx | http_4xx | http_5xx ]'' + +'''default:''' ''http_2xx | http_3xx'' + +'''context:''' ''upstream'' + +'''description:''' These status codes indicate the upstream server's http response is OK, the backend is alive. + +=== check_smtp_send === + +'''syntax:''' ''check_smtp_send smtp_packet'' + +'''default:''' ''"HELO smtp.localdomain\r\n"'' + +'''context:''' ''upstream'' + +'''description:''' If you set the check type is smtp, then the check function will sends this smtp packet to check the upstream server. + +=== check_smtp_expect_alive === + +'''syntax:''' ''check_smtp_expect_alive [smtp_2xx | smtp_3xx | smtp_4xx | smtp_5xx]'' + +'''default:''' ''smtp_2xx'' + +'''context:''' ''upstream'' + +'''description:''' These status codes indicate the upstream server's smtp response is OK, the backend is alive. + +=== check_shm_size === + +'''syntax:''' ''check_shm_size size'' + +'''default:''' ''(number_of_checked_upstream_blocks + 1) * pagesize'' + +'''context:''' ''tcp'' + +'''description:''' If you store hundreds of servers in one upstream block, the shared memory for health check may be not enough, you can enlarged it by this directive. + +=== tcp_check_status === + +'''syntax:''' ''tcp_check_status'' + +'''default:''' ''none'' + +'''context:''' ''location'' + +'''description:''' Display the health checking servers' status by HTTP. This directive is set in the http block. + +The table field meanings are: + +* ''Index'': The server index in the check table +* ''Name'' : The upstream server name +* ''Status'': The marked status of the server. +* ''Busyness'': The number of connections which are connecting to the server. +* ''Rise counts'': Count the successful checking +* ''Fall counts'': Count the unsuccessful checking +* ''Access counts'': Count the times accessing to this server +* ''Check type'': The type of the check packet + + +'''ngx_tcp_upstream_busyness_module''' + +=== busyness === + +'''syntax:''' ''busyness'' + +'''default:''' ''none'' + +'''context:''' ''upstream'' + +'''description:''' the upstream server will be dispatched by backend servers' busyness. + + +'''ngx_tcp_upstream_ip_hash_module''' + +=== ip_hash === + +'''syntax:''' ''ip_hash'' + +'''default:''' ''none'' + +'''context:''' ''upstream'' + +'''description:''' the upstream server will be dispatched by ip_hash. + + +== ngx_tcp_proxy_module == + +=== proxy_pass === + +'''syntax:''' ''proxy_pass host:port'' + +'''default:''' ''none'' + +'''context:''' ''server'' + +'''description:''' proxy the request to the backend server. Default port is 80. + +=== proxy_buffer === + +'''syntax:''' ''proxy_buffer size'' + +'''default:''' ''4k'' + +'''context:''' ''tcp, server'' + +'''description:''' set the size of proxy buffer. + +=== proxy_connect_timeout === + +'''syntax:''' ''proxy_connect_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of connection to backends. + +=== proxy_read_timeout === + +'''syntax:''' ''proxy_read_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of reading from backends. + +=== proxy_send_timeout === + +'''syntax:''' ''proxy_send_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of sending to backends. + + +== ngx_tcp_websocket_module == + +=== websocket_pass === + +'''syntax:''' ''websocket_pass [path] host:port'' + +'''default:''' ''none'' + +'''context:''' ''server'' + +'''description:''' proxy the websocket request to the backend server. Default port is 80. You can specify several different paths in the same server block. + +=== websocket_buffer === + +'''syntax:''' ''websocket_buffer size'' + +'''default:''' ''4k'' + +'''context:''' ''tcp, server'' + +'''description:''' set the size of proxy buffer. + +=== websocket_connect_timeout === + +'''syntax:''' ''websocket_connect_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of connection to backends. + +=== websocket_read_timeout === + +'''syntax:''' ''websocket_read_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of reading from backends. Your timeout will be the minimum of this and the *timeout* parameter, so if you want a long timeout for your websockets, make sure to set both paramaters. + +=== websocket_send_timeout === + +'''syntax:''' ''websocket_send_timeout miliseconds'' + +'''default:''' ''60000'' + +'''context:''' ''tcp, server'' + +'''description:''' set the timeout value of sending to backends. + + +== ngx_tcp_ssl_module == + +The default config file includes this ngx_tcp_ssl_module. If you want to just compile nginx without ngx_tcp_ssl_module, copy the ngx_tcp_proxy_module/config_without_ssl to ngx_tcp_proxy_module/config, reconfigrure and compile nginx. + +=== ssl === + +'''syntax:''' ''ssl [on|off] '' + +'''default:''' ''ssl off'' + +'''context:''' ''tcp, server'' + +Enables SSL for a server. + +=== ssl_certificate === + +'''syntax:''' ''ssl_certificate file'' + +'''default:''' ''ssl_certificate cert.pem'' + +'''context:''' ''tcp, server'' + +This directive specifies the file containing the certificate, in PEM format. This file can contain also other certificates and the server private key. + +=== ssl_certificate_key === + +'''syntax:''' ''ssl_certificate_key file'' + +'''default:''' ''ssl_certificate_key cert.pem'' + +'''context:''' ''tcp, server'' + +This directive specifies the file containing the private key, in PEM format. + +=== ssl_client_certificate === + +'''syntax:''' ''ssl_client_certificate file'' + +'''default:''' ''none'' + +'''context:''' ''tcp, server'' + +This directive specifies the file containing the CA (root) certificate, in PEM format, that is used for validating client certificates. + +=== ssl_dhparam === + +'''syntax:''' ''ssl_dhparam file'' + +'''default:''' ''none'' + +'''context:''' ''tcp, server'' + +This directive specifies a file containing Diffie-Hellman key agreement protocol cryptographic parameters, in PEM format, utilized for exchanging session keys between server and client. + +=== ssl_ciphers === + +'''syntax:''' ''ssl_ciphers openssl_cipherlist_spec'' + +'''default:''' ''ssl_ciphers HIGH:!aNULL:!MD5'' + +'''context:''' ''tcp, server'' + +This directive describes the list of cipher suites the server supports for establishing a secure connection. Cipher suites are specified in the [http://openssl.org/docs/apps/ciphers.html OpenSSL] cipherlist format, for example: + + +ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; + + +The complete cipherlist supported by the currently installed version of OpenSSL in your platform can be obtained by issuing the command: +
+openssl ciphers
+
+ +=== ssl_crl === + +'''syntax:''' ''ssl_crl file'' + +'''default:''' ''none'' + +'''context:''' ''tcp, server'' + +This directive specifies the filename of a Certificate Revocation List, in PEM format, which is used to check the revocation status of certificates. + +=== ssl_prefer_server_ciphers === + +'''syntax:''' ''ssl_prefer_server_ciphers [on|off] '' + +'''default:''' ''ssl_prefer_server_ciphers off'' + +'''context:''' ''tcp, server'' + +The server requires that the cipher suite list for protocols SSLv3 and TLSv1 are to be preferred over the client supported cipher suite list. + +=== ssl_protocols === + +'''syntax:''' ''ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2]'' + +'''default:''' ''ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2'' + +'''context:''' ''tcp, server'' + +This directive enables the protocol versions specified. + +=== ssl_verify_client === + +'''syntax:''' ''ssl_verify_client on|off|optional'' + +'''default:''' ''ssl_verify_client off'' + +'''context:''' ''tcp, server'' + +This directive enables the verification of the client identity. Parameter 'optional' checks the client identity using its certificate in case it was made available to the server. + +=== ssl_verify_depth === + +'''syntax:''' ''ssl_verify_depth number'' + +'''default:''' ''ssl_verify_depth 1'' + +'''context:''' ''tcp, server'' + +This directive sets how deep the server should go in the client provided certificate chain in order to verify the client identity. + +=== ssl_session_cache === + +'''syntax:''' ''ssl_session_cache off|none|builtin:size and/or shared:name:size'' + +'''default:''' ''ssl_session_cache off'' + +'''context:''' ''tcp, server'' + +The directive sets the types and sizes of caches to store the SSL sessions. + +The cache types are: + +* off -- Hard off: nginx says explicitly to a client that sessions can not reused. +* none -- Soft off: nginx says to a client that session can be resued, but nginx actually never reuses them. This is workaround for some mail clients as ssl_session_cache may be used in mail proxy as well as in HTTP server. +* builtin -- the OpenSSL builtin cache, is used inside one worker process only. The cache size is assigned in the number of the sessions. Note: there appears to be a memory fragmentation issue using this method, please take that into consideration when using this. See "References" below. +* shared -- the cache is shared between all worker processes. The size of the cache is assigned in bytes: 1 MB cache can contain roughly 4000 sessions. Each shared cache must be given an arbitrary name. A shared cache with a given name can be used in several virtual hosts. +It's possible to use both types of cache — builtin and shared — simultaneously, for example: + + +ssl_session_cache builtin:1000 shared:SSL:10m; + + +Bear in mind however, that using only shared cache, i.e., without builtin, should be more effective. + +=== ssl_session_timeout === + +'''syntax:''' ''ssl_session_timeout time'' + +'''default:''' ''ssl_session_timeout 5m'' + +'''context:''' ''tcp, server'' + +This directive defines the maximum time during which the client can re-use the previously negotiated cryptographic parameters of the secure session that is stored in the SSL cache. + += Compatibility = + +* My test bed is 0.7.65+ + += Notes = + +The http_response_parse.rl and smtp_response_parse.rl are [http://www.complang.org/ragel/ ragel] scripts , you can edit the script and compile it like this: + + + $ ragel -G2 http_response_parse.rl + $ ragel -G2 smtp_response_parse.rl + + += TODO = + +* refact this module, make it more extendable for adding third-party modules +* manipulate header like http module's proxy_set_header +* built-in variable support +* custom log format +* syslog support +* FTP/IRC proxying + += Known Issues = + +* This module can't use the same listening port with the HTTP module. + += Changelogs = + +== v0.2.0 == + +* add ssl proxy module +* add websocket proxy module +* add upstream busyness module +* add tcp access log module + +== v0.19 == + +* add many check methods + +== v0.1 == + +* first release + += Authors = + +Weibin Yao(姚伟斌) ''yaoweibin at gmail dot com'' + += Copyright & License = + +This README template copy from [http://github.com/agentzh agentzh]. + +I borrowed a lot of code from upstream and mail module from the nginx 0.7.* core. This part of code is copyrighted by Igor Sysoev. And the health check part is borrowed the design of Jack Lindamood's healthcheck module [http://github.com/cep21/healthcheck_nginx_upstreams healthcheck_nginx_upstreams]; + +This module is licensed under the BSD license. + +Copyright (C) 2013 by Weibin Yao . + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 189b2d684b5ea6d3663697846be5013552e07a98 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 20 Dec 2015 16:21:11 +0100 Subject: [PATCH 04/16] .rst.txt and .rest.txt as reStructuredText extensions --- HACKING.rst.txt | 329 +++++++++++++++++++++++++++++++++++++ lib/linguist/languages.yml | 2 + 2 files changed, 331 insertions(+) create mode 100644 HACKING.rst.txt diff --git a/HACKING.rst.txt b/HACKING.rst.txt new file mode 100644 index 00000000..6e078204 --- /dev/null +++ b/HACKING.rst.txt @@ -0,0 +1,329 @@ +Contributing to SciPy +===================== + +This document aims to give an overview of how to contribute to SciPy. It +tries to answer commonly asked questions, and provide some insight into how the +community process works in practice. Readers who are familiar with the SciPy +community and are experienced Python coders may want to jump straight to the +`git workflow`_ documentation. + + +Contributing new code +--------------------- + +If you have been working with the scientific Python toolstack for a while, you +probably have some code lying around of which you think "this could be useful +for others too". Perhaps it's a good idea then to contribute it to SciPy or +another open source project. The first question to ask is then, where does +this code belong? That question is hard to answer here, so we start with a +more specific one: *what code is suitable for putting into SciPy?* +Almost all of the new code added to scipy has in common that it's potentially +useful in multiple scientific domains and it fits in the scope of existing +scipy submodules. In principle new submodules can be added too, but this is +far less common. For code that is specific to a single application, there may +be an existing project that can use the code. Some scikits (`scikit-learn`_, +`scikits-image`_, `statsmodels`_, etc.) are good examples here; they have a +narrower focus and because of that more domain-specific code than SciPy. + +Now if you have code that you would like to see included in SciPy, how do you +go about it? After checking that your code can be distributed in SciPy under a +compatible license (see FAQ for details), the first step is to discuss on the +scipy-dev mailing list. All new features, as well as changes to existing code, +are discussed and decided on there. You can, and probably should, already +start this discussion before your code is finished. + +Assuming the outcome of the discussion on the mailing list is positive and you +have a function or piece of code that does what you need it to do, what next? +Before code is added to SciPy, it at least has to have good documentation, unit +tests and correct code style. + +1. Unit tests + In principle you should aim to create unit tests that exercise all the code + that you are adding. This gives some degree of confidence that your code + runs correctly, also on Python versions and hardware or OSes that you don't + have available yourself. An extensive description of how to write unit + tests is given in the NumPy `testing guidelines`_. + +2. Documentation + Clear and complete documentation is essential in order for users to be able + to find and understand the code. Documentation for individual functions + and classes -- which includes at least a basic description, type and + meaning of all parameters and returns values, and usage examples in + `doctest`_ format -- is put in docstrings. Those docstrings can be read + within the interpreter, and are compiled into a reference guide in html and + pdf format. Higher-level documentation for key (areas of) functionality is + provided in tutorial format and/or in module docstrings. A guide on how to + write documentation is given in `how to document`_. + +3. Code style + Uniformity of style in which code is written is important to others trying + to understand the code. SciPy follows the standard Python guidelines for + code style, `PEP8`_. In order to check that your code conforms to PEP8, + you can use the `pep8 package`_ style checker. Most IDEs and text editors + have settings that can help you follow PEP8, for example by translating + tabs by four spaces. Using `pyflakes`_ to check your code is also a good + idea. + +At the end of this document a checklist is given that may help to check if your +code fulfills all requirements for inclusion in SciPy. + +Another question you may have is: *where exactly do I put my code*? To answer +this, it is useful to understand how the SciPy public API (application +programming interface) is defined. For most modules the API is two levels +deep, which means your new function should appear as +``scipy.submodule.my_new_func``. ``my_new_func`` can be put in an existing or +new file under ``/scipy//``, its name is added to the ``__all__`` +dict in that file (which lists all public functions in the file), and those +public functions are then imported in ``/scipy//__init__.py``. Any +private functions/classes should have a leading underscore (``_``) in their +name. A more detailed description of what the public API of SciPy is, is given +in `SciPy API`_. + +Once you think your code is ready for inclusion in SciPy, you can send a pull +request (PR) on Github. We won't go into the details of how to work with git +here, this is described well in the `git workflow`_ section of the NumPy +documentation and in the Github help pages. When you send the PR for a new +feature, be sure to also mention this on the scipy-dev mailing list. This can +prompt interested people to help review your PR. Assuming that you already got +positive feedback before on the general idea of your code/feature, the purpose +of the code review is to ensure that the code is correct, efficient and meets +the requirements outlined above. In many cases the code review happens +relatively quickly, but it's possible that it stalls. If you have addressed +all feedback already given, it's perfectly fine to ask on the mailing list +again for review (after a reasonable amount of time, say a couple of weeks, has +passed). Once the review is completed, the PR is merged into the "master" +branch of SciPy. + +The above describes the requirements and process for adding code to SciPy. It +doesn't yet answer the question though how decisions are made exactly. The +basic answer is: decisions are made by consensus, by everyone who chooses to +participate in the discussion on the mailing list. This includes developers, +other users and yourself. Aiming for consensus in the discussion is important +-- SciPy is a project by and for the scientific Python community. In those +rare cases that agreement cannot be reached, the `maintainers`_ of the module +in question can decide the issue. + + +Contributing by helping maintain existing code +---------------------------------------------- + +The previous section talked specifically about adding new functionality to +SciPy. A large part of that discussion also applies to maintenance of existing +code. Maintenance means fixing bugs, improving code quality or style, +documenting existing functionality better, adding missing unit tests, keeping +build scripts up-to-date, etc. The SciPy `Trac`_ bug tracker contains all +reported bugs, build/documentation issues, etc. Fixing issues described in +Trac tickets helps improve the overall quality of SciPy, and is also a good way +of getting familiar with the project. You may also want to fix a bug because +you ran into it and need the function in question to work correctly. + +The discussion on code style and unit testing above applies equally to bug +fixes. It is usually best to start by writing a unit test that shows the +problem, i.e. it should pass but doesn't. Once you have that, you can fix the +code so that the test does pass. That should be enough to send a PR for this +issue. Unlike when adding new code, discussing this on the mailing list may +not be necessary - if the old behavior of the code is clearly incorrect, no one +will object to having it fixed. It may be necessary to add some warning or +deprecation message for the changed behavior. This should be part of the +review process. + + +Other ways to contribute +------------------------ + +There are many ways to contribute other than contributing code. Participating +in discussions on the scipy-user and scipy-dev *mailing lists* is a contribution +in itself. The `scipy.org`_ *website* contains a lot of information on the +SciPy community and can always use a new pair of hands. A redesign of this +website is ongoing, see `scipy.github.com`_. The redesigned website is a +static site based on Sphinx, the sources for it are +also on Github at `scipy.org-new`_. + +The SciPy *documentation* is constantly being improved by many developers and +users. You can contribute by sending a PR on Github that improves the +documentation, but there's also a `documentation wiki`_ that is very convenient +for making edits to docstrings (and doesn't require git knowledge). Anyone can +register a username on that wiki, ask on the scipy-dev mailing list for edit +rights and make edits. The documentation there is updated every day with the +latest changes in the SciPy master branch, and wiki edits are regularly +reviewed and merged into master. Another advantage of the documentation wiki +is that you can immediately see how the reStructuredText (reST) of docstrings +and other docs is rendered as html, so you can easily catch formatting errors. + +Code that doesn't belong in SciPy itself or in another package but helps users +accomplish a certain task is valuable. `SciPy Central`_ is the place to share +this type of code (snippets, examples, plotting code, etc.). + + +Useful links, FAQ, checklist +---------------------------- + +Checklist before submitting a PR +```````````````````````````````` + + - Are there unit tests with good code coverage? + - Do all public function have docstrings including examples? + - Is the code style correct (PEP8, pyflakes) + - Is the new functionality tagged with ``.. versionadded:: X.Y.Z`` (with + X.Y.Z the version number of the next release - can be found in setup.py)? + - Is the new functionality mentioned in the release notes of the next + release? + - Is the new functionality added to the reference guide? + - In case of larger additions, is there a tutorial or more extensive + module-level description? + - In case compiled code is added, is it integrated correctly via setup.py + (and preferably also Bento/Numscons configuration files)? + - If you are a first-time contributor, did you add yourself to THANKS.txt? + Please note that this is perfectly normal and desirable - the aim is to + give every single contributor credit, and if you don't add yourself it's + simply extra work for the reviewer (or worse, the reviewer may forget). + - Did you check that the code can be distributed under a BSD license? + + +Useful SciPy documents +`````````````````````` + + - The `how to document`_ guidelines + - NumPy/SciPy `testing guidelines`_ + - `SciPy API`_ + - SciPy `maintainers`_ + - NumPy/SciPy `git workflow`_ + + +FAQ +``` + +*I based my code on existing Matlab/R/... code I found online, is this OK?* + +It depends. SciPy is distributed under a BSD license, so if the code that you +based your code on is also BSD licensed or has a BSD-compatible license (MIT, +Apache, ...) then it's OK. Code which is GPL-licensed, has no clear license, +requires citation or is free for academic use only can't be included in SciPy. +Therefore if you copied existing code with such a license or made a direct +translation to Python of it, your code can't be included. See also `license +compatibility`_. + + +*How do I set up SciPy so I can edit files, run the tests and make commits?* + +The simplest method is setting up an in-place build. To create your local git +repo and do the in-place build:: + + $ git clone https://github.com/scipy/scipy.git scipy + $ cd scipy + $ python setup.py build_ext -i + +Then you need to either set up a symlink in your site-packages or add this +directory to your PYTHONPATH environment variable, so Python can find it. Some +IDEs (Spyder for example) have utilities to manage PYTHONPATH. On Linux and OS +X, you can for example edit your .bash_login file to automatically add this dir +on startup of your terminal. Add the line:: + + export PYTHONPATH="$HOME/scipy:${PYTHONPATH}" + +Alternatively, to set up the symlink, use (prefix only necessary if you want to +use your local instead of global site-packages dir):: + + $ python setupegg.py develop --prefix=${HOME} + +To test that everything works, start the interpreter (not inside the scipy/ +source dir) and run the tests:: + + $ python + >>> import scipy as sp + >>> sp.test() + +Now editing a Python source file in SciPy allows you to immediately test and +use your changes, by simply restarting the interpreter. + +Note that while the above procedure is the most straightforward way to get +started, you may want to look into using Bento or numscons for faster and more +flexible building, or virtualenv to maintain development environments for +multiple Python versions. + + +*How do I set up a development version of SciPy in parallel to a released +version that I use to do my job/research?* + +One simple way to achieve this is to install the released version in +site-packages, by using a binary installer or pip for example, and set up the +development version with an in-place build in a virtualenv. First install +`virtualenv`_ and `virtualenvwrapper`_, then create your virtualenv (named +scipy-dev here) with:: + + $ mkvirtualenv scipy-dev + +Now, whenever you want to switch to the virtual environment, you can use the +command ``workon scipy-dev``, while the command ``deactivate`` exits from the +virtual environment and brings back your previous shell. With scipy-dev +activated, follow the in-place build with the symlink install above to actually +install your development version of SciPy. + + +*Can I use a programming language other than Python to speed up my code?* + +Yes. The languages used in SciPy are Python, Cython, C, C++ and Fortran. All +of these have their pros and cons. If Python really doesn't offer enough +performance, one of those languages can be used. Important concerns when +using compiled languages are maintainability and portability. For +maintainability, Cython is clearly preferred over C/C++/Fortran. Cython and C +are more portable than C++/Fortran. A lot of the existing C and Fortran code +in SciPy is older, battle-tested code that was only wrapped in (but not +specifically written for) Python/SciPy. Therefore the basic advice is: use +Cython. If there's specific reasons why C/C++/Fortran should be preferred, +please discuss those reasons first. + + +*There's overlap between Trac and Github, which do I use for what?* + +Trac_ is the bug tracker, Github_ the code repository. Before the SciPy code +repository moved to Github, the preferred way to contribute code was to create +a patch and attach it to a Trac ticket. The overhead of this approach is much +larger than sending a PR on Github, so please don't do this anymore. Use Trac +for bug reports, Github for patches. + + +.. _scikit-learn: http://scikit-learn.org + +.. _scikits-image: http://scikits-image.org/ + +.. _statsmodels: http://statsmodels.sourceforge.net/ + +.. _testing guidelines: https://github.com/numpy/numpy/blob/master/doc/TESTS.rst.txt + +.. _how to document: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt + +.. _PEP8: http://www.python.org/dev/peps/pep-0008/ + +.. _pep8 package: http://pypi.python.org/pypi/pep8 + +.. _pyflakes: http://pypi.python.org/pypi/pyflakes + +.. _SciPy API: http://docs.scipy.org/doc/scipy/reference/api.html + +.. _git workflow: http://docs.scipy.org/doc/numpy/dev/gitwash/index.html + +.. _maintainers: https://github.com/scipy/scipy/blob/master/doc/MAINTAINERS.rst.txt + +.. _Trac: http://projects.scipy.org/scipy/timeline + +.. _Github: https://github.com/scipy/scipy + +.. _scipy.org: http://scipy.org/ + +.. _scipy.github.com: http://scipy.github.com/ + +.. _scipy.org-new: https://github.com/scipy/scipy.org-new + +.. _documentation wiki: http://docs.scipy.org/scipy/Front%20Page/ + +.. _SciPy Central: http://scipy-central.org/ + +.. _license compatibility: http://www.scipy.org/License_Compatibility + +.. _doctest: http://www.doughellmann.com/PyMOTW/doctest/ + +.. _virtualenv: http://www.virtualenv.org/ + +.. _virtualenvwrapper: http://www.doughellmann.com/projects/virtualenvwrapper/ + diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c20a549f..4ca2fa33 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3967,6 +3967,8 @@ reStructuredText: extensions: - .rst - .rest + - .rest.txt + - .rst.txt ace_mode: text wisp: From 9a070d7bb3c7f1fa1a5958ed42cf5e30606db652 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 23 Dec 2015 21:43:55 +0100 Subject: [PATCH 05/16] Reorder Perl heuristic rules Order heuristic rules by accuracy Heuristic rules which are expected to generated less false positives should be tested first --- lib/linguist/heuristics.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 7c1c7db1..01be4e33 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -276,20 +276,20 @@ module Linguist end disambiguate ".pl" do |data| - if /^(use v6|(my )?class|module)/.match(data) - Language["Perl6"] + if /^[^#]+:-/.match(data) + Language["Prolog"] elsif /use strict|use\s+v?5\./.match(data) Language["Perl"] - elsif /^[^#]+:-/.match(data) - Language["Prolog"] + elsif /^(use v6|(my )?class|module)/.match(data) + Language["Perl6"] end end disambiguate ".pm", ".t" do |data| - if /^(use v6|(my )?class|module)/.match(data) - Language["Perl6"] - elsif /use strict|use\s+v?5\./.match(data) + if /use strict|use\s+v?5\./.match(data) Language["Perl"] + elsif /^(use v6|(my )?class|module)/.match(data) + Language["Perl6"] end end From 7a709310661cfa481adc9ada7fa47551084230f6 Mon Sep 17 00:00:00 2001 From: jrnold Date: Thu, 24 Dec 2015 15:55:00 -0800 Subject: [PATCH 06/16] add Stan to languages --- lib/linguist/languages.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c5eb9e6a..d352be07 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3355,6 +3355,12 @@ Squirrel: tm_scope: source.c++ ace_mode: c_cpp +Stan: + type: programming + extensions: + - .stan + ace_mode: text + Standard ML: type: programming color: "#dc566d" From 5329b967937fa05197caf95cb68caa2892b8ba3e Mon Sep 17 00:00:00 2001 From: jrnold Date: Thu, 24 Dec 2015 15:55:14 -0800 Subject: [PATCH 07/16] add Stan samples --- samples/Stan/congress.stan | 14 ++++++++++++++ samples/Stan/dogs.stan | 31 +++++++++++++++++++++++++++++++ samples/Stan/schools.stan | 26 ++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 samples/Stan/congress.stan create mode 100644 samples/Stan/dogs.stan create mode 100644 samples/Stan/schools.stan diff --git a/samples/Stan/congress.stan b/samples/Stan/congress.stan new file mode 100644 index 00000000..6e7408e5 --- /dev/null +++ b/samples/Stan/congress.stan @@ -0,0 +1,14 @@ +data { + int N; + vector[N] incumbency_88; + vector[N] vote_86; + vector[N] vote_88; +} +parameters { + vector[3] beta; + real sigma; +} +model { + vote_88 ~ normal(beta[1] + beta[2] * vote_86 + + beta[3] * incumbency_88,sigma); +} diff --git a/samples/Stan/dogs.stan b/samples/Stan/dogs.stan new file mode 100644 index 00000000..ebca16d7 --- /dev/null +++ b/samples/Stan/dogs.stan @@ -0,0 +1,31 @@ +data { + int n_dogs; + int n_trials; + int y[n_dogs,n_trials]; +} +parameters { + vector[3] beta; +} +transformed parameters { + matrix[n_dogs,n_trials] n_avoid; + matrix[n_dogs,n_trials] n_shock; + matrix[n_dogs,n_trials] p; + + for (j in 1:n_dogs) { + n_avoid[j,1] <- 0; + n_shock[j,1] <- 0; + for (t in 2:n_trials) { + n_avoid[j,t] <- n_avoid[j,t-1] + 1 - y[j,t-1]; + n_shock[j,t] <- n_shock[j,t-1] + y[j,t-1]; + } + for (t in 1:n_trials) + p[j,t] <- beta[1] + beta[2] * n_avoid[j,t] + beta[3] * n_shock[j,t]; + } +} +model { + beta ~ normal(0, 100); + for (i in 1:n_dogs) { + for (j in 1:n_trials) + y[i,j] ~ bernoulli_logit(p[i,j]); + } +} diff --git a/samples/Stan/schools.stan b/samples/Stan/schools.stan new file mode 100644 index 00000000..171864a1 --- /dev/null +++ b/samples/Stan/schools.stan @@ -0,0 +1,26 @@ +data { + int N; + vector[N] y; + vector[N] sigma_y; +} +parameters { + vector[N] eta; + real mu_theta; + real sigma_eta; + real xi; +} +transformed parameters { + real sigma_theta; + vector[N] theta; + + theta <- mu_theta + xi * eta; + sigma_theta <- fabs(xi) / sigma_eta; +} +model { + mu_theta ~ normal(0, 100); + sigma_eta ~ inv_gamma(1, 1); //prior distribution can be changed to uniform + + eta ~ normal(0, sigma_eta); + xi ~ normal(0, 5); + y ~ normal(theta,sigma_y); +} From f141abbc730bfbf25f18dae64e69057d47729b43 Mon Sep 17 00:00:00 2001 From: jrnold Date: Thu, 24 Dec 2015 16:05:06 -0800 Subject: [PATCH 08/16] add tm_scope for Stan --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d352be07..94f9f330 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3360,6 +3360,7 @@ Stan: extensions: - .stan ace_mode: text + tm_scope: none Standard ML: type: programming From 8144438f398ed15f90b5634cc4788d8b28d9fadb Mon Sep 17 00:00:00 2001 From: jrnold Date: Sun, 27 Dec 2015 18:50:43 -0800 Subject: [PATCH 09/16] Add color for Stan Use the brick-red color of the [Stan logo](https://raw.githubusercontent.com/stan-dev/logos/master/logo.png). --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 94f9f330..319c445e 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3357,6 +3357,7 @@ Squirrel: Stan: type: programming + color: "#b2011d" extensions: - .stan ace_mode: text From 1ac16cbec7b41bbdf76131352a4eec9bb29d2079 Mon Sep 17 00:00:00 2001 From: jrnold Date: Mon, 28 Dec 2015 22:31:49 -0800 Subject: [PATCH 10/16] add vendor for Stan --- .gitmodules | 3 +++ grammars.yml | 2 ++ vendor/grammars/atom-language-stan | 1 + 3 files changed, 6 insertions(+) create mode 160000 vendor/grammars/atom-language-stan diff --git a/.gitmodules b/.gitmodules index 8234378a..cde3e37b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -701,3 +701,6 @@ [submodule "vendor/grammars/language-renpy"] path = vendor/grammars/language-renpy url = https://github.com/williamd1k0/language-renpy.git +[submodule "vendor/grammars/atom-language-stan"] + path = vendor/grammars/atom-language-stan + url = git@github.com:jrnold/atom-language-stan.git diff --git a/grammars.yml b/grammars.yml index 8f7b1173..0319774a 100644 --- a/grammars.yml +++ b/grammars.yml @@ -187,6 +187,8 @@ vendor/grammars/atom-fsharp/: - source.fsharp.fsx vendor/grammars/atom-language-purescript/: - source.purescript +vendor/grammars/atom-language-stan/: +- source.stan vendor/grammars/atom-salt: - source.python.salt - source.yaml.salt diff --git a/vendor/grammars/atom-language-stan b/vendor/grammars/atom-language-stan new file mode 160000 index 00000000..72c626ae --- /dev/null +++ b/vendor/grammars/atom-language-stan @@ -0,0 +1 @@ +Subproject commit 72c626ae96792809447ed4b4e20b8792025b7b95 From 24a89d2d75d3840a78b274f028a2ff85d05ca74b Mon Sep 17 00:00:00 2001 From: jrnold Date: Mon, 28 Dec 2015 22:32:53 -0800 Subject: [PATCH 11/16] add tm_grammar for Stan --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 319c445e..7d0b4ac3 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3361,7 +3361,7 @@ Stan: extensions: - .stan ace_mode: text - tm_scope: none + tm_scope: source.stan Standard ML: type: programming From 6f197bacc74337c696ece542f2f3c93b762d46ef Mon Sep 17 00:00:00 2001 From: Nicholas Wolverson Date: Tue, 29 Dec 2015 23:22:51 +0000 Subject: [PATCH 12/16] Update PureScript submodule (moved repo, grammar tweak) Updated grammar to support triple-quoted strings properly: https://github.com/purescript-contrib/atom-language-purescript/commit/0c53f8162e40f2942d3df53c928c8ce597be3e12 atom-language-purescript repo has been moved to purescript-contrib org, update the URL. --- .gitmodules | 2 +- vendor/grammars/atom-language-purescript | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8234378a..53ff80c7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -658,7 +658,7 @@ url = https://github.com/rpavlick/language-ncl.git [submodule "vendor/grammars/atom-language-purescript"] path = vendor/grammars/atom-language-purescript - url = https://github.com/freebroccolo/atom-language-purescript + url = https://github.com/purescript-contrib/atom-language-purescript [submodule "vendor/grammars/vue-syntax-highlight"] path = vendor/grammars/vue-syntax-highlight url = https://github.com/vuejs/vue-syntax-highlight diff --git a/vendor/grammars/atom-language-purescript b/vendor/grammars/atom-language-purescript index 21ed0c41..bd2b59f1 160000 --- a/vendor/grammars/atom-language-purescript +++ b/vendor/grammars/atom-language-purescript @@ -1 +1 @@ -Subproject commit 21ed0c417a143ca537afc5d65344acac3d88df94 +Subproject commit bd2b59f14eb4bd3b1f6d53eee959d7a6b523c073 From 70068f74f1f9c7dcd1133366749421a1acb28b41 Mon Sep 17 00:00:00 2001 From: AQNOUCH Mohammed Date: Fri, 1 Jan 2016 01:53:09 +0000 Subject: [PATCH 13/16] Updated copyright to 2016 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index c0a52444..ca0844d1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2015 GitHub, Inc. +Copyright (c) 2011-2016 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From 3e665099ac84e0b2307c034aa4d2da7a1726e60e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 2 Jan 2016 22:04:16 -0500 Subject: [PATCH 14/16] Updating Python grammars --- grammars.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grammars.yml b/grammars.yml index 004f9cb0..2b7b5c8d 100644 --- a/grammars.yml +++ b/grammars.yml @@ -69,6 +69,9 @@ vendor/grammars/Lean.tmbundle: - source.lean vendor/grammars/LiveScript.tmbundle: - source.livescript +vendor/grammars/MagicPython: +- source.python +- source.regexp.python vendor/grammars/Modelica/: - source.modelica vendor/grammars/NSIS: @@ -355,10 +358,7 @@ vendor/grammars/language-maxscript: - source.maxscript vendor/grammars/language-ncl: - source.ncl -vendor/grammars/MagicPython: -- source.python vendor/grammars/language-python: -- source.regexp.python - text.python.console - text.python.traceback vendor/grammars/language-renpy: From a944769d61795e2d7aea17e502996dbf250f261c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 2 Jan 2016 22:18:27 -0500 Subject: [PATCH 15/16] Grammars update --- vendor/grammars/Elm.tmLanguage | 2 +- vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/abap.tmbundle | 2 +- vendor/grammars/atom-fsharp | 2 +- vendor/grammars/atom-language-stan | 2 +- vendor/grammars/ats.sublime | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/factor | 2 +- vendor/grammars/html.tmbundle | 2 +- vendor/grammars/json.tmbundle | 2 +- vendor/grammars/language-babel | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-maxscript | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/make.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/sublime-mask | 2 +- vendor/grammars/sublime-text-ox | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/sublime_cobol | 2 +- vendor/grammars/swift.tmbundle | 2 +- vendor/grammars/verilog.tmbundle | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/vendor/grammars/Elm.tmLanguage b/vendor/grammars/Elm.tmLanguage index ab79692f..494145bd 160000 --- a/vendor/grammars/Elm.tmLanguage +++ b/vendor/grammars/Elm.tmLanguage @@ -1 +1 @@ -Subproject commit ab79692fed628c9b08b7d11f21d9288cdf6b4e84 +Subproject commit 494145bded21fd6e18454d9d9d5aa8b67ced1b96 diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index 60309828..7e5396d9 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit 6030982880f95b887daebf1ccb30ad1c615e0fc2 +Subproject commit 7e5396d9be8b05c705be614afb022f755a7edc17 diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index 13bf5348..d7855f98 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit 13bf534834036911c57d15c40242e45783aad1ba +Subproject commit d7855f98ce6fbe0703c2753b0deae263a27fd8f8 diff --git a/vendor/grammars/abap.tmbundle b/vendor/grammars/abap.tmbundle index 5b7e30fd..e4e71dee 160000 --- a/vendor/grammars/abap.tmbundle +++ b/vendor/grammars/abap.tmbundle @@ -1 +1 @@ -Subproject commit 5b7e30fd8fb4bcaa78c14aaabebe98dda8ab7bbf +Subproject commit e4e71dee51b1fe6973e11d6a617de72991be4ecb diff --git a/vendor/grammars/atom-fsharp b/vendor/grammars/atom-fsharp index 500cdb5f..4376748e 160000 --- a/vendor/grammars/atom-fsharp +++ b/vendor/grammars/atom-fsharp @@ -1 +1 @@ -Subproject commit 500cdb5f045ff6a121fa2732bbd56c4da18bdae1 +Subproject commit 4376748ed29b5e104cd0dd807c8c9f09a09ec361 diff --git a/vendor/grammars/atom-language-stan b/vendor/grammars/atom-language-stan index 72c626ae..f6911bef 160000 --- a/vendor/grammars/atom-language-stan +++ b/vendor/grammars/atom-language-stan @@ -1 +1 @@ -Subproject commit 72c626ae96792809447ed4b4e20b8792025b7b95 +Subproject commit f6911bef091e155098f113ec5aaa89bd55283705 diff --git a/vendor/grammars/ats.sublime b/vendor/grammars/ats.sublime index 1ecc2b01..a3f24abb 160000 --- a/vendor/grammars/ats.sublime +++ b/vendor/grammars/ats.sublime @@ -1 +1 @@ -Subproject commit 1ecc2b011ed9d58bd5435b7440697e300591a23d +Subproject commit a3f24abbe7043adc0ad798711467edae33cf89f0 diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index f6048afe..f1424d49 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit f6048afe693e50adf47d46aba791f95c9138823e +Subproject commit f1424d49dd879f6c5a67d3afe6c48a17f538345a diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 4b502e43..13d94e0e 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 4b502e436d150f6af97b085a763179941b3c3778 +Subproject commit 13d94e0ec98c2447adc80230708afa94012ec825 diff --git a/vendor/grammars/factor b/vendor/grammars/factor index 9d956025..7b289493 160000 --- a/vendor/grammars/factor +++ b/vendor/grammars/factor @@ -1 +1 @@ -Subproject commit 9d95602591cf231a3f2332269d81d60068d1aa76 +Subproject commit 7b289493316955db1649eb2745a2db7a78a4c9f9 diff --git a/vendor/grammars/html.tmbundle b/vendor/grammars/html.tmbundle index a0bc0c47..36b90bc1 160000 --- a/vendor/grammars/html.tmbundle +++ b/vendor/grammars/html.tmbundle @@ -1 +1 @@ -Subproject commit a0bc0c479bde0d46bfec863f3262c06e768eec2d +Subproject commit 36b90bc113cdd59dcaeb0885103f9b6a773939e1 diff --git a/vendor/grammars/json.tmbundle b/vendor/grammars/json.tmbundle index 06b38d55..0762cbdc 160000 --- a/vendor/grammars/json.tmbundle +++ b/vendor/grammars/json.tmbundle @@ -1 +1 @@ -Subproject commit 06b38d55326363b63c26943c6e0213988180dbca +Subproject commit 0762cbdcb34dd98801b6323e75332cd4c9dbc07e diff --git a/vendor/grammars/language-babel b/vendor/grammars/language-babel index 4b0e9658..20c649bc 160000 --- a/vendor/grammars/language-babel +++ b/vendor/grammars/language-babel @@ -1 +1 @@ -Subproject commit 4b0e9658e0a8bab71983ea5941f99b552cf00848 +Subproject commit 20c649bcc79b9fd9a72e4b6e1fa11e14d553a9d8 diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index 12b73d41..a0193ad2 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit 12b73d41a0e0437b4899f73c5ac65caad74ac2c1 +Subproject commit a0193ad2a9797033649e665083f09249d2d098fc diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index b227486f..162309ab 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit b227486fc84c8af8f7439e96424c2f3724c26e44 +Subproject commit 162309ab8525c0f1b8602514e6aa347c9889437e diff --git a/vendor/grammars/language-maxscript b/vendor/grammars/language-maxscript index a465c9ca..56f89d27 160000 --- a/vendor/grammars/language-maxscript +++ b/vendor/grammars/language-maxscript @@ -1 +1 @@ -Subproject commit a465c9ca4adf71b8524021acb3cbe447db19753b +Subproject commit 56f89d27153d27f3fed5f8b50fda8fa728fa2911 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index bb4edc2b..3be8cd92 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit bb4edc2b6af0d95c2084511ce3afc324a9c83da5 +Subproject commit 3be8cd9208fb2aa5e9fe4ebd0074f55433bca7e0 diff --git a/vendor/grammars/make.tmbundle b/vendor/grammars/make.tmbundle index e0d96dc1..1a1827da 160000 --- a/vendor/grammars/make.tmbundle +++ b/vendor/grammars/make.tmbundle @@ -1 +1 @@ -Subproject commit e0d96dc1d6ec8ef9ee421da9963d231256a2f22d +Subproject commit 1a1827da81e20fdce56e2658451340c070ca44b7 diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 30fa23fc..3759a197 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 30fa23fc34cf5147bcfd0759a4cbf83cd987337d +Subproject commit 3759a19719d3c4c4979087be12adbcaa02a7bca3 diff --git a/vendor/grammars/sublime-mask b/vendor/grammars/sublime-mask index 819f743e..8b2a4b33 160000 --- a/vendor/grammars/sublime-mask +++ b/vendor/grammars/sublime-mask @@ -1 +1 @@ -Subproject commit 819f743efdcfa0d90a5b935cfaad799bd4ca7e6a +Subproject commit 8b2a4b3300ef30f293218521cd2aa94335cad114 diff --git a/vendor/grammars/sublime-text-ox b/vendor/grammars/sublime-text-ox index ed96fb6a..5cbc2c65 160000 --- a/vendor/grammars/sublime-text-ox +++ b/vendor/grammars/sublime-text-ox @@ -1 +1 @@ -Subproject commit ed96fb6afc0321c7d3ce219d69b56c591f0938a0 +Subproject commit 5cbc2c655b4b771d34b75bbe962964455510644b diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 6540de45..d2c76b8c 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 6540de452eb08766d379fe10aba4bce9eb645ec0 +Subproject commit d2c76b8c8262c9a848d4814662a0c8e13d1e2a6a diff --git a/vendor/grammars/sublime_cobol b/vendor/grammars/sublime_cobol index 19ae2ba3..ad15734a 160000 --- a/vendor/grammars/sublime_cobol +++ b/vendor/grammars/sublime_cobol @@ -1 +1 @@ -Subproject commit 19ae2ba33ebc0b439051a499888acd4f916f83b9 +Subproject commit ad15734a4a9798a006525f53a968565fee1411b1 diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index 75a3dea1..e6375f4d 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit 75a3dea1841cd153c71101fa30841a269ab3c6a7 +Subproject commit e6375f4dbb9c5a715e1924b1e9fc1056f0b3dee7 diff --git a/vendor/grammars/verilog.tmbundle b/vendor/grammars/verilog.tmbundle index 7627ae50..f55a9859 160000 --- a/vendor/grammars/verilog.tmbundle +++ b/vendor/grammars/verilog.tmbundle @@ -1 +1 @@ -Subproject commit 7627ae507278edd9534c3f905d48736875658bf5 +Subproject commit f55a9859f48bb6189992b86748c127044131a785 From ca4bc6110f2a99bc54072d4924c28dec5e3b101a Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 3 Jan 2016 11:47:09 +0100 Subject: [PATCH 16/16] Remove 'use strict' from Perl6 sample --- samples/Perl6/hash.t | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/Perl6/hash.t b/samples/Perl6/hash.t index 7bff849e..24ba2b50 100644 --- a/samples/Perl6/hash.t +++ b/samples/Perl6/hash.t @@ -12,7 +12,6 @@ unless EVAL 'EVAL("1", :lang)' { die unless EVAL(q/ package My::Hash; -use strict; sub new { my ($class, $ref) = @_;