Comments (8)
This appears to be an issue with using a regular expression as the argument for String.prototype.split. I tracked it down to the mime
module.
(It's this line, copied here for convenience.)
lines = content.split(/[\r\n]+/);
To reproduce outside of this context:
var str = 'Hello World';
console.log(str.split(/\s+/));
Colony:
» colony string_split_problem.js
[]
Node:
» node string_split_problem.js
[ 'Hello', 'World' ]
from t1-runtime.
Hi @kevinswiber, this is actually fixed in an unrelated PR (SSL)—let me split that out as a resolution to this issue.
from t1-runtime.
Sweet.
I noticed that creating a separate RegExp object and passing that in as an argument works.
Scratch that.
from t1-runtime.
Looking good:
➜ runtime git:(tcr-99) ✗ colony try.js
[ 'Hello', 'World' ]
➜ runtime git:(tcr-99) ✗
from t1-runtime.
Awesome! Thanks, @tcr!
from t1-runtime.
@tcr I'm hitting what appears to be an infinite loop when I run the express test. When I SIGINT:
➜ express git:(f6404f3) ✗ colony test.js
^CSIGINT stack traceback:
[T]: src/colony/lua/colony-js.lua:1: in function 'str_regex_replace'
[T]: src/colony/lua/colony-js.lua:1: in function 'replace'
.../express/node_modules/send/node_modules/mime/mime.js:59: in function 'fn'
[T]: src/colony/lua/colony-js.lua:1: in function 'forEach'
.../express/node_modules/send/node_modules/mime/mime.js:57: in function 'load'
.../express/node_modules/send/node_modules/mime/mime.js:90: in function 'res'
[T]: src/colony/lua/colony-node.lua:1: in function 'run'
[T]: src/colony/lua/colony-node.lua:1: in function 'require'
./node_modules/express/node_modules/send/lib/send.js:6: in function 'res'
[T]: src/colony/lua/colony-node.lua:1: in function 'run'
[T]: src/colony/lua/colony-node.lua:1: in function 'require'
...
[T]: src/colony/lua/colony-node.lua:1: in function 'run'
[T]: src/colony/lua/colony-node.lua:1: in function 'require'
./node_modules/express/index.js:2: in function 'res'
[T]: src/colony/lua/colony-node.lua:1: in function 'run'
[T]: src/colony/lua/colony-node.lua:1: in function 'require'
./test.js:10: in function 'res'
[T]: src/colony/lua/colony-node.lua:1: in function 'run'
[T]: src/colony/lua/cli.lua:1: in main chunk
[C]: in function 'require'
[T]: runtime:1: in main chunk
from t1-runtime.
I'll investigate. Wanna make this another issue?
from t1-runtime.
Sure thing.
from t1-runtime.
Related Issues (20)
- TLS: cannot provide custom `ca` list on connection HOT 2
- `undefined < 1` results in true HOT 2
- [Colony] error with absolute filepath in argument
- TLS: only DNS type subjectaltnames are supported
- net.isIP accepts hostnames that start with IP-like addresses
- TLS connection dies under ??? circumstances [even/at least under POSIX!] HOT 7
- Writing to an existing file crashes Tessel
- Cannot pass environment variables to scripts when running on mainframe HOT 1
- `Object.create(null)` instances mis-handle numeric keys
- Object.create(undefined) should throw an exception
- Buffer with too many invalid UTF-8 characters triggers abort
- Buffer.prototype.slice mishandles negative index HOT 1
- `Math.ceil` often gives wrong result on device HOT 1
- Keys are not properly coerced to strings, and non-string keys are handled improperly by hasOwnProperty
- DST-related test failure.
- 18 Tests didn't pass! HOT 8
- Date constructor doesn't handle parameters properly
- Can't run blinky example if tessel module is installed locally.
- Regexp's like \W and \1 marked as wrong
- Add Code of Conduct badge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t1-runtime.