<FromGitter>
<Blacksmoke16> does `anonymous` get printed twice?
<FromGitter>
<randiaz95> yes
<FromGitter>
<Blacksmoke16> and the response doesnt have a `key` header ?
<FromGitter>
<Blacksmoke16> because you're adding the header to the response, how would the request know about that header?
<FromGitter>
<randiaz95> I thought the request was read only
<FromGitter>
<randiaz95> and the response was write only
<FromGitter>
<randiaz95> I do get the key into the response headers though: โ โ `context.response.print "Hello world, got #{context.response.headers}!"` returns a key in the hash
<FromGitter>
<randiaz95> I think I confused headers with cookies... sory
<FromGitter>
<Blacksmoke16> np
<FromGitter>
<randiaz95> Wow... I just found a simple way to go around csrf...
<FromGitter>
<Blacksmoke16> oh?
<FromGitter>
<randiaz95> So dumb.. Instead of executing a post request from the outside site; just store the credit card data onChange of the input tag.
<FromGitter>
<randiaz95> and send a direct request.
<FromGitter>
<randiaz95> What is stopping anyone from doing that?
<FromGitter>
<randiaz95> not saying that I am going to do that...
<FromGitter>
<randiaz95> But I am fearful...
<FromGitter>
<Blacksmoke16> not sure i follow
<FromGitter>
<randiaz95> So, csrf is making sure that the client is sending a post request from the correct site.
<FromGitter>
<randiaz95> because there can be hidden cc input tags that autocomplete without the user knowing in hacker sites.
<FromGitter>
<Blacksmoke16> You can turn off autocomplete and there are options you can add to the cookie to reduce that vulnerability
<FromGitter>
<Blacksmoke16> not too complex if you dont need it to be
<FromGitter>
<randiaz95> I shards installed ya
<FromGitter>
<randiaz95> with all the possible malware
<FromGitter>
<randiaz95> ;)
<FromGitter>
<Blacksmoke16> ha
<FromGitter>
<randiaz95> George, I forgot the goal of Athena.
<FromGitter>
<randiaz95> Mainly reusability?
<FromGitter>
<randiaz95> It seems to use threads; so are there performance benefits?
<FromGitter>
<Blacksmoke16> its built on top of the stdlib's `HTTP::Server`, which also uses fibers, so nothing really fancy there
<FromGitter>
<randiaz95> ART seems to be an event based routing system. Can I create non-http request events?
<FromGitter>
<Blacksmoke16> mainly just takes a diff approach. I.e being annotation based, having a DI service container, using normal methods as route actions, and flexible as the majority of it can be extended/customized
<FromGitter>
<randiaz95> Right. I see the customization aspect
<FromGitter>
<Blacksmoke16> internally it uses that lib
<FromGitter>
<Blacksmoke16> to emit/handle the events required to handle the request
<FromGitter>
<randiaz95> Wow.
<FromGitter>
<randiaz95> So like events in long running processes can be called? like after finishing a long running etl you can trigger ml training then finally send an event that sends email or websocket push?
<FromGitter>
<Blacksmoke16> probably, would be able to define your own events then emit them when you want
<FromGitter>
<randiaz95> I think I got an error while trying to run your example. Essentially the athena-config dependency can't find athena.yml
<FromGitter>
<randiaz95> I think it is in a directory above ./
<FromGitter>
<Blacksmoke16> mmm, probably need to generate one when installing
<FromGitter>
<Blacksmoke16> should just be able to add one to your root and it'll be ๐
<FromGitter>
<Blacksmoke16> can be empty
<FromGitter>
<randiaz95> ah ok
<FromGitter>
<Blacksmoke16> thanks for that, first i heard about it. I'll get it fixed for next release
<FromGitter>
<randiaz95> That's not common in most people lol.. Most people don't put much heart and soul to what they do.
<FromGitter>
<Blacksmoke16> i try :p
<FromGitter>
<randiaz95> I also don't know how to hang the ART.run
<FromGitter>
<Blacksmoke16> hang?
<FromGitter>
<randiaz95> yep in the example we do spawn ART.run
<FromGitter>
<randiaz95> so it doesnt wait and listen; but just finishes the script
<FromGitter>
<Blacksmoke16> oh yea, thats just for the example so that the client can execute its requests
<FromGitter>
<randiaz95> Ah. True my bad lol
<FromGitter>
<Blacksmoke16> would just need to do `ART.run` and it'll block to handle requests
<FromGitter>
<randiaz95> I should puts those .body outputs then
<FromGitter>
<randiaz95> This is flask for Crystal :D
<FromGitter>
<randiaz95> I think I will try to make a tool for work in it. ( I make some local wifi tools for my team sometimes)
<FromGitter>
<Blacksmoke16> haha yea, is mainly based on symfony which does a similar things
<FromGitter>
<Blacksmoke16> i come from a more PHP background so is more like symfony/spring like versus rails
<watzon>
Damn the Crystal alpine package is out of date
<FromGitter>
<Blacksmoke16> Can't use the docker image?
<watzon>
The docker image is using debian, and debian unfortunately isn't good at updating packages
<watzon>
I need libmagickwand 7 and would rather not build it in the image
<watzon>
May have to though
<watzon>
Thought maybe extracting the tar.gz for Crystal into the alpine container would work, but trying to run shards install is giving me a non zero exit code
<watzon>
Well installing from source it is
return0xe has quit [Remote host closed the connection]
<FromGitter>
<laynef> Do you guys need help with making Ubuntu for Crystal with Docker?
<FromGitter>
<laynef> *Ubuntu support
<watzon>
Nah Ubuntu support is there, Crystal should run fine on it. It's ImageMagick that's the issue
<FromGitter>
<laynef> What or who currently needs help or support?
gangstacat has quit [Quit: ฤis!]
gangstacat has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e_ has quit [Client Quit]
return0e has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 250 seconds]
Human_G33k has joined #crystal-lang
HumanGeek has quit [Ping timeout: 264 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #crystal-lang
Groogy has joined #crystal-lang
_ht has joined #crystal-lang
ua has quit [Read error: Connection reset by peer]
ua has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @watzon no i mean the Alpine docker image
<FromGitter>
<Blacksmoke16> i made it a compile error `Error: Constraint Athena::Validator::Constraints::NotBlank cannot be applied to Job#age. This constraint does not support the Int32 type.`
<FromGitter>
<noaheverett_twitter> Newbie question, I'm trying to send binary data over a websocket client created via `ws = HTTP::WebSocket.new`
<FromGitter>
<noaheverett_twitter> I undestand ws.send sends text data, but the stream option sends binary data? Does anyone have an example of using the stream method or a way to send binary data over a websocket?
<FromGitter>
<noaheverett_twitter> you rock, thank you for helping me
alexherbo2 has quit [Ping timeout: 264 seconds]
<FromGitter>
<Blacksmoke16> np
Human_G33k has quit [Remote host closed the connection]
<FromGitter>
<wout> While implementing an API, I found this timestamp return value: `12424312`. Is this a standard in some language? Because it is way too short.
<FromGitter>
<wout> I can convert it to an acceptable value by multiplying by `100`: `Time.unix(@timestamp * 100)`.
alexherbo2 has joined #crystal-lang
<oprypin>
wout, no, that makes no sense. one wouldn't have a multiplier of 100 there either
<FromGitter>
<wout> @oprypin Yeah, it's probably a mistake. I'll have to contact them about this. Thanks!
ur5us has joined #crystal-lang
<oprypin>
oprypin, could be time since they started their server :o 143 days
<FromGitter>
<uuwa> Is it normal that static arrays take long to compile? I needed to compile an uninitialized 10,000-items static array (which I later filled) and my OS froze.
<oprypin>
uuwa, yea it's been brought up as an issue, try a search
<watzon>
It's a LLVM problem afaik. Or at least a way with the generated LLVM IR
<oprypin>
watzon, werent you the one who brought it up? do u have a link?
<FromGitter>
<dscottboggs_gitlab> watzon โ โ ```code paste, see link``` โ โ would be a better way to do that. I think your current method of choosing a random color would be weighted towards darker colors. [https://gitter.im/crystal-lang/crystal?at=5e77f509ada7ae4f2e370fac]
<FromGitter>
<dscottboggs_gitlab> or maybe green/blue colors?
<FromGitter>
<dscottboggs_gitlab> regardless, super cool
<FromGitter>
<Blacksmoke16> prob could do `byte.to_s(str, base: 16)`
return0e has quit [Read error: Connection reset by peer]