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> <crisward> Don't envy picking the JS side. To say Js is volatile is somewhat of an understatement. There seems to be a common theme lately of running away from React because of the facebook licensing. It reminds me of Angular 1 a few years ago, everyone loved it, then suddenly it was last weeks off milk.
<FromGitter> <crisward> Nice to see Crystal's pull requests being merged and issues going down. Feels like there is a ton going on.
thews has quit [Ping timeout: 248 seconds]
SolarLune has quit [Quit: Leaving]
<FromGitter> <faustinoaq> Yeah, I hope We can get a deadline for
<FromGitter> <faustinoaq> crystal
<FromGitter> <faustinoaq> 1) 0
<FromGitter> <faustinoaq> 2018 - 2019 could be πŸ˜…
<FromGitter> <crisward> Not next week then? πŸ˜‰
<FromGitter> <faustinoaq> What you mean?
<FromGitter> <faustinoaq> πŸ˜…
<FromGitter> <Qwerp-Derp> Yes the auto-comment-block plugin for VSCode works with Crystal! :D
<FromGitter> <faustinoaq> Oh, I didn't try that plugin yet, let me check πŸ˜„
<FromGitter> <faustinoaq> ((https://i.imgur.com/mqWnXsq.gif)) ⏎ ⏎ auto-comment-block plugin is AWESOME! ✨
<Papierkorb> Is the target triplet a Crystal program is built as stored in it?
wes[phi] has joined #crystal-lang
<FromGitter> <wwselleck> @crisward I've doing JS pretty much exclusively at work for a few years now, so I want to get into another language to keep my non-JS skills up. So I went looking for a new language that would be fun to learn and maybe make some contributions to. I considered ⏎ Elixir - Seems like a great language and platform, but seems to be much more catered for web servers than anything else. And I wanted a language
<FromGitter> ... that i could use for everything. ⏎ Rust - Another language that probably has a great future, but just way too complex for my use cases.
<FromGitter> <faustinoaq> > And I wanted a language that i could use for everything. ⏎ ⏎ JavaScript is almost everywhere, but even JavaScript has usecase limits. I don't think you should use a single language for everything, Yeah, all we have favorites but always exists languages than do a task better than others. ⏎ ⏎ Also I think we shouldn't put limits about learning programming languages. By example I love Crystal, but
<FromGitter> ... also like Elixir and like to code in TypeScript even sometimes I'm with friends coding in C++ and Java. So in conclusion Be open mind, is good for Crystal community and for everyone :) [https://gitter.im/crystal-lang/crystal?at=59bc9aa57b7d98d30dff1cc3]
<FromGitter> <wwselleck> "Everything" was a bad way to put it. More like something I feel comfortable using as a general purpose language.
<FromGitter> <faustinoaq> Protip: @asterite the creator of Crystal uses and likes Elixir πŸ˜‰
wes[phi] has quit [Ping timeout: 252 seconds]
SolarLune has joined #crystal-lang
<FromGitter> <Qwerp-Derp> How do I use compiled `.dylib` files with my project?
adam12 has quit [Ping timeout: 264 seconds]
shelvacu has quit [Ping timeout: 264 seconds]
shelvacu has joined #crystal-lang
minus has quit [Ping timeout: 264 seconds]
bmcginty has quit [Ping timeout: 264 seconds]
baweaver has quit [Ping timeout: 264 seconds]
bmcginty has joined #crystal-lang
baweaver has joined #crystal-lang
baweaver has quit [Changing host]
baweaver has joined #crystal-lang
adam_ has joined #crystal-lang
minus has joined #crystal-lang
Philpax__ has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #4980: Allow to format method arguments with 2 spaces indentation (master...fix/crystal-format/def-args-2-space-indent) https://git.io/v55PT
Philpax__ is now known as Philpax
<FromGitter> <bararchy> Morning Crystal peeps
ShalokShalom has joined #crystal-lang
<FromGitter> <ekremkaraca> Good morning
ShalokShalom has quit [Read error: Connection reset by peer]
<FromGitter> <ekremkaraca> @bararchy Χ‘Χ•Χ§Χ¨ Χ˜Χ•Χ‘
<FromGitter> <faustinoaq> Good Morning - Buenos dΓ­as ⏎ ⏎ (0:00 AM here πŸ˜… )
<FromGitter> <georgeu2000> Why is there `String#blank?` but not `String#present?` ?
ShalokShalom has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
<FromGitter> <faustinoaq> Oh, yeah `#present?` doesn't exist currently, you just found a good reason to do a PR,
<FromGitter> <bararchy> @ekremkaraca Hebrew ha ? :)
<FromGitter> <bararchy> @faustinoaq yeha , crystal community is all over the glob :)
Philpax has joined #crystal-lang
<FromGitter> <ekremkaraca> @bararchy I tried to learn it before
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
claudiuinberlin has joined #crystal-lang
rohitpaulk has joined #crystal-lang
sandelius has joined #crystal-lang
SolarLune has left #crystal-lang ["Leaving"]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
_whitelogger has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <codenoid> hi, i still dont know how to run shell script with `Process.new` https://crystal-lang.org/api/0.19.2/Process.html#new%28command%3AString%2Cargs%3Dnil%2Cenv%3AEnv%3Dnil%2Cclear_env%3ABool%3Dfalse%2Cshell%3ABool%3Dfalse%2Cinput%3AStdio%3Dfalse%2Coutput%3AStdio%3Dfalse%2Cerror%3AStdio%3Dfalse%2Cchdir%3AString%7CNil%3Dnil%29-class-method
<oprypin> codenoid, do you want to start a script that's saved in a file?
<FromGitter> <codenoid> nope, just from string @oprypin
<FromGitter> <faustinoaq> @codenoid πŸ‘‰ http://devdocs.io/crystal/api/0.23.0/process#new(command:String,args=nil,env:Env=nil,clear_env:Bool=false,shell:Bool=false,input:Stdio=false,output:Stdio=false,error:Stdio=false,chdir:String?=nil)-class-method
<oprypin> `Process.run(string, shell: true)` or https://crystal-lang.org/api/toplevel.html#system%28command%3AString%2Cargs%3Dnil%29%3ABool-class-method
<FromGitter> <codenoid> `shell: true` thanks @oprypin @faustinoaq
_p0p0pr37_ has joined #crystal-lang
_p0p0pr37 has quit [Ping timeout: 248 seconds]
_p0p0pr37_ is now known as _p0p0pr37
_whitelogger has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
bmcginty has quit [Ping timeout: 252 seconds]
bmcginty has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <imonmyown> Hi all :)
<FromGitter> <imonmyown> What crystal related extensions for VSCode would you recommend as a community apart from the auto-comment-block mentioned above?
A124 has quit [Ping timeout: 248 seconds]
<FromGitter> <faustinoaq> @imonmyown Oh, see πŸ‘‰ https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki/Useful-extensions
<FromGitter> <sdogruyol> Hey everyone
<FromGitter> <faustinoaq> Hey @sdogruyol !
<FromGitter> <faustinoaq> Here is 6:00 A.M. I'm just preparing to go university πŸ˜…
<FromGitter> <sdogruyol> So early
sandelius has joined #crystal-lang
<Papierkorb> https://camel.readthedocs.io/en/latest/yamlref.html ... Who came up with .. well half of that?!
<FromGitter> <faustinoaq> > So early ⏎ ⏎ Yeah, first class hour here starts at 7:00 a.m πŸ˜ͺ
<sandelius> Hey all. I'm trying to get my head around assignment in Crystal. Why cant it infer the type in this example? https://gist.github.com/sandelius/ef84ea38f2b73fd61b91d306676b7665
<Papierkorb> inferrence in #initialize stops if you call a member method. calling a static method instead should work iirc (or not).
<sandelius> @Papierkorb but it stops at request_method.upcase and that's a member from String class
A124 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
<oprypin> sandelius, inference is intentionally limited in this case because it could be a huge performance drop during compilation, as well as lacking clarity for the reader of the code
<FromGitter> <Rinkana> ```code paste, see link``` ⏎ ⏎ So i have this benchmark. And apparantly the enum version is the slowest. Even slower then the string version. Any ideas on why it is that way? [https://gitter.im/crystal-lang/crystal?at=59bd0e121081499f1f3b2ff4]
<oprypin> sandelius, one fun thing i like to do is run such code on Crystal 0.15 where it, in fact, works https://carc.in/#/r/2qf6
<FromGitter> <Rinkana> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59bd0e45177fb9fe7eca3ddb]
<sandelius> oprypin so when I ned to set @method : String in the class body?
<oprypin> yes
<sandelius> oprypin ok, thx alot
<Papierkorb> Rinkana ... wtf you're right
<FromGitter> <faustinoaq> sandelius, also you can specify types for instances variables instead ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ https://carc.in/#/r/2qf6 [https://gitter.im/crystal-lang/crystal?at=59bd0ebfbac826f054c52576]
<FromGitter> <sandelius> @faustinoaq ahh that looks way better, I'll try it
<sandelius> faustinoaq worked great, thx
<oprypin> Rinkana, Papierkorb, here's what i see https://bpaste.net/show/54117ee0acc9
A124 has quit [Ping timeout: 248 seconds]
<FromGitter> <Rinkana> Alright. So in general symbol & string are quite equal. But enum's are far behind
<FromGitter> <Rinkana> That's really odd, and not what i'd expect
<oprypin> Rinkana, pls look at my paste carefully tho
ShalokShalom_ has joined #crystal-lang
<oprypin> Rinkana, it is incorrect to think that symbol & string are quite equal. symbol & int are quite equal. just some horrible performance failure there
<Papierkorb> That is quite some regression
<FromGitter> <asterite> Keep calm and look at this PR: https://github.com/crystal-lang/crystal/pull/4904
<oprypin> i dont see any proof that it is a regression
<FromGitter> <asterite> (it also applies to enums)
<oprypin> yeah good job @asterite, saves me the need to bisect which i just started
<FromGitter> <asterite> I don't know when it happened, but it's fixed in master :)
<oprypin> yes
<FromGitter> <Rinkana> Ah, that's great to know :)
<Papierkorb> interesting that LLVM didn't inline it by itself
<FromGitter> <asterite> It's not that. Constants that aren't "simple" (like numbers) are always lazily initialized, so LLVM can't inline them
<FromGitter> <Rinkana> @asterite what should be the preference? enums or symbols
<Papierkorb> isn't an enum constant just that?
ShalokShalom has quit [Ping timeout: 264 seconds]
<Papierkorb> Rinkana, enums, always.
<oprypin> Rinkana, enums for public APIs
<FromGitter> <Rinkana> Alright
<FromGitter> <asterite> Both are good. Symbols are shorter to type and with a typo you would get incorrect behaviour
<FromGitter> <asterite> So enums are type safe but boring to type
<oprypin> well i've said before that it doesn't have to be like that
<FromGitter> <asterite> I'd like to improve that, same as automatically allowing number literals to match almost any numeric type restriction, but it's quite hard to implement
<oprypin> it's not worth recommending symbols because of a temporary drawback
<oprypin> of enums
<Papierkorb> to be honest, most of the more-to-type-and-read annoyance is in `case` statements (or ifs). And there, the generated `#foo?` do a great job already
<oprypin> i hate those
<oprypin> discussion is here btw https://github.com/crystal-lang/crystal/issues/3310 still very relevant
<Papierkorb> Sometimes it's annoying to type `SomeModule::SomeClass::MyGreatEnum::FooBar`, sure. but I'll take type safety every day over plain symbols as "messenger".
thews has joined #crystal-lang
thews has quit [Changing host]
thews has joined #crystal-lang
<oprypin> discussed exactly 1 year ago
ShalokShalom_ is now known as ShalokShalom
<FromGitter> <asterite> Actually, I'm thinking symbols will prevent us from doing incremental compilation, now that I think about it, so maybe avoid using them :-)
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<oprypin> gotta remove the temptation to use them then :p
<FromGitter> <asterite> I'm not sure yet, so you can use them :-)
A124 has joined #crystal-lang
<oprypin> Rinkana, btw asterite's pull request does, in fact, fix performance in that case. https://bpaste.net/show/ee059d65835d
<FromGitter> <asterite> Sometimes I like to introduce performance regressions on purpose so that in a next release people can say "Wow! Look at that performance improvement!"
<FromGitter> <sdogruyol> lol nice one @papierkorb
<FromGitter> <asterite> excellent :)
A124 has quit [Ping timeout: 264 seconds]
<FromGitter> <sdogruyol> hey @asterite it's great to see you around :) Welcome back πŸ’―
<FromGitter> <asterite> :)
<FromGitter> <Rinkana> So, one more question about enums. I'm building some sort of event handler and all the possible events are in one big enum. But as you can imagine that's quite hard to keep track of and extend. Is there a way that i can extend an enum from another class during compilation. So that the result is one big enum but it is defined in multiple places?
<FromGitter> <asterite> No, better use symbols or plain constants
A124 has joined #crystal-lang
<oprypin> Rinkana, the events should be a class hierarchy
<oprypin> dont use symbols -_-
<Papierkorb> ^
<Papierkorb> "I have a ton" and symbols won't play nice in a few months when you decide to take another look. If not earlier than that.
<oprypin> woooo compiler heisenbug reproduction down from a huge library to 250 lines
<FromGitter> <Rinkana> Hmm, oprypin. i agree, however i do not know how to handle the 'same' events. What about something like: https://play.crystal-lang.org/#/r/2qfz
<oprypin> i dont get it
<Papierkorb> Me neither. Why would you do it like that?
<FromGitter> <Rinkana> Hm, i have something like this right now: https://play.crystal-lang.org/#/r/2qgp . And as you can see everything is in one big enum. But i can't figure out how to split the enum and yet keep the same pattern.
<Papierkorb> Why do you build that so complicated?
<FromGitter> <Rinkana> Because many different systems need the ability to subscribe to every event that is send around. So in this case the `Events::BarStart` should also be able to do something in `Baz`
<FromGitter> <krypton97> Do rust has something like crystal docs?
<FromGitter> <krypton97> or at least something well readable
<FromGitter> <codenoid> hi, why crystal doesnt make "Crystal in this week" ?
<FromGitter> <codenoid> it's cool
<FromGitter> <krypton97> well, there we go rustbyexample
<FromGitter> <codenoid> maybe related to Crystal Ann
rohitpaulk has joined #crystal-lang
<FromGitter> <opensas> @codenoid you mean this? http://crystalweekly.com/
A124 has quit [Ping timeout: 248 seconds]
A124 has joined #crystal-lang
<FromGitter> <opensas> > **<oprypin>** @sandelius, inference is intentionally limited in this case because it could be a huge performance drop during compilation, as well as lacking clarity for the reader of the code ⏎ any plans to revert this behaviour once the compilation speed get better? somehow it feels like it's not consistent with the rest of the cases
<oprypin> opensas, no plans to revert this. what is the rest of the cases?
<FromGitter> <opensas> I mean type inference works in most cases, at least I had no idea that it was limited in any way
<oprypin> Rinkana, maybe this can inspire u a bit - this is what i meant by the hierarchy https://oprypin.github.io/crsfml/api/SF/Event/KeyEvent.html https://oprypin.github.io/crsfml/api/SF/Event.html
<oprypin> opensas, type inference works for local variables.
<oprypin> types of instance variables is something that affects the program globally, so if you rely on type inference using global information to deduce the types of instance variables, that could go into a feedback loop
<FromGitter> <opensas> ok, didn't know about it
<FromGitter> <opensas> ok, that makes sense
<oprypin> opensas, that's why inference of instance variables was changed to a specific subset of cases that is easy to determine for the compiler and is clear to the reader
<oprypin> opensas, and here's the wild west we used to have in 0.15.0 https://carc.in/#/r/2qho
<FromGitter> <opensas> gee, the wild west looked good, and the type inference worked ok ;-)
<FromGitter> <opensas> when you say "the whole program" do you mean only the current file or the whole project?
<FromGitter> <codenoid> ` is already subscribed ` but i never got any email about crystal :(
<oprypin> opensas, all code including dependencies
<oprypin> codenoid, u can click the link to see previous mails. yeah nothing new has been there
<FromGitter> <opensas> oh, I see why you decided to limit it
<oprypin> (i'm not affiliated with the decisions or the work on this)
<FromGitter> <opensas> yeah, from this example https://carc.in/#/r/2qhj it seems the compiler should be able to infer a Float64 from rand's return type
<oprypin> rand's return type might depend on its arguments which might depend on types of other instance variables
<oprypin> uhh it has no arguments but whatever lol
<FromGitter> <opensas> @oprypin what would be needed to allow each file to be compiled independently? Defining each type visible from the outside would be enough?
<oprypin> something well beyond my understanding would be needed
<FromGitter> <opensas> ja ja
<FromGitter> <codenoid> btw, can ruby sidekiq connect with crystal sidekiq ?,, like ruby sidekiq for the web, and crystal sidekiq for queue
<FromGitter> <drujensen> @codenoid yes, my understanding is they use the same schema
<FromGitter> <drujensen> so connecting to the same redis instance will work fine
<FromGitter> <drujensen> From the Wiki: https://github.com/mperham/sidekiq.cr/wiki/Getting-Started ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59bd3740177fb9fe7ecaf5f4]
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
<wmoxam> `in src/compiler/crystal/crystal_path.cr:130: undefined method 'each_child' for Dir:Class`
<wmoxam> :/
<wmoxam> Is the compiler supposed to use be using the src stdlib when compiling a new compiler (as opposed to using the system stdlib?)
<wmoxam> Just wondering if it's my local env thats the problem
<crystal-gh> [crystal] asterite opened pull request #4983: Fix #4982 (master...bug/fix-4982) https://git.io/v5dOg
<FromGitter> <asterite> Are you using bin/crystal ?
<crystal-gh> [crystal] asterite opened pull request #4984: Fix #4981 (master...bug/4981-fix) https://git.io/v5d3O
wes[phi] has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Philpax_ has quit [Read error: Connection reset by peer]
Philpax_ has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
<wmoxam> asterite: I'm building via make. This is on OBSD, so maybe it's a bug with it. I'll try on OSX
Philpax_ has quit [Ping timeout: 246 seconds]
<FromGitter> <jwaldrip> okay @asterite, check out https://github.com/crystal-lang/crystal/pull/4838
<FromGitter> <jwaldrip> I got the core spec into YAML.parse
<FromGitter> <jwaldrip> At this point it's working as expected but I am curious to get your feedback on the implementation
rohitpaulk has joined #crystal-lang
<FromGitter> <asterite> jwaldrip: last commit seems to be from 6 days ago
<FromGitter> <jwaldrip> Pushing oops
<FromGitter> <jwaldrip> there we go
<FromGitter> <asterite> One thing: I think String.from_yaml("1.2") should work
<FromGitter> <asterite> Same for other reserved values
<crystal-gh> [crystal] asterite opened pull request #4985: Parser: disallow arguments after double splat. Fixes #4965 (master...bug/4965-fix) https://git.io/v5dZC
<FromGitter> <jwaldrip> hmm... why is that?
<FromGitter> <asterite> Cool, it seems my fix that supposedly fixed those random LLVM crashes did work. Never saw CI fail again
<FromGitter> <asterite> jwaldrip: because if I want to parse a string out of a value, antyhing should be valid
<FromGitter> <asterite> What I'm saying is
<FromGitter> <asterite> If I have a mapping that says "I have a version field that I will read as a string", if someone says "version: 1.2" then I'd like that to be the string "1.2"
<FromGitter> <asterite> Otherwise users will be forced to write 'version: "1.2"' which is ugly
<FromGitter> <asterite> Now, when serializing a string, I would put the quotes if the value is 1.2, because we can't know if that's going to be read as a string
<FromGitter> <asterite> But, it's discussable :)
<FromGitter> <asterite> For example, if I have a YAML which accepts a message as a property
<FromGitter> <asterite> I can write... message: hello world
<FromGitter> <asterite> but if I write: message: true it will fail
<FromGitter> <asterite> maybe we can consider the core schema when parsing YAML, even in YAML.mapping. It's probably consistent with other tools and languages
<FromGitter> <asterite> For example if we let "version: 1.2" work for a string mapping, if you then go and parse that from Ruby you won't get a string and that might be a bit unexpected
<FromGitter> <asterite> So let's leave it like that for now :-)
<FromGitter> <asterite> It looks good :)
<crystal-gh> [crystal] asterite opened pull request #4986: Fix #4948 (master...bug/4948-fix) https://git.io/v5dcc
DTZUZU has quit [Quit: WeeChat 1.9]
DTZUZU has joined #crystal-lang
_whitelogger has joined #crystal-lang
Johny_ has joined #crystal-lang
wes[phi] has quit [Ping timeout: 240 seconds]
<Johny_> Has anybody build a standalone webserver like NGINX or Caddy?
Johny_ has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite opened pull request #4987: Fix: missing path lookup through alias (master...bug/4645-fix) https://git.io/v5d8X
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5d89
<crystal-gh> crystal/master eb1f102 Ary Borenszweig: Parser: disallow arguments after double splat. Fixes #4965
<FromGitter> <ino76> Hi. Could someone please tell me why following code doesnt work? >> ⏎ ⏎ ```for x in 1..10 ⏎ puts x ⏎ end``` ⏎ ⏎ I searched through documentation and find nothing about 'for' .. so there is not any in Crystal? :-O ... [https://gitter.im/crystal-lang/crystal?at=59bd7e1a614889d4750777d3]
<FromGitter> <mverzilli> Hi! There's no `for` in Crystal
<FromGitter> <mverzilli> you can use `each` instead
<FromGitter> <ino76> :'(
<FromGitter> <ino76> oh .. OK. Thank you
<FromGitter> <mverzilli> ```(1..10).each do |x| ⏎ puts x ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=59bd7ec21081499f1f3d2b91]
<FromGitter> <ino76> will it be there in a future or it is intentionally abandoned?
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5d8j
<crystal-gh> crystal/master 49f9d28 Ary Borenszweig: Codegen: don't incorrectly consider local as closured. Fixes #4948
<Papierkorb> ino76, hopefully never.
<FromGitter> <mverzilli> it is intentionally abandoned, Crystal attempts to provide only one way of getting things done, at least for basic stuff like iterating a range of numbers in this case
DissonantGuile has quit [Quit: WeeChat 1.8]
<FromGitter> <ino76> so this is that one way? I like 'for' much more. It looks neater, cleaner :( But thanks very much for your help, I guess that this should be mentioned somewere in documentation so people know.
<oprypin> ino76, why should lack of syntax from some other programming language be mentioned?
<oprypin> ino76, "assuming Ruby unless proven otherwise" is not a healthy approach to Crystal
<travis-ci> crystal-lang/crystal#eb1f102 (master - Parser: disallow arguments after double splat. Fixes #4965): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276330492
<DeBot_> https://github.com/crystal-lang/crystal/issues/4965 (A bug trying to downcast a tuple given as a named argument)
<Papierkorb> well, it's a sign of good documentation to counter assumptions a reader has. as for `for`, it's prevalent in almost any other language, not only ruby. Not much more than a `Note: Instead of a for-loop, Crystal uses #each` (with better wording) is required for that.
<oprypin> fine by me
<FromGitter> <ino76> because it share really big percentage of other keywords so even if I never programmed in it I could understand its code pretty well. Cutting of one of most used loop in many languages and didn't mention it anywhere is totally confusing.
<travis-ci> crystal-lang/crystal#49f9d28 (master - Codegen: don't incorrectly consider local as closured. Fixes #4948): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276332092
<DeBot_> https://github.com/crystal-lang/crystal/issues/4948 (Compiler crash redefining local variable in Proc)
<FromGitter> <crisward> Weird, been messing with crystal since last year and never noticed it didn't have for loops. I'm all for having a language with fewer ways of doing things. Anyone who's ever programmed in PHP knows what its like to have too many ways of doing everything.
<Papierkorb> it's php.
<FromGitter> <crisward> My favourite was when they decided their function 'mysql_escape_string' didn't work, so instead of fixing it they replaced it with `mysql_real_escape_string`. πŸ˜† I'm sure there must have been a good reason for this.
<FromGitter> <exts> my favorite is when they deprecated mysql_ functions for pdo. i hate when people shit on my primary language
<FromGitter> <crisward> To be fair, escaping mysql in php was a very common security screw up.
<Papierkorb> sometimes it feels like people are fighting hard to introduce sql injections in their ORM-using applications too.
<FromGitter> <bararchy> @ino76 BTW using a 10.times do ... Is neater I think
<FromGitter> <bararchy> Only my suggestion though
<FromGitter> <crisward> Security wise we have lots of problems with data passing through lots of languages, all with their own escaping rules, `html->js->http->crystal->sql->crystal->http->js->html` surprised anything works. 😟
<Papierkorb> "Surprised that anything works" is basically Computers in a nutshell
<FromGitter> <molovo> Might be a silly question, but is there a way to get 12hr time to show `12` for midnight/midday rather than `0`? I’m using `time.to_s(β€œ%l%p”)` which gives results like this: ⏎ ⏎ ```9pm ⏎ 10pm ⏎ 11pm ⏎ 0am ⏎ 1am``` ⏎ ⏎ If I can, I’d rather it showed `12` instead of `0`. The docs read `hour of the day, 12-hour clock, blank padded (" 0", " 1", ..., "12”)` so I guess it must be possible
<FromGitter> ... somehow but I can’t work it out [https://gitter.im/crystal-lang/crystal?at=59bd90fc1081499f1f3d8408]
<oprypin> lol seems like a bug
<oprypin> molovo, if you like you can open an issue. and i can fix it. or a nice contribution to get started with pull requests yourself :)
<oprypin> if == 0 then = 12
<FromGitter> <molovo> Seems easy enough. I’ll PR it πŸ‘
<FromGitter> <molovo> thanks
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <mverzilli> @ino76 if you're still around, there's a FAQ for these kinds of things. Enumerating every possible thing that is not in the language is by definition impossible, but a related remark is here: https://github.com/crystal-lang/crystal/wiki/FAQ#why-dont-you-add-syntax-for-xyz
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5du5
<crystal-gh> crystal/master 5c27083 Ary Borenszweig: Fix: missing path lookup through alias. Fixes #4645
<crystal-gh> [crystal] mverzilli closed pull request #4984: Don't consider instance var as nilable if assigned before self access (master...bug/4981-fix) https://git.io/v5d3O
<crystal-gh> [crystal] molovo opened pull request #4988: Fix 12hr time formatting (master...patch-1) https://git.io/v5dzJ
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5dzU
<crystal-gh> crystal/master 7f4ccff Ary Borenszweig: Fix: calling twice proc with extern didn't work. Fixes #4982
<Papierkorb> mverzilli, down that rabbit hole, I found a comment in some 2015 issue how without a pipe operator Crystal has no future. Thanks for the laugh.
<FromGitter> <mverzilli> :P
<crystal-gh> [crystal] mverzilli closed pull request #4978: String: optimize gsub and tr for ascii char and single byte string (master...perf/optimize-gsub-and-tr) https://git.io/v57je
<travis-ci> crystal-lang/crystal#5c27083 (master - Fix: missing path lookup through alias. Fixes #4645): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276354473
<DeBot_> https://github.com/crystal-lang/crystal/issues/4645 (Aliasing an module with includes doesn't work correctly)
<FromGitter> <exts> still wish `send` was a thing
<travis-ci> crystal-lang/crystal#611b5eb (master - Semantic: don't consider instance var as nilable if assigned before self access. Fixes #4981): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276355039
<DeBot_> https://github.com/crystal-lang/crystal/issues/4981 ('self' was used before initializing instance variable, except it wasn't?)
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5dgw
<crystal-gh> crystal/master 9965a9b TSUYUSATO Kitsune: Semantic: disallow usage of return/break/next inside ensure (#4486)...
<travis-ci> crystal-lang/crystal#7f4ccff (master - Fix: calling twice proc with extern didn't work. Fixes #4982): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276355382
<DeBot_> https://github.com/crystal-lang/crystal/issues/4982 (Compiler bug with extern struct and proc call (Index out of bounds))
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/v5dgM
<crystal-gh> crystal/master af8c4f6 Benoit de Chezelles: Remove backtrace from ECR errors...
wes[phi] has joined #crystal-lang
<travis-ci> crystal-lang/crystal#b14d8c7 (master - String: optimize gsub and tr for ascii char and single byte string): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276357785
<travis-ci> crystal-lang/crystal#9965a9b (master - Semantic: disallow usage of return/break/next inside ensure (#4486)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276362091
<DeBot_> https://github.com/crystal-lang/crystal/pull/4486 (Semantic: disallow to use return/break/next inside ensure)
<travis-ci> crystal-lang/crystal#af8c4f6 (master - Remove backtrace from ECR errors): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/276362769
wes[phi] has quit [Ping timeout: 260 seconds]
wes[phi] has joined #crystal-lang