<tgeeky>
i actually need one class variable here :o
<tgeeky>
Radar: the problem is that the Source initializer isn't called before the transform initializer is.
<tgeeky>
so there is no count
stunder001 has quit [Quit: WeeChat 1.4]
eljimador has quit [Ping timeout: 260 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
eljimmy has joined #ruby
Hyuk has joined #ruby
eljimbo has joined #ruby
Liam` is now known as lstanley
nettoweb has joined #ruby
akiTendo has joined #ruby
impermanence has quit [Ping timeout: 252 seconds]
shakes has joined #ruby
ramfjord has joined #ruby
arescorpio has joined #ruby
gtsai_ has joined #ruby
hightower3 has quit [Ping timeout: 276 seconds]
Oclair has quit [Ping timeout: 260 seconds]
|2701 has quit [Changing host]
|2701 has joined #ruby
|2701 has joined #ruby
gtsai has quit [Ping timeout: 250 seconds]
Es0teric has joined #ruby
RegulationD has joined #ruby
Oclair has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akiTendo has quit [Quit: akiTendo]
ta_ has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
impermanence has joined #ruby
akiTendo has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
n_blownapart has joined #ruby
astrobunny has joined #ruby
blaxter has quit [Quit: KTHXBYE]
n_blownapart is now known as crucify_me
akiTendo has quit [Client Quit]
ta_ has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Remote host closed the connection]
ropeney has joined #ruby
chouhoulis has joined #ruby
jancel has joined #ruby
RegulationD has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has quit [Quit: Life beckons.]
Guest43 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wrkrcoop has quit [Quit: wrkrcoop]
LoneHerm_ has joined #ruby
cdg has quit [Remote host closed the connection]
crucify_me is now known as n_blownapart
impermanence has quit [Quit: leaving]
drewo has joined #ruby
cdg has joined #ruby
curses has joined #ruby
impermanence has joined #ruby
ta_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
hahuang65 has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
aghalarp has quit [Max SendQ exceeded]
kus has joined #ruby
kus has quit [Max SendQ exceeded]
cdg has quit [Ping timeout: 260 seconds]
aghalarp has joined #ruby
curses has quit [Ping timeout: 276 seconds]
ferr has quit [Ping timeout: 244 seconds]
gnufied has quit [Quit: Leaving]
Rickmasta has quit [Ping timeout: 250 seconds]
sneakerhax has quit [Ping timeout: 250 seconds]
Limix has quit [Quit: Limix]
ta_ has quit [Read error: Connection reset by peer]
impermanence has quit [Quit: leaving]
zapata has joined #ruby
karmatr0n has joined #ruby
Rickmasta has joined #ruby
jancel has quit [Remote host closed the connection]
ta_ has joined #ruby
gtsai has joined #ruby
kus has joined #ruby
kus has quit [Max SendQ exceeded]
s1kx has quit [Quit: bai]
n_blownapart has quit []
gtsai_ has quit [Ping timeout: 240 seconds]
nareiber has quit [Ping timeout: 250 seconds]
<tgeeky>
Radar: got it working. ;)
nergdnulg has joined #ruby
nergdnulg has left #ruby [#ruby]
djbkd has quit [Quit: My people need me...]
smathy_ has joined #ruby
marr has quit [Ping timeout: 244 seconds]
smathy has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
whathapp_ has quit [Remote host closed the connection]
akiTendo has joined #ruby
moei has joined #ruby
Devalo has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
halfamind1 has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
tatsuo has joined #ruby
whathappens has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 250 seconds]
tatsuo has quit [Ping timeout: 260 seconds]
smathy_ is now known as smathy_afk
Bman has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
karmatr0n has quit []
lewis1711 has joined #ruby
|ifei5g00d has quit []
FooMunki has quit [Quit: FooMunki]
Es0teric has joined #ruby
smathy_afk is now known as smathy_
ta_ has quit [Read error: Connection reset by peer]
davedev24 has quit []
serafin88 has joined #ruby
pawnbox has joined #ruby
Es0teric has quit [Client Quit]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yqt has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
sumobob has quit [Quit: WeeChat 1.3]
`tim` has joined #ruby
mtkd has joined #ruby
gtsai_ has joined #ruby
curses has joined #ruby
arescorpio has quit [Quit: Leaving.]
horaceheaven has quit [Quit: horaceheaven]
gtsai has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
ta_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
gtsai_ has quit [Ping timeout: 240 seconds]
B1n4r10 has joined #ruby
hahuang65 has joined #ruby
weemsledeux has joined #ruby
ta_ has joined #ruby
zapata has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
sneakerhax has joined #ruby
skweek has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
ta_ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
youch has quit [Read error: Connection reset by peer]
youch has joined #ruby
skolman has joined #ruby
chosen1 has quit [Read error: Connection reset by peer]
chosen1 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
wrkrcoop has joined #ruby
<serafin88>
anyone is alive?
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hyuk_ has joined #ruby
XxJMGxX has quit [Read error: Connection reset by peer]
XxJMGxX has joined #ruby
<benzrf>
hi serafin88
dubin has quit [Read error: Connection reset by peer]
dubin has joined #ruby
<serafin88>
Hi benzrf, Do you know where can I download a good tutorial of Ruby?
moeabdol has joined #ruby
Hates_ has quit [Ping timeout: 260 seconds]
blackgoat has joined #ruby
IrishGringo has joined #ruby
pawnbox has joined #ruby
Hates_ has joined #ruby
akiTendo has quit [Quit: akiTendo]
Limix has joined #ruby
<benzrf>
serafin88: hard question
<benzrf>
serafin88: what's your prior programming experience?
moeabdol has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
<serafin88>
I'm a newbie in Ruby
wrkrcoop has quit [Quit: wrkrcoop]
<benzrf>
serafin88: but what other languages have you used? none?
akiTendo has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
LoneHerm_ has quit [Remote host closed the connection]
<serafin88>
I used Python, and Javascript a bit
gregf has joined #ruby
ta_ has joined #ruby
whathappens has quit [Remote host closed the connection]
roshanavand_ has joined #ruby
blackmesa has joined #ruby
grs has quit [Ping timeout: 240 seconds]
<benzrf>
oh
<benzrf>
serafin88: i'm probably not the best person to tell you what to look at, then
<benzrf>
you may want to come back some other time
ta_ has quit [Ping timeout: 260 seconds]
<serafin88>
thanks benzrf :)
tatsuo has joined #ruby
kam270 has joined #ruby
Bman has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
vdamewood has quit [Quit: Life beckons.]
<benzrf>
no problem
jancel has joined #ruby
ta_ has joined #ruby
jancel has quit [Ping timeout: 250 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grs has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
roshanavand_ has quit [Quit: This computer has gone to sleep]
smathy_ is now known as smathy_afk
astrobunny has joined #ruby
nando293921 has joined #ruby
shazaum__ has joined #ruby
astrobunny has quit [Ping timeout: 246 seconds]
chipotle has quit [Read error: Connection reset by peer]
catpoop has quit [Remote host closed the connection]
chipotle has joined #ruby
Nanuq has quit [Remote host closed the connection]
catpoop has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
gigetoo has joined #ruby
Nanuq has joined #ruby
rodfersou has joined #ruby
nando293921 has quit [Ping timeout: 250 seconds]
shazaum__ has quit [Quit: Leaving]
rodfersou has quit [Quit: leaving]
nullFxn has joined #ruby
skolman has quit [Remote host closed the connection]
nullFxn has quit [Client Quit]
hosttor has quit [Ping timeout: 276 seconds]
aries_liuxueyang has quit [Remote host closed the connection]
noService has quit [Ping timeout: 260 seconds]
|ifei5g00d has joined #ruby
exchgr has joined #ruby
tatsuo has quit [Read error: Connection reset by peer]
jancel has joined #ruby
aries_liuxueyang has joined #ruby
<exchgr>
quick question. say i have a class that has a class method, and then it calls that class method from within the class, but that call doesn't happen within any method. when i reference that class from another class, when does the first class call its own method, if at all?
kam270 has quit [Quit: Leaving]
<beauby>
exchgr: The call should happen when the class is defined (i.e. the first time you `require` the file it is defined in)
serafin88 has quit [Quit: Leaving]
<beauby>
(when I say "the class", I mean the first one you talked about)
Yzguy has joined #ruby
<exchgr>
so that's what i thought. but alright, so riddle me this: these two classes are children of the same parent. the parent defines the class method, and the children call it. the first class's class method writes to a class variable, and the second class reads from it. because of the way class variables are in ruby, it's the same class variable that's accessible from both classes, right? but even though i've already required and referenced
<exchgr>
the first class from within the second class, it seems that the first class hasn't done its job. but if i manually call that class method on the first class from the second class, it seems to work
hutch34 has joined #ruby
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<exchgr>
there's an error thrown on line 11: in `belongs_to': undefined method `[]' for nil:NilClass (NoMethodError)
skweek has quit [Ping timeout: 244 seconds]
<zacts>
shevy: indeed, I'm now to the _last_ ch of Head First Ruby. I feel awesome! \o/ I'll let you know when I actually complete it. (but not my other books, as I don't want to spam you either).
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<exchgr>
and that's because @@associations is nil. but it should be {:artist => {:album => :has_many}} by then, right?
Coldblackice has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
braincrash has quit [Quit: bye bye]
LoneHerm_ has joined #ruby
moeabdol has joined #ruby
gix has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
|2701 has quit [Quit: Connection closed for inactivity]
<exchgr>
hm i think i might have found the issue, but not the fix. it looks like i'm requiring album.rb before Artist is finished defining itself, including calling its own class method, which is a fun catch-22
LoneHerm_ has quit [Ping timeout: 246 seconds]
gix has joined #ruby
codeurge has joined #ruby
zast has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
nankyokusei has quit [Ping timeout: 276 seconds]
gtsai has joined #ruby
mistermocha has joined #ruby
braincrash has joined #ruby
halfamind1 has quit [Quit: Leaving.]
JesseH has joined #ruby
pawnbox has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
aries_liuxueyang has quit [Read error: Connection reset by peer]
Yzguy has quit [Quit: Zzz...]
shakes has quit [Quit: Leaving]
aries_liuxueyang has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
hahuang65 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<beauby>
exchgr: In the snipped you posted, you write to @@associations[class_name][association.singularize] and you read from @@associations[association][class_name]
brendan- has joined #ruby
<exchgr>
yep, that's on purpose, since we're writing from one class and reading from another
<exchgr>
class_name in one class should be the same as association.singularize in another, and vice versa
curses has quit [Ping timeout: 250 seconds]
halfamind has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
<beauby>
Also, why do you need to require the other class?
<exchgr>
on line 6, it's @@associations[:artist][:album], and on line 11, it's @@associations[:artist][:album], supposing class_name yields the name of the current class in downcased symbol form
A5101 has joined #ruby
<exchgr>
well i need them later on
Kallis has quit [Read error: Connection reset by peer]
<beauby>
So do you expect the class attribute @@associations to be defined on the `Base` class?
<exchgr>
i expect it to be defined when Artist calls has_many :albums
nwhirschfeld has joined #ruby
Arcaire has quit [Quit: wew lad]
Arcaire has joined #ruby
<exchgr>
i think my issue here is that Artist hasn't finished defining itself by the time it requires Album, and they require each other, so it's not exactly clear what the dependency order is
<beauby>
This works, so your problem is probably somewhere else
amclain has quit [Quit: Leaving]
<beauby>
There is no "catch-22" of overlapping definitions because everything is defined sequentially
mistermocha has joined #ruby
ftj has joined #ruby
Arcaire has quit [Client Quit]
Arcaire has joined #ruby
agent_white has joined #ruby
ftj has quit [Client Quit]
<agent_white>
Evenin'
mistermocha has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
noService has joined #ruby
noService has quit [Ping timeout: 240 seconds]
noService has joined #ruby
<exchgr>
i think the specifics of my issue were a little more twisted than i was letting on; i seem to have fixed the issue by dynamically requiring the association's file from within belongs_to
<exchgr>
require_relative "./#{association}"
grs has quit [Ping timeout: 244 seconds]
mjuszczak has joined #ruby
jancel has quit [Remote host closed the connection]
mjuszczak has quit [Client Quit]
astrobunny has joined #ruby
blackmesa has joined #ruby
pawnbox has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 260 seconds]
grs has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
Limix has quit [Quit: Limix]
elifoster has joined #ruby
ta_ has joined #ruby
kareeoleez has joined #ruby
LoneHermit has joined #ruby
duncannz has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has quit [Read error: Connection reset by peer]
jud has quit [Read error: Connection reset by peer]
pwnd_nsfw` has joined #ruby
jud has joined #ruby
nando293921 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
griffindy has quit [Client Quit]
rbennacer has quit [Remote host closed the connection]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
rbennacer has joined #ruby
halfamind has quit [Quit: Leaving.]
lxsameer has joined #ruby
lewis1711 has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 252 seconds]
Guest43 has joined #ruby
tildes_ has joined #ruby
lewis1711 has joined #ruby
D9 has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
rbennacer has quit [Ping timeout: 240 seconds]
D9 has joined #ruby
Guest43 has quit [Ping timeout: 260 seconds]
nando293921 has quit [Ping timeout: 252 seconds]
halfamind has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
pawnbox has joined #ruby
aagdbl has joined #ruby
last_staff has joined #ruby
nertzy2 has joined #ruby
kgrz has joined #ruby
nertzy has quit [Ping timeout: 244 seconds]
frem_ has quit [Quit: Connection closed for inactivity]
ta_ has joined #ruby
Tyrant_ has quit [Read error: Connection reset by peer]
Tyrant_ has joined #ruby
Devalo has joined #ruby
zzak has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
zzak has joined #ruby
last_staff has quit [Quit: last_staff]
ta_ has quit [Read error: Connection reset by peer]
lewis1711 has quit [Ping timeout: 260 seconds]
tfitts has quit [Quit: Connection closed for inactivity]
lewis1711 has joined #ruby
halfamind has quit [Quit: Leaving.]
jaguarmagenta has joined #ruby
lewis1711 has quit [Ping timeout: 260 seconds]
chosen1 has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
jetpack_joe has joined #ruby
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaguarma_ has quit [Remote host closed the connection]
<kgrz>
CSV.parse(user_submitted_data) might fail if user_submitted_data is anything other than a string (or a pathname perhaps)
<Radar>
Why would someone pass it a non-string?
chipotle has quit [Quit: cheerio]
WhatsGoingOn has joined #ruby
<kgrz>
I was writing a spec for this and accidentally used a non-string value for the input, so ran in to this issue. :D Now confused whether I should even consider that case
jaguarmagenta has joined #ruby
pLaToOn has joined #ruby
solars has joined #ruby
d0nn1e has quit [Ping timeout: 260 seconds]
JesseH has quit [Remote host closed the connection]
ta_ has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
mistermocha has quit [Read error: Connection reset by peer]
d0lph1n98 has joined #ruby
mistermocha has joined #ruby
crystal7_ has joined #ruby
crystal77 has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
dudepare has joined #ruby
XxJMGxX has quit [Quit: Leaving]
CloCkWeRX has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
bronson has joined #ruby
psf has joined #ruby
A5101 has quit [Ping timeout: 276 seconds]
rkazak has quit [Quit: Sleep.....ing....]
mistermocha has quit [Remote host closed the connection]
ta_ has joined #ruby
hightower3 has joined #ruby
CloCkWeRX has joined #ruby
Jasonc has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<Jasonc>
Hello
<Radar>
hi
blackgoat has quit [Quit: WeeChat 1.4]
d0nn1e has joined #ruby
aganov has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
<Jasonc>
sorry to be a bother. I'm new to Ruby, I was wondering if anyone here had any experience with rspec
Guest9272 has quit [Ping timeout: 240 seconds]
<Radar>
Not a bother at all.
lxsameer has joined #ruby
<Radar>
Yes there are people here who have experience with RSpec. What's up?
Omni_ has joined #ruby
<flughafen>
hey shevy
<Radar>
Jasonc: ^
<Jasonc>
trying to intialize a class but I can't due to an instance variable that should be declared first
<Radar>
Jasonc: ?code
<Radar>
?code Jasonc
<ruby[bot]>
Jasonc: We can't help you without your code, please post it to https://gist.github.com
biberu has joined #ruby
kraken has joined #ruby
<kraken>
If I install a gem in the wrong directory, did I majorly fuck things up?
<Jasonc>
It's work based code so I can't.
kraken is now known as Guest90364
Guest90364 is now known as _kraken
ravishankarjha has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 240 seconds]
<heftig>
_kraken: restore your honor through sacred sepukku
<Jasonc>
Wow bit hardcore for Ruby
<_kraken>
<heftiq> lol what do you mean
<heftig>
_kraken: just delete the files installed?
<heftig>
use gem uninstall with the same install dir?
emilkarl has joined #ruby
emilkarl is now known as emilkarl[away]
emilkarl[away] is now known as emilkarl
mikar has joined #ruby
<_kraken>
I'm just confused because I just gem install rspec for instance
<_kraken>
but I wasnt under ~
<_kraken>
when I did it
<_kraken>
did that fuck things up or nah?
<heftig>
Jasonc: make a code snippet that shows the same problem
<heftig>
_kraken: no
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_kraken>
Ah I see, so it doesn't matter what directory I'm currently in when I install a gem?
<heftig>
yes
<_kraken>
in the terminal that is
<_kraken>
uhh yes? no? I'm confused
<heftig>
it doesn't matter
<_kraken>
awesome
<_kraken>
*hug
<_kraken>
kidding
<_kraken>
not really
idefine has joined #ruby
hk238 has joined #ruby
ur5us_ has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
<Radar>
Jasonc: Ok. I can't really help you without seeing any code.
agit0 has joined #ruby
agit0 has quit [Client Quit]
Oclair has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
agit0 has joined #ruby
ur5us has joined #ruby
Coldblackice has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
edwinvdgraaf has quit [Read error: Connection reset by peer]
<Jasonc>
actually ignore that. I have to step away from my desk for a little bit sorry
<Radar>
Perhaps you mean @instance ||= "new_address"
<Radar>
Jasonc: ^
|ifei5g00d has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
ur5us has joined #ruby
hightower3 has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Remote host closed the connection]
<kgrz>
_kraken: `gem env` can be your friend sometimes. Shows you all the settings for the gem utility
moeabdol has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
norc has joined #ruby
<norc>
Are there advantages to accessing instance variables through attr_accessors over direct @ivar?
<norc>
Ignoring the overhead of the extra call involved
_kraken has quit [Quit: Leaving]
ravishankarjha has joined #ruby
moeabdol has joined #ruby
Jasonc has quit [Quit: Leaving.]
nkygle has joined #ruby
kgrz has quit [Ping timeout: 276 seconds]
SShrike has joined #ruby
drewo has quit [Ping timeout: 260 seconds]
elaptics is now known as elaptics`away
kgrz has joined #ruby
curses has joined #ruby
DoubleMalt has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
Hyuk has joined #ruby
johnDoe111 has joined #ruby
curses has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
crystal7_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dreinull has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 276 seconds]
terlar has joined #ruby
<adaedra>
Bonjour
dreinull has joined #ruby
lxsameer has joined #ruby
ta_ has joined #ruby
last_staff has joined #ruby
<flughafen>
bonjour adaedra
<norc>
Greetings adaedra.
platzhirsch has joined #ruby
mark_66 has joined #ruby
mlehrer has joined #ruby
antgel has joined #ruby
<shevy>
cats adaedra
<shevy>
norc I think the various attr*s are mostly there due to laziness
<adaedra>
jgt3 has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
platzhirsch has quit [Quit: WeeChat 1.4]
platzhirsch has joined #ruby
the_drow has joined #ruby
<norc>
shevy: I do not see how providing an interface translates to laziness.
<flughafen>
ooh, google io is today
<norc>
Unless you consider keeping code maintainable a symptom of being lazy.
<shevy>
norc I usually avoid the various attrs and define all methods on my own
<adaedra>
why?
labaleine has joined #ruby
Morkel has joined #ruby
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
anisha has joined #ruby
elaptics`away is now known as elaptics
nankyokusei has joined #ruby
chipotle has joined #ruby
jackjackdripper has quit [Ping timeout: 244 seconds]
jwang has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
Jasonc has joined #ruby
<bazzy>
norc, accessing through the attr_accessor's sets up your use of the variable as an API.. so if you ever needed *more than an attr_accessor* functionality, you could implement the function yourself and add whatever other code to do what you need
johnDoe111 has quit [Remote host closed the connection]
<bazzy>
Bear in mind I'm a Ruby n00b
<bazzy>
remember, the attr_accessor also opens up your variable to be accessed *from outside*
<bazzy>
so it does have a use regardless of "API" benefit
blackmesa has quit [Ping timeout: 260 seconds]
<bazzy>
in fact I believe that is its primary use.. the API thing could be considered an extra
johnDoe111 has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
woodruffw has quit [Ping timeout: 276 seconds]
akkmaxon has joined #ruby
<shevy>
adaedra you lose a lot of control if you use attr*
<adaedra>
control?
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
yes
<adaedra>
I don't see what you mean by that
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
ferr has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
d0lph1n98 has quit [Ping timeout: 260 seconds]
chipotle has quit [Quit: cheerio]
ramfjord has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
idletask has joined #ruby
<bazzy>
adaedra, I kind of explained it already.. I'm sure shevy would confirm that
Dimik has quit [Ping timeout: 276 seconds]
ta__ has joined #ruby
noobsu has joined #ruby
<shevy>
I always do a lot of modifications to any dataset that gets assigned to @ivars
<norc>
bazzy: You misunderstand. Im not asking about attr_accessor, but whether there is a point in using that same interface from inside the class.
bronson has joined #ruby
<shevy>
I also use a lot of boolean methods to access
<shevy>
if use_colours?
chipotle has joined #ruby
blackmesa has joined #ruby
<bazzy>
norc, I explained that (see "API")
jwang has joined #ruby
evidex has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
<bazzy>
there's no real benefit other than "I am already using an API style of accessing so I don't need to manually modify it later" AFAIK
<norc>
bazzy: I know what interfaces are.
siovene has joined #ruby
<bazzy>
if you were directly accessing the instance var's and wanted to have the API style access later you would need to modify all references to that instance variable to use the function..
<bazzy>
so just doing it from the get go eliminates that need ..
bronson has quit [Ping timeout: 252 seconds]
<bazzy>
norc, ^
antgel has quit [Ping timeout: 246 seconds]
ravishankarjha has quit [Remote host closed the connection]
antgel has joined #ruby
connor_g1odwolf is now known as connor_goodwolf
<norc>
Why is it that I'm getting Ruby specific design input from someone who admitted he does not know much about Ruby.
ravishankarjha has joined #ruby
<norc>
Honest question here.
<bazzy>
Radar, would you mind verifying what I've said starting around 4:09 EST .. I'm wondering if I've missed the mark in any way? Thanks
<kareeoleez>
If you have some spare time take a look
<norc>
bazzy: Im not saying you said anything wrong, but it is hard to take design feedback if you have no experience from you.
kith_ has joined #ruby
dsea11 has joined #ruby
nertzy3 has joined #ruby
Regulati_ has joined #ruby
noobsu_ has joined #ruby
GinoManWorks_ has joined #ruby
Cyrus1 has joined #ruby
mikecmpbll has joined #ruby
siovene_ has joined #ruby
deeprave_ has joined #ruby
angiebadillo_ has joined #ruby
mwlang_ has joined #ruby
the-eat-scout_ has joined #ruby
shelling___ has joined #ruby
m4rCsi has joined #ruby
halfdan_ has joined #ruby
<jhass>
norc: it's somewhat hard to argue in Ruby but I agree with bazzy here. Crystal makes it easier to argue, even for private accessors. There we got multiple variants of attr_accessor or property it's called there. So later if for example the compiler starts thinking my instance variable is nilable but I know it isn't all I have is to change private getter foo into private getter! foo for example
podman_ has joined #ruby
Lloyd__ has joined #ruby
mjc__ has joined #ruby
ramblinpeck_ has joined #ruby
mic_e has joined #ruby
<jhass>
and that'll generate me an accessor that makes sure it's not actually nil
nadir_ has joined #ruby
KINGSABRI has joined #ruby
bcavileer_ has joined #ruby
j2k_ has joined #ruby
chrismytton_ has joined #ruby
vqrs has joined #ruby
braderhart_ has joined #ruby
ijij_ has joined #ruby
chridal_ has joined #ruby
<jhass>
*have to do
kkirsche has joined #ruby
LiquidIn1ect has joined #ruby
jcp_ has joined #ruby
humding3r has joined #ruby
jyaworski_ has joined #ruby
Mr_Pancake- has joined #ruby
rideh- has joined #ruby
rfv_ has joined #ruby
<norc>
jhass: Curious that you mention Crystal. I just spend some time today looking at it because I was interested in more type safety in Ruby.
alexblom_ has joined #ruby
Kero_ has joined #ruby
jtdowney_ has joined #ruby
HashNuke__ has joined #ruby
danieli_ has joined #ruby
spaceghost|work has joined #ruby
MalcolmReynolds has joined #ruby
__dev has joined #ruby
LBRapid_ has joined #ruby
sunya7a__ has joined #ruby
daytime has joined #ruby
tvl has joined #ruby
rarruda_ has joined #ruby
shiver_ has joined #ruby
MadWasp_ has joined #ruby
jrod_ has joined #ruby
axisys_ has joined #ruby
nadir has quit [Ping timeout: 250 seconds]
rfv has quit [Ping timeout: 250 seconds]
hayden__ has quit [Ping timeout: 250 seconds]
elomatreb has quit [Ping timeout: 250 seconds]
podman has quit [Ping timeout: 250 seconds]
j2k has quit [Ping timeout: 250 seconds]
mjc_ has quit [Ping timeout: 250 seconds]
bedouin has quit [Ping timeout: 250 seconds]
MadWasp has quit [Ping timeout: 250 seconds]
chrismytton has quit [Ping timeout: 250 seconds]
iamdevnul has quit [Ping timeout: 250 seconds]
Seich has quit [Ping timeout: 250 seconds]
pipework has quit [Ping timeout: 250 seconds]
catbusters has quit [Ping timeout: 250 seconds]
bcavileer has quit [Ping timeout: 250 seconds]
halfdan has quit [Ping timeout: 250 seconds]
jcp has quit [Ping timeout: 250 seconds]
ijij has quit [Ping timeout: 250 seconds]
deeprave has quit [Ping timeout: 250 seconds]
incomprehensibly has quit [Ping timeout: 250 seconds]
tpendragon has quit [Ping timeout: 250 seconds]
cstrahan has quit [Ping timeout: 250 seconds]
bove has quit [Ping timeout: 250 seconds]
the-eat-scout has quit [Ping timeout: 250 seconds]
alem0lars has quit [Ping timeout: 250 seconds]
eggoez has quit [Ping timeout: 250 seconds]
HashNuke_ has quit [Ping timeout: 250 seconds]
rideh has quit [Ping timeout: 250 seconds]
Elysia has quit [Ping timeout: 250 seconds]
Billias has quit [Ping timeout: 250 seconds]
machty has quit [Ping timeout: 250 seconds]
chridal has quit [Ping timeout: 250 seconds]
tylersmith has quit [Ping timeout: 250 seconds]
Lloyd has quit [Ping timeout: 250 seconds]
charles81 has quit [Ping timeout: 250 seconds]
noobsu has quit [Ping timeout: 250 seconds]
gomix has quit [Ping timeout: 250 seconds]
jyaworski has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 250 seconds]
[ace] has quit [Ping timeout: 250 seconds]
humd1ng3r has quit [Ping timeout: 250 seconds]
Caelum has quit [Ping timeout: 250 seconds]
alxgsv has quit [Ping timeout: 250 seconds]
jokester has quit [Ping timeout: 250 seconds]
davidmichaelkarr has quit [Ping timeout: 250 seconds]
digitalfiz has quit [Ping timeout: 250 seconds]
IanMalcolm has quit [Ping timeout: 250 seconds]
zrl_ has quit [Ping timeout: 250 seconds]
ramblinpeck has quit [Ping timeout: 250 seconds]
Kero has quit [Ping timeout: 250 seconds]
Kamilion has quit [Ping timeout: 250 seconds]
ggherdov has quit [Ping timeout: 250 seconds]
kspencer has quit [Ping timeout: 250 seconds]
Lord_of_Life has quit [Ping timeout: 250 seconds]
scorphus has quit [Ping timeout: 250 seconds]
TheBrayn has quit [Ping timeout: 250 seconds]
Cyrus has quit [Ping timeout: 250 seconds]
tobiasvl has quit [Ping timeout: 250 seconds]
alexblom has quit [Ping timeout: 250 seconds]
j416 has quit [Ping timeout: 250 seconds]
vqrs_ has quit [Ping timeout: 250 seconds]
bodie_ has quit [Ping timeout: 250 seconds]
ja has quit [Ping timeout: 250 seconds]
bttf has quit [Ping timeout: 250 seconds]
llua has quit [Ping timeout: 250 seconds]
Veejay has quit [Ping timeout: 250 seconds]
jrod has quit [Ping timeout: 250 seconds]
siovene has quit [Ping timeout: 250 seconds]
mlehrer has quit [Ping timeout: 250 seconds]
rarruda has quit [Ping timeout: 250 seconds]
mic_e_ has quit [Ping timeout: 250 seconds]
Es0teric has quit [Ping timeout: 250 seconds]
nertzy2 has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
swills has quit [Ping timeout: 250 seconds]
dsea has quit [Ping timeout: 250 seconds]
sunya7a_ has quit [Ping timeout: 250 seconds]
hanmac has quit [Ping timeout: 250 seconds]
bazzy has quit [Ping timeout: 250 seconds]
jtdowney has quit [Ping timeout: 250 seconds]
angiebadillo has quit [Ping timeout: 250 seconds]
braderhart has quit [Ping timeout: 250 seconds]
kith has quit [Ping timeout: 250 seconds]
blackjid has quit [Ping timeout: 250 seconds]
jokke has quit [Ping timeout: 250 seconds]
amitchellbullard has quit [Ping timeout: 250 seconds]
cardoni has quit [Ping timeout: 250 seconds]
prooftechnique has quit [Ping timeout: 250 seconds]
Shidash has quit [Ping timeout: 250 seconds]
colstrom has quit [Ping timeout: 250 seconds]
LiquidInsect has quit [Ping timeout: 250 seconds]
alxndr has quit [Ping timeout: 250 seconds]
axisys has quit [Ping timeout: 250 seconds]
Nightmare has quit [Ping timeout: 250 seconds]
m4rCsi_ has quit [Ping timeout: 250 seconds]
danieli has quit [Ping timeout: 250 seconds]
apipkin_ has quit [Ping timeout: 250 seconds]
LBRapid has quit [Ping timeout: 250 seconds]
saneax_AFK has quit [Ping timeout: 250 seconds]
shiver has quit [Ping timeout: 250 seconds]
shelling__ has quit [Ping timeout: 250 seconds]
Mr_Pancake has quit [Ping timeout: 250 seconds]
_dev has quit [Ping timeout: 250 seconds]
mwlang has quit [Ping timeout: 250 seconds]
GinoManWorks has quit [Ping timeout: 250 seconds]
KINGSABRI_ has quit [Ping timeout: 250 seconds]
bweston92 has quit [Ping timeout: 250 seconds]
yodeler has quit [Ping timeout: 250 seconds]
Biohazard has quit [Ping timeout: 250 seconds]
mc_fail has quit [Ping timeout: 250 seconds]
LinuxHippie has quit [Ping timeout: 250 seconds]
Didac has quit [Ping timeout: 250 seconds]
YaknotiS has quit [Ping timeout: 250 seconds]
r4z3r has quit [Ping timeout: 250 seconds]
Diabolik has quit [Ping timeout: 250 seconds]
teotwaki_ has quit [Ping timeout: 250 seconds]
CustosLimen has quit [Ping timeout: 250 seconds]
Billias has joined #ruby
nighttime has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
Seich has joined #ruby
LinuxHippie has joined #ruby
elomatreb has joined #ruby
jrod_ is now known as jrod
chridal_ is now known as chridal
MadWasp_ is now known as MadWasp
jyaworski_ is now known as jyaworski
LBRapid_ is now known as LBRapid
kkirsche is now known as r4z3r
mwlang_ is now known as mwlang
bodie__ has joined #ruby
chridal has joined #ruby
chridal has quit [Changing host]
yodeler has joined #ruby
kspencer has joined #ruby
bweston92 has joined #ruby
alxndr has joined #ruby
Veejay has joined #ruby
prooftechnique has joined #ruby
IrishGringo_ has joined #ruby
Mr_Pancake- is now known as Mr_Pancake
nadir_ is now known as nadir
bodie__ is now known as bodie_
duoi has quit [Ping timeout: 269 seconds]
TheBrayn has joined #ruby
infernix has quit [Ping timeout: 308 seconds]
tvl is now known as tobiasvl
Diabolik has joined #ruby
j416 has joined #ruby
bazzy has joined #ruby
llua has joined #ruby
bcavileer_ is now known as bcavileer
Biohazard has joined #ruby
YaknotiS has joined #ruby
<jhass>
hypothetical Ruby usecases would be turning your class into for example something using an ORM which overloads attr_accessor
teotwaki has joined #ruby
<norc>
jhass: So in Crystal variables have a "nillability" property? Or is that a guarantee for bang method?
deeprave_ is now known as deeprave
Nightmare has joined #ruby
kspencer has quit [Changing host]
kspencer has joined #ruby
catbusters has joined #ruby
Snowy has joined #ruby
CustosLimen has joined #ruby
jokke has joined #ruby
chrismytton_ is now known as chrismytton
the-eat-scout_ is now known as the-eat-scout
<shevy>
jhass aha so crystal does additional steps compared to ruby there? e. g. the example of ensuring that something is not nil
jokester has joined #ruby
mlehrer has joined #ruby
swills has joined #ruby
mikar has quit [Ping timeout: 276 seconds]
jhill has quit [Ping timeout: 276 seconds]
daxroc has quit [Ping timeout: 276 seconds]
yo61 has quit [Ping timeout: 276 seconds]
alxgsv has joined #ruby
<jhass>
well, it's a bit more general
gomix has joined #ruby
pawnbox has quit [Remote host closed the connection]
hanmac has joined #ruby
mjc__ is now known as mjc_
pawnbox has joined #ruby
blackjid has joined #ruby
Lloyd__ is now known as Lloyd
<jhass>
Crystal knows union types, say a variable may be a string, int or nil, its type would be String|Int32|Nil
err_ok has quit [Ping timeout: 276 seconds]
adambeynon has quit [Ping timeout: 276 seconds]
mrfooo has quit [Ping timeout: 276 seconds]
acalewin has quit [Ping timeout: 276 seconds]
[diecast] has quit [Ping timeout: 276 seconds]
kdisneur has quit [Ping timeout: 276 seconds]
caw has quit [Ping timeout: 276 seconds]
cbetta has quit [Ping timeout: 276 seconds]
jabreity__ has quit [Ping timeout: 276 seconds]
frode15243 has quit [Ping timeout: 276 seconds]
Kamilion has joined #ruby
angiebadillo_ is now known as angiebadillo
<norc>
jhass: Honestly the one thing I would like to see in Crystal is clear separation of const methods and mutable members. But that would be too much to ask for, right?
rfv_ is now known as rfv
<jhass>
as long as it does have that type I can only call methods on it common to these types
halfdan_ is now known as halfdan
duoi has joined #ruby
podman_ is now known as podman
tpendragon has joined #ruby
bedouin has joined #ruby
<jhass>
if I know for example it can't be nil, I can tell the compiler to remove Nil from the union
jcp_ is now known as jcp
siovene_ is now known as siovene
Caelum has joined #ruby
ramblinpeck_ is now known as ramblinpeck
<jhass>
for example by raising if it in fact would be nil
shelling___ is now known as shelling__
mic_e has quit [Ping timeout: 240 seconds]
<jhass>
which is what Object#not_nil! does and getter! generates an getter that calls that for me
haxrbyte has quit [Read error: Connection reset by peer]
eggoez has joined #ruby
haxrbyte has joined #ruby
daemonwrangler has quit [Ping timeout: 276 seconds]
gmci has quit [Ping timeout: 276 seconds]
<jhass>
norc: I'm not so much into FP still, so not sure I get you
apipkin_ has joined #ruby
<PaulePanter>
Hi. Can `@exhibitions.map {|e| [ e.name, e.id ] }` be written even shorter?
<jhass>
no
idefine has joined #ruby
ndrst has quit [Ping timeout: 276 seconds]
ta__ has quit [Read error: Connection reset by peer]
jaruga___ has joined #ruby
ggherdov_ has joined #ruby
jaruga___ is now known as jaruga____
ta_ has joined #ruby
<norc>
jhass: In C++ you can qualify a member function (method) to be const, which is a promise to not make (visible) changes to the object it belongs to. At the same time you can specify mutable member variables which may be modified by const member functions (for things like Mutexes) with no visible side effects.
terlar has quit [Ping timeout: 260 seconds]
cardoni has joined #ruby
Macaveli has joined #ruby
mc_fail has joined #ruby
marr has joined #ruby
<jhass>
ah well, I wouldn't say it's out of question but I'm not sure if it really brings that much to the language for the conceptual complexity it adds
amitchellbullard has joined #ruby
[ace] has joined #ruby
bttf has joined #ruby
aupadhye has joined #ruby
saneax_AFK has joined #ruby
hayden__ has joined #ruby
postmodern has quit [Quit: Leaving]
saneax_AFK is now known as saneax
braderhart_ is now known as braderhart
Lord_of_Life has joined #ruby
<kgrz>
kareeoleez: adding to that answer already on SO, the Set functionality in stdlib is pretty useful. In most cases, if you're doing a [].uniq, Set is a much better option. [].uniq.sort can be replaced by SortedSet instead
Didac has joined #ruby
djbkd has joined #ruby
bove has joined #ruby
<kareeoleez>
kgrz: noted, thank you
cstrahan has joined #ruby
incomprehensibly has joined #ruby
djbkd has quit [Client Quit]
Es0teric has joined #ruby
drewo has joined #ruby
<kgrz>
kareeoleez: Note that array and set do not have the same method list. That's why the 'in most cases' caveat
Shidash has joined #ruby
<kareeoleez>
yeah it's a simple problem and so complicated in the other hand
<kareeoleez>
kgrz: the thing is that If you generate all possible strings a-z, A-Z, 0-9 with length = 8 it might take days
startupality has joined #ruby
kdisneur has joined #ruby
charles81 has joined #ruby
<kareeoleez>
kgrz: because there are not only individual character strings but repeating characters also like aaaaabb1 or f89345fw
gmci has joined #ruby
d0nn1e has quit [Ping timeout: 276 seconds]
<kareeoleez>
kgrz: so I want to pop out a message with the time elapsed, strings generated until now and it will be easy enough to calculate an average by keys/second
<kgrz>
True
agit0 has quit [Read error: Connection reset by peer]
K7 has quit [Quit: Connection closed for inactivity]
<kareeoleez>
kgrz: I hope to generate a huge rainbow table for fun (some spare hard drives around)
d0nn1e has joined #ruby
mweshi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
not sure Ruby is your best tool there tbh
<norc>
^-
mikar has joined #ruby
jabreity__ has joined #ruby
caw has joined #ruby
<kgrz>
:D
<PaulePanter>
jhass: Thank you!
Snowy has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
<PaulePanter>
jhass: Since Rails 4, if @exhibition is a model one could use `@exhibitions.pluck(:name, :id )`, I guess.
yo61 has joined #ruby
<jhass>
I guess, this is #ruby after all though ;)
<PaulePanter>
jhass: Yes, just wanted to mention it.
senayar has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
<kareeoleez>
jhass: why not ruby ? I know C or shell could be much faster
<jhass>
that's why really
<kareeoleez>
I want to create an environment for it
<jhass>
well doubt shell will be any faster
<kareeoleez>
I am saying it again, it's for fun
<kareeoleez>
so I'll play with benchmarking
ferr has quit [Ping timeout: 246 seconds]
<kareeoleez>
to get the most out of methods
<kareeoleez>
and learn ruby better
<kareeoleez>
there are many challenges here
<norc>
kareeoleez: If you want to improve this would be a great time to learn about: "Pick the right tools for the job"
lxsameer has quit [Ping timeout: 252 seconds]
<kareeoleez>
heh
jaguarmagenta has joined #ruby
<kareeoleez>
the job is not the focus
<kareeoleez>
use ruby for the job the best I can it is
freija_ has joined #ruby
Morkel has quit [Quit: Morkel]
kripx has joined #ruby
<norc>
kareeoleez: Sure you can use a shovel to put nails into a wall, but neither will that make you good at shovelling nor at nailing.
<norc>
But hey, who am I to argue if you wan to do this. :)
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kareeoleez>
exactly
<kareeoleez>
heh
<kareeoleez>
no offence but I want to do this
<kareeoleez>
maybe I'll use shell or .c and use ruby to extract statistics
<kareeoleez>
I'll see how it goes
<kareeoleez>
:)
jaguarmagenta has quit [Ping timeout: 260 seconds]
<norc>
kareeoleez: You could also write the underlying generation library in C and provide interfaces for Ruby to call (yes you can call C code from Ruby).
<kareeoleez>
I know
<kareeoleez>
should FFI or extconf help ?
lxsameer has joined #ruby
<kareeoleez>
or are they just for LibC and ports to it ?
mdw has joined #ruby
<norc>
kareeoleez: FFI is simple but effective and elegant.
<kareeoleez>
sounds good
johnbat26 has joined #ruby
weckl has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
curses has joined #ruby
Trieste has quit [Ping timeout: 260 seconds]
<norc>
kareeoleez: Note that you do not have to use the ffi gem, you could just use the builtin Fiddle.
<kareeoleez>
hmm
<kareeoleez>
never heard of it
Trieste has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta__ has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
curses has quit [Ping timeout: 260 seconds]
freija_ has quit [Quit: freija_]
cgfbee has joined #ruby
ocbtec has joined #ruby
last_staff has quit [Quit: last_staff]
ta__ has quit [Read error: Connection reset by peer]
<ruby[bot]>
Just ask your question, if anyone has or can, they will respond.
duoi has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
mozzarel1 has joined #ruby
rapha has joined #ruby
JakFrist has joined #ruby
duoi has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
nando293921 has quit [Ping timeout: 276 seconds]
startupality has quit [Quit: startupality]
blackmesa has quit [Ping timeout: 250 seconds]
tvw has quit []
crystal77 has joined #ruby
insanedreamer has quit [Ping timeout: 250 seconds]
mozzarella has quit [Ping timeout: 276 seconds]
ferr has quit [Quit: WeeChat 1.5]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
gtsai has joined #ruby
blackmesa has joined #ruby
jwren has joined #ruby
Caelum has quit [Ping timeout: 260 seconds]
noService has joined #ruby
troulouliou_div2 has joined #ruby
nareiber has joined #ruby
<TomyWork>
is there any pretties way to do things like these, save messing with "properties" beforehand? facts.merge!(properties['directories'][directory]['facter']) if properties['directories'] and properties['directories'][directory] and properties['directories'][directory]['facter']
DrCode has quit [Read error: Connection reset by peer]
kareeoleez has quit [Remote host closed the connection]
norc has quit [Ping timeout: 250 seconds]
horaceheaven has left #ruby [#ruby]
iamvery has joined #ruby
mweshi has quit [Read error: Connection reset by peer]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
existensil has quit [Quit: WeeChat 0.4.2]
malconis has joined #ruby
nareiber has quit [Ping timeout: 250 seconds]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
cpruitt has joined #ruby
ChiefAlexander has joined #ruby
f4cl3y has joined #ruby
weemsledeux has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
davedev24 has joined #ruby
SilverKey has joined #ruby
JesseH has joined #ruby
platzhirsch has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
rippa has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skolman_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
beauby has quit [Ping timeout: 244 seconds]
Zamyatin has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
p0p0pr37_ has joined #ruby
duoi has quit [Ping timeout: 260 seconds]
SilverKey has quit [Read error: Connection reset by peer]
JasonC2 has joined #ruby
JasonC2 has left #ruby [#ruby]
kobain has joined #ruby
Rixius has quit [Ping timeout: 276 seconds]
p0p0pr37 has quit [Ping timeout: 240 seconds]
duoi has joined #ruby
p0p0pr37_ is now known as p0p0pr37
skolman_ has quit [Ping timeout: 276 seconds]
agent_white has joined #ruby
umdstu has joined #ruby
harry111 has quit [Quit: Leaving]
moeabdol has quit [Ping timeout: 276 seconds]
<umdstu>
Despite cURL working, and browser access working, RestClient can’t seem to establish an SSL connection to a host. ‘alert certificate unknown’ error. Using the same cert and ca with curl is fine. what could be wrong?
JasonC1 has quit [Ping timeout: 240 seconds]
<agent_white>
Mornin'
nettoweb has quit [Ping timeout: 246 seconds]
mic_e has joined #ruby
aganov has quit [Remote host closed the connection]
Rixius has joined #ruby
Caelum has joined #ruby
f4cl3y has quit [Ping timeout: 276 seconds]
aries_liuxueyang has quit [Remote host closed the connection]
mic_e has quit [Ping timeout: 260 seconds]
purrkode has joined #ruby
existensil has joined #ruby
aries_liuxueyang has joined #ruby
JakFrist has joined #ruby
DrCode has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ferr has joined #ruby
SilverKey has joined #ruby
scottschecter_ is now known as scottschecter
zenguy_pc has quit [Ping timeout: 276 seconds]
TomyWork has quit [Ping timeout: 244 seconds]
anisha has quit [Quit: Leaving]
SilverKey has quit [Max SendQ exceeded]
SilverKey has joined #ruby
rodfersou is now known as rodfersou|lunch
SilverKey has quit [Max SendQ exceeded]
zenguy_pc has joined #ruby
SilverKey has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
SilverKey has quit [Client Quit]
Rixius has quit [Ping timeout: 246 seconds]
ixti has quit [Quit: WeeChat 1.5]
drewo has joined #ruby
ixti has joined #ruby
jancel has quit [Remote host closed the connection]
<umdstu>
morning
perlgod has joined #ruby
Rixius has joined #ruby
antgel has joined #ruby
<apeiros>
jhass: I'm curious as to why people don't ask their question after being told to just do that…
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<jhass>
yeah
<jhass>
I'll never get it either
Caelum has quit [Ping timeout: 260 seconds]
<apeiros>
maybe "oh great, so other people know a lot about that. that's all I wanted to know." :D
bijan_ has joined #ruby
grs has quit [Ping timeout: 260 seconds]
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
<shevy>
shell(#<Th:0x00000000d72198>): warn: override definition of Shell#mkdir.
<bijan_>
how am I supposed to know that?
<Papierkorb>
bijan_: the files are all called (or begin with) "shell", the URL suggests so too, and from the libraries name "Shell" you can at least guess that it's most likely "shell"
<shevy>
with odd exceptions like require 'English' :D
<bijan_>
is it because main file is called shell.rb?
<apeiros>
bijan_: i.e. ruby convention is the constant lower cased and :: namespace separators replaced with / path separators
<umdstu>
apeiros: who did that?
<apeiros>
bijan_: yes. require is about files.
<apeiros>
the argument you pass to require is the file it should load.
<bijan_>
English.rb
<bijan_>
ahhh
<shevy>
bijan_ yeah file name usually. so you should also find an English.rb file. Perhaps one day ruby will have a better way to load add ons, require() itself is very simple
jhack has joined #ruby
<apeiros>
the path is either relative to the lib dir of any installed gem, or relative to any path in $LOAD_PATH. the filename-extension is optional for the known ones (.rb, .so, .bundle, .dylib, .dll iirc)
skade has quit [Quit: Computer has gone to sleep.]
<bijan_>
okay but I must say that this is confusing for people new to ruby that are trying to look something up
<bijan_>
:D
<apeiros>
I agree
nareiber has joined #ruby
<apeiros>
even if it follows the convention, it should mention the necessary require in the toplevel constant.
<shevy>
bijan_ yeah. I think that all stdlib examples should show the require statement too... ruby core should move to a generic template to enforce consistency
<Papierkorb>
bijan_: not too much imo, it's knowing the conventions. once you know those, it's usually somewhat obvious (There are some exceptions. Meh.)
<shevy>
optparse!
<apeiros>
but if nothing is mentioned, try the ruby convention for non-rails stuff, and the rails convention for rails stuff (and then the rails convention anyway). and if neither works, check the source.
<bijan_>
it is also a bit weird that the docs are on a different domain
<shevy>
bijan_ perhaps RubyMine. I have no real idea though, not using an IDE
<apeiros>
jhass: nice
Vingador has joined #ruby
gregf has quit [Quit: WeeChat 1.5]
curses has quit [Ping timeout: 276 seconds]
<umdstu>
Despite cURL working, and browser access working, RestClient can’t seem to establish an SSL connection to a host. ‘alert certificate unknown’ error. Using the same cert and ca with curl is fine. what could be wrong?
aries_liuxueyang has quit [Read error: Connection reset by peer]
sleepunit has joined #ruby
<jhass>
you using rest_client? :P
grs has joined #ruby
gregf has joined #ruby
maucar has quit [Quit: Leaving]
<umdstu>
jhass: rest-client
<jhass>
whatever
maucar has joined #ruby
<umdstu>
hah
<umdstu>
i GUESS it could switch to something newer
idefine_ has quit [Remote host closed the connection]
bijan_ has quit [Remote host closed the connection]
elifoster has joined #ruby
<shevy>
ruby is like zen
<shevy>
you must not read documentation - you must attain a state of knowing
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
marr has quit [Ping timeout: 276 seconds]
idefine has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
Caelum has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
swills has joined #ruby
startupality has joined #ruby
wldcordeiro has quit [Ping timeout: 240 seconds]
duoi has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
norc has joined #ruby
jancel has joined #ruby
bluOxigen has joined #ruby
CJKinni has quit [Remote host closed the connection]
CJKinni has joined #ruby
nettoweb has joined #ruby
zast has joined #ruby
nando294021 has joined #ruby
skolman_ has joined #ruby
zast has quit [Remote host closed the connection]
wor has joined #ruby
terlar has quit [Ping timeout: 260 seconds]
<wor>
Hi guys, I'm on ubuntu and I installed ruby 2.3.0 using ruby-install, but ruby --version returns 1.9.3, how do I switch my computer to use the 2.3.0 version? which is in the .rubies folder
symm- has quit [Ping timeout: 276 seconds]
JakFrist has joined #ruby
<umdstu>
what does `which ruby` say
<umdstu>
and did you perhaps open a new terminal window?
LastWhisper____ has joined #ruby
LastWhisper____ has quit [Read error: Connection reset by peer]
zhunting is now known as zhunting-lunch
<wor>
/usr/bin/ruby
<wor>
It's in the same terminal window. I don't think ruby-install added 2.3.0 to the path but I'm not sure how to go about 'properly' adding the new ruby into the path
giz|work has quit [Ping timeout: 260 seconds]
JakFrist has quit [Client Quit]
kareeoleez has joined #ruby
LastWhisper____ has joined #ruby
<umdstu>
open another terminal window and run the same version command
soc42 has joined #ruby
<wor>
I see there's a 'ruby' in ~/.rubies/ruby-2.3.1/bin/ but I'm not sure copying that to /usr/bin will work
<wor>
it's ruby 1.9.3
platzhirsch has joined #ruby
synthroid has quit [Remote host closed the connection]
Ballo has joined #ruby
<Ballo>
Hey, I have a question. How come I cant j = {mon-notice:t} (t is a hash) but I can j = {:mon-notice => t}
Xiti has quit [Quit: Xiti]
CJKinni has quit [Read error: Connection reset by peer]
<j416>
Ballo: because you're using ruby < 1.9
purrkode has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ballo>
no I'm not
<j416>
Ballo: then because there is a dash in the name
CJKinni has joined #ruby
<umdstu>
wor:
<umdstu>
wor: add that path to your PATH in your .bashrc
<Ballo>
so :dash-in-name is halal but dash-in-name: is haram?
<umdstu>
Ballo: yea I htink you need _ there
<j416>
Ballo: never use dashes in names
psf has joined #ruby
<j416>
Ballo: it just creates trouble
<Ballo>
it's a key in a hash for a json I have no choice
whathappens has joined #ruby
<Ballo>
so you can stop wagging your finger
<wor>
umdstu:I could but I think a better way is to replace the /usr/bin/ruby with ~/.rubies/ruby-2.3.1/bin/ruby but I'm not sure how that works (if i copy it over how will it access the other libs)
<j416>
Ballo: try something like { 'mon-notice': t }
<umdstu>
Ballo: then wrap in quotes
<Ballo>
I made a rule where I'm not going to use mutable keys
<umdstu>
wor: thats definitely not better
aegis3121 has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
<umdstu>
export PATH:~/.rubies/ruby-2.3.1/bin
<Ballo>
mutable keys are going away in the next ruby anyway so no, I'm not going to use quotes
qasaur has joined #ruby
<umdstu>
then `which ruby`
<Lloyd>
do you only need one version of ruby on the machine?
tacit7 has joined #ruby
<umdstu>
it’s not a good idea to mangle your system ruby that way
<wor>
Lloyd:Yea, I only need 1 that is >= version 2.0
danostrowski has joined #ruby
Snowy has quit [Remote host closed the connection]
<Lloyd>
what version of ubuntu?
Couch has quit [Ping timeout: 260 seconds]
<wor>
14.04
senayar has quit []
<wor>
apt installing it got me the 1.9.3 version
nankyokusei has joined #ruby
<j416>
Ballo: did it work?
Xiti has joined #ruby
<Lloyd>
yeah you need a ppa for the newer versions
<meatchicken>
Object.where.overlap <- how can I be sure that overlap is called with rspec?
<wor>
after adding it and sudo apt-get update and install ruby gives me version 1.9.3 though hmm
<meatchicken>
.where returns a very specific object - my first thought would be to expect(obj.where).to receive(:method)
<Lloyd>
apt-get install ruby2.2
mtkd has quit [Ping timeout: 240 seconds]
<wor>
damn I'm an idiot
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wor>
Lloyd:thank you!
platzhirsch has quit [Quit: WeeChat 1.4]
<Lloyd>
no worries
<shevy>
apt-get is not the simplest piece of software on earth!
<Lloyd>
try to not snowflake servers ;P
<shevy>
the creation of rvm, chruby, rbenv etc... happened for a reason :D
ChiefAlexander has quit [Remote host closed the connection]
chrisja has joined #ruby
<Lloyd>
the creation of rvm, chruby and rbenv were for development reasons
<jhass>
meatchicken: best just stub where, relation = double; allow(obj).to receive(:where).and_return(double); expect(relation).to receive(:overlap)
<jhass>
meatchicken: though make sure you're still testing behavior here, not implementation
Devalo has joined #ruby
<jhass>
eh, and_return(relation) of course
<meatchicken>
jhass, overlap is not implemented in userland - it is in 3rd party
<Lloyd>
they really shouldn’t be used in production, they use so much magic, servers should only really use one ruby version at a time, and if you can’t, you should omnibus, rather than hacking around in bash
<meatchicken>
I shouldn't have to test it?
<jhass>
that's right
<meatchicken>
userland is not the right word
<meatchicken>
it is in a gem*
<jhass>
"project codebase"
<meatchicken>
Mhm
<meatchicken>
That's a nice solution though, jhass. Thanks! I've never had to use doubles until now
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has joined #ruby
mtkd has joined #ruby
biox- has joined #ruby
mistermocha has quit [Remote host closed the connection]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<JackMc>
eein: That's more of an Ubuntu/debian/your distro question, no?
<jhass>
how did you install it?
<JackMc>
jhass: Currently my code does that and tries to satisfy some of the requirements by generating random passwords and then checking they fit the requirements, but I feel like that is inefficient somehow
<JackMc>
The specific requirements are the passwords must be at least 8 chars, and contain at least one uppercase letter, one lowercase letter, and one number
soc42 has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 260 seconds]
<eein>
JackMc, I guess though I imagine many ruby people run ubuntu also is it not ruby behavior that it is trying to install pending ruby install
purrkode has joined #ruby
arthurl has joined #ruby
dimon_ has joined #ruby
<arthurl>
hi guys- i'm having an issue where a bundle install command installs gems to a different location than i would like it to- how do i tell bundler where to install gems?
<dimon_>
hey. for this function my_hash = Digest::SHA512.hexdigest("secret_string123"), does ruby use SIMD Optimizations?
<jhass>
JackMc: I'd pivot the the requirements into an array, .concat the result of a .sample(rand(MIN_LENGTH-3..MAX_LENGTH-3)) over the total valid character set and shuffle.join the result
<eein>
its like it is running dpkg and trying to reconfigure
f4cl3y has quit [Read error: Connection reset by peer]
<wor>
when I bundle install on this project i get `An error occurred while installing cmdparse (3.0.1), and Bundler cannot continue. Make sure that `gem install cmdparse -v '3.0.1'` succeeds before bundling. but after sudo gem installing cmdparse and rerunning bundle install I still get the same error
<wor>
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
smathy has joined #ruby
<jhass>
eein: if all you did is apt-get install ruby, I agree that's more of a #ubuntu question. Provide them with your full error output
<eein>
jhass, no I just want to uninstall it but it just keeps running dpkg on a package I removed
<jhass>
wor: can you update that with the outputs for: command -v bundle; bundle exec ruby -v; head -n1 $(which bundle); ?
ChiefAlexander has quit [Remote host closed the connection]
ixti has quit [Quit: WeeChat 1.5]
ramfjord has joined #ruby
`tim` has joined #ruby
qasaur has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
<jhass>
wor: oh and command -v ruby while we're at it please :)
flashpoint9 has joined #ruby
<wor>
updated, let me run that one too
<wor>
it's /usr/bin/ruby
<jhass>
okay
qasaur has joined #ruby
<jhass>
how did you install Ruby?
<jhass>
your bundler is using an old Ruby version, you need to reinstall it for your current ruby version
<wor>
initially sudo apt-get install ruby, which gave me 1.9 something, then I did ruby-install 2.3, then I added the new ppa and did apt-get install ruby2.3 and now it's on my patah
flughafen_ has quit [Ping timeout: 244 seconds]
<jhass>
mkay
shinnya has joined #ruby
<jhass>
at that point sudo gem install bundler can't do any more harm to your system I guess :P
<wor>
yep I just ran that command :P
<wor>
the output is coming back with more green lines! woohoo
davedev24 has quit [Remote host closed the connection]
<wor>
thanks man, saved my life lol
<jhass>
wor: btw the ruby-install/ruby-build way usually goes together with chruby
<jhass>
which would set all the environment variables so the one from ~/.rubies/ would be used
qasaur has quit [Read error: Connection reset by peer]
eljimador has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
Vinkkamph has joined #ruby
safe has joined #ruby
zast has joined #ruby
Vinkkamph has quit [Quit: Leaving]
qasaur has joined #ruby
eljimmy has quit [Ping timeout: 252 seconds]
chipotle has quit [Quit: cheerio]
hightower3 has joined #ruby
jds has joined #ruby
chipotle has joined #ruby
qasaur has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 276 seconds]
tildes_ has joined #ruby
nerium has joined #ruby
startupality has quit [Quit: startupality]
curses has joined #ruby
<nerium>
Is there a gem for verifying ssl certificates?
mikecmpbll has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
<jhass>
nerium: just use OpenSSL stdlib?
<nerium>
jhass: Not sure how to use it. Did some experimenting with ”openssl s_client” but can’t get it to work properly
hxegon_afk is now known as hxegon
mweshi has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
<jhass>
so you want to connect to a site and see if it has a valid certificate?
<machinewar>
is it possible to connet to sftp w/ ruby's FTP module and not using sftp gem
<machinewar>
maybe with net::SSH?
<jhass>
machinewar: SFTP, not to be confused with FTPS and FTP are entirely distinct protocols
<jhass>
Net::SSH is not a stdlib either
dimon_ has joined #ruby
<machinewar>
jhass: ah alright that's where I was confused thanks, any relatively simple way to do it with standard library
shiver_ is now known as shiver
<jhass>
nope
shiver has quit [Quit: leaving]
shiver has joined #ruby
Billias has quit [Read error: Connection reset by peer]
<machinewar>
jhass: kk thanks
<jhass>
well besides shelling out to scp, but I hope that's not an option :P
<machinewar>
jhass: lol not exactly
<dimon_>
I need somehow speed up calculating sha512 in Ruby. Will it worth it to call a C++ library from Ruby calculating it? Or more or less the same as if I'm doing it in Ruby?
xsdg_ is now known as xsdg
<jhass>
dimon_: both OpenSSL::Digest::SHA512 and Digest::SHA512 are already implemented in C
<adaedra>
you may be coming up against your computer's limits here.
<dimon_>
jhass: yes, but if I call them in C, they'll be calculated faster, won't they?
Billias has joined #ruby
<jhass>
?!
<jhass>
I guess I don't follow your plan then
skade has quit [Quit: Computer has gone to sleep.]
zast has quit [Quit: Leaving.]
eeuymh has quit [Read error: Connection reset by peer]
<smathy>
I don't understand any of this, SHA512 is designed to be expensive, both in time and CPU resources.
skade has joined #ruby
gtsai has quit [Remote host closed the connection]
gtsai has joined #ruby
<adaedra>
And implementation is in C already.
marr has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
<dimon_>
adaedra: but calling it from Ruby adds overhead.
<adaedra>
Not during calculation.
<adaedra>
So it's not really relevant.
<smathy>
The implementation specifics are irrelevant, the algorithm is designed to be expensive.
<smathy>
(it would be pointless to make one implementation slow :)
hiddenloop has quit [Ping timeout: 260 seconds]
hiddenloop has joined #ruby
graft is now known as Guest97856
<smathy>
dimon_, the point here is that the calling overhead is trivial compared to the intentional expense of the algorithm itself.
<dimon_>
ok
chouhoulis has quit [Remote host closed the connection]
danostrowski has joined #ruby
Coldblackice has joined #ruby
cdg has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
qasaur has quit [Read error: Connection reset by peer]
xue_ has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
ramfjord_ has joined #ruby
Vegitto has joined #ruby
skade has quit [Client Quit]
ramfjord has quit [Ping timeout: 260 seconds]
<Vegitto>
Hi! I want to import a package so that I could use it in irb and Ruby scripts. I've successfully done sudo gem install <package>, but if I attempt to use it in irb, it says 'undefined method'. How do I import it?
<umdstu>
require ‘package'
<Vegitto>
Hmm, that returns: NameError: undefined local variable or method
<eam>
running the GC will help you with multiple iterations - but if one single iteration is using too much memory that's something you'll need to work with
kareeoleez has quit [Disconnected by services]
kareeoleez_ is now known as kareeoleez
<kraken>
does a splat argument create an array when you feed in multiple arguments to it?
programmerq has quit [Remote host closed the connection]
tomphp has joined #ruby
programmerq has joined #ruby
tercenya has joined #ruby
<kareeoleez>
eam: I don't get what really happens in order to fix it
ramfjord_ has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
<jhass>
if you want memory usage down, give up sorting and pass a block to repeated_combination
<smathy>
You're iterating over ~ 23 million arrays, joining them and then sorting them, this is going to be CPU and memory intensive, no way around it.
<kareeoleez>
jhass: do you think sorting is slowing it down ?
mweshi has joined #ruby
<jhass>
no, but impossible without allocating an array
nanoz has joined #ruby
nanoz has joined #ruby
<kareeoleez>
smathy: so the entire code is wrong
<kareeoleez>
I mean maybe just my solution is not right
tvw has quit [Ping timeout: 260 seconds]
<jhass>
ah yeah and don't #product
<smathy>
The sort doesn't add much time or memory.
<jhass>
if you can avoid it
<jhass>
though that should still be okayish
<smathy>
It's over 4GB and 60 seconds on my machine with no sort and not using map (just pushing the join onto an array).
chouhoulis has joined #ruby
<smathy>
The product doesn't cost much at all, just generates lots of elements ;)
_ht has quit [Remote host closed the connection]
_ht has joined #ruby
flughafen_ has quit [Ping timeout: 276 seconds]
qasaur has quit [Read error: Connection reset by peer]
noobsu has joined #ruby
Vegitto has quit [Ping timeout: 250 seconds]
<kareeoleez>
so I need to decrease the amount of array elements
<kareeoleez>
I don't get why do they have to be ~ 23 million arrays
<smathy>
...you created that many.
<kareeoleez>
because in every iteration only a small portion of it is being used
<kareeoleez>
the GC shouldn't free the memory ?
drewo has joined #ruby
Vingador_ has quit [Ping timeout: 260 seconds]
<jhass>
you don't get that the blockless repeated_combination call pushes all combinations into an array?
<kareeoleez>
When invoked with a block, yields all repeated combinations of length n of elements from the array and then returns the array itself.
<kareeoleez>
but for the X iteration only Y elements are used
purrkode has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kareeoleez>
do you believe it pushes them all in one array ?
JakFrist has joined #ruby
<smathy>
kareeoleez, how else do you think the .sort can work?
<kareeoleez>
right
ramfjord has joined #ruby
ma489 has joined #ruby
<smathy>
...but actually, the resulting array isn't the issue here, it's the internal array that repeated_combination itself is generating. I mean it returns an iterator, but you must realize that the values are held somewhere.
stunder has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
ma489 has quit [Client Quit]
<jhass>
it's not computing them lazily? :o
qasaur has joined #ruby
<smathy>
Yeah, sorry, forget me - you're right jhass.
machinewar has quit []
cpup has joined #ruby
<smathy>
...it IS the resulting array's fault.
<apeiros>
it still has to create an array on each iteration for the .map
yaewa has quit [Quit: Leaving...]
<jhass>
yes, but GC can free it
<apeiros>
those should be short-lived
moei has joined #ruby
<jhass>
yup, and we're talking about memory here, not so much speed
eljimbo has quit [Quit: This computer has gone to sleep]
<smathy>
Yep, as I mentioned above, switching to a block that pushes the `.join` onto an array doesn't alter the memory or CPU usage much.
<kareeoleez>
so the entire implementation is wrong
mistermocha has quit [Remote host closed the connection]
<kareeoleez>
maybe I should move to a block instead of using predefined methods like product and repeated combination
<smathy>
Might not be, this might be the best way there is to do this.
<smathy>
kareeoleez, none of that will make any difference.
crystal77 has joined #ruby
CoderPuppy has quit [Ping timeout: 244 seconds]
aldodelgado has joined #ruby
RegulationD has joined #ruby
<jhass>
allocation free IO for the win :P
<smathy>
The slowest and most memory hungry part of this is the join
eljimmy has joined #ruby
<jhass>
array.join("", STDOUT)
nankyokusei has joined #ruby
polysics has joined #ruby
CoderPuppy has joined #ruby
maxdoubt has joined #ruby
<kareeoleez>
sure there will be a way
<kareeoleez>
isn't it what algorithms are for ?
<smathy>
kareeoleez, yep.
qasaur has quit [Read error: Connection reset by peer]
<smathy>
So yeah, if you can avoid making the array that you then join into a string then you'll be better off.
djbkd has quit [Remote host closed the connection]
noobsu has quit [Read error: Connection reset by peer]
idefine_ has joined #ruby
bronson has joined #ruby
<kareeoleez>
smathy: yeah strings (I believe) should be fine
<kareeoleez>
thanks for this
mistermocha has joined #ruby
noobsu has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
idefine_ has quit [Remote host closed the connection]
Guest42904 is now known as _kraken
idefine_ has joined #ruby
<_kraken>
Is it usual to get this long ass error when you use 'rake' and have a syntax error? http://i.imgur.com/qyAVR4m.png
idefine has quit [Read error: Connection reset by peer]
<tubbo>
so i'm trying to do a silly thing. i want to see all constants defined in a module.
<tubbo>
but not just directly in the module...all the way down
Akuma has joined #ruby
<tubbo>
so if i have a Foo::Bar::Baz class, and I do Foo.constants, only Bar shows up, not 'Bar::Baz'
unreal has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duoi has quit [Ping timeout: 250 seconds]
<apeiros>
tubbo: because Bar::Baz is not a constant
<smathy>
_kraken, it's a stacktrace, yes - normal.
<tubbo>
this is actually for a further silly thing...even sillier than the first. the idea here is to iterate through each instance method defined in a module and build a new .rb file with those definitions.
<_kraken>
<smathy> What is a stackface?
<tubbo>
apeiros: right, that makes sense
bronson has quit [Ping timeout: 252 seconds]
<tubbo>
i tried to iterate over every constant that also had .constants defined, but i got a really weird list of stuff that wasn't in my module at all
<smathy>
Bar::Baz is as much a constant as Bar is though, no?
<apeiros>
no
<apeiros>
Bar is a constant
<apeiros>
Baz is a constant within Bar
<apeiros>
and Bar::Baz is accessing the constant Baz within Bar
<smathy>
Oh, ok. I see the distinction.
duoi has joined #ruby
<apeiros>
of course, colloquially we'll refer to it as "the constant Bar::Baz"
<tubbo>
oh wait i got it
<smathy>
...what if you defined Bar::Baz like that, like: Bar::Baz = 5 ?
<apeiros>
you'll have to define Bar first
<apeiros>
and it'll have to be a Module or subclass thereof
<apeiros>
(and let me remind the audience at this point that Class is a subclass of Module)
Pumukel has quit [Ping timeout: 276 seconds]
mostlybadfly has joined #ruby
mrfoto has joined #ruby
Avinty-L has joined #ruby
skylerto has joined #ruby
qasaur has joined #ruby
tinnvec has left #ruby ["I'm going to my own channel, with blackjack and hookers!"]
Avinty-L has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
7GHAA4DG2 has joined #ruby
JonasOSDever has quit [Quit: *Running away*]
hutch34 has quit [Quit: WeeChat 1.5]
johnmilton has joined #ruby
hutch34 has joined #ruby
haxrbyte has quit [Quit: Leaving...]
nanoz has quit [Read error: Connection reset by peer]
whathappens has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
whathappens has joined #ruby
duckpuppy has joined #ruby
7GHAA4DG2 has quit [Read error: Connection reset by peer]
whathappens has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
flughafen_ has quit [Ping timeout: 250 seconds]
Xiti has quit [Quit: Xiti]
JonasOSDever has joined #ruby
qasaur has quit [Read error: Connection reset by peer]
aeontech has joined #ruby
johnmilton has quit [Ping timeout: 276 seconds]
pawnbox_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
eL_bamba has joined #ruby
aeon_ has quit [Ping timeout: 252 seconds]
z4ppy_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
nankyokusei has joined #ruby
maxdoubt has quit [Quit: maxdoubt]
cschneid_ has joined #ruby
codecop has quit [Remote host closed the connection]
<cschneid_>
I'm exploring some ruby C apis, and would like to be able to drop into gdb. Is there a way to load up a gem in irb, then break into gdb at a certain breakpoint? I'm not super familiar w/ gdb-land unfortunately
<cschneid_>
or would I write a test shim .rb file, then launch ruby with gdb, and breakpoint the spot, then 'run' the app
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bougyman>
there's no way to access a (local) variable that I have assigned to another variable, is there?
<bougyman>
NoMethodError: undefined method `myvar' for #<Binding:0x00000002a3be00>
<bougyman>
not like that, anyway, tried it.
<bougyman>
oh, binding.local_variable_get
<bougyman>
thanks
<adaedra>
yw
Xiti has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
qasaur has joined #ruby
jancel has joined #ruby
noobsu_ has joined #ruby
eljimmy has joined #ruby
mistermocha has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
drewo has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
klausmeyer has joined #ruby
Akuma has quit [Quit: So long sukkas!]
johnmilton has joined #ruby
cdg has joined #ruby
Mr0 has joined #ruby
Mr0rris0 has quit [Ping timeout: 260 seconds]
klausmeyer has quit [Remote host closed the connection]
Mr0 is now known as Mr0rris0
neanderslob_ has joined #ruby
neanderslob has quit [Disconnected by services]
ule has quit [Ping timeout: 260 seconds]
jancel has quit [Ping timeout: 240 seconds]
ule has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
xall has joined #ruby
futilegames has joined #ruby
gizless has joined #ruby
xall has quit [Client Quit]
xall has joined #ruby
gizmore|2 has joined #ruby
danostrowski has joined #ruby
gizmore|3 has joined #ruby
futilegames has quit [Client Quit]
edwinvdgraaf has quit [Remote host closed the connection]
gizmore|4 has joined #ruby
cpup has joined #ruby
edwinvdgraaf has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
mozzarel1 is now known as mozzarella
futilegames has joined #ruby
gizmore has joined #ruby
pawnbox has joined #ruby
jancel has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gizless has quit [Ping timeout: 240 seconds]
noobsu_ has quit [Read error: Connection reset by peer]
gizmore|2 has quit [Ping timeout: 246 seconds]
CoderPuppy has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
gizmore|3 has quit [Ping timeout: 240 seconds]
troulouliou_dev has joined #ruby
flashpoint9 has joined #ruby
gizmore|4 has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby
tekacs has joined #ruby
[spoiler] has joined #ruby
neanderslob_ has quit [Ping timeout: 240 seconds]
Lumio has quit [Quit: ...]
<shevy>
smathy haha that was what I was doing just now... then I realized, I was putting it above "def initialize" which I found odd
<shevy>
jhass I see
noobsu has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<jenrzzz>
shevy: if there are only a couple class methods, I don't worry about it too much. if there are more I put them in a class << self block at the top of the class definition
neanderslob has joined #ruby
nankyokusei has quit [Remote host closed the connection]
<smathy>
^
Es0teric has joined #ruby
whathappens has joined #ruby
whathapp_ has joined #ruby
Gasher has joined #ruby
edwinvdg_ has joined #ruby
hahuang65 has joined #ruby
<skylerto>
quick question, is in necessary to have bundler in a gem's gemspec?
<adaedra>
no
<adaedra>
bundler is for Gemfile
cpruitt has quit [Quit: cpruitt]
<skylerto>
ooou
<skylerto>
that makes sense.
<skylerto>
Thanks so much. :D
JonasOSDever has quit [Quit: *Running away*]
<adaedra>
(doesn't mean you should put bundler in your Gemfile either)
mrfoto has quit []
centrx has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CoderPuppy has joined #ruby
mtkd has joined #ruby
JonasOSDever has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
<skylerto>
but as long as they have bundler on their machine they can bundle install in the gem and ti will fetch the required gems and put them in .bundle?
<skylerto>
by on their machine i mean system wide.
noobsu has quit [Read error: Connection reset by peer]
whathappens has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 246 seconds]
flopsec has quit [Quit: fnordserver.eu BNC]
alxgsv has quit [Quit: fnordserver.eu BNC]
drzel has quit [Quit: fnordserver.eu BNC]
ctrlrsf has quit [Write error: Connection reset by peer]
mdw has quit [Quit: Sleeping Zzzzz]
<adaedra>
If there's a Gemfile, yes
eljimador has quit [Read error: Connection reset by peer]
Snowy has quit [Remote host closed the connection]
blackgoat has joined #ruby
ur5us has joined #ruby
startupality has joined #ruby
mweshi has quit [Remote host closed the connection]
mweshi has joined #ruby
duoi has quit [Ping timeout: 276 seconds]
frem_ has joined #ruby
edwinvdg_ has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
duoi has joined #ruby
synthroid has quit []
aeontech has quit [Quit: aeontech]
edwinvdgraaf has joined #ruby
maucar has quit [Quit: Leaving]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danostrowski has joined #ruby
aeontech has joined #ruby
startupality has quit [Ping timeout: 260 seconds]
tax has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
Tesla has joined #ruby
<Tesla>
Hello!
<Tesla>
Anyone active here?
<skylerto>
yup
<apeiros>
no
<adaedra>
?anyone
<ruby[bot]>
Just ask your question, if anyone has or can, they will respond.
s00pcan_ has quit [Ping timeout: 240 seconds]
<Tesla>
I'm kind of new to ruby but I was wondering if I can start practicing by creating a simple window... However, I am curious to know if there is a way to do so from scratch, like you could do with just code in a language like Java using integrated libraries like JFrame. Any ideas?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<adaedra>
To be honest, GUI is not one of ruby's strengths. But there are some libraries to do that, yes, like shoes
<skylerto>
shoes is nice. :D
<zacts>
Tesla: I <3 AC over DC
<Tesla>
I also regret to say that I am not very familiar with using libraries in programming, in Java I would just use an IDE like Eclipse and link any libraries I wanted to add... Are there any such IDEs for Ruby?
<zacts>
just fwiw
<bougyman>
Tesla: I hear Rubymine has all those dials and bells and whistles.
<bougyman>
i've never tried it myself.
<bougyman>
it's for-pay, iirc.
Ishido has quit [Remote host closed the connection]
<adaedra>
?ide
<ruby[bot]>
an IDE is not necessary to develop with ruby. A decent text editor is sufficient. If you truly want an IDE, take a look at RubyMine by JetBrains (https://www.jetbrains.com/ruby/).
noobsu_ has joined #ruby
<adaedra>
Ruby libraries are named "gems" and are really easy to use.
<Tesla>
I can pirate anything you have to pay for but is there any simple, very open and publicly used IDE for ruby that has the ability to do so? Like Eclipse for Java?
<adaedra>
Also, Ruby is different from Java in the way of working, as you have no "compilation" step
<zacts>
I wonder if Atom supports Ruby well
<adaedra>
And we don't pirate in this channel, thank you.
<bougyman>
Tesla: you just lost me with the pirate comment.
<Tesla>
adaedra what so it's directly interpreted?
<adaedra>
it is.
<zacts>
Tesla: Atom may or may not have what you are looking for, or Eclipse
<zacts>
but Ruby doesn't need an IDE like Java, afaik.
<adaedra>
An editor and a terminal is really all you need to get started.
noobsu has quit [Read error: Connection reset by peer]
<zacts>
I'm doing fine with vim
<adaedra>
^
<Tesla>
I know Eclipse usually has plugins and extensions for practically every language but I wanted to see if there's a Ruby IDE
<zacts>
I use a terminal + tmux + vim + bash shell
<zacts>
^ this is my Ruby IDE
djbkd has quit [Remote host closed the connection]
<zacts>
(being a newbie)
<Papierkorb>
Atom editor, before it was (KDE) Kate.
<havenwood>
Tesla: There's JetBrains RubyMine but most Rubyists use a text editor.
Dimik has joined #ruby
<eL_bamba>
sublime text its another good editor
djbkd has joined #ruby
<zacts>
#ruby
flopsec has joined #ruby
<Tesla>
Could you then direct me to a tutorial or tutor me on how to setup a project folder with source code and libraries that I could errr... export?
wor has quit [Ping timeout: 250 seconds]
<Papierkorb>
"export"?
jancel has quit [Remote host closed the connection]
<Tesla>
I've moved from Java because of how in-complete and annoying it is :S
yqt has joined #ruby
workmad3 has joined #ruby
<Papierkorb>
in-complete? (Annoying, yes)
djbkd has quit [Ping timeout: 252 seconds]
<adaedra>
Well, let's not start a language war here, people.
swills has quit [Ping timeout: 240 seconds]
<Tesla>
Some of the features do not exploit the full potential behind their concepts, for saving a bit of memory, processing power and efficiency... Though freedom of expression is not worth the sacrafice
mweshi has quit [Ping timeout: 276 seconds]
<Papierkorb>
Tesla: ah
<Tesla>
adaedra it's not a war, just a discussion
<adaedra>
We've #ruby-offtopic for these discussions.
<Tesla>
Papierkrob: e.g. arrays not supporting generics because they're co-variant and too much is handled at compile-time :|
JonasOSDever has quit [Quit: *Running away*]
<Tesla>
adaedra: it's Ruby vs Java, notice the "Ruby" in the name of this discussion
<adaedra>
>.>
ramortegui has quit [Quit: Ex-Chat]
<Tesla>
._.
<Papierkorb>
Tesla: even then, you can use JRuby to interact with (existing?) Java Code/Libraries with ease. Just showcased this to my Java coworkers today, they were surprised how easy it was and how well it works
<Tesla>
Meh... java can go to hell, Ruby's the spiritual successor of Smalltalk, which offered insane potential, heil yus
<Tesla>
:D
<Papierkorb>
Both have their place. Ruby just happens to fill a large-ish "niche" for many I guess
<adaedra>
But yeah, Ruby has some nice run-time tricks.
<Tesla>
Well often times compilers are very strict and to optimize code can disallow some... "out-of-the-box" programming design patterns
<Tesla>
If that makes sense ._.
<Papierkorb>
Not really
chouhoulis has quit [Remote host closed the connection]
<Papierkorb>
If an interpret can do something, a compiler can do it too (and vice-versa)
<Tesla>
I can't pinpoint any examples from my experience but I do know that many obstacles I've encountered in programming were due to limitations imposed by compilers during compile-time
<Tesla>
especially in Java ¬_¬
chouhoulis has joined #ruby
<Papierkorb>
Then those were language limitations
cdg_ has joined #ruby
<adaedra>
Limitations are more often dependant on the language
<adaedra>
Papierninja
cdg has quit [Read error: Connection reset by peer]
<Tesla>
I know but whether a language is interpreted or compiled first is also dependent on the language, some allow both I assume but if a decision is made to use a compiler, the imposition of many limitations often follow it.
xall has quit [Ping timeout: 276 seconds]
rodfersou has quit [Quit: leaving]
<Papierkorb>
Errrr ._.;
qasaur has quit [Read error: Connection reset by peer]
<Tesla>
*sighs* Ignore me... I'm just obsessed with freedom :|
qasaur has joined #ruby
<adaedra>
'MURICA
<Tesla>
?
<Papierkorb>
ya lets not build a wall
<adaedra>
huhu
<eam>
I'm not aware of any languages which can't be either interpreted or compiled
cdg_ has quit [Client Quit]
<Tesla>
Ermm... I haven't even installed Ruby... anyone know of any video tutorial on compiling it?
stunder has joined #ruby
cdg has joined #ruby
qasaur has quit [Read error: Connection reset by peer]
<Papierkorb>
Tesla: ask your OS repo manager to install it for you
<adaedra>
ruby-lang.org, section Install, should have everything you need.
djbkd has joined #ruby
qasaur has quit [Read error: Connection reset by peer]
<Tesla>
The only confusion I have is that I never knew "sudo" is a command in Windows?
mweshi has joined #ruby
<adaedra>
It isn't.
gtsai has quit [Remote host closed the connection]
jancel has joined #ruby
<eam>
runas is, however
ChiefAlexander has joined #ruby
gtsai has joined #ruby
<Tesla>
.-.
akiTendo has quit [Ping timeout: 260 seconds]
<adaedra>
Just go with RubyInstaller and be happy, or get a Linux on a VM and save some headaches.
ChiefAlexander has quit [Client Quit]
<Tesla>
But... it's probably simple in Windows too... only... I have no idea where to find a guide :U
<adaedra>
Windows is not the best system to do Ruby on.
<Papierkorb>
Windows is not the best system. Just end the sentence there.
xall has joined #ruby
<Tesla>
I don't think I'm going to change my OS just for the sake of one hobby :T
<Tesla>
I know you can do Ruby on Windows
<Tesla>
sowww
<adaedra>
You can, but you'll run into problems with some gems sooner or later.
<adaedra>
I know I have.
<eam>
most people who know what they're doing aren't using that system, so you'll run into a shortage of people to ask for help -- which is what's happening here
qasaur has joined #ruby
<Tesla>
I want to write most of my programs from scratch so I doubt I'm going to use anything external apart from shoes...
<Papierkorb>
Tell me in 6 months if you changed your mind about "everything from scratch"
<Tesla>
I'ma dryer, it shouldn't take too long
<adaedra>
Papierkorb: everything is possible, we have someone still doing CGI here after all.
gtsai has quit [Remote host closed the connection]
<Tesla>
by dry I mean Don't Repeat Yourself :|
<adaedra>
Another rule is "Don't reinvent the wheel"
gtsai has joined #ruby
djbkd has quit [Remote host closed the connection]
bobbycvi has quit [Changing host]
bobbycvi has joined #ruby
<Tesla>
A rule which I don't follow...
djbkd has joined #ruby
<adaedra>
Too bad.
<Tesla>
Ikr
tacit7` has joined #ruby
<Tesla>
Meh... I'll just use Ruby Installer... too lazy P:
bobbycvi has quit [Quit: ...]
gtsai has quit [Remote host closed the connection]
bobbycvi has joined #ruby
zel has joined #ruby
gtsai has joined #ruby
tacit7 has quit [Read error: Connection reset by peer]
<Tesla>
What's Tcl/Tk support, the installer's saying it's for building GUIs... which sounds useful
wldcordeiro has quit [Ping timeout: 260 seconds]
zel is now known as Guest83322
duckpuppy has quit [Ping timeout: 246 seconds]
<jhass>
if you were okay with swing GUIs, Tk will be fine too I guess
tacit7`` has joined #ruby
<Tesla>
Only heard swing in Java, where I used JFrame, if that's something similar then that's great?
<jhass>
I was referring to java swing
<Tesla>
:O
<Tesla>
Done
n_blownapart has quit [Remote host closed the connection]
<Tesla>
Oh my shits... It's just like Java...
djbkd has quit [Remote host closed the connection]
tacit7` has quit [Ping timeout: 244 seconds]
<jhass>
that's what I meant
beauby has joined #ruby
<Tesla>
Ik... but it fails to sink in
mjuszczak has quit []
startupality has joined #ruby
<Tesla>
How can I hide the default console?
kareeole_ has joined #ruby
<Tesla>
Oh nevermind just changing extension to .rbw
<Tesla>
Hehe
alxgsv has joined #ruby
n_blownapart has joined #ruby
bronson has joined #ruby
hahuang65 has joined #ruby
<Tesla>
Omg... ruby is beast
kareeoleez has quit [Ping timeout: 260 seconds]
noobsu_ has quit [Read error: Connection reset by peer]
z4ppy_ is now known as zaphod
curses has quit [Remote host closed the connection]
noobsu has joined #ruby
zaphod is now known as z4phod
<Tesla>
Guys... say I have an .rbw file that requires Tk and lots of other .rb files that I write for some program... And I have all this in one folder, is there any way I can make this into something people can download and use without having to install ruby? E.g. a game
ramfjord has quit [Ping timeout: 276 seconds]
<eam>
Tesla: generally you'd distribute it with a ruby bundled together with all the gems
<eam>
most applications consist of large bundles of files
djbkd has joined #ruby
<Tesla>
eam: How would one go about doing this? I'd assume you'd need an .exe launcher, scripts in a folder and ruby interpreter and Tk too, but how would... err... I bundle this?
<Tesla>
Link to tutorial(s)?
<Tesla>
plz
<eam>
can't help you with windows, sorry. Most systems have package management built in
bronson has quit [Ping timeout: 252 seconds]
<Tesla>
Lel
<Tesla>
ok thnx anyway
djbkd has quit [Remote host closed the connection]
<Tesla>
well I have to make something first so I'll just stick to that :)
djbkd has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
Weavel has quit [Quit: Light travels faster then sound, which is why some people appear bright, until you hear them speak]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
yfeldblum has quit [Quit: Leaving...]
wilsonc91 has quit [Ping timeout: 260 seconds]
hays_ has joined #ruby
halfamind1 has quit [Quit: Leaving.]
ledestin has joined #ruby
jancel has quit [Remote host closed the connection]
qasaur has quit [Read error: Connection reset by peer]
hays has quit [Ping timeout: 276 seconds]
kareeole_ has quit [Remote host closed the connection]
<Tesla>
Is ruby friendly with functional programming?
ctrlrsf has joined #ruby
ruby-lang326 has joined #ruby
sondr3 has joined #ruby
qasaur has joined #ruby
tacit7`` has quit [Ping timeout: 244 seconds]
mic_e has joined #ruby
gtsai has quit [Ping timeout: 246 seconds]
hays_ is now known as hays
qasaur has quit [Read error: Connection reset by peer]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
postmodern has quit [Quit: Leaving]
jancel has joined #ruby
<jhass>
some argue so, but don't expect to find FP concepts directly
<jhass>
Ruby is object oriented throughout
last_staff has quit [Quit: last_staff]
qasaur has joined #ruby
Tesla has quit [Ping timeout: 250 seconds]
mic_e has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
cdg has quit [Remote host closed the connection]
qasaur has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
qasaur has joined #ruby
yfeldblu_ has joined #ruby
gregf has quit [Quit: WeeChat 1.5]
yfeldblu_ has quit [Remote host closed the connection]
gregf has joined #ruby
xall has quit [Ping timeout: 244 seconds]
dhollinger has quit [Quit: WeeChat 1.4]
leitz has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
wldcordeiro has joined #ruby
Tesla has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
Tesla has quit [Client Quit]
yfeldblum has quit [Ping timeout: 260 seconds]
ruby-lang326 has quit [Ping timeout: 250 seconds]
<shevy>
did he insta-quit!
mjuszczak has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
<ruby[bot]>
nettoweb: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
malconis has joined #ruby
Cork has joined #ruby
<nettoweb>
Because it seems hard to do in sql, maybe a clue so I can search for
LastWhisper____ has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
mweshi has quit [Ping timeout: 260 seconds]
<Radar>
nettoweb: Why do you want to do it in SQL anyway?
shadeslayer has quit [Remote host closed the connection]
Danielss89 has quit [Ping timeout: 252 seconds]
startupality has quit [Quit: startupality]
<nettoweb>
yes, because it's form a project in PHP, using a framework I've seen before. So maybe a sql is better
madhatter has quit [Ping timeout: 252 seconds]
depesz has quit [Ping timeout: 252 seconds]
<jhass>
UPDATE statements happily accept subselects in their values
<jhass>
that's all, this ain't #RubyOnRails, nor #sql nor #php
madhatter has joined #ruby
<eam>
or joins
shadeslayer has joined #ruby
<jhass>
most RDBMS probably rewrite both to the same anyway
amincd has joined #ruby
<nettoweb>
thanks
Danielss89 has joined #ruby
<zacts>
shevy: I just finished all of head first ruby! \o/
<amincd>
Hi, how do I get a ruby program to wait until a 'puts' method has completed outputting its result before moving to the next line of code?
depesz has joined #ruby
<zacts>
I love this book
<zacts>
on to my next readings: poodr is next
jancel has quit [Remote host closed the connection]
<jhass>
amincd: STDOUT.sync = true though probably an XY-problem
noobsu has quit [Read error: Connection reset by peer]
<shevy>
zacts you mean a book?
<amincd>
jhass: just tried it, unfortunately didn't work. It's writing the output of the second 'puts' method before it has finished the output from the first 'puts' call
noobsu has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
<jhass>
that seems unlikely, show code/reproducer?
jwren has quit [Quit: Lost terminal]
TomyLobo has quit [Ping timeout: 250 seconds]
<zacts>
shevy: yes. the book Head First Ruby. I just finished it. And next on my list is http://poodr.com
<Ballo>
[15:36] <Ballo> err_arr.map { |t| [t.to_hash,t.tminutes] if !t.test? }.compact.each do |tuple|
sepp2k has quit [Client Quit]
<Radar>
what is err_arr
<Ballo>
an array of objects
<Radar>
bzzt try again
<Ballo>
?
<Radar>
what is err_arr
<Ballo>
it's an array of objects
<Radar>
bzzzzzzzzzzzttttt
<Radar>
still wrong
blackmesa has quit [Ping timeout: 276 seconds]
<Radar>
Third time lucky maybe?
jenrzzz has joined #ruby
<baweaver>
!fake
<Radar>
what is err_arr
<Ballo>
it's an array of objects
JesseH has quit [Remote host closed the connection]
rkazak has joined #ruby
<baweaver>
Please do not use fake values, as they can be confusing or misleading. Sometimes both.
<Radar>
Ballo: Ok, you're just being silly now.
<Radar>
Ballo: Show us some code to reproduce the issue and we'd be happy to help.
<Ballo>
it's an array of objects like [obj1, obj2, obj3]
startupality has joined #ruby
qasaur has joined #ruby
<baweaver>
Ballo: that tells us nothing
<Ballo>
I don't know why that's so difficult to grasp
<Radar>
Ballo: Show us how obj1 is defined, please.
<baweaver>
what do they look like?
smathy is now known as smathy_afk
<Ballo>
they implement methods to_hash, tminutes, and test?
<baweaver>
because your code as is should work
<Radar>
^
<Ballo>
just like the code implies
toretore has quit [Ping timeout: 250 seconds]
<Ballo>
the error complains about the name 't', not that the method doesn't exist
<Radar>
baweaver is right. Your code should work. Please provide us a way that we can reproduce this error on our machines.
<baweaver>
so giving us fake values does you very little good
spider-mario has quit [Read error: Connection reset by peer]
<amincd>
jhass: I just want to verify that the <!DOCTYPE html... text should not be there, right? It indicates that the second "puts.." call is being executed before the first one has finished its output operation..?
pawnbox has quit [Ping timeout: 240 seconds]
drewo has quit [Quit: WeeChat 1.4]
skylerto has quit [Quit: leaving]
nando293921 has joined #ruby
<jhass>
amincd: no? how come you think so?
nullFxn has joined #ruby
<jhass>
the </html> is the end of the first one
<jhass>
then comes the second one with all the new lines and "new read"
mistermocha has quit [Remote host closed the connection]
<jhass>
then after that's done the doctype comes which is the start of the third one
mistermocha has joined #ruby
dsea11 has quit [Quit: Leaving]
hightower3 has quit [Read error: Connection reset by peer]
hightower3 has joined #ruby
dsea has joined #ruby
wdi has joined #ruby
mistermocha has quit [Remote host closed the connection]
minimalism has joined #ruby
minimalism is now known as Guest90443
* Ballo
found a better less-retardo way to write this
<amincd>
jhass: ah I see what I was getting wrong.
wdi has quit [Client Quit]
wdi14 has joined #ruby
<amincd>
I was assuming I was doing a 'puts file.read', rather than a 'puts content'. So I was assuming the third 'puts ..' call was outputting nothing
<wdi14>
Hi! I need help with a ruby application using sinatra. I just need to redirect a page, although, it is not working due the '#' symbol
<amincd>
and I explained the presence of html code after the second 'puts ..' call as a result of the second puts call being executed before the first had completed