ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
greenbigfrog has quit [Quit: The server of my BNC just shutdown or got killed!!!]
greenbigfrog has joined #crystal-lang
<FromGitter> <sdzyba> @Papierkorb, could you please clarify why symbols should be avoided in crystal?
mbarbar has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
vivus has quit [Quit: Leaving]
snsei has joined #crystal-lang
<FromGitter> <sam0x17> they are numbers that are generated at compile time @sdzyba -- there is no runtime support for going string => symbol or symbol => string, which takes a way a lot of their usefulness as a syntactic stand-in for string (correct me if I'm wrong?)
snsei has quit [Remote host closed the connection]
Alibaba has quit [Ping timeout: 248 seconds]
snsei has joined #crystal-lang
mbarbar has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
DTZUZU has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
watzon_ has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
hallomann is now known as reblunk
rohitpaulk has quit [Ping timeout: 248 seconds]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
handicraftsman has quit [Ping timeout: 248 seconds]
handicraftsman has joined #crystal-lang
snsei has joined #crystal-lang
mark_66 has joined #crystal-lang
mark_66 has quit [Read error: Connection reset by peer]
mark_66 has joined #crystal-lang
<FromGitter> <yxhuvud> yes, also the inability to create new unique at runtime can be a bit lacking at times.
<FromGitter> <sdogruyol> morning everyone
rohitpaulk has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<Groogy> Morning! o/
<Groogy> also yeah on Symbols, they are pretty much global enums which is just... bad
flaviodesousa has joined #crystal-lang
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
<FromGitter> <sdzyba> Thanks for clarification. ⏎ I guess it would be good to include these implementation details on https://crystal-lang.org/docs/syntax_and_semantics/literals/symbol.html
<FromGitter> <extremety1989> morning ))
snsei has quit [Remote host closed the connection]
<FromGitter> <bararchy> Hi all :)
Papierkorb_ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
shankar has joined #crystal-lang
<FromGitter> <sdogruyol> hey @bararchy
shankar has quit [Quit: Leaving]
shankar has joined #crystal-lang
shankar has quit [Quit: Leaving]
[spoiler] has quit [Quit: Cheers!]
[spoiler] has joined #crystal-lang
[spoiler] has joined #crystal-lang
[spoiler] has quit [Client Quit]
[spoiler] has quit [Client Quit]
[spoiler] has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
snsei has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 258 seconds]
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] straight-shoota opened pull request #5321: Add `Time.utc` (master...jm-time-utc) https://git.io/vFAFh
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
waghanza has joined #crystal-lang
<waghanza> hi
<waghanza> how crystal technical documentation is generated ?
<waghanza> I found it very clear
<FromGitter> <bew> from the comments in the code
<waghanza> yes
<waghanza> thanks for reply
<waghanza> but I am asking myself how process is used for html creation (building http://crystal-lang.org/api)
rohitpaulk has joined #crystal-lang
<FromGitter> <bew> to generate the documentation of a project, you can use `crystal docs` in the root of your project, or `crystal docs file.cr` to generate the docs for this file and all required files
<waghanza> I think we are misunderstanding
<FromGitter> <waghanza> is there a process (internal to crystal-lang) to generate documentation when pushing on master
<FromGitter> <waghanza> ?
<FromGitter> <waghanza> is it a manual command like `crystal docs` launched or a service linked on github ?
waghanza has quit [Quit: Page closed]
<FromGitter> <bew> ah ok, hmm I guess that for the official doc it's updated on each release, by an automatic `crystal docs` and upload to a remote server, I think RX14 will know better
<FromGitter> <waghanza> ok
<FromGitter> <waghanza> I hope he read this message ;-)
<FromGitter> <Rinkana> What is the best way to convert an array with bytes (`Array(UInt8)`) to an string?
<FromGitter> <Rinkana> ```bytes = [105_u8,110_u8,105_u8] ⏎ String.new(Bytes.new(bytes.size) { |i| bytes[i] })``` [https://gitter.im/crystal-lang/crystal?at=5a16e09c2837ee5106bcd208]
<FromGitter> <bew> can I ask where this array comes from?
sz0 has joined #crystal-lang
<FromGitter> <Rinkana> It's being read from a file.
<FromGitter> <Rinkana> But i don't know how long it will be. It's an string that will be terminated by an null-byte. So i loop the `#read_byte` untill i hit that null-byte. Meanwhile i store the bytes in that array so i can convert it into an string
<FromGitter> <bew> to read a file (or any IO) to a string you can use `IO#gets_to_end`
<Papierkorb_> doesn't read like it's a text file
<FromGitter> <bew> ah yes maybe, but he wants to build a String, so I assumed it would be a text content
<Papierkorb_> Reading binary data into a string is a recipe for disaster
<FromGitter> <Rinkana> It's indeed not a text file. It's an proprietary file format for compression
<Papierkorb_> Rinkana, never tried, but I'd try using `IO#gets` with a delimiter of a NUL char
<Papierkorb_> Also make sure you get the encoding right
<Papierkorb_> aka `IO#set_encoding`
<FromGitter> <Rinkana> Hmm
<FromGitter> <Rinkana> What is a NUL char in crystal?
<FromGitter> <Rinkana> ah `'\u0000'`
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> @Papierkorb_ `IO#gets` will return a `String` so it's not a good idea imo
<FromGitter> <Rinkana> In my case i know it's a string
rohitpaulk has joined #crystal-lang
<FromGitter> <Rinkana> `name = file.gets('\u0000', true).to_s` works like a charm
<hightower4> Papierkorb_, your qt5 bindings are usable?
<Papierkorb_> Dunno? Try them
<FromGitter> <bew> my best bet would be to read the file content to a Bytes object, get the index of the NUL byte, create a `Bytes` and create a String from where you are to the index you found before.
<Papierkorb_> bew, that's basically what that method does, on top of multi-byte char awareness
<Papierkorb_> Which is a plus
<FromGitter> <bew> a plus?
<FromGitter> <Rinkana> @bew some of the files are 300mb+
<FromGitter> <Rinkana> I'm not really keen on loading all that into memory
<Papierkorb_> the only thing that kinda sucks is it treating the NUL byte as character
<FromGitter> <bew> ah maybe if the string in question have unicode, the NUL could be found earlier in a unicode char?
<Papierkorb_> Shouldn't happen
<Papierkorb_> NUL in a multi-byte sequence, in UTF-8, is still NUL
<Papierkorb_> Not supposed to happen. Going byte by byte doesn't break anything for that. For other theoretical encodings, it could. But bleh.
rohitpaulk has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] bew opened pull request #5322: Fix typo in IO (master...fix-typo-io) https://git.io/vFxGw
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
flaviodesousa has quit [Ping timeout: 248 seconds]
renovo has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
renovo has quit []
rohitpaulk has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
danielpclark has joined #crystal-lang
hightower3 has joined #crystal-lang
hightower4 has quit [Ping timeout: 248 seconds]
snsei has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
<Groogy2> and home, finally some time to sit and work in Crystal
Groogy has quit [Disconnected by services]
Groogy2 is now known as Groogy
Groogy_ has joined #crystal-lang
<FromGitter> <bararchy> :)
<FromGitter> <bew> Groogy2 = Groogy.clone
<FromGitter> <bew> Pfff you should find better names, I know it's difficult but.. heh :P
<Groogy> lol it's just I'm always online at work and at home
<wmoxam> naming is the toughest problem in CS
<wmoxam> (and IRC as well)
<FromGitter> <bararchy> Just add an "o"
<FromGitter> <bararchy> grooogy
<FromGitter> <bararchy> no one will even notice XD
<Groogy> meh this nick I've had for like 14 years
rohitpaulk has quit [Ping timeout: 255 seconds]
danielpclark has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#f7f9c5b (master - Fix typo in IO comment (#5322)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/306442385
danielpclark has joined #crystal-lang
<Groogy> there we go, buttons done
<Groogy> time to do only partial update of the screen. I.e only render part of ui that has changed
<wmoxam> Groogy: what are you building?
<Groogy> framework for rendering n other stuff
<Groogy> i.e make games
<wmoxam> nice
<Groogy> loading images, rendering 3d meshes, rendering simple 2d primitives and text rendering is done
<Groogy> working on a gui in it right now
rohitpaulk has joined #crystal-lang
<handicraftsman> бНОПНЯ
<Groogy> I can't read cyrilic?
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
<Papierkorb> Groogy: That actually looks like a reasonable place to use something like nuclear. Though if it's so small, I'd actually think about porting/reimplementing it in Crystal
rohitpaulk has joined #crystal-lang
<Papierkorb> Groogy: I think your nick is great
<Groogy> huh? You mean the ui?
<Papierkorb> ya
<Groogy> ah yeah just porting my c++ ui I made long time ago
<Groogy> I'm using cute for the hooks, remember?
<Papierkorb> ah, that, yeah
<Groogy> it's really nice, the user code is really straightforward
faustinoaq has quit [Ping timeout: 248 seconds]
rohitpaulk has quit [Ping timeout: 248 seconds]
danielpclark has quit [Ping timeout: 246 seconds]
<Groogy> when it isn't clearing the repaint properly
<FromGitter> <bew> 4_000 FPS Oo
<Groogy> that's in debug and without some more optimizations I need to do
<Groogy> I get 11k in release ;D
<Papierkorb> And you probably already have more polygons on the screen than the Nintendo DS supported lul
<Groogy> haha
danielpclark has joined #crystal-lang
<Papierkorb> Just checked again. It only did 2k polygons @ 60fps.
<Groogy> well we're gonna beat that easy peasy
<Groogy> being on pc & all
<Papierkorb> any cheap phone should surpass that nowadays
vivus has joined #crystal-lang
faustinoaq has joined #crystal-lang
<Groogy> bleeeh, been so much lately I've missed working in Crystal
<crystal-gh> [crystal] bcardiff closed pull request #5323: correct float parsing fixes #5286 (master...fix-json-float-paring) https://git.io/vFxoB
<Groogy> finally have time and doesn't feel I have enough time D: I wanna get the base of the UI finished D:
<handicraftsman> * gg
<handicraftsman> By the way, do you use GNOME 3?
<Groogy> yepp
<handicraftsman> I too ;)
<handicraftsman> WOw, weechat
<Groogy> best one 👌
<handicraftsman> I use hexchat
<handicraftsman> Groogy, https://github.com/gnunn1/tilix
<Groogy> never really used tile based window management, probably should try sometime
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
<Groogy> though I'm so used on just hitting the super key all the time and pic my window from there
faustinoaq has quit [Changing host]
faustinoaq has joined #crystal-lang
<Groogy> Anyway bed calls, night!
faustinoaq has quit [Quit: IRC client terminated!]
danielpclark has quit [Ping timeout: 248 seconds]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
danielpclark has joined #crystal-lang
faustinoaq has quit [Ping timeout: 248 seconds]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
danielpclark has quit [Ping timeout: 248 seconds]
danielpclark has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter> <kingsleyh> Hello - I've just started learning Crystal - I've got a lot of experience with Ruby so it feels very familiar
<FromGitter> <kingsleyh> I enjoy coding in IntelliJ - so I've started work on an alternative intellij plugin - it will probably be overtaken by an official one but in the meantime I plan to support this one while I do some crystal coding - https://github.com/intellij-crystal/intellij-crystal
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
danielpclark has quit [Ping timeout: 268 seconds]
danielpclark has joined #crystal-lang