<FromGitter>
<swinSpo> Oh nevermind it works.. I had a different Person class so it gave me an error :D
<FromGitter>
<proyb6> Can I write TCPServer to handle high volume of requests from end-clients side? I seem to get very low like <800 req/s compare to the Crystall HTTP server can hit >100K req/s
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter>
<swinSpo> Hi I need some help installing shards
<FromGitter>
<swinSpo> after adding it to my shard.yml file and running shard install it tells me "missing required attribute: name at line 4, column 1"
<FromGitter>
<swinSpo> oh it actually seems to work after i shards init and then manually add the dependency back in
rohitpaulk has joined #crystal-lang
sagax has quit [Ping timeout: 268 seconds]
rohitpaulk has quit [Ping timeout: 268 seconds]
_whitelogger has joined #crystal-lang
ashirase has quit [Ping timeout: 252 seconds]
ashirase has joined #crystal-lang
<FromGitter>
<swinSpo> Hi, I am getting an error with mysql
<FromGitter>
<swinSpo> "crystal run test.cr ⏎ Unhandled exception: packet 254 not implemented (Exception) ⏎ from lib/mysql/src/mysql/connection.cr:29:9 in 'initialize' ⏎ from lib/mysql/src/mysql/connection.cr:4:3 in 'new' ⏎ from lib/mysql/src/mysql/driver.cr:3:5 in 'build_connection' ... [https://gitter.im/crystal-lang/crystal?at=5be16e7b7c6c9e5df2160a32]
<FromGitter>
<swinSpo> I am using the example code
<FromGitter>
<swinSpo> DB.open "mysql://user:password@192.168.0.102:3306/db" do |db| ⏎ db.exec "drop table if exists contacts" ⏎ db.exec "create table contacts (name varchar(30), age int)" ⏎ db.exec "insert into contacts values (?, ?)", "John Doe", 30 ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5be16ee29c65e607e709883a]
<FromGitter>
<straight-shoota> you might want to use a tuple or constant instead
<FromGitter>
<vladfaust> Thanks
<FromGitter>
<straight-shoota> you could easily check that yourself
<FromGitter>
<swinSpo> And I forgot to mention this, but I have an application written in Go that connects to the same mysql database and it works
<FromGitter>
<swinSpo> But crystal does not seem to work here
<FromGitter>
<swinSpo> Anyone?
<FromGitter>
<swinSpo> I can see inside the 0.5 mysql version shard.yml that it specifies
<FromGitter>
<swinSpo> crystal: 0.25.0
<FromGitter>
<swinSpo> Maybe that is the issue?
<FromGitter>
<swinSpo> I am on Crystal 0.27.0 [c9d1eef8f] (2018-11-01)
<FromGitter>
<vladfaust> @swinSpo go into mysql source code, it's fairly easy to read. Follow the exception's stack, i.e. start at `mysql/src/mysql/connection.cr:29:9 in 'initialize'`. Add `pp` and `pp!` statements to debug your code to see which exact call raises the error
<FromGitter>
<swinSpo> but i dont really know what causes it because the next code path points to the constructor function
<FromGitter>
<swinSpo> either way though, I am completely new with crystal and I was hoping for at least the basics to work (like a database connection)
<FromGitter>
<swinSpo> its a bit disappointing if this does not work "out of the box"
<t0nyandre>
Just wanted to inform everyone that uses any AUR distro that I'm maintaining https://aur.archlinux.org/packages/scry-git. The languageserver is easily accessible using /usr/bin/scry after installation :)
<t0nyandre>
Love the developers of scry for making such a lovely tool :)
<FromGitter>
<schoening> @Sija thanks! I saw that years ago not understanding any of it. I was given a link to this earlier today: https://serverless.com/ any thoughts on which to pick. Seem to do the same?
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
jemc has joined #crystal-lang
jemc has quit [Ping timeout: 246 seconds]
Yxhuvud has joined #crystal-lang
<FromGitter>
<kinxer> Is there a method I need to overload on the class used as a key in a Hash to allow for Hash equality with keys that are equal but not the same object?
jemc has joined #crystal-lang
jemc has quit [Client Quit]
jemc has joined #crystal-lang
<FromGitter>
<kinxer> Nevermind; I found `#hash(hasher)` and the `def_hash` macro
<FromGitter>
<fusillicode_twitter> Hi guys, quick questione, is there a way to getting around the compiler complains about the required type specification for memoizing methods?
<FromGitter>
<fusillicode_twitter> I mean, if I have an instance method that memoize an instance variable the compiler complains about the impossibility to infer the correct tye
<FromGitter>
<fusillicode_twitter> So I usually need to put a getter with the explicit type expected
<FromGitter>
<fusillicode_twitter> Unfortunately I'm in the situation in which the type is actually dynamic, i.e. passed as a initialization var
<FromGitter>
<fusillicode_twitter> but I was still wondering if there is a good DRY way to getting around this situation
<FromGitter>
<bew> writing types is good sometimes you know, when you get back at the code a few weeks/month later, you'll probably be happy to see the types, instead of having to infer it your self :)
<FromGitter>
<bew> @oprypin I see you're the maintainer of AUR package `crystal-icr`, there's `shards` missing as a build dependency (I got a build fail on a new laptop because of that)
<FromGitter>
<fusillicode_twitter> @bew yep buddy I totally understand this point of view but in the situation I'm in having them automagically inferred would spare me an abstraction ;)
jemc has quit [Ping timeout: 240 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #crystal-lang
non-aristotelian has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @swinSpo thats a known issue when using mysql 8