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
zaiste has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <drosehn> You want your unix command-line programs to return an exit-code, so that the user can write either pipelines or scripts which can decide want to do based on "success" vs "failure" of your program. And do that without having to parse any outputs (especially since the user may want to re-direct output streams for their own reasons).
<FromGitter> <watzon> Good news for anyone here using WSL (Windows Subsystem for Linux)
<FromGitter> <watzon> That is if there is anyone here using WSL...
<FromGitter> <watzon> I've figured out how to make atom's linters work with binaries installed in WSL, including Crystal https://github.com/watzon/wsl-proxy
<FromGitter> <picatz> I can appreciate the work even if I might not use it 👏
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <Qwerp-Derp> It'd be cool if Crystal could do this: ⏎ ⏎ ```class Point ⏎ @x, @y : Int32 ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=59866cd3614889d47520f0b1]
<FromGitter> <Qwerp-Derp> which would make `@x` and `@y` both `Int32`
<FromGitter> <Qwerp-Derp> Just a little syntactic sugar :P
<crystal-gh> [crystal] Fryguy opened pull request #4798: Expose alt_name for redefine_main (master...alt_name_for_redefine_main) https://git.io/v7rRS
rohitpaulk has joined #crystal-lang
<_tsound> figured a way to do spinlock, but one last question (sorry for spamming questions)
<_tsound> How would I include C header files, and do I need to include the source file along with it?
_tsound has quit [Quit: WeeChat 1.9]
_tsound has joined #crystal-lang
_tsound has quit [Client Quit]
_tsound has joined #crystal-lang
snsei has joined #crystal-lang
<_tsound> lol, wrote a little "kernel", got extremely glad it compiled, and it crashed my computer twice when I tried to run it in virtualbox
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
_tsound has quit [Read error: No route to host]
hightower2 has quit [Ping timeout: 276 seconds]
bradleyd has quit [Remote host closed the connection]
<FromGitter> <watzon> Ok so as it turns out, `atom-linter` works perfectly with my method, but `atom-crystal` doesn't use `atom-linter` and doesn't work
Renich has quit [Quit: Renich]
<FromGitter> <Qwerp-Derp> Is there an `elsif`, but for `unless`?
DTZUZO has quit [Read error: Connection reset by peer]
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <watzon> @Qwerp-Derp if you need elsif just use elsif
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <drosehn> what would that be? `elsunless`? 😄
leandrobighetti has joined #crystal-lang
leandrobighetti has quit [Ping timeout: 255 seconds]
<FromGitter> <GetRektByMe> Pls don't give them any ideas
<FromGitter> <GetRektByMe> Can't have Crystal becoming a language known for memes like `elsunless`
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
leandrobighetti has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
leandrobighetti has quit [Ping timeout: 255 seconds]
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
alex`` has joined #crystal-lang
_whitelogger has joined #crystal-lang
Philpax has joined #crystal-lang
tzekid has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest71332
rohitpaulk has quit [Ping timeout: 260 seconds]
tdc has joined #crystal-lang
Guest71332 is now known as Ven``
snsei has quit [Ping timeout: 260 seconds]
<FromGitter> <LuckyChicken91_twitter> when will crystal probably have the first gui framework?
<FromGitter> <bew> When someone or some guys decides to make one!
zaiste has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> okay can someone here please decide to make one?
<FromGitter> <LuckyChicken91_twitter> but how would someone btw begin to make the gui framework?
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven is now known as Guest27753
<vegai> A new set of languages is gaining ground, notably Crystal (#32), Kotlin (#41), Clojure (#42), Hack (#43) and Julia (#46). Especially Crystal with its jump from position 60 to 32 in one month is doing very well.
<vegai> Perhaps this went through reddit or somethinh already, but the first time I saw it :)
<vegai> I know, Tiobe sucks
<vegai> But people read about it
<FromGitter> <LuckyChicken91_twitter> wow! crystal is on 32
bmcginty has quit [Ping timeout: 276 seconds]
bmcginty has joined #crystal-lang
Guest27753 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Yxhuvud> FWIW, #crystal-lang now has more people in it than #ruby-lang had before rails were released.
<Yxhuvud> The mailing list has less activity though.
<Yxhuvud> or well, before rails were announced is perhaps a better way to phrase it.
zaiste has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
<RX14> interesting stat
<RX14> how do you know/remember how many people were in it before rails Yxhuvud?
<Yxhuvud> because I was there.
<Yxhuvud> and I remember the rails announcement message on the mailing list.
<Yxhuvud> and you kinda notice when the amount of people go from a tight cozy group of 50 to 400 in a few months..
<RX14> Yxhuvud, so how did you learn about ruby before rails?
<Yxhuvud> I found the pickaxe book free to read online
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <LuckyChicken91_twitter> the pickaxe book?
zaiste has joined #crystal-lang
rohitpaulk has joined #crystal-lang
tdc has quit [Ping timeout: 276 seconds]
_whitelogger has joined #crystal-lang
zaiste has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <LuckyChicken91_twitter> is someone here
Ven has joined #crystal-lang
Ven is now known as Guest22119
<FromGitter> <bararchy> It's a book teaching Ruby coding
http_GK1wmSU has joined #crystal-lang
http_GK1wmSU has left #crystal-lang [#crystal-lang]
<vegai> I daydreamed about porting the legendary fox book to crystal
<vegai> What was it again...
<vegai> Ah
<vegai> I knew about ruby before this, but got very interested while reading it
<vegai> But merely porting it would perhaps be tad lazy, I don't know
<vegai> What do you guys think?
<FromGitter> <bararchy> I liked it, but I like better the ruby programming ... learn to program I think it's called
<FromGitter> <bararchy> Yeha, this one
<FromGitter> <bararchy> Also "I Love Ruby" is really cool
<vegai> Poignant guide was awesome due to being so different
<vegai> Perhaps not.the best way to learn the language really, but really fun :)
<FromGitter> <LuckyChicken91_twitter> how can you send images??
Guest22119 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Ping timeout: 276 seconds]
alex`` has joined #crystal-lang
<FromGitter> <bararchy> I can only send via web client, the Desktop client wont let me (On Linux)
snsei has joined #crystal-lang
leandrobighetti has joined #crystal-lang
leandrobighetti has quit [Remote host closed the connection]
<FromGitter> <LuckyChicken91_twitter> is it possible to generate a random string? like the rand method but with text
<crystal-gh> [crystal] miketheman opened pull request #4800: :sparkles: Adds System.login (master...miketheman/system-login) https://git.io/v7rbj
<crystal-gh> [crystal] MakeNowJust opened pull request #4801: Parser: prevent to finish a macro body when {% if/for/begin %} is nested (master...fix/not-finish-macro-control-nested) https://git.io/v7rNr
miketheman has quit [Read error: Connection reset by peer]
leandrobighetti has joined #crystal-lang
leandrobighetti has quit [Remote host closed the connection]
chamar has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
leandrobighetti has joined #crystal-lang
leandrobighetti has quit [Client Quit]
<oprypin> yes
<FromGitter> <LuckyChicken91_twitter> how?
<FromGitter> <bararchy> @LuckyChicken91_twitter Do you need a specific structure ?
<FromGitter> <bararchy> UUID, hex ? other formats ?
<FromGitter> <LuckyChicken91_twitter> eehm
<FromGitter> <LuckyChicken91_twitter> no i dont think i need a specific structure
Ven has joined #crystal-lang
<FromGitter> <bararchy> 100 = string length ⏎ ⏎ ```String.new(SecureRandom.random_bytes(100)) ⏎ ``` [https://gitter.im/crystal-lang/crystal?at=59873f0f2723db8d5e7d18ba]
Ven is now known as Guest4921
<FromGitter> <LuckyChicken91_twitter> oh i thinked its maybe a method. *rands* or something like that
<FromGitter> <bararchy> rand is like a (random : Int32)
<FromGitter> <bararchy> as in, it will return an int
<FromGitter> <LuckyChicken91_twitter> i know
<FromGitter> <straight-shoota> @bararchy that will create a random string with mostly higher unicode characters which is probably not the best thing in most cases
<FromGitter> <straight-shoota> could maybe even produce invalid strings, i'm not sure
<FromGitter> <LuckyChicken91_twitter> so im just getting undefined constant SecureRandom
<FromGitter> <straight-shoota> you need `require "secure_random"`
<FromGitter> <LuckyChicken91_twitter> ooh
<FromGitter> <straight-shoota> and you could try `SecureRandom.base64` - this will produce a more sane string using only printable and visible ASCII characters.
<FromGitter> <LuckyChicken91_twitter> oh nice
<FromGitter> <LuckyChicken91_twitter> hmm but at the end of this generated thing theres is always "=="
<FromGitter> <LuckyChicken91_twitter> why?
<FromGitter> <straight-shoota> they're padding from base64 encoding. it's not always two `=` it might just be one or none.
<FromGitter> <straight-shoota> it's not a great method to generate a random string, because it's original purpose is to encode binary data. But it is easy and gives reasonable results
<FromGitter> <LuckyChicken91_twitter> at me theres always a =
<FromGitter> <straight-shoota> it depends on length % 3
<FromGitter> <LuckyChicken91_twitter> okay
<FromGitter> <LuckyChicken91_twitter> why is there btw no srand in crystal? like in ruby
Guest4921 has quit [Read error: Connection reset by peer]
<FromGitter> <straight-shoota> seeds are used by `Random` module https://crystal-lang.org/api/0.23.1/Random.html
<FromGitter> <LuckyChicken91_twitter> why is it not possible to use .reverse at an integer?
<FromGitter> <LuckyChicken91_twitter> it should be possible to reverse numbers
<oprypin> bararchy, oh no, that's an invalid string maker you suggested :(
Ven_ has joined #crystal-lang
<FromGitter> <bararchy> Well, he did say he don't want any specific strcture or encoding XD
<FromGitter> <bararchy> and it is random
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <GetRektByMe> Why would you reverse numbers though
<FromGitter> <GetRektByMe> Without casting it to a string
<FromGitter> <LuckyChicken91_twitter> aaah!
<FromGitter> <LuckyChicken91_twitter> im hating it when im forgetting this simple things!!
<FromGitter> <straight-shoota> @bararchy random bytes might result in an invalid string because of variable character length
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> just now i tested https://github.com/crystal-lang/crystal/blob/master/samples/binary-trees.cr and i entered 10000 in the ARGV and then my computer almost crashed
<FromGitter> <LuckyChicken91_twitter> i will never enter high numbers again
<FromGitter> <GetRektByMe> lol
<FromGitter> <GetRektByMe> Don't half ass it add an extra 0
<FromGitter> <GetRektByMe> If you're gonna crash do it properly smhsmh
hightower2 has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> why is there no tictactoe in https://github.com/crystal-lang/crystal/tree/master/samples
hightower2 has quit [Ping timeout: 240 seconds]
<FromGitter> <straight-shoota> why should it?
<FromGitter> <LuckyChicken91_twitter> because tictactoe is awesome
<FromGitter> <LuckyChicken91_twitter> tictactoe whould be a perfect sample!
Ven has joined #crystal-lang
Ven is now known as Guest2480
snsei_ has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
<oprypin> LuckyChicken91_twitter, 2048 fills the same niche. tic tac toe controls would be awkward in terminal
Renich has joined #crystal-lang
alex``` has joined #crystal-lang
asterite_ has joined #crystal-lang
Liothen- has joined #crystal-lang
dannyAAM_ has joined #crystal-lang
alex`` has quit [*.net *.split]
sija[m] has quit [*.net *.split]
TheGillies has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
asterite has quit [*.net *.split]
manveru has quit [*.net *.split]
Liothen has quit [*.net *.split]
asterite_ is now known as asterite
Liothen- is now known as Liothen
manveru has joined #crystal-lang
braidn[m] has quit [Ping timeout: 240 seconds]
thelonelyghost has quit [Ping timeout: 255 seconds]
jplatte has quit [Ping timeout: 240 seconds]
olbat[m] has quit [Ping timeout: 255 seconds]
vegai has quit [Ping timeout: 264 seconds]
Guest2480 is now known as Ven``
bcardiff has joined #crystal-lang
bcardiff_ has joined #crystal-lang
bcardiff has quit [Ping timeout: 240 seconds]
bcardiff_ is now known as bcardiff
bcardiff has quit [Client Quit]
<FromGitter> <faustinoaq> @LuckyChicken91_twitter I did a tictactoe a weeks ago. ⏎ ⏎ Here you are 👉 https://gist.github.com/faustinoaq/3c3c034713719d82310df3439a892843
<FromGitter> <faustinoaq> @dishcandanty Hi, Do you still have VSCode issues?
snsei has joined #crystal-lang
snsei_ has quit [Ping timeout: 276 seconds]
<FromGitter> <faustinoaq> > That is if there is anyone here using WSL... ⏎ ⏎ @watzon Thanx, seems to be useful with VSCode and Scry on Windows 😄
<FromGitter> <faustinoaq> I shared https://github.com/watzon/wsl-proxy on https://gitter.im/crystal-scry/Lobby , would be useful as workaround for https://github.com/kofno/scry/issues/13
<crystal-gh> [crystal] tosmi opened pull request #4803: [WIP] update freebsd vagant box to lastest release (11.1) (master...freebsd) https://git.io/v7oqx
tosmi has joined #crystal-lang
tosmi` has joined #crystal-lang
tosmi`` has joined #crystal-lang
tosmi has quit [Ping timeout: 246 seconds]
tosmi``` has joined #crystal-lang
tosmi` has quit [Ping timeout: 246 seconds]
Ven`` has quit [Read error: Connection reset by peer]
tzekid has quit [Quit: Leaving]
sija[m] has joined #crystal-lang
<FromGitter> <watzon> @faustinoaq glad it’s helping. I still haven’t been able to get it to work on Atom, but I’ll try it with Scry
tosmi```` has joined #crystal-lang
tosmi`` has quit [Ping timeout: 255 seconds]
bcardiff has joined #crystal-lang
tzekid has joined #crystal-lang
bcardiff has quit [Client Quit]
tosmi``` has quit [Ping timeout: 255 seconds]
tosmi```` has quit [Ping timeout: 255 seconds]
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
thelonelyghost has joined #crystal-lang
olbat[m] has joined #crystal-lang
vegai has joined #crystal-lang
braidn[m] has joined #crystal-lang
TheGillies has joined #crystal-lang
jplatte has joined #crystal-lang
<FromGitter> <bararchy> Thanks @sdogruyol for sharing
<FromGitter> <bararchy> Crystal is rocking tiobe https://www.tiobe.com/tiobe-index/
hightower2 has joined #crystal-lang
<FromGitter> <crisward> Does anyone here do the code triage thing for crystal?
tzekid has quit [Quit: Leaving]
onionhammer1 has quit [Read error: No route to host]
rohitpaulk has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest47023
Guest47023 has quit [Ping timeout: 260 seconds]
bcardiff has joined #crystal-lang
hightower2 has quit [Ping timeout: 248 seconds]
_tsound has joined #crystal-lang
hightower2 has joined #crystal-lang
<_tsound> extern C is lib C?
alex``` has quit [Ping timeout: 240 seconds]