rohitpaulk has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 244 seconds]
Nekka_ has joined #crystal-lang
Nekka has quit [Ping timeout: 245 seconds]
Nekka_ is now known as Nekka
<FromGitter>
<j8r> Something I struggle a bit to understand
<FromGitter>
<j8r> What ECR brings compared to standard macros?
<FromGitter>
<Blacksmoke16> ECR just makes it easier to render templates with content
<FromGitter>
<j8r> but macros are equally fine, too?
<FromGitter>
<Blacksmoke16> ECR uses macros so prob?
<FromGitter>
<Blacksmoke16> depends on what you're trying to do
<FromGitter>
<j8r> one can do `{{ read_file("./file_with_macros").id }}`
<FromGitter>
<Blacksmoke16> i suppose?
<FromGitter>
<Blacksmoke16> ECR is mainly used for like rendering a view based on an obj
<FromGitter>
<j8r> strange to have only compile time templating in stdlib, but not runtime ones
<FromGitter>
<j8r> like go template
<FromGitter>
<Blacksmoke16> :shrug:
sorcus has quit [Quit: WeeChat 2.5]
HumanG33k has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter>
<dscottboggs_gitlab> Hm....that's kinda a good point @j8r
DeBot has quit [Quit: Crystal IRC]
asterite has quit [Quit: Bye]
jhass has quit [Quit: Bye]
DeBot has joined #crystal-lang
asterite has joined #crystal-lang
jhass has joined #crystal-lang
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 258 seconds]
sorcus has joined #crystal-lang
<FromGitter>
<didactic-drunk> Is there a form of `String.new` that doesn't alloc/copy?
<FromGitter>
<dscottboggs_gitlab> that doesn't really make sense to me...what do you mean?
<FromGitter>
<j8r> a stack allocated string?
rohitpaulk has joined #crystal-lang
<FromGitter>
<didactic-drunk> Two places. 1) A c library that returns a const error string. 2) A crystal library that returns `Bytes.new` that I'm converting to a `String`
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
mps has quit [Quit: leaving]
<FromGitter>
<didactic-drunk> As far as I can tell `String.new` always malloc's and copies the source buffer.
<FromGitter>
<didactic-drunk> I don't need the malloc or copy.
<FromGitter>
<didactic-drunk> @asterite?
ht_ has quit [Remote host closed the connection]
<FromGitter>
<asterite> There's no way to do that because a String always has type ID, then size, then inline buffer following it.