ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.0 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
xiljin has quit [Ping timeout: 268 seconds]
xiljin has joined #crystal-lang
<FromGitter> <jsilverMDX> hello
<FromGitter> <jsilverMDX> anyone here
<FromGitter> <jsilverMDX> ``````
<FromGitter> <jsilverMDX> how much memory do I need to compile a crystal app?
<bmcginty> jsilverMDX: I have 16 gb, and you need at least four free, at last glance.
<FromGitter> <jsilverMDX> just found that out, thanks
<FromGitter> <jsilverMDX> ran into another bug where the app compiles on OS X and not Linux
<FromGitter> <jsilverMDX> (even with enough memory)
<FromGitter> <jsilverMDX> ``````
<FromGitter> <renich> @hugoabonizio hey man, sorry to bother you about this. Please, check this out: https://play.crystal-lang.org/#/r/2azq and concentrate on lines 14:43. There are two empty rescues. When stuff goes well, the log works, but when there're exceptions, nothing happens. I am assuming the empty rescues get the exception and do nothing. What should I put there in order to log to the main logger?
baweaver_away is now known as baweaver
_whitelogger has joined #crystal-lang
krigare[m] has quit [Ping timeout: 276 seconds]
krigare[m] has joined #crystal-lang
<FromGitter> <johnjansen> ```... ⏎ rescue e ⏎ log.error(e.message) ⏎ ...``` [https://gitter.im/crystal-lang/crystal?at=595c691cbf7e6af22ca5d2a8]
<FromGitter> <renich> @johnjansen but that's my logger, not Schedule's logger...
<FromGitter> <renich> I have another. I read a file with YAML.prase(File.read("path/to/file.yaml")). It is a hash of strings; something like: {"value" => "3"}. I wanna do math with it... but can't...
<FromGitter> <renich> Error in src/arby.cr:71: undefined method '/' for YAML::Any
<FromGitter> <renich> Going to sleep, c ya tomorrow. Any help is appreciated, thanks!
* FromGitter * renich goes to sleep
sagax has quit [Read error: Connection reset by peer]
hightower has joined #crystal-lang
dzv has quit [Quit: WeeChat 1.6]
dzv has joined #crystal-lang
<oprypin> you know it's strings and you're saying you wanna do math with strings
<FromGitter> <sdogruyol> what?
<FromGitter> <sdogruyol> That sounds a bit strange
<FromGitter> <sdogruyol> Morning everyone!
<FromGitter> <elorest> Lol. I’m about to go to bed.
<oprypin> previous message (before "sleep"), isn't it?
<FromGitter> <sdogruyol> @elorest have a good sleep :)
<oprypin> yeh good morning
<FromGitter> <elorest> Thanks. Have a good day.
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
<FromGitter> <bararchy> Good morning :)
<FromGitter> <sdogruyol> morning @bararchy
<Groogy> Good morning!
<FromGitter> <sdogruyol> @groogy good morning
<Groogy> looking back on history in the channel, someone said something you need 4gb to build with crystal? that can't be right?
<Groogy> does the compiler really use that much memory?
<FromGitter> <bararchy> Sadly yeha, Crystal compiler is mem hungry and slow
<FromGitter> <sdogruyol> @groogy well sometimes
<FromGitter> <sdogruyol> the compiler definitely has more room for improvements
<Groogy> Yeah just 4gb seems insanely much
<FromGitter> <sdogruyol> well that's for compiling the Crystal compiler
<Groogy> Oh compiling the crystal compiler itself?
<Groogy> not an AP?
<FromGitter> <sdogruyol> nope
<Groogy> app*
<Groogy> oh that makes way more sense
<FromGitter> <sdogruyol> the compiler
<FromGitter> <sdogruyol> compiler is like 100k LOC or smth
<FromGitter> <sdogruyol> let me check
<Groogy> We have files that individually are 60k.....
<FromGitter> <sdogruyol> there you go
<Groogy> though when I looked at the github repo the compiler looked like it was done in Crystal?
<Groogy> no I meant in my companies projects
<FromGitter> <sdogruyol> yeah the compiler is self hosted written totally in Crystal
<FromGitter> <sdogruyol> it's more like 2GB on mac
<FromGitter> <sdogruyol> make clean crystal it's
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=595c95972723db8d5edba828]
<Groogy> though then it makes sense because everything in Crystal is pretty much a template
<FromGitter> <sdogruyol> template?
<Groogy> in C++ the generics language is called templates
<Groogy> eh
<FromGitter> <sdogruyol> oh i see
<FromGitter> <sdogruyol> i'm a CPP noob
flaviodesousa has joined #crystal-lang
<Groogy> go down to function templates
<Groogy> from my understanding, that's pretty much how every single function works in Crystal
<Groogy> which is cool but would explain why it needs so much memory
<FromGitter> <sdogruyol> guess it's related to type inference?
<Groogy> yeah
mark_66 has joined #crystal-lang
<FromGitter> <sdogruyol> cpp confuses me a lot
<Groogy> my guess/understanding is pretty much the compiler will generate a variant of every single function based on the union types
<FromGitter> <sdogruyol> tons of different pointers e.g
<Groogy> Crystal compiler that is
<FromGitter> <sdogruyol> @Groogy that's correct
<Groogy> which then means it works kind of like C++ templates but with more stronger type checking
<Groogy> that is how I wrap my head around it at least :P
<FromGitter> <sdogruyol> cool
<FromGitter> <sdogruyol> that's a good understanding IMHO
<FromGitter> <sdogruyol> @Groogy do you statically or dynamically link your programs
<FromGitter> <sdogruyol> i'm talking about that big projects
<Groogy> eh you mean if I link with shared libraries?
<Groogy> the engine is statically linked but things like Steamworks, tbb, lua and some Paradox specific libraries (but not the development studios own) are shared libraries
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> so you need to have them installed in the target system right?
<Groogy> no they are delivered by Steam in the game directory
<Groogy> even on Linux
<FromGitter> <sdogruyol> oh cool
<Groogy> I mean if we supported let's say Pacman or something we would probably do it through proper config and dependencies but because of Steam it will just be downloaded and put in the same dir as the game directory
<FromGitter> <sdogruyol> so it's like pre-defaults thanks to Steam, right?
<Groogy> No no we upload it to the Linux-specific Depo for our executable which then Steam will download for the client
<Groogy> Steam is just a glorified shop/download client :P
<FromGitter> <sdogruyol> Hahahaha
<FromGitter> <bararchy> Groogy, Yeha usually Feral & Paradox games have all the `.so` files bundled in the game dir
<FromGitter> <martincsimpson> Hello all.
<FromGitter> <sdogruyol> Hey @martincsimpson
<Groogy> Hi!
<FromGitter> <martincsimpson> Sup :)
<FromGitter> <martincsimpson> I've been having chats with our CEO about crystal last night
<FromGitter> <martincsimpson> Looks like we can throw a little bit of cash Crystal's way
<Groogy> @bararchy everyone has to do it like that, I mean it is why we have the whole concept of "DLL hell" but it's because Steam doesn't full commit into integrating to the OS, but though it would also mean Steam would only work on Ubuntu probably
<Groogy> Oh nice Martin
<FromGitter> <martincsimpson> Yeah, I basically put the case forward for crystal, and how it's not quite there yet for production readiness but we'd like to formally become a crystal shop.
<Groogy> make sure to talk to the devs so you get a nice mention on the webpage like the other companies ;D
<FromGitter> <martincsimpson> Oh i will do :)
<FromGitter> <martincsimpson> The only fear they have is that it's a small community, and if there's a problem that we can't solve internally - we're kind of screwed
<Groogy> I was gonna fund as an individual as soon as I am fully committed to the language
<FromGitter> <sdogruyol> that's great @martincsimpson
<FromGitter> <martincsimpson> So, the question I have
<FromGitter> <sdogruyol> well the thing is that Crystal has Ruby influence behind
<FromGitter> <martincsimpson> if we become a contributor - the biggest one even... what sort of support do you think we can get? (So i can settle the CEOs mind)
<FromGitter> <sdogruyol> and the community is getting bigger (trust me i'm in Crystal since 2015:P)
<FromGitter> <sdogruyol> @martincsimpson well the core contributors actually provide hangouts support
<FromGitter> <martincsimpson> @sdogruyol the community is the biggest asset to crystal, and one we'd like to help grow if we're going to use this in production
<FromGitter> <sdogruyol> definitely
<FromGitter> <sdogruyol> that's what i actually did with my previous and current company
<FromGitter> <sdogruyol> and both of the companies are really really happy with Crystal
<FromGitter> <martincsimpson> That's fantastic
<FromGitter> <sdogruyol> one of them is being using it in production for more than 1 year actually
<FromGitter> <sdogruyol> and it's a payment gateway API :P
<FromGitter> <martincsimpson> ah thats awesome
<FromGitter> <sdogruyol> @martincsimpson check this https://salt.bountysource.com/checkout/amount?team=crystal-lang&reward_id=305
<FromGitter> <sdogruyol> they provide hangouts support
<FromGitter> <martincsimpson> Well, as I said, they're happy to throw money at it and help crystal meet its funding goals.
<FromGitter> <sdogruyol> well, everything helps
<FromGitter> <martincsimpson> and I'd love to use it in production, so I'd like to get some form of conversation going with the devs
<FromGitter> <sdogruyol> We're happy to have more production users / companies
<FromGitter> <sdogruyol> so that we can push Crystal forward
<FromGitter> <martincsimpson> Great, it'd also be good to be using it at scale for us, so we can give knowledge back to the community
<FromGitter> <martincsimpson> Does anyone know how much crystal is actually being funded for at the moment (its monthly income?) and where it goes?
<FromGitter> <sdogruyol> i can assure you that it's being used in a very big scale payment gateway already :P
<FromGitter> <sdogruyol> Here's the monthly amount https://salt.bountysource.com/teams/crystal-lang
<FromGitter> <martincsimpson> ahhh
<FromGitter> <martincsimpson> @sdogruyol sorry, I didn't mean to say it wasnt being used at scale :)
<FromGitter> <martincsimpson> I meant, it
<FromGitter> <sdogruyol> please watch this talk i'm actually talking about that project https://youtu.be/OkM42UKhjsk?t=2087
<FromGitter> <sdogruyol> that's me BTW :P
<FromGitter> <martincsimpson> Ah fantastic.
<FromGitter> <martincsimpson> I'll for sure give it a watch
<FromGitter> <sdogruyol> there are some interesting nice graphs there
<FromGitter> <martincsimpson> So I can see Crystal right now is at $1250/month
<FromGitter> <sdogruyol> which can give you better idea
<FromGitter> <sdogruyol> 2330$ / month
<FromGitter> <sdogruyol> where did you see 1250$?
<FromGitter> <martincsimpson> haha
<FromGitter> <akzhan> Wow, you was in kyiv, it’s pretty city
<FromGitter> <martincsimpson> apparently I'm an idiot
<FromGitter> <martincsimpson> Sorry, I checked the side bar not at the top
<FromGitter> <martincsimpson> I was looking at the "Goals" section
<FromGitter> <martincsimpson> I'd like to see if we can boost this to the 5000$.
<FromGitter> <sdogruyol> @akzhan yeah it's beautiful
<FromGitter> <sdogruyol> you know that'd be legendary @martincsimpson
<FromGitter> <martincsimpson> If it would speed up the concurrency/parallelism work it'd be well worth it for us!
<FromGitter> <martincsimpson> so its a win/win
<FromGitter> <sdogruyol> definitely
<FromGitter> <martincsimpson> I'll see what I can do to push it forward, it wont be immediate but if the devs are willing to work with us on this I think we can give it a nice boost.
<FromGitter> <akzhan> @martincsimpson yes, i want to concurrency too. I think that’s only the issue to provide robust prerelease. ⏎ I need no Windows support for example )))
<FromGitter> <sdogruyol> @akzhan agree
<FromGitter> <sdogruyol> please feel free to reach us any moment @martincsimpson
<FromGitter> <martincsimpson> @sdogruyol Sorry - I'm not aware of who handles what here.... who are the devs that would be involved in a discussion like this
<FromGitter> <martincsimpson> I assume you would be @sdogruyol
<FromGitter> <sdogruyol> actually i'm not in the core team but i can help you reach core devs @martincsimpson
<FromGitter> <sdogruyol> let's also mention @bcardiff @mgarciaisaia @mverzilli from the core team :)
<FromGitter> <martincsimpson> Great :) Yeah, we're just about to go through a funding round
<FromGitter> <martincsimpson> So, the funding should arrive end of this month - and if we can sort something out with the core team we can allocate a portion of our budget to crystal 'third party support and development'
<Groogy> O.o that's pretty cool Martin
<Groogy> wished I could get my company to do those kind of things
<crystal-gh> [crystal] funny-falcon opened pull request #4675: change computation of hash value. (master...hasher1) https://git.io/vQ23E
<FromGitter> <martincsimpson> It is :) We're really lucky in the fact we're a small company (by employee number), and I control the entire tech development aspect of the company
<crystal-gh> [crystal] funny-falcon closed pull request #4621: change computation of hash value. (master...hasher) https://git.io/vQ34l
<FromGitter> <martincsimpson> brb
<FromGitter> <sdogruyol> i'm pretty much in the same position as you @martincsimpson :)
<FromGitter> <sdogruyol> it's really cool
sz0 has quit [Quit: Connection closed for inactivity]
<Groogy> sdogruyol: "how many unicorns does it take to carry an elephant"
<Groogy> best metric
<Groogy> I'll start using that at work
<FromGitter> <sdogruyol> hehe, thanks :) @Groogy
<FromGitter> <sdogruyol> i also like to use that a lot :P
tzekid has joined #crystal-lang
<crystal-gh> [crystal] akzhan closed pull request #4581: Float.hash is based on the reduction of float modulo the prime (master...Float64.hash-inspired-by-_Py_HashDouble) https://git.io/vHpCt
<Groogy> Question how used are turkish people to speaking English? your English is pretty good, we just hired a turkish guy but he seems shy/uncertain on his English though he seems to understand it perfectly
<Groogy> and he writes good English as well
<FromGitter> <sdogruyol> @Groogy really? I thought that my English is not that good, especially in that presentation
<FromGitter> <sdogruyol> normally i speak much better :D
<Groogy> no but there's difference in being "confident" in the language which you are
<Groogy> I mean in Sweden we learn English in 3rd grade but doesn't mean you're confident in speaking it
<FromGitter> <martincsimpson> back
<Groogy> Welcome back
<FromGitter> <sdogruyol> @Groogy well, Turkish people also learn English starting from 3rd grade. Most of them are shy but there are lots of ppl good at writing / reading
<FromGitter> <sdogruyol> welcome back @martincsimpson
<FromGitter> <martincsimpson> Thanks all.
<Groogy> wait you ran the server for a full year, not a single restart?
<Groogy> that sounds a bit too good to be true?
<FromGitter> <sdogruyol> literally, yes
<FromGitter> <sdogruyol> i had a screenshot in my work machine but unfortunately it's deleted :/
<FromGitter> <sdogruyol> the GC is a perfect fit for short life-time objects
<Groogy> boy sdogruyol, you sure have been active in promoting Crystal :P
<FromGitter> <sdogruyol> for HTTP requests e.g
<FromGitter> <sdogruyol> i'm trying my best, thank you @Groogy
<FromGitter> <sdogruyol> i've still got a lot to learn and improve
<Groogy> no mean like crystalforrubyists, etc. etc.
<Groogy> trying to get more people to use it
<FromGitter> <sdogruyol> yes
tzekid has quit [Remote host closed the connection]
<FromGitter> <martincsimpson> One thing I'd like to get our team to do - once we've switched over to exclusively crystal is to go to conferences / talks and talk about it
<FromGitter> <sdogruyol> yeah, i think i can help with that :)
<Groogy> oh cool Matz support crystal?
<FromGitter> <martincsimpson> Where do crystalists talk these guys?
<FromGitter> <martincsimpson> &these days
<hightower> It would be awesome if crystal supported expanding __CLASS__ into current class name
Raimondii has joined #crystal-lang
<oprypin> hightower, meh
<oprypin> {{@type.name}} i think
<FromGitter> <sdogruyol> Yes @groogy
<FromGitter> <sdogruyol> @martincsimpson some meetups e.g
<FromGitter> <sdogruyol> Why don't you start an user group in Thailand
<FromGitter> <martincsimpson> I certainly could, but not even ruby has any traction here - let alone crystal
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<FromGitter> <martincsimpson> (They're all java guys in this country, its quite sad really)
<FromGitter> <straight-shoota> hightower what you want as `__CLASS__` is actually `{{@type.name}}`
<FromGitter> <sdogruyol> It was the same in Turkey
<hightower> Great, thanks!
<FromGitter> <sdogruyol> But i changed it in 3 years since starting Ruby Turkey
<FromGitter> <sdogruyol> Now we have around 1000 people in Ruby Turkey
<FromGitter> <sdogruyol> Also 200 in Crystal Turkey
<FromGitter> <sdogruyol> Meaning that starting something definitely helps :)
<FromGitter> <martincsimpson> ah that's awesome, how did you go around with that
<FromGitter> <martincsimpson> as in, what did you do to start the movement so to speak
<FromGitter> <sdogruyol> Went to a lot of local conferences
<FromGitter> <sdogruyol> Organized meetups, workshops
<FromGitter> <sdogruyol> A lot of reach e
<FromGitter> <sdogruyol> G
<FromGitter> <martincsimpson> Well, once my team have got our development under control
<FromGitter> <martincsimpson> we'll be engaging the community i hope
<FromGitter> <sdogruyol> Great
tzekid has joined #crystal-lang
bjz has joined #crystal-lang
Philpax has joined #crystal-lang
<Groogy> @sdogruyol, how is it to be part of creating this community?
<Groogy> I'm curious
<FromGitter> <sdogruyol> @Groogy it's awesome!
<FromGitter> <sdogruyol> i really like what i do
<FromGitter> <sdogruyol> to share the passion and excitement of being in a part of something awesome which is Crystal
<FromGitter> <sdogruyol> and i want to let everyone know about it
<FromGitter> <sdogruyol> :)
<Groogy> how do you find the time though? Do work let you do parts of it under paid hours or?
<FromGitter> <sdogruyol> yeah, they actually support me
<FromGitter> <sdogruyol> which is awesome btw
<FromGitter> <sdogruyol> we're a startup in Turkey which is changing mobile insights http://www.twentify.com/index.html
hightower has quit [Ping timeout: 276 seconds]
<FromGitter> <sdogruyol> @umutuluer thanks for using Kemal, i just met your friend :)
<FromGitter> <martincsimpson> Guys, quick question, anyone have experience using couchdb?
<FromGitter> <sdogruyol> nope
bjz has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <martincsimpson> aww shucks
<FromGitter> <sdogruyol> not me :P
<FromGitter> <martincsimpson> @sdogruyol your startup only does mobile insights?
<FromGitter> <martincsimpson> and is it similar to new relic?
<FromGitter> <martincsimpson> (their insights side)
tzekid has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> Nope
<FromGitter> <sdogruyol> We're in Field Research area
<FromGitter> <sdogruyol> a totally different domain from new relic :P
<FromGitter> <martincsimpson> aahh okay understood
<FromGitter> <bararchy> I'm the only one using Crystal for Cyber\information-security ?
<FromGitter> <sdogruyol> well, you're super classified :P @bararchy
bjz has joined #crystal-lang
<FromGitter> <bararchy> lol, not really XD ⏎ Just having fun usually
<FromGitter> <bararchy> hahah
<FromGitter> <sdogruyol> :D
<FromGitter> <sdogruyol> when are you gonna use Crystal in production? @bararchy
<FromGitter> <bararchy> You can ask @waj :) he is doing a Project with us soon
<FromGitter> <sdogruyol> what!!!
<FromGitter> <sdogruyol> really????
<FromGitter> <bararchy> hahah yeha we hired Manas for a Crystal project
<FromGitter> <sdogruyol> holy cow! That's great news
<FromGitter> <sdogruyol> is it official yet?
<FromGitter> <sdogruyol> @martincsimpson waj is the co-creator of Crystal
<FromGitter> <bararchy> Both parties signed , so yeha
<FromGitter> <sdogruyol> OMG!!!!!!!!
<FromGitter> <bararchy> it's cool :) I was excited too, we had a few calls with them , and I guess tech level stuff will start soon
<FromGitter> <sdogruyol> great
<FromGitter> <sdogruyol> waj is a really really cool :)
<FromGitter> <sdogruyol> i met him at Crystal CodeCamp
<FromGitter> <sdogruyol> it was awesome :D
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <molovo> You guys are making me jealous. Still stuck using PHP in my day job. Crystal would be so much better
<FromGitter> <bararchy> Not even Ruby ? @molovo
<FromGitter> <molovo> Nope, that would be a nice improvement. No one here is interesting in trying anything new though
<FromGitter> <molovo> But then, I start a new job on Monday, so hopefully I can change that there
<FromGitter> <bararchy> Sounds like you should find a better place to work at :) playing with and exploring new tech is the blood of development , at least from my prespective
<FromGitter> <molovo> Yeah I know. My current company aren’t exactly leading the way lol, hence why I’m leaving
<FromGitter> <sdogruyol> @molovo where're you from?
<FromGitter> <molovo> Portsmouth, UK
splitty___ has joined #crystal-lang
bjz has joined #crystal-lang
splitty__ has quit [Ping timeout: 258 seconds]
hightower2 has joined #crystal-lang
<FromGitter> <sdogruyol> interesting. I thought UK had a lot of Ruby jobs e.g
<FromGitter> <sdogruyol> i've some friends working at Ruby shops there
splitty__ has joined #crystal-lang
<Papierkorb> A friend of mine moved to London recently for exactly that reason. He's now happily doing RoR stuff.
<FromGitter> <sdogruyol> yeah
<FromGitter> <martincsimpson> I'm originally from london
<FromGitter> <martincsimpson> Done a lot of ruby jobs - many of them, and the going rates are really good too.
<FromGitter> <martincsimpson> Then i moved to Java Land (Thailand)
<FromGitter> <sdogruyol> you moved to thailand for work?
<FromGitter> <martincsimpson> Yes :)
<FromGitter> <crisward> @molovo We're in Manchester UK and we're using crystal... got 4 new websites in the pipeline using it. Not hiring at the moment though..
splitty___ has quit [Ping timeout: 248 seconds]
<RX14> a lot more UK people here than I thought lol
<FromGitter> <sdogruyol> i wonder what made you move to thailand, the benefits, salary e.g @martincsimpson ?
<FromGitter> <sdogruyol> @RX14 lol
<FromGitter> <sdogruyol> @crisward great :)
splitty__ has quit [Ping timeout: 258 seconds]
<Groogy> I wonder if I am the only Swede
<Groogy> I can't be
<FromGitter> <sdogruyol> probably not
<oprypin> Groogy, well depending on some technicalities
<Groogy> I'm from Skåne, Danish family but Swedish citizenship
<Groogy> so can't be more techical than that :D
<FromGitter> <sdogruyol> now that's confusing :P
<Groogy> Skåne is the land Sweden took from Denmark 400 years ago :P
<FromGitter> <molovo> @crisward Yeah, I’ve seen saw your site back when you released it. That’s built with Crystal right?
<FromGitter> <crisward> @molovo yep. Used to be built with express.js, replaced it with Kemal.
bjz_ has joined #crystal-lang
<Groogy> Is mainly the usage of Crystal at the moment pretty much same as Ruby? Web stuff?
<FromGitter> <sdogruyol> @Groogy kinda
<FromGitter> <bararchy> Groogy no ! hahah
<Groogy> I mean hard to measure and know but going through crystalshards it looks like it
<FromGitter> <bararchy> I guess in the eyes of whom
<FromGitter> <molovo> @Groogy there’s quite a lot of CLI stuff knocking about
bjz has quit [Ping timeout: 268 seconds]
<FromGitter> <sdogruyol> yeah
<FromGitter> <bararchy> So not only web :)
<FromGitter> <tarvit> @bararchy Nice! It seems that Android and iOS development is also possible with Crystal
<FromGitter> <coderhs> Is there any crystal equivalent of chars.hex in crystal? 'a'.hex didn't work.
<FromGitter> <bararchy> @tarvit I know that ARM is compilable , did you find any projects doing it ?
<FromGitter> <tarvit> @bararchy no, but I am sure this should happen :)
<FromGitter> <martincsimpson> @sdogruyol just saww your message..... moving to thailand was easy - good money (albeit lower than the UK), I get to play CTO for the company, and I work in the travel sector which means I can go to pretty much any hotel in thailand at ridiculously cheap prices.
<FromGitter> <martincsimpson> Not to mention my girlfriend of 5 years is Thai (we met in london)
<FromGitter> <gabrielrios> @coderhs 'a'.to_i(16)
<FromGitter> <sdogruyol> @martincsimpson ah i see, cool :)
<Groogy> and I mean you get to leave foggy/rainy/miserable london :P
<Groogy> Stockholm weather is pretty much comparable
<FromGitter> <sdogruyol> @tarvit have you seen my comment on https://github.com/kemalcr/kemal/issues/373#issuecomment-312897602
<FromGitter> <coderhs> @gabrielrios cool. Thanks. Any chance of adding `.hex` to chars class?
<FromGitter> <tarvit> @shabesoglu Yes. I am working on a concept of Modular Apps
<FromGitter> <tarvit> I have some ideas already
<FromGitter> <tarvit> I will share when ready
<FromGitter> <mverzilli> Hi @martincsimpson! Awesome to hear you're thinking of switching your company to Crystal :). Drop me an email to mverzilli -at- manas.tech
<FromGitter> <mverzilli> as regards Ruby groups in Cambodia
<FromGitter> <mverzilli> sorry, in SEA
<FromGitter> <martincsimpson> @mverzilli Hey! That's awesome. You live in SEA?
<FromGitter> <mverzilli> we work with an NGO called InSTEDD and support their Innovation Lab in Phnom Penh
<FromGitter> <mverzilli> I live in Argentina
<FromGitter> <sdogruyol> @tarvit cool, please do so :)
<FromGitter> <mverzilli> but have traveled to SEA many times to support the work there
<FromGitter> <martincsimpson> Ah okay, that's pretty awesome. Thailand could do with some technological innovation :)
<FromGitter> <mverzilli> they bootstrapped the barcamp SEA movement
<FromGitter> <martincsimpson> Oh really? Awesome
<FromGitter> <mverzilli> http://ilabsoutheastasia.org/
<FromGitter> <martincsimpson> @mverzilli we're already using crystal at our company, it's in production even.
<FromGitter> <martincsimpson> We just want to roll it out further once multi-threading becomes a thing
<Groogy> ow yeah what's Crystals variation of defines? Like can you define constants or something from the compilers invocation line?
<FromGitter> <straight-shoota> you can set flags with `-D` and check with macro method `flag?`
<FromGitter> <sdogruyol> @Groogy check this for example https://github.com/kemalcr/kemal/blob/master/src/kemal.cr#L32-L34
<Groogy> is the flag? available in macros?
<FromGitter> <sdogruyol> yeah
<Groogy> ah yes I see in the link
<Groogy> so it's just crystal build src/main.cr -Dsome_flag=val
<Groogy> ?
<Groogy> or it can't hold a value?
<FromGitter> <sdogruyol> value?
<Groogy> like in C++ a define can besides simply being defined can also be something
<Groogy> like BUILD_STRING=v1.0.5-r12345
<Groogy> useful for automatic build systems, guess otherwise can also just generate a config file
<Groogy> with a build script
<FromGitter> <mverzilli> @Groogy flags don't hold values
<FromGitter> <mverzilli> if you pass `-Dsome_flag=val` you'll end up with a `some_flag=val` flag
<Groogy> alright so if I want to do that I'll have to generate a config file instead with constants in it
<FromGitter> <mverzilli> you can use env variables otherwise
<Groogy> is that like linux ENV variable?
<Groogy> because what I want is at compile time be able to configure an entire subsystem
<FromGitter> <mverzilli> I think you could combine ENV with the `run` macro to get that effect (I'm looking for an example)
<Groogy> but otherwise generating a config file, with how simple Crystal syntax is, is not that hard
<FromGitter> <mverzilli> no, of course it isn't :)
<Groogy> are ENV variable set by the linux environment variable or is it the args given to the executable when you start it+
<Groogy> ?
<FromGitter> <straight-shoota> you can do `CRYSTAL_NAME=world crystal eval 'puts "hello #{{{ env("CRYSTAL_NAME") }}}"'`
<FromGitter> <mverzilli> yeah, you get the whole ENV if that's what you're asking
<Groogy> yeah so it's variables in the shell
<Groogy> but if I am doing bin/my_executable arg1=foo arg2=bar
<Groogy> where do those arguments go?
<FromGitter> <hugoabonizio> Hi @renich! You should re-raise the exception inside these empty rescues to Schedule's exception handler catch them and log to you main logger
<FromGitter> <hugoabonizio> @renich take a look at https://github.com/crystal-lang/crystal/issues/4482
<FromGitter> <mverzilli> that goes to ARGV
<FromGitter> <mverzilli> you'd end with `ARGV # => ["arg1=foo", "arg2=bar"]`
<Groogy> nice thx
<FromGitter> <coderhs> Hi there, ⏎ ⏎ Coming from the world of ruby. I am having a slight issue with figuring out the right data types. Can you tell me how I can make this work in crystal? `"10111000100101101010000000101100100101".to_i(2)`
<FromGitter> <akzhan> @Groogy it’s new feature of 0.23.0 release
<Groogy> ah so I don't have it on my pacman 0.22 version on arch
<FromGitter> <akzhan> @coderhs https://play.crystal-lang.org/#/r/2b0q
<FromGitter> <akzhan> it’s 64bit value and cannot be represented in 32 bits.
<FromGitter> <coderhs> thank you. Never had to think about these things in the ruby world. :D Guess my brain has become a bit lazy due to that.
sz0 has joined #crystal-lang
splitty_ has joined #crystal-lang
<FromGitter> <bararchy> So, whos upvoting my Crystal project in reddit ? XD ⏎ https://www.reddit.com/r/MachineLearning/
<FromGitter> <bararchy> hahahah
<FromGitter> <hugoabonizio> @bararchy upvoted :+1:
<FromGitter> <fridgerator> upvoted
<FromGitter> <sdogruyol> @bararchy sure
<Groogy> upvoted :D
<FromGitter> <sdogruyol> upvoted :+1:
<FromGitter> <bararchy> Thanks guysssss :)
<FromGitter> <renich> @hugoabonizio thanks, will do
<FromGitter> <hugoabonizio> @renich :smile:
<FromGitter> <straight-shoota> @akzhan ⏎ ⏎ > @Groogy it’s new feature of 0.23.0 release ⏎ What's new? [https://gitter.im/crystal-lang/crystal?at=595cf67a4bcd78af567ba51e]
<Groogy> arguments to the executable I guess?
<Groogy> ARGV
<oprypin> certainly not
<FromGitter> <renich> @hugoabonizio ok, how can I assign the Schedule.exception_handler to a variable?... Sorry, I don't really understand how Schedule.exception_handler works.
<FromGitter> <hugoabonizio> @renich exception_handler is just a block/proc to be executed if an exception occurs. ⏎ you can create your proc and asign it to a variable ⏎ ⏎ ```Schedule.exception_handler = handler``` [https://gitter.im/crystal-lang/crystal?at=595cf9fcf5b3458e3016a204]
Philpax has quit [Ping timeout: 255 seconds]
splitty__ has joined #crystal-lang
splitty___ has joined #crystal-lang
splitty_ has quit [Ping timeout: 240 seconds]
splitty__ has quit [Ping timeout: 255 seconds]
splitty___ has quit [Ping timeout: 255 seconds]
<FromGitter> <crisward> I think neovim users must be poorer than crystal programmers - http://www.timqian.com/star-history/#neovim/neovim&crystal-lang/crystal vs https://salt.bountysource.com/
<oprypin> ...
<FromGitter> <molovo> Or that neovim doesn’t provide much value over vim. *hides*
<Groogy> Vim has no value by itself so I don't disagree ;D
<Groogy> *shots fired*
<FromGitter> <molovo> ouch...
<FromGitter> <bew> ahahah It does provide value over vim (especially the "plugins in any languages" thing, and soon in crystal if I go and finish my plugin host..), but there are not a lot of people seeing that value I think, so a lot of people've seen the project, but far less are using it enough to gives money for this... Ooooor... IDK
<FromGitter> <molovo> Yeah. TBH I’ve not played with it any more than opening it and “Huh. Looks just like vim"
<FromGitter> <molovo> In fact, looking at the site they’ve added *a lot* of features since I last looked
<FromGitter> <bew> yeah, it's awesome where they are right now, and where it's going!
hightower2 has quit [Ping timeout: 276 seconds]
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<FromGitter> <elorest> I played with NeoVim but I still really like vim and have spent days making a simple setup that works for all of my development. Much of it didn’t work in Neovim, so I went back to vim which I have no issues with.
<FromGitter> <krypton97> where I can find a good benchmark tool?
<FromGitter> <krypton97> for http requests
<RX14> wrk
<FromGitter> <krypton97> using it right now
splitty_ has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
splitty_ has quit [Ping timeout: 248 seconds]
<FromGitter> <sdogruyol> wrk is good
<FromGitter> <sdogruyol> if you're looking for more advanced stuff use Tsung
<FromGitter> <sdogruyol> it's like the defacto
onionhammer1 has quit [Quit: WeeChat 1.0.1]
<FromGitter> <bew> @elorest when did you test nvim?
splitty_ has joined #crystal-lang
hightower has joined #crystal-lang
splitty__ has joined #crystal-lang
splitty___ has joined #crystal-lang
splitty_ has quit [Ping timeout: 246 seconds]
splitty__ has quit [Ping timeout: 260 seconds]
splitty___ has quit [Ping timeout: 260 seconds]
<FromGitter> <johnjansen> what is the best practice for conditionally removing code when running specs
wontruefree has joined #crystal-lang
<wontruefree> I am trying to find the PR with parallelism/threading support
<wontruefree> I cannot find that
<wontruefree> is it merged ?
<wontruefree> basically is there multi-processor support in crystal yet
<FromGitter> <johnjansen> scheduled for the end of the year
<wontruefree> ok
<wontruefree> how can I find the progress on it
<wontruefree> I was looking for the PR
<FromGitter> <johnjansen> look for a branch … a PR will be issued once its ready to merge … and im sure its not
<wontruefree> ok
<wontruefree> thanks
<wontruefree> is there a place where comments on the work are happening ?
<oprypin> nobody has asked for comments
<wontruefree> ok
<FromGitter> <johnjansen> this is the branch, its not in a state for comments from what i can tell and there havent been any commits since march, so its slow going by the look of it ⏎ ⏎ https://github.com/crystal-lang/crystal/tree/thread-support
<wontruefree> thanks
<wontruefree> I am more interested in reading more about it
<wontruefree> I am just interested in keeping up to date with the process of adding it
<FromGitter> <hugoabonizio> @wontruefree https://github.com/crystal-lang/crystal/wiki/Threads-support
<wontruefree> thanks
DTZUZU has quit [Quit: WeeChat 1.5]
<FromGitter> <sdogruyol> hey everyone i've created a repo for benchmarking Github API routing performance for Kemal and Sinatra https://twitter.com/sdogruyol/status/882672391545081856
<FromGitter> <sdogruyol> This replicates all of the Github routes to benchmark the routing performance
<FromGitter> <johnjansen> @sdogruyol can you suggest a good way to exclude a chunk of code when running specs
<FromGitter> <johnjansen> this doesnt relate to kemal ;-)
<FromGitter> <johnjansen> the closest I’ve got thus far is `{% skip() if flag?(:test) %}` then `crystal spec -D test`
<FromGitter> <hugoabonizio> @johnjansen have you tried using ```pending```?
DTZUZU has joined #crystal-lang
<FromGitter> <johnjansen> pending?
<FromGitter> <johnjansen> +?
<FromGitter> <sdogruyol> yeah
<FromGitter> <hugoabonizio> https://crystal-lang.org/api/0.23.0/Spec/Methods.html#pending%28description%3D%26quot%3Bassert%26quot%3B%2Cfile%3D__FILE__%2Cline%3D__LINE__%2Cend_line%3D__END_LINE__%2C%26block%29-instance-method
<FromGitter> <hugoabonizio> I'm not sure what you are trying to do
<FromGitter> <johnjansen> lol … yeah thats fine …
<FromGitter> <johnjansen> its not spec code i want to ignore, its app code … i.e. stop a server coming up if im in test mode … there are several approaches which work, im just weighing up all my options
<FromGitter> <johnjansen> but it dawned on me that it would be helpful to be able to do ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=595d3d5489aea4761d6b2230]
<FromGitter> <johnjansen> kind of thing
<FromGitter> <hugoabonizio> @johnjansen ah I understand ⏎ I'm not aware of any widely used approach but I think the best is to bootstrap your server on a file that is not loaded when testing (a CLI for example)
wontruefree has quit [Quit: Is gone... Just plain old gone]
<FromGitter> <johnjansen> that was one of the options ;-)
<FromGitter> <johnjansen> you can do ⏎ ⏎ ```$ crystal spec -D test``` [https://gitter.im/crystal-lang/crystal?at=595d3db54bcd78af567d2ac3]
<FromGitter> <johnjansen> anyhoo … seems like a `testing?` macro? might be handy
<FromGitter> <johnjansen> back to the hack
wontruefree has joined #crystal-lang
<FromGitter> <hugoabonizio> maybe an easier approach is to set ENV["APP_ENV"] = "test" in your spec_helper.cr and check that instead of a flag
<FromGitter> <johnjansen> yeah, im trying that ATM
<FromGitter> <fridgerator> I usually use the env variable route when excluding stuff via macro
wontruefree has quit [Ping timeout: 246 seconds]
<FromGitter> <johnjansen> @fridgerator got a little snippet, just to sanity check my guff
<FromGitter> <johnjansen> ;-)
<FromGitter> <fridgerator> `{% unless env("SOME_ENV_VAR") == "test" %}`
<FromGitter> <fridgerator> then `{% end %}`of course
<FromGitter> <johnjansen> im assuming you cant set an ENV var in spec helper and check that?
<FromGitter> <fridgerator> hrm, I haven't tried that
<FromGitter> <fridgerator> I usually just set it when running specs`SOME_ENV_VAR=test crystal spec`
<FromGitter> <johnjansen> i did, but it didnt work … although this ^^^^^^ did
<FromGitter> <fridgerator> or using dotenv
<FromGitter> <johnjansen> as you would expect
<FromGitter> <johnjansen> actually scratch that … it did work
<FromGitter> <johnjansen> thanks guys … working wonderfully ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=595d41df6ae41d5d33bc71f9]
<FromGitter> <fridgerator> cool
<FromGitter> <johnjansen> yeah … just keeps my CLI app nice and tight ;-)
<FromGitter> <sdogruyol> yeah i do the same trick for Kemal @johnjansen
<FromGitter> <johnjansen> haha, why didnt you tell me that ;-)
<FromGitter> <sdogruyol> i actually forgot :(
<FromGitter> <sdogruyol> BTW how are you @johnjansen :D
<FromGitter> <johnjansen> lol … i expect more from you Serdar ;-) ⏎ Im great man … back in crystal land for a bit … trying to find any excuse i can
<FromGitter> <johnjansen> how you doing?
splitty_ has joined #crystal-lang
splitty__ has joined #crystal-lang
splitty_ has quit [Ping timeout: 260 seconds]
<hightower> mmm, I have an object which has a property that can be of type Range::StepIterator (basically the result of calling Range#step( by: ...). I expand the type of this object to include Range::StepIterator(Range(Int32, Int32), Int32, Int32), but when I do that, I get: private constant Range::StepIterator(R, B, N) referenced
<hightower> What's the solution?
<Papierkorb> hightower: not referencing StepIterator. Instead, expect the type to be an Iterator(T), or Enumerable(T). I'd prefer the latter.
Ven has joined #crystal-lang
Ven is now known as Guest87924
<FromGitter> <schoening> Riddle me this.. When I added these two constants the compiler complained about undefined local variable or method 'data' . But it worked fine as parameters for the Game.new below before I set those constants to the json data..
<FromGitter> <schoening> http://i.imgur.com/0CP3WLz.png
<FromGitter> <schoening> What am I doing wrong :worried:
<oprypin> schoening, constants cant be based on variables. https://carc.in/#/r/2b2q
<FromGitter> <schoening> Ahhh. Ok thanks :)
<Papierkorb> Constants can't be variable, or they wouldn't be constant ;)
<FromGitter> <schoening> That makes sense. Doh!
<FromGitter> <schoening> Can constants be set in the initialize method tho? (I would check, I am just occupied rn!)
<Papierkorb> Constants are constant at compile-time
<FromGitter> <schoening> Alright. I guess I just create a class with readonly fields then ^^ thx for the help
nikkkk has joined #crystal-lang
<hightower> Papierkorb, so you mean in my specific example I would say Enumerable(Range(Int32, Int32)) ? I tried that and I got the error about my type needing to include Range::StepIterator(Range(Int32, Int32), Int32, Int32) (so, as if the added Enumerable(...) didn't match). Then I also tried doing that_var.as( Enumerable(Range(Int32,Int32)) to specifically set the type, to which I got: can't cast Range::StepIterator(Range(Int32, Int3
<hightower> 2), Int32, Int32) to Enumerable(Range(Int32, Int32))
<Papierkorb> You're iterating over Int32's (in this case), not ranges
<Papierkorb> `getter bag_of_ints : Enumerable(Int32)`
<hightower> That worked; at least didn't throw compile time warnings. Thanks!
splitty___ has joined #crystal-lang
splitty__ has quit [Ping timeout: 260 seconds]
splitty___ has quit [Ping timeout: 260 seconds]
Guest87924 has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> @johnjansen great, thank you :P
<FromGitter> <sdogruyol> This is some great community management from Rust team https://blog.rust-lang.org/2017/07/05/Rust-Roadmap-Update.html
<FromGitter> <sdogruyol> I think we should take example from them :)
<FromGitter> <sdogruyol> inspiration*
Ven_ has joined #crystal-lang
<FromGitter> <bararchy> Cool :)
Ven_ has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
bmcginty has quit [Ping timeout: 260 seconds]
bmcginty has joined #crystal-lang
onionhammer has joined #crystal-lang
<FromGitter> <bew> Really nice blog post indeed!
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nikkkk has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower2 has joined #crystal-lang
splitty_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower has quit [Ping timeout: 240 seconds]
<FromGitter> <jsilverMDX> Sup yo
<FromGitter> <jsilverMDX> anyone have any idea about this crazy occurance? https://github.com/crystal-lang/crystal/issues/4679
<FromGitter> <kazzkiq> Anyone already used Google Analytics with Crystal? Trying to figure out how I could make use of it directly from Crystal in my backend.