faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
faustinoaq has quit [Ping timeout: 276 seconds]
wontruefree has joined #amber
snsei has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
wontruefree has quit [Quit: bye]
snsei has quit [Remote host closed the connection]
<FromGitter> <vlazar> I'm not sure there is something to patch. I've changed TFD test implementation to use lowercase column names.
<FromGitter> <vlazar> I wonder how other ORMs handle such cases though.
_whitelogger has joined #amber
<FromGitter> <vlazar> > All identifiers (including column names) that are not double-quoted are folded to lower case in PostgreSQL. Column names that were created with double-quotes and thereby retained upper-case letters (and/or other syntax violations) have to be double-quoted for the rest of their life. ⏎ https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive
<FromGitter> <vlazar> SO the correct filed name should be lowercased when used in double quotes https://github.com/TechEmpower/FrameworkBenchmarks/pull/3884/files#diff-24ee759a5db72ea16b053bb66220b678R8
marenz has joined #amber
<FromGitter> <shobhitic> Hey, newbie here. I have generated multiple scaffolds and the one thing that I always change is the way methods are being called. Specifically `render` and `redirect_to`. ⏎ ⏎ Everywhere, `render` is called using paranthesis :- ⏎ ⏎ ```redirect_to "/articles"``` ... [https://gitter.im/amberframework/amber?at=5b2f662b72b31d3691eed5c4]
<FromGitter> <conradwt> @shobhitic Parentheses are optional in the Crystal Programming.
<FromGitter> <shobhitic> @conradwt Yes, I know they are optional but mixing the two styles feels a bit weird to me, which is why I am asking whether it's a deliberate choice or something that just happened.
<FromGitter> <conradwt> @shobhitic It probably deliberate to show the different styles within the Crystal's calling conventions. In my projects, I tend to be a bit more consistent throughout the entire codebase.
<FromGitter> <shobhitic> @conradwt Which style do you prefer?
<FromGitter> <conradwt> @shobhitic These days I prefer parentheses because most other languages require them.
feepbot has quit [Ping timeout: 240 seconds]
feepbot has joined #amber
<FromGitter> <faustinoaq> > I'm in the process of updating TFB to newer Crystal and Crystal frameworks versions. ⏎ ⏎ @vlazar Oh, very nice, can you check this please: https://gitter.im/crystal-lang/crystal?at=5b2a54ea479ca266896bc490
<FromGitter> <faustinoaq> A extract of that conversation: ⏎ ⏎ > Other frameworks are already doing that `ulib-plaintext_fit`, `aspcore-mw-utf8json`, `ulib-json`, `ulib-json_fit`, etc ⏎ > Maybe mixing all test in one app (like we're doing right now db/plaintext) have some kind of overhead, or LLVM optimization issues ⏎ > Is there a way to separate? I thought there is a single port you can get. ...
marenz has quit [Remote host closed the connection]
<FromGitter> <vlazar> @faustinoaq why do you think splitting into multiple tests better?
marenz has joined #amber
<FromGitter> <robacarp> @shobhitic I am a staunch anti parenthesis coder, and I regularly remove parenthesis from generated code, including renders and other places. I would approve a PR updating the syntax 😉
marenz has quit [Quit: Ex-Chat]
marenz has joined #amber
<FromGitter> <faustinoaq> @vlazar Because looks like database related code slowdowns other tests like json/plaintext
<FromGitter> <faustinoaq> Maybe we can split then in two tests groups: ⏎ ⏎ 1) json and plaintext ⏎ 2) database queries ⏎ ... [https://gitter.im/amberframework/amber?at=5b2fa31b72b31d3691ef45e5]
<FromGitter> <vlazar> how did you measured that db related code has any effect on other parts?
<FromGitter> <vlazar> as far as I understand TFB requirements there should be normal routing like now
<FromGitter> <vlazar> meaning you have an app and inside it it handles `/plaintext`, `/json` and so on
<FromGitter> <vlazar> having 1 route per app or part of routes sounds like cheating, no?
<FromGitter> <vlazar> @faustinoaq 👇
<FromGitter> <faustinoaq> @vlazar Well, many other frameworks are already doing that 😅
<FromGitter> <faustinoaq> > having 1 route per app or part of routes sounds like cheating, no? ⏎ ⏎ With this logic, If you look in the source code of other languages tests, many of them are already cheating 😅 ⏎ ⏎ There are so many test like `-raw-plaintext`, `-raw-json`, `raw-json-fast`, `plaintext-fast` etc ... [https://gitter.im/amberframework/amber?at=5b2faa79479ca266897b3deb]
<FromGitter> <faustinoaq> By example aspnet core: https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=fortune&l=hra0hp
<FromGitter> <faustinoaq> Also ulib (top fastest) is a great example: https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=json&l=hr8lxb
<FromGitter> <faustinoaq> For me TFB is already a benchmark game XD
<FromGitter> <faustinoaq> There are many unrealistic frameworks in TFB
<FromGitter> <faustinoaq> Even if they put "realistic" in the description 😅
<FromGitter> <faustinoaq> I have seen some "frameworks" in TFB with no documentation at all
<FromGitter> <faustinoaq> However, TFB is still a great benchmark to see how fast can be a language/tool on web world
<FromGitter> <faustinoaq> By example, in plaintext test you can see how incredibly fast (`7 million requests per second`) are some frameworks, they are even reaching the limit traffic allowed by an Ethernet card 😅
<FromGitter> <faustinoaq> > having 1 route per app or part of routes sounds like cheating, no? ⏎ ⏎ No 1 router app, but 2 groups of routes, something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5b2fadec7d3bca737a05cc38]
<FromGitter> <faustinoaq> Is well known that databases adapters on crystal still require a lot of performance enhancements 😅
prutheus has joined #amber
<prutheus> Hello. I want to use VUEjs with amber together. is this possible? Can I integrate the vue webpack to my amber application and use vue in my amber app?
<FromGitter> <faustinoaq> prutheus Yes, you can, an example project here: https://github.com/Ckarlos95/Stopify
<FromGitter> <faustinoaq> This ^^ project is using amber v0.6.7 but I this should work on v0.8.0 (with some minor changes and dependency updates, though) 😅
<prutheus> Cool, but it is not what i completely meant. This is just vue integrated in single pages, but what if I want to use a vue component from somewhere and so on? A vue project generated via vue-cli is more complex ... can this also get integrated into the app?
faustinoaq has joined #amber
<faustinoaq> prutheus, Amber is written in Crystal and Vue in JavaScript, What do you want to do? :)
<prutheus> I know. I want to develop my backend in amber/crystal but my frontend in vue. and then, i want to put the vue stuff into my aber app to have all together at the end.
<faustinoaq> Well, by convention we put all JS on `src/assets/javascripts`
<prutheus> yeah, you mean then all should work perfectly?
<faustinoaq> Well, that may not work for full modern JS apps written in tools like React/Vue/Ember, maybe we should use a separate front-end project or try to create a new `app/` folder in your project root
<faustinoaq> prutheus, Oh, I just remember we have a react recipe here: https://github.com/amberframework/recipes/tree/master/react
<prutheus> what is this recipe doing?
<faustinoaq> In theory, we should be able to create "recipes" flavors to include new tools and framework inside amber:)
<prutheus> nice, so we can do that for a vue app?
<faustinoaq> Yeah, this idea was introduced by @damianham but looks like something is wrong with this new feature, I already opened https://github.com/amberframework/recipes/issues/32 :)
<faustinoaq> For now you can try to download the zip file, decompress it and then: `amber new myapp --recipe /home/user/Downloads/react_preact_redux`
<prutheus> but i want to create a vue recipe. ... how is that getting done?
<faustinoaq> We still don't have a Vue recipe, but we can create a new one in the future ;-)
<faustinoaq> *we can create one in the future
<faustinoaq> sorry my English is bad ;-)
<prutheus> I would need that fast ... :/
<faustinoaq> prutheus Oh :/
<prutheus> any ideas?
<prutheus> what i should do now? I mean building such a recipe is not what i can do, its too complex yet
<prutheus> Well. I have checked the react recipe, i think a vue recipe can be easily built by orientating by react recipe
<FromGitter> <vlazar> @faustinoaq I have no idea how .NET works but isn't all separate tests use the same compiled dll? https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/CSharp/aspnetcore/aspcore-mvc-ado-my.dockerfile#L13
<FromGitter> <vlazar> isn't this similar to Crystal binary with all routes?
<FromGitter> <vlazar> > There are many unrealistic frameworks in TFB ⏎ > Even if they put "realistic" in the description 😅 ⏎ I think by "realistic" what they mean is just that test written in some framework uses approach you would normally see in this framework in production apps.
<FromGitter> <vlazar> So for Kemal that would be using routing...
<FromGitter> <vlazar> For Amber - using templates and so on...
<FromGitter> <faustinoaq> > I think by "realistic" what they mean is just that test written in some framework uses approach you would normally see in this framework in production apps ⏎ ⏎ In fact there are so many frameworks setups on TFB that are not "real" (never used in production apps), but they are possible and fast, so they do it!
<faustinoaq> @vlazar If ASPNET uses the same DLL then why they split all their tests?
faustinoaq has quit [Quit: IRC client terminated!]
<FromGitter> <vlazar> I don't know how ASPNET, but seeing same DLL in different docker files my guess is that this setup is similar to what we have in Crystal now.
<FromGitter> <vlazar> @faustinoaq What exactly do you mean by splitting tests? Having separate docker files like in ASPNET or something?
<FromGitter> <vlazar> Sorry, it's confusing.
<FromGitter> <vlazar> If you benchmarked splitting tests and it has noticeable effect on results then go for it. I'm not sure how to split tests and if this has any effect, but I do have other ideas of how to improve results a little bit which I will try and add to my PR into TFB with Crystal update.
<FromGitter> <faustinoaq> @vlazar Sorry for the confusion, My idea is totally subjective I haven't tested it yet, Sometimes I wish crystal to be faster in TFB 😅 , Thank for you collaboration!
<FromGitter> <vlazar> Ah, I see. I prefer not to touch infrastructural things. TFB benchmar results doesn't seem to be very stable across benchmark runs without any changes to implementations. So I focus more on implementation itself now.
wontruefree has joined #amber
prutheus has quit [Quit: Page closed]
wontruefree has quit [Ping timeout: 264 seconds]
faustinoaq has joined #amber
prutheus has joined #amber
<prutheus> faustinoaq are you still here?
<prutheus> @faustinoaq i would like to ask you something in PM
<faustinoaq> Hi prutheus :)
<FromGitter> <faustinoaq> @vlazar Besides openresty, I have seen many others frameworks applying some query tricks like openresty does ⏎ ⏎ Indeed OpenResty is 2X faster than Crystal Frameworks
<FromGitter> <faustinoaq> ^^https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=fortune&l=hma7en
<prutheus> @faustinoaq could you please join IRC so I can ask you PM?
<faustinoaq> I'm already on IRC prutheus :)
<prutheus> Hey faustinoaq , can you start PM please?
<faustinoaq> Done!
<FromGitter> <eliasjpr> @faustinoaq what are the query tricks implemented for openresty?
<faustinoaq> And not just openresty but many other frameworks on TFB do similar things
<FromGitter> <eliasjpr> It seems that is caching the queries
<faustinoaq> @eliasjpr Oh, I have seen that behavior on so many frameworks inside TFB, are they all cheating?
<FromGitter> <eliasjpr> Thats a question TFB
prutheus has quit [Quit: Page closed]
<faustinoaq> @eliasjpr Maybe that's why top frameworks on TFB are so fast :-P
<FromGitter> <eliasjpr> one way to confirm is if emulate the same optimizations
<faustinoaq> Oh, I didn't know nginx has a enterprise service https://www.nginx.com/products/pricing/
<faustinoaq> Maybe after Crystal & Amber 1.0 is out we can offer that as well :)
<faustinoaq> Then, some enterprise guys in my country can see Crystal & Amber as an alternative :D
marenz has quit [Ping timeout: 264 seconds]
faustinoaq has quit [Quit: IRC client terminated!]