ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ur5us has quit [Remote host closed the connection]
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<FromGitter> <dscottboggs:matrix.org> what's the deal with getting `undefined method 'uninitialized' for Something:Module`? `uninitialized` only works in certain contexts? Which ones? Why?
<FromGitter> <Blacksmoke16> prob those that can be allocated
<FromGitter> <Blacksmoke16> cant instantiate a module so yea...
<FromGitter> <dscottboggs:matrix.org> oh...that makes sense. I was just trying to create a namespaced static buffer but obviously that can't be on the stack so I'll have to use malloc or some shit. thanks. 💤
Liothen has quit [Ping timeout: 258 seconds]
Liothen has joined #crystal-lang
<FromGitter> <HertzDevil> when will 1.2.1 be added to the ci matrix
Munto has quit [Ping timeout: 258 seconds]
Munto has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 264 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 264 seconds]
ua_ has quit [Ping timeout: 260 seconds]
ua_ has joined #crystal-lang
Munto has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 264 seconds]
<FromGitter> <HertzDevil> looks like 1.2.0 is there already (probably good enough)
<FromGitter> <HertzDevil> `musl-test-stdlib` failing again
<FromGitter> <HertzDevil> could be related to llvm?
[R] has quit [Ping timeout: 245 seconds]
[R] has joined #crystal-lang
Munto has joined #crystal-lang
notzmv has joined #crystal-lang
lanodan has quit [Quit: WeeChat 3.1]
lanodan has joined #crystal-lang
pyrotao has joined #crystal-lang
pyrotao has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/c3wx this was a fun one to figure out
sorcus has quit [Quit: WeeChat 3.3]
sorcus has joined #crystal-lang
sorcus has quit [Client Quit]
sorcus has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.3]
<FromGitter> <naqvis> yeah, technically speaking compiler should have warned against such use-case
<FromGitter> <Blacksmoke16> i would have thought so, prob just a missing check
notzmv has quit [Ping timeout: 260 seconds]
notzmv has joined #crystal-lang
<FromGitter> <jemc> Is there a method to check if a given `String` object has a data buffer that is statically allocated (i.e. a string literal, not subject to garbage collection because it's in the program binary data section), vs a runtime-allocated `String` whose pointer points to memory which may be garbage collected if all traceable Crystal references to it disappear?
<FromGitter> <jemc> (I'm wrapping a C library and would like to make this check against some of the arguments being passed in through the wrapper)
<yxhuvud> as far as I know, no. I suppose you could try to call free on them and see what happens, but that has other issues.
sorcus has joined #crystal-lang
<FromGitter> <jemc> Perhaps I could use a macro wrapper that enforces that the argument is specifically a `StringLiteral`
<FromGitter> <jemc> This is a bit more restrictive, in that the string literal must be directly inline. But it would at least be safe, I think.
<FromGitter> <jemc> Unless StringLiteral is also the AST node used for a string that has runtime interpolation
<yxhuvud> Why do you need it?
postmodern has joined #crystal-lang
<postmodern> is there a way to create a String from a Slice(Char) ?
ur5us has joined #crystal-lang
<FromGitter> <jemc> I don't strictly *need* it - I'm just trying to put some guard rails on this C wrapper so it comes with fewer footguns included
<FromGitter> <jemc> For now I can just document the pitfall and circle back later to try to find a better way to deal with it later
postmodern has quit [Read error: Connection reset by peer]
<FromGitter> <jrei:matrix.org> postmodern: it is strange to have `Slice(Char)`, Slice(UInt8)` would be more common
<FromGitter> <jrei:matrix.org> you can take inspiration from https://crystal-lang.org/api/master/String.html#new%28capacity%3AInt%2C%26%29-class-method
ur5us has quit [Ping timeout: 252 seconds]
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
FromGitter has joined #crystal-lang
<FromGitter> <BrettKnoss> does anyone still use amber?
<FromGitter> <postmodern:matrix.org> j8r (https://matrix.to/#/@jrei:matrix.org): but UInt8 cannot represent UTF-8 wide-chars