apeiros changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
tdy has quit [Ping timeout: 260 seconds]
f0rpaxe has quit [Quit: Connection closed for inactivity]
nankyokusei has quit [Ping timeout: 260 seconds]
ace05 has joined #ruby
agent_white has joined #ruby
timvisher has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 260 seconds]
ace05 has quit [Remote host closed the connection]
agent_white has left #ruby [#ruby]
timvisher has joined #ruby
last_staff has quit [Quit: kisses to the girls, fistbumps to the guys]
nullfxn has quit [Quit: leaving]
johnmccabe has joined #ruby
threh has joined #ruby
houhoulis has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
pwnd_nsfw` has joined #ruby
rsampaio_ has joined #ruby
ur5us has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
tuxaddicted has quit [Ping timeout: 256 seconds]
chadwtaylor has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raeoks has joined #ruby
vitd has quit [Ping timeout: 244 seconds]
dn5 has quit [Quit: Lost terminal]
symm- has quit [Ping timeout: 240 seconds]
ace05 has joined #ruby
jgt has quit [Ping timeout: 248 seconds]
tectonic has joined #ruby
Anatzum has joined #ruby
Anatzum has quit [Client Quit]
rubidium has joined #ruby
<rubidium> heyy
Anatzum has joined #ruby
<rubidium> I want your help guys
<rubidium> My sister wants to learn programming
<rubidium> So naturally I suggested ruby
<rubidium> I learned ruby with Pragmattic Programmer
<rubidium> She's 12 so that is not an option
pawnbox has joined #ruby
<rubidium> any books or ebooks that can cover the extreme basics of ruby
<rubidium> ?
babykosh has joined #ruby
johnmccabe has quit [Ping timeout: 250 seconds]
<baweaver> ruby wizardry
<baweaver> it's geared more towards kids and younger teens
johnmccabe has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
eljimbo has joined #ruby
Bellthoven has joined #ruby
<rubidium> cool
<rubidium> seems it will work nicely
zapata has quit [Ping timeout: 240 seconds]
nonnatus has joined #ruby
johnmccabe has quit [Ping timeout: 244 seconds]
johnmccabe_ has joined #ruby
johnmccabe_ has quit [Ping timeout: 260 seconds]
zapata has joined #ruby
zukin has joined #ruby
rubidium has quit [Ping timeout: 260 seconds]
lifted has joined #ruby
xall has quit [Ping timeout: 268 seconds]
ekinmur has joined #ruby
codfection has quit [Remote host closed the connection]
alibby has quit [Quit: Leaving.]
marr has quit [Ping timeout: 250 seconds]
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnmccabe has joined #ruby
nonnatus has joined #ruby
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
alibby has joined #ruby
sepp2k has quit [Quit: Leaving.]
brendan- has joined #ruby
babykosh has quit [Quit: babykosh]
UserJosh is now known as JoshS
tristanp has joined #ruby
zukin has quit [Ping timeout: 268 seconds]
blackgoat has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
arashb has joined #ruby
arashb has quit [Ping timeout: 268 seconds]
eljimbo has quit [Quit: This computer has gone to sleep]
NTrash has quit [Ping timeout: 258 seconds]
A_Drone has joined #ruby
tristanp has quit [Remote host closed the connection]
xall has joined #ruby
tristanp has joined #ruby
arthurnn has quit [Ping timeout: 244 seconds]
maxmanders has quit [Ping timeout: 244 seconds]
justinmrkva has quit [Ping timeout: 244 seconds]
babykosh has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
vondruch_ has joined #ruby
Derperperd has quit [Ping timeout: 260 seconds]
aep has quit [Ping timeout: 260 seconds]
Derperperd_ has joined #ruby
swills has quit [Read error: Connection reset by peer]
Garo_ has quit [Ping timeout: 244 seconds]
swills has joined #ruby
Jello_Raptor has quit [Ping timeout: 244 seconds]
vondruch has quit [Ping timeout: 258 seconds]
fnord_ has quit [Ping timeout: 260 seconds]
brucebag has quit [Ping timeout: 260 seconds]
RazorX- has quit [Ping timeout: 260 seconds]
jericon_ has quit [Ping timeout: 260 seconds]
joast has quit [Ping timeout: 260 seconds]
compass has quit [Ping timeout: 260 seconds]
babykosh has quit [Client Quit]
CloCkWeRX has quit [Ping timeout: 260 seconds]
avelldiroll has quit [Ping timeout: 260 seconds]
compass has joined #ruby
raeoks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jericon has joined #ruby
tristanp has quit [Ping timeout: 260 seconds]
jcao219 has quit [Ping timeout: 244 seconds]
tdy1 has joined #ruby
elvin has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
ghostlight has quit [Ping timeout: 250 seconds]
RazorX has joined #ruby
arthurnn has joined #ruby
aep has joined #ruby
justinmrkva has joined #ruby
maxmanders has joined #ruby
Jello_Raptor has joined #ruby
brucebag has joined #ruby
brucebag has joined #ruby
brucebag has quit [Changing host]
rsampaio_ has quit [Ping timeout: 250 seconds]
ghostlight has joined #ruby
Garo_ has joined #ruby
CloCkWeRX has joined #ruby
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
tectonic has quit []
NTrash has joined #ruby
avelldiroll has joined #ruby
ariedler has joined #ruby
<ariedler> working with a string from redis (which is a bitfield); is the easiest way to get an individual bit of it using byteslice + unpack?
elenatanasoiu has joined #ruby
johnmccabe has quit [Ping timeout: 260 seconds]
dviola has quit [Quit: WeeChat 1.6]
johnmccabe has joined #ruby
NTrash has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
rsampaio_ has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
elenatanasoiu has quit [Ping timeout: 260 seconds]
johnmccabe_ has joined #ruby
lifted has quit [Quit: lifted]
johnmccabe has quit [Ping timeout: 248 seconds]
<lupine> ariedler: or treat it as a large number and use ordinary bitwise operators to query it
<ariedler> haha; not treating 20 MB as a number :P :)
tdy1 is now known as tdy
dviola has joined #ruby
johnmccabe has joined #ruby
johnmccabe_ has quit [Ping timeout: 248 seconds]
johnmccabe has quit [Ping timeout: 260 seconds]
lel has joined #ruby
nankyokusei has joined #ruby
johnmccabe has joined #ruby
optiz0r has quit [Ping timeout: 260 seconds]
johnmccabe_ has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
johnmccabe has quit [Ping timeout: 248 seconds]
vikaton has joined #ruby
jonatin has quit [Quit: Textual IRC Client: www.textualapp.com]
benlieb has joined #ruby
johnmccabe_ has quit [Ping timeout: 248 seconds]
johnmccabe has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
swills_ has joined #ruby
swills has quit [Ping timeout: 244 seconds]
raeoks has joined #ruby
K7 has joined #ruby
harfangk has joined #ruby
Robtop__ has joined #ruby
Torkable has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
Jameser has joined #ruby
Pupeno has joined #ruby
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
Pupeno has quit [Ping timeout: 248 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
houhoulis has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 260 seconds]
chadwtaylor has quit [Remote host closed the connection]
chadwtaylor has joined #ruby
alibby has quit [Quit: Leaving.]
tdy has quit [Ping timeout: 260 seconds]
tdy has joined #ruby
frankiee_ has quit [Ping timeout: 240 seconds]
c0mrad3 has joined #ruby
zukin has joined #ruby
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chadwtaylor has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
A_Drone has quit [Remote host closed the connection]
johnmccabe has quit [Ping timeout: 248 seconds]
lel has quit [Quit: leaving]
johnmccabe has joined #ruby
ace05 has quit [Remote host closed the connection]
nullfxn has joined #ruby
Bellthoven has quit []
xall has quit [Ping timeout: 240 seconds]
raeoks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 248 seconds]
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
tristanp has joined #ruby
blackmesa has joined #ruby
johnmccabe_ has joined #ruby
chouhoulis has joined #ruby
johnmccabe has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
nullfxn has quit [Quit: leaving]
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
aries_liuxueyang has quit [Ping timeout: 268 seconds]
johnmccabe has joined #ruby
SteenJobs has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 240 seconds]
tristanp has joined #ruby
aries_liuxueyang has joined #ruby
johnmccabe_ has quit [Ping timeout: 268 seconds]
johnmccabe_ has joined #ruby
johnmccabe has quit [Ping timeout: 248 seconds]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
aries_liuxueyang has quit [Ping timeout: 260 seconds]
jay1 has joined #ruby
braincrash has joined #ruby
<jay1> exit
jay1 has quit [Client Quit]
A_Drone has joined #ruby
zukin has quit [Ping timeout: 248 seconds]
aries_liuxueyang has joined #ruby
Ropeney_ has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 250 seconds]
jay1 has joined #ruby
pwnd_nsfw` has joined #ruby
jay1 has left #ruby [#ruby]
nisstyre has joined #ruby
nisstyre has joined #ruby
nisstyre has quit [Changing host]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
jay1 has joined #ruby
jay1 has left #ruby [#ruby]
ace05 has joined #ruby
tristanp has quit [Remote host closed the connection]
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
lifted has joined #ruby
Robtop__ has quit [Ping timeout: 240 seconds]
gix has joined #ruby
arescorpio has joined #ruby
pawnbox has joined #ruby
zukin has joined #ruby
craigp_ has quit [Ping timeout: 244 seconds]
xall has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
optiz0r has joined #ruby
elenatanasoiu has joined #ruby
Ropeney_ has joined #ruby
zzxc has quit [Quit: ZNC 1.6.3 - http://znc.in]
benlieb has quit [Quit: benlieb]
SteenJobs has quit [Quit: SteenJobs]
browndawg has joined #ruby
elenatanasoiu has quit [Ping timeout: 260 seconds]
zzxc has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ichkv has joined #ruby
zukin has quit [Ping timeout: 244 seconds]
A_Drone has quit [Remote host closed the connection]
qwesste has quit [Ping timeout: 244 seconds]
tristanp has joined #ruby
charliesome has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
browndawg has quit [Quit: leaving]
nankyokusei has joined #ruby
tdy has quit [Ping timeout: 260 seconds]
Derperperd_ has quit [Ping timeout: 240 seconds]
SteenJobs has joined #ruby
rakm has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
zukin has joined #ruby
elenatanasoiu has joined #ruby
the_drow has joined #ruby
johnmccabe_ has quit [Ping timeout: 248 seconds]
A_Drone has joined #ruby
Derperperd has joined #ruby
blackmesa has joined #ruby
elenatanasoiu has quit [Ping timeout: 260 seconds]
elvin has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
nowhere_man has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
yardenbar has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
ace05 has quit [Remote host closed the connection]
statelesscode has joined #ruby
ace05 has joined #ruby
webnanners has quit [Changing host]
webnanners has joined #ruby
the_drow has joined #ruby
johnmccabe has joined #ruby
Torkable has quit [Read error: Connection reset by peer]
ace05 has quit [Ping timeout: 244 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
benlieb has joined #ruby
johnmccabe has quit [Ping timeout: 248 seconds]
the_drow has quit [Read error: Connection reset by peer]
elenatanasoiu has joined #ruby
RTFM[away] has quit [Ping timeout: 240 seconds]
K7 has quit [Quit: Connection closed for inactivity]
A_Drone has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
SteenJobs has joined #ruby
johnmccabe has joined #ruby
the_drow has joined #ruby
tdy has joined #ruby
elenatanasoiu has quit [Ping timeout: 268 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
SteenJobs has quit [Client Quit]
raeoks has joined #ruby
ariedler has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 1.6]
yardenbar has quit [Ping timeout: 250 seconds]
SteenJobs has joined #ruby
jackjackdripper has joined #ruby
Derperperd has quit [Ping timeout: 248 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timvisher has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
timvisher has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Derperperd has joined #ruby
the_drow has joined #ruby
A_Drone has joined #ruby
elenatanasoiu has joined #ruby
Derperperd has quit [Ping timeout: 248 seconds]
SteenJobs has quit [Quit: SteenJobs]
elenatanasoiu has quit [Ping timeout: 260 seconds]
Derperperd has joined #ruby
zukin has quit [Ping timeout: 248 seconds]
zukin has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
johnmccabe has quit [Ping timeout: 248 seconds]
johnmccabe has joined #ruby
childermass has joined #ruby
igniting has joined #ruby
the_drow has joined #ruby
pawnbox has joined #ruby
wehatecoons has joined #ruby
vitd has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
johnmccabe has quit [Ping timeout: 248 seconds]
thatsnotjack has quit [Ping timeout: 248 seconds]
Derperperd has quit [Ping timeout: 250 seconds]
childermass has quit [Quit: Textual IRC Client: www.textualapp.com]
childermass has joined #ruby
nanoz has joined #ruby
the_drow has joined #ruby
thatsnotjack has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
Suresh has joined #ruby
<Suresh> Hi
<Suresh> i need help with ruby script/generate thing
<Suresh> any kind soul there i can ask
the_drow has quit [Read error: Connection reset by peer]
<wehatecoons> what's wrong?
<Suresh> ok here's the long story i created the topic in stack over flow
childermass has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmesa has joined #ruby
childermass has joined #ruby
<Suresh> til now i can't figure it
Derperperd has joined #ruby
craigp_ has joined #ruby
the_drow has joined #ruby
johnmccabe has joined #ruby
childermass has quit [Client Quit]
<baweaver> !troll wehatecoons
wehatecoons was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
childermass has joined #ruby
childermass has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
<fbt> So subtle, wow.
Derperperd_ has joined #ruby
<baweaver> Suresh: Have you tried their suggestions yet?
<baweaver> (catching up on it)
ur5us has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<baweaver> Suresh: Also, what version of ruby are you using
<Suresh> i am using subline
<Suresh> 2.67
<Suresh> 2.6.7
<baweaver> That'd be your editor, though Sublime is good.
minimalism has quit [Quit: minimalism]
<Suresh> the link provided is created by me
<Suresh> at the stack over flow
<baweaver> Type this in your terminal: ruby -v
tenderlove has quit [Read error: Connection reset by peer]
<baweaver> how did you install ruby?
tenderlove has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Changing host]
Derperperd has quit [Ping timeout: 240 seconds]
Derperperd_ is now known as Derperperd
<baweaver> and what OS are you using?
<Suresh> that was long ago man
<Suresh> windows 10
<baweaver> fair fair.
<Suresh> refer to this link that i have created
<baweaver> Yep, was reading it.
<baweaver> Need a second to go through it though.
<Suresh> til now there's very less response
yaewa has joined #ruby
<Suresh> ok sure man
<Suresh> :)
<baweaver> Anyways, fair warning, Rails tends to be a bit touchy on Windows.
<Suresh> anyway i am still learning ruby
<Suresh> stuck at chapter 13 :)
<baweaver> In your command prompt, check what `ruby -v` returns
<Suresh> ok
moei has quit [Ping timeout: 248 seconds]
yaewa has quit [Client Quit]
<Suresh> ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]
moei has joined #ruby
<baweaver> So a bit old, but still fairly recent.
cyphase has quit [Ping timeout: 260 seconds]
<baweaver> we'll say that's fine for now.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Suresh> ok anything else i can do now?
ur5us has quit [Ping timeout: 260 seconds]
ace05 has joined #ruby
<baweaver> can you put the full error you get in a gist?
<baweaver> ?gist
<baweaver> !gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver> hrm.
<baweaver> aha, slow bot is slow tonight
<Suresh> what is gist?
tenderlove has quit [Read error: No route to host]
<baweaver> see that link above.
<Suresh> ok hold on
<baweaver> try: `rails g scaffold test name` and gist me the error
tenderlove has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Changing host]
<Suresh> ok hold on a minute
<Suresh> let me create a gitbhub account first
jackjackdripper has quit [Quit: Leaving.]
<baweaver> should be able to do it without one, but it'll help for later.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
the_drow has quit [Quit: This computer has gone to sleep]
cyphase has joined #ruby
xall has joined #ruby
<feelx> Suresh, reading a book to learn ruby and rails is version 3 in the book?
<Suresh> nope i am reading the peter cooper book
ace05 has quit [Ping timeout: 260 seconds]
<Suresh> beginning ruby :)
threh has quit [Ping timeout: 260 seconds]
grh has joined #ruby
<feelx> Ok but the link shows rails stuff
aries_liuxueyang has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
charliesome has joined #ruby
<Suresh> becoz i now learning chapter 13 on web application development
<baweaver> Rails 3 is also fairly old.
<baweaver> you'd likely have better luck with Rails 4
<Suresh> baweaver here is the gist
<feelx> Even Rails 5...
<baweaver> that's a query
<baweaver> Yeah, but Rails 4 has books out. Rails 5 is still fairly fresh and requires Ruby 2.3.x
benlieb has quit [Quit: benlieb]
<feelx> Right
aries_liuxueyang has joined #ruby
<baweaver> though there should be no problem just going Rails 5
ur5us has quit [Remote host closed the connection]
<baweaver> more of a literature thing for newer users.
ur5us has joined #ruby
<Suresh> even i am using rails 5
<baweaver> Run that command
<Suresh> the command to isseu is the same right
<baweaver> yep
<baweaver> though that's only the command
xall has quit [Ping timeout: 250 seconds]
<baweaver> You'd need to run it to get the error.
<Suresh> ok sure
<Suresh> and put into the gist right?
<baweaver> yep
<Suresh> here you go
aupadhye has joined #ruby
K7 has joined #ruby
A_Drone has quit [Remote host closed the connection]
<baweaver> gem update bundler
<baweaver> then give it one more shot
ur5us has quit [Ping timeout: 260 seconds]
<Suresh> Brandon weaver which country you from?
<baweaver> '~> 1.0.0' doesn't mean exactly that.
<Suresh> ok can
Dimik has joined #ruby
blaxter has joined #ruby
<Suresh> ok i update it already
<baweaver> ok, now do: bundle install
<baweaver> then try the scaffold command again
nh_cham has joined #ruby
arescorpio has quit [Quit: Leaving.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Suresh> here's the error i got when doing bundle install
jcao219 has joined #ruby
<baweaver> Look for Rails in there and update the version to '~> 4.0.0'
<baweaver> the Gemfile
blaxter has quit [Client Quit]
<Suresh> rails update you mean?
<baweaver> Open your gemfile and change the version for rails to 4.0
<Suresh> ok done
<Suresh> then do bundle install again?
<baweaver> yep
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
the_drow has joined #ruby
nh_cham has quit [Quit: WeeChat 1.4]
phredus has quit [Quit: No Ping reply in 180 seconds.]
<feelx> Suresh, what's the result?
<Suresh> ok the bundle installed is done
phredus has joined #ruby
<Suresh> but when i do the scaffold command
<Suresh> here the error i got
SteenJobs has joined #ruby
<Radar> Suresh: what scaffold command exactly?
<Suresh> rails g scaffold test name
<Suresh> this is the command i issued
<Radar> try bundle exec rails g scaffold test name
<Suresh> ok
<baweaver> Radar: context is that they just upgraded from Rails 3 in their gemfile
<Radar> oh
<Radar> glf
<Radar> glhf*
<baweaver> so there may be some fun bits
<Suresh> ok the same error pops up
dminuoso has joined #ruby
<baweaver> you might burn that directory and: rails new chapter13
<baweaver> that way you get a fresh rails 4 project
segy has quit [Ping timeout: 258 seconds]
<Suresh> what do i do now?
grh has quit [Ping timeout: 260 seconds]
<feelx> need to fix line 1-7 ;)
johnmccabe has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
<Suresh> ?
<Radar> [16:47:55] <baweaver>you might burn that directory and: rails new chapter13
<Radar> Suresh: ^
<Radar> baweaver is right. You should delete that old directory and create a new Rails app with the new version of Rails that you've just installed.
<Suresh> ok i get it
A_Drone has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_drow has quit [Read error: Connection reset by peer]
<Suresh> ok i am gonna delete mydiary
jshjsh has joined #ruby
<Suresh> and create the same mydiary again
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
DoubleMalt has joined #ruby
jshjsh has joined #ruby
the_drow has joined #ruby
johnmccabe has joined #ruby
ta_ has quit [Remote host closed the connection]
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
harrisi has joined #ruby
nankyokusei has joined #ruby
redlegion has quit [Read error: Connection reset by peer]
redlegion has joined #ruby
Suresh has quit [Ping timeout: 260 seconds]
<harrisi> I'm trying to use bindata to read a java class file (blasphemy, I know) based on the spec (https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html). I'm trying to properly read attributes, but the way that it is done is by reading some bytes which reference an index in a previously defined array and reading some data from the array (constant_pool)
<harrisi> I figure using a bindata choice will be necessary, but I'm having trouble figuring out how to actually do it.
nankyokusei has quit [Ping timeout: 260 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
<harrisi> the code is at https://github.com/harrisi/shinypancake/blob/bindata/src/jbc.rb, if it helps. the specific class I'm troubled by is AttributeInfo (line 86). I figure a similar pattern to the CPInfo class (line 92) will be necessary, but the selection isn't just based on the tag.
Wayne_Shephard has joined #ruby
conta has joined #ruby
<harrisi> I have to use the :attribute_name_index to index the constant_pool array, read data from that hash, and then read some amount of data based on the string contents of constant_pool[index].info.bytes
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Suresh has joined #ruby
blackgoat has joined #ruby
blackmesa has joined #ruby
qwertyco has joined #ruby
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<Suresh> hello
<dminuoso> harrisi: Let's start with something superficial.
<dminuoso> harrisi: Get rid of these silly $_constants, and replace them with something like C_CLASS :-P
<Suresh> just issue the command: rails generate Entry Title:string content:text
<dminuoso> Suresh: ?rails
<dminuoso> ?rails Suresh
<ruby[bot]> Suresh: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
nowhere_man has quit [Ping timeout: 244 seconds]
<harrisi> dminuoso: I'm not sure what you mean.
zukin has quit [Quit: bsd is going to sleep]
<Suresh> omg thank you
<Suresh> IT'S WORKING NOW
<Suresh> thank you beweaver
<dminuoso> harrisi: $ denote (mutable) global variables, variables starting with an uppercase letter are constants.
<dminuoso> harrisi: At any rate, you actually might have better luck with this in #jruby - there is plenty of jruby devs in there, who are intimitately familiar with Java.
<harrisi> ironically, I had that previously (almost) but RubyMine complained about it.
<dminuoso> (Note this is not me deferring you there, but you probably have better luck there)
blackmesa has quit [Ping timeout: 260 seconds]
<harrisi> hm, it seems more like a question about bindata, though. I'll try.
<Suresh> thank you those who help me just now
SteenJobs has quit [Quit: SteenJobs]
xall has joined #ruby
<dminuoso> harrisi: Well, if you can formulate a question for just bindata that's great.
<dminuoso> But Id say give their channel a try as well, since parsing Java classes is your goal.
ur5us has joined #ruby
<dminuoso> harrisi: stick around here though, perhaps someone will answer your question here. :)
<harrisi> I'm trying to formulate a more concise question and test case. essentially the problem is that one of my bindata arrays needs to reference data defined in a different record.
NTrash has joined #ruby
johnmccabe has quit [Ping timeout: 248 seconds]
redpants has quit [Quit: leaving]
dminuoso has quit [Ping timeout: 244 seconds]
Silthias has joined #ruby
gingray has joined #ruby
dminuoso has joined #ruby
A_Drone has quit []
firstdayonthejob has joined #ruby
<dminuoso> harrisi: from what I can tell thats beyond the scope of bindata
Suresh has quit [Ping timeout: 260 seconds]
<dminuoso> harrisi: bindata merely handles the parsing, but "referencing" is about how you interpret the data
the_drow has joined #ruby
tonini has joined #ruby
the_drow has quit [Client Quit]
segy has joined #ruby
Averna has joined #ruby
thatsnotjack has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
<harrisi> hm. well with choices, I can give a function for how to choose which record to read. I can definitely write that function, but it needs to reference the constant_pool, which doesn't exist until after the class file has been read, but it is before the attributes are read. could I just use promises or something, potentially, to pass a promise of a constant_pool and the attribute_name_index? I'm not sure how I would fill that promise between the point of reading t
Suresh has joined #ruby
ddffg has joined #ruby
<dminuoso> harrisi: I dont think I understand your problem.
<harrisi> or, I suppose, a future.
<harrisi> dminuoso: :( sorry, it's difficult for me to think about it in the first place, which makes it virtually impossible to convey what I need.
ur5us has quit [Remote host closed the connection]
timvisher has quit [Remote host closed the connection]
timvisher has joined #ruby
ur5us has joined #ruby
gingray has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
<dminuoso> harrisi: Then take a step back and simplify the problem.
lxsameer has joined #ruby
arashb has joined #ruby
<dminuoso> harrisi: Using "futures" for this sounds like you are overcomplicating the problem.
calmchaos has joined #ruby
firstdayonthejob has quit [Ping timeout: 244 seconds]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
ur5us has quit [Ping timeout: 248 seconds]
rvca has quit [Ping timeout: 250 seconds]
<dminuoso> harrisi: (In fact by starting to introduce asynchrous patterns to simple file parsing, you will probably very quickly get into messy code)
last_staff has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Suresh has quit [Ping timeout: 260 seconds]
agit0 has quit [Quit: zzzZZZ….]
<harrisi> I sure will. it does unfortunately seem like the declarative nature of BinData isn't exactly the best approach for this task. it would be relatively straightforward to just read the byte which is interpreted as the index into constant_pool and read the data offset by index (that sentence is nonsense, but I understand it in my head)
<dminuoso> harrisi: It is great, but I think you are mistaking it for an Object model such as ActiveRecord.
arashb has quit [Ping timeout: 268 seconds]
<dminuoso> harrisi: It's just to prevent an unmaintainable mess of using String.split + Array#unpack
<harrisi> it's just unfortunate because the rest of the file parsing is so straightforward. does it makes sense (or is it possible) to read most of it with BinData except this specific part?
<dminuoso> I gotta leave the train, will be back in 15-30 minutes to continue.
jgt has joined #ruby
<harrisi> thanks!
Derperperd has quit [Ping timeout: 244 seconds]
Rickmasta has joined #ruby
grh has joined #ruby
dminuoso has quit [Remote host closed the connection]
teclator has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
vondruch_ has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
thatsnotjack has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
xall has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
spectrum has joined #ruby
spectrum has quit [Client Quit]
zukin has joined #ruby
aganov has joined #ruby
al2o3-cr has joined #ruby
al2o3-cr is now known as Guest54061
blackgoat has quit [Ping timeout: 260 seconds]
Pupeno has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
wugy has joined #ruby
blackmesa has joined #ruby
vuoto has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
vuoto has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
cyphase has joined #ruby
ta_ has joined #ruby
dminuoso has joined #ruby
<dminuoso> harrisi: Have you been able to figure this out?
edwinvdgraaf has joined #ruby
TomyWork has joined #ruby
edwinvdgraaf has quit [Client Quit]
<harrisi> nope! I've started thinking about just parsing it byte by byte instead, though.
<dminuoso> harrisi: That will not solve anything.
claudiuinberlin has joined #ruby
bsrd has joined #ruby
<harrisi> hm, why do you say that?
antgel has joined #ruby
<dminuoso> harrisi: Because bindata is exactly what tackles that problem - describing data layout, and letting you read that data based on some accessor class.
Silthias1 has joined #ruby
agit0 has joined #ruby
<dminuoso> harrisi: It's effectively just a readable version of Array.unpack
zukin has quit [Ping timeout: 244 seconds]
<Guest54061> dminuoso: Array#pack
submitnine has joined #ruby
<dminuoso> Guest54061: Err, yeah. Thanks :)
vondruch_ has joined #ruby
<Guest54061> :p
<dminuoso> No I meant String#unpack.
<dminuoso> Ah well.
<dminuoso> harrisi: See, the confusion even starts with picking the right method.
<harrisi> right, but this specific problem seems like it may be unnecessarily complex for bindata. however, it would be nice to have everything be done by bindata as it is now but for this specific piece of the file do some trickery to read some stuff by hand
Silthias has quit [Ping timeout: 260 seconds]
<dminuoso> harrisi: Can you describe the problem in a simple test case?
<harrisi> unfortunately no(t yet).
aufi has joined #ruby
vitd has quit [Ping timeout: 240 seconds]
JoshS has quit [Quit: Leaving]
ur5us has joined #ruby
Guest54061 is now known as al2o3-cr
al2o3-cr has quit [Changing host]
al2o3-cr has joined #ruby
<harrisi> the way I'm thinking about the problem is this: I have a bunch of classes that read specific pieces of the byte code file. In one area (actually there are more, but they behave the same as attributes), I need to index an array (which is "grabbed"/"populated"/"created") by another class previously in the file
timvisher has quit [Remote host closed the connection]
<dminuoso> harrisi: Sounds to me like you have coupled it too tightly to your IO.
mark_661 has joined #ruby
timvisher has joined #ruby
Humdai has joined #ruby
<dminuoso> harrisi: Have some external class/module/method deal with this. This method would first read the "another class" containing the array, and build some abstract object that has an Ruby array, and then build the first class, which uses said abstract object.
cyphase has quit [Ping timeout: 248 seconds]
<dminuoso> harrisi: Only use BinData classes to de-serialize, nothing more.
Humdai has quit [Client Quit]
<harrisi> the relevant lines are 86-95
<harrisi> specifically, 89
Humdai has joined #ruby
<harrisi> constant_pool would be an array that is populated after line 162 (ClassFileEx.read(io))
<dminuoso> harrisi: a choice is the equivalent of a C union, right?
<harrisi> as far as I understand it.
<harrisi> or just a case
qwertyco has quit [Ping timeout: 268 seconds]
<dminuoso> harrisi: Decouple it then. Add an attribute to AttributeInfo, and initialize it with the correct selection.
dtscode has joined #ruby
<harrisi> I should also say that this is the first ruby code I've written.
Burgestrand has joined #ruby
faces has joined #ruby
nowhere_man has joined #ruby
<dminuoso> harrisi: With that in mind, you should use the block form of IO::open - it ensures that the IO object is closed properly. :-)
SesMan has joined #ruby
<dminuoso> i.e. File.open("something") { |io| /* use io */ }
<harrisi> hm, yeah.
ichkv has quit [Remote host closed the connection]
cyphase has joined #ruby
pandaant has joined #ruby
<dminuoso> harrisi: Ohhh I finally understand your problem.
<dminuoso> harrisi: Replace the value of your :selection with a lambda.
<dminuoso> harrisi: With that done, you can actually do it like that. :-)
<dminuoso> (This will evaluate the selection at runtime, requiring that you have populated that constant_pool structure before)
<harrisi> right, but I don't understand how to reference the constant_pool array from that lambda
<dminuoso> harrisi: The same way
SesMan has quit [Read error: Connection reset by peer]
<harrisi> so I can just reference this.constant_pool or something?
<dminuoso> harrisi: Sure.
<harrisi> :o
zukin has joined #ruby
<dminuoso> harrisi: well, is constant_pool an attribute of this class?
<harrisi> if you look at the last line of the gist (`PP.pp(cfex.constant_pool[12].info.bytes)`), that's essentially what the lambda would be (without the call to PP.pp)
<harrisi> constant_pool is an attribute of ClassFileEx, which is the "complete" record used for reading the whole file
SesMan has joined #ruby
<dminuoso> harrisi: So start using classes. Use some Ruby class to describe this constant_pool and populate it.
<dminuoso> harrisi: That way you have some "constant_pool" object that your BinData readers can use.
<harrisi> hm
<dminuoso> (Don't force re-using your BinData classes to maintain state - try to only use them to de-serialize data)
<dminuoso> And populate your own data structures with them.
the_drow has joined #ruby
rbr has quit []
<harrisi> ah, so rather than the whole ClassFileEx combining everything (which is/inherits BinData::Record), have a normal ruby class with those attributes by themselves and when populating the object just serialize each piece?
<dminuoso> Yeah you could do that.
andikr has joined #ruby
ur5us has quit [Remote host closed the connection]
<harrisi> was that not what you were saying? :(
ur5us has joined #ruby
rbr has joined #ruby
harai_ has joined #ruby
<harrisi> when I said serialize, I meant deserialize.
biberu has joined #ruby
flying has joined #ruby
pawnbox has quit [Remote host closed the connection]
vuoto has joined #ruby
<dminuoso> harrisi: Either that, or modify these classes that derive from BinData classes in a way that they are more usable.
cyphase has quit [Ping timeout: 240 seconds]
<dminuoso> harrisi: The issue with your approach is that you require global data to connect your pieces.
Alexey|2 has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
Couch has joined #ruby
ocbtec has joined #ruby
chadwtaylor has joined #ruby
<harrisi> I should probably read more about ruby. and serializing data. :)
cyphase has joined #ruby
chadwtaylor has quit [Ping timeout: 268 seconds]
<harrisi> dminuoso: do you have any links/directions that would help me design a better way of accomplishing this specific task?
<dminuoso> harrisi: Practice.
pawnbox has joined #ruby
<harrisi> argh, but I already have so few hours in the day! :)
<dminuoso> harrisi: Reading doesn't improve, practice does.
<dminuoso> So it's your choice. Do you want to waste those few hours reading, or practicing?
mikecmpbll has joined #ruby
<harrisi> practice, I suppose.
<dminuoso> harrisi: Generally the problem with global state is that it gives no control over code floew.
<dminuoso> Since anyone from anywhere at any time can access it.
<harrisi> right, I'm familiar with that issue.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<harrisi> I just didn't care to bother doing it the right way since I intended to just work on this program for a night a few months ago.
tvw has joined #ruby
charliesome has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
<harrisi> it was just something to sort of get more familiar with basic ruby syntax.
pawnbox has quit [Remote host closed the connection]
<harrisi> I know that's a terrible excuse, but that was the reason for not bothering with any sort of structure or encapsulation or anything.
nankyokusei has joined #ruby
pawnbox has joined #ruby
<dminuoso> harrisi: Reduce the scope then. Don't try to build a parser that understands everything, focus on just some bits and pieces.
<dminuoso> That way you can write clean Ruby code with good encapsulation and good patterns
bsrd has quit [Read error: Connection reset by peer]
jcao219 has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
SesMan has quit [Read error: Connection reset by peer]
elenatanasoiu has joined #ruby
zukin has quit [Ping timeout: 268 seconds]
vuoto has quit [Quit: Lost terminal]
SesMan has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
zukin has joined #ruby
vuoto has joined #ruby
Immune has quit [Ping timeout: 248 seconds]
Pupeno has quit [Remote host closed the connection]
the_drow has quit [Quit: Leaving]
vuoto has quit [Client Quit]
vuoto has joined #ruby
Pupeno_ has joined #ruby
blackmesa has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
Pupeno_ has quit [Read error: Connection reset by peer]
bsrd has joined #ruby
Pupeno has joined #ruby
gingray has joined #ruby
cyphase has joined #ruby
jaequery has joined #ruby
wingwalker has joined #ruby
salut has joined #ruby
conta has quit [Quit: conta]
mim1k|wo1k is now known as mim1k|work
blackmesa has quit [Ping timeout: 260 seconds]
ichkv has joined #ruby
arne_ has joined #ruby
arne_ is now known as Bish
<Bish> hi folkies! if i want to share data between subclasses, is it dirty to do that via instance variables of a class?
<ljarvis> that's exactly how you should do it
vuoto has quit [Quit: Lost terminal]
<ljarvis> although without seeing code that's probably not good advise :)
vuoto has joined #ruby
<dminuoso> apeiros: Fracking Oracle hit again:
<dminuoso> OCIError: ORA-00932: inconsistent datatypes: expected - got CLOB:
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso> Piece of shit.
<Bish> i could do it with overloading methods ofcourse
charliesome has joined #ruby
<dminuoso> Bish: Provide the data through an accessor.
<dminuoso> You know. Class invariants and stuff.
al2o3-cr has joined #ruby
<Bish> yeah that i will do, but having instance variables in a class is valid?
<Bish> i mean, good practice
<dminuoso> Bish: Whether it's good practice depends on what you are doing, and how you are implementing it.
<dminuoso> 10:22 < ljarvis> although without seeing code that's probably not good advise :)
<dminuoso> Listen to the good man/woman.
Ropeney_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dtscode has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cyphase has quit [Ping timeout: 260 seconds]
<Bish> im having a basemodel class, which all models inherit from, and i somehow want to save what the enduser of the webapp can see/edit
<Bish> so my plan was having an instance variable like @visible_fields = [:id], and have a getter where subclasses acces it
<dminuoso> Bish: Is that state mutable?
<Bish> yeah, subclasses will "add" stuff to that
<Bish> whatever "add" means in that context
<dminuoso> Bish: That is not mutable then.
<Bish> how is it not?
<dminuoso> Bish: You have Base, Derived1 and Derived2. If Derived1 was to add stuff to the shared state of Base, then Derived2 would also have it.
<ljarvis> i still don't understand without code tbh
<Bish> okay, i will create a small gist
SesMan has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
SesMan has joined #ruby
cyphase has joined #ruby
<Bish> i know it's not possible this way, but this is basicially what i want to do
<Bish> it would not be a problem if i only used methods, but that would be not performant
rsampaio_ has quit [Ping timeout: 260 seconds]
<Bish> since the array would've been created on every access
<dminuoso> Bish: Let's get somethinig out of the way. By using Ruby you already have signed the "not caring about performance" contract.
<dminuoso> Next up, your worries are just premature optimization.
<Bish> well, that doesn't mean i can ignore performance
SesMan has quit [Read error: Connection reset by peer]
<dminuoso> Bish: But when you ignore methods because you think they are too expensive, then that's just downright silly.
<Bish> recreating an array on every access will be a performance penalty even on ruby
<dminuoso> Bish: Nobody forces you to re-create the array.
<Bish> yeah i know, but i don't know how to do it without, thats why i am asking here ;)
SesMan has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> Bish: Let me cook up a small eval.in code
nullsides has quit [Ping timeout: 244 seconds]
gregf_ has joined #ruby
tomphp has joined #ruby
timvisher has quit [Remote host closed the connection]
<Bish> dminuoso: thank you!
timvisher has joined #ruby
<matthewd> > If Derived1 was to add stuff to the shared state of Base, then Derived2 would also have it.
<matthewd> And you do want that, or you don't want that?
<dminuoso> You make a valid point, I simply assumed this could not be what he wanted considering the problem domain.
<Bish> i don't want, sorry if i didn't specify enough
nullsides has joined #ruby
<Bish> i want baseclass to have an empty @user_visible_fields, and all subclasses having something in it
wingwalker has quit [Quit: Leaving]
<matthewd> Check out how ActiveRecord uses class_attribute (from ActiveSupport)
zukin has quit [Ping timeout: 268 seconds]
<Bish> i don't like rails stuff
Alexey|2 has quit [Ping timeout: 260 seconds]
<matthewd> You don't have to use ActiveSupport in your project in order to read how it works
<Bish> that's true
<Bish> but if i see how it works, will i also be able to write it myself
<Bish> i don't think so
<Bish> ljarvis: that looks pretty
frankiee_ has joined #ruby
<dminuoso> Bish: https://eval.in/657995
qwertyco has joined #ruby
<dminuoso> Bish: This does inheritance as you requested.
zukin has joined #ruby
qwertyco has quit [Client Quit]
<Bish> that looks complicated :o
qwertyco has joined #ruby
<matthewd> Then maybe you should just use overloaded methods
<dminuoso> Bish: It's very simple.
<Bish> by_subclass.send(:initialize_subclass, @visible_fields || []) <= what does this do, i mean the second parameter will just be visible_fields or empty array
<Bish> how does initialize_subclass know what to do?
<dminuoso> Bish: it's defined above.
<Bish> oh, i am an idiot
<dminuoso> Bish: the trick is just the inherited method itself, its a callback that is automatically called when someone derives from your class
vuoto has quit [Remote host closed the connection]
jahmalz has joined #ruby
<dminuoso> I pre-initialize the sub-class with the fields from the base class.
<dminuoso> alternatively you could have the visible_fields accessor walk the inheritance chain
kent\n has quit [Remote host closed the connection]
dn`_ has joined #ruby
jeyraof has joined #ruby
lempa has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
ta__ has joined #ruby
helpa-bot has joined #ruby
jsrn_ has joined #ruby
timvishe` has joined #ruby
<dminuoso> Bish: Im not a big fan of this inherited callback though, so I would opt for the latter approach.
GinoMan2440Wrx has joined #ruby
Asher1 has joined #ruby
tdy1 has joined #ruby
LoneHe___ has joined #ruby
Nahra` has joined #ruby
vondruch has joined #ruby
aurelien` has joined #ruby
SesMan has quit [Read error: Connection reset by peer]
<matthewd> dminuoso: Careful.. that's starting to sound like how Rails works. And that's apparently a no-go.
K7 has quit [Quit: Connection closed for inactivity]
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
olivierjanss_ has joined #ruby
statelesscode_ has joined #ruby
<dminuoso> matthewd: Yeah. It's an an inversion of responsibilies. A base class should not know about sub-classes.
kent\n has joined #ruby
juanfra has quit [Disconnected by services]
sonOfRa_ has joined #ruby
juanfra_ has joined #ruby
SesMan has joined #ruby
daemoen_ has joined #ruby
Talltree_ has joined #ruby
bronson_ has joined #ruby
Gnubie__ has joined #ruby
Toledo has joined #ruby
knight- has joined #ruby
<matthewd> There are also implications for post-inheritance mutation of the parent
helpa-bot has quit [Remote host closed the connection]
wildleaf_ has joined #ruby
scottala1 has joined #ruby
gigetoo_ has joined #ruby
ljarvis_ has joined #ruby
helpa-bot has joined #ruby
ericwood_ has joined #ruby
isomorph1smes has joined #ruby
dn`_ has quit [Client Quit]
<dminuoso> matthewd: Yeah. Though Im not a big fan of reopening classes either.
Bish_ has joined #ruby
<Bish_> what is the best way to access them in instances?
GooseYAr1 has joined #ruby
crankhar1er has joined #ruby
<Bish_> what is the best way to access them in instances?*
ptx0_ has joined #ruby
ltd_ has joined #ruby
Sp4rKy_ has joined #ruby
raldu_ has joined #ruby
krandi has joined #ruby
fbt_ has joined #ruby
shadeslayer_ has joined #ruby
<dminuoso> Bish: self.class.visibile_attributes
Prira_ has joined #ruby
alnewkir1 has joined #ruby
KnownSyntax_ has joined #ruby
dn`_ has joined #ruby
Kuukunen- has joined #ruby
compass_ has joined #ruby
pandaant_ has joined #ruby
bairyn_ has joined #ruby
dn`_ has quit [Client Quit]
helpa-bot has quit [Remote host closed the connection]
drbrain_ has joined #ruby
yasu____ has joined #ruby
helpa-bot has joined #ruby
ljarvis has quit [Disconnected by services]
ljarvis_ is now known as ljarvis
pwnd_nsfw has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
nebg_ has joined #ruby
constantinexvi_ has joined #ruby
yossarian has joined #ruby
cydrobolt_ has joined #ruby
twistedpixels_ has joined #ruby
yossarian has quit [Excess Flood]
twistedpixels_ has quit [Changing host]
twistedpixels_ has joined #ruby
helpa-bot has quit [Remote host closed the connection]
SirFunk_ has joined #ruby
gsingh93- has joined #ruby
jolamb_ has joined #ruby
<Bish_> :( sequel does some magic stuff with inheritance :(
helpa-bot has joined #ruby
tvsutton_ has joined #ruby
Radar_ has joined #ruby
hfp_ has joined #ruby
dupin has joined #ruby
<ljarvis> you're using sequel?
antgel has quit [Read error: No route to host]
sheepman_ has joined #ruby
IcyDragon has joined #ruby
KrzaQ- has joined #ruby
Affix has joined #ruby
yossarian has joined #ruby
yossarian has quit [Excess Flood]
dupin is now known as Guest50834
Nilium_ has joined #ruby
NightMonkey_ has joined #ruby
<Bish_> ljarvis: yes.
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
<ljarvis> that would have been a helpful mention :/
chihhsin_ has joined #ruby
Affix is now known as Guest71746
PaulePan1er has joined #ruby
timvisher has quit [*.net *.split]
Bish has quit [*.net *.split]
ichkv has quit [*.net *.split]
andikr has quit [*.net *.split]
pandaant has quit [*.net *.split]
vondruch_ has quit [*.net *.split]
ta_ has quit [*.net *.split]
DoubleMalt has quit [*.net *.split]
tdy has quit [*.net *.split]
statelesscode has quit [*.net *.split]
compass has quit [*.net *.split]
gigetoo has quit [*.net *.split]
Asher has quit [*.net *.split]
LoneHerm_ has quit [*.net *.split]
Mia has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
misterpink has quit [*.net *.split]
bronson has quit [*.net *.split]
daffy_duck_2 has quit [*.net *.split]
Sauvin has quit [*.net *.split]
croberts has quit [*.net *.split]
Guest52263 has quit [*.net *.split]
GinoManWrx has quit [*.net *.split]
helpa has quit [*.net *.split]
linduxed has quit [*.net *.split]
alnewkirk has quit [*.net *.split]
sheepman has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
ericwood has quit [*.net *.split]
knight_ has quit [*.net *.split]
KrzaQ has quit [*.net *.split]
NightMonkey has quit [*.net *.split]
chihhsin has quit [*.net *.split]
tvsutton has quit [*.net *.split]
SirFunk has quit [*.net *.split]
isomorphismes has quit [*.net *.split]
scottalan has quit [*.net *.split]
clamstar has quit [*.net *.split]
fbt has quit [*.net *.split]
seggy has quit [*.net *.split]
zenspider has quit [*.net *.split]
donnoc has quit [*.net *.split]
shadeslayer has quit [*.net *.split]
olivierjanss has quit [*.net *.split]
GooseYArd has quit [*.net *.split]
pocketprotector has quit [*.net *.split]
scottschecter has quit [*.net *.split]
inukshuk has quit [*.net *.split]
ReinH_ has quit [*.net *.split]
IceDragon has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
constantinexvi has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
Talltree has quit [*.net *.split]
daemoen has quit [*.net *.split]
kies has quit [*.net *.split]
woodruffw has quit [*.net *.split]
gnarf has quit [*.net *.split]
ptx0 has quit [*.net *.split]
cydrobolt has quit [*.net *.split]
eam has quit [*.net *.split]
mikee has quit [*.net *.split]
wildleaf has quit [*.net *.split]
Prira has quit [*.net *.split]
Radar has quit [*.net *.split]
aurelien has quit [*.net *.split]
JiYu has quit [*.net *.split]
sonOfRa has quit [*.net *.split]
Guest87791 has quit [*.net *.split]
drbrain has quit [*.net *.split]
gsingh93 has quit [*.net *.split]
crankharder has quit [*.net *.split]
_joes_ has quit [*.net *.split]
SpX has quit [*.net *.split]
YaknotiS has quit [*.net *.split]
phantummm has quit [*.net *.split]
twistedpixels has quit [*.net *.split]
Nahra has quit [*.net *.split]
malcolmva has quit [*.net *.split]
nebg has quit [*.net *.split]
yasu___ has quit [*.net *.split]
dn` has quit [*.net *.split]
jolamb has quit [*.net *.split]
KnownSyntax has quit [*.net *.split]
Nilium has quit [*.net *.split]
hfp has quit [*.net *.split]
bairyn has quit [*.net *.split]
raldu has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
ltd has quit [*.net *.split]
sheepman_ is now known as sheepman
KrzaQ- is now known as KrzaQ
hfp_ is now known as hfp
zenspider_ has joined #ruby
Guest50834 is now known as inukshuk
statelesscode_ is now known as statelesscode
gigetoo_ is now known as gigetoo
Sp4rKy_ is now known as Sp4rKy
gsingh93- is now known as gsingh93
drbrain has joined #ruby
Nilium_ is now known as Nilium
drbrain_ is now known as drbrain
drbrain has quit [Changing host]
clamstar has joined #ruby
seggy has joined #ruby
misterpink has joined #ruby
<Bish_> dminuoso: visible_attributes does not exist, am i supposed to create that method?
JiYu has joined #ruby
_joes_ has joined #ruby
yossarian has joined #ruby
pocketprotector has joined #ruby
donnoc_ has joined #ruby
armin_ has joined #ruby
dn` has joined #ruby
helpa-bot has quit [Remote host closed the connection]
NightMonkey_ is now known as NightMonkey
helpa has joined #ruby
eam has joined #ruby
TheMoonMaster_ has joined #ruby
<dminuoso> Bish_: I meant visible_fields, let me cook up a proper eval.in though
u0_a92 has joined #ruby
<dminuoso> The solution is haskish
armin has quit [Disconnected by services]
armin_ is now known as armin
olivierjanss_ is now known as olivierjanss
gnarf_ has joined #ruby
scottschecter has joined #ruby
zidane_g has quit [Ping timeout: 240 seconds]
techntoke_ has quit [Ping timeout: 240 seconds]
boxrick1 has quit [Ping timeout: 240 seconds]
Iacobus has quit [Ping timeout: 240 seconds]
rfv has quit [Ping timeout: 240 seconds]
deimos has quit [Ping timeout: 250 seconds]
ec has quit [Ping timeout: 260 seconds]
discopatrick has quit [Ping timeout: 250 seconds]
davidmichaelkarr has quit [Ping timeout: 240 seconds]
ghostlight has quit [Ping timeout: 268 seconds]
boxrick1 has joined #ruby
Iacobus has joined #ruby
zidane_g has joined #ruby
discopatrick has joined #ruby
deimos has joined #ruby
techntoke_ has joined #ruby
rfv has joined #ruby
ec has joined #ruby
davidmichaelkarr has joined #ruby
u0_a92 has quit [Client Quit]
DoubleMalt has joined #ruby
daffy_duck_2 has joined #ruby
<ljarvis> haskish, half hackish, half haskell
YaknotiS has joined #ruby
misterpink has quit [Read error: Connection reset by peer]
kies has joined #ruby
aurelien` is now known as aurelien
phantummm has joined #ruby
Sauvin has joined #ruby
linduxed has joined #ruby
<dminuoso> ljarvis: :)
ec has quit [Excess Flood]
aurelien has quit [Changing host]
mikee has joined #ruby
aurelien has joined #ruby
<dminuoso> ljarvis: Where's your love for Elixir?
malcolmva has joined #ruby
AlexRussia has joined #ruby
<dminuoso> Been a few hours already without you being amazed.
Beams has joined #ruby
ReinH_ has joined #ruby
zukin has quit [Ping timeout: 240 seconds]
<ljarvis> I've bottled it
ec has joined #ruby
ichkv has joined #ruby
phredus has quit [Remote host closed the connection]
<dminuoso> ljarvis: Must be a big bottle.
<ljarvis> no i just gzip it
<dminuoso> Bish_: https://eval.in/658024
<dminuoso> Bish_: That is a rough idea how of it can be done.
<ljarvis> oO
PaulePan1er is now known as PaulePanter
lifted has quit [Quit: lifted]
<dminuoso> Or maybe with a small tweak; https://eval.in/658027
<dminuoso> In order to keep inheritance chains senseful, the initial class should be a module rather.
elenatanasoiu has quit [Ping timeout: 260 seconds]
JoshS has joined #ruby
streeet25_ has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
tuxaddicted has joined #ruby
jcao219 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeyraof has quit [Quit: This computer has gone to sleep]
ghostlight has joined #ruby
ctp has joined #ruby
pawnbox has quit [Remote host closed the connection]
craigp_ has quit [Quit: WeeChat 1.5]
craigp has joined #ruby
charliesome has joined #ruby
pawnbox has joined #ruby
workmad3 has joined #ruby
duncannz has quit [Remote host closed the connection]
jud has quit [Quit: Leaving]
zukin has joined #ruby
aupadhye has quit [Quit: Leaving]
aupadhye has joined #ruby
dANOKELOFF has joined #ruby
shadeslayer_ is now known as shadeslayer
<Bish_> thanks alot ljarvis ,dminuoso
<Bish_> i think i am ahppy with the solution now
<Bish_> but i didn't take your new one with the ancestors
JeanCarloMachado has joined #ruby
<dminuoso> Bish_: Well, my previous solution is bad because a) it gives a base class control over derived classes (which is rather horrible to be honest). Also if you reopen a Base class and modify the attributes further, the derived classes are not notified of the change.
<dminuoso> Bish_: This solution allows each class to maintain its own state, but actively interrogates the ancestors for any visible_fields they may have.
cfec0b8d has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
<dminuoso> Bish_: It's basically the same as #methods
<Bish_> well a bit sanity is left to the developer always, doesn't it
<Bish_> i mean you can always instance_eval on the super-class
<dminuoso> Bish_: So when you call String.methods(false) you get the methods defined on String, but String.methods will return its methods and any of its ancestors.
<dminuoso> I just mimic that behavior.
<dminuoso> Bish_: It's not about intentionally breaking. It's about class invariants.
<dminuoso> A class invariant is not meant to be indestructable.
<Bish_> i don't understand how that destruct should happen with my current solution
m1911_ has joined #ruby
m1911_ has quit [Remote host closed the connection]
<dminuoso> Someone needs to take your tab key away.
<Bish_> is it a problem if Sequel::Model has a method named "initialize_subclass" ?
<Bish_> i don't even want to start the tab/space discussion
<Bish_> i like tabs.
TomyWork has quit [Ping timeout: 256 seconds]
<dminuoso> :p
zel has joined #ruby
<harfangk> lol
<dminuoso> Bish_: If sequel uses a similar mechanism, it could present a problem.
zel is now known as Guest24555
timvishe` has quit [Remote host closed the connection]
<Bish_> dminuoso: this is how it looks in my editor,too so what :D
timvishe` has joined #ruby
<Bish_> dminuoso: it surely does, jeremy evans is crazy about inheritance
<dminuoso> Bish_: Just use the last mechanism I described.
<Bish_> well i dont like it ;;
Snowy has joined #ruby
<dminuoso> If you prefer screwed up relationships that interfere with Sequel, which are also buggy in case of reopening classes - it's up to you.
<Bish_> im sure there is a solution that does both, not fuck up sequel & act like i need to
<Bish_> well, it isn't as bad.. im looking at it right now
<Bish_> but i don't get that ancestors iteration
codfection has joined #ruby
<Bish_> i don't need multiple levels of inheritance, so i could change that loop to a single statement, right?
<Bish_> brb food
Immune has joined #ruby
Pupeno_ has joined #ruby
Pupeno has quit [Ping timeout: 248 seconds]
stupidystupid has joined #ruby
conta has joined #ruby
elenatanasoiu has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
xall has quit [Ping timeout: 260 seconds]
Jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
streeet25_ has quit [Remote host closed the connection]
nettoweb has joined #ruby
streeet25 has joined #ruby
_whitelogger has joined #ruby
RTFM[away] has joined #ruby
RTFM[away] has quit [Changing host]
RTFM[away] has joined #ruby
nankyokusei has joined #ruby
yardenbar has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RTFM[away] has quit [Ping timeout: 260 seconds]
soc42 has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
bigkevmcd has joined #ruby
Humdai_ has joined #ruby
Humdai has quit [Ping timeout: 250 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
Alexey|2 has joined #ruby
frankiee_ has quit [Ping timeout: 260 seconds]
zipace has joined #ruby
JeanCarloMachado has joined #ruby
DrCode has joined #ruby
streeet25 has quit [Ping timeout: 240 seconds]
ichkv has quit [Remote host closed the connection]
aupadhye has quit [Quit: Leaving]
CloCkWeRX has quit [Quit: Leaving.]
blackgoat has joined #ruby
stupidystupid has quit [Quit: Textual IRC Client: www.textualapp.com]
Jameser has joined #ruby
stupidystupid has joined #ruby
stupidystupid has quit [Client Quit]
JeanCarloMachado has quit [Ping timeout: 248 seconds]
Immune has quit [Ping timeout: 260 seconds]
bauruine has quit [Quit: ZNC - http://znc.in]
bauruine has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
jaruga___ has joined #ruby
lifted has joined #ruby
TomyWork has joined #ruby
pandaant_ has quit [Remote host closed the connection]
streeet25 has joined #ruby
streeet25 has quit [Client Quit]
streeet25 has joined #ruby
codfection has quit [Ping timeout: 268 seconds]
zukin has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
ledestin has joined #ruby
lifted has quit [Quit: lifted]
jahmalz has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
pawnbox has joined #ruby
dANOKELOFF has quit [Quit: Ex-Chat]
conta has quit [Ping timeout: 260 seconds]
Jameser has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
<ljarvis> Bish_: did you consider the code I showed you?
conta has joined #ruby
jahmalz has joined #ruby
jahmalz has quit [Read error: Connection reset by peer]
anisha has joined #ruby
anisha has quit [Remote host closed the connection]
tlaxkit has joined #ruby
zapata has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
lifted has joined #ruby
submitnine has quit [Ping timeout: 240 seconds]
sonOfRa_ is now known as sonOfRa
nonnatus has joined #ruby
<Bish_> ljarvis: let me look at it!
<Bish_> somehow it slipped past me
<ljarvis> heh, you responded to it :)
SesMan has joined #ruby
<Bish_> which one was it? can you send the link again?
<ljarvis> I thought perhaps it wasn't suitable, and if not, maybe I could help with why
<Bish_> since i got net splitted during all of that
<ljarvis> yes the netsplit screwed me up a bit too
codfection has joined #ruby
<Bish_> well yeah that one is simply, would work i guess
<Bish_> simple*
strax has joined #ruby
da3mon has joined #ruby
<ljarvis> simple is usually a good starting point :)
zapata has joined #ruby
<Bish_> somehow i was scared that the instance variable will get shared between classes
lifted has quit [Quit: lifted]
<Bish_> but if i create that in a method, it won't happen, that's true
<dminuoso> Bish_: His solution will not satisfy the inheritance requirements you mentioned.
jahmalz has joined #ruby
<ljarvis> what are those requirements?
<ljarvis> I must've missed them
<Bish_> well, i said i wanna inherit a single time
<Bish_> and the base class is abstract
<dminuoso> Bish_: If you have Base, Derived1 and Derived2, define attributes in Base, then define attribute in Derived1, then the attributes in Base will be changed, as well as Derived2 which derives from Base.
<Bish_> either way, i learned alot from you two
<ljarvis> I don't understand but ok :)
<Bish_> either way, i think i will manage to handle it now ;) thank you!
soc42 has quit [Remote host closed the connection]
<ljarvis> defining an attribute in Derived1 won't change anything in base, or Derived2
marr has joined #ruby
alibby has joined #ruby
fergal has joined #ruby
qwertyco has quit [Ping timeout: 268 seconds]
rodfersou has joined #ruby
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
<fergal> hi guys, i have a ruby application that accepts a bunch of flags for execution, e.g. ruby myapp.rb —optiona 1 —optionb 2 —optionc 3. i want to move away from using flags, and move towards a more subcommand type approach, e.g. ruby myapp.rb taska, ruby myapp.rb taskz etc. however, in CI, i have a ton of jobs that use the old flag method of calling my app, which i don’t want to disturb. so i want to somehow add the subcommand usage on top of the existing
<fergal> flag usage, and have the sucbommands call the app with the appropriate flags. i’ve decided to use thor for subcommands, but i want to know, is there a way to modify ARGV so if i call my app with taska, my app will set the approprate flags by modifying ARGV and then calling the usual entry point of the app?
johnmilton has quit [Remote host closed the connection]
<apeiros> ARGV is a plain old array. you can do with it what you want.
<dminuoso> fergal: Before you reinvent the weel, have you looked into Rake?
<ljarvis> yeah if you want awful argument parsing, give rake a shot
<ljarvis> thor is pretty good
<fergal> dminuoso: yes we use internally for creating tasks for development use mainly. i’m using thor because i want something more end user-oriented
jaruga___ is now known as jaruga
<dminuoso> fergal: Well its certainly usable for end-user scenarios. Rails does it to a great extend. Not saying it's the solution, just wanted to toss it out there as an idea.
alexherbo2 has quit [Quit: WeeChat 1.5]
alexherbo2 has joined #ruby
<fergal> i was just wondering what the best approach here is - my first inclination was to use thor because it has a bunch of nice little features, and i find it very straightforward to set up/maintain. the main problem, or where things get ugly, is when i want to use a subcommand to re-call my app with the appropriate flags set…so then i was thinking, maybe i shouldnt use thor at all, and use the optionparser to crowbar in subcommands, which would caue less disruption
<fergal> my existing codebase, but i think would be a messier/hackier solution to implement
<matthewd> Thor commands are designed to be easy-ish to invoke programatically... so you shouldn't actually need to play with ARGV directly
<ljarvis> fergal: can you nest subcommands? or is there only 1 level?
<fergal> ljarvis: with thor yes, you can nest subcommands
<ljarvis> fergal: that wasn't my question :)
Guest58222 has quit [Read error: Connection reset by peer]
<ljarvis> fergal: do *you* want to nest subcommands in your code
<ljarvis> if you don't, often just using ARGV + option parser is nicer
alexherbo2 has quit [Client Quit]
<ljarvis> e.g. optionparser or slop (i heard it's great)
Alexey|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<fergal> ljarvis: oh, sorry, ummm right now i only need 1 level of subcommands, but thats not to say i wont need nested subcommands in the future (which is another reason i liked the idea of thor)
toretore has quit [Ping timeout: 260 seconds]
<ljarvis> right, yeah thor seems like the best job for this then
eizua has joined #ruby
ldnunes has joined #ruby
SesMan has quit [Read error: Connection reset by peer]
RedFromage has joined #ruby
CloCkWeRX has joined #ruby
<fergal> matthewd: the problem is invoking my app with flags, from within a thor subcommand. so say the odl way of calling my to do a task, say taskA, is: ruby myapp.rb —flag1 abc —flag2 xyz —flag3 test. i want to create a subcommand called taskA using thor, so i can just do: ruby myapp.rb taskA (which under the hood would call ruby myapp.rb —flag1 abc —flag2 xyz —flag3). at the point where my subcommand is called, ARGV looks like [“taskA”], but ideally i
<fergal> would then want to edit ARGV to look like [“—flag1”, “abc”…], and then call the old entry point of my app (which then parses ARGV)
nuck has joined #ruby
edwinvdgraaf has joined #ruby
<matthewd> Oh.. okay.
nuck is now known as Guest87552
<matthewd> Well yes, you can do that by changing ARGV
<ljarvis> or.. have default option arguments?
<fergal> but isn’t ARGV constant?
<matthewd> I just assumed you'd be rearranging things to be implemented via the structured thor commands, and then implementing the legacy options as a compatibility layer calling back to them
lifted has joined #ruby
qwertyco has joined #ruby
qwertyco has quit [Remote host closed the connection]
<apeiros> fergal: constant means constantly pointing to the same object. not that the object it points to is immutable.
Jameser has joined #ruby
<ljarvis> fergal: it's ruby, nothing is constant
<fergal> so i can clear ARGV, then append in the values i want?
<apeiros> s/is/should be/ (sadly not even that is enforced)
<ljarvis> absolutely
qwertyco has joined #ruby
<ljarvis> heh
<apeiros> but really, have your entry point be a method which defaults to ARGV, but accepts any array.
Snowy has quit [Remote host closed the connection]
qwertyco has quit [Remote host closed the connection]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> >> CONST = [1,2,3]; CONST.replace(["say", "whaaat?"]); CONST # no warning
<ruby[bot]> apeiros: # => ["say", "whaaat?"] (https://eval.in/658117)
qwertyco has joined #ruby
Snowy has joined #ruby
<apeiros> >> CONST = [1,2,3]; CONST = ["say", "whaaat?"]; CONST # warning, but not prohibited (sadly)
frankiee_ has joined #ruby
<ruby[bot]> apeiros: # => /tmp/execpad-57f06b21b7ee/source-57f06b21b7ee:2: warning: already initialized constant CONST ...check link for more (https://eval.in/658118)
edwinvdgraaf has quit [Remote host closed the connection]
<apeiros> (check the link, it's only a warning and the bot only shows 1 line of output)
edwinvdgraaf has joined #ruby
<ciawal> surely that should be called replace!
<apeiros> ciawal: and shift! and pop! and push! etc.?
<ljarvis> :P
<ljarvis> and delete
<ljarvis> that one always bugged me especially
<ljarvis> welcome to ruby, where the consistency is consistently inconsistent
<apeiros> in my toy language it was .upcase vs. .upcased. until I noticed there's words where you can't do that distinction :(
Snowy_ has joined #ruby
<ljarvis> yeah..
<ljarvis> my toy language removed oop and im 200% happier
<apeiros> pondered syntax to distinguish between "return a copy", "return modified self", "modify self but return result" etc., but never found a satisfying variant.
<apeiros> you removed oop or you removed mutability?
<ljarvis> i removed both
timvishe` has quit [Remote host closed the connection]
Snowy has quit [Ping timeout: 260 seconds]
ruby[bot] has quit [Remote host closed the connection]
inteq has quit []
merlin2049er has joined #ruby
<apeiros> so you reinvented prolog?
timvishe` has joined #ruby
ruby[bot] has joined #ruby
c355e3b has joined #ruby
<ljarvis> :D
<apeiros> j/k of course. what flavor do you use? FP?
<ljarvis> yep
<ljarvis> i only have some very basic types
<ljarvis> only modules and functions at the highest level
<ciawal> just use elixir ;)
<ljarvis> it's very oversimplified currently but it's working nicely
miguelfernandes has joined #ruby
<ljarvis> ciawal: honestly that's where my changes came from
<ljarvis> i use elixir
Snowy_ has quit [Ping timeout: 248 seconds]
<ljarvis> it's similar in that sense, but different in others :)
nowhere_man has joined #ruby
<Bish_> how do i change the binding of a proc?
<chrisseaton> Bish_: change it entirely? Or just change what's in it? I think you can read and write the binding via #binding
<Bish_> i want a proc to call methods on "self"
<Bish_> but since the proc remembers where it's from i cannot do that
johnmilton has joined #ruby
<chrisseaton> You want to change the value of self? I think you can do object.instance_eval(&proc) which changes self to be object
nonnatus has quit [Ping timeout: 260 seconds]
merlin2049er has quit [Quit: Leaving.]
johnmilton has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 240 seconds]
merlin2049er has joined #ruby
<ljarvis> pass the self to your proc?
DrCode has quit [Remote host closed the connection]
antgel has joined #ruby
<Bish_> darn this is fucked up, what chrisseaton works, but the proc uses an instance varialbe of the original class
johnmilton has joined #ruby
<Bish_> so i kind a want both, and don't want to do it via parameters..
<ljarvis> why?
<chrisseaton> I don't think there's a good way around that - method calls and instance variables obtain self in the same way - you can't change one without changing the other
<Bish_> ljarvis: im writing my own filter syntax for user searches in sequel
<Bish_> and want something like model.apply_my_filters("magic syntax")
<chrisseaton> Do you control the object that you want to use as self? Can you intercept instance variable reads and writes? Not sure.
<chrisseaton> You could certainly copy them in if it's read-only
<Bish_> chrisseaton: no i don't, depends on what you mean by "control"
<Bish_> i have a copy of it
tectonic has joined #ruby
synthroid has joined #ruby
shinnya has joined #ruby
tectonic has quit [Client Quit]
synthroi_ has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
synthroid has quit [Ping timeout: 240 seconds]
<Bish_> wow, now i have a proc returning a proc, and use it instance_evaled on the dataset
<Bish_> it works.. but this is kinda ugly.
nankyokusei has joined #ruby
<sonOfRa> When writing native extensions, are exceptions thrown immediately when they occur (for example, in a Check_Type macro), or are they only thrown once the function that I am currently in has returned?
arashb has joined #ruby
<matthewd> sonOfRa: Immediately.
lifted_ has joined #ruby
<sonOfRa> So, if I do a check_type, and then write C code depending on the type, that C code will not end up in weird segmentation faults?
lifted has quit [Ping timeout: 268 seconds]
houhoulis has joined #ruby
lifted_ has quit [Read error: Connection reset by peer]
lifted has joined #ruby
jud has joined #ruby
jud has quit [Changing host]
jud has joined #ruby
<dminuoso> sonOfRa: rb_raise breaks code flow by using setjmp/longjmp (which is Ruby's underlying mechanism for exceptions)
nankyokusei has quit [Ping timeout: 260 seconds]
<matthewd> That too.. though I was pointing more to the substantial prior art of usage within core & stdlib
arashb has quit [Ping timeout: 248 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso> Yeah. Check_Type ends up calling rb_check_type, and I just showed you the relevant bit there.
<sonOfRa> Ah, good. I was expecting that, but uncertain, because the only other language I've written native bindings for was java, where exceptions aren't actually raised immediately, but one has to check if they are pending during execution flow, and they are only raised when the native function returns
<sonOfRa> Thanks!
<dminuoso> sonOfRa: So Check_Type ends up calling rb_raise, which ends up going in there, and you will not get back from there.
<sonOfRa> Yeah. Thanks for the quick help.
tvw has joined #ruby
<dminuoso> sonOfRa: There is an excellent source, let me dig it up for you.
blackmesa has quit [Ping timeout: 260 seconds]
<sonOfRa> I've been reading this: https://silverhammermba.github.io/emberb/c/, it's not complete, but has a lot of information
<dminuoso> Heh.
<dminuoso> sonOfRa: It's pretty great. :)
<dminuoso> Considering the poor state of internal documentation, that thing is golden.
RTFM[away] has joined #ruby
RTFM[away] has joined #ruby
ace05 has joined #ruby
Snowy has joined #ruby
streeet25 has left #ruby ["Ex-Chat"]
streeet25 has joined #ruby
streeet25 has quit [Read error: Connection reset by peer]
calmchaos has quit [Remote host closed the connection]
ace05 has quit [Ping timeout: 250 seconds]
bruce_lee has quit [Ping timeout: 248 seconds]
da3mon has quit [Quit: Zzzz...]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
ponga has joined #ruby
RedFromage has quit [Quit: Textual IRC Client: www.textualapp.com]
SesMan has joined #ruby
Jameser has quit [Ping timeout: 248 seconds]
Jameser has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
sdothum has joined #ruby
ichkv has joined #ruby
mrwn has joined #ruby
frankiee_ has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
aupadhye has joined #ruby
<mrwn> i have an error while trying to install rvm
mrwn has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
mrwn has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
flopsec has quit [Quit: https://fnordserver.eu]
Jameser has quit [Max SendQ exceeded]
Azure has joined #ruby
Guest81912 is now known as awk
bkxd has joined #ruby
Jameser has joined #ruby
Satyajit has quit [Quit: https://fnordserver.eu]
brendan- has joined #ruby
<sonOfRa> Are ruby strings not internally immutable? StringValueCStr is defined to rb_string_value_cstr((), which returns char* rather than const char* (sorry if that came through twice, network problems)
mrwn has quit [Remote host closed the connection]
Guest24555 has quit [Quit: https://fnordserver.eu]
gingray has quit [Quit: Lost terminal]
zipace has quit [Ping timeout: 268 seconds]
Jameser has quit [Read error: Connection reset by peer]
<matthewd> sonOfRa: Strings are not immutable.. I'd have to the check the source to confirm whether that was a deliberate/safe exposure.
Jameser has joined #ruby
tk__ has joined #ruby
juanfra_ has quit [Quit: juanfra_]
juanfra has joined #ruby
da3mon has joined #ruby
<sonOfRa> It essentially returns whatever RSTRING_PTR spits out, minus some sanity checks whether the string is actually possible to represent as a C String
tyang has joined #ruby
<matthewd> Specifically, I'm not sure whether it triggers a copy if the string data is shared
<sonOfRa> https://github.com/ruby/ruby/blob/468301b98487d3b2b0d9e4a60c912803f4ba39f0/string.c#L2082 doesn't look like it, unless the RSTRING_PTR macro creates the copy
nullfxn has joined #ruby
<dminuoso> sonOfRa: Just be aware of which commit you are browsing under.
<dminuoso> (Before you use the source code to assume behavior)
blackgoat has quit [Quit: WeeChat 1.5]
<sonOfRa> Oh, right
<sonOfRa> Doesn't look different under ruby_2_3, but thanks for the hint
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nullfxn has quit [Client Quit]
nullfxn has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
j3r0 has joined #ruby
sepp2k has joined #ruby
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
nullfxn has quit [Quit: leaving]
lifted_ has joined #ruby
<matthewd> Ah, right... if you wanted to write to it, you'd need to rb_str_modify first -- both to make it independent, and also ensure it's not frozen etc
<matthewd> (or do other things, if you needed to change the length too)
alsvidr has joined #ruby
<sonOfRa> I don't need to mutate them, I was just surprised they were non-const
<sonOfRa> non-const return values sometimes (not always) mean that I'm responsible for freeing the returned data
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craigp has quit [Ping timeout: 260 seconds]
harai_ has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
Bish_ is now known as Bish
Suresh has joined #ruby
last_staff has quit [Quit: last_staff]
bkxd has quit [Ping timeout: 260 seconds]
lifted_ has quit [Read error: Connection reset by peer]
<Suresh> hi guys
<Suresh> i need a help from this method
DrCode has joined #ruby
<Suresh> this is the method
<Suresh> and this is the error
aupadhye has quit [Quit: Leaving]
<Suresh> even the i define the method words there is still raising an error
ptx0_ has quit [Quit: Changing server]
blackmesa has joined #ruby
<Suresh> any kind soul?
Jan_ has joined #ruby
jaruga has quit [Ping timeout: 260 seconds]
<Suresh> anyone?
Stazer has joined #ruby
ptx0 has joined #ruby
<alsvidr> Suresh: what's your intention with the words method?
Stazer has left #ruby [#ruby]
da3mon has quit [Quit: Zzzz...]
blackmesa has quit [Ping timeout: 260 seconds]
<Suresh> to scan each sentence into words
ptx0 has quit [Client Quit]
<alsvidr> Suresh: IIRC, there's no such method in the standard library. You probably just want to use "split" instead of "words".
<hanmac> Suresh: words does look like a ActiveSupport method ... which is not part of ruby
<Suresh> hais guys the words is the method name
<Suresh> lol
ptx0 has joined #ruby
da3mon has joined #ruby
<Suresh> LOL
<SebastianThorn> i dont understand the loling
<Suresh> def words is the method name
<Suresh> every method needs a name to it right?
<alsvidr> It's not defined in the gist you shared
<alsvidr> My bad, it is ...
<Suresh> i have send 2 links
<alsvidr> The problem is, that it is defined out of context.
<Suresh> but i did put the words method in the Hello class you see
<alsvidr> You have to define the words method for the class of the objects you want to use it on.
<Suresh> meaning?
harai_ has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
<alsvidr> You want to call it for objects of class String but you define it for objects of class Hello.
<alsvidr> Meaning, it's not working because it's not defined.
<Suresh> but it isn't it under the class Hello?
<SebastianThorn> either you extend String with word, or add arguments the the word in your current class
tdy1 has quit [Ping timeout: 240 seconds]
<Suresh> haha i am lost
chadwtaylor has joined #ruby
<SebastianThorn> tho i might be wrong, because i dont really understand what the code is suppose to do
<Suresh> basically you want to return the senetence with the desired words
<alsvidr> Wild guess, you were exposed to Java.
<Suresh> haha why did you say that?
nullfxn has joined #ruby
<alsvidr> The Hello class is pretty useless and not necessary in Ruby.
<SebastianThorn> you want to change ruby for test?
<Suresh> ruby and test are the desired words
<Suresh> so what you guys want me to do?
<SebastianThorn> you want to save all strings that contain ruby or test?
<Suresh> yeah
<SebastianThorn> ok
<Suresh> that's the meaning of the code
<Suresh> basically you give an array of sentence and sort the sentences
<Suresh> and return you the sentence sorted
childermass has joined #ruby
<matthewd> Suresh: You're calling words on s.downcase, right?
fmcgeough has joined #ruby
<Suresh> yeah
<Suresh> s.words.length meaning e.g it's the sentence with: hello my name is suresh,downcase it and the total words is 4
rclsilver has joined #ruby
<matthewd> What class is s.downcase?
Pumukel has joined #ruby
<Suresh> s means you take whatever sentence and downcase it
<matthewd> That is not an answer to my question
<matthewd> Do you know what a class is?
<Suresh> yes
<Suresh> oh sorry
<Suresh> it's Hello class
<matthewd> What class is s?
<SebastianThorn> i made a comment in your gist
JeanCarloMachado has joined #ruby
<Suresh> string
<SebastianThorn> should get you going
<matthewd> And String#downcase is returning an instance of Hello class?
<rclsilver> hello, i've some troubles with Gemfile and bundle. i want to install a gem from github. i defined this in my Gemfile (gem 'puppet-strings', :git => 'https://github.com/puppetlabs/puppet-strings.git', :branch => 'master'), i executed bundle install. i see using puppet-strings from github (branch master).. but when i execute puppet strings:generate, it doesn't found the puppet strings classes... any idea? :(
lifted has quit [Quit: lifted]
<Suresh> thx sebas
<SebastianThorn> np, you can do s.dowcasr.include
<SebastianThorn> and then just make "ruby" and arg
<Suresh> hey sebad
<Suresh> sebas
<matthewd> ?puppet rclsilver
<ruby[bot]> rclsilver: Please join #puppet for help with it.
<Suresh> basically you aren't using the method tough
<Suresh> lol
<SebastianThorn> Suresh: should be really easy to add
<rclsilver> already asked on puppet :s
<Suresh> ya your answer is correct
<rclsilver> but in my case, its a Gemfile question
sonOfRa has quit [Quit: Bye!]
<Suresh> but you are not using the method
<matthewd> Suresh: [23:57:09] <matthewd>And String#downcase is returning an instance of Hello class?
<Suresh> should be right?
<matthewd> I just checked the documentation for String#downcase on ruby-doc.org, and it didn't mention Hello at all
rodfersou is now known as rodfersou|afk
lifted has joined #ruby
sonOfRa has joined #ruby
DLSteve has joined #ruby
<chrisseaton> matthewd: well of course not - Hello is a user defined class - how would the people writing the docs know about it?
chadwtay_ has joined #ruby
Jan_ is now known as DefV
chadwtay_ has quit [Remote host closed the connection]
<matthewd> chrisseaton: *I* know that ;)
<alsvidr> chrisseaton: He's trying to educate Suresh ... be quiet and watch in awe of his patience.
chadwtay_ has joined #ruby
aryaching has joined #ruby
<SebastianThorn> now im not sure of who is trolling whom
alexherbo2 has joined #ruby
frankiee_ has joined #ruby
<Suresh> Hello is a class name
bsrd has quit [Quit: WeeChat 1.6]
<dminuoso> alsvidr: I think he has better things to do than to watch in awe.
Zamyatin has joined #ruby
tdy1 has joined #ruby
bsrd has joined #ruby
<Suresh> but they are keep raising the words method not defined
<matthewd> Suresh: What does the error say?
<Suresh> undefined method `words' for "I like ruby":String (NoMethodError)
<dminuoso> >> a = "foobar"; a.hello_Suresh
<ruby[bot]> dminuoso: # => undefined method `hello_Suresh' for "foobar":String (NoMethodError) ...check link for more (https://eval.in/658179)
<dminuoso> Suresh: ^- See that?
<matthewd> Suresh: Does that error contain any clues about what class you're calling words on?
<matthewd> (I'll ignore, for now, the fact that error doesn't match the code you showed)
ekinmur has joined #ruby
<Suresh> nope
<SebastianThorn> Suresh: is this a school-asignment you got?
z-i-g has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
<alsvidr> dminuoso: Was that a hint to chrisseaton to get back to work and not help noobs on IRC?
<Suresh> i am self learning
lifted has quit [Quit: lifted]
lifted has joined #ruby
edwinvdgraaf has quit []
<SebastianThorn> Suresh: what source are you using?
<matthewd> Suresh: There's nothing in that message that looks like a class?
<Suresh> i am using peter cooper beginning ruby
<Suresh> sorry guys i am new to ruby
gnufied has joined #ruby
gnufied has quit [Max SendQ exceeded]
craigp has joined #ruby
edwinvdgraaf has joined #ruby
<Suresh> but i got an question
<matthewd> Suresh: Okay, let's try it this way: there is, in fact, something in the error that tells you what class you called the method on. Can you find it?
<SebastianThorn> is there a commad or some for why's guide or the other guides?
<Suresh> String right?
<matthewd> Right indeed
bsrd has quit [Quit: WeeChat 1.6]
<Suresh> so why does the String class is raising an issue?
<matthewd> Because it doesn't have a words method
gnufied has joined #ruby
jaguarmagenta has joined #ruby
saslam has joined #ruby
<SebastianThorn> Suresh: get started on ruby here: http://tryruby.org/ not sure how long it is
childermass has quit [Quit: Textual IRC Client: www.textualapp.com]
<SebastianThorn> i think it is still current
nanoz has joined #ruby
<Suresh> it's like very weird becoz there is a method called words and the string class is raising an issue
<fergal> guys in java, i can define a classfull of static methods, and then sattically import these methods into other classes and call them as if they were defined within that class, i.e. i don’t need to call them using the package name. is it possible in ruby to create a class with static methods, e.g. a helper class with file IO helpers, and import these methods into a class, so that i can call the methods without having to specify the module name?
<matthewd> Suresh: Do you have experience in any programming language?
Toledo has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<SebastianThorn> Suresh: you are not calling the method you wrote, you are calling a method for string, that does not exist
<Suresh> yes i do java
saslam_ has joined #ruby
Toledo has joined #ruby
<Suresh> ok i understand
patarr has joined #ruby
<SebastianThorn> start with the guides i linked
sonOfRa has quit [Quit: Bye!]
<Suresh> ok so how do i expect a Hello object rather than a String object?
malconis has joined #ruby
<matthewd> You don't. How would you write this in Java?
<SebastianThorn> i dont wanna be an asshole here, but are you going to open the links i sent you and look at them?
jaguarmagenta has quit [Remote host closed the connection]
Wayne_Shephard has quit [Read error: Connection reset by peer]
saslam has quit [Ping timeout: 250 seconds]
<Suresh> kk thanks
<matthewd> SebastianThorn: Are they inherently better than Peter Cooper's book? :/
sonOfRa has joined #ruby
<SebastianThorn> i dont know Peter Cooper, but why's has comics in them :)
<SebastianThorn> matthewd: ^
sonOfRa has quit [Client Quit]
ChiefAlexander has joined #ruby
<SebastianThorn> matthewd: you rad Coopers? is it good?
<Suresh> yes it is good
sonOfRa has joined #ruby
<Suresh> how do guys became very good at ruby?
johnmccabe has joined #ruby
<dminuoso> Suresh: I never did.
<SebastianThorn> im not verry good, i just get by with what i know, and know where to search for what i need to learn
threh has joined #ruby
<ljarvis> irc? :D
<Suresh> oh i see
<dminuoso> Im just the bad mannered guy in here, pointing out without manners how some are even worse than myself.
<Suresh> anyway thx for helping :)
al2o3-cr has quit [Ping timeout: 260 seconds]
<matthewd> SebastianThorn: No I haven't, I was just confused because the solution you were insisting upon for "I'm working through this introductory material, and am [clearly] confused" was "read these other two full-length tutorials"
saslam_ has quit [Read error: Connection reset by peer]
ChiefAlexander_ has joined #ruby
fhw3 has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
ChiefAlexander has quit [Ping timeout: 260 seconds]
<fhw3> @help
lifted has quit [Ping timeout: 260 seconds]
<SebastianThorn> matthewd: ahh, ok, might not have been the best thing to do
lucast has quit [Ping timeout: 248 seconds]
ChiefAlexander_ has quit [Client Quit]
<fhw3> #rubyonrails
fhw3 has left #ruby [#ruby]
childermass has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
ChiefAlexander has joined #ruby
nankyokusei has joined #ruby
vondruch has joined #ruby
lucast has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga
<dyjakan> fergal: include sounds like the functionality you're looking for
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
pmden has joined #ruby
blackmesa has joined #ruby
Filiphe has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
lifted has joined #ruby
Snowy is now known as LDFJIO
kyle__ has joined #ruby
<kyle__> Can you get an object to print out its own variable name?
<chrisseaton> kyle__: no, I'm afraid not
<kyle__> @x={blan blah blah}
blackmesa has quit [Ping timeout: 240 seconds]
<chrisseaton> Well, actually, you could search the entire object graph to find all instance variables, but not all local variables
<kyle__> chrisseaton: drat.
<kyle__> What about looking it up by .object_id?
<chrisseaton> If it's just instance variables, not local variables, and you don't mind it being super-slow, then you can do it using ObjectSpace
<chrisseaton> kyle__: that won't give you the name
ichkv has quit [Remote host closed the connection]
<kyle__> chrisseaton: There's no mapping of name to id in the interpreter?
<kyle__> Humm.
ace05 has joined #ruby
<dminuoso> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<ljarvis> huh? if it's instance variables you can just `obj.instance_variables`
<chrisseaton> kyle__: there is but it isn't exposed to the program
<chrisseaton> ljarvis: I think kyle__ wants to get the name from an arbitrary object
<ljarvis> oh
ichkv has joined #ruby
lifted has quit [Ping timeout: 250 seconds]
jolamb_ is now known as jolamb
<ljarvis> so @foo = :bar; get "@foo" from @foo?
<kyle__> chrisseaton: ljarvis: yeah. Just for debugging on a stupid one off script I wrote to test an idea.
* kyle__ nods
<kyle__> Exactly like that ljarvis
<kyle__> I __know__ this is not something you should ever do in real code. But for playing around with things, it would seem useful.
timmyBsd has joined #ruby
<chrisseaton> Do you want me to show you how to do it just for instance variables then?
troulouliou_div2 has joined #ruby
<timmyBsd> Hiho
grh has quit [Ping timeout: 250 seconds]
calmchaos has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kyle__> chrisseaton: Sure. I'm looking at the objectspace docs, and nothing is jumping out at me yet.
<kyle__> So yes please.
blackmesa has joined #ruby
<timmyBsd> i got a question, whats wrong here https://bpaste.net/show/872409596fd8
ace05 has quit [Ping timeout: 250 seconds]
<Bish> the difference between proc and lambda is that lambda can return?
tdy1 is now known as tdy
<chrisseaton> kyle__: ObjectSpace.each_object { |o| o.instance_variables.each { |n| if o.instance_variable_get(n).object_id == x.object_id; puts n; end } }
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bish> your assumption that ruby should act like algebra?
<apeiros> chrisseaton: why not .equal?
<chrisseaton> apeiros: I can never remember those equal methods :)
<apeiros> heh
<ljarvis> Bish: the return semantics are different, and procs enforce number of arguments
<apeiros> but it's only 6(ish)!
calmchaos has quit [Ping timeout: 260 seconds]
<ljarvis> er, other way around
<ljarvis> i always forget
<kyle__> chrisseaton: Neat. That should do nicely. It's not like this will be called _-that__ many times in this script anyway ;)
<ljarvis> lambda enforces number of args
aufi has quit [Ping timeout: 268 seconds]
<Bish> and stabby = lambda, right?
<ljarvis> correct
<Bish> is there some kind of conversion between those two?
pawnbox has quit [Remote host closed the connection]
maddmaxx has joined #ruby
<Bish> like, i can create methods with blocks which have return right? how do i emulate that
ta__ has quit [Remote host closed the connection]
brendan- has joined #ruby
<ljarvis> so you're talking about blocks? not lambdas or procs
<ljarvis> they're different
<Bish> i have a method add_filter_method, which is converted to a proc and saved
<Bish> (it get's a block obviously)
<Bish> but i want that proc to return a value
mtkd has quit [Ping timeout: 260 seconds]
<Bish> so, how i get from block to lambda/or anything that is able to return
<ljarvis> that'll work as expected, just call .call(args) on it
<ljarvis> and it'll return the return value of the block
childermass has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bish> eh, no it doesn't that's why i ask
todd_dsmw has quit [Quit: Leaving]
newbie22 has joined #ruby
pawnbox has joined #ruby
<ljarvis> can you show?
<Bish> self.my_filters.merge!({name=>block.to_proc})
<ljarvis> dont call to_proc on it
<Bish> then it will become, what?
mtkd has joined #ruby
<Bish> LocalJumpError: unexpected return
<ljarvis> you're calling return explicitly?
<Bish> yes
newbie22 has quit [Client Quit]
symm- has quit [Ping timeout: 260 seconds]
agit0 has quit [Ping timeout: 250 seconds]
newbie22 has joined #ruby
j3r0 has quit [Ping timeout: 260 seconds]
<kyle__> ljarvis: It's been a while since I dug into it.... is there a good article that explains the difference between a lambda and block then? You yeild to both right?
<kyle__> Sometimes wandering into this channel forces me to go read stuff.
ichkv has quit [Remote host closed the connection]
<chrisseaton> kyle__: I can't think of an article, but the major difference at the front of my mind is that lambdas expect a correct number of arguments, where as procs and blocks (which are the same thing) take any old arguments and sometimes do strange things with them.
patarr has quit [Quit: patarr]
pawnbox has quit [Ping timeout: 268 seconds]
joast has joined #ruby
ichkv has joined #ruby
null_ref has joined #ruby
<dyjakan> even more important is the return point of both
<kyle__> chrisseaton: Ahh ok. So it's mostly a matter of strictness?
<dyjakan> # of args is just cherry on top
childermass has joined #ruby
<chrisseaton> dyjakan kyle__: yes there's also some differences in how they handle break and retry and things - it gets quite subtle
Derperperd has joined #ruby
<chrisseaton> A lambda is more like a proper method - if you return from it you return from the lambda. A proc is like a fragment of a method - if you return from it you return from the method that contains it.
newbie22 has quit [Read error: Connection reset by peer]
newbie22 has joined #ruby
pawnbox has joined #ruby
coolboy has joined #ruby
coolboy has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
<Bish> ljarvis: have you given up on me :D
tyang has quit [Ping timeout: 248 seconds]
troulouliou_div2 has quit [*.net *.split]
tekk has quit [*.net *.split]
bokayio has quit [*.net *.split]
tekk has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
wldcordeiro has quit [Ping timeout: 240 seconds]
qwertyco has quit [Ping timeout: 260 seconds]
fergal has quit [Ping timeout: 260 seconds]
fergal has joined #ruby
timvishe` has quit [Remote host closed the connection]
vondruch_ has joined #ruby
timvishe` has joined #ruby
nonnatus has joined #ruby
houhoulis has quit [Remote host closed the connection]
jzigmund has quit [Quit: leaving]
vondruch has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Remote host closed the connection]
<Bish> ljarvis: i can provide the block via &->(){}
<Bish> that makes the resulting proc being able to return
<Bish> but that makes it less pretty
jzigmund has joined #ruby
banisterfiend has joined #ruby
tk__ has quit [Quit: ばいばい]
dminuoso has joined #ruby
misterpink has joined #ruby
<Bish> wonder how define_method does that, but i guess that's c-foo
Stazer has joined #ruby
rippa has joined #ruby
aganov has quit [Quit: Leaving]
<dminuoso> asm>> def f; end
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/658209
zapata has quit [Quit: WeeChat 1.6]
polishdub has joined #ruby
<Bish> will ruby 3 with jit be awesome?
blackmesa has quit [Ping timeout: 240 seconds]
<chrisseaton> Bish: I think to make a JIT work in MRI they're going to need to resolve some serious open research questions about optimising through compiled C runtime code
<timmyBsd> anybody an idea whats wrong here ((Float::MAX - (2<<968)) == Float::MAX #=> true, and (Float::MAX - (2<<969)) == Float::MAX #=> false)
<dminuoso> chrisseaton: Talking about JIT, how's that "secret" project of yours going on?
<chrisseaton> dminuoso: was it you I promised to show that to? I forgot who wanted to see it
<Suresh> anyone got read peter cooper book?
<dminuoso> chrisseaton: Yeah.
<chrisseaton> I will DM you
<dminuoso> Very well.
<Bish> what is dm?
<Bish> heard that several times now
<chrisseaton> direct message - private message room
<Bish> im getting old
<Bish> oh.
<Bish> i thought it was some weird twitter thing.
<SebastianThorn> i thought you were getting banned DeMonized
zapata has joined #ruby
<Bish> why would getting banned? im a nice person
tenderlove has quit [Read error: Connection reset by peer]
<Bish> why would i get banned*
conta has quit [Ping timeout: 240 seconds]
lifted has joined #ruby
<chrisseaton> timmyBsd: when you add something to a float, the thing that is added is converted to a float, and in this case the float doesn't have the precision to represent the larger number accurately, I think, without doing the maths to be sure
<chrisseaton> timmyBsd: so the number is slightly off, and doesn't match what you'd expect
wldcordeiro has joined #ruby
<Bish> asm>> raw_user_input = "abc" /#{raw_user_input}/
<ruby[bot]> Bish: I have disassembled your code, the result is at https://eval.in/658212
<Bish> asm>> raw_user_input = "abc";/#{raw_user_input}/
<ruby[bot]> Bish: I have disassembled your code, the result is at https://eval.in/658213
tenderlove has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Changing host]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bish> doing that is stupid, right?
<dminuoso> Bish: With raw string maybe, but especially interpolating regular expressions with the //x modifier can be really useful.
<Bish> what does the x modifier doß
<Bish> maybe i should read that, instead of asking
nikivi has joined #ruby
ichkv has quit [Remote host closed the connection]
LDFJIO has quit [Read error: Connection reset by peer]
vondruch_ is now known as vondruch
newbie22 has quit [Read error: Connection reset by peer]
Sonicblaze has joined #ruby
LDFJIO has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
LDFJIO is now known as Snowy
pagios has joined #ruby
<pagios> caan ruby scripts replace bash scripting? like can i use ruby to accomplish tasks that are done usually in bash scripting? any limitations using ruby? thanks
johnmccabe has joined #ruby
Pupeno has quit [Remote host closed the connection]
<SebastianThorn> pagios: tasks like?
<pagios> like pipiing data into bash, using the data inash to exe commands, send to send awk etc
K7 has joined #ruby
dminuoso has quit [Remote host closed the connection]
nonnatus has quit [Ping timeout: 248 seconds]
ichkv has joined #ruby
pawnbox has joined #ruby
Suresh has quit [Ping timeout: 260 seconds]
nikivi has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
patarr has quit [Quit: patarr]
DrCode has quit [Ping timeout: 248 seconds]
pawnbox has quit [Remote host closed the connection]
Stazer has left #ruby [#ruby]
pawnbox has joined #ruby
fnord___ has joined #ruby
tyang has joined #ruby
ichkv has quit [Remote host closed the connection]
Pupeno has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sumobob has joined #ruby
Oclairi has joined #ruby
DrCode has joined #ruby
j3r0 has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
chouhoulis has quit [Remote host closed the connection]
daffy_duck_2 is now known as mama_vadzima
Oclair has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 248 seconds]
zipace has joined #ruby
aufi has joined #ruby
mama_vadzima is now known as felix_the_cat
houhoulis has joined #ruby
benlieb has joined #ruby
nikivi has joined #ruby
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaruga has quit [Quit: jaruga]
DoubleMalt has joined #ruby
aryaching has joined #ruby
calmchaos has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
skweek has joined #ruby
ichkv has joined #ruby
wugy has quit []
yardenbar has quit [Ping timeout: 248 seconds]
dviola has joined #ruby
grh has joined #ruby
elhu has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga
anaiden has joined #ruby
jaguarmagenta has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
sumobob has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
amclain has joined #ruby
childermass has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[Butch] has joined #ruby
<manveru> pagios: the only limitation i know of is that you can't set env variables that are then available after ruby exitss
<manveru> *exits
jaguarmagenta has quit [Ping timeout: 260 seconds]
<manveru> people have written whole terminals and shells in ruby
symm- has joined #ruby
<Papierkorb> >> `yes | head`.lines.join("_")
<ruby[bot]> Papierkorb: # => (https://eval.in/658253)
<Papierkorb> pagios: You can build the pipe manually if you want to, or you can resort to `` or system(). There's also the lesser known (and badly documented) gem "shell" in the standard distribution you might want to look at
<TomyWork> I'm starting a new project which accesses a soap api and then displays information from it. Potentially there are callbacks (I don't have the slightest idea about how soap works right now) which soap library do you suggest to use?
<TomyWork> i mean apart from not using soap at all :)
<manveru> i think savon wasn't terrible
jaruga has quit [Quit: jaruga]
<Papierkorb> pagios: Though I don't know why you would want to *replace* bash scripting. They have their place, and for many things, are perfectly fine (as in: Ruby would serve no benefit over plain bash)
nankyokusei has joined #ruby
<manveru> TomyWork: http://savonrb.com/ :)
<pagios> Papierkorb, i prefer having ruby do it all
claudiuinberlin has quit []
<pagios> so i learn 1 programming lan
jsrn_ has quit [Read error: Connection reset by peer]
Silthias has joined #ruby
<Papierkorb> pagios: But you use a shell anyway to get anywhere efficiently
<manveru> where's shevy when you need him
maucar has joined #ruby
maucar has quit [Remote host closed the connection]
<pagios> Papierkorb, i use a bash shell but not bash scripting
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maucar has joined #ruby
<Papierkorb> Bash scripting is really just what you would do, or could do, in an interactive shell. Knowing that actually speeds up shell based workflows quite a lot, so I'd recommend learning bash more. (Or another shell if you prefer that)
<pagios> the sytanx and such.. tying to reduce as much as possible memorizing stuff that can i be done in 1 proaggming language instead of doing in many
<elomatreb> fish (https://fishshell.com/) is really nice and doesn't have as much weird legacy stuff as bash or zsh
<Papierkorb> But it's also not POSIX compliant
Talltree_ is now known as Talltree
<pagios> POSIX?
Silthias1 has quit [Ping timeout: 260 seconds]
synthroi_ has quit [Remote host closed the connection]
<elomatreb> Papierkorb: Neither are bash nor zsh, if not run in a certain mode, right?
<Papierkorb> elomatreb: still nearer to the original
blackmesa has joined #ruby
<elomatreb> Anyway, I have yet to think "Well, I sure need POSIX compliance now!"
<manveru> well, if you want that, you can always run them with a specific shell
szymon has quit [Quit: Leaving]
<elomatreb> ^ this
<manveru> fish is pretty nice for starting out
<pagios> Papierkorb, so idea is instead of learning the bash syntax for loops, conditions, the way threading works etc.. i can do all in ruby
<pagios> why not
<elomatreb> I actually started with zsh, but I recently switched
nankyokusei has quit [Ping timeout: 260 seconds]
szymon has joined #ruby
SeepingN has joined #ruby
<Papierkorb> pagios: Bash, or if you're unlucky sh, scripts run everywhere, without any additional software involved. Huge plus to me.
<elomatreb> pagios: It depends on what you want to do. Shells were built to do a specific thing, bending Ruby to do those is usually painful
<Papierkorb> pagios: And knowing some things will also speed up your interactive shell usage too, so you actually save time
<manveru> pagios: so ruby is your first programming language?
timvishe` has quit [Remote host closed the connection]
lucast has quit [Ping timeout: 260 seconds]
timvishe` has joined #ruby
Couch has quit [Ping timeout: 244 seconds]
<manveru> i mean, i started out with ruby trying to do the exact same thing you want to do :)
<manveru> even wrote my own shell in ruby
<pagios> yes
craigp_ has joined #ruby
lucast has joined #ruby
f0rpaxe has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<manveru> just stick with it then until you're comfortable
nitric has joined #ruby
magellanicloud has joined #ruby
<manveru> you'll eventually either realize why people say you should learn bash, or you'll never need it :)
<TomyWork> elomatreb "Finally, a command line shell for the 90s"
<elomatreb> ;)
<TomyWork> i'm going to have to try that next year, in 1999
<elomatreb> It's referencing how the traditional shells (based on csh) were relatively unchanged since the early 80s
<TomyWork> ah boo, no windows download
<seitensei> ruby was my first
<seitensei> almost a decade ago, haha
<TomyWork> i just thought "this has a web interface, i'm gonna give this to my colleagues"
craigp has quit [Ping timeout: 248 seconds]
rhinosic has joined #ruby
mr_rich101 has quit [Quit: ZNC - http://znc.in]
<elomatreb> Ruby is a good choice as a first language
<manveru> seitensei: when i moved to ruby from php i was like "i'm omnipotent now! I'll do everything in ruby"
threh has quit [Ping timeout: 260 seconds]
<manveru> that was back in 2005 or so
<manveru> turns out these days i write almost more bash than ruby :P
<elomatreb> PHP in 2005 *shudder*
mr_rich101 has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
<TomyWork> elomatreb 2005 is a long time ago dude
<TomyWork> i still had a nokia phone in 2005
<elomatreb> I still have a Nokia phone :<
szymon has quit [Quit: Leaving]
Torkable has joined #ruby
Torkable is now known as Guest21813
Guest21813 is now known as Torkable
blackmesa has joined #ruby
<TomyWork> and i was writing java code in eclipse
<TomyWork> but it was new java... java2se!
<dyjakan> I don't think Ruby is good choice as first language
threh has joined #ruby
<TomyWork> (for uni, btw)
<flying> Net::SSH.start('puppet', @root_user, :password => @root_pass, :paranoid => false) do |ssh|
<TomyWork> dyjakan what do you suggest?
<flying> what is the @root_user?
<flying> a variable?
<TomyWork> flying instance variable
<dyjakan> TomyWork: Python
<elomatreb> flying: An instance variable
<Papierkorb> Uargh python
<flying> how can I see the value of it?
<dyjakan> Ruby code is more beatiful than python
<TomyWork> dyjakan oh you used a tab instead of spaces there. now how do i explain that...
<dyjakan> but that's exactly why it's not the best 1st choice
alsvidr has quit [Quit: Connection closed for inactivity]
<TomyWork> really, not a good first language
<elomatreb> flying: You could do `p @root_user` in the line above that to print it
<flying> ok I 'll do thanks :) but how can I know where is declared?
<dyjakan> identation is minor obstacle
<dyjakan> and overall python code is basically pseudo code that runs
<dyjakan> not so much with ruby, where there is magic
<dyjakan> it's not that you can't go past that but it requires more rigor
<dyjakan> hence higher level of drop outs
<elomatreb> flying: Instance variables in Ruby are not declared like in other languages, it's set somewhere. You could search for "@root_user = " in your codebase
<Papierkorb> All languages, which are indention based, are too hard to read to me. You can't quickly skim code (no real visual cues where a body ends), and while I don't buy that "oh a tab" argument accidental indention can cause whacky problems
<elomatreb> dyjakan: I found the opposite true. Ruby syntax is more free, which makes entry for complete beginners easier
<Papierkorb> And if a file becomes much longer than the screen it is read on, indention will make it completely unreadable
<TomyWork> Papierkorb you haven't seen to code my colleagues write :)
<dyjakan> elomatreb: with freedom comes responsibility
<TomyWork> in basically all languages except for java, where we have strict code style
<dyjakan> and we're talking about newbies
anaiden has quit [Quit: anaiden]
jackjackdripper has joined #ruby
<dyjakan> python is much better for 'getting programming' without much fuss of underlying language
<Papierkorb> dyjakan: Newbies are just that: New. They'll learn. So lets make them learn something useful
<Papierkorb> dyjakan: Don't read that as "python isn't useful"
<dyjakan> if talking about useful then again python is better and order of magnitude
tomphp has quit [Ping timeout: 260 seconds]
<elomatreb> dyjakan: There are also other things that I think make Ruby a decent choice for beginners. The Ruby standard library is hands down the best I've ever used
<TomyWork> dyjakan whitespace sensitivity is fuss
<elomatreb> Passing self is fuss
<DLSteve> My first language was Objective-C... been smooth sailing since then.
<TomyWork> they'll have enough trouble with the syntax they see
<dyjakan> Ruby is used mostly for webdev
<TomyWork> let alone the syntax they dont see
<dyjakan> python is anything scientific, technical, engineering, itsec, etc
<havenwood> dyjakan: Maybe by a plurality, but Ruby is popular for many things.
<dyjakan> and on top of that webdev ;)
<elomatreb> My first language was a weird robotics dialect of ARM C :<
<havenwood> dyjakan: If you think Ruby is only for webdev you're mistaken.
<dyjakan> don't put words into my mouth
<DLSteve> dyjakan, I'm backwards I use Python for web dev and ruby for automation :P
<dyjakan> I said _mostly_
<dyjakan> and you can't argue against
<dyjakan> majority of people came into ruby from Rails
magellanicloud has quit [Quit: Leaving]
<dyjakan> one could argue that if not rails then ruby would still be a niche
Eiam has joined #ruby
<TomyWork> i came to ruby despite rails
<DLSteve> I mainly use it for Chef/Puppet.
<dyjakan> I really like ruby but I like facts and truth more
<elomatreb> Also things like Metasploit, Chef, ...
<havenwood> dyjakan: A nice thing about a multi-paradigm, many ways to do it language is that it'll give you growing room and bring more general familiarity to bring forward.
<dyjakan> metasploit is a drop in the ocean for itsec
<raldu_> I became interested in ruby because of first port of Metasploit from Perl to Ruby
<dyjakan> which is my original background so I know a thing or two
<havenwood> dyjakan: We can argue with "mostly," especially if by that you mean more than half?
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
magellanicloud has joined #ruby
<raldu_> as a hobbyist I am quite happy with expressiveness and friendly interface of Ruby and can get quite a lot done.
<dyjakan> yes, I would say 75% ruby devs are really rails/sinatra/web devs
zirpu has left #ruby [#ruby]
krandi has quit [Remote host closed the connection]
<dyjakan> tbh I know only 2 people online and 1 irl that use ruby outside of webdev space
<TomyWork> bias, then? :)
patarr has quit [Quit: patarr]
<dyjakan> no, because I know many more that use Ruby in webdev
<dyjakan> and that's my point
<havenwood> dyjakan: Maybe you just know a bunch of Ruby webdevs? I don't know why you don't know more Rubyists working on other things but there sure are lots of them.
j3r0 has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
anaiden has joined #ruby
<dyjakan> ok this discussion is really pointless, my 5c is this: first language? python is much better choice; you're free to disagree
<dyjakan> btw I work as ruby dev, just for clarification ;)
edwinvdgraaf has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
vuoto has joined #ruby
<havenwood> dyjakan: Kinda like saying green is a better color to start painting with than red. Either is fine.
GambitK has joined #ruby
<apeiros> havenwood: you clearly have absolutely NO idea of colors!
<dyjakan> havenwood: not my problem it's same for you
tlaxkit has quit [Quit: tlaxkit]
<havenwood> dyjakan: I don't think one is particularly better than the other for beginners.
elhu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elifoster has joined #ruby
<TomyWork> elomatreb oh i was wrong, there is fish for cygwin
<elomatreb> TomyWork: Shouldn't it also work with the new linux subsystem? I know zsh works
mikecmpbll has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
<GambitK> hello, sorry for the newb question, I've been looking for the answer searching google but I can't find what does the "=>" operator do? as in "@myvar => {}"
<flying> but I can't search any root_user declaration in that code... how can I search where are declared?
<matthewd> GambitK: That's a rather unusual pair of values... but => separates a single key/value pair in a hash.
<havenwood> GambitK: It's called a "Hash rocket." You'll see them inside of Hash literals, especially when the key isn't a Symbol.
brendan- has joined #ruby
<matthewd> >> { 'foo' => 'bar', 'baz' => 'quux' }['foo']
<ruby[bot]> matthewd: # => "bar" (https://eval.in/658260)
<flying> ?
Beams has quit [Quit: .]
symm- has quit [Ping timeout: 248 seconds]
<elomatreb> flying: You're probably going to have to read some docs on the software you're using?
<TomyWork> manveru does savonrb work without a wsdl?
<GambitK> thanks
<TomyWork> cause i dont have one :)
flying has quit []
<TomyWork> elomatreb we're still on win7 mostly
<manveru> now... that's an interesting question
mikecmpbll has quit [Ping timeout: 268 seconds]
<manveru> can they even call it soap if it has no wsdl?
<bougyman> sure
<bougyman> wsdl is not mandatory.
<bougyman> just a convenience.
<TomyWork> manveru sure, it's just a weird xml thing over http
<manveru> ok, just haven't encountered one without :P
<TomyWork> well i'm sure there is one
<TomyWork> somewhere
<TomyWork> but i dont have it
<TomyWork> i'm reverse-engineering for the purpose of interoperability here :)
tyang has quit [Ping timeout: 248 seconds]
patarr has joined #ruby
thatsnotjack has quit [Quit: leaving]
miguelfernandes has quit [Quit: Leaving]
calmchaos has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
mikecmpbll has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Filiphe has quit [Remote host closed the connection]
bsrd has joined #ruby
troulouliou_div2 has joined #ruby
fbt_ is now known as fbt
SCHAAP137 has joined #ruby
calmchaos has joined #ruby
Silthias1 has joined #ruby
<baweaver> If you're using multiple gem sources, read that
aufi has quit [Quit: Leaving]
sumobob has joined #ruby
<TomyWork> manveru ok maybe i'll write a wsdl while doing this. i could learn something :)
<gener1c> anyways ever used mapscript here?
<gener1c> i am looking for some good doc but cant findy anything
tonini has quit [Quit: Connection closed for inactivity]
<gener1c> all this layerobj ms_layer_raster stuff
Silthias has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
rakm has joined #ruby
blaxter has joined #ruby
Humdai_ has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
tyang has joined #ruby
agent_white has joined #ruby
jaequery has joined #ruby
pawnbox has joined #ruby
Wizznt has joined #ruby
<havenwood> baweaver: That'd be a good thing for bundle-audit to warn about! Hmm
conta has joined #ruby
Snowy has quit [Remote host closed the connection]
salut has quit [Quit: salut]
Snowy has joined #ruby
<agent_white> Afternoon'
<manveru> baweaver: that... explains things
<manveru> damn
acovrig has joined #ruby
lucasb has joined #ruby
firstdayonthejob has joined #ruby
<TomyWork> http://savonrb.com/version2/client.html ctrl-f require fffffff
<TomyWork> bad docs are bad
wldcordeiro has quit [Quit: WeeChat 1.4]
<acovrig> I have a MySQL DB with data, and a ruby script that processes some data from said DB, I’d like to insert the processed data into a postgres DB, the script currently uses activerecord, is it possible to have multiple activerecord connections? or should I process the data into memeory (like a giant array) then redefine activrecord to my postgres DB and do all the inserts there?
ruby-lang893 has quit [Ping timeout: 260 seconds]
Snowy has quit [Ping timeout: 260 seconds]
elenatanasoiu has quit [Ping timeout: 268 seconds]
<manveru> acovrig: you could use sequel :)
<matthewd> acovrig: Yes it's possible to have multiple AR connections (most easily, by using different models for each).. but if you have a lot of data, you might be better off with a lower level bulk process
gizmore has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gizless has joined #ruby
<acovrig> manveru: I’ve heard of sequel, and will look into it
<manveru> might be easiest
<acovrig> matthewd: they share a common table name, so I doubt I could do that directly, and IDK what ‘a lot of data’ would be, it’s a lot to me: 200MB SQL export from mysqldump
<matthewd> acovrig: self.table_name = 'x'
ramfjord has quit [Ping timeout: 260 seconds]
<acovrig> matthewd: ah, that makes sense lol
<acovrig> manveru: for some reason I guess I thought this only worked with sqlite, it looks handy
wldcordeiro has joined #ruby
<manveru> it's probably my favorite ruby lib of all times
<manveru> apart from bacon of course
mtkd has quit [Ping timeout: 248 seconds]
dwradcliffe has joined #ruby
ta_ has joined #ruby
osvimer has joined #ruby
rcvalle has joined #ruby
<bougyman> <3 bacon
maucar has quit [Quit: Leaving]
mtkd has joined #ruby
blaxter has quit [Quit: foo]
osvimer has quit [Client Quit]
sandelius has joined #ruby
dwradcliffe has quit [Client Quit]
timvishe` has quit [Remote host closed the connection]
Silthias1 has quit [Quit: Leaving.]
* acovrig hasn’t heard of the bacon gem, “a small RSpec clone”?
timvishe` has joined #ruby
BTRE has quit [Ping timeout: 260 seconds]
vondruch has quit [Changing host]
vondruch has joined #ruby
jzigmund has quit [Changing host]
jzigmund has joined #ruby
Sonicblaze has quit [Changing host]
Sonicblaze has joined #ruby
K7 has quit [Changing host]
K7 has joined #ruby
f0rpaxe has quit [Changing host]
f0rpaxe has joined #ruby
GambitK has quit [Changing host]
GambitK has joined #ruby
Wizznt has quit [Changing host]
Wizznt has joined #ruby
ramfjord has joined #ruby
blandflakes has joined #ruby
_djbkd has joined #ruby
blandflakes has quit [Changing host]
blandflakes has joined #ruby
da3mon has quit [Quit: Zzzz...]
async_prince has joined #ruby
elhu has joined #ruby
chadwtay_ has quit [Remote host closed the connection]
async_prince has quit [Client Quit]
chadwtay_ has joined #ruby
calmchaos has quit [Quit: Leaving...]
troulouliou_div2 has quit [Remote host closed the connection]
<manveru> i think the goal was to make rspec in 300 LoC
<manveru> these days it's a few more lines, but hasn't really changed in ages
<ljarvis> <3 bacon
jahmalz has quit [Ping timeout: 250 seconds]
elhu has quit [Read error: Connection reset by peer]
DoubleMalt has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mark_661 has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 248 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyWork has quit [Ping timeout: 256 seconds]
Snowy has joined #ruby
<harfangk> man
<harfangk> now i'm craving for good bacon...
thisiskevin has joined #ruby
rakm has joined #ruby
fnux has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
last_staff has joined #ruby
jaequery has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
IcyDragon is now known as IceDragon
JeanCarloMachado has quit [Ping timeout: 268 seconds]
IceDragon is now known as Guest73204
elifoster has quit [Ping timeout: 250 seconds]
ta_ has quit [Remote host closed the connection]
threh has quit [Ping timeout: 260 seconds]
z-i-g has quit [Quit: Leaving]
<GambitK> i have a hash inside another hash, is there a way to get the child hash inside the parent?
Pumukel has joined #ruby
<GambitK> as in the key,value pairs are moved to the parent hash
Guest73204 is now known as IceDragon
<baweaver> What have you tried?
tomphp has joined #ruby
da3mon has joined #ruby
<thisiskevin> GambitK: what is your use case?
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Client Quit]
synthroid has joined #ruby
maikowblue has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
elifoster has joined #ruby
<GambitK> i'm modifying some code to make a decision, the data is added to a hash as a new hash and I want to give it the option of adding the values directly to the original hash or as it is now.
minimalism has joined #ruby
jaequery has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
jgt has quit [Ping timeout: 240 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
eizua has quit [Quit: Leaving]
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexxNica has joined #ruby
timvishe` has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 260 seconds]
timvishe` has joined #ruby
tyang has joined #ruby
jaguarmagenta has joined #ruby
xall has joined #ruby
TomyLobo has joined #ruby
ichkv has quit [Remote host closed the connection]
ace05 has joined #ruby
Snowy has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
Pupeno has quit [Remote host closed the connection]
<GambitK> mmm, that doesn't work
al2o3-cr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
ARCADIVS has joined #ruby
tomphp has joined #ruby
fergal has quit [Quit: fergal]
spudowiar has joined #ruby
xall has quit [Ping timeout: 260 seconds]
rodfersou|afk is now known as rodfersou
Pupeno has joined #ruby
nankyokusei has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
Silthias has joined #ruby
pragmaticus has joined #ruby
tvw has joined #ruby
Torkable has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 260 seconds]
rvca has joined #ruby
djellemah has joined #ruby
symm- has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
da3mon has quit [Quit: Zzzz...]
jaequery has joined #ruby
<manveru> GambitK: maybe can you show us the hash you have and the one you expect it to become?
xall has joined #ruby
<GambitK> :thisiskevin I solved it by merging the child hash into the parent hash, is that the optimal way? parent.merge(parent[@child])
<manveru> >> parent = {a: 1, b: {c: 2}}; parent.merge!(parent.delete(:b)); parent
<ruby[bot]> manveru: # => {:a=>1, :c=>2} (https://eval.in/658305)
<thisiskevin> GambitK: what are you doing exactly?
<manveru> that's of course if you want to be fully destructive, and you don't want to keep the child after merging :)
<GambitK> parent is a hash, and parent[@child] is another hash populated by parsing some data(this is not my code)
<GambitK> yes, i want to remove the child
Derperperd has quit [Quit: Derperperd]
<harfangk> remember that if there's a duplicate key, the hash passes as argument will take priority
bsrd has quit [Quit: WeeChat 1.6]
bsrd has joined #ruby
bsrd has quit [Client Quit]
acovrig has quit [Quit: acovrig]
Torkable has joined #ruby
al2o3-cr has joined #ruby
patarr has quit [Quit: patarr]
nettoweb has joined #ruby
Dimik has joined #ruby
lxsameer has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
threh has joined #ruby
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
cpruitt has joined #ruby
j3r0 has joined #ruby
Sauvin has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
Pumukel has quit [Remote host closed the connection]
ta_ has joined #ruby
JoshS has quit [Quit: Leaving]
yuung has joined #ruby
Jackneill has joined #ruby
yuung has left #ruby [#ruby]
yuung has joined #ruby
<yuung> how can i catch an exception from Open3::popen3? i'd like it to say, "if the process under popen3 throws an exception, catch the exception & return that process' exit status"
<yuung> s/say/function as
<ytti> begin
timvishe` has quit [Remote host closed the connection]
<yuung> ytti outside or inside the block?
<ytti> Open3::popen3 ...
timvishe` has joined #ruby
houhoulis has quit []
<ytti> rescue exceotion name
<ytti> action
<ytti> end
<yuung> ytti i see, ty!
Ishido has joined #ruby
<ytti> np
xall has quit [Ping timeout: 260 seconds]
BTRE has joined #ruby
patarr has joined #ruby
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Pupeno has quit [Remote host closed the connection]
firstdayonthejob has quit [Quit: WeeChat 1.6]
mniip has joined #ruby
da3mon has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
Pupeno has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
pragmaticus has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
firstdayonthejob has joined #ruby
<thisiskevin> how do you return the unique item in ruby?
<thisiskevin> ie [1,2,3,4,1,2,3] => [4]
<matthewd> ary.select {|x| ary.count(x) == 1 } ?
workmad3 has quit [Ping timeout: 260 seconds]
<apeiros> O(n*n)
jgt has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has quit []
<lucasb> >> %i(a b c a b a).each_with_object(Hash.new(0)) {|x, h| h[x] += 1 }
<lucasb> => {:a=>3, :b=>2, :c=>1}
<ruby[bot]> lucasb: # => {:a=>3, :b=>2, :c=>1} (https://eval.in/658307)
<lucasb> now, how to get an array of the keys which has value 1 ?
whathappens has joined #ruby
<matthewd> ary.group_by(&:itself).select {|_,a| a.size == 1 }.map(&:last).... or [Object.new, *ary.sort, Object.new].each_cons(3).select {|a,b,c| a != b && b != c }.map {|_,b,_| b }
<lucasb> and sorry, I didn't mean to evaluate here in the bot
timvisher has joined #ruby
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 250 seconds]
<matthewd> lucasb: That only allocates one object.. you're not rubying right ;)
<Papierkorb> matthewd: Is the array optimized away?
tomphp has joined #ruby
<Papierkorb> Or do you mean it's only allocated once?
conta has quit [Ping timeout: 240 seconds]
<matthewd> Papierkorb: I meant lucasb's solution. Both of mine go alloc-crazy. GC's gotta earn its keep.
<Papierkorb> ah yes I referred to lucasb' line too
tomphp has quit [Client Quit]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
timvisher has quit [Remote host closed the connection]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
tomphp has joined #ruby
<matthewd> Ah, okay. I was counting the hash, but not the array because that's the input of the function. The line as presented allocates two objects.
nikivi has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
patarr has quit [Quit: patarr]
spudowiar has quit [Quit: WeeChat 1.6]
whathappens has quit [Ping timeout: 260 seconds]
Yxhvd has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<matthewd> .. or 3 or 4, in fact... something in each_with_object, I guess?
Yxhuvud has joined #ruby
Yxhuvud has quit [Remote host closed the connection]
da3mon has quit [Quit: Zzzz...]
ta_ has quit [Remote host closed the connection]
Yxhuvud has joined #ruby
sandelius has joined #ruby
da3mon has joined #ruby
ramfjord has joined #ruby
<thisiskevin> thanks for the help :)
<thisiskevin> how can you iterate through an array and print out pairs of numbers?
<manveru> each_slice
<apeiros> depends on how those pairs come to be
<thisiskevin> like [1,2,3,4] => 1 2 => 3 4
Silthias has quit [Quit: Leaving.]
<apeiros> then what manveru said
* manveru bows
<apeiros> achievement unlocked: mind reading
Elysia has quit [Quit: WeeChat 1.6]
bathtub_shark has joined #ruby
<thisiskevin> each_slice returns arrays, i just want numbers
abe has joined #ruby
grh has quit [Ping timeout: 260 seconds]
fergal has joined #ruby
fergal has quit [Client Quit]
patarr has joined #ruby
<thisiskevin> i got it
<thisiskevin> thanks so much manveru
<thisiskevin> you are a mind reader
<thisiskevin> (1..numbers.length).each_slice(2) { |a, b| puts "#{a} #{b}"}
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
ctp has joined #ruby
<hanmac> thisiskevin: hm should be numbers.each_slice(2)
<thisiskevin> well i want pairs
johnmilton has quit [Remote host closed the connection]
Derperperd has joined #ruby
synthroi_ has joined #ruby
yuung has quit [Ping timeout: 248 seconds]
grh has joined #ruby
<thisiskevin> what if i want it to be like this? [1,2,3,4] => [1,2] => [2,3] => [3,4]
<havenwood> thisiskevin: numbers.each_cons(2)
synthroid has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
Pupeno has quit [Remote host closed the connection]
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timvishe` has quit [Remote host closed the connection]
da3mon has quit [Quit: Zzzz...]
banisterfiend has joined #ruby
timvishe` has joined #ruby
habitullence has quit [Ping timeout: 268 seconds]
<lucasb> thisiskevin: you are trying to implement a sorting algorithm?
synthroid has joined #ruby
habitullence has joined #ruby
strax has quit [Quit: Connection closed for inactivity]
vuoto has quit [Remote host closed the connection]
synthroi_ has quit [Ping timeout: 250 seconds]
ElFerna has joined #ruby
yuung has joined #ruby
da3mon has joined #ruby
mattp_ has quit [Quit: WeeChat 1.6]
yuung has quit [Ping timeout: 248 seconds]
Wizznt has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ekinmur has joined #ruby
elifoster has joined #ruby
dminuoso_ has joined #ruby
dminuoso_ has quit [Remote host closed the connection]
yuung has joined #ruby
childermass has joined #ruby
dminuoso_ has joined #ruby
ctp has joined #ruby
jgt has joined #ruby
claudiuinberlin has joined #ruby
hakunin has joined #ruby
dminuoso has joined #ruby
dminuoso_ has quit [Client Quit]
blandflakes has joined #ruby
ta_ has joined #ruby
Wizznt has joined #ruby
rvca has left #ruby ["Leaving"]
bsrd has joined #ruby
kitikonti has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
bsrd has quit [Client Quit]
tvw has quit []
zeroDi has joined #ruby
gizless has quit [Ping timeout: 260 seconds]
timvishe` has quit [Remote host closed the connection]
gizless has joined #ruby
timvishe` has joined #ruby
xall has joined #ruby
twalla has joined #ruby
pwnd_nsfw` has joined #ruby
jaguarmagenta has joined #ruby
whathappens has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
whathappens has quit [Ping timeout: 248 seconds]
dminuoso_ has joined #ruby
dminuoso_ has quit [Client Quit]
ramfjord_ has joined #ruby
elastix has joined #ruby
Guest43 has joined #ruby
patarr has quit [Quit: patarr]
Guest43 has quit [Changing host]
Guest43 has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord_ has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
blackgoat has joined #ruby
tyang has quit [Ping timeout: 248 seconds]
whathappens has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
nonnatus has joined #ruby
skweek has joined #ruby
ElFerna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
childermass has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
twalla has quit [Ping timeout: 250 seconds]
yardenbar has joined #ruby
workmad3 has joined #ruby
benlieb has quit [Ping timeout: 268 seconds]
benlieb has joined #ruby
tdy has joined #ruby
yardenbar has quit [Client Quit]
Coldblackice has joined #ruby
yardenbar has joined #ruby
ocbtec has quit [Ping timeout: 250 seconds]
Coldblackice has quit [Client Quit]
ElFerna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chadwtay_ has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
chadwtay_ has joined #ruby
ElFerna has joined #ruby
sneakers has joined #ruby
kafloopascope has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
chadwtay_ has quit [Ping timeout: 260 seconds]
claudiuinberlin has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
ocbtec has joined #ruby
ramfjord has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 260 seconds]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
da3mon has quit [Quit: Zzzz...]
zacts has quit [Ping timeout: 250 seconds]
Chelsea has joined #ruby
yfeldblum has joined #ruby
da3mon has joined #ruby
aidalgol has joined #ruby
blackgoat has joined #ruby
bkxd has joined #ruby
synthroid has quit []
claudiuinberlin has quit []
ElFerna has quit [Quit: Textual IRC Client: www.textualapp.com]
_djbkd has quit [Remote host closed the connection]
<yuung> if an exception is thrown in Sidekiq::Worker#perform, does sidekiq automatically retry the job or do I have to handle the exception?
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
djellemah has quit [Ping timeout: 248 seconds]
lel has joined #ruby
_djbkd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 250 seconds]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
modin has quit [Ping timeout: 258 seconds]
whathappens has quit [Remote host closed the connection]
bkxd_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Chelsea has quit [Ping timeout: 250 seconds]
thisiskevin has quit [Quit: Page closed]
bkxd has quit [Ping timeout: 240 seconds]
modin has joined #ruby
acovrig has joined #ruby
whathappens has joined #ruby
GinoMan2440Wrx has quit [Quit: Leaving]
<acovrig> I have data I’m trying to import to a DB with Sequel, I’m trying DB[:table_name].import([:name], %w(val1 val2 val3)) to fill the name column with val1-3 for table_name; I’m getting PG::NotNullViolation because created_at is being inserted as null instead of CURRENT_TIMESTAMP; how do I fix this?
j3r0 has quit [Ping timeout: 260 seconds]
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsrd has joined #ruby
bkxd_ has quit [Ping timeout: 268 seconds]
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yqt has joined #ruby
agent_white has quit [Quit: leaving]
johnmccabe has joined #ruby
elastix has quit [Quit: Leaving]
twalla has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
merlin2049er has quit [Quit: Leaving.]
YaknotiS has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
merlin2049er has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
JoshL has quit [Ping timeout: 248 seconds]
YaknotiS has joined #ruby
elifoster has quit [Quit: class]
Pupeno has joined #ruby
benlieb has joined #ruby
twalla has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 260 seconds]
mikeiniowa has quit [Remote host closed the connection]
mikeiniowa has joined #ruby
Pupeno has quit [Ping timeout: 260 seconds]
nanoz has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
SCHAAP137 has joined #ruby
elenatanasoiu has joined #ruby
symm- has quit [Quit: Leaving...]
patarr has quit [Quit: patarr]
grh has quit [Ping timeout: 260 seconds]
biberu has quit []
Radar_ is now known as Radar
Radar has quit [Changing host]
Radar has joined #ruby
charliesome has joined #ruby
abe has quit [Ping timeout: 268 seconds]
Felipe__ has joined #ruby
elenatanasoiu has quit [Ping timeout: 250 seconds]
NTrash has joined #ruby
symm- has joined #ruby
nettoweb has joined #ruby
Madplatypus has joined #ruby
<NTrash> test
NTrash has quit [Client Quit]
NTrash has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
timvishe` has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
timvishe` has joined #ruby
elenatanasoiu has joined #ruby
ledestin has joined #ruby
Jackneill has quit [Remote host closed the connection]
blackmesa has joined #ruby
stemid has joined #ruby
jenrzzz has joined #ruby
stemid has left #ruby [#ruby]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
RTFM[away] has quit [Ping timeout: 260 seconds]
rodfersou has quit [Quit: leaving]
jaguarmagenta has joined #ruby
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elenatanasoiu has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
yqt has quit [Ping timeout: 268 seconds]
acovrig has quit [Quit: acovrig]
agit0 has joined #ruby
Lyubo1 has quit [Ping timeout: 268 seconds]
cpruitt has quit [Quit: cpruitt]
jenrzzz_ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
nonnatus has joined #ruby
jackjackdripper has joined #ruby
patarr has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
jenrzzz has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bob8989|2 has joined #ruby
SteenJobs has joined #ruby
timvishe` has quit [Remote host closed the connection]
Oclairi is now known as Oclair
timvishe` has joined #ruby
<chrisseaton> NTrash: hello
da3mon has quit [Quit: cya...]
stemid has joined #ruby
<stemid> I'm a total newbie but I installed rvm and made it use my system ruby 2.3.1 installed by fedora 24. and then I did gem install fpm but ran into this exact error https://github.com/bundler/bundler/issues/3821 (but without bundler) I see other packages besides bundler having this issue. is there a workaround?
patarr has quit [Ping timeout: 248 seconds]
Chelsea has joined #ruby
Pupeno has joined #ruby
<stemid> was hoping to use rvm the way I'd normally use virtualenv but I'm not at all experienced with ruby.
whathappens has quit [Remote host closed the connection]
AlexxNica has quit [Quit: AlexxNica]
<chrisseaton> stemid: can you gist the complete set of commands you run and the errors you see?
brendan- has joined #ruby
whathappens has joined #ruby
Pupeno has quit [Ping timeout: 260 seconds]
<stemid> not included is rvm automount
<stemid> I just noticed that fpm is actually installed in ~/.rvm/gems/ext-ruby-2.3.1-p112/bin/
edwinvdgraaf has joined #ruby
<stemid> so I guess I can just go ahead and use it. even with the rdoc error.
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
Felipe__ has quit [Quit: Leaving]
<stemid> there is a redhat bug submitted about the gems issue, apparently it has to do with fedora package maintainers not symlinking something.
<stemid> so maybe the rdoc issue is fedora/rhel only
ramfjord_ has joined #ruby
last_staff has quit [Quit: last_staff]
Pupeno has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
magellanicloud has quit [Quit: Leaving]
sepp2k has quit [Quit: Leaving.]
ramfjord has quit [Ping timeout: 260 seconds]
<chrisseaton> stemid: Yes I thought maybe you were running the commands in an odd way, but doesn't look like it.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<codfection> can someone recommend me books or resources for learning algorithms, data structure etc. to strengthen my coding skills
Pupeno has quit [Ping timeout: 240 seconds]
<chrisseaton> codfection: do you want to do better in coding interviews, or general interest?
<codfection> both tbh. chrisseaton
<matthewd> stemid: Just a guess, but `gem install rdoc` might work around that
<matthewd> stemid: Or it might suffer the same problem itself :)
timvishe` has quit [Remote host closed the connection]
polishdub has quit [Quit: Leaving]
timvishe` has joined #ruby
<chrisseaton> codfection: many big companies interviewing will assume that you know CLRS (search on Amazon) because many US colleges use that book
<chrisseaton> codfection: that book will give you a really broad base of algorithms and data structures
mikecmpbll has joined #ruby
<codfection> chrisseaton, Thank you very much. Much appreciated
<codfection> is this the one ?
<chrisseaton> Yes, and it's possible that you may be able to find a PDF online
<codfection> cool. thanks a lot chrisseaton
ericsupreme has joined #ruby
xelkarin has joined #ruby
ericsupreme has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
ICantCook has joined #ruby
yuung has quit [Ping timeout: 248 seconds]
ddffg has quit [Ping timeout: 260 seconds]
jcao219 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
firstdayonthejob has quit [Ping timeout: 248 seconds]
ramfjord_ has quit [Ping timeout: 260 seconds]
TomyLobo has quit [Ping timeout: 250 seconds]
[Butch] has quit [Quit: I'm out . . .]
bsrd has quit [Quit: WeeChat 1.6]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
edwinvdgraaf has quit [Ping timeout: 260 seconds]
brendan- has joined #ruby
yuung has joined #ruby
ramfjord has joined #ruby
DEac- has quit [Remote host closed the connection]
toretore has joined #ruby
wldcordeiro has quit [Ping timeout: 268 seconds]
CBX has joined #ruby
sumobob has quit [Ping timeout: 260 seconds]
cob has quit [Remote host closed the connection]
CBX has left #ruby [#ruby]
charliesome has joined #ruby
JeanCarloMachado has joined #ruby
Felipe__ has joined #ruby
xelkarin has quit [Quit: WeeChat 1.4]
Felipe__ has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
elenatanasoiu has joined #ruby
jackjackdripper has quit [Ping timeout: 248 seconds]
kafloopascope has left #ruby ["Leaving"]
jackjackdripper has joined #ruby
Rodya_ has joined #ruby
optiz0r has quit [Ping timeout: 240 seconds]
Felipe__ has joined #ruby
zacts has joined #ruby
timvishe` has quit [Ping timeout: 248 seconds]
timvishe` has joined #ruby
sumobob has joined #ruby
johnmccabe has joined #ruby
mattp_ has joined #ruby
ocbtec has quit [Quit: leaving]
FastJack has quit [Quit: leaving]
Rodya_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby
pawnbox has joined #ruby
optiz0r has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
whathappens has quit [Read error: Connection reset by peer]
threh has quit [Ping timeout: 268 seconds]
whathappens has joined #ruby
Rodya_ has joined #ruby
Azure has joined #ruby
abe` has joined #ruby
marr has quit [Ping timeout: 250 seconds]
kitikonti has quit [Quit: Textual IRC Client: www.textualapp.com]
twalla has joined #ruby
zukin has joined #ruby
pawnbox has joined #ruby
Bob8989|2 has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
toretore has quit [Ping timeout: 260 seconds]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
Felipe__ has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
twalla has quit [Ping timeout: 250 seconds]
elenatanasoiu has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
lucasb has quit [Quit: leaving]
SCHAAP137 has quit [Quit: Leaving]
wldcordeiro has joined #ruby
whathappens has quit [Quit: Leaving...]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Bellthoven has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yuung has quit [Quit: leaving]
childermass has joined #ruby
nettoweb has joined #ruby
childermass has quit [Client Quit]
childermass has joined #ruby
Felipe__ has joined #ruby
Felipe__ has quit [Remote host closed the connection]
RTFM[away] has joined #ruby
pawnbox has joined #ruby
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
timvishe` has quit [Remote host closed the connection]
timvishe` has joined #ruby
Felipe__ has joined #ruby
koooge has joined #ruby
Bellthoven has quit [Ping timeout: 260 seconds]
Derperperd has quit [Quit: Derperperd]
ponga has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Ping timeout: 250 seconds]
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
childermass has quit [Quit: Textual IRC Client: www.textualapp.com]
Bellthoven has joined #ruby
childermass has joined #ruby
childermass has quit [Client Quit]
nonnatus has joined #ruby
childermass has joined #ruby
zukin has quit [Ping timeout: 260 seconds]
childermass has quit [Client Quit]
childermass has joined #ruby
jaguarmagenta has joined #ruby
childermass has quit [Client Quit]
childermass has joined #ruby
childermass has quit [Client Quit]
frankiee_ has quit [Ping timeout: 250 seconds]
JammyHammy has joined #ruby
pawnbox has joined #ruby
ElFerna has joined #ruby