Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 29 21:10
    Gembot-ai-admin opened #187
  • Jul 29 20:59
  • Jul 19 16:44
    Uzay-G opened #33
  • Jul 19 14:18
    pyrsmk opened #452
  • Jul 19 13:55
  • Jul 08 17:18
    mixflame edited #1265
  • Jul 08 17:06
    mixflame synchronize #1265
  • Jul 08 11:54
    CarlosAndresRamirez commented #1267
  • Jul 08 02:54
    mixflame synchronize #1265
  • Jul 08 02:49
    mixflame synchronize #1265
  • Jul 08 02:44
    mixflame synchronize #1265
  • Jul 08 02:43
    mixflame synchronize #1265
  • Jul 08 02:33
    mixflame synchronize #1265
  • Jul 08 02:30
    mixflame synchronize #1265
  • Jul 08 01:58
    mixflame synchronize #1265
  • Jul 08 01:55
    mixflame synchronize #1265
  • Jul 08 01:31
    mixflame synchronize #1265
  • Jul 08 01:29
    mixflame synchronize #1265
  • Jul 08 01:09
    mixflame synchronize #1265
George Dietrich
@Blacksmoke16
the con of tightly coupled code
Jonathan Silverman
@mixflame
yeah, maybe if i can i could detect that redis isn't running and skip the test
then we could make the test sooner than waiting for the core team @Blacksmoke16
George Dietrich
@Blacksmoke16
moreso meant it would be great if you could test this logic w/o needing redis at all
Jonathan Silverman
@mixflame
oh yeah... if we had a mock for crystal redis that'd be possible maybe
seems like a lot to build tho just to test an adapter
George Dietrich
@Blacksmoke16
at this point probably
Jonathan Silverman
@mixflame
yea
actually @Blacksmoke16, looks like the test framework already loads redis! 8-)
Jonathan Silverman
@mixflame
I added two passing tests @Blacksmoke16
Jonathan Silverman
@mixflame
ok it's in perfect condition
enjoy guys :) <3
Jonathan Silverman
@mixflame
i did my best... but its not production ready yet. it's closing sockets right now because of ping issues.
Jonathan Silverman
@mixflame
ii fixed the issue in the redis web adapter again... i had a race condition
also added ability to know if we've been unsubscribed
im back to using it live
enjoy guys
i think we might be good here
i don't think i'm breakingpipes anymore
Jonathan Silverman
@mixflame
ok good news
i simplified my patch
it no longer uses multiple fibers or a crystal channel
simply subscribes to all channels on boot, and sets handlers
Jonathan Silverman
@mixflame
hey @Blacksmoke16 @damianham @elorest @eliasjpr @drujensen can anyone give me a review on my pull request? it'd be great to if anyone can spot any weaknesses
pull request #1265
George Dietrich
@Blacksmoke16
id best leave it to them, i dont know much about amber/websockets
Jonathan Silverman
@mixflame
whew yeah it was the hardest ive ever programmed
George Dietrich
@Blacksmoke16
I'd deff squash merge that fwiw ^
Jonathan Silverman
@mixflame
for sure
the problem i'm dealing with is the final problem and i think something you might be good at @Blacksmoke16 ... its just a concurrency problem with the websocket RFC ping... simple code... but i'm not sure if i'm sleeping or fiber.yielding too much or not enough but i know loops and spawns and receives have to be balanced from experience
ill squash for you
Jonathan Silverman
@mixflame
@Blacksmoke16 I smashed the commits down to 2 commits for you George :)
if that helps
Damian Hamill
@damianham
@mixflame I will try to help as soon as I can. I am really busy right now trying to get a new product MVP ready. The next stage of the product will be making heavy use of websockets and Redis Pub/Sub so when I make a start on that I will be able to do a review on your pull request. Hopefully within a few weeks, sorry I can't help any sooner.
Jonathan Silverman
@mixflame
wow @damianham I'm glad to hear that! I think you will definitely like what you find. I was able to stabilize and it's very speedy and stable. No need for more updates from me on the socket adapter pubsub patch. The last thing I had to do was make sure sockets weren't garbage collected due to race conditions because of my fiber using affecting crystal overall magicness. But we're great. :D Glad to hear that it will be getting some use. :)
Jonathan Silverman
@mixflame
doing stability tests
it does seems pretty stable on localhost, but there's been crashes on production so it's in the garage again
Jonathan Silverman
@mixflame
well... the patch seems stable. I may have overrun my memory limits some how for Crystal at some point, if I get that error again I'll paste it. I did patch it to make sure it never tries to delete a(web)socket that has already been deleted. I'm rolling with this so if there's anything wrong with it it will hopefully be fixed. :) :+1:
Rene Bon Ćirić (Renich)
@renich_gitlab

Hello, Amber community! o/

Let's say I created src/assets/images/some_pic.jpg and I want it to show it it in a view. I would expect webpack to put it at public/dist/images/some_pic.jpg ready for web. Is this assumption correct?

Rene Bon Ćirić (Renich)
@renich_gitlab
OK, when validating, how do you declare a file as required (upload)?

saying:

params.validation do
  required :image
end

Isn't working.

Marwan Rabbâa
@waghanza
Hi @elorest,
I use last rc you published in the-benchmarker/web-frameworks#4098. any plan for the final release ?
Damian Hamill
@damianham

saying:

params.validation do
  required :image
end

Isn't working.

image would be in params.files, as in params.files[:image] so you need to validate params.files[:image] exists in your controller method not in the params validators as teh validators work on keys in params

Ghost
@ghost~5f1c2d8ad73408ce4fea82cb
What's the status of GraphQL support in Amber framework?
Ghost
@ghost~5f1c2d8ad73408ce4fea82cb
Anyone @drujensen @eliasjpr ?
Alex
@axle07
Can anyone advise on how to change the Cache-Control directive for static assets?
Ghost
@ghost~5f1c2d8ad73408ce4fea82cb
Hi @axle07 , I am not expert on amber, but I see it's set in development.yml or (production.yml) here -
image.png
you can change it here and restart your server. I think you should be able to also modify response header directly - https://crystal-lang.org/api/1.1.0/HTTP/Server/Response.html
Damian Hamill
@damianham
Most of us using Amber probably come from a Rails background and many will remember ActiveSupport::Memoizable. I now have a candidate for memoizing the output of a request where every user in a province will request the same data with the same parameters and get the same result until the data changes, which is not that often. I am thinking that caching the output of the request as a static file will significantly improve performance. I would then need a mechanism to remove the static file when the data is changed. Anyone have any thoughts on this ?