Technodrome

Activity Graph

Page 1 of 39 | Next »

2019-08-21

[14:53:14] Technodrome: has joined #ruby
[14:53:14] Technodrome: has joined #RubyOnRails
[17:13:55] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:15:12] Technodrome: has joined #RubyOnRails
[17:15:28] Technodrome: has joined #ruby
[21:13:08] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[21:21:11] Technodrome: has joined #RubyOnRails
[21:21:53] Technodrome: has joined #ruby
[21:29:48] Technodrome: Remote host closed the connection

2019-08-18

[03:07:15] Technodrome: has joined #RubyOnRails
[03:07:18] Technodrome: has joined #ruby
[09:25:24] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[12:37:28] Technodrome: has joined #RubyOnRails
[12:37:30] Technodrome: has joined #ruby
[12:42:40] Technodrome: Remote host closed the connection
[15:50:23] Technodrome: has joined #RubyOnRails
[15:50:35] Technodrome: has joined #ruby
[15:58:46] Technodrome: Remote host closed the connection

2019-08-17

[12:46:37] Technodrome: Ping timeout: 246 seconds

2019-08-16

[01:54:19] Technodrome: has joined #ruby
[01:54:19] Technodrome: has joined #RubyOnRails
[16:30:53] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[20:42:47] Technodrome: has joined #RubyOnRails
[20:43:18] Technodrome: has joined #ruby

2019-08-15

[21:53:19] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…

2019-08-14

[15:00:11] Technodrome: has joined #RubyOnRails
[15:00:27] Technodrome: has joined #ruby
[19:01:17] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[19:07:35] Technodrome: has joined #ruby
[19:07:40] Technodrome: has joined #RubyOnRails

2019-08-13

[02:07:02] Technodrome: has joined #RubyOnRails
[02:07:47] Technodrome: has joined #ruby
[03:58:34] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[20:00:37] Technodrome: has joined #RubyOnRails
[20:01:09] Technodrome: has joined #ruby
[20:05:02] Technodrome: Remote host closed the connection

2019-08-12

[09:12:23] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[13:46:54] Technodrome: has joined #ruby
[13:47:03] Technodrome: has joined #RubyOnRails
[19:34:26] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[21:07:48] Technodrome: has joined #RubyOnRails
[21:07:58] Technodrome: has joined #ruby
[23:10:46] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…

2019-08-11

[04:02:31] Technodrome: has joined #RubyOnRails
[04:02:34] Technodrome: has joined #ruby
[05:04:59] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[14:22:50] Technodrome: has joined #ruby
[14:23:03] Technodrome: has joined #RubyOnRails
[18:20:16] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[23:54:17] Technodrome: has joined #RubyOnRails
[23:54:21] Technodrome: has joined #ruby

2019-08-01

[00:19:03] Technodrome: d9a just go straight old pickaxe from 02 and call it a day
[03:49:08] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[05:15:52] Technodrome: has joined #ruby
[05:16:36] Technodrome: has joined #RubyOnRails
[06:07:15] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[07:04:52] Technodrome: has joined #RubyOnRails
[07:05:13] Technodrome: has joined #ruby
[07:27:48] Technodrome: Ping timeout: 272 seconds

2019-07-31

[00:52:55] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[01:08:07] Technodrome: has joined #RubyOnRails
[01:08:37] Technodrome: has joined #ruby
[11:42:44] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:52:39] Technodrome: has joined #RubyOnRails
[15:52:48] Technodrome: has joined #ruby
[16:58:00] Technodrome: how does a block like each work internally? get array size (if this is an array) , and then just loop and yield with the argument and going up the index till the end?
[17:03:45] Technodrome: also how is it possible to send a block to a method where there is no parameter, why is that legal?
[17:08:28] Technodrome: https://pastebin.com/0BD4D5Sz
[17:08:46] Technodrome: def yield_with_arguments. , a method definition with no arguments
[17:13:11] Technodrome: i'm saying, why isn't their an arg in the method definition itself leftylink ?
[17:13:43] Technodrome: why is this legal to have a method, pass it a block, and it looks like a virgin method?
[17:14:17] Technodrome: i'm saying why does ruby allow this do you know? For readability its a bit too implicit
[17:15:54] Technodrome: i'm not talking about any args going to the block, i'm saying the function is getting a block, yet the function doesn't explicitly tell us that
[17:16:28] Technodrome: i'm guessing this only works with a single block
[17:16:42] Technodrome: if you want to pass more than one they would have to be arguments correct?
[17:17:04] Technodrome: if there is more than one though, then it has to be named correct phaul ?
[17:18:04] Technodrome: sure sorry, then it would become a proc i guess
[17:19:06] Technodrome: but you can define like &block correct phaul ?
[17:19:30] Technodrome: or does it convert it to a proc?
[17:20:41] Technodrome: so the only way to access a true ruby block is with yield and not giving any argument correct?
[17:21:17] Technodrome: or if the block is the last argument its implicit correct?
[17:22:28] Technodrome: yes so once you do &block, you would have to do a .call right?
[17:22:33] Technodrome: yield would no longer work?
[17:30:29] Technodrome: ok leftylink , so basically a block can only be sent to a parameter less method, otherwise its converted to a proc etc
[17:32:28] Technodrome: def yield_with_arguments(num)
[17:32:30] Technodrome: how does this method take a block?
[17:33:33] Technodrome: do the actual arguments have to have parenthesis?
[17:33:38] Technodrome: when calling in that case?
[17:34:53] Technodrome: https://pastebin.com/aB6VMqWp
[17:35:27] Technodrome: yield_with_arguments(1) { |hello, world| puts "#{hello} #{world}" }
[17:35:29] Technodrome: this works though
[17:35:46] Technodrome: yield_with_arguments 1 { |hello, world| puts "#{hello} #{world}" }
[17:35:48] Technodrome: this does not
[17:36:28] Technodrome: why doesn't just the {. } work phaul ?
[17:36:55] Technodrome: yes, i get that now
[17:37:08] Technodrome: but with the parenthesis there its not a hash?
[17:37:56] Technodrome: ambiguity being what? no more arguments of the standard defintiion so it has to be a block?
[17:38:35] Technodrome: ok, now it makes sense, so it was a syntax error all along making me think methods couldn't have arguments with a block
[17:40:06] Technodrome: i wonder why ruby made blocks special in the sense that they are not arguments
[17:41:03] Technodrome: just block syntax with everything being a block and the argument being required in the method definition would take away all wonder
[17:43:01] Technodrome: what do you mean phaul ?
[17:44:32] Technodrome: are you saying if it was passed as a parameter it would loose that frozen piece of the stack?
[17:45:29] Technodrome: i mean a Proc has that environment as well when its passed correct?
[17:49:57] Technodrome: sure, my issue is not the syntax, i guess its just how the block is treated by a method once its passeed , in Groovy for instances Closures are passed as parameters , then called from within the method like a proc
[17:50:13] Technodrome: and of course they enclose the environment as well
[17:51:55] Technodrome: but you can't just assign a block to a variable right, so its not the same as a Closure in groovy , i guess more similar to a Proc
[17:53:27] Technodrome: so yeah, in Groovy unless i'm unaware thats all we have
[17:53:54] Technodrome: i think alot of languages have pretty much just that, i think ruby is somewhat special in that it has a few different ways of dealing with closures
[17:55:08] Technodrome: like i dont think ruby has an implicit block variable if one is not defined, most languages seem to provide that
[17:59:38] Technodrome: Ping timeout: 245 seconds
[18:00:17] Technodrome: has joined #RubyOnRails
[18:00:21] Technodrome: has joined #ruby
[18:00:55] Technodrome: but anyways thanks phaul
[18:01:10] Technodrome: i'll probably need another refresh in another 2 years because i dont use ruby daily
[18:09:44] Technodrome: do you ever write iterables that take blocks?
[18:10:27] Technodrome: i wonder how it works internally, like a .each , just counts the size of the object or items, and runs yield that many times from within a loop?
[18:10:46] Technodrome: assuming its a very basic collection
[18:16:56] Technodrome: havenwood hmm not in ruby
[18:17:26] Technodrome: leftylink so essentially a loop
[18:18:36] Technodrome: yes , exactly how i thought it was implemented
[18:23:46] Technodrome: yeah, but if you passed in an array, you would have to loop it somewhere based on size as well correct?
[18:24:05] Technodrome: and yield each item
[18:24:32] Technodrome: sure, but assuming it didn't
[18:24:41] Technodrome: well i guess thats stupid
[18:26:09] Technodrome: yeah, pretty simple
[18:28:32] Technodrome: &:to_string is just shorthand for |s| s.to_string correct?
[18:31:18] Technodrome: good old ruby , this is my 4th time in 10 years revisiting this
[18:39:25] Technodrome: havenwood couldn't they in theory just remove the & , figure it was implicit and just apply the symbol method
[18:41:03] Technodrome: is it treating &:to_s as a single arugment?
[18:41:36] Technodrome: so just send :to_s, and map should realize a block si needed
[18:43:42] Technodrome: sure yeah, i get it
[18:44:04] Technodrome: i hate the whole proc / block part of ruby , java does it more simple
[18:44:52] Technodrome: but once you understand it , its easy as well, but i always run into these quirks
[18:45:01] Technodrome: when i come back to ruby after some time
[18:46:27] Technodrome: the whole way of a block in general is a bit magical how it works, not really an argument, methods have a special yield, then if its a proc its similar but now an argument etc
[18:47:02] Technodrome: just would have been easier to make every block a proc with a required argument then just call it from that
[18:48:01] Technodrome: sure i know you can, but you know , most people use blocks and rarely use procs i assume
[18:48:30] Technodrome: then again its one of those things where most people dont care how or why it works, it just does
[18:49:02] Technodrome: i was talking to this rails team at a local startup, and they dont really know what an eigenclass is or how all that all works, they just look at it as a class method and move on
[18:55:36] Technodrome: sure thats the more normal closure type of way i do it in other languages
[22:38:21] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[23:05:29] Technodrome: has joined #RubyOnRails
[23:05:51] Technodrome: has joined #ruby

2019-07-30

[21:17:12] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[21:30:29] Technodrome: has joined #ruby
[21:30:41] Technodrome: has joined #RubyOnRails

2019-07-29

[09:22:43] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:44:42] Technodrome: has joined #RubyOnRails
[15:44:44] Technodrome: has joined #ruby

2019-07-28

[02:56:58] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[03:10:26] Technodrome: has joined #ruby
[03:10:28] Technodrome: has joined #RubyOnRails
[09:54:45] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:09:01] Technodrome: has joined #ruby
[15:09:05] Technodrome: has joined #RubyOnRails

2019-07-26

[22:59:04] Technodrome: has joined #RubyOnRails
[22:59:12] Technodrome: has joined #ruby

2019-07-24

[02:32:49] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[08:00:33] Technodrome: has joined #RubyOnRails
[08:00:39] Technodrome: has joined #ruby
[08:04:10] Technodrome: Remote host closed the connection
[14:56:58] Technodrome: has joined #RubyOnRails
[14:57:04] Technodrome: has joined #ruby
[16:11:18] Technodrome: Ping timeout: 245 seconds

2019-07-23

[02:07:17] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[03:16:34] Technodrome: has joined #RubyOnRails
[03:16:38] Technodrome: has joined #ruby
[07:49:26] Technodrome: Ping timeout: 272 seconds
[08:24:44] Technodrome: has joined #ruby
[08:24:48] Technodrome: has joined #RubyOnRails
[12:10:30] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:12:48] Technodrome: has joined #RubyOnRails
[17:13:00] Technodrome: has joined #ruby
[17:16:00] Technodrome: Remote host closed the connection
[17:22:01] Technodrome: has joined #RubyOnRails
[17:22:05] Technodrome: has joined #ruby
[21:58:00] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[22:03:42] Technodrome: has joined #ruby
[22:03:44] Technodrome: has joined #RubyOnRails
[22:07:43] Technodrome: Remote host closed the connection
[22:31:25] Technodrome: has joined #RubyOnRails
[22:31:31] Technodrome: has joined #ruby

2019-07-22

[04:25:13] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[04:37:46] Technodrome: has joined #RubyOnRails
[04:38:08] Technodrome: has joined #ruby
[04:49:45] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[05:03:11] Technodrome: has joined #RubyOnRails
[05:03:13] Technodrome: has joined #ruby
[05:08:55] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[14:57:27] Technodrome: has joined #ruby
[14:57:41] Technodrome: has joined #RubyOnRails
[15:06:13] Technodrome: Remote host closed the connection
[15:35:29] Technodrome: has joined #ruby
[15:35:46] Technodrome: has joined #RubyOnRails
[15:45:39] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[16:58:56] Technodrome: has joined #RubyOnRails
[16:59:04] Technodrome: has joined #ruby
[20:15:46] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[22:28:56] Technodrome: has joined #RubyOnRails
[22:29:07] Technodrome: has joined #ruby

2019-07-21

[02:05:57] Technodrome: has joined #RubyOnRails
[02:05:57] Technodrome: has joined #ruby
[07:46:55] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:21:20] Technodrome: has joined #ruby
[15:21:25] Technodrome: has joined #RubyOnRails
[15:28:12] Technodrome: Remote host closed the connection
[20:30:38] Technodrome: has joined #RubyOnRails
[20:30:44] Technodrome: has joined #ruby

2019-07-19

[02:22:24] Technodrome: has joined #ruby
[02:22:30] Technodrome: has joined #RubyOnRails
[12:20:14] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[16:00:20] Technodrome: has joined #RubyOnRails
[16:00:32] Technodrome: has joined #ruby
[20:41:59] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[21:09:58] Technodrome: has joined #ruby
[21:10:02] Technodrome: has joined #RubyOnRails
[21:13:35] Technodrome: Remote host closed the connection

2019-07-18

[07:09:15] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[15:39:32] Technodrome: has joined #RubyOnRails
[15:39:36] Technodrome: has joined #ruby
[15:43:46] Technodrome: Remote host closed the connection
[19:51:34] Technodrome: has joined #RubyOnRails
[19:51:38] Technodrome: has joined #ruby
[21:57:46] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[22:50:29] Technodrome: has joined #ruby
[22:50:44] Technodrome: has joined #RubyOnRails
[23:54:10] Technodrome: Remote host closed the connection

2019-07-17

[00:56:51] Technodrome: has joined #ruby
[00:56:58] Technodrome: has joined #RubyOnRails
[03:48:35] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[04:58:03] Technodrome: has joined #ruby
[04:58:03] Technodrome: has joined #RubyOnRails
[11:56:11] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[13:51:22] Technodrome: has joined #ruby
[13:51:28] Technodrome: has joined #RubyOnRails
[21:10:25] Technodrome: Read error: Connection reset by peer
[21:22:14] Technodrome: has joined #RubyOnRails
[21:22:16] Technodrome: has joined #ruby

2019-07-16

[18:44:26] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…
[20:17:36] Technodrome: has joined #RubyOnRails
[20:17:36] Technodrome: has joined #ruby
[23:17:38] Technodrome: Quit: My MacBook has gone to sleep. ZZZzzz…