<FromGitter>
<sam0x17> FYI `html-minifier` shard is done and fully tested + documented https://github.com/sam0x17/html-minifier -- embeds html-minifier from npm via duktape.cr -- zero dependency html/css/js minifier
hightower3 has quit [Read error: Connection reset by peer]
teardown has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 240 seconds]
<FromGitter>
<watzon> @sam0x17 that's actually a pretty cool project
<FromGitter>
<watzon> Good job
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter>
<hoang17> im writing a cli tool with crystal and i want to have `-v` or `--version` flag to print the current version of my program, is there a proper way to do it so that it is consistent with shards.yml?
<FromGitter>
<hoang17> is there a way to get the version from `shard.html` at compilation time?
<FromGitter>
<watzon> If you read the file in at compile time and then parse it, year
<FromGitter>
<watzon> Idk if Crystal has anything like `runtime.MemStats`
absolutejam2 has quit [Ping timeout: 268 seconds]
dwdv_ has joined #crystal-lang
<FromGitter>
<hoang17> is there a way to invoke syscall?
hightower3 has joined #crystal-lang
<hightower3>
Hm tell me, I use File.open() { |io| ... } and I get IO object. Then during reading from it, I want to make another IO to separately read part of this data. I intended to do this with io.read_at(offset,length) {|io2|...} assuming my block would get an IO in io2. But it gets PReader. What's the catch?
<FromGitter>
<ochran> Anyone seen anything similar?
<hightower3>
Given an IO at certain starting #pos, what's the best way to read a string of arbitrary length, from current position to first null byte?
<hightower3>
is there a function which does it or I need to find the length manually?
<hightower3>
(I.e. I see read_string, but it expects the length parameter, which I don't have unless I manually check first)
<hightower3>
maybe gets...
<hightower3>
ah Char::ZERO
<FromGitter>
<bararchy> Does Object sent via a Channel will be reference or copy?
absolutejam2 has joined #crystal-lang
alexherbo2 has joined #crystal-lang
absolutejam2 has quit [Ping timeout: 240 seconds]
absolutejam2 has joined #crystal-lang
<jhass>
you cannot use Object as a generic argument yet
<jhass>
maybe never will be
<FromGitter>
<bararchy> I mean an Object, Hash for example or Array
<jhass>
depends on whether it's a Reference or a Value, obviously
<FromGitter>
<bararchy> I need to maybe "refactor" my question. ⏎ Sending a Hash via channel, will do mean the other end will get the actual Hash (and changing it will effect the original sent one) or it's now a copy of the sent Hash ?
<FromGitter>
<bararchy> hmmmm that also means then that working on the same Hash inside and outside of a `spawn` for example doesn't promise MT safety.
<FromGitter>
<bararchy> ok,good to know :)
absolutejam2 has quit [Ping timeout: 265 seconds]
<FromGitter>
<Blacksmoke16> @ochran `GC.stats`
<FromGitter>
<Blacksmoke16> Then total bytes
<FromGitter>
<Blacksmoke16> Hightower gets to end,
<FromGitter>
<bararchy> Does it make sense that this passes compile without a Warning at all? seems unexpected ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ As in, I know it works, but you kinda don't know what gonna be the return type, Int32 or String [https://gitter.im/crystal-lang/crystal?at=5dbf011de469ef4358b7706a]
<FromGitter>
<Blacksmoke16> why wouldnt it work?
<FromGitter>
<Blacksmoke16> shouldnt*
<FromGitter>
<tenebrousedge> I would expect the last definition to be executed
<FromGitter>
<bararchy> because I don't know what takes priority, the `getter` or the `def`
<FromGitter>
<tenebrousedge> you can always override methods
<FromGitter>
<Blacksmoke16> yea prob the last one
<FromGitter>
<Blacksmoke16> what happens if you do `getter testing : Int32`
<FromGitter>
<bararchy> which is the last one though? as in `getter` generates a new def using a macro
<FromGitter>
<Blacksmoke16> well getter would be expanded as the first method
<FromGitter>
<Blacksmoke16> since its just a macro
<FromGitter>
<Daniel-Worrall> Yeah it'd be expanded with a string return from the initializer and then overwritten below with int32 return
absolutejam2 has joined #crystal-lang
<FromGitter>
<lbarasti> Hi folks, I'll be doing some more live-coding in Crystal today, in 1 hour (19:00 UTC). I won't be announcing these here anymore, to keep the noise down, but please, spread the word! ⏎ Today's topics: 1. Encapsulating data into classes, 2. Type aliases, 3. Extracting tasks into modules, 4. Running tasks periodically ⏎ https://www.twitch.tv/lbarasti
absolutejam2 has quit [Ping timeout: 240 seconds]
<FromGitter>
<bararchy> I'll re-tweet if you're on Twitter @lbarasti
<FromGitter>
<bararchy> Happens only on docker ENV with `ubuntu:latest`
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
dwdv_ has quit [Ping timeout: 276 seconds]
ht__ has joined #crystal-lang
ht__ has quit [Remote host closed the connection]
ht__ has joined #crystal-lang
absolutejam2 has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
absolutejam2 has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter>
<bararchy> Any Machine Learning enthusiasts here? did you know there is a pure-crystal Neural Network shard to play around with which includes an image-recognition capabilities? -> https://github.com/NeuraLegion/shainet
alexherbo2 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
ht__ has quit [Quit: ht__]
<FromGitter>
<sam0x17> yes and yes ;)
<FromGitter>
<Daniel-Worrall> @sam0x17 Have you compared runtime speed with html-minifier vs node
<FromGitter>
<Daniel-Worrall> I'm looking to use duktape in a future project so was wondering what the overhead would be like for including/running a native lib