RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | 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
wontruefree has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 252 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <Blacksmoke16> theres no way to mock the response of a function currently in `Spec` is there?
<FromGitter> <Blacksmoke16> or that a method was called with x params?
<FromGitter> <Blacksmoke16> found some shards for it so im good i guess
<FromGitter> <Blacksmoke16> well mock one is dead it seems :/
rohitpaulk has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter> <Blacksmoke16> luckily wanted to mock http request responses so https://github.com/manastech/webmock.cr worked perfectly :)
thews has quit [Ping timeout: 250 seconds]
thews has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <kolyaio> @fridgerator what should i use? It’s what comes with my mac
rohitpaulk has joined #crystal-lang
thews has quit [Ping timeout: 240 seconds]
thews has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
flaviodesousa has joined #crystal-lang
DTZUZO has quit [Ping timeout: 272 seconds]
Groogy1 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
<FromGitter> <epergo> @jwoertink that's kind of what I talked about in my post https://www.reddit.com/r/crystal_programming/comments/8ett9o/crystal_in_q12018/ about the `SPRING CLEANING`
<FromGitter> <epergo> it should be someone dedicated to repo cleaning and management, disclaimer: I totally understand that is something that requires a lot of time, not a complain, but a wish
pabs has joined #crystal-lang
<FromGitter> <epergo> and to be honest, crystal has improved a LOT since I wrote that, very pleased of the current status of the language and ecosystem
rohitpaulk has joined #crystal-lang
ashirase has quit [Ping timeout: 244 seconds]
ashirase has joined #crystal-lang
<FromGitter> <codenoid> i'm not productive when coding without team + in big project
<FromGitter> <epergo> me neither, it is really dificult, that's why I think is veeery important to have good repo management
<FromGitter> <epergo> so is easier to have the big picture about what has to be addressed, the progress of the project and where and when help is needed
rohitpaulk has quit [Ping timeout: 272 seconds]
<FromGitter> <manveru> how do i use HTTP::Client with ca_certificates but no private key?
<FromGitter> <manveru> atm i set `client.tls.ca_certificates = "/path/to/ca.crt"`, but it complains about missing private key...
<FromGitter> <bararchy> well, it's called PKI for a reason @manveru the whole point is Public + Private key
<FromGitter> <manveru> i only need to verify a server certificate, not authenticate using a cert... guess i can use insecure mode for this
<FromGitter> <bararchy> ohhh
<FromGitter> <bararchy> I missed your question, sorry
<FromGitter> <manveru> also my question was wrong :)
<FromGitter> <bararchy> so you basicly want to configure a Cert Store
<FromGitter> <manveru> initializing HTTP::Client with `context = OpenSSL::SSL::Context::Client.insecure` and setting `client.tls.verify_mode = OpenSSL::SSL::VerifyMode::PEER; client.tls.ca_certificates = certificate` in the client seems to work
<FromGitter> <manveru> just not sure what other options i should set to make it solid
<FromGitter> <bararchy> I would just do ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b9a4482d655361f76f2d1cf]
<FromGitter> <bararchy> and pass this context to HTTP::Clent
<FromGitter> <bararchy> you can also pass the ⏎ ⏎ ```ca_certificates="/path/to/ca.crt"``` ⏎ ⏎ for a single specific file [https://gitter.im/crystal-lang/crystal?at=5b9a44d4f7e1580625c539dc]
<FromGitter> <bararchy> but anyway, configure this in context, then pass the context to the HTTP::Client
<FromGitter> <manveru> thanks, will try that
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
JesseH has joined #crystal-lang
<FromGitter> <girng> im transcending to love2d . gonna be using luasocket to connect to my crystal tcp server now
shalmezad has joined #crystal-lang
<JesseH> I'm using kemalcr which defines the render macro in this code. https://hastebin.com/arurufukir.rb
<JesseH> Its throwing an error "undefined macro method 'Var#split'"
<JesseH> ops wrong source
<JesseH> Here's the correct code. https://hastebin.com/fodoceyufi.rb
<JesseH> The issue is with render, apparently.
<JesseH> Anyone know of a solution? I thought the solution was on the kemalcr guide page but the macro they suggested creating didn't fix the issue.
<FromGitter> <Blacksmoke16> what happens if you hard code the file path as part of the `render` method
<JesseH> Blacksmoke16: I hardcoded the page_path and it worked fine but then said the same about layout. So, good to know the issue is with interpolated strings.
<JesseH> Ill keep playing around and see if I can figure it out.
<FromGitter> <Blacksmoke16> i think its because `render` is a macro, so it generates the code before runtime when the interpolated string isnt set yet
<FromGitter> <Blacksmoke16> or something along those lines
sagax has quit [Remote host closed the connection]
lvmbdv has joined #crystal-lang
<FromGitter> <j8r> How can I generate something like `7?Ycb,Z1+EHA*Bj(3oS)09,gJ+Gb&08Z8#JqeWP#x>/xZnd(j7ZcI8l~(^+q*e~!`, something safer than `Random::Secure.urlsafe_base64 64`
DTZUZO has quit [Ping timeout: 252 seconds]
<FromGitter> <bds> I have HTML in an XML node that I would like to retrieve as a string. XPATH wants me to cast the node set (from the xpath query) but it removes all of the element tags from formatting. How can I keep the HTML tags in the string? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b9a9465f08bc22dfb50abb2]
wontruefree has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <molnarmark> Hey guys. I just released my latest project that I've been working on for the past week or two. Gulp-like task runner for Crystal. Let me know if you like it. :) https://github.com/lupincr/lupin
<FromGitter> <bds> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b9a9863f7e1580625c764b9]
flaviodesousa has quit [Ping timeout: 252 seconds]
<oprypin> j8r, what you're showing is approximately base80 which is only marginally more combinations than base64. just use base64.
<oprypin> j8r, alternatively https://carc.in/#/r/4ynm `64.times.map { CHARACTERS.sample(Random::Secure) } .join`
rohitpaulk has quit [Ping timeout: 252 seconds]
sagax has joined #crystal-lang
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
<FromGitter> <vladfaust> Is there an `IO::FileDescriptor` for devnull just like `STDOUT`? `File::DEVNULL` is a String path to "/dev/null". I'd like to log to devnull
<FromGitter> <straight-shoota> @vladfaust `File.open(File::DEVNULL)`?
<FromGitter> <vladfaust> @straight-shoota `File not open for writing (IO::Error)`
<oprypin> vladfaust, why do you need devnull?
<FromGitter> <vladfaust> Ah, gonna add those flags
<FromGitter> <vladfaust> @oprypin I'm benchmarking some code with `Logger`
<FromGitter> <vladfaust> I know about levels
<oprypin> ok
<FromGitter> <straight-shoota> `mode: "w"`
<FromGitter> <straight-shoota> see https://crystal-lang.org/api/latest/File.html#open%28filename%2Cmode%3D%26quot%3Br%26quot%3B%2Cperm%3DDEFAULT_CREATE_PERMISSIONS%2Cencoding%3Dnil%2Cinvalid%3Dnil%29%3Aself-class-method
<FromGitter> <vladfaust> @straight-shoota thanks, works as expected!
<FromGitter> <straight-shoota> great
shalmezad has quit [Quit: This computer has gone to sleep]
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
DTZUZO has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
shalmezad has joined #crystal-lang
shalmezad has quit [Remote host closed the connection]
wontruefree has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #crystal-lang
sevensidedmarble has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 252 seconds]
<FromGitter> <j8r> @molnarmark whyyyy you have versionized the logo, why people do this??
<FromGitter> <j8r> Thanks @oprypin
wontruefree has quit [Quit: bye]
<FromGitter> <j8r> Or how make a repo bigger. No versionable assets has to be put separataly to the code, if you can't in a separate orphaned branch.
<FromGitter> <j8r> Also omg @molnarmark you have versioned the compiled crystal binary :0
<FromGitter> <molnarmark> @j8r I didnt really do much, just created a release tag.
<FromGitter> <molnarmark> thats the binary for the CLI, I wanted to have the cli repo clean and binary free
wontruefree has joined #crystal-lang
<FromGitter> <j8r> Having binaries versioned like image and executable isn't intentional?
<FromGitter> <molnarmark> I decided against cloning down the cli repo and building it during the install process as I imagine the binary should be fine across all linux distributions. The install script just downloads that binary and puts it in place
<FromGitter> <molnarmark> No its not, I just created a v1.0.0 release tag and GitHub took everything from the master branch and tagged it.
<FromGitter> <j8r> The binary is statically-linked? If not, not portable across Linuxes
<FromGitter> <molnarmark> I'm going to redo the installation part then and have it clone the repo and build itself.
<FromGitter> <molnarmark> Thanks for the heads up!
<FromGitter> <j8r> Yeah, when releasing you can have archives of the code, and also archives for the binaries
<FromGitter> <j8r> The two are separated, Crystal-lang do this for example 😉
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
<FromGitter> <molnarmark> Thanks for the help, you learn something everyday :)
wontruefree has joined #crystal-lang
<FromGitter> <TeddyDD> I just discovered `run` macro, this it will end badly 😆
johndescs has quit [Ping timeout: 240 seconds]
johndescs has joined #crystal-lang
wontruefree has quit [Quit: bye]