<voltagex>
hey, is there a way of packaging up a gem+deps as an installer for Linux? I'm just interested in running this one gem out of a path somewhere and don't mind if I ship an extra copy of Ruby.
freezey has quit [Remote host closed the connection]
Avahey_ has joined #ruby
freezey has joined #ruby
freezey has quit [Remote host closed the connection]
sski has joined #ruby
<apeiros>
voltagex: there once was ruby2exe
<apeiros>
not sure it a) still works and b) has a *nix counterpart
<apeiros>
but might be a start to look around
<voltagex>
apeiros: already did, doesn't seem like anyone cares for *nix
<voltagex>
I'm not a rubyist and I already have too many unfinished projects ;)
<alpha123>
Why would you need a *nix counterpart? Most *nixes have Ruby either built-in or easily installable.
<alpha123>
voltagex: I assume you could do that with Bundler and a shell script
<voltagex>
Bundler?
<apeiros>
alpha123: no need for bundler
Xeago has quit [Ping timeout: 245 seconds]
<apeiros>
really, people abuse bundler
blackmesa has quit [Ping timeout: 240 seconds]
<voltagex>
All I know is I got a build error when running gem install boom
<Senjai>
Hello all
<apeiros>
wrap it up as a gem. state the proper dependencies in the gemspec.
<alpha123>
apeiros: Well, I figured the shell script could just call bundle install and be good to go.
<alpha123>
Wrapping it as a gem is actually a better idea though. :P
<apeiros>
alpha123: absolutely unecessary.
<apeiros>
rubygems already takes part of dependencies.
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<alpha123>
apeiros: But I like Bundler. :(
<apeiros>
voltagex: why do you think a build error would go magically away when you package it yourself?
Es0teric has joined #ruby
<voltagex>
apeiros: was a bit further down the line of crazy ideas. I just need the ruby dev headers but I don't really want to install anything system-wide
robbyoconnor has quit [Max SendQ exceeded]
armyriad has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
<Senjai>
alpha123: What are you trying tod o?
x77686d has joined #ruby
robbyoconnor has joined #ruby
x77686d has quit [Client Quit]
<alpha123>
Senjai: I'm not trying to do anything; voltagex is looking for a way to ship dependencies with his Ruby code as a packaged linux thing.
bthesorceror has joined #ruby
<Senjai>
Eww
<Senjai>
voltagex: You could use bundle packag
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
trhodes_ has joined #ruby
jamto11 has joined #ruby
michaeldeol has joined #ruby
mrj has joined #ruby
shevy has joined #ruby
x1337807x has joined #ruby
wallerdev has quit [Quit: wallerdev]
troulouliou_dev has quit [Quit: Leaving]
shevy has quit [Ping timeout: 240 seconds]
t_p has quit [Quit: Computer has gone to sleep.]
senayar has joined #ruby
momigi has joined #ruby
fantazo has quit [Ping timeout: 240 seconds]
<benzrf>
man what the fuck is wrong with the js community
binaryhat has joined #ruby
<apeiros>
is that a trick question?
<benzrf>
haha
<benzrf>
no just complaining
tjsousa has joined #ruby
<benzrf>
yesterday (day before? idr) i tried to get help in #javascript
<apeiros>
but you spiked my interest - what *is* wrong with the js community?
senayar has quit [Ping timeout: 250 seconds]
<benzrf>
i commented that fibers would be nice
<benzrf>
and handy
jottr_ has quit [Ping timeout: 245 seconds]
nemesit|znc has quit [Ping timeout: 245 seconds]
<benzrf>
and somebody said that no that's dumb because it results in less predictable behavior
timonv has joined #ruby
momigi has quit [Ping timeout: 240 seconds]
<benzrf>
so i pointed out that exceptions can do the same thing
<benzrf>
and they said that exceptions are a bad thing too
<benzrf>
-headache-
* apeiros
snickers
<apeiros>
that's cute. yeah, exceptions are a totally bad thing :)
<benzrf>
look, if you want fully predictable, well-defined behavior, why the fuck are you using js instead of haskell?!
<apeiros>
I think neither fibers nor exceptions lead to less predictable behavior
<benzrf>
their given example is that calling a function may lead to the stack proceeding not as a stack
<benzrf>
i.e. i call a func, maybe i dont get a return value or the code goes upward past me
nemesit|znc has joined #ruby
<benzrf>
how do I know? I dont
<apeiros>
benzrf: that's wrt exceptions?
<benzrf>
no, fibers
<benzrf>
;p
<benzrf>
hence why i picked exc. as my counterpoitn
<benzrf>
*counterpoint
<benzrf>
they did not say precisely that
<apeiros>
ok, I guess I do have to spend some time using fibers seriously
<benzrf>
iirc they pointed out 'f(); g();'
tjsousa has quit [Ping timeout: 245 seconds]
<benzrf>
and maybe g doesnt get called, who knows! woooohhh scary
<benzrf>
apeiros: fibers are nifty
maestrojed has joined #ruby
<benzrf>
apeiros: i dunno why people describe them as a concurrency thing
<apeiros>
benzrf: well, I thought I understood their basic idea.
<benzrf>
they are really more like coroutines
<benzrf>
...which i suppose are /sorta/ concurrency
<apeiros>
if with fibers, `f(); g()` might lead to g() not being called, then I'm mistaken, though.
<benzrf>
well, if the fiber isnt resumed
<benzrf>
or something
timonv has quit [Ping timeout: 250 seconds]
<benzrf>
actually i think they were talking more about state being mutated while the fiber is paused?
<benzrf>
idk
<apeiros>
uh, yeah, lol
<apeiros>
"if you stop concurrently run code and don't resume it, it won't continue!"
<benzrf>
i was bemoaning js' lack of em because i was trying to do somthing with a python to js compiler for another guy
<apeiros>
d'uh
<benzrf>
08:36 < benzrf> actually i think they were talking more about state being mutated while the fiber is paused?
<benzrf>
his program was structured to get input by calling input()
<benzrf>
or readline or something
<apeiros>
yeah, ok. common concurrency issues.
<apeiros>
async doesn't protect you from that either.
<benzrf>
but in js, of course, you need to have the input call /you/
<benzrf>
*browser js
<benzrf>
fibers would let you solve that without significant restructuring
`` has quit [Ping timeout: 252 seconds]
<benzrf>
just yield the fiber from input()
<benzrf>
then the event handler calls back into it
JensOfSweden has joined #ruby
momomomomo has quit [Quit: momomomomo]
<benzrf>
i have observed that ruby seems to have already covered most of the things js weenies rant about
sdouglas has joined #ruby
<benzrf>
except for perf i guess
railsbro has joined #ruby
<apeiros>
performance isn't a language feature, though
<railsbro>
does anyone know why rvm list and ruby -v return different values? rvm list says I'm using 2.1.1 but ruby -v says I'm using 1.9.3
<apeiros>
a language can make it easier/harder to optimize it. but that's all.
<RubyPanther>
Ruby solves performance by making C extensions easy.
JensOfSweden has quit [Ping timeout: 240 seconds]
<arrubin>
railsbro: Path.
<voltagex>
is there a complete lis tof configure options for ruby somewhere?
<arrubin>
railsbro: That is my guess at least.
<apeiros>
voltagex: ruby-toolbox.com ?
<railsbro>
arrubin: I see.. any ideas on how to resolve it?
<arrubin>
railsbro: Unless you setup a project specific Ruby version or something.
``_ has joined #ruby
<arrubin>
railsbro: If your path is the issue, then you should fix your path.
<arrubin>
railsbro: which ruby to start.
<arrubin>
railsbro: Then echo $PATH and determine whether that is the problem.
sdouglas has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 240 seconds]
<railsbro>
arrubin: Will look into that, thanks
<voltagex>
apeiros: I mean options to ./configure
dorei has quit []
Royalb15_1 has joined #ruby
<arrubin>
voltagex: ./configure --help
Companion has quit [Ping timeout: 245 seconds]
<Senjai>
railsbro: calling ruby will use your system ruby, thats different than the rvm ruby
Royalb15 has quit [Ping timeout: 250 seconds]
Royalb15_1 has quit [Client Quit]
Royal_Laptop has quit [Quit: Leaving]
Companion has joined #ruby
<railsbro>
Senjai: How do I make the two the same? Or is that not desirable?
<railsbro>
Senjai: I'm reading about $PATH right now, not quite sure on how to change $PATH to make it use ruby 2.1.1
Royalb15 has joined #ruby
pskosinski_ has joined #ruby
<arrubin>
railsbro: I have never used RVM before, but I read the installation instructions. It should have properly modified your shell startup scripts appropriately.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
try has joined #ruby
supermarin has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
Megtastique has quit []
momigi has joined #ruby
Virtualize has quit [Quit: Leaving...]
cescalante is now known as ce_afk
momigi has quit [Remote host closed the connection]
michaeldeol has joined #ruby
tjsousa has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
thomasxie has joined #ruby
ner0x has quit [Quit: Leaving]
lxsameer has joined #ruby
lxsameer has joined #ruby
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crystal77 has joined #ruby
goleldar has quit [Remote host closed the connection]
tjsousa has quit [Ping timeout: 252 seconds]
Mattx has joined #ruby
<Mattx>
Hey
<Mattx>
does anybody know how to use a sock5 proxy through Curb::Easy?
<metamaterial>
id like to learn that one heh
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
brian___ has quit [Quit: brian___]
St_Marx has quit [Remote host closed the connection]
supermarin has joined #ruby
St_Marx has joined #ruby
bthesorceror has quit [Remote host closed the connection]
lxsameer has quit [Remote host closed the connection]
voltagex has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
metamaterial has quit [Remote host closed the connection]
tyfighter has quit [Quit: tyfighter]
sdwrage has quit [Quit: Leaving]
ponga has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
skysploit has joined #ruby
ponga has quit [Client Quit]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
charlenopires has joined #ruby
pika_pika has quit [Ping timeout: 240 seconds]
kotk_ has joined #ruby
kotk has quit [Read error: Connection reset by peer]
frobrob has joined #ruby
mjs2600_ has joined #ruby
IceDragon has quit [Quit: Space~~~]
sski has quit [Remote host closed the connection]
sski has joined #ruby
troyronda has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pskosinski_ has quit [Ping timeout: 272 seconds]
mjs2600_ has quit [Ping timeout: 250 seconds]
elevati0_n has joined #ruby
sski has quit [Ping timeout: 240 seconds]
<elevati0_n>
my girlfriend is a graphic designer that knows very little about HTML. I'm a programmer, working with Ruby on Rails... is there a good WWSIG editor I can tell her to use that will integrate well with rails? thanks
chipotle_ has joined #ruby
troyronda has quit [Ping timeout: 240 seconds]
chipotle has quit [Ping timeout: 240 seconds]
voltagex has left #ruby ["WeeChat 0.4.3"]
Jon30 has quit [Ping timeout: 252 seconds]
voltagex has joined #ruby
<voltagex>
anyone know what flags are required to compile ruby 2.x statically?
centrx has quit [Quit: All this computer hacking is making me thirsty]
Hanmac1 has joined #ruby
agent_white has quit [Quit: goodnight]
armyriad has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
amclain has quit [Quit: Leaving]
senayar has joined #ruby
<RubyPanther>
voltagex: you probably also need --disable-dln
datafirm has quit [Quit: datafirm]
cescalante is now known as ce_afk
x77686d has quit [Quit: x77686d]
tjsousa has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
x77686d has joined #ruby
alpha123 has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
anaeem1 has quit [Read error: Connection reset by peer]
x77686d has quit [Client Quit]
Hanmac1 has quit [Ping timeout: 245 seconds]
anaeem1_ has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjsousa has quit [Ping timeout: 240 seconds]
kate_r has quit [Read error: Connection reset by peer]
momigi has joined #ruby
axilaris has joined #ruby
Rythorn has joined #ruby
try has quit [Ping timeout: 276 seconds]
kitak has joined #ruby
freerobby has quit [Quit: Leaving.]
supermarin has joined #ruby
centipedefarmer has joined #ruby
<axilaris>
hi, i'ved got a hash and i want to loop with these values - key, value, index. is there such thing ? i know these 2 - foo.each_with_index |value, index| , foo.map |key,value|
<axilaris>
is there a way i can best of both ?
<axilaris>
meaning i want key, value and the enumerated index
Spami has quit [Quit: This computer has gone to sleep]
etqqkoiflwhb has joined #ruby
MillyBays has joined #ruby
Atrumx has quit [Quit: Exit]
JensOfSweden has joined #ruby
Hanmac has joined #ruby
momigi has quit [Ping timeout: 240 seconds]
charlenopires has joined #ruby
<wallerdev>
axilaris: well you can do hash.to_a.each_with_index
charlenopires has quit [Max SendQ exceeded]
<axilaris>
to_a ?
<wallerdev>
to array
<axilaris>
oh ok
<Hanmac>
wallerdev: hm to array is not needed as far as i know
<Hanmac>
hash.each_with_index should work too
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Milly_Bays_ has quit [Ping timeout: 240 seconds]
<wallerdev>
ah
<wallerdev>
well that works too then lol
centipedefarmer has quit [Ping timeout: 245 seconds]
tacos1de has quit [Remote host closed the connection]
tacos1de has joined #ruby
pu22l3r has joined #ruby
<arrubin>
Yes.
<arrubin>
wallerdev's example using two parameters in parentheses seems preferable.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 250 seconds]
charlenopires has joined #ruby
charlenopires has quit [Max SendQ exceeded]
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
tyfighter has joined #ruby
charlenopires has joined #ruby
dayepa has quit [Ping timeout: 245 seconds]
charlenopires has quit [Max SendQ exceeded]
pu22l3r has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
rjhunter has joined #ruby
charlenopires has joined #ruby
charlenopires has quit [Max SendQ exceeded]
tyfighter has quit [Client Quit]
charlenopires has joined #ruby
pwh has quit []
pskosinski has joined #ruby
pskosinski has quit [Remote host closed the connection]
bluOxigen has joined #ruby
<arrubin>
wallerdev: So basically parentheses must be used in cases where one of the parameters is an array and one would like the elements broken out, but not if the array is the only parameter?
<arrubin>
This seems to be true based on some experimentation.
charlenopires has quit [Client Quit]
<wallerdev>
yeah you need parenthesis to specify variables for elements in an array
<wallerdev>
but you never have to use parenthesis, you can just access it like an array
charlenopires has joined #ruby
<Hanmac>
when the element is a hash you can do some magic too ;P
kitak has quit [Ping timeout: 240 seconds]
<arrubin>
wallerdev: I just meant that they are not necessary in this case: [[1, 2], [3, 4]].each {|a, b| puts a}
supermarin has joined #ruby
charlenopires has quit [Client Quit]
<arrubin>
But they are in this case: [[1, 2], [3, 4]].inject(0) {|t, (a, b)| puts a}
girassolbit has joined #ruby
<arrubin>
If one wishes the elements to be placed in their own parameters.
centipedefarmer has quit [Ping timeout: 240 seconds]
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kate_r has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirun has joined #ruby
aedorn has joined #ruby
timonv has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
crzrcn has joined #ruby
charliesome has joined #ruby
crzrcn has quit [Ping timeout: 252 seconds]
jottr_ has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
mikecmpbll has joined #ruby
kitak has quit [Remote host closed the connection]
<j416>
if I have: <node>text</node><node attr="foo">text2</node>
kitak has joined #ruby
<j416>
how can I use nokogiri to say that I want text but not text2?
<j416>
i.e., I want all nodes that don't have an attribute called 'attr'
ktun has quit [Ping timeout: 264 seconds]
<j416>
can it be done with css selectors?
ktun has joined #ruby
aross has joined #ruby
<canton7>
something like node:not([attr])
supermarin has joined #ruby
catos has quit [Ping timeout: 276 seconds]
toretore has joined #ruby
timonv has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
iaj_ has quit [Ping timeout: 276 seconds]
edwardly has quit [Ping timeout: 240 seconds]
iaj has joined #ruby
<j416>
hm
<j416>
hey, that seems to work
<j416>
canton7++
<canton7>
j416, first google hit for 'css select without attribute' ;)
<j416>
:P
<j416>
thanks
supermarin has quit [Ping timeout: 276 seconds]
noop has quit [Ping timeout: 276 seconds]
jottr_ has quit [Ping timeout: 258 seconds]
monkegjinni has quit [Remote host closed the connection]
crzrcn has joined #ruby
ktun has quit [Ping timeout: 255 seconds]
ktun has joined #ruby
mercwithamouth has joined #ruby
crzrcn has quit [Ping timeout: 250 seconds]
roshanavand has quit [Ping timeout: 245 seconds]
catos has joined #ruby
maximski has joined #ruby
ce_afk is now known as cescalante
klaut has quit [Remote host closed the connection]
klaut has joined #ruby
linduxed has joined #ruby
supermarin has joined #ruby
roshanavand has joined #ruby
supermarin has quit [Remote host closed the connection]
supermarin has joined #ruby
noop has joined #ruby
klaut has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
Atrumx has joined #ruby
monkegjinni has joined #ruby
supermarin has quit [Ping timeout: 252 seconds]
crzrcn has joined #ruby
ktun has quit [Ping timeout: 264 seconds]
fantazo has quit [Ping timeout: 240 seconds]
anaeem1__ has joined #ruby
ktun has joined #ruby
anaeem1 has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
_Andres has joined #ruby
cescalante is now known as ce_afk
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
phoo1234567 has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
crzrcn has quit [Ping timeout: 276 seconds]
alem0lars has quit [Quit: Going AFK...]
faizmokhtar has quit [Remote host closed the connection]
crzrcn has joined #ruby
timonv has quit [Ping timeout: 250 seconds]
kate_r has quit [Read error: Connection reset by peer]
crzrcn has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
timonv has joined #ruby
ktun has quit [Read error: Connection reset by peer]
ktun has joined #ruby
monkegjinni has quit [Remote host closed the connection]
thomasxie has quit [Quit: Leaving.]
nicar_ is now known as nicar
ktun has quit [Ping timeout: 255 seconds]
pagios has quit [Ping timeout: 246 seconds]
ktun has joined #ruby
maximski has quit []
ktun has quit [Client Quit]
alem0lars has joined #ruby
crzrcn has joined #ruby
ktosiek has joined #ruby
tjsousa has quit [Quit: Computer has gone to sleep.]
cephalostrum has quit [Ping timeout: 252 seconds]
thomasxie has joined #ruby
mjs2600_ has joined #ruby
crzrcn has quit [Ping timeout: 276 seconds]
seaned has joined #ruby
monkegjinni has joined #ruby
mjs2600_ has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
sdouglas has joined #ruby
andrewlio has quit [Read error: No route to host]
andrewlio has joined #ruby
senayar_ has quit []
AnoGen_ has joined #ruby
AnoGen has quit [Ping timeout: 276 seconds]
ikaros has joined #ruby
senayar has joined #ruby
sdouglas has quit [Ping timeout: 264 seconds]
catos has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
mikepack has joined #ruby
crzrcn has joined #ruby
Jetchisel has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
felixjet__ has joined #ruby
Martxel_ has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
tjsousa has joined #ruby
ce_afk is now known as cescalante
moritzs has joined #ruby
crzrcn has quit [Ping timeout: 258 seconds]
tvw has quit []
maximski has joined #ruby
pskosinski has quit [Remote host closed the connection]
tjsousa has quit [Client Quit]
AlSquire has joined #ruby
eka has joined #ruby
felixjet_ has quit [Ping timeout: 276 seconds]
felixjet__ has quit [Ping timeout: 264 seconds]
chrisseaton has joined #ruby
mlapp30m has joined #ruby
ktun has joined #ruby
fantazo has joined #ruby
crzrcn has joined #ruby
mengu has quit []
mlapp30m has quit [Remote host closed the connection]
catos has joined #ruby
phoo1234567 has quit [Remote host closed the connection]
cescalante is now known as ce_afk
crzrcn has quit [Ping timeout: 255 seconds]
phoo1234567 has joined #ruby
Mattx has quit [Remote host closed the connection]
chrisseaton has quit [Ping timeout: 265 seconds]
catos has quit [Ping timeout: 276 seconds]
Rythorn has quit [Ping timeout: 276 seconds]
claymore has quit [Ping timeout: 240 seconds]
centipedefarmer has joined #ruby
tharindu has joined #ruby
centipedefarmer has quit [Ping timeout: 264 seconds]
Naoe-Kanno has joined #ruby
SHyx0rmZ has quit [Ping timeout: 245 seconds]
mlapp30m has joined #ruby
kitak has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
KanKava has joined #ruby
mlapp30m has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
sdouglas has joined #ruby
etqqkoiflwhb has joined #ruby
Rythorn has joined #ruby
Shidash has quit [Ping timeout: 245 seconds]
_GoodTimes has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
JensOfSweden has quit [Remote host closed the connection]
sdouglas has quit [Ping timeout: 276 seconds]
relix has joined #ruby
yfeldblu_ has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
mostlybadfly has joined #ruby
kevinykchan has joined #ruby
_GoodTimes has quit []
pskosinski has joined #ruby
pskosinski has quit [Remote host closed the connection]
monkegjinni has joined #ruby
eka has joined #ruby
claymore has joined #ruby
troyronda has joined #ruby
xiq__ has joined #ruby
eshi has quit [Quit: WeeChat 0.4.3]
centipedefarmer has joined #ruby
xiq has left #ruby ["Trennungsnachricht"]
xiq__ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 258 seconds]
xiq has joined #ruby
brian___ has joined #ruby
bthesorceror has joined #ruby
frobrob has quit [Ping timeout: 240 seconds]
mjs2600_ has joined #ruby
Beoran__ has quit [Ping timeout: 240 seconds]
<apeiros>
gawd, slim's api docs are next to useless
<apeiros>
well then… stick to haml for the moment
bthesorceror has quit [Ping timeout: 252 seconds]
alem0lars has quit [Quit: alem0lars]
ce_afk is now known as cescalante
mjs2600_ has quit []
nhmood has quit [Quit: Connection closed for inactivity]
jack_rabbit has joined #ruby
crzrcn has joined #ruby
cescalante is now known as ce_afk
Beoran__ has joined #ruby
yfeldblum has joined #ruby
crzrcn has quit [Ping timeout: 245 seconds]
ikaros has quit [Quit: Ex-Chat]
alem0lars has joined #ruby
sqwirl has joined #ruby
pu22l3r has joined #ruby
crystal77 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
jhass|off is now known as jhass
popl has quit [Ping timeout: 250 seconds]
pu22l3r has quit [Ping timeout: 276 seconds]
roshanavand has quit [Quit: Gone!]
monkegjinni has quit [Remote host closed the connection]
MultiSwan has joined #ruby
flughafen has quit [Ping timeout: 240 seconds]
Demisillo has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: Leaving]
ktun has joined #ruby
Demisillo has quit [Remote host closed the connection]
Blaze_Boy has joined #ruby
benzrf|offline is now known as benzrf
alem0lars has quit [Quit: Going AFK...]
ayaz has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
Hanmac1 is now known as Hanmac
alem0lars has joined #ruby
gigetoo has quit [Remote host closed the connection]
fly2web has joined #ruby
Yami__ has joined #ruby
Yami__ has quit [Client Quit]
gigetoo has joined #ruby
gremax has quit [Ping timeout: 240 seconds]
mityaz has joined #ruby
franzip has joined #ruby
aross has quit [Remote host closed the connection]
monkegjinni has joined #ruby
mikepack has joined #ruby
freerobby has joined #ruby
alem0lars has quit [Client Quit]
pika_pika has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
aspiringflaneur has quit [Ping timeout: 276 seconds]
bazy has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
andrewlio has quit [Quit: Leaving.]
aross has joined #ruby
Blaze_Boy has quit [Quit: Blaze_Boy]
charliesome has quit [Ping timeout: 240 seconds]
ayaz has quit [Quit: leaving]
charliesome has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
felixjet has joined #ruby
etqqkoiflwhb has joined #ruby
ce_afk is now known as cescalante
closures999 has joined #ruby
zigomir has joined #ruby
kate_r has joined #ruby
etqqkoiflwhb has quit [Ping timeout: 250 seconds]
monkegjinni has quit [Remote host closed the connection]
freezey has joined #ruby
crzrcn has joined #ruby
robbyoconnor has quit [Ping timeout: 276 seconds]
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
davedev2_ has joined #ruby
cescalante is now known as ce_afk
aross has quit [Remote host closed the connection]
davedev24 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
aross has joined #ruby
kilk_ has joined #ruby
Jon30 has joined #ruby
Jon30 has quit [Changing host]
Jon30 has joined #ruby
bthesorceror has joined #ruby
crzrcn has quit [Ping timeout: 258 seconds]
troulouliou_dev has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kevinykchan has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
pu22l3r has joined #ruby
aross has quit [Ping timeout: 252 seconds]
nouitfvf_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
nouitfvf has quit [Ping timeout: 252 seconds]
freezey has quit [Remote host closed the connection]
<Bilge>
What is the difference between SecureRandom.random_number and Random.rand?
helpD has quit [Remote host closed the connection]
freezey has joined #ruby
closures999 has quit []
<benzrf>
Bilge: i would assume the former is more securely random than the latter
ixti has joined #ruby
JensOfSweden has joined #ruby
anaeem1_ has joined #ruby
<apeiros>
Bilge: secure random is harder to predict
AnoGen_ has quit []
<benzrf>
csprng
freezey has quit [Ping timeout: 252 seconds]
ktun has joined #ruby
p8952 has joined #ruby
meatherly has joined #ruby
<Hanmac>
you need twice that many crystal balls for that
anaeem1__ has quit [Ping timeout: 265 seconds]
helpD has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
Syno_Nym has left #ruby ["Konversation terminated!"]
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has joined #ruby
metamaterial has joined #ruby
omegahm has quit [Ping timeout: 252 seconds]
coderhs has joined #ruby
aross has joined #ruby
coderhs has quit [Remote host closed the connection]
Rainicorn has joined #ruby
Xeago has joined #ruby
kate_r has joined #ruby
momomomomo has joined #ruby
j416_ has joined #ruby
Rainicorn has quit [Read error: Connection reset by peer]
Rainicorn has joined #ruby
j416 has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Ping timeout: 276 seconds]
VTLob has joined #ruby
felixjet_ has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
zigomir has quit [Remote host closed the connection]
kevinykchan has joined #ruby
felixjet has quit [Ping timeout: 258 seconds]
freezey has joined #ruby
j416_ is now known as j416
drag0n_ has joined #ruby
drag0n_ has left #ruby [#ruby]
cjsarette has joined #ruby
zigomir has joined #ruby
etqqkoiflwhb has joined #ruby
rdark has joined #ruby
bakflash has quit [Quit: Konversation terminated!]
rostam has quit [Remote host closed the connection]
troyronda has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
omegahm has joined #ruby
brian___ has quit [Quit: brian___]
davedev2_ has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
andrewlio has joined #ruby
rostam has joined #ruby
ktun has quit [Ping timeout: 252 seconds]
Rainicorn has quit [Ping timeout: 264 seconds]
Guest31610 has joined #ruby
ce_afk is now known as cescalante
benzrf is now known as benzrf|offline
troyronda has joined #ruby
Kruppe has quit [Ping timeout: 258 seconds]
Hanmac1 has joined #ruby
Guest31610 has quit []
Guest31610 has joined #ruby
Guest31610 has quit [Client Quit]
freezey has quit [Remote host closed the connection]
WillAmes has joined #ruby
tkuchiki has joined #ruby
robbyoconnor has joined #ruby
Hanmac has quit [Ping timeout: 276 seconds]
carraroj has joined #ruby
Kruppe has joined #ruby
troyronda has quit [Ping timeout: 252 seconds]
kilk_ has quit [Quit: Leaving]
crzrcn has joined #ruby
rippa has quit [Ping timeout: 258 seconds]
cescalante is now known as ce_afk
JensOfSweden has quit [Remote host closed the connection]
yfeldblum has joined #ruby
crzrcn has quit [Ping timeout: 252 seconds]
brian___ has joined #ruby
meatherly has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 240 seconds]
xiphias has quit [Ping timeout: 258 seconds]
xiphias has joined #ruby
pu22l3r has joined #ruby
freezey has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
bakflash has joined #ruby
pu22l3r has quit [Ping timeout: 265 seconds]
freezey has quit [Ping timeout: 250 seconds]
s3ri0us has joined #ruby
ce_afk is now known as cescalante
zcreative has joined #ruby
larsam has quit [Quit: larsam]
xiphias has quit [Ping timeout: 258 seconds]
xiphias has joined #ruby
rippa has joined #ruby
rdark has quit [Quit: leaving]
jamto11 has joined #ruby
timonv has quit [Remote host closed the connection]
mikepack has joined #ruby
zigomir has quit [Remote host closed the connection]
andrewlio has quit [Quit: Leaving.]
xiphias has quit [Ping timeout: 258 seconds]
yvemath has quit [Excess Flood]
xiphias has joined #ruby
george2 has joined #ruby
<Bilge>
Why is this invalid: :(c + '0') yet this is valid: :"#{c}0"
<Rylee>
Bilge, is c a string already?
mikepack has quit [Ping timeout: 240 seconds]
<Bilge>
Yes
SilkFox has joined #ruby
<jhass>
Bilge: because that's how it is, the syntax for symbol literals is :name or :'name' or :"name" and only in the last one interpolation is interpreted/allowed
kevinykchan has quit [Quit: Computer has gone to sleep.]
<jhass>
the : is no operator, it's syntax
<jhass>
for the literal
<Bilge>
Oh, OK :^)
<Rylee>
oh, oops
<Rylee>
anyways
<Rylee>
Is there any easy way with Nokogiri to parse XML nested in CDATA in XML?
<jhass>
Bilge: also note that you rarely should need interpolation for symbols, it might be a hint that you're dynamically creating symbols which might be a hint that you're misusing them
tharindu has quit [Ping timeout: 264 seconds]
centipedefarmer has quit [Remote host closed the connection]
SilkFox has quit [Ping timeout: 252 seconds]
troyronda has joined #ruby
centipedefarmer has joined #ruby
george2 has quit [Changing host]
george2 has joined #ruby
yvemath has joined #ruby
simono has joined #ruby
<Hanmac1>
interpolation for symbols is a sign that mostly you do something you should not do
JBreit has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
<jhass>
Rylee: well, I guess you have no influence over that output format?
<Rylee>
none at all, no
<jhass>
cdata's purpose is tell the parser to not parse the following content, so wrapping xml into that is kinda weird to do
<Rylee>
yeah
<Rylee>
it sucks and my current solution is going to be very hacky
<Rylee>
and i'm just going to map Nokogiri::XML over results
mehlah has joined #ruby
<Hanmac>
i still dont know why is there a <![CDATA[ ... i think only to troll you
<Rylee>
lol
xiq22 has joined #ruby
<Rylee>
misguided attempt to allow HTML comments, is all I can guess
JBreit has left #ruby ["Leaving"]
<jhass>
results = Nokogiri::XML("<?xml version='1.0'>\n<results>#{Nokogiri::XML(xml).at("response").text}</results>").css("result").map(&:to_h) # not less hacky I guess
xiq has quit [Ping timeout: 265 seconds]
<Rylee>
wow, that's really cool
<Rylee>
thanks jhass
mmr has joined #ruby
thoraxe has joined #ruby
helpD has quit [Remote host closed the connection]
senayar_ has joined #ruby
michael_lee has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
kilk_ has joined #ruby
agjacome has joined #ruby
xiq22 has quit [Ping timeout: 240 seconds]
meatherly has joined #ruby
Xeago has joined #ruby
meatherly has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 240 seconds]
franzip has quit [Quit: ...]
crystal77 has quit [Quit: Computer has gone to sleep.]
enebo has joined #ruby
crzrcn has joined #ruby
abs has joined #ruby
Xeago has quit [Ping timeout: 276 seconds]
senayar_ has quit [Remote host closed the connection]
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
george2 has quit [Remote host closed the connection]
anay has joined #ruby
crzrcn has quit [Ping timeout: 240 seconds]
frog0909_ has joined #ruby
SilkFox has joined #ruby
bluOxigen has joined #ruby
frog0909 has quit [Ping timeout: 252 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
troyronda has quit [Remote host closed the connection]
troyronda has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
Solnse has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
michaeldeol has joined #ruby
philoserf has joined #ruby
SilkFox_ has joined #ruby
etqqkoiflwhb has joined #ruby
moritzs has quit [Ping timeout: 258 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
timonv has joined #ruby
Avahey_ has joined #ruby
gf3 has quit [Ping timeout: 250 seconds]
ktun has joined #ruby
ktun has quit [Client Quit]
SilkFox has quit [Ping timeout: 252 seconds]
gf3 has joined #ruby
anay has quit []
ktun has joined #ruby
philoserf has quit [Client Quit]
etqqkoiflwhb has quit [Ping timeout: 264 seconds]
funktor has joined #ruby
orto has quit [Remote host closed the connection]
toastynerd has joined #ruby
cjsarette has joined #ruby
PragCypher has joined #ruby
fantazo has quit [Ping timeout: 245 seconds]
gf3 has quit [Ping timeout: 252 seconds]
s2013 has quit [Remote host closed the connection]
SilkFox_ has quit [Read error: Connection reset by peer]
toastynerd has quit []
gf3 has joined #ruby
SilkFox_ has joined #ruby
sdouglas has joined #ruby
cjsarette has quit [Ping timeout: 252 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
cescalante is now known as ce_afk
ce_afk is now known as cescalante
crystal77 has joined #ruby
vivmbbs has joined #ruby
gf3 has quit [Ping timeout: 252 seconds]
cherry_lin has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
sdouglas has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
SilkFox_ has quit [Ping timeout: 264 seconds]
mmr has quit [Quit: leaving]
alexju has joined #ruby
gf3 has joined #ruby
havenwood has joined #ruby
alexju has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
<benzrf>
gross xml
alem0lars has quit [Client Quit]
Soda has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
fly2web has quit [Quit: fly2web]
ayaz has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
andrewlio has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
cescalante is now known as ce_afk
flughafen has joined #ruby
s2013 has joined #ruby
jamto11 has quit [Remote host closed the connection]
ce_afk is now known as cescalante
nateberkopec has joined #ruby
IceDragon has joined #ruby
nhmood has joined #ruby
sambao21 has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
centrx has joined #ruby
helpD has joined #ruby
IceDragon has quit [Ping timeout: 255 seconds]
IceDragon has joined #ruby
moritzs has joined #ruby
sambao21 has quit [Ping timeout: 258 seconds]
moritzs has quit [Max SendQ exceeded]
moritzs has joined #ruby
gf3 has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
eynj has joined #ruby
gf3 has joined #ruby
funktor has quit [Remote host closed the connection]
pwh has joined #ruby
pu22l3r has joined #ruby
yvemath has quit [Excess Flood]
apeiros has joined #ruby
pu22l3r has quit [Remote host closed the connection]
SegFaultAX has quit [Excess Flood]
jamto11 has joined #ruby
pagioss has joined #ruby
webgen has quit [Remote host closed the connection]
relix has joined #ruby
<apeiros>
power outage--
SegFaultAX has joined #ruby
crzrcn has joined #ruby
gf3 has quit [Ping timeout: 252 seconds]
alexju has joined #ruby
Xeago has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
gf3 has joined #ruby
alexju has joined #ruby
yfeldblum has joined #ruby
mehlah has quit [Quit: Leaving...]
apeiros has quit [Ping timeout: 252 seconds]
gremax has joined #ruby
crzrcn has quit [Ping timeout: 264 seconds]
Royal_Laptop has joined #ruby
mehlah has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
amclain has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
mikepack has joined #ruby
caleb_io has joined #ruby
enebo has quit [Quit: enebo]
<apeiros>
ok, so we're at try #4… lets see whether they've managed to fix the power outage now…
<omosoj>
My solution is a naive algorithm so it takes forever to run.
zcreative has joined #ruby
yfeldblum has joined #ruby
IceDragon has joined #ruby
<littlebit>
hi people, I'm looking for a code example that would parse a website that has a lot of rss feeds. And I want to get not only the new ones but also the old ones from more than a year...
havenwood has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ardenzi has quit [Read error: Connection reset by peer]
cescalante is now known as ce_afk
ce_afk is now known as cescalante
Azure has quit [Quit: Blue Sky Fish]
yfeldblum has quit [Ping timeout: 245 seconds]
NukePuppy has quit [Ping timeout: 245 seconds]
<centrx>
omosoj, You have a loop within a loop, so your speed is basically O(n^2)
jottr_ has quit [Ping timeout: 252 seconds]
<omosoj>
Yeah, I ran it and walked to a store a mile away and did shopping and it is still running :/
j416 has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
<omosoj>
What other approach can I take?
pzula has quit [Quit: Lost terminal]
michael_lee has quit [Remote host closed the connection]
crzrcn has quit [Quit: Leaving.]
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<omosoj>
I have two loops within loops :|
jottr_ has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
ixti has joined #ruby
razrunelord has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
davedev2_ has joined #ruby
mehlah has quit [Quit: Leaving...]
<centrx>
Actually it's three because the include? loops through the array
mrmargolis has quit [Remote host closed the connection]
<apeiros>
module Enumerable; def count_by(attr=nil); return enum_for(__method__, attr) unless block_given?; count=Hash.new(0); if attr; each do |item| count[item.public_send(attr)]+=1 end; else each do |item| count[yield(item)]+=1; end; count; end; end
<benzrf>
or something
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
so and now turn this into a feature request ;P
<apeiros>
plerp, should check for unless attr || block_given?
<Hanmac>
benzrf: he asked nearly daily what is the progress about rwx (a recent wxWidgets binding for ruby) .. i commited 26 commits today, and increase the documented ruby object to "Total: 1047 (410 undocumented) => 60.84% documented" *that what rdoc says*
senayar has joined #ruby
anaeem1_ has quit [Ping timeout: 240 seconds]
moritzs has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 258 seconds]
momigi has quit [Ping timeout: 252 seconds]
<benzrf>
haskell is like a sports car
psyko666 has quit [Remote host closed the connection]
<benzrf>
it's pretty cool
<benzrf>
but i dont use it for everyday chores
momomomomo has quit [Quit: momomomomo]
cescalante is now known as ce_afk
relix has quit [Read error: Connection reset by peer]
<centrx>
I'm not sure what the best algorithm for doing this exercise is
<centrx>
Note you could be using #map in many of these places
<omosoj>
Am I missing something or is this the best way without knowing better maths?
<omosoj>
K.
<centrx>
Instead of g = []; (1..28123).each { |r| g << r }
<centrx>
(1..28123).to_a
eflynn has quit [Quit: eflynn]
<centrx>
omosoj, Also instead of using include? with an array, make hashes and use has_key?
<centrx>
or Set
<centrx>
rather
<centrx>
Use Set
drizz has joined #ruby
<omosoj>
K, I'm writing these down and I'll look them up. Thanks.
<omosoj>
I learned arrays first so I tend to depend on them much more, but hashes seem more powerful.
<centrx>
omosoj, Set will use a hash internally to store the array. Checking whether a value is in a hash is much faster than Array#include?
<omosoj>
and flexible
Megtastique has quit []
x77686d has quit [Quit: x77686d]
<omosoj>
Oh, interesting. That's counterintuitive to me.
<centrx>
omosoj, Set combines the semantics of Arrays with the performance of hashes (and Set enforces uniq values)
eflynn has joined #ruby
aspires has joined #ruby
Speed has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
nateberkopec has joined #ruby
IceDragon has quit [Ping timeout: 258 seconds]
Virtualize has joined #ruby
Morkel has joined #ruby
robert_ has quit [Ping timeout: 276 seconds]
decoponio has quit [Quit: Leaving...]
<drizz>
is it possible to report a rubygem?
mikepack has joined #ruby
IceDragon has joined #ruby
<benzrf>
'report'?
bricker has quit [Ping timeout: 252 seconds]
<drizz>
reporting for abuse, basically
<drizz>
contains nothing but a media file, no code etc
ktun has joined #ruby
Virtualize has quit [Quit: Leaving...]
<Hanmac>
seems like a typical rails app ;P
eflynn has quit [Ping timeout: 240 seconds]
<drizz>
haha, touché
pwh has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aross has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 258 seconds]
ixti has joined #ruby
aross has joined #ruby
timonv has quit [Remote host closed the connection]
michaeldeol has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
aspires has quit []
aross has quit [Ping timeout: 276 seconds]
xiq22 has joined #ruby
twiceday has joined #ruby
chipotle has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
twiceaday has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
brian___ has quit [Quit: brian___]
m8 has joined #ruby
chipotle_ has quit [Ping timeout: 240 seconds]
senayar_ has joined #ruby
kotk_ has quit [Ping timeout: 252 seconds]
binaryhat has joined #ruby
kotk has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
Atrumx has quit [Quit: Exit]
littlebit has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<Bilge>
If I'm working on a project in files that are require()'d, but being changed with each iteration, in a given IRB session they are only loaded once so all my subsequent changes are ignored! How do I refresh require()'d files for a given IRB session?
Xeago has joined #ruby
Squarepy has joined #ruby
pskosinski has joined #ruby
xiq22 has quit [Remote host closed the connection]
xiq22 has joined #ruby
Synthead has joined #ruby
mordof1 is now known as mordof
<jhass>
Bilge: use pry and its reload-code command
<havenwood>
+1 pry
<havenwood>
drizz: a good place to discuss is #rubygems
momigi has quit [Remote host closed the connection]
meatherly has quit [Remote host closed the connection]
s2013 has joined #ruby
brian___ has joined #ruby
meatherly has joined #ruby
claymore has quit [Quit: Leaving]
meatherl_ has joined #ruby
jonno11 has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
blueOxigen has joined #ruby
<mordof>
So i'm a tad confused about operator methods, and how to control their use on a getter of my class. I've got class Tag; def name; @name; end; end; this allows me to do mytag = Tag.new; mytag.name << "name" . I'm not sure how to either create a method that gets triggered in the class when that happens, or if it's a better idea, to lock that out from being possible (and restricting to just mytag.name
<mordof>
+= "append")
meather__ has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
meatherly has quit [Ping timeout: 258 seconds]
gdd229 has joined #ruby
<mordof>
i'd be fine with making << "name" available, but i want to have some logic happen when the name gets updated
crystal77 has joined #ruby
<mordof>
just not sure how to do that. it works now, but i don't think i can put the logic anywhere since it's only a getter and appending to the reference
<mordof>
or.. however that's working internally
nateberkopec has joined #ruby
mikepack has joined #ruby
meatherl_ has quit [Ping timeout: 245 seconds]
BrianJ has joined #ruby
meatherly has joined #ruby
<benzrf>
mordof: operator methds are *exactly* the same as normal methods
<benzrf>
except for syntx
<benzrf>
*syntax
<mordof>
benzrf: yep, i know
<benzrf>
ok, what are you asking?
gdd229 has left #ruby [#ruby]
<mordof>
can i make the def name; @name; end; be aware of when i do mytag.name << "name" ?
<benzrf>
no...
<benzrf>
the << is being called on the return value
<mordof>
i realize that, that's my dilemma, heh
<benzrf>
you could return a proxy
<Hanmac>
the only possible way would be a Holder object
<benzrf>
but that seems... unnecessary
troyronda has joined #ruby
meather__ has quit [Ping timeout: 245 seconds]
<mordof>
would it make sense to do def name; @name.to_s; end; so that it's a different string object and actually require mytag.name += "name" then?
* benzrf
shrusg
<benzrf>
*shrugs
<mordof>
for def name=(val); @name=val; end;
<benzrf>
mordof: you know u can use attr_* right
Soda has joined #ruby
<mordof>
no, i'm not familiar with that o.o
moritzs has joined #ruby
<mordof>
tutorialspoint didn't mention that at all :/ sucky
<benzrf>
attr_reader/attr_writer/attr_accessor
<benzrf>
they are methods on __class__
<benzrf>
* Class
mikepack has quit [Ping timeout: 240 seconds]
Squarepy has quit [Remote host closed the connection]
endash has joined #ruby
<benzrf>
Class#attr_reader takes a symbol or symbols, and defines methods named after the symbols that return the ivar with that symbol's name
<benzrf>
example:
<benzrf>
attr_reader :foo
<benzrf>
works like
<benzrf>
def foo
<benzrf>
@foo
<benzrf>
end
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<benzrf>
attr_writer does the same thing, but defines the_symbol= and takes an arg and sets it
crystal77 has quit [Quit: Computer has gone to sleep.]
<benzrf>
and attr_accessor makes both method
<benzrf>
*methods
meatherly has quit [Remote host closed the connection]
<mordof>
ah, so it's just short hand for what i've been doing
<benzrf>
remember, self in a class block is the class being defined
<mordof>
Hanmac: what is a Holder Object?
* mordof
nods
<benzrf>
so writing 'foo bar' in a class block calls foo on the class
meatherly has joined #ruby
<Hanmac>
mordof: i mean something like a Proxy like benzrf said
meatherly has quit [Remote host closed the connection]
Hobogrammer_ has joined #ruby
<jhass>
mordof: String#to_s doesn't return a copy, it returns self
<jhass>
String#dup returns a copy
<mordof>
ok
<mordof>
jhass: ty for the elaboration
endash has quit [Client Quit]
crystal77 has joined #ruby
jcs222 has joined #ruby
YourBestFriend is now known as mozzarella
s2013 has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
meatherl_ has joined #ruby
joelteon has left #ruby ["bye"]
bmcorser has quit [Quit: Connection closed for inactivity]
meatherl_ has quit [Remote host closed the connection]
meatherly has joined #ruby
ni600278 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
drizz has joined #ruby
ni600278 has left #ruby [#ruby]
meatherly has quit [Ping timeout: 245 seconds]
<benzrf>
oh man i just had a thought
bonZi has joined #ruby
<benzrf>
when u have a dual-boot system, each install is 100% writable when another one is booted right?
* mordof
nods
benlieb has joined #ruby
<benzrf>
what if somebody wrote a virus that exploits windows' comparative vulnerability to get into currently-not-booted gnu/linux partitions
<benzrf>
as root no less
<mordof>
oohh snap
<wallerdev>
you could always format one partition as something not readable by windows
momigi has joined #ruby
<benzrf>
yeah but coudnt a usespace program contain an ext impl to mount it w/
<mordof>
it's only "not readable by windows" because the drivers aren't there by default
<wallerdev>
yeah but youd need escalation
<mordof>
benzrf: right - if you have software that can handle it, it's not a problem
endash has joined #ruby
arrubin has joined #ruby
momigi has quit [Remote host closed the connection]
Xeago has joined #ruby
aross has quit [Remote host closed the connection]
aross has joined #ruby
<mordof>
wallerdev: escalation?
<wallerdev>
yeah you know
<mordof>
well, no.. not really.. that's why i said that, lol
<wallerdev>
when windows asks you if you want to do something that requires admin rights
chipotle_ has quit [Read error: Connection reset by peer]
<mordof>
oh
<wallerdev>
UAC
chipotle has joined #ruby
<mordof>
that won't stop a lot of people from hitting "yes" just because they don't really know any better.
<mordof>
though
<wallerdev>
well thats a user problem haha
<mordof>
if they're dual-booting linux that's a bit of a different story
<wallerdev>
cant pretend people from downloading viruses if theyre just gonna click OK to everything
<wallerdev>
pevent*
<metamaterial>
well telchincally if you have a dual boot you should encrypt both partitions
<metamaterial>
and if you have an encrypted partiotion, how can a virus write data without the key? did you give windoze your nix keys? )=
<wallerdev>
passwords.txt
aross has quit [Ping timeout: 255 seconds]
<mordof>
metamaterial: good point
meatherly has joined #ruby
<metamaterial>
in osx vmware fusion 6, you can encrypt vm boxes, so at least you can import and export the boxes and if they're crypted, the host os cant infect
<metamaterial>
but once you run the vmbox from an infected host, it's toast.
<wallerdev>
but os x has no viruses
<metamaterial>
then again i dont know how keychain works
<mordof>
heh
<wallerdev>
macs cant get viruses
nanoyak has quit [Quit: Computer has gone to sleep.]
<metamaterial>
yeah it does son didnt you catch the last defcon? these days the pros can make your mac laptop catch fire =P
<benzrf>
alol: top lel
<benzrf>
* wallerdev
<wallerdev>
:p
<benzrf>
>mfw people actually think something about macs makes them inherently more secure
chipotle_ has joined #ruby
<wallerdev>
supposed to post a face when you use mfw
<metamaterial>
-_-
ce_afk is now known as cescalante
<benzrf>
havent you heard
<centrx>
Macs have always been inherently more secure
<benzrf>
the meigh meigh has mutated sufficiently that you now just put '>mfw ' in front to express amusement
<benzrf>
le may may arrow
<toretore>
imperically, macs are much more secure than windows pcs
<benzrf>
toretore: but how much of that is market share
razrunelord has joined #ruby
blackmesa has joined #ruby
<benzrf>
now, on gnu/linux we have package management to help security
<metamaterial>
have any of you had your linux or unix boxes rooted? that is a nightmare compared to fixing a windows box.
<benzrf>
but macs still largely depend on downloadin and executing files
<benzrf>
metamaterial: haha what
<toretore>
macs have a lot more market share now than before; i doubt the insecurity has gone up as much
kilk_ has quit [Quit: Leaving]
<wallerdev>
fixing anything after its been infected is a nightmare
kilk_ has joined #ruby
<metamaterial>
lol
<wallerdev>
you cant just say its easy on windows because its not
<mordof>
on windows whenever i have an issue i just format.. lol
<metamaterial>
winodws never hosts mission critical stuff. just live cd and dd if=/dev/zero of=/dev/hda
<wallerdev>
you can pretend your antivirus got rid of all traces, but realistically you need to load from a backup before the infection
<benzrf>
windows lol grose
<metamaterial>
i bought an iphone 5s yesterday and the apple store turned it on and it connected to a wifi before i even selected what country i'm in
Burgestrand has joined #ruby
chipotle has quit [Ping timeout: 276 seconds]
<wallerdev>
pretty sure an iphone can figure out what country you’re in automatically but ok
<metamaterial>
thanks apple, i really wanted to wait till i got home to turn it on, update it. but thanks for having me sign in with my apple id over your public wifi store on a go to fail os
meatherly has quit [Remote host closed the connection]
* metamaterial
is never buying electronics from the 'genius bar' again
<wallerdev>
and you can ask them to not set it up lol
<metamaterial>
i did. he said for apple care warranty he has to turn it on and shit
meatherly has joined #ruby
pika_pika has joined #ruby
<wallerdev>
hes just trying to be helpful :p
<wallerdev>
anyway im sure it connected over SSL
<metamaterial>
am i crazy? should i not worry that my apple id was sent over a go to fail network
<metamaterial>
ssl? what ssl?
<wallerdev>
icloud? thats the password youre concerned about?
<wallerdev>
icloud.com is all done over SSL
<metamaterial>
i'm concerned my phone has a root kid
<metamaterial>
kit*
m8 has quit [Quit: Sto andando via]
razrunelord has quit [Ping timeout: 264 seconds]
<wallerdev>
that seems unlikely haha, but feel free to just go to itunes and format your phone
<metamaterial>
you think i'd plug a rooted phone into my laptops usb? =P
<wallerdev>
hahaha
ktosiek has quit [Read error: Connection reset by peer]
<metamaterial>
if you trust ssl so much here let me plug this device into your wifi network ^_~
<wallerdev>
paranoid much :p
nerium has quit [Quit: nerium]
<metamaterial>
paranoid? i just read much =P
<apeiros>
just because you're paranoid…
<metamaterial>
./end rant "thanks for listening to my gripe"
<wallerdev>
im sure your phone is actively mining dogecoin and thats why your battery life has decreased
davispuh has joined #ruby
<metamaterial>
hosting hidden tor servers is fine, botnet spmaming, etc. it's mining currency that i dont want it doing.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has quit [Ping timeout: 258 seconds]
<metamaterial>
(that's a sarcasm btw)
cescalante is now known as ce_afk
Xeago has quit [Remote host closed the connection]
Squarepy has joined #ruby
<omosoj>
Is yielding to a block common? I just learned about it an I don't know what its use is.
<toretore>
how does one yield to a block?
<wallerdev>
its common if your method takes a block lol
<toretore>
ok ignore me
<wallerdev>
like if you were writing the each method you would use yield
<mordof>
def myfunc; puts "some text before block"; yield; puts "some text after"; end; myfunc { puts "woo i'm in the block"; } <-- yielding to a block
<toretore>
my think is broken
MatthewsFace has joined #ruby
<toretore>
yes, it is quite common omosoj
<omosoj>
toretore, lol mine too.
<wallerdev>
i mostly only bother it if i want to specify behavior to run in the middle of a method
<mordof>
it's essentially "allow your methods to be more extendable for certain parts" in my understanding
<toretore>
it may seem magical, but it's just syntactic sugar for running an anonymous function
Burgestrand has quit [Quit: Burgestrand]
x77686d has joined #ruby
<toretore>
fn = lambda{|foo| p foo }; fn.call(bar)
<toretore>
same thing
<omosoj>
mordof, oh, that makes sense.
northfurr has quit [Quit: northfurr]
<mordof>
also interesting... attr_writer :foo != def foo; @foo; end;
<mordof>
well
<mordof>
that's obvious, but yeah
<mordof>
having the attr_reader :foo doesn't allow foo << "stuff" either
<mordof>
like that other method does
<omosoj>
Hmm, I don't think I've ever used an anonymous function.
<toretore>
sure it does
maestrojed has joined #ruby
<toretore>
omosoj: are you familiar with any other languages?
<omosoj>
No... but I see that it's a fundamental comp sci concept. Need to read up...
mityaz has quit [Quit: See ya!]
<mordof>
toretore: was that "sure it does" about what i was saying?
<toretore>
yes
<toretore>
omosoj: it's just a function, like any other
<toretore>
except you can pass it around
anaeem1__ has quit [Read error: Connection reset by peer]
<omosoj>
K
<mordof>
i've got class Tag; def name; @name; end; end; mytag = Tag.new; mytag.name << "name"; works just fine. but using attr_accessor :name in the class does *not* allow me to do mytag.name << "name"
anaeem1 has joined #ruby
x1337807x has joined #ruby
<mordof>
toretore: i get an undefined method when i try to do that
<toretore>
yeah, it's not supposed to work
<mordof>
toretore: then i misunderstood - i thought you were saying it was meant to work that way
MatthewsFace has quit [Quit: This computer has gone to sleep]
<toretore>
class Tag; attr_accessor :name; end; t = Tag.new; t.name = 'repulsive'; t.name << ' toothpaste'; t.name
<toretore>
>> class Tag; attr_accessor :name; end; t = Tag.new; t.name = 'repulsive'; t.name << ' toothpaste'; t.name
pen has quit [Read error: Connection reset by peer]
<toretore>
did i killed it?
Morkel has quit [Quit: Morkel]
<mordof>
toretore: yeah i'm an idiot - i had my instance variable named wrong, lol
<Rylee>
How would I `require` a file from the current directory, and have it work even if the file I'm on is called from a symlink in a different directory?
pen has joined #ruby
<toretore>
require_relative
<toretore>
BUT
LexicalScope has quit [Ping timeout: 240 seconds]
<toretore>
the proper way would be to include . in $:
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore>
ruby -I. script.rb
CaptainJet has joined #ruby
centipedefarmer has joined #ruby
<Rylee>
the use case is that I've written a lib and a client, and I have the client symlinked in ~/bin
benlieb has quit [Quit: benlieb]
<Rylee>
and the client requires the lib
<toretore>
where is the client really?
<Rylee>
whereas the code lives in ~/code/dronebl.rb/
northfurr has joined #ruby
<toretore>
hm
<toretore>
i still maintain that ~/code/dronebl.rb should be in path
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<toretore>
ruby -I~/code/dronebl.rb bin/client.rb
<toretore>
you could add to $: in client.rb
<toretore>
or make a sh that does it for you
Burgestrand has quit [Quit: Burgestrand]
<Rylee>
it's meant to be published and used by others, and I guess that means the proper way to do it would be put it in a gem
mrmargolis has joined #ruby
<toretore>
yes
<toretore>
definitely
kirun has quit [Remote host closed the connection]
<Rylee>
rightyo
<Rylee>
are there any handy guides for babby's first gem
maestrojed has quit [Quit: Computer has gone to sleep.]
xiq22 has quit [Read error: Connection reset by peer]
xiq22 has joined #ruby
<benzrf>
oh man i just realized that my last commit to Quick was like 3 weeks ag
<benzrf>
o
<benzrf>
>tfw project is dead
kilk_ has quit [Ping timeout: 252 seconds]
jonno11 has joined #ruby
Slavox|AFK is now known as Slavox
franzip has quit [Quit: ...]
<mordof>
when looking at the Ruby documentation, #=> (stuff here) is signifying the return value of something, correct?
<havenwood>
mordof: yup
<mordof>
thanks
<mordof>
would it be appropriate to use that in a scenario where the method would be using puts and outputing something (and that is the only action in the method)? or would that have other annotation symbols
mehlah has quit [Quit: Leaving...]
kyb3r_ has joined #ruby
datafirm has quit [Quit: datafirm]
einarj_ has quit [Ping timeout: 252 seconds]
yeltzooo has quit [Remote host closed the connection]
jfelchner_ has joined #ruby
<havenwood>
mordof: #>>
ericmathison has joined #ruby
<mordof>
ah, excellent. thanks :)
cescalante is now known as ce_afk
sambao21 has quit [Quit: Computer has gone to sleep.]
<xiq22>
So esoteric.
eynj has left #ruby [#ruby]
alex88 has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
yeltzooo has joined #ruby
<benzrf>
oh wow thought i was in #haskell for a sec
<benzrf>
and that #>> is a lens operator or something
<benzrf>
lol
benlieb has joined #ruby
alex88 has joined #ruby
jfelchner_ is now known as jfelchner
momigi has joined #ruby
benlieb has quit [Client Quit]
JensOfSweden has joined #ruby
endash has quit [Quit: endash]
segfalt has joined #ruby
jfelchner has quit []
jfelchner has joined #ruby
rbennacer has left #ruby ["Leaving"]
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
etqqkoiflwhb has joined #ruby
pwh has quit []
momigi has quit [Ping timeout: 252 seconds]
xiq22 has quit [Ping timeout: 250 seconds]
bazy has left #ruby [#ruby]
SCommette has joined #ruby
arrubin has quit []
mehlah has joined #ruby
segfalt has left #ruby [#ruby]
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
kyle has joined #ruby
kyle is now known as Guest35657
Guest35657 is now known as segfalt
<Rylee>
is there any reason there's 30 downloads on my gem that's relatively niche that i uploaded less than an hour ago? scrapers or something?
<katlogic>
Crappers.
<Senjai>
Mirrors
<Senjai>
maybe
JensOfSweden has quit [Ping timeout: 252 seconds]
<Senjai>
I personally download gems I think sound cute
<Senjai>
I collect them
<Rylee>
lol
arrubin has joined #ruby
<Rylee>
sounds... cute?
<mordof>
anyone got a link to attr_writer / reader / accessor in teh documentation?
<centrx>
mordof, It's in the ruby doc for Module
<mordof>
not sure what to call them exactly (hard to look for it)
<havenwood>
Rylee: happens the gem before your first release was also a first release, so easy comparison
<Rylee>
heh
<Rylee>
thanks for hte info havenwood
<havenwood>
Rylee: np
Xeago has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr_ has quit [Ping timeout: 252 seconds]
<havenwood>
Rylee: another good reason for a concise and accurate gem description!
<havenwood>
Rylee: “@rubygems: dronebl.rb (0.0.3): http://t.co/5SMO90Nvtl NOTE: You should create a ~/.droneblkey file with your key inside of it for the …”
mikepack has quit [Ping timeout: 252 seconds]
<havenwood>
Rylee: that note isn't the important thing to convey :P
<Rylee>
lol, I apparently got "summary" and "description" backwards
brian___ has quit [Quit: brian___]
pwh has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.3]
<havenwood>
Rylee: i'd vote < 80 char for `spec.description` though I'd start the `spec.summary` with what the tool does as well!
Xeago has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
supermarin has joined #ruby
sambao21 has joined #ruby
supermarin has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
jtdowney has joined #ruby
dawe has quit [Quit: leaving]
sambao21 has quit [Ping timeout: 265 seconds]
Megtastique has joined #ruby
<Rylee>
fixed, now i'm going to go hide in a corner before a rubygems.org maintainer comes to beat me up
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supermarin has quit [Ping timeout: 245 seconds]
pwh has quit []
tjsousa has quit [Quit: Computer has gone to sleep.]
<BrianJ>
What's the best way to make parameters optional?
wldcordeiro has joined #ruby
<BrianJ>
pass in an options hash?
<BrianJ>
parameters into a methood*
<BrianJ>
method*
<benzrf>
BrianJ: err, optional args?
<Rylee>
default parameters
charliesome has joined #ruby
bthesorceror has quit [Remote host closed the connection]
<wldcordeiro>
I've been working through Why's poignant guide and I get the general gist of what's going on. But he doesn't spend much time explaining why syntax is a certain way.
<Rylee>
def my_method this, is, required, but=0, another='asdf', is_not=12
<BrianJ>
Basically I'd like to make aws_access_key optional
<BrianJ>
would i do aws_access_key=nil?
<Rylee>
yes
<BrianJ>
ah ok
torresga has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wldcordeiro>
Like why does the first line go, kitty_toys.sort_by {stuff...}
<BrianJ>
Is there a reason for not just using a hash?
supermarin has joined #ruby
<wldcordeiro>
is the stuff inside the mustaches the args to the sort_by method?
<Rylee>
BrianJ, yes, argument checking
<BrianJ>
opts[:aws_access_key]
alex88 has quit [Ping timeout: 245 seconds]
<BrianJ>
not following
<Rylee>
well
<BrianJ>
I suppose it's a bit harder to debug
alex88 has joined #ruby
<BrianJ>
w/ a hash
supermar_ has joined #ruby
bthesorceror has joined #ruby
<Rylee>
you'd have to check arguments in your code instead of letting the parser handle it
<wldcordeiro>
Like I get the gist of the block he's showing, he's sorting by the :shape symbol. But I don't get why sort_by is followed by what looks like a hash.
<BrianJ>
ah ok. Makes sense
<benzrf>
wldcordeiro: why are you trying to read code when you do not know ruby yet?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has joined #ruby
<apeiros>
wldcordeiro: in sort_by { … }, the { … } part is not a hash
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<apeiros>
wldcordeiro: it's a block. you can think of it as a method without a name. it's a piece of code which the method you pass it to (in this case sort_by) can call
<wldcordeiro>
Ah so it's just an in-line block of sort?
supermarin has quit [Ping timeout: 276 seconds]
chipotle_ is now known as chipotle
<wallerdev>
inline block lol
<wldcordeiro>
wallerdev: What would you call it? most blocks I see usually don't have mustaches around them.
<benzrf>
wldcordeiro: blocks are a super basic feature
BBBThunda has joined #ruby
<benzrf>
if you dont know about them then you do not know ruby yet
<benzrf>
so why are you reading code instead of an introduction?!
<wallerdev>
{ and } are the same as using do/end
BBBThunda has quit [Read error: Connection reset by peer]
BBBThunda has joined #ruby
hermanmunster has quit [Remote host closed the connection]
<wldcordeiro>
benzrf: I know how to program already, I just hadn't seen a block use mustaches and the guide I'm reading didn't mention that both do/end and {} are usable.
<wldcordeiro>
Don't just be a presumptious asshole about it.
<benzrf>
o_o
<wallerdev>
yeah cmon benzrf
<wldcordeiro>
I'm just not super familiar with ruby vs other languages so I'm trying to get a grasp of the differences in syntax.
<wallerdev>
dont be a hater
<wldcordeiro>
Why just never made any kind of mention of the do/end vs {} thing lol
<benzrf>
what are you reading that mentions blocks but not the {} form?!
<wallerdev>
but yeah theyre the same
<wldcordeiro>
Why's poignant guide to ruby
<benzrf>
oh
<benzrf>
haha
<wldcordeiro>
It's odd...
<wallerdev>
haha great book to start with
<benzrf>
it gets much odder
<wallerdev>
if youre into comics
sambao21 has joined #ruby
<wallerdev>
_why is crazy
<benzrf>
imo w(p)gtr is not a great starter book for actually learning ruby
<benzrf>
it's decent for getting a general grasp of the flavor of it
BBBThunda has quit [Client Quit]
<benzrf>
but it doesnt do a great job of explaining how to actually use it
nateberkopec has quit [Quit: Leaving...]
<benzrf>
¬_¬
<wallerdev>
it explains it in a way only he could understand haha
jonno11 has joined #ruby
<wldcordeiro>
I was trying to use Zed shaw's Learn ruby the hard way but it seems like he's given up on it and a lot of the code doesn't work and it is written to basically translate python to ruby.
BBBThunda has joined #ruby
<wldcordeiro>
wallerdev: It certainly seems like _why was explaining to himself.
<wallerdev>
such old books
<wallerdev>
does zed even do any active ruby dev anymore
<wldcordeiro>
I don't think so.
<wallerdev>
havent heard his name in years
northfurr has quit [Quit: northfurr]
<benzrf>
who is zed
<benzrf>
o.o
northfurr has joined #ruby
BBBThunda has quit [Client Quit]
<wallerdev>
hes like some self proclaimed badass
<wallerdev>
lol
<wldcordeiro>
He's a programmer that's well known in the python community for his books and his asshole attitude.
<wldcordeiro>
He's seriously kind of a dick
BBBThunda has joined #ruby
<wldcordeiro>
But his main book Learn Python the Hard Way is a good starter.
<wldcordeiro>
His translation to Ruby though was lacking.
<wldcordeiro>
and abandoned though lol
<torresga>
ok, what would be the best book to learn how to use ruby then? are the books that refer to ruby 1.8 and 1.9 still relevant?
<wldcordeiro>
Well 1.9 is still used a lot so I would imagine yes in that case.
<wldcordeiro>
1.8 I wouldn't be too sure.
<wallerdev>
1.8 is unsupported now i believe
<wallerdev>
but its mostly the same stuff
Speed has quit [Ping timeout: 245 seconds]
VTLob has quit [Quit: VTLob]
<wallerdev>
i read pickaxe to start with a long time ago
<wallerdev>
not sure what people read these days
ce_afk is now known as cescalante
sambao21 has quit [Quit: Computer has gone to sleep.]
<benzrf>
i did read the poignant guide
<benzrf>
but i also asked fucktons of questions here
arailsperson has quit [Ping timeout: 240 seconds]
<wallerdev>
i read part of that but gave up haha
<benzrf>
oh zed shaw
<torresga>
yeah i dont know, i keep finding ruby books at barnes and noble from 2008 and i dont want to bother if its not relevant anymore
<torresga>
not that i want to spend my time reading too many books
<benzrf>
i was unaware that he is referred to mononymously these days
<benzrf>
torresga: what langs do u already know?
<wldcordeiro>
torresga: I never buy physical books on coding anymore it's too much hassle to be looking down at your lap then at the screen
<wldcordeiro>
e-books ftw
alex88 has quit [Quit: Leaving...]
<torresga>
i am actually re-learning how to program
<wldcordeiro>
I want a guide to Ruby that isn't aimed at complete beginners.
<torresga>
but with more programming and less reading books
<torresga>
this time
lucianosousa has quit [Quit: lucianosousa]
<torresga>
so i remember some concepts but not all of them
<wldcordeiro>
Zed shaw's books are well structured because they're just exercises that build off each other, but his ruby one is abandoned.
<wallerdev>
pretty sure he hates ruby now or something
<wldcordeiro>
It's just really obvious he's a Python dev that just did the bare minimum to make it work in ruby.
<wldcordeiro>
Which doesn't do the language justice.
BrianJ has quit [Quit: Computer has gone to sleep.]
<wldcordeiro>
I just see all the languages as tools to use. Python is nice, Ruby seems really nice too and my job has a few RoR projects I need to maintain so I want to get a better grasp of what I'm using so my code isn't shit lol
Solnse has quit [Ping timeout: 240 seconds]
<wldcordeiro>
I must say, I dislike _why's usage of spaces after parantheses and mustaches lol
<wldcordeiro>
Don't know if that's a ruby convention but it's a personal preferences.
<wallerdev>
he does his own thing
<wallerdev>
but hes gone from the community now too
rhys has joined #ruby
<wldcordeiro>
wallerdev: I never was in the community when he was around but I heard he kind of went crazy and said peace out.
<wallerdev>
nah
<wldcordeiro>
Well crazier
<wallerdev>
i was around for it and someone posted his identity online
<wallerdev>
and he left
<wldcordeiro>
Ah I see.
rhys_ has quit [Ping timeout: 264 seconds]
<wldcordeiro>
So he got doxxed by some asshat.
<wallerdev>
basically
klaut has joined #ruby
<wallerdev>
he just wanted to remain anonymous
tjsousa has joined #ruby
<metamaterial>
*cough* tor *cough*
<wldcordeiro>
Well when someone figures out the pseudonym you use is you tor won't be of much use.
razrunelord has joined #ruby
<wldcordeiro>
Especially if they post info like your physical wherabouts.
cescalante is now known as ce_afk
jrhe has quit [Quit: Connection closed for inactivity]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<metamaterial>
it seems alot of freenode/ruby users connect with their real names in ident. i use tor here because i dont want to be port scanned etc
zigomir has quit [Remote host closed the connection]
<metamaterial>
you're totally right lol if you want anonymity, it's hard.
<wallerdev>
yeah i connect with my real name on here, i dont do anything crazy on freenode anyway haha
zigomir has joined #ruby
<wldcordeiro>
A determined enough person with resources can find anyone on the planet.
<metamaterial>
yeah professional place
Solnse has joined #ruby
<metamaterial>
>>resources
<eval-in_>
metamaterial => undefined local variable or method `resources' for main:Object (NameError) ... (https://eval.in/146364)
<wldcordeiro>
lol
andrewlio has quit [Remote host closed the connection]
<metamaterial>
=P
<wldcordeiro>
The internet is a pretty good resource.
<wldcordeiro>
But more always helps.
<metamaterial>
if i had resources i'd be living on mars
s2013 has quit [Read error: Connection reset by peer]
havenwood has quit []
s2013 has joined #ruby
nateberkopec has joined #ruby
razrunelord has quit [Ping timeout: 255 seconds]
<benzrf>
well
<benzrf>
how can you remain anon on the internet when you show up to things in person
zigomir has quit [Ping timeout: 240 seconds]
fijimunkii has joined #ruby
<metamaterial>
ask the feds =P
<wallerdev>
people from the internet dont show up to things in person, its a totally different group of people
AlexRussia has quit [Remote host closed the connection]
<krainboltgreene>
Returns the output, but not the return value
<charliesome>
yeah look at the code lol it's super hacky
<krainboltgreene>
Ah, actually, the return value is on the website.
chrisseaton has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
JoeGaudet has quit [Ping timeout: 245 seconds]
supermarin has quit [Ping timeout: 245 seconds]
<krainboltgreene>
Thanks charliesome, much appreciated.
momomomomo has joined #ruby
<jhass>
charliesome: btw can you whitelist the bigdecimal require?
pwh has joined #ruby
<charliesome>
i'll take a look but it's complicated
momomomomo has quit [Client Quit]
<jhass>
great, thanks
senayar_ has quit [Ping timeout: 240 seconds]
brian___ has joined #ruby
bakflash has quit [Ping timeout: 252 seconds]
mrmargolis has quit [Remote host closed the connection]
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
supermarin has joined #ruby
ce_afk is now known as cescalante
zcreative has joined #ruby
havenwood has joined #ruby
CaptainJet has quit []
michaeldeol has joined #ruby
moted has joined #ruby
supermarin has quit [Ping timeout: 265 seconds]
tjsousa has quit [Quit: Computer has gone to sleep.]
mrmargolis has joined #ruby
krainboltgreene has left #ruby [#ruby]
jbomo has quit [Ping timeout: 258 seconds]
predator117 has quit [Ping timeout: 240 seconds]
<Solnse>
i'm trying to parse a webpage and iterate over all the input fields and create a params hash from it, but clearly I'm not doing it right... it doesn't look right to me, but I'm not sure how to do it otherwise... any hints? https://gist.github.com/Solnse/3bd72ea4f3bbe8b93515
<Solnse>
it's not actually an array, i'm parsing the nokogiri document
<centrx>
Either way, it's an enumerable, which has map
<centrx>
*Enumerable
datafirm has joined #ruby
<centrx>
It's a common idiom. There are four main ways to do it which do the same thing, some are faster, some are preferrable style
havenwood has quit []
caleb_io has joined #ruby
Caleb has joined #ruby
mikepack has joined #ruby
caleb_io has quit [Client Quit]
Caleb has quit [Client Quit]
<centrx>
That is: iterating over an Enumerable to return a Hash
<Solnse>
I remember doing this once before many months ago, and I was pushing into a hash... but I guess map would achieve the same thing... I'm working on it now
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
to_h converts the array of pairs into a hash