b1rkh0ff has quit [Read error: Connection reset by peer]
Rarrikins_i_v has quit [Ping timeout: 244 seconds]
Rarrikins has joined #ruby-lang
headius has joined #ruby-lang
publicvoid has joined #ruby-lang
tenderlove has joined #ruby-lang
postmodern has joined #ruby-lang
chimkan has quit [Quit: chimkan]
mrbloo has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
jtoy has quit [Quit: jtoy]
Rarrikins_j has joined #ruby-lang
Rarrikins has quit [Ping timeout: 245 seconds]
Rarrikins_j_s has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
ryanv-raptor has joined #ruby-lang
blaines has joined #ruby-lang
Rarrikins_j has quit [Ping timeout: 245 seconds]
Rarrikins_j_s_h has joined #ruby-lang
Rarrikins_j_s_h has quit [Remote host closed the connection]
Rarrikins_j_s has quit [Ping timeout: 252 seconds]
blaines has left #ruby-lang [#ruby-lang]
robbyoconnor has quit [Ping timeout: 245 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
scollier has quit [Quit: Ex-Chat]
havenwood has quit [Remote host closed the connection]
therod has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
cirenyc has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
dous_ has joined #ruby-lang
zhul_mechanos has quit [Quit: zhul_mechanos]
therod has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 255 seconds]
dous has quit [Ping timeout: 248 seconds]
robotmay has quit [Ping timeout: 276 seconds]
datanoise has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
blaines has joined #ruby-lang
akahn has joined #ruby-lang
robbyoconnor has joined #ruby-lang
bantic has quit [Quit: bantic]
datanoise has quit [Ping timeout: 246 seconds]
_tockitj has quit [Ping timeout: 255 seconds]
blaines has left #ruby-lang [#ruby-lang]
rsl has quit [Quit: Computer has gone to sleep.]
<reactormonk>
zenspider, you don't like gnuplot? ^^
dous_ has quit [Ping timeout: 244 seconds]
mrbloo has quit [Quit: mrbloo]
ryanv-raptor has left #ruby-lang [#ruby-lang]
therod has joined #ruby-lang
robotmay has joined #ruby-lang
tomzx_mac has joined #ruby-lang
ddv has quit [Ping timeout: 240 seconds]
chendo has quit [Ping timeout: 252 seconds]
ddv has joined #ruby-lang
robotmay has quit [Ping timeout: 276 seconds]
chendo_ has joined #ruby-lang
megha has quit [Ping timeout: 264 seconds]
therod has quit [Ping timeout: 245 seconds]
robotmay has joined #ruby-lang
datanoise has joined #ruby-lang
robotmay has quit [Read error: Connection reset by peer]
chendo_ has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby-lang
dustint has joined #ruby-lang
<zenspider>
reactormonk: if they add alpha blending I'll switch back because I have a lot of old software that used it to good effect
<zenspider>
honestly, the google visualization api is a HUGE step up from the POS google charts they originally released... but fuck does their doco suck
<reactormonk>
zenspider, alpha blending?
mjio has quit []
banisterfiend has quit [Ping timeout: 252 seconds]
harper_ has joined #ruby-lang
harper_ has quit [Client Quit]
lcdhoffman has quit [Quit: lcdhoffman]
chendo_ has quit [Ping timeout: 252 seconds]
carloslopes has joined #ruby-lang
<hakunin>
hi folks, could someone explain why ruby 1.9.3p327 is being crazy? or am i crazy
<hakunin>
or minitest
<hakunin>
echo "require 'minitest/autorun'; class FooTest < MiniTest::Unit::TestCase; def test_foo; assert_equal('0x0', '0x1') end end" > foo.rb
<hakunin>
ruby foo.rb
<hakunin>
wtf is this
chendo_ has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
<zenspider>
it's so that inspects on generic objects don't fail because of the object id
<zenspider>
ruby -e 'p Object.new'
sn0wb1rd has quit [Quit: sn0wb1rd]
richardburton has quit [Ping timeout: 246 seconds]
<hakunin>
zenspider: was going to submit issue, but they're disabled on github
<zenspider>
no they're not
<zenspider>
you're looking at the wrong place
<zenspider>
seattlerb/minitest
<zenspider>
or you're not logged in?
<hakunin>
zenspider: damn i was still looking at that repo, you're right
<zenspider>
:P
<hakunin>
zenspider: great, will submit
<zenspider>
so... you can either override mu_pp_for_diff in your testcase, or you can change the regexp to require the hex string be at least 4 chars or something
<zenspider>
that method IS meant to be overridden as needed
<zenspider>
(file anyways... this is a doco issue)
<hakunin>
zenspider: hm, baffled me when asserting on snippets of imagemagick commands :) +"-size 400xXXXXXX tile:granite: -brightness-contrast 38x-33 -blur 0xXXXXXX.5"
<hakunin>
zenspider: it does that to any substring with 0x...
<zenspider>
ew. yeah
<zenspider>
needs a word break at the beginning too
<zenspider>
that sucks. never thought of that
robbyoconnor has quit [Ping timeout: 272 seconds]
drbrain has quit [Remote host closed the connection]
mwjcomputing has joined #ruby-lang
<hakunin>
submitted
<zenspider>
thanks
<hakunin>
thank you, minitest is great
mjio has joined #ruby-lang
jtoy has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
mercwithamouth has joined #ruby-lang
headius has quit [Quit: headius]
headius has joined #ruby-lang
headius has quit [Client Quit]
sepp2k has joined #ruby-lang
innohero has joined #ruby-lang
lcdhoffman has joined #ruby-lang
therod has joined #ruby-lang
therod has quit [Ping timeout: 248 seconds]
RubyHead has quit [Remote host closed the connection]
powershellyoda has joined #ruby-lang
banisterfiend has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 244 seconds]
powershellyoda has quit [Client Quit]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
mwjcomputing has joined #ruby-lang
banisterfiend is now known as banister`sleep
towski has quit [Remote host closed the connection]
gregmore_ has joined #ruby-lang
richardburton has joined #ruby-lang
gregmore_ has quit [Ping timeout: 252 seconds]
richardburton has quit [Ping timeout: 244 seconds]
io_syl has quit [Ping timeout: 252 seconds]
mrbloo has quit [Quit: mrbloo]
cirenyc has quit [Quit: Leaving...]
bzalasky has joined #ruby-lang
chimkan has quit [Quit: chimkan]
banister`sleep has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
bzalasky has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
bzalasky has joined #ruby-lang
Axsuul has quit [Ping timeout: 255 seconds]
megha has quit [Quit: WeeChat 0.4.0]
cirenyc has joined #ruby-lang
gjaldon has joined #ruby-lang
carloslopes has joined #ruby-lang
chimkan has joined #ruby-lang
therod has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 272 seconds]
neocoin has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
therod has quit [Ping timeout: 276 seconds]
drbrain has joined #ruby-lang
innohero has left #ruby-lang [#ruby-lang]
krz has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
mrsolo has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
Kallikanzarid has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
datanoise has quit [Ping timeout: 272 seconds]
peppyheppy_ has joined #ruby-lang
richardburton has joined #ruby-lang
peppyheppy has quit [Ping timeout: 252 seconds]
peppyheppy_ has quit [Ping timeout: 244 seconds]
richardburton has quit [Ping timeout: 252 seconds]
herpless is now known as herpless_
herpless_ is now known as herpless
io_syl has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
chimkan_ has joined #ruby-lang
justincampbell has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
chimkan has quit [Ping timeout: 248 seconds]
chimkan_ is now known as chimkan
chimkan has left #ruby-lang [#ruby-lang]
jtoy has quit [Quit: jtoy]
breakingthings has joined #ruby-lang
<breakingthings>
Anyone around familiar with threads I can ask some conceptual stuff to?
chimkan has joined #ruby-lang
jonahR has joined #ruby-lang
mercwithamouth has joined #ruby-lang
<shachaf>
breakingthings: You're probably best off just asking your questions.
<breakingthings>
shachaf: I've not been having much luck getting someone to actually reply more than one line that way so far. :d
<shachaf>
What if someone is somewhat familiar and volunteers to help you, and then it turns out they don't know enough to answer your questions? Then they'll feel bad.
<shachaf>
No one wants to feel bad.
datanoise has joined #ruby-lang
chimkan has quit [Ping timeout: 248 seconds]
chimkan__ has joined #ruby-lang
Guest____ has joined #ruby-lang
datanoise has quit [Read error: Operation timed out]
<zenspider>
breakingthings: just ask
<zenspider>
type it into a text editor to save it for the next room in case we don't answer :P
AntiTyping has joined #ruby-lang
* breakingthings
shrugs
<breakingthings>
I'm creating an IRC bot and trying to create a thread that will run a loop on TCPSocket#readline
<breakingthings>
I'm trying to come up with a way to structure my application in such a way that will allow me to… I guess pass the data from that thread back to the main thread so that the application can react to it? I'm not really sure how to phrase this.
chimkan has joined #ruby-lang
Guest____ has quit [Ping timeout: 276 seconds]
chimkan__ has quit [Ping timeout: 272 seconds]
dustint has quit [Quit: Leaving]
stonerfish has joined #ruby-lang
richardburton has joined #ruby-lang
Guest____ has joined #ruby-lang
brook has joined #ruby-lang
richardburton has quit [Ping timeout: 276 seconds]
unlikely_monkey has quit [Remote host closed the connection]
Guest71081 is now known as ddd
Guest____ has quit [Read error: Connection reset by peer]
dcwu has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
robbyoconnor has joined #ruby-lang
Bearproof has joined #ruby-lang
Guest____ has joined #ruby-lang
brianpWins has joined #ruby-lang
chimkan has quit [Ping timeout: 240 seconds]
cirenyc has quit [Quit: Leaving...]
therod has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
peppyheppy has joined #ruby-lang
therod has quit [Ping timeout: 246 seconds]
dvorak_ has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 276 seconds]
dvorak has quit [Ping timeout: 252 seconds]
Bearproof has quit [Quit: Leaving.]
ryanf has quit [Quit: leaving]
dvorak_ has quit [Ping timeout: 264 seconds]
dvorak has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
mistym has quit [Remote host closed the connection]
havenn has joined #ruby-lang
Guest____ has quit [Quit: Computer has gone to sleep.]
datanoise has joined #ruby-lang
chendo_ has quit [Ping timeout: 264 seconds]
Vektur has quit []
bluepojo has quit [Ping timeout: 248 seconds]
<TTilus>
breakingthings: package your data to message objects maybe and use a simple queue
chendo_ has joined #ruby-lang
<TTilus>
breakingthings: an array that you push and shift works fine as a queue
<TTilus>
breakingthings: plan string might just be good enough message object :)
richardburton has joined #ruby-lang
cirenyc has joined #ruby-lang
Guest__ has joined #ruby-lang
<TTilus>
breakingthings: why do you need it threaded, why not make it evented?
bzalasky has joined #ruby-lang
richardburton has quit [Ping timeout: 255 seconds]
fsvehla has joined #ruby-lang
savagecroc has joined #ruby-lang
<savagecroc>
hi guys
<savagecroc>
i want to let people that use one of my applications write code
<savagecroc>
that can interface with our software
<savagecroc>
what's a good way of doing it so it's totally sandboxed
<savagecroc>
one idea i had was, let them run javascript and use a headless browser to execute the javascript
agile has joined #ruby-lang
ryanf has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 246 seconds]
cirenyc has quit [Ping timeout: 276 seconds]
Guest__ has quit [Quit: Computer has gone to sleep.]
tomzx_mac has joined #ruby-lang
torrieri has joined #ruby-lang
kentos_ has joined #ruby-lang
blacktulip has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
cirenyc has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
tonni has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
mjio has quit []
datanoise has quit [Ping timeout: 264 seconds]
towski has joined #ruby-lang
<shachaf>
Is there a standard library way of looping forever with an index?
<shachaf>
Like 0.upto(∞) {|i| ... }
<shachaf>
"loop" doesn't keep an index.
kentos_ has quit [Quit: Leaving]
richardburton has joined #ruby-lang
ramonmaruko has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
ramonmaruko has joined #ruby-lang
jonahR has quit [Quit: jonahR]
<Mon_Ouie>
Replace ∞ with Float::INFINITY
richardburton has quit [Ping timeout: 256 seconds]
<shachaf>
Floats are awful. :-(
<Mon_Ouie>
It still iterates over integers
<shachaf>
Sure.
<shachaf>
I'd rather use this loop_with_index that I just wrote than that, though. :-)
<Mon_Ouie>
Oh, you don't need to write it now that I think of it…
<Mon_Ouie>
loop.with_index { |i| … }
<shachaf>
Ah, that's better.
<shachaf>
Thanks!
<shachaf>
Only a single-character change.
<Mon_Ouie>
Oh, nvm, it's more like |_, i|
<shachaf>
fg
<shachaf>
Er.
<shachaf>
Right.
<Mon_Ouie>
Because the first argument is supposed to be the object yielded by the Enumerator, which in this case is nothing (nil)
<shachaf>
Still better than defining my own function.
chendo_ has quit [Ping timeout: 252 seconds]
AntiTyping has quit [Quit: AntiTyping]
srbaker has joined #ruby-lang
cirenyc has quit [Ping timeout: 240 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
datanoise has joined #ruby-lang
rippa has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
stonerfish has quit [Quit: Leaving.]
breakingthings has quit [Ping timeout: 248 seconds]
srbaker has quit [Ping timeout: 256 seconds]
ramonmaruko has quit [Read error: Connection reset by peer]
thufir_ has joined #ruby-lang
Guest__ has joined #ruby-lang
ramonmaruko has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 272 seconds]
nXqd has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
Guest__ has quit [Ping timeout: 276 seconds]
jperry2_ has quit [Read error: Connection reset by peer]
jperry2 has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
cirenyc has joined #ruby-lang
Guest__ has joined #ruby-lang
dr_bob has joined #ruby-lang
chendo_ has quit [Ping timeout: 240 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
cirenyc has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
richardburton has joined #ruby-lang
gjaldon has quit [Read error: Connection reset by peer]
gjaldon has joined #ruby-lang
richardburton has quit [Ping timeout: 255 seconds]
<zenspider>
why in the fuck would you want an infinite enumerator with index?!?
tonni has quit [Remote host closed the connection]
zmack has joined #ruby-lang
mercwithamouth has joined #ruby-lang
solars has joined #ruby-lang
<injekt>
so you can count how silly it is
nickname000 has quit [Quit: Page closed]
chekcmate has joined #ruby-lang
<savagecroc>
hey
<savagecroc>
i want users of my application to be able to write their own code
<chekcmate>
moin all
<shachaf>
zenspider: I want to figure out the smallest value that has some complicated property.
fsvehla has quit [Quit: fsvehla]
<shachaf>
This is probably an awkward way to do it. What'd be less awkward?
<savagecroc>
and have it run within a sandbox.. any idea of a good way of doing it? i'd prefer ruby, but one way is i could let them do it in javascript.. and run that in a headless browser on the server
fsvehla has joined #ruby-lang
<manveru>
savagecroc: you could try something like http://www.iron.io/worker (disclaimer: i worked there)
<savagecroc>
manveru: with your coding skills :) i'd trust anything you'd suggest
<savagecroc>
looks excellent
<savagecroc>
but my solution has to work without access to an internet connection
havenn has quit [Remote host closed the connection]
<manveru>
well, you could use something like lxc or bsd jails for lightweight sandboxing
<savagecroc>
i'll check it out.. or do you think just doing the headless browser solution might be a lot easier? sandboxing for free
<manveru>
well, you don't need a browser for that
<manveru>
unless you need the DOM
<savagecroc>
nah don't need dom
<savagecroc>
oh yeah.. run it directly in V8
<savagecroc>
hmm it might be a good idea
<savagecroc>
because UI mods have to be done in JS anyway
<manveru>
just don't use node, that'd give them ways out :)
<savagecroc>
yeah i've got a rails backend, with various ruby processes
towski has quit [Remote host closed the connection]
<savagecroc>
i was thinking the JS can just communicate through an internal API
<savagecroc>
i.e. they give us the JS
<savagecroc>
we run it through a testing app, to make sure it doesn't use up too much CPU / actually works
<savagecroc>
if it passes that, then we save it and let them run it
<manveru>
with API you mean stdin/stdout?
<manveru>
also on linux you can use cgroups to limit resources
<savagecroc>
nah.. to controllers
<savagecroc>
doesn't need to do any file operations
<savagecroc>
oh actually.. nah it's more like functions
<manveru>
yeah, but you need to limit the amount of memory or they can trigger OOM
<savagecroc>
i.e. so you might have one called calculate grade. function calculate_grade(grade_object)
<savagecroc>
so ruby would convert the object into json.. call the function.. get the respons
<savagecroc>
in V8 i could run them on separate processes.. ohhh
tonni has joined #ruby-lang
<savagecroc>
even on a separate machine
<savagecroc>
yeah.. have a box just dedicated to user scripts
<savagecroc>
and then write the app so they can all die and only subsections of the application stop working
swav_ has quit [Remote host closed the connection]
thisboy has joined #ruby-lang
<thisboy>
Hello!
mars777 has joined #ruby-lang
<mars777>
Hello I have a rails question.
<mars777>
Can someone review my code
<thisboy>
How was it I randomly shuffled lines with Ruby?
shtirlic has joined #ruby-lang
<thisboy>
I got a text file with some lines whose order I wanna randomize
<injekt>
I hope your input files dont get too large
<thisboy>
thanks a lot guys
<thisboy>
nah no worries :D
<thisboy>
hehe
toretore has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
swav has joined #ruby-lang
richardburton has joined #ruby-lang
jxie has quit [Quit: leaving]
shtirlic has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 272 seconds]
gnufied has joined #ruby-lang
maxmanders has joined #ruby-lang
kentos has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
richardburton has quit [Ping timeout: 245 seconds]
peppyheppy has joined #ruby-lang
idkazuma has joined #ruby-lang
marr has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
jbsan_ has joined #ruby-lang
jbsan has quit [Ping timeout: 260 seconds]
jbsan_ is now known as jbsan
neocoin has quit [Remote host closed the connection]
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
ruurd has joined #ruby-lang
swav has quit [Ping timeout: 276 seconds]
socialcoder has joined #ruby-lang
<socialcoder>
what is the difference between ARGV and ARGV[0]
<socialcoder>
when I give ARGV[0], the script works
<socialcoder>
when I remove [0], IT SAYS CANNOT CONVERT ARRAYS INTO STRING
<socialcoder>
ooops...sorry for caps
<socialcoder>
also, if I put ARGV.first...works perfectly
<socialcoder>
any help appreciated
|Vargas| has quit [Quit: ...]
neocoin has joined #ruby-lang
datanoise has joined #ruby-lang
<socialcoder>
Dr.Brain, you sleeping? :)
peppyheppy has quit [Quit: peppyheppy]
<tbuehlmann>
socialcoder, ARGV is an array. ARGV[0] and ARGV.first represent the first element of that array
io_syl has joined #ruby-lang
<socialcoder>
true, but by default shudnt ARGv refer to the first element?
<workmad3>
socialcoder: no, why should it?
<workmad3>
socialcoder: it's an array
<socialcoder>
I see...I guess I misunderstood
<socialcoder>
I thought if there was one element just ARGV was enough
<workmad3>
nope, it's always an array
<socialcoder>
right, gotcha
<workmad3>
otherwise you'd need to do special-case handling for 1 argument vs several, in order to not crash out
<socialcoder>
thx
datanoise has quit [Ping timeout: 245 seconds]
<socialcoder>
and that I guess is not recommended
vlad_starkov has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
therod has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
crudson has joined #ruby-lang
crudson1 has quit [Ping timeout: 256 seconds]
therod has quit [Ping timeout: 252 seconds]
savagecroc has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
cirenyc has joined #ruby-lang
mars777 has quit [Quit: mars777]
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby-lang
cirenyc has quit [Ping timeout: 272 seconds]
chendo_ has quit [Ping timeout: 252 seconds]
<zenspider>
shachaf: depends on what you're trying to solve... your approach sounds very brute force. there might be a better way, but I dunno what the problem is yet
chendo_ has joined #ruby-lang
robotmay has joined #ruby-lang
<shachaf>
zenspider: This is throwaway code. The goal is to find the smallest N that satisfies some property.
<shachaf>
Earlier I thought that I might have to keep some state between iterations, but it turns out that not.
<shachaf>
Anyway this just a translation of the way I'd do it in Haskell, which is filtering an infinite list. :-)
<zenspider>
what's the property?
<shachaf>
Oh, wait, I got it mixed up. I am keeping state. The other thing was a different function.
<shachaf>
I'm extracting bytes one at a time from an oracle function until I fail to extract bytes.
robotmay has quit [Ping timeout: 272 seconds]
Guest__ has quit [Quit: Computer has gone to sleep.]
swav has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
<zenspider>
still curious about that smallest N problem... :D
<zenspider>
sounds like possibly interesting number theory problem
richardburton has joined #ruby-lang
<zenspider>
bbl
rippa has quit [Read error: Connection reset by peer]
<shachaf>
I got mixed up there.
richardburton has quit [Ping timeout: 248 seconds]
rippa has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
wizonesolutions has quit [Quit: No Ping reply in 180 seconds.]
rippa has quit [Ping timeout: 240 seconds]
judofyr has joined #ruby-lang
jxie has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
robotmay has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
Guest__ has joined #ruby-lang
wizonesolutions has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
torrieri has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
chendo_ has joined #ruby-lang
thisirs has joined #ruby-lang
kcassidy has joined #ruby-lang
therod has joined #ruby-lang
cirenyc has joined #ruby-lang
torrieri has quit [Ping timeout: 245 seconds]
nkr has joined #ruby-lang
cirenyc has quit [Ping timeout: 252 seconds]
<socialcoder>
if I want to print out a specific line, and then a specific line...what method touse
<socialcoder>
I used readline, but it didnt help
<socialcoder>
like f.readline
<injekt>
socialcoder: you'll need to be a little more specific
<injekt>
"if I want to print out a specific line, and then a specific line"
<judofyr>
what makes it specific?
<socialcoder>
I mean
<socialcoder>
say from a text file
<socialcoder>
whichhas 10 lines
<socialcoder>
or ten sentences
<socialcoder>
I want to print to command line line 2
<socialcoder>
then line 5
<socialcoder>
then like 1
<socialcoder>
how do I do it
<injekt>
can you keep your questions on single lines, this is painful
<injekt>
and store them as an array then use indexes to print what you want, ie: lines = File.readlines('file.txt'); puts lines[2]; puts lines[5] etc
idkazuma has joined #ruby-lang
<zenspider>
course those are lines 3 and 6... but whatever. :P
<darix>
Paradox: did you finally get the backing for your claim what is not stable about puma? like what problems you ran into?
<Paradox>
darix, no, and i've never used it
<Paradox>
i dont think i've ever made that claim
<Paradox>
i've just heard it ad nauseum
<darix>
you did a few days ago
<darix>
and wanted to ask your friends about it
<Paradox>
oh, i may have been delirious at the time
<Paradox>
i had a fever of 102ºF last week
<Paradox>
it broke monday
<darix>
and learn metric system ffs :p
<Paradox>
i'll have to play with it
therod has quit [Quit: Leaving...]
<Paradox>
darix, farenheight is used in medical the world over
<injekt>
fahrenheit*
<Paradox>
w/e
<manveru>
not at any hospital i've been to :P
<Paradox>
really
<Paradox>
guess i was mislead on that as well
<Paradox>
stupid lying international exchange med students
<workmad3>
it's not used in the UK
<injekt>
probably not in eu
<workmad3>
dunno about the rest of the world
<Paradox>
workmad3, the UK uses stones though
<manveru>
i just remember 100°F is the temperature of the armpit of the wife of fahrenheit
<injekt>
yes we do
<injekt>
and we are proud of our stones
<Paradox>
bunch of stoners
<darix>
i have yet to see a doctor who tells me my temperature in fahrenheit
<workmad3>
Paradox: not at the doctors anymore :(
<workmad3>
that's all kilograms now :'(
<manveru>
workmad3: welcome in the future
* darix
throws stones at injekt
<injekt>
weights in gyms etc have always been measured in kg here though
<injekt>
it's only really our body weight we've always used stone for
<Paradox>
darix, dont throw stones at inkjet
<workmad3>
which is really depressing... suddenly your weight is a number about 5 times bigger
<Paradox>
thats a good way to need a new printer
<manveru>
just measure in tons then
<Paradox>
angstroms
<workmad3>
manveru: woo! I'm down to 1!!!
<Paradox>
bah fuck it, newtons
<manveru>
lol
<Paradox>
thats all a scale measures anyway
<workmad3>
Paradox: but I want to know my mass, not my weight :P
<Paradox>
measuring actual mass is difficult
<manveru>
measure in mol then
<Paradox>
lets use cubits
<manveru>
or cubic micrometers
<Paradox>
bah
<workmad3>
Paradox: I like to give fuel efficiency ratings in rods per hogshead
<Paradox>
workmad3, i give it in hectares to a can of kerosene
<manveru>
sorry, mg/mm³
<manveru>
that says nothing about your total though
<workmad3>
Paradox: but that's silly... hectares are a unit of area, not distance, and a can isn't a standard unit :P
<workmad3>
manveru: well, if you give the overall density of a person, and couple that with their volume, then they should be able to work out their mass :)
<Paradox>
workmad3, its a simpsons quote
s1n4 has joined #ruby-lang
<Paradox>
sigh, now i need to go buy more toner
<Paradox>
off to the monoprice mobile
<workmad3>
Paradox: it wouldn't surprise me if farenheit is used more in medical centres across the world though... it is a scale more suited for medical use
<Paradox>
ugh
<Paradox>
fml
<Paradox>
black toner on backorder
<Paradox>
oh great
<Paradox>
discontinued and replaced by a version $10 more expensive
<Paradox>
ah well, guess i cant bitch about the price too much
sush24 has quit [Quit: This computer has gone to sleep]
gnufied has quit [Quit: Leaving.]
therod has joined #ruby-lang
sush24 has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
<Paradox>
During a leisurely night drive, The Aquabats save a group of partying beachgoers from a gang of laser-blasting mummies. Making a hasty retreat in their Battletram, with the mummies in hot pursuit on motorcycles, the band continues the party on board, where Ricky falls smitten with a fellow party guest, unaware she's actually a three-headed siren in disguise bent on destroying everyone in sight.
<zzak>
early bird gets his slides done the day of his presentation?
datanoise has quit [Ping timeout: 256 seconds]
llakey has joined #ruby-lang
banister`sleep has joined #ruby-lang
carloslopes has joined #ruby-lang
<injekt>
:D
cultureulterior_ has joined #ruby-lang
torrieri has joined #ruby-lang
workmad3 has quit [Quit: Lost terminal]
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby-lang
lun_ has joined #ruby-lang
torrieri has quit [Ping timeout: 255 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
idkazuma has quit [Remote host closed the connection]
<zzak>
is the phrase "too many chiefs and not enough indians" offensive?
Bearproof has joined #ruby-lang
<andrewvos>
I guess
<andrewvos>
To some at least
nguerin has quit [Remote host closed the connection]
<zzak>
yeah
<zzak>
does "too many chefs, not enough cooks" translate?
megha has joined #ruby-lang
Bearproof has quit [Quit: Leaving.]
setmeaway has quit [Quit: Leaving]
<zzak>
google suggested too many cocks not enough hens
<zzak>
i think ill pass on that one
<andrewvos>
too many managers, not enough employees?
kristofferrr has joined #ruby-lang
innohero has joined #ruby-lang
emocakes has joined #ruby-lang
<injekt>
too many kings, not enough pawns
dr_bob has quit [Quit: Leaving.]
<zzak>
pawns is too demeaning
<zzak>
trying to encourage hard work
<zzak>
managers/employees has too many syllables
<zzak>
haha
<injekt>
too many captains, not enough sailors
goatish_mound has joined #ruby-lang
<zzak>
thatll do
dr_bob has joined #ruby-lang
<matti>
zzak: ;]
<zzak>
makes it sound like were going on an adventure
spuk has quit [Ping timeout: 256 seconds]
<injekt>
:D
<matti>
;p
torrieri has joined #ruby-lang
nguerin has joined #ruby-lang
imajes has quit [Excess Flood]
vlad_starkov has quit [Remote host closed the connection]
goatish_mound is now known as rsl
imajes has joined #ruby-lang
_tockitj has joined #ruby-lang
jxie has quit [Quit: leaving]
torrieri has quit [Ping timeout: 252 seconds]
retro|cz has joined #ruby-lang
krz has quit [Quit: krz]
richardburton has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
ioga_wrk has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby-lang
AndChat| has quit [Ping timeout: 256 seconds]
<thisboy>
wait wait
<thisboy>
yall forgot too many pyramids not enough pharaos :D
<thisboy>
my personal favorite :)
<thisboy>
on that note im off to build my first pyramid
<thisboy>
thanks again !! ~
ruurd has quit [Quit: Leaving...]
Bearproof has joined #ruby-lang
MaddinXx has joined #ruby-lang
banister`sleep has quit [Remote host closed the connection]
Bearproof has quit [Client Quit]
banister`sleep has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby-lang
dustint has joined #ruby-lang
<chekcmate>
guys, what's the best way to break out of a do loop?
<tbuehlmann>
have you tried `break`?
<chekcmate>
not yet, wanted to ask first
<tbuehlmann>
the other way around is better
<tbuehlmann>
not always, but often
v1p has joined #ruby-lang
banister`sleep has quit [Read error: Connection reset by peer]
megha has quit [Read error: Connection reset by peer]
<chekcmate>
tbuehlmann: I know, but the past few questions I did not ask here ended with "is it good like that?" -> "well, you CAN do it better like that: ..."
<chekcmate>
so going with the best solution from beginning was my aim here ^^
<tbuehlmann>
well, yeah, that's ruby
<tbuehlmann>
and programming
mrbloo has joined #ruby-lang
<chekcmate>
heh, yea :)
<chekcmate>
anyways, thanks
<tbuehlmann>
let tests pass, refactor later
<tbuehlmann>
:)
richardburton has quit [Quit: Leaving.]
mrbloo has quit [Client Quit]
<chekcmate>
TOO PUMPED TOO WAIT
<chekcmate>
wait
<chekcmate>
*to
soahccc_________ has quit [Remote host closed the connection]
<chekcmate>
too pumped to think!
<chekcmate>
tbuehlmann: alright, break actually breaks my other loops too ._.
<chekcmate>
why's that?
soahccc has joined #ruby-lang
<chekcmate>
I thought it just breaks the current loop
<ddfreyne>
chekcmate: break only breaks out of the innermost loop
<chekcmate>
ah yea it does
<chekcmate>
hm.. sec
v1p has quit [Ping timeout: 272 seconds]
banister`sleep has joined #ruby-lang
<chekcmate>
ha
<chekcmate>
i didnt even need break
<chekcmate>
I can just leave that case empty
sush24 has joined #ruby-lang
<chekcmate>
when ddfreyne.include?("error"); #
sush24 has quit [Client Quit]
<soahccc>
Is there some sort of ruby manifesting like rails' asset pipeline manifests for normal ruby? Sound odd I know but I finally need a single ruby file but don't want to develop it in one file... I could make a hackish solution (I guess there is no non-hackish one) but maybe someone got the same problem (I know about a script which creates a single file but this is a packer and have to unpack something before it can run).
thillux has joined #ruby-lang
<judofyr>
soahccc: you can use Sprockets outside of Rails
<judofyr>
soahccc: it's not very easy/elegant though
<soahccc>
judofyr: with ruby? :)
<judofyr>
soahccc: yes, Sprockets is just a regular Ruby library
glebm has joined #ruby-lang
torrieri has joined #ruby-lang
<soahccc>
To clarify: I virtually want something which I can run on a file which then recursively go through require's and replace it with the corresponding contents of it
dhruvasagar has quit [Read error: Operation timed out]
<soahccc>
That would be my hack.ish solution :)
<tbuehlmann>
like `load`?
<judofyr>
oh
<judofyr>
soahccc: sorry. I misunderstood
<soahccc>
judofyr: I wasn't clear enough I think, it's an unusual question though I guess.
<judofyr>
soahccc: it's called a fatpacker in the Perl world
<judofyr>
soahccc: it *should* be quite simple to make.
<chekcmate>
what's the corresponding content to a require?
<chekcmate>
I want to understand
<soahccc>
judofyr: The script does not run without it's environment which for it has to be a single file. So I could introduce a custom require format to reduce the needed effort
<soahccc>
chekcmate: the contents of the file you require and yes this doesn't apply generally as it is more the behaviour of load
torrieri has quit [Ping timeout: 248 seconds]
Uranio has joined #ruby-lang
<chekcmate>
soahccc: dynamic require?
<chekcmate>
(I'm still a beginner, it's just curiosity)
idkazuma has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<judofyr>
soahccc: can't you just do: def pack(name) puts File.read(name + '.rb') end
<soahccc>
chekcmate: requiring isn't the problem, the problem is that I want to develop in a normal manner (separate files) but then run a script which bundles all related files into a single one. This is a uncommon problem and very specific to my use case I suppose.
<chekcmate>
ahhh
<chekcmate>
yes, that sounds uncommon, heh
<soahccc>
judofyr: yeah I thought I just use something like #= some/file/in/project and then write a little regex to pack it all together.
sush24 has joined #ruby-lang
<soahccc>
Just if you're interested why I need that: I found a connector from (j)ruby to the minecraft bukkit API and I would like to play a bit with some mathematics to generate structures and so on. The normal java process is that you finally bundle your things into a .jar archive. The connector expects an .rb file and therefore I would like to bundle it finally.
jperry2 has quit [Remote host closed the connection]
Stilo has joined #ruby-lang
banister`sleep has quit [Read error: Connection reset by peer]
v1p has joined #ruby-lang
nXqd_ has quit [Quit: leaving]
imajes has quit [Excess Flood]
nXqd has joined #ruby-lang
banister_ has joined #ruby-lang
imajes has joined #ruby-lang
mistym has joined #ruby-lang
banister_ has quit [Read error: Connection reset by peer]
tonni has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
<socialcoder>
how to save a user input in command line to a text file
jtoy has joined #ruby-lang
<banisterfiend>
socialcoder: figure it out yourself
<socialcoder>
ok
<socialcoder>
thanks fiend
<banisterfiend>
if it sounded like a specific question rather than just "how do i write my app?" i'd be more willing to help
<banisterfiend>
but hta'ts like 10 questions bundled into one
<socialcoder>
I thought it was specific
vlad_starkov has quit [Ping timeout: 264 seconds]
<socialcoder>
i want to take in user input
<socialcoder>
like say login name password
<socialcoder>
store it in a external text file
<banisterfiend>
how far have you got? do you know how to get user input yet?
<socialcoder>
gets.chomp
<banisterfiend>
socialcoder: look up the docs for File.write and/or File.open
<banisterfiend>
it'll tell you everything you need
<socialcoder>
if I am using a specific text file, then I am guessing ARGV and STDIN.gets
<socialcoder>
ok
carloslopes has quit [Remote host closed the connection]
__BigO__ has joined #ruby-lang
yeltzooo has quit [Ping timeout: 255 seconds]
<injekt>
socialcoder: do you have a book or anything you're learning from? This is pretty basic Ruby
yeltzooo has joined #ruby-lang
<socialcoder>
Learn Ruby The Hard Way
<socialcoder>
it is not very detailed
<injekt>
yeah that's a terrible resource
<injekt>
corundum: books?
<corundum>
books is "The Ruby Programming Language", "Eloquent Ruby", "Programming Ruby 1.9” (‘Pickaxe’) or see http://ruby-doc.org/bookstore/
<judofyr>
injekt: terrible?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<socialcoder>
terrible?
<injekt>
judofyr: I think so yeah, or at least when it first came out (ported from python) it had way too much python-esque code in it
sailias has joined #ruby-lang
<ddfreyne>
that makes sense :)
<ddfreyne>
I don't even remember how I learnt Ruby...
<injekt>
I used the original pickaxe (which I now believe is also a bad example for newbies) :D
kith_ has joined #ruby-lang
<injekt>
then moved to the ruby way
<injekt>
which I liked
<judofyr>
I also started with pickaxe (the 1st)
<socialcoder>
then what is a good resource at the moment
<gjaldon>
socialcoder: that's a great book. i started out with that and really enjoyed it
chendo_ has quit [Ping timeout: 252 seconds]
kith has quit [Ping timeout: 252 seconds]
<socialcoder>
wow, its got only 11 chapters
<gjaldon>
socialcoder: injekt is right to suggest that. i'd recommend it too :)
<socialcoder>
excluding the installation, only 10
<injekt>
zzak: good luck for later and have fun!
chendo_ has joined #ruby-lang
<soahccc>
injekt: Was ruby your first language?
<injekt>
soahccc: no
jtoy_ has joined #ruby-lang
<injekt>
soahccc: perl, java, c, others, ruby in that order
<lianj>
so a roundtrip from perl to modern perl
<injekt>
:D
<injekt>
well apart from ruby I still writes lots of perl, and some go
<injekt>
and haskell if I was to feel nerdy
<socialcoder>
this book really looks interesting
<socialcoder>
even though its 10 chapters
<socialcoder>
content looks heavy on each chapter
<socialcoder>
long chapters
<socialcoder>
lots of explanation
<injekt>
cool, now go read it
<socialcoder>
ok Master
<socialcoder>
;)
<soahccc>
well okay. I wish I would be able to code compiling languages. I switched from PHP and used those Switcherreferences :) I think it was a bad decision. I got so used to ruby syntax that I get annoyed when trying C or something
<injekt>
oh i forgot about php, that came before perl
<injekt>
times I prefer to forget
jtoy has quit [Ping timeout: 248 seconds]
jtoy_ is now known as jtoy
<yorickpeterse>
PHP?
<ddfreyne>
Ew PHP
<injekt>
soahccc: I dont do much C anymore, I stopped teaching it about 9 months ago, I wouldn't feel bad for not knowing languages like that if you're happy with ruby/others
<yorickpeterse>
injekt: zomg, you knew the C?
<soahccc>
injekt: I'm really happy and I'm able to find ways to do a lot with ruby it never was build for. However sometime I wish I could do more fancy stuff :)
setmeaway has joined #ruby-lang
<darix>
injekt: maybe we need something like coffeescript for C ;p
<injekt>
yorickpeterse: I've probably written more C code than ruby code :(
<injekt>
soahccc: like what?
vlad_sta_ has quit [Read error: Connection reset by peer]
<lianj>
soahccc: fancy like what?
<injekt>
darix: you mean Go? :D
vlad_starkov has joined #ruby-lang
<darix>
injekt: still too many {} :p
<injekt>
lianj: faster again, c'mon man
<yorickpeterse>
darix: Vala, Haxe, etc
<injekt>
darix: heh yeah
<lianj>
injekt: :| i should just give up
<injekt>
lianj: then it wouldn't be fun :(
<soahccc>
Well for example modding existing applications and such things. Things like hooking into system specific things
<lianj>
hehe true
torrieri has joined #ruby-lang
<injekt>
soahccc: maybe you should give writing a ruby c ext a go
<lianj>
or ruby + ffi is a powerful combination
<soahccc>
And GUI stuff apart from WEB (yeah I know there are some things but they're limited usually or require things like WinAPI or Objective C knowledge
<ddfreyne>
<3 Go
<darix>
soahccc: well you could see how far you can get with FFI
<injekt>
ddfreyne: +1
<darix>
also for gtk you could wrap around the gobject introspection stuff
<darix>
if i recall correctly there are python bindings using that.
<chekcmate>
hm... number.abs * "test" <= I thought this works?
<injekt>
chekcmate: number * string makes no sense
marr has quit [Read error: Connection reset by peer]
<soahccc>
injekt: Well I sometimes try to give a language like C another go but usually I get demotivated to fast I suppose. Never get something useful to run. It's hard for me to learn "from scratch" I usually learned languages by modifying other applications in the first place :)
torrieri has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby-lang
Aiur has joined #ruby-lang
jrafanie has quit [Quit: jrafanie]
poga has joined #ruby-lang
carloslopes has joined #ruby-lang
cirenyc has joined #ruby-lang
<chekcmate>
injekt: you know xpath, right?
<injekt>
chekcmate: i do
<chekcmate>
and you also know the function "inspect object" in chromium
<chekcmate>
where you can right-click and "Copy XPATH" is possible
<injekt>
in dev tools?
<injekt>
yeah
<chekcmate>
something like //*[@id="result_0"]/h3/a/span comes out
<injekt>
yup
<chekcmate>
I can't use this directly with nokogiris doc.xpath, can I?
<injekt>
yes
<chekcmate>
I can?
<chekcmate>
hm..
v1p has quit [Ping timeout: 255 seconds]
<injekt>
yup
<chekcmate>
it somehow does not for me
<injekt>
what's the xpath?
mrbloo has joined #ruby-lang
<chekcmate>
the one I posted
<chekcmate>
doc.xpath("//*[@id='result_0']/h3/a/span").each do |link| puts link end
<injekt>
can you paste the html?
<chekcmate>
it's amazon :)
<chekcmate>
when you search for something it's the first result
<judofyr>
chekcmate: you probably need to do a .force_encoding("UTF-8")
<chekcmate>
I tried doc.encoding = "UTF-8"
<chekcmate>
and #Encoding: UTF-8
<chekcmate>
and WIN32OLE.codepage = WIN32OLE::CP_UTF8
<chekcmate>
doc.force_encoding I will try
<judofyr>
chekcmate: not on doc, but on the string you get from open-uri. before you parse it with Nokogiri
<chekcmate>
oh alright
<chekcmate>
yea, I already got undefined method `force_encoding=' for #<Nokogiri::HTML::Document:0x2ea5038> hehe
gregmoreno has joined #ruby-lang
<chekcmate>
judofyr: the only string before nokogiri is the url...?
chimkan_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<chekcmate>
The only thing force_encoding does in 1.9 is that it changes the encoding field of the string, it does not actually modify the string's bytes. :(
<injekt>
chekcmate: no, nokogiri does .read() on the IO object open returns
<injekt>
string = open(url).read
<chekcmate>
I don't read
<chekcmate>
I just open
<injekt>
string.force_encoding('UTF-8')
sush24 has quit [Quit: This computer has gone to sleep]
<injekt>
doc = Nokogiri.HTML(string)
<injekt>
chekcmate: right, Nokogiri calls .read
<chekcmate>
ah, so I have to split
<injekt>
Nokogiri does this: obj.respond_to?(:read) obj.read else obj
<injekt>
no
<injekt>
wait 'split' meaning separate the open and doc? yes
<chekcmate>
yes
<chekcmate>
pardon
richardburton has quit [Quit: Leaving.]
<injekt>
it's to support duck typing, so you can do Nokogiri.HTML File.new('foo.html') rather than having to pass a string :)
<chekcmate>
ok
gregmoreno has quit [Remote host closed the connection]
shtirlic has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
chekcmate has joined #ruby-lang
<chekcmate>
you guys you guys!
<chekcmate>
why is doc.css("...") not the same as doc.css("...").first?
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
<mistym>
chekcmate: (Assuming you're talking about Nokogiri) Because doc.css("...") returns a Nokogiri::XML::NodeSet object, which is an iterable set of objects. doc.css("...").first returns the first item in that NodeSet.
<yorickpeterse>
I just hope it can be run on non rbx implementations
mytrile has joined #ruby-lang
mephux has quit [Excess Flood]
blacktulip has quit [Remote host closed the connection]
mephux has joined #ruby-lang
shtirlic_ has joined #ruby-lang
<yorickpeterse>
Ripper.sexp('return 10, 20') # => [:return, [:args_add_block, [...., false]]] shit like this is what I hate about Ripper
<whitequark>
yorickpeterse: melbourne = cext.
<whitequark>
the less cexts we have, the better
shtirlic has quit [Ping timeout: 264 seconds]
<yorickpeterse>
hrm
<injekt>
that code hurts my face
<yorickpeterse>
god damn it, that means I'm stuck with fucking Ripper for longer than I hoped for
<injekt>
yorickpeterse: what for?
<yorickpeterse>
My linter
<injekt>
ah
soypirate has joined #ruby-lang
<zenspider>
new melbourne! hahaha
torrieri has quit [Quit: Leaving...]
<whitequark>
yorickpeterse: maybe I finish my Ragel update of RP soon
<whitequark>
Ragel 7 will probably have way more sane (and faster) Ruby codegen
<yorickpeterse>
that would be great, right now I just keep bumping into issues with Ripper's output and inconsistencies
<whitequark>
well I've got in touch with the Ragel author. R6.7 codegen is truly horrible both in performance and readability
nguerin has joined #ruby-lang
<yorickpeterse>
When is Ragel 7 going to be out?
<whitequark>
yorickpeterse: dunno, probably several months. Shouldn't bother you as RP redistributes the compiled lexer.
<andrewvos>
Anyone know of something that allows you to use vcr but for another language? Basically it would just take all requests and either proxy them or respond with the vcr cached version.
<yorickpeterse>
whitequark: true but if the code generation/performance is terrible then I do care
<whitequark>
yorickpeterse: the current one is ~3x slower than old regexp lexer on my tests
<whitequark>
and I already know how to improve it (I think)
<yorickpeterse>
3x slower as in 300 ms instead of 100 or 3 seconds instead of 1?
<andrewvos>
pls to sen teh codes thx
<yorickpeterse>
I want my linter to (at some point) be able to do it's work in less than a second
mytrile has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
mytrile has quit [Read error: Connection reset by peer]
mytrile has joined #ruby-lang
<yorickpeterse>
I can't use RP
thone_ has quit [Ping timeout: 245 seconds]
<yorickpeterse>
otherwise I would
<andrewvos>
hallp
zmack has quit [Remote host closed the connection]
<whitequark>
yorickpeterse: I meant that by transitivity, RP+Ragel would be six times as slow as MRI.
<whitequark>
in the current form.
<yorickpeterse>
hmm
therod has quit [Quit: Leaving...]
<andrewvos>
Every time I see whitequark talk I have to google something :/
firewall is now known as megha
<zenspider>
whitequark: ?? your lexer is 3x slower than mine?!? that seems unpossible
<zenspider>
or did I misunderstand something?
<whitequark>
zenspider: roughly 3x slower, yes.
<whitequark>
what surprises you here?
<zzak>
i am soo nerved up
<drbrain>
zzak: you'll be fine!
<zzak>
i want to change my title
<zzak>
"ruby: or why i love eric hodel"
torrieri has joined #ruby-lang
<zzak>
drbrain: is gems fixed now?
<drbrain>
zzak: we're verifying checksums
nguerin has quit [Remote host closed the connection]
<zenspider>
whitequark: I thought ragel would generate faster code than my horrible crap
baba_bubba has joined #ruby-lang
<whitequark>
zenspider: but it processes the character one-by-one
<whitequark>
*characters
<whitequark>
it's basically a huge case in a loop
thillux_ has quit [Remote host closed the connection]
<whitequark>
the main reason your current lexer is as fast as it is (and I admit it's pretty fast) is that Oniguruma is
jrafanie has quit [Quit: jrafanie]
fsvehla has quit [Quit: fsvehla]
<whitequark>
zenspider: plus ragel knows nothing about strings; it's an FSM which dispatches on numbers. So I have to feed it something like (chars[i] & 0x7f) as input.
havenn has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby-lang
forrest has quit [Quit: Leaving]
mjolk has quit [Quit: This computer has gone to sleep]
<andrewvos>
mistym: Interesting. Pretty sure at some point in my life I released a site into production that accepted yaml as input, and did something with it :?
<andrewvos>
:/
<andrewvos>
I am not a clever man.
<KINGSABRI>
thank whitequark and lianj for your help :)
__BigO__ has quit [Remote host closed the connection]
<andrewvos>
Stuff like this sucks. Makes ruby look bad, when half the programmers in the world are like "lol isn't ruby just some scripting language"
<andrewvos>
are already like*
mistym has quit [Remote host closed the connection]
<lianj>
everyone likes rubydramas
mjio has joined #ruby-lang
<andrewvos>
lianj: Yeah, except the people that maintain rubygems.org :)
lun__ has joined #ruby-lang
ilyam has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]
<lianj>
they do good work so this may sound rude, but if it was known for a week and the yaml issue was know even longer, no reason to cry and fall out of heaven now
jonahR has joined #ruby-lang
Kuifje has quit [Ping timeout: 256 seconds]
<andrewvos>
lianj: Not sure what you mean?
swav has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
<rue>
Isn’t that the same exploit that went against Rails, basically?
<andrewvos>
I think so.
enebo has quit [Quit: enebo]
chendo has quit [Ping timeout: 252 seconds]
maxmanders has joined #ruby-lang
jonahR has quit [Ping timeout: 276 seconds]
rins has quit [Ping timeout: 248 seconds]
thufir_ has quit [Remote host closed the connection]
jrafanie has quit [Quit: jrafanie]
<andrewvos>
So what's the fix for something like this? Disable support for "!ruby" in yaml?
KINGSABRI has quit [Quit: Leaving]
kith_ is now known as kith
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
outoftime has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
<rue>
Stop using YAML?
<andrewvos>
rue: <3
Banistergalaxy has quit [Ping timeout: 256 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
<manveru>
rue: +1
<lianj>
and stop using f'ing [module_]eval to create to monkey patch your objects
<andrewvos>
I did always dislike yaml.
<tpope>
yeah, I kinda feel like yaml should be relegated to the history books
<tpope>
we have json now
<havenn>
tpope: If JSON subset supports the datatypes you're serializing...
<andrewvos>
But wasn't the issue with the json parser?