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
<FromGitter> <anamba> ok, this is a good start, but doesn't go far enough for me. :-) plus, for whatever reason i still prefer ecr (ok, the reason is probably >20 years of writing html) i am going to see if i can implement ActiveSupport's output safety as a shard
<robacarp> @anamba I'm in a similar boat, slang is backwards to me. In html, everything is text unless otherwise specified. In slang, everything is a _tag_ unless otherwise specified. It's so confusing
<robacarp> ecr isn't my favorite either, and there hasn't been a haml implementation yet, so I just deal with it :<
<FromGitter> <anamba> hmm... has anyone written something like `sanitize` or do i have to do that part too? (retains whitelisted tags and attributes, everything else gone)
<FromGitter> <proyb6> We really need to build a sanitize in shard that will work across all projects, I suggest anyone can start it
<FromGitter> <anamba> hmm ran into an unexpected roadblock in String: ⏎ ⏎ ``` macro inherited ⏎ {{ raise "Cannot inherit from String" }} ⏎ end``` [https://gitter.im/amberframework/amber?at=5c13099e392d8c6f8e5a129d]
<FromGitter> <Blacksmoke16> whats the issue?
<FromGitter> <anamba> like it says :) i worked around it using `forward_missing_to`, but i wonder why that is in there
<FromGitter> <Blacksmoke16> well yea you cant inherit from it, what you trying to do?
_whitelogger has joined #amber
<FromGitter> <anamba> just wanted to add a `#.html_safe` that returns true. it's ok, i worked around it by creating a new class, and i'm almost done with the shard now. just having some trouble writing the specs... the `run` file thing for macros is very interesting, but also very strange
<FromGitter> <Blacksmoke16> you would do it by doing like
<FromGitter> <Blacksmoke16> ```class String ⏎ def html_safe ⏎ # do stuff ⏎ end ⏎ end``` [https://gitter.im/amberframework/amber?at=5c131385566a725e3a956511]
<FromGitter> <anamba> then i'd have to add a boolean property or something to it as well
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <anamba> whether it is safe or not
<FromGitter> <Blacksmoke16> well yea
<FromGitter> <Blacksmoke16> would have to include your logic into it, but wrapping it in the `class String` would make it available on all string types by default
<FromGitter> <anamba> i might have to go that route but for now it's working with this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c1314b2ca317a0e25c32d15]
<FromGitter> <Blacksmoke16> ok
<FromGitter> <anamba> i just thought it was odd that String explicitly prohibits me from subclassing it
<FromGitter> <drujensen> I saw conversation on crystal channel about inheriting from a core type as an anti pattern. I guess they prohibit this now?
<FromGitter> <drujensen> Interesting approach. Makes a very opinionated language.
<FromGitter> <anamba> it works! now i just need to fix my 100% broken, non-interactive lump of an app... https://github.com/anamba/safe_ecr
<FromGitter> <Blacksmoke16> nice one
<FromGitter> <Blacksmoke16> @robacarp Not real sure, it is possible to get annotations defined on the current method you're in
<FromGitter> <Blacksmoke16> i been playing around with making a router that will do auto type conversion into an action method like
<FromGitter> <Blacksmoke16> is pretty slick but still a lot to think about
<FromGitter> <anamba> i had been making some changes to `amber watch` lately for myself, and was preparing a PR, but then found this: https://github.com/amberframework/amber/pull/865 i'll take a closer look at that soon, over the weekend perhaps
<FromGitter> <anamba> and anyone who has a personal wishlist for `amber watch`, just let me know...
<FromGitter> <anamba> aww man what happened to this one https://github.com/amberframework/amber/pull/864 it looks nice
<FromGitter> <anamba> ok, read to the end. then i mean this one https://github.com/amberframework/amber/pull/991
<FromGitter> <anamba> oh, it was merged. so recently that i haven't encountered it yet. 😆
<FromGitter> <drujensen> @anamba The biggest ask for `amber watch` is that it is configurable so you can replace for example `npm` with `yarn` or your own flavor of js. It would be awesome if you take this on. The goal was to have the list of items to watch in the `.amber.yml` file.
<FromGitter> <anamba> ok, that makes sense. probably shouldn't be too hard
<FromGitter> <drujensen> There is a shard called https://github.com/arktisklada/crank that is a port of foreman. I don’t know if that would come in handy here
<FromGitter> <drujensen> I used to use foreman before I moved to docker for my projects
<FromGitter> <anamba> i figure i can probably work with the simple process management that's already in place
<FromGitter> <anamba> @Blacksmoke16 so i ran into some issues and tried to add methods to String. but i found that String is a VERY strange class. it does not seem to be an actual Crystal class at all.
<FromGitter> <anamba> which is probably why they don't want people subclassing it.
<FromGitter> <vlazar> > LLVM-relatived built-in types are declared as struct. They cannot be inherited.
feepbot has quit [Ping timeout: 268 seconds]
feepbot has joined #amber
<FromGitter> <drujensen> @vlazar thanks for the background on this restriction. I keep forgetting its not Ruby. ;-)