<iliketurtles>
Anyone have a good way to create a block that allows me to iterate over all possible combinations of a string in keysize lengths? IE. for the string "abcdef", i'd want pairs of [ab, cd] [ab, ef] [ab, gh] [cd ef] [cd gh] [ef gh]
<brownies>
working with a gem whose codebase i otherwise respect a lot... but i just suffered through an hour of debugging because self.foo behaves differently than foo when i inherited one of its classes =(
shinnya has quit [Ping timeout: 240 seconds]
mantono has quit [Remote host closed the connection]
Gaelan is now known as GaelanAintAround
mistym has joined #ruby-lang
shinh has quit [Read error: Connection timed out]
shinh has joined #ruby-lang
fosky has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 260 seconds]
shinh has quit [Read error: Operation timed out]
arooni-mobile has quit [Ping timeout: 248 seconds]
shinh has joined #ruby-lang
mucker has joined #ruby-lang
jxie has quit [Quit: leaving]
gregmore_ has quit [Remote host closed the connection]
shinh has quit [Read error: Connection timed out]
shinh has joined #ruby-lang
towski has joined #ruby-lang
zmike123 has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
priodev has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
bzalasky has joined #ruby-lang
sstrickl has quit [Quit: sstrickl]
mistym has quit [Remote host closed the connection]
Quatrerwin has quit [Remote host closed the connection]
shinh has quit [Read error: Operation timed out]
dernise has joined #ruby-lang
shinh has joined #ruby-lang
D9 has quit [Ping timeout: 252 seconds]
bzalasky has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
towski has quit [Remote host closed the connection]
mistym has joined #ruby-lang
pkrnj has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Nisstyre has quit [Ping timeout: 245 seconds]
dernise has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 252 seconds]
Maax has joined #ruby-lang
retro|cz has joined #ruby-lang
xxaM has quit [Ping timeout: 256 seconds]
drumond19 has joined #ruby-lang
shinh has quit [Quit: Tiarra 0.1+svn-35634: SIGINT received; exit]
shinh has joined #ruby-lang
shinh has quit [Client Quit]
ruby-lang780 has joined #ruby-lang
ruby-lang780 has quit [Ping timeout: 250 seconds]
mistym has quit [Remote host closed the connection]
marr has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
ilyam has quit [Client Quit]
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
flip_dig_ has joined #ruby-lang
flip_digits has quit [Read error: Connection reset by peer]
<ridders24>
Hi, im trying to use cgi with ruby, and trying to get the data input into a form to output into a file. This is what i have so far http://pastebin.com/G19wkuyz however get_text does not seem to be input into test.txt. Why?
<canton7>
so you're adding the *value* of the variable get_text to the file
<canton7>
but there is no such variable
<canton7>
so you shoud have got an exception
<ridders24>
get_text is not the variable?
<canton7>
hmm?
<ridders24>
how would I get the form data into the file?
<canton7>
using CGI? I have no idea. But I'm pretty sure it's not going to magically create a variable for you
<ridders24>
i thought get_text was the variable for the data in the form
<canton7>
looks like getdata is passed in in the environment somewhere, and postdata is on stdin
flip_dig_ has quit [Remote host closed the connection]
<canton7>
what made you think that a variable was magically created?
priodev has joined #ruby-lang
mikewintermute has quit [Remote host closed the connection]
<ridders24>
no no, i just thought that the data I had entered into the form, was called via get_text
mikewintermute has joined #ruby-lang
<canton7>
what do you mean "called via"? that get_text was a method?
<canton7>
anyway, any particular reason you're using cgi, rather than a minimalist framework like sinatra?
<ridders24>
your not the first to say that, and to be honest im considering ditching cgi for sinatra, after the headache this has given me
flip_digits has quit [Ping timeout: 264 seconds]
<ridders24>
i have a ruby script already, all i want to do is convert it to be used via a webpage
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby-lang
<bougyman>
ridders24: why not just plain rack?
jxie has joined #ruby-lang
r0bby has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
r0bby is now known as robbyoconnor
<andrewvos>
Lovely start to the day. Blocked my coffee grinder somehow and then spilled frothed milk all over my coffee machine. :( :(
Mon_Ouie has joined #ruby-lang
mdedetrich has joined #ruby-lang
<andrewvos>
bougyman: Plain rack isn't that fun once you start noticing you're missing pretty vital features
mdedetrich has quit [Client Quit]
maxmanders has joined #ruby-lang
<andrewvos>
Jesus CGI builds html?
<andrewvos>
Not seen that before :/
<bougyman>
andrewvos: like what?
<bougyman>
nothing that can't be provided by some middleware
<bougyman>
CGI has always had html builder
<bougyman>
but it's a pain to deploy plain cgi
<andrewvos>
bougyman: Well simple whitelisting of actions is quite nice under sinatra
<andrewvos>
Headers are better dealt with
<andrewvos>
params is pretty useful
<bougyman>
for that I prefer innate
<bougyman>
it's still ruby, not some dsl which you have to rethink.
<bougyman>
dsl's, to me, are built for non-programmers
<bougyman>
to each their own.
zhul_mechanos has joined #ruby-lang
<andrewvos>
I wasn't arguing dsls
<andrewvos>
I am not a fan either, generally
<bougyman>
sinatra is a dsl, though
<bougyman>
at least, it was last I looked at it
<ridders24>
will sinatra is easier?
<andrewvos>
bougyman: Yeah, I'm not saying it's good because of that. I'm saying it's good because it makes things easy for you.
<ridders24>
sorry will it be easier
<andrewvos>
ridders24: Yes, for someone who is new to programming sinatra may be easier than pure rack.
<ridders24>
andrewvos: cheers I'll give it a go
<canton7>
I think he's comparing it to cgi, which he's currently using
<andrewvos>
Yeah
<andrewvos>
Which I think might be harder to use than sinatra. May be wrong there though, haven't used CGI for years, or maybe even ever.
<andrewvos>
Man my commas are all over the place.
<andrewvos>
Though understanding HTTP methods might be something to learn first
<ridders24>
all i want to do is take user input then fetch data and output the result
beiter has joined #ruby-lang
<andrewvos>
ridders24: Ok so you need a form. The user inputs data into that form
<andrewvos>
ridders24: Every worked with forms?
<ridders24>
andrewvos: yeah exactly. And nope not really done anything with forms
<andrewvos>
ridders24: Ok so what you need is two http methods. A GET, which displays the form to the user. When they click submit the data will be sent to the server, so use a POST method for this.
<ridders24>
okay, are there any sinatra examples of this?
<andrewvos>
In sinatra, that's just `def get("/hello"); "some html string"; end;` and `def post("/hello"); "some return value"; end`
<andrewvos>
Cool, maybe don't use templating for now. Do that all alter
<andrewvos>
later*
<ridders24>
ok
<ridders24>
bye
<andrewvos>
seeya
ridders24 has quit [Quit: Leaving]
<andrewvos>
Godspeed, Simon.
MaddinXx_ has joined #ruby-lang
mdedetrich has joined #ruby-lang
maxmanders has quit [Ping timeout: 260 seconds]
maxmanders has joined #ruby-lang
stamina has quit [Ping timeout: 276 seconds]
duphus has quit [Quit: Leaving.]
mikewintermute has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
fosky has quit [Ping timeout: 248 seconds]
maxmanders has quit [Ping timeout: 264 seconds]
_rgn has joined #ruby-lang
<_rgn>
hey, what's the best gui framework to do simple things?
<_rgn>
Shoes any good?
<_rgn>
i'd like to make a simple text prompt popup, although maybe it might make more sense to do this with some unix tool
chris2 has joined #ruby-lang
zhul_mechanos has quit [Quit: zhul_mechanos]
skmp has joined #ruby-lang
Shaun_ has joined #ruby-lang
Shaun_ has quit [Client Quit]
ffio has quit [Ping timeout: 252 seconds]
ffio_ has joined #ruby-lang
maxmanders has joined #ruby-lang
benanne has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
drumond19 is now known as eee19
zomgbie has quit [Ping timeout: 248 seconds]
jxie has quit [Quit: leaving]
xxaM has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 264 seconds]
rickruby has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
ridders24 has joined #ruby-lang
skmp1 has joined #ruby-lang
<ridders24>
andrewvos: sinatra seems better than CGI, and ive managed to display user input now. However If I wanted to load that input into my ruby script then output the data back into sinatra, how would I do that?
skmp has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby-lang
zomgbie has joined #ruby-lang
mbj has joined #ruby-lang
robbyoconnor has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby-lang
beiter has quit [Quit: beiter]
benlovell has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
mikewintermute has joined #ruby-lang
<andrewvos>
Not sure what you mean ridders24
<andrewvos>
You can display user input that they typed into fields on a web page?
zomgbie has quit [Ping timeout: 264 seconds]
jxweng has joined #ruby-lang
pskosinski has joined #ruby-lang
flip_digits has joined #ruby-lang
benanne has quit [Ping timeout: 246 seconds]
flip_digits has quit [Ping timeout: 252 seconds]
pskosinski_ has joined #ruby-lang
realDAB has joined #ruby-lang
pskosinski has quit [Ping timeout: 240 seconds]
enebo has joined #ruby-lang
realDAB has quit [Client Quit]
GeissT has quit [Ping timeout: 276 seconds]
enebo has quit [Client Quit]
pskosinski_ has quit [Remote host closed the connection]
benanne has joined #ruby-lang
pskosinski has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
hashkey has quit [Ping timeout: 246 seconds]
hashkey has joined #ruby-lang
hashkey is now known as Guest92698
mikewintermute has quit [Quit: mikewintermute]
Nisstyre-laptop has joined #ruby-lang
realDAB has joined #ruby-lang
zomgbie has joined #ruby-lang
<ridders24>
andrewvos: yes, but the files are erb. I have a rb script that needs that input from the erb file. Can I direct that input into my rb script and back out, or is there a way to build the rb code into the erb file?
eee19 has quit [Remote host closed the connection]
<yorickpeterse>
^@param\s+\[(?<types>[\w#|]+)\]\s+(?<name>\S+)\s*(?<description>.+)* # one day I will kill myself for writing this
Oak has joined #ruby-lang
Oak has quit [Client Quit]
maxmanders has joined #ruby-lang
zomgbie has quit [Ping timeout: 264 seconds]
D9 has joined #ruby-lang
<andrewvos>
ridders24: Can I see all your code?
D9 has quit [Read error: Connection reset by peer]
<apeiros>
yorickpeterse: you hand-parse yard? why?
<andrewvos>
It's a dutch thing
netShadow has quit [Quit: netShadow]
<andrewvos>
Wow
<andrewvos>
The heat from the sun has made it so I can't use my touchpad on my MBA anymore
<andrewvos>
IN ENGLAND
symm- has joined #ruby-lang
<yorickpeterse>
apeiros: because I need to extract like 2 tags only
<yorickpeterse>
and god knows how the YARD parser works
<yorickpeterse>
it has factories and all that crazy sheeet
<apeiros>
I don't think you have to know
<apeiros>
it has an API and can parse to yaml iirc
<whitequark>
... I'm somewhat sure that it does it with regexps too
<yorickpeterse>
I don't need 99% of the complexity of YARD
realDAB has joined #ruby-lang
<yorickpeterse>
also welp, 227 stars (DEM STARS) on GH for ruby-lint
<yorickpeterse>
seems that ruby-weekly feature really worked
<yorickpeterse>
erikh: oh really? Find me the exact quote that states that I hate rdoc
<whitequark>
oh god.
<yorickpeterse>
Go on, I'll wait
<whitequark>
I wish this was sarcasm. because it totally could be.
<yorickpeterse>
whitequark: I'm pretty sure it's not
<yorickpeterse>
EMBEDDED JAVASCRIPT
<yorickpeterse>
V8 FOR THE RASPBERRY PI
<whitequark>
yes fuck that
<yorickpeterse>
VROOM VROOM
* erikh
sighs
<erikh>
go back to making this channel your twitter
<erikh>
arguing with you is a waste of time
<yorickpeterse>
erikh: so far you're not really doing your mood any justice
<yorickpeterse>
nor is making false statements going to help
<erikh>
not my statement, just cargo culting from others in here
<yorickpeterse>
haha sure
<erikh>
you don't think this place has back channels?
<yorickpeterse>
You should be clever enough to figure that out yourself
<whitequark>
*facepalm*
<erikh>
how about not filling up the channel with your drivel for 8 hours a day while you tear through everything from reddit to how hot your lunch is
<yorickpeterse>
haha oh man, what happened to you today?
<andrewvos>
yorickpeterse: Speaking of "on the rag", have you seen Sharknado? Has one of the best quotes ever in a movie. "Looks like it's that time of the moneht"
<andrewvos>
err month
<andrewvos>
*
<yorickpeterse>
If somebody has a problem with anything I'd be happy to talk about it, but I'm not going to discuss anything with a donkey who's angry for unknown reasons
<yorickpeterse>
andrewvos: haha no, the trailer looks terrible
<andrewvos>
yorickpeterse: And by the way we've had at least 10 (TEN) days of sun here. Thank you very much.
<yorickpeterse>
reminds me of that giant piranha movie thing
kstuart has joined #ruby-lang
eee19 has joined #ruby-lang
<andrewvos>
yorickpeterse: IT IS A GOOD MOVIE
<yorickpeterse>
... you actually watched it?
<andrewvos>
It's pretty cool
<andrewvos>
You will laugh
zomgbie has quit [Ping timeout: 248 seconds]
<yorickpeterse>
I generally really can't stand movies like these
dernise has quit [Ping timeout: 252 seconds]
<andrewvos>
Yeah I can't either
<andrewvos>
But it was pretty hilarious
<yorickpeterse>
apparently pacific rim was also pretty bad
<lianj>
atlantic rim is worse
<yorickpeterse>
hurrr
<andrewvos>
Oh jesus it was horrific
<andrewvos>
That movie was so bad I actually got angry
<yorickpeterse>
was it just boring? The trailer looked semi ok
<andrewvos>
Was in a bad mood for the rest of the day
<andrewvos>
I don't even know it was just not good
<yorickpeterse>
Big robots? K, I'll have two. Big monsters? Sure!
<andrewvos>
The whole plan of making huge robots to go punch big monsters to death is just weird really
<lianj>
this thing still runs on 50 diesel engines, old school. saves the world
<andrewvos>
Yeah because 50 diesel engines = gigantic walking robot
<whitequark>
the pacific rim trailer looks like the movie is an Evangelion ripoff
<yorickpeterse>
a walking hole in the ozon layer
<yorickpeterse>
* ozone
<andrewvos>
But it wasn't even the technical aspects that were bad
<andrewvos>
Those don't normally piss me off
<andrewvos>
The story was so painfully boring
<whitequark>
(also lol, look up diesel engines which power ships. pretty sure you'd better off with one)
<andrewvos>
Like, oh, so the main dudes brother dies. Best go become a construction worker for five years.
MaddinXx_ has quit [Remote host closed the connection]
<andrewvos>
whitequark: Ok fair point.
<andrewvos>
Tug boats are pretty powerful
<lianj>
andrewvos: go watch internship
<whitequark>
I mean, 50 engines = 50x moving parts, you don't want that. You'd want to have two, running one after another
<andrewvos>
So anyway, then the government appears and is like "stop being a construction worker man, we NEED you"
<whitequark>
so you have equal service time and a backup in case one engine dies
<andrewvos>
whitequark: You're thinking too much into this man
<andrewvos>
lianj: Googling it
<yorickpeterse>
Pretty sure whitequark already has a blueprint on how to build an actual Gundam suit
<andrewvos>
I would not be surprised
<lianj>
whitequark: lets make the head where the pilots are out of cardboard
<whitequark>
andrewvos: can't stand movies/anime with half-assed tech. either do it so good I can hardly nitpick it, or just go to eleven ignoring every single law of nature
<whitequark>
either of those are good
<whitequark>
yorickpeterse: I hate giant robots in any form
<whitequark>
it's so... suboptimal
<yorickpeterse>
hahaha
<andrewvos>
whitequark: Well I've seen you around for a couple years and I'm pretty sure you wouldn't enjoy any sci-fi movie then :)
<whitequark>
andrewvos: most of them, indeed
<whitequark>
BSG was borderline ok.
<andrewvos>
I actually rewatched BSG recently. Not as good the second time around.
<yorickpeterse>
BSG?
<whitequark>
battlestar galactica
<yorickpeterse>
oh
<whitequark>
I think when I first watched it, it was a 40 hours straight dive
<yorickpeterse>
I remember watching Starship Troopers. That was a terrible mistake
<yorickpeterse>
The whole movie is basically "BLAAAARGGHGH GIANT INSECTS PEW PEW PEW PEW NOOOOO DERP IS DEAD BLAAARGHHH *KABOOM*"
Kabaka has quit [Ping timeout: 240 seconds]
MaddinXx has joined #ruby-lang
<andrewvos>
yorickpeterse: Startship Troopers is cool, you are wrong.
<andrewvos>
Err Starship
<yorickpeterse>
Interesting enough I do enjoy most of Arnold's movies
<yorickpeterse>
e.g. the first Predator was pretty funny
<yorickpeterse>
"IF IT BLEEDS WE CAN KILL IT"
<yorickpeterse>
and ofc "GET TO DA CHOPPAH"
skmp1 has quit [Quit: Leaving.]
Kabaka has joined #ruby-lang
<andrewvos>
whitequark: <3 your last tweet, it made me laugh
zzak_ has joined #ruby-lang
<andrewvos>
Not real world laugh. But I did kind of push some air out of my nose faster than usual.
realDAB has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
jerrytgarcia has quit [Remote host closed the connection]
realDAB has quit [Client Quit]
maxmanders has quit [Ping timeout: 246 seconds]
zomgbie has joined #ruby-lang
symm- has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby-lang
eee19 has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 264 seconds]
stardiviner has joined #ruby-lang
holgerno has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
canton7 has joined #ruby-lang
kristofferrr has joined #ruby-lang
symm- has joined #ruby-lang
nathanstitt has joined #ruby-lang
zomgbie has joined #ruby-lang
zomgbie has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby-lang
flip_digits has joined #ruby-lang
<yorickpeterse>
hmpf, seems that with every release of Chromium either Flash or Chromium itself gets more and more unstable
tomzx_mac has quit [Ping timeout: 276 seconds]
jxweng has quit [Quit: Lost terminal]
stardiviner has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
eee19 has joined #ruby-lang
jxie has joined #ruby-lang
eee19 has quit [Ping timeout: 264 seconds]
zomgbie has joined #ruby-lang
io_syl has joined #ruby-lang
enebo has quit [Quit: enebo]
lsegal has joined #ruby-lang
zomgbie has quit [Ping timeout: 264 seconds]
realDAB has joined #ruby-lang
kyrylo has joined #ruby-lang
realDAB has quit [Client Quit]
kyrylo has left #ruby-lang ["Recharging eyes…"]
zomgbie has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
kristofferrr has quit [Quit: ❤]
joshuawscott has joined #ruby-lang
scottschecter has quit [Ping timeout: 264 seconds]