RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.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
sz0 has quit [Quit: Connection closed for inactivity]
<watzon> Well I've updated it, fixed most of the bugs I could find, you can now type in the editor, it has some formatting options, and just works better overall https://watzon.me/projects/json-to-crystal
<watzon> Fuck. Still has a bug. Fix incoming soon
txdv has quit [Ping timeout: 248 seconds]
<watzon> Ok bug fixed
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
txdv has joined #crystal-lang
faustinoaq has joined #crystal-lang
faustinoaq has quit [Ping timeout: 260 seconds]
<FromGitter> <muizmusaddik> Hi, how do you compare this and make it ```true```: "a" == 'a' ?
<FromGitter> <muizmusaddik> i cant find type casting in the documentation
<FromGitter> <aisrael> `.to_s`
<FromGitter> <muizmusaddik> yeah that works, thanks
<FromGitter> <aisrael> Casting is generally expressed using `.as`. E.g. `.as(String)` (DB) or `.as_i64` (YAML/JSON::Any)
<FromGitter> <muizmusaddik> i see
<FromGitter> <aisrael> While conversion is generally express using `.to_`. E.g. `to_s`
hightower2 has quit [Ping timeout: 256 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <aisrael> Is there a way to restrict the type of a splat? E.g. `def foo(*args : Tuple(String…)`?
<FromGitter> <ezrast> @aisrael If you call string-y methods on the elements of args, they will be effectively restricted. Does that not work for your use case, or are you just trying to be more explicit?
<FromGitter> <aisrael> Trying to be more explicit. Sorry, bad habit coming from Java days (even with a decade of Ruby in between)
<FromGitter> <ezrast> I wouldn't call it a bad habit; was just curious (I also don't have a definitive answer for you but I'm not aware of a way to do it).
<FromGitter> <aisrael> Right now, if I really wanted to I’d have to `foo(a0 : String)` then `foo(a0 : String, a1 : String)` and so on :p
ome has joined #crystal-lang
<FromGitter> <bew> `def foo(*str_splat : String); end`
<FromGitter> <bew> @aisrael ^
<FromGitter> <aisrael> Oooh. TIL thanks!
<FromGitter> <bew> you're welcome ;)
<FromGitter> <aisrael> Needs documentation maybe?
<FromGitter> <bew> Yeah maybe, no idea where I learnt this
googz has joined #crystal-lang
googz has quit [Client Quit]
ome has quit [Quit: Connection closed for inactivity]
manjaro43534 has joined #crystal-lang
jnyw has joined #crystal-lang
hightower2 has joined #crystal-lang
alex`` has joined #crystal-lang
DTZUZO has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
jnyw has quit [Quit: WeeChat 2.0.1]
hightower2 has quit [Ping timeout: 256 seconds]
hightower2 has joined #crystal-lang
hightower3 has quit [Ping timeout: 265 seconds]
faustinoaq has joined #crystal-lang
jokke has quit [Ping timeout: 276 seconds]
jokke has joined #crystal-lang
jokke has quit [Ping timeout: 240 seconds]
Papierkorb has joined #crystal-lang
Papierkorb has left #crystal-lang ["Konversation terminated!"]
jokke has joined #crystal-lang
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <dbackeus_twitter> how do I instantiate numbers of specific sizes (ie. if I do int = 1 it is Int32 but what if I want it to be Int16)?
<FromGitter> <dbackeus_twitter> ok so seems I can do `Int8.new(1)`, is that the idiomatic way?
<FromGitter> <yxhuvud> 1i16 or 1_i16 should both work
<FromGitter> <yxhuvud> or u16 if you want unsigned
rohitpaulk has joined #crystal-lang
DTZUZO has quit [Ping timeout: 256 seconds]
<FromGitter> <dbackeus_twitter> @yxhuvud thanks :)
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <yxhuvud> so when are you coming back to work? :)
duane has joined #crystal-lang
chrisarcand has quit [Remote host closed the connection]
<FromGitter> <Svenskunganka> Is there a particular reason why some modules in the stdlib implements a method that simply raises an error rather than not implementing it at all? For example, `IO` implements the `#seek` method, but raises an error. In this particular example, wouldn't it be better to have an abstract class, e.g `IO::Seeker` that requires implementing the `#seek` method, like Golang's `io.ReaderAt`?
<FromGitter> <straight-shoota> Yeah it's not really a nice interface. By default, `IO` provides methods for reading and writing but obviously, not every IO can do both.
<FromGitter> <straight-shoota> IIRC there was some talk about splitting this into `IO::Readable` and `IO::Writable` or something...
moei has joined #crystal-lang
<FromGitter> <Svenskunganka> Was that discussion held here? Can't seem to find it on GitHub
rohitpaulk has joined #crystal-lang
<FromGitter> <Svenskunganka> Is this it? https://github.com/crystal-lang/crystal/pull/1428
<FromGitter> <faustinoaq> Hi crystal community, I'm trying to use crystal with C#/Mono ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Is working well for now 😄 ... [https://gitter.im/crystal-lang/crystal?at=5a8c3f358f1c77ef3a30baae]
qard has joined #crystal-lang
<FromGitter> <xfbs> Why again would you do this tho? :p
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
<FromGitter> <straight-shoota> @Svenskunganka no, it was more recently. But I can't remember exactly
<FromGitter> <faustinoaq> I'm working on some C# projects and I was wondering if I can use crystal on them 😅
<FromGitter> <faustinoaq> @xfbs ^
<FromGitter> <Svenskunganka> @straight-shoota gotcha, thanks! 😄
<FromGitter> <xfbs> Ohh I see :p seems like a pain tho, I think straight crystal is easier no?
<FromGitter> <faustinoaq> My boss just use paid Microsoft Technologies. He said me that he had bad experiences with open source technologies his community support 😟
<FromGitter> <Svenskunganka> Now I'm curious what those bad experiences were :D
<FromGitter> <faustinoaq> I'm using ASP.NET/Ext.net and MSSQL, And Ext.net license price is about 5000 $ ⏎ ⏎ @Svenskunganka He tried to use Django/Angular before
<FromGitter> <faustinoaq> I hope when crystal/amber/kemal/lucky become production ready, some companies (like Manas or Thoughbot, etc) can give paid support for projects and institutions like Panama Canal 😄
<FromGitter> <j8r> i will never understand why it's so important for them to have a support. If the program passes all the tests and works 1 day, it will work all other ones. If not, just del and repop the container/VM, automatically done.
maattdd_ has joined #crystal-lang
<FromGitter> <faustinoaq> > i will never understand why it's so important for them to have a support ⏎ ⏎ @j8r According to my supervisor, they need to have a support because they need to "maintain" old projects from teams and other developers ⏎ ⏎ In Panama Canal exists some critical software made 10 years ago in Visual Basic/C# and is still being maintained and "supported" by Microsoft 😅
<FromGitter> <j8r> ok, they haven't internal ressources that support their softs
<FromGitter> <j8r> or work on it
<FromGitter> <faustinoaq> @j8r Nop, We use Microsoft stack (Windows Server, Visual Studio and MSSQL) , Spark/Oracle/Solaris and Genexus ⏎ ⏎ All paid software with very expensive licenses and support :(
<crystal-gh> [crystal] MakeNowJust opened pull request #5733: Remove duplicated word 'the' (master...fix/remove-the-the) https://git.io/vARyh
<FromGitter> <faustinoaq> Spark architecture, not the framework 😅 ⏎ ⏎ The IT department not even like Java
<FromGitter> <j8r> hum I see 😐
<lvmbdv> i'm still pissed about no crystal at gsoc
return0e has quit [Ping timeout: 248 seconds]
<FromGitter> <faustinoaq> Well, maybe I can show him the power of crystal and other open source technologies 😎
<FromGitter> <j8r> they can buy some Red Hats, kinf of open source with support
return0e has joined #crystal-lang
<FromGitter> <faustinoaq> Yeah, thatś a good option, I remember someone tried to support crystal on red hat
return0e has quit [Read error: Connection reset by peer]
<FromGitter> <faustinoaq> Yep, here is the thread: https://groups.google.com/forum/#!topic/crystal-lang/wYQ5aqdpF3k
<FromGitter> <faustinoaq> It had some problems because crystal is written in crystal, and seems that red hat doesn accept the binary to compile crystal itself
<FromGitter> <Jens0512> Hello fellow crystal lovers :D ⏎ I'll just shamelessly ask for help with small and simple encryption library "crypt" https://github.com/Jens0512/crypt if anyone is interested. But know that i have only been at programming for a year, and a lot of the code is probably very bad quality
<FromGitter> <Svenskunganka> @faustinoaq When you mentioned the 10 years old software, I think of my mother (who is an IBM Mainframe COBOL programmer) who always complains that she has to dig up and debug COBOL modules where the author has passed away because they were written in like the 60s-70s. Talk about long-term support 😅
<FromGitter> <Svenskunganka> It's quite amazing that such old software is still used in production by banks :P
DTZUZO has joined #crystal-lang
<faustinoaq> @Svenskunganka XD, Here in Panama COBOL is still running in most banks and companies. Businessmen are like "paid once, use forever" :)
<FromGitter> <Svenskunganka> Yeah it seems to still be widely used throughout the world in banks. How many students nowadays learns COBOL and mainframes? Must be really hard to find employees that can stick around for some years
<FromGitter> <Svenskunganka> But they seem to want to start migrating to Java xD
<FromGitter> <j8r> Searching Mainframe Devops Engineers in COBOL 😄
<FromGitter> <Svenskunganka> 😆
<faustinoaq> COBOL looks easy, I remember my professor of Software engineering told me that her company used a tool named "Crystal reports" to migrate/use their cobol tables on Visual Studio
<FromGitter> <Svenskunganka> It is quite unique in that it's very wordy and reads like a text document rather than code.
<faustinoaq> Last year I told my professor I was working with crystal and She thought I was working with "Crystal report" XD
<FromGitter> <j8r> haha
<FromGitter> <Svenskunganka> Oh so that's what Crystal reports is that always show up in my Google searches when I google for something related to Crystal (-lang)
<faustinoaq> Yep
<faustinoaq> Crystal reports was quite popular
return0e has joined #crystal-lang
<FromGitter> <Jens0512> Almost all searches i do about crystal-things (the lang) brings crystal reports...
<FromGitter> <Jens0512> At least can someone take a look at this issue: https://github.com/Jens0512/crypt/issues/1 ⏎ as if it were a stack-overflow question 😅
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vARdN
<crystal-gh> crystal/master 5911da0 TSUYUSATO Kitsune: Remove duplicated word 'the' (#5733)
maattdd_ has quit [Ping timeout: 264 seconds]
FromGitter has quit [Ping timeout: 255 seconds]
FromGitter has joined #crystal-lang
<travis-ci> crystal-lang/crystal#5911da0 (master - Remove duplicated word 'the' (#5733)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/343922606
<DeBot> https://github.com/crystal-lang/crystal/pull/5733 (Remove duplicated word 'the')
flaviodesousa has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <bararchy> @faustinoaq damn, I feel your pain bro, in my old job they wanted me to transition to C# as well, this is part of the reasons we started our startup NeuraLegion
<faustinoaq> @bararchy thank you for your comment! Well, I'm trying to enjoy C#. Sometimes I do fun stuff like cross compiling crystal code and using it on C# :)
Artifinch has joined #crystal-lang
alex`` has quit [Ping timeout: 256 seconds]
<Artifinch> I’m a crystal newbie, so sorry if I’m missing something stupidly obvious but I’ve got a quick question - is it possible to define variables and a function that uses them in the top level domain, or must the function be called with the variables passed as parameters?
rohitpaulk has joined #crystal-lang
<jsn-> Artifinch, no, iirc you can't do that. You can use class variables instead, though
<Artifinch> That’s what I have been using as a workaround. Thanks!
Artifinch has quit [Quit: Page closed]
<crystal-gh> [crystal] rodrigopinto opened pull request #5734: Documenting `Indexable#zip` and `Indexable#zip?` methods. (master...rp-add-docs-to-indexable-zip-methods) https://git.io/vA0OI
<FromGitter> <faustinoaq> ^ So strange, I wondering why plain text result is so different for crystal tests
<FromGitter> <faustinoaq> I'm using latest tests from https://tfb-status.techempower.com/
<FromGitter> <faustinoaq> And https://www.techempower.com/benchmarks/#section=test to plot it
<FromGitter> <faustinoaq> @sdogruyol @elorest @marksiemers @eliasjpr RX14, do you have some idea? Latest round shows a big difference between crystal and crystal-radix
<RX14> either my PR to change the DB params is somehow having an affect
<RX14> OR
<RX14> a bug
<RX14> in which crystal doesn't shut down properly
<RX14> and likely only the very first test reaches full speed
<RX14> somehow
<FromGitter> <faustinoaq> We have been fighting with some issues related to file descriptors in amber, I think the only way to gain most performance is profiling it and see what is slow
<FromGitter> <faustinoaq> http://www.mikeperham.com/2016/06/24/profiling-crystal-on-osx/ ⏎ ⏎ There is a pretty nice guide to profile crystal by @mperham ⏎ ⏎ XCode Instruments profiler looks very nice, although I don't have a mac 😅 [https://gitter.im/crystal-lang/crystal?at=5a8c7c046f8b4b99469d2989]
alex`` has joined #crystal-lang
elisaado has joined #crystal-lang
<elisaado> Does anyone have a list of web frameworks?
<elisaado> I need something fast but easy to use :p
<FromGitter> <bew> It will depend on what you need it for
<elisaado> woah irc bridges
<elisaado> I need to write a high performance JSON api
eliasjpr_ has joined #crystal-lang
<FromGitter> <bararchy> Kemal ?
<FromGitter> <bararchy> it can be fast and easy
<FromGitter> <bararchy> For example https://github.com/blocknotes/kemal-rest-api
<FromGitter> <bararchy> or http://kemalcr.com/cookbook/json_api/
<elisaado> Thank you!
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
bijan_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 260 seconds]
bijan_ is now known as bijan_awaaaay
faustinoaq has quit [Ping timeout: 276 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
<lvmbdv> i just realized @crystallang on twitter is a stripper from UK hahahaha
eliasjpr_ has joined #crystal-lang
DTZUZO has quit [Read error: Connection reset by peer]
eliasjpr_ has quit [Quit: WeeChat 2.0.1]
<FromGitter> <yorci> Any suggestion about "can't use Float in unions yet, use a more specific type" ?
<FromGitter> <bew> Use Float32 or Float64
<FromGitter> <yorci> Oh thank you @bew 👏
<FromGitter> <bew> The default float type in Crystal is Float64
faustinoaq has joined #crystal-lang
duane has quit [Ping timeout: 256 seconds]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_awaaaay has quit [Quit: System has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
faustinoaq has quit [Ping timeout: 265 seconds]
jnyw has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
<hightower2> Which file makes a project visible on crystalshards.org/xyz? Just shard.yml?
alex`` has quit [Quit: WeeChat 2.0.1]
<FromGitter> <straight-shoota> crystalshards uses the Github API to filter repositories with language Crystal
bijan_ has joined #crystal-lang