<hightower3>
How can I change the uid/gid from within the program? I'm looking for equivalent of Ruby's Process::UID.change_privilege
<faustinoaq>
Wow, Simple Web development in Crystal without framework is not that bad 👍
<FromGitter>
<bew> hightower3 why do you want to do that?
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
sz0 has joined #crystal-lang
faustinoaq has quit [Ping timeout: 240 seconds]
faustinoaq has joined #crystal-lang
faustinoaq has joined #crystal-lang
PixeLInc has quit [Excess Flood]
PixeLInc has joined #crystal-lang
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
PixeLInc is now known as PixeLBot
PixeLBot is now known as PixeLInc
<FromGitter>
<phoffer> I’ve been absent for some time but @RX if you want a inflector shard not part of anything else, I made https://github.com/phoffer/inflector.cr quite a while ago. Exact port of ActiveSupport’s Inflector, monkey patches are available but not required by default
astronavt has quit [Quit: Leaving...]
rohitpaulk has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
sz0 has joined #crystal-lang
<FromGitter>
<sam0x17> if I have a variable that is `[Some Type] | Nil`, and right now it is uninitialized so it is actually Nil, is there some way to find out what `[Some Type]` is, like with an if statement?
<FromGitter>
<sam0x17> calling `.class` on the variable just gives me `Nil` ... looking for some way to get the other type it could be
rohitpaulk has quit [Ping timeout: 268 seconds]
<FromGitter>
<sam0x17> I found a better way, but curious if there is an answer to this ^
<Yxhuvud>
typeof
<FromGitter>
<sam0x17> ah
<FromGitter>
<sam0x17> thx
rohitpaulk has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
Yxhuvud has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter>
<sam0x17> there is no built-in way of finding out if class A is a subclass of class B unless I have an instance of class A handy and can do `A.is_a?(B)` right?
Yxhuvud has joined #crystal-lang
<Groogy>
Morning! o/
<Groogy>
@sam0x17 should be possible through macros, though there might already be one implemented
<FromGitter>
<sam0x17> yeah, right now I have it working by having `B` keep track of a hash of all classes that have inherited from it
<Papierkorb>
...what
<Papierkorb>
TypeNode#all_subclasses, TypeNode#<
<Papierkorb>
There are even two documented macro solutions
<Groogy>
yeah I meant what Papierkorb is referring to
<FromGitter>
<sam0x17> nice!
<FromGitter>
<sam0x17> yeah I couldn't find that anywhere in google
<Groogy>
I thought the class you get from #class is an instance of Class? does is_a? have some extra semantics for classes?
<FromGitter>
<sam0x17> @oprypin that technique worked as a perfect drop-in replacement for what I head thanks a bunch
<FromGitter>
<sam0x17> @Groogy not sure if you noticed the `.class` at the end but that may clarify your question
<FromGitter>
<sam0x17> I was scratching my head at first too
<Groogy>
yeah I did, but that will give you an instance of Class, not a derivative of Class, but of course is_a? could have a variant that takes a Class and knows how to interpret that
<FromGitter>
<sam0x17> ah, yeah I'm guessing that since this works, it does
<FromGitter>
<sam0x17> tried for like 20 mins to find the source code for the .to_a? macro but github search is terrible as ever and I'm too lazy to clone
<Groogy>
Eh is_a? is special since the compiler has to be aware what it means (so you can remove types from a type union etc.)
<Groogy>
so its not a method really, it's more a language construct
<FromGitter>
<sam0x17> yeah I'm not even sure if it has a macro definition like what I'm thinking
<FromGitter>
<sam0x17> thar be dragons
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
faustinoaq has quit [Client Quit]
rohitpaulk has quit [Ping timeout: 268 seconds]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Remote host closed the connection]
<FromGitter>
<codenoid> hi, my kemal wont receive multiple value from `select[multiple]` ,
<FromGitter>
<cyclecraze_twitter> Sorry for the formatting!
rohitpaulk has quit [Ping timeout: 240 seconds]
<crystal-gh>
[crystal] MakeNowJust opened pull request #5313: Format: fix to format `$1?` (master...fix/crystal-format/5310-dollar-one-percent) https://git.io/vFH9C
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
astronavt has joined #crystal-lang
astronavt has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
aroaminggeek has joined #crystal-lang
astronavt has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
astronav_ has joined #crystal-lang
astronavt has quit [Ping timeout: 258 seconds]
astronav_ has quit [Remote host closed the connection]