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)
- UnionAll type parameter inconsistency HOT 1
- An obscure JuliaSyntax bug with OhMyREPL.jl HOT 8
- getindex() fails with Symbol-keys on Apple Silicon HOT 6
- using creates explicit bindings inconsistently HOT 1
- incorrect subtyping of `UnionAll` and `Union` HOT 10
- Assertion failure during SROA
- doc: the `UnionAll` doc string should point to the relevant Manual section HOT 3
- Dependency cleanup fails when building with non-default branch stdlibs/deps HOT 2
- Different kwargs for `code_native` shows different instructions HOT 4
- empty function composition ∘() should return Base.identity? HOT 2
- MethodError: Cannot `convert` an object of type Dates.Time to an object of type Dates.Second HOT 3
- [Syntax] Allow whitespace in macros wrapped by parenthesis
- Mutation of `Ref` embedded in Expr treated as effect-free HOT 13
- IR verification error caused by exct modeling changes HOT 1
- An intrinisic/function/macro like assume HOT 13
- IR verification error during testing of Parsers.jl HOT 1
- IR verification error during testing of UnicodePlots.jl HOT 1
- Non thread-safe use of `setrounding` in construction of `BigFloat` from `Rational` HOT 1
- Allocate objects in a separate pool while running the compiler
- CI assertion failure `tt->isdispatchtuple || tt->hasfreetypevars`
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.