<FromGitter>
<potz> Anyone knows if the Hash class keeps items in the same order they were added? I’m inclined to think it doesn’t, but could not find any authoritative answer in the docs...
OceannBoy has quit [Ping timeout: 256 seconds]
<FromGitter>
<marksiemers> @potz - That may require looking at the source code.
<FromGitter>
<marksiemers> But I don't know if all the iterators guarantee that order
sz0_ has joined #crystal-lang
sz0_ is now known as sz0
OceannBoy has quit [Ping timeout: 260 seconds]
OceannBoy has joined #crystal-lang
raz has quit [Changing host]
raz has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 1.9]
wontruef_ has quit [Quit: The Internet needs a break and I need a cookie]
wontruefree has joined #crystal-lang
OceannBoy has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
<FromGitter>
<Dillybob1992> hey all, i'm getting `(signal 11) ??? (523495 times)` which i checked github and i read that it means it's a stack overflow, but i've been stuck for 3 hours trying to find out way and not sure what i'm doing wrong
<FromGitter>
<Dillybob1992> here is my pastebin: https://pastebin.com/raw/9KM3M9Bz it happens whenever the users << socket is called (i know i could just use the code straight-shoota and rx14 helped me with yesterday), but i feel like this could be a learning moment on what I did wrong so I can avoid the mistakes in future :)
OceannBoy has joined #crystal-lang
OceannBoy has quit [Ping timeout: 248 seconds]
nick__ has joined #crystal-lang
nick__ has quit [Client Quit]
rohitpaulk has joined #crystal-lang
<FromGitter>
<bararchy> Morning all :)
snsei has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9]
snsei has quit [Remote host closed the connection]
<FromGitter>
<ArtLinkov> Morning guys. ⏎ I need help with something, let's say I got two class instances, each has an array (which is accessible from outside). I want the second class to take a copy of the array from the first class into it's own class. However, I want to change the array in the second without changing the array in the first. ⏎ I tried something like this: ⏎ class2.array = class1.array ⏎ or class2.array =
wontruefree has quit [Quit: The Internet needs a break and I need a cookie]
<FromGitter>
<ArtLinkov> Hmm... array.dup doesn't work for me. I'm guessing because the array is of class instances (i.e specific neuron)
<FromGitter>
<ArtLinkov> I'll try .clone
<FromGitter>
<ArtLinkov> thanks
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
<oprypin>
sigh
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter>
<bararchy> oprypin, your'e not obligated to help, remmber not everyone has expirance like you and understand the issue or solution you give, sometimes answers that makes 100% sense to you might be "but why?" to others.
<FromGitter>
<bararchy> other than that, thanks for your time :)
<FromGitter>
<bararchy> you do help alot
jnyw has quit [Quit: WeeChat 2.0.1]
<FromGitter>
<potz> @marksiemers Good catch in the sources. Probably not a good idea to depend on this behaviour anyway. Thanks.
gewo has quit [Quit: WeeChat 1.6]
gewo has joined #crystal-lang
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 265 seconds]
alex`` has quit [Ping timeout: 255 seconds]
<crystal-gh>
[crystal] asterite opened pull request #5571: Compiler: ensure parentheses inside assign value (master...bug/5568-op-assign) https://git.io/vN3sf
literal has quit [Ping timeout: 256 seconds]
literal has joined #crystal-lang
thews has quit [Ping timeout: 256 seconds]
<FromGitter>
<asterite> bararchy: hi! o/. Did you have a chance to optimize that program?
thews has joined #crystal-lang
thews has quit [Changing host]
thews has joined #crystal-lang
<FromGitter>
<bararchy> @asterite Hi :) ⏎ Working on that, we removed a few of the offending array manipulation shourtcuts, and moved to do itirations
<FromGitter>
<bararchy> @ArtLinkov is currently hard at work on Adding Convolutional Neural Networkto SHAInet, we will then work on more cleaning and refactors
<FromGitter>
<bararchy> then move on to LSTM (RNN)
<FromGitter>
<bararchy> anyway, we really hope we can showcase SHAInet as a viable machine learning platform that can maybe make users interested in trying Crystal
<raz>
so it seems crest only works with crystal 0.24.1, but kemal only works with 0.23.1
<raz>
:sadparrot
<FromGitter>
<straight-shoota> kemal v0.22.0 supports Crystal 0.24.1
<raz>
oh, yes! it seems my shards were just confused
<raz>
it works now, yay!
rohitpaulk has quit [Ping timeout: 240 seconds]
<raz>
has anyone else had the effect that running (seemingly any) crystal app confuses the terminal so badly that subsequently vim produces garbled output?
<raz>
i have this on iTerm/OSX and am a bit baffled (reset doesn't fix it)
ShalokShalom has joined #crystal-lang
ShalokShalom has quit [Remote host closed the connection]
<FromGitter>
<straight-shoota> might be related to #2713
<FromGitter>
<straight-shoota> class_property creates a class method, but you're using an instance method
<FromGitter>
<straight-shoota> So either `RPG_USER.charachter_name` (class variable) or `property character_name = "Joey"`(instance variable)
<FromGitter>
<Dillybob1992> oh okay :)
<FromGitter>
<Dillybob1992> change to `property`, got it johannes, thanks again ^^
rohitpaulk has quit [Ping timeout: 276 seconds]
<FromGitter>
<Dillybob1992> hey, got another small little question ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ i am getting `instance variable '@socket' of RPG_USER must be TCPSocket+:Class, not TCPSocket+` . What does TCPSocket+:Class mean? [https://gitter.im/crystal-lang/crystal?at=5a577d3583152df26d5b802e]
<FromGitter>
<bew> Maybe you meant `property socket : TcpSocket`?
<FromGitter>
<Dillybob1992> Oh wow, yeah
<FromGitter>
<bew> It means that you're storing the class `TCPSocket` not an instance of this class
<FromGitter>
<bew> Well no the other way around but you get it
<FromGitter>
<Dillybob1992> now, am getting `. Indirect initialization is not supported.` Is that because it's only be filled to a TCPSocket when a user joins the server?
<FromGitter>
<Dillybob1992> Oh, look here. I changed it to `property socket = TCPSocket.new` and it worked with no errors. I think I am understanding instanced classes now
<FromGitter>
<hugoabonizio> @Dillybob1992 you can use `property socket : TCPSocket` to avoid creating a new TCPSocket
<FromGitter>
<Dillybob1992> yah, I tried that but I get `instance variable '@socket' of RPG_USER was not initialized directly in all of the 'initialize' methods, rendering it nilable. Indirect initialization is not supported.`
<FromGitter>
<bararchy> @eliasjpr I'll trust github HA and DT over any self hosted community server
<FromGitter>
<hugoabonizio> @Dillybob1992 a solution is to define a `#initialize` method which accepts a socket, like: `def initialize(@socket); end`
<FromGitter>
<hugoabonizio> github is back
<FromGitter>
<Dillybob1992> thanks hugo, i did that and now the error is gone :) i also tested `socket = [] of TCPSocket` and got no error, even without having initialize. i wonder which way is better?
<FromGitter>
<hugoabonizio> `[] of TCPSocket` is equivalent to `Array(TCPSocket).new`, so in this case you are instantiating an Array object
<FromGitter>
<Dillybob1992> O_O i see
<FromGitter>
<Dillybob1992> Ya, i much rather do your way then feels more appropriate
<FromGitter>
<eliasjpr> > @eliasjpr I'll trust github HA and DT over any self hosted community server ⏎ ⏎ Me too :)
mark_66 has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 263 seconds]
<ua>
jesus christ, crystal code written 5 months ago is that old already?
<ua>
shard written 5 months ago, broken in multiple ways :<
<FromGitter>
<fridgerator> There are breaking changes every crystal release, they are listed in the release notes
<FromGitter>
<Dillybob1992> are there any benchmarks comparing crystal to nodejs via tcp server or websocket performance? just mildly curious because i'm from nodejs and getting kind of fed up with it lately (why im learning crystal)
cbass has quit [Ping timeout: 256 seconds]
<ua>
is it possible to install multiple versions of crystal like with rvm in ruby?
<ua>
also is there something like long term support releases?
<FromGitter>
<fridgerator> what OS are you using? I can switch between crystal versions with brew, but I dont know if thats a good solution
<ua>
ubuntu
<FromGitter>
<fridgerator> There is crenv, but I haven't used it in a while. I dont nkow if its maintained
<FromGitter>
<Fryguy> ua: I think that anyenv supports crystal (haven't used it myself)
<ua>
crenv does work but that shard is still broken lol
<ua>
fridgerator: by LTS i mean more something like consensus among developers about which version to use at that particular moment in time thats not always the latest version
<ua>
lol
<ua>
but yeah at the point where language is still evolving extensively that might not make mech sense yet i guess
DTZUZO has quit [Ping timeout: 255 seconds]
<FromGitter>
<marksiemers> @Fryguy @fridgerator - `crenv` depend on `anyenv` (for their preferred installation anyway). And I install both of them, but there has been no update for the newest version of crystal. So either that will be a manual process to update or someone will have to fork `crenv` or get added as a member of that repo.
DTZUZO has joined #crystal-lang
<FromGitter>
<Fryguy> thanks for the update @marksiemers
<ua>
yes, crenv install 0.24.1 doesnt work
<ua>
but overall it gets stuff from github.com/crystal-lang/crystal/releases
<ua>
it can install 0.24.0 tho which was released after last crenv repo update which was 7 months ago
<FromGitter>
<straight-shoota> ua, until 1.0 you should always use the latest release
<ua>
ok
<FromGitter>
<straight-shoota> surprisingly not too many things get broken usually, so has actually been quite easy to follow up
<RX14>
crenv I don't recommend
<RX14>
I don't really have any better idea either - i ust use the arch package
<ua>
RX14, don't recommend why? here on ubuntu i've just installed and ran 5-6 versions in a row and worked great
<Yxhuvud>
in the longer term I'd want a port (or extension) of chruby - it is really small and does the least it can get away with.
DTZUZO has quit [Ping timeout: 256 seconds]
p0p0pr37 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<FromGitter>
<straight-shoota> I'm not sure how useful such a tool would be for Crystal...
<FromGitter>
<straight-shoota> you just need Crystal to build you application
<FromGitter>
<straight-shoota> not to run it like in an interpreted language
<FromGitter>
<Fryguy> it's useful if something worked in a previous version but not a new version
<FromGitter>
<Fryguy> you can switch back and forth really easily
<FromGitter>
<Fryguy> but as you said "surprisingly not too many things get broken usually, so has actually been quite easy to follow up"
<RX14>
ua, because for me it didn't work great
alex`` has joined #crystal-lang
<RX14>
it introduces bugs when working on crystal itself
<FromGitter>
<straight-shoota> yes but you don't necessarily need a tool for that. it can just be integrated into a build script
<FromGitter>
<straight-shoota> plus, it's less likely to have such a high diversity of language versions as with an interpreted lanugages
<RX14>
and I started writing a proper version manager for crystal
<RX14>
I just never got around to it
<FromGitter>
<marksiemers> Would it make sense to have `shards` handle crystal version management, in addition to shard version management?
<oprypin>
no
<oprypin>
at least there is 0 advantage to it
<RX14>
agree
<RX14>
do some thing and do it well
<RX14>
one*
<oprypin>
wel lactually for usage it could be nice, lik installing crystal version in shard.yml
<oprypin>
locally together with shards
<RX14>
it's easy to make a version tool parse version: foo in shard.yml
<RX14>
which was absolutely something I planned to do for my own tool
<oprypin>
just saying not literally 0 advantage
<RX14>
ok
<RX14>
lol
<RX14>
you could reuse the shatds.yml parser
<RX14>
cool
<RX14>
i saved 5 lines of code
<crystal-gh>
[crystal] RX14 closed pull request #5454: Fix to keep paren information for `to_s` on clone (master...fix/crystal/keep-keyword-info-on-clone) https://git.io/vb7z7
<crystal-gh>
crystal/master bd42727 Johannes Müller: Reimplement Dir.glob (#5179)
<FromGitter>
<marksiemers> From a usage perspective, it likely means 2 commands to choose between - `shards ...` or `crystal ...` instead of 3 or more `crenv` or `anyenv` or `rx14env` or whatever version manager a certain team decided to use, or roll their own.
<FromGitter>
<marksiemers> It's like `Spec` being built into the language - since specs are pretty universal, why not have it baked in. ⏎ Version management is pretty universal as well I would argue.
wontruefree has quit [Quit: The Internet needs a break and I need a cookie]
DTZUZO has joined #crystal-lang
wontruefree has joined #crystal-lang
DTZUZO has quit [Ping timeout: 248 seconds]
claudiuinberlin has joined #crystal-lang
wontruefree has quit [Quit: The Internet needs a break and I need a cookie]
rohitpaulk has joined #crystal-lang
alex`` has quit [Ping timeout: 276 seconds]
rohitpaulk has quit [Ping timeout: 265 seconds]
ua has quit [Quit: Leaving]
ua has joined #crystal-lang
wontruefree has joined #crystal-lang
<crystal-gh>
[crystal] rab opened pull request #5575: Alter logic in Time.leap_year? for performance (master...slightly-better-leap_year-calc) https://git.io/vNslW
<crystal-gh>
[crystal] GloverDonovan opened pull request #5576: Fix unexpected h1 in CHANGELOG.md (master...fix/changelog) https://git.io/vNs8a
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] chris-huxtable opened pull request #5577: Adds chroot to Process (master...chroot) https://git.io/vNs4S
jnyw has joined #crystal-lang
<crystal-gh>
[crystal] asterite opened pull request #5578: Correct implementation of heredoc (master...feature/heredoc) https://git.io/vNsRs