<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>
<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>
<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>
<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>
<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…]
<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.
<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
<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>
<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?
<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 ?
<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>
<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]
<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