RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.0 | 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> <dscottboggs_gitlab> I was playing with some query building for a particular use case and got really frustrated because differently-named arguments with the same type don't create separate overloads, so `QueryBuilder(TableType).in(db).where "column", gt: 12345` becomes `QueryBuilder(TableType).in(db).where "column", :gt, 12345` which trashes type safety or `QueryBuilder(TableType).in(db).where "column",
<FromGitter> ... SQLOperators::GreaterThan, 12345` which isn't as nice
<FromGitter> <dscottboggs_gitlab> that reminds me of that bug in crystal-mysql that @girng found that I forgot to look at :/
<FromGitter> <Blacksmoke16> yea, syntax of how to set this up will be a big deal
<FromGitter> <Blacksmoke16> more i think about this im thinking i should separate the "limitor" and the "query"
<FromGitter> <Blacksmoke16> limitor being you where clause, and query being what columns, group by, distinct etc
<FromGitter> <dscottboggs_gitlab> like `where("column").sort_by("sortcol").gt(12345)`? because that's where I was headed
<FromGitter> <dscottboggs_gitlab> pretty sure the reason I didn't go full chainable in the beginning was because I didn't know whether to end with a final `exec` to get the result, make the result lazy (I.E. only execute when one of the access methods like `[]` were called), or to make it so you have to save a certain type of call for last. TBH I don't feel I have enough sql experience to know which would be best.
<FromGitter> <Blacksmoke16> my main problem with that syntax, how do you handle and/or logic?
<FromGitter> <Blacksmoke16> or multiple columns
<FromGitter> <dscottboggs_gitlab> exactly
<FromGitter> <dscottboggs_gitlab> that kinda eliminates the option of just saving a certain type of selector for last
<FromGitter> <dscottboggs_gitlab> OH
<FromGitter> <Blacksmoke16> im sure there is a use case for it, but way i look at it why make it lazy if you're just going to use it in the future?
<FromGitter> <Blacksmoke16> otherwise just dont query it
<FromGitter> <dscottboggs_gitlab> yeah, so `where("column").sort_by("sortcol").gt(12345).exec` if you don't want it to be lazy (or maybe some other method name besides `#exec` or accessors like `#[]`, `#first`, `#each` implicitly call exec
mps has left #crystal-lang [#crystal-lang]
<FromGitter> <Blacksmoke16> yea, can forward method calls to something else
<FromGitter> <dscottboggs_gitlab> or you could just call `#exec.each`
<FromGitter> <dscottboggs_gitlab> > yea, can forward method calls to something else ⏎ ⏎ would have to be an iterator over rows no?
dostoyevsky has quit [Quit: leaving]
<FromGitter> <Blacksmoke16> i mean that, like you said, when you call first or .to_a it executes the exec
<FromGitter> <dscottboggs_gitlab> ok cool I like it
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/0.27.0/Object.html#delegate(*methods,toobject)-macro
<FromGitter> <dscottboggs_gitlab> yes, I have used that ⏎ ⏎ OH SHIT I see what you mean, you could just `delegate :first, :each, etc..., to: :exec`
<FromGitter> <Blacksmoke16> ye
<FromGitter> <dscottboggs_gitlab> I hate when other languages are like "you can't do that because we want to make sure you understand what you're doing when you do that" like I know it's an extra function call (except it's gonna be inlined anyway so...) just let me have as many shortcuts as possible haha
<FromGitter> <Blacksmoke16> :p
<FromGitter> <Blacksmoke16> so what i got out of our talk so far:
<FromGitter> <Blacksmoke16> think im going to use the spec as the query builder
dostoyevsky has joined #crystal-lang
<FromGitter> <Blacksmoke16> going to make it general enough to not *have* to rely upon any orm but allow for it
<FromGitter> <Blacksmoke16> and focus on the querying then add features as i go, vs thinking about everything at once
<FromGitter> <Blacksmoke16> and crystal really needs a defined ORM api
<FromGitter> <Blacksmoke16> vs everyone doing their own thing :p
<FromGitter> <dscottboggs_gitlab> well then
<FromGitter> <Blacksmoke16> would make life much easier if you could develop features for stuff that all follow a standard spec
<FromGitter> <dscottboggs_gitlab> good luck
<FromGitter> <Blacksmoke16> :p
<FromGitter> <dscottboggs_gitlab> yes I agree
<FromGitter> <j8r> There are too much small ORMs in crystal
<FromGitter> <j8r> Everyone should team up to work on a proper spec
<FromGitter> <anamba> https://xkcd.com/927/
<FromGitter> <Blacksmoke16> xD
<FromGitter> <matthewmcgarvey> `Dir.cd` does not work well with fibers, don't know why I thought it would
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <j8r> @anamba i already knew what xkcd it'll be before even clicking on it :)
<FromGitter> <j8r> Seriously, omg http://crystalshards.xyz/?filter=orm
<FromGitter> <Blacksmoke16> Ikr?
<FromGitter> <Blacksmoke16> I'm making one too ^.^
<FromGitter> <Blacksmoke16> But will be cool and unique ;)
<FromGitter> <Blacksmoke16> Then my annotation world will be complete hehe
<FromGitter> <anamba> yes, i made one too (neo4j_model.cr), and may end up publishing one more (for couchdb) later this year. but it's because nosql databases can't really be shoehorned into an orm designed for sql
<FromGitter> <Blacksmoke16> And it shall be glorious
<FromGitter> <Blacksmoke16> That's a bit different than orm tho? More like an adapter?
<FromGitter> <Blacksmoke16> Like something that another orm could support
<FromGitter> <anamba> @Blacksmoke16 depends on how flexibly the orm is designed... none of the ones i've seen so far could work with a graph database
<FromGitter> <Blacksmoke16> Ah, graph DB
<FromGitter> <anamba> couchdb is document oriented (little bit like mongodb) but still has a LOT of quirks that make it hard to work within the confines of a typical ORM
<FromGitter> <Blacksmoke16> yea fair enough
<FromGitter> <Blacksmoke16> prob could be made in such a way to support other nosql db tho maybe?
<FromGitter> <anamba> maybe? they all have their quirks
<FromGitter> <Blacksmoke16> hrm
<FromGitter> <Blacksmoke16> oh well
<FromGitter> <anamba> at least the sql-based RDBMS all have that in common (sql). well... my neo4j ORM uses the Cypher query language, and there's at least one other db out there that uses Cypher, so it should work in theory?
<FromGitter> <Blacksmoke16> possibly
<FromGitter> <Blacksmoke16> hard to say w/o geting into it
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
<FromGitter> <bew> @dscottboggs_gitlab what do you mean at https://gitter.im/crystal-lang/crystal?at=5c4ba37e8aa5ca5abf3109b1 when you say that different named args with same types is same overload? If i understand you correctly, this is wrong, it should give 2 separate overload, otherwise it's a bug!
<FromGitter> <dscottboggs_gitlab> Oh, really?
<FromGitter> <dscottboggs_gitlab> let me see if I saved that in version control, if not I'll write up an issue ASAP
<FromGitter> <bew> If you can make a repro code, i'll tell you
<FromGitter> <bew> You have 5min before i sleep ^^
laaron has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> it can wait til tomorrow if you're tired hahah but I'm working on it
<FromGitter> <dscottboggs_gitlab> ohhh! I think I know what I did
<FromGitter> <dscottboggs_gitlab> If I recall correctly it was as simple as ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4bea31454aad4df7a37201]
<FromGitter> <bew> So?
<FromGitter> <dscottboggs_gitlab> IIRC (looking it up now) in the second form only the last-defined version survived
<FromGitter> <bew> If so it's a bug to me
<FromGitter> <dscottboggs_gitlab> oh that's really great to hear. go to bed, I'll see what happens and raise an issue and ping you with it if that's the case
<FromGitter> <bew> 👌 zzzz
<FromGitter> <dscottboggs_gitlab> sweet dreams!
<FromGitter> <dscottboggs_gitlab> @bew https://github.com/crystal-lang/crystal/issues/7337
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @girng are you around?
rohitpaulk has joined #crystal-lang
<FromGitter> <girng> @dscottboggs_gitlab i replied i found a query that worked, created my unsigned int :D
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 250 seconds]
ashirase has quit [Ping timeout: 245 seconds]
ashirase has joined #crystal-lang
<FromGitter> <bew> @dscottboggs_gitlab actually it's not a bug, sorry for mis guidance, i shouldn't reply to gitter when sleeping x) (see the issue)
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <proyb6> Whether you guys want HTTP/2 on Crystal?
<FromGitter> <bew> Iirc ysbadadden has a wip implementation of http2
<FromGitter> <girng> see comments. how can i do something like that?
<FromGitter> <bew> Really?? The return returns from handle_chat_check not from handle_lobby
<FromGitter> <r00ster91> You can fix it by changing `handle_chat_check` to a macro
<FromGitter> <girng> @bew yah maybe was thinking of a macro of the return lol
<FromGitter> <bew> If you really want to make it work, a macro will 'paste' the return inside handle_lobby and work as you expect..
<FromGitter> <girng> okay gonna try the macro way
<FromGitter> <r00ster91> no, I would avoid using macros, I would go this way: https://play.crystal-lang.org/#/r/63gk
<FromGitter> <girng> update: https://play.crystal-lang.org/#/r/63gt
<FromGitter> <girng> i'm going to pass int he referenceof my client to the check method
<FromGitter> <girng> but i want to use handle_chat_check(client) in more methods
<FromGitter> <girng> okay now i tried the macro and it errors out...
<FromGitter> <girng> but on my previous example, i replaced def with macro and it worked
<FromGitter> <girng> i think i got it!
<FromGitter> <proyb6> @bee I tried his HTTP2 has few errors, need update
<FromGitter> <proyb6> @bew I tried his HTTP2 has few errors, need to fix for Crystal 0.27
<FromGitter> <proyb6> One which ```in src/stream.cr:281: undefined constant Scheduler```
DTZUZO_ has quit [Ping timeout: 240 seconds]
<g-> I'm trying to clear my terminal using Process.run("clear", shell: true). The returned status indicates success but the terminal is not cleared. Any idea?
<FromGitter> <r00ster91> use `system()` for invoking system commands
<g-> works, thanks
<FromGitter> <girng> am i doing it right? https://play.crystal-lang.org/#/r/63hj/edit
<FromGitter> <r00ster91> you just want to remove the "/me "? I think this would be faster: https://play.crystal-lang.org/#/r/63hr/edit ⏎ it avoids an array creation because there's no `.split(" ")`
<FromGitter> <girng> actually, why does this cause an error? https://play.crystal-lang.org/#/r/63hv `message.split(" ")[0] ` shouldn't be true?
mps has joined #crystal-lang
<FromGitter> <girng> @r00ster91 yah. only if /me is there
<FromGitter> <r00ster91> there's no space in "ggg" so `split(" ")` returns an empty array and an empty array doesn't have any elements. So `[0]` raises an IndexError
<FromGitter> <girng> but the local variable checks against that indexError in the if statement though?
<FromGitter> <r00ster91> actually, no. It's because in `message[4..message.size]` you are trying to start from the 4th position of "ggg". That's why you get the error
<FromGitter> <girng> if it's an IndexError, it's false, so that means local variable wouldn't be able to work, so the if statement should fail?
<mps> RX14: can the crystal be built with llvm7
<RX14> no
<RX14> i tried to get it to work but it just segfaulted on codegen
<RX14> then i went to sleep and didnt pick up debugging it
<FromGitter> <r00ster91> @girng that doesn't have anything to do with the local variable you are defining in the if statement
<mps> and, what is plan for next release, build with llmv6?
<RX14> well the current release supports LLVM 3.9 all the way up to 6
<RX14> and unless anything changes the next release will too
<FromGitter> <girng> @r00ster91 i was just thinking because if you do if hey = hash[key]? and if the key doesn't exist, it will fail (if statement) it doesn't raise an error
<FromGitter> <r00ster91> yes
<mps> thanks for explanation. I'm messing with llvm upgrade on Alpine so wanted to get info firsthand
<mps> and keep multiple versions in distro is nearing some kind of nightmare
<RX14> arch does it fairly succesfully
<RX14> by keeping an llvm6-libs and llvm-libs:7.0.0-1 and they dont conflict
<RX14> and then having the main llvm package with all the tools cliflict between the two
<RX14> and crystal is makedep llvm6 and dep llvm6-libs
<mps> arch have more manpower and less architectures and is glibc based, so it easier
<FromGitter> <girng> @r00ster91 gonna go with your `index` way, thx
<mps> in the next alpine crystal will be also makedepends on llvm6
<mps> RX14: good, we will see what to do regarding llvm. to have multiple versions or 'linear' upgrade. thanks again
<RX14> When's the decision point?
<RX14> I might put some effort into debugging LLVM7 again
<mps> there is no fixed time yet, we talked about it few days ago but didn't decided anything yet. probably we will discus it more in few next weeks
<mps> I prepared llvm6 and looking to llvm7 these days
<mps> next stable v3.9 (which will be released in a few days, I hope) will have llvm5
<mps> and we have a month or two to see what to do with llvm upgrade
<RX14> ok, thanks
<mps> RX14: thank you for the help to have crystal, and to have it in Alpine Linux
<RX14> :)
<FromGitter> <Blacksmoke16> @girng what are you trying to do?
DTZUZO_ has joined #crystal-lang
<FromGitter> <kingsleyh> I’ve been live streaming my crystal dev for my game here: https://m.twitch.tv/guardiansofaxum/videos
rohitpaulk has joined #crystal-lang
pabs has quit [Ping timeout: 250 seconds]
pabs has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <drum445> @kingsleyh will keep an eye out for your streams
<FromGitter> <girng> @kingsleyh damn you are a code warrior
sevensidedmarble has quit [Ping timeout: 245 seconds]
<FromGitter> <kingsleyh> @girng hahaha thanks :)
<FromGitter> <kingsleyh> I'm streaming every evening 9pm GMT onwards
<FromGitter> <girng> @kingsleyh you code subconsciously, just writing away like you are typing a novel. that's what aspire to do with crystal. i can do it partially, but not as fluid as you. i still need more practice and knowledge :)
<FromGitter> <Blacksmoke16> better update your name then
<FromGitter> <Blacksmoke16> `I'mAAlmostHoplessDev` ;)
<FromGitter> <girng> although, i can do it with a tcpserver and tcpsocket, but that's just cause i've wrote it out so many times lol. and crystal's wrapper for it is insanely simple lmao
<FromGitter> <kingsleyh> hahah!!!!
<FromGitter> <girng> @Blacksmoke16 😆 iuno, this name reminds me of oprypin too much i don't think i'll ever change it
<FromGitter> <Blacksmoke16> xD, fair enough
<FromGitter> <drum445> Looks like a good project structure
<FromGitter> <girng> @Blacksmoke16 trust me, when i read my new name, i just think of all the times oprypin has facepalmed himself in chat over my arrogance, and then, i stride to do better. so in reality, it's actually helping lol.
<FromGitter> <Blacksmoke16> yea man, just keep at it
<FromGitter> <drum445> What's the concept for your game sir?
<FromGitter> <girng> @kingsleyh i do have a question because at around 2 hours in on your latest stream, i do my way so differently. for example at 2:01:17, you use `describe` and `it`. ⏎ my code would be like just like a `results = db.query_one ("SELECT username from accounts where email = ? ")` or whatever and if user was found, return it. ⏎ ⏎ but your code is like result.should be_a(), result.value.as(User), etc. it's
<FromGitter> ... like a totally new language to me [https://gitter.im/crystal-lang/crystal?at=5c4c9df041775971a08a47b8]
<FromGitter> <Blacksmoke16> thats for writing tests
<FromGitter> <girng> tests for ?
<FromGitter> <Blacksmoke16> his app? :p
<FromGitter> <kingsleyh> That's because in my case I'm using RethinkDB and I wrap the result in a DB::Success(T) or DB::Failure - so the be_a is to check that it's a DB::Success etc
<FromGitter> <Blacksmoke16> you know so to make sure things return what he expects and such
<FromGitter> <girng> wtf lol
<FromGitter> <girng> @kingsleyh interesting
<FromGitter> <kingsleyh> also the DB:Succcess and DB::Failure are structs with a value - and since the contents are generic e.g. T - I have to say value.as(theType)
<FromGitter> <Blacksmoke16> @girng you havent been writing tests for your stuff? 😱
<FromGitter> <girng> no i just check if results is not null, and user is found.. lol
<FromGitter> <girng> i've never heard of this test thing until now. but @kingsleyh writes it all out like he's writing a damn book
<FromGitter> <Blacksmoke16> sec
<FromGitter> <drum445> Yeah tests are quite important
<FromGitter> <drum445> I don't rate tdd though
<FromGitter> <kingsleyh> I usually to TDD (Test Driven Development) where you write the spec first and then make the code that will make the spec pass
<FromGitter> <kingsleyh> however in my videos here - I'm going for speed as it's a prototype - so I'm going light on testing
<FromGitter> <girng> i see, my first time hearing that term hahaha
<FromGitter> <drum445> We tried implementing it once, it never works
<FromGitter> <drum445> Unless it's a solo project
<FromGitter> <kingsleyh> TDD is one engineering practice from an Agile development method called Extreme Programming
<FromGitter> <girng> when i think of test, i think of open beta LOL
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/63jq
<FromGitter> <Blacksmoke16> you write tests to assure that a given method/piece of code is working as you expect
<FromGitter> <kingsleyh> at work we pair - so one person navigates and one person drives and usually we swap over for each test - so I write a test and my pair makes it pass and then swap etc
<FromGitter> <Blacksmoke16> this way if you go back and edit that method you can be confident that nothing broke
<FromGitter> <kingsleyh> but I can't pair on twitch - so I have to do all the work hahah
<FromGitter> <Blacksmoke16> which is super vital the larger your app gets, as there is no way to manually test large apps after every change
<FromGitter> <drum445> Not bad, sounds like you'd half your velocity though
<FromGitter> <drum445> @Blacksmoke16 test in production mate; no fear
<FromGitter> <Blacksmoke16> yolo :p
<FromGitter> <girng> that's my motto
<FromGitter> <Blacksmoke16> whats the worse that can happen? /s
<FromGitter> <kingsleyh> you increase team communication so everyone can pick up work - rather than a few people knowing one area well - so in the long run it increases velocity
<FromGitter> <kingsleyh> and also it's easier to solve problems with 2 heads - so mostly the solutions are better
<FromGitter> <drum445> We didn't see that, had about 20 devs on project at one point. Pair programming wouldn't have worked for our team. Glad it did for you though
<FromGitter> <girng> @Blacksmoke16 i see, part of `spec`
<FromGitter> <kingsleyh> yeah pair programming only works when all the devs can get along and pair well together - the largest team I did pair programming on was about 15
<FromGitter> <girng> yah i don't think that's gonna be required in my project anytime soon lmao
<FromGitter> <drum445> and half of the devs when asked to write unit tests, ending up writing integration tests....
<FromGitter> <drum445> tightly coupled to data in a db, sad times
<FromGitter> <Blacksmoke16> @girng 😐
<FromGitter> <kingsleyh> it comes with experience :)
<FromGitter> <drum445> indeed
<FromGitter> <drum445> @girng anything that involves business logic or processing - especially calculations - I'd advise writing a test
<FromGitter> <girng> i agree
<FromGitter> <Blacksmoke16> start with the simple ones, pays off in the long run
<FromGitter> <drum445> Red, Green, Refactor is a popular pattern people use if you're interested in getting into test
<FromGitter> <kingsleyh> it's good to write tests when you write the code - otherwise you rarely come back later and do it - and also if you do a big refactor you can have confidence since you know if you broke anything because the tests tells you - and then you can have Continuous integration too and a whole deployment pipeline and cool devops stuff
<FromGitter> <Blacksmoke16> mhm
<FromGitter> <drum445> Aye, that's what we do @kingsleyh
<FromGitter> <kingsleyh> sounds good :)
<FromGitter> <kingsleyh> I worked for a company called Thoughtworks and I got indoctrinated into Agile and testing etc early in my career - so now it's second nature
<FromGitter> <girng> nice
<FromGitter> <drum445> Good stuff, yeah we've been using it for the last years on our latest project version
<FromGitter> <drum445> Had to do a rewrite so we went with agile (we used waterfall before)
<FromGitter> <girng> i think i'm a contrarian programmer
<FromGitter> <kingsleyh> I think everyone should learn to code at some level - it's becoming a life skill - you don't really need to be super awesome at it either to have fun and get stuff done
rohitpaulk has joined #crystal-lang
<FromGitter> <drum445> @girng I'm the same man, I'm always suspicious of new tech - I am a conservative after all ;)
<FromGitter> <kingsleyh> some people are super anal and will argue with you about their point of view and what's 'good practice' etc - but at the end of the day - do it how you like and learn from it - it's your free time after all so I think it's fine - as long as you aren't programming life critical systems etc - do it anyway you like :)
<FromGitter> <girng> @kingsleyh sounds like me talking about vue.js 😆
<FromGitter> <kingsleyh> heheh
<FromGitter> <drum445> is crystal format available in atom like it is sublime?
<FromGitter> <girng> @drum445 i'm the same
<FromGitter> <drum445> Sublime is being a shit for me recently
<FromGitter> <girng> ed are you on windows?
<FromGitter> <kingsleyh> @drum445 I use Atom and the format works fine yes
<FromGitter> <girng> is it cutting the text in half randomly on save? i had that issue on the sublime crystal plugin. i switched to vscode
<FromGitter> <drum445> @girng nah I use Xubuntu 18.04 atm
<FromGitter> <r00ster91> @drum445 why? for me sublime works very well
<FromGitter> <drum445> @kingsleyh does it work on save, or is there a keybinding. Can't seem to get it to work
<FromGitter> <drum445> @r00ster91 it's my fave editor by far, but on certain DEs (LXDE/LXQt) it keeps crashing. It's a known bug but they haven't fixed it yet
<FromGitter> <kingsleyh> @drum445 I have a mac - and it's Option+Command + L for me (but I have Intellij shortcuts turned on and also I have auto save turned on)
<FromGitter> <r00ster91> oh I believe they are working on their new thing called Sublime Merge right now so they don't have time for that
<FromGitter> <j8r> LXQt 0.14.0 out :D
<FromGitter> <drum445> It sure is
<FromGitter> <drum445> You used it yet lol?
<FromGitter> <j8r> Yes, on Manjaro and Lubuntu
<FromGitter> <drum445> Yeah, Lubuntu is my daily driver at work
<FromGitter> <drum445> Have you had the sublime issues on Lub?
<FromGitter> <j8r> I use Geany to dev Crystal
<FromGitter> <drum445> ah fair
<FromGitter> <drum445> Geany is great too
<FromGitter> <j8r> It's likely I'm the only one on earth doing that – lol
<FromGitter> <drum445> @kingsleyh any chance I can see your repo code please?
<FromGitter> <drum445> @j8r haha, you never know
<FromGitter> <j8r> @kingsleyh yes, TDD is IMO better suitable for already built, enough large projects
<FromGitter> <drum445> indeed
<FromGitter> <j8r> On small ones when protyping, testing takes too much time for the gains – and usually we rewrite them several times as the architecture change :/
<FromGitter> <drum445> "architecture changes" - I feel that pain
<FromGitter> <j8r> I don't know how it's called doing code + tests at the same time
JuanMiguel has joined #crystal-lang
<FromGitter> <j8r> @drum445 you use lxqt also at home?
<FromGitter> <girng> g2g run errand 4 mom. be back
JuanMiguel has quit [Quit: Saliendo]
<FromGitter> <Blacksmoke16> @dscottboggs_gitlab https://play.crystal-lang.org/#/r/63jw got most where operators done
<FromGitter> <Blacksmoke16> well missing the `WHERE` but is getting there :p
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/63k0 updated to show how blocks work as well
<FromGitter> <drum445> @j8r yeah
<FromGitter> <drum445> also xfce
<FromGitter> <drum445> do you?
<FromGitter> <j8r> i had xfce in the past
<FromGitter> <j8r> it was great, very customizable
<FromGitter> <j8r> nowadays I prefer LXQt
rohitpaulk has quit [Ping timeout: 250 seconds]
<FromGitter> <drum445> Damn, same here
<FromGitter> <j8r> I prefer Qt over GTK, LxQt development pace and technologies are more exiting too for me
<FromGitter> <j8r> there are nice KDE elements like Kwin, Falkon, Breeze Dark Theme :)
<FromGitter> <j8r> Why GNOME has more supporters than KDE? unfair 😢
<FromGitter> <drum445> haha true, I never got on with the Plasma desktop though
<FromGitter> <drum445> Do you run LXQt on Ubuntu or Arch?#
<FromGitter> <j8r> lubuntu and manjaro
<FromGitter> <j8r> my dream would be on alpine
<FromGitter> <AmberSaber> i like openIndiana
<FromGitter> <j8r> arch based distros are more customizable, (AUR!), but slower than Debian based (apt and /bin/dash are fast). So, it's on par
<FromGitter> <AmberSaber> Discussing the operating system and desktop environment is just as boring as talking about programming languages. It’s endless.
<FromGitter> <j8r> yeah, I don't care about OS
<FromGitter> <j8r> just wan something as simple as possible - Alpine or OpenBSD :)
<FromGitter> <drum445> Simplicity is all I want tbh
<FromGitter> <j8r> exactly, same!
<FromGitter> <drum445> I usually stick with ubuntu on the desktop as that's what we use on servers
<FromGitter> <drum445> And I'm not cool enough for Arch
<FromGitter> <j8r> I've NEVER understood why Ubuntu on servers
<FromGitter> <j8r> why not use Debian?
<FromGitter> <drum445> Who knows lol
<FromGitter> <drum445> Debian would suffice
<FromGitter> <j8r> less bloat
<FromGitter> <drum445> Yeah it really does
<mps> j8r: Adelie is Alpine based and have LxQt, I think
<FromGitter> <j8r> Yes you told me
<FromGitter> <j8r> but that's not alpine based
<mps> It is, some kind of
<mps> it is musl, apk, abuild and a lot of things like Alpine
<FromGitter> <j8r> I'll check it out then :)
<mps> but not sure if they have crystal, didn't looked thoroughly
<mps> Voild Linux is also small and fast but x86_64 only
<mps> but, if you could 'live' with xfce Alpine is ready
<FromGitter> <AmberSaber> A few years ago, I often changed the operating system, I want to find one of the coolest and the best. But I am not satisfied with one. I can always hear different opinions from others. Then I went to try, which wasted my countless hours. Because the best system is always next
<FromGitter> <drum445> haha well said
<oprypin> so many people end their search on Arch
<FromGitter> <drum445> does it differ a lot to deb?
<FromGitter> <j8r> @AmberSaber yes, having something working is the most important
<oprypin> j8r, what exactly is wrong with Ubuntu on servers?
<FromGitter> <j8r> @oprypin it adds nothing but boat compared to "vanilla" Debian
<oprypin> whenever i notice a difference between them, it's for the best
<oprypin> more pragmatic approach to the available software, fresher versions
<FromGitter> <j8r> useless thing in server like snap, ppas, fancy packages...
<oprypin> in Ubuntu
<oprypin> how is ppa useless, lol
<FromGitter> <j8r> 99% on a well configured, secure and minimal server - yes
<FromGitter> <AmberSaber> I just want to improve my programming skills and English level.
<FromGitter> <j8r> @AmberSaber you could read programming documentation/articles then :)
<FromGitter> <j8r> mps I'll try Adelie when I install a new PC!
<FromGitter> <j8r> do you use it, you children?
<FromGitter> <AmberSaber> Yes, I need to read a lot.
<FromGitter> <AmberSaber> And practice
<FromGitter> <drum445> I'm trying to think of a project idea
<FromGitter> <drum445> I just can't come up with one :(
<mps> j8r: no, my wife and daughter use Alpine with xfce, but son is on debian
<FromGitter> <AmberSaber> But the Linux distribution I used at the beginning was deepen.
<mps> I have Alpine on servers and a few workstations, x86_64, arm64 and arm32
<FromGitter> <j8r> deepin? My parents have it, nice for non technical people
<FromGitter> <drum445> Deepin is Qt isn't it?
<FromGitter> <j8r> @drum445 deepin is qt, html, js, gtk, everything - it's bloated
<FromGitter> <j8r> but very fancy and noob-friendly
<FromGitter> <drum445> ah right, nice
<FromGitter> <j8r> yes mostly Qt
<FromGitter> <AmberSaber> Yes, at the beginning, am I not a beginner?
<FromGitter> <j8r> mps do they "use" it, with you as support, or do they Use(TM) it - as their own?
<FromGitter> <j8r> I mean - with no help
<FromGitter> <AmberSaber> However, in my experience, using Linux will get a lot of help. And everyone is friendly, though maybe they don’t understand anything.
<mps> well, wife just 'use it as installed' but daughter is a IT student and she work with it, installing, upgrading and what students works with their machines
<mps> and, no, help is rarely needed
<mps> sorry, my bad English, help is rarely needed
<FromGitter> <j8r> no need to say sorry mps, better than mine
<FromGitter> <AmberSaber> Envy you have a wife and daughter
<FromGitter> <AmberSaber> bye, good night
<FromGitter> <j8r> 👍 looks like a nice geek family!
<mps> I was on Debian more than 20 years, and about year ago fully switched to Alpine, it is pleasure. small, simple and (relatively) secure
<mps> yes, that was not intention but a some coincidence, wife worked as a IT professor, I work 'on computers' about thirty years, son is programmer and daughter want to be
<mps> although I tried to give advice to children to seek something better but they didn't listen to advice, as is usual with children :)
<FromGitter> <AmberSaber> How old are you, how old is your daughter?
<mps> AmberSaber: you ask me?
<FromGitter> <AmberSaber> I have not been married yet.
<FromGitter> <AmberSaber> yeah
<mps> 59
<FromGitter> <AmberSaber> 59 years old still programming?
<mps> why not, it is the best 'mental gymnastic'
<FromGitter> <AmberSaber> Programming is harmful to vision
<FromGitter> <j8r> no
<FromGitter> <j8r> if you go enough outside for natural sun lights, and don't be behind a screen too much - we are good
<mps> I have clear vision without any glasses and I'm behind computer screen about ten hours daily last thirty years
<mps> maybe more than thirty, but shhhh ;)
<FromGitter> <j8r> what's sure - eyes got tired if they are focusing a point too close
<FromGitter> <Blacksmoke16> otherwise thats why the invented glasses :p
<FromGitter> <Blacksmoke16> they*
<FromGitter> <r00ster91> I think what's harmful for the eyes is when you look at the computer screen with the brightness always on the maximum. My eyes used to burn in the morning because of that
<FromGitter> <AmberSaber> I thought at first that you are all in your twenties, I don’t know the world outside of China.
<mps> well, I understand that a lot of programmers have vision problems, but not sure if that solely cause is screen, there must be some orher factors but I'm not biologist to tell more about that
<FromGitter> <j8r> yep
<mps> AmberSaber: no problem, I feel like I'm a lot younger and actually most of my friends are bellow 40
<FromGitter> <j8r> the most important is to not forget to go outdoor when young!!
<FromGitter> <Blacksmoke16> whats that? :P /s
<FromGitter> <drum445> Graphics are poor
<mps> Blacksmoke16: that is something most people do looking through windows ;)
<mps> but, yes, we programmers should take some care about our health and try to be more physically active, if and when time allow
<FromGitter> <Blacksmoke16> its scary out there
<FromGitter> <AmberSaber> When I was a child, my English teacher told me that Westerners hate people asking about their age and family situation.
<FromGitter> <AmberSaber> But I have already asked the ages of several people, as if you are not disgusted.
<mps> AmberSaber: westerners are different, as probably other are
<mps> and your teacher have seen just small part of the west, I presume
<FromGitter> <AmberSaber> I don't know, she may be get it from the book.
<FromGitter> <AmberSaber> The book is full of lies
<mps> well, the books are also different, like people. there are bad books and good books ...
<FromGitter> <AmberSaber> In the book, Westerners are always so wise and warm. It may be related to the disintegration of the Soviet Union, and many people's values have changed.
<mps> don't take it to heart, we have similar perception about Chinese, they are always wise and have great wisdom :)
<mps> and you know what is reality :)
<FromGitter> <AmberSaber> But after I understand the concept of open source, especially GNU, I feel that communism is possible.
<FromGitter> <AmberSaber> 😄
<mps> AmberSaber: don't want to go to politic/ideology on programmers channel, and I have to work. in front of me is llvm6, clang and rust for the next Alpine edge
<FromGitter> <AmberSaber> Discussing programming is the most enjoyable thing in the world. But my programming skills are not enough
<FromGitter> <AmberSaber> thanks
<FromGitter> <bajro17> Hello I try this shard for rethinkdb and it work well
<FromGitter> <bajro17> just how to display on page real time data am I must use websockets or there is other way?
<mps> ok, I'm not against different themes but programming channels are for programming
<mps> AmberSaber: it was pleasure to chat with you. And I like Chinese ancient culture and books especially Lao Tse
<FromGitter> <AmberSaber> In fact, there is also a person like Laozi in ancient Greece.
<mps> and Shan Yan, and Sun Tsu (or Tse)
<FromGitter> <AmberSaber> Diogenēs
<mps> No, Lao Tse and Diogenes are totally different
<mps> I 'know' both
<FromGitter> <AmberSaber> But of all the philosophers, only Han Fei was successful.
<mps> huh, where we go? :) next time about them, maybe.
<FromGitter> <AmberSaber> Diogenes is more like Laozi’s student, Zhuang Zhou
<FromGitter> <j8r> Linus Torvalds is a wise one, with temperate words
<FromGitter> <Blacksmoke16> well, figured out a way to alter the select portion
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/63kq
<mps> ah, Zhuang Zhou, nearer, yes but not near
<FromGitter> <j8r> @Blacksmoke16 do you know you can `join` to an io?
<FromGitter> <Blacksmoke16> do what now?
<FromGitter> <j8r> (line 117)
<FromGitter> <j8r> `end.join " #{@operator} ", str`
early has quit [Quit: Leaving]
<FromGitter> <j8r> just a little unrelated note :)
<FromGitter> <Blacksmoke16> hold on, i dont get it
<FromGitter> <Blacksmoke16> oh
<FromGitter> <AmberSaber> There is an American, his name is Bill Porter. He knows Laozi’s philosophy better than most Chinese.
<FromGitter> <j8r> this avoids creating an intermediary string
<FromGitter> <Blacksmoke16> ah instead of the `str << @members.map...`
<FromGitter> <Blacksmoke16> nice
<FromGitter> <Blacksmoke16> thanks
<mps> AmberSaber: don't want to be impolite to you, but we should stop chating about philosophers here
<FromGitter> <Blacksmoke16> probably work on joins next...
<FromGitter> <j8r> this is https://crystal-lang.org/api/master/Enumerable.html#join%28separator%2Cio%29-instance-method
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cc4ce7b68f94102228841]
<FromGitter> <Blacksmoke16> 💯
<FromGitter> <j8r> ideally, the best would be to avoid creating an intermediary Array - just do a `.each`
<FromGitter> <j8r> instead of map
<FromGitter> <Blacksmoke16> mm array is nice because the join handles not adding one to last element
<FromGitter> <Blacksmoke16> prob not going to be a big diff perf wise
<FromGitter> <j8r> likely not
<FromGitter> <j8r> but this optim is quite simple
<FromGitter> <j8r> I like simple optimizations :)
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cc5b29221b9382dc7eb8f]
<FromGitter> <Blacksmoke16> but would then need some logic to prevent it from doing like `WHERE ( AND s.val IN (1,'bar') AND (s.admin = 1 OR s.age >= 123 OR ) AND );`
<FromGitter> <j8r> sec
<FromGitter> <Blacksmoke16> which you could do with each_with_index and like `(@members.size - 1) != idx`
<FromGitter> <Blacksmoke16> but at that point is it that much faster to make it worth it over the .join?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cc65a9221b9382dc7efda]
<FromGitter> <Blacksmoke16> i made it cleaner
laaron has quit [Ping timeout: 256 seconds]
<FromGitter> <j8r> it implement the join directly
<FromGitter> <j8r> I've digged on this optimization quite deep when I wrote CON conf format
<FromGitter> <Blacksmoke16> :thinking:
<FromGitter> <j8r> It avoids creating an Array, including multiple intermediary strings
<FromGitter> <j8r> maybe you could also use https://crystal-lang.org/api/master/Enumerable.html#join%28separator%2Cio%2C%26block%29-instance-method
<g-> Is my call to super not actually calling initialize in my parent class? https://play.crystal-lang.org/#/r/63lf
<FromGitter> <Blacksmoke16> `@members.join(" #{@operator} ", str) { |m, io| @select = m.modify if m.is_a?(Select); io << ((spec = m.get_spec) ? spec.get_filter : m.get_filter) }`
<FromGitter> <j8r> perfect 👍
<FromGitter> <Blacksmoke16> is printing an `AND` at the beginning for some reason
<FromGitter> <j8r> snap
<FromGitter> <j8r> (i never use this overload before)
<FromGitter> <Blacksmoke16> `WHERE ( AND s.val IN (1,'bar') AND (s.admin = 1 OR s.age >= 123));`
<FromGitter> <Blacksmoke16> which im thinking is because of the Select
<FromGitter> <Blacksmoke16> when it goes to join
<FromGitter> <Blacksmoke16> but this was a problem using map i see now also...
<FromGitter> <Blacksmoke16> so it'll work just have to think how to handle this
<FromGitter> <Blacksmoke16> would have to filter out `Select` i guess
<FromGitter> <Blacksmoke16> `@members.reject { |mem| mem.is_a?(QueryModifier) }.join(" #{@operator} ", str) { |m, io| @select = m.modify if m.is_a?(Select); io << ((spec = m.get_spec) ? spec.get_filter : m.get_filter) }`
<FromGitter> <Blacksmoke16> :shrug:?
<FromGitter> <Blacksmoke16> OR
<FromGitter> <Blacksmoke16> better idea
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4ccc49975714406b480bf3]
<FromGitter> <Blacksmoke16> separated it out into its own param
<FromGitter> <matthewmcgarvey> I'm having a ton of trouble requiring local files. So my file structure is: ⏎ ⏎ ```src.cr ⏎ src/ ⏎ helper.cr``` ⏎ ⏎ and in my `src.cr` i have `require "./src/*"` and it fails to compile. What am I doing wrong? [https://gitter.im/crystal-lang/crystal?at=5c4cccee78e1ed41039448a5]
<FromGitter> <Blacksmoke16> g- your parent class doesnt have any params in its initalizer
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/63li
<FromGitter> <Blacksmoke16> whats the error @matthewmcgarvey
<FromGitter> <Blacksmoke16> you should prob put your main src field in the src directory as well
<FromGitter> <matthewmcgarvey> I changed the file names in my above message, heres the actual error: ⏎ `while requiring "./apohenia/lexer.cr": can't find file './apohenia/lexer.cr' relative to '/Users/matthew/workspace/crystal/apophenia/src'`
<FromGitter> <matthewmcgarvey> In my main file i have `require "./apohenia/lexer.cr"` but I've tried it all the ways in the cos
<FromGitter> <Blacksmoke16> i think you're structure is just borked
<FromGitter> <Blacksmoke16> normally you have your main src file under `src/`
<FromGitter> <Blacksmoke16> then in that directory you have a sub folder that holds your apps files
<FromGitter> <Blacksmoke16> then in the main src file can just do `require "./MyApp/**`
<FromGitter> <Blacksmoke16> or file by file or what have you
<FromGitter> <matthewmcgarvey> ugh, i had a type
<FromGitter> <matthewmcgarvey> *typo
<FromGitter> <Blacksmoke16> that would do it too :p
<FromGitter> <j8r> don't know why there is `**` allowed in requires
<FromGitter> <j8r> that was a bad idea
<FromGitter> <Blacksmoke16> :p
<FromGitter> <drum445> Adding a protected! method to a kemal app that looks like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cce828aa5ca5abf380f59]
<FromGitter> <Blacksmoke16> prob better to just use the halt macro?
<FromGitter> <drum445> but I am getting the following error: ⏎ ⏎ ```get "test/" |env| ⏎ protected! env ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5c4cceacca428b0645088881]
<g-> Blacksmoke16: thanks. I didn't know I could initialize a property like that.
<FromGitter> <Blacksmoke16> np
<FromGitter> <Blacksmoke16> @drum445 yea your closing the response body but kemal is still trying to write to it
<FromGitter> <drum445> @Blacksmoke16 I get an `Invalid next` error when I try the halt :(
<FromGitter> <Blacksmoke16> :thinking: really?
<FromGitter> <Blacksmoke16> what version you on?
<FromGitter> <drum445> Yeah it's outside the route block
<FromGitter> <drum445> halt works fine when inside
<FromGitter> <Blacksmoke16> well yea, why would you want to call it outside?
<FromGitter> <drum445> so I can add protected! to routes that need auth
<FromGitter> <drum445> without having to write the same if in each one
<FromGitter> <Blacksmoke16> ah like in a handler?
early has joined #crystal-lang
<FromGitter> <drum445> yeah kinda
<FromGitter> <matthewmcgarvey> Do channels block until they've been received?
<FromGitter> <matthewmcgarvey> You can only put one thing in them at a time?
<FromGitter> <drum445> ```post "/person" ⏎ protected! ⏎ # if code gets here we're auth'd ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5c4ccf3c454aad4df7a9245f]
<FromGitter> <drum445> Like that @Blacksmoke16
<FromGitter> <Blacksmoke16> cant you make it a macro
<FromGitter> <Blacksmoke16> that calls `halt` under the hood
<FromGitter> <drum445> Possibly, I'd rather just be able to exit the context from the protected method
<FromGitter> <drum445> Is there anyway you can think of doing that?
<FromGitter> <matthewmcgarvey> https://play.crystal-lang.org/#/r/63lm times out so I'm guessing the answer is yes
<FromGitter> <Blacksmoke16> well it would be similar
<FromGitter> <Blacksmoke16> like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4ccffac2dba5382e9232b2]
<FromGitter> <Blacksmoke16> ?
<FromGitter> <drum445> bloody ace
<FromGitter> <drum445> forget how useful macros are, it's a different type of programming to get my head around
<FromGitter> <drum445> Thanks @Blacksmoke16
<FromGitter> <Blacksmoke16> np
<FromGitter> <Blacksmoke16> need to get back working on athena, security stuff is something thats still on my list ;p
<FromGitter> <drum445> Oh yeah?
<FromGitter> <drum445> What kind of security
<FromGitter> <Blacksmoke16> be something like that
<FromGitter> <drum445> ooh nice
<FromGitter> <Blacksmoke16> apply annotation and will check user has those roles/features/however you set it up
<FromGitter> <Blacksmoke16> but is a lot of thinking on if i want to go down same route as they did, or something diff
<mps> macros are very useful 'tool' but should be carefully used
<FromGitter> <drum445> For something like that protected helper I think it fits
<FromGitter> <drum445> @Blacksmoke16 yeah looks like a tricky one
<mps> I remember macros from assembly languages and how were they useful there, but didn't used it much in crystal, yet
<FromGitter> <j8r> @drum445 a method don't do the job?
<FromGitter> <j8r> as argument, or a block
<FromGitter> <drum445> @j8r for my protect method I couldn't halt a kemal context from outiside the route block
<FromGitter> <drum445> What file watchers do you fine young people use?
<FromGitter> <j8r> with `with yield` maybe
<FromGitter> <j8r> `with self yield`
<FromGitter> <drum445> Not totally sure I follow, is this to replace the protected macro from eariler matey?
<FromGitter> <j8r> I haven't tried, it might replace the macro
<FromGitter> <drum445> yield needs a block by the looks of it
cyberarm has quit [Ping timeout: 246 seconds]
cyberarm has joined #crystal-lang
<FromGitter> <kingsleyh> @drum445 thanks for watching my stream :)
<FromGitter> <kingsleyh> I've just started using Twitch but I'm sure that there are some kind of rewards and other stuff I can enable - so when I figure that out - I'll hand them out :) :)
DTZUZO_ has quit [Ping timeout: 240 seconds]
<FromGitter> <bajro17> Can someone please help how to start websocket in Crystal
<FromGitter> <bajro17> also @kingsleyh thank you for rethinkdb driver <3
<FromGitter> <j8r> I forgot Kemal use the global namespace @drum445
flxy has joined #crystal-lang
flxy is now known as jocat
jocat is now known as jo-
jo- is now known as jo_
jo_ is now known as j0
j0 is now known as jo-cat
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/63lz there
jo-cat has quit [Quit: bye~]
<FromGitter> <dscottboggs_gitlab> @Blacksmoke16 woah
<FromGitter> <dscottboggs_gitlab> @bew thanks for your help, glad I was able to figure something out
<FromGitter> <Blacksmoke16> @dscottboggs_gitlab been testing with sqlite a bit
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cedbd78e1ed4103950b7f]
<FromGitter> <Blacksmoke16> `SELECT e.age, s.address FROM contacts e JOIN settings s ON e.id = 1 WHERE (e.age = 30);"`
<FromGitter> <Blacksmoke16> i think thats pretty legit eh?
<FromGitter> <Blacksmoke16> want to edit the join a bit tho
<FromGitter> <Blacksmoke16> maybe some special expression you can give it like `Specify.on("s.id = e.id")`
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cef9c975714406b48d98d]
<FromGitter> <Blacksmoke16> better
<FromGitter> <dscottboggs_gitlab> I'm gonna be honest I find it kinda confusing
<FromGitter> <Blacksmoke16> suggestions?
<FromGitter> <dscottboggs_gitlab> No I mean, the whole Specification pattern
<FromGitter> <Blacksmoke16> ah
<FromGitter> <Blacksmoke16> yea it can take some getting used to but isnt that bad i dont think?
<FromGitter> <dscottboggs_gitlab> perhaps
<FromGitter> <Blacksmoke16> now i need to figure out how to sanitize inputs ^.^
<FromGitter> <Blacksmoke16> this is so SQL injection vulnerable its lol
<FromGitter> <Blacksmoke16> but yea, i was super confused on wtf was going on when i first started with it at work
<FromGitter> <Blacksmoke16> but thinking about it like blocks that you combine to build a query kinda helped
<FromGitter> <Blacksmoke16> and practice ofc
<FromGitter> <Blacksmoke16> is helpful you only have to write them once, then easily can reuse them
<FromGitter> <dscottboggs_gitlab> I was tthinking of trying to do something like this `Contacts.join(Settings).on { |c, s| s.id == c.id }.where("age", eq: 30)`. I really need to get better at SQL anyway it would be a good project
<FromGitter> <dscottboggs_gitlab> but I can see how if you can reuse those bits then it could get to be a lot more useful
<FromGitter> <Blacksmoke16> yea for sure, is one of the core reasons to use spec pattern
<FromGitter> <Blacksmoke16> that block would be super cool but not sure how you would do that
<FromGitter> <dscottboggs_gitlab> it's one of those things where it's not super attractive on it's face but once you use it for a while and get over the learning curve it's a lot more useful than the easier route
<FromGitter> <dscottboggs_gitlab> yeah that one would be super tough
<FromGitter> <Blacksmoke16> good docs and examples would help a lot i think
<FromGitter> <Blacksmoke16> to sell people on why they should use it :p
<FromGitter> <dscottboggs_gitlab> yeah, lots of example haha
<FromGitter> <Blacksmoke16> ill try :P
<FromGitter> <Blacksmoke16> prob should start to write some tests and organize this better now that its pretty legit
<FromGitter> <Blacksmoke16> pretty damn impressive that you can do something like this in like less than 250 lines
<FromGitter> <dscottboggs_gitlab> it'd have to be a struct built up from the typenodes of `c` and `s` which had attributes of a type which didn't hold data but instead overloaded the operators and had methods that took a record of their use or added something to a string builder.
<FromGitter> <dscottboggs_gitlab> damn I really want to build that now
<FromGitter> <Blacksmoke16> xD go for it
<FromGitter> <dscottboggs_gitlab> > pretty damn impressive that you can do something like this in like less than 250 lines ⏎ ⏎ this
<FromGitter> <dscottboggs_gitlab> > xD go for it ⏎ ⏎ maybe if I still have the desire when it comes to that point on my to-do list. Not gonna drop existing projects for it obv
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <dscottboggs_gitlab> but it is certainly something that would be fun and educational
<FromGitter> <dscottboggs_gitlab> rn I'm trying to figure out why kemal isn't doing SSL. think it's just not working on kemal's side :/
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <Blacksmoke16> i just use nginx for that
<FromGitter> <dscottboggs_gitlab> I use traefik for it but I wanted a simple bash script to run flix without docker using certbot
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cf3b593fe7d5ac0f6af5c]
<FromGitter> <Blacksmoke16> prob already said this but thats how you could reuse the stuff
<FromGitter> <Blacksmoke16> vs doing that everywhere just do `User.match(IsAdmin.new)`
<FromGitter> <Blacksmoke16> etc
<FromGitter> <Blacksmoke16> *boom* 💣
<FromGitter> <dscottboggs_gitlab> idk I think I'd like it better if your examples had named args
<FromGitter> <Blacksmoke16> what like:
<FromGitter> <dscottboggs_gitlab> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c4cf42fceb5a2264f478f8c]
<FromGitter> <Blacksmoke16> ah, well you can do that
<FromGitter> <Blacksmoke16> just isnt required
<FromGitter> <dscottboggs_gitlab> just for learning it, makes it more clear.
<FromGitter> <Blacksmoke16> ah gotcha