<oddover>
yea, I saw that, but I didn't really understand what "flags is a bitwise OR of the FNM_xxx parameters. The same glob pattern and flags are used by Dir::glob." means
dankest is now known as dankest|away
jds has quit [Ping timeout: 260 seconds]
c0rn has quit [Ping timeout: 248 seconds]
uris has joined #ruby
artOfWar_ has quit [Remote host closed the connection]
<apeiros>
eric_: go to ruby-doc.org, go to the core docs, go to the String docs, and there look for the delete method (which is called String#delete - instance method 'delete' of class String)
<eric_>
oh alright
dmiller has quit [Ping timeout: 248 seconds]
<apeiros>
or use `ri String#delete` in your shell (requires that you installed the docs along with ruby)
pskosinski has quit [Quit: Learn Life's Little Lessons]
anonymuse has quit [Quit: Leaving.]
NemesisD has quit [Ping timeout: 255 seconds]
pcarrier has quit []
anonymuse has joined #ruby
sylvain` has joined #ruby
havenn has quit [Remote host closed the connection]
sylvain` has quit [Remote host closed the connection]
anonymuse has quit [Client Quit]
thisirs has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
kennym has joined #ruby
anonymuse has joined #ruby
havenn has joined #ruby
kennym has left #ruby [#ruby]
emanu has quit [Quit: emanu]
slainer68 has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
bjeanes has joined #ruby
<eric_>
I have the url http://ping.pong, this doesnt seem to delete http:// and / urlc = url.delete("http://", "/")
<reppard>
banisterfiend: pry is pretty cool as is imo =)
_bart has quit [Quit: _bart]
<reppard>
blazes816: maybe a cool api to tie into?
Zolrath has quit []
artOfWar has quit [Remote host closed the connection]
dankest|away has quit [Quit: Leaving...]
<blazes816>
hmm…i've got some api libs to be writing…. ;)
<reppard>
haha like what?
slainer68 has joined #ruby
epylinkn has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<blazes816>
a JS api lib for our app
<blazes816>
but seriously, if you want to mess with apis, you could try zapier
nomenkun has joined #ruby
<blazes816>
it provides access to a bunch so you could do a web2.0 style mashup
<blazes816>
for old times sake
shorts has joined #ruby
<reppard>
tahts pretty cool, ill have to check it out
<reppard>
i spent all day at work fixing broken functional tests so i want something to have fun with
samuel02 has joined #ruby
<blazes816>
haha, for sure
<reppard>
i work on a pretty large legacy code base
<blazes816>
hate that
<reppard>
there is a custom Factory that was built a long time ago
<blazes816>
yeah, me too. sucks. rails 2 also?
stopbit has joined #ruby
<reppard>
yeah rails 2
<reppard>
ruby 1.8.7
<blazes816>
that sucks
<reppard>
haha
<blazes816>
we patched ours to work on 1.9
<fuzai>
If something returns an array and you assign that to a variable, it's copying the data into that variable, not linking that variable with the function right? The reason i ask is I used the return of a function to populate an array and now it seems that every time I try to manipulate the array it's asking the function rather then the snapshot I thought I took
<reppard>
the Factory.create_user used in functionals for some reason defaulted to an admin
<reppard>
but our average user is not an admin
<blazes816>
reppard: hahaha
<blazes816>
that sucks
<blazes816>
we have shit like that happen all the time
sepp2k has quit [Read error: Connection reset by peer]
cableray has joined #ruby
<reppard>
so my pair and i decided to change this as part of a permissions card we are working on
<blazes816>
haha trello?
<reppard>
guess what, functionals and units broke all over the place
<reppard>
haha
<blazes816>
we don't work for the same place do we?
<reppard>
trello?
<blazes816>
yeah, change 1 test, change ALL tests
<reppard>
oh haha
otters has joined #ruby
epylinkn has quit [Ping timeout: 252 seconds]
<reppard>
today when i started i had 678 failing functionals with a fair amount of erros in the mix
<blazes816>
:|
<reppard>
when i left i was down to about 254 failing tests
Michael_ has quit [Remote host closed the connection]
dankest has joined #ruby
Alex-_ has joined #ruby
Alex-_ has quit [Client Quit]
<Maziz>
hi all
horofox has joined #ruby
bricker_ is now known as bricker
<reppard>
wuddup
c0rn has quit [Quit: Computer has gone to sleep.]
alx- has quit [Ping timeout: 260 seconds]
ffranz has quit [Ping timeout: 246 seconds]
yshh has quit [Remote host closed the connection]
xemu has joined #ruby
nomenkun has joined #ruby
JMcAfreak has quit [Ping timeout: 246 seconds]
karasawa has joined #ruby
daniel_-_ has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
Michael_ has joined #ruby
samuel02 has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
maletor has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 252 seconds]
TomyLobo has quit [Quit: Standby mode...]
aaronmacy has quit [Quit: Leaving.]
daniel_-_ has quit [Client Quit]
pothibo has quit [Quit: pothibo]
Emmanuel_Chanel has quit [Quit: Leaving]
_bart has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Virunga has quit [Remote host closed the connection]
_bart has quit [Client Quit]
nga4 has quit []
friskd has quit [Ping timeout: 244 seconds]
pencilcheck has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
dmiller has joined #ruby
bricker is now known as bricker`away
bcx has joined #ruby
<libryder>
given any number (user points), x >= 0 <= 300, and a hash of level identifiers (1: 10, 2: 25, 3: 40, 4: 75, …) what is the best way to identify what level a user is?
plotplanexe has quit [Ping timeout: 260 seconds]
<bcx>
is there a deterministic JSON encoder for ruby?
ebobby has quit [Quit: Lost terminal]
jekotia has joined #ruby
<libryder>
so a user hits level 3 when they have accumulated 40 points
nwertman has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
nwertman has joined #ruby
thillux has joined #ruby
subbyyy has quit [Ping timeout: 240 seconds]
<shevy>
libryder what
<shevy>
write a method
<bcx>
or a way to deterministically serialize a dict in ruby?
<shevy>
def level?(i)
<blazes816>
I'd write a function such that current_level(score) returns a continuous number than when floored is equal to the level you want. experiment with log functions and such to get the correct 'tapering'
<shevy>
libryder actually, a case menu would be simplest
<blazes816>
that too
<libryder>
i thought about a case but if there are 20 levels it will quickly get out of hand
<shevy>
when you do require 'blablabla', it looks whether there is a file called blablabla.rb or a directory blablabla
<shevy>
in SITE_DIR
dankest|away has quit [Quit: Leaving...]
nfk has quit [Quit: yawn]
<shevy>
I dont know the prefix of your ruby installation
<shevy>
in most linux ruby distributions, the SITE_DIR would be at: /usr/lib/ruby/site_ruby/1.9.1
<shevy>
when you install a gem, it usually makes a directory there, with its name being the addon
<fragmachine>
Well here's the thing, I have my program in a git repositry so I don't want to move the whole thing. Is it possible to sym link it or something?
banister`sleep has quit [Read error: Connection reset by peer]
<shevy>
hey, did you guys know that the |block| name is optional for a block?
<shevy>
(1..300).each { puts "hi" }
<shevy>
I thought I would have to assign one |var| inside there
<fragmachine>
I'll investigate further, thanks for your help!
adeponte has joined #ruby
<reppard>
shevy: i just found that out the other day using tap
<shevy>
aha
MattRB has joined #ruby
<shevy>
I am not there yet, to understand .tap
cjs226 has quit []
<reppard>
i wasn't either
<reppard>
but some code at work was using it so it was sink or swim =)
<shevy>
I've been using ruby for so long but I never tried to understand 100%, I was happy with 75%
<shevy>
hehe
<reppard>
you can use it in a method chain to mutate the object its called on
paul_k has quit [Remote host closed the connection]
<shevy>
with .tap you just pass in the object, for a potential guaranteed later use in a method chain right?
<reppard>
kind of gives you access between states
<shevy>
so that you dont have a nil
<shevy>
hmm
<shevy>
aha
jonahR has joined #ruby
<shevy>
I like that wording... "access between states"
freakazoid0223 has quit [Quit: Leaving]
karasawa has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
araujo has quit [Quit: Leaving]
yoshie902a has joined #ruby
<reppard>
hmmmm
<reppard>
maybe it wasn't tap, looks like tap needs a block variable name
rakl has joined #ruby
<yoshie902a>
anyone have any recommendations on books/tutorials on machine learning?
<reppard>
but yeah you can use it to mutate an object
rakl has quit [Max SendQ exceeded]
drago757 has quit [Read error: Connection reset by peer]
drago757 has joined #ruby
emocakes has quit [Quit: emocakes]
<reppard>
some_instance_of_an_object.tap{ |object| object.param = foo; object.baz = bar }
<swarley>
w00t for tap
<reppard>
i saw it used in a constructor method all meta style
pcarrier has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
yshh has quit [Remote host closed the connection]
<shevy>
reppard aha. well I always thought that when I iterate via .each, I also need a block variable name... but today I realized that it is optional, that is cool
<shevy>
perhaps a month ago I saw something like this for the first time:
<shevy>
{ |a,(b,c)|
<shevy>
or { |*a|
r3nrut has joined #ruby
<reppard>
haha
<reppard>
crazy shit
cobragoat has joined #ruby
<reppard>
yeah in rspec you can call before do with no block var
<reppard>
we have a couple of do blocks at work where the block var is optional
<reppard>
for functionals there is a login_as user do
<reppard>
1.upto(1000){ p "icanhas block var?" }
syamajala has joined #ruby
philcrissman has joined #ruby
shorts has quit [Remote host closed the connection]
shorts has joined #ruby
<shevy>
hehe
jjbohn has joined #ruby
<shevy>
good point
<shevy>
I forgot about do/end
dankest has joined #ruby
Jacky_ is now known as Jacky
<reppard>
same as { } ;)
generalissimo has quit [Remote host closed the connection]
Jacky is now known as Guest77252
Guest77252 is now known as JackyAlcine
JackyAlcine has quit [Changing host]
JackyAlcine has joined #ruby
JackyAlcine is now known as Jacky
<shevy>
I rarely use do / end these days
<shevy>
it is easier to type
<shevy>
but has more characters than {}
<shevy>
inside a method, I prefer {} because I can avoid one "end"
bcx has quit [Quit: Leaving.]
<shevy>
it confuses me to have multiple "end" :(
cobragoat has quit [Remote host closed the connection]
<reppard>
i guess the convention is to use { } if its a single line and do/end for more than one line
<shevy>
yeah
<shevy>
I gave up on that convention
roadt has quit [Ping timeout: 260 seconds]
cibs has quit [Read error: Connection reset by peer]
<reppard>
do and end is nice if you have a hash in a block with a lot of params
<shevy>
hmm but you could have {|a,b,c,d,e,f,g| just as well
<reppard>
less curly brackets and parenths is better in that case
banister`sleep has quit [Remote host closed the connection]
<reppard>
when you have ridiculous attributes like this :conditional_blah_blah_something => Conditions.new(:some_crap => FML::Isuck, :other_crap => FML)
<reppard>
and its a hash full of that crap, its nice to clean it up with multi lines
cibs has joined #ruby
<reppard>
nested hashes get ugly quick
xybre has quit [Ping timeout: 245 seconds]
jds has joined #ruby
davidcelis has joined #ruby
d2dchat has quit [Remote host closed the connection]
erichmenge has joined #ruby
xybre has joined #ruby
havenn has joined #ruby
MattRB has joined #ruby
zlaty has joined #ruby
jds has quit [Ping timeout: 260 seconds]
banister`sleep has joined #ruby
pcarrier has quit []
cibs has quit [Ping timeout: 245 seconds]
gyre008 has joined #ruby
cibs has joined #ruby
jjbohn has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
<shevy>
reppard oh I never liked that kind of handling
<shevy>
I more like neat small objects
<shevy>
controller.run
jonahR has quit [Ping timeout: 246 seconds]
<shevy>
controller.create_new_directories = true
<shevy>
some people like to have big initialize() methods with many params
<reppard>
legacy code
<shevy>
or a hash param
<reppard>
not mine =)
<shevy>
I never liked that much
<reppard>
just have to maintain it
<shevy>
hehe
<shevy>
throw it away!!!
pu22l3r has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
zeade has quit [Read error: Connection reset by peer]
dankest has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
<shevy>
I often wonder if a simpler version of ruby would be better
Astralum has joined #ruby
<xybre>
mruby?
cibs has quit [Ping timeout: 245 seconds]
cirwin has joined #ruby
tommyvyo has joined #ruby
<cirwin>
why is SystemStackError no longer a StandardError?
zeade has joined #ruby
<cirwin>
I think I want to catch it, but the type heirarchy is making me nervous
havenn has quit [Remote host closed the connection]
aytch has quit [Remote host closed the connection]
havenn has joined #ruby
<shevy>
xybre hmm I think mruby will allow lots of ruby-esque things
<shevy>
cirwin dunno. I am sure there is an official explanation (in japanese) for this
<xybre>
Yes?
<xybre>
cirwin: so it doesn't get caught be rescue
<xybre>
s/be/by
<shevy>
xybre well like adhere to the ruby ISO specification, it probably will even include @@vars :(
<xybre>
shevy: fork it
yacks has joined #ruby
<shevy>
hehe
<cirwin>
xybre: is that for a reason? I can understand things like "NoMemoryErrors" not being caught (somewhat), and certainly LoadErrors
<cirwin>
but it seems like SystemStackErrors denote a very local failure in your program
<cirwin>
not a global failure
<xybre>
cirwin: you can explictly rescue any error
<davidcelis>
hi
<xybre>
Stack errors take place in a gobal context.. the Ruby stack.
orcris has joined #ruby
rakl has joined #ruby
<cirwin>
xybre: yeah, I know
<cirwin>
what I mean is that an OutOfMemory error could be another Thread's "fault"
dmerrick has quit [Ping timeout: 252 seconds]
reppard has quit [Ping timeout: 252 seconds]
<cirwin>
a StackOverflow can;t though?
Jonah11_ has joined #ruby
<JoeHazzers>
stackexchange 4 lyf
<davidcelis>
stack overflow, isn't that a website
<cirwin>
SystemStackError
<cirwin>
ruby picked the wrong name :)
<Jonah11_>
is it possible to start a new thread using Thread.start (or any other way) such that the new thread will not die if it's parent thread dies?
havenn has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Read error: Connection timed out]
crackfu has quit [Remote host closed the connection]
phantasm66 has quit [Quit: *poof*]
crackfu has joined #ruby
<shevy>
Jonah11_ hmm not sure... perhaps with Thread.fork ?
cibs has joined #ruby
statarb3 has quit [Ping timeout: 244 seconds]
<xybre>
ruby.runpaint is down :(
dmerrick has joined #ruby
banister`sleep has joined #ruby
orcris has quit [Quit: Konversation terminated!]
<Jonah11_>
shevy, nope :(
n1x has quit [Ping timeout: 252 seconds]
frem has joined #ruby
crackfu has quit [Ping timeout: 248 seconds]
dmerrick has quit [Client Quit]
dmerrick has joined #ruby
Goopyo has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Goopyo has joined #ruby
reppard has joined #ruby
<shevy>
hmm
love_color_text has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
<nazty>
hey. anyone use wxRuby>
pu22l3r_ has joined #ruby
<shevy>
nazty yeah Hanmac does
<shevy>
he wrote his own bindings to wxwidgets too, I think
<shevy>
he is very clever
cibs has quit [Ping timeout: 245 seconds]
pu22l3r has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
gyre008 has quit [Remote host closed the connection]
pu22l3r_ has quit [Remote host closed the connection]
uris has quit [Quit: Leaving]
<nazty>
oh yeah
<nazty>
im looking for a good GUI, im new to ruby
Roa has quit [Ping timeout: 248 seconds]
<shevy>
nazty ruby-gnome is good
<shevy>
but it's a lot of stuff to read
<Nuck>
a good GUI? Do you mean to drag-and-drop Ruby code, a GUI text editor, or a GUI-authoring library? o_O
<shevy>
if you are also new to ruby, I would suggest you first learn a bit of ruby, before you dig into the GUI world
<shevy>
once you understand how GUIs work, though, you can transition fairly easily between the different toolkits
<shevy>
like in qt, slots/signals come into effect, dont think ruby-gnome has slots (but it has signals)
<shevy>
label.signal_connect("button-press-event") do |widget, event|
<shevy>
^^^ act on button press event happened
<nazty>
shevy, im in windows
<shevy>
poor man ;)
<shevy>
but ruby-gnome works on windows too
<shevy>
just windows kind of sucks
<nazty>
i only use windows when i game
<shevy>
I know, you guys are the last hope for microsoft
<nazty>
other wise im in linux or macosx
cibs has quit [Ping timeout: 245 seconds]
Jonah11_ has quit [Ping timeout: 272 seconds]
<shevy>
if the gamers would have games in linux, they would abandon microsoft
<nazty>
i must install steam for linux
<shevy>
then the only users left would be the old people
<Nuck>
shevy: Don't worry, Valve is on it ;)
<nazty>
but i cant get the new nvidia drivers to install
<shevy>
and some corporate office users
<shevy>
macro writers get rich
<nazty>
the new ubuntu wont let me change my runtime levels
Jonah11_ has joined #ruby
<shevy>
ubuntu must die
<reppard>
night everyone
<shevy>
nazty, I think they switched to something else
<nazty>
i want to boot right into console not xf86
<reppard>
time to watch some awesomeness on the raspberry pi
<shevy>
they killed /etc/inittab, those bastards :(
<nazty>
yes they did :(
<shevy>
nazty, I think it is another option in another file now
<reppard>
shevy: redhat has inittab
_alejandro has quit [Remote host closed the connection]
<nazty>
i heard u have to hold control down while you reboot
<Nuck>
Arch represeeeent~
<reppard>
default init leve 6 ;)
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy>
ah /etc/init/rc-sysinit.conf:
<nazty>
its been a while since i used used linux
<nazty>
i just started again and everything is changed....
reppard has quit [Quit: leaving]
<nazty>
i used to use redhat
<shevy>
nazty
<shevy>
# Default runlevel, this may be overriden on the kernel command-line
<shevy>
# or by faking an old /etc/inittab entry
<shevy>
env DEFAULT_RUNLEVEL=2
<nazty>
im in windows... wont be a help to me yet
<shevy>
hehe
<shevy>
well, you can use bash on windows at least :P
<nazty>
my memory is shot lol
<nazty>
too much partying when i was young
<shevy>
when you use scripting languages, you can use them on any OS
<shevy>
I started with php (!) on windows (!!!)
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<nazty>
i know this :)
<nazty>
i stared with mirc lol
<shevy>
I too, it was cool
<nazty>
then ircii/epic
<nazty>
then tcl/tk
<Nuck>
I started with Chatzilla.
<shevy>
I use xchat, hexchat nowadays
<shevy>
it's a bit similar to mIRC
<nazty>
i use xchat in windows
<shevy>
but not as cool :\
<shevy>
hehe
<nazty>
when im in linux i use weechat
<nazty>
weechat is GREAT
<shevy>
really? I cant use those commandline-only chat clients, I always mispaste
<Nuck>
I use weechat on all platforms. I <3 it so much.
<nazty>
i want to write a format/theme plugin for weechat
SeoxyS has quit [Quit: SeoxyS]
<nazty>
if it looked like irssi it would be great
scottmos has joined #ruby
<Nuck>
nazty: You can configure that easily
<nazty>
Nuck, all the themes i see for it are basicaly just color themes
<Nuck>
Weechat is that configurable. Just look through the settings and config files, I did that for a few days and now people go "wow how amazing" when I use it.
<Nuck>
nazty: You can change behaviors in many ways, from hiding the sidebar to removing alignment of usernames.
<nazty>
it has the best plugin/addon capabilities i seen in a irc client
<nazty>
its like xchat for CLI
cibs has joined #ruby
<nazty>
i miss openchat/32
<Nuck>
nazty: Honestly, making A into B is usually a bad idea — you should make A and B both look like C, where C is whatever you like ;)
Guest49955 has joined #ruby
Guest49955 has quit [Client Quit]
<shevy>
Nuck People go "wow how amazing" when they see you use weechat? :)
<nazty>
Nuck, lol. im thinkin on writing a small irc client in ruby
<shevy>
nazty I tried that!
<shevy>
my first ruby project was an IRC bot
<shevy>
it even worked
<Nuck>
shevy: I've customized it so well/heavily it's got a UI that rivals most GUI clients.
<shevy>
but it was a mess ...
<Nuck>
Haha that was my first Node.js project (and my first Ruby project) — I like making bots a LOT!
<nazty>
shevy, yeah im gonna make a bot that sits in warez channels, logs the packs, lets you search them and download them using dcc
<shevy>
it is buggy, not feature complete... it only allows you to connect to an IRC channel and "talk" there. but it is not elegant ... if you want a better code base, look at the cinch bot
<shevy>
I dont know of another way to get user-input and external-output into the same commandline window :(
cirwin has quit [Ping timeout: 244 seconds]
kayloos has joined #ruby
<nazty>
hmm
<nazty>
thats why i wanted gui
dwu has joined #ruby
<shevy>
yeah with a GUI it is easier
<nazty>
either make a sdi or mdi
<shevy>
you can have several widgets
<shevy>
but on the commandline? how do you get both input and output into the terminal...
<nazty>
i was like damn im gonna have to getc
<Nuck>
Why not study irb?
<nazty>
yeah
<shevy>
irb doesn't use streaming output to you
<nazty>
i dont want my command line to scroll up into the text
jenrzzz has joined #ruby
<nazty>
everytime i press enter
jduan1981 has joined #ruby
<shevy>
hehe
<shevy>
oh wait
<shevy>
you have this problem? it jumps to the top-left ?
<nazty>
i dont have a problem yet cause i didnt start it :)
<nazty>
im researching
<shevy>
ah ok, because I have that problem sometimes
<shevy>
others can not reproduce it, so I am still wondering about it
tjbiddle has quit [Quit: tjbiddle]
browndawg has quit [Quit: Leaving.]
<shevy>
if you are brave, you could use ruby ncurses
aeontech has quit [Quit: aeontech]
<nazty>
i think ruby shits on python
<shevy>
hmm python has more developers :(
<nazty>
and perl
forced_request has quit [Read error: Connection reset by peer]
<shevy>
both ruby and python are better than perl :D
<nazty>
even though i loved perl
<nazty>
i was checking out CH
<shevy>
perl used to have it easy... less competition in the 1980s to early 1990s
<shevy>
(late 1980)
<shevy>
Perl appeared in: 1987
<nazty>
larry wall
<nazty>
i learned perl in prison
jds has quit [Ping timeout: 248 seconds]
<shevy>
Ruby in 1995
<shevy>
lol
<shevy>
that could be an epic quote nazty
<shevy>
do you know the "learn programming the hard way" books?
<nazty>
my lil brother was in college, taking up computer science have problem with learning perl
<shevy>
learning any of them in prison would top that ;)
<nazty>
me scripting for a long time.... i bought the Kamel, Programming Perl
<AsgardBSD_>
nazty: you where in prison? THEY HAVE COMPUTER IN PRISON????
Jacob_ has joined #ruby
<nazty>
had it sent to me in prison, so i could learn it and help my brother over the phone
Jacob_ is now known as Guest18673
<nazty>
AsgardBSD_, actually yeah they had one on the cell block for looking at cases
<nazty>
no internet
pen has joined #ruby
radic has joined #ruby
LL_ has quit [Ping timeout: 245 seconds]
Guest18673 has quit [Remote host closed the connection]
ecksit has joined #ruby
joshman_ has joined #ruby
radic_ has quit [Read error: Operation timed out]
<Nuck>
AsgardBSD_: Nowadays they have Xboxes and shit too. Prisoners gettin' spoiled!
_alejandro has joined #ruby
chriskk has quit [Quit: chriskk]
crackfu has joined #ruby
<shevy>
hehe
<shevy>
well they can at least learn something that way
<nazty>
all the drives and applications were hidden thanks to policies
wargasm has joined #ruby
<nazty>
there was no start bar.... no desktop icons
<nazty>
just a open application
<nazty>
i hacked it though... there was a glitch that let me access the root drive using the open directory dialog....
<shevy>
lol
<nazty>
i accessed the root drive and got windows pinball up
<nazty>
i would charge people a soup to let them play
templaedhel has joined #ruby
<shevy>
hahahaha
<nazty>
i swear on my momz
<nazty>
they took the computer off the cell block
<nazty>
brought a new one in
<nazty>
it pissed alot of inmates off because i had the computer taken away :/
<nazty>
AsgardBSD_, im sorry it was county jail
<nazty>
Nuck, it was just so you can look up other cases to try to help your own
<nazty>
they didnt have a law library
<nazty>
everything was on the computer
<Nuck>
Isn't that what lawyers are for? :P
<nazty>
Nuck, some people cant afford one, so they try to check it out themselves so the public defender dont fuck them over
cibs has quit [Ping timeout: 245 seconds]
<Nuck>
ah lol
<nazty>
Anyone use shoes?
<Nuck>
I wear them daily, thanks for asking
cibs has joined #ruby
<nazty>
nono
<nazty>
the ruby gui
<AsgardBSD_>
Well, i use them everyday...
<AsgardBSD_>
thanks for asking
<nazty>
i get the same answer from 2 people?
<AsgardBSD_>
wait 5 min, and you will get similar awnser
<nazty>
one being funny, the next trying to be a wiseass?
ericalexander has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
cobragoat has joined #ruby
xsarin has quit [Read error: Connection reset by peer]
xsarin_ has joined #ruby
AsgardBSD_ has quit [Remote host closed the connection]
AsgardBSD has joined #ruby
templaedhel has quit [Quit: Leaving...]
mpfundstein has quit [Ping timeout: 245 seconds]
phipes has quit [Quit: phipes]
syamajala has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 248 seconds]
jsallis has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
locriani has quit [Read error: Connection reset by peer]
locriani_ has joined #ruby
dankest is now known as dankest|away
cibs has joined #ruby
Jacky has joined #ruby
Jacky has quit [Changing host]
Jacky has joined #ruby
Solnse has quit [Ping timeout: 252 seconds]
phipes has joined #ruby
jsallis has quit []
d2dchat has joined #ruby
Maziz has quit [Quit: Maziz]
robert___ has joined #ruby
b1lly has joined #ruby
kenneth has joined #ruby
yewton has quit [Excess Flood]
cirwin has joined #ruby
robert_ has quit [Ping timeout: 256 seconds]
adeponte has joined #ruby
BizarreCake has joined #ruby
yewton has joined #ruby
jsallis has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
Michae___ has joined #ruby
cibs has joined #ruby
noyb has joined #ruby
cableray has quit [Ping timeout: 248 seconds]
nuba has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
tjbiddle has joined #ruby
nuba has joined #ruby
jsallis has quit []
dankest|away is now known as dankest
dmiller has quit [Ping timeout: 252 seconds]
jjbohn has quit [Quit: Leaving...]
robert___ is now known as robert_
ericalexander has quit [Quit: ericalexander]
undersc0re97 has quit [Ping timeout: 260 seconds]
yoshie902a has joined #ruby
phipes has quit [Quit: phipes]
yoshie902a has quit [Client Quit]
bean__ has joined #ruby
b1lly has left #ruby [#ruby]
jsallis has joined #ruby
slainer68 has joined #ruby
jsallis has quit [Client Quit]
dmerrick has quit [Quit: dmerrick]
dmerrick has joined #ruby
cjs226 has joined #ruby
<passbe>
i have an array of hashes, what is the best way to merge insert a hash and merge it with every other hash in the array ?
<fragmachine>
when I ruby my ruby script it runs two versions of itself. What would make this happen?
<fragmachine>
errr run
slainer68 has quit [Ping timeout: 260 seconds]
dankest is now known as dankest|away
<shevy>
passbe can you give a MINIMAL example subset, on a pastie
<swarley>
Good question. We'd need code
<shevy>
including the desired output you want to achieve
undersc0re97 has joined #ruby
jds has joined #ruby
robert___ has joined #ruby
<fuzai>
Is it possible to start my application and watch a variable in realtime in a debugger ( an array ) and still watch the standard out say on seperate virtual terminals?
<shevy>
nazty problem is when people pick silly names for ruby projects. you see lots of these... one project is called "god"... another is called "unicorn" ... and so on
cibs has quit [Remote host closed the connection]
<shevy>
so picking "shoes" is another silly name
<swarley>
uhhhhhhhhhhhh. It's not easy
d2dchat has quit [Remote host closed the connection]
Umren has joined #ruby
<nazty>
ehhhh
<nazty>
yeah it definitly is
<shevy>
fuzai perhaps if it is a global variable, then you could hook into it with set_trace_var()
<swarley>
<fuzai> Is it possible to start my application and watch a variable in realtime in a debugger ( an array ) and still watch the standard out say on seperate virtual terminals?
<swarley>
I'm talking about that.
<swarley>
I don't give two shits about shoes
<fuzai>
ok
<fuzai>
I've just got an array that is picking up something strange and i'm not exactly sure where or when
<nazty>
swarley, wasnt talkin to you
<swarley>
You could use a trace function, but that's not even going to give you what you want really
<fuzai>
and i was hoping i could watch it as it changes to try and narrow it
<swarley>
nazty; well in that case he is aware that shoes is a project
<swarley>
and was referencing the obscurity of the name
<fuzai>
You know maybe i can make an eventloop dump to standard out
<swarley>
fuzai; you just have to use a ton of print statements
robert_ has quit [Ping timeout: 252 seconds]
<swarley>
There is no real easy way to do it.
xsarin_ has quit [Quit: xsarin_]
fragmachine has quit [Remote host closed the connection]
<swarley>
You can direct it to a file instead if that makes it better, but that's pretty much standard debugging practice
pjackson has quit [Quit: No Ping reply in 180 seconds.]
b1lly has joined #ruby
pjackson has joined #ruby
<shevy>
nazty another problem is that you are on windows :(
jds has quit [Ping timeout: 255 seconds]
<shevy>
but give ruby-gnome a try
<shevy>
it has about 400 examples
<nazty>
about to log into linux in a few
yewton has quit [Excess Flood]
<shevy>
fuzai you could try to break it down... the primitive way to do this is to use pp, and exit
dankest|away is now known as dankest
<shevy>
another way could be via ruby-debug, or whatever was the name
<shevy>
ok nazty
<fuzai>
i just made an eventloop that fired every 2 seconds to stdout
cobragoat has quit [Remote host closed the connection]
yewton has quit [Excess Flood]
bean__ has quit [Quit: Computer has gone to sleep.]
yewton has joined #ruby
<shevy>
FifthWall I often feel very silly programming in general
<shevy>
I think it has to do with the fact that programming requires a lot of concentration and good thinking :(
<shevy>
yeah, sinatra is also a strange name
<shevy>
"rails" too
* FifthWall
just spent a bit debugging an issue with using mustache templates in sinatra
<shevy>
FifthWall, but I am not picking better names myself either. my web-helper scripts, the project, is called "cyberweb", which isn't really descriptive at all
<shevy>
lol
<shevy>
moustache templates? what's with those names
skaczor has quit [Remote host closed the connection]
<FifthWall>
Well, it's because they use {{ }} for inserting data.
<shevy>
ack
<shevy>
is that a hash inside a block?
<FifthWall>
no
<FifthWall>
mustache is a language independent template syntax
<FifthWall>
it fills abut the same space as haml
<FifthWall>
about*
<davidcelis>
is the fifth wall the ceiling or the floor
Playground has quit [Ping timeout: 245 seconds]
<cirwin>
davidcelis: it's behind you, whichever way you're looking
<FifthWall>
ceiling
goganchic has quit [Quit: Leaving]
* FifthWall
has a whole rambling literary analogy for it
<davidcelis>
go on
JumpMast3r has joined #ruby
<FifthWall>
So, typically in a play there are three walls that surround the actors, and the "fourth wall" separates them from the audience.
<FifthWall>
And this extends to all fictional mediums
<davidcelis>
yes
<FifthWall>
hence, breaking the fourth wall
<davidcelis>
yes
<FifthWall>
So, keeping with the thatre analogy
<FifthWall>
theatre*
<davidcelis>
ah
<davidcelis>
my guess would be breaking the separation between them and the theater technicians or something?
mneorr_ has joined #ruby
<FifthWall>
in ancient greek plays they'd lower an actor representing one on of the gods on a crane, giving rise to the term deus ex machina or god from the machine
<davidcelis>
i was going to say "god" but that seems too obvious, and probably not really a
<davidcelis>
o..
Playground has joined #ruby
Playground has quit [Client Quit]
<FifthWall>
so, the fifth wall would be what separates the actors from the gods
yewton has quit [Excess Flood]
baroquebobcat has joined #ruby
<FifthWall>
Though, it's really a backwards analogy. Fourth Wall was taken when I picket the name, I came up with the explanation after the fact
love_color_text has quit [Remote host closed the connection]
spacemud has quit [Ping timeout: 272 seconds]
love_color_text has joined #ruby
jds has quit [Ping timeout: 260 seconds]
templaedhel has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
<shevy>
always describe your problem first, people can not know in advance if they can help or not
mlue has quit [Ping timeout: 256 seconds]
jackyalcine has joined #ruby
<shevy>
if you ask something like "how to calculate the sum of an array?" people can answer that easily
MattRB has joined #ruby
mlue has joined #ruby
mlue has quit [Changing host]
mlue has joined #ruby
Jacky has quit [Ping timeout: 245 seconds]
<kannan>
shevy actualling i'm planning to do a project based on topic content filtering in twitter. that is to classify tweets according to it's content
nobuoka has joined #ruby
nobuoka has quit [Client Quit]
jaequery has quit [Quit: Computer has gone to sleep.]
<shevy>
that is quite broad and unspecific. always isolate the problem you want to solve into small subproblems
<shevy>
so what real problem do you initially have
x82_nicole has joined #ruby
spacemud has joined #ruby
<shevy>
"classify tweets according to it's content"
<shevy>
what can the content be
<shevy>
probably some 255-characters-maximum string or something
dankest has joined #ruby
<kannan>
shevy anything that the linked acoounts generate.classify tweets and arrange them.
Astralum has quit [Quit: Leaving]
<shevy>
ok good
<shevy>
have you already written a script that gathers the tweets for you
<kannan>
shevy not really. didnt started doing.
MattRB has quit [Quit: This computer has gone to sleep]
Axsuul has quit [Ping timeout: 276 seconds]
<shevy>
well it is easier to solve a problem by making small steps at a time
<shevy>
most of the time you want to obtain a specific dataset
<kannan>
shevy i'm planning to implement this with help of ruby on rails and mysql if possible
sent-hil has joined #ruby
<shevy>
these can all come at a later stage
<shevy>
right now you do not even obtain the dataset you want to have
<kannan>
shevy yup ur right
sent-hil is now known as Guest70307
<shevy>
have you thought about how you want to obtain the tweets yet?
<shevy>
the innards of your project
yacks has quit [Ping timeout: 248 seconds]
<kannan>
i'm thinking to do it with help of ruby-yajl library
mockra has quit [Remote host closed the connection]
spacemud has quit [Ping timeout: 260 seconds]
yacks has joined #ruby
kayloos has quit [Ping timeout: 256 seconds]
Guest70307 has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
<kannan>
shevy i'm planning to do it with help of ruby-yajl library
<shevy>
I do not know that library
MattRB has joined #ruby
<shevy>
but if it works for you that is good
<kannan>
shevy ok.. or what other method u prefer?
<nazty>
yo
spacemud has joined #ruby
nomenkun has joined #ruby
<shevy>
kannan I would probably use open-uri to obtain the twitter data
<shevy>
with it, you can always fetch remote websites in your ruby scripts
emergion has joined #ruby
<kannan>
shevy yup. it's nice.. :)
rakl has quit [Quit: sleeping]
<kannan>
shevy if possible could u join me in doing this project ?
tjbiddle has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
opettaja has joined #ruby
<shevy>
kannan I have too many projects on my own already
<shevy>
also I am not using ruby on rails
BizarreCake has quit [Read error: Operation timed out]
<kannan>
shevy oh.. :(
<shevy>
kannan are you on the rubyonrails channel?
<kannan>
shevy which are the projects tht u're currently working on?
tomzx_ has joined #ruby
<shevy>
kannan right now a few small things. one is the ruby build tools, a suite to compile or install programs. another one is a simple tree-viewer on the commandline, so that I can see the directory structure (with coloured output)
<shevy>
for the latter, I fetch all .tar.bz2, and then repackage them into .tar.xz format
<kannan>
shevy no i'm new to this and dont know how to join other rooms
<shevy>
(my archives, that is)
<shevy>
kannan you should get a better irc client ;)
jackyalcine has quit [Quit: Quit]
jackyalcine_ has joined #ruby
<shevy>
once you have an IRC client, register at freenode, then join #rubyonrails and ask there. the people there are very web-hungry, much more so than here on #ruby
Playground has joined #ruby
<kannan>
shevy ok :)
<shevy>
although you can probably use your webclient to register too, not sure...
<shevy>
I am using xchat, I found it much easier than those perl-webclients
<kannan>
shevy ok :)
emergion has quit [Quit: Computer has gone to sleep.]
<kannan>
shevy give me ur mail id..
robert___ has joined #ruby
<shevy>
lol what why man
<shevy>
I am on IRC anyway, and always here too :P
<shevy>
(unless my computer is down)
<kannan>
shevy just to ask doubts if i have any :)
<kannan>
shevy then ok ":D
<shevy>
then come to IRC man!!!
<shevy>
IRC is nice because one can answer very quickly
<shevy>
it's like "solve a small problem quickly, then move on to do something else"
<kannan>
shevy ok :) now installing xchat :D
<shevy>
\o/
<shevy>
with xchat, you can arrange tabs on the bottom side
<shevy>
let me make a screenshot...
dankest has quit [Quit: Leaving...]
<kannan>
shevy ok :D
robert_ has quit [Ping timeout: 245 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
megha has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
roadt has joined #ruby
icole has joined #ruby
megha has joined #ruby
generalissimo has quit [Remote host closed the connection]
jsilver has joined #ruby
icole has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
BizarreCake has joined #ruby
arietis has joined #ruby
<shevy>
my gimp is broken.. :(
<kannan>
shevy ok no pbm ... i've installed that
<kannan>
shevy and now connected on irc
<shevy>
hehe
<kannan>
shevy :D
Jacky has joined #ruby
keyvan has joined #ruby
<kannan>
shevy u knw anyone who can pgm well on rubyonrails ? ;) :D
Michae___ has quit [Remote host closed the connection]
kannan has quit [Read error: Connection reset by peer]
jgrevich has quit [Remote host closed the connection]
kannan has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
robert___ has joined #ruby
Morkel has quit [Quit: Morkel]
cha1tanya has joined #ruby
robert_ has quit [Ping timeout: 240 seconds]
robotmay has quit [Remote host closed the connection]
hoolandi has quit [Ping timeout: 252 seconds]
tomzx_ has quit [Ping timeout: 245 seconds]
blacktulip has joined #ruby
cableray has quit [Ping timeout: 248 seconds]
cha1tanya has quit [Quit: Leaving]
tps__ has quit [Read error: Connection reset by peer]
tps_ has joined #ruby
_adeponte has quit [Remote host closed the connection]
otters has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
Hanmac_ has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
octarine has quit [Read error: Operation timed out]
<Hanmac_>
shevy i am currently working on the reading of the files from an archive, it was broken for binary files ... but now it works so : archive.get_data("file") and File.read("file") are the same, indipent from default_external :P
randym has quit [Read error: Operation timed out]
Zolo has joined #ruby
fcoury_ has quit [Ping timeout: 255 seconds]
ryanf has quit [Quit: leaving]
matthias_ has joined #ruby
matthias_ has quit [Remote host closed the connection]
<shevy>
yay!
karnowski has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
cam` has quit [Ping timeout: 260 seconds]
Morkel has joined #ruby
Morkel has quit [Client Quit]
razibog has joined #ruby
love_color_text has quit [Remote host closed the connection]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
hackerdude has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<Hanmac_>
and i need VERY often the rb_ensure function ... or your memory gets leaking ... hm no leaking is not the right word ... its got collected and not given back :P
solitude88 has joined #ruby
love_color_text has joined #ruby
love_color_text has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Jackneill has quit [Remote host closed the connection]
love_color_text has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
v0n has joined #ruby
love_color_text has quit [Remote host closed the connection]
adambeynon has joined #ruby
lolmaus has joined #ruby
Jonah11_ has quit [Ping timeout: 245 seconds]
templaedhel has quit [Quit: Leaving...]
love_color_text has joined #ruby
Jonah11_ has joined #ruby
Jackneill has quit [Remote host closed the connection]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
sayan has quit [Read error: Connection reset by peer]
toekutr has quit [Remote host closed the connection]
fukuyamaken has joined #ruby
baroquebobcat has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
Playground has joined #ruby
yacks has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
zeepickler has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
zeepickler has left #ruby [#ruby]
baroquebobcat has quit [Quit: baroquebobcat]
yshh has joined #ruby
cha1tanya has joined #ruby
cobragoat has joined #ruby
charliesome has joined #ruby
chaosis has quit [Ping timeout: 272 seconds]
bigmac has quit [Quit: Leaving]
yacks has joined #ruby
sayan has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
n1x has joined #ruby
Kakera has joined #ruby
yshh has quit [Remote host closed the connection]
mockra has joined #ruby
love_color_text has quit [Remote host closed the connection]
Dakuan has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
rezzack has quit [Quit: Leaving.]
chridal has joined #ruby
osaut has joined #ruby
love_color_text has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
emocakes has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
Bry8Star has joined #ruby
horofox has joined #ruby
workmad3 has joined #ruby
reinaldob has joined #ruby
<Hanmac_>
shevy question: should archive["path"] return the data or the archive entry informaton? (archive entry is similar to File::Stat)
<shevy>
not sure yet
<shevy>
what is "archive" in this example, a hash I suppose? or a method returning a hash
<shevy>
and what is the user going to do with this information
beiter has joined #ruby
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<Hanmac_>
shevy archive is an instance of my Archive class
horofox has quit [Quit: horofox]
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
stkowski has quit [Quit: stkowski]
samuel02 has joined #ruby
Almond has joined #ruby
<Hanmac_>
the entries are used for sample for archive.map! {|entry,data| entry.mtime = Time.now } ... it does change the archive inplace :P
Tom- has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
Tom- has left #ruby [#ruby]
qohelet_ has joined #ruby
Jackneill has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
mneorr has joined #ruby
RagingDave has joined #ruby
slainer68 has joined #ruby
reinaldob has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 245 seconds]
kannan has quit [Read error: Connection reset by peer]
atno has quit [Read error: Connection reset by peer]
kannan has joined #ruby
atno has joined #ruby
ToTo has joined #ruby
jimeh has joined #ruby
cobragoat has quit [Remote host closed the connection]
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
jsted has left #ruby [#ruby]
yacks has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
Dakuan has quit [Ping timeout: 248 seconds]
mpfundstein has joined #ruby
sayan has quit [Read error: Connection reset by peer]
jimeh has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
browndawg has quit [Quit: Leaving.]
<Dwarf>
Heya, I get data from a sqlite3 database, but it returns it like this: [['something1'], ['something2']]
<Dwarf>
How would I get that in a normal array?
<cirwin>
.map(&:first)
<workmad3>
or .flatten
<Dwarf>
Alright let's see what the documentation says about those :)
<apeiros>
hurray, somebody who reads docs on his own!
qohelet_ has quit [Quit: qohelet_]
BizarreCake has quit [Ping timeout: 256 seconds]
dwu has quit [Quit: Leaving.]
octarine has joined #ruby
randym has joined #ruby
karnowski has joined #ruby
<Dwarf>
Thanks, flatten seems to be the easiest approach :)
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
fcoury_ has joined #ruby
cam` has joined #ruby
cha1tanya has quit [Quit: Leaving]
Dakuan has joined #ruby
sayan has joined #ruby
osaut has quit [Quit: osaut]
timonv_ has quit [Read error: Connection reset by peer]
banister`sleep has quit [Read error: Connection reset by peer]
timonv has joined #ruby
banister`sleep has joined #ruby
Su-Shee_ has joined #ruby
TheFuzzball has joined #ruby
Su-Shee has quit [Read error: Operation timed out]
osaut has joined #ruby
Neomex has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
Neomex has quit [Client Quit]
clocKwize has joined #ruby
chrisramon has quit [Ping timeout: 245 seconds]
eka has joined #ruby
Dann1 has joined #ruby
Dann1 has quit [Remote host closed the connection]
Dann1 has joined #ruby
eldariof has joined #ruby
atno has quit [Remote host closed the connection]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
Spooner has joined #ruby
Xeago has joined #ruby
fukuyamaken has joined #ruby
megha has quit [Ping timeout: 244 seconds]
<Dwarf>
Is it possible to have different conditions in one if condition? E.g. if (var1 == 2 || var2 > 5)
<Su-Shee>
if you want something really different, look at Smalltalk's Seaside.
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
Guu is now known as antbody
x0F_ is now known as x0F
<shevy>
Su-Shee hmm I know perl syntax a bit... not sure I can understand smalltalk
<Su-Shee>
shevy: you already know the blocks, because that's what ruby adopted from smalltalk. the rest is as simple as it gets: myObject callSomeMethod. (yes, dot) or myObject callSomeMethod: someParam
zlaty has quit []
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
TomyLobo has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
Zolo has quit [Remote host closed the connection]
Shrink has quit [Remote host closed the connection]
tpd has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
celinedior has quit [Quit: celinedior]
zz_chrismcg is now known as chrismcg
tatsuya_o has joined #ruby
<shevy>
Su-Shee oh cool, I did not know smalltalk had blocks
Hanmac_ has joined #ruby
samphippen has joined #ruby
tpd has quit [Client Quit]
telli has joined #ruby
antbody has quit [Remote host closed the connection]
<Su-Shee>
shevy: you realize that they basically invented everything already with smalltalk and lisp and perl, ruby, younameit just went along and added some sugar here and there? :)
<shevy>
:(
<shevy>
you kill the mystery man!
<Su-Shee>
I gave you an amazing wonder instead ;) you just have to go back a little in time. ;)
Takehiro has joined #ruby
jds has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
tatsuya_o has quit [Ping timeout: 245 seconds]
joofsh has joined #ruby
<banister`sleep>
Su-Shee: what does su shee mean?
reinaldob has joined #ruby
Zolo has joined #ruby
<Su-Shee>
first half of my firstname, second half of my former nick which collided too often at some point
<Su-Shee>
and my overall enthusiasm for sushi, too. ;)
arietis has joined #ruby
<banister`sleep>
Su-Shee: ah, i missed sushi. I also thought you could be chinese and it was your real name, but i wasnt sure
robert___ has joined #ruby
<Su-Shee>
no, I'm german, can't get more not chinese ;)
CodeVision has quit [Ping timeout: 276 seconds]
roadt has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 276 seconds]
philcrissman has joined #ruby
vlad_starkov has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Bry8Star has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
jeffreybaird has joined #ruby
nfk has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
Bry8Star has joined #ruby
gyre008 has quit [Remote host closed the connection]
chaosis has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Jackneill has quit [Ping timeout: 252 seconds]
<shevy>
man, that GumbyPAN bot on #perl is really spammy... good thing we don't have a bot like that on #ruby
<Su-Shee>
ignore it, configure your client differently?
kannan has quit [Ping timeout: 260 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
moos3 has joined #ruby
jxf has joined #ruby
Glacer232 has joined #ruby
Glacer232 has quit [Max SendQ exceeded]
reinaldob has quit [Remote host closed the connection]
<shevy>
I must kill that bot now
<shevy>
interesting that the last message was from mojolicious... seems as if the framework is still quite active :)
jaygen has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<Su-Shee>
"still"? :)
<shevy>
yeah
<shevy>
I think it must be quite old, I had it in my perl-cookbook, and I haven't been touching that cookbook file in years (it kept perl-entries)
Xeago has joined #ruby
<shevy>
if you look at some ruby webframeworks...
<shevy>
nitro? ogg or what was its name... that one died
osaut has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
banister`sleep has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
vlad_starkov has joined #ruby
<Su-Shee>
mojolicious is comparatively young, maybe 3-4 years? catalyst is older. and things like mason or cgi::application are ancient.
Zolo has quit [Remote host closed the connection]
<shevy>
oh man
<shevy>
you know too much
<shevy>
when I kill those who know more than I do, I'll become the wisest man on earth
F1skr has joined #ruby
end_guy has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
<shevy>
I have read about catalyst, but not about mason or cgi::application
<shevy>
though, I have been writing about 20 different perl .cgi scripts in my life :)
<Su-Shee>
"hello, 1995 called and wants its scripts back" ;)
crackfu has joined #ruby
philcrissman has quit [Remote host closed the connection]
<shevy>
good old 1990es
<shevy>
the time of eurodance songs!
<shevy>
so awful and still so good :)
jimeh has joined #ruby
maxmanders has joined #ruby
grzywacz has quit [Quit: :wq]
<Su-Shee>
early web is just awful. ;)
_bart has quit [Quit: _bart]
Michae___ has joined #ruby
Michae___ has quit [Read error: Connection reset by peer]
celinedior has joined #ruby
Michae___ has joined #ruby
microspino has left #ruby [#ruby]
Michae___ has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
<Spooner>
You should flush after you print.
kayloos has joined #ruby
<libryder>
how can i iterate over an array of elements, perform an ongoing calculation in the block, and return the result of the calculation? i've tried: solutions.inject { |sum, solution| sum += s.up_votes.count }
<libryder>
but all that returns is each solution
busybox42 has quit [Ping timeout: 264 seconds]
<Amnesia>
hm that does the job, Spooner could you tell me how the buffer exactly works?
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
<Spooner>
Amnesia, It will automatically flush if the buffer gets full or you request it. puts does a flush to ensure the output goes out immediately; print doesn't.
jeffreybaird has joined #ruby
<Amnesia>
hm ok
<Amnesia>
ty
<Spooner>
The buffer doesn't write to output every time you write to it, which is more efficient if you are doing lots of small prints and flushing at the end.
xsarin has joined #ruby
<pen>
is there a mruby irc channel?
robert___ has quit [Ping timeout: 245 seconds]
<Spooner>
libryder, You don't need += because + will do (the sum in the next loop is the result of the previous one).
<Amnesia>
Spooner: thanks a lot for your time :-)
<Spooner>
libryder, Should work as you expect, assuming up_votes.count is a number.
moos3 has quit [Quit: Computer has gone to sleep.]
xsarin has quit [Client Quit]
<libryder>
it is, but it's just returning the value of solutions no matter what i do
emmanuelux has joined #ruby
<Spooner>
You mean the array?
<libryder>
yes
tmi_ has joined #ruby
<Spooner>
Well, one thing to point out is that you have a block variable different to the one you use inside the block (solution vs s).
<Spooner>
libryder, Ah, sorry, you need to do inject(0)
<libryder>
ah!!!
<libryder>
Xeago: s is the current array object
<Spooner>
Because inject, if it doesn't have a parameter, will pass the first two objects in as sum and s to start off. With inject(0), it will pass in 0 and the first object.
jjbohn has quit [Quit: Leaving...]
<Spooner>
And in the former case, if you only have one object it will just return that. Dunno if it makes sense, but it generally makes sense to use an initial value like 0.
<libryder>
Spooner: that works, thanks. i will never forget this (i've tried it several times). i assumed sum would start off as 0
<Spooner>
No, because it could be "" or 0 or another object.
busybox42 has joined #ruby
<Spooner>
You can do [1, 2, 3].inject {|sum, n| sum + n } safely, but mostly you are better with an initial value.
jenrzzz has quit [Ping timeout: 245 seconds]
<libryder>
ohhh i see
<Spooner>
And it will start with sum=1 and n=2 as the first iteration.
jjbohn has joined #ruby
<libryder>
so if you don't pass an initial value, it will do some magic based on assumptions
<libryder>
^^ that magic
<Spooner>
Well, not quite magic, but yes :D
<libryder>
awesome, thanks!
jimeh has quit [Read error: No route to host]
robert___ has joined #ruby
xsarin has joined #ruby
crackfu has quit [Remote host closed the connection]
Cooler_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
mercwithamouth has joined #ruby
<apeiros>
Spooner, libryder: .inject(:+), much faster
BulleTime has joined #ruby
<Spooner>
I know, but that wasn't relevant to the question.
<apeiros>
ary.inject(initial) is like ([initial]+ary).inject
<BulleTime>
hi guys, i am a very beginner with ruby. i would like to know, how do i run this example:
<Dwarf>
If a thread finishes, is it destroyed automatically?
<BulleTime>
when i upload i only see "test"
carloslopes has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 252 seconds]
theanvah has joined #ruby
<workmad3>
libryder: it's not so much 'magic' as, if you don't provide a start value then inject will use the first value of the collection as the starting value
kayloos has quit [Ping timeout: 245 seconds]
<libryder>
workmad3: so i was trying to add a number to a Solution object
pavilionXP has joined #ruby
karasawa has joined #ruby
slainer68 has joined #ruby
jaygen has quit [Remote host closed the connection]
<apeiros>
a) don't use gsub but sub, b) anchor the regex to the left, c) through a & b make the regex easier (can drop almost all)
<apeiros>
but I think you just after somebody showing you a solution and using that.
BizarreCake has quit [Ping timeout: 256 seconds]
rippa has quit [Read error: Connection reset by peer]
spinagon has joined #ruby
v0n has joined #ruby
jjbohn has joined #ruby
artm has joined #ruby
<apeiros>
*you're
vlad_starkov has quit [Ping timeout: 252 seconds]
spinagon has quit [Read error: Connection reset by peer]
rippa has joined #ruby
jaequery has joined #ruby
<artm>
most manuals (of any gems that contain executables) don't prefix commands with 'bundle exec'. Is there a way to omit it but have the right script run with the bundled gems?
<apeiros>
artm: you can test for the presence of a Gemfile and run Bundler.setup if there is one
<apeiros>
but please don't write your script in a way that it's not possible to be used without bundler anymore. kthx.
jjbohn has quit [Ping timeout: 248 seconds]
slainer68 has joined #ruby
<samuel02_>
is there any method I could use to get "Samuel Lööf" into "samuel_loof", i.e. make it snake case and replace å, ä, ö with ascii compatible
otters has joined #ruby
<artm>
apeiros: I mean running the script from a gem. I didn't write it. for example padrino.
<apeiros>
samuel02_: rails?
<samuel02_>
apeiros, yep
<apeiros>
Inflector.transliterate
<samuel02_>
also in 2.3?
<apeiros>
no idea
<apeiros>
check the docs or just try in the console
<apeiros>
(it's ActiveSupport::Inflector btw., not just Inflector - just in case)
karasawa has joined #ruby
<samuel02_>
apeiros, ok I'll look it up, otherwise I can just check the source, thanks
tmi_ has quit [Quit: tmi_]
dankest is now known as dankest|away
phinfonet has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
tmi_ has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
Dakuan has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
karasawa has quit [Ping timeout: 246 seconds]
huoxito has joined #ruby
<apeiros>
artm: if you run it without bundle exec, unless the script is written with Bundler.setup in it, it will just resort to the system gems
<apeiros>
so it's not ensured that it will run with the right gems and it's your duty to have them installed.
<eric_>
Egh whitespace no good
Karantin has joined #ruby
Dakuan has quit [Ping timeout: 248 seconds]
sonqosaurus has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
heyitsdave has quit [Ping timeout: 252 seconds]
jblack has quit [Ping timeout: 260 seconds]
yacks has quit [Quit: Leaving]
katherinem13 has quit [Quit: WeeChat 0.3.9]
<eric_>
I got it. I changed it from: urlc = url.gsub( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1") to urlc = url.gsub( /https?:\/\//, "\\1")
katherinem13 has joined #ruby
<canton7>
use %r{regex} instead of /regex/, and save yourself the ugliness of escalping all of those /'s
katherinem13 has quit [Client Quit]
<Karantin>
Hi all, Help me please. Select from array of hashes return an array - for axample: Post.all.select {|f| f["title"] == '1.14-1.20' } - return an array: [#<Post id: 51, title: "1.14-1.20"...... how i can return id frome here?
<canton7>
you're after the first item for which the block matches?
katherinem13 has joined #ruby
<canton7>
use #first, instead of #select
Dakuan has joined #ruby
<canton7>
damn, #find. not #first
<canton7>
I always make that mistake
<Karantin>
find will return hash?
<canton7>
it'll return the Post object
<canton7>
you can get the id from that, if you want
<Karantin>
thx, i'll ry it
maxmanders has quit [Ping timeout: 248 seconds]
katherinem13 has quit [Client Quit]
katherinem13 has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
ddd has joined #ruby
maxmanders has joined #ruby
subbyyy has joined #ruby
<Karantin>
canton7, Thanks, it works :)
<canton7>
using Post.all.select{ ... }[0] would have done the same
In0perable has joined #ruby
generalissimo has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
jjbohn has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
dankest|away is now known as dankest
tndrbt has joined #ruby
jenrzzz has joined #ruby
otters has quit [Ping timeout: 248 seconds]
jds has quit [Remote host closed the connection]
BizarreCake has joined #ruby
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
IceDragon has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
maxmanders has quit [Ping timeout: 244 seconds]
otters has joined #ruby
Dakuan has quit [Ping timeout: 244 seconds]
sonqosaurus has quit [Quit: Page closed]
jjbohn has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
robert___ has joined #ruby
aytch has quit [Remote host closed the connection]
bigmac has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
yakko has joined #ruby
robert_ has quit [Ping timeout: 245 seconds]
chaosis has quit [Ping timeout: 245 seconds]
Inoperable has quit [Quit: Rectified]
Inoperable has joined #ruby
breakingthings has quit []
<shevy>
dumdedum
BizarreCake has quit [Ping timeout: 260 seconds]
timonv has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
Playground has joined #ruby
dmiller has quit [Ping timeout: 252 seconds]
Markvilla has quit [Quit: Computer has gone to sleep.]
timonv has quit [Read error: Connection reset by peer]
jalcine_ has joined #ruby
jalcine_ has joined #ruby
jalcine_ has quit [Changing host]
Jacky_ has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
kiyoura has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
sepp2k1 has joined #ruby
<canton7>
dadeda
telli has quit [Ping timeout: 248 seconds]
Markvilla has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
generalissimo has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
bigmac has quit [Ping timeout: 244 seconds]
x82_nicole has joined #ruby
Takehiro has quit [Remote host closed the connection]
jds has joined #ruby
timonv has joined #ruby
telli has joined #ruby
jenrzzz has joined #ruby
slainer68 has joined #ruby
samuel02_ has joined #ruby
BizarreCake has joined #ruby
rakl has joined #ruby
dmiller has joined #ruby
samuel02 has quit [Ping timeout: 260 seconds]
karasawa has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
BulleTime has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
Limada has joined #ruby
mneorr has joined #ruby
oposomme has joined #ruby
_br_ has quit [Excess Flood]
jds has quit [Ping timeout: 256 seconds]
breakingthings has joined #ruby
robert_ has joined #ruby
Virunga has quit [Remote host closed the connection]
_br_- has joined #ruby
uris has joined #ruby
karasawa has quit [Ping timeout: 260 seconds]
skcin7 has joined #ruby
cobragoat has joined #ruby
zodiak has quit [Remote host closed the connection]
robert___ has quit [Ping timeout: 276 seconds]
swingha has joined #ruby
aytch_ has joined #ruby
_br_- has quit [Excess Flood]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
rakl has quit [Quit: sleeping]
_br_ has joined #ruby
<apeiros>
anybody know of a gem to read/write apple numbers files?
tora_ has joined #ruby
<tora_>
доброго вечера
hackerdude has joined #ruby
<Hanmac>
i only have a gem that works on pear numbers :P
arkiver has joined #ruby
tjbiddle has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
_br_ has quit [Excess Flood]
tjbiddle has quit [Client Quit]
_br_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Karantin>
I duplicate my question on rails chanel here:
<Karantin>
"I think all you began rails with simple blog app. I need some help with it... http://pastebin.com/kA4UdX5A - post_controller code - here i want to generate a new title of post (title contain cur.week.monday.date - cur.week.sunday.date). I try to make a simple check - if record if this week exist - we make a new record for the next week with the title of the next week, else we edit the post of the next week. It works normal. But when i want to save it. Rail
freakazoid0223 has joined #ruby
bluOxigen has joined #ruby
_br_ has quit [Excess Flood]
<Hanmac>
Karantin: did you try this channel #rubyonrails ?
<apeiros>
Karantin: kudos for telling upfront that you're cross-posting. thank you.
Almond has quit [Ping timeout: 256 seconds]
bjeanes has quit [Ping timeout: 248 seconds]
syamajala has joined #ruby
autibyte has joined #ruby
_br_ has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
zodiak has joined #ruby
<Karantin>
Hanmac, thx, i will ask here. apeiros, thx :)
BizarreCake has quit [Remote host closed the connection]
<Hanmac>
apeiros: when i make a fantasy game or fantasy book the currency of the world will be "kudos" ;P
_br_ has quit [Excess Flood]
<banister`sleep>
Hanmac: would you put X-rated content in your game
Takehiro has joined #ruby
<Hanmac>
i dont think so ...
<autibyte>
I'm having trouble using a gem I installed, getting some weird error about custom_require.rb from rubygems. It's crashing just with the "require" statement: https://gist.github.com/4574364
<autibyte>
and I'm requiring rubygems so I'm unsure of why it's not in the loadpath
chaosis has joined #ruby
_br_ has joined #ruby
tommyvyo_ has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
<Hanmac>
autibyte install the json gem too ...
<havenn>
autibyte: Can you switch to a modern Ruby like 1.9.3?
jduan1981 has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
<autibyte>
Hanmac: whoops! that's why, wasn't a very explicit error message. thanks
<autibyte>
havenn: I'm on it, this is a new server that I just started installing stuff on
frogstarr78 has joined #ruby
<havenn>
autibyte: :D
bricker_ has quit [Ping timeout: 248 seconds]
frogstarr78 has quit [Client Quit]
_br_ has quit [Excess Flood]
vlad_starkov has joined #ruby
jds has joined #ruby
marr has joined #ruby
tommyvyo_ has quit [Ping timeout: 246 seconds]
maxmanders has joined #ruby
<Hanmac>
autibyte: liar :P an new ubuntu system would have 1.9.3 as default :P
<canton7>
doesn't ruby have a json lib in the stdlib?
<autibyte>
Hanmac: true :D well it's a new system to me
telli has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 245 seconds]
<Hanmac>
canton7: 1.9.3 has, 1.8.7 has not :D
<canton7>
aha, that explains it
_br_- has joined #ruby
_br_- has quit [Excess Flood]
jalcine_ is now known as Jacky
swingha has quit [Quit: WeeChat 0.3.9.2]
nuba has quit [Ping timeout: 248 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
Dakuan has joined #ruby
_br_ has joined #ruby
bjeanes has joined #ruby
<autibyte>
On a side note, is there a better way to pass string arguments from Python to a Ruby script than calling os.system() in Python and having the Ruby script read the args from a text file?
samuel02 has joined #ruby
nuba has joined #ruby
jaequery has joined #ruby
arkiver has quit [Quit: Leaving]
_br_ has quit [Excess Flood]
<apeiros>
Hanmac: haha
<canton7>
your options are pretty much the normal unix ones - arguments as command-line flags, data piped in, read from stdin, or read from a file (specified as one of those args)
samuel02_ has quit [Ping timeout: 255 seconds]
Dakuan has quit [Ping timeout: 248 seconds]
<autibyte>
canton7: ah, I think I might try command-line flags since file-reading seems to kludgy
yshh has quit [Remote host closed the connection]
_br_ has joined #ruby
tndrbt has quit [Quit: tndrbt]
<canton7>
just make the ruby script a regular script which can be called sensibly by a human in its own right
<canton7>
look at Trollop and OptionParser
tjbiddle has joined #ruby
jds has quit [Ping timeout: 248 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
<lazyPower>
I'm having an interesting problem with a ruby script. Its complaining that it cannot find a file that i've just fetched from S3. I can verify that the file exists prior to the script attempting to rename it. I have sample output here: https://gist.github.com/4574556
pu22l3r has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
<lazyPower>
If anyone has an idea on why a simple shell out to move files would be returning a "File not found" error -- as the command works when executed manually in the shell.. i'm open to suggestions.
<havenn>
lazyPower: Can you Gist contents of: ncu_recording_handler.rb
_br_ has quit [Excess Flood]
<lazyPower>
i just updated it with the S3 code. Do you need the driver script as well?
bean__ has joined #ruby
<havenn>
lazyPower: oh, nvm
<lazyPower>
ok pshed it all up
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
jadon has joined #ruby
Limada has quit [Changing host]
Limada has joined #ruby
rdark has joined #ruby
Virunga has joined #ruby
<jadon>
Hello, I had a question regarding Thread Safety. I've noticed this https://gist.github.com/5bf5a82f369bdfd23790 done a number of times. Is @children Threadsafe? does it not effectively translate into @@children or does ruby do some other magic to make it thread safe?
karasawa has joined #ruby
<lazyPower>
havenn: i apologize for the messyness - i wasn't going to refactor until i had it working at least partially correct.
maxmanders has quit [Ping timeout: 260 seconds]
quest88 has quit [Quit: quest88]
Takehiro has joined #ruby
<havenn>
lazyPower: Haven't had a chance to check scripts, but could you?: require 'fileutils'; FileUtils#mv
DrShoggoth has joined #ruby
<Hanmac>
jadon i think you need to test it ... it odes not translated into @@children
_br_ has quit [Excess Flood]
j^2 has quit [Quit: leaving]
<lazyPower>
havenn: i've tried both. They yield the same message in irb
<lazyPower>
system and fileutils.mv
maxmanders has joined #ruby
<havenn>
lazyPower: Does?: File.exist?
DatumDrop has joined #ruby
pkrnj has joined #ruby
dmiller has quit [Read error: Connection reset by peer]
<jadon>
I've tested it through console… haven't tested it with multiple threads though.
karasawa has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
<jadon>
@children is at class level though
jxf has joined #ruby
_br_ has joined #ruby
<lazyPower>
paydirt.
<lazyPower>
i was escaping the file list when i split the filename from the path. so it was double-escaping the strings i think.
<lazyPower>
doesnt explain why it didn't work when executed in irb - but i'll take it. its a small win
maxmanders has quit [Quit: Computer has gone to sleep.]
samuel02_ has joined #ruby
Takehiro has quit [Ping timeout: 245 seconds]
dmerrick has quit [Quit: dmerrick]
pu22l3r has quit [Remote host closed the connection]
tps_ has quit [Quit: tps_]
samuel02 has quit [Ping timeout: 256 seconds]
_br_ has joined #ruby
_br_ has quit [Excess Flood]
yshh has joined #ruby
_br_ has joined #ruby
jblack has joined #ruby
kans has quit [Quit: Leaving]
joeycarmello has quit [Remote host closed the connection]
mkruger has left #ruby ["Konversation terminated!"]
DatumDrop has quit [Read error: Connection reset by peer]
bcx has quit [Quit: Leaving.]
jadon has left #ruby [#ruby]
dantheman_ has joined #ruby
DatumDrop has joined #ruby
<dantheman_>
anyone around?
mockra has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
<dantheman_>
anyone?
<apeiros>
dantheman_: no
<apeiros>
anyone is not here
<dantheman_>
lol
<dantheman_>
word
<dantheman_>
question
<banister`sleep>
apeiros: sup dude, did u upgrade to 0.9.11 yet? :D and if so, does 'edit MyClass' work? sry to bug, i just havent had much feedback yet (which could be a good thing, or could mean ppl just haven't upgraded yet)
<dantheman_>
I'm trying to teach myself ruby and play with facebook's realtime updates callback server thingy
<apeiros>
0.9.11 of pry?
<banister`sleep>
apeiros: yes
bluOxigen has joined #ruby
<dantheman_>
and I'm getting something weird that I can't figure out
Kuifje has quit [Read error: Connection reset by peer]
danneu has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
joeycarmello has joined #ruby
Kuifje has joined #ruby
samuel02 has joined #ruby
tommyvyo has joined #ruby
_br_ has quit [Excess Flood]
orcris has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
mneorr has joined #ruby
Nahra has joined #ruby
Nahra has joined #ruby
samuel02_ has quit [Ping timeout: 252 seconds]
ephialtes480 has joined #ruby
<shevy>
dantheman_ if you want to you could still use ;
_br_- has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
brianpWins has joined #ruby
_br_- has quit [Excess Flood]
dankest has quit [Quit: Leaving...]
razibog has quit [Ping timeout: 260 seconds]
dankest has joined #ruby
_br_ has joined #ruby
Beoran__ has joined #ruby
mockra has quit [Remote host closed the connection]
bean__ has joined #ruby
RONNCC has joined #ruby
RONNCC has quit [Changing host]
RONNCC has joined #ruby
RONNCC has joined #ruby
slainer68 has joined #ruby
<RONNCC>
how do you do the range [.001, .002, .003 .... .999] in ruby?
Beoran_ has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
mamat has joined #ruby
<mamat>
hii
<RONNCC>
hu
<RONNCC>
hi
<RONNCC>
how do you do the range [.001, .002, .003 .... .999] in ruby?
nomenkun has joined #ruby
mamat has left #ruby [#ruby]
karasawa has joined #ruby
<RONNCC>
how do you do the range [.001, .002, .003 .... .999] in ruby?
_br_ has quit [Excess Flood]
_br_- has joined #ruby
<apeiros>
RONNCC: and you ask 3 times because…?
<RONNCC>
apeiros: sorry. accidetnt
<RONNCC>
*dent
<apeiros>
that's not a range, btw., that's an array. I'd use Array.new(999) { |i| i/1000 }
<apeiros>
d'oh
syamajala has quit [Quit: leaving]
<apeiros>
Array.new(999) { |i| i.fdiv 1000 }
atmosx has quit [Client Quit]
MattRB has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
<RONNCC>
apeiros: what about with a step
nomenkun has quit [Ping timeout: 245 seconds]
DDAZZA has joined #ruby
aaronmacy has joined #ruby
<apeiros>
that's not a meaningful question. yes, what about it?
Xeago has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
<RONNCC>
apeiros: a step of every 3. so like range(1,100,2)
_br_- has quit [Excess Flood]
chrismhough has joined #ruby
<apeiros>
RONNCC: are you telling me you seriously can't adapt i/1000 to a step of every 3?
maxmanders has joined #ruby
_br_ has joined #ruby
<apeiros>
anyway, you can use Integer#step + Enumerator#to_a
<RONNCC>
apeiros: yes i can't I don't do ruby. I practice pythonfu ;)
<RONNCC>
apeiros: can you do a nested list comprehension A* star search in python? hmmm? :P
<apeiros>
RONNCC: errr, yes. that's less about ruby and more about generally not being totally stupid :-p
<RONNCC>
apeiros: i have no clue how this works function wise. everyother language has a range generator with a step built in >:C
<RONNCC>
except c ofc
awarner has joined #ruby
jxf has quit [Ping timeout: 245 seconds]
cobragoat has quit [Remote host closed the connection]
<RONNCC>
lol so thanks apeiros:
solitude88 has joined #ruby
mercwithamouth has joined #ruby
cobragoat has joined #ruby
subbyyy has quit [Ping timeout: 248 seconds]
_br_ has quit [Excess Flood]
artm_ has joined #ruby
<RONNCC>
apeiros: oh smh. I didn't mean using multiplication and stuff. I mean't just via functions. I trust them to optimize. also Integer doesn't have #step
artm_ has quit [Client Quit]
hybris has joined #ruby
cantonic has quit [Quit: cantonic]
<apeiros>
yes, the owner of #step is Fixnum for your starting point. ruby doesn't have functions. and if you care about optimization, you're doing it wrong (at this point at least).
DDAZZA has quit [Remote host closed the connection]
Goles_ has joined #ruby
_br_- has joined #ruby
Goles_ has quit [Remote host closed the connection]
<apeiros>
oh well, Float since you use 0.001 as start point. sorry.
artm_ has joined #ruby
cpruitt_ has joined #ruby
<apeiros>
meh, Numeric for all three actually.
artm has quit [Ping timeout: 252 seconds]
artm_ is now known as artm
Goles has quit [Read error: Operation timed out]
cpruitt has quit [Ping timeout: 255 seconds]
cpruitt_ is now known as cpruitt
_br_- has quit [Excess Flood]
Markvilla has joined #ruby
advorak has joined #ruby
jduan1981 has joined #ruby
aaronmacy has quit [Quit: Leaving.]
yshh has joined #ruby
_br_ has joined #ruby
advorak has quit [Client Quit]
Markvilla has quit [Client Quit]
robert___ has joined #ruby
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
_br_ has quit [Excess Flood]
recycle has joined #ruby
<apeiros>
Beoran__: ping - you there? mind a PM?
maxmanders has quit [Quit: Computer has gone to sleep.]
DatumDrop has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 244 seconds]
_br_ has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
statarb3 has joined #ruby
xemu has joined #ruby
_br_ has quit [Excess Flood]
yshh has quit [Ping timeout: 248 seconds]
otters has quit [Ping timeout: 240 seconds]
toekutr has quit [Remote host closed the connection]
tjbiddle has joined #ruby
Dann1 has joined #ruby
Dann1 has quit [Read error: Connection reset by peer]
Vert has joined #ruby
_br_ has joined #ruby
Dann1 has joined #ruby
willatwood has joined #ruby
pmros has joined #ruby
samuel02_ has joined #ruby
blazes816 has joined #ruby
awarner has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
haxrbyte has joined #ruby
eric_ has quit [Quit: Leaving]
tatsuya_o has joined #ruby
_br_ has joined #ruby
staafl_alt has quit [Quit: Leaving]
haxrbyte_ has quit [Ping timeout: 246 seconds]
_br_ has quit [Excess Flood]
tatsuya_o has quit [Ping timeout: 245 seconds]
b1rkh0ff has quit [Quit: Leaving]
Vert has quit [Remote host closed the connection]
Sonmi_001 has joined #ruby
_br_ has joined #ruby
t0rc has joined #ruby
jsilver has quit [Remote host closed the connection]
quest88 has joined #ruby
_br_ has quit [Excess Flood]
<shevy>
pong!
<shevy>
I counter your ping
Vert has joined #ruby
pmros has quit [Ping timeout: 240 seconds]
<apeiros>
you're not Beoran__
ddd has joined #ruby
Dann2 has joined #ruby
_br_ has joined #ruby
d2dchat has quit [Remote host closed the connection]
MattRB has quit [Quit: This computer has gone to sleep]
_br_ has quit [Excess Flood]
Dann1 has quit [Ping timeout: 252 seconds]
atno has quit [Read error: Connection reset by peer]
_br_ has joined #ruby
atno has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
generalissimo has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
slainer68 has joined #ruby
_br_- has joined #ruby
tjbiddle_ has joined #ruby
kidoz has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
karasawa has joined #ruby
vlad_starkov has joined #ruby
_br_- has quit [Excess Flood]
slainer68 has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
_br_ has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
__BigO__ has joined #ruby
eldariof has quit []
tatsuya_o has joined #ruby
mockra has joined #ruby
_br_ has quit [Excess Flood]
m104 has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Dann2 is now known as Dann1
samuel02 has joined #ruby
hackerdude has quit [Remote host closed the connection]
willatwood has quit [Quit: Computer has gone to sleep.]
dankest is now known as dankest|away
mockra has quit [Ping timeout: 244 seconds]
Kakera has quit [Ping timeout: 248 seconds]
_br_ has joined #ruby
atmosx has joined #ruby
chaosis has quit [Ping timeout: 245 seconds]
samuel02_ has quit [Ping timeout: 260 seconds]
zph has joined #ruby
timonv has joined #ruby
_br_ has quit [Excess Flood]
thufir_ has joined #ruby
_br_- has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
guns has quit [Quit: guns]
dankest|away is now known as dankest
thone_ has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
Markvilla has joined #ruby
_br_- has quit [Excess Flood]
statarb3 has quit [Ping timeout: 245 seconds]
robert_ has joined #ruby
_br_ has joined #ruby
thone has quit [Ping timeout: 248 seconds]
MattRB has joined #ruby
tommyvyo_ has joined #ruby
otters has joined #ruby
dankest has quit [Quit: Leaving...]
robert___ has quit [Ping timeout: 244 seconds]
_br_ has quit [Excess Flood]
Spooner has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
phinfonet has quit [Read error: Connection reset by peer]
maletor has joined #ruby
pnkbst has joined #ruby
mneorr has joined #ruby
baphled has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
phinfonet has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
mneorr has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tora_ has quit [Remote host closed the connection]
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 244 seconds]
banister`sleep has quit [Remote host closed the connection]
DatumDrop has quit [Ping timeout: 245 seconds]
JumpMast3r has joined #ruby
Guest23431 has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
Xeago has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
Dann1 has quit [Quit: GODDAMNIT]
bel3atar has quit [Read error: Operation timed out]
timonv has quit [Ping timeout: 248 seconds]
iamjarvo1 has joined #ruby
__BigO__ has quit [Remote host closed the connection]
fryguy has quit [Read error: Connection reset by peer]
thorncp has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
brianpWins has quit [Quit: brianpWins]
programmerandy has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
maetthew has quit [Ping timeout: 245 seconds]
waxjar has quit [Ping timeout: 260 seconds]
programmerandy has left #ruby [#ruby]
arusso has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
_br_ has joined #ruby
ephialtes480 has quit [Ping timeout: 244 seconds]
maxmanders has joined #ruby
hackerdude has joined #ruby
Apocalypse has quit [Ping timeout: 245 seconds]
maetthew has joined #ruby
urrk has quit [Ping timeout: 260 seconds]
arusso has joined #ruby
arusso has quit [Changing host]
arusso has joined #ruby
Hien has quit [Ping timeout: 260 seconds]
fryguy has joined #ruby
_br_ has quit [Excess Flood]
urrk has joined #ruby
statarb3 has joined #ruby
sharpobject has quit [Ping timeout: 264 seconds]
thorncp has joined #ruby
Hien has joined #ruby
sharpobject has joined #ruby
Apocalypse has joined #ruby
banister`sleep has joined #ruby
alaska has quit [Ping timeout: 264 seconds]
chridal has quit [Read error: Operation timed out]
solitude88 has quit [Quit: Leaving...]
waxjar has joined #ruby
xargoon has quit [Ping timeout: 276 seconds]
_br_ has joined #ruby
ggamel has joined #ruby
statarb3 has quit [Ping timeout: 245 seconds]
robert___ has joined #ruby
tommyvyo has quit [Ping timeout: 252 seconds]
tommyvyo_ is now known as tommyvyo
mikekelly has quit [Ping timeout: 240 seconds]
samuel02_ has joined #ruby
_carloslopes has quit [Remote host closed the connection]
kiyoura has quit [Ping timeout: 256 seconds]
xargoon has joined #ruby
bel3atar has joined #ruby
_br_ has quit [Excess Flood]
tommyvyo_ has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Read error: Connection reset by peer]
robert_ has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
mikekelly has joined #ruby
tommyvyo_ has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
tommyvyo_ has joined #ruby
orcris has quit [Ping timeout: 245 seconds]
_br_- has joined #ruby
_br_- has quit [Excess Flood]
maletor has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
crackfu has joined #ruby
beardyjay has quit [Ping timeout: 260 seconds]
<danneu>
I asked this in #ror but it was the wrong channel. Can anyone see an obvious improvement to the `nodes` method in this simple class? https://gist.github.com/0433bd5babd55b2c2ef4
<banister`sleep>
danneu: break it up into another method
PragCypher has quit [Quit: Leaving]
kiyoura has joined #ruby
karasawa has joined #ruby
<cirwin>
danneu: if you can get an Enumerator out of the traverse method, call map on it
_br_ has quit [Excess Flood]
havenn has quit [Remote host closed the connection]
<danneu>
thanks i guess i didn't see that since i had if statements until i made that gist.
kiyoura has quit [Ping timeout: 252 seconds]
BulleTime has quit [Ping timeout: 255 seconds]
ddd has quit [Ping timeout: 248 seconds]
karasawa has quit [Ping timeout: 256 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 248 seconds]
_br_ has quit [Excess Flood]
_br_ has joined #ruby
<danneu>
cirwin: nokoigir's #traverse sends #children recursively to each node and passes each node to the block. probably because building one single Enumerator for all the nodes in the dom could be massive.
gyre007 has joined #ruby
<danneu>
cirwin: my dom is always small so i could just reimplement the recursive #children call into my own Enumerator.
emocakes has joined #ruby
jduan1981 has quit [Read error: Connection reset by peer]
<cirwin>
danneu: oh enumerators are cleverer than that, they don't load everything into ram :)
<cirwin>
then you can .compact to get rid of things you don't want
jduan1981 has joined #ruby
<cirwin>
otherwise why not put everything into the selector if it's nokogiri
maletor has joined #ruby
<danneu>
cirwin: basically, the nodes i want are all siblings. "<div><h1><div><div><h1>" etc, but i need in that order. for instance, dom.css("h1, div") returns "<h1><h1><div><div>..."
<cirwin>
ah ok
<danneu>
interesting assertion about enumerators. i'll have to read about it
<cirwin>
try: (0..10000000000000000).to_enum
_br_ has quit [Excess Flood]
freakazoid0223 has quit [Quit: Leaving]
CroweT has joined #ruby
xorrbit has joined #ruby
carloslopes has joined #ruby
CroweT has quit [Client Quit]
arturaz has quit [Remote host closed the connection]
Markvilla has joined #ruby
forced_request has joined #ruby
carloslopes has quit [Remote host closed the connection]
<xorrbit>
I'm getting an undefined method '[]' for a class, how would I go about implementing a method to fix this?
tjbiddle has quit [Quit: tjbiddle]
davidokner has joined #ruby
<davidokner>
Does anyone think a person could learn ruby by joining an open source project?
<apeiros>
def [](arg1, …)
<apeiros>
@ xorrbit
<xorrbit>
hmm, so just def to_hash won't work?
<apeiros>
davidokner: probably. but I think it'd be better if you'd learn the basics on your own.
<apeiros>
xorrbit: no, why would it?
<xorrbit>
I don't know
<apeiros>
[] is its own method, [] does not invoke to_hash
<xorrbit>
<-- ruby noob
<xorrbit>
hmm
kayloos has quit [Ping timeout: 240 seconds]
<davidokner>
apeiros: Ok, I have learned some basics. Are there open source projects for beginners specifically?
<apeiros>
I doubt it. usually oss projects are started because somebody has an itch he wants to scratch
maxmanders has quit [Quit: Computer has gone to sleep.]
_br_- has joined #ruby
<davidokner>
apeiros: Perhpas making some programs by myself and then trying to join an open source project. But, if there were some that targeted novice, that would be interesting.
<apeiros>
and it's probably the best if you join an oss project which scratches one of your itches.
Sonmi_001 has quit [Quit: Quitte]
maxmanders has joined #ruby
_br_- has quit [Excess Flood]
jsilver has joined #ruby
<atmosx>
guys the correct syntax is rss = NewsDisplay::feed_list or rss = NewsDisplay.new::feed_list ?? I usually do this in 2 steps but seems much more elegant like this
<davidokner>
apeiros: what is an oss project?
<danneu>
davidokner: there are always beginner projects that more inspire you while being certainly within reach. but they're hard to find just browsing
<danneu>
open source
<atmosx>
davidokner: open source
<cirwin>
open source software :)
<apeiros>
^
<atmosx>
see how cirwin is smiling?
<atmosx>
he's a linux winnie
<davidokner>
Oh, ok
<cirwin>
atmosx: :D
<apeiros>
atmosx: . for method invocation. :: is antiquated and may even be removed.
<atmosx>
cirwin: :-P
* cirwin
gets all warm and fuzzy when oss is said in full
<atmosx>
apeiros: I just DISCOVERED IT!
solitude88 has joined #ruby
<cirwin>
apeiros: really?
<atmosx>
no I'm using it …
<apeiros>
rly
<cirwin>
damn
<davidokner>
Has anyone tried making a ruby web application without using rails or sinatra or any web framework?
<atmosx>
for quite a while
_br_ has joined #ruby
<cirwin>
I love how authoritative EM::run looks
<atmosx>
okay, so there's another way I think…
<atmosx>
cirwin: there's EM.run or something
<cirwin>
atmosx: of course, it's the same
<atmosx>
there was a blog post I read recently about it
tmi__ has joined #ruby
<cirwin>
but it's like I don't do puts() because it looks silly
<cirwin>
EM::run is a statement of the highest pretension
<atmosx>
:: was used for class methods or something
mneorr has quit [Read error: Connection reset by peer]
<atmosx>
isn't that an irb alternative?
_br_ has quit [Excess Flood]
<cirwin>
esing: 1.9.3 ideally, or 1.8.7 if that's easier
<cirwin>
atmosx: pry is, yes
_br_- has joined #ruby
<atmosx>
find-ref cool
<esing>
cirwin, Thanks
mneorr has joined #ruby
chrismhough has joined #ruby
alanp_ has joined #ruby
tjbiddle has joined #ruby
Jamone has quit [Ping timeout: 245 seconds]
<RONNCC>
what do you guys use for memoize
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
t0rc has quit [Quit: WeeChat 0.3.9.2]
<RONNCC>
*memoizing
pkrnj has quit [Quit: Computer has gone to sleep.]
<apeiros>
@foo ||= begin …calc… end
skcin7 has quit [Quit: Computer has gone to sleep.]
alanp has quit [Ping timeout: 244 seconds]
<apeiros>
often even doable without begin/end
_br_- has quit [Excess Flood]
baphled has joined #ruby
<esing>
I run the script with "ruby volume.rb", but I guess the script needs more dependencies http://dpaste.org/VYV6q/
<ggamel>
Why will rbenv not work anymore :( Just upgraded to 1.9.3-p374 and had re-installed all of my global gems - everything seemingly went great. After closing iterm2 last night and launching it today, it's been nothing but a nightmare.
<ggamel>
System is defaulting to 1.8.7 and no amount of uninstalling/reinstalling rbenv and rehashing and setting the proper global ruby will change anything
jaequery has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
<esing>
cirwin Thanks, using curl link > volume.rb and then ruby volume.rb makes it work for me too. Before I just copied it from the browser to volume.rb
<cirwin>
ah, yeah
<cirwin>
I've bad problems with copy-paste from gist before
samuel02 has joined #ruby
_br_ has quit [Excess Flood]
<ggamel>
annnnnnd ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] strikes again. haven't had issues since July 2012. dangit
artm has quit [Quit: artm]
Monie has joined #ruby
samuel02_ has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
Takehiro has joined #ruby
crackfu has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 256 seconds]
<ggamel>
Anyone know how to diagnose why the default OS X 10.8.2 ruby is refusing to allow rbenv to switch to other rubies? I'm properly adding "eval "$(rbenv init -)"" to my zshrc file in dotfiles, everything else loads fine - $PATH is as it has been/should be - yet Apple's ruby continues it's triumph.
awarner has joined #ruby
_br_ has quit [Excess Flood]
scottmos has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Read error: Connection reset by peer]
tommyvyo_ is now known as tommyvyo
_br_ has joined #ruby
alaska has joined #ruby
tjbiddle_ has joined #ruby
_br_ has quit [Excess Flood]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
tjbiddle_ has joined #ruby
cajone has quit [Read error: Connection reset by peer]
Jacky_ has joined #ruby
_br_ has joined #ruby
jduan1981_ has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
Playground has joined #ruby
Jacky has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
dantheman_ has quit [Quit: Page closed]
jduan1981 has quit [Read error: Connection reset by peer]
jduan1981_ is now known as jduan1981
tmi__ has quit [Quit: tmi__]
emergion has joined #ruby
emergion has quit [Client Quit]
eric_ has joined #ruby
<eric_>
Okay, I need urgent help with a tcp proxy in ruby. The url parser I am working on seems to be redirecting everythin to 127.0.0.1, I need someone to pm if they can help, I really wouldn't like people looking at the full code, except in pm
_br_ has quit [Excess Flood]
tjbiddle_ has quit [Ping timeout: 245 seconds]
<atmosx>
eric_: You can ask them to sign an NDA first. Just to be sure nothing bad happens.
<apeiros>
eric_: same as before: want free help? show code.
<apeiros>
don't want to show code? get a consultant.
<eric_>
The url parser is apperently redirecting every url to 127.0.0.1 SOMEHOW
Vert has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
<canton7>
eric_, impossible to say without lots more info. Is the ip being printed correctly on line 53?
Iszak has joined #ruby
<eric_>
On 1 url yes on the other no
oposomme|away has quit [Quit: Leaving...]
<eric_>
I only have 2 url's
_br_ has joined #ruby
Jacky_ is now known as Jacky
<RONNCC>
hey
_br_ has quit [Excess Flood]
<RONNCC>
what do you guys use for memoization
Blaster has joined #ruby
Jacky is now known as Guest67037
love_color_text has quit [Read error: Connection reset by peer]
love_color_text has joined #ruby
xorrbit has quit [Ping timeout: 256 seconds]
<banister`sleep>
RONNCC: apeiros already answered you
<canton7>
eric_, that doesn't help at all i'm afraid
osaut has quit [Quit: osaut]
<eric_>
Egh okay what info do you need exactly
Monie has quit [Ping timeout: 244 seconds]
<RONNCC>
oh
<RONNCC>
smh
<RONNCC>
can i do that in regular ruby
tps_ has quit [Quit: tps_]
<RONNCC>
or do i have to install rails
RagingDave has joined #ruby
<nfk>
wait, does ruby have no shortcircuited logical operators?
<apeiros>
RONNCC: you're in #ruby, all you see here is regular ruby unless stated otherwise.
_br_ has joined #ruby
skcin7 has joined #ruby
<apeiros>
nfk: ||, &&, and, or are all short-circuited
<nfk>
apeiros, oh really?
<apeiros>
*sob*
<nfk>
true && 1.succ
<nfk>
=> 2
<apeiros>
no, I'm just kidding. YES OF COURSE REALLY.
<nfk>
is that what you call short circuited and operator?
_br_ has quit [Excess Flood]
<banister`sleep>
nfk: do u understand how && works? :)
<apeiros>
nfk: of course, if lhs is true, && must evaluate the other side too
<canton7>
eric_, try and look at this from our point of view. I've asked if your ip's being correctly parsed form that file. you've said "sometimes". what am I supposed to gain from that? Is it the case that even when the ip is parsed correclty, the TCPSock is still opened to localhost?
<banister`sleep>
nfk: it *has* to check both, it only skips (short-circuits) the second one if the first one is false, u got it the wrong way round
<apeiros>
otherwise you can't tell whether a && b is true. you can only short-circuit AND on a false LHS
<canton7>
nfk, true || 1.succ # => true
chrismhough has quit [Quit: chrismhough]
<apeiros>
false && 1.succ # => false
<nfk>
banister`sleep, in langauges where it's short circuited i expect it to return true as it would never execute the code on the right
<canton7>
nfk, false && 1.succ # => false
<canton7>
damn, beat me to it
<nfk>
banister`sleep, uh?
<banister`sleep>
nfk: no, you're just confusing && for ||
bean__ has quit [Quit: Computer has gone to sleep.]
<nfk>
banister`sleep, apeiros thank you
<canton7>
nfk, your logic is backwards. if the left-hand side of `&&` is true, how are we supposed to know whether the expression is true without evaluating the right side?
<nfk>
and canton7 too
<nfk>
canton7, yeah, got it
<canton7>
cools
<nfk>
why do i make this mistake at least once a year for the past... forever?
karasawa has joined #ruby
<apeiros>
nfk: write it down. put it on your wall.
<canton7>
eric_, looks alright on its own to me. presuming the arguments are ok
<nfk>
every time i have not done logic in a about a year, i always mix them up
<nfk>
and it has been like that literally for years
nomenkun has joined #ruby
_br_ has joined #ruby
kayloos has joined #ruby
allsystemsarego has quit [Quit: Leaving]
<canton7>
like most things logic, if you think them through, you can always get, logically, to the correct answer :P
tjbiddle has quit [Quit: tjbiddle]
<nfk>
was there anything specific with breaking long statements in ruby?
<eric_>
Basicly what it does is there is a url encoded in base64. The url parser decrypts the url, parses it and tries to connect to it. Needless to say it seems to work. When I use it as a proxy 127.0.0.1:8181 in firefox every url seems to redirect to 127.0.0.1
<nfk>
like using \ in sh
_br_ has quit [Excess Flood]
<canton7>
nfk, be careful ruby doesn't think that the expression's finished, since there's no semicolon. so end the line with an operator ('||' for example, or something else which obviously must have something following it), or use \
_br_ has joined #ruby
chrismcg is now known as zz_chrismcg
<nfk>
canton7, i suppose && is a natural line break point
<nfk>
chances of this breaking in 2.0?
<canton7>
I doubt it. 2.0 doesn't change much
<eric_>
canton7, no matter what url i do, ping.pong, ping.mc or dicks.mc they all are connecting to my webserver instead of the one on my vps
<nfk>
canton7, also, i should probably indent the next line one level, right?
<canton7>
nfk, that's up to you and your coding style. some people indent to after the if, some add an extra tab or two...
Guest67037 is now known as jalcine
jalcine has quit [Changing host]
jalcine has joined #ruby
blacktulip has quit [Remote host closed the connection]
<canton7>
eric_, your webserver is localhost?
jalcine is now known as Jacky
elektronaut has joined #ruby
<eric_>
yes
karasawa has quit [Ping timeout: 256 seconds]
<eric_>
Then i have one on my vps as well
theRoUS has quit [Ping timeout: 246 seconds]
<canton7>
tried that line just on its own, from irb or something?
sailias has joined #ruby
mneorr has quit [Remote host closed the connection]
<eric_>
An wow
<eric_>
And**
<eric_>
It magically works
<eric_>
That makes no sense
<eric_>
at all
_br_ has quit [Excess Flood]
<canton7>
so now you make damn sure the arguments passed to line 57 are correct, and that it *is* line 57 doing the connecting you're seeing, and not anything else
nomenkun has quit [Ping timeout: 246 seconds]
hackerdude has quit [Remote host closed the connection]
jeffreybaird has quit [Quit: jeffreybaird]
_br_ has joined #ruby
jsilver has quit [Ping timeout: 256 seconds]
jimeh has joined #ruby
hackerdude has joined #ruby
hackerdude has quit [Remote host closed the connection]
samuel02_ has joined #ruby
jsilver has joined #ruby
Jacky has quit [Ping timeout: 252 seconds]
<apeiros>
interesting chunk size in that code (4048)
cantonic has joined #ruby
slainer68 has quit [Remote host closed the connection]
<apeiros>
somebody probably misremembered 4KB
samuel02 has quit [Ping timeout: 252 seconds]
<Hanmac>
apeiros sorry that i currect you, but its 4kiB
_br_ has quit [Excess Flood]
<apeiros>
only in newspeak
jeffreybaird has joined #ruby
<apeiros>
but if you want to correct me, then do it properly, KiB :-p
v0n has joined #ruby
RagingDave has quit [Read error: Operation timed out]
RagingDave has joined #ruby
<cirwin>
4048 is the perfect compromise
postmodern has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
<atmosx>
what is the diff between kiB and KiB ?
<atmosx>
4KB = 4 Kilobytes right?
Banistergalaxy has joined #ruby
<Hanmac>
atmosx yeah and 1KB = 1000B and 1KiB = 1024B
<apeiros>
atmosx: theoretically 4KB == 4000 bytes, historically it is used as 4096, though
<atmosx>
oh didn't knew
<apeiros>
the term kibbibyte (abbreviated as KiB) has been introduced to represent 1024