hays

Activity Graph

Page 1 of 7 | Next »

2019-08-18

[11:31:48] hays: Ping timeout: 248 seconds

2019-08-15

[03:29:03] hays: has joined #ruby
[03:29:04] hays: has joined #RubyOnRails

2019-08-12

[05:15:27] hays: Ping timeout: 245 seconds
[05:31:12] hays: has joined #RubyOnRails
[05:31:12] hays: has joined #ruby
[15:05:06] hays: Ping timeout: 268 seconds

2019-08-09

[11:29:00] hays: Quit: No Ping reply in 180 seconds.
[11:30:20] hays: has joined #RubyOnRails
[11:30:20] hays: has joined #ruby

2019-07-26

[00:03:48] hays: i just found out about pry today

2019-07-25

[03:07:29] hays: Remote host closed the connection
[03:08:48] hays: has joined #RubyOnRails
[03:08:48] hays: has joined #ruby

2019-07-23

[07:23:08] hays: Quit: No Ping reply in 180 seconds.
[07:23:33] hays: has joined #RubyOnRails
[07:23:33] hays: has joined #ruby

2019-07-21

[16:11:54] hays: has joined #RubyOnRails
[16:11:54] hays: has joined #ruby

2019-07-11

[00:07:58] hays: Ping timeout: 245 seconds

2019-06-20

[16:03:19] hays: *.net *.split

2019-06-15

[00:38:13] hays: Quit: No Ping reply in 180 seconds.
[00:39:33] hays: has joined #ruby
[00:39:33] hays: has joined #RubyOnRails
[06:27:39] hays: *.net *.split
[06:38:17] hays: has joined #RubyOnRails
[06:38:21] hays: has joined #ruby

2019-06-10

[16:14:33] hays: Quit: No Ping reply in 180 seconds.
[16:15:57] hays: has joined #ruby
[16:53:52] hays: Ping timeout: 248 seconds
[16:58:50] hays: has joined #ruby
[17:10:12] hays: Ping timeout: 272 seconds
[17:11:59] hays: has joined #ruby

2019-06-07

[12:27:07] hays: Quit: No Ping reply in 180 seconds.
[12:27:42] hays: has joined #ruby

2019-06-04

[18:25:42] hays: Quit: No Ping reply in 180 seconds.
[18:27:08] hays: has joined #ruby

2019-05-23

[13:15:39] hays: Ping timeout: 248 seconds
[15:55:12] hays: has joined #ruby
[15:55:12] hays: has joined #RubyOnRails
[20:57:05] hays: Ping timeout: 258 seconds
[20:57:27] hays: has joined #RubyOnRails
[20:57:28] hays: has joined #ruby
[21:02:24] hays: Ping timeout: 248 seconds
[21:02:37] hays: has joined #RubyOnRails
[21:02:38] hays: has joined #ruby
[21:18:23] hays: Ping timeout: 248 seconds
[21:18:47] hays: has joined #ruby
[21:18:47] hays: has joined #RubyOnRails
[21:23:48] hays: Ping timeout: 245 seconds
[21:24:22] hays: has joined #ruby
[21:24:22] hays: has joined #RubyOnRails

2019-05-19

[12:29:17] hays: has joined #ruby
[12:29:17] hays: has joined #RubyOnRails

2019-05-17

[14:23:01] hays: Ping timeout: 268 seconds
[14:49:51] hays: has joined #ruby
[14:49:51] hays: has joined #RubyOnRails
[15:43:42] hays: Ping timeout: 246 seconds
[15:44:15] hays: has joined #ruby
[15:44:15] hays: has joined #RubyOnRails
[15:57:04] hays: Ping timeout: 264 seconds
[16:22:32] hays: has joined #ruby
[16:22:32] hays: has joined #RubyOnRails
[17:20:59] hays: Ping timeout: 248 seconds
[17:24:00] hays: has joined #ruby
[17:24:00] hays: has joined #RubyOnRails
[17:39:17] hays: Ping timeout: 258 seconds

2019-04-22

[21:59:25] hays: Ping timeout: 246 seconds
[22:00:21] hays: has joined #ruby
[22:00:21] hays: has joined #RubyOnRails

2019-04-13

[16:50:06] hays: *.net *.split

2019-04-11

[05:22:01] hays: Read error: Connection reset by peer
[05:22:46] hays: has joined #ruby
[05:22:46] hays: has joined #RubyOnRails
[05:36:54] hays: Ping timeout: 246 seconds
[05:38:11] hays: has joined #ruby
[05:38:11] hays: has joined #RubyOnRails

2019-03-21

[22:05:50] hays: Quit: No Ping reply in 180 seconds.
[22:06:58] hays: has joined #ruby
[22:06:58] hays: has joined #RubyOnRails

2019-03-19

[03:12:23] hays: Ping timeout: 244 seconds
[03:15:13] hays: has joined #RubyOnRails
[03:15:14] hays: has joined #ruby

2019-02-22

[21:42:18] hays: Ping timeout: 268 seconds
[21:45:12] hays: has joined #ruby
[21:45:12] hays: has joined #RubyOnRails

2019-02-10

[04:48:16] hays: has joined #ruby
[04:48:17] hays: has joined #RubyOnRails

2019-02-08

[18:43:24] hays: Ping timeout: 272 seconds

2019-02-02

[16:41:58] hays: is there a data structure that is basically a hash where both key and value are keys? bidirectional essentially
[16:42:22] hays: within ruby that is.. i think its easy enough to make one, using two hashes
[16:50:47] hays: for each k there exists only one k in the set and same for v
[16:52:25] hays: invert is O(n) i bet
[16:53:09] hays: there's rassoc too i think
[17:00:22] hays: a decent option if im creating it once and not really updating it
[17:11:19] hays: not in this use case

2019-01-08

[01:31:48] hays: baweaver: where is the line with metaprogramming
[01:33:10] hays: maybe im using it and i dont know it
[01:34:37] hays: what if i was writing something ike roda where i define a class capable of doing the route do end stuff
[01:36:45] hays: yeah i think its one thing truly unique about ruby that it basically got from smalltalk
[01:37:01] hays: unique in the sense if you look at other popular modern languages
[01:37:41] hays: i like D. Thomas' distinction between class oriented programming and OOP
[01:39:59] hays: yeah, makes sense although it might be hard to formalize that heristic
[01:47:20] hays: lunarkittychan: really??
[01:47:33] hays: like.. can you share them?
[01:48:00] hays: three collaborators... nice
[01:48:40] hays: i dunno. i don't trust microsoft
[01:49:30] hays: but it seems people aren't really rushing off the platform
[05:21:08] hays: if I make an accessor with attr_accessor, why would i need to access it with self.accessor
[05:21:30] hays: seems like without the self. it doesn't actually assign but treats it like a local var
[05:30:56] hays: i guess its ambiguous
[08:17:37] hays: Ping timeout: 244 seconds
[08:19:06] hays: has joined #ruby
[08:19:07] hays: has joined #RubyOnRails

2019-01-07

[12:41:29] hays: there is also .bytes and .chars

2019-01-06

[02:42:49] hays: is this use of class_eval the way to implement something like attr_reader? https://mikeyhogarth.wordpress.com/2011/12/01/creating-your-own-attr_accessor-in-ruby/
[02:43:06] hays: interpolating strings like this makes me a little nervous
[02:44:00] hays: great way to inject code into a class
[03:02:59] hays: baweaver: this seems to be best way? https://bpaste.net/show/9e33a4b3d28b
[03:03:26] hays: still seems a bit iffy. i guess i can type check that its a symbol
[13:29:13] hays: phaul: this is what i ended up with https://bpaste.net/show/7fc6cf24970f
[13:29:38] hays: not sure how to get rid of all the string interpolation
[13:30:16] hays: since one has to put the @ in front of the symbol and stick the = on the end
[15:05:03] hays: i guess i can rely on those methods to not inject something stupid
[15:11:48] hays: although maybe not
[15:12:02] hays: attr_accessor "a#{2+2}"
[15:13:12] hays: i guess its fine as long as user input isn't going in there
[21:40:56] hays: writing tests seems like a good way to start too maybe

2019-01-05

[12:03:59] hays: my ruby-install is not working with a command not found
[12:04:11] hays: i tried reinstalling from source
[12:05:05] hays: chruby itself seems ok
[12:06:19] hays: -bash: ruby-install: command not found
[12:09:34] hays: im using PREFIX=$HOME/.local make install
[12:33:25] hays: ./.local/bin/ruby-install
[12:35:06] hays: phaul: wow. somehow my path wasn't set??? duh
[20:52:40] hays: any opinions on ruby web frameworks in here? i'm leaning towards learning roda
[20:52:54] hays: but am a little worried its userbase is too small
[20:53:18] hays: and i still don't have a clear understanding of how to deploy an app vs. running it locally
[21:12:43] hays: maybe i do need to do that, because i don't even see instructions to run this config.ru file in the roda project
[21:18:23] hays: is .ru ruby?
[21:18:36] hays: or is it a ruby like DSL?
[21:19:11] hays: yeah, but this looks a lot like ruby
[21:19:29] hays: with i guess some assumptions about where self is pointing
[21:20:21] hays: ok, i'll check out rack first. seems necessary to get an understanding of whats happening
[21:28:46] hays: so def start &blk
[21:29:45] hays: server.run wrapped_app, options, &blk
[21:33:26] hays: it seems like rackup just runs Rack::Server.start, which is a class method that just creates a Server object and returns the value of #start
[21:33:59] hays: that method itself takes a block..
[21:38:53] hays: im trying to figure out why "run" does anything in the config.ru file
[22:38:32] hays: weird. roda's redirect seems to just cause an infinite loop of POST requests (at least when I use curl)
[22:38:57] hays: i think the intended behavior is that the redirect changes to a 'GET'
[23:05:48] hays: i hate the web
[23:07:14] hays: hm.. curl appears to also do this.. interesting
[23:07:42] hays: at least with 301, 302, or 303
[23:08:52] hays: except that its not doing this. maybe this is a curl issue
[23:10:06] hays: ahh, there we go. apparently curl -X is not what i wanted

2019-01-04

[01:49:52] hays: what JS framework can fit on top of rails?
[01:53:03] hays: hmm ember looks like it might be interesting

2018-12-29

[03:50:44] hays: POODR seems to be one of the few up to date books
[03:51:00] hays: eloquent ruby is 1.9, pickaxe also
[10:41:18] hays: i didn't know rbenv was tied to systemd
[21:38:27] hays: is there any way to make sure code is run before an object is destroyed?
[21:38:35] hays: kind of like a destructor
[21:52:31] hays: i have an object that creates some stuff at the system level that i'd like to ensure gets cleaned up
[21:56:49] hays: i guess i could have the user deal with it by having a method they call in an ensure block or something..
[21:59:44] hays: phaul: that indicates if you don't pass it a block the file doesn't close?
[22:01:54] hays: seems reasonable
[22:02:17] hays: so in that case you pass it a block an then run .close after the yield I guess
[22:02:38] hays: or maybe just in an ensure block
[22:03:58] hays: and as a user if I want to have a bunch of objects like this and don't want nested blocks, I can just use begin/ensure/end to manage the resources
[22:24:31] hays: I guess something like this
[22:24:32] hays: https://dpaste.de/JWmC
[22:34:27] hays: might be nice to have a class method with a list of open objects
[22:34:44] hays: so you could do B.close_all or something

2018-12-28

[02:07:46] hays: is there anything like the pickaxe book that is up to date
[03:16:48] hays: should i read the manning book?
[03:17:03] hays: seems to be the most recent that is actually about ruby
[03:30:40] hays: looking for a deeper understanding of the language
[03:30:50] hays: dont really care about being a full stack dev
[03:31:16] hays: industry seems to be moving away from this anyway
[03:32:52] hays: articles online about ruby are of pretty inconsistent quality
[03:49:38] hays: well, ive been spending some time reading about the ruby object model
[03:49:51] hays: watched a dave thomas video
[03:50:07] hays: but really would like to just get a good overview
[04:18:51] hays: i see you have a new article out :)
[12:52:23] hays: i am thinking i should just read the pickaxe book
[12:52:38] hays: and then just read the changelogs of ruby from 1.9
[14:33:13] hays: why doesn't this work? [1,2,3].reduce([]) { |sum, n| sum.push(n) if n.odd? }
[14:34:38] hays: yeah, i know, but why doesn't that work?
[14:38:18] hays: phaul: ah, yes
[14:38:29] hays: [1,2,3].reduce(Array.new) { |sum,n| n.odd? ? sum.push(n) : sum }
[14:38:39] hays: and that Array.new could be p[
[14:39:17] hays: al2o3-cr: yeah i know i can use select, or each_with_object
[14:40:40] hays: " reduce is so powerful that every other Enumerable function could be written using it."
[14:41:09] hays: i was just playing with that idea
[14:48:42] hays: do rubyists like inject over reduce i guess?
[15:07:09] hays: shouldn't there be @ on the functions in ratio? https://github.com/skmetz/poodr2/blob/master/2_10.rb
[15:11:13] hays: and than can be simplified to : class Gear < Struct.new(:chainring, :cog) I think
[15:19:47] hays: collect also seems to be the same as map
[15:22:47] hays: also map.with_index seems like magic
[15:26:41] hays: yeah, so .map returns an Enumerator, which still contains enough information to create an index
[15:30:23] hays: just trying to say that the Enumerator still has access to the array, so it can provide indices. I wasn't thinking of .map returning anything, which doesn't make sense
[17:04:47] hays: Ping timeout: 240 seconds
[19:36:46] hays: has joined #RubyOnRails
[19:36:46] hays: has joined #ruby

2018-12-26

[17:10:11] hays: what is truffleruby?
[17:16:19] hays: saw it pop up when checking out the new 2.6
[17:16:26] hays: (when doing ruby-install)
[17:18:35] hays: reading about it--never heard of the Graal VM
[18:24:31] hays: i have been programming in Ruby for a while now and i feel a bit stuck. Not sure I really 'get it' and always feel like im fighting against the language
[18:32:35] hays: i think im missing a high level view of the philosophy of the language and how things are supposed to fit together
[18:34:46] hays: hmm.. do you mean generally what an object is with reference to OOP?
[18:36:15] hays: then i must admit I am not clear
[18:36:41] hays: modules vs. classes has been a point of confusion for me--when I've tried to use them they haven't worked how i expect
[18:37:39] hays: i'll check it out
[19:11:42] hays: i think im watching it
[19:11:56] hays: the medium article i read ended at part 1
[20:17:48] hays: phaul: good video
[20:50:29] hays: i'll read about prepend
[20:50:54] hays: what about design? e.g. how to use these concepts with coherence
[21:12:47] hays: well in an agile environment the spec changes and can be a result of a bit amorphous set of features
[21:13:13] hays: but i suppose you look at the backlog and do your best to think ahead about it
[21:14:35] hays: the code i write tends to start as a script with a bunch of stuff i guess in main
[21:14:54] hays: i get tripped up transisioning this into reusable code
[21:16:07] hays: i guess i can put functions in modules and then in my main use extend

2018-12-25

[03:59:46] hays: Ping timeout: 268 seconds
[04:01:36] hays: has joined #ruby
[04:01:36] hays: has joined #RubyOnRails

2018-12-18

[01:56:58] hays: if i have a collection of loosely related functions, should I just throw them in a class and make them class functions?
[01:58:22] hays: ive been having some problems putting them in modules
[01:59:44] hays: basically ruby seems to be kinda finicky with modules--always complaining about it not being a method or some problem with the self pointer
[02:02:15] hays: also I think I have some confusion about :: vs. .
[02:21:23] hays: i read about module_function and extend self... they both seem worth avoiding honestly
[02:35:29] hays: cleanest seems to always wrap modules in classes

2018-12-17

[00:04:02] hays: phaul: that apparently breaks my use of it in a class
[00:06:59] hays: phaul: https://dpaste.de/qcDK
[00:08:14] hays: sorry more like this https://dpaste.de/MRgX
[00:12:31] hays: generally speaking im having a hard time understanding how to modularize my code in rubyoutside a very strict OOP paradigm. maybe that's on purpose
[00:15:56] hays: generally speaking im having a hard time understanding how to modularize my code in rubyoutside a very strict OOP paradigm. maybe that's on purpose
[00:16:00] hays: ack sorry to repeat

2018-12-16

[20:42:19] hays: I just want to reuse code :)