Comments (5)
What should the escaping and interpolation behavior be?
from julia.
Escaping should be:
- All traditional C escapes insert the byte they normally represent (in particular,
\xff
inserts the byte 255). - All Unicode escapes insert their corresponding UTF-8 byte sequence
For interpolation, we should maybe have a bytes(x)
function that tries to convert objects to byte arrays and then splices the returned byte array into the middle of the byte array.
Sound reasonable?
from julia.
And I know just what to do for the default implementation of bytes
:
function bytes(x)
buf = memio()
write(buf, x)
takebuf_array(buf)
end
Though it would be much more efficient for byte array interpolation to build its result in a single memio
by calling write
on each element. In fact we could say the only difference between byte array and string interpolation is that byte arrays use write
and strings use print
.
from julia.
Yeah, that seems very reasonable. No reason we shouldn't do it like that.
On Tue, Jun 28, 2011 at 3:53 PM, JeffBezanson <
[email protected]>wrote:
And I know just what to do for the default implementation of
bytes
:function bytes(x)
buf = memio()
write(buf, x)
takebuf_array(buf)
endThough it would be much more efficient for byte array interpolation to
build its result in a singlememio
by callingwrite
on each element. In
fact we could say the only difference between byte array and string
interpolation is that byte arrays usewrite
and strings useReply to this email directly or view it on GitHub:
#11 (comment)
from julia.
Closed by 6c0f464.
from julia.
Related Issues (20)
- Top-level error in Julia 1.11-beta1 LLVM_ASSERTIONS=1 build HOT 16
- the `GenericMemory` type parameters HOT 1
- Energy saving advice: Only trigger Continuous Integration manually. HOT 1
- IncrementalCompact should handle `insert_node_here!` making new basic blocks at the end of IR
- What is the recommended value of JULIA_CPU_TARGET on macOS? HOT 4
- Issue in precompiling MKL_jll HOT 2
- It is possible to construct arrays with negative first dimension HOT 4
- Improve error message when unpacking in loop misses parentheses
- Make `Core.checked_dims` public HOT 6
- Constructing a 67108864 TiB array succeeds incorrectly, corrupting memory HOT 13
- Test stdlib no longer works building into the sysimage
- REPL stdlib no longer works building into the sysimage
- Performance of `searchsorted` worse for the O(1) method HOT 7
- 1.11.0-beta1: regression for embedding Julia with CMake
- Effects modeling for Unions constructed from typevars could probably be better
- `isuppercase`/`islowercase` fail on invalid characters
- Type inference oddity reported by @code_warntype HOT 2
- Composable multithreading with OpenBLAS HOT 2
- invalid type application returns instead of throwing HOT 2
- suboptimal and unexpected subtyping
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 julia.