<FromGitter>
<greentornado> well so if i have to go with persistant data, pgsql/mysql is the choice then ?
<FromGitter>
<sdogruyol> yep
<metacollin>
:o 680,000 commands per second single thread
<FromGitter>
<greentornado> another option is using rest api with couchbase/firebase :D
<FromGitter>
<greentornado> crystall http client is quite good
<FromGitter>
<greentornado> is crystal support params string ?
<metacollin>
hmm, is web/database stuff kind of the primary usage case you've been seeing for crystal? As much as you can for something in alpha anyway? Personally, I'm using it to write a parser generator, very much like treetop. But hopefully fast enough to be useful lol
<FromGitter>
<greentornado> Lol, i'm experimental a new api app in crystal
<FromGitter>
<greentornado> but i'm testing pubsub with redis and couchbase as backend db with good result
<FromGitter>
<greentornado> how to check JSON::Any object has a key ?
gloscombe has joined #crystal-lang
dev0urer has joined #crystal-lang
metacollin has quit [Quit: metacollin]
<FromGitter>
<sdogruyol> .has_key?("some_key")
<FromGitter>
<greentornado> it says undefined method 'has_key?' for JSON::Any
<FromGitter>
<greentornado> :D
<FromGitter>
<sdogruyol> can you share some code please
<FromGitter>
<International> hi everyone, when running crystal spec, i get back just a F. Is there a way to get a more detailed description of what failed, and on what line ?
<FromGitter>
<luislavena> @International in the output you should see the failed spec file and line where it failed, like this:
<FromGitter>
<luislavena> @International I only get 0 examples when indicated an incorrect line number. Please run without filename indicating the line number and check again.
<FromGitter>
<luislavena> Also check that you're using latest version of Crystal, since built-in spec should display `0 examples, 0 failures, 0 errors, 0 pending`
<FromGitter>
<International> might be that the shards are doing smth to the formatter
<FromGitter>
<luislavena> @International not sure about spec2 syntax to invoke file:line individual specs, please check the docs of that project just in case.
<FromGitter>
<International> i think the syntax's the same, cause it's only running the specified test ( tried simplifying it more, just to be sure )
elomatreb has quit [Quit: mep mep]
elomatreb has joined #crystal-lang
<FromGitter>
<luislavena> @International I mean how is required in `spec_helper.cr` and other changes that you might need to apply.
<FromGitter>
<sdogruyol> oh god please give me {} and [] of Object
avdi has quit [Read error: Connection reset by peer]
avdi has joined #crystal-lang
oniifiv has quit [Quit: Who turned this off?! D:<]
<FromGitter>
<alex-lairan> :+1: :)
<FromGitter>
<citizen428> i'm trying to write a spec for a macro that dynamically defines a module but get the following error `can't declare module dynamically` the macro seems to work fine in a playground, and reading through various github tickets regarding this error message i'm not wiser than before :/ any hints appreciated
<FromGitter>
<citizen428> hm, i guess i got my module defined now... but there's many other things that don't work. sometimes it's confusing that crystal is so close to ruby ;)
mark_66 has quit [Remote host closed the connection]
<FromGitter>
<luislavena> @citizen428 please gist the code (guess some macro) and the spec you're getting the error so we can help.
pawnbox has joined #crystal-lang
<FromGitter>
<luislavena> BTW, you can't do `module ... end` within a `it` block, any module needs to be defined outside as `it` captures the sample block and later is run.
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 268 seconds]
mhib has joined #crystal-lang
dev0urer has joined #crystal-lang
dev0urer has quit [Read error: Connection reset by peer]
idev0urer has joined #crystal-lang
idev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Read error: Connection reset by peer]
dev0urer has joined #crystal-lang
dev0urer has quit [Read error: Connection reset by peer]
dev0urer has joined #crystal-lang
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
<FromGitter>
<johnjansen> @citizen428 following on from @luislavena , you cant define a module or class inside your spec, do it outside the describe
dev0urer has quit [Client Quit]
dev0urer has joined #crystal-lang
dev0urer has quit [Ping timeout: 244 seconds]
dev0urer has joined #crystal-lang
dev0urer has quit [Remote host closed the connection]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
no0p has joined #crystal-lang
mhib has quit [Quit: Leaving]
hako has quit [Read error: Connection reset by peer]
hako has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
kulelu88 has joined #crystal-lang
pawnbox has joined #crystal-lang
matp has quit [Excess Flood]
<FromGitter>
<johnjansen> anyone know how to use `missing_option` and `invalid_option` on `OptionParser`
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
matp has joined #crystal-lang
gloscombe has quit [Quit: Lost terminal]
<FromGitter>
<johnjansen> all, is there a standard for the organization of a top level module, such that the code within it does not run whilst in test. ⏎ i.e. does spec setup something i can test (within a macro) … im assuming so, otherwise i can obviously add something, but id like to use any predescribed standard, if there is one
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter>
<iDev0urer> Yeah I guess that wouldn't work with it being compiled, huh
<RX14>
@johnjansen most people put code in ModuleName.run, then have a file which requires "./src/foo" then runs that method
<FromGitter>
<johnjansen> thanks @RX14 thats what i figured, but it turned out to be completely obvious, although not the default config. ⏎ essentially the top level module is not tested (since the act of testing would start the process), and repointing spec helper down one level … so i test the components, but not the CLI parser etc
<FromGitter>
<johnjansen> consider this ⏎ ```module MyCliApp ⏎ # Parse any options ⏎ run(with_options) ⏎ end``` ⏎ The default in spec helper will load this module and unavoidably run this of course. ⏎ I was forgetting that! the specs dont exercise this code, but the loading of it was enough to waste my time for a little while ;-) [https://gitter.im/crystal-lang/crystal?at=5817a76b8ed1c0ff5c4c3502]
vikaton has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]