laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ashirase has joined #crystal-lang
<FromGitter>
<watzon> Typically an instance of the `pp` macro breaking something wouldn't actually be because of the macro, but because of the variable the macro is attempting to print. You'd probably have the same problem with `puts` or any other operation performed on the variable.
<FromGitter>
<sdogruyol> Hey everyone π Have a great week π
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ashirase has quit [Ping timeout: 258 seconds]
ashirase has joined #crystal-lang
<FromGitter>
<pynixwang> `Array(Int64 | String)` or `Array(Int64) | Array(String) `?
<FromGitter>
<pynixwang> confused.
<FromGitter>
<wernerj> Iβd say it depends whether the array itself can contain elements of mutiple types or itβs either an array of strings or an array of integers.
<FromGitter>
<j8r> Yes, that either a single array that can have a mix of T and U. β Or, either an Array of T or an Array of U
<FromGitter>
<j8r> If you have the choice, the latest one is simpler to deal with: you can do a `if array.is_a? Array(Int64)` and no more union
<FromGitter>
<pynixwang> topics - Array: An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x12...']. You can also pass an array for each topic with options for that topic e.g. [null, ['option1', 'option2']]
<FromGitter>
<pynixwang> a little complex
<FromGitter>
<pynixwang> use JSON::Any?
<FromGitter>
<pynixwang> or alias Topic::Any = Array(Topic::Any | String | Nil )
laaron has quit [Remote host closed the connection]
<FromGitter>
<pynixwang> I hate type .
laaron has joined #crystal-lang
<FromGitter>
<j8r> do you hate having types when using a library?
<FromGitter>
<pynixwang> yes.
<FromGitter>
<j8r> That's tremendously useful, that's a nightmare in Python
<FromGitter>
<j8r> we never know what's returned, what we can do. We cross the fingers not to have runtime exceptions
<FromGitter>
<j8r> thankfully with type annotations, the situation improves a bit
<FromGitter>
<j8r> For JSON here, you can use `JSON::Serializable`
duane has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<vladfaust> Hi! Need some Linux help. I'd like to run a Crystal script under root, but execute some shell scripts from that Crystal process logged in as another user. Is that possible? Given that `su` is not a real shell session, and I need a real one -- with restrictions and `/run/user/<id>`
<FromGitter>
<yxhuvud> depending on linux variant, I think there is a config file somewhere where you can configure ways to get elevated rights, on a per user level. .
<FromGitter>
<mavu> @vladfaust the way that is usually done is to fork the process and drop root privileges in the child branch, while continuing / keeping root in the main one.
<FromGitter>
<vladfaust> @mavu you're suggesting to `Process.fork` and then `unshare`?
<FromGitter>
<mavu> i have never done this myself, its just "the way things are done" (tm)
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<FromGitter>
<Prutheus> I often get a SSL_write: I/O error from my HTTP::Client - has nothing to do with the endpoint, it just crashes ... why? is it a bug in crystal?
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]