RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.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> <bowyan> @girng Your code is wrong ... First off all, your spawning your TCPSocket into a fiber. This is not needed because its a client and you want your program to block on this. After you spawn it off, you get stuck in a infinite loop if there is no connection. I ran you code by rebuilding a server ( next time please post the server example also ). ⏎ ⏎ `
<FromGitter> <bowyan> That does the trick your looking for... Try to connect, no connection, print out the error, go into sleep, return to try again.
<FromGitter> <bowyan> A question in general: Why is there a read_string function but no corresponding write_string functionality ... It confused me a lot because you can accept a string but you need to send write_utf8 or write_bytes???
<FromGitter> <jwoertink> I just started getting this error reported in bugsnag from my app. `KeyError/usr/share/crystal/src/gc/boehm.cr:71:5 in '[]':0`. Should I be concerned about this? It said Missing hash key for a class in my app
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<FromGitter> <sam0x17> is there a way to AES encrypt/decrypt a slice in CBC mode using the built-in openssl bindings? From what I can tell the answer is no
faitswulff has joined #crystal-lang
<FromGitter> <girng> @bowyan Thanks let me test that out. I posted my server example in my github thread, but I posted after I talked about it in gitter, my apologies
<FromGitter> <girng> @bowyan Yeah, my previous issue in gitter was actually the connect_timeout, that's what you are referring to right? My new github thread #6759 is a totally new bug I think I found (although, not entirely sure, but 90% sure)
rohitpaulk has joined #crystal-lang
DTZUZO_ has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
baweaver_away is now known as baweaver
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #crystal-lang
faitswulff has quit [Remote host closed the connection]
<FromGitter> <bowyan> @girng I am referring to a issue with your code. The code you posted before used spawn -> TCPSocket, then a loop with sleep. Your code executes the spawn/Socket, if no server is found, you get a error ( what is eaten / hidden by the spawn ), then your code moves into the loop and starts non-stop loop/sleep/loop/sleep but does not try to reconnect.
<FromGitter> <bowyan> The code posted above actually works for your example. It loops, tries to connect, if it does not connect, it sleeps, and then tries to connect again.
faitswulff has joined #crystal-lang
<FromGitter> <bowyan> The code you posted on #6759 has the same issue but without the spawn. When TCPSocket finds no server, it errors and then you go into a infinite loop with sleep.
faitswulff has quit [Ping timeout: 260 seconds]
return0xe has quit [Ping timeout: 240 seconds]
return0e has joined #crystal-lang
<FromGitter> <sam0x17> what is the proper method for linking against a single-header C library in crystal?
<FromGitter> <sam0x17> like do I include the C code in my repo?
<FromGitter> <bew> you can't use a single-header C "lib" from Crystal, as there's no actual library file (.so shared library) to link to, so you either have to 'instanciate' the functions you need with a C file that includes that header and use it, to create a .so shared library that your Crystal program can link to, or you have to re-implement the whole header file in Crystal (but then there's no point saying that you use the
<FromGitter> ... header file as you completely re-implemented it..) @sam0x17
rohitpaulk has quit [Ping timeout: 260 seconds]
DTZUZO_ has quit [Ping timeout: 252 seconds]
Groogy1 has joined #crystal-lang
ashirase has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
DTZUZO_ has joined #crystal-lang
lunarfyre7 has quit [Ping timeout: 260 seconds]
<FromGitter> <diegobernardes> hi! I'm new to Crystal and trying to do a toy project, but I need a lib to trace time on http requests, something like this: ((https://github.com/davecheney/httpstat/blob/master/screenshot.png)) ⏎ ⏎ does Crystal has something to do it?
lunarfyre7 has joined #crystal-lang
<FromGitter> <bew> Hmm i don't know, but can't you use httpstat as you just demonstrated ?
<FromGitter> <diegobernardes> could, but I wanted to do it with Crystal. The idea is a simple website monitoring agent that ping the endpoints and send the times to a app.
<FromGitter> <j8r> @diegobernardes I think you'll have to do it manually. Do the DNS lookup, count the time, then do the TCP connection, count the time, then TLS handshake, count the time etc... ⏎ You'll have to do this trace lib, but you can use existing code for DNS, TCP and TLS
<FromGitter> <diegobernardes> hmm, ok, well, thanks anyway :)
<FromGitter> <vladfaust> Is that intended behavior? https://carc.in/#/r/527d /cc @RX14
<RX14> Yes
<RX14> You're not calling builder.object inside the field block
<FromGitter> <vladfaust> The docs should be more helpful in this case. IMO https://crystal-lang.org/api/0.26.1/JSON/Builder.html lacks for a complex example
<FromGitter> <vladfaust> Why need `field do` then? It only adds a level of indentation in the code: https://carc.in/#/r/527e
<RX14> @vladfaust that's it's entire point
<RX14> to add a level of indentation
<FromGitter> <vladfaust> ``` builder.field("foo") do ⏎ builder.object do``` ⏎ ⏎ This code is redundant [https://gitter.im/crystal-lang/crystal?at=5ba4c38bb4990c30eee94989]
<FromGitter> <j8r> does someone has a bit of time to look at https://github.com/crystal-lang/crystal/pull/6556 ?
<FromGitter> <j8r> thanks for the comment @vladfaust , didn't know :)
<FromGitter> <j8r> the yaml spec is a monster 😮
<FromGitter> <vladfaust> 'greed
<RX14> @vladfaust no it's not
<RX14> because builder.field could have an object, an array, whatever
<RX14> the usecase for field is builder.field("foo") { MyObject.to_json(builder) }
<RX14> or similar
<FromGitter> <vladfaust> That makes sense
<FromGitter> <vladfaust> You've seen that? http://tonsky.me/blog/disenchantment/
return0xe has joined #crystal-lang
return0e has quit [Ping timeout: 252 seconds]
<FromGitter> <melbourne2991> is anyone here using VSCode? Following this guide: ⏎ https://github.com/amberframework/docs/blob/master/examples/crystal-debug.md ⏎ ⏎ I'm getting Debug adapter process has terminated unexpectedly. [https://gitter.im/crystal-lang/crystal?at=5ba4d045f7e158062502fc15]
<FromGitter> <j8r> @vladfaust I read the post. It exposes a valid point, but it generalizes a bit too much
<FromGitter> <vladfaust> @j8r IMO its users issue. They got used to slow shit
<FromGitter> <j8r> Yep if the users and the business are fine, the dev has done his job right. Even the app isn't performant, pretty, because this are opinions and may vary depending of people.
<FromGitter> <vladfaust> It's harmful on the longer distance anyway
<FromGitter> <j8r> maybe the dev hasn't done his job right, but it's has done the job in a way
<FromGitter> <j8r> agree, this isn't only about the users and the business, but also about the other devs
<FromGitter> <girng> @bowyan I tried your code example. It's the same, unfortunately
<FromGitter> <rishavs> For `File.read("/migrate/down.sql")` how do i give a path for a file which is in a folder inside the project base folder (same level as the src). I tried `/migrate/down.sql`, `./../migrate/down.sql` and `../migrate/down.sql` but none of these work
<FromGitter> <rishavs> of course, the moment I post a questions, a trial and error answer appears... `migrate/down.sql` works :/
<FromGitter> <rishavs> How do I pass multiple sql queries in a single db call? My plan was to have a simple migrator in place for my create/drop table/seed scripts. ie. I have a sql file with the following queries in it- ⏎ ⏎ ```DROP TABLE IF EXISTS tags; ⏎ DROP TABLE IF EXISTS taglinks;``` ⏎ ⏎ I thought I was being clever by just using `DB.exec (File.read("migrate/down.sql"))` to run all the queries in my sql file.
<FromGitter> ... Unfortunately, i hit the `Unhandled exception: cannot insert multiple commands into a prepared statement (PQ::PQError)` error this way. I really don't want to use migrator tools for something should be dead simple and hope that there is an easy way to do this. [https://gitter.im/crystal-lang/crystal?at=5ba4dd3bbe4f300626c8430e]
<FromGitter> <vladfaust> @rishavs use https://github.com/vladfaust/migrate.cr
<FromGitter> <vladfaust> It runs all migrations in a single transaction
<FromGitter> <vladfaust> Or read its code to reinvent the bicycle
<FromGitter> <bew> @vladfaust yeah i love that disenchantment post :p
<FromGitter> <rishavs> I'll go with a monocycle. :D ⏎ I want to use a library only as the last option. so far only JWTs and DotEnvs have defeated me and I plan on taking them on again after I am more experienced
Heaven31415 has joined #crystal-lang
<Heaven31415> Hi
<Heaven31415> What is the best way to "delete" a inhertied method in a subtype? Right now I'm just marking it as private, is there another way?
<FromGitter> <girng> how many queries are u planning to do in 1 call? can just do file_datastring.split(';') then each, and run db.exec on each line. ⏎ something like this https://play.crystal-lang.org/#/r/528g
<FromGitter> <rishavs> @girng ⏎ That is what I am writing right now. Splitting lines using the `;` delimiter
<FromGitter> <girng> icky but dead simple, no plugin needed :D
<FromGitter> <rishavs> yeah. :D
<FromGitter> <bajro17> @rishavs I check your posts I love it so much you explain so good
<FromGitter> <bajro17> this from medium
<FromGitter> <rishavs> o.0
<FromGitter> <rishavs> someone actually read my posts?
<FromGitter> <bajro17> yes :D I do
<FromGitter> <rishavs> Thanks
<FromGitter> <rishavs> 💃
<FromGitter> <rishavs> I am actually taking the concept of Cove much further. I have streamlined and cleaned the code a lot in my new repo
<FromGitter> <rishavs> I hope to have a MVP reddit like site out by the end of this year
<FromGitter> <rishavs> the whole exercise of not using any frameworks/libraries was tremendous in terms of learning.
<FromGitter> <rishavs> If you are interested, check out the current state of my code at; https://github.com/rishavs/silver
<FromGitter> <rishavs> I am currently working on implementing a tag system where posts can be tagged and users can vote tag associations for a post. And search for posts using tags
faitswulff has joined #crystal-lang
snapcase has joined #crystal-lang
<FromGitter> <bajro17> Just little router need rework probably
<FromGitter> <bajro17> because I see there is almost all static
<FromGitter> <bajro17> like you write directly
<FromGitter> <bajro17> it will be better to have little router config
<FromGitter> <bajro17> where will be (@method, @path, @function)
<FromGitter> <rishavs> yeah. I am doing something similar; ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba4eb8bf4bd1056ac96c501]
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #crystal-lang
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #crystal-lang
Raimondi has joined #crystal-lang
<FromGitter> <bajro17> I was just think to be little more abstract
<FromGitter> <bajro17> but its look good
<FromGitter> <bajro17> keep doing this I love to read all you do
Yxhuvud has quit [Remote host closed the connection]
Yxhuvud has joined #crystal-lang
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba4fdfeb4990c30eeeacc6f]
<FromGitter> <bew> rescue exit..... That's not a solution
<FromGitter> <codenoid> exit mean change a project
<FromGitter> <codenoid> umm work on something different
<FromGitter> <codenoid> and let real user start again
Heaven31415 has quit [Quit: Leaving]
faitswulff has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 252 seconds]
<FromGitter> <bew> RX14 are you around? do you know what would be needed to "cast" a `Pointer(FooStruct)` to a `FooClass` where the `FooClass` has the same definition (fields & types) as the `FooStruct` ?
<RX14> you dont
<FromGitter> <bew> In other words, whats the memory representation of a reference-based type
<RX14> it's not the same
<RX14> there's an added type id header
<RX14> so you can't
<FromGitter> <bew> ok, is it "okay-ish" to say that a reference-based type is basically a struct with a typeid and a pointer? (memory-wise)
<RX14> depends what you mean by okay-ish
<RX14> of it works it works
<RX14> it might not work in the future
<RX14> i dont see the usecase
<RX14> why not just create a class with a single memver: the struct
<RX14> and then forward calls from the class to the struct
<FromGitter> <bew> It won't work, I'll explain, let me type ^^
<RX14> then with that layout you can do things "fairly safely"
<FromGitter> <bew> I'm trying to think (theorically) of a way to pre-allocate a bunch of memory (e.g: a `Slice(FooStruct).new(10)`), then get a pointer to one of the `FooStruct` and use it as a simple `FooClass` reference type, pass it around, modify it, but without the burden of allocating each of the `FooClass` individually on the heap.
<RX14> which contains the ptr and uses forward_missing_to @pointer.value
<RX14> maybe
<FromGitter> <jasdeepsingh> hello everyone, i've been itching away at getting back into Crystal and create a few helper libraries that could help us grow as a community (especially within the web domain, atleast that would be my focus) ⏎ ⏎ A long time ago, I created https://github.com/metaware/flipper ⏎ ⏎ Are there any suggestions on what the community might be lacking in terms of helper shards, that I can help contribute
<FromGitter> ... to and satisfy my itch at the same time? It could be helping out with an existing project or working on something that's missing altogether. [https://gitter.im/crystal-lang/crystal?at=5ba51306f4bd1056ac97d698]
<RX14> @jasdeepsingh i think that most useful shards are born out of a real-world neccesity :)
<FromGitter> <bowyan> > I'd say that you shouldn't take the actions of a single community member as representative of the whole issue tracker. ⏎ ⏎ RX14 ... Well, thanks for trowing me under the bus.... If girng mentioned from the start he was using WSL, i will have gladly pointed out that WSL is know to have issues. Instead of focusing on the reported code that did not work. ⏎ ⏎ Stick out your head to try and help somebody
<FromGitter> ... for hours when he is withholding information and then goes on calling me a troll/dude and having a attitude. Hell, i was writing a apology for misunderstanding him when you locked the topic. ... [https://gitter.im/crystal-lang/crystal?at=5ba513541043315947c57add]
<RX14> apologies for locking the topic, i just didn't want the conversation to continue on github
<RX14> i suggest you PM him on gitter or email him :)
<FromGitter> <bowyan> I will ...
<FromGitter> <girng> Please don't
<FromGitter> <girng> You were not helping at all. You first claimed my code's loop do was causing max CPU utilization (which it doesn't), and you also claimed that "maxing the cpu" is normal when communicating between client->server. Which is not normal at all. You were just trying to make it seem like I was doing something wrong, so that you "felt like you were right". There was no need for it
<FromGitter> <jasdeepsingh> @RX14 been waiting for crystal to get to 1.0 before using it for production applications for real necessities to be born :) I think i've waited long enough now, that i might as well decide to start putting some small dispensable apps in production.
<FromGitter> <bowyan> Great ... PM apology, get some more public crap ...
<RX14> @bowyan @girng it's clear you're both fustrated i suggest you both leave it be
<FromGitter> <girng> I just logged in gitter and saw your messages, lol I wasn't even going to say anything more.
<FromGitter> <bararchy> @jasdeepsingh there is a repo named crystal-libs-needed or something like that where there is a long list of needed libs :)
<FromGitter> <bararchy> @z64 you beat me to it :)
aemadrid has joined #crystal-lang
faitswulff has quit [Remote host closed the connection]
<FromGitter> <jasdeepsingh> ☝️ amazing! thanks
faitswulff has joined #crystal-lang
<FromGitter> <bew> from `Spec` https://crystal-lang.org/api/0.26.1/Spec/Expectations.html#expect_raises(klass:T.class,message=nil,file=__FILE__,line=__LINE__,&block)forallT-instance-method
<FromGitter> <girng> thanks
<FromGitter> <girng> i'm going to track this down myself and report directly to WSL what is causing it. i got wsl issue going already :D
<FromGitter> ... blob/60c4f4d5d1a3c6c763e93922d39c4a84e46738ea/src/socket.cr#L118), or 124 (https://github.com/crystal-lang/crystal/blob/60c4f4d5d1a3c6c763e93922d39c4a84e46738ea/src/socket.cr#L124)?
<FromGitter> <girng> how can i differentiate / know in the future which one it uses, if there are multiple methods of the same name
<FromGitter> <jasdeepsingh> @girng by looking at the method signature?
<FromGitter> <bew> @girng by looking at the parameters types
<FromGitter> <girng> ok, so in this case it's `connect(addrinfo, timeout: connect_timeout`, which would match to L124?
<FromGitter> <bew> in your example, `addrinfo` is of type `AddrInfo` (well not exactly, but almost), so the first `connect` which takes a String won't match
<FromGitter> <bew> and the only difference between the 2nd & 3rd is that the 2nd doesn't take a block, and the 3rd takes a block
<FromGitter> <bew> so yeah, it'll take the 3rd, line 124 in this case
<FromGitter> <girng> when it does return yield, that's hinting it's using a block too, right?
<FromGitter> <bew> just `yield` let you know that it takes a block
<FromGitter> <girng> ok
<FromGitter> <girng> Okay, i'm getting really close then. this (https://github.com/crystal-lang/crystal/blob/60c4f4d5d1a3c6c763e93922d39c4a84e46738ea/src/socket.cr#L133) is the line of code not working on WSL
<FromGitter> <girng> have a feeling it might be around `wait_writable`
<FromGitter> <girng> or.. `Errno.value` is not getting the right value
<FromGitter> <girng> to trigger that `when`
<FromGitter> <girng> WOW
<FromGitter> <girng> ```code paste, see link``` ⏎ ⏎ Check this out. This actually triggers `connect time out` if you set the connect_timeout to 1. But if you set it to to 2, or any number higher, the error never gets rescued! [https://gitter.im/crystal-lang/crystal?at=5ba54111f4bd1056ac98fef6]
DTZUZO_ has joined #crystal-lang
<FromGitter> <girng> So... `connect timed out`, is from here (https://github.com/crystal-lang/crystal/blob/c6ee7bcd73cc45b49a15680e9942e30173bd72ce/src/socket.cr#L134), L134. And if it's on WSL, `wait_writable` will only work if it has a parameter value of 1.00 or greater. ⏎ ⏎ `wait_writable`'s private def method is here (https://github.com/crystal-lang/crystal/blob/df5f46ad503a62927719ce
<FromGitter> ... e4e058249478dbed68/src/io/syscall.cr#L130). I did some more testing, it only works with 1.09 or less (1.01-1.09), but 1.1 is where it stops.
<FromGitter> <codenoid> morning all
<FromGitter> <codenoid> <3
<FromGitter> <vladfaust> Um it's 22:36 at my place
<FromGitter> <Prutheus> Hello. I have an amber project where I have a crystal file which gets loaded by requiring it in the main file of the project. In my custom file, I want to use a global variable between the functions inside my file .... I don't want to use a class for that, how can I declare a global variable there....writing it at top of my file `var_name = nil` is not working, inside the functions it complains `local variable
<FromGitter> ... not found` how to fix that?
faitswulff has quit [Remote host closed the connection]
<FromGitter> <bew> you can't
<FromGitter> <Prutheus> why not? :/
<FromGitter> <Prutheus> How to solve my problem then?
<FromGitter> <bew> you could use a variable in a module though
<FromGitter> <bew> like `module Bla; class_property foo = "bar"; end` then use `Bla.foo` as a global
<FromGitter> <bew> but it's kind of a ~hack~ /workaround
<FromGitter> <Prutheus> what the hell is a class property?
<FromGitter> <bew> it's just a `@@foo`
<FromGitter> <bew> `class_property` is a macro that generates some functions like a getter and a setter for that variable
<FromGitter> <Prutheus> ahh okay
faitswulff has joined #crystal-lang
<FromGitter> <Prutheus> where is the difference between bulding a module with extends self and a class with extends self, what is the difference between using a class or a module in that sense?
<FromGitter> <bew> hmm nothing
<FromGitter> <Prutheus> huh? So when to use a class and when to use a module_
<FromGitter> <Prutheus> ?
<FromGitter> <Prutheus> I mean in that sense, not generally, generatlly it is clear, when I wanna merge classes I build a module above them
<FromGitter> <Prutheus> wait, in a class, i can't use extend, right?
<FromGitter> <bew> when you need an instance, use a class, if you just need a namespace for some types or "global" vars use a module
<FromGitter> <bew> you should be able to use extend
<FromGitter> <bew> you can use a module to make a "trait", that you can include in a class (or another module)
<FromGitter> <Prutheus> in a class i can't use `extend self`: `TEST_CLASS is not a module, it's a class ⏎ ⏎ extend self`
<FromGitter> <j8r> Yes, why not using a module if all methods will be available without an initializer?
<FromGitter> <Prutheus> yeah, sure, but how to use all methods of a class without an initializer? is that also possible?
<FromGitter> <j8r> Why?
<FromGitter> <Prutheus> i dont know
<FromGitter> <Prutheus> just asked. sure, i use a module at the moment, and don't know why i should use a class
<FromGitter> <Prutheus> just want to know if it also would work
<FromGitter> <j8r> A purpose of the module is to be a collection
<FromGitter> <j8r> Of methods
<FromGitter> <Prutheus> ahh okay, i see
<FromGitter> <Prutheus> now i understand
<FromGitter> <Prutheus> thanks
<FromGitter> <j8r> (I said it badly, you got the idea :) )
<FromGitter> <j8r> You can use class vars @@class_var
<FromGitter> <Prutheus> yeah
DTZUZO_ has quit [Ping timeout: 252 seconds]
faitswulff has quit [Remote host closed the connection]
notdaniel has joined #crystal-lang
faitswulff has joined #crystal-lang
JuanMiguel has joined #crystal-lang
<JuanMiguel> hello all, first day with Crystal after reading two chapters of the pragprog book. Surprised with the speed of the language... and happy with the static typing... still thinking about the automatic nil checking instead of optionals and so... but I like it
<FromGitter> <fridgerator> great!
aemadrid has quit [Quit: Connection closed for inactivity]
<FromGitter> <fridgerator> where did you hear about the book?
<JuanMiguel> twitter
<FromGitter> <fridgerator> ah ok, just curious
<FromGitter> <fridgerator> had you heard of Crystal before?
<JuanMiguel> yes, I did, I saw a youtube talk... maybe two years before, but it seemed to me it was too early
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #crystal-lang
faitswulff has quit [Ping timeout: 245 seconds]
<FromGitter> <Sija> @vladfaust I’m curious, what were the “things” regarding Redis and Python you’ve mentioned?
<jhass> @Sija I'd suggest you stop feeding and agitating the troll, it's not helping anybody with anything
<FromGitter> <Sija> @jhass you’re right, I’ve finished anyway
<FromGitter> <Sija> btw, in case like this it’s hard to take it srsly, u know… such issue is going to be locked down anyway, so havin’ bit of fun won’t hurt I guess? ;)
<jhass> Sija: I think it does hurt in a non-ephemeral medium
<jhass> these kinds of things too easily drift into ad hominem attacks that aren't helping
<FromGitter> <Sija> @jhass why bow to such demands? does it mean you accept such demands for political correctness? that IMO would be a shame… code is written by human beings, with sense of humor, emotions and I believe in many cases these factors make it more alive than technical, dry language which we have in abundance everywhere
<jhass> I think the demand was to inflict a meaningless and heated discussion, I don't feel like I bowed to that
<FromGitter> <Sija> not saying ofc we don’t need technical docs, but bit of personal touch here and there lights things up :)
<jhass> a good troll uses a valid argument presented in a way that people disagree with it
<FromGitter> <Sija> demand was to remove the language... which you did...
<jhass> well, go learn about ableism, it's a valid concept
<RX14> @Sija instead think of the end result
<RX14> i think everyone can be happy with the code as it is
<FromGitter> <Sija> @jhass I’ve checked it out, it’s one of zillions of other absurd concepts which I see no reason to get into
<FromGitter> <Sija> common sense is enough to just ignore it as simply another time-waster (-ism)
<jhass> I think if you see sexism and racism as valid concepts presenting valid issues, ableism just makes as much sense. If you do not see those kinds of issues I'm not sure we have much of a common ground to discuss on
<RX14> either way, the time has already been wasted, i suggest not wasting any more
<FromGitter> <Sija> @RX14 fair enough
<FromGitter> <Sija> @jhass just to finish on light note - I’m just sayin’ that intention is crucial here: one thing is to say for example “you dirty nigger” and another “yo, nigga, what’s up"
<jhass> Yes, I thought so too for many years. Unfortunately it doesn't work that way. Intention isn't key, if everybody could read everybody's intention so freely and let go of the discrimination they experienced (look up transgenerational traumas) we already would live in a utopia, but we don't.
<FromGitter> <Sija> isn’t enough to avoid judging people, by whatever feature or virtue, and let go all of the -isms? I don’t feel like I need to know the concept of “racism” to treat black people with same respect as any other racial group. And if I write “that’s one badass nigga” the intention here I believe is visible enough to know that’s not disrespectful in any way, quite the contrary
<jhass> you're forgetting the historical connotation the word alone, irrespective of context, might have for a recipient who was or is discriminated by it by the very group of people you (most likely, forgive me the assumption) belong to
<RX14> please stop, this specific kind of political discussion tends to linger longer than it should and end places it shouldn't
<FromGitter> <Sija> I was just writing that - many people might ofc get lost in details (like picking on the word “nigger” with its traditionally derogatory meaning)
<FromGitter> <Sija> and context is quite crucial here
<jhass> the point is, you don't get to decide. The people being discriminated get to
<jhass> that's the very definition of accepting your privilege
<FromGitter> <Sija> for me that’s a very definition of political correctness
<FromGitter> <Sija> following that train of thought I'd wonder why there is still no “hair-ism”? Bald people are somewhat under-represented ;)
<FromGitter> <jwoertink> There is ^
<FromGitter> <Sija> damn, I’m lagging with the times
<FromGitter> <Sija> in Scandinavia people are already afraid to say they don’t like someone
<FromGitter> <Sija> because someone might get offended (xX)
<FromGitter> <jwoertink> I just saw that issue on GH. It's an interesting world we live in. I have a friend that works in retail. She got in trouble for mentioning "black friday"
<FromGitter> <jwoertink> which is a huge deal in the U.S. Their store renamed the event to something like "Day after Thanksgiving Sale" or something
<FromGitter> <jwoertink> Even though the term is an accounting one.
<FromGitter> <jwoertink> Just like "Sanity check" is a programming term. It doesn't actually have anything to do with people. However, it's not about what the word is, but how it's interpreted by people
<FromGitter> <jwoertink> So best to roll with path of least resistance 😃
<jhass> I can see the etymology of black friday as something neutral, do you have an etymology for "sanity check" that's distinct from the one for "sanity"?
<FromGitter> <jwoertink> on to a more room related topic..... My production crystal app is on a single C4.XLarge instance
<FromGitter> <jwoertink> and I sit around 0.5% CPU
<jhass> how much traffic is it seeing? :P
<FromGitter> <jwoertink> about a million users a day
<FromGitter> <jwoertink> :D
<jhass> cool
<RX14> whats that in real metrics like http requests per second :P
<FromGitter> <jwoertink> but oh boy are the errors rolling in on sentry and bugsnag lol
<RX14> (peak)
<FromGitter> <jwoertink> hmm... I don't know. I'll need to see if GA shows that
<RX14> my point is that GA is not correlated to programming performance metrics
<RX14> only marketing ones
<FromGitter> <jwoertink> yeah. It doesn't really do well for that
<jhass> and even there it's pretty bad :P
<FromGitter> <jwoertink> I'm not sure how I'd get metrics like req/sec
<jhass> no loadbalancer or anything in front?
<RX14> implement proper monitoring
<FromGitter> <codenoid> what's your database @jwoertink
<FromGitter> <jwoertink> Postgres
<RX14> i always implement a /stats call with various metrics
<FromGitter> <codenoid> okay
<RX14> like latency buckets
<RX14> request counts
<RX14> and error counts
<FromGitter> <jwoertink> Ah. Then you just calculate that stuff manually?
<RX14> it's really useful for debugging
<FromGitter> <jwoertink> Or are you using a tool for that?
<RX14> well you can at first
<RX14> later, it's in json
<RX14> so it's super easy to feed into real tooling
<RX14> since firefox renders json nicely
<FromGitter> <jwoertink> 👍
<RX14> it's future proof
<FromGitter> <bajro17> So nice to hear more and more successful stories with crystal
<FromGitter> <bajro17> @jwoertink I hope you will get more then fb visits per day :)
<FromGitter> <jwoertink> fb?
<FromGitter> <bajro17> facebook
<FromGitter> <bajro17> hahah
<FromGitter> <jwoertink> lol
<FromGitter> <jwoertink> I wonder if newrelic or skylight would be good to add in
<FromGitter> <jwoertink> I've used them a little in the past on rails projects
<FromGitter> <jwoertink> oh, librato might be a good one actually
<FromGitter> <jwoertink> my biggest error in my app at almost 2k errors reported today `Could not find route matching GET /wp-login.php` 😂
<FromGitter> <codenoid> what
<FromGitter> <codenoid> 😆 is it come from search engine or directly from your site ?
<FromGitter> <fridgerator> Bots
<FromGitter> <fridgerator> Pretty normal
<FromGitter> <fridgerator> Trying to hack old wordpress instances
<FromGitter> <jwoertink> haha yeah. Just people trying to "hack" in
JuanMiguel has quit [Quit: Saliendo]
<FromGitter> <fridgerator> Getting jacked into the matrix
<FromGitter> <girng> "that's the very definition of accepting your privilege" ROFL
return0xe has quit [Remote host closed the connection]
return0xe has joined #crystal-lang
<FromGitter> <girng> "*<jhass>* @Sija I'd suggest you stop feeding and agitating the troll, it's not helping anybody with anything" You referring to me? You think I'm a troll?
<FromGitter> <girng> That's very nice of you, I appreciate it
<FromGitter> <codenoid> what's your productivity trick when coding with crystal ?
DTZUZO_ has joined #crystal-lang
<FromGitter> <jwoertink> try to get it to compile with no errors on the first try
<FromGitter> <jwoertink> I use the "once this compiles, I can go to lunch" method.
<FromGitter> <jwoertink> it keeps me pretty productive. I took a lunch only 30 min late today!