Exuma

Activity Graph

Page 1 of 5 | Next »

2019-06-17

[18:05:53] Exuma: has joined #elixir-lang
[18:05:53] Exuma: has joined #RubyOnRails
[18:06:00] Exuma: has joined #ruby
[18:07:46] Exuma: if i do an early return in a function simply by saying "return"
[18:07:49] Exuma: is that returning true or false
[18:08:07] Exuma: havenwood ok thank you
[18:08:41] Exuma: &>> def exuma; return end; exuma
[18:08:44] Exuma: interesting
[18:09:49] Exuma: &>> def exuma; return end; exuma()
[18:10:50] Exuma: i didnt know methods could even be capitalized
[18:13:40] Exuma: ah, i suppose i did as i use BigDecimal
[18:13:48] Exuma: BigDecimal('100')
[18:13:55] Exuma: ============* the more you know
[18:25:15] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[19:40:20] Exuma: has joined #elixir-lang
[19:40:20] Exuma: has joined #ruby
[19:40:42] Exuma: has joined #RubyOnRails
[19:45:05] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…

2019-06-16

[15:30:06] Exuma: has joined #elixir-lang
[15:30:06] Exuma: has joined #ruby
[15:30:12] Exuma: has joined #RubyOnRails
[18:56:43] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[19:16:44] Exuma: has joined #RubyOnRails
[19:16:46] Exuma: has joined #ruby
[19:16:50] Exuma: has joined #elixir-lang
[20:10:11] Exuma: Quit: Textual IRC Client: www.textualapp.com
[20:57:25] Exuma: has joined #RubyOnRails
[20:57:25] Exuma: has joined #elixir-lang
[20:57:28] Exuma: has joined #ruby
[21:09:28] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-06-15

[16:34:54] Exuma: has joined #ruby
[16:35:00] Exuma: has joined #RubyOnRails
[16:35:00] Exuma: has joined #elixir-lang
[17:16:20] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:23:28] Exuma: has joined #RubyOnRails
[17:23:28] Exuma: has joined #elixir-lang
[17:23:30] Exuma: has joined #ruby
[17:39:54] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:46:31] Exuma: has joined #RubyOnRails
[17:46:39] Exuma: has joined #ruby
[17:47:01] Exuma: has joined #elixir-lang
[18:08:05] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[18:12:30] Exuma: has joined #ruby
[18:12:32] Exuma: has joined #RubyOnRails
[18:12:34] Exuma: has joined #elixir-lang
[18:15:57] Exuma: Client Quit
[18:38:02] Exuma: has joined #RubyOnRails
[18:38:02] Exuma: has joined #elixir-lang
[18:38:10] Exuma: has joined #ruby
[19:14:49] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[20:18:21] Exuma: has joined #ruby
[20:18:36] Exuma: has joined #RubyOnRails
[20:18:47] Exuma: has joined #elixir-lang
[20:23:31] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…

2019-06-14

[00:35:15] Exuma: has joined #RubyOnRails
[00:35:15] Exuma: has joined #ruby
[00:35:23] Exuma: has joined #elixir-lang
[02:29:48] Exuma: Quit: Textual IRC Client: www.textualapp.com
[02:30:15] Exuma: has joined #RubyOnRails
[02:30:15] Exuma: has joined #ruby
[02:30:16] Exuma: has joined #elixir-lang
[06:10:25] Exuma: Quit: Textual IRC Client: www.textualapp.com
[06:12:05] Exuma: has joined #elixir-lang
[06:12:05] Exuma: has joined #ruby
[06:12:10] Exuma: has joined #RubyOnRails
[06:51:11] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[14:28:33] Exuma: has joined #ruby
[14:28:40] Exuma: has joined #elixir-lang
[14:28:40] Exuma: has joined #RubyOnRails
[14:56:13] Exuma: Quit: Textual IRC Client: www.textualapp.com
[14:56:39] Exuma: has joined #RubyOnRails
[14:56:39] Exuma: has joined #elixir-lang
[14:56:47] Exuma: has joined #ruby
[18:54:18] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-06-13

[17:04:33] Exuma: has joined #RubyOnRails
[17:04:33] Exuma: has joined #elixir-lang
[17:04:39] Exuma: has joined #ruby
[17:06:07] Exuma: is Time.now.utc ever wrong if it's called during a time with/without DST? Similar to how DateTime.parse will say -5:00 even though it should be -4:00 because of DST
[17:06:09] Exuma: is Time.now.utc ever wrong if it's called during a time with/without DST? Similar to how DateTime.parse will say -5:00 even though it should be -4:00 because of DST
[17:15:07] Exuma: xco that shouldnt happen in a model, usually if you want to conditionally validate you would use if: Proc.new{|x| x.some_field?}
[17:15:19] Exuma: you could do it with a virtual attribute on the instance
[17:15:41] Exuma: validates :something, if: Proc.new{|x| x.some_field?}
[17:15:55] Exuma: validates :something, presence: true, if: Proc.new{|x| x.some_field?}
[17:16:34] Exuma: that will be the instance of the class
[17:17:14] Exuma: that is what gets passed into the block
[17:17:34] Exuma: i meant working with params
[17:17:46] Exuma: i was referring to params only
[17:17:52] Exuma: which is what you asked
[17:18:14] Exuma: xco usually what i do when i have "one off" validations, is i wouldnt put it in the model at all
[17:18:21] Exuma: I find it to be a pain. i would just put this in the controller
[17:19:17] Exuma: raise 'You must enter a username if you check this box' if params[:checkbox].present && @user.username.blank?
[17:19:54] Exuma: replace raise with whatever you want to do, a flash or whathave you
[17:30:45] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-06-11

[01:52:52] Exuma: has joined #elixir-lang
[01:52:56] Exuma: has joined #ruby
[04:29:39] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-06-01

[17:13:03] Exuma: has joined #RubyOnRails
[17:13:03] Exuma: has joined #elixir-lang
[17:13:09] Exuma: has joined #ruby
[17:13:20] Exuma: I have a DB transaction with a method in it. inside that method it doesnt use a transaction. if that inner method raises, why doesnt the outer transaction roll back the inner changes
[17:13:28] Exuma: the changes get created in the inner method
[17:30:19] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-28

[23:14:34] Exuma: has joined #ruby
[23:14:34] Exuma: has joined #RubyOnRails
[23:14:43] Exuma: has joined #elixir-lang
[23:15:26] Exuma: how do i validate a record so that the value cant be nil if they key is present
[23:15:39] Exuma: .new(xyz: nil) should fail, but .new() should work
[23:21:49] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…

2019-05-27

[04:08:04] Exuma: has joined #ruby
[04:08:04] Exuma: has joined #RubyOnRails
[04:08:12] Exuma: has joined #elixir-lang
[04:10:40] Exuma: Client Quit

2019-05-26

[00:40:16] Exuma: has joined #elixir-lang
[00:40:21] Exuma: has joined #RubyOnRails
[00:40:23] Exuma: has joined #ruby
[00:42:04] Exuma: how do I use ApplicationHelper in a lib/something.rb
[00:42:11] Exuma: i have tried extend ApplicationHelper
[00:42:12] Exuma: as well as
[00:42:20] Exuma: extend ActionView::Helpers::ApplicationHelper
[00:42:26] Exuma: it just keeps saying unintialized constant
[02:00:28] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-23

[21:58:37] Exuma: has joined #ruby
[21:58:37] Exuma: has joined #elixir-lang
[21:58:44] Exuma: has joined #RubyOnRails
[21:59:06] Exuma: ruby 2.6.3 Q: If I have x = BigDecimal(100); y = x; and then I modify x... x -= BigDecimal(1)
[21:59:19] Exuma: will that modify y under any circumstnaces? im trying to read about clone and dup
[21:59:33] Exuma: and it is super confusing related to wording... the object_id isnt changing when i check it myself
[21:59:36] Exuma: so i am just not sure
[22:09:19] Exuma: so why do the object_ids match?
[22:12:19] Exuma: &>> require "bigdecimal"; x = BigDecimal(10); y = x.dup; y.object_id == x.object_id
[22:14:05] Exuma: so basically im 100% safe not using .dup at all, anywhere dealing with bigdecimal?
[22:21:44] Exuma: what did that show
[22:22:24] Exuma: haha, gotcha
[23:32:44] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-22

[21:05:17] Exuma: has joined #elixir-lang
[21:05:26] Exuma: has joined #RubyOnRails
[21:05:26] Exuma: has joined #ruby
[21:55:36] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-21

[17:46:11] Exuma: has joined #RubyOnRails
[17:46:11] Exuma: has joined #elixir-lang
[17:46:16] Exuma: has joined #ruby
[18:14:47] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-18

[00:27:08] Exuma: Quit: Textual IRC Client: www.textualapp.com
[06:08:29] Exuma: has joined #elixir-lang
[06:08:31] Exuma: has joined #ruby
[06:08:31] Exuma: has joined #RubyOnRails
[06:30:38] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[12:58:21] Exuma: has joined #ruby
[12:58:21] Exuma: has joined #RubyOnRails
[12:58:28] Exuma: has joined #elixir-lang
[14:40:12] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:12:21] Exuma: has joined #RubyOnRails
[15:12:45] Exuma: has joined #ruby
[15:12:50] Exuma: has joined #elixir-lang
[15:34:41] Exuma: Hey, how do I get the URL to a CSS file instead of just the path? Similar to how the root_path vs root_url will take the path and the later will take the full current URL
[15:35:00] Exuma: I have ot interact with an API that requires me to pass a CSS file and i want to pass one of the compiled sass files in my app
[15:36:06] Exuma: css absolute url* - its a payment iframe so its going to be loading the file immediately in the iframe, which is why I need to do this quirky thing
[15:37:12] Exuma: I want it to be a 'one off' thing, i dont want to go messing with asset_host
[15:50:57] Exuma: Is ruby slow when passing an extremely large object as an argument
[15:51:03] Exuma: (the rails request object)
[15:51:11] Exuma: or will it pass by a reference and there will be 0 slowdown
[16:35:57] Exuma: ok thanks
[16:36:17] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-17

[23:00:11] Exuma: has joined #elixir-lang
[23:00:15] Exuma: has joined #ruby
[23:00:17] Exuma: has joined #RubyOnRails
[23:32:23] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[23:32:52] Exuma: has joined #ruby
[23:32:58] Exuma: has joined #elixir-lang
[23:32:58] Exuma: has joined #RubyOnRails

2019-05-14

[01:30:19] Exuma: has joined #ruby
[01:30:19] Exuma: has joined #elixir-lang
[01:30:26] Exuma: has joined #RubyOnRails
[01:36:07] Exuma: Does anyone know how I can use Digest::MD5.hexdigest in AES 128 CBC key+iv? It keeps telling me its not 16 bytes :/
[01:42:32] Exuma: @mad_al https://dpaste.de/TL50
[01:44:00] Exuma: havenwood they require me to use a specific MD5 hash of a string they give me, not a random key. does that matter?
[01:46:11] Exuma: havenwood so weird, im looking at their gem from 2014 and theyre using hexidigest. now that it hink about it, its probably just truncating it because i saw a GH issue about that (whereas now it raises)
[01:46:18] Exuma: which is hilarious that their own gem doesnt do that correct
[01:46:44] Exuma: havenwood what is 'non-repudiation'? theyre making me jump through all these hoops to do this
[01:46:53] Exuma: it seems stupid (it is for payment processing, similar to stripe token flow)
[01:50:03] Exuma: hahaha wow.. thats so bad. i think i saw it here: https://gist.github.com/rhenium/b81355fe816dcfae459cc5eadfc4f6f9
[01:51:34] Exuma: yeah, I'm not an expert at security but a lot of what I have to do for these payment processing gateways and whatnot seems extremely antiquated
[01:51:51] Exuma: like they have 10 pages devoted to this stupid encryption mumbo jumbo before sending it over an SSL connection
[01:51:57] Exuma: they said its because of "non repudiation"
[01:52:11] Exuma: and its funny because on their site, the password is on a different form submit than their username in the name of "security"
[01:52:26] Exuma: and the whole page is unstyled html (like 20 lines of css)
[01:52:32] Exuma: so Im like................. mmmmm ok, whatever you say
[01:53:07] Exuma: for all of the parameters. The purpose of this extra encryption is NOT to secure the data in transit (we trust SSL/TLS for that, and in fact the most
[01:53:07] Exuma: The interface requires that much of the data submitted is encrypted. This is in addition to SSL encryption that exists
[01:53:08] Exuma: protect SPI users from the potential that a response from the SPI might be ‘spoofed.’
[01:53:08] Exuma: sensitive data is not encrypted by anything else.) Instead, this extra encryption is used to establish non-repudiation for the transaction, and to
[01:53:10] Exuma: oops sorry
[02:02:31] Exuma: havenwood ok thanks ill look at thees
[05:08:23] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:39:14] Exuma: has joined #ruby
[15:39:14] Exuma: has joined #RubyOnRails
[15:39:38] Exuma: has joined #elixir-lang
[15:45:06] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:48:31] Exuma: has joined #ruby
[15:48:31] Exuma: has joined #RubyOnRails
[15:48:43] Exuma: has joined #elixir-lang
[15:53:31] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-13

[00:46:17] Exuma: has joined #elixir-lang
[00:46:22] Exuma: has joined #RubyOnRails
[00:46:24] Exuma: has joined #ruby
[02:00:25] Exuma: Quit: Textual IRC Client: www.textualapp.com
[14:55:55] Exuma: has joined #ruby
[14:55:55] Exuma: has joined #elixir-lang
[14:56:02] Exuma: has joined #RubyOnRails
[16:09:52] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-12

[16:54:30] Exuma: has joined #RubyOnRails
[16:54:30] Exuma: has joined #elixir-lang
[16:54:36] Exuma: has joined #ruby
[17:54:21] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:57:50] Exuma: has joined #ruby
[17:57:51] Exuma: has joined #RubyOnRails
[17:57:51] Exuma: has joined #elixir-lang
[18:28:47] Exuma: Quit: Textual IRC Client: www.textualapp.com
[20:53:50] Exuma: has joined #RubyOnRails
[20:53:51] Exuma: has joined #ruby
[20:54:00] Exuma: has joined #elixir-lang
[21:12:44] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[21:26:56] Exuma: has joined #RubyOnRails
[21:27:00] Exuma: has joined #ruby
[21:27:09] Exuma: has joined #elixir-lang
[22:56:21] Exuma: Quit: Textual IRC Client: www.textualapp.com

2019-05-11

[16:49:11] Exuma: does anyone know a fancy way to check that all :debits come first in an array?
[16:49:32] Exuma: [:debit, :debit, :credit].....good [:debit, :credit, :debit]... bad [:credit, :debit] ...... bad
[16:54:44] Exuma: phaul interesting ok. currently I just did sides == sides.sort.reverse
[16:54:52] Exuma: im looking at your way
[16:54:58] Exuma: i thought of it while waiting haha
[16:56:04] Exuma: [:debit, :debit, :credit, :debit] == [:debit, :debit, :credit, :debit].sort.reverse
[16:56:08] Exuma: i just do that, which will return false
[16:56:34] Exuma: im too dumb to understand fancy code like that
[16:56:39] Exuma: well, in 3 months i mean
[16:57:11] Exuma: yeah i didnt think it would work at first . i always think ruby is full of surprises when its reference vs value
[16:57:17] Exuma: it appears to work fine
[16:58:38] Exuma: hmm yeah there should be a max 2 or 3 items but thats a great point
[17:06:00] Exuma: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:07:35] Exuma: has joined #elixir-lang
[17:07:41] Exuma: has joined #ruby
[17:07:43] Exuma: has joined #RubyOnRails
[17:12:43] Exuma: haha havenwood that is like code golf level answer :D
[17:14:51] Exuma: &>> BigDecimal.new(500)
[17:15:03] Exuma: damn... that bot is awesome. i never knew
[17:19:39] Exuma: thanks :D
[17:30:41] Exuma: Quit: Textual IRC Client: www.textualapp.com