ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.22.0 | Fund Crystal's 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
Raimondi has quit [Write error: Broken pipe]
justinmcp_ has joined #crystal-lang
dostoyes1ky has joined #crystal-lang
pleiosau1 has joined #crystal-lang
dostoyesvky has quit [Remote host closed the connection]
bmcginty has quit [Remote host closed the connection]
badeball_ has joined #crystal-lang
wmoxam_ has joined #crystal-lang
Raimondi has joined #crystal-lang
pabs_ has joined #crystal-lang
big has joined #crystal-lang
leex has joined #crystal-lang
leex_ has quit [Write error: Broken pipe]
bazaar_ has joined #crystal-lang
jfontan has quit [Quit: Ping timeout (120 seconds)]
havenwood has quit [Excess Flood]
pabs has quit [Remote host closed the connection]
havenn has joined #crystal-lang
havenn has joined #crystal-lang
wmoxam has quit [Write error: Broken pipe]
justinmcp has quit [Write error: Broken pipe]
shelvacu has quit [Excess Flood]
bazaar has quit [Remote host closed the connection]
badeball has quit [Write error: Broken pipe]
havenn is now known as havenwood
pleiosaur has quit [Remote host closed the connection]
shelvacu has joined #crystal-lang
jfontan has joined #crystal-lang
jfontan has quit [*.net *.split]
xiljin has quit [*.net *.split]
jfontan has joined #crystal-lang
tliff_ has quit [Ping timeout: 244 seconds]
_riddley has quit [Ping timeout: 255 seconds]
xiljin has joined #crystal-lang
bmcginty has joined #crystal-lang
hightower2 has quit [Ping timeout: 258 seconds]
tliff has joined #crystal-lang
early has quit [Quit: Leaving]
early has joined #crystal-lang
dostoyes1ky is now known as dostoyevsky
big has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<FromGitter> <bigtunacan> @fridgerator thanks; it would have to be on Postgres. 😞
<FromGitter> <bigtunacan> @drujensen that makes sense. I looked through a couple of email related RFCs today. Hadn't really considered that the content and the transport are really separate standards.
zipR4ND has quit [Ping timeout: 255 seconds]
<FromGitter> <fridgerator> @bigtunacan Yeah seems like a pretty big big to me
<FromGitter> <bigtunacan> Yeah; I'm asking myself if it will be easier to patch the shard or to switch to MySQL
<FromGitter> <fridgerator> It happened between the last 2 versions
<FromGitter> <bigtunacan> Yeah; I read through the issues you opened on the relevant shards.
<FromGitter> <bigtunacan> It's only been about 2 months since it was last updated; is Will still active on it?
<FromGitter> <bigtunacan> Or has he moved on?
<FromGitter> <fridgerator> Doesn't seem very active, seems like it's mostly @bcardiff now
<FromGitter> <fridgerator> I skimmed through the PR before, it wasn't immediately obvious where the problem came from (to me anyways)
<FromGitter> <fridgerator> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5948847788348abd0aaacf8f]
<FromGitter> <fridgerator> is there any way to kill the loop in that spawn? after setting the instance to nil, it keeps on looping
pduncan has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite closed pull request #4566: MatchData: support negative index (master...feature/regex-match-data/support-negative-index) https://git.io/vHdfq
<travis-ci> crystal-lang/crystal#2f5f9bf (master - MatchData: support negative index): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/244773032
_whitelogger has joined #crystal-lang
Lurking has joined #crystal-lang
Lurking has quit [Client Quit]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
<FromGitter> <elorest> One problem with crystal is that Crystal User Group will never SEO well lol.
<Yxhuvud> why not?
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <redcodefinal> What method are people using to do http get requests? Something like httparty (https://github.com/jnunemaker/httparty)?
<FromGitter> <bew> @ziprandom awesome work!
<FromGitter> <bew> @redcodefinal why not use `HTTP::Client` class from stdlib?
<FromGitter> <bew> @fridgerator not this way, to stop the loop, you'll need a channel, in which you send something to act as an event to break the loop for example
<FromGitter> <bew> The nil assignment doesn't do anything by itself, you assigned nil to the variable x. Now the gc knows that the Thing instance can be collected, maybe later
<FromGitter> <bew> But even then, the instance collection wont stop the spawned fiber.. (see above)
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <r3bo0t> ===anyone In my current project, I was using mysql with crystal language, and using #topaz https://github.com/topaz-crystal/topaz for the same.===
<FromGitter> <r3bo0t> Is there any other better mysql adapter for crystal or which one is more upto date
<FromGitter> <r3bo0t> ?
xiljin has quit [Ping timeout: 255 seconds]
xiljin has joined #crystal-lang
frodsan has joined #crystal-lang
frodsan has quit [Client Quit]
<FromGitter> <frodsan> Hello, any idea why this code doesn't work? https://gist.github.com/frodsan/3bb88d2b4fdfc19466779112a0b7a6c8
<havenwood> frodsan: include Sugar
<FromGitter> <straight-shoota> Or `Sugar.test "user is active" ...`
<FromGitter> <straight-shoota> Although I wouldn't recommend using a macro for this because macros are slow. Why not type `def test_user_is_active` directly?
<FromGitter> <frodsan> I just playing with Crystal
<FromGitter> <frodsan> what it can/can't do
<FromGitter> <frodsan> `include Sugar` worked, thanks!
Philpax_ has quit [Ping timeout: 276 seconds]
<crystal-gh> [crystal] akzhan opened pull request #4598: Enum.to_sym for regular enums. (master...enum.to_sym) https://git.io/vQfPB
literal_ is now known as literal
zipR4ND has joined #crystal-lang
<crystal-gh> [crystal] akzhan closed pull request #4598: Enum.to_sym for regular enums. (master...enum.to_sym) https://git.io/vQfPB
<FromGitter> <umutuluer> hello, which ide do you use?
<RX14> there isn't really an IDE for crystal yet
<RX14> do you already have a preferred editor?
<FromGitter> <umutuluer> i prefer vs code but i want to a completely ide that like pycharm, phpstorm, visual studio
<FromGitter> <sdogruyol> @umutuluer unfortunately there isnt any
<RX14> you'll probably be waiting quite a while for an IDE
<RX14> also there's like 5 crystal vscode plugins which is kinda annoying
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> Sublime Text plugin is quite good though
<RX14> i use the emace plugin
<RX14> which sucks
<RX14> i shoul.d really work on it one days
<RX14> emacs*
<RX14> this one looks updated recently
<FromGitter> <umutuluer> actually community can develop a plugin that works in rubymine? it sounds good =)
<RX14> i think thats unlikely to happen
<FromGitter> <umutuluer> not only ruby mine, for jetbrains products
<RX14> doing an ide in rubymine would require reimplementing the typing in rubymine
<FromGitter> <r3bo0t> vim plugin(s) for crystal is quite decent if you are comfirtable with vim :)
<RX14> which i would go so far as to say is currently realistically impossible
<RX14> crystal's type inference algorithm is currently not formal
<RX14> and it's specification is basically the compiler source itself
<RX14> so it'll be hard to reproduce correctly
zipR4ND has quit [Ping timeout: 260 seconds]
zipR4ND has joined #crystal-lang
hightower2 has joined #crystal-lang
Kug3lis has joined #crystal-lang
Kug3lis has quit [Ping timeout: 240 seconds]
Kug3lis has joined #crystal-lang
<FromGitter> <ziprandom> thinking about how to implement subscriptions for graphql-crystal. seems the standard is mqtt but there is no server library (not even for ruby it seems). any experience with mqtt? how hard would it be to implement it in pure crystal (not linking the mosquitto library)?
Kug3lis has quit [Read error: No route to host]
Kug3lis has joined #crystal-lang
imnotarobot has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> Please read my little story at https://carc.in/#/r/27z9/edit and answer the question. Thank you
<FromGitter> <ziprandom> https://carc.in/#/r/27za ?
<FromGitter> <LuckyChicken91_twitter> Oh thank you. Now I can tell jeff how to become an array
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <straight-shoota> do you want the first or second jeff to become an array?
<FromGitter> <straight-shoota> > "['h', 1, 512, 'f']".split
splitty__ has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
splitty___ has quit [Ping timeout: 246 seconds]
Kug3lis has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> the first
<FromGitter> <straight-shoota> then the resulting array with `.split` would be `["['h',", "1,", "512,", "'f']"]`
<FromGitter> <LuckyChicken91_twitter> yes
<FromGitter> <LuckyChicken91_twitter> and how can I make this to an normal array
<FromGitter> <straight-shoota> You want to parse the string `"['h', 1, 512, 'f']"` as it would be as Crystal source code?
<FromGitter> <bew> using JSON you can get: https://carc.in/#/r/27zn
<FromGitter> <bew> but `'h'` is translated as a String
<FromGitter> <bew> and you need to know what types you have in the array in advance
<FromGitter> <LuckyChicken91_twitter> yes
<FromGitter> <LuckyChicken91_twitter> i want that jeff is a normal Array
<FromGitter> <straight-shoota> If you need the values in the array to have exact types (Char and Int32), you have to write your own parser
<FromGitter> <LuckyChicken91_twitter> oh wew
<FromGitter> <straight-shoota> Or if these are the only types, you can use the JSON parser from bew's example and convert the strings to char
<FromGitter> <straight-shoota> https://carc.in/#/r/27zq
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <LuckyChicken91_twitter> im getting an error
<FromGitter> <LuckyChicken91_twitter> instantiating 'Array(Int32 | String):Class#from_json((String | Nil))'
<FromGitter> <akzhan> why not ⏎ ⏎ jeff = [«h», 1, 512, «f» ]
<FromGitter> <akzhan> Or jeff = %w( h 1 512 f )
<FromGitter> <akzhan> if you need to parse string, write parser or create your own
<FromGitter> <akzhan> JSON, CSV whateever you want
<FromGitter> <straight-shoota> I fear your suggestions might be a bit confusing...
<FromGitter> <straight-shoota> whats with the guillemets? `«` :D
<FromGitter> <akzhan> :sparkles:
<FromGitter> <straight-shoota> Lucky, what are you trying to do?
<FromGitter> <LuckyChicken91_twitter> im taking an array out of an file
<FromGitter> <LuckyChicken91_twitter> because i want to save it
<FromGitter> <LuckyChicken91_twitter> and this array is just containing strings
<FromGitter> <LuckyChicken91_twitter> and im programming OOP
<FromGitter> <LuckyChicken91_twitter> and now im getting an error
imnotarobot has quit [Quit: Page closed]
Kug3lis has joined #crystal-lang
snapcase has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
<FromGitter> <fridgerator> @elorest ll
<FromGitter> <fridgerator> @straight-shoota macros are slow?
<FromGitter> <fridgerator> @ziprandom I see a couple of starter projects : http://crystalshards.xyz/?filter=mqtt
salvor has joined #crystal-lang
<FromGitter> <straight-shoota> @fridgerator yes, they are ⏎ just a simple and of course not very meaningful example: compiling `crystal eval 'macro foo; puts "foo"; end; foo'` takes about twice as long as `crystal eval 'def foo; puts "foo"; end; foo'`
<FromGitter> <straight-shoota> macros are indeed a really great feature! but due to the performance penalty they should usually be avoided unless they provide a significant benefit
<FromGitter> <fridgerator> Oh you mean slower to compile, ok
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greengriminal has joined #crystal-lang
<FromGitter> <bew> Where is `(expr1; expr2)` notation useful ? (from https://github.com/crystal-lang/crystal/pull/4592#issuecomment-309790250)
<bmcginty> Anyone know if there's a way to throw an exception into a proc? I've got a couple handlers that I would love to be abel to raise an exception in.
<FromGitter> <bew> bmcginty, well... `raise YourException.new` ?
<FromGitter> <bew> https://carc.in/#/r/281a
<bmcginty> Ah. I wanted to be able to selectively have that exception raised from calling the proc. so in your example, my_proc would have teh begin rescue block inside it, and could be called with the exception as it's argument somehow. It sounds more goofy each time I think of it, so never mind. Thank you though.
Kug3lis has joined #crystal-lang
<oprypin> bew, i dont know where it's useful, didnt know about it. maybe for overly verbose if statements
<oprypin> if (a = x+3; a*6 > 13); return a; end
<FromGitter> <bew> oh yeah maybe, good idea
<Yxhuvud> it is good for writing oneliners in the sandbox :P
tatey has quit [Quit: ZNC - http://znc.in]
tatey has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Renich_ has joined #crystal-lang
Renich_ has quit [Remote host closed the connection]
Renich has joined #crystal-lang
<FromGitter> <kazzkiq> How exactly am I suppose to make use of all the 16 cores in my server with Crystal?
<FromGitter> <kazzkiq> In Node for example, I can run it in “cluster mode” to deal with multiple cores. In Crystal we have something similar?
<FromGitter> <akzhan> read about kemal/amber and so_reuseport
<FromGitter> <fridgerator> There is some sample code here that uses server clustering, and `so_reuseport` in the http server listen call : http://blog.seraum.com/crystal-lang-vs-nodejs-vs-golang-vs-http-benchmark
<FromGitter> <akzhan> anyway while you IO-bound you need one CPU core )
<FromGitter> <kazzkiq> Will take a look, thanks for the tips.
<FromGitter> <akzhan> Crystal Amber framework provides multicore in the box.
<FromGitter> <fridgerator> and yeah, amber supports it just by setting environment variables and an option
imnotarboto has joined #crystal-lang
<imnotarboto> is there something like __END__ form ruby in crystal?
Kug3lis has joined #crystal-lang
<oprypin> imnotarboto, how about you specify the functionality you want?
<imnotarboto> do you know __END__ from ruby?
<oprypin> no
<imnotarboto> i want to cut off some code from my file (this means i want to set the end of the file)
<imnotarboto> if __END__ is reached in ruby then all the code below the __END__ will nerver get executed
<FromGitter> <akzhan> Absent
<FromGitter> <LuckyChicken91_twitter> Absent?
<imnotarboto> absent?
<FromGitter> <straight-shoota> Why would you need something like this in Crystal?
<oprypin> why would you need something like this ever?
<FromGitter> <akzhan> this feature is absent.
<FromGitter> <LuckyChicken91_twitter> what if i want to quickly to test some other code but dont want to create another file for that
<FromGitter> <jwoertink> The only time I've ever seen that used in ruby was to do a single file sinatra app with views
<FromGitter> <straight-shoota> Well, it can be useful at times to put payload data into a script, so you can distribute it with the program in one file
<FromGitter> <delef> Hi! I create a binding from the C library and I need to initialize a variable without a value, in order to pass the reference to the function. ⏎ ⏎ Example in C: ⏎ MMDB_s mmdb; ⏎ MMDB_open(filename, MMDB_MODE_MMAP, &mmdb); [https://gitter.im/crystal-lang/crystal?at=59496691cf9c13503ca6ffb6]
<FromGitter> <akzhan> uninitialized var : VarType
<FromGitter> <straight-shoota> But Crystal is compiled anyway, so you can just bake any data files into the executable
<FromGitter> <LuckyChicken91_twitter> just entering Absent isnt working
<FromGitter> <jwoertink> lol
<FromGitter> <jwoertink> He meant that feature doesn't exist
<FromGitter> <LuckyChicken91_twitter> "this feature is Absent"
<FromGitter> <LuckyChicken91_twitter> i thinked he is meaning a method named "Absent"
<oprypin> `mmdb_open(filename, MMDB_MODE_MMAP, out mmdb)`
<oprypin> simpler than uninitialized, dont need to define the var
<FromGitter> <akzhan> Simple use separate files. You may just render ‘em using ECR.embed for example. And it will be embedded into your application code.
<FromGitter> <LuckyChicken91_twitter> ECR embed?
<FromGitter> <delef> @akzhan undefined method 'uninitialized'
<FromGitter> <LuckyChicken91_twitter> is there btw an interactive crystal? like that theres an interactive ruby IRB
<FromGitter> <jwoertink> @LuckyChicken91_twitter https://github.com/greyblake/crystal-icr is about the closest we have in the console. Otherwise http://play.crystal-lang.org/
<oprypin> running `crystal play` is the best^
<FromGitter> <jwoertink> keep in mind that ICR doesn't work 100%. Lots of things are missing that you can't do
<FromGitter> <akzhan> @delef @oprypin is right. here is one of examples - https://github.com/crystal-lang/crystal/blob/master/src/math/math.cr#L234
<oprypin> i would say it's unusable^
<FromGitter> <jwoertink> I use it all the time
<FromGitter> <jwoertink> definitely not "unusable", just very limited
<FromGitter> <delef> @akzhan thanks)
<FromGitter> <LuckyChicken91_twitter> ICR! excatly what i searched for
<FromGitter> <straight-shoota> you cannot easily have a REPL console because every command needs to be compiled anew together with all previous commands and this means you loose context between two lines.
<FromGitter> <straight-shoota> but `crystal play` or https://carc.in are great tools to test some simple code
<FromGitter> <LuckyChicken91_twitter> what is so good about crystal play?
<FromGitter> <straight-shoota> just give it a try ;)
<FromGitter> <jwoertink> it boots a server that lets you play in the browser
<FromGitter> <straight-shoota> it is bundled with the compiler
<FromGitter> <jwoertink> you write your code out in the browser, then hit run and it compiles and gives you the output
<FromGitter> <LuckyChicken91_twitter> but i can too use carc.in... uuhm my server is always stopping!
<FromGitter> <LuckyChicken91_twitter> im gettin this /usr/bin/ld: cannot find -lz ⏎ /usr/bin/ld: cannot find -lssl ⏎ /usr/bin/ld: cannot find -lcrypto ⏎ /usr/bin/ld: cannot find -lcrypto ⏎ collect2: error: ld returned 1 exit status [https://gitter.im/crystal-lang/crystal?at=594968b7cf9c13503ca70d06]
<FromGitter> <LuckyChicken91_twitter> do i need to install ld?
<FromGitter> <elorest> Crystal play is awesome. What would be even cooler is if it used https://ace.c9.io/
<FromGitter> <elorest> how do carc.in and play.crystal-lang.org work?
<FromGitter> <elorest> Where is that code?
<FromGitter> <straight-shoota> you could create an issue for ACE editor
<FromGitter> <LuckyChicken91_twitter> do I need to install LD?
<FromGitter> <akzhan> ➜ xxx git:(master) ✗ crystal play ⏎ Listening on http://localhost:8080
<oprypin> i sure hope core devs wouldnt waste time on changing a perfectly fine editor
<FromGitter> <LuckyChicken91_twitter> hello?
<FromGitter> <LuckyChicken91_twitter> my server is always crashin
<FromGitter> <elorest> <oprypin> tabs have a lot of funky issues and vim mode is broken.
<FromGitter> <bew> Lucky you need to install libssl and libcrypto
<FromGitter> <straight-shoota> this does not need to be done by core devs
<FromGitter> <LuckyChicken91_twitter> oh okay
<FromGitter> <LuckyChicken91_twitter> sudo apt-get install libssl isnt working
<FromGitter> <akzhan> I like vscode. so here is https://github.com/Microsoft/monaco-editor
<oprypin> i like trains
<FromGitter> <LuckyChicken91_twitter> i like cows
<FromGitter> <bew> Lucky Then search on Google how to get them, it should be easy
<FromGitter> <elorest> I like lamp?
<FromGitter> <akzhan> what do you like today?)
<FromGitter> <jwoertink> :smile:
<FromGitter> <elorest> @akzhan Monaco Editor looks pretty decent but doesn’t have vim mode. Is there anything it does better than Ace?
<FromGitter> <elorest> Back on topic. What is the difference between carc.in and play.crystal-lang.org?
<oprypin> elorest, the domain name and selection of available languages
<FromGitter> <elorest> Ok.
<oprypin> points to the same server
<FromGitter> <LuckyChicken91_twitter> how can I install libcrypto
<FromGitter> <fridgerator> probably comes with openssl ?
<FromGitter> <LuckyChicken91_twitter> nope
<FromGitter> <LuckyChicken91_twitter> im still gettin /usr/bin/ld: cannot find -lz ⏎ /usr/bin/ld: cannot find -lssl ⏎ /usr/bin/ld: cannot find -lcrypto ⏎ /usr/bin/ld: cannot find -lcrypto [https://gitter.im/crystal-lang/crystal?at=59496aec5bf0bef94cc677cc]
<FromGitter> <fridgerator> libssl-dev
<FromGitter> <LuckyChicken91_twitter> im installing this right now
<FromGitter> <akzhan> brew install openssl ⏎ or harder brew unlink openssl && brew link openssl --force
<FromGitter> <fridgerator> he's on linux I think
<FromGitter> <straight-shoota> debian-based obviously
<FromGitter> <LuckyChicken91_twitter> its working
<FromGitter> <akzhan> Apt-get/yum nstall libel-dev or devel
<FromGitter> <straight-shoota> lucky, you should be more specific what commands you are running.
<FromGitter> <LuckyChicken91_twitter> im not on debian or ubuntu
<FromGitter> <LuckyChicken91_twitter> im on.. windows.
<FromGitter> <fridgerator> ah
<FromGitter> <LuckyChicken91_twitter> aah
<FromGitter> <straight-shoota> WSL?
<oprypin> but it is ubuntu >_>
<FromGitter> <akzhan> some sort of ubuntu )
<FromGitter> <LuckyChicken91_twitter> im using linux subsystem
<FromGitter> <LuckyChicken91_twitter> for windoofz
<FromGitter> <akzhan> apt-get instal libssl-dev
<FromGitter> <LuckyChicken91_twitter> its okay!
<FromGitter> <LuckyChicken91_twitter> already installed it
<FromGitter> <LuckyChicken91_twitter> works
<FromGitter> <LuckyChicken91_twitter> but the playground is really slow..
<FromGitter> <fridgerator> its not fast, has to compile every time
<oprypin> it waits before compiling, as well
<FromGitter> <LuckyChicken91_twitter> ik but compiling in shell takes not so long
<FromGitter> <LuckyChicken91_twitter> hmm for example "gets" or something like this isnt working
<oprypin> it is not needed in interactive mode
<oprypin> shouldnt say "interactive"
<oprypin> just assign a string to a variable
<oprypin> change it whenever you like
<FromGitter> <LuckyChicken91_twitter> i have hoped i can maybe code with others or something like that on the playground server
<FromGitter> <LuckyChicken91_twitter> this would be soo cool..
<FromGitter> <elorest> To code with others just use tmux or tmate on a vps. @LuckyChicken91_twitter
<FromGitter> <LuckyChicken91_twitter> hmm.. no. There must be a better solution!
<FromGitter> <elorest> Cloud9. Those solutions already work epicly!
<FromGitter> <LuckyChicken91_twitter> "Cloud 9 ⏎ E-Sport-Organisation"
<FromGitter> <elorest> lol
<FromGitter> <bigtunacan> c9.io
<FromGitter> <LuckyChicken91_twitter> what do you mean with an esportorganisation?
<FromGitter> <LuckyChicken91_twitter> oh
<FromGitter> <bigtunacan> Like @elorest says; it is pretty epic for remote pair programming.
<FromGitter> <elorest> Still prefer tmux/vim but c9 is pretty impressive.
<FromGitter> <straight-shoota> https://c9.io/
<crystal-gh> [crystal] mverzilli closed pull request #4542: Turn Random::System into a module (+docs) (master...random-module) https://git.io/vHyk6
<FromGitter> <LuckyChicken91_twitter> just look like an normal boring code editor.
<FromGitter> <jwoertink> @LuckyChicken91_twitter if you want to pair program with someone, the atom editor with `atom-pair` plugin works pretty nice.
<FromGitter> <LuckyChicken91_twitter> wuuut??! theres a solution for atom? awesome
<FromGitter> <LuckyChicken91_twitter> i already use atom
greengriminal has quit [Quit: Leaving]
<FromGitter> <LuckyChicken91_twitter> if im using atom-pair can I then see what the other is typing, where the cursor is etc
<FromGitter> <bigtunacan> @elorest I also use tmux + vim most of the time; but for all of those vim neophytes there is nothing easier to use than Cloud 9.
<FromGitter> <bigtunacan> I haven't looked at it for Crystal though; what if any support do they have?
<FromGitter> <jwoertink> yup. It uses pusher to show you what they type, and their cursor and such
zipR4ND has quit [Ping timeout: 240 seconds]
<FromGitter> <LuckyChicken91_twitter> okay uhm in the manual stands that i need to press "Command+Shift+P". But I dont have the "command"-key
<FromGitter> <jwoertink> it's the command pane, so whatever it is on windows. ctrl-shift+P ?
<FromGitter> <bigtunacan> Alt?
<FromGitter> <LuckyChicken91_twitter> then too a little window opens. But i cant enter commands. He is just searching for my files
<FromGitter> <jwoertink> exactly
<FromGitter> <jwoertink> that's what it's supposed to do
<FromGitter> <jwoertink> you search for the command you want and select it
<FromGitter> <LuckyChicken91_twitter> but.. he is just searching for files
<FromGitter> <LuckyChicken91_twitter> i cant find the command
<FromGitter> <LuckyChicken91_twitter> oh facepalm. I have pressed big-write-key. Not shift
<FromGitter> <fridgerator> heyooooo
<FromGitter> <LuckyChicken91_twitter> hmm now i have setted the pusher keys
<FromGitter> <LuckyChicken91_twitter> but hes still telling me that i should set the pusher keys
pduncan has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> oh its working no
pduncan has quit [Ping timeout: 240 seconds]
<FromGitter> <LuckyChicken91_twitter> where can I find my WebHook URL for Slack Incoming Integration ?
<travis-ci> crystal-lang/crystal#c0b2e33 (master - Turn Random::System into a module (+docs) (#4542)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/245065262
<DeBot> https://github.com/crystal-lang/crystal/pull/4542 (Turn Random::System into a module (+docs))
Papierkorb has joined #crystal-lang
imnotarboto has quit [Quit: Page closed]
<FromGitter> <jwoertink> Anyone here comfortable with pushing crystal up with docker on rancher? Do you build your project first, then push that up, or let the Dockerfile handle compiling?
<FromGitter> <fridgerator> I've deployed crystal docker containers to AWS and Digital Ocean. I generally have a dockerfile locally that compiles the binary, and a seprate dockerfile that I ship with the executable for running the service.
<FromGitter> <fridgerator> Doing it that way is just my preference
<FromGitter> <jwoertink> ah. So you run docker locally then?
<FromGitter> <fridgerator> to make the executable, yes
<FromGitter> <fridgerator> then either just deploy the executable, or another docker file that runs it
<FromGitter> <fridgerator> I wrote a blog post and sample application, if it helps: https://fridgerator.github.io/2017/03/30/deploying-a-crystal-application-to-aws-elastic-beanstalk-with-docker.html
<FromGitter> <fridgerator> of coarse you can always compile on the server, just requires more memory or swap sapce
<FromGitter> <jwoertink> oh nice! Thanks :D
pduncan has joined #crystal-lang
<FromGitter> <elorest> @bigu
<FromGitter> <elorest> @bigtunacan To do crystal in cloud9 I just choose c++ project and then install crystal via apt-get.
<FromGitter> <elorest> I choose ruby syntax in the editor.
Kug3lis has quit [Read error: Connection reset by peer]
Kug3lis has joined #crystal-lang
pduncan has quit [Ping timeout: 246 seconds]
<FromGitter> <elorest> Default instances don’t have enough memory to compile though so you need to setup a swap sapce.
<FromGitter> <bigtunacan> Cool
<FromGitter> <bigtunacan> Where/how are people hosting their Crystal/Kemal sites right now?
<FromGitter> <jwoertink> heroku
<FromGitter> <bigtunacan> Anywhere other than Heroku?
<FromGitter> <fridgerator> AWS
<FromGitter> <jwoertink> I'm gonna be pushing up to reflected soon
<FromGitter> <bigtunacan> Apparently you have pretty good SEO right now for "crystal kemal web hosting"
<FromGitter> <fridgerator> cool
<FromGitter> <fridgerator> I just linked a few lines up too
<FromGitter> <bigtunacan> LOL, I missed that
<FromGitter> <delef> ```code paste, see link``` ⏎ ⏎ can't take address of @@mmdb.as(LibMMDB::S) - why? [https://gitter.im/crystal-lang/crystal?at=59499147c98bc6d5638acaf1]
<FromGitter> <delef> If I write without .as: ⏎ ⏎ ```result = LibMMDB.lookup_string(pointerof(@@mmdb), ip, out gai_error, out mmdb_error)``` ⏎ ⏎ argument 'mmdb' of 'GeoIP2::LibMMDB#lookup_string' must be Pointer(GeoIP2::LibMMDB::S), not Pointer(GeoIP2::LibMMDB::S | Nil) [https://gitter.im/crystal-lang/crystal?at=59499203a44c60fa4c47033c]
<FromGitter> <delef> Help me! :(
<FromGitter> <jwoertink> try `some_method(pointerof(@@mmdb.not_nil!))`
<FromGitter> <delef> can't take address of @@mmdb.not_nil!
<FromGitter> <jwoertink> where is this `some_method` defined?
<FromGitter> <jwoertink> oh, I see LibMMDB
<FromGitter> <delef> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5949935602c480e67264fe5c]
<FromGitter> <delef> open_error -> raise
<FromGitter> <delef> anybody here?
<FromGitter> <jwoertink> yeah
<FromGitter> <jwoertink> What's the error you're getting?
<FromGitter> <delef> I described in the posts above
<FromGitter> <jwoertink> you said "can't take address of @@mmdb.not_nil!", but you didn't say *why* it can't take that.
<FromGitter> <delef> @jwoertink This is the error message, nothing else is output.
<FromGitter> <jwoertink> what OS and crystal version are you running?
<FromGitter> <delef> MacOS latest
<FromGitter> <jwoertink> what happens if you just pass `LibMMDB.lookup_string(@@mmdb.not_nil!, ip, out gai_error, out mmdb_error)`?
<oprypin> delef, you will have to drop the `?` from the instance variable
<oprypin> you can only take address of a variable, not an expression
<FromGitter> <oprypin> did gitter just randomly mix up which channels receive the messages
<FromGitter> <oprypin> no, whew, just an UI bug
<FromGitter> <delef> oprypin, I can't drop it. because I not have the initial value, only type
<oprypin> delef, well you'll have to turn it into some garbage then
<oprypin> uninitialized
<oprypin> i mean this whole singleton business is dubious
<FromGitter> <delef> class variable '@@mmdb' of GeoIP2 is not nilable (it's GeoIP2::LibMMDB::S) so it must have an initializer
<FromGitter> <delef> uninitialized @@mmdb : LibMMDB::S
<oprypin> `@@mmdb = uninitialized GeoIP2::LibMMDB::S` is the correct syntax
<oprypin> if you want to ensure that the garbage data is not used, keep a separate boolean initialized = false and always check, i dunno
ChickeNES has quit [Excess Flood]
Raimondi has quit [Remote host closed the connection]
SuperChickeNES has joined #crystal-lang
<FromGitter> <delef> You can show me an example?
<FromGitter> <delef> ou've found a bug in the Crystal compiler. :S
bmcginty_ has joined #crystal-lang
bmcginty has quit [Remote host closed the connection]
Raimondi has joined #crystal-lang
zipR4ND has joined #crystal-lang
pleiosau1 has quit [Remote host closed the connection]
leex_ has joined #crystal-lang
leex has quit [Write error: Broken pipe]
<oprypin> delef, why dont u paste that code
<FromGitter> <delef> Module validation failed: Stored value type does not match pointer operand type!
<oprypin> the source code
<oprypin> and what am i supposed to run?
<oprypin> seems to work, anyway
pleiosaur has joined #crystal-lang
<FromGitter> <delef> For example: ⏎ ⏎ ```GeoIP2.open("db/GeoLite2-City.mmdb") ⏎ GeoIP2.lookup("127.0.0.1")``` [https://gitter.im/crystal-lang/crystal?at=5949a0e86462d8493c32ba3e]
<oprypin> yeah why not just turn this into a normal class then? there's no reason to limit it to one instance, and even cause yourself difficulties by that
<oprypin> I can reproduce the error now
<FromGitter> <delef> Yes, I was going to make a class out of it, just at the moment I'm testing bindings.
<oprypin> i think that almost all problems are actually caused by it being a module
<oprypin> nah, reproduces with a class :>
<FromGitter> <delef> you get the same?
<oprypin> yes
<FromGitter> <delef> what could be the problem?
<oprypin> a bug
<oprypin> when you see this type of error, it's 100% a bug in crystal
<FromGitter> <delef> OK :( ⏎ I will wait for the solution of the problem, described in the issue ⏎ ⏎ Thank for your help! [https://gitter.im/crystal-lang/crystal?at=5949a4a702c480e672654eb8]
<oprypin> delef, https://carc.in/#/r/285c
<oprypin> please post this reproduction code
<oprypin> because the thing you posted cannot reproduce it, just just a small part of the picture
<oprypin> eh i guess i'll post it myself
<oprypin> delef, seems like a problem with type deduction maybe. i suggest you to try getting rid of `out` arguments until it works
<oprypin> for example this seems to unblock it
<oprypin> `gai_error = uninitialized LibC::Int; mmdb_error = uninitialized LibC::Int; result = LibMMDB.lookup_string(pointerof(@mmdb), ip, pointerof(gai_error), pointerof(mmdb_error))`
<oprypin> as a temporary solution - but it's functionally the same, and maybe makes things clearer for someone who reads the code
<FromGitter> <delef> you're right. Strange, but without them works.
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bmcginty_> Does anyone have any methods for tracking down gc finalization cycle errors in crystal?