<ryanf>
f0ster: but you are also definitely doing it wrong
<f0ster>
ryanf: yeah thanks :/
<f0ster>
stupid mistake
<f0ster>
ryanf: do you have a suggestion for a better way ?
krisfremen has joined #ruby
<ryanf>
f0ster: read about link_to, url_for, and named route helpers
<ryanf>
there is no reason that you should ever need to access Rails.application.routes in the normal course of writing a rails app
_nitti_ has quit [Remote host closed the connection]
jrajav has joined #ruby
mengu has left #ruby ["Leaving"]
havenn has joined #ruby
kpshek has quit []
zigomir has joined #ruby
infinitiguy has joined #ruby
luckyruby has quit [Remote host closed the connection]
<f0ster>
ryanf: how else can I dynamically create links to all the actions in all my controllers /
cmyers has left #ruby [#ruby]
infinitiguy1 has quit [Ping timeout: 252 seconds]
infinitiguy has quit [Read error: Operation timed out]
xsdg has quit [Ping timeout: 255 seconds]
yale has joined #ruby
jonahR has quit [Ping timeout: 265 seconds]
joofsh has quit [Remote host closed the connection]
squidBits has joined #ruby
deMiguel has joined #ruby
yfeldblum has joined #ruby
<Gate>
f0ster: To be honest, for a non-trivial site that would be pretty difficult. You would need to filter out any actions which have required parameters (like show, update, edit, create etc)
yshh has quit [Ping timeout: 252 seconds]
xsdg has joined #ruby
blaxter has joined #ruby
Daman has quit [Ping timeout: 272 seconds]
joshman_ has quit [Ping timeout: 246 seconds]
daniel_-_ has joined #ruby
daniel_-_ has quit [Client Quit]
<f0ster>
Gate: well even if I wanted to do it for teh default action, and just get the names of each unique controller name
<f0ster>
would be useful for my purpose
miskander has joined #ruby
<Gate>
Yeah, that could be useful for a lot of purposes, I'm toying around with it
jonahR has joined #ruby
<f0ster>
should be pretty easy if I can get the controller names from that array of hashes
gregorg has quit [Read error: Connection reset by peer]
daniel_- has quit [Ping timeout: 255 seconds]
<f0ster>
just make a new hash keeping track of which controller you have, then makea link to on it if it's only new
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
<f0ster>
Gate: since I'm new to rails I'm getting caught up a bit hehe, still fun to toy with if I have the time..
daniel_- has joined #ruby
<f0ster>
err, new to ruby*
jonahR has quit [Client Quit]
pyx has joined #ruby
krown has joined #ruby
krown has left #ruby [#ruby]
<Gate>
f0ster: there are some really awesome introspection features in ruby, I'm writing up a little snippet that will get you every controller in your application
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
papito_ has joined #ruby
<f0ster>
Gate: awesome thank you
mpfundstein has quit [Read error: Connection reset by peer]
<Gate>
f0ster: the problem with this is in any real-world application there are going to be things in there you need to ignore
zastern has quit [Remote host closed the connection]
kiyoura has joined #ruby
ffranz has quit [Quit: Leaving]
<Gate>
f0ster: For instance, ApplicationController *doesn't* actually serve actions normally, this snipped will get you ActiveAdmin controllers and Devise controllers too
cha1tanya has quit [Quit: Leaving]
<f0ster>
that inherit from ActionController::Base ?
main_ has quit [Ping timeout: 260 seconds]
<f0ster>
hmm okay
efrainolivares has joined #ruby
<Gate>
f0ster: yep, that's the common feature of all controllers in Rails
havenn_ has joined #ruby
<banisterfiend>
Gate: what is 'subclasses' ?
<f0ster>
I guess you could read from the filesystem, but just seemed nicer to do it through reflection some how
deMiguel has left #ruby [#ruby]
<f0ster>
banisterfiend: I imagine it finds all subclasses of the class//
squidBits has quit [Quit: whoops]
<banisterfiend>
f0ster: it's def. not part of Ruby though
bttf has quit [Remote host closed the connection]
<banisterfiend>
could be some weird rails thing, however
<Gate>
Yeah, but I'm trying to find it in the docs, and coming up short
<Eiam>
Gate: its even better when rails changes how something in ruby works
dmerrick has quit [Quit: dmerrick]
<Eiam>
I recall staring at the ruby docs saying "okay, seriously, ruby docs say it works EXACTLY like this" but it wasn't working when the code executed. turned out rails changed the implementation and used the same name
<Gate>
sigh. Just because you can, doesn't mean you should.
sn0wb1rd has quit [Quit: I will be right back]
<Gate>
-_^
<pskosinski>
well… there is require_relative but not load_relative. :( what to use?
<Eiam>
i want to say it was some sort of merge function but I forgot the specifics
<ryanf>
banisterfiend: yes
yshh has joined #ruby
s1n4 has joined #ruby
<Gate>
pskosinski: you *can* use absolute paths. there are two ways of solving it, you can require File.expand_path("./dir/lib")
<f0ster>
Gate: maybe I would get more relevant results if I grabbed all unique controller strings from each route in that Routes list
<banisterfiend>
Gate: why do you name yourself after a 'gate'
<Gate>
banisterfiend: my original nick was gatewarstrek
kerozene has joined #ruby
<Gate>
then I grew up and lost interest in trek
<pskosinski>
Gate: But… I want to let use to specify directory from which I should load libraries. And would like to let him use /user/something/blah and just blah
<f0ster>
star trek ?
<Gate>
then the original trillogy's good name was pissed all over by the prequels
<pskosinski>
to let user *
<banisterfiend>
Gate: what does gatewarstrek mean?
<f0ster>
ive got my gf hoooked on the TNG series, when thats done we are going to do voyager and DS9 but idk which first
<Gate>
banisterfiend: that was the third series, stargate universe. I wanted it to be good. I really did. But it was so.... terrible.
<banisterfiend>
ah, he didnt fake an american accent
postmodern has joined #ruby
<Gate>
Well, lets just say Universe failed the Ruby litmus test.... it didn't make me happy :D
pavilionXP has joined #ruby
breakingthings has joined #ruby
slainer68 has joined #ruby
atno has quit [Read error: No route to host]
atno has joined #ruby
<banisterfiend>
Gate: what was wrong with it?
<Gate>
banisterfiend: this is way OT for #ruby... :)
<Gate>
PM
benlieb has quit [Ping timeout: 272 seconds]
landho has quit [Read error: Connection reset by peer]
jblack_ has quit [Ping timeout: 256 seconds]
landho has joined #ruby
froy has quit [Quit: kablam!]
Takehiro has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
yshh has quit [Ping timeout: 276 seconds]
Virunga has quit [Remote host closed the connection]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
alexim has joined #ruby
Virunga has joined #ruby
zeade has quit [Quit: Leaving.]
Takehiro has quit [Ping timeout: 272 seconds]
stopbit has joined #ruby
woolite64 has quit []
fryguy has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
Squarepy has quit [Quit: Leaving]
joeycarmello has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
jaygen_ has joined #ruby
jaygen has quit [Read error: Operation timed out]
<fryguy>
any ideas why I get unicode instead of newlines when using CoffeeScript.compile? http://pastebin.ca/2299483 only happens in a rails console, but i'm still unsure what about my configuration is making it happen to me
<swarley>
unicode what? lol
dweeb has quit [Read error: No route to host]
<swarley>
\\u0005[enquiry]
Xeago has joined #ruby
jaygen has joined #ruby
<fryguy>
strange thing is thta if i run CoffeeScript compile a second time in the same console, i get \u000e instead of \u0005, so there's some global state that is changing upon invocation of that. not sure what
<swarley>
Maybe you should post an example that has a newline in it
mrdtt has joined #ruby
<fryguy>
swarley: sure, one sec
<swarley>
\\u000e[shift out]
alexim has quit [Quit: bye]
horofox has joined #ruby
jaygen_ has quit [Read error: Operation timed out]
<fryguy>
swarley: here is an example when running from irb (outside of rails): http://pastebin.ca/2299487
daniel_- has quit [Ping timeout: 265 seconds]
<fryguy>
same codebase on a different machine works, so it's something with my local ruby configuration that's the problem, but I'm not sure what (this is my first week doing any sort of serious rails, and I'm working on an existing codebase, so getting thrown into the deep end a bit)
<swarley>
Check your locale?
<swarley>
Maybe try # -*- encoding: utf-8 -*-
mjolk2 has quit [Quit: Leaving]
<fryguy>
swarley: locale is en_US.UTF-8 everywhere (verified by running 'locale')
`brendan has joined #ruby
<swarley>
okay, well that's good. At least you don't have to change any system configurations
<fryguy>
where should I add "-*- encoding: utf-8", to the top of the console script?
ephemerian has left #ruby [#ruby]
`brendan is now known as brendan-
<swarley>
Put that in your console to see if it changes it
<swarley>
enter it in as a ruby comment
Driscoll has quit [Ping timeout: 252 seconds]
<ryanf>
swarley: that is not a thing
<swarley>
Oh, what is it?
mjolk has joined #ruby
mjolk has quit [Remote host closed the connection]
<ryanf>
it's something ruby pays attention to in deciding what encoding a script is in
zigomir has quit [Quit: zigomir]
<ryanf>
it won't do anything in an interactive session
<ryanf>
fryguy: you can try calling .encoding on the string to make sure it isn't in a weird encoding
horofox has quit [Quit: horofox]
<ryanf>
but also I don't really think that's the problem. I'm pretty sure it would never be normal to have all those \u0005s in there
<swarley>
It would if it gets doubly encoded
<fryguy>
ryanf: #<Encoding:UTF-8>
<swarley>
That's weird
<swarley>
What's the ruby version? The same as the other machine?
<fryguy>
i'm sure it's somethign in the rails config that is messing this up, i just don't know where to even begin looking, and people who have maintained the codebase prior to me don't have any idea either, none of them have ever seen this
<fryguy>
swarley: yah, 1.9.3
<swarley>
That's really weird
<fryguy>
i'm on linux though, those guys are on OSX (although linux in production doesn't see this behavior)
benlieb has joined #ruby
<swarley>
uhhhhh
<swarley>
Wow, I really don't know
perun has joined #ruby
brendan_ is now known as brendan_wrk
Daman has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
havenn_ has quit [Remote host closed the connection]
havenn has joined #ruby
threeseven has quit [Ping timeout: 252 seconds]
froy has joined #ruby
pyr0commie has quit [Remote host closed the connection]
dr_neek has joined #ruby
Xeago_ has joined #ruby
Xeago is now known as Guest77520
Xeago_ is now known as Xeago
Guest77520 has quit [Killed (gibson.freenode.net (Nickname regained by services))]
Driscoll has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
jrajav has joined #ruby
<apeiros_>
hm, off-topic, but anybody happen to know how I can figure out, what shell (bash, zsh, sh, …) I'm using?
<apeiros_>
(logged into a server via ssh)
<fryguy>
apeiros_: ps by itself should tell you
<apeiros_>
ps?
<wallerdev>
lol
<wallerdev>
ps is a tool for seeing which processes are running
<wallerdev>
i call my friend fryguy since people call him ryguy
<apeiros_>
ok, I know the `ps` tool, but I'm not sure how I can use it to see what shell I'm using…
assurbanipal has quit [Remote host closed the connection]
<apeiros_>
ah, echo $$, search for the pid…
<wallerdev>
just typing ps
<wallerdev>
tells me bash
<fryguy>
apeiros_: you shouldn't even need to do that, if you've just sshed in, ps alone should only have like 2 things listed
<apeiros_>
wallerdev: not on this system
<apeiros_>
fryguy: you're assuming a gnu/linux, this isn't one
<wallerdev>
so what shell was it? dont leave us in suspense
<apeiros_>
not even ps -p PID works :)
<apeiros_>
`-sh`
<apeiros_>
probably a custom shell
ebobby has quit [Quit: Lost terminal]
<wallerdev>
cool
<wallerdev>
i used a ruby shell once
<wallerdev>
was kinda annoying
<apeiros_>
(it's a synology ds411, they use some custom OS)
<apeiros_>
lol, no `man` command :)
jimeh has quit [Quit: Computer has gone to sleep.]
<wallerdev>
who needs documentation these days :p
tvw has quit [Remote host closed the connection]
<apeiros_>
yeah… the package manager is "ipkg", it's not quite intuitive :)
<apeiros_>
well, I guess I'll stop the off-topic here
xAndy is now known as xandy
<fryguy>
still no idea what's going on with this unicode thing
yshh has quit [Ping timeout: 252 seconds]
shevy has quit [Read error: Operation timed out]
eykosioux_ has joined #ruby
reset has quit [Read error: Operation timed out]
johnmilton has joined #ruby
awarner has quit [Remote host closed the connection]
VegetableSpoon has joined #ruby
marr has quit [Ping timeout: 248 seconds]
eykosioux_ has quit [Quit: eykosioux_]
ryanf has quit [Ping timeout: 276 seconds]
stkowski has quit [Quit: stkowski]
psyanid3 has joined #ruby
s1n4 has quit [Quit: peace out]
_nitti has joined #ruby
kaen has quit [Read error: Operation timed out]
lolcathost has joined #ruby
sepp2k has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
pavilionXP has quit [Read error: Connection reset by peer]
eykosioux_ has joined #ruby
Daman has joined #ruby
Daman has quit [Changing host]
Daman has joined #ruby
Takehiro has quit [Ping timeout: 272 seconds]
shevy has quit [Quit: ""]
yshh has joined #ruby
ossareh has quit [Ping timeout: 276 seconds]
cha1tanya has joined #ruby
horofox has joined #ruby
woolite64 has joined #ruby
Max00355 has joined #ruby
erkules has joined #ruby
miskander has joined #ruby
subbyyy has quit [Ping timeout: 276 seconds]
papito_ has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
kerozene has quit [Ping timeout: 245 seconds]
xyzodiac has joined #ruby
philips_ has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
joeycarmello has joined #ruby
webguynow has quit []
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Ping timeout: 240 seconds]
yale has quit [Ping timeout: 256 seconds]
the_jeebster has quit [Quit: Leaving.]
moos3 has joined #ruby
<erkules>
hiho starting with ruby. I wonder if there is something like perls use strict? my google-foo tells no
crackfu has joined #ruby
kerozene has joined #ruby
<johnmilton>
no need
xandy is now known as xAndy
eykosioux_ has quit [Quit: eykosioux_]
efrainolivares has quit [Quit: efrainolivares]
baphled has joined #ruby
kerozene has quit [Client Quit]
papito_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
bryanjswift has joined #ruby
tommyvyo has joined #ruby
bryanjswift has quit [Client Quit]
drfreeze_ has joined #ruby
eykosioux_ has joined #ruby
Xeago has quit [Remote host closed the connection]
<apeiros_>
lol, jruby on synology ds411 - ~14s startup time :D
Xeago has joined #ruby
<apeiros_>
ok, 20s actually %-S
yoshie902a has joined #ruby
<reactormonk>
apeiros_, scala tricks a bit - they load the repl prompt before the jvm is fully up
drfreeze has quit [Ping timeout: 265 seconds]
<yoshie902a>
does ruby have an easy way to convert strings keys in a hash into symbols?
<apeiros_>
yoshie902a: in rails there's symbolize_keys
<reactormonk>
yoshie902a, sounds like a bad idea though
<apeiros_>
in plain ruby - no.
<yoshie902a>
reactormonk: why is it a bad idea?
<reactormonk>
yoshie902a, depends - where do you get that data from?
<apeiros_>
reactormonk: well, I'll try to talk with headius, he probably has an idea or two. and in the worst case - I'll probably use ruby for daemons, so startup time isn't a huge issue.
<yoshie902a>
reactormonk: from a bunch of government filings that I'm parsing
flip_digits has joined #ruby
<reactormonk>
yoshie902a, fine enough. but why do you need symbols?
elico has joined #ruby
<yoshie902a>
reactormonk: not really sure. what would anyone use a symbol vs string? I guess just preference
<apeiros_>
oh wow… this: 'a = Array.new(10_000) { |i| i }; b = Array.new(10_000) { |i| i*2 }; 1000.times do (a+b)-(a&b) end'
Virunga has quit [Remote host closed the connection]
breakingthings has quit [Ping timeout: 252 seconds]
<apeiros_>
takes ~53s on that system (the 20s startup overhead already subtracted)
<reactormonk>
yoshie902a, does a later step require you to have symbols?
<apeiros_>
and 5.6s on my computer
<reactormonk>
apeiros_, wtf? is that a 20 year old mainframe?
<apeiros_>
reactormonk: synology ds411 NAS
<apeiros_>
1.6GHz ARMv5 with 512MB RAM
graft is now known as Guest30345
<reactormonk>
why the fuck do you run stuff on your NAS with ruby?
<apeiros_>
because I can! why else? :D
moos3 has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Ping timeout: 276 seconds]
breakingthings has joined #ruby
bean has joined #ruby
jbw has quit [Ping timeout: 276 seconds]
rakl has quit [Quit: sleeping]
drfreeze has joined #ruby
eka has joined #ruby
<yoshie902a>
reactormonk: above was an honest question, why would someone use a symbol of key? From my understanding symbols are better, but I honestly lack the knowledge to know why
sorbo_ has joined #ruby
adeponte has quit [Remote host closed the connection]
<reactormonk>
yoshie902a, imho different semantics, but you can use either. Just know that symbols are never garbage-collected
<yoshie902a>
reactormonk: but they also use only one memory id right?
<reactormonk>
yoshie902a, yep
eka has quit [Client Quit]
drfreeze_ has quit [Ping timeout: 255 seconds]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
breakingthings has quit [Ping timeout: 252 seconds]
erkules_ has joined #ruby
breakingthings has joined #ruby
erkules has quit [Ping timeout: 240 seconds]
jbw has joined #ruby
erkules_ has left #ruby [#ruby]
xyzodiac has quit [Quit: Computer has gone to sleep.]
The_8472` has joined #ruby
joeycarmello has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
xAndy is now known as xandy
moshee has joined #ruby
The_8472 has quit [Ping timeout: 265 seconds]
xyzodiac has joined #ruby
wedgeV has joined #ruby
wedgeV has quit [Client Quit]
Takehiro has joined #ruby
F1skr has joined #ruby
shevy2 has joined #ruby
belga_ has joined #ruby
wedgeV has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Ping timeout: 272 seconds]
belga_ has quit [Client Quit]
xyzodiac has quit [Quit: Computer has gone to sleep.]
hotovson_ has joined #ruby
shammancer has quit [Remote host closed the connection]
xyzodiac has joined #ruby
<yoshie902a>
any idea why " FISCAL YEAR END:".gsub(/^[\t ]*(.*):/) { |m| ":"+m.gsub(" ","_").downcase} results in :____fiscal_year_end rather than :fiscal_year_end
hotovson has joined #ruby
hotovson_ has quit [Ping timeout: 272 seconds]
shammancer has joined #ruby
<notbrent>
yoshie902a: you can use strip with that and save yourself some trouble
<notbrent>
" FISCAL YEAR END".strip.gsub ...
shammancer has quit [Client Quit]
niklasb has quit [Ping timeout: 248 seconds]
<yoshie902a>
notbrent: no I can't, I need to gsub the right part. I need to preserve all formatting that is in front of FISCAL
shammancer has joined #ruby
<notbrent>
tried putting it into rubular.com ?
boushko has joined #ruby
mmokrysz has joined #ruby
<yoshie902a>
notbrent: I did, it seems to get the write parts
boushko has left #ruby [#ruby]
<yoshie902a>
s/write/right
havenn has joined #ruby
hotovson has quit [Read error: No route to host]
<mmokrysz>
Hey. Anyone familiar with the bindata gem (http://bindata.rubyforge.org/)? I'm looking to do an AND operation for two int32s, and just wanting to see if I'll need to implement it myself or if it's built in?
miskander has quit [Quit: miskander]
<notbrent>
well you're replacing all spaces with underscores
<notbrent>
so that will certainly cause your problem
cha1tanya has quit [Quit: Leaving]
pskosinski has joined #ruby
griffindy has joined #ruby
<notbrent>
so you just want to maintain the same number of spaces beforehand? or is there something else there?
<notbrent>
i'm not sure gsub with a block does what you think it does
miskander has joined #ruby
NuckThePainAway is now known as Nuck
tommyvyo has quit [Quit: Computer has gone to sleep.]
<_46bit>
Saenius: To the best of my knowledge ~everything in 1.8 still works in 1.9
tommyvyo has joined #ruby
<Saenius>
senks
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<shevy>
yea
MattRb has joined #ruby
amaya_the has joined #ruby
Takehiro has joined #ruby
Saenius has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<sorbo_>
Saenius: 1.9, the 1.8 stuff should still work.
<sorbo_>
+1 for Ruby Monk and Koans
<sorbo_>
Online: Try Ruby, Codecademy, Code School
<sorbo_>
Books: Programming Ruby, The Ruby Programming Language, Eloquent Ruby
<sorbo_>
and, of course, Why's (Poignant) Guide to Ruby, but
<sorbo_>
that might be a little too trippy
<sorbo_>
especially if English isn't your first language
jduan1981 has quit [Ping timeout: 260 seconds]
miskander has joined #ruby
miskander has quit [Client Quit]
<Paradox>
pickaxe book
<Paradox>
!
pnkbst has joined #ruby
d2dchat has quit [Remote host closed the connection]
<sorbo_>
yeah, Programming Ruby == pickaxe
flip_digits has quit [Read error: Connection reset by peer]
horofox has quit [Quit: horofox]
emmanuelux has quit [Quit: emmanuelux]
imami|afk is now known as banseljaj
whitedawg has joined #ruby
ebobby has quit [Quit: Lost terminal]
huoxito has quit [Quit: Leaving]
miskander has joined #ruby
pnkbst has quit [Remote host closed the connection]
Gooder has joined #ruby
aytch has joined #ruby
love_color_text has quit [Remote host closed the connection]
pnkbst has joined #ruby
djdb has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<aytch>
trouble with strings.to_i - can anyone explain what's happening here? http://pastie.org/5625405
deadlytoah has quit [Ping timeout: 255 seconds]
jekotia has quit [Remote host closed the connection]
<sorbo_>
aytch: What are you trying to do by calling to_i on "f"?
andrewhl has joined #ruby
<aytch>
nevermind. I realized my mistake.
<sorbo_>
K
<aytch>
blurry eyes made me think the 4 was an A
<aytch>
tired and been hacking on stuff I barely understand
<sorbo_>
Got it. By definition, #to_i returns 0 if it doesn't find something it can make into a number (e.g. "4")
<sorbo_>
What are you working on?
<aytch>
Yeah, that's what I realized when I actually typed in A
<aytch>
Just a silly "choose the numbers" game
<aytch>
I was helping out a newer user than myself earlier, and got inspired to challenge myself to add some more features
<sorbo_>
Cool
<aytch>
I can throw out newbie code/scripting really quick, but I've been trying to do a lot more of optimization and refactoring (e.g., better ways of doing it)
<amaya_the>
Guys , What about pass a method to a method?
<Saenius>
libruby1.9.1 rbbr ri ri1.8 ruby-atk ruby-cairo ruby-gdk-pixbuf2 ruby-glib2 ruby-gtk2
<Saenius>
ruby-pango ruby1.8
<swarley>
ew..
<Saenius>
pulls 1.8, as without it?
<amaya_the>
ryanf: sorry for that!
<swarley>
That's too many 1.8s for me
sayan has joined #ruby
rakl has joined #ruby
rakl has quit [Remote host closed the connection]
toekutr has joined #ruby
dewdarang has joined #ruby
Saenius has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
baphled has quit [Ping timeout: 252 seconds]
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
coderhut has joined #ruby
amaya_the has joined #ruby
coderhut has quit [Client Quit]
coderhut has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
deadlytoah has quit [Ping timeout: 260 seconds]
coderhut has quit [Client Quit]
_46bit has quit [Quit: Leaving.]
coderhut has joined #ruby
rakl has joined #ruby
jetblack has quit [Quit: Bye]
coderhut has quit [Client Quit]
koshii has joined #ruby
robbyoconnor has joined #ruby
dewdarang has left #ruby [#ruby]
ehm_may has joined #ruby
flip_digits has joined #ruby
kiyoura has quit [Quit: Leaving]
Gooder` has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
Coeus has quit [Ping timeout: 260 seconds]
Gooder has quit [Read error: Connection reset by peer]
koshii has quit [Read error: Connection reset by peer]
koshii has joined #ruby
jaywastaken has quit [Remote host closed the connection]
tommyvyo has joined #ruby
Umren has joined #ruby
cha1tanya has quit [Quit: Leaving]
koshii has quit [Ping timeout: 264 seconds]
octarine_ is now known as octarine
koshii has joined #ruby
mva has joined #ruby
<mva>
hi there!
mmokrysz has joined #ruby
love_color_text has joined #ruby
<mva>
can somebody advice me, what should I do to send new version of fcgi gem (patched to work with ruby19 by me) if I'm not maintainer/original developer? And if original upstream seems to be dead.
ananthakumaran has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
<Optimistic>
Now, the viewer is displaying three images, but it's still displaying an array (triggered by .each)… http://pastebin.com/g3BpKR10
sn0wb1rd has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
amaya_the_ has joined #ruby
amaya_the has quit [Ping timeout: 255 seconds]
amaya_the_ is now known as amaya_the
ananthakumaran has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
tvw has quit [Remote host closed the connection]
banisterfiend has joined #ruby
vlad_starkov has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
kennyvb has quit [Ping timeout: 255 seconds]
Proshot has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
kennyvb has joined #ruby
kennyvb has quit [Ping timeout: 248 seconds]
daniel_- has joined #ruby
kennyvb has joined #ruby
postmodern has quit [Quit: Leaving]
JohnBat26 has quit [Ping timeout: 276 seconds]
Gooder` has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
hamed_r has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
mmokrysz has quit [Quit: Leaving.]
hotovson_ has joined #ruby
love_color_text has quit [Remote host closed the connection]
lolcathost has quit [Ping timeout: 276 seconds]
adambeynon has joined #ruby
reset has joined #ruby
postmodern has joined #ruby
daniel_-_ has joined #ruby
daniel_- has quit [Read error: Operation timed out]
arietis has joined #ruby
mrdtt has quit [Quit: mrdtt]
zmo_ has quit [Quit: Leaving]
jacktrick has joined #ruby
lateau has joined #ruby
jacktrick is now known as Guest58113
zmo_ has joined #ruby
Virunga has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
horofox has joined #ruby
horofox has quit [Client Quit]
MattRb has quit [Quit: MattRb]
staafl has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
lolcathost has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
amaya_the has joined #ruby
daniel_-_ has quit [Ping timeout: 240 seconds]
Nss has joined #ruby
skcin7 has quit []
clooth has quit [Read error: Connection reset by peer]
clooth has joined #ruby
lkba has quit [Quit: Bye]
yfeldblum has joined #ruby
jds has joined #ruby
staafl has quit [Quit: Leaving]
froginvasion has joined #ruby
hamed_r has quit [Ping timeout: 240 seconds]
<froginvasion>
Can someone link me to a place where "<<" is explained? I'm looking at some metaprogramming examples, but I cant figure out what it does
dhruvasagar has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<apeiros_>
looks like a bad hack
<apeiros_>
it looks like it'd work off of pwd, which in itself is not a good idea (which is why '.' was removed from $LOAD_PATH in 1.9)
<apeiros_>
also I'm quite in favor of explicitly listing your dependencies.
main_ has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
yoshie902a has joined #ruby
<apeiros_>
and the author forgot to make the methods module_function's, nicely breaking other people's code…
<apeiros_>
karlfreeman: ^
<karlfreeman>
apeiros_: ^
<charliesome>
i am a fan of every file requiring its own shit
<yoshie902a>
in rspec testing does order of a hash matter to a test to pass? e.g. data[:document].should == {a: 1,b: 2} vs data[:document].should == {b: 2,a: 1} , it so, is there a way to make it not matter?
<charliesome>
so you can then require any file by itself and it will work
<apeiros_>
charliesome: exactly (that's what I meant by "explicitly list your deps")
<karlfreeman>
apeiros_: Thanks, just stumbled on the require_all method's in some code I'm looking at and figured I'd throw it out there to see if its not just me that thinks its a little strange
<charliesome>
oh yeah, misread that
<yoshie902a>
s/it/if
Elhu has joined #ruby
<apeiros_>
and yes, exactly what you said and for the reason you said, charliesome :)
<yoshie902a>
apeiros_: do you ever sleep? wow, I'm impressed
<karlfreeman>
charliesome: so instead of having initialiser style require files ( eg dir glob app / lib ) make sure each file requires what it needs.
<apeiros_>
yoshie902a: I'm a robot
<yoshie902a>
apeiros_: well, i'm impressive robot at that :)
<yoshie902a>
s/i'm/one
<apeiros_>
charliesome: re your tweet - how can Marshal.load execute code?
<charliesome>
it can't by itself
<apeiros_>
(unless some moron fails to implement .allocate properly)
<charliesome>
but i'm assuming you're going to call methods on whatever Marshal.load returns
<charliesome>
there is a class in activesupport that is kind of dodgy
<charliesome>
no comment on any further details
<apeiros_>
hm
<apeiros_>
ok
<charliesome>
it's not really a problem with AS
<apeiros_>
(not whitelisting userinput is a bad idea anyway)
<charliesome>
you shouldn't really unmarshal user input anyway
<charliesome>
because then you can get any object back
yacks has quit [Ping timeout: 252 seconds]
<charliesome>
yet i have seen gems that blindly unmarshal user input
Virunga has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
Takehiro has joined #ruby
karlfreeman has left #ruby [#ruby]
atmosx has joined #ruby
yshh has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 272 seconds]
yshh has joined #ruby
Optimistic has quit [Quit: Leaving.]
Monie has quit [Read error: Connection reset by peer]
dweeb has joined #ruby
rismoney has quit [Ping timeout: 260 seconds]
zmo_ has joined #ruby
segv- has joined #ruby
baphled has joined #ruby
rezzack has quit [Quit: Leaving.]
yacks has joined #ruby
Virunga has joined #ruby
robbyoconnor has joined #ruby
horofox has joined #ruby
Doc_X has joined #ruby
koshii has quit [Ping timeout: 256 seconds]
Doc_X_ has quit [Read error: Connection reset by peer]
sayan has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 260 seconds]
wallerdev has quit [Quit: wallerdev]
AlbireoX has quit [Remote host closed the connection]
AlbireoX has joined #ruby
<yoshie902a>
I wish I understood spec better! ugh
eykosioux_ has joined #ruby
AlbireoX has quit [Ping timeout: 246 seconds]
pmros has joined #ruby
<pmros>
hi
Elhu has quit [Quit: Computer has gone to sleep.]
eykosioux_ has quit [Client Quit]
mpfundstein has quit [Read error: Connection reset by peer]
mpfundstein has joined #ruby
<pen>
how do I compile and install a project on local harddrive I forked from another github project to rubygem?
hekin has joined #ruby
elico has quit [Quit: elico]
<pmros>
you need a rubygem account
<yoshie902a>
pen: just run bundle install, am I missing something?
<pen>
well, do I need to? I just want to test
<pmros>
you can test local gems
<pen>
not packaged yet
<pen>
it's a local copy
<pmros>
there is rake tasks
<pen>
hmm, it has a Gemfile, but with one line gemspec
<pen>
I wonder what that does
<yoshie902a>
pen: just upload it to github and set your gem file to point to it
<pen>
yoshie902a: but I want it to be system wide, so it is under rubygems
<pen>
but if I use bundler it is only limited to the folder it was run in
<pen>
isn't it?
<pen>
and
<pen>
it's only a test
<yoshie902a>
pen: ya, but you get the gem you want, like all other gems. every gem install is folder specific
<pen>
I just made some changes
jds has quit [Remote host closed the connection]
<pen>
but how does gem install works?
<pen>
it also installs bin in the bin folder, so there must be a way to install it system wide
<pen>
I mean /usr/local/bin
<pmros>
sudo gem install
jds has joined #ruby
<yoshie902a>
pen: you don't want a system specific gem install. what if you develop another project and the gem is incompatible
<pen>
yoshie902a: but all gems installed through "sudo" gem install is system wide
<pen>
I just want to test it and it should work under any folder
<yoshie902a>
pen: sudo is dangerous
<pen>
this is the project I forked and make a copy
<pen>
well, not anymore on my system
<pen>
because I OWN the directory
<pen>
so I don't need sudo for gem install
sayan has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
<pen>
the problem is, now I have git clone the project from github and made some modification, how am I going to test it without registering a gem account and upload my changes? besides it uses the same name as the original gem
sayan has quit [Remote host closed the connection]
<yoshie902a>
pen: just upload your gem to github, and set your gem file to point to the changed gem repo
horofox has quit [Quit: horofox]
<pen>
my gemfile? is there a global system wide gemfile?
<ddd>
you said its not a gem. it has no gemspec file, so its not a gem
<pen>
?
<pen>
I didn't say that
<pen>
I said gemfile
<yoshie902a>
"pen: I told you there is no gemfile"
<pen>
it's for rubygem development
<pen>
gemfile is not gemspec file
<pen>
...
<ddd>
*and* if it *was* a gem, then what yoshie902a said is perfetly correct. upload your gem to github, set your :git => line in Gemfile and bundle install
<ddd>
done/done
<pen>
ddd: that's assuming I'm working on a project that depends on another project, but that's not what I want to do
<pen>
I'm developing for a rubygem
<ddd>
sigh.
<ddd>
and?
<pen>
so I cannot use a gemfile that depends on itself, or places that doesn't have the code I want
<ddd>
ok, you're being combative. that *is* what you need to do if you're going to use it. anyways. I've other things to do if you want to be combative
<pen>
actually there is now an easier way
<ddd>
later
<pen>
rake install
<pen>
I'm not
<ddd>
which does *exactl* what i just told you
<ddd>
s/exactl/exactly/
<ddd>
rake install does the exact same thing that I just told you to do manually
<pen>
that's only after I found the article
<pen>
and so much later
<ddd>
oh please
<ruzu>
anyone know why a sinatra get route would fail randomly? :\ i have a get '/images/:format' route that works for everything but /images/2 ... there's no logic, only a puts, so i'm perplexed why it's randomly failing with a 'doesn't know that ditty' just for 2
Guedes has joined #ruby
<pen>
ddd: you just want someone to say thanks to you right? Thanks~~~~
<pen>
ddd: 1 up
<ddd>
pen: Umm i couldn't give a rat's ass if you say thanks to me or not
<pen>
ddd: then fine
<ddd>
I told you the right stuff, you're accusing me of telling you too late?? bite me
<pen>
right stuff at the wrong moment
<ddd>
riiight
<ddd>
here's your refund
Xeago has quit [Ping timeout: 272 seconds]
pavilionXP__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
tchebb has quit [Ping timeout: 255 seconds]
stevechiagozie has joined #ruby
ebouchut has joined #ruby
browndawg has joined #ruby
xandy is now known as xAndy
<yoshie902a>
pen: people are are volunteers, be nice and don't expect anything. if someone can help, they usually do, but they are not purposely trying to annoy you or waste your time. appreciate any and all insights they provide, even if they are not exactly what you are looking for
Guedes has quit [Excess Flood]
Guedes has joined #ruby
karasawa has joined #ruby
<pen>
I understood, I'm not trying to be rude. I am glad to help others in need if possible, I didn't expect to find the solution so quick on the net that's all :\
<clooth>
I am become senile.
v0n has quit [Ping timeout: 276 seconds]
tchebb has joined #ruby
<yoshie902a>
pen: always google before posting in IRC, it avoids people getting annoyed. there are a lot of people that just want a quick answer and don't want to work. the IRC gets annoyed of these people
hukl has quit [Quit: Leaving...]
<yoshie902a>
pen: I'm not the smartest, or skilled, but I always good first :) good luck on your project
<pen>
yes, people love to come to irc for a quick answer and that is very common
Kneferilis1 has joined #ruby
<yoshie902a>
s/good/google
<Kneferilis1>
hello
<pen>
google luck? lol
<yoshie902a>
google first
climberrs has joined #ruby
<yoshie902a>
and good luck :)
<Kneferilis1>
I have a python (flask) project that uses cake to watch and compile coffeescripts to javascripts
<Kneferilis1>
I want to do something similar with SASS
<Kneferilis1>
can you help?
Guedes has quit [Read error: Operation timed out]
Vivid_ has joined #ruby
pskosinski has joined #ruby
yaroslav has quit [Quit: yaroslav]
pmros has quit [Quit: Konversation terminated!]
<Kneferilis1>
what I have in mind, is calling a script from a subprocess that watches for changed sass scripts and compiles them on its own
<Kneferilis1>
I suppose, that would be a ruby script?
<Kneferilis1>
or compass?
heftig has quit [Quit: leaving]
<Kneferilis1>
so, the subprocess would be created by python
<Kneferilis1>
that's how I monitor and compile coffeescripts
lolcathost has quit [Read error: Operation timed out]
Guedes has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
samuel02 has quit [Remote host closed the connection]
willob has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
tenmilestereo has joined #ruby
daniel_-_ has joined #ruby
sepp2k1 has joined #ruby
v0n has joined #ruby
Guedes has quit [Excess Flood]
Guest65385 has quit [Quit: Leaving]
Guedes has joined #ruby
sepp2k has quit [Ping timeout: 272 seconds]
climberrs has quit [Quit: This computer has gone to sleep]
jrajav has joined #ruby
hukl has joined #ruby
lolcathost has joined #ruby
niklasb has joined #ruby
bluOxigen has joined #ruby
<ruzu>
there's a gem called guard that can watch files and execute whatever you want, not overly familiar with it though -> https://github.com/guard/guard
<Kneferilis1>
btw, is twitter bootstrap a solution like that of grid 9?
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
infinitiguy has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
jrajav has joined #ruby
<ruzu>
i think they're similar, yes... but i'm not much of a frontend guy :p
<Kneferilis1>
cool
Guedes has quit [Ping timeout: 276 seconds]
ToTo has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 272 seconds]
pavilionXP has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
Takehiro_ has quit [Read error: Connection reset by peer]
infinitiguy has quit [Quit: Leaving.]
nomenkun has joined #ruby
<yoshie902a>
I'm using YAML.load() to load to parse some data, but one value includes a "&" character and when it gets parsed, it drops the "&" character. any ideas on how to prevent the dropped character? I googled an found that YAML provides node anchors ( & ), which might be part of the issue. any ideas are welcome. thanks
gp5st has joined #ruby
<gp5st>
does anyone know of a sear engine i can use for a static site? i can precompute the index when i render it, i just need something to return results. I could whip up something, but why re invent the wheel.
<yoshie902a>
gp5st: elasticsearch is good as is solr
<gp5st>
i was hoping for something more lightweight
<yoshie902a>
gp5st: full document search or just a field?
<gp5st>
well, full document, but i can pre-computer an index. i mean, don't get me wrong, the abilities of solr are awesome, but i just want a small script to complement a flat-file blog
<yoshie902a>
gp5st: google site search is a non-ruby solution, but prob. what you want since it's so simple
<gp5st>
yeah. i had thought about it, but i wanted something on my end, instead of a saas
<yoshie902a>
Hanmac: sorry, forgot this is just ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
<yoshie902a>
gp5st: sorry, I'm out of suggestions
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<atmosx>
yoshie902a: never again repeat the same mistake
<atmosx>
yoshie902a: we don't forget, we don't forgive.
statarb3 has quit [Read error: Connection reset by peer]
<atmosx>
!
<atmosx>
I'm about to sleep on the keyboard
Pip has joined #ruby
<yoshie902a>
atmosx: boy your tough
<atmosx>
what's with food and sleep, they play well together
<atmosx>
yoshie902a: yeap, I know. I'm ilke black belt on Jiu Jitsu. I could kill 15 chinese with my pencil
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<atmosx>
s/on/in/on/in
<Pip>
Simple question, why is Python faster in performance than Ruby?
<atmosx>
Pip: no idea, how can you tell anywya?
<atmosx>
I assume that depends on the code implementatoin, libraries/gem used etc.
<Pip>
Well, I mean maybe Python has higher quality implementation than Ruby does
solidoodlesuppor has joined #ruby
* gp5st
feels like someone is trying to start a flame war in a normally docile and useful channel
* Pip
grins
crackfu has joined #ruby
<atmosx>
Pip: sure, the syntax sucks bigtime and I hate tuples (personally). It's something with the name… Then again what's with the lang name? Python? Seriously? A snake?
<Pip>
Python has tuples too
tenmilestereo has quit [Quit: Leaving]
<atmosx>
ruby doesn't.
<atmosx>
that's why python sucks
<atmosx>
because of the tuples
<atmosx>
you got your answer.
<Pip>
Oh
<Pip>
Tuples make Python faster?
* Pip
gets bored with Python
<atmosx>
who gives a shit about faster in this era? what are you on a 286?
hekin has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
<yoshie902a>
apeiros_: any idea how to solve my "&" character from disappearing from my yaml value? e.g. 'NATURAL GAS TRANSMISSION & DISTRIBUTION [4923]' is becoming 'NATURAL GAS TRANSMISSION DISTRIBUTION [4923]'
<yoshie902a>
you are the YAML genius
uris has joined #ruby
horofox has quit [Read error: Connection reset by peer]
<shevy>
lol
<atmosx>
yoshie902a: you 'yaml' and use pych?
<atmosx>
err yoshie902a you load yaml and use psych?
hukl has joined #ruby
horofox has joined #ruby
<apeiros_>
yoshie902a: when presenting problems, try to create a reproduceable example
<apeiros_>
because you see, for me it works fine:
<apeiros_>
YAML.load('foo: "NATURAL GAS TRANSMISSION & DISTRIBUTION [4923]"') # => {"foo"=>"NATURAL GAS TRANSMISSION & DISTRIBUTION [4923]"}
<apeiros_>
(even without the double-quotes)
whitedawg has joined #ruby
<atmosx>
"--- NATURAL GAS TRANSMISSION & DISTRIBUTION [4923]\n...\n" here too.
hamed_r has quit [Quit: Leaving]
<yoshie902a>
interesting, let me, get my code
miskander has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
chussenot has joined #ruby
horofox_ has joined #ruby
wermel has joined #ruby
slainer68 has joined #ruby
sayan has joined #ruby
yale has joined #ruby
horofox has quit [Ping timeout: 252 seconds]
horofox_ is now known as horofox
rakl has quit [Quit: sleeping]
<yoshie902a>
apeiros_: good advice. I tracked the issue, but to Nokogiri. when it's parsing the page it is dropping the "&". I just assumed it was the YAML parsing. I'm googling now
<apeiros_>
& is a special char and should be escaped/encoded in html…
<apeiros_>
i.e. it sounds like your html was invalid…
<apeiros_>
(&)
<apeiros_>
btw., the part about reproducable examples isn't just an advice, it's a requirement :-p
karasawa has quit [Ping timeout: 240 seconds]
<yoshie902a>
apeiros_: the issue is that it's not HTML, it's crappy XML used for the SEC
slainer68 has quit [Ping timeout: 272 seconds]
<yoshie902a>
apeiros_: will follow it in the future
<yoshie902a>
to escape &, should I just gsub the whole document? I'm assuming this could be trouble too.
<yoshie902a>
I don't want to escape the whole document because there are valid characters like < > " ' that need to be there. & in certain places could be valid too
codechewing has joined #ruby
KRF has joined #ruby
yale has quit [Ping timeout: 252 seconds]
<apeiros_>
yoshie902a: it might be that nokogiri provides options to deal with bad xml
<yoshie902a>
apeiros_: I'm reading through it now
clooth has quit [Quit: clooth]
<codechewing>
Hi all. I'm using the spriting feature with Compass & Sass. And a random string is appended to the sprite's filename. E.g. spritename-asdg237as8dg.png. I don't want this random string appended to the filename. Does anyone know which Ruby or config file inside of the Compass directory contains this operation? I can't find it to disable it.
vlad_starkov has joined #ruby
pskosinski has quit [Remote host closed the connection]
pskosinski has joined #ruby
whitedawg has quit [Quit: Leaving.]
xyzodiac has joined #ruby
pskosinski has quit [Remote host closed the connection]
pskosinski has joined #ruby
Xeago has joined #ruby
<apeiros_>
yoshie902a: you could parse it as html
<apeiros_>
the html parser is a bit more relaxed
<apeiros_>
it could cause other issues, though
griffindy has joined #ruby
whitedawg has joined #ruby
thone_ has joined #ruby
<apeiros_>
Nokogiri::HTML::DocumentFragment.parse('<foo>bar & baz</foo>').to_xml # => "<foo>bar & baz</foo>"
<yoshie902a>
i'm playing with some options now, HTML is one of them. HTML made everything break. all spec no longer pass. I need to see why first
robbyoconnor has quit [Ping timeout: 246 seconds]
<apeiros_>
working with bad xml is no fun… I'd hit the responsible person or company
<apeiros_>
(I mean it, contact them and tell them their output is broken)
<yoshie902a>
apeiros_: I wish I could, it's from SEC filing and they are from thousands of different companies. no way to get consistent output.
Kneferilis1 has left #ruby [#ruby]
<Hanmac>
i dont do HTML but when i do its XHTML
<apeiros_>
yoshie902a: you get input from thousands of different companies?
<apeiros_>
I'd probably do an automated rig which validates the xml of each source first and tells me which sources provide invalid input
Xeago has quit [Ping timeout: 272 seconds]
<apeiros_>
and then contact them
<apeiros_>
it's not like you'd have to make an individual email for each of them. just a standard "the data you provide is not valid xml, please blabla"
thone has quit [Ping timeout: 252 seconds]
clooth has joined #ruby
jaywastaken has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
yshh has quit [Remote host closed the connection]
hukl has quit [Quit: Leaving...]
<yoshie902a>
apeiros_: they are from government filings, historical and it's not really XML, it's some weird government version of it. Also, no way to get these companies to fix historical filings. I wish it was as easy as , please fix your output. This is a big project for such a newbie like me, but I'm trying. :)
<shevy>
you are a good newbies
<shevy>
but you use XML so you must be crazy :(
miskander has quit [Quit: miskander]
robbyoconnor has joined #ruby
benlieb has joined #ruby
drago757 has joined #ruby
f0ster has joined #ruby
blaxter has joined #ruby
jaywastaken has quit [Remote host closed the connection]
gp5st has left #ruby [#ruby]
hukl has joined #ruby
<Hanmac>
shevy i use it for map format
mikeycgto has joined #ruby
mikeycgto has quit [Client Quit]
f0ster has quit [Remote host closed the connection]
<yoshie902a>
shevy: forced to deal with it, not by choice
clooth has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
_nitti has quit [Ping timeout: 260 seconds]
samuel02 has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
miskander has quit [Quit: miskander]
willob has quit [Quit: Leaving.]
benlieb has joined #ruby
willob has joined #ruby
swex has quit [Read error: Operation timed out]
swex has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
ryannielson has joined #ruby
codechewing has left #ruby [#ruby]
madwilliamflint has joined #ruby
kirun has joined #ruby
Iszak has quit []
mmokrysz has joined #ruby
Myconix has joined #ruby
slainer68 has joined #ruby
JohnBat26 has joined #ruby
Nss has quit [Read error: Operation timed out]
Banistergalaxy has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
RagingDave has quit [Quit: Ex-Chat]
AndChat| has quit [Ping timeout: 264 seconds]
RagingDave has joined #ruby
_nitti_ has quit [Remote host closed the connection]
atno has quit [Quit: Leaving...]
QKO has quit [Ping timeout: 255 seconds]
jaywastaken has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
tommyvyo has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
f0ster has joined #ruby
<f0ster>
what is the difference between a function in a class that is defined with "self.function", is the self function static, and otherwise not (e.g tied to an instantiation of the class, rather than the instantiation of the class definition)
ananthakumaran has quit [Quit: Leaving.]
<banisterfiend>
f0ster: try again, that doesnt really make a lot of sense :P
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<f0ster>
banisterfiend: I was told that even class definitions are instantiated objects
frogstarr78 has quit [Remote host closed the connection]
<banisterfiend>
f0ster: that's true, what's your question though? :)
<f0ster>
so self would be on that, and not-self would be on actual objects of the class, and not the class def
<f0ster>
just making sure I understand the difference between self/not-self on a method/class function
frogstarr78 has joined #ruby
<banisterfiend>
f0ster: to understand what's really going on, you need to understand metaclasses
<banisterfiend>
f0ster: otherwise you'll only have a "sort of" understanding that wont be entirely accurate
<banisterfiend>
f0ster: block parameter.... ;) maybe you need to do a detour and learn about blocks before your learn about metaclasses ;)
<banisterfiend>
you*
<f0ster>
yeah.. im totally newb hehe
<f0ster>
just learning as I encounter.
<banisterfiend>
cool
<f0ster>
ty banisterfiend :)
hoelzro|away is now known as hoelzro
koshii has quit [Ping timeout: 255 seconds]
asteve has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
yshh has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
mmokrysz is now known as _46bit
eka has quit [Quit: Computer has gone to sleep.]
yshh has quit [Ping timeout: 272 seconds]
Hanmac has joined #ruby
<yoshie902a>
within my XML/HTML tags, I have UUencoded data. I can not use .unpack("u") on escaped data, is there a reverse escape method? I can't seem to find it.
<s7ry93r>
any guidance on gem pathing not working on Mac OSX 10.7?
<Hanmac>
convert "&" to "&" is easy but for the other direction you need gems like noko
<apeiros_>
& is invalid, it's &
<Hanmac>
that what i meand
wroathe has joined #ruby
mpfundstein has quit [Read error: Connection reset by peer]
alvaro_o_ has joined #ruby
<Hanmac>
s7ry93r what ruby version what path problems?
headius has joined #ruby
mpfundstein has joined #ruby
<apeiros_>
Hanmac: CGI is part of stdlib, so aedorn's way works fine without a gem :)
<apeiros_>
but since yoshie902a works with nokogiri anyway, I don't see why he'd need it
<s7ry93r>
1.8 … Mac OSX 10.6 defaults I believe
zmo_ has quit [Quit: Leaving]
_46bit has left #ruby [#ruby]
<yoshie902a>
apeiros_: I'm doing more testing with your recommendation. So confused right now
whitedawg has quit [Quit: Leaving.]
<yoshie902a>
apeiros_: thank you, l
<yoshie902a>
will let you know what I find
<s7ry93r>
my gem env looks good … I can run gems from irb … but not from an rb file
miskander has joined #ruby
<Hanmac>
s7ry93r require "rubygems"
<s7ry93r>
give it a shot
whitedawg has joined #ruby
<aedorn>
I saw 'built in' so I assumed no gem ..
alvaro_o has quit [Ping timeout: 260 seconds]
<ryannielson>
What's the best way to run command line from ruby and stick the resulting output into a variable?
<s7ry93r>
Hanmac … thanks so much … it worked
<yoshie902a>
apeiros_: I don't know what I would do without you! I was using .to_s instead of .text!!!!
<yoshie902a>
apeiros_: Thank you
<s7ry93r>
:)
<yoshie902a>
aedorn: thank for the recommendation too! I saw that and htmlentities both could have been another alternative
_nitti has joined #ruby
<apeiros_>
ryannielson: define 'best'
adkron has joined #ruby
<ryannielson>
apeiros_: Well I guess how to you do it. Kernal.system() seems to just return true or false and print the output. I want to get that output into a variable
<banisterfiend>
jrabbit: if you install the gem in pry, using gem-install, then you can just require it
<banisterfiend>
jrabbit: otherwise you have to run: Gem.refresh ; require 'yourgem'
Xeago has joined #ruby
horrror has joined #ruby
horrror is now known as hrr
<apeiros_>
ryannielson: ok, since you didn't define 'best', I'll just give you all I know:
johnnyporkchop has quit [Remote host closed the connection]
<apeiros_>
open3 is stdlib, Kernel#spawn is as of 1.9 and probably the recommended way.
<banisterfiend>
apeiros_: do u have an MBA?
<apeiros_>
banisterfiend: had, now I have a retina
<banisterfiend>
apeiros_: oh, how is it? and how many gigas of ram do u have?
<apeiros_>
the air or the retina?
<aedorn>
you can also be cheap and use backticks: value = `some system command`
<apeiros_>
aedorn: that'd be the first one I mentioned :-p
<aedorn>
apeiros_: yes, but I'm illiterate.
<yoshie902a>
apeiros_: 34 rspec tests all passing because of you! thank you!
<banisterfiend>
apeiros_: retina
<apeiros_>
16gb ram, 256gb ssd, 2.3ghz i7
<aedorn>
I read it and it just didn't register.. maybe I should go back to sleep
Xeago has quit [Ping timeout: 276 seconds]
<ryannielson>
apeiros: Cool, I'll look into those.
<banisterfiend>
apeiros_: i like the retina but the laptop is too big, i really appreciate the portability of the 11" MBA :D
<apeiros_>
I like it a lot
<banisterfiend>
apeiros_: wow
<banisterfiend>
apeiros_: do u game on it?
<yoshie902a>
banisterfiend: I like the 13" MBA, still small and light, but bigger screen
<apeiros_>
yes, but even though it has a 2nd dedicated gpu, it's noticable that it's a mobile chip
<apeiros_>
I'm buying a dedicated gaming rig this month :)
<Pip>
How does String.ljust work?
<apeiros_>
banisterfiend: if you don't plan to game on it, the air is a great choice. I really loved it
<apeiros_>
Pip: pixie-dust
<banisterfiend>
yoshie902a: i had a 13" MBA too, but i much much prefer the 11" the increase in portability is dramatic and the screen size isn't that much of an issue -- if i want big screen (for xcode development) i just plug it into an external monitor
<Pip>
Don't get it
segv- has quit [Quit: segv-]
<yoshie902a>
banisterfiend: fair enough.
tk___ has quit [Quit: ばいばい]
andrewhl has joined #ruby
<aedorn>
apeiros_: what's going in the gaming rig?
<apeiros_>
aedorn: you mean what components?
<aedorn>
yeah
_nitti_ has joined #ruby
zommi has joined #ruby
Guedes has quit [Ping timeout: 260 seconds]
<apeiros_>
i7@3.6GHz, 8GB, 240GB Revo-Drive 3 (1GB/s ^^), GTX660. A bit undecided on the Motherboard, though
zommi has left #ruby [#ruby]
<apeiros_>
no spinning hd, got a NAS for the big, unused stuff
<s7ry93r>
which NAS … Synology ?
<apeiros_>
s7ry93r: yes, ds411
aces1up has joined #ruby
<apeiros_>
got jruby 1.7.2 to run on it just yesterday. got to work out a few rough edges, though :)
pac1 has quit [Read error: Connection reset by peer]
_nitti has quit [Ping timeout: 260 seconds]
aces23up has quit [Read error: Connection reset by peer]
bigmac has joined #ruby
<aedorn>
RevoDrives are pretty nice .. I have one in a box around here somewhere ..
<apeiros_>
aedorn: I heard it won't help speeding up boot time?
chussenot has joined #ruby
<apeiros_>
ah, @MB, it'll be a socket 2011
<jrabbit>
banisterfiend: oh neat. wasn't expcting an answer
mkillebr1w has joined #ruby
mkillebrew has quit [Disconnected by services]
Takehiro has quit [Read error: Connection reset by peer]
<aedorn>
apeiros_: depends on what you're booting .. Windows 7 you can only get as low as 10 seconds for a cold boot, for instance
mkillebr1w is now known as mkillebrew
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<apeiros_>
yeah, it'd be w7
<apeiros_>
(gamer pc)
Daman has quit [Ping timeout: 276 seconds]
ebobby has joined #ruby
<Muz>
For the price, are PCI-e SSDs worth it for home computing over a SATA SSD?
<aedorn>
you can get a bit faster with Windows 8 if you're feeling adventurous and masochistic
<apeiros_>
Muz: depends. if the benchmarks are correct, you get about twice the throughput for about 40% higher price
<Muz>
apeiros_: sacrificing storage size and expandability though
<apeiros_>
aedorn: eh, about every instance in the gaming industry says "no win8 for gaming", so I'll stay away from that :)
<apeiros_>
Muz: no, that's at the same size
<Muz>
apeiros_: I mean in terms of system wide and getting more devices in
<apeiros_>
but what you sacrifice is a 16x pci-e socket
<Muz>
You only have so many PCI sockets, and SATA ports are much more plentiful
<apeiros_>
yes
hukl has quit [Quit: Leaving...]
<apeiros_>
but with socket 2011, there's enough lanes for me
RagingDave_ has joined #ruby
<Muz>
All this talk is making me sad though, it's reminding me that I've still not bothered to re-do my storage and get my boot partition onto the SSD and move my media off of some old 1.5TB HDDs onto these unused 3TB HDDs.
Takehiro has joined #ruby
<apeiros_>
:)
Goles has joined #ruby
<aedorn>
apeiros_: some company will find a reason they need to use DX 11.1 and force people to move to it slowly. Unless the whole gaming on Linux thing finally takes off, or everyone just buys Macs
<apeiros_>
2011 has 44 lanes, 16 for gpu, 16 for revo, that leaves another 12 - should be enough for all I do
<Pip>
What does "pad a string with spaces on the left side" mean?
mahmoudimus has joined #ruby
hukl has joined #ruby
<Muz>
"string" -> " string" until it's the resulting length it needs to be.
mpfundstein has quit [Ping timeout: 256 seconds]
<apeiros_>
macs are sadly still not that nice wrt gaming. you can game on them just fine, with dual boot a bit finer, but there are just not enough graphics cards and most macs can't change GPU at all :(
<Pip>
Muz, It's not how String.ljust() works
pavilionXP has joined #ruby
<apeiros_>
Pip: how about you tell us what you did with ljust that surprised you
<apeiros_>
and why it surprised you
RagingDave has quit [Ping timeout: 255 seconds]
<f0ster>
apeiros_: yeah but they just work, and apple has the best and only user experience anyone ever wants, hail jobs
<apeiros_>
(i.e., what did you expect?)
<apeiros_>
f0ster: totally agree, that's why I've been on mac the last ~23y
<Muz>
ljust would put your original string at the start (or left) and then pad it on on the end.
<apeiros_>
(and that's why I'll stick to it for working)
* f0ster
uses a mac, but pokes at the zeal of many apple users
<aedorn>
Pip: ljust is left justified, which means the text will be on the left and paded on the right. rjust is right justified, which will be the opposite
<Muz>
So "string" -> "string "
<Pip>
ljust() works as it does left justify and pad on the right side with spaces, right?
<Pip>
Not always, but basically
<aedorn>
I don't know why I can't type "padded"
hrr has quit [Quit: hrr]
<f0ster>
apeiros_: yeah its nice to have something unix based that is nearly as ubiquitous as windows for the end user
<apeiros_>
f0ster: well, there are zealots for any- and everything. sad people. I try to use the best tool for the job. and "best tool" includes "makes me happy"
<Muz>
It's not how ljust works because it was never designed to work that way. You want String#rjust.
<f0ster>
apeiros_: yeah i've been using iOS longer than I have os x, and I'm still on the fence if I would rather have something more open (as an alternative to iOS)
<Muz>
I do quite like my Mac, I'd never try doing any serious gaming on it, but you can't knock the build quality and convenience as a general thin client/terminal.
infinitiguy has joined #ruby
<f0ster>
cnat do netflix on linux afaik b/c of silverlight, right?
<aedorn>
f0ster: right
<aedorn>
well, DRM specifically
<f0ster>
i just want unix for development in an environment with a great desktop user experience
chussenot has quit [Quit: chussenot]
<f0ster>
os x has that pretty hard to beat
<Muz>
You /could/ do Netflix under Wine
<Muz>
It's just a pain.
dan2k3k5 has joined #ruby
<aedorn>
You could combine a few things to replicate OS X ... minus homebrew
yoshie902a has quit [Quit: yoshie902a]
<Muz>
Why would you need Homebrew if you were using a distro with proper package management?
vlad_starkov has quit [Remote host closed the connection]
<f0ster>
haha
<f0ster>
yeah to be thorough I would rather have linux but os x's unix is close enough
<aedorn>
well you could do it both on Linux and FreeBSD.
yshh has joined #ruby
adkron has quit [Ping timeout: 252 seconds]
yoshie902a has joined #ruby
<pskosinski>
Can I make thread inside thread?
chussenot has joined #ruby
<pskosinski>
I did… and my main app is closing. :(
banisterfiend has quit [Read error: Connection reset by peer]
<pskosinski>
nvm, my eval is clearly crashing
alexspeller has joined #ruby
RagingDave_ is now known as RagingDave
banisterfiend has joined #ruby
_nitti has joined #ruby
whitedawg has quit [Quit: Leaving.]
yshh has quit [Remote host closed the connection]
_nitti_ has quit [Ping timeout: 240 seconds]
d2dchat has joined #ruby
Xeago has joined #ruby
centipedefarmer has joined #ruby
dustint has joined #ruby
yoshie902a has left #ruby [#ruby]
samphippen has joined #ruby
<Pip>
Is Rubinius popular?
<banisterfiend>
Pip: kinda
griffindy has quit [Quit: Computer has gone to sleep.]
<pskosinski>
Can I make a limit of execution time for fork? Like t = Thread.new{…}; t.join(60) ?
<pskosinski>
I could use just sleep. But then I would need to always wait X seconds, it wouldn't finish earlier, if process would finish before X seconds.
<pskosinski>
I could check in a loop for X seconds if process returned something, but it seems a bit not effective…
samphippen has quit [Quit: Computer has gone to sleep.]
<pskosinski>
Nice if it would be possible to set how many seconds Process.wait should wait for child to finish execution…
centipedefarmer has quit [Remote host closed the connection]
jacktrick has quit [Quit: Leaving]
dustint has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
slainer68 has joined #ruby
ryannielson has quit [Quit: ryannielson]
pavilionXP has quit [Ping timeout: 265 seconds]
infinitiguy has quit [Quit: Leaving.]
mjording has joined #ruby
centipedefarmer has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
aces23up has joined #ruby
picca_ has joined #ruby
mjording has quit [Client Quit]
zeade has joined #ruby
blob4000 has joined #ruby
aces1up has quit [Ping timeout: 240 seconds]
slainer68 has quit [Ping timeout: 252 seconds]
tux91 has joined #ruby
mockra has joined #ruby
<pskosinski>
Nobody using threads?
<tux91>
Is there an official specification for ruby 1.9? Googled around but only found one for 1.8
<Pip>
pskosinski, I do
<Pip>
pskosinski, I use thread with Java :D
<Pip>
tux91, There is JSO
<pskosinski>
Pip: Do you have any idea why first code is working and second not? http://pastebin.com/38ExVGuk Looks like second crashes on "t.join(60)"
<tux91>
Pip: can you point me somewhere?
<Pip>
okay
dan2k3k5 has quit []
infinitiguy has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
centipedefarmer has quit [Remote host closed the connection]
dagnachew has joined #ruby
tux91 has quit [Quit: tux91]
<pskosinski>
apeiros_: Yes, works, partially, thanks. :) Now problem is that I am getting: `write': Broken pipe (Errno::EPIPE) As I was reading by default thread should share scope…
hack has joined #ruby
R0tat0r has joined #ruby
willob has quit [Ping timeout: 256 seconds]
<pskosinski>
Meh… I don't need pipes now, in theory, I should remove them long time ago…
alexspeller has quit [Ping timeout: 252 seconds]
chussenot has quit [Quit: chussenot]
segv- has quit [Quit: segv-]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
kiyoura has joined #ruby
kaen has joined #ruby
griffindy has joined #ruby
wroathe has quit [Ping timeout: 246 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
Astralum has joined #ruby
dagnachew has quit [Remote host closed the connection]
_nitti has joined #ruby
pavilionXP has joined #ruby
_nitti_ has joined #ruby
hack has quit [Ping timeout: 240 seconds]
hamfz_ has joined #ruby
<Pip>
Is Bignum a big integer number?
h4mz1d has joined #ruby
<cirwin>
Pip: yes
<cirwin>
but you can mostly ignore the distinction between Fixnum and Bignum, ruby will use the right one when it needs to
_nitti has quit [Ping timeout: 272 seconds]
<Pip>
cirwin, You know how rand(2.5) works?
generalissimo has joined #ruby
jacktrick has joined #ruby
<cirwin>
Pip: confusingly
yshh has joined #ruby
<cirwin>
Pip: I think what happens is it casts 2.5 to an int (2) and then does a random integer in the range 0 <= x < 2
postmodern has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
<Pip>
cirwin, I think so
<canton7>
yeah, that's what the docs claim
<cirwin>
it's very wierd how it returns a float with no args, and an int with args, even if the arg is a float
<cirwin>
but hey ho
Spami has joined #ruby
_nitti_ has quit [Ping timeout: 272 seconds]
<cirwin>
oh, you can do rand(0..2.5) to get the sane behaviour, cool
<Pip>
"When the argument is a Float, it returns a random floating point number between 0.0 and max, including 0.0 and excluding max."
<Pip>
it mentions max
x82_nicole has joined #ruby
<Pip>
Guess it's <argument>.floor
benlieb has quit [Remote host closed the connection]
benlieb has joined #ruby
<Pip>
Nice
mva has left #ruby [#ruby]
mahmoudimus has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mpfundstein has joined #ruby
yoshie902a has joined #ruby
<yoshie902a>
How do I check if an element is a block element? when I do document = Nokogiri::HTML "<span> something </span>" , document.xpath("html/body").block?, I get a no method error
centipedefarmer has joined #ruby
<yoshie902a>
wow, I can hear the crickets in here
danneu has joined #ruby
blob4000 has left #ruby [#ruby]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
lolcathost has quit [Ping timeout: 276 seconds]
landho has quit [Ping timeout: 240 seconds]
aytch has quit [Read error: Connection reset by peer]
alexspeller has joined #ruby
sepp2k1 has quit [Ping timeout: 256 seconds]
JohnBat26 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
samuel02 has quit [Remote host closed the connection]
lolcathost has joined #ruby
vlad_starkov has joined #ruby
mengu has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
RagingDave has quit [Quit: Ex-Chat]
goraxe has quit [Read error: Connection reset by peer]
alexspeller has quit [Remote host closed the connection]
goraxe has joined #ruby
Nss has joined #ruby
blaxter has quit [Quit: foo]
<Pip>
weird that puts(Math.tan(Math::PI/4)) gives me 0.9999999999999999
slainer68 has joined #ruby
<Pip>
I thought it would've given me 1.0
<cirwin>
Pip: it did
<yoshie902a>
.9999 repeating =1
centipedefarmer has quit [Remote host closed the connection]
<cirwin>
Pip: floating point numbers are quite hard to display right
RagingDave has joined #ruby
<cirwin>
always round them in your head
<cirwin>
they also have odd properties, try 0.1 + 0.2 == 0.3
<cirwin>
if you can avoid doing equality comparison, do — instead just do distance comparison
brianpWins has joined #ruby
<cirwin>
0.1 + 0.2 is very very very close to 0.3
jonathanwallace1 has quit [Ping timeout: 240 seconds]
<Hanmac>
yeah but not close enough :D
Zolrath has joined #ruby
<yoshie902a>
then use int … 10000 as 100.00 and divide by 100 to get two deciles
<Pip>
[5] pry(main)> (0.1 + 0.2) == 0.3
<Pip>
=> false
RagingDave has quit [Client Quit]
<cirwin>
fun times :)
<yoshie902a>
you chose the level of precision, but floats will always be wrong
<cirwin>
0.1 + 0.2 == 0.30000000000000004
<xargoon>
or use bigdecimals if you value precision over speed
slainer68 has quit [Ping timeout: 260 seconds]
horofox has quit [Quit: horofox]
<yoshie902a>
10+20=30 works with int
daniel_-_ has joined #ruby
<cirwin>
0.01 + 0.02 == 0.03 too :)
<cirwin>
but just a coincidence
<Hanmac>
yoshie902a look at bigDecimal
<yoshie902a>
I've seen it before, thanks
<Pip>
I see
sepp2k has joined #ruby
_nitti has joined #ruby
tilthouse has joined #ruby
mkillebrew has quit [Read error: Connection reset by peer]
mkillebrew has joined #ruby
pskosinski is now known as psk
jacktrick has quit [Quit: Leaving]
psk is now known as pskosinski
drago757 has quit [Quit: drago757]
johanh has joined #ruby
ebobby has quit [Quit: Lost terminal]
alexspeller has joined #ruby
lolcathost is now known as Automorphism
generalissimo has quit [Remote host closed the connection]
alexspeller has quit [Remote host closed the connection]
wermel has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mkillebrew has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
lobak_ has quit [Quit: No Ping reply in 180 seconds.]
johanh has quit [Quit: johanh]
lobak has joined #ruby
Targen has joined #ruby
<yoshie902a>
does anyone know how to use the block? method referenced here http://nokogiri.org/Nokogiri/HTML/ElementDescription.html I tried document = Nokogiri::HTML "<span> something </span>" , document.xpath("html/body").block?, I get a no method error
jds has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<cirwin>
yoshie902a: document.xpath returns an array of Nokogoiri::HTML::Elements
<cirwin>
but that method is defined on Nokogiri::HTML::ElementDescription
<cirwin>
you want: Nokogiri::HTML('<span/>').xpath('//span').map(&:description).map(&:block?)
banister_ has joined #ruby
johanh has joined #ruby
<yoshie902a>
cirwin: got it. thanks! d.children[1].children.first.description.block?
<yoshie902a>
I wonder does Nokogiri know if the element was changed to inline with CSS?
banisterfiend has quit [Ping timeout: 264 seconds]
<clooth>
SAVE THE WHALES.
<Boohbah>
WAVE THE SAILS.
<cirwin>
yoshie902a: I don't think nokogiri does anything with CSS
Xeago has quit [Remote host closed the connection]
<shevy>
spread on newlines of course. I kind of think this is ugly, with the <<EOF
Driscoll has joined #ruby
jds has joined #ruby
alexspeller has joined #ruby
Xeago has joined #ruby
Vivid_ has quit [Remote host closed the connection]
pkrnj has joined #ruby
vlad_starkov has joined #ruby
bluOxigen has joined #ruby
Xeago has quit [Remote host closed the connection]
jds has quit [Ping timeout: 264 seconds]
lolcathost has joined #ruby
crackfu has quit [Remote host closed the connection]
MattRb has joined #ruby
crackfu has joined #ruby
Automorphism has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
alexspeller has quit [Remote host closed the connection]
crackfu has quit [Ping timeout: 276 seconds]
clooth has quit [Quit: clooth]
nemesit has joined #ruby
_nitti has quit [Remote host closed the connection]
nomenkun has joined #ruby
_nitti has joined #ruby
vlad_starkov has joined #ruby
sayan has quit [Ping timeout: 260 seconds]
samuel02 has quit [Remote host closed the connection]
<TTilus>
trollop gives me the very basic stuff
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ruby
medik has joined #ruby
medik has quit [Remote host closed the connection]
<shevy>
TTilus hmm
<shevy>
I'll have a look at it soon
medik has joined #ruby
<shevy>
just came across another stylistic question. Given a class, what should come first - include, or constant definitions? i.e.:
<shevy>
class Foo; include Bar; XYZ = 'Hi there'; end ... vs class Foo; XYZ = 'Hi there'; include Bar; end
<shevy>
I seem to keep on switching between those two, and my brain hates switching :(
<TTilus>
i tend to pack the includes at the start
<TTilus>
for no specific reason really
vlad_starkov has quit [Ping timeout: 256 seconds]
_nitti has quit [Ping timeout: 260 seconds]
<shevy>
ok good
<shevy>
anyone else do the same?
<shevy>
I tend to slightly favour that as well
<cirwin>
I think I do that
<TTilus>
there might very well be a ton of reasons, i just havent thought of them :)
wroathe has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
dawkirst has quit [Read error: Connection reset by peer]
d2dchat has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
horrror has joined #ruby
Goles has joined #ruby
n1x has quit [Ping timeout: 272 seconds]
dawkirst has joined #ruby
<horrror>
Hi guys, I'm using the " split(/(?=[A-Z])/).join(" ") " to make spaces between CamelCase text. BUT - it also puts spaces between initials- something i'd like to avoid
<horrror>
how would you handle it?
mpfundstein has quit [Ping timeout: 260 seconds]
Goles has quit [Client Quit]
<shevy>
TTilus yeah I guess most people don't think about it because it is not so important... but my brain is lazy, it likes to see and use simple patterns it can handle
<cirwin>
IceDragon: well, if you're in a method in a submodule, that's 3 levels gone already; and then an iteration in a conditional is easily another 2
atno has quit [Ping timeout: 252 seconds]
<IceDragon>
I usually just class Module::Class
woolite64 has joined #ruby
<IceDragon>
:O Since I pre-define all my modules
<cirwin>
that always confuses me
<IceDragon>
:P Not for me, I keep my stuff organized
<IceDragon>
banisterfiend: I need some help with Chipmunk, like how the hell do you use it?
kaen has quit [Ping timeout: 260 seconds]
<banisterfiend>
IceDragon: i just did the build process + packaging, i never actually used the gem
<IceDragon>
seriously...
<banisterfiend>
IceDragon: Yeah, ping Beoran_
<IceDragon>
>,> Like does anyone have an example anywhere, a "working one"
<banisterfiend>
IceDragon: or ask on #gosu
<IceDragon>
Good idea
* IceDragon
flies to #gosu
busybox42 has quit [Ping timeout: 264 seconds]
slainer68 has quit [Remote host closed the connection]
jacktrick has quit [Quit: Leaving]
<Beoran_>
IceDragon, hello
<IceDragon>
:D Yay
<IceDragon>
Beoran_ can you help me?
<IceDragon>
Do you have any examples of Ruby Chipmunk usage?
<Beoran_>
Tfirst le me be honest, I'm not using those ruby bindings anumore sinve I ported my game engine to plain C, however, I know how to use them
<IceDragon>
Oh by the way, the VERSION in the chipmunk.rb is "5.4.3" instead of "5.3.4"
<Beoran_>
eh, how I missed that?
<Beoran_>
but I need someone to take over mainetance of that gem from me
<Beoran_>
I /may/ be proting it to mruby though if it's needed for my C game engine, but chances are it won't be so.
<IceDragon>
well.
<Beoran_>
but anyway, how to use Chipmunk is prettubuch the same as in C really, except for the collision handling
<Beoran_>
1) you create a space
breakingthings has joined #ruby
DatumDrop has joined #ruby
<Beoran_>
2) you createz sbodies and shapes , and add these to the space
<Beoran_>
3) You run the chipmunk simiulation in your game loop at the corect speed.
<IceDragon>
and the magic happens?
<Beoran_>
4) move your characters around by applying orces to it (or velocities)
<Beoran_>
Yes, basically, collision detectio nand motion happen "automagically" from what you have set up. If you have z side-scrolling game, you also need to set gravity. I havea top-down game so gravitty is 0 for me.
<Beoran_>
5) for interaction between different objects, you /may/ need collision handlers
<IceDragon>
Like soft bodies and hard bodies?
<Beoran_>
for example ,without collision hanlders your player will be able to push around boxes, ennemies, etc.
<IceDragon>
Beoran_: undefined method `impulse=' for #<CP::Constraint::PinJoint:0x007fd432d2f8f8>
<Beoran_>
yes, but more for say, the player is hit by a baddie, the plaer stikes the baddy with a sword, etc,
cousine has joined #ruby
main_ has quit [Remote host closed the connection]
<Beoran_>
yes, you don't set the impulse on a pin joint it's read-only
lenovodroid has joined #ruby
<Beoran_>
in fact, read only for all contraints
main has joined #ruby
<IceDragon>
o-e then why was the impulse set in one of the rspecs?
<Beoran_>
constrainst are more advabced uses of chipmunk, they allow things like say, swinging platdforms,
DatumDrop has quit [Ping timeout: 276 seconds]
<Beoran_>
IceDragon, It was? and it doesn't pass the spec?
<IceDragon>
It failed the spec.
<Beoran_>
how DID I miss that ???
<IceDragon>
Constraints in chipmunk Constraints module can set its impulse
s0ber has quit [Ping timeout: 240 seconds]
<Beoran_>
Sorry for that :)
<IceDragon>
:) np
love_color_text has joined #ruby
tobym has quit [Remote host closed the connection]
<Beoran_>
well, but I think that you hopefully won't need that functionalitu ^_^;;;;
<Beoran_>
what kind of game are you making in fact?
<IceDragon>
I was only interested in trying it out
Jamone has joined #ruby
casheew has quit [Quit: Lost terminal]
<Beoran_>
oic
<IceDragon>
:O At first I was planning to make a simple pong game
bluOxigen has quit [Ping timeout: 255 seconds]
<IceDragon>
But I solved that, after banging my head on the keyboard a few times
Jackneill has quit [Quit: Leaving]
<Beoran_>
heh, but are you on +5 bits? the bindings were only tested on 332 bits I'm afraid.
<Beoran_>
so I guess that s.group = Aid would need to be replaced by s.group = :aid
matchaw_ has quit [Quit: No Ping reply in 180 seconds.]
<Beoran_>
on 64 bits I mean :p
skcin7 has quit [Quit: Computer has gone to sleep.]
matchaw_ has joined #ruby
jeffreybaird has joined #ruby
Monie has quit [Ping timeout: 255 seconds]
johanh has quit [Quit: johanh]
<IceDragon>
yeah I'm running ArchLinux x86_64
tommyvyo has joined #ruby
emmanuelux has quit [Ping timeout: 272 seconds]
nemesit has quit [Read error: Connection reset by peer]
breakingthings has quit []
xyzodiac has quit [Quit: Computer has gone to sleep.]
<IceDragon>
Beoran, I patched up the rspecs
xyzodiac has joined #ruby
atno has joined #ruby
Alaude has joined #ruby
benlieb has joined #ruby
breakingthings has joined #ruby
slainer68 has joined #ruby
infinitiguy has joined #ruby
mahmoudimus has joined #ruby
miskander has quit [Quit: miskander]
<speakingcode-wor>
does ruby have a method in Enumerable equivlent to a filter function?
<IceDragon>
#select
<IceDragon>
?
emmanuelux has joined #ruby
<speakingcode-wor>
i.e. somethnig that iterates a collection, running a block on each element, and returning a collection with the items that result in the block returning true