freezey has quit [Read error: Connection reset by peer]
freezey has joined #ruby
Vert has quit [Remote host closed the connection]
take_cheeze has joined #ruby
Michael__ has joined #ruby
sent-hil has joined #ruby
Michael__ has quit [Remote host closed the connection]
naquad has quit [Ping timeout: 255 seconds]
bbttxu has joined #ruby
UberNerdGirl has quit [Read error: No route to host]
siyusong has quit [Quit: Computer has gone to sleep.]
<Spooner>
swarley_ : How goes the XMLery?
yshh has joined #ruby
UberNerdGirl has joined #ruby
jtperreault has joined #ruby
examancer has joined #ruby
yshh has quit [Remote host closed the connection]
siyusong has joined #ruby
brianpWins has joined #ruby
bbttxu has quit [Client Quit]
mrsolo has quit [Quit: Leaving]
maletor has quit [Quit: Computer has gone to sleep.]
khakimov has joined #ruby
<swarley_>
Spooner; pretty good. Working on finishing the parser
<swarley_>
after i implement a hombrew parser i'm going to test it against the libxml parser (i know its going to be slow, but if its marginal, then i'll just use the libxml parser and iterate through the c data to build my own ruby data)
mikepack has quit [Remote host closed the connection]
dpatel has quit [Quit: dpatel]
maletor has joined #ruby
gabrielr_ is now known as gabrielrotbart
UberNerdGirl has quit [Client Quit]
NemesisD has quit [Ping timeout: 265 seconds]
<swarley_>
you know
<swarley_>
the whole time i was writing this parser i was thinking
<swarley_>
man this is easy
<swarley_>
i must be forgetting something
<swarley_>
and then, just as i'm finishing i think to myself
<swarley_>
how the hell do i know if the tag being closed is of the same type as the last tag that was opened?
rabidpraxis has joined #ruby
<swarley_>
and that's when i threw a book at my own head
stephenjudkins has joined #ruby
nitti has joined #ruby
<havenn>
swarley_: I'd call it a 'strict' parser and be done. >.>
<swarley_>
Lol..
<swarley_>
Well, its a stateful parser
<swarley_>
so adding the tag check isnt that hard
<swarley_>
Just tedious
roadt has joined #ruby
<havenn>
swarley_: Pure Ruby XML parser?
<swarley_>
no, C extension
jrajav has joined #ruby
<havenn>
swarley_: What ya going to call it?
<swarley_>
Right now it's a joke on Nokogiri, calling it Suwarui
rabidpraxis has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
bbttxu has quit [Quit: bbttxu]
glyytchy has quit [Quit: glyytchy]
bradhe has quit [Remote host closed the connection]
<swarley_>
i could probably do it all in ruby since it uses primarily ruby calls, but honestly, i could cut down on the use of ruby strings and use C strings instead in a few places
<swarley_>
plus i just have a feeling using plain C binding over the ruby source is faster by nature
<swarley_>
and i'll need all the speed i can get
lledet has joined #ruby
<swarley_>
havenn; were you around when i was talking about the invocation syntax?
<havenn>
swarley_: Nope.
<swarley_>
oh
<swarley_>
well
<swarley_>
have you seen HAML?
<havenn>
swarley_: Yup.
<swarley_>
It looks similar to that
GoGoGarrett has joined #ruby
<havenn>
swarley_: Nice, that would seem intuitive for folks coming from CSS as well.
d2dchat has quit [Remote host closed the connection]
<swarley_>
] instead of }
<swarley_>
that's to query the regexy
<swarley_>
GAH
bapa_ has joined #ruby
<swarley_>
to query the XML
<swarley_>
sort of like hpricot's xpath syntax
<havenn>
swarley_: Oooh, not what I was thinking. Yeah, interesting.
bapa has quit [Ping timeout: 248 seconds]
icole has quit [Remote host closed the connection]
<swarley_>
it returns an element collection class so you can stack [] calls to simulate levels of /
<havenn>
swarley_: Nice.
<swarley_>
I figured, since XML is dealt with so often, why not make it less of a bitch
sn0wb1rd has joined #ruby
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
GoGoGarrett has quit [Remote host closed the connection]
<swarley_>
and you can do the .text() etc, xpath workings by using proc objects
ryanlecompte has quit [Remote host closed the connection]
artOfWar_ has quit [Read error: Connection reset by peer]
<swarley_>
that implementation is the easy part of course
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
Orcris has quit [Ping timeout: 260 seconds]
austinbv has joined #ruby
<austinbv>
hey anyone have any experience with blocking io
shadoi has quit [Ping timeout: 268 seconds]
<havenn>
austinbv: IO is always blocking me..
<austinbv>
I am trying to block until an IO is ready but for somereason select is returning even when the io is not ready
r4um_ has joined #ruby
Monie has quit [Ping timeout: 244 seconds]
leoncamel has joined #ruby
<austinbv>
blocking for IO sorry
vlad_starkov has joined #ruby
artOfWar has joined #ruby
<austinbv>
I have an IO#puts that I need to block for. IO.select returns the io object as ready to write but the the device does not receive the write.
r4um has quit [Ping timeout: 272 seconds]
Asher has quit [Ping timeout: 246 seconds]
* swarley_
flips a table
<swarley_>
time to give up and go to flex and bison
CaptainJet has quit []
<swarley_>
not really giving up i suppose
austinbv has quit [Quit: WeeChat 0.3.8]
headius has quit [Quit: headius]
sent-hil has quit [Remote host closed the connection]
bbttxu has joined #ruby
g-ram has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
daniel_- has quit [Quit: WeeChat 0.3.9]
zf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Remote host closed the connection]
nitti has quit [Remote host closed the connection]
ElderFain has joined #ruby
chrishunt has quit [Ping timeout: 260 seconds]
mklappstuhl has quit [Ping timeout: 246 seconds]
Tearan has quit [Quit: Sleepy Badger....]
riley526 has quit [Remote host closed the connection]
mmitchell has joined #ruby
artOfWar_ has joined #ruby
Tearan has joined #ruby
hbpoison has joined #ruby
artOfWar has quit [Ping timeout: 246 seconds]
Tearan has quit [Client Quit]
justinmcp has quit [Remote host closed the connection]
murz has joined #ruby
chrishunt has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
TomJ has quit [Quit: TomJ]
hbpoison has quit [Ping timeout: 255 seconds]
sertaconay has quit [Read error: Connection reset by peer]
kdridi has joined #ruby
<kdridi>
hi there
Servidorv has joined #ruby
ukd1 has joined #ruby
<kdridi>
is there any reason that "gem install" became incredibly slow. it tools near 3/5 min to install any gems and processor up to 100% during that time
<swarley_>
what gem are you trying to install?
<swarley_>
and what gem version?
<kdridi>
spree and/or rails
ffranz has quit [Quit: Leaving]
<kdridi>
gem 1.3.7
<examancer>
do you have a ton of gems? thought of using gemsets?
<swarley_>
rails is a huge rem
<swarley_>
with tons of dependencies
<swarley_>
all of which are massive
<examancer>
I think he means its taking longer now than it used to when installing the same gems
<swarley_>
Ah
<examancer>
but I could be wrong
havenn has quit [Remote host closed the connection]
<kdridi>
yes, but i remember that 6 months ago, it take only a few secs
<swarley_>
What's your ruby version?
<examancer>
that could be caused by loads of gem. does `gem list` look scary?
horofox has left #ruby [#ruby]
<kdridi>
i've no gems installed
<examancer>
hmm... then that's odd
<kdridi>
it's a fresh install
<swarley_>
have you upgraded to 1.9.3?
<examancer>
Rails has gotten bigger
<swarley_>
or is it a previous release
Servidorv has quit [Client Quit]
CaptainKnots has joined #ruby
ewanbje has quit [Ping timeout: 256 seconds]
<kdridi>
but even to install bundler, it takes at least 1 minute
<swarley_>
what is your ruby version
<kdridi>
1.8.7
<swarley_>
There is your problem
cbuxton has joined #ruby
<swarley_>
you're using a piece of shit
<swarley_>
It's no longer supported
<jrajav>
GET WITH THE TIMES
<Kovensky>
1.9 has both a much faster VM (YARV) and decent(ish?) unicode support
<swarley_>
You should really consider moving up to 1.9.1 at the minimum, but 1.9.3 is recommended
jeffreybaird has joined #ruby
<examancer>
we still use 1.8.7 at work... so aggrevating
<kdridi>
:x
<swarley_>
examancer; kill it with fire
<Kovensky>
centos also ships with 1.8.7 by default... (thus rhel also does)
wedtm is now known as wedtm|away
<swarley_>
that's abhorrent
<swarley_>
i hate that 1.8.7 still exists in debian repos
<examancer>
we're trying, but we have to use some Solaris stuff, which 1.9 has trouble with
<examancer>
so we have to finish moving off them before we can switch
<swarley_>
because if you do apt-get install ruby
<examancer>
at least that's what I'm told
<swarley_>
it installs ruby-1.8
khakimov has quit [Quit: Computer has gone to sleep.]
<swarley_>
People actually use solaris?
<examancer>
yes. some of their big iron mainframes are still pretty insanely powerful
philips- has quit [Excess Flood]
<kdridi>
hum… actually, that seems a lot better with 1.9
xpen has joined #ruby
<Kovensky>
ZFS is also a pretty decent reason for NAS
<examancer>
Solaris is the first product you see advertised if you go to Oracle.com
kiyoura has joined #ruby
<examancer>
They also claim its the "first cloud OS". Like cetain politicians, the actual truth of the statement isn't important to Oracle, only how it sounds
<examancer>
since its clearly in no way true
philips_ has joined #ruby
medik- has quit [Read error: Connection reset by peer]
khakimov has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<examancer>
ZFS is pretty awesome though. Linux is finally getting close to native support. Only took 7-8 years
JonnieCache has joined #ruby
ukd1 has quit [Quit: Lost terminal]
<Kovensky>
unfortunately Oracle cut it off
<Kovensky>
by ending the opensolaris program (and completely closing the source code for solaris)
cbuxton has quit [Quit: Leaving.]
<Kovensky>
so non-solaris impls are stuck in the last opensolaris version of it
<Kovensky>
Sun wasn't exactly cool but Oracle completely dropped the ball there (and not just with solaris) <_<
choffstein has joined #ruby
cakehero has joined #ruby
nari_ has joined #ruby
<examancer>
I thought Sun was cool. Wasn't perfect, but they were embracing open source (albeit in limited ways) way before pretty much any other company of their size. Certainly cool next to Oracle.
tos9 has quit [Excess Flood]
leoncamel has quit [Ping timeout: 268 seconds]
leoncame` has joined #ruby
<examancer>
they brought us Java, Solaris, and helped drive the virtualization revolution in many ways
freezey has quit [Quit: freezey]
tos9 has joined #ruby
<examancer>
Oracle's trying to take it back, but at least they can't take back everything :-)
rabidpraxis has joined #ruby
pac1 has joined #ruby
pseudo has joined #ruby
VegetableSpoon has joined #ruby
<examancer>
the JVM is pretty awesome, even if just used to run Ruby code
<pseudo>
hi guys, i am having some issues with the ronin library. I was hoping someone might have insight into these errors: http://hpaste.org/76433
radic has joined #ruby
<pseudo>
i installed ronin with ruby gems, i am on gentoo running ruby-1.9.3_p194-r1 using ronin 1.5.0
choffstein has quit [Remote host closed the connection]
<swarley_>
first of all, i must say
chrishunt has quit [Ping timeout: 256 seconds]
<swarley_>
weird prompt you got going there
`brendan has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
mando has joined #ruby
mmitchell has quit [Remote host closed the connection]
<swarley_>
pseudo; try just ruby -rronin/web
Mon_Ouie has quit [Read error: Connection reset by peer]
<swarley_>
see if it throws the same error
<examancer>
the very first require should have returned true. looks like a problem is brewing on line 1
<swarley_>
asumming line 1 is the true first line
<swarley_>
its hard to tell without a number in the prompt ;)
<pseudo>
yes swarley, same error
<pseudo>
and yes, that is the first line :)
<examancer>
well, guess that means it was already required
<swarley_>
does it throw an error or give back a constant
<pseudo>
NameError: uninitialized constant Text
<swarley_>
ah
<swarley_>
Nokogiri::XML::Text
<pseudo>
ruby ~ # Nokogiri::XML::Text
<pseudo>
=> Nokogiri::XML::Text
<swarley_>
require "ronin/web"
<examancer>
oh, i think i understand what's going on. onc sec.
<swarley_>
kk
murz has quit [Quit: Leaving...]
cakehero has quit [Quit: Computer has gone to sleep.]
jeffreybaird has quit [Quit: jeffreybaird]
mmlac has joined #ruby
<examancer>
the superclass mismatch error means ronin/web is trying to re-open Nokogiri::XML::Text but using a DIFFERENT parent class than nokogiri defines
<examancer>
what version of nokogiri do you have pseudo ?
<swarley_>
yeah
<mmlac>
can I stop the execution of the current "when" (in a case) somehow? next, break etc don't work, so how can I skip the rest of the when?
<pseudo>
nokogiri (1.5.5)
<swarley_>
mmercer; you can probably do a catch throw type thing
joeycarmello has joined #ruby
* mmercer
chuckles
* mmercer
redirects
<examancer>
and what version of ronin/web?
<mmlac>
seems hacky
<pseudo>
ronin-web (0.2.1)
<mmlac>
thanks swarley_
<examancer>
looks like Text has the same parent class (CharacterData) in both... only difference is Nokogiri uses the fully qualified constant name
<examancer>
I wonder if ther is something else that is declaring a CharacterData class along the way
mando has joined #ruby
<examancer>
or if ronin/web should even bother at all
<examancer>
i don't think you have to specify the parent to mokey patch
<examancer>
ah, yep, that's the issue. i was looking at master, not 0.2.1 tag
<pseudo>
so how do i install it from the git source?
nitti has quit [Ping timeout: 246 seconds]
Vinz_ is now known as Vinz_`
Vinz_` is now known as Vinz_
JonnieCache has quit [Ping timeout: 265 seconds]
Vinz_ is now known as Vinz_`
hbpoison has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
Vinz_` is now known as Vinz_
otters has quit [Ping timeout: 245 seconds]
<pseudo>
i can execute the ronin-web inside of bin of the git source, but doing 'gem install ronin-web' from within the git directory does nothing to fix the problem
khakimov has quit [Quit: Computer has gone to sleep.]
<swarley_>
herpderpderp
dpk has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
<examancer>
then it will pull down the gem via git, build it, and install it
<examancer>
or you can just clone ronin-web into a local directory, run "gem build ronin-web.gemspec" followed by "gem install name-of-the-gem-file-the-last-command-built"
c0rn_ has joined #ruby
<pseudo>
there it is. thank you examancer and swarley_. you've been a huge help!
ebobby has joined #ruby
<examancer>
sure. either of us should probably have caught it sooner, but we're not getting paid, so... :-)
c0rn_ has quit [Client Quit]
<pseudo>
well thanks again, have a good night!
<swarley_>
no problem. and yeah, i was going to check the github page, but i'm between two major projects and a girlfriend at the moment :)
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
Spooner has quit [Ping timeout: 264 seconds]
chrishunt has joined #ruby
sent-hil has joined #ruby
otters has joined #ruby
kdridi has left #ruby ["Quitte"]
ryanf_ has joined #ruby
mando_ has joined #ruby
pen has quit [Remote host closed the connection]
murz has joined #ruby
Banistergalaxy has joined #ruby
mando has quit [Ping timeout: 264 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
kiyoura has quit [Quit: Leaving]
S1kx has quit [Quit: Leaving]
baroquebobcat has joined #ruby
examancer has quit [Quit: leaving]
Guedes0 has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
kn330 has quit [Remote host closed the connection]
dmiller has joined #ruby
dagnachewa has quit [Quit: Leaving]
rabidpraxis has quit [Remote host closed the connection]
Tearan has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
yaymukund has quit [Ping timeout: 256 seconds]
c0rn_ has joined #ruby
judd7 has joined #ruby
sn0wb1rd has quit [Read error: Connection reset by peer]
<swarley_>
I feel like such a rebel, using #import instead of #include
c0rn_ has quit [Client Quit]
cbuxton has joined #ruby
baroquebobcat has joined #ruby
friskd has quit [Quit: friskd]
baroquebobcat has quit [Client Quit]
sn0wb1rd has joined #ruby
otters has quit [Ping timeout: 245 seconds]
otters has joined #ruby
chin-tastic has joined #ruby
swarley_ is now known as swarley
Johnny5544 has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<Johnny5544>
Just wondering if there's a better way to get all the constant values in a module than: ClassName::MODULE_NAME.constants.map{|m| ClassName::MODULE_NAME.const_get(m)}
[Neurotic] has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
judd7 has quit [Quit: judd7]
Banistergalaxy has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
rburton- has joined #ruby
[Neurotic] has joined #ruby
lledet has quit [Quit: lledet]
<swarley>
Johnny5544; not that i can think of
lledet has joined #ruby
tomsthumb has joined #ruby
elsifaka has quit [Read error: Connection reset by peer]
elsifaka has joined #ruby
alup has quit [Ping timeout: 260 seconds]
justinmcp has joined #ruby
arielpts- has joined #ruby
drago757 has quit [Read error: Connection reset by peer]
drago757 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
dmiller has quit [Remote host closed the connection]
arielpts has quit [Ping timeout: 268 seconds]
dmiller has joined #ruby
alup has joined #ruby
siyusong has quit [Quit: Computer has gone to sleep.]
joeycarmello has joined #ruby
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
hbpoison has joined #ruby
alup has quit [Ping timeout: 265 seconds]
sent-hil has quit [Remote host closed the connection]
CaptainKnots has quit [Quit: bazinga!]
ryanf_ has quit [Quit: broken pipes |||]
kenneth has quit [Quit: kenneth]
sterNiX has quit [Ping timeout: 264 seconds]
love_color_text has quit [Remote host closed the connection]
love_color_text has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
nitti has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
alup has joined #ruby
dmiller has quit [Remote host closed the connection]
sterNiX has joined #ruby
dmiller has joined #ruby
headius has joined #ruby
rabidpraxis has joined #ruby
Scriptwriter has quit [Ping timeout: 260 seconds]
siyusong has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
davidcelis has joined #ruby
sterNiX has quit [Excess Flood]
Chryson has joined #ruby
headius has quit [Client Quit]
sterNiX has joined #ruby
headius has joined #ruby
otters has quit [Ping timeout: 245 seconds]
need_electricity has quit [Quit: Leaving]
chrisramon has joined #ruby
need_electricity has joined #ruby
ryanf_ has joined #ruby
<swarley>
i need someone good with the ruby c api
xpen has quit [Remote host closed the connection]
shadoi has joined #ruby
xpen has joined #ruby
sterNiX has quit [Excess Flood]
Tearan has quit [Quit: Sleepy Badger....]
apok_ has joined #ruby
sterNiX has joined #ruby
apok_ has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby
dmiller has quit [Remote host closed the connection]
reuf has quit [Quit: Leaving]
ryanlecompte has joined #ruby
justinmcp has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 255 seconds]
otters has joined #ruby
kenneth has joined #ruby
arubin has quit [Quit: Computer has gone to sleep.]
take_cheeze has quit [Ping timeout: 268 seconds]
apok has quit [Ping timeout: 255 seconds]
kenneth has quit [Client Quit]
h4mz1d has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
take_cheeze has joined #ruby
shiki has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
jrajav has quit []
ryanf_ has quit [Quit: broken pipes |||]
cr[a]tes has quit [Ping timeout: 276 seconds]
fbernier has joined #ruby
alup has quit [Ping timeout: 272 seconds]
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
tchebb has joined #ruby
kyletcarey has quit [Ping timeout: 260 seconds]
Drewch has quit [Ping timeout: 246 seconds]
c0rn_ has joined #ruby
tchebb has quit [Client Quit]
swarley has quit [Read error: Operation timed out]
yaymukund has joined #ruby
mando_ has quit [Remote host closed the connection]
h4mz1d has joined #ruby
shadoi has quit [Quit: Leaving.]
Konboi has quit [Remote host closed the connection]
tchebb has joined #ruby
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
drago757 has quit [Read error: Connection reset by peer]
drago757_ has joined #ruby
GeekOnCoffee has quit [Read error: Connection reset by peer]
havenn has joined #ruby
ebobby has quit [Quit: Lost terminal]
h4mz1d has quit [Ping timeout: 246 seconds]
xaq has joined #ruby
alup has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
dmiller has quit [Remote host closed the connection]
undersc0re97 has quit [Read error: Connection reset by peer]
joeycarmello has quit [Remote host closed the connection]
kaawee has quit [Read error: Connection reset by peer]
_kW has joined #ruby
_kW is now known as Guest57894
hbpoison has joined #ruby
rabidpraxis has joined #ruby
bairui has joined #ruby
invisime has joined #ruby
greenarrow is now known as ofcom
becom33 has joined #ruby
awestroke has joined #ruby
Servidorv has joined #ruby
<becom33>
I have questions about jruby
<Servidorv>
hey guys good morning
<Servidorv>
what is the command to test ruby code in command promp??
<Servidorv>
ibt
chussenot has quit [Quit: chussenot]
<Servidorv>
or something like that
tk___ has joined #ruby
<becom33>
ruby app.rb sertaconay
hbpoison has quit [Ping timeout: 245 seconds]
<Servidorv>
na is just for one code
<becom33>
you have interactive ruby also . type irb
Konboi has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
<Servidorv>
liirb
<Servidorv>
thanks guys
Konboi has joined #ruby
<becom33>
if I develop a application in jruby and lets say its a open source application . the person whos using it if he have ruby and java installed in his machine , would that be enough ?
<heftig>
no
<heftig>
well
<heftig>
if it's cross-platform enough it might run in any ruby vm
<heftig>
if it requires jruby then it requires jruby
<heftig>
and that isn't java+ruby, it's java+jruby
deadalus has quit [Ping timeout: 256 seconds]
<becom33>
heftig, ahh alright . so is there any gui design IDEs for jruby to design the interface ?
pen has quit [Remote host closed the connection]
<heftig>
becom33: just use whatever to design a GUI in swing and/or swt
<becom33>
ahh ok
samphippen has quit [Quit: Computer has gone to sleep.]
<Uranio>
how could define a method havin 3 (or more) parameters but only one needed, the other as optionals??
<becom33>
heftig, so if I design the swing gui using netbeans that would be fine right ?
<heftig>
i guess
Stalebread has joined #ruby
yshh has quit [Remote host closed the connection]
<heftig>
i don't know the details, but jruby can easily load java classes from ruby code, and the other way around you can embed the jruby interpreter or use jrubyc to create compiled java classes from ruby code
hbpoison has joined #ruby
justinmcp has quit [Remote host closed the connection]
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
choffstein has joined #ruby
samphippen has joined #ruby
cantonic_ has joined #ruby
foo-bar- has joined #ruby
<foo-bar->
ok, in LimeChat now
<foo-bar->
thanks to whoever was crashing me
linoj has joined #ruby
sspiff has quit [Ping timeout: 246 seconds]
sspiff has joined #ruby
hotovson has joined #ruby
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
kaawee has joined #ruby
Guest57894 has quit [Read error: Connection reset by peer]
bapa has joined #ruby
jcaudle has joined #ruby
GoGoGarrett has joined #ruby
pencilcheck has joined #ruby
awarner has joined #ruby
<vectorshelve>
how can I create a wrapper class around a yaml file ?
ssspiff has joined #ruby
choffstein has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 268 seconds]
kaawee has quit [Ping timeout: 256 seconds]
theRoUS has joined #ruby
tos9 has quit [Excess Flood]
vlad_starkov has joined #ruby
ABK has quit [Read error: Connection reset by peer]
sideshowcoder has joined #ruby
arubin has joined #ruby
ttt has quit [Remote host closed the connection]
Servidorv has quit [Ping timeout: 246 seconds]
tos9 has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
<JonnieCache>
foo-bar-: was someone DoSing you over irc?
<JonnieCache>
how very retro
<foo-bar->
yeah, sorry, not this channel
fbernier has joined #ruby
deadalus has joined #ruby
deadalus has joined #ruby
deadalus has quit [Changing host]
<foo-bar->
meant to put that into #emacs
<foo-bar->
byt yeah, my emacs crashes when displaying international characters
<foo-bar->
*but
<JonnieCache>
lol
<JonnieCache>
thats pretty amazing
need_electricity has quit [Quit: Leaving]
<foo-bar->
yeah, that's one way to put it
obryan has joined #ruby
<JonnieCache>
im guessing thats your config though rather than emacs being broken
need_electricity has joined #ruby
arubin has quit [Ping timeout: 245 seconds]
arietis has joined #ruby
v0n has joined #ruby
babinho has joined #ruby
Servidorv has joined #ruby
chussenot has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
radic has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
clj_newb_ has joined #ruby
sailias has joined #ruby
lledet has quit [Quit: lledet]
rabidpraxis has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 260 seconds]
clj_newb has quit [Ping timeout: 260 seconds]
mmlac has quit [Quit: mmlac]
Archisze has quit [Read error: Connection reset by peer]
_justin has quit [Quit: Page closed]
ffranz has joined #ruby
tos9 has quit [Excess Flood]
clj_newb_ has quit [Ping timeout: 248 seconds]
<foo-bar->
it must be
shammancer has quit [Ping timeout: 246 seconds]
clj_newb has joined #ruby
<foo-bar->
but I can't figure it out
_Mon_Ouie_ has quit [Ping timeout: 246 seconds]
shammancer has joined #ruby
_Mon_Ouie_ has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
_kW has joined #ruby
mklappstuhl has joined #ruby
jgonzalezd has joined #ruby
_kW is now known as Guest80824
sterNiX has joined #ruby
tos9 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
radic has joined #ruby
Vert has joined #ruby
irleif has joined #ruby
jrajav has joined #ruby
sambio has joined #ruby
Guest80824 has quit [Read error: Connection reset by peer]
Guest80824 has joined #ruby
mneorr_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
zommi has joined #ruby
<Servidorv>
hey guys
<Servidorv>
i have a question
<Servidorv>
i need to transform this time 2012-10-11 00:00:00 +0000 into this one 2012-10-11 07:00:00 +0000
Ankhers has quit [Remote host closed the connection]
mengu has joined #ruby
<Uranio>
JonnieCache: :D yeah, that more I like it. I was rewriting something like that
<Uranio>
thanks you two...
erichmenge has quit [Quit: Be back later]
nohonor has joined #ruby
ffranz has joined #ruby
* Uranio
will tweet that gem usage
pdelgallego has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
Artheist has joined #ruby
`brendan has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Remote host closed the connection]
erichmenge has joined #ruby
erichmenge has quit [Read error: Connection reset by peer]
psychouroboros has joined #ruby
psychouroboros has quit [Changing host]
psychouroboros has joined #ruby
erichmeng has joined #ruby
ttt has joined #ruby
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
mneorr has joined #ruby
asteve has joined #ruby
dmerrick has joined #ruby
deadalus has quit [Ping timeout: 255 seconds]
Stalebread has quit [Quit: Leaving]
ttt has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Lost terminal]
centipedefarmer has joined #ruby
vlad_starkov has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
heftig has joined #ruby
nari_ has joined #ruby
mhi^ has left #ruby [#ruby]
g0bl1n has joined #ruby
F1skr has joined #ruby
zodiak has joined #ruby
uris has joined #ruby
uris has quit [Read error: Connection reset by peer]
uris has joined #ruby
cakehero has joined #ruby
jgarvey has joined #ruby
freeayu has quit [Remote host closed the connection]
UberNerdGirl has joined #ruby
bbttxu has joined #ruby
UberNerdGirl has quit [Client Quit]
d2dchat has joined #ruby
mahmoudimus has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
sertaconay has joined #ruby
Takehiro has joined #ruby
Drewch has joined #ruby
tomsthumb has joined #ruby
internet_user has joined #ruby
Konboi has quit [Remote host closed the connection]
georgi has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
nohonor_alt has joined #ruby
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
zykes- has quit [Ping timeout: 245 seconds]
nohonor has quit [Read error: Connection reset by peer]
philips_ has quit [Excess Flood]
mneorr has quit [Ping timeout: 260 seconds]
pencilcheck is now known as pen
irleif has quit [Quit: Computer has gone to sleep.]
zykes- has joined #ruby
philips_ has joined #ruby
vlad_starkov has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
sent-hil has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
quest88_ has joined #ruby
dhruvasagar has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
a_a_g has joined #ruby
obryan has quit [Quit: Konversation terminated!]
Takehiro has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
Neomex has quit [Quit: Neomex]
need_electricity has quit [Quit: Leaving]
dmiller has quit [Remote host closed the connection]
samphippen has joined #ruby
need_electricity has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sent-hil has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
quest88_ has quit [Quit: quest88_]
sterNiX has quit [Read error: Connection timed out]
vmatiyko has joined #ruby
joaoh82 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
joaoh82 has joined #ruby
kpshek has quit []
morozovm has joined #ruby
sterNiX has joined #ruby
yxhuvud2 has joined #ruby
mikepack has joined #ruby
schronicles47 has quit [Ping timeout: 246 seconds]
kpshek has joined #ruby
yxhuvud has quit [Ping timeout: 246 seconds]
elliottcable has quit [Read error: Connection reset by peer]
hsbt has quit [Ping timeout: 264 seconds]
hsbt has joined #ruby
nateberkopec has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
nari_ has quit [Ping timeout: 264 seconds]
SegFaultAX|work has joined #ruby
sterNiX has quit [Max SendQ exceeded]
sent-hil has quit [Remote host closed the connection]
tk___ has quit [Quit: ばいばい]
mando has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
mklappstuhl has quit [Ping timeout: 265 seconds]
maesbn has quit [Remote host closed the connection]
niklasb has joined #ruby
sterNiX has joined #ruby
maesbn has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
hbpoison has joined #ruby
maesbn has quit [Read error: Operation timed out]
Ankhers has joined #ruby
bbttxu has quit [Quit: bbttxu]
irleif has joined #ruby
falkenbt has quit [Ping timeout: 245 seconds]
chussenot_ has joined #ruby
chussenot has quit [Ping timeout: 265 seconds]
chussenot_ is now known as chussenot
piotr__ has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
sent-hil has joined #ruby
piotr_ has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
irleif has quit [Client Quit]
davidcelis has quit [Quit: K-Lined.]
need_electricity has quit [Quit: Leaving]
baroquebobcat has joined #ruby
need_electricity has joined #ruby
sent-hil has quit [Remote host closed the connection]
whackatre has quit [Quit: No Ping reply in 180 seconds.]
Takehiro has quit [Remote host closed the connection]
pureluck has joined #ruby
maletor has joined #ruby
joeycarmello has joined #ruby
Spooner has joined #ruby
mahmoudimus has joined #ruby
billy_ran_away has joined #ruby
<billy_ran_away>
So I've noticed over the years that the "best" Ruby code avoids variable assignment.
starship is now known as kkh
sent-hil has joined #ruby
joaoh82 has quit [Remote host closed the connection]
cdzombak has joined #ruby
<billy_ran_away>
For instance instead when a method is generating an array and returning it, "good" looking ruby code will use the inject method and use the implicit return of it.
joaoh82 has joined #ruby
<billy_ran_away>
I've been emulating this style and I pointed it out to a colleague of mine, and he asked, why. And I don't have a good answer...
larissa has quit [Quit: Leaving]
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
xaq has joined #ruby
whackatre has joined #ruby
whackatre has joined #ruby
whackatre has quit [Changing host]
a_a_g has quit [Quit: Leaving.]
<billy_ran_away>
Anyone have any good answers for me?
maletor has quit [Ping timeout: 245 seconds]
ssspiff has quit [Remote host closed the connection]
SegFaultAX|work has quit [Ping timeout: 246 seconds]
<mosez>
ls
CaptainKnots has quit [Quit: bazinga!]
<Mon_Ouie>
billy_ran_away: What did you mean by generating an array?
<Mon_Ouie>
That sounds like what you'd use #map for
<Spooner>
billy_ran_away : Nope (though I find that most times people use #inject, they should be using #with_object anyway ;)). Other than that it is just less code. It makes sense when chaining to use stuff like inject, but as you say, there is no intrinsic value to doing it when it is a whole method, beyond style.
jprovazn is now known as jprovazn_away
ananthakumaran has joined #ruby
mohits has joined #ruby
jrajav has quit []
<Mon_Ouie>
And the reason for that is that it avoids repeating the code to build the array itself all over the place — you just have to call the method with another block on another array
<Spooner>
Mon_Ouie : No, the question is why def x; arr.inject(0) { ... }; end is better than def x; val = 0; arr.each {}; val end
<billy_ran_away>
Mon_Ouie: Trying to find a good example, but if you have an array of arrays or something… I do it to get effect in a couple of places.
noyb has joined #ruby
hoelzro is now known as hoelzro|away
<Spooner>
Or, at least, that is how I read it.
mhi^ has joined #ruby
tjbiddle has joined #ruby
<Mon_Ouie>
He said "generating an array and returning it" — that would (presumably) return an integer
sent-hil has quit [Remote host closed the connection]
_whitelogger__ has joined #ruby
welterde has quit [Ping timeout: 246 seconds]
Dwarf has joined #ruby
jonasac has quit [Ping timeout: 246 seconds]
<billy_ran_away>
My colleague argues that perhaps people coming from other languages won't be familiar with these esoteric functions (fair but kinda pointless) and won't be used to this style.
Debolaz has joined #ruby
_whitelogger_ has quit [Remote host closed the connection]
<Mon_Ouie>
It's not about avoiding assignements really (although arguments in favor of avoiding assignments and states do exist — that's why functionnal programming exists)
pdelgallego has joined #ruby
sent-hil has joined #ruby
vmatiyko has quit [Ping timeout: 245 seconds]
<billy_ran_away>
I'm the experienced Ruby developer here (scary I know) and it's hard to figure out when I'm being picky with others' code and when I have fair points.
Whoop has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
<Mon_Ouie>
Their not esoteric, inject, select, and map are *very* common patterns in programming
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
<billy_ran_away>
Mon_Ouie: I guess for other functional (like) languages, but he does come from more imperative languages like Java and C.
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
sebastianb has joined #ruby
<billy_ran_away>
Or procedural I mean.
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
SuperrMann has joined #ruby
<billy_ran_away>
Mon_Ouie: You have any links for the argument in favor avoiding assignments and states?
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
<Mon_Ouie>
I’ve seen some Java code where there's a bunch of noise that's essentially reimplementing special cases of those, thus lots of repitition (and chances of making silly mistakes while doing it are greater)
<Mon_Ouie>
Probably the wikipedia article on Functionnal Programming would say something about that
jonasac has joined #ruby
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
dpk has quit [Excess Flood]
IrishGringo has joined #ruby
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
dpk has joined #ruby
sterNiX has quit [Ping timeout: 256 seconds]
Spitfire has joined #ruby
Spitfire has quit [Excess Flood]
<billy_ran_away>
Mon_Ouie: Okay thanks
leoncame` has quit [Remote host closed the connection]
<billy_ran_away>
Mon_Ouie: Thanks for the idea to add functional my Google search!
NemesisD has joined #ruby
zommi has quit [Quit: Leaving.]
sterNiX has quit [Max SendQ exceeded]
morozovm has quit [Read error: Connection reset by peer]
welterde has joined #ruby
morozovm has joined #ruby
chrishunt has quit [Ping timeout: 246 seconds]
zmo_ has quit [Quit: Leaving]
Takehiro has joined #ruby
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
ohcibi has joined #ruby
recycle has quit [Remote host closed the connection]
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
skogis has quit [Ping timeout: 255 seconds]
dpk has quit [Excess Flood]
dpk has joined #ruby
g0bl1n has joined #ruby
erichmeng has quit [Quit: Be back later]
JohnBat26 has quit [Ping timeout: 252 seconds]
<JonnieCache>
billy_ran_away: look for side effects as well
Takehiro has quit [Ping timeout: 255 seconds]
<billy_ran_away>
JonnieCache: Side effects?
<billy_ran_away>
JonnieCache: Of avoiding variable assignment?
<billy_ran_away>
JonnieCache: Or of functional programming in general?
pipopopo has joined #ruby
a_a_g has joined #ruby
piotr_ has joined #ruby
sterNiX has quit [Excess Flood]
Virunga is now known as LennyLinux
minijupe has joined #ruby
irleif has joined #ruby
francisfish has quit [Remote host closed the connection]
lledet has quit [Read error: Connection reset by peer]
piotr__ has quit [Ping timeout: 256 seconds]
lledet has joined #ruby
cezar has joined #ruby
cezar has quit [Read error: Connection reset by peer]
sterNiX has joined #ruby
aganov has quit [Remote host closed the connection]
artnez has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<JonnieCache>
"side effects" is a functional programming term
yaymukund has quit [Ping timeout: 260 seconds]
<JonnieCache>
"In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world."
<JonnieCache>
they are to be avoided. its connected to the concepts youre talking about
ryanlecompte has joined #ruby
tvw has quit [Remote host closed the connection]
<kalleth>
so functional programming in my crappy understanding is all about avoiding changing state in your function calls
<kalleth>
but
<kalleth>
what if you have an application that has to store some state
marok1 has joined #ruby
<marok1>
Hello guys
<kalleth>
i.e. pretty much all of them
<kalleth>
idgi
g-ram has joined #ruby
<Mon_Ouie>
At some point you need to do something that has side effects — like doing IO or getting the current time
SuperrMann has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie>
But most of the program's logic could still be expressed in functions without side effects
<marok1>
i try to install gitlab on my server but get an error "Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.)"
<marok1>
i want to install this lib from the debian repository
<JonnieCache>
kalleth: i htink youre supposed to keep all the state in one place, ie. the datastore
sterNiX has quit [Max SendQ exceeded]
<marok1>
but i don't know which package i must install
tjbiddle has joined #ruby
<Mon_Ouie>
In languages that are said to be pure (e.g. Haskell), the separation between code that does no side effect ("pure"), you put most of your logic, and in the one that does, you just use your pure functions with data retrieved from IO, etc.
chrisbolton has joined #ruby
erichmenge has joined #ruby
sterNiX has joined #ruby
dakine has quit [Remote host closed the connection]
kpshek has quit []
dpk has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
billy_ran_away has quit [Quit: Computer has gone to sleep.]
pdelgallego has quit [Remote host closed the connection]
ngoldman has joined #ruby
marok1 is now known as marok
blazes816 has joined #ruby
JohnBat26 has joined #ruby
hbpoison has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
minijupe has quit [Quit: minijupe]
davidcelis has joined #ruby
yshh has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
chussenot has quit [Quit: chussenot]
bapa has quit [Ping timeout: 244 seconds]
yshh has joined #ruby
sideshowcoder has quit [Ping timeout: 240 seconds]
cbuxton has joined #ruby
wallerdev has joined #ruby
coderhut has joined #ruby
sterNiX has quit [Ping timeout: 240 seconds]
lledet has quit [Read error: Connection reset by peer]
Serial_Killer_C has joined #ruby
lledet has joined #ruby
JohnBat26 has quit [Ping timeout: 265 seconds]
khakimov has joined #ruby
artnez has quit [Quit: artnez]
murz has joined #ruby
lil-murph has joined #ruby
bluenemo has quit [Remote host closed the connection]
tPl0ch has quit [Quit: Verlassend]
<lil-murph>
is there a command to rebuild gems after i upgrade my system? errors like /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /usr/lib64/libxml2.so.2) - /var/git/.gem/ruby/1.8/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.so
xorigin has quit [Quit: leaving]
maletor has joined #ruby
hoelzro|away is now known as hoelzro
guilherme_ has joined #ruby
jeffreybaird has joined #ruby
<jcaudle>
lil-murph: could you remove the gem and reinstall?
<JonnieCache>
you could try gem install --force as well
guilherme_ has quit [Client Quit]
irleif has quit [Quit: Computer has gone to sleep.]
<lil-murph>
probably. I'm not actually good with gems. I was wondering if there was a way to do it automatically for all things that might have broken.
murz has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
<jcaudle>
JonnieCache: That's what I was trying to remember...
Guest63152 has joined #ruby
<arietis>
so it looks like bad idea to do form check on client side only :S
mengu has quit [Remote host closed the connection]
<xclite>
that would be correct, arietis
eldariof has quit []
dr_bob has quit [Quit: Leaving.]
Kruppe has joined #ruby
<arietis>
how can i check if user filled all of the fields?
<Xeago>
I've seen many applications that only did that
rakl has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
<arietis>
check hash length?
punkrawkR has joined #ruby
<xclite>
arietis, if this is still sinatra, just check that each required field isn't nil?
reuf has joined #ruby
Meon has quit [Quit: Leaving]
<Xeago>
disabling javascript was enough to sql inject and drop all tables
<Xeago>
didn't even have to read the submitted post
<arietis>
yeah
<arietis>
that's what i did
<arietis>
:)
Xeago has quit [Remote host closed the connection]
<JonnieCache>
the changes that there are do make it more elegent in most peoples opinion, yes
<shevy>
the new lambda syntax stinks, only insane people use it
<Mon_Ouie>
Pip: I think those twos are pretty much the only ones
<shevy>
marok shouldn't debian be able to tell its users that :)
<Pip>
shevy, :D
cardoni has joined #ruby
Guest62439 is now known as dpk
<Spooner>
shevy : I use ->{|x| }, because I feel the ->(x) {} looks too dissimilar to a block. It is, I assume, just to make it look like another language's lambdas?
<shevy>
Pip it's true! try to write ruby class... then suddenly use the -> , it feels totally unfitting there
<shevy>
no real idea Spooner I just feel it just doesn't fit at all into the rest of ruby code
lil-murph has quit [Ping timeout: 268 seconds]
<shevy>
looks like perl 2.0
<shevy>
:)
<shevy>
$object->method();
<shevy>
->(x) {} # this here is reaaaaly ugly
<Pip>
shevy Did Matz explain anything about it?
<shevy>
dunno
A124 has joined #ruby
<shevy>
perhaps in japanese
<Pip>
:D
saschagehlich_ has joined #ruby
<shevy>
I think for a large part, the ruby developers try out new things and see if it works
slainer68 has quit [Remote host closed the connection]
Chryson has joined #ruby
<shevy>
like @@foo
<shevy>
or autoload
<Pip>
Most Ruby developers are from Japan or not ?
<shevy>
hmm those bikes are cool, but I heard too many stories of people getting killed on them so I never got one when I was younger (and now I am way too old for risks)
chrismcg is now known as zz_chrismcg
xaq has quit [Remote host closed the connection]
georgi has quit [Ping timeout: 260 seconds]
pseudo has joined #ruby
thecreators has joined #ruby
mohits has quit [Read error: Connection reset by peer]
rubious has joined #ruby
d2dchat has quit [Ping timeout: 264 seconds]
roadt has quit [Ping timeout: 246 seconds]
g0bl1n has quit [Remote host closed the connection]
jgrevich has joined #ruby
pen has quit [Remote host closed the connection]
d2dchat has joined #ruby
jibi has joined #ruby
jrist-afk is now known as jrist
Takehiro has joined #ruby
ianbrandt has joined #ruby
awarner has quit [Remote host closed the connection]
xaq has joined #ruby
tjbiddle has joined #ruby
<JonnieCache>
blazes816: it was in jest, dont worry. hes definitely not racist
roadt has joined #ruby
<blazes816>
good, I was flippin out over here
<JonnieCache>
although arguably ironic racism is still racism
dmiller has quit [Remote host closed the connection]
sqlbyme has left #ruby [#ruby]
Takehiro has quit [Ping timeout: 255 seconds]
monkegjinni has quit [Remote host closed the connection]
mneorr has joined #ruby
morozovm has quit [Quit: morozovm]
stkowski has joined #ruby
timmow has quit [Quit: is having a nap]
burgestrand has joined #ruby
mmlac has joined #ruby
jrist is now known as jrist-mtg
djdb_ has quit [Remote host closed the connection]
apok has joined #ruby
UberNerdGirl has quit [Quit: UberNerdGirl]
krawchyk_ has joined #ruby
hbpoison has quit [Ping timeout: 246 seconds]
c0rn_ has joined #ruby
alvaro_o has joined #ruby
mucker has quit [Quit: leaving]
greg- has joined #ruby
Chryson has quit [Quit: Leaving]
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
shadoi has joined #ruby
areil has quit [Ping timeout: 246 seconds]
robotmay has quit [Ping timeout: 260 seconds]
<rubious>
Humor must stand the level beyond racism
niklasb has quit [Read error: Operation timed out]
krawchyk has quit [Ping timeout: 272 seconds]
areil has joined #ruby
heftig has quit [Quit: leaving]
cardoni has quit [Ping timeout: 246 seconds]
heftig has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
<arietis>
how do i insert result of form processing into static page?
greg- has quit [Ping timeout: 245 seconds]
<arietis>
or it can't be done with static files?
baphled has quit [Ping timeout: 264 seconds]
Trioke has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<arietis>
i wanna display error page with description of error
<arietis>
dunno which path is easier, perhpas it's better to generate page in script
<arietis>
perhaps*
Stalebread has quit [Quit: Leaving]
Trioke_ has quit [Ping timeout: 246 seconds]
sneakyness_wk has joined #ruby
workmad3 has quit [Read error: Operation timed out]
tk00k has joined #ruby
<tk00k>
ruby ruby ruby ruby
graeme has quit [Quit: graeme]
d2dchat has quit [Remote host closed the connection]
graeme has joined #ruby
<invisime>
tk00k: I lol'd.
<tk00k>
lol
sertaconay has quit [Read error: Connection reset by peer]
<tk00k>
someone told me ruby is better than python
<hoelzro>
that sounds like an opinion!
<tk00k>
that;s what i thought
sertaconay has joined #ruby
<tk00k>
this person was pretty adament
jibi has quit [Quit: .]
locriani_ is now known as locriani
<tk00k>
what would you guys say separates the two
<tk00k>
i've read stuff, but i wanna hear from people that use it
enroxorz-work has joined #ruby
d2dchat has joined #ruby
graeme has quit [Client Quit]
<hoelzro>
well, I've used more Ruby than Python, but I have used both
<hoelzro>
Ruby has a more "fun" feel to it, imo
Spitfire_ is now known as Spitfire
Spitfire has quit [Changing host]
Spitfire has joined #ruby
<alvaro_o>
guys, I'm new on ruby. What kind of stuff do you make with Ruby (besides Rails) ?
<hoelzro>
but that doesn't mean you can't do serious stuff with it, because you can
<tk00k>
how about modules in ruby?
graeme has joined #ruby
<tk00k>
that's one thing i love about python, you can do quite a bit with a few modules
<hoelzro>
tk00k: what do you mean exactly?
<hoelzro>
what modules are available, or?
<tk00k>
mainly, are there a good amount of modules out there? nothing specific, just in general
<hoelzro>
there are a *lot*
<tk00k>
for instance, easygui then tkinter in python opened up worlds for me
<tk00k>
some good gui modules/
<tk00k>
?
<hoelzro>
honestly, some people prefer the feel of Ruby, some prefer Python
<hoelzro>
tk00k: I can't speak to that; I don't do much GUI programming myself
<tk00k>
right on
<tk00k>
well i appreciate the input
irleif has quit [Quit: Computer has gone to sleep.]
lil-murph has joined #ruby
<tk00k>
I'm gonna play around with it
<hoelzro>
cool =)
<hoelzro>
enjoy!
<shevy>
tk00k always depends what you wanna do
robotmay has joined #ruby
perun_ has quit [Ping timeout: 265 seconds]
<Gate>
alvaro_o: I make pretty much any script I need, more common usages are sysadmin script (chef, puppet) and web work (sinatra, rack)
<alvaro_o>
tk00k: you can check Shoes http://shoesrb.com/ . I've also done GUI with tkinter in python, and Shoes seems kind of easier to do cool stuff
<tk00k>
thanks alvaro_o
<tk00k>
ill check it out
cardoni has joined #ruby
Iszak has quit [Quit: User has gone to sleep.]
<Gate>
tk00k: there are also Qt and GTK bindings for ruby
<alvaro_o>
Gate: thanks. I was checking sinatra last night, and I found it very minimalistic, yet very cool
<Gate>
not as easy
mohits has quit [Read error: No route to host]
<Gate>
alvaro_o: honestly I've never used it. I keep meaning to, but any time I throw out rails I wind up just doing straight rack :)
yshh has joined #ruby
<tk00k>
@Gate - thanks. ill have to check that out
<tk00k>
one more question, what's all this "rails" talk with ruby
<tk00k>
anytime i hear about ruby, i hear about ruby rails
<Gate>
tk00k: Ruby on Rails is a web application development framework
pskosinski has quit [Remote host closed the connection]
<tk00k>
hmm interesting
Kruppe has quit [Remote host closed the connection]
<Gate>
tk00k: it is probably the single most common use of Ruby, it is the technology that Twitter, Groupon and hosts of other sites were developed with
<tk00k>
wow. that sounds awesome. i don't care much for js so maybe rails will be better for me
<Gate>
tk00k: Rails doesn't replace javascript, javascript is just one component in a rails app
nricciar_ has quit [Read error: No route to host]
need_electricity has quit [Quit: Leaving]
<arietis>
alvaro_o: sinatra is nice
need_electricity has joined #ruby
sakh has quit [Ping timeout: 246 seconds]
<alvaro_o>
Gate: "With Rack we serve billions of requests per month." <-- what kind of work does rack does ?
<tk00k>
so wait, will you need an understanding of js to fully utilize rails?
<Gate>
tk00k: rack is a standard for how ruby interacts with the web
sakh has joined #ruby
<Gate>
gah, wrong response
<alvaro_o>
i see
<Gate>
tk00k: nope, you can do rails with no javascript, but if you want client-side ajax, you need to write javascript (or coffeescript, a DSL for generating javascript)
dmiller has joined #ruby
chrisramon has joined #ruby
<Gate>
alvaro_o: so both rails and sinatra wind up working through rack to talk to apache/unicorn, whatever HTTPD they are working through
<arietis>
so any idea about my question?
<tk00k>
really appreciate the input Gate. I'm gonna play around with it all and see what its about
<arietis>
i wanna display error html page with description of error, i have static html file for it but i need to add description of error in it
<Gate>
tk00k: awesome. Good luck, and feel free to ask questions, here or in #rubyonrails
<alvaro_o>
thanks Gate
tos9 has quit [Excess Flood]
<Gate>
arietis: I've seen that done quite a few times with middleware, and it makes the most sense to me
cardoni has quit [Quit: cardoni]
tos9 has joined #ruby
<Gate>
arietis: basically you put a rack middleware that just catches exceptions, when it gets one it takes your HTML file (or erb), inserts the error and returns that as the response instead of an empty 500
<Gate>
If I recall correctly, that is how Rails does their pretty exception messages in development environments
<arietis>
Gate: i don't need server errors
<arietis>
it's form validation error
<arietis>
:)
<Gate>
arietis: :) my apologies
irleif has joined #ruby
<Gate>
arietis: this is in rails or something else?
<arietis>
sinatra
love_color_text has quit [Remote host closed the connection]
<Gate>
ah, outside my experience then. Apologies for the assumption.
<arietis>
np
irleif has quit [Client Quit]
krawchyk_ has quit [Remote host closed the connection]
love_color_text has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<tk00k>
okay what's the practical application for the 'puts' command
perun_ has joined #ruby
krawchyk has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
<Gate>
tk00k: debugging and command line applications
<tk00k>
like where would that be necessary, instead of just 'print'
heftig has quit [Quit: leaving]
voodoofish430 has joined #ruby
<Gate>
tk00k: I believe the only real functional difference is when the output is flushed.
love_color_text has quit [Ping timeout: 265 seconds]
<tk00k>
thank you for that. i didn't even think about looking at the documentation. ill be able to navigate myself a bit better now
sertaconay has quit [Remote host closed the connection]
<Gate>
yeah, I'm wrong about that. They seem to flush the same way, one adds endlines and the other doesn't.
<tk00k>
yeah. that's actually really nifty. that can save a few lines of code
d2dchat_ has joined #ruby
prath has quit [Quit: No Ping reply in 180 seconds.]
prath has joined #ruby
sepp2k1 has joined #ruby
Guest80824 has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
clj_newb_ has joined #ruby
havenn has joined #ruby
Axsuul has joined #ruby
daniel_- has joined #ruby
Russell^^ has joined #ruby
clj_newb has quit [Read error: Operation timed out]
need_electricity has quit [Quit: Leaving]
need_electricity has joined #ruby
JonnieCache has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
Servidorv has quit [Ping timeout: 255 seconds]
F1skr has quit [Quit: WeeChat 0.3.9]
tk00k has left #ruby [#ruby]
fermion has joined #ruby
shevy has joined #ruby
arietis has joined #ruby
Archisze has joined #ruby
sent-hil has joined #ruby
cascalheira has quit [Ping timeout: 246 seconds]
ananthakumaran has quit [Quit: Leaving.]
jslowe has joined #ruby
slainer68 has joined #ruby
pipopopo has quit [Ping timeout: 256 seconds]
cascalheira has joined #ruby
samphippen has quit [Ping timeout: 246 seconds]
Ruler_Of_Heaven_ has joined #ruby
joaoh82 has quit [Remote host closed the connection]
joaoh82 has joined #ruby
savage- has joined #ruby
dmiller has quit [Remote host closed the connection]
Takehiro has joined #ruby
burgestrand has quit [Ping timeout: 248 seconds]
samphippen has joined #ruby
voodoofish4301 has joined #ruby
elico has joined #ruby
ryanlecompte has quit [Ping timeout: 268 seconds]
brianpWins has joined #ruby
robotmay has quit [Ping timeout: 246 seconds]
Guest63152 has quit [Ping timeout: 246 seconds]
anderse has quit [Quit: anderse]
skogis has joined #ruby
slainer68 has quit [Ping timeout: 272 seconds]
voodoofish430 has quit [Ping timeout: 256 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
theoros has joined #ruby
stephenjudkins has joined #ruby
<theoros>
i'm trying to use pygments.rb but I'm getting "No header received back" and "Failed to get header" warnings. any ideas? i've got python installed, and pygmentize is on my path
Guest63152 has joined #ruby
<theoros>
sorry, no warnings, errors.
Takehiro has quit [Ping timeout: 255 seconds]
hbpoison has joined #ruby
coderhut has quit [Quit: Page closed]
skogis has quit [Client Quit]
marok has left #ruby ["PRIVMSG #debian.de :Musst du für bezahlen um zum Beispiel private Projekte anlegen zu können."]
clj_newb_ has quit [Ping timeout: 260 seconds]
Markvilla has joined #ruby
Targen has joined #ruby
ananthakumaran has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
francisfish has joined #ruby
jcoglan has quit [Ping timeout: 265 seconds]
saschagehlich has quit [Quit: saschagehlich]
love_color_text has joined #ruby
berserkr has quit [Quit: Leaving.]
tchebb has joined #ruby
elaptics is now known as elaptics`away
freezey has quit [Quit: freezey]
mneorr has quit [Remote host closed the connection]
need_electricity has quit [Quit: Leaving]
<Cool_Fire>
Does anyone know how to match a % in a regex? I know it's some type of modifier too, so I thought I may had to escape it, but that doesn't seem to work either.
need_electricity has joined #ruby
headius has joined #ruby
irleif has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
nitti has quit [Remote host closed the connection]
<sent-hil>
i don't get affiliate commission or anything
pdelgallego has joined #ruby
zemanel has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
<RubyPanther>
shevy: you could always try emacs, there is a lot you could learn, but you don't have to because it has pull-down menus. Welcome to the 90s.
moted has joined #ruby
jbw has quit [Ping timeout: 246 seconds]
anderse has joined #ruby
aquarant_ has joined #ruby
sterNiX has quit [Max SendQ exceeded]
sambio has quit [Ping timeout: 255 seconds]
<jcaudle>
RubyPanther: I actually started with emacs and have since moved to vim
<Cool_Fire>
Oh yeah, and vim has keyboard shortcuts. Welcome to the 80s.
under_my_shoes has joined #ruby
under_my_shoes has quit [Max SendQ exceeded]
UberNerdGirl has quit [Quit: UberNerdGirl]
bradhe has quit [Read error: Connection reset by peer]
sterNiX has joined #ruby
<RubyPanther>
There was a real reason that all major applications had keyboard overlays. That was the menu!
bradhe has joined #ruby
UberNerdGirl has joined #ruby
nitti has quit [Ping timeout: 276 seconds]
Uranio has quit [Quit: WeeChat 0.3.8]
aquaranto has quit [Ping timeout: 245 seconds]
xcvd`` has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
aquaranto has joined #ruby
bradhe_ has joined #ruby
xcvd`` has quit [Client Quit]
ananthakumaran has quit [Quit: Leaving.]
lil-murph has quit [Ping timeout: 260 seconds]
heftig has quit [Quit: leaving]
bradhe__ has joined #ruby
mohits has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
daniel_- has joined #ruby
sagax has joined #ruby
jcaudle has left #ruby [#ruby]
jcaudle has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
jcaudle has quit [Quit: jcaudle]
Vinz_ is now known as Vinz_`
aquarant_ has quit [Ping timeout: 248 seconds]
jcaudle has joined #ruby
bradhe has joined #ruby
bradhe_ has quit [Ping timeout: 244 seconds]
lil-murph has joined #ruby
heftig has joined #ruby
wh232 has joined #ruby
Takehiro has quit [Ping timeout: 255 seconds]
haxrbyte has quit [Ping timeout: 268 seconds]
<nohonor_alt>
newb here: how do i install a package without a .gem file?
<nohonor_alt>
downloaded from git
bradhe__ has quit [Ping timeout: 245 seconds]
jwang has joined #ruby
dmiller has quit [Remote host closed the connection]
<nohonor_alt>
there are a "Gemfile" and a "Rakefile" in the directory
sneakyness_wk has quit [Read error: Connection reset by peer]
bradhe has quit [Read error: Connection reset by peer]
havenn_ has quit [Remote host closed the connection]
<blazes816>
nohonor_alt: is there a .gemspec?
bradhe has joined #ruby
<blazes816>
some_name.gemspec
<nohonor_alt>
yep :-)
jbw has joined #ruby
sneakyness_wk has joined #ruby
<blazes816>
gem build some_name.gemspec
<blazes816>
will build the .gem file
<blazes816>
then gem install the-gem-file.gem
otters has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
hbpoison has joined #ruby
<nohonor_alt>
blazes816, thanks! it seems to work!
<blazes816>
awesome!
<nohonor_alt>
is that the standard way for installing from git?
reset has joined #ruby
michaelthomas has joined #ruby
<nohonor_alt>
*github
arturaz has quit [Ping timeout: 252 seconds]
michaelthomas has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
irleif has quit [Quit: Computer has gone to sleep.]
jamesaxl has quit [Read error: Connection reset by peer]
<RubyPanther>
Yeah, you're trying to rake with only one slipper.
under_my_shoes has joined #ruby
samphippen has joined #ruby
<nohonor>
RubyPanther, is that humour :-/
lledet has quit [Read error: Connection reset by peer]
lledet has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
<RubyPanther>
nohonor: if you have trouble connecting through the gem command, try googling for the gem, download it directly, and then gem install ./foo.gem
<RubyPanther>
If it was funny it was humor, if not it was eccentric babbling.
<nohonor>
RubyPanther, the .gem file doesn't exist in this case
<arietis>
RubyPanther: no idea, i'm new to ruby web apps :)
sideshowcoder has quit [Ping timeout: 240 seconds]
<arietis>
RubyPanther: i just wonder if there is comparison of template types
<allsystemsarego>
Hi, how can I modify elements of a Ruby array on the fly, while I'm "select"-ing them?
<RubyPanther>
arietis: I recommend using the default (erb) unless you have a reason not to
<arietis>
kk, thanks :)
<blazes816>
allsystemsarego: sounds like perhaps you want #map
<RubyPanther>
generally with rails the defaults are more likely to be sensible than whatever is popular this month. ;)
<allsystemsarego>
blazes816, thanks, can you point me to a snippet of code?
<nohonor>
RubyPanther, to install package 1 i need package 2, to install package 2 i need rake-compiler, to install rake-compiler i need rake-compiler.gem which, for some strange reason, i cannot download
piotr_ has quit [Read error: Connection reset by peer]
lteo has joined #ruby
Vinz_` is now known as Vinz_
<nohonor>
not nice, not nice
sent-hil has quit [Remote host closed the connection]
<lteo>
does anyone happen to know if there's a way to use ruby's Resolv::DNS class to do a DNS query from a selected source IP? (say if i am on a system with multiple public IPs)
piotr_ has joined #ruby
<RubyPanther>
nohonor: like I said, google it and download it directly if you are having trouble with the gem command's network connection
<nohonor>
i x
<nohonor>
*sorry
hbpoison has quit [Ping timeout: 245 seconds]
<nohonor>
i can't download it directly, i'm getting a connection reset downloading the .gem
<arietis>
how come there are no site about erb?
<RubyPanther>
so download from a different site
<nohonor>
and the source from github doesn't include a .gemspec or .gem file
<RubyPanther>
if your whole internet was down, you wouldn't be asking
nohonor has left #ruby ["Leaving"]
nohonor has joined #ruby
<arietis>
i suppose erb class in ruby docs is the way to go
<jcaudle>
nohonor: rubygems.org has been having some trouble recently, but this shouldn't be affected by that…
<davidcelis>
lmao if you don't check your .gemspec into git
<RubyPanther>
So? That is where the guides are going to be.
<arietis>
rails uses mvc pattern and i'm not :)
<RubyPanther>
There are older ones, I know there was good erb manual in the form of a blog post back around... 05
nohonor has quit [Quit: Leaving]
IrishGringo has quit [Read error: Operation timed out]
Chryson has joined #ruby
Xeago has joined #ruby
nohonor has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
under_my_shoes has quit [Quit: Leaving]
awarner has joined #ruby
under_my_shoes has joined #ruby
mando has quit [Remote host closed the connection]
swarley has joined #ruby
manizzle has quit [Ping timeout: 272 seconds]
reinaldob has quit [Remote host closed the connection]
<arietis>
RubyPanther: in my case the question is how do i add erb template
<arietis>
should i make new class or what
<swarley>
you should use haml
<swarley>
that what :p
<arietis>
haml seems to be nice
<swarley>
I find it to be much more readable than ERB
Serial_Killer_C has quit [Remote host closed the connection]
<swarley>
the only downside is its not in the standard library
<swarley>
but in general
<swarley>
if you're making a web app
<swarley>
that's the least of your concerns
<RubyPanther>
If you find yourself reminiscing about CGI.pm generated pages, it is time to switch to haml
robustus has joined #ruby
aantix has joined #ruby
<RubyPanther>
depends, if you give them both a "web designer" to pretty things up and they don't know Python, which one are they going to understand? erb
aantix has quit [Read error: Connection reset by peer]
<swarley>
to be honest
beandip has quit [Ping timeout: 256 seconds]
<swarley>
anyone who has any business using any sort of html ish thing, or ruby can understand HAML
beandip has joined #ruby
<RubyPanther>
I think they, to be honest, they would be unlikely to immediately grast even what is a string and what is code without a tutrial.
sambio has joined #ruby
aantix has joined #ruby
<RubyPanther>
If they stuble into erb, well, it is just like 500 other templating system, some SGML tags
<swarley>
meh. Good web devs at least know php or javascript
<RubyPanther>
php is like erb, it is nothing like haml. How would knowing php tell them even which parts are strings and which is code?
<swarley>
What are you even getting at lol? Code is code. 15 minutes looking at the docs gives you the understanding you need
<swarley>
its not that complicated
<RubyPanther>
It is obviously favored by many for various reasons. Readability to people using it every day is one. Readability to random non-coding designers isn't one.
sagax has quit [Remote host closed the connection]
<RubyPanther>
Admit it, even your favorite has cons ;)
<swarley>
# is id like always, . is class like always, % denotes a tag, omitting % denotes a div, using a ruby hash denotes attributes, indentation denotes nesting
<swarley>
it's really way more readable than HTML/ERB
psychouroboros has quit [Quit: Leaving]
<swarley>
Its really a lot easier to have easy to read and maintained HAML than it is to have even mildly attractive XML of any sort
Takehiro has joined #ruby
monkegjinni has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
cascalheira has joined #ruby
Vinz_ is now known as Vinz_`
graeme has quit [Quit: graeme]
Vinz_` is now known as Vinz_
manizzle has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
clj_newb has joined #ruby
hbpoison has joined #ruby
c0rn_ has joined #ruby
<swarley>
is there a way to define a constant at the command line with a flag?
davidcelis has quit [Quit: K-Lined.]
<swarley>
like macro definitions for gcc, -DMACRO=value
awarner has quit [Remote host closed the connection]
jcaudle has quit [Quit: jcaudle]
roadt has quit [Ping timeout: 246 seconds]
jipiboily has joined #ruby
nohonor has quit [Quit: Leaving]
sailias has quit [Quit: Leaving.]
<jipiboily>
Hi guys! Any of you have a hint for me to guess character encoding from a string which is ascii-8bit encoded? From a CSV parse with ruby 1.9 standard csv lib...
thecreators has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<swarley>
But.. You just said its ascii encoded
hbpoison has quit [Ping timeout: 246 seconds]
und3f has quit [Quit: Leaving.]
cdzombak has quit []
<jipiboily>
yeah, that's what the CSV lib is doing, but i's not really
<jipiboily>
ascii == raw
<swarley>
Ah
havenn has quit [Remote host closed the connection]
<jipiboily>
I have one CSV in UTF8, one in ISO-8859-1, and it's only the basics
<swarley>
So, is the CSV lib reading the file itself?
havenn has joined #ruby
<jipiboily>
yup
<swarley>
You can't read the file yourself and pass the result to the library?
<swarley>
This new CSV parser is m17n savvy. The parser works in the Encoding of the IO or String object being read from or written to. Your data is never transcoded (unless you ask Ruby to transcode it for you) and will literally be parsed in the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the Encoding of your data. This is accomplished by transcoding the parser itself into your Encoding.
<swarley>
from the RDOC page
mando has joined #ruby
<jipiboily>
still, the problem is one of the csv format (google contact exported to outlook format) is a UTF8 file with ISO-8859-1 in it (duh!)
chrisbolton has quit [Read error: Connection reset by peer]
mando_ has quit [Read error: Connection reset by peer]
<jipiboily>
and yes, if I give that encoding parameter to the CSV file I get error message due to the fact the file is fucked up, but can't all Google to discuss how they could change that...;)
<jipiboily>
need to figure a way to detect encoding from a raw string
krawchyk has quit [Remote host closed the connection]
answer_42 has quit [Ping timeout: 276 seconds]
<jipiboily>
"raw"
Artheist has quit [Remote host closed the connection]
nanderoo has quit [Quit: Leaving.]
lil-murph has quit [Ping timeout: 260 seconds]
Kruppe has quit [Remote host closed the connection]
R0ute1 has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
jasond has quit [Ping timeout: 256 seconds]
havenn has joined #ruby
withnale has quit [Ping timeout: 256 seconds]
DreadKnight has quit [Ping timeout: 240 seconds]
Gadgetoid has quit [Ping timeout: 256 seconds]
mephux has quit [Quit: w0ots...]
AtoxIO has quit [Remote host closed the connection]
DreadKnight has joined #ruby
DreadKnight has quit [Changing host]
DreadKnight has joined #ruby
UberNerdGirl has joined #ruby
mercwithamouth has joined #ruby
<RubyPanther>
jipiboily: maybe Iconv or something?
mephux has joined #ruby
nitti has quit [Remote host closed the connection]
<jipiboily>
RubyPanther that works for converting, but the problem is that I don't have the source encoding as it's in "raw" ascii
Araxia has joined #ruby
<jipiboily>
I can't find the way to guess the encoding of a "raw" stirng
<jipiboily>
string*
nitti has joined #ruby
JonnieCache has joined #ruby
Gadgetoid has joined #ruby
awestroke has quit [Remote host closed the connection]
<jipiboily>
swarley, RubyPanther: thanks a lot for your hints, really appreciate it! :) Will try to find a way...
<jipiboily>
hehe
havenn has quit [Read error: Connection reset by peer]
lil-murph has joined #ruby
havenn has joined #ruby
monkegjinni has quit [Remote host closed the connection]
awarner has joined #ruby
under_my_shoes has quit [Quit: Leaving]
<RubyPanther>
jipiboily: you could simply try it as utf8 and rescue and do it the other way
under_my_shoes has joined #ruby
Vinz_ is now known as Vinz_`
stephenjudkins has joined #ruby
<jipiboily>
yup, that might work, not rock solid, but could work for me, thought of that earlier, lost the idea since…will try that for sure
otters has joined #ruby
eindoofus has joined #ruby
havenn_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
JonnieCache has quit [Ping timeout: 272 seconds]
<eindoofus>
Hi I just came across this in my Ruby book and I have no idea what it means (I'm coming from a Java background): a[2, 2] = ’cat’ → [1, 3, "cat", 9]
wedtm has quit [Quit: Leaving...]
<eindoofus>
it looks like it would be a location in a multi-dimensional array, but it's not
prath has quit [Ping timeout: 252 seconds]
<swarley>
What?
<swarley>
you have to tell us what a is
<eindoofus>
an array
<swarley>
how was it initialized
wedtm has joined #ruby
<eindoofus>
originally as: a = [ 1, 3, 5, 7, 9 ]
jibi has joined #ruby
robertotauille has quit [Quit: Leaving...]
erichmenge has quit [Quit: Be back later]
<swarley>
ah
<swarley>
i see
graeme has quit [Quit: graeme]
<eindoofus>
does it combine the two entries at position 2 into one and insert "cat" ?
<swarley>
Yes
medik- has joined #ruby
<eindoofus>
oh, nice
<eindoofus>
things are just way to easy in Ruby :)
<swarley>
i didnt even know it had that functionality
mmitchell has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 265 seconds]
jgrevich_ is now known as jgrevich
hadees has joined #ruby
samrose has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 260 seconds]
<arietis>
anyone with sinatra experience?
tvw has joined #ruby
Archisze has quit [Remote host closed the connection]
<davidcelis>
arietis: instead of guru hunting, just ask your question. if someone has used sinatra and knows the answer to your question, they'll likely help you out
<davidcelis>
please add your stack trace to that gist
havenn has joined #ruby
<davidcelis>
including the full error
<arietis>
there are no stack trace
foo-bar- has quit [Remote host closed the connection]
<davidcelis>
so there's no error?
<davidcelis>
then can you be more specific as to what isn't working?
kuzushi has quit [Ping timeout: 246 seconds]
<arietis>
yeah, it just continues as if there are no if
tvw has quit [Ping timeout: 265 seconds]
sent-hil has joined #ruby
<endzyme>
is anyone on familiar with rbvmomi?
tvw has joined #ruby
freezey has quit [Quit: freezey]
axl_ has quit [Quit: axl_]
<arietis>
davidcelis: however if i replace erb :error with redirect "/error.html" it works
elliottcable has joined #ruby
piotr_ has joined #ruby
xorigin has quit [Quit: leaving]
<endzyme>
I am confused as the source calls a particular method (VirtualMachineRelocateSpec) which i cannot find a def for
piotr__ has quit [Ping timeout: 246 seconds]
mark_locklear has quit [Remote host closed the connection]
stephh has joined #ruby
lil-murph has left #ruby ["Leaving"]
sent-hil has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
haxrbyte has joined #ruby
hoofman has quit [Ping timeout: 244 seconds]
<havenn>
Github must come back up now, code withdrawal!!
sent-hil has joined #ruby
<havenn>
Who would DDOS Github?
c0rn_ has quit [Remote host closed the connection]
<davidcelis>
bitbucket
<havenn>
^
<endzyme>
Github is back for me
pdelgallego has quit [Quit: pdelgallego]
<davidcelis>
yeah
harushimo has joined #ruby
bigmcq77 has joined #ruby
<harushimo>
hello
c0rn_ has joined #ruby
Xeago has quit [Remote host closed the connection]
joaoh82_ has joined #ruby
pdelgallego has joined #ruby
joaoh82 has quit [Ping timeout: 260 seconds]
<davidcelis>
harushimo: !hello
<davidcelis>
oops wrong room
wedtm has quit [Quit: Leaving...]
nricciar has joined #ruby
<jipiboily>
RubyPanther, swarley: forcing character encoding and rescuing did it, really not rock solid, but I guess that's fine for my use case. Thanks a lot!
hoelzro is now known as hoelzro|away
<davidcelis>
jipiboily: did we just have to fix the same bug in different apps
<davidcelis>
jipiboily: invalid byte-code sequence in UTF-8?
Takehiro has joined #ruby
elux has quit [Quit: Bye!]
mengu has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
elliottcable has quit [Quit: best short-url ever. <http://ell.io/tt>]
vlad_starkov has joined #ruby
elliottcable has joined #ruby
elliottcable has quit [Client Quit]
walbert has joined #ruby
pseudo has quit [Quit: Lost terminal]
Appineer has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
jcaudle has quit [Quit: jcaudle]
jgarvey has quit [Quit: Leaving]
davidcelis has quit [Quit: K-Lined.]
Takehiro has quit [Ping timeout: 260 seconds]
nemesit|osx has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
sepp2k1 has quit [Remote host closed the connection]
<jipiboily>
I have a UTF8 CSV with ISO8859-1 characters in it….nice one Google! hehe
davidcelis has joined #ruby
nitti has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
dpk has joined #ruby
internet_user has quit [Remote host closed the connection]
becom33 has quit [Quit: Leaving]
headius has quit [Quit: headius]
_md has joined #ruby
nitti has joined #ruby
chin-tastic has joined #ruby
graeme has joined #ruby
piotr_ has quit [Ping timeout: 248 seconds]
und3f has quit [Quit: Leaving.]
joaoh82_ has quit [Remote host closed the connection]
<arietis>
is there any way to tell ruby i wanna stop execution of code after specific block?
jeffreybaird has quit [Quit: jeffreybaird]
joaoh82 has joined #ruby
<arietis>
if i call return i get no output
pdelgallego has quit [Quit: pdelgallego]
<Cool_Fire>
You mean temporarily for debugging purposes?
<Cool_Fire>
Or just as a part of the program flow
Russell^^ has quit [Quit: Russell^^]
mmlac has joined #ruby
arya_ has quit []
irleif has joined #ruby
sent-hil has quit [Remote host closed the connection]
c0rn_ has quit [Quit: Computer has gone to sleep.]
c0rn_ has joined #ruby
elliottcable has quit [Quit: best short-url ever. <http://ell.io/tt>]
arya_ has joined #ruby
hotovson has quit [Ping timeout: 246 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
margle has quit [Quit: Computer has gone to sleep.]
Targen has joined #ruby
havenn has quit [Remote host closed the connection]
kyletcarey has joined #ruby
[Neurotic] has joined #ruby
arya_ has quit [Client Quit]
hotovson has joined #ruby
cbuxton has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
ianbrandt has quit [Quit: ianbrandt]
rudyl313 has joined #ruby
<rudyl313>
does file.flock File::LOCK_EX lock a file such that it is locked to all ruby processes?
jamjam has joined #ruby
cbuxton has joined #ruby
elliottcable has joined #ruby
<rudyl313>
also, does anybody know how to test is a file is already locked?
justinmcp has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
SegFaultAX|work has quit [Ping timeout: 276 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
wtfleming has joined #ruby
awarner has joined #ruby
under_my_shoes has quit [Quit: Leaving]
under_my_shoes has joined #ruby
nyrb has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
SegFaultAX|work has joined #ruby
joaoh82 has quit [Remote host closed the connection]
ianbrandt has joined #ruby
joaoh82 has joined #ruby
carloslopes has quit [Quit: Leaving.]
kirun has quit [Quit: Client exiting]
Astral_ has joined #ruby
Xeago has quit [Remote host closed the connection]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<Spooner>
rudy Docs are clear about your first question: http://www.ruby-doc.org/core-1.9.3/File.html#method-i-flock One way to check if the file is already locked would be to make a non-blocking attempt to lock and then release if the lock succeeds. Still, this information (that it is locked) becomes out of date as soon as it is released, so not necessarily very useful to know.
bigmcq77 has quit [Quit: Computer has gone to sleep.]
greasegum has joined #ruby
dangerousdave has joined #ruby
UberNerdGirl has quit [Quit: UberNerdGirl]
<rudyl313>
Spooner: thanks
allsystemsarego has quit [Quit: Leaving]
<rudyl313>
Spooner: the LOCK_NB option is giving me a "Bad file descriptor every time" :/
tos9 has quit [Excess Flood]
greasegum has quit [Ping timeout: 264 seconds]
daniel_- has joined #ruby
tos9 has joined #ruby
<Spooner>
rudyl313 : You'll need to use File::LOCK_NB | File::LOCK_EX (that is, non-blocking attempt to made an exclusive lock) or are you doing it that way?
DreadKnight has left #ruby ["#Ancient Beast - Master Your Beasts ( http://AncientBeast.com )"]
dnstbr has quit [Quit: Computer has gone to sleep.]
<rudyl313>
Spooner: I'll try that
<rudyl313>
Spooner: that works but doesn't tell me if the file is locked or not
vlad_starkov has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
Serial_Killer_C has joined #ruby
fir_ed has joined #ruby
headius has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<Gate>
Pip: define standardized? By which arbitrary measure do you wish to operate?
<blazes816>
it's standard in my household
nyrb has joined #ruby
<Pip>
Or still Matz controls it
Serial_Killer_C has quit [Remote host closed the connection]
<Gate>
...
<Gate>
Like Linus "controls" Linux, right?
nyrb has quit [Remote host closed the connection]
headius has quit [Client Quit]
<Pip>
Yes
<Pip>
Or Bill.Gates controlling Windows
<Pip>
:D
Ankhers has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 265 seconds]
<Astral_>
:D
LennyLinux has quit [Remote host closed the connection]
alanp has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
joaoh82_ has joined #ruby
<Gate>
I think "control" of an open source project of this size aproaches the oxymoronic, but by that definition yes, Matz is the final word.
<Gate>
I think
_md has quit [Quit: Leaving...]
joaoh82 has quit [Ping timeout: 246 seconds]
<Pip>
Okay, how is Ruby 2.0 going ?
chrisramon has quit [Ping timeout: 246 seconds]
ElderFain has joined #ruby
chrisramon has joined #ruby
heriC has joined #ruby
hbpoison has joined #ruby
<blazes816>
Ruby is a language with no formal spec, so people go off of MRI. Matz is in charge of MRI, but anybody can implement 'ruby' however they would like
rudyl313 has quit [Quit: Page closed]
<Gate>
=> [jruby, rubinius, rubymotion]
<blazes816>
like how headius implemented jruby almost just like MRI, but fast
<Gate>
If there is ever a "specification" document maintained by some committee I will be very afraid.
<heriC>
Anyone know of a way/lib to create nested hash keys on assignment like so: my_hash[:foo][:bar][:baz] = 10
bradhe has quit [Read error: Connection reset by peer]
<Gate>
heriC: I wrote a little function to do that a while back, it is confusing as hell and I use it as an interview question from time to time :) I'll dig it up for you
<Gate>
Pip: I don't know how you are compiling, but usually it involves setting the ARCHFLAGS environment variable
centipedefarmer has quit [Quit: Leaving]
etank has quit [Quit: WeeChat 0.3.8]
<Gate>
so if you are using a script, look for an $ARCHFLAGS or --arch peice, and make sure it is set to --arch x86_64
<Spooner>
pip Just stick with the ruby installer (32bit) on Windows. You wouldn't gain a huge amount from compiling 64bit and the installer version works nicely already ;)
GVRV has quit [Ping timeout: 240 seconds]
rabidpraxis has quit [Remote host closed the connection]
gogiel has quit [Ping timeout: 272 seconds]
<Gate>
cableray: I don't know the specifics. LLVM is a new compiler and isn't strictly compatible with GCC, numerous c/c++ implementations had issues, none of which I know the specifics
<Pip>
okay
<Gate>
you got me curious though :)
joaoh82 has quit [Remote host closed the connection]
tommyvyo has joined #ruby
somazero has quit [Ping timeout: 246 seconds]
<Spooner>
cableray doesn't Rubinius use LLVM anyway?
joaoh82 has joined #ruby
<cableray>
Spooner: I think it does, haven't checked recently though.
Trioke has quit [Read error: Connection reset by peer]
Trioke has joined #ruby
joshman_ has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
pdelgallego has quit [Quit: pdelgallego]
<cableray>
it is weird that apple dropped the gcc compiler for the llvm compiler if it isn't fully compatible.
<Spooner>
cable I don't use it. Google tells me it is all about LLVM though. Depends what you want though (to use that uses LLVM or to speed up general Ruby execution).
stopbit has quit [Quit: Leaving]
<workmad3>
cableray: well, 'compatibility' with C compilers generally means that they produce the same bytecode or compatible object files
swarley has joined #ruby
<cableray>
well, you can use llvm to compile c ruby, or you can use llvm to compile ruby directly.
<cableray>
workmad3: I thought llvm did, it just worked differently.
<swarley>
Is there anyone here already aware of my XML library that is in alpha development?
<swarley>
So that I don't have to explain it
<workmad3>
swarley: I'm not aware, but I'm also not interested enough for you to need to explain it ;)
<swarley>
I was just looking for people I can use as testers in the future :p
voodoofish4301 has quit [Read error: Connection reset by peer]
<Spooner>
swarley : No, you haven't mentioned it before ;)
<swarley>
Spooner: it is the XML master race
<cableray>
workmad3: yea, I guess so. but I'd think like symbols and function signatures would be nearly identical.
<swarley>
Hail swarley XML
slainer68 has quit [Remote host closed the connection]
voodoofish430 has joined #ruby
<workmad3>
cableray: possibly... but 'nearly identical' isn't good enough
<Spooner>
swarley : Though I can't test something I have no use for. I believe there are libraries like rspec that can help with testing :P
A124 has quit [Quit: Leaving.]
<swarley>
NOW TEST IT FOR ME MY LAB RATS, TEST
hbpoison has quit [Ping timeout: 240 seconds]
under_my_shoes has quit [Quit: Leaving]
<swarley>
Well, I've already written some specs, but I figure real world use is the best way to ensure that it works
under_my_shoes has joined #ruby
medik- is now known as medik
<cableray>
workmad3: but isn't it more important to support the syntax than to produce identical binary?
<workmad3>
cableray: sure, if you want to compile code
<workmad3>
cableray: however that's not what compiler compatibility is about
mengu has quit [Remote host closed the connection]
<swarley>
I still hate that I'm using YACC
<cableray>
yeah, that's the issue at hand
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
kpshek has quit []
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<workmad3>
cableray: llvm not being compatible with gcc is a different issue to llvm not being compliant with the C standard for compilation purposes ;)
<workmad3>
cableray: and it was compatibility you were questioning
Pip has quit [Ping timeout: 246 seconds]
<cableray>
workmad3: if the syntax is fully supported, then shouldn't all versions of MRI work on llvm?
mengu has quit [Read error: Connection reset by peer]
<cableray>
compile, i mean.
<workmad3>
cableray: wow, you're optimisitic :P
Pip has joined #ruby
<workmad3>
cableray: you can't even use all versions of GCC to compile MRI :P
<cableray>
ah
mengu_ has joined #ruby
<cableray>
were do issues tend to arise?
mengu_ has quit [Changing host]
mengu_ has joined #ruby
mengu_ has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
v0n has quit [Ping timeout: 252 seconds]
<workmad3>
cableray: I don't know, I've not done enough research
mengu__ has joined #ruby
<cableray>
seems like the places it would happen would be either syntax support, or linking.
mengu__ has quit [Remote host closed the connection]
mengu__ has joined #ruby
lledet has quit [Quit: lledet]
<noobieonrails>
d
sent-hil has joined #ruby
mengu__ has quit [Remote host closed the connection]
<workmad3>
cableray: there's all sorts of places where 'issues' can arise with compilers
mengu__ has joined #ruby
rabidpraxis has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
<cableray>
Yeah, i'm not that familiar with them, although I have built a few simple compilers.
daniel_- has quit [Quit: WeeChat 0.3.9]
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
UberNerdGirl has joined #ruby
daniel_- has joined #ruby
<workmad3>
cableray: I'm not that familiar with them either... but getting things compiled in a stable manner can be somewhat tricky
mengu__ has quit [Read error: Connection reset by peer]
<workmad3>
cableray: and it's not just down to syntax support
slainer68 has joined #ruby
mengu__ has joined #ruby
<workmad3>
cableray: but that's about the limit of my knowledge
mengu_ has quit [Ping timeout: 246 seconds]
<cableray>
yeah, compiling source is the most annoying part of my job/life.
siyusong has quit [Quit: Computer has gone to sleep.]
<cableray>
but it give me regular breaks, so there's that.
gogiel has joined #ruby
<workmad3>
cableray: I'm glad I don't have to do that much anymore :)
<workmad3>
cableray: although I had some... 'fun'... on my last project figuring out how to compile shibboleth
manizzle has quit [Read error: Connection reset by peer]
zodiak has quit [Quit: Leaving]
<cableray>
oh noes
dmiller has joined #ruby
hadees has joined #ruby
swarley| has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<cableray>
luckily, home-brew makes my life pretty easy most of the time.
uris has quit [Quit: Leaving]
swarley has quit [Ping timeout: 246 seconds]
mengu__ has quit [Ping timeout: 272 seconds]
<Gate>
workmad3: so now you brakes come from `rake spec` and `bundle install`.... yeah.
JonnieCache has joined #ruby
manizzle has joined #ruby
carlyle has joined #ruby
Mon_Ouie has joined #ruby
<cableray>
not if you run spec with guard.
<cableray>
but yeah, I just had to run `dvm reinstall all --force`
chrisramon has quit [Quit: chrisramon]
<cableray>
so that's gonna take a while.
jonathanwallace has quit [Remote host closed the connection]
robertotauille has joined #ruby
<cableray>
I have way too many gemsets
jonathanwallace has joined #ruby
<cableray>
but at least it does them all with a single command.
carlyle has quit [Remote host closed the connection]
emmanuelux has quit [Quit: emmanuelux]
gogiel has quit [Read error: Operation timed out]
<cableray>
although now it looks stuck at one of my jruby gem sets, and it couldn't download one jruby version.
UberNerdGirl has quit [Ping timeout: 276 seconds]
robertotauill has joined #ruby
jonatha__ has joined #ruby
jonathanwallace has quit [Read error: No route to host]
JonnieCache has quit [Ping timeout: 246 seconds]
swarley| has quit [Ping timeout: 246 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
robertotauille has quit [Ping timeout: 246 seconds]
UberNerdGirl has joined #ruby
frogprince_mac has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
swarley has joined #ruby
jslowe has quit [Quit: Leaving]
eindoofus has quit [Quit: Leaving]
swarley| has joined #ruby
<swarley|>
Spooner, you will join me in the XML master race. Or I will be forced to send you to the REMXL camps where you will face horrid unknown
<swarley|>
Horrors*
robertotauille has joined #ruby
swarley| is now known as swarles
khakimov has quit [Quit: Computer has gone to sleep.]
swarley has quit [Read error: Connection reset by peer]
judd7 has quit [Quit: judd7]
gabrielrotbart has quit [Remote host closed the connection]
<Gate>
swarles: XML, been there, done that, got the battlescars, have no wish to go back. Ever.
judd7 has joined #ruby
<UberNerdGirl>
nick UberNerdinBrooklyn
Takehiro has quit [Ping timeout: 265 seconds]
robertotauill has quit [Read error: Connection reset by peer]
<UberNerdGirl>
great
g-ram has joined #ruby
UberNerdGirl is now known as UberNerdinBrookl
hbpoison has joined #ruby
<swarles>
Gate, my whole goal with this library is to make xml just a little less of a giant red hot tree trunk lodged in your ass hole
mikepack has quit [Remote host closed the connection]
<Spooner>
swarles : I can't see it as very likely.
<swarles>
Like XmlSimple, but not THAT simpld
Ktaze has joined #ruby
<Spooner>
UberNerdinBrookl : You are in Brookl?
<swarles>
Yeah xml is pretty bad, and I can't finish anything to save my life
<swarles>
But you know what?
<UberNerdinBrookl>
Spooner: I suppose so, now :O
<swarles>
I might finish. And THEN SWARLEY WILL BE THE ONE LAUGHING HAHA >:D
slainer68 has quit [Remote host closed the connection]
nesoi has joined #ruby
<Spooner>
UberNerdinBrookl : I'm sure it is a very nice place.
<nesoi>
hey, how do I iterate through every record in a table using activerecord? I tried Model.each and it didn't like it, I tried Model.find.each and it didn't like it...
<swarles>
Maybe I got get a whole 2 people to use something I write, then I would be twice as useful as I already am
<UberNerdinBrookl>
Spooner: better off here than in Manhatt
<swarles>
Man hat
<swarles>
much better than man underwear
<Spooner>
I dunno. ManHat sounds better.
<nesoi>
for some reason the documentation I'm finding doesn't mention that case
hbpoison has quit [Ping timeout: 240 seconds]
nari_ has joined #ruby
<swarles>
I feel like I was working on another project
<swarles>
What was it..
vlad_starkov has joined #ruby
<nesoi>
swarles: , I know you know the answer to this!
judd7 has quit [Quit: judd7]
h4mz1d has joined #ruby
<nesoi>
how do I iterate through every record in a table using Activerecord
<swarles>
I don't use active record :p
<nesoi>
oh? why not?
<swarles>
I have a terrible case of NIH
<nesoi>
national institutes of health?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<swarles>
Which is why I have a personal wrapper I use around sqlite that makes everything all awesome..
yaymukund has quit [Ping timeout: 248 seconds]
<swarles>
Not invented here syndrome
<swarles>
I hate using other libraries in general
judd7 has joined #ruby
<nesoi>
figured it out
<swarles>
Which is why im writing my own version of a parrot like virtual machine lol
<blazes816>
nesoi: Model.all.each
<blazes816>
aw :(
<nesoi>
blazes816 : I used Model.find(:all).each
<blazes816>
that still works too I guess
<nesoi>
where's the good documentation on this stuff?
<nesoi>
yours looks clearer
<swarles>
Im on page 125 of the dragon book... it's pretty dense
<nesoi>
thanks blazes816. what's the deal with arel?
<blazes816>
what do you mean?
<nesoi>
is it something else?
<blazes816>
it drives AR
<nesoi>
ah ok
noobieonrails has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Nine out of ten l33t h4x0rz prefer it]
somazero has joined #ruby
UberNerdinBrookl is now known as MildNerd
bier has quit [Ping timeout: 265 seconds]
reuf has joined #ruby
<nesoi>
if I create a variable within a do block, it still exists outside the block later?
somazero has quit [Client Quit]
heriC has joined #ruby
<blazes816>
no
<blazes816>
not if it's a local variable
<nesoi>
is it local by default?
<blazes816>
if it doesn't have a @ or $ in front
postmodern has joined #ruby
<nesoi>
ok, so would I create it in front of the block, put values in it in the block, and then they'd still be there after the block?
freeayu has joined #ruby
<nesoi>
also, how does one zero out an entire hash?
<blazes816>
my_hash = {}
<blazes816>
idk about your other question, you should try it
hotovson has quit [Remote host closed the connection]
<nesoi>
declare it as my_hash = Hash.new ?
<blazes816>
that would also work
<blazes816>
they're equal
<nesoi>
ok thanks
<blazes816>
also, i just confirmed, you're correct about the block thing
<nesoi>
thanks. Actually I realized I will be staying in the block so it doesn't matter :)
mando has quit [Remote host closed the connection]
bradhe has joined #ruby
<swarles>
I just finished reading ruby best practices
<swarles>
Pretty good for an intermediate
reuf has quit [Quit: Leaving]
<swarles>
Has some nifty tricks
sneakyness_wk has left #ruby ["bro"]
<swarles>
Advanced users wont get much from it. I only learned one or two new things, but it was a nice review
jibi has quit [Quit: .]
robertotauille has quit [Quit: Leaving...]
heriC has quit [Remote host closed the connection]
bier has joined #ruby
heriC has joined #ruby
<nesoi>
hmm... instead of .each can I get .next? and if so does that next context remain across all blocks which access that table?
<swarles>
I am skimming grounding in ruby or sonething
<swarles>
So far it seems basic, as expected
<swarles>
Wait, am I considered an advanced user or an intermediate user?
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
QaDeS has quit [Quit: Ex-Chat]
hotovson has joined #ruby
AndChat| has quit [Ping timeout: 260 seconds]
elico has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
aajjbb has joined #ruby
elico has joined #ruby
Foxandxss has joined #ruby
irleif has joined #ruby
sent-hil has quit [Remote host closed the connection]
Progster has joined #ruby
<nesoi>
apparently there's no .next!
<nesoi>
?
negev has quit [Read error: Operation timed out]
r1ddl3r has joined #ruby
r1ddl3r has quit [Client Quit]
hbpoison has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
<rubious>
swarles: Could you link to that text?
<rubious>
nesoi, are you in a closure?
<rubious>
can't you just use next?
<nesoi>
what's a closure?
irleif has quit [Client Quit]
<rubious>
a block, an if statement, anything ending with end
hoofman has joined #ruby
c0rn_ has joined #ruby
slainer68 has joined #ruby
<workmad3>
rubious: apart from a def, a class or a module
<nesoi>
ok, so what I'm trying to do is to go through a table sequentially. The table has some rows which need to be totaled, if they contain the same identifier. So I have Model.order("identifier") and plan to iterate through until the identifier changes. But I'm not sure the best way to do that because I haven't found a way to get the next record
<workmad3>
rubious: which all end with 'end' ;)
<workmad3>
rubious: also, technically an if statement isn't a closure
<workmad3>
rubious: because an if statement doesn't have its own scope
drago757 has joined #ruby
<rubious>
workmad3: Gotcha, so a closure must have its own scope
<nesoi>
I would normally use an inner loop to get the next records until the identifier changes, but i haven't found a way to do that so far
<rubious>
Doesn't if have scope though? vars defined inside an if aren't available outside it
<workmad3>
rubious: yes they are
swarles has quit [Ping timeout: 260 seconds]
swarley has joined #ruby
* rubious
furiously launches irb
<workmad3>
;)
swarley has quit [Client Quit]
swarley has joined #ruby
<swarley>
Sorry, what text rubious?
<rubious>
workmad3: you're a monster ;)
shikamaru has quit [Ping timeout: 240 seconds]
<rubious>
swarley: the best practice book you were just referring to
<workmad3>
rubious: and specifically, a closure needs to carry around a context... otherwise it's just a scope
<swarley>
yes one second
hbpoison has quit [Ping timeout: 246 seconds]
<workmad3>
nesoi: why not 'Model.group_by('identifier').sum(:column_to_sum)'
erichmenge has joined #ruby
<workmad3>
nesoi: seeing as you're in rails and activerecord ;)
<rubious>
workmad3: context as in belonging to a class or module?
<nesoi>
workmad3 : I'm in activerecord but not rails. what would that statement do?
drago757 has quit [Ping timeout: 260 seconds]
<workmad3>
nesoi: it would get the database to sum a specific columns values, grouped by distinct values of the identifier
<nesoi>
workmad3 : that's interesting, but I'm not looking to sum anything!
<workmad3>
nesoi: 'rows which need to be totaled'
shikamaru has joined #ruby
<rubious>
swarley: you are my favorite person today.
<swarley>
Yaaaaaaaay
<workmad3>
nesoi: what's that if it's not summing?
rabidpraxis has joined #ruby
<nesoi>
I was unclear or vague. I'm not actually totaling them
slainer68 has quit [Ping timeout: 256 seconds]
<nesoi>
but thanks workmad3!
<workmad3>
nesoi: your other option would be to do something like an each_with_object then, something like 'results.each_with_object({}) {|result, hsh| hsh[result.identifier] = do_something}'
swarley has quit [Read error: Connection reset by peer]
<workmad3>
nesoi: which would basically give you back a hash with stuff stored on a per-identifier basis
shadoi has quit [Quit: Leaving.]
swarley has joined #ruby
lkba has joined #ruby
hotovson has quit [Remote host closed the connection]
<swarley>
I think that the #ruby community should write an encyclopedia of functionality
<workmad3>
swarley: you mean other than the Enumerable documentation? :)
<swarley>
Pft
<swarley>
I mean
<swarley>
If you want to do A
<swarley>
Here is ways b c and d
<swarley>
And why they work
<swarley>
Also, detailed explanation of magic methods
jjang has joined #ruby
<workmad3>
swarley: don't forget about e, h, i, j, k, l, m, n, o, p, ..., z^100...
<swarley>
Oh yeah of course
<nesoi>
workmad3 : that would be fine actually because in this case my table won't be too large, but that would require that the entire table fit in memory, no?
<workmad3>
nesoi: simply by calling .all on it you've loaded everything into memory
<swarley>
But I mean the better ways to do it
<nesoi>
also, my ruby is too rudementary to understand that statement
<workmad3>
swarley: nothing is terrible in all circumstances
<workmad3>
swarley: or almost nothing anyway
ryanf has joined #ruby
<workmad3>
swarley: and some of those ways would be terrible for certain types of A, or for certain wider system issues, but great for others...
c0rn_ has quit [Quit: Computer has gone to sleep.]
<workmad3>
swarley: and this is why such an encyclopedia is doomed to failure (it's been tried... hell, it's the entire point of expert systems)
<swarley>
Well the thing that really matters
ryannielson has joined #ruby
<swarley>
Is the magic
<swarley>
Like the inherited or extended methods
<swarley>
Or the message method
<workmad3>
get ruby metaprogramming
axl__ has joined #ruby
chin-tastic has quit [Remote host closed the connection]
<ryannielson>
Hey quick question. I'm looking to make a site in which the user enters a URL, and the site loads the url they entered, but the html structure is modified, and some scripts and styles are added. What's the best way to go about doing this? Would nokigiri be a good fit?
chin-tastic has joined #ruby
<swarley>
Oh god that question
<workmad3>
RYanNielson: you're looking to create a phishing site?
jonatha__ has quit [Remote host closed the connection]
heriC has quit [Ping timeout: 246 seconds]
<ryannielson>
workmad3: No haha. Basically a little play toy. You enter a url, and it shows the page, with some images modified. Basically like adding moustaches to people or something.
<ryannielson>
So I'd also need to change some of the img srcs when I modify the images on my end.
<ofcom>
Ìû
sterNiX has quit [Quit: Lagging Off]
swarley has quit [Read error: Connection reset by peer]
MentalGrinds has joined #ruby
swarley has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
swarley has quit [Client Quit]
Tarential has quit [Read error: Operation timed out]
samphippen has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
swarley has joined #ruby
Takehiro has joined #ruby
<nesoi>
can I put some kind of list in a hash value? what's the best way to do that?