<__Myst__>
I was just curious if there was a way to make Socket::Server.accept return the incoming connection's socket, rather than use it within a block.
<__Myst__>
I'd like to be able to save each incoming connection to a list.
<__Myst__>
Nevermind, I figured it out. Didn't see the signature in the API.
<__Myst__>
Thank you anyways
__Myst__ has left #crystal-lang ["WeeChat 1.9"]
maxpert has joined #crystal-lang
<FromGitter>
<picatz> Anytime 👍 😹
maxpert has quit [Remote host closed the connection]
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 260 seconds]
l1meon_ has joined #crystal-lang
l1meon_ has quit [Read error: Connection reset by peer]
l1meon__ has joined #crystal-lang
<FromGitter>
<opensas> hi, everybody
<FromGitter>
<opensas> I'm having troubles trying to build with the --release
maxpert has joined #crystal-lang
<FromGitter>
<opensas> it's just a hello word program, using ubuntu 17.04
<FromGitter>
<opensas> is it a known issue???
maxpert has quit [Ping timeout: 240 seconds]
l1meon__ has quit [Quit: Ex-Chat]
<FromGitter>
<codenoid> add `--no-debug` (?)
<FromGitter>
<opensas> sure, let me try
<FromGitter>
<opensas> great! it worked ok, thanks a lot @codenoid !!!
<FromGitter>
<codenoid> ✨
<FromGitter>
<opensas> BTW, shouldn't this be documented somewhere???
<livcd>
like having too many mediocre / bad titles
<FromGitter>
<sdogruyol> That can be a result of having too many titles
<FromGitter>
<crisward> A guy called Ivo Balbaert contacted me about a book, wanted some info on how we're using it in production. Is that the same one?
<livcd>
i guess
<FromGitter>
<sdogruyol> @crisward no, he's writing a book with Prag prog
<FromGitter>
<sdogruyol> a different publisher
<FromGitter>
<sdogruyol> I haven't announced it yet but I've also started writing a Crystal Book
<FromGitter>
<sdogruyol> My publisher is gonna be Packt
<FromGitter>
<faustinoaq> @crisward Ivo Balbaert is a good man. He wrote a lot about Julia before https://julialang.org/learning/
<FromGitter>
<sdogruyol> yeah, he wrote a lot of books
maxpert has joined #crystal-lang
<FromGitter>
<faustinoaq> @sdogruyol I'll be glad to buy your book 😄 I enjoyed reading crystalforrubyist from start to end 👍
<FromGitter>
<sdogruyol> thanks @faustinoaq :)
<FromGitter>
<sdogruyol> That's just my self effort on writing
<FromGitter>
<sdogruyol> This book is gonna be more professional for sure
<FromGitter>
<faustinoaq> Sounds amazing 👍
ShalokShalom has quit [Remote host closed the connection]
<FromGitter>
<crisward> I'd like to see a laracasts type thing for crystal... There are some video tutorials around, but some more in-depth stuff would be cool. Also looking forward to your book @sdogruyol - any working titles? Crystal Clear perhaps? The many faces of crystal? It's not hard to shard?
<FromGitter>
<sdogruyol> @crisward it'll be an beginner to intermediate book, "Learning Crystal"
<FromGitter>
<sdogruyol> I really wish we had Crystal Clear as screencasts :P
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
<FromGitter>
<sdogruyol> haha @Groogy
DTZUZO has quit [Ping timeout: 240 seconds]
<Groogy>
Well that's true, if you get bunch of people that have never written a book before to write a book because of their technical expertise
<Groogy>
you are gonna have some bad books
<FromGitter>
<sdogruyol> well yeah
<FromGitter>
<sdogruyol> IMHO it's still better than nothing, isnt it?
<FromGitter>
<drujensen> @sdogruyol depends. If the book turns developers away using crystal, then no.
<FromGitter>
<sdogruyol> no, that'd be awful and sad
<FromGitter>
<sdogruyol> I won't write a book like that..
<livcd>
well lets hope crystal thrives
<FromGitter>
<drosehn> @sdogruyol : I already filled out the survey, but I keep wanting to add that I would like to see issue #2713 solved before crystal reaches the official version 1.0. That can trigger some pretty obscure problems in unix, which are particularly frustrating because the problems happen in your *shell* session. It is not immediately obvious that they have anything at all to do with crystal.
<FromGitter>
<sdogruyol> thanks @drosehn didn't know that issue is so important
<FromGitter>
<drosehn> I realize the issue isn't trivial to solve, but it is kinda frustrating.
<livcd>
oh btw does most of the crystal development happen in Latin America ?
<FromGitter>
<sdogruyol> @livcd the core team is mostly from Manas / Argentina
<FromGitter>
<sdogruyol> but we have @RX14, @ysbaddaden , @jhass from Europe
<FromGitter>
<mgarciaisaia> Ary (and all of us in Manas) are from Argentina, so it's a fair share of the Crystal development - but there are lots of great contributors from outside
<FromGitter>
<mgarciaisaia> That, and our shy Serdar :P from Turkey
<livcd>
like a lot of development happened in Japan and in japanese
<livcd>
lets hope this will be different :D
<Groogy>
Well everything AFAIK is in English?
<Groogy>
Ruby kind of developed a seperate Japanese community though, is that what you refering to?
<FromGitter>
<mgarciaisaia> Or you could try relocating to Argentina 🙃
<Groogy>
Heck winter is coming to Sweden
<Groogy>
freaking tempted
<livcd>
Groogy: yes and how a lot of people got frustrated because all the discussions and proposals were in japanese
<FromGitter>
<drosehn> Yeah, when I started with ruby, there was almost no books written in english, and I don't have a clue when it comes to reading Japanese. The first year or so was a lot of trial-and-error for my ruby programming. But I was really keen on a language where "everything is an object".
<FromGitter>
<drosehn> I *used* to know spanish quite well, but I've forgotten almost all of it by now.
<FromGitter>
<mgarciaisaia> We suffer the issue the other way round - we don't have much material in Spanish :/
<FromGitter>
<drosehn> I was trying to do object-oriented programs in perl, and the code I produced was horrible.
<FromGitter>
<drujensen> @drosehn so far I haven’t seen very many conversations about crystal that wasn’t in English.
maxpert has quit [Ping timeout: 248 seconds]
<FromGitter>
<drosehn> Pretty interesting that crystal worked out that way.
<FromGitter>
<mgarciaisaia> Crystal docs are in English, Japanese and I don't recall if any other language - but nothing in Spanish
<FromGitter>
<sdogruyol> I'm fluent in Japanese @livcd, we won't make the Ruby mistake :P
<FromGitter>
<drosehn> Probably helps that you started out by borrowing a lot of docs from ruby.
<FromGitter>
<sdogruyol> And we do have awesome people from Japan like @MakeNowJust
<livcd>
are you ? even the writing systems ? nice
<Groogy>
Uno cerveza por favor
<Groogy>
Gracias
<Groogy>
and that's it
<Groogy>
would I survive in Argentina?
<FromGitter>
<sdogruyol> yes @livcd
<livcd>
mgarciaisaia: that's interesting considering how big the population speaking spanish is
<FromGitter>
<mgarciaisaia> Nah, I think that's The Manas Way™ - we obviously speak Spanish at the office, but we code and document *everything* in English
<FromGitter>
<drosehn> Yeah, spanish is a pretty major language. (IMO)
<FromGitter>
<mgarciaisaia> @Groogy after you're drunk enough, no one will care it's actually *Una* cerveza instead of *Uno* cerveza - you'll get it anyway 🍻
<FromGitter>
<sdogruyol> Indeed 👍
<Groogy>
ah shit xD yeah Uno is Italian I think
<Groogy>
crap
<livcd>
mgarciaisaia: no i mean I thought statistically speaking I thought you would have found someone who would be interested enough to write documentation in spanish
<FromGitter>
<sdogruyol> However I tend to dislike gender specific languages :/
<FromGitter>
<mgarciaisaia> @faustinoaq totally agree - I wont to do that, too, but haven't started yet
<Groogy>
Yeah no for Swedes to learn the masculine, feminine and neutral word thingy in grammar
<Groogy>
eh it's hard
<livcd>
sdogruyol: i know that turkish,japanese and korean share some traits. Did it help when you were learning ?
<FromGitter>
<sdogruyol> kinda
<livcd>
how did you learn it ? how long did it take ?
<FromGitter>
<sdogruyol> they're all agglutinative language
<FromGitter>
<sdogruyol> and the sounds are easy to pronounce :D
<FromGitter>
<sdogruyol> I learnt Japanese when I was 20
<livcd>
well easier than korean or chinese i guess
<FromGitter>
<sdogruyol> Studied 1 year for JLPT
<FromGitter>
<sdogruyol> Then that's it
<livcd>
japanese with hangul would be dope :D
<FromGitter>
<sdogruyol> that'd be weird
<livcd>
sdogruyol: avg h per day ?
<FromGitter>
<sdogruyol> well, I learnt 4 kanji each day :P
<FromGitter>
<sdogruyol> Spoken / listened / practiced a lot
<livcd>
by learnt you mean remembered at least for a month ?
<Groogy>
Also I am curious that people haven't done more Steven Universe references with Crystal :/
<FromGitter>
<sdogruyol> @livcd nope, actually use it
<livcd>
on another topic...what are you thoughts guys about Nim ?
<FromGitter>
<sdogruyol> Nim is cool 👍
<FromGitter>
<sdogruyol> actually we have Nim core developer @dom96 here :D
<FromGitter>
<LuckyChicken91_twitter> i think my crystal compiler is buggy right now.. im getting `undefined local variable or method 'myint' (did you mean 'myint'?`
<FromGitter>
<LuckyChicken91_twitter> and if im running the code in carc.in then theres not this error
maxpert has quit [Ping timeout: 255 seconds]
<FromGitter>
<bew> and if you copy paste from carcin to your computer, the error is still there?
<FromGitter>
<LuckyChicken91_twitter> yes
<FromGitter>
<LuckyChicken91_twitter> of course
<FromGitter>
<LuckyChicken91_twitter> what can i do?
<FromGitter>
<bew> well, what is your code
<FromGitter>
<LuckyChicken91_twitter> just really easy code i think it have nothing todo with that
<FromGitter>
<LuckyChicken91_twitter> and now its working.. created a new file
<FromGitter>
<LuckyChicken91_twitter> it was just really corrupted file or sometin
<FromGitter>
<bew> maybe it was a bad encoding issue
<FromGitter>
<LuckyChicken91_twitter> what is asterite
<oprypin>
rofl
<oprypin>
LuckyChicken91_twitter, it's the guy who made Crystal for the most part
<FromGitter>
<sdogruyol> :D
<FromGitter>
<mverzilli> at any given moment in time, @asterite has the level of access he wants, not sure why at this time he doesn't have write access, but he definitely counts toward mergeability :P
<FromGitter>
<LuckyChicken91_twitter> oooh asterite is a human! thinked its another programming language or something
<FromGitter>
<mverzilli> having watched him programming "live" sometimes I thought the same as you
<FromGitter>
<LuckyChicken91_twitter> he is having a youtube channel?
<FromGitter>
<mverzilli> no, we used to work together :)
<FromGitter>
<LuckyChicken91_twitter> oh okay
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<krypton97> How can I translate this to crystal
<FromGitter>
<krypton97> type StateFn func(*Lexer) StateFn
<watzon>
I have used Go
<watzon>
But I think I'm more of a ferret
<watzon>
krypton97: What is the purpose of that line?
<FromGitter>
<krypton97> Looking to port a library
<FromGitter>
<krypton97> I know what it does in go, but with crystal I think I should use proc or so
<watzon>
That's what it looks like. Not everything is going to be a 1:1 translation
<FromGitter>
<jose-rodrigues> @krypton97 somthing like `alias StateFn = Proc(Lexer)`
<watzon>
@jose-rodrigues +1
<FromGitter>
<krypton97> I think that's is, gonna do some quick testings
<FromGitter>
<krypton97> thanks
<RX14>
doesn't it take a Lexer and return a StateFn?
<RX14>
which is confusing because thats recursive
<RX14>
i thought go funcs were followed by their return type
<FromGitter>
<krypton97> yeah, it's a function that takes a lexer and returns the same function
<watzon>
@krypton97 it would be helpful if we could see the actual code in context
<FromGitter>
<krypton97> I don't even know it it's needed anymore. Golang cares about return type, but crystal doesn't
<watzon>
@krypton97 what do you mean Crystal doesn't?
<FromGitter>
<crisward> is there any way to find projects using a shard?
<FromGitter>
<crisward> BTW just did a github search, sort of worked
<watzon>
crisward: not an easy one that I know of
<watzon>
I was just going to suggest an advanced GitHub search
<watzon>
This is one of the reasons I think a centralized repository would be a good idea
Tuxified has joined #crystal-lang
<FromGitter>
<confin234> I was just wondering, can you code a UI with Crystal? Does it have support for blurring and shadows and stuff like that, or do I need to have another lib installed to do that.
<watzon>
@confin234 good UI support isn't really here yet
<watzon>
But it's being worked on
<RX14>
@confin234 we have some Qt bindings which have been automatically generated
<FromGitter>
<krypton97> Does crystal include something simillar to "this" keyword for clases?
<FromGitter>
<kazzkiq> I just ran a benchmark on a project connecting to MySQL, and it hit 1200 req/s on average (super simple indexed select queries). Is this considered good?
<watzon>
@krypton97 there's self which is similar
<FromGitter>
<kazzkiq> I mean... If I get spikes of 5000 req/s then I'm basically screwed? How those simple services handle bigger number of requests in small VMs?
<FromGitter>
<krypton97> nvm
<FromGitter>
<krypton97> thanks man!
<FromGitter>
<kazzkiq> Any tips on optimizing MySQL connection performance in Crystal?
<FromGitter>
<krypton97> If you find out, I'm interested as well