spider-mario has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
JBreit has joined #ruby
mrmargolis has quit [Ping timeout: 245 seconds]
Macaveli has quit [Ping timeout: 264 seconds]
mostlybadfly has joined #ruby
phutchins has joined #ruby
juanpablo_ has joined #ruby
mloveless has joined #ruby
dain` has joined #ruby
dain` has quit [Remote host closed the connection]
jhebden has joined #ruby
juanpablo_ has quit [Ping timeout: 245 seconds]
mloveless has quit [Remote host closed the connection]
mloveless has joined #ruby
Aova has quit [Read error: Connection reset by peer]
<Curs0r>
This is kind of a shot in the dark, but does anyone here happen to have experience with the pdf-wrapper gem? Specifically; overriding the margins?
Lewix_ has joined #ruby
Lewix has quit [Ping timeout: 246 seconds]
Aova has joined #ruby
multi_io_ has joined #ruby
TheNet has joined #ruby
icharlie has joined #ruby
codecop has quit [Remote host closed the connection]
sinkensabe has joined #ruby
arescorpio has joined #ruby
multi_io has quit [Ping timeout: 245 seconds]
cajone has joined #ruby
mrmargolis has joined #ruby
thesheff17_ is now known as thesheff17
wallerdev has joined #ruby
SpikeMaster has joined #ruby
hiyosi has joined #ruby
wallerdev has quit [Ping timeout: 245 seconds]
CpuID2 has joined #ruby
marr has quit []
tunaCanBruh has joined #ruby
phutchins has quit [Ping timeout: 245 seconds]
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<apeiros>
nahtnam: given that that's the one rails uses, I'd say yes
<nahtnam>
apeiros: Kk. Thanks
ptrrr has quit [Ping timeout: 252 seconds]
<apeiros>
personally I'd use sequel. the interface is much nicer.
davedev24_ has quit [Ping timeout: 250 seconds]
davedev24_ has joined #ruby
<atmosx>
+1 for sequel and +@ for apeiros
paradisaeidae has joined #ruby
<apeiros>
oh, d'uh
<atmosx>
ops sorry
<atmosx>
+2 lol
<apeiros>
completely forgot to remove that :D
<atmosx>
did I made all this happen?
ta_ has joined #ruby
<atmosx>
ah
<atmosx>
lol I thought thet +@ triggered some chain of events
<atmosx>
anyway
<apeiros>
na, I oped here to deop the other me.
* apeiros
is too lazy to turn to the other computer
<atmosx>
apeiros: what specs does your home desktop have? and os/version?
jenrzzz has joined #ruby
pengin has joined #ruby
<nahtnam>
apeiros: Yeah, I decided on using sequel since it been update much more
<atmosx>
nahtnam: wise choice
triple_b has joined #ruby
aapole has quit [Ping timeout: 245 seconds]
<apeiros>
one mbp mid 2012, i7@2.3GHz, 16GB, 256GB. one imac 5k, i7@4GHz, 32GB, 512GB SSD
<apeiros>
yours atmosx?
ponga has joined #ruby
<atmosx>
wow
jottr has quit [Ping timeout: 250 seconds]
<apeiros>
nahtnam: it uses sqlite3 underneath for sqlite db's too ;-)
davedev24_ has quit [Read error: Connection reset by peer]
perturbation has joined #ruby
davedev24_ has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
Aova has quit [Read error: Connection reset by peer]
<atmosx>
an iMac 08, Intel 2,8 CD, 4GB RAM and a mba i5 4 GB.
<atmosx>
apeiros: why do you need 32 GB of ram? it sounds like a video editing system
<apeiros>
ram isn't expensive anymore and it makes it easier to run multiple vms
akas has joined #ruby
<atmosx>
you run vms using virtual box? docker?
<apeiros>
also shit tends to become ever more ram hungry
<apeiros>
atm virtual box
okinomo has quit [Ping timeout: 246 seconds]
<atmosx>
that's true but for my little projects I think 4 GB Is enough lol. Now I feel that I need to update my iMac lol
<apeiros>
mostly for IE (*yuck*)
<atmosx>
IE? internetl exploder?
<apeiros>
yopp
poguez_ has quit [Quit: Connection closed for inactivity]
Aova has joined #ruby
jefus has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
_Andres has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
pengin has quit [Remote host closed the connection]
_Andres has joined #ruby
mikecmpbll has joined #ruby
Sou|cutter has quit [Ping timeout: 252 seconds]
pengin has joined #ruby
Sou|cutter has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx>
apeiros: I'm off to bed! Good night!
<apeiros>
ok, this is ridiculous… since we talked about it, I checked ram usage
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 250 seconds]
<apeiros>
sublime + terminal + limechat + activity monitor are the only open apps. 10GB of ram is used.
<waxjar>
kernel_task?
sankaber has joined #ruby
<apeiros>
kernel_task is at 2GB
<apeiros>
1.5GB is marked as file cache
pengin has quit [Ping timeout: 245 seconds]
<apeiros>
well, I should do an update anyway. curious to see ram usage after reboot…
apeiros has quit []
jhebden has quit [Ping timeout: 252 seconds]
Lewix_ has quit [Quit: #vim]
kirun has quit [Quit: Client exiting]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
dereck has joined #ruby
<St1gma>
that's reserved ram, which the kernel releases when applications need it
<St1gma>
it's an osx thing if I remember correctly
nobitanobi has quit []
dereck is now known as jefus
nfk has quit [Quit: yawn]
ta_ has joined #ruby
<apeiros_>
St1gma: reserved ram is shown separately
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
perturbation has quit [Ping timeout: 245 seconds]
<apeiros_>
but yes, filecache is low priority and released if ram becomes scarce
ponga has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
Rayford has joined #ruby
<apeiros>
ok, 6GB at boot
mikecmpbll has quit [Quit: i've nodded off.]
davidhq has joined #ruby
mikecmpbll has joined #ruby
KanKava has joined #ruby
Lemur has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
Lemur has joined #ruby
sinkensabe has quit [Remote host closed the connection]
perturbation has joined #ruby
ta_ has quit [Ping timeout: 245 seconds]
pragmatism has joined #ruby
jlast has joined #ruby
iwishiwerearobot has quit [Ping timeout: 244 seconds]
Lemur has quit [Ping timeout: 245 seconds]
<nahtnam>
Is there a cryptographic way I can generate 250 random numbers or letters from a seed where it will constantly give me the exact same result if I use the seed?
<apeiros>
I don't think so. SecureRandom can't be seeded and rand is not crypto.
<nahtnam>
:(
<apeiros>
maybe an external lib?
<nahtnam>
I know that sha512 is 128 digits
jlast has quit [Ping timeout: 245 seconds]
<pragmatism>
nahtnam Why 250 explicitly?
<pragmatism>
Just salt your sha512
<pragmatism>
Or combine two.
<nahtnam>
pragmatism: Im making an app and I need 250 digits to make a grid that is 10x5 that has 5 digits in each box.
IrishGringo has quit [Read error: Connection reset by peer]
Curs0r_ has joined #ruby
Curs0r_ has joined #ruby
<pragmatism>
gotcha
jlast has joined #ruby
<pragmatism>
I would generate two sha512's and cut the last three off.
<pragmatism>
(of each hash)
<nahtnam>
Makes sense.
<nahtnam>
Thanks
<pragmatism>
np
IrishGringo has joined #ruby
danzilio has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Curs0r has quit [Ping timeout: 246 seconds]
jlast has quit [Ping timeout: 245 seconds]
Rayford has quit [Quit: Rayford]
operr has quit [Ping timeout: 250 seconds]
jhebden has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
yellowgh0st has quit [Quit: yellowgh0st]
mikecmpbll has joined #ruby
IrishGringo has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robustus has quit [Ping timeout: 255 seconds]
juanpablo_ has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
<nahtnam>
Any recommendations on how I should generate the 10x5 table in ruby without getting confused?
<pragmatism>
Hmm
<pragmatism>
I wonder if there are any matrix gems
Sawbones has quit [Remote host closed the connection]
<pragmatism>
I think an array of arrays would be easiest
IrishGringo has quit [Read error: Connection reset by peer]
<pragmatism>
a[0][0] through a[4][4]
<pragmatism>
Er, that's a 5x5
<pragmatism>
but you get the idea.
IrishGringo_ has joined #ruby
fenzil has joined #ruby
jenrzzz has joined #ruby
<pragmatism>
There might be some good gems for this too
davedev2_ has quit [Ping timeout: 245 seconds]
<apeiros>
nahtnam: table? you mean array of arrays? from what source? a string?
<pragmatism>
So, worth looking there before writing something really gross
ptrrr has joined #ruby
perturbation has quit [Quit: Leaving]
IrishGringo_ is now known as IrishGringo
<nahtnam>
apeiros: Yeah, I have a 250 character long sting and I want to put 5 characters in each string and generate a pdf out of it using prawn
<nahtnam>
pragmatism: Ill check
davedev24_ has joined #ruby
Sawbones has joined #ruby
<apeiros>
nahtnam: that sounds like "yes, string source, no, not array of arrays, but 10 lines with 5 chars each". but that'd be 50 chars and not 250…
<apeiros>
so that doesn't really work out…
DadoCe has quit [Ping timeout: 250 seconds]
<pragmatism>
I think each 'box' has 5 characters.
<pragmatism>
hence 250
<nahtnam>
apeiros: My bad. Typed it out wrong
Sawbones has quit [Remote host closed the connection]
<nahtnam>
Was thinking of something else while typing
<nahtnam>
a 10x5 table
<nahtnam>
with 5 string each
<nahtnam>
*
<nahtnam>
5 characters in each
<apeiros>
ok, I don't think I understand what result you're looking for.
athan has quit [Read error: Connection reset by peer]
<apeiros>
partially because you still don't explain what you consider to be a "10x5 table" (no, it's not self evident)
happyface has quit [Quit: Connection closed for inactivity]
<pragmatism>
I dunno, I get it.
knut has quit [Ping timeout: 264 seconds]
<apeiros>
pragmatism: I wonder whether what you got is what he actually means :-p
<pragmatism>
haha, always a possibility
<pragmatism>
5x10 HTML table with each tr containing 5 characters.
mikecmpbll has quit [Quit: i've nodded off.]
IrishGringo has quit [Ping timeout: 245 seconds]
<pragmatism>
*td
<apeiros>
pragmatism: I think you mean…
<apeiros>
yeah
jottr has joined #ruby
<pragmatism>
haha you almost beat me ;)
mikecmpbll has joined #ruby
<apeiros>
that'd make the most sense. but still doesn't explain in what *format* he wants that "table". but yeah, probably indeed array of array of 5-char-strings
reinaldob has joined #ruby
IrishGringo has joined #ruby
<apeiros>
anyway, if it is the above: source.scan(/#{"(.{5})"*10}/)
<havenn>
Guest123: ^ it's cryptic, but that's a way
ta_ has quit [Ping timeout: 245 seconds]
zellio has quit [Remote host closed the connection]
wldcordeiro_ has quit [Ping timeout: 250 seconds]
zachrab has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
greenbagels has quit [Quit: Leaving]
claptor has quit [Quit: this channel is bakas]
wldcordeiro_ has joined #ruby
sevenseacat has joined #ruby
ebbflowgo has left #ruby [#ruby]
Pharaoh2 has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
Pharaoh2_ has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
mozzarella has joined #ruby
ozialien has joined #ruby
mtlatif__ is now known as zero7
davedev24_ has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
davedev24_ has joined #ruby
dc has joined #ruby
AlexRussia_ has joined #ruby
Barrayar has quit [Ping timeout: 246 seconds]
elepfont has joined #ruby
redballoon7762 has joined #ruby
Pharaoh2_ has joined #ruby
ptrrr has joined #ruby
dc has quit [Remote host closed the connection]
Limix has joined #ruby
redballoon7762 has quit [Client Quit]
wallerdev has quit [Ping timeout: 265 seconds]
Sawbones has joined #ruby
Pharaoh__ has joined #ruby
TL has quit [Read error: No route to host]
Pharaoh2 has quit [Ping timeout: 256 seconds]
Pharaoh2 has joined #ruby
AlexRussia_ has quit [Quit: WeeChat 1.1-dev]
Barrayar has joined #ruby
hvxgr has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ruby
toothe has joined #ruby
<toothe>
I"m having trouble following this ruby guide.
Pharaoh2_ has quit [Ping timeout: 256 seconds]
<toothe>
I created an object doing "g = Greeter.new("whatever")" and it seems to instantiate, but when I do g.@name (one of the internal variables) i get a syntax error.
siso has joined #ruby
Pharaoh__ has quit [Ping timeout: 256 seconds]
Deithrian has joined #ruby
<weaksauce>
you can't do that toothe
<toothe>
oh wait...i am doing this incorrectly...
<weaksauce>
you can add an attr_accessor :name or define the getter and setter on your own
avahey has quit [Quit: Connection closed for inactivity]
havenn has quit [Remote host closed the connection]
Limix has quit [Quit: Limix]
DrCode has quit [Ping timeout: 250 seconds]
<mudtose>
haml vs slim, which is better?
Sawbones has quit [Remote host closed the connection]
Takle has joined #ruby
<weaksauce>
I like haml but I don't know slim so there is that
Ivision has quit [Ping timeout: 246 seconds]
<mudtose>
slim has even fewer symbols lol
ta_ has joined #ruby
<mudtose>
more github stars means more momentum!! everyone's gotta switch!
<weaksauce>
heh. you first
Takle has quit [Ping timeout: 250 seconds]
tunaCanBruh has joined #ruby
speaking2ode has joined #ruby
speaking1ode has quit [Ping timeout: 240 seconds]
iwishiwerearobot has joined #ruby
Macaveli has joined #ruby
ta_ has quit [Ping timeout: 255 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tunaCanBruh has quit [Ping timeout: 264 seconds]
sigurding has joined #ruby
iwishiwerearobot has quit [Ping timeout: 245 seconds]
Macaveli has quit [Ping timeout: 244 seconds]
Channel6 has quit [Quit: Leaving]
arup_r has joined #ruby
dc has joined #ruby
codeurge has joined #ruby
<arup_r>
Yo
Aova has quit [Read error: Connection reset by peer]
ptrrr has quit [Ping timeout: 250 seconds]
dc has quit [Remote host closed the connection]
hvxgr has joined #ruby
dc has joined #ruby
<nahtnam>
Im creating a ruby gem, and I need to generate an html file. I was wondering if there was a templating gem I could use
<weaksauce>
but erb is a part of rails so if you really wanted it you could see what that installs
<nahtnam>
weaksauce: I prefer erb.
<nahtnam>
Since I have used it before
<weaksauce>
haml is better and it doesn't take much to convert over
<weaksauce>
it really is pretty easy
Azulinho has joined #ruby
<nahtnam>
weaksauce: Is there any gem that can convert a haml page into a pdf?
juanpablo_ has joined #ruby
<weaksauce>
yeah. you could do haml -> html and then html -> pdf
<weaksauce>
there are gems for that
<weaksauce>
the second part I can't recall off the top of my head
<nahtnam>
weaksauce: How would I do haml to html? I know how to do html to pdf
juanpablo_ has quit [Ping timeout: 256 seconds]
selaruvich has joined #ruby
<weaksauce>
that's what haml does?
<weaksauce>
haml is a html templating engine.
<mudtose>
pandoc is the html to pdf tool btw
<weaksauce>
I haven't tried to use it outside of rails but I am sure you can
<weaksauce>
mudtose there are many... I think the one that I was thinking about was pdfkit or wicked_pdf
<weaksauce>
or wkhtmltopdf
tier has joined #ruby
lxsameer has joined #ruby
SOLDIERz_ has joined #ruby
The_Phoenix has joined #ruby
psy_ has joined #ruby
Joufflu_ has quit [Quit: Peace]
lxsameer has quit [Client Quit]
arup_r has quit [Ping timeout: 264 seconds]
tier has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
Pharaoh2_ has joined #ruby
SOLDIERz_ has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
dc has quit [Remote host closed the connection]
Pharaoh2 has quit [Ping timeout: 245 seconds]
Pharaoh2 has joined #ruby
fantazo has joined #ruby
kalz has joined #ruby
Pharaoh2_ has quit [Ping timeout: 245 seconds]
<toothe>
is anyone here?
Pharaoh2_ has joined #ruby
<toothe>
I am trying to do `rails server`, but I get a series of errors
<toothe>
I feel like stuff works and doesn't work...breaks and doesn't break.
g-nom3 has joined #ruby
Pharaoh2 has quit [Ping timeout: 244 seconds]
Pharaoh2_ is now known as Pharaoh2
<nahtnam>
toothe: Can you give us all of the errors
arup_r has joined #ruby
<nahtnam>
I have this line in my gem `content = File.read(GEM_ROOT + '/templates/paper.html.erb')` but when I run it, I get an error saying uninitiallized constant GEM_ROOT
ta_ has joined #ruby
tmtwd has quit [Remote host closed the connection]
lioninawhat has joined #ruby
Spami has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
longfeet has quit [Read error: Connection reset by peer]
Spami has quit [Client Quit]
Pharaoh2_ has joined #ruby
lioninawhat has quit [Remote host closed the connection]
<nahtnam>
Anyone?
krz has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
<nahtnam>
Oh jk
<nahtnam>
Figured it out
Pharaoh2 has quit [Ping timeout: 256 seconds]
Takle has quit [Read error: Connection reset by peer]
greensoup has quit [Ping timeout: 245 seconds]
Timba-as has quit [Quit: Be back later ...]
jgt has joined #ruby
ta_ has joined #ruby
Timba-as has joined #ruby
mudtose has quit [Quit: Leaving]
Pharaoh2 has joined #ruby
Macaveli has joined #ruby
ponga has quit [Quit: Leaving...]
zachrab has joined #ruby
Jetchisel has quit [Ping timeout: 252 seconds]
Pharaoh2_ has quit [Ping timeout: 256 seconds]
ValicekB has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Remote host closed the connection]
codecop has joined #ruby
Spami has joined #ruby
Macaveli has quit [Ping timeout: 250 seconds]
Jetchisel has joined #ruby
CustosLimen has quit [Ping timeout: 250 seconds]
Pharaoh2_ has joined #ruby
daxroc has quit [Ping timeout: 245 seconds]
jblancett has quit [Ping timeout: 245 seconds]
bcavileer_ has quit [Ping timeout: 245 seconds]
iml has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 245 seconds]
thesheff17 has quit [Ping timeout: 252 seconds]
n1ftyn8 has quit [Ping timeout: 252 seconds]
alekst_ has quit [Ping timeout: 245 seconds]
frankS2 has quit [Ping timeout: 245 seconds]
ramblinpeck_ has quit [Ping timeout: 245 seconds]
jrunning_ has quit [Ping timeout: 245 seconds]
fabrice31 has joined #ruby
rkjaer has quit [Ping timeout: 252 seconds]
bestie has quit [Read error: Connection reset by peer]
jeregrine has quit [Read error: Connection reset by peer]
kapowaz_ has quit [Read error: Connection reset by peer]
shelling__ has quit [Read error: Connection reset by peer]
_chs_ has quit [Read error: Connection reset by peer]
zipkid has quit [Read error: Connection reset by peer]
andrewstewart has quit [Read error: Connection reset by peer]
Heero has quit [Read error: Connection reset by peer]
exadeci has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Read error: Connection reset by peer]
whoojemaflip has quit [Read error: Connection reset by peer]
hellschreiber has quit [Read error: Connection reset by peer]
tmoore has quit [Write error: Connection reset by peer]
alol__ has quit [Read error: Connection reset by peer]
bjeanes_ has quit [Read error: Connection reset by peer]
EasyCo has quit [Read error: Connection reset by peer]
skmp has quit [Read error: Connection reset by peer]
zachrab has quit [Ping timeout: 256 seconds]
akitada has quit [Read error: Connection reset by peer]
featheryahn_ has quit [Read error: Connection reset by peer]
poikon has quit [Read error: Connection reset by peer]
vcoinminer has quit [Write error: Connection reset by peer]
machty has quit [Read error: Connection reset by peer]
lepht has quit [Read error: Connection reset by peer]
dukedave has quit [Read error: Connection reset by peer]
ZucchiniZe has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
ramblinpeck_ has joined #ruby
Pharaoh2 has quit [Ping timeout: 250 seconds]
dukedave has joined #ruby
jrunning_ has joined #ruby
n1ftyn8 has joined #ruby
bcavileer_ has joined #ruby
alol__ has joined #ruby
jblancett has joined #ruby
bestie has joined #ruby
zipkid has joined #ruby
whoojemaflip has joined #ruby
bjeanes_ has joined #ruby
tmoore has joined #ruby
tmoore has quit [Changing host]
tmoore has joined #ruby
skmp has joined #ruby
daxroc has joined #ruby
_chs_ has joined #ruby
mostlybadfly has joined #ruby
poikon has joined #ruby
featheryahn_ has joined #ruby
hellschreiber has joined #ruby
alekst_ has joined #ruby
_chs_ is now known as Guest10293
lepht has joined #ruby
vcoinminer has joined #ruby
thesheff17 has joined #ruby
jeregrine has joined #ruby
ZucchiniZe has joined #ruby
frankS2 has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn has joined #ruby
Vile` has quit [Ping timeout: 264 seconds]
rkjaer has joined #ruby
andrewstewart has joined #ruby
exadeci has joined #ruby
Pharaoh2 has joined #ruby
kapowaz_ has joined #ruby
shelling__ has joined #ruby
Heero has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
EasyCo has joined #ruby
Aova has joined #ruby
Axy has joined #ruby
neersighted has quit []
akitada has joined #ruby
im0b has joined #ruby
iml has joined #ruby
knut has quit [Read error: Connection reset by peer]
Mia has quit [Ping timeout: 245 seconds]
Pharaoh2_ has quit [Ping timeout: 256 seconds]
machty has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has joined #ruby
Pharaoh2_ has joined #ruby
Vile` has joined #ruby
antgel has joined #ruby
neersighted has joined #ruby
Pharaoh2 has quit [Ping timeout: 256 seconds]
ta_ has quit [Ping timeout: 252 seconds]
tmtwd has joined #ruby
Pharaoh2_ has quit [Ping timeout: 256 seconds]
lzx has joined #ruby
anarang has joined #ruby
Takle_ has joined #ruby
ponga has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<nahtnam>
Whats the difference between .. and ...?
<nahtnam>
nvm
Azulinho has quit [Ping timeout: 245 seconds]
SOLDIERz_ has joined #ruby
Ivision has joined #ruby
SOLDIERz_ has quit [Ping timeout: 256 seconds]
dc has joined #ruby
psy_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
psy_ has joined #ruby
dc has quit [Remote host closed the connection]
<nahtnam>
How do I remove the nth letter in a string?
jenrzzz has quit [Ping timeout: 244 seconds]
gomix has quit [Ping timeout: 240 seconds]
g-nom3 has quit [Quit: Leaving.]
swgilles_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dukedave has quit [Read error: Connection reset by peer]
shadeslayer has joined #ruby
antgel has joined #ruby
<arup_r>
I didn't get you.. But yes it is working.. and also I am sure.. I can't read and write in a single shot.. So need to open one for reading and the other for writing.. But your new gsub version is perfect.. thanks
NewbiePig has quit [Remote host closed the connection]
<Deithrian>
Why does "10.times do |number| puts number" print numbers from 0 to 9?!
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/2015010900]]
<Deithrian>
is every integer an array of its numbers or something?
<apeiros>
no
dimon_ has quit [Quit: Leaving]
aapole has joined #ruby
<Deithrian>
where do the numbers come from then?
<apeiros>
it's because the method Integer#times will iterate from 0 the number of times of its own value
dimaursu16 has joined #ruby
<apeiros>
which means that for 10, it is iterate from 0 to 9 (as that's iterating 10 times - precisely what the method name says)
FrankenDaemon has quit [Ping timeout: 265 seconds]
FrankenDaemon has joined #ruby
oleo has joined #ruby
aapole has quit [Ping timeout: 250 seconds]
<Deithrian>
thanks apeiros
selu has joined #ruby
jhebden has joined #ruby
selaruvich has quit [Ping timeout: 255 seconds]
SolarSailor has joined #ruby
yfeldblu_ has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
wallerdev has joined #ruby
<hanmac>
Deithrian: if you want 1 to 10 you can use 1.upto(10)
waxjar has quit [Ping timeout: 264 seconds]
eka has joined #ruby
<shevy>
:)
<shevy>
ruby makes the simple things even simpler
<Deithrian>
Thanks hanmac. I'm following a tutorial and the guy did that line of code so I got confused from where do the numbers come.
godemper1r has quit [Ping timeout: 246 seconds]
<shevy>
Deithrian the do/end part there denotes a block
<shevy>
with the |foo| you name a variable inside the block
waxjar has joined #ruby
zachrab has joined #ruby
godemper1r has joined #ruby
<Deithrian>
Why would ruby put the number it's at in that variable?
<Deithrian>
It's just how it works?
<apeiros>
because it is useful
Musashi007 has quit [Quit: Musashi007]
<apeiros>
you don't have to use the number. if all you want is execute an action N times, you can do `N.times do …action… `. e.g. `3.times do puts "hello world!" end`.
wallerdev has quit [Ping timeout: 264 seconds]
agent_white has quit [Quit: gnight]
nfk has joined #ruby
athan has quit [Quit: No Ping reply in 180 seconds.]
<Deithrian>
apeiros, how do you call these in Ruby? | |
<apeiros>
in this context, they are the delimiters for the block arguments
<apeiros>
just like () in `def some_method(arg1, arg2)` are delimiters for the method arguments
zachrab has quit [Ping timeout: 245 seconds]
ackpacket_ has joined #ruby
<nahtnam>
Quick question. When I generate a pdf using pdfkit, it removes intentional spaces. Is there a way I can keep it from removing the spaces?
<Deithrian>
apeiros, I fail to find any documentation explaining these with search :)
<hanmac>
but `def some_method arg1, arg2` works also without, but thats bad style
<apeiros>
Deithrian: what do you search? I think `man ruby` has stuff on syntax.
ta_ has joined #ruby
Ivision_ has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
athan has joined #ruby
<Deithrian>
apeiros, ruby "|" and other variations
<apeiros>
Deithrian: you mean you googled?
<Deithrian>
It finds RegEx when it finds anything
<Deithrian>
yes
<apeiros>
google is a poor choice for language documentation
<apeiros>
you search for a good documentation and then search in there
Ivision has quit [Ping timeout: 255 seconds]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
antgel has joined #ruby
<Deithrian>
apeiros, I tried http://ruby-doc.org/ too but it shows results for | (Array)...
<apeiros>
and for ruby, there's `man ruby` and `ri Classname`, `ri Classname#instance_method` and `ri Classname::class_method` (all in your shell, assuming you installed the docs)
<Deithrian>
oh well
<apeiros>
Deithrian: yes, that's method documentation you found. not syntax.
<Deithrian>
ic
<apeiros>
the || in `foo do |x,y,z| … end` are not methods. they're part of the syntax.
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dc has quit [Read error: Connection reset by peer]
dc_ has joined #ruby
dc_ has quit [Read error: Connection reset by peer]
pardusf is now known as parduse
dc has joined #ruby
juanpablo_ has quit [Ping timeout: 245 seconds]
MasterPiece has quit [Quit: Leaving]
<Deithrian>
So basically "5.times do |n| puts n" is "for(n=0;n<5;n++){print n;}"?
DLSteve has joined #ruby
<shevy>
hmm
<shevy>
sort of
<shevy>
but print is not puts man
teddyp1cker has quit [Ping timeout: 264 seconds]
<Deithrian>
right :) ok I think I've got it
zarubin has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
<nahtnam>
apeiros: Whats the opposite of chr? (I need to get the number from the letter)
Xeago has quit [Remote host closed the connection]
ta_ has joined #ruby
Xeago has joined #ruby
<apeiros>
nahtnam: .ord
<nahtnam>
thx
oo_ has joined #ruby
sandelius has joined #ruby
sinkensabe has joined #ruby
ValicekB has quit [Ping timeout: 255 seconds]
last_staff has joined #ruby
oo_ has quit [Ping timeout: 246 seconds]
mostlybadfly has joined #ruby
TinkerTyper has quit [Ping timeout: 245 seconds]
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
plashchynski has joined #ruby
siso has quit [Quit: siso]
aboudreault has quit [Ping timeout: 240 seconds]
CustosLimen has joined #ruby
dstarh has joined #ruby
TinkerTyper has joined #ruby
ta_ has quit [Ping timeout: 255 seconds]
stef204 has quit [Ping timeout: 252 seconds]
davidhq has joined #ruby
operr has joined #ruby
stef204 has joined #ruby
einarj has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
einarj has joined #ruby
ta_ has joined #ruby
ValicekB has joined #ruby
razieliyo has joined #ruby
aboudreault has joined #ruby
Akagi201 has quit []
aboudreault is now known as aboudreau
TinkerTyper has quit [Ping timeout: 240 seconds]
stef204 has quit [Ping timeout: 250 seconds]
Axy has quit [Read error: Connection reset by peer]
phreakocious has quit [Ping timeout: 256 seconds]
pandaant has joined #ruby
Aova has joined #ruby
TinkerTyper has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
krz has quit [Quit: WeeChat 1.0.1]
sameerynho has joined #ruby
blackmesa has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
phreakocious has joined #ruby
ta_ has joined #ruby
ptrrr has joined #ruby
TinkerTyper has quit [Ping timeout: 244 seconds]
jmdade has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
lyuben_ has joined #ruby
stef204 has joined #ruby
aboudreau has quit [Quit: damn]
riotjones has joined #ruby
mathias1 has joined #ruby
TinkerTyper has joined #ruby
mathias1 has quit [Client Quit]
yfeldblum has quit [Ping timeout: 264 seconds]
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
pika_pika has joined #ruby
Aryasam has quit [Ping timeout: 246 seconds]
greensoup has joined #ruby
paolooo has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
nii236|irssi has joined #ruby
zachrab has joined #ruby
jherbst has joined #ruby
shum1 has joined #ruby
IrishGringo has joined #ruby
stef204 has quit [Ping timeout: 250 seconds]
aboudreault has joined #ruby
jherbst has quit [Client Quit]
MaciejCzyzewski has joined #ruby
greensoup has quit [Ping timeout: 245 seconds]
IrishGringo has quit [Read error: Connection reset by peer]
zachrab has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
IrishGringo has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DadoCe has joined #ruby
paolooo has quit [Quit: Page closed]
bonhoeffer has joined #ruby
reinaldob has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 245 seconds]
einarj has quit [Remote host closed the connection]
DadoCe has quit [Ping timeout: 250 seconds]
fcanela has quit [Quit: leaving]
IrishGringo has quit [Read error: Connection reset by peer]
juanpablo_ has joined #ruby
Troy^ has joined #ruby
MaciejCzyzewski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 250 seconds]
godemper2r has quit [Ping timeout: 256 seconds]
operr has quit [Ping timeout: 265 seconds]
godemper2r has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
operr has joined #ruby
hamakn has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 265 seconds]
dc has quit [Remote host closed the connection]
Takle has joined #ruby
tunaCanBruh has joined #ruby
<apeiros>
*sob*, good thing nobody is ever going to see these commits… horrible. ~40 files changed. commit message: "I don't know what I did there." (simply because I made the changes ~2w ago)
operr has quit [Ping timeout: 246 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
timonv has quit [Ping timeout: 265 seconds]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tunaCanBruh has quit [Ping timeout: 245 seconds]
Troy^ has joined #ruby
<shevy>
lol
<shevy>
now that is actually a funny commit message
lzx has quit [Remote host closed the connection]
naftilos76 has quit [Remote host closed the connection]
<apeiros>
I wonder whether there's a good ruby based javascript REPL out there
Macaveli has joined #ruby
<waxjar>
a ruby based javascript repl? o.O
<apeiros>
I built one, but it's not what I'd consider "good"
sandelius has joined #ruby
<apeiros>
in ruby because I want to be able to extend it with objects from ruby
<apeiros>
and because I want to embed it into a javascript runtime I built using ruby + therubyracer
<waxjar>
what's the use case?
<apeiros>
for which part?
<waxjar>
all of it :P
<apeiros>
the REPL? same as with pry, just for js.
<apeiros>
the js runtime? test framework.
<apeiros>
because frankly, the js only ones suck donkey balls.
Macaveli has quit [Ping timeout: 264 seconds]
aboudreault has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
<apeiros>
not sure which ones I tried, but I think jasmin I aborted after ~30min runtime without result. ran it in my own tiny script (~20 LoC quickly thrown together) -> <1s runtime.
Aova has quit [Read error: Connection reset by peer]
<apeiros>
(the testsuite consisted of ~1.2mio assertions)
dav57id has joined #ruby
dav57id has quit [Client Quit]
jimms has quit [Remote host closed the connection]
MaciejCzyzewski has joined #ruby
vikky__ has joined #ruby
<vikky__>
hi
<waxjar>
damn
kaspertidemann has joined #ruby
<vikky__>
i have installed guard gem on ruby 1.9.3
<waxjar>
maybe you could hack together a ripl plugin that evals in a V8 context, though ripl is pretty bare bones
<waxjar>
nothing like pry :p
<vikky__>
but facing problem in guard init
<vikky__>
please help
ebbflowgo has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azulinho has joined #ruby
<vikky__>
i am getting error cannot load such file -- guard/guard
<shevy>
vikky__ did you require it
<apeiros>
I wonder whether cowboyd implemented VM#clone. I asked him once and he found it intriguing. would make tab expansion a lot less error prone (run the expression in a VM clone, check the properties of the result)
<MaciejCzyzewski>
vikky__ have you installed?
<vikky__>
yes i
symbol has joined #ruby
zarubin has quit [Remote host closed the connection]
<shevy>
how do you require it
<apeiros>
vikky__: are you in a project with a Gemfile?
<vikky__>
i need it to watch a file for testing
<MaciejCzyzewski>
vikky__ use listen gem
<vikky__>
actuyally i am working on continuous testing with phpunit
<shevy>
ack I can not require it myself haha
<shevy>
require 'guard'
<shevy>
Gem::ConflictError: Unable to activate pry-0.10.1, because slop-4.0.0 conflicts with slop (~> 3.4)
symbol has quit [Client Quit]
Aova has joined #ruby
<vikky__>
after somewhat research i found that the guard::guard is depreciated and guard::plugin is used instead
iwishiwerearobot has joined #ruby
dc has joined #ruby
timonv has joined #ruby
sigurding has joined #ruby
sigurding has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
sigurding has joined #ruby
aboudreault has joined #ruby
iwishiwerearobot has quit [Ping timeout: 245 seconds]
_Andres has quit [Read error: Connection reset by peer]
nii236|irssi has quit [Remote host closed the connection]
_Andres has joined #ruby
tus has joined #ruby
puppetmonkey has joined #ruby
yfeldblum has joined #ruby
Lewix has joined #ruby
jimms has joined #ruby
teddyp1cker has joined #ruby
einarj has quit [Remote host closed the connection]
stef204 has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
Lewix has quit [Ping timeout: 252 seconds]
chinmay_dd has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
<Troy^>
can you do this in ruby. if variable.include?("0" || "1")
<apeiros>
every time I open a js console while on mdn I have a happy surprise :D
<apeiros>
dunno why I keep forgetting about that
reinaldob has joined #ruby
<apeiros>
also I'm still fascinated how in JS typeof(string) can be either "string" or "object"
<Troy^>
im use to python console why is the ruby console non interactive seems way different
<apeiros>
and of course, there's Array.isArray, but not String.isString
<apeiros>
fuck consistence, who needs that anyway?
<apeiros>
Troy^: probably because you use the ruby command. use irb - or better yet, install pry and use that.
DadoCe has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
<apeiros>
if you install pry - also install pry-doc.
<shevy>
apeiros is the js console so good?
<apeiros>
try it. go to developer.mozilla.org and open a js console in your browser.
zarubin has joined #ruby
reinaldob has quit [Ping timeout: 240 seconds]
wallerdev has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
jgt has joined #ruby
OrbitalKitten has joined #ruby
cyberarm has quit [Ping timeout: 252 seconds]
zarubin has quit [Ping timeout: 255 seconds]
bonhoeffer has joined #ruby
havenwood has joined #ruby
<arup_r>
We have methods like Integer().. Array().. etc.. And at the same time We have same name class(s) like Array, Integer... Now I am looking for a way to create a custom class say, CustomKlass, which will have a method like CustomKlass()..
<arup_r>
how to do so ?
franzip has joined #ruby
<apeiros>
arup_r: module Kernel; module_function def CustomClass(…) … end; end
<apeiros>
that's how Integer(), Array() etc. are defined.
<apeiros>
arup_r: what is `self` in line 4 of your code?
mroach has quit [Read error: Connection reset by peer]
mroach_ is now known as mroach
<arup_r>
`self` is an instance of `Object`
<apeiros>
self is the object you call the method on
danman has joined #ruby
<arup_r>
Ohh!
<apeiros>
and you call it on toplevel. which is obviously not your class.
<arup_r>
Yes
juanpablo_ has joined #ruby
operr has joined #ruby
<apeiros>
so you can't use self there.
<arup_r>
Umm.. So.. Way is ?
<apeiros>
use your class
<arup_r>
ohh..
<arup_r>
humm
* apeiros
puts on captain obvious hat ;-p
mroach has quit [Client Quit]
<arup_r>
I am actually trying to create a Factory class
jeff-ooh has joined #ruby
<apeiros>
Integer and Integer() are required to be unambiguous. i.e. it is always self evident whether it is a method or a constant.
<arup_r>
But why Integer.Integer() not needed... ? Because Matz getting higher priority than my custom one...? :(
Macaveli has joined #ruby
<apeiros>
i.e., `Integer` is *never* a method. `Integer()` and `Integer "1"` are.
<apeiros>
no, because rules. see ^
<arup_r>
Humm.. Understood..
<arup_r>
How can I give my method the same behavior like them ?
<apeiros>
you're already there. just replace `self` as I said.
sinkensabe has joined #ruby
<waxjar>
also, the Integer, String, etc helpers are there to "cast" values, not to save you from typing ".new" :p
<apeiros>
^ +1
* arup_r
staring at apeiros:'s hat :(
<apeiros>
I really dislike them tbh
<waxjar>
yeah, me too. although i use Array() occasionally
<apeiros>
I find all uses of Array a code stink
juanpablo_ has quit [Ping timeout: 255 seconds]
<apeiros>
sole exception is using it with badly designed 3rd party libs.
<apeiros>
*all uses of Array()
<apeiros>
(obviously using Array is not a code stink :D)
<waxjar>
what bothers me most is Integer(nil) raises an exception, but nil.to_i happily returns 0 :/
akas has quit [Quit: Leaving]
Macaveli has quit [Ping timeout: 264 seconds]
<apeiros>
Yeah, I've got my issues with Integer/to_i too.
<shevy>
you guys are never happy!
Aova has quit [Read error: Connection reset by peer]
mahtennek has joined #ruby
<apeiros>
too often I had: value.is_a?(Numeric) ? Integer(value) : Integer(value, 10) (or similar)
ta_ has joined #ruby
<apeiros>
shevy: yes, I'm a difficult to please person.
<apeiros>
and I'm not ashamed of it :D
<mahtennek>
hi i wrote a simple queue class to enqueue and dequeue items. when i require this simple queue in my Sinatra app, i get a nil class method error
<mahtennek>
how can i fix this?
<mahtennek>
if i run in a normal console app, there is no issue
<apeiros>
mahtennek: use stdlib Queue instead?
<apeiros>
or is there a good reason why you don't use Array/Queue instead?
<mahtennek>
apeiros: please advise, how do i use stdlib?
<arup_r>
apeiros: Yes...Yes
<arup_r>
Thanks apeiros:
<apeiros>
well, Array has #push/#shift and #unshift/#pop (depending on the direction you want the items to move)
<arup_r>
shevy: Ummm.......??
Nanuq has quit [Ping timeout: 272 seconds]
<mahtennek>
i am customizing my queue function which does that. it's just my own class doing so
<shevy>
arup_r wat
<apeiros>
mahtennek: and Queue - require 'thread'; Queue…
<apeiros>
see Queue's docs for its methods
<mahtennek>
apeiros: alright i'll read the docs. thanks
Nanuq has joined #ruby
<apeiros>
you'd use Queue if it needs to be threadsafe
<apeiros>
you'd use Array if that's not a concern
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
Troy^ has joined #ruby
raphaelss has quit [Quit: leaving]
<mahtennek>
apeiros: what if i wrote my own queue class?
<mahtennek>
with my own algorithm
<apeiros>
mahtennek: again: why?
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mahtennek>
apeiros: ahh i get what you are saying. alright cool
<arup_r>
shevy: nothing....
Aova has joined #ruby
avahey has joined #ruby
<apeiros>
mahtennek: there are valid reasons to implement your own queue class, but unless you've got one, you're just adding work for no gain
<mahtennek>
apeiros: i get you. let me relook at it if there's a need to.
greensoup has joined #ruby
skj3gg has joined #ruby
zachrab has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
felixjet has joined #ruby
greensoup has quit [Ping timeout: 264 seconds]
zachrab has quit [Ping timeout: 245 seconds]
vozcelik has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
mahtennek has quit []
terlar has quit [Ping timeout: 265 seconds]
sevenseacat has quit [Remote host closed the connection]
vikky__ has quit [Ping timeout: 246 seconds]
hamakn has quit [Remote host closed the connection]
aapole has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
greensoup has joined #ruby
vozcelik has quit [Ping timeout: 255 seconds]
kalusn has joined #ruby
mistermocha has joined #ruby
ta_ has joined #ruby
greensoup has quit [Ping timeout: 264 seconds]
<apeiros>
oh wow, can't believe how long I procrastinated this. but finally implemented that stupid form serializer.
mistermocha has quit [Ping timeout: 244 seconds]
dc has joined #ruby
<apeiros>
hm, actually not sure whether "serializer" is the proper term. it transforms it from html to an object structure.
cajone has quit [Quit: Leaving.]
lightstalker has quit [Ping timeout: 250 seconds]
TheNet has joined #ruby
aswen has joined #ruby
aapole has quit [Ping timeout: 252 seconds]
slawrence00 has quit [Ping timeout: 246 seconds]
<TheNet>
where can I take a look at the String class?
<arup_r>
If I aware of these.... in my coding time I don't need to think about solutions to the problems which someone already discovered.. that's why I am reading through these...
<havenwood>
arup_r: Keep in mind that some patterns are there to solve language-specific problems.
zachrab has joined #ruby
<arup_r>
havenwood: before doing math we should memorize number tables.. that same principal I'm trying to follow..
<arup_r>
humm..
<arup_r>
Ruby has no Interface concept.. I know
roshanavand1 has quit [Ping timeout: 252 seconds]
<arup_r>
which Java.. C#.. .Net guys will use here and there... :(
thsig has quit [Ping timeout: 245 seconds]
<apeiros>
jokke: `require 'rubygems'` is not needed unless you develop for ruby 1.8 too
ta_ has quit [Ping timeout: 252 seconds]
aapole has joined #ruby
<jokke>
yeah i just added that out of desperation
thsig has joined #ruby
<arup_r>
I know exact translation is not possible.. Within the Ruby boundary... If it can be written... it could be helpful.. I am taking this example..as it explains those diffs.. very well
<havenwood>
arup_r: It's like we don't need a "crank the car" pattern because we press the "On" button.
<arup_r>
at least for me
soxet has quit [Quit: Leaving]
<arup_r>
what does it mean? Ohh! my English!
<apeiros>
jokke: unpack the built gem and see whether it contains all the files it should
freerobby has joined #ruby
<jokke>
k
Jackneill has joined #ruby
<havenwood>
arup_r: Try cranking a modern car. You can sorta apply the pattern to turning the key, but it makes no sense and is a somewhat bizarre way of going about turning on the car.
<jokke>
i have no idea how
<apeiros>
maybe that `git ls` does not contain it. for whichever reason
jottr has joined #ruby
<apeiros>
jokke: untar it
bonhoeffer has quit [Quit: bonhoeffer]
<jokke>
yup
<jokke>
not there
<jokke>
added to git
MaciejCzyzewski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has quit [Ping timeout: 246 seconds]
<havenwood>
arup_r: I'd suggest looking into functional programming techniques in Ruby.
<apeiros>
well, check `git ls-files` and figure why it isn't there
<apeiros>
or use something else than git to list the files
<havenwood>
arup_r: Or Ruby-specific patterns.
* apeiros
really dislikes that dependency anyway - silly and pointless
cajone has quit [Remote host closed the connection]
<jokke>
apeiros: that did the trick
<arup_r>
havenwood: what are Ruby specific patterns ?
cajone has joined #ruby
nolic has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<MaciejCzyzewski>
Heh. I thought that #ruby-lang is for people that improve ruby, work at git repo... havenwood
roshanavand has quit [Remote host closed the connection]
MaciejCzyzewski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
selaruvich has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
seitensei has quit [Ping timeout: 250 seconds]
rubytor has joined #ruby
<havenwood>
maciejczyzewski: There's #ruby-core that's actually some of the MRI team. #ruby and #ruby-lang are quite similar channels. drbrain suggested possibly merging them a long while ago but I don't know that anyone cares to actually make that happen.
Lewix has quit [Remote host closed the connection]
<apeiros>
main problem for the merge is probably fflush, the owner of #ruby
<havenwood>
arup_r: You shall NOT use factory pattern!
<havenwood>
arup_r: Better?
chrishough has joined #ruby
sigurding has quit [Quit: sigurding]
<arup_r>
I already used it...
Lewix has quit [Ping timeout: 245 seconds]
<havenwood>
Nooooo!
<arup_r>
in my code
lioninawhat has quit [Remote host closed the connection]
<arup_r>
what's the Ruby replacement of this then ?
seitensei has joined #ruby
seitensei has joined #ruby
Sawbones has joined #ruby
<havenwood>
arup_r: For starters I think you may be equivocating a bit between Factory Pattern and Factory Method Pattern.
ta_ has quit [Ping timeout: 252 seconds]
<arup_r>
humm
<havenwood>
arup_r: But what are you really trying to do? What's the simplest way to do it?
<havenwood>
arup_r: Write simple stuff.
<arup_r>
I am done... Just wanted to know what the other Factory patterns do,,, I used simple factory.. :)
nolic has joined #ruby
<havenwood>
arup_r: So you have a pattern and you're trying to find something to do with it? Rather than a problem that you're trying to find a pattern for?
<arup_r>
your 2 questions are so confusing ... :(
riotjones has quit [Ping timeout: 250 seconds]
<havenwood>
arup_r: Do you have an issue you're trying to solve or are you just trying to use a pattern for its own sake?
Aova has quit [Read error: Connection reset by peer]
<chrisseaton>
Is there a Ruby library to read, edit and write back out JSON, preserving the white space? I've got hand written JSON files I'd like to edit in place, without trashing other people's layout decisions
<arup_r>
and wanted to do something interesting to create the objects of respecting templates... and I did it... used a factory there...
<arup_r>
chrisseaton: Yes
roshanavand has joined #ruby
<arup_r>
USe JSON and IO class
MaciejCzyzewski has joined #ruby
<havenwood>
arup_r: preserve whitespace <-
<arup_r>
stdlib ^^ and Core ^^
<arup_r>
didn't get you havenwood :
<havenwood>
arup_r: JSON in the stdlib doesn't preserve whitespace, like chrisseaton is asking, unless you know a way?
fabrice31 has joined #ruby
<yxhuvud>
christeaton: the stdlib json can prettyprint it indented though. How does the hand written files differ from that?
<havenwood>
arup_r: None of those options preserve original whitespace, that I can see.
<chrisseaton>
arup_r: thanks for that - but I'd like to preserve entirely - I know some XML parsers can do that
Lewix has joined #ruby
Lewix has joined #ruby
* arup_r
stepping back..
Riking has joined #ruby
lioninawhat has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
<chrisseaton>
i know formatting shouldn't matter - but it does in this case
<chrisseaton>
maybe I'll just regex it :)
ta_ has joined #ruby
gigetoo has joined #ruby
zachrab has joined #ruby
Takle has joined #ruby
jefus has quit [Ping timeout: 265 seconds]
fantazo has quit [Quit: Verlassend]
selaruvich has quit [Quit: Leaving]
rbennacer has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
tiwillia has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 252 seconds]
zachrab has quit [Ping timeout: 264 seconds]
Guest10293 is now known as _chs_
roshanavand has quit [Quit: roshanavand]
lyuben_ has joined #ruby
tiwillia has joined #ruby
hamakn has joined #ruby
ta_ has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
rubytor has joined #ruby
SOLDIERz_ has quit [Ping timeout: 264 seconds]
SOLDIERz_ has joined #ruby
charliesome has quit [Ping timeout: 245 seconds]
marcdel has quit []
ta_ has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
tjohnson has joined #ruby
hamakn has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
terlar has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
<blizzy>
if I have a bunch of methods that a class calls, should I put the methods in a module or a class? the methods are 'commands' for the bot (the class).
juanpablo_ has quit [Ping timeout: 255 seconds]
josephndenton has joined #ruby
Akagi201 has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
greensoup has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
AlexRussia has joined #ruby
greensoup has joined #ruby
josephndenton has quit [Ping timeout: 245 seconds]
<apeiros>
blizzy: do the methods use `self` or instance variables?
rubytor has quit [Ping timeout: 252 seconds]
jefus has joined #ruby
wallerdev has quit [Ping timeout: 245 seconds]
hgl has quit [Ping timeout: 245 seconds]
teddyp1cker has quit [Remote host closed the connection]
hgl has joined #ruby
ta_ has joined #ruby
<apeiros>
grah! I'm infected with that rails .yml ugliness.
* apeiros
got to shake it off…
iwishiwerearobot has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St_Marx has quit [Ping timeout: 250 seconds]
timonv has quit [Ping timeout: 240 seconds]
m8 has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
St_Marx has joined #ruby
franzip has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
Jackneill has quit [Ping timeout: 264 seconds]
franzip has joined #ruby
hamakn has joined #ruby
gsd has joined #ruby
<apeiros>
blizzy: if you'd answer follow up questions I'd care
<blizzy>
sorry, apeiros, I didn't even notice it.
<blizzy>
<apeiros> blizzy: do the methods use `self` or instance variables?
<blizzy>
instances.
<apeiros>
your code's indentation is odd. and $ranks will once be a String and once a File instance.
<apeiros>
also: don't use globals.
<blizzy>
well, it's for a class.
Sawbones has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
<apeiros>
still: don't use globals.
Sawbones has joined #ruby
<blizzy>
what should I use instead then
<apeiros>
there's really no good use case for globals.
<apeiros>
that depends on what needs access to it.
Aova has joined #ruby
<blizzy>
methods within the class
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
plashchynski has joined #ruby
<apeiros>
then an instance variable
danman has joined #ruby
riotjone has quit [Quit: Leaving...]
raphaelss has joined #ruby
pkrzywicki has joined #ruby
CpuID2 has joined #ruby
dc_ has joined #ruby
Yzguy has joined #ruby
dc has quit [Ping timeout: 240 seconds]
dc has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
Yzguy has quit [Client Quit]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dc_ has quit [Ping timeout: 255 seconds]
zachrab has quit [Remote host closed the connection]
eka has joined #ruby
zachrab has joined #ruby
mistermocha has joined #ruby
chishiki has quit [Quit: WeeChat 1.1.1]
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
chishiki has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
plashchynski has quit [Read error: Connection reset by peer]
zachrab has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
tier has quit []
iwishiwerearobot has joined #ruby
naftilos76 has quit [Remote host closed the connection]
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
Rollabunna has quit [Quit: Leaving...]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
shum has quit [Client Quit]
shum has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
Aswebb_ has joined #ruby
atomical has joined #ruby
pika_pika has joined #ruby
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
m00zy has joined #ruby
banister has joined #ruby
toothe has joined #ruby
reinaldob has joined #ruby
oleo__ is now known as oleo
joufflu has joined #ruby
Takle_ has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
Takle has quit [Read error: Connection reset by peer]
dc has quit [Remote host closed the connection]
pygospa has quit [Ping timeout: 250 seconds]
reinaldob has quit [Ping timeout: 252 seconds]
dc has joined #ruby
danman has quit [Quit: danman]
pygospa has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
tunaCanBruh has joined #ruby
dc has quit [Ping timeout: 244 seconds]
Troy^ has joined #ruby
Rollabunna has joined #ruby
vifino has quit [Ping timeout: 246 seconds]
tunaCanBruh has quit [Ping timeout: 245 seconds]
swgillespie has joined #ruby
zyxelthrone has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
momomomomo has joined #ruby
thsig_ has quit [Remote host closed the connection]
havenwood has joined #ruby
athan has quit [Ping timeout: 255 seconds]
CpuID2 has quit [Quit: This computer has gone to sleep]
thsig has joined #ruby
chishiki has quit [Quit: WeeChat 1.1.1]
ptrrr has quit [Quit: ptrrr]
Zai00 has quit [Quit: Zai00]
trufflesnout has joined #ruby
ChoiKyuSang has joined #ruby
atomi has quit [Quit: Lost terminal]
freerobby has quit [Quit: Leaving.]
claptor has joined #ruby
chishiki has joined #ruby
andhof-mt has quit [Remote host closed the connection]
LouisRoR has joined #ruby
atomi has joined #ruby
toothe has quit [Changing host]
toothe has joined #ruby
CpuID2 has joined #ruby
freerobby has joined #ruby
LouisRoR has quit [Client Quit]
momomomomo_ has joined #ruby
tylersmith has quit []
adriancb has joined #ruby
jimms has quit [Read error: Connection reset by peer]
jimms has joined #ruby
momomomomo_ has quit [Client Quit]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Ping timeout: 244 seconds]
LouisRoR has joined #ruby
MrGlass has joined #ruby
apurcell has joined #ruby
codecop has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
<MrGlass>
Hi. Anyone a good tutorial/article out there which can explain ruby scoping? Specifically, scoping of vars in for loops and other similar constructs.
skj3gg has joined #ruby
<crome>
searching for "ruby variable scope" gave me 14000+ results
thsig has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 245 seconds]
techietrash has joined #ruby
vifino has joined #ruby
ghostmoth has joined #ruby
DadoCe has quit [Remote host closed the connection]
<MrGlass>
crome: i did similar searches, found people complaining on SO but nothing terribly informative. Was hoping someone could point me in the right direction
apurcell has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 245 seconds]
kaspertidemann has quit []
Aova has joined #ruby
<crome>
I guess it's because variable scopes in ruby are really nothing special
CpuID2 has quit [Quit: This computer has gone to sleep]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lewix has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
danzilio has joined #ruby
hamakn has quit [Remote host closed the connection]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
<MrGlass>
yeah, im just trying to understand my loop constructs. For example, when I say `for i in foo` it seems like i is a local variable thats a clone, not a pointer to a position int he array
<Mon_Ouie>
It's an array of one element, that element being the range 0..7
Vivex has quit [Ping timeout: 255 seconds]
<MrGlass>
oh
bonhoeffer has joined #ruby
<MrGlass>
i need to not wrap it
<MrGlass>
yay
momomomomo has joined #ruby
<Mon_Ouie>
And just a more convenient way of writing your code is to pass a block to Array.new
<Mon_Ouie>
Array.new(8) { |i| Array.new(8, 0) }
<MrGlass>
Mon_Ouie: i figured there was a btter way to do this. thanks!
athan has joined #ruby
<MrGlass>
i tried `Array.new(8,array.new(8,0))` but of course that gave me 8 pointers to the same array
zacstewart has joined #ruby
Soliah has joined #ruby
bdamos has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
user083 has joined #ruby
athan has quit [Ping timeout: 250 seconds]
m8 has quit [Quit: Sto andando via]
athan has joined #ruby
Channel6 has joined #ruby
momomomomo has quit [Ping timeout: 265 seconds]
davedev2_ has quit [Ping timeout: 246 seconds]
davedev24_ has joined #ruby
Troy^ has joined #ruby
fabrice31 has joined #ruby
Rollabunna has quit [Quit: Leaving...]
swgillespie has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
Overlordz has quit [Remote host closed the connection]
momomomomo has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
adriancb has quit [Remote host closed the connection]
nahtnam has joined #ruby
juanpablo_ has joined #ruby
ismael_ has joined #ruby
thsig has joined #ruby
juanpablo_ has quit [Ping timeout: 245 seconds]
jimms has quit [Remote host closed the connection]
BTRE has quit [Ping timeout: 244 seconds]
josephndenton has quit [Quit: Lost terminal]
lioninawhat has quit [Remote host closed the connection]
davedev2_ has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
jherbst has joined #ruby
fenzil has quit [Ping timeout: 244 seconds]
skj3gg has quit [Quit: ZZZzzz…]
ghostmoth has quit [Quit: ghostmoth]
Vile` has quit [Ping timeout: 256 seconds]
skj3gg has joined #ruby
Vile` has joined #ruby
sankaber has joined #ruby
DadoCe has quit [Remote host closed the connection]
athan has quit [Ping timeout: 240 seconds]
thsig has quit [Remote host closed the connection]
thsig has joined #ruby
zarubin has quit [Remote host closed the connection]
zacstewart has quit [Remote host closed the connection]
xymbol has joined #ruby
Soda has quit [Remote host closed the connection]
CpuID2 has joined #ruby
CpuID2 has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
atomi has quit [Quit: updating arch linux wish me luck]
thsig has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
cmckee has joined #ruby
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
jottr has joined #ruby
ismael_ has quit [Remote host closed the connection]
ismael_ has joined #ruby
withnale__ has quit [Quit: Be back later ...]
ozialien has quit [Remote host closed the connection]
reinaldob has joined #ruby
zachrab has joined #ruby
Aova has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
pika_pika has quit [Ping timeout: 245 seconds]
athan has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
reinaldob has quit [Ping timeout: 245 seconds]
it0a has quit [Ping timeout: 252 seconds]
zachrab has quit [Ping timeout: 245 seconds]
Timba-as has quit [Quit: Be back later ...]
pygospa has quit [Ping timeout: 244 seconds]
Timba-as has joined #ruby
iwishiwerearobot has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
pygospa has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
Lewix has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
CpuID2 has joined #ruby
CpuID2 has quit [Changing host]
CpuID2 has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CpuID2 has quit [Client Quit]
franzip has quit [Quit: ...]
charliesome has quit [Quit: zzz]
thsig has joined #ruby
hamakn has joined #ruby
Troy^ has joined #ruby
danzilio has quit [Quit: My laptop is going to sleep!]
reinaldob has joined #ruby
hamakn has quit [Ping timeout: 244 seconds]
_gautam_ has joined #ruby
m00zy has quit [Ping timeout: 250 seconds]
<softinio>
so I am new to ruby ... on my mac and on my vps is it best to install ruby via homebrew (mac) and yum (centos) or should I be using RVM ?
hiyosi has joined #ruby
zacstewart has joined #ruby
tunaCanBruh has joined #ruby
lioninawhat has joined #ruby
momomomomo has quit [Ping timeout: 240 seconds]
thsig has quit [Remote host closed the connection]
momomomomo has joined #ruby
thsig has joined #ruby
regnartim_ has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
<ackpacket_>
I have a function that takes a block and a string as an argument. Inside that block, I call a method that may throw an argument error. When I put a rescue underneath that method call, I get an error saying "expected keyword_end"
<ackpacket_>
am I misunderstanding where and how to use rescues?
towski_ has quit [Ping timeout: 264 seconds]
<crome>
softinio: rvm/rbenv is a solid way of going about it
Lemur has quit [Remote host closed the connection]
towski_ has joined #ruby
<softinio>
crome: which one better between rbenv and rvm ?
Lemur has joined #ruby
thsig has quit [Ping timeout: 252 seconds]
pkrzywicki has quit [Ping timeout: 244 seconds]
Limix has joined #ruby
athan has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
livingstn has joined #ruby
Lemur has quit [Ping timeout: 245 seconds]
<crome>
I had some stupid issues with rvm (most likely my own fault) but I'm an rbenv fan
regnartim has joined #ruby
<regnartim>
#ubuntu
<crome>
it doesn't make a whole lot of difference, though
regnartim_ has quit [Quit: Leaving]
<softinio>
crome: ok will give rbenv a shot. thanks for advice
wallerdev has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
davedev24_ has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
cmckee has quit [Quit: cmckee]
fenzil has joined #ruby
davedev24_ has joined #ruby
regnartim has quit [Quit: Leaving]
regnartim has joined #ruby
charliesome has joined #ruby
Sawbones has quit [Remote host closed the connection]