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
olbat has quit [Ping timeout: 250 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
olbat has joined #crystal-lang
olbat has quit [Changing host]
olbat has joined #crystal-lang
aroaminggeek has joined #crystal-lang
aroaminggeek is now known as aroaminggeek[awa
alex`` has quit [Ping timeout: 272 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 265 seconds]
aroaminggeek[awa is now known as aroaminggeek
oz has quit [Ping timeout: 240 seconds]
oz has joined #crystal-lang
olbat has quit [Ping timeout: 248 seconds]
olbat has joined #crystal-lang
olbat has quit [Changing host]
olbat has joined #crystal-lang
andrewzah has quit [Ping timeout: 248 seconds]
aroaminggeek is now known as aroaminggeek[awa
andrewzah has joined #crystal-lang
hightower3 has quit [Ping timeout: 256 seconds]
aroaminggeek[awa is now known as aroaminggeek
aroaminggeek is now known as aroaminggeek[awa
aroaminggeek[awa is now known as aroaminggeek
astronavt has joined #crystal-lang
notdaniel has joined #crystal-lang
notdaniel is now known as _notdaniel
_notdaniel has quit [Quit: Leaving]
aroaminggeek is now known as aroaminggeek[awa
A124 has quit [Ping timeout: 272 seconds]
aroaminggeek[awa is now known as aroaminggeek
A124 has joined #crystal-lang
A124 has quit [Ping timeout: 240 seconds]
astronavt has quit [Quit: Leaving...]
A124 has joined #crystal-lang
<FromGitter> <imonmyown> It's surely great to see feedback from manas, looking forward to regular updates from you guys :)
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aroaminggeek has joined #crystal-lang
<FromGitter> <lukeholder> Thinking of iterating and working on it
<FromGitter> <lukeholder> For the 1.0 release one day :)
<FromGitter> <lukeholder> just playing with some ideas
<FromGitter> <HCLarsen> Nice idea. It is a bit drab at the moment. I just hope that with the 1.0 release, the API pages will have links for previous releases, the way that Rails and Ruby do.
<FromGitter> <imonmyown> @lukeholder I like how it looks :)
<FromGitter> <lukeholder> @imonmyown the current site's design?
<FromGitter> <imonmyown> no, the image you posted
<FromGitter> <sdogruyol> @lukeholder looks good
rohitpaulk has joined #crystal-lang
<FromGitter> <lukeholder> @imonmyown @sdogruyol thanks
<aroaminggeek> Much better than the shocking pink, IMO.
aroaminggeek has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
<FromGitter> <HCLarsen> I'm gonna agree with that. I'm liking that colour scheme a lot better.
<FromGitter> <lukeholder> Yeah, totally agree... its a work in progress
<FromGitter> <lukeholder> need to keep refactoring
<FromGitter> <bararchy> Papierkorb if you need Microsoft gives free Win VMs here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ it's suppose to be for "browser tests" but you can use it for any development process
<FromGitter> <bararchy> @lukeholder What do you think about the Gray\Black scheme they use now for the site?
alex`` has joined #crystal-lang
flaviodesousa has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
mark_66 has joined #crystal-lang
<FromGitter> <lukeholder> @bararchy I like the logo, the reflective property. Definitely think the color scheme does not reflect the *fun* aspects of Crystal.
<FromGitter> <lukeholder> Anyone here in the core team that could give blessing to a ongoing project for a redesign?
<FromGitter> <bararchy> @mgarciaisaia ?
<FromGitter> <lukeholder> I think it would really benefit Crystal. I would be happy to lead or be a part of a Crystal Visual Identity Team
<FromGitter> <lukeholder> Just like Ruby, Crystal appeals to those software developers who appreciate a clean, fun, uncluttered syntax.
<FromGitter> <lukeholder> The design should reflect that.
fiete has quit [Quit: WeeChat 1.9.1]
<FromGitter> <imonmyown> I think the current design is not selling at all (unfortunately)
<FromGitter> <imonmyown> And I don't mean marketing
<FromGitter> <lukeholder> I agree @imonmyown - There are some good marketing messages, but the design lacks organizing and a 'uplifting' experience.
fiete has joined #crystal-lang
<FromGitter> <imonmyown> @lukeholder I'm glad you helped others see that
<FromGitter> <lukeholder> Early days, but hoping when some Crystal core leaders wake up and have look at the discussion above, they will agree.
<FromGitter> <lukeholder> and we can get the ball rolling.
<FromGitter> <bararchy> @lukeholder It's not the core-devs you need to talk with, it's the comunity manager and maybe @sdogruyol
<FromGitter> <lukeholder> core leaders, not so much the devs, you are right. But having everyone express what's important to them, and all getting on the same page would be good.
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37 has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.0]
<foxxx0> so, i have a method with a return type restriction like this: Hash(Int32, Hash(Symbol, {Int64,Int64,Int64}))
<foxxx0> inside that function, i initialize an object with that same type: particles = {} of Int32 => Hash(Symbol, {Int64,Int64,Int64})
<foxxx0> and later return that "particles" object
<foxxx0> yet somehow the compiler complains: type must be Hash(Int32, Hash(Symbol, Tuple(Int64, Int64, Int64))), not Array(Hash(Symbol, Tuple(Int64, Int64, Int64)))
<foxxx0> for that method
<FromGitter> <bararchy> Can't help wihtout seeing a code sample, but I would argue that there is something that changes the var on the way? or "might" change it? and it effect the type
<FromGitter> <bew> use `input.each_with_index`, and remove the assignement to `particles`, as it overwrite the previous values
<foxxx0> aah
<foxxx0> right
<foxxx0> hm, it seems my regexp modularisation is not working
<foxxx0> using: matches = /(?....)/.match(line) works, while: matches = PARTICLE.match(line) returns nil
<foxxx0> it seems to be expanded correctly though... pp(PARTICLE): PARTICLE # => /(?<p>[-]*d+,[-]*d+,[-]*d+).*?(?<v>[-]*d+,[-]*d+,[-]*d+).*?(?<a>[-]*d+,[-]*d+,[-]*d+)/
<foxxx0> ah
<foxxx0> my VECTOR needs to be a true Regex as well, not just a string
<travis-ci> crystal-lang/crystal#551e98a (try-and-fix-travis-ipv6-loopback - Fix: restart docker after enabling ipv6 loopback): The build failed. https://travis-ci.org/crystal-lang/crystal/builds/319096883
<travis-ci> crystal-lang/crystal#3ed6f0a (try-and-fix-travis-ipv6-loopback - Fix: restart docker after enabling ipv6 loopback): The build is still failing. https://travis-ci.org/crystal-lang/crystal/builds/319100479
<FromGitter> <yxhuvud> @foxxx0: When you are done, you can compare your AoC excercise solution to mine: https://github.com/kodsnack/advent_of_code_2017/commit/7fb7032c6adc6899b513d69411f1cfd391a97c11
<FromGitter> <yxhuvud> note, that is both part1 and part2.
<foxxx0> heh, thanks i will!
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
GoldenBear has quit [Ping timeout: 268 seconds]
<foxxx0> ideas?
<foxxx0> is a tuple somewhat unique in each instance and thus cannot be counted?
<Papierkorb> Please state, in text, what you're trying to do
<foxxx0> i want to find duplicate values in the hash
<Papierkorb> Where is #count defined in? In Hash, or some module?
GoldenBear has joined #crystal-lang
<foxxx0> enumerable
<foxxx0> https://crystal-lang.org/api/master/Enumerable.html#count%28%26block%29-instance-method
<foxxx0> it can take both a block or an item
<Papierkorb> What kind of Enumerable(T) is Hash? (What's the T for Hash)
<foxxx0> {K, V}
<Papierkorb> Yes, in your case, what is K, V?
<foxxx0> Int32, {Int32, Int32, Int32}
<Papierkorb> Yes. Enumerable#count, what type does it use? T, K or V?
<foxxx0> mh
<foxxx0> thanks
<Papierkorb> What solution are you thinking of?
<foxxx0> Hash.values.count()
<Papierkorb> Possible, but slow, as Hash#values creates an array, which you only #count on and then discard. You can use Hash#count in the yielding version
<Papierkorb> It yields the key and the value, just ignore the key and compare the value
<foxxx0> with &block?
<FromGitter> <bararchy> Someone know about a CLI http client that support JS?
<foxxx0> what I'm trying to do is some kind of !uniq, i.e. give me all K,V pairs whose values are NOT unique
<Papierkorb> For #uniq! you could check how Array does it, and then adapt it
<foxxx0> careful
<foxxx0> not uniq!
<foxxx0> i mean !uniq
<Papierkorb> mh?
<foxxx0> i.e. give me all K,V pairs whose values are NOT unique
<foxxx0> i want to explicitly find duplicates
<Papierkorb> you mean something like #not_uniq or #duplicates or #common_values
<foxxx0> yes
<Papierkorb> Well, you can still skim Array#uniq and just reverse the decision to keep/not keep
<Papierkorb> Or actually, Enumerable#uniq, Arrays uniq may be special
<foxxx0> there is no such thing as enumerable#uniq
<foxxx0> i can only find array#uniq
<Papierkorb> huh
ziprandom has joined #crystal-lang
<Papierkorb> that could be added
<Papierkorb> In Ruby, I would've used #group_by and then further #select and #map from there. In Crystal you can do the same, but I think I'd copy&modify #group_by to do all of those without building big immediate arrays
alex has joined #crystal-lang
alex has quit [Killed (adams.freenode.net (Nickname regained by services))]
Guest19292 has joined #crystal-lang
<FromGitter> <yxhuvud> papierkorb: look above, and you see my solution to the same exercise as he is trying to solve :)
Guest19292 is now known as alex``
<Papierkorb> The Tuple(..) could be an alias, but it looks like a vector, so I'd actually turn it into a struct (maybe through `record`)
ziprandom has quit [Remote host closed the connection]
<Papierkorb> yxhuvud, also instead of `File.read(ARGV..)` you can use the global `ARGF` IO
<FromGitter> <yxhuvud> oh. nice.
<foxxx0> hm, my code works on the example
<foxxx0> for part2
<FromGitter> <imonmyown> @bararchy will this (https://github.com/joepie91/node-bhttp) help?
<foxxx0> but not on my real input, it doesn't detect any collisionsw
<foxxx0> not even after 10k ticks :D
<FromGitter> <yxhuvud> then you are doing it wrong.
<foxxx0> obviously :D
<Papierkorb> wat someone is doing those in bash
<foxxx0> there is even someone that managed to do the first couple of days with regex only
<FromGitter> <bararchy> @imonmyown well... its not a CLI client, it's a librery, so I guess it wont help, thanks though :)
<Papierkorb> C64 Basic, nice
<FromGitter> <imonmyown> @bararchy what about this (https://github.com/request/request)?
<Papierkorb> Tons of people doing it in JS. what a shame
<foxxx0> oh
<foxxx0> -oh
<foxxx0> the example for part2 creates collisions just as shown
<foxxx0> pp(colliding) unless colliding.empty?
<foxxx0> so somehow something must be wrong here :(
<FromGitter> <bararchy> @imonmyown not trying to be an asshole but.. do you know what a CLI is?
<FromGitter> <imonmyown> @bararchy sorry... my bad, didn't pay enough attention...
<FromGitter> <bararchy> no worries, thanks :)
<Papierkorb> https://github.com/crystal-lang/crystal/pull/5339/files#diff-098099a464bf50384acd5a6ca57079cdR84 nothing directly wrong with this change by itself, but this is the reason I dislike `uninitialized`
<crystal-gh> [crystal] RX14 closed pull request #5339: "hello world" windows port (master...feature/windows-hello-world) https://git.io/vbqDj
<foxxx0> Yxhuvud: you and i both got lucky
<foxxx0> Yxhuvud: friend of mine has multiple particles with the same acceleration...
<RX14> well you can tell people crystal master has windows support now
<RX14> just don't tell them you can't do anything useful with it
<RX14> ;)
<travis-ci> crystal-lang/crystal#3b12082 (master - Implement Crystal::System::FileDescriptor for windows): The build is still failing. https://travis-ci.org/crystal-lang/crystal/builds/319160678
<FromGitter> <bararchy> Papierkorb do you plan on adding QTWeb ?
<Papierkorb> QtWeb?
<FromGitter> <bararchy> RX14 NICE !!! this is indeed a great day for crystal, at least we can now boost we "compile on windows"
<RX14> please don't hype it up
<RX14> until it's useful
<FromGitter> <bararchy> Papierkorb QtWebKit
<RX14> you'll just annoy people who are looking for something useful not just progress
<Papierkorb> bararchy, I mean you could
<FromGitter> <imonmyown> @RX14 that is indeed something anyway
<FromGitter> <bararchy> RX14 i'm just happy it's moving on
<FromGitter> <sdogruyol> @RX14 there's nothing wrong with hyping it up
<Papierkorb> wasn't QtWebKit outdated and QtWebEngine only for QML stuff?
<Papierkorb> Maybe they fixed this by now though
<RX14> @sdogruyol yes there is, if you mislead people by doing it
<RX14> hyping up "windows support is on it's way, here's concrete proof" is fine
<Papierkorb> A bad experience now reflects into the future, both for the person using it and the person advocating *against* Crystal because of it
<FromGitter> <sdogruyol> no
<RX14> hyping up "crystal has windows support" with no caveats is absolutely not
<FromGitter> <bararchy> "We added basic windows compilation support, hello world is working"
<FromGitter> <sdogruyol> no one is saying that
<FromGitter> <sdogruyol> @bararchy is just expressing his excitement..
<RX14> yes but I can imagine people saying that
<RX14> I see loads of people who blindly advocate crystal with sometimes misleading information
<RX14> ok, one or two people
<RX14> not loads thats hyperbole
<FromGitter> <bararchy> XD
<FromGitter> <sdogruyol> well, isn't that always a possibility with every feature? We can't force control everyone and stop them saying that
<RX14> no but I can ask them to
<RX14> which I just did
<FromGitter> <bararchy> RX14 don't worry, we wont go to RUST forums saying you suck, we own
<RX14> lol
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> thanks for the effort @RX14
<FromGitter> <sdogruyol> now I'M actually booting into my windows partition
<FromGitter> <bararchy> Papierkorb anyway, isn't it part of the standard QT framework? I really need it as an engine to render JS for me
<FromGitter> <sdogruyol> BRB :D
<Papierkorb> bararchy, it's not part of the core modules, but it's part of the highest maintenance tier iirc
<FromGitter> <bararchy> @sdogruyol taking the bullet for us all, *tip hat*
<RX14> @sdogruyol i presule you have your old compiled gc.lib and pcre.lib from testing out @txe's branch
<RX14> presume*
<RX14> you'll need them
afraeim has joined #crystal-lang
<FromGitter> <bararchy> RX14, would it be possible to add those files somehow that they can be staticlly linked when targeting windows?
<RX14> what do you mean?
<RX14> they are statically linked
<FromGitter> <bararchy> I mean in the repo
<FromGitter> <bararchy> or a script
<RX14> i'll make a script to build them
<FromGitter> <bararchy> ^ this
<FromGitter> <bararchy> thanks :)
<FromGitter> <bararchy> Papierkorb "highest maintenance tier" ? as in it costs to use? or just very complicated to use?
<Papierkorb> Qt puts its modules in maintenance tiers. Nothing to do with cost (everything is free that you can directly DL), but how guaranteed to work it is
* FromGitter * imonmyown feels like a holiday
<FromGitter> <yxhuvud> foxxx0: I too had multiple particles with the same acceration, and my solution handles that.
<FromGitter> <bararchy> Papierkorb so high means it's well maintained?
<Papierkorb> it should almost always work, yes
<FromGitter> <bararchy> cool
<FromGitter> <bararchy> and will it be a "big deal" to add to current QT bindings?
<Papierkorb> You should be fine by adding the necessary library to the configuration, and then adding the classes and enums you need
<Papierkorb> Then regenerate and repeat until it doesn't complain about missing stuff
<foxxx0> Yxhuvud: ah, right
<foxxx0> Yxhuvud: mine didn't :D
<foxxx0> Yxhuvud: now mine does too :)
<foxxx0> is there a way to get an offline version of: https://crystal-lang.org/api/0.23.1/ ?
<FromGitter> <bararchy> foxxx0 download the comiler sources, and run `crystal doc`
<FromGitter> <bararchy> RX14 what is next on the menu development wise? now that basic Windows is in?
<foxxx0> @bararchy you mean git clone crustal-lang/crystal.git; cd crystal; crystal doc;?
<foxxx0> throws an error here
<foxxx0> sorry for the color-control-chars :/
<RX14> @bararchy more windows?
<FromGitter> <bew> @foxxx0 `make doc`
<FromGitter> <bew> sorry: `make docs`
<RX14> crystal docs doesn't work on the standard library because of the platform-specifics
<RX14> you need to use make docs as @bew said
<foxxx0> @bew thanks!
<foxxx0> worked just fine
<FromGitter> <bew> yw ;)
<foxxx0> now i have it portable locally for the long train ride tomorrow :>
<crystal-gh> [crystal] c910335 opened pull request #5419: fix array#sample with random (master...fix-array-sample-with-random) https://git.io/vbMdt
<FromGitter> <lajunta> anyone knows that how to change field type before saving to database? because field type is always string , I want to change it to Int32.
flaviodesousa has quit [Ping timeout: 256 seconds]
sz0 has joined #crystal-lang
<greenbigfrog> anyone able to tell me why I'm getting following error for https://github.com/citizen428/bitcoin_rpc/blob/master/src/bitcoin_rpc.cr ? `in lib/bitcoin_rpc/src/bitcoin_rpc.cr:7: BitcoinRpc is not a class, it's a module`
A124 has quit [Ping timeout: 272 seconds]
<Papierkorb> BitcoinRpc was previously defined to be a module, but you defined it there as class
A124 has joined #crystal-lang
<crystal-gh> [crystal] RX14 closed pull request #5419: fix array#sample with random (master...fix-array-sample-with-random) https://git.io/vbMdt
<greenbigfrog> I was blind at first for where it was being a module... https://github.com/citizen428/bitcoin_rpc/pull/1
<greenbigfrog> thanks
afraeim has quit [Remote host closed the connection]
<greenbigfrog> what could be causing a error like the following? https://hastebin.com/ojugodural.pas
* greenbigfrog is being stupid again
<FromGitter> <Fryguy> my guess is your are accessing an Array with `[]` instead of `[]?`
<FromGitter> <Fryguy> but without the source/context it's hard to know for sure
<greenbigfrog> nah. Just learned/realized that `crystal run` doesn't passthrough ARGV...
<FromGitter> <Fryguy> if does, but you have to tack on an extra `--`
<FromGitter> <Fryguy> crystal run foo.cr -- --arg1 --arg2
<greenbigfrog> ah. ok. good to know
<FromGitter> <Fryguy> otherwise the args get sent to the compiler itself and not your app
<FromGitter> <Fryguy> you don't need the extra `--` if you crystal build first, then run the compiled executable
<greenbigfrog> gonna PR it into crystal-by-example... that's what pops up quite far up on searches and where I found how ARGV works at all in crystal...
<greenbigfrog> I'm getting `Error: execution of command failed with code: 1: `cc "${@}" -o '/root/discordtipbot/test' -rdynamic -lpcre -lgc -lpthread /opt/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`` when just simply having the following line in the file being built: `puts ARGV[0]`
<FromGitter> <bew> what is the full error?
<greenbigfrog> that's all
<FromGitter> <bew> well, I don't see the error here, can you make a pastebin or sth?
<FromGitter> <bew> there should be sth after the line with `cc`
<FromGitter> <greenbigfrog> It's only that one line
<greenbigfrog> nvm. there's more. sec
* greenbigfrog can't read
<FromGitter> <bew> hmm maybe the cache files are broken, you can locate your cache directory by doing `crystal env`, the line `CRYSTAL_CACHE_DIR` (for me its in `/home/lesell_b/.cache/crystal`). You can reset the cache by either removing this directory or removing its content
<greenbigfrog> k
<crystal-gh> [crystal] RX14 closed pull request #3582: [WIP] Windows (master...win) https://git.io/v1TNd
<greenbigfrog> that fixed it. thanls
<FromGitter> <sdogruyol> how about having a cache clear command for crystal command?
<FromGitter> <sdogruyol> would that be helpful to anyone :P
<FromGitter> <bew> there an issue about it iirc
<FromGitter> <bew> not sure
<FromGitter> <sdogruyol> oh, really?
<FromGitter> <sdogruyol> haven't seen the issue
<FromGitter> <bew> I remembered a discussion about it
<RX14> we should really just fix the cache to always be consistent
<FromGitter> <imonmyown> to me detecting corrupted cache doesn't appear simple at all
<FromGitter> <imonmyown> or rather cache inconsistencies
<RX14> solving them is simple:
<RX14> only cache what compiles
<RX14> the cache can only ever get corrupted when you kill the compiler while it's compiling
<RX14> so the solution is just to compile to .new.o
<RX14> then rename it to .o as soon as the module has actually beenc ompiled
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> since renaming is an atomic operation the cache will always be consistent
claudiuinberlin has joined #crystal-lang
<FromGitter> <imonmyown> I should admit that I'm *a little* dense to implement that
claudiuinberlin has quit [Client Quit]
<RX14> it's renaming 1 output file and adding a move call lol
<FromGitter> <imonmyown> To me the trigger conditions are hard to get down to code
<FromGitter> <imonmyown> sorry for being so dumb :)
<FromGitter> <bew> don't be sorry @imonmyown it happens to everyone once, with time you'll get it ;)
rohitpaulk has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] MakeNowJust opened pull request #5420: Parser: make an error on unbalanced end brace '}' in macro body (master...fix/crystal-parser/error-unbalanced-end-brace-in-macro) https://git.io/vbDlx
<FromGitter> <imonmyown> @bew, thanks I appreciate your support :)
mark_66 has quit [Remote host closed the connection]
claudiuinberlin has joined #crystal-lang
<FromGitter> <fridgerator> crystal should create its own cryptocurrency, written in crystal, to support the development of crystal
<RX14> lol
<FromGitter> <fridgerator> ;)
<oprypin> as long as Manas runs the exchange from real currency (one way only, of course)
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
hightower2 has joined #crystal-lang
<Papierkorb> I just noticed that because T{ x, y } == T.new << x << y you can write code like this: `self.layout = Qt::VBoxLayout{ @title, @stuff, @random_buttons }`- neat
<oprypin> holy crab
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
<RX14> yeah there's some interesting unused syntax crystal has
<RX14> Type{} is used for sets but there's Type{} for hashes too
<RX14> I think
<oprypin> yes
<RX14> which is how i've always said hashes should be created
<RX14> not {} of K => V, Hash(K, V) {} or just Hash(K, V).new
<oprypin> definitely
<FromGitter> <vectorselector> hello, world! I'm suddenly (as in literally in a span of 1 minute to the next with no code change, just a stop and start of "crystal run src/myapp.cr") ⏎ seeing weird errors compiling. ⏎ ⏎ First it will complain about a require for mongo- particularly it's gridfs module, complaining that IO is a class not a module, and when the require for that module gets commented out, the next error compiling
<FromGitter> ... is "while requiring "secure_random": can't find file 'secure_random' relative to '/home/user/myapp/src/" ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5a3abb11c072deaf0be51f79]
<FromGitter> <vectorselector> i have ⏎ require "secure_random" ⏎ and it's part of the crystal library and literally was working fine but then suddenly stopped working today. I'm curious if some path got messed up and how require knows where the crystal library stuff is.
<Papierkorb> vectorselector, sounds like you upgraded from crystal 0.23.1 to 0.24.x
<Papierkorb> Quite a few (more than usual iirc) breaking changes that actually do break existing code, like there
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> vectorselector, Either port the code over to the new version (makes sense on the long-run), but if you just want it to work now, stick to 0.23.1 until you have time to port
<Papierkorb> Or until the shard maintainers did it
<FromGitter> <vectorselector> !ah ha, thank you. ⏎ it makes sense. ⏎ do docs generally get updated at the same time as version releases?
<greenbigfrog> Somehow I'm getting connection refused all the time... https://hastebin.com/fomogadame.rb psql works fine though
<greenbigfrog> Only running require "pg"
<greenbigfrog> puts DB.open "postgres://127.0.0.1:5432/dogecoin-testnet"
<oprypin> vectorselector, yes but lately the process has been sloppy
<Papierkorb> The online docs will be updated for the 'real release' of 0.24.1, the 0.24.0 is actually a pre-release (That scheme will be fixed for 0.25.x)
<greenbigfrog> anyone got an idea why I'm getting connection refused all the time?
p0p0pr37 has quit [Read error: Connection reset by peer]
<FromGitter> <straight-shoota> greenbigfrog, are you using mac os?
<greenbigfrog> debian
p0p0pr37 has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
p0p0pr37 has quit [Changing host]
<FromGitter> <vectorselector> @Papierkorb thanks for the info, I was able to downgrade via my package manager pacman, I wonder if it's possible to always obtain specific crystal source/binaries/packages such that we can always run an old app on it's given crystal version? (besides package-manager whims...)
<oprypin> pretty much "no"
<oprypin> if you're very lucky, the packages will specify the crystal version and dependencies exact version
<oprypin> by packages i mean "shards"
claudiuinberlin has joined #crystal-lang
<greenbigfrog> hm... so no one got an idea...
<FromGitter> <ezrast> @greenbigfrog are you sure Postgres is listening on 127.0.0.1? IIRC postgres uses UNIX domain sockets by default but I may be misremembering.
rohitpaulk has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 248 seconds]
<greenbigfrog> ezrast: good point... might be the case, even if it's localhost
vivus has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
vivus has left #crystal-lang ["Leaving"]
<FromGitter> <edwardloveall> I was trying to print out `ENV.inspect` with PrettyPrint, but all it seems to do is print out an escaped version
<FromGitter> <edwardloveall> am I using PrettyPrint wrong?
<FromGitter> <edwardloveall> `PrettyPrint.format(ENV.inspect, output, 79)`
<oprypin> edwardloveall, yes
<FromGitter> <edwardloveall> any suggestions?
<oprypin> inspect is a string, so what do you expect it to do with a string
<oprypin> `p ENV` should be enough for all purposes
<Papierkorb> `pp ENV` if you want the source expression to be printed aswell
<FromGitter> <edwardloveall> ah ha! that works great! thanks, I was unaware of plain `p`
<oprypin> your only mistake was `ENV.inspect` instead of `ENV`
<FromGitter> <edwardloveall> ah. so close!
<oprypin> that's already a string so how can it format a string in a new way
<FromGitter> <edwardloveall> right, that makes sense
rohitpaulk has joined #crystal-lang
<greenbigfrog> ezrast: how would I check? or config? can't rly find what I believe I have to search for
rohitpaulk has quit [Ping timeout: 256 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<FromGitter> <faustinoaq> Oh, wrong channel, my bad
<FromGitter> <faustinoaq> 😓
<crystal-gh> [crystal] woodruffw opened pull request #5421: FileUtils: Add `ln`, `ln_s`, and `ln_sf` (master...fileutils-ln) https://git.io/vbD5j
<FromGitter> <ezrast> @greenbigfrog the location of the config file will depend on your distro/package but it's the `listen_addresses` setting: https://www.postgresql.org/docs/current/static/runtime-config-connection.html
<greenbigfrog> yep. you were right...
<greenbigfrog> thanks
<greenbigfrog> still getting connection refused... (I also restarted postgresql, almost fergot though)
alex`` has quit [Ping timeout: 252 seconds]
<greenbigfrog> ```listen_addresses = 'localhost' # what IP address(es) to listen on;
<greenbigfrog> # comma-separated list of addresses;
<greenbigfrog> # defaults to 'localhost'; use '*' for all
<greenbigfrog> it should be listening now...
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<greenbigfrog> https://hastebin.com/fuwubewipi.rb `listen_addresses = 'localhost, 0.0.0.0, *, 188.166.8.239' # what IP address(es) to listen on;`
<greenbigfrog> I don'
<greenbigfrog> t get it
<oprypin> greenbigfrog, https://bpaste.net
<greenbigfrog> y though oprypin ?
<oprypin> supports Crystal, doesnt have toxic color scheme
<RX14> meh I prefer gist
<Vexatoast> RX14, I remember ```ruby
<RX14> Vexatoast, github has a crystal highlighter
<Vexatoast> yes it does.
<crystal-gh> [crystal] RX14 closed pull request #5398: pointerof lib external (master...pointer-lib-external) https://git.io/vb6Eg
<RX14> yay
<RX14> crystal 0.24.1 is in the arch linux repositories
<hightower2> Would have been nicer to wait for the next release
<RX14> ??
<hightower2> This will just create problems due to wrong version reported in it
<RX14> 0.24.1 is tagged so when we release 0.24.1's binaries it will be exactly the same
<RX14> so it doesn't matter
<travis-ci> crystal-lang/crystal#7791254 (master - Allow taking pointerof C binding global variables (#5398)): The build is still failing. https://travis-ci.org/crystal-lang/crystal/builds/319440592
<DeBot_> https://github.com/crystal-lang/crystal/pull/5398 (pointerof lib external)
<FromGitter> <faustinoaq> Hi, any disadvantages of using `fun main` in Crystal to initiate a program like C? : ⏎ ⏎ ```fun main(nargs : Int32, vargs : UInt8**) : Int32 ⏎ puts "hello!" ⏎ return 0 ⏎ end``` ⏎ ⏎ https://carc.in/#/r/39qd [https://gitter.im/crystal-lang/crystal?at=5a3af2740163b028105f9eb3]
<RX14> yes, you break everything
<FromGitter> <faustinoaq> 😅
<RX14> seriously
<RX14> no top-level code will run
<Papierkorb> „You do that, shit explodes“
<RX14> including any global initializers
<RX14> such as constants
<FromGitter> <bew> @RX14 the API docs are still on 0.23.1 as latest
<RX14> yes
rohitpaulk has joined #crystal-lang
<RX14> I just raised that
<RX14> lol
<FromGitter> <bew> 🎉 for the rest ;)
<FromGitter> <bew> perfect :D
<RX14> i mean, firefox /usr/share/doc/crystal/api/index.html works too
<RX14> and it's offline
<FromGitter> <bew> sure, but it's hard to link this here ^^
<RX14> yup
<RX14> well
<RX14> file:///usr/share/doc/crystal/api/index.html
<RX14> it's a link
<RX14> and it's clickable for me
<FromGitter> <bew> lol x) (not on gitter)
<FromGitter> <faustinoaq> Wow, I din't know about `/usr/share/doc/crystal/api/index.html`, maybe we can add a link for that, maybe inside `man crystal`?
<RX14> it's not our policy
<RX14> it's arch linux's
<RX14> debian wouldn't do the same
<RX14> it would require it to be gzipped
<RX14> which makes it a pain
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> @faustinoaq Crystal.main(&block) docs (file:///usr/share/doc/crystal/api/Crystal.html#main(%26block)-class-method)
<FromGitter> <bew> oh no ><
<FromGitter> <bew> file:///usr/share/doc/crystal/api/Crystal.html#main(%26block)-class-method
<RX14> @bew works fine for me
<RX14> both links
<RX14> does gitter include the final )
<Papierkorb> RX14: A tagged union in memory looks like {Int32, Bytes...}, right?
<RX14> I'm very sure
<RX14> but not 100%
<RX14> i'd put it at about 98% sure
<Papierkorb> Great. Let me (ab-)use that.
<Papierkorb> If I can't come up with something workable I'll don't-try-this-at-home cast it
<FromGitter> <bew> @RX14 my custom link with parenthesis broke the gitter link finder ^^
<RX14> Papierkorb, what for?
<FromGitter> <bew> @Papierkorb you made me curious, what are you doing with this don't-try-this-at-home cast?
<RX14> @bew bad software :) use IRC clients
<Papierkorb> Bridging QVariant in a useful manner
<RX14> lol
<RX14> fair enough
<Papierkorb> So I put a type system into Qts type system to wrap Crystals type system
<Papierkorb> We need to go deeper
<FromGitter> <bew> 'ly shit it's getting interesting ^^
<Papierkorb> Mh the ABI stuff wasn't fixed was it?
<FromGitter> <bew> about passing structs?
<Papierkorb> Large/many arguments in general, yes
<FromGitter> <bew> if yes, then no, or I missed it..
<Papierkorb> It actually barfs on real world Qt functions
<FromGitter> <bew> I tried to look at how it works currently, but it looks like alien language to me for now