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
<FromGitter> <bew> Shouldn't this work? https://carc.in/#/r/2m1m
franzejr has quit [Ping timeout: 260 seconds]
Disrecollection has quit [Ping timeout: 240 seconds]
Disrecollection has joined #crystal-lang
go|dfish has quit [Ping timeout: 248 seconds]
go|dfish has joined #crystal-lang
<FromGitter> <codenoid> is crystal user called Crystalist or Crystaller ?
<FromGitter> <codenoid> and what our slogan ? like `minaswan` in ruby ?
snsei has joined #crystal-lang
Disrecollection has quit [Ping timeout: 248 seconds]
Philpax__ has joined #crystal-lang
<FromGitter> <opensas> @bew I think the problem is that you are defining the getter in the Call class, which has no mention whatsoever to any method_name instance var, like this: https://play.crystal-lang.org/#/r/2m2f
<FromGitter> <opensas> @bew bear in mind I'm faaaar away from being an expert in crystal ;-)
<FromGitter> <codenoid> is there any other way besides .cycle, I want reload looping value automatically when it is finished, not when the loop is updated its value
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a4e755614889d475997b91]
<FromGitter> <marksiemers> Sorry if this is the wrong room, but how many Crystalysts (?) are going to RubyConf this year? Will Manas have a presence?
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 260 seconds]
<FromGitter> <elorest> I was at railsconf so probably won't go to rubyconf.
<FromGitter> <elorest> L
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <codenoid> > ``` ⏎ def list() ⏎ # r = [] of String ⏎ # db functions, blabla ⏎ # bla bla ... [https://gitter.im/crystal-lang/crystal?at=59a4f9d4210ac26920d0fe25]
<FromGitter> <codenoid> *list is returning dynamic data
bmcginty has quit [Quit: Lost terminal]
bmcginty has joined #crystal-lang
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
tdc has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
flaviodesousa has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 264 seconds]
alex`` has quit [Ping timeout: 276 seconds]
<FromGitter> <konovod> @codenoid ⏎ ⏎ ```loop do ⏎ list.each do |d| ⏎ puts d ⏎ end ⏎ end``` ⏎ ⏎ or i am misunderstanding [https://gitter.im/crystal-lang/crystal?at=59a517298f4427b462ad44e8]
<FromGitter> <sdogruyol> Morning everyone
<FromGitter> <konovod> Hello!
<FromGitter> <bew> 'ning!
mark_66 has joined #crystal-lang
<Groogy> Morning!
<FromGitter> <sdogruyol> How are you everyone
<FromGitter> <CodelessFuture> Hi! I'm here again....this time to say....
<FromGitter> <CodelessFuture> I finish my series on Crystal / Kemal on Medium this week
<FromGitter> <CodelessFuture> @sdogruyol I see you write more docs for Kemal
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 248 seconds]
<FromGitter> <sdogruyol> @CodelessFuture welcome back, yes I'm improving the experience
<FromGitter> <ShalokShalom> Kemal and Amber are both officially supported?
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <ShalokShalom> the Atom plugin is available here, while not in Atom itself: https://atom.io/packages/language-crystal-actual
<FromGitter> <ShalokShalom> Can anybody confirm this?
<FromGitter> <bararchy> So, what are the flags to tell crystal to build staticly
<FromGitter> <ShalokShalom> you mean with static libs?
<FromGitter> <bararchy> yeha
<FromGitter> <bararchy> Building on alpine, and I want to generate a static bin
<FromGitter> <bararchy> I remembered something to do with --static flag, but I can;t find that
snsei has joined #crystal-lang
<FromGitter> <bararchy> @ShalokShalom Found it with you haha https://github.com/crystal-lang/crystal/issues/2101#issuecomment-325604128
<FromGitter> <bararchy> Thanks for pinging for me
snsei has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] akzhan closed pull request #4893: [WIP] Wrong overload called instead of BigFloat.initialize(BigRational). (master...wrong-overload-called-intead-of-initialize-bigrational) https://git.io/v5Gkh
<FromGitter> <marin117> Is there any way that I can call class method in option parser block?
<FromGitter> <marin117> Outside of the block it works normally, but inside I get undefined constant.
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 248 seconds]
flaviodesousa has quit [Ping timeout: 248 seconds]
bmcginty has quit [Ping timeout: 246 seconds]
bmcginty has joined #crystal-lang
flaviodesousa has joined #crystal-lang
<FromGitter> <konovod> @ShalokShalom plugin is available in atom, named `language-crystal-actual`. It's just highlighting though, `atom-ide-crystal` is needed for more features (but is broken on last Atom, at least on my pc)
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
<FromGitter> <ShalokShalom> oh, seems it was a temporary issue, its here now
<FromGitter> <bew> @marin117 can you provide an example?
ShalokShalom has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
ShalokShalom has quit [Remote host closed the connection]
<FromGitter> <marin117> https://play.crystal-lang.org/#/r/2m7a ⏎ ⏎ Something like this. It is not correct example but logic is similar to this.
<FromGitter> <marin117> I get undefined constant compile error
<FromGitter> <eliasjpr> Here we go again
<FromGitter> <sdogruyol> Just lol
<FromGitter> <bararchy> Someone should do a twitch stream, that in the chat users can add code to the file, and the goal is trying to write a simple program :) (ofc crystal)
<FromGitter> <sdogruyol> Wasn't there something like Twitch for developers
<FromGitter> <kazzkiq> Actually, there is
<FromGitter> <kazzkiq> Or https://codeshare.io/, for realtime collaborative coding (that one would be fun)
<FromGitter> <kazzkiq> 😄
snsei has joined #crystal-lang
<FromGitter> <sdogruyol> ah yes
<FromGitter> <crisward> Anyone tried to write an imap client in crystal?
<FromGitter> <sdogruyol> not sure about that
<FromGitter> <bararchy> No, but I hear a mutt.cr email client ??? <3
snsei has quit [Remote host closed the connection]
<FromGitter> <crisward> Looks like ruby has it in the standard library.
<FromGitter> <sdogruyol> imap in std?
<FromGitter> <crisward> Think that's what this is - http://ruby-doc.org/stdlib-2.4.1/libdoc/net/imap/rdoc/Net/IMAP.html
<FromGitter> <crisward> Is ruby std written in ruby? If so where do I find the source?
<FromGitter> <bararchy> Ruby github
<FromGitter> <bararchy> There are other cool protocol there
<FromGitter> <bararchy> ftp , pop
<FromGitter> <crisward> @bararchy cool, thanks.
<FromGitter> <bararchy> 👍
<FromGitter> <crisward> I get the feeling copying and pasting this isn't going to work... 😟
<FromGitter> <bararchy> Gona put my $ on No , lol
<FromGitter> <johnjansen> ahhh yeah im with @bararchy 100%, if anyone is taking bets, im ready to drop me retirement fund on “wont work with a cut and paste alone"
<FromGitter> <crisward> If it's possible on the command line, should be possible via crystal?
<FromGitter> <crisward> I just want to log into an email account and grab some headers from every email.
<FromGitter> <johnjansen> its totally possible, but depending on how you want to approach it, may require alot of work ...
mark_66 has quit [Remote host closed the connection]
<FromGitter> <crisward> "lot of work", that sound like a job for someone with boundless energy and enthusiasm, know anyone?
ShalokShalom has joined #crystal-lang
<FromGitter> <johnjansen> IMAP itself is insecure and doesnt need SSL on port 143, IMAP over SSL is on 993, ⏎ check https://tools.ietf.org/html/rfc3501 for the protocol and https://tools.ietf.org/html/rfc3501#section-8 for some sample dialog
<FromGitter> <bararchy> @crisward all those old protocols (pop,SMTP,IMAP,telnet,http) are basically clear text protocols , they were suppose to be human readable so a guy with a telnet client can connect to them, a SMTP client can take 10 min to make , just learn the proper usage and RFC , also checkout "IMAP via telnet" , its just strings via socket
<FromGitter> <johnjansen> there is a fair bit of parsing work to be done … that might be “copy and paste” in some places (if you are lucky, and the ruby is well written)
<FromGitter> <jose-rodrigues> @crisward maybe with curl you can do that ⏎ ⏎ https://debian-administration.org/article/726/Performing_IMAP_queries_via_curl
<FromGitter> <jose-rodrigues> The is a crystal binding
<FromGitter> <jose-rodrigues> https://github.com/blocknotes/curl-crystal
<FromGitter> <johnjansen> @bararchy is right, and yes, it is totally possible … writing a good library however could take some effort
<FromGitter> <crisward> @jose-rodrigues Sounds interesting... @johnjansen I think if I initially stick to the features I need it could be ok. Can always add more stuff later if neccessary.
<FromGitter> <bararchy> Yeha , a good binding that parse and respond to the server as it should might take a bit of work , but just get all mails , parse headers , should be 40 min work max
<FromGitter> <crisward> @bararchy I like your optimism. Hope you're right.
<FromGitter> <johnjansen> i think 40 minutes might be a bit optimistic, but happy to be wrong about that ;-), im sure we will all be interested to see any working code for pretty much anything in this space ...
<FromGitter> <johnjansen> haha
<FromGitter> <johnjansen> ok @crisward you have 40 minutes, starting now, show your working and dont look at your neighbors work ;-)
<FromGitter> <bararchy> I did an SMTP client to get (from, to, subject , data) and send it to the server in 20 min and it even felt kinda usable ;)
<FromGitter> <johnjansen> yeah, SMTP is a fair side simpler to implement though ;-)
<FromGitter> <crisward> Not much chance of that... I'm about to leave for home..
<FromGitter> <bararchy> Then log in: ⏎ A login me@mydomain.com mypassword ⏎ This should give you: ⏎ A OK LOGIN Ok. ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59a58d5ebc46472974d51eb3]
<FromGitter> <bararchy> All Strings
<FromGitter> <bararchy> Seems straight forward
<FromGitter> <ShalokShalom> is there a screencast?
<FromGitter> <ShalokShalom> i mean, where i can watch somebody else coding and this person explains what he/she does
<FromGitter> <ShalokShalom> in Crystal of course 😄
<FromGitter> <johnjansen> hahaha
<FromGitter> <ShalokShalom> there are tons of tutorials for tons of languages
<FromGitter> <ShalokShalom> they all cover the basics of the language and zero real world examples
<FromGitter> <crisward> @bararchy yeah, done that with the openssl tutorial above. I'll let you know how I get on.
<FromGitter> <bararchy> 👍 if you get this thing into a repo for a shard , I'll join in :)
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> BTW @ShalokShalom I managed to static compile a few programs on Alpine
<FromGitter> <bararchy> It was just missing the GC and Libevent static files
<FromGitter> <bararchy> Also needed libxml2 static lib
<FromGitter> <bararchy> Then it worked flawlessly
<FromGitter> <ShalokShalom> oh nice
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
rohitpaulk has quit [Ping timeout: 276 seconds]
ShalokShalom has quit [Remote host closed the connection]
sz0 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
_tsound has joined #crystal-lang
ShalokShalom has joined #crystal-lang
early has quit [Quit: Leaving]
early has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest18365
Guest18365 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sz0 has quit [Quit: Connection closed for inactivity]
tdc has quit [Ping timeout: 252 seconds]
<_tsound> can you get input and put it into a class variable?
<_tsound> nvm i figured it out
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 255 seconds]
snsei has joined #crystal-lang
<FromGitter> <crisward> @bararchy got my very specific requirement working with Gmail. I'll need to tidy it up a lot to make it into a general purpose imap client. You are right though, it's mainly parsing plain text responses, luckily I speak fluent regex 😉
snsei has quit [Ping timeout: 246 seconds]
livcd has quit [Ping timeout: 248 seconds]
svenskunganka has joined #crystal-lang
<svenskunganka> Hey guys, I've got a question. I've seen this `getter filename : String?` used in the stdlib, but I can't find any documentation for what the questionmark does. Does it allow the property to be `Nil`?
<svenskunganka> oprypin, thank you! Where can I find more information about all the macros in the stdlib like `getter`?
<FromGitter> <simaoneves> No shard to check for tests coverage? :)
<FromGitter> <johnjansen> @simaoneves ⏎ 1) install kcov ⏎ 2) compile your spec suite using crystal build spec/foo_spec.cr 3) kcov out-dir --verify ./foo_spec
<svenskunganka> Thanks again, I've been looking like hell for these. Searching for "getter" on the API didn't yield any results
<FromGitter> <crisward> Roughed my imap lib this far - https://github.com/crisward/imap need to write up all the methods needed to list emails, read and process them. Just need this to process some mail headers so don't be surprised if this doesn't evolve very fast...
<FromGitter> <simaoneves> @johnjansen Interesting John, thanks, will try it!
<FromGitter> <crisward> Thanks everyone here who gave me input on where to look for info...
<svenskunganka> oprypin, lovely, that's much better! Thanks once again for the pointers! :)
<FromGitter> <johnjansen> @crisward how did the 40min countdown go ;-)
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
FromGitter has joined #crystal-lang
oprypin has joined #crystal-lang
<_tsound> can you only get input in string format?
<Papierkorb> Input from where?
<_tsound> the user
<Papierkorb> From the user as in stdin?
<_tsound> yep
<Papierkorb> Well, stdin is a stream file descriptor, meaning, you can only read from it, and this can be linear data of any format.
<Papierkorb> Though if you're directly interacting with the user, it's commonly a string
<Papierkorb> Or well, unicode data
<Papierkorb> What's your issue?
svenskunganka has quit [Quit: leaving]
<_tsound> just trying to make a parser
<Papierkorb> For something human-readable? String it is
<_tsound> got it, thanks :D
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 260 seconds]
hmans has quit [Read error: Connection reset by peer]