PorcoRex

Activity Graph

Page 1 of 3 | Next »

2017-09-28

[01:47:14] PorcoRex: has joined #ruby
[01:47:22] PorcoRex: Evening Ruby.
[02:47:19] PorcoRex: Quit: Leaving

2017-09-16

[03:20:04] PorcoRex: has joined #ruby
[03:20:08] PorcoRex: Good night.
[03:20:14] PorcoRex: Or morning.
[03:23:45] PorcoRex: tamouse__, night.
[06:35:50] PorcoRex: Quit: Leaving

2017-08-26

[02:28:45] PorcoRex: has joined #ruby
[02:28:50] PorcoRex: Good evening.
[04:21:30] PorcoRex: Quit: Leaving

2017-08-15

[02:02:38] PorcoRex: has joined #ruby
[02:02:52] PorcoRex: Evening Ruby.
[03:42:39] PorcoRex: Quit: Leaving

2017-08-02

[01:36:14] PorcoRex: has joined #ruby
[02:17:15] PorcoRex: lamduh, what do you program in?
[02:19:05] PorcoRex: lamduh, and how much experience would you say you have with the one you feel most confortable?
[02:21:06] PorcoRex: You can do Rails just fine then, but might miss on some of the subtelties of Ruby.
[02:22:44] PorcoRex: Well, how confortable are you with the following sentence: "Constants are not contant in Ruby." or "Classes are objects that have a class."?
[02:24:54] PorcoRex: lamduh, right. So you probably want to start with something intermediate.
[02:25:08] PorcoRex: Just to get the "feel" for it.
[02:25:33] PorcoRex: And then move to more advances stuff.
[02:28:03] PorcoRex: lamduh, I would recommend the well grounded ruby book. I've read it a while back (meaning I'm not sure if there are newer versions) but it is a good one imho.
[02:28:17] PorcoRex: *The Well Grounded Rubyist
[02:29:03] PorcoRex: lamduh, good luck.
[02:30:58] PorcoRex: It's not necessarily bad to do Rails first and Ruby later, but I think as a seasoned programmer you'll gain more by feeling the language before the framework.
[03:59:06] PorcoRex: ar1a, it seems like a heavy job. Could you splice it in smaller questions_
[04:02:19] PorcoRex: So this is a JavaScript source file. What would be the question in a Ruby context_
[04:05:47] PorcoRex: I'm sorry, but this is not a question. What you need is a JS to Ruby transpiler, but I,m not sure one exists.
[04:12:53] PorcoRex: ar1a, recapping, you have JS files you want to rewrite in Ruby?
[04:13:53] PorcoRex: How many lines of code, more or less, are we talking about.
[04:15:27] PorcoRex: That's doable.
[04:15:50] PorcoRex: Ok, so what's the question about the conversion?
[04:19:04] PorcoRex: This is indeed interesting. I'm not sure if there are JS promise-like structures in Ruby.
[04:20:40] PorcoRex: ar1a no, why would you do it another way?
[04:24:08] PorcoRex: ar1a, so Promises in JS are not really concurrent. (or are they? IDK)
[04:25:23] PorcoRex: The main problem seems to be, how can we be concurrent in Ruby, and efficient, and not stepping on our toes?
[04:25:45] PorcoRex: And JS, God bless its heart.
[04:26:20] PorcoRex: bougyman, we can use, but we must understand how it works.
[04:41:08] PorcoRex: Remote host closed the connection

2017-07-29

[01:15:39] PorcoRex: has joined #ruby
[01:15:51] PorcoRex: Good evening Ruby.
[03:36:57] PorcoRex: Quit: Leaving

2017-07-18

[02:00:15] PorcoRex: has joined #ruby
[02:00:24] PorcoRex: Evening Ruby.
[02:12:19] PorcoRex: jaequery, do you have any background in development? And in web development?
[02:14:40] PorcoRex: This garbage collector is pretty extreme...
[02:16:04] PorcoRex: jaequery, I assume you're looking for a Rails reference for webdev?
[02:16:30] PorcoRex: Maybe they can give you a better assesment in their channel.
[02:18:48] PorcoRex: I'm not sure.
[02:19:11] PorcoRex: Not unlike this one.
[02:19:24] PorcoRex: Anyways, what level are you looking for? Basic?
[02:26:32] PorcoRex: willardg, hey.
[02:34:52] PorcoRex: jaequery, paid or free?
[02:36:33] PorcoRex: jaequery, well, you can buy this, but you can also read it online for free. I think it's a good starting point for Rails: https://www.railstutorial.org/book
[02:36:46] PorcoRex: Or at least it was way back when I originally read it.
[03:15:43] PorcoRex: So all n combinations and all n - 1 combinations, but no n - 2 ones?
[03:18:25] PorcoRex: Yeah, you probably will want to iterate from length to 1 and build that array, then join it.
[03:26:13] PorcoRex: Try permutation instead of combination.
[03:29:59] PorcoRex: No problem.
[03:43:12] PorcoRex: Quit: Leaving

2017-07-16

[03:47:59] PorcoRex: has joined #ruby
[03:48:15] PorcoRex: Good evening!
[06:48:36] PorcoRex: Remote host closed the connection

2017-07-14

[02:57:49] PorcoRex: has joined #ruby
[03:01:51] PorcoRex: elomatreb, I think they might be interested in a mock implementation.
[03:03:32] PorcoRex: Just came in, missed that one.
[03:07:00] PorcoRex: rubycoder37, you need to step back from you app and consider that we don not know anything about it. Then ponder on what the thing you don't completely understand is. Then as a question, with a simplified example for everyones convenience.
[03:18:52] PorcoRex: elomatreb, it's not an array though, it's a range.
[03:36:37] PorcoRex: rubycoder37, so let's say, you have an array of dates (is each representing a different calendar day?). And then if I understand correctly there is some sort of ammount (is this a single value representing an ammount?). After an operation we want (a new array? with what kind of values?)
[03:46:12] PorcoRex: Well, if you must employ a hash, what would be the key?
[03:47:18] PorcoRex: rubycoder37, what specification, you're designing this, right?
[03:48:04] PorcoRex: rubycoder37, ok. Assume that is terribly wrong. How would you rather do it?
[03:50:08] PorcoRex: rubycoder37, I'm sure you've had a couple of fringe ideas.
[03:50:16] PorcoRex: Did you not?
[03:51:51] PorcoRex: I mean, you've got dates... you've got ammounts. Are we leaving these two things out to fend for themselves or are we actually creating a class, that defines how both of these people can coexist peacefully?
[03:53:00] PorcoRex: And if we do create a shelter for these peoples, what should it be called? DateDollar? Not too friendly certainly.
[03:53:11] PorcoRex: Maybe the whole thing does not make sense.
[03:55:00] PorcoRex: rubycoder37, what do you think?
[04:03:39] PorcoRex: rubycoder37, seems a bit of a Rails question.
[04:04:07] PorcoRex: But is it more query related?
[04:04:41] PorcoRex: I mean DB query.
[04:07:18] PorcoRex: But uhm, let me be blunt. So for instance in your latest reply you say you're listing "apps" for each "user", there are "dates", there are "stores". But in that latest explanation there is nothing about the "ammount", which was a principal issue. I think you need to give us a mock example of your problem instead.
[04:08:31] PorcoRex: rubycoder37, you need to try and sinthesise your problem.
[04:08:45] PorcoRex: rubycoder37, what is your problem, in a little box?
[04:21:46] PorcoRex: rubycoder37, your problem, it's hard to understand. What is it?
[04:38:35] PorcoRex: rubycoder37, this is definitely a Rails question. Do you have their IRC channel?
[04:39:30] PorcoRex: rubycoder37, before you go.
[04:40:20] PorcoRex: Keep on it, rubycoder37, don't give up.
[04:41:09] PorcoRex: rubycoder37, what loop?
[04:43:34] PorcoRex: Yeah, but what does that mean?
[04:46:55] PorcoRex: rubycoder37, I'm sorry rubycoder37, maybe it's just me, but the thing is you need to take your real problem and make it smaller.
[04:49:59] PorcoRex: Quit: Leaving

2017-07-12

[01:29:12] PorcoRex: has joined #ruby
[01:29:34] PorcoRex: Good evening Ruby!
[06:09:45] PorcoRex: Quit: Leaving

2017-07-11

[02:03:13] PorcoRex: has joined #ruby
[02:45:32] PorcoRex: :"something like this" is a Symbol, not a String.
[02:47:28] PorcoRex: elomatreb, strange, I'm pretty sure it worked. Let me check.
[02:48:19] PorcoRex: elomatreb, no wait... What I was saying is that my_symbols = :"something like this" assigns a symbol.
[02:48:32] PorcoRex: quixoticelixer, hey.
[02:51:42] PorcoRex: comet23, the thing is you can define Symbols that have spaces by using ":" followed by a quoted expresion, but that evaluates to a Symbol, not a String.
[02:52:23] PorcoRex: {"this key is a string" => 123}
[02:52:52] PorcoRex: {"this key is a symbol": 123} because it is the same as doing {:"this key is a symbol" => 123}
[02:53:15] PorcoRex: And :"this key is a symbol" is a Symbol, not a String.
[02:54:38] PorcoRex: comet23, it's interpreted the same way by Ruby. It's just a bit of "syntactic sugar".
[02:55:21] PorcoRex: comet23, always use them except when your keys are Symbols.
[02:57:16] PorcoRex: comet23, not exactly. They behave more like "named numbers". But that might only make sense to me without getting too deep into it.
[02:57:29] PorcoRex: They are like labels.
[02:59:58] PorcoRex: quixoticelixer, why are they mutable?
[03:02:52] PorcoRex: quixoticelixer, not technically, because ninjas are still japanese.
[03:05:52] PorcoRex: So about mutable strings...
[03:06:10] PorcoRex: I like them, not by default though.
[03:07:12] PorcoRex: elomatreb, that the mark of a good craftman.
[03:08:20] PorcoRex: elomatreb, you'll make me want to reconsider doing that too. :)
[03:16:04] PorcoRex: No offense guys, but you might want to stick with whatever language and get some in depth knowledge about it. It will make transitioning to other languages easier.
[03:17:38] PorcoRex: elomatreb, oh man... I've been trying Haskell (learning, not coding) and my head is about to explode. It's seriously awesome, but I don't think I'm smart enough for it.
[03:20:08] PorcoRex: Will keep on busting my head against it for awhile.
[03:54:04] PorcoRex: Quit: Leaving

2017-06-28

[04:32:53] PorcoRex: has joined #ruby
[07:15:44] PorcoRex: Quit: Leaving

2017-06-24

[05:04:06] PorcoRex: has joined #ruby
[05:04:11] PorcoRex: Good evening.
[05:12:29] PorcoRex: foswiki_irc9, also ask for a cloack. Those are cool!
[05:13:46] PorcoRex: It's like a child discovering a record player for the very first time.
[05:15:01] PorcoRex: foswiki_irc9, don't worry. IRC is true and tested. Enjoy your stay!
[05:16:22] PorcoRex: For me it's less faces, but I'm only speaking for myself.
[06:57:00] PorcoRex: latemus, no. A gem is the equivalent of a library.
[07:30:50] PorcoRex: Remote host closed the connection

2017-06-16

[01:17:43] PorcoRex: has joined #ruby
[01:17:49] PorcoRex: Good evening.
[02:03:48] PorcoRex: Quit: Leaving

2017-06-14

[01:16:54] PorcoRex: has joined #ruby
[01:17:03] PorcoRex: Good evening.
[03:33:25] PorcoRex: Remote host closed the connection

2017-06-09

[01:42:35] PorcoRex: has joined #ruby
[01:42:39] PorcoRex: Good evening.
[05:55:22] PorcoRex: Quit: Leaving

2017-06-03

[01:04:11] PorcoRex: has joined #ruby
[01:04:16] PorcoRex: Good evening.
[01:15:36] PorcoRex: t-recx, :) Family.
[05:25:05] PorcoRex: Phanes, could you give some context to your question?
[05:27:45] PorcoRex: Phanes, ok. But in the meantime, what error are you getting? And how does Ruby exactly interacts with Docker containers?
[05:29:04] PorcoRex: Phanes, please do.
[05:38:13] PorcoRex: Phanes, I had a similar problem before. Did you try following the output "running `bundle update omniauth-google-oauth2` should fix the problem." ?
[05:39:52] PorcoRex: Phanes, right, but did you try updating omniauth-google-oauth2 ?
[05:41:08] PorcoRex: I understand the output, but did you update the Gemfile.lock by running "bundle update omniauth-google-oauth2" ?
[05:42:29] PorcoRex: Did that update your Gemfile.lock?
[05:43:26] PorcoRex: Are you refering to Docker's cache?
[05:43:57] PorcoRex: Phanes, I assure you sir. I'm really this stupid.
[05:45:03] PorcoRex: Any takers?
[05:47:30] PorcoRex: Phanes, I hope what you're doing is a hobby project, because if it isn't, you'll certainly not find a solution in time.
[05:49:06] PorcoRex: Phanes, you can remove them, but the you'll say I'm dumb because removing lockfiles is not the smartest thing to do.
[05:49:34] PorcoRex: So if I recommend removing them I would be dumb, and in turn you would be dumb as well.
[05:50:39] PorcoRex: Phanes, can we start this all over again? No hard feelings?
[05:50:54] PorcoRex: Phanes, ok, what is your problem?
[05:53:10] PorcoRex: Gee... That's a pretty long error Phanes.
[05:54:45] PorcoRex: Phanes, no, that's not it.
[05:54:56] PorcoRex: Phanes, "Downloading omniauth-google-oauth2-0.4.1 revealed dependencies not in the API or the lockfile (omniauth-oauth2 (>= 1.3.1), jwt (~>
[05:55:31] PorcoRex: Phanes, can we have that complete Gemfile line?
[05:55:49] PorcoRex: Phanes, 260-
[05:56:14] PorcoRex: Phanes, how about the Gemfile.lock?
[05:57:32] PorcoRex: Gee, that's scrappy. Alright...
[05:59:07] PorcoRex: Phanes, I didn't say that. Did you try and fail to bundle update that gem?
[06:00:20] PorcoRex: Ok... Let's check it...
[06:04:18] PorcoRex: Phanes, what version of bundler are you using?
[06:10:42] PorcoRex: Phanes, could you try using bundler v1.15.0.pre.3 instead?
[06:12:30] PorcoRex: Good first step.
[06:14:04] PorcoRex: Phanes, could you provide the output?
[06:20:55] PorcoRex: Phanes, did you try what you tried on line 266?
[06:21:05] PorcoRex: On the previous bundle version?
[06:22:32] PorcoRex: Phanes, what Ruby version are you using?
[06:27:30] PorcoRex: You assume way too much. Locks are intended to lock versions.
[06:31:21] PorcoRex: Phanes, there is a new patch version for the state_machines-activerecord gem. Version 0.4.0 is from May 2016 while version 0.4.1 if newer. Do you think you could update it?
[06:35:24] PorcoRex: Phanes, sir?
[06:36:58] PorcoRex: Phanes, sir, where you able to solve your problem?
[06:40:43] PorcoRex: ┬┐Version 0.4.1?
[06:41:03] PorcoRex: Ok. Can we see the error log?
[06:41:26] PorcoRex: I'll wait for it, no worries.
[06:45:01] PorcoRex: I'm not too bright. Does that mean good or bad?
[06:49:11] PorcoRex: Phanes, that does look cleaner. What do you think it means?
[06:50:07] PorcoRex: Phanes, yes, I agree. Anyways. I have to go. Have a great weekend everyone.
[06:50:48] PorcoRex: has left #ruby: ("Leaving")

2017-06-01

[02:06:25] PorcoRex: has joined #ruby
[02:06:39] PorcoRex: Evening #Ruby-
[02:16:09] PorcoRex: _blaze_ SecureRandom is part of Ruby's standard library, so you should be able to require it in most cases.
[02:16:41] PorcoRex: _blaze_ your second concern needs a bit more explanation.
[05:48:16] PorcoRex: Remote host closed the connection

2017-05-30

[01:16:34] PorcoRex: has joined #ruby
[01:16:38] PorcoRex: Good evening.
[01:23:39] PorcoRex: knamehost, there are several good resources. Are you a developer already? A beginner?
[01:35:38] PorcoRex: knamehost, this is probably a nice one to step your toe: http://poignant.guide/
[01:36:33] PorcoRex: knamehost, sure, enjoy.
[01:53:30] PorcoRex: Arahael, === is case equality. The operator can be overridden to give "better" matches, generally (and, in my opinion, preferably) on case statements.
[01:55:28] PorcoRex: Arahael, it's completely different from JS in that sense. Not even close.
[02:02:01] PorcoRex: Radar, seriously? I just read it was reserved for future use.
[04:08:47] PorcoRex: Quit: Leaving

2017-05-27

[01:41:07] PorcoRex: has joined #ruby
[03:20:57] PorcoRex: b0mbnet, are you in search for where the local variable is defined, and not the method? I'm not sure that's possible, but I'd imagine that is one long method you're working with.
[03:24:41] PorcoRex: b0mbnet, local variables should be encapsulated by a method. Do you know what this method is?
[03:30:53] PorcoRex: How does "desc" work? It doesn't seem it should.
[03:36:48] PorcoRex: b0mbnet, is the error we see in the snippet the one you're getting?
[03:37:00] PorcoRex: "uninitialized constant V1::Grape (NameError)"
[03:37:41] PorcoRex: What would be the actual error you're getting?
[03:40:09] PorcoRex: I hate to bring this again, but I'm not sure how this would work "desc 'create order' params do --- end post do --- end" without commas or anything.
[03:41:53] PorcoRex: elomatreb, ah, sorry. You're right, it's similar to a Rakefile.
[03:45:07] PorcoRex: b0mbnet, you mean that inside the "post" block "params" is a local variable?
[03:46:31] PorcoRex: You have to be careful, because both "params" and "post" aren't defining methods, but are method calls with passed blocks.
[03:47:37] PorcoRex: So "params" is a "class" method of Orders. It is not an instance method.
[03:48:43] PorcoRex: b0mbnet, that's the problem, because outside post, "params" is a class method V1:Orders.
[03:49:13] PorcoRex: I think... although there might be some magic going on.
[03:53:15] PorcoRex: b0mbnet, can you place a breakpoint inside "post" and perform "method(:params).owner"?
[03:54:23] PorcoRex: Right. It's an instance method.
[03:54:46] PorcoRex: Could you do the same, but this time right after the "desc" line?
[03:55:02] PorcoRex: Between 4 and 5?
[03:56:18] PorcoRex: Right, it's a class method.
[03:56:34] PorcoRex: None are local variables. They are just different methods.
[04:02:03] PorcoRex: There is no local variable both "params", inside and outside are different methods. Not variables.
[04:04:43] PorcoRex: elomatreb, but "method(:params).owner" returned Grape::Endpoint.
[04:04:51] PorcoRex: Inside the block.
[04:07:12] PorcoRex: Ok, I think I've missed something then. I thought the confusion was because the call to "params" from withing "post" wasn't the one expected.
[04:13:21] PorcoRex: b0mbnet, If you assign to "params" then that will be a local variable.
[04:15:08] PorcoRex: I'm no expert, but I think it doesn't work that way. Try calling params "xparams", for instance.
[04:15:36] PorcoRex: Then we can discuss.
[04:17:25] PorcoRex: Rename the assignments to something else instead of params. Like "xparams = <something>"
[04:18:13] PorcoRex: And, tbh, I'm just guessing.
[04:19:57] PorcoRex: Are we still getting local var?
[04:20:26] PorcoRex: I think we'll need to take a look at the whole method.
[07:57:03] PorcoRex: Quit: Leaving

2017-05-25

[07:34:06] PorcoRex: Remote host closed the connection