jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.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
<FromGitter> <Blacksmoke16> got a workaround for those wondering
<FromGitter> <Blacksmoke16> https://github.com/Blacksmoke16/athena/tree/di/docs#configuration refactored how i handle configuration, having env specific settings is now much easier
DTZUZU has quit [Ping timeout: 272 seconds]
<FromGitter> <asterite> @nsuchy 14 hours down to one second? Wow! What is it doing?
<FromGitter> <watzon> I too would love to know haha. That's an amazing success story.
<FromGitter> <watzon> Weird that my shard tweeter isn't showing up on crystalshards.org
<FromGitter> <Blacksmoke16> prob need to tag it
<FromGitter> <Blacksmoke16> #crystal prob
<FromGitter> <watzon> I'll try that
<FromGitter> <watzon> Well I've tagged it, but it's weird that it's not showing up. I've had other shards that aren't tagged show up since I'm pretty sure crystalshards just checks for Crystal to be the main language
<FromGitter> <watzon> It would be really nice to have an actual repository. Hopefully someday.
<FromGitter> <mwlang> @kingsleyh, can SushiChain be used to build decentralized blockchain registry of Crystal shards? :-D
return0e has quit [Ping timeout: 246 seconds]
<FromGitter> <nsuchy> @asterite It's bulk inserting data from a JSON file (the sample I have is 300MB) into an SQLite Database using Crystal-db transactions.
<FromGitter> <nsuchy> @watzon
<FromGitter> <mwlang> i'm trying to set up a spec for a JSON converter, but not sure how to instantiate a Pullparser directly starting with a json string.
<FromGitter> <mwlang> this obviously is not right, but it's where I started: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ceb52920ac9852a9548b1d3]
<FromGitter> <mwlang> The mistake I'm making, I'm sure, is I'm trying to instantiate the puller directly here, but I don't think it's initialization is looking for a String input.
<FromGitter> <mwlang> I think I just solved it...below the json, I define ```puller = JSON::PullParser.new(json)``` and then pass ```puller``` in the ```#from_json``` call in the spec.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <Blacksmoke16> Why not just test the whole flow
<FromGitter> <mwlang> well, trying to find where things are breaking down.
<FromGitter> <Blacksmoke16> Ah
<FromGitter> <mwlang> I can't debug this puppy like I would Ruby code....sooo...small unit tests gets me there.
<FromGitter> <Blacksmoke16> Fair enough :p
<FromGitter> <watzon> Hopefully better debugging support is in our future
<FromGitter> <watzon> There is a pry port for crystal, not sure how well it works though
<FromGitter> <watzon> Implicit requires don't hurt performance do they?
<FromGitter> <mwlang> pry port for crystal? I wonder too how that might work...my biggest hurdle debugging right now is just getting the darn thing to compile.
<FromGitter> <mwlang> once it's compiling and running, it's usually working unless I totally FUBAR something.
<FromGitter> <mwlang> @Blacksmoke16 Thanks for that playbook way back when on parsing binance depth charts. I finally put it to good use, but had to learn a bit more about JSON parsing to bring it into the fold of things.
<FromGitter> <watzon> @mwlang https://github.com/elorest/cry
<FromGitter> <watzon> Like I said, I don't know how well it works or if it works
laaron has quit [Remote host closed the connection]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 258 seconds]
Raimondii is now known as Raimondi
laaron has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <watzon> What's the Crystal equivalent of using `\1` for getting a match group?
<FromGitter> <watzon> It doesn't seem to work
<FromGitter> <watzon> Nvm, it's `\\1` in Crystal
return0e has joined #crystal-lang
DTZUZU has joined #crystal-lang
return0e has quit [Ping timeout: 244 seconds]
return0e has joined #crystal-lang
<FromGitter> <watzon> I really do wish that Crystal had #pack and #unpack methods
ShalokShalom63 has joined #crystal-lang
ShalokShalom63 has quit [Remote host closed the connection]
ShalokShalom has quit [Remote host closed the connection]
ShalokShalom has joined #crystal-lang
DTZUZU has quit [Ping timeout: 245 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
ShalokShalom has quit [Remote host closed the connection]
ashirase has quit [Ping timeout: 272 seconds]
ashirase has joined #crystal-lang
<FromGitter> <davidcolombogit> ```Error: you've found a bug in the Crystal compiler```
<FromGitter> <davidcolombogit> Hmmmmmm
<FromGitter> <davidcolombogit> Is the crystal-tools package for atom broken?
return0e has quit [Ping timeout: 272 seconds]
return0e has joined #crystal-lang
<FromGitter> <mavu> I had the compiler tell me that when trying to access a file that was on a volume that was unmounted at a un-opportune time.
<FromGitter> <mavu> (so, only the compiler telling me it was a bug was actuall a bug)
<FromGitter> <watzon> Well Cadmium now has a Pragmatic Tokenizer based off of the ruby gem of the same name
DTZUZU has joined #crystal-lang
<FromGitter> <bararchy> Anyone here from Bosnia?
<mps> bararchy: heh, when I was a child I lived some time there
<FromGitter> <bararchy> that's cool mps
coderobe has quit [Ping timeout: 244 seconds]
coderobe has joined #crystal-lang
dostoyevsky has quit [Ping timeout: 244 seconds]
jokke has quit [Ping timeout: 258 seconds]
ua has quit [Ping timeout: 244 seconds]
dostoyevsky has joined #crystal-lang
jokke has joined #crystal-lang
ua has joined #crystal-lang
<mps> and I know language very well. It is a really nice country. My daughter traveled there previous year and she were overjoyed
<FromGitter> <bararchy> We just opened a new office there, I wanted to see if we have fellow Crystal devs in the area XD
<mps> bararchy: in which city
<FromGitter> <bararchy> Mostar
<mps> it is not near to me, but also not too far
<FromGitter> <davidcolombogit> @mavu found the issue, was something file system related too ⏎ The compiler struggled because the storage path of the file was too long ⏎ I think I just have to move the project into another folder with a shorter path xD
<FromGitter> <bararchy> You're in sarajevo? mps
<mps> no, I'm in Serbia
<FromGitter> <bararchy> Oh!
<mps> I was in military service in Mostar, long time ago
<FromGitter> <bararchy> hahahahah I see
<mps> hehe, that was before war
<FromGitter> <bararchy> oh ok :)
<livcd> bararchy: you moved there or it's just a new office?
<FromGitter> <bararchy> new office
<livcd> did you score some gov contract ? :D
<FromGitter> <bararchy> in Bosnia?
<livcd> yeah
<FromGitter> <bararchy> we didn't try TBH hahah it's an office not a sales point
<FromGitter> <bararchy> why? it's a thing over there? to sale to gov?
<livcd> just a thought
<livcd> seems like an odd choice for a new office
<FromGitter> <bararchy> it is, it's unique :) lot's of smart ppl looking for things to do, not much opurtinity etc.. so easy to find employees
<mps> and good coffee, I must add ;)
<mps> summers are hot there
<FromGitter> <bararchy> we currently have 35(c)
<FromGitter> <bararchy> what is hot? XD
<mps> heh, for us in continental Europe that is too much
<mps> although last few years it seems we need to start accommodating to these temp's
<FromGitter> <yxhuvud> Most summers we hit 30 once or twice, perhaps.
<FromGitter> <j8r> Any ideas why YAML and JSON doesn't share the same annotations for `Serializable`?
<FromGitter> <pynixwang> can I define a generic function?
<FromGitter> <alex-lairan> @pynixwang like this ? ⏎ ⏎ ```def foo(bar : T) forall T ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5cebdcf19d64e537bc1d0fe0]
<FromGitter> <j8r> TIL in Python we can define a def inside a def
<FromGitter> <pynixwang> T is only function scope?
<FromGitter> <j8r> it defines a closure, https://en.wikipedia.org/wiki/Closure_(computer_programming)
<FromGitter> <pynixwang> another function T is another T?
<FromGitter> <Blacksmoke16> Yes
<FromGitter> <pynixwang> supprise feature
<FromGitter> <pynixwang> I do nt know before.
<FromGitter> <alex-lairan> A cool one, but with limitations when used with `yield` arguments ;)
_whitelogger has joined #crystal-lang
<FromGitter> <Blacksmoke16> @mwlang np
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
<FromGitter> <pynixwang> what `compiler_rt` do?
<FromGitter> <Blacksmoke16> https://forum.crystal-lang.org/t/introducing-crylog/797 made a forum post to officially announce Crylog
<FromGitter> <j8r> Why you add `[..] of T` in https://github.com/Blacksmoke16/crylog/tree/master/docs
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <j8r> It disrupts me 😅
<FromGitter> <j8r> vs just `[..]`
<FromGitter> <Blacksmoke16> oh, because of https://play.crystal-lang.org/#/r/6yc2
<FromGitter> <j8r> this is for ivars
<FromGitter> <j8r> but here, this are variables
<FromGitter> <Blacksmoke16> i just tried it
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cebeb7f75d9a575a652d9a1]
<FromGitter> <Blacksmoke16> `instance variable '@handlers' of Crylog::Logger must be Array(Crylog::Handlers::LogHandler), not Array(Crylog::Handlers::IOHandler)`
<FromGitter> <j8r> I guess that the same as doing `a : Array(String) = ["a"]`
<FromGitter> <Blacksmoke16> it works fine w/o the of T when there are two diff types of handlers, but when its just one it doesnt resolve that its still of a parent type
<FromGitter> <j8r> that's quite strange?
<FromGitter> <Blacksmoke16> :shrug: dont need to tell me that :p
<FromGitter> <j8r> but why are you telling its `LogHandler`?
<FromGitter> <j8r> they are `IOHandler` in fact
<FromGitter> <j8r> sorry, that's the opposite
<FromGitter> <Blacksmoke16> LogHandler is the parent struct type
<FromGitter> <j8r> could be a `property` i think
<FromGitter> <Blacksmoke16> doesnt return self
<FromGitter> <Blacksmoke16> which is helpful when configuring the logger so you dont have to do
<FromGitter> <j8r> 👍
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cebecd6ad024978c639c17c]
<FromGitter> <Blacksmoke16> not end of the world, just cleans it up a bit
<FromGitter> <j8r> If you use composition instead?
<FromGitter> <j8r> maybe a bug of inheritance of structs
<FromGitter> <Blacksmoke16> same thing happens with classes
<FromGitter> <Blacksmoke16> prob is/was an issue for it somewhere
<FromGitter> <Blacksmoke16> planning on doing a blog post on this + the DI stuff i been working on. they work well together as you could use DI to set the user on a like `UserStore`, then inject the same `UserStore` object into a processor so all loggers using that processor just magically get user info attached to them
<FromGitter> <j8r> Looks good, starred
<FromGitter> <j8r> IMO the https://github.com/Blacksmoke16/crylog/tree/master/docs#core-concepts can be moved to the main `README.md`
return0e_ has joined #crystal-lang
<FromGitter> <Blacksmoke16> 👍 makes sense
<FromGitter> <Blacksmoke16> i could go wit hthat
<FromGitter> <Blacksmoke16> monolog has a ton of handlers, https://github.com/Seldaek/monolog/tree/master/src/Monolog/Handler got some catching up to do :p
return0e has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
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
laaron has quit [Client Quit]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <alex-lairan> Hello ! ⏎ ⏎ when I use macro and yield, I play do this : ⏎ ⏎ ``` macro foo(a) ⏎ with Bar.new({{a}}) {{yield}} ⏎ end``` ... [https://gitter.im/crystal-lang/crystal?at=5cec0bf8879f4478c7efaee8]
sz0 has joined #crystal-lang
ShalokShalom has joined #crystal-lang
ShalokShalom has quit [Remote host closed the connection]
<FromGitter> <watzon> Intresting, it looks like the regex `[:print:]` is different in Ruby and Crystal. In Ruby it seems to cover unicode, but in Crystal it doesn't and you have to use `\P{Cc}` instead
<FromGitter> <tenebrousedge> does that sound like it might be worth a bug report?
wymillerlinux has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <asterite> Crystal uses pcre, Ruby uses oniguruma. Different regex engines, different capabilities
<FromGitter> <drum445> Hello, how do I get a websocket server listening on the same port as my normal http server?
<FromGitter> <drum445> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cec4512879f4478c7f13ced]
<FromGitter> <watzon> @asterite that makes sense. I didn't realize that Ruby wasn't using PCRE
<FromGitter> <watzon> Anyway, apparently GitHub just acquired dependabot. It would be awesome if someone opened a PR to add shards support, could be grwat exposure for Crystal.
wymillerlinux_ has joined #crystal-lang
wymillerlinux has quit [Ping timeout: 268 seconds]
wymillerlinux_ is now known as wymillerlinux
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 258 seconds]