ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.29.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
DTZUZO has quit [Ping timeout: 272 seconds]
<rkeene> I have a context, and I want to evaluate a script from a file in it.
<rkeene> Duktape isn't undocumented, but duktape.cr is, as far as I can tell.
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]
laaron has joined #crystal-lang
<FromGitter> <watzon> I think the API pretty closely matches up to Duktape's actual API
<FromGitter> <watzon> From what I can see
<alex```> crystal eval 'status = Process.run("exit 1", shell: true); puts status.exit_status'
<alex```> # 256
<alex```> why isn’t '1'?
<FromGitter> <Blacksmoke16> uhh
<alex```> hm
<alex```> crystal eval 'status = Process.run("exit 1", shell: true); puts status.exit_code'
<alex```> # 1
<alex```> what is the difference?
<alex```> they uses the term "exit status"
<alex```> > sometimes referred to as a return status or exit code
<alex```> I can use `status.exit_code` instead of `status.exit_status`, but I don’t get what is exit_status is
<FromGitter> <Blacksmoke16> dunno
<alex```> and if I use in an non-Crystal app (language agnostic), the name "status" is good?
<FromGitter> <Blacksmoke16> exit code is prob more common
<alex```> { output: output, status: status.exit_code }
<alex```> I would like it to be a single word is possible
<alex```> if*
siery has quit [Quit: WeeChat 2.4]
<FromGitter> <Blacksmoke16> @vladfaust ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ This mean anything to you? [https://gitter.im/crystal-lang/crystal?at=5cfc6e356f530d3b615f18eb]
<FromGitter> <Blacksmoke16> prob would be more appropriate as a forum thread than a github issue alex
<FromGitter> <Blacksmoke16> for next time
<alex```> oh ouki
<rkeene> watzon, For example there's no Duktape function to eval a file, but duktape.cr has one
<rkeene> But it's not documented anywhere, as far as I can tell.
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
rohitpaulk has joined #crystal-lang
_whitelogger has joined #crystal-lang
alex``` has joined #crystal-lang
kludd has joined #crystal-lang
<FromGitter> <watzon> Is there any way to make a generic type argument so that it defaults to the type of another generic? For instance `class Node(T, K = T)` or something like that, where `K` is of type `K` if defined, and `T` if not.
kludd has left #crystal-lang [#crystal-lang]
rohitpaulk has quit [Ping timeout: 272 seconds]
_whitelogger has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
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]
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]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <vladfaust> @Blacksmoke16 usually that means that Character doesn't have instance variable named "id"
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <bew> @watzon no.. There is an issue open about that
ashirase has quit [Ping timeout: 244 seconds]
ashirase has joined #crystal-lang
rohitpaulk has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
_whitelogger has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <vladfaust> What a pleasure to see Travis all green again
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
alex``` has quit [Ping timeout: 272 seconds]
alex``` has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cfd01efbf4cbd167c584818]
<FromGitter> <Blacksmoke16> is my model @vladfaust
<FromGitter> <Blacksmoke16> error changed to `alliance_id`
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cfd02a682c2dc79a5790eac]
DTZUZO has joined #crystal-lang
<FromGitter> <Blacksmoke16> `Onyx::SQL.query` my bad
<FromGitter> <Blacksmoke16> seems it works when i use the schema macro
alex``` has quit [Ping timeout: 248 seconds]
alex``` has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> how would you delete a cookie? im not seeing any method to do that
laaron has quit [Remote host closed the connection]
<FromGitter> <tenebrousedge> @Blacksmoke16 I also don't see a method to do that. There probably should be one. In the meantime, the only thing that springs to mind would be using `from_headers`with a set of headers with that cookie removed
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> 😐
<FromGitter> <tenebrousedge> you could also try setting an expiration date in the past
<FromGitter> <Blacksmoke16> not ideal either
<FromGitter> <Blacksmoke16> ill give that a try
rohitpaulk has quit [Ping timeout: 244 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <drum445> Hi Guys, please let me know what you think of my web framework: https://github.com/drum445/izrite
<FromGitter> <tenebrousedge> `@ctx` should be `@context`, in my opinion. Variables should be dictionary words whenever possible
<FromGitter> <tenebrousedge> it's also distinctly possible that access to these things should be through a method
<FromGitter> <drum445> Cheers, yeah possibly. I think I'll look at making url params method params.
<FromGitter> <tenebrousedge> `h`, `r`, and `ap` are good as method aliases, but again, dictionary words provide important context
<FromGitter> <drum445> Noted thanks mate. Will make them aliases and have the full name also
<FromGitter> <drum445> @tenebrousedge when you see through a method, do you mean they should be private or as part of the method's params?
<FromGitter> <tenebrousedge> `jrender` vs `render`, maybe `json` should be a parameter passed to `render`? I don't recall other frameworks that have a separate `render` method for json, but I could easily be confused on that one
<FromGitter> <tenebrousedge> using `context()` as opposed to `@context`
<FromGitter> <drum445> ``` def context ⏎ @context ⏎ end``` ⏎ ⏎ You just mean like that right, so it's not accessed directly? [https://gitter.im/crystal-lang/crystal?at=5cfd23f53dcdab40031813f0]
<FromGitter> <tenebrousedge> yes, then you can change the implementation, or mock out the method for testing, and the rest of the code shouldn't have to care
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
<FromGitter> <drum445> aye, nice
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> now time to write some tests 😉
<FromGitter> <tenebrousedge> ^^^
<FromGitter> <drum445> indeed, just thought I'd see if people like the "feel" of it first
<FromGitter> <drum445> seems to work well for my use-cases though :)
<FromGitter> <Blacksmoke16> do you have plans for other features?
<FromGitter> <tenebrousedge> tests don't tell you if your code works, but they can tell you when you break something inadvertently
<FromGitter> <Blacksmoke16> could use something to make it unique, Crystal has a lot of simple frameworks, that are mainly just routers
<FromGitter> <drum445> @Blacksmoke16 sessions will be the next thing
<FromGitter> <drum445> I want to keep it more on the micro-side of things
<FromGitter> <drum445> I wanted a laravel like route system that would just redirect to a controller.
<FromGitter> <drum445> Will try and find a unique point though, it was also something interesting to code tbh
<FromGitter> <Blacksmoke16> yea for sure, is the best way to learn is to just go do something
laaron has quit [Remote host closed the connection]
ashirase has quit [Quit: ZNC - http://znc.in]
laaron has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
ua has quit [Ping timeout: 245 seconds]
ua has joined #crystal-lang
ua has quit [Excess Flood]
return0e_ has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <Prutheus> Hello. ⏎ My program crashes with: ⏎ ⏎ ```malloc(): corrupted unsorted chunks 3 ⏎ Program received and didn't handle signal IOT (6)``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5cfd51ac3dcdab4003195866]
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://github.com/Blacksmoke16/athena/releases/tag/v0.7.0 Athena version 0.7.0 is now released. Adds in the DI/service container modules, Crylog logging framework, and some QoL changes to how configuration/environments are handled
<FromGitter> <Prutheus> @Blacksmoke16 can you help me please?
<FromGitter> <Blacksmoke16> id vote its where you're callc malloc?
<FromGitter> <Blacksmoke16> i dont really know anything about c stuff
<FromGitter> <Prutheus> I am not calling malloc! that's the strange point
<FromGitter> <Blacksmoke16> prob something internal then
<FromGitter> <Blacksmoke16> i dont have any ideas
<FromGitter> <Prutheus> My main.c:
<FromGitter> <Prutheus> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cfd53bbd4e3840c695b0c32]
wymillerlinux has quit [Remote host closed the connection]
<FromGitter> <Prutheus> any idea?
<FromGitter> <Blacksmoke16> prob dont want your api publicly readable first of all :p
<FromGitter> <Blacksmoke16> api key*
<FromGitter> <Prutheus> lol
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> otherwise id just start commenting stuff out till it goes away
<FromGitter> <Prutheus> hm :/
wymillerlinux has joined #crystal-lang
wymillerlinux has quit [Read error: Connection reset by peer]
wymillerlinux has joined #crystal-lang
wymillerlinux has quit [Ping timeout: 258 seconds]
<FromGitter> <Prutheus> I removed the pp's
<FromGitter> <Prutheus> now it seems to work - possible?
<FromGitter> <Blacksmoke16> Apparently so
<rkeene> Are there any PKCS#11 interfaces for Crystal ?
rohitpaulk has quit [Remote host closed the connection]
ua has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
wymillerlinux has joined #crystal-lang
<FromGitter> <Blacksmoke16> so not in the stdlib at least as far as i can tell
<FromGitter> <dscottboggs_gitlab> this didn't compile at some point in the past and I'm so glad that it does now :D https://carc.in/#/r/71xh so much cleaner syntax than the alternative
<FromGitter> <dscottboggs_gitlab> apparently I'm wrong about it not compiling in the past (checked all the versions of crystal that I'd used before on carc.in and they all worked) but I'm stilll glad that i can do that rather than having to https://carc.in/#/r/71xo
<rkeene> PKCS#11 is unrelated to PKCS#5 in the same way that RFC2616 is unrelated to RFC2822 -- they're both standards, but for different kinds of things
_whitelogger has joined #crystal-lang
ashirase has joined #crystal-lang
ashirase has quit [Quit: ZNC - http://znc.in]