ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.4 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
bazaar_ has joined #crystal-lang
matp has quit [Excess Flood]
bazaar has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
RX14 has quit [Ping timeout: 268 seconds]
RX14 has joined #crystal-lang
trajing- has quit [Ping timeout: 268 seconds]
swav has quit [Ping timeout: 268 seconds]
leafybasil has quit [Ping timeout: 268 seconds]
mjblack has quit [Ping timeout: 268 seconds]
dom96 has quit [Ping timeout: 268 seconds]
leex has quit [Ping timeout: 268 seconds]
badeball has quit [Ping timeout: 268 seconds]
m94asr has quit [Ping timeout: 268 seconds]
woodruff- has quit [Ping timeout: 268 seconds]
Tophe_ has quit [Ping timeout: 268 seconds]
Tophe_ has joined #crystal-lang
leex has joined #crystal-lang
leafybasi has joined #crystal-lang
mjblack has joined #crystal-lang
swav has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Excess Flood]
woodruffw has joined #crystal-lang
trajing has joined #crystal-lang
badeball has joined #crystal-lang
m94asr has joined #crystal-lang
dom96 has joined #crystal-lang
<FromGitter> <iDev0urer> Is there not a `to_sym` method for strings?
<FromGitter> <iDev0urer> Or anyway to convert a string to a symbol?
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
<FromGitter> <raydf> Hi @iDev0urer , could you share a code?
<FromGitter> <raydf> you could create a macro for this
<FromGitter> <iDev0urer> ```s = "hello" ⏎ puts s.to_sym``` [https://gitter.im/crystal-lang/crystal?at=580d74a0278cc54c6f61cf9b]
<FromGitter> <iDev0urer> It would be nice to have something built in like this http://apidock.com/ruby/String/to_sym
<FromGitter> <raydf> the idea of symbols is for not using string in the first place, that's why i asked for the code
<FromGitter> <iDev0urer> I don't have a specific example right now. I was just going over the api and saw that a `to_sym` method was missing
<FromGitter> <iDev0urer> I've had to use it in the past in ruby
<FromGitter> <raydf> i believe there should be a way to create a macro def for doing this.
<FromGitter> <raydf> but i haven't seen the need yet.
<FromGitter> <cjgajard> @iDev0urer https://crystal-lang.org/2015/03/04/internals.html#symbol says why String#to_sym is missing (tldr; current implementation is faster)
<FromGitter> <iDev0urer> Ahh ok. Thanks for the link @cjgajard
Philpax__ has joined #crystal-lang
<crystal-gh> [crystal] tristil opened pull request #3465: Include Enumerable in CSV (master...enumerable_csv) https://git.io/vPNBP
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
kulelu88 has quit [Quit: Leaving]
pduncan has quit [Ping timeout: 245 seconds]
pawnbox has joined #crystal-lang
txdv has quit [Ping timeout: 248 seconds]
pawnbox has quit [Remote host closed the connection]
snsei has joined #crystal-lang
mark_66 has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
snsei has quit [Ping timeout: 245 seconds]
txdv has joined #crystal-lang
snsei has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
<FromGitter> <raydf> nice @cjgajard :+1:
matp has joined #crystal-lang
HakanD has joined #crystal-lang
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kilo`byte has joined #crystal-lang
bazaar_ is now known as bazaar
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 245 seconds]
soveran has joined #crystal-lang
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kilo`byte has joined #crystal-lang
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 260 seconds]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 260 seconds]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 260 seconds]
ponga has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kochev has joined #crystal-lang
A124 has quit [Quit: '']
bjz has joined #crystal-lang
A124 has joined #crystal-lang
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HakanD has quit [Quit: Be back later ...]
pawnbox has quit [Ping timeout: 250 seconds]
HakanD has joined #crystal-lang
ferbass has joined #crystal-lang
HakanD has quit [Ping timeout: 276 seconds]
fedruantine has quit [Quit: client exited: Ex-Chat]
bjz has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Remote host closed the connection]
HakanD has joined #crystal-lang
Tophe_ has quit [Remote host closed the connection]
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
HakanD has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
daemonwrangler has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> now this is really interesting
<FromGitter> <txdv> they are switchign to crystal langauge?
<FromGitter> <sdogruyol> seems like
<txdv> this highlights me in irc
<txdv> and that drives me crazy
<txdv> o my god, the reverse is even more horrible
<FromGitter> <sdogruyol> how come?
<txdv> big pop up showing up from gitter
<txdv> but i just disabled it
bjz has joined #crystal-lang
fedruantine has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
HakanD has joined #crystal-lang
<RX14> inserting a zero-width space in the middle of the username when sending to IRC is the common solution
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> anyone using CircleCI for their tests?
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has joined #crystal-lang
gloscombe has joined #crystal-lang
<BlaXpirit> sdogruyol, i tried them out a long time ago, there's no advantage to it
bjz has quit [Ping timeout: 256 seconds]
bjz_ has joined #crystal-lang
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
JackymanCS4 has joined #crystal-lang
<FromGitter> <ysbaddaden> @sdogruyol I used to on a client project. it's working well.
JackymanCS4 has quit [Ping timeout: 260 seconds]
<FromGitter> <sdogruyol> i actually meant it for Crystal :P
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 245 seconds]
pawnbox has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> ugh, is there a way to cast an Int64 to Int32?
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
<BlaXpirit> many ways
<BlaXpirit> >> 123123123123123123i64.to_i32
<DeBot> BlaXpirit: # => 23327667 - https://carc.in/#/r/1cnx
<FromGitter> <sdogruyol> i see
<FromGitter> <sdogruyol> i'm really curious why .as(Int32) fails
pawnbox has quit [Ping timeout: 260 seconds]
<BlaXpirit> sdogruyol, it fails because `.as(Int32)` means "I'm 100% sure this is an Int32"
<BlaXpirit> it's a type assertion, never a conversion
<BlaXpirit> except for some special cases with pointers lol
<BlaXpirit> https://groups.google.com/d/msg/crystal-lang/kkbE8jfBldM/-xS1zbukBAAJ > You have some missconceptions here: ...
rtl has joined #crystal-lang
bmcginty_ has joined #crystal-lang
havenn has joined #crystal-lang
havenn has quit [Changing host]
havenn has joined #crystal-lang
havenwood has quit [*.net *.split]
oddmunds has quit [*.net *.split]
rtl_ has quit [*.net *.split]
bmcginty has quit [*.net *.split]
_jungh4ns has quit [*.net *.split]
havenn is now known as havenwood
pawnbox has joined #crystal-lang
oddmunds has joined #crystal-lang
_junghans_ has joined #crystal-lang
_junghans_ is now known as _jungh4ns
<FromGitter> <sdogruyol> i'm not sure why 1 is taken as Int64 in JSON::Type https://github.com/crystal-lang/crystal/blob/9581e8682805aba0f69a3c088be9980003d25190/src/json.cr#L57
<FromGitter> <sdogruyol> it gives me a headache while trying to downcast to Int32
pawnbox has quit [Remote host closed the connection]
HakanD has quit [Quit: Be back later ...]
<FromGitter> <ysbaddaden> doesn't the JSON specs states that integers are 64bits?
<FromGitter> <sdogruyol> does it?
HakanD has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x0f has quit [Ping timeout: 260 seconds]
x0f has joined #crystal-lang
x0f has quit [Ping timeout: 260 seconds]
x0f has joined #crystal-lang
pawnbox has joined #crystal-lang
ferbass has joined #crystal-lang
HakanD has quit [Read error: No route to host]
<FromGitter> <ysbaddaden> well, no, it doesn't, and implementations may decide to limit the allowable range
ferbass has quit [Ping timeout: 260 seconds]
<FromGitter> <ysbaddaden> https://tools.ietf.org/html/rfc4627
HakanD has joined #crystal-lang
Philpax__ has quit [Ping timeout: 260 seconds]
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
HakanD has quit [Ping timeout: 276 seconds]
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #crystal-lang
HakanD has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
ferbass has joined #crystal-lang
ferbass has quit [Ping timeout: 245 seconds]
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
HakanD has quit [Ping timeout: 252 seconds]
soveran_ has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
HakanD has joined #crystal-lang
A124 has quit [Ping timeout: 244 seconds]
<FromGitter> <johnjansen> ok guys, i cant find the reference to the magic incantation to make spec run continuously … i seem to remember that its a tilde somewhere in the command
<FromGitter> <johnjansen> anyone want to remind me
<FromGitter> <johnjansen> ;-)
A124 has joined #crystal-lang
<FromGitter> <jwoertink> I think it's just a flick of your wand and "specius runnus" or something like that :p
<Papierkorb> jadams: the simplest, yet stupidest, command is good ol `watch`
<Papierkorb> johnjansen: ^
<Papierkorb> tabbing nicks doesn't work through the bot, sorry j_adams -.-;
<FromGitter> <jwoertink> there's that too. Just use Guard. lol
<FromGitter> <johnjansen> @jwoertink you mean guardian right ;-) https://github.com/f/guardian
<FromGitter> <jwoertink> haha. yeah, that one
<FromGitter> <johnjansen> @Papierkorb but where does the carat go ;-)
<FromGitter> <iDev0urer> Has anyone had to implement any kind of XML to Hash or Hash to XML yet?
<FromGitter> <johnjansen> @iDev0urer do you want to magically convert between the two?
<FromGitter> <iDev0urer> Not necessarily magically, but it would be nice if there was an `XML.mapping` macro like there is for JSON. Very few languages have an easy way to convert between a key-value structure and XML
<FromGitter> <iDev0urer> Rust is one of the few that I've found
<FromGitter> <johnjansen> id like to look at porting Nori over, but havent got to it yet https://github.com/savonrb/nori
<FromGitter> <iDev0urer> I'll have to look into it. I'm in need of something like that for a SOAP heavy project that I'm working on
<FromGitter> <iDev0urer> Stupid Salesforce and their SOAP
<FromGitter> <johnjansen> haha, welcome to the past
snsei_ has quit [Remote host closed the connection]
soveran_ has quit [Remote host closed the connection]
<FromGitter> <iDev0urer> :cry:
<FromGitter> <johnjansen> @iDev0urer it might be a bit tricky if you want to type all the nodes correctly, not impossible, but tricky
gloscombe has quit [Remote host closed the connection]
<crystal-gh> [crystal] kostya opened pull request #3468: add JSONBuilder#raw_field (master...json_builder_raw_field) https://git.io/vPAF2
HakanD has quit [Quit: Be back later ...]
HakanD has joined #crystal-lang
HakanD has quit [Ping timeout: 260 seconds]
ferbass has joined #crystal-lang
ferbass has quit [Ping timeout: 244 seconds]
<crystal-gh> [crystal] ggiraldez opened pull request #3469: Fixes and improvements for debugging output (master...feature/improve-debugging) https://git.io/vPApp
HakanD has joined #crystal-lang
HakanD has quit [Ping timeout: 244 seconds]
kulelu88 has joined #crystal-lang
HakanD has joined #crystal-lang
<FromGitter> <raydf> @iDev0urer, the xml libs in crystal works ok, there's only the need to create the xml mapping. Also you could use SOAPUI for creating the proxy classes and parse the returning xml.
<FromGitter> <raydf> Parse the returning xml with crystal std lib.
<FromGitter> <raydf> I'll recommend you to stay away from the namespace handling of libxml, for the current version, i had a lot of trouble with this library.
<FromGitter> <sdogruyol> Well I heavily use standard xml stuff for soap
<FromGitter> <sdogruyol> It's good
HakanD_ has joined #crystal-lang
HakanD has quit [Ping timeout: 265 seconds]
<FromGitter> <iDev0urer> @raydf I'm not sure I understand what you bean by using SOAPUI to create proxy classes
Raimondi has quit [Ping timeout: 260 seconds]
Raimondi has joined #crystal-lang
HakanD_ has quit [Read error: Connection reset by peer]
HakanD_ has joined #crystal-lang
ferbass has joined #crystal-lang
ferbass has quit [Ping timeout: 245 seconds]
dhk_ has quit [Quit: Leaving]
kochev has quit [Remote host closed the connection]
bjz has joined #crystal-lang
HakanD_ has quit [Quit: Be back later ...]
kulelu88 has quit [Quit: Leaving]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Client Quit]
HakanD_ has joined #crystal-lang
kulelu88 has joined #crystal-lang
ferbass has joined #crystal-lang
HakanD_ has quit [Ping timeout: 245 seconds]
<FromGitter> <raydf> https://www.soapui.org/
<FromGitter> <raydf> soapui can create the request xml and a mock for the response based on wsdl
<FromGitter> <raydf> but if you have a testing salesforce environment you'll be able to develop faster.
<FromGitter> <raydf> try this tool and you'll be able to generate the http client request with crystal std lib HTTP::Client
<FromGitter> <raydf> the response from the io you could parse it with std libxml and using xpath (didn't work correctly for me) or parsing with nested loops for traversing the nodes.
ferbass has quit []
<FromGitter> <jwoertink> Is there a way to suppress the stack trace when throwing an error? Or would the alternative be to just do a `puts` followed by `exit(1)`?
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
Nik736 has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <johnjansen> @jwoertink do you mean inside a rescue
<FromGitter> <johnjansen> ??
<FromGitter> <jwoertink> no
<FromGitter> <jwoertink> I mean something like ```
<FromGitter> <johnjansen> an untrapped error?
<FromGitter> <jwoertink> ```def some_thing ⏎ raise SomeError.new if failed? ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=580e863452bb2d111d046c8e]
<FromGitter> <jwoertink> but instead of it outputting the entire stack trace
<FromGitter> <jwoertink> it would only show the error message
<FromGitter> <johnjansen> put a trap around the top level of the code and rescue that, ⏎ so ⏎ ``` ⏎ begin [https://gitter.im/crystal-lang/crystal?at=580e867de4e68c5058b1abae]
<FromGitter> <johnjansen> im not aware of a way to get less debugging information than normal without handling errors yourself
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <jwoertink> That's what I figured. I'm just doing a puts and then calling exit after right now
<FromGitter> <johnjansen> whats the topmost wrapper, you could catch the whole app
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=580e877552bb2d111d0470fa]
<FromGitter> <jwoertink> so maybe something like that?
<FromGitter> <jwoertink> or actually, `e.message`? I think that's what it is
<FromGitter> <johnjansen> e.message i think
<FromGitter> <jwoertink> and probably not `exit(0)` if it's an error :p
<FromGitter> <johnjansen> totally
<FromGitter> <jwoertink> hahah. I should probably read my code
<FromGitter> <johnjansen> dont worry i got the idea
<FromGitter> <jwoertink> Ok, I don't mind that solution. Can I do multiple rescues this way?
<FromGitter> <jwoertink> like `rescue SomeError, SomeOtherError, Fatality => e`
<FromGitter> <johnjansen> i assume so
soveran has quit [Remote host closed the connection]
<FromGitter> <johnjansen> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=580e88a8ecbf06273a66e9f7]
<FromGitter> <jwoertink> ah! Sweet
<FromGitter> <jwoertink> Thanks
<FromGitter> <johnjansen> NP
Guest41247 is now known as Cyrus
Cyrus has quit [Changing host]
Cyrus has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<FromGitter> <jwoertink> Is it possible for specs to become "stuck" as in when running them, regardless of the changes you make, the output is the same?
<FromGitter> <jwoertink> If so, is there a way to "unstick" them? lol
soveran has quit [Remote host closed the connection]
<FromGitter> <johnjansen> if you are editing the wrong file, yes ;-)
<FromGitter> <johnjansen> ive done that a lot, renaming files or moving them, then editing the one in my editor, not the *new* one
<FromGitter> <jwoertink> lol. I swear this has to be a pebcak issue, but I'm just not seeing it. All my specs were passing. I made a few changes, and now I get an uninitialized constant error. Rolled back my changes, and it's still there
<FromGitter> <johnjansen> sorry man, its all yours ;-)
<FromGitter> <jwoertink> This spec was passing, but now it has no idea what ECR is
<FromGitter> <johnjansen> all green over here, on master
<FromGitter> <johnjansen> what is ECR btw ?
<FromGitter> <jwoertink> yeah, see, not on mine. I get `undefined constant ECR`
<FromGitter> <jwoertink> it's the built in template engine
<FromGitter> <jwoertink> So you can do `<%= some_var %>`
<FromGitter> <johnjansen> oh like erb
<FromGitter> <jwoertink> yup
<FromGitter> <johnjansen> i dont see that mentioned directly
<FromGitter> <jwoertink> I think I just need to `reset --hard HEAD` and start over ~_~
<FromGitter> <johnjansen> thats what i’d do, but stash anything you want first
<FromGitter> <jwoertink> ah, good call
<FromGitter> <johnjansen> what feature are you working on ATM @jwoertink
<FromGitter> <jwoertink> I'm reorganizing the codebase a bit. Once it's all cleaned up, then I want to start working on making fez able to generate an API
<FromGitter> <johnjansen> nice
<FromGitter> <jwoertink> A kemal app without all the views, and setup more for API stuff
<FromGitter> <johnjansen> you should ticket it all in github issues and then others (incl. me) can pick up ticket and work them
<FromGitter> <johnjansen> the current ONE is a little broad ;-)
<FromGitter> <jwoertink> I actually have it all in the project folder
<FromGitter> <johnjansen> ooooh fancy
<FromGitter> <jwoertink> :D
_whitelogger has joined #crystal-lang
m94asr has quit [Ping timeout: 256 seconds]
<FromGitter> <jwoertink> Is there a built in way to do defaults in `OptionParser` aside from defining the default in a separate variable, and overriding it?
ponga has quit [*.net *.split]
badeball has quit [*.net *.split]
Majost has quit [*.net *.split]
jhass has quit [*.net *.split]
hmans has quit [*.net *.split]
aarongodin has quit [*.net *.split]
grindhold has quit [*.net *.split]
Liothen has joined #crystal-lang
Liothen has quit [*.net *.split]
_whitelogger has quit [Excess Flood]
_whitelogger_ has joined #crystal-lang
<FromGitter> <johnjansen> if all the values are the same type, then a hash would do
<FromGitter> <johnjansen> otherwise you can define an actual class for BlahOptions
<FromGitter> <johnjansen> id avoid a hash with union type values personally
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Majost has joined #crystal-lang
<FromGitter> <johnjansen> @jwoertink have you ever tried subclassing String
soveran has quit [Ping timeout: 256 seconds]