pandaant has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 260 seconds]
kiyote23 has quit [Ping timeout: 264 seconds]
lucyinthesky has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
<kylekersey>
godd2: i am wanting to run it
MrIlyas has quit [Read error: Connection reset by peer]
<kylekersey>
on the hardware
<kylekersey>
not on the java virtual machine
lucyinthesky has joined #ruby
bricker`work has quit [Ping timeout: 244 seconds]
ItSANgo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
<godd2>
Id wager it's more efficient to run java in the jvm on a high-end cpu than it is to run it in a java processor
yfeldblum has joined #ruby
havenwood has joined #ruby
bricker`work has joined #ruby
freerobby has joined #ruby
josephndenton has joined #ruby
oleo is now known as Guest2221
fgo has joined #ruby
oleo__ has joined #ruby
jazzed has joined #ruby
jazzed has left #ruby [#ruby]
baweaver has joined #ruby
_mtr has joined #ruby
jazzed has joined #ruby
<jazzed>
Don't know ruby. Can someone explain what this statement is doing? config.vm.network “forwarded_port”, guest: 8001, host: 8001
<jazzed>
no equal statement.
Guest2221 has quit [Ping timeout: 258 seconds]
<pipework>
That's a method call
<jazzed>
oh. ty.
thekkid has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 264 seconds]
ezio has quit [Ping timeout: 256 seconds]
<timmmaaaayyy>
i'm retrieving a url from a database, modifying the URL, and putting the new url on the same row of the database. how do i do this without it creating a new row?
dc has joined #ruby
<pipework>
probably by using your database's update functionality
<pipework>
Maybe a transaction if you need.
<pipework>
If it supports transactions.
TehStig has quit [Remote host closed the connection]
<timmmaaaayyy>
i'm trying to use: insert = con.query("INSERT INTO uploads (direct_thumbnail_upload_url) VALUES ('#{http_thumbnail_url}')") but it's definitely writing to a new row
<godd2>
INSERT creates a new row
<timmmaaaayyy>
i'd like it to write to the same row it retrieved the original URL from
<timmmaaaayyy>
ahhhhh so I want update?
<godd2>
yes
dts|pokeball has joined #ruby
<timmmaaaayyy>
like this: insert = con.query("UPDATE uploads (direct_thumbnail_upload_url) VALUES ('#{http_thumbnail_url}')")
<timmmaaaayyy>
or do i still need the INTO
wjimenez5271 has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
<godd2>
you don't update into, but you do have to set things
<timmmaaaayyy>
something like that? ^ but without whatever my error is
frem_ is now known as frem
<pipework>
timmmaaaayyy: There's probably some useful SQL related channels that can help you out if you need.
karmatr0n has quit [Remote host closed the connection]
<timmmaaaayyy>
is'nt it completely different since its in a ruby script?
crdpink2 has joined #ruby
porfa has joined #ruby
<timmmaaaayyy>
i've read all kinds of wierd things....like maybe i even need a client.escape becuase of ruby
<godd2>
timmmaaaayyy the only ruby thing about it is the string interpolation
<timmmaaaayyy>
so that's why i'm posting here
<godd2>
but you're having trouble with the sql itself
crdpink has quit [Ping timeout: 258 seconds]
<timmmaaaayyy>
true. but couldn't it be the way i'm asking ruby to update it and calling variables and what not?
<godd2>
timmmaaaayyy what library are you using to talk to the database?
Sid05 has joined #ruby
<timmmaaaayyy>
i just have require 'mysql'
OldHarmony123 has joined #ruby
<timmmaaaayyy>
but i've read that's called mysql2
<timmmaaaayyy>
i'm a ruby newb
commmmodo has joined #ruby
OldHarmony123 has quit [Client Quit]
<timmmaaaayyy>
you should see this script. you'd probably throw up
<godd2>
Ive thrown up plenty at my own old code :P
<timmmaaaayyy>
BUT, it does everything i need so far :) except write the data to mysql
ghostmoth has quit [Quit: ghostmoth]
kiyote23 has joined #ruby
<godd2>
let me ask you this. what are you trying to accomplish with this script of yours?
lucyinthesky has left #ruby ["Leaving"]
oo_ has quit [Remote host closed the connection]
elastik has joined #ruby
oo_ has joined #ruby
commmmodo_ has joined #ruby
Sid05 is now known as sid05
lw has joined #ruby
commmmodo has quit [Ping timeout: 260 seconds]
<timmmaaaayyy>
retrieve a URL from a database if the thumbnail_url field is NULL.....download the image....generate a thumbnail....upload it to S3.....write the thumbnail URL to the thumbnail_url field (on the same row)
kiyote23_ has joined #ruby
mary5030 has joined #ruby
lw has quit [Read error: Connection reset by peer]
lw_ has joined #ruby
kiyote23 has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
commmmodo_ has quit [Ping timeout: 256 seconds]
OldHarmony has joined #ruby
<godd2>
No, that's not my question. what's your end goal. what is this a means to?
geiltalasdair has quit [Quit: Leaving]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
geilt has joined #ruby
commmmodo has joined #ruby
Guest30557 is now known as El3ktra
El3ktra has quit [Changing host]
El3ktra has joined #ruby
<godd2>
to make sure every image has a corresponding thumbnail?
<zenspider>
godd2: I've found getting the 30k view on IRC to be neigh impossible
mary5030 has quit [Ping timeout: 258 seconds]
<godd2>
zenspider I don't know what the "30k view" is
<zenspider>
sorry... I'm missing a word: foot. "30k foot view"
<timmmaaaayyy>
godd2: yes. to make sure everything has a thumbnail
<zenspider>
you ask someone what they're trying to ultimately accomplish and they always answer micro
<godd2>
zenspider well it looks like I just got my answer :P
<zenspider>
because you guessed and asked
<godd2>
maybe I'm better at guessing and asking...
<timmmaaaayyy>
don't be ridiculous zenspider. he asked what i'm trying to do with the script, and i listed the things it's doing.
geilt has quit [Client Quit]
geilt has joined #ruby
<godd2>
its true, i did cheat this time
geilt has quit [Client Quit]
quimrstorres has quit [Remote host closed the connection]
<OldHarmony>
hallo i have a proplem with my ruby extansion
<godd2>
timmmaaaayyy is direct_thumbnail_upload_url a variable?
<timmmaaaayyy>
its the name of a field in the database
jazzed has quit [Remote host closed the connection]
<godd2>
k so your ruby looks functional
<timmmaaaayyy>
yes it works and outputs everything exactly as i want it to. but i get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(direct_thumbnail_upload_url) VALUES ('https://s3.amazonaws.com/cmfusion-devenv/' at line 1
<timmmaaaayyy>
oh that looks to be an incorrect VALUE....it's missing the rest of the url
sailias has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
<godd2>
I think your update statement is malformed
<godd2>
but that's a hunch
marr has quit [Ping timeout: 258 seconds]
<timmmaaaayyy>
i agree. i can't find any good examples online of how to do this
<zenspider>
timmmaaaayyy: unbunch your panties. Nothing I said was ridiculous. It's an observation made after a decade of helping ppl with ruby on IRC.
<godd2>
zenspider you cant just go around disagreeing with people on the internet.
maletor has joined #ruby
tokik has joined #ruby
charliesome has joined #ruby
oo_ has quit [Remote host closed the connection]
bricker`1ork has joined #ruby
diego_ar has quit []
sid05 has quit [Quit: sid05]
sailias has left #ruby [#ruby]
sailias has joined #ruby
bricker`work has quit [Ping timeout: 250 seconds]
samuel02 has joined #ruby
<zenspider>
godd2: double standard much? :P
devoldmx33 has quit [Remote host closed the connection]
blizzy has joined #ruby
<timmmaaaayyy>
this did the trick -- insert = con.query("UPDATE uploads SET direct_thumbnail_upload_url='#{http_thumbnail_url}' WHERE direct_upload_url='#{http_url}'")
<timmmaaaayyy>
thanks for the help godd2!!
mikepack has joined #ruby
lw_ has quit [Quit: s]
pu22l3r_ has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
jidar has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby
<jidar>
is there any way besides using Object.is_a?(Whatever::Foo) to get the object class?
econerd4ever has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 252 seconds]
boombadaroomba has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 265 seconds]
robustus|Off has joined #ruby
robustus|Off is now known as robustus
karmatr0n has quit [Remote host closed the connection]
OldHarmony has left #ruby [#ruby]
rshetty has joined #ruby
oo_ has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
deric_skibotn has quit [Ping timeout: 250 seconds]
echooo1 has joined #ruby
rshetty has quit [Remote host closed the connection]
Pupeno_ has joined #ruby
elastik has quit [Remote host closed the connection]
echooo has quit [Ping timeout: 265 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 258 seconds]
<wallerdev>
object.class ?
fgo has joined #ruby
<jidar>
yep!
<jidar>
:(
Pupeno has quit [Ping timeout: 265 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<godd2>
jidar just note that is_a? looks up the ancestor chain
<godd2>
but class will tell you what it's an instance of.
fgo has quit [Ping timeout: 244 seconds]
lw has joined #ruby
<jidar>
yea, switching around from a ton of languages, and I found a stackoverflow on using is_a?(String) etc, but wasn't sure how to get just the instance of it, plus the code I was looking at for Beaker just made use of a case statement
<jidar>
but thank you, still getting my bearings
lw has quit [Read error: Connection reset by peer]
<wallerdev>
usually you don't do much type checking in ruby
lw has joined #ruby
<jidar>
indeed, this particular case I'm just trying to understand what the problem is
<jidar>
so verification is important
segfalt has quit [Quit: Connection closed for inactivity]
<godd2>
jidar a useful debugging tool in ruby is the gem pry
<jidar>
sitting in pry right now! so much better than irb
<jidar>
reminds me a bit of ipython, which is also a great tool
sailias has quit [Quit: Leaving.]
finisherr has quit [Quit: finisherr]
TehStig has joined #ruby
porfa has quit [Read error: Connection reset by peer]
porfa_ has joined #ruby
XxionxX has quit [Read error: Connection reset by peer]
econerd4ever has joined #ruby
sarmiena_ has joined #ruby
Ionian has joined #ruby
<Ionian>
Hello!
<wallerdev>
hi
<Ionian>
What is the equivlent of indexOF in JS in Ruby?
<wallerdev>
index
<Ionian>
thank you
conniemj_ has quit [Quit: (null)]
sea_local has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 250 seconds]
<wallerdev>
lots of weird quirks with various mobile browsers, none are emulated on desktop chrome haha
mgberlin has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
<Ionian>
Volt framework is apparently fast
<godd2>
Ionian its ruby that gets compiled to js
duncannz has joined #ruby
<godd2>
Volt is running on Opal
<wallerdev>
lol
<jhass>
Ionian: as said, pure language benchmarks without defining a workload are mostly useless and uninteresting. At minimum do something like comparing JSON parsing: https://github.com/kostya/benchmarks/tree/master/json
diegoviola has quit [Quit: WeeChat 1.0.1]
<jhass>
where Ruby interestingly beats Node.js
daynaskully has quit [Ping timeout: 258 seconds]
<Ionian>
Sweet
lucyinthesky_ has left #ruby ["Leaving"]
wsmoak has quit [Quit: wsmoak]
<jhass>
at the expense of much higher memory usage though
<jhass>
so again, you need to look at what you need
<jhass>
just saying "it's slower" because some random benchmark says so means nothing
TehStig has joined #ruby
louism2wash has joined #ruby
testin has quit [Remote host closed the connection]
wookiehangover has joined #ruby
olivier_bK has joined #ruby
adriancb has quit [Remote host closed the connection]
<Ionian>
What are the top 5 sites using rails now?
<jhass>
I guess #RubyOnRails would know
claptor has joined #ruby
baweaver has joined #ruby
mloveless has quit [Remote host closed the connection]
dseitz has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
<wallerdev>
github is proably 1
<jhass>
twitter doesn't count anymore?
<wallerdev>
twitter uses rails for some aspects from what i remember
diego_ar has quit [Ping timeout: 244 seconds]
<wallerdev>
but yeah most top websites use a mix of technologies
<wallerdev>
not just like rails + mysql and thats the whole stack
<wallerdev>
lol
<jhass>
github uses it for more aspects for sure
lucyinthesky_ has joined #ruby
<jhass>
but as you said, that's not the point in answering the question
dseitz has quit [Client Quit]
jenrzzz has joined #ruby
<wallerdev>
i think twitch.tv is on rails
diego_ar has joined #ruby
dseitz has joined #ruby
<wallerdev>
and emberjs, which is a frontend framework but if youre using something like ember or angular, your backend basically is just a json api
<wallerdev>
and could be anything
<wallerdev>
doesnt really matter what you pick
sarmiena_ has quit [Quit: sarmiena_]
mgberlin has quit [Remote host closed the connection]
fgo has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
mgberlin has joined #ruby
dseitz has quit [Client Quit]
dseitz has joined #ruby
Areessell has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 250 seconds]
karmatr0n has joined #ruby
baweaver has joined #ruby
djdarkbeat has quit [Quit: djdarkbeat]
econerd4ever has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
virtualize has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
twistedpixels is now known as zz_twistedpixels
Megtastique has quit []
olivier_bK has quit [Ping timeout: 260 seconds]
klmlfl has joined #ruby
freerobby has quit [Quit: Leaving.]
ebbflowgo has left #ruby [#ruby]
goshdarnyou has joined #ruby
bigmac_ has quit [Ping timeout: 244 seconds]
samuel02 has joined #ruby
_mtr has joined #ruby
bigmac_ has joined #ruby
Sou|cutter has joined #ruby
greenbagels_ has quit [Quit: Leaving]
arup_r1 has joined #ruby
MasterPiece has joined #ruby
kobain has joined #ruby
arup_r1 has quit [Client Quit]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kobain has quit [Excess Flood]
kobain has joined #ruby
lemur has joined #ruby
kobain has quit [Excess Flood]
samuel02 has quit [Ping timeout: 264 seconds]
kyb3r_ has joined #ruby
kobain has joined #ruby
_mtr has quit [Ping timeout: 256 seconds]
nobitanobi has quit [Remote host closed the connection]
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
Nameo0 has joined #ruby
tsu has joined #ruby
<Nameo0>
Hello! I am trying to count how many times a set of characters in a string and I cannot find anything besides (string).scan().
<Nameo0>
What I am trying to do is for example count how many times 'ex' appears in the string 'experiencex' and in this case it should be twice. But with .scan I get 6.
<sargas>
I need to run the event files by running reflag.rb
AlexRussia has joined #ruby
rshetty_ has quit [Read error: Connection reset by peer]
<sargas>
but nothing happens when I do `ruby redflag.rb`
kl has quit [Ping timeout: 245 seconds]
roger_rabbit has quit [Client Quit]
roger_rabbit has joined #ruby
russt has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
roger_rabbit has quit [Changing host]
roger_rabbit has joined #ruby
tsu has joined #ruby
kp666 has joined #ruby
Ulrike_Rayne has left #ruby [#ruby]
zmisc has joined #ruby
<havenwood>
sargas: instead of `if yield` try `if block_given?`
tsu_ has joined #ruby
tsu has quit [Read error: Connection reset by peer]
<sargas>
havenwood: still nothing, if I paste the content of the *events files into redflag.rb, everything works
<sargas>
havenwood: I guess I'm not using Dir.glob correctly
<havenwood>
sargas: ah, you actually mean to check the truthiness of the block, gotcha
<sargas>
yes
<sargas>
this is an example from a book... nothing fancy, the book uses 1.9 while I'm on 2.1.5
<sargas>
maybe that is why
zmisc has joined #ruby
zmisc has quit [Client Quit]
zmisc has joined #ruby
zmisc has quit [Client Quit]
Joufflu has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dc has quit [Remote host closed the connection]
Nameo0 has joined #ruby
jlast has quit [Remote host closed the connection]
tlarevo has quit [Read error: Connection reset by peer]
jlast has joined #ruby
<havenwood>
sargas: outputs two ALERTS for me on 2.1.5
<Nameo0>
Hello! =) I was wondering if someone could help me better understand the difference between a method with an exclamation mark vs one without and exclamation mark? Ex: .slice vs. .slice!
roger_rabbit has quit [Quit: WeeChat 0.3.8]
<havenwood>
Nameo0: i think you weren't on earlier, but:
<havenwood>
>> "This is a thing that is this".scan('is').size
bears_ has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has joined #ruby
shredding has quit [Quit: shredding]
kAworu has quit [Ping timeout: 272 seconds]
Flcn has quit [Quit: Be back later ...]
mpistone has quit [Ping timeout: 265 seconds]
kAworu has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Spami has joined #ruby
dopie has joined #ruby
tkuchiki has joined #ruby
konsolebox has joined #ruby
timonv_ has joined #ruby
kl has joined #ruby
arup_r has joined #ruby
oo_ has quit [Remote host closed the connection]
bears_ has joined #ruby
shredding has joined #ruby
jenrzzz has joined #ruby
shevy has joined #ruby
_Andres has quit [Quit: jazz]
arup_r_ has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
roolo has joined #ruby
kenneth has joined #ruby
arup_r has quit [Ping timeout: 258 seconds]
jheg has quit [Quit: jheg]
yfeldblu_ has joined #ruby
kl has quit [Ping timeout: 244 seconds]
hs366 has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 250 seconds]
hiall has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
Takle has joined #ruby
foooobear has joined #ruby
<certainty>
oh nice rspec allows you to bind the return value of a stubbed method on the parameter expectation ... so allow(foo).to receive(:bar).with(:foobar).and_return(:something) and allow(foo).to receive(:bar).with(:baz).and_return(:something_else) will return different results based on the parameters passed
<certainty>
has that always been the case?
bears_ has quit [Remote host closed the connection]
sigurding has joined #ruby
nayme has joined #ruby
mikecmpbll has joined #ruby
charliesome has joined #ruby
<nayme>
wh y isn't my code working? i am trying to find a prime number
<jokke>
is it possible to use gems beside bundler in a project? I mean kind of having a "private" Gemfile or similar that wont appear in Gemfile.lock
<jokke>
i'd like to add some gems to a project for development purposes that no-one else in the project needs
<jokke>
many of my co-workers use rubymine and don't need pry for example
<jokke>
or better errors
<jokke>
better_error
<jokke>
s
mpistone has quit [Ping timeout: 260 seconds]
<certainty>
jokke: what i usually do is export the path of my private gem file in an environment variable and then load and eval it inside the main gemfile if the variable is set
<certainty>
dunno if that's the best way to do it but it works
<jokke>
oh
<certainty>
i'm not feeling good about the eval :p
<jokke>
yeah
jlebrech has joined #ruby
<jokke>
there's no way to require it or so?
<certainty>
simply loading it didn't work when i last checked iirc
<jokke>
but still, running bundle install would add your gems to the gemfile.lock
<certainty>
yeah
workmad3 has joined #ruby
<certainty>
that's right
<jokke>
which i can't do
<certainty>
ah ok
<jokke>
because it's in version control
<jokke>
i'd force the gems on the others like that
lkba has quit [Ping timeout: 272 seconds]
<jlebrech>
idea: writing tests after __END__ in file with yaml.
<certainty>
it's a combination of evaling the common gemfile inside the private one and then using the private gemfile only, by exporting the BUNDLE_GEMFILE variable
<certainty>
that way you can still commit your Gemfile.lock and keep your local gemfile away from the repository
<workmad3>
jokke: you wouldn't force the gems on others with them just being in the Gemfile.lock btw
ezio has quit [Read error: Connection reset by peer]
StoneCypher has joined #ruby
rodfersou has joined #ruby
<workmad3>
jokke: however, you would churn the Gemfile.lock, and if you were the last person to touch it then you'd break installs that used --deployment
ezio has joined #ruby
<certainty>
sounds like there should be a proper solution for this. It's a pretty common concern i believe
qba73 has joined #ruby
mengu has quit [Remote host closed the connection]
<workmad3>
jokke: 'bundle install' adds and removes gems from the lockfile if they've been added/removed from the Gemfile.lock. If it's added, the install will check to make sure it fits into the current dependency graph without altering any versions of already locked gems
TehStig has quit [Ping timeout: 255 seconds]
william3 has quit [Remote host closed the connection]
samuel02 has joined #ruby
<workmad3>
certainty: yeah, it's a feature/issue that bundler has been trying to figure out since something like 0.8 or 0.9... they've yet to manage to figure out a way that doesn't break bundler in annoying ways, I believe
<certainty>
also you're right that it might be problematic to just eval the common gemfile and not somehow onely take the lockfile as the source
<certainty>
i believe you said that before :D
<certainty>
we need bundle-merge that merges two lockfiles
davedev2_ has quit [Remote host closed the connection]
<certainty>
well gotta take care of a different mess here. bbl
Takle has quit [Remote host closed the connection]
<workmad3>
what you really need is that two-file approach built into bundler so that you can have Gemfile and Gemfile.mine, and do something like 'bundle config local.gems=Gemfile.mine' and bundler will then install Gemfile with Gemfile.lock, and then resolve Gemfile.mine with Gemfile.lock as the source graph which can't be changed and Gemfile.mine has to 'fit in'
StoneCypher has quit [Ping timeout: 244 seconds]
arup_r has quit [Ping timeout: 245 seconds]
<workmad3>
and then store that entire graph in Gemfile.mine.lock
Takle has joined #ruby
<workmad3>
it's important that Gemfile.lock needs to be taken into account for all local versions though, IMO
<certainty>
which is the merge thing
<certainty>
yeah
<certainty>
workmad3: ok you know the task. You have 8 hours
<workmad3>
dopie: well, that's constructing a string from two different values
bmichelsen has joined #ruby
<dopie>
yeah
hgl has quit [Max SendQ exceeded]
<dopie>
not what i want
<workmad3>
dopie: but yes, the idea is the same... you can only return one value from the block
oo_ has joined #ruby
hgl has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
<workmad3>
dopie: so the bit I was asking is do you want a single true/false that is true if confirmation is blank *and* is_approved is true, or do you want something like [[false,true], [true,true]] ?
red_horned_rihno has quit [Remote host closed the connection]
rshetty has quit [Ping timeout: 244 seconds]
red_horned_rihno has joined #ruby
lessless has joined #ruby
hiall has quit [Quit: hiall]
Calmoto has quit [Ping timeout: 255 seconds]
<Xeago>
hmm, when running pry in jruby, the interactive mode is reaally flaky
<Xeago>
fg/bg'ing the process results in no input being shown until pressing return
wpp has quit [Ping timeout: 240 seconds]
SOLDIERz has quit [Quit: Be back later ...]
kaspertidemann has joined #ruby
rshetty_ has quit [Remote host closed the connection]
hgl has quit [Ping timeout: 264 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
nfk has joined #ruby
hgl has joined #ruby
samuel02 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mengu has quit [Ping timeout: 245 seconds]
ldnunes has joined #ruby
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
<jlebrech>
my tests need a current_user (i'm using an external api, prior to fakeweb), what you think of storing session data in redis for tests to load?
Phagus has joined #ruby
<Phagus>
Is there a Ruby equivalent to Python's String.format method?
studiotate has joined #ruby
<jheg>
o/
_5kg has quit [Ping timeout: 260 seconds]
<jheg>
I’m gettingthis error which I havent had before …
<jheg>
ERROR: While executing gem ... (Gem::FilePermissionError)
<jheg>
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
<certainty>
Phagus: i don't know about about Pythons format method but you may want something like String#%
<jheg>
how do I fix this? AFAIK I’ve not changed anything fundamental
arturhoo has quit [Quit: arturhoo]
<workmad3>
jheg: how did you install ruby?
<jheg>
rvm I think
<jheg>
it was a few months ago but pretty sure thats what I used
lemur has quit [Ping timeout: 258 seconds]
<jheg>
i’ve installed gems recently too
<workmad3>
jheg: right, then it looks like you've started a new terminal session and your default ruby is still the system one
<workmad3>
jheg: so you need to do 'rvm use <whatever>'
<Phagus>
certainty: What do people use commonly in Ruby for print? puts?
<certainty>
Phagus: yeah
<certainty>
if you need the newline
<certainty>
otherwise print is fine
<certainty>
sometimes #display ... for objects that respond to it
studiotate has quit [Ping timeout: 258 seconds]
<workmad3>
Phagus: or just 'p' if you want more information on the object
uber_hulk has joined #ruby
Shazaum has joined #ruby
Xeago has quit [Remote host closed the connection]
<Phagus>
So you just string variables together? puts "Hello " + name + "\nToday is" + date + "."
mpistone has joined #ruby
<workmad3>
Phagus: "Hello #{name}\nToday is #{date}."
uber_hulk has quit [Client Quit]
<workmad3>
Phagus: string interpolation ftw
<Phagus>
Oh, very nice.
Shazaum has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
<Phagus>
Can you give me an example of that being used in a puts statement workmad3 ?
<workmad3>
Phagus: err... you stick 'puts' at the start :P
<Phagus>
It just knows where to pull #{name} from?
<tobiasvl>
it pulls it from… name
<workmad3>
Phagus: yes, #{} evaluates ruby in the current scope
timonv_ has joined #ruby
<workmad3>
Phagus: so "#{name}" is using the local variable or method 'name'
<workmad3>
Phagus: "#{@name}" would use the ivar @name
<workmad3>
Phagus: in essence, you can think of "Hello #{name}" as a shorthand for '"Hello " + name.to_s'
<Phagus>
workmad3: Yep. It's almost like the formatter method in Python
<Phagus>
Well, a good equivalent
<Phagus>
strining things together with +'s is just annoying
sk87 has joined #ruby
<workmad3>
Phagus: I suspect the format method in python is more like '"Hello %s" % name' ;)
<jheg>
workmad3: thanks buddy!
<workmad3>
jheg: that was the missing bit? :)
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
mpistone has quit [Ping timeout: 250 seconds]
<jheg>
I did rvm use 2.1.1 and it seemed to work
qba73_ has joined #ruby
<workmad3>
jheg: I'd suggest doing 'rvm use <whatever> --default' if so... that will set up that particular ruby as the default to activate when RVM loads
<Phagus>
workmad3: Oh no, I meant, the .format() method. Python 3 syntax
<jheg>
I think thats something else though coz it still works when I create a new app
<jheg>
anyway thanks for the help
<workmad3>
Phagus: ah, that looks more like C#... but yeah, fair enough :)
<Phagus>
workmad3: Probably what inspired it. I like how Ruby handles this stuff though, you can just define an expression right there in the string
<workmad3>
Phagus: that works nicely if you need to insert the same arguments multiple times... but then you could always write your own .format method ;)
<workmad3>
hmm, should probably have done sub.to_s in the gsub there
<workmad3>
>> class String; def format(*args); args.each_with_index.inject(self){|str, (sub, i)| str.gsub("{#{i}}", sub).to_s}; end; end; "Hello {0}. Did you know that today is {1}? Goodbye for now, {0}".format("Bob", Date.today)
<workmad3>
>> class String; def format(*args); args.each_with_index.inject(self){|str, (sub, i)| str.gsub("{#{i}}", sub).to_s}; end; end; "Hello {0}. Did you know that today is {1}? Goodbye for now, {0}".format("Bob", Date.new)
<eval-in__>
workmad3 => no implicit conversion of Date into String (TypeError) ... (https://eval.in/232916)
<workmad3>
ok, screw that :)
prontotest has joined #ruby
prontotest has left #ruby [#ruby]
<workmad3>
too used to having that sort of stuff on string :)
<workmad3>
*date
blueOxigen has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Peterman_ has joined #ruby
<Phagus>
Python's String.format() method supports things like keyword assignment, string slicing, dictionary dereferencing , and other magic. I have a feeling Ruby has its own way of doing said magic :-)
Axy is now known as Mia
<wasamasa>
ruby just has string interpolation
<workmad3>
wasamasa: and sprintf
<wasamasa>
and a rather unsatisfying printf
<wasamasa>
then, at least that one doesn't need its own mini-manual
<workmad3>
avril14th: the fun of splitting by regexp with lookarounds :)
<certainty>
it does loads of compile time magic to be efficient
fella6s has joined #ruby
ezio has quit [Read error: Connection reset by peer]
<avril14th>
workmad3: it's pretty much the fun of head banging over here. :)
ezio has joined #ruby
<wasamasa>
certainty: it will certainly be educational
<workmad3>
avril14th: regexp lookarounds aren't something most people jump straight to ;)
<certainty>
wasamasa: for sure
<workmad3>
avril14th: as it requires remembering that they exist, remembering that they're 0-length matches, and then remembering that you can pass split a regexp ;)
<certainty>
wasamasa: the problem with all these things is that they don't compose well. I'd rather go with a neat set of formatting combinators
<workmad3>
avril14th: and then not crying at the nasty, ugly regexp you just wrote to split around a single character...
yfeldblum has joined #ruby
AlSquirikou has quit [Ping timeout: 252 seconds]
<workmad3>
avril14th: when you could probably just as easily have done 'whatever'.split('e').flat_map{|s| [s, "e"]}
<workmad3>
and drop the last element :)
fella5s has quit [Ping timeout: 252 seconds]
Mongey has quit [Ping timeout: 252 seconds]
<avril14th>
I'm crying at the hours I spent reading regexp docs and rubular to spit 256chars regexp that I think most talented men would write with a few ones
<certainty>
sounds round about
Alina-malina has quit [Ping timeout: 252 seconds]
LRgraham has quit [Ping timeout: 258 seconds]
<wasamasa>
certainty: what, composing things in ruby?
<workmad3>
avril14th: as the immensely wise 'A. N. Onymous' said - "You think 'I know, I could solve this problem with a regular expression'. You now have 2 problems"
<wasamasa>
certainty: what are you smoking?
<certainty>
wasamasa: well :D
<wasamasa>
certainty: I want my uncomposable "DSLs"!!
Alina-malina has joined #ruby
<avril14th>
brb
hgl has quit [Max SendQ exceeded]
avril14th has quit [Read error: Connection reset by peer]
<alex88>
noob question, why system {"ATLAS_TOKEN"=>nil}, "make", "test" doesn't work while system({"ATLAS_TOKEN"=>nil}, "make", "test") does?
postmodern has quit [Quit: Leaving]
hgl has joined #ruby
boombadaroomba has joined #ruby
Spami has joined #ruby
voodoofish430 has quit [Read error: Connection reset by peer]
fabrice31_ has quit [Remote host closed the connection]
hgl has quit [Max SendQ exceeded]
<certainty>
alex88: i don't know the details but suspect a parser issue that inteprets the firts hash as a block or something
<jheg>
I mean I’m getting to know how to use OOP but if I were to have to tell someone what it fundamentally is - I’d struggle
<workmad3>
jheg: Alan Kay has explicitly said that 'OO' in Java and C++ is not what he would consider OO, btw
<jheg>
will read through those links
jimms has joined #ruby
mozzarella has joined #ruby
<workmad3>
jheg: Alan Kay likened it to a cellular metaphor. Each object (not class) is a cell. It can do some stuff internally, but only very simple things. In order to collaborate with other cells, it sends out a message and cells that are interested in that message perform their actions when they receive it
uber_hulk has quit [Quit: leaving]
<jheg>
workmad3: nice
aclearman037 has joined #ruby
<jheg>
Each object (not class) aka class instance?
<workmad3>
jheg: who cares where the object came from? :P
<jheg>
?
<workmad3>
jheg: i.e. why tie your definition of an object to the idea of a class
<tobiasvl>
not all OOP languages have classes, such as javascript
<jheg>
I thought they were on ein the same
tokik has joined #ruby
<jheg>
oh OK
tristanp has joined #ruby
sk87 has joined #ruby
<jheg>
So if there was an opposite of non OOP what would it be?
<tobiasvl>
an opposite of non-OOP?
<tobiasvl>
or an opposite of OOP
<jheg>
and if everything in ruby is an object such as nil
<jheg>
ha tobiasvl double neg there
<Abhijit>
service restart tobiasvl
<jheg>
yeah opp of oop
<workmad3>
jheg: in ruby, even classes are objects (instance of the class Class, which is itself an object...)
uber_hulk has joined #ruby
gauke has left #ruby [#ruby]
<jheg>
so we combine objects to create new objects?
<workmad3>
jheg: I'm not sure what the 'opposite' of oop would be or look like... I can envisage an absence, not really an opposite...
_mtr has joined #ruby
<jheg>
simple so we can build their complexity?
<workmad3>
jheg: that's the usual advice - concentrate on objects and their interactions, rather than classes and their hierarchies
<tobiasvl>
jheg: well, in a way. in ruby, we have a tree of inheritance, yes. all objects inherit from Object, for example
techsethi has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
<workmad3>
jheg: also bear in mind waxjar's comment that it's a tricky term, OO can mean different things to different people and different languages, and that how to build good software is still an evolving discipline
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
<waxjar>
i think the cellular analogy is best if you're trying to understand what it is, objects have some small responsibilty and they communicate with each other trough messages (in ruby these are method calls) to make things happen
<waxjar>
inheriting, classes, etc are more "implementation details" than fundamental to the theory
<claf>
opposite of OOP is huge ball of spaghetti
<workmad3>
waxjar: I'd probably say 'sometimes useful additions' rather than 'implementation details', but I like your idea :)
axilla has quit [Ping timeout: 252 seconds]
<workmad3>
claf: that can also be OOP :P
sailias has joined #ruby
<claf>
you can spaghetti up OOP
_mtr has quit [Ping timeout: 256 seconds]
<claf>
true
machete has quit [Ping timeout: 245 seconds]
<workmad3>
claf: crap code is fairly independent of paradigm :)
<claf>
you might as well ask, what is opposite of using boxes
rshetty has quit [Remote host closed the connection]
<claf>
well, its some other container, or a huge mess
psy_ has quit [Read error: No route to host]
<workmad3>
claf: hmm... 'what is the opposite of putting things in boxes' is obviously 'putting boxes in things'
<claf>
aaa
<workmad3>
claf: while what you just described sounds more like 'the absence of using boxes'
porfa has joined #ruby
<claf>
workmad3: I think I feel a new paradigm: POO-programming
<workmad3>
claf: :D
psy_ has joined #ruby
diego_ar has joined #ruby
* claf
goes to ... write a POO manifesto
<workmad3>
claf: awesome, the poo-manifesto.org domain is free!
<claf>
learn to ask for help in a manner that tells people what you did, what you expected, what happened, your code in a pastie or gist
<Ionian>
The code I provided
<Ionian>
works with google.com
<Ionian>
but if I do twitter.com or xat.com
<Ionian>
It doesnt run
<Ionian>
nothing shows up
<claf>
ok
pandaant has joined #ruby
<claf>
Ionian: can you install irb?
<loc22>
Hi guys! I have a basic question. Im using polymorphic associations in Rails and I have the following classes: Post, Comment and Like. So Post and Comments has_many :likes, as: :likeable... I'm needing now to do some methods, that are in common to Post and Comments. I try creating a Likeable class and make Post and Comments inherit form it, but didn't work. Is there a way to do it? Thanks!
Peterman_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rocknrollmarc has joined #ruby
Andy__ has quit [Remote host closed the connection]
kl has joined #ruby
<kl>
hai guys
<kl>
does anyone know any big companies/websites that use Ruby?
<kl>
Github is one I think of
<claf>
I think google knows
aclearman037 has joined #ruby
<claf>
be brave!
Timgauthier is now known as timgauthier_away
<kl>
I should have clarified: not rails
<kl>
Google doesn't seem able to distinguish the two concepts.
druznek has joined #ruby
karmatr0n has joined #ruby
karmatr0n has quit [Remote host closed the connection]
rocknrollmarc has quit [Remote host closed the connection]
karmatr0n has joined #ruby
Andy___ has joined #ruby
techsethi has quit [Quit: techsethi]
craigp has quit [Remote host closed the connection]
Andy___ has quit [Client Quit]
Ionian has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
<kl>
Too many RTFM/Google it responses in here lately
yfeldblum has joined #ruby
karmatr0n has quit [Remote host closed the connection]
MasterPiece has quit [Ping timeout: 240 seconds]
<kl>
I've helped out far too many people in my years of being here without resorting to that crap
<claf>
kl really?
<pontiki>
i'm kinda wondering how a big company's website would use just ruby but not rails...
<claf>
kl: how insidious
jleishman has quit [Quit: Be back later ...]
arturhoo has quit [Ping timeout: 264 seconds]
<claf>
kl: you could also look at job boards
craigp has joined #ruby
<pontiki>
but i suppose one could look through some of the other ruby web frameworks' sites to see if they include a list of sites using said framework
<claf>
I'd hazard a guess thats like asking who uses javascript or python
timgauthier_away is now known as Timgauthier
<claf>
it might not be their marketing department fave
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MasterPiece has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
startupality has joined #ruby
jerius has joined #ruby
razieliyo_ has joined #ruby
razieliyo_ has left #ruby [#ruby]
jeanlinux has joined #ruby
<geekbri>
Oi. Does anybody here have autoindent working for ruby files in OSX? I'm struggling to get it to work and I may rip my hair out. I have the vim-ruby plugin installed.
workmad3 has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
dblessing has joined #ruby
<geekbri>
Oh! I got it to work. Nevermind :)
freerobby has joined #ruby
studiotate has joined #ruby
jeanlinux has quit [Remote host closed the connection]
devdazed has joined #ruby
Azure has joined #ruby
Areessell has quit [Ping timeout: 252 seconds]
st0mar has quit [Ping timeout: 244 seconds]
jleishman has joined #ruby
druznek has quit [Quit: Leaving]
s00pcan_ has joined #ruby
jeanlinux has joined #ruby
druznek has joined #ruby
devdazed has quit [Max SendQ exceeded]
shortCircuit__ has quit [Ping timeout: 245 seconds]
studiotate has quit [Ping timeout: 258 seconds]
devdazed has joined #ruby
axilla has quit [Ping timeout: 260 seconds]
william3 has joined #ruby
jeanlinux has quit [Ping timeout: 264 seconds]
william3 has quit [Remote host closed the connection]
Nodeist has joined #ruby
<wasamasa>
kl: you could search for other frameworks than rails
treehug88 has joined #ruby
<wasamasa>
kl: sinatra is probably the most popular after rails
<kl>
wasamasa: other frameworks exist? (Joke ;)
<kl>
Well, Sinatra. :)
<wasamasa>
now, whether companies admit using something else than the most popular...
kiyote23 has joined #ruby
josephndenton has joined #ruby
rshetty has joined #ruby
mleone has joined #ruby
karmatr0n has joined #ruby
<Nodeist>
Volt is promising?
shredding has joined #ruby
adriancb has joined #ruby
<Nodeist>
Im really confused with my problem :(
sailias has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<helpa>
What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best.
<waxjar>
nokogiri is very popular, but there's also ox and the stdlib rexml
<AxonetBE>
yes I checked out nokogiri but not easy to convert to a class with the values because nested xml
fandi has quit [Max SendQ exceeded]
russt has joined #ruby
axilla has joined #ruby
tristanp has joined #ruby
fandi has joined #ruby
<hs366>
I get an error when i run the code in ruby v.2 "undefined method 'each' for #< String ..." , it loop in an Array of strings , could you please tell me how can i fix it ?
<kl>
Why does require() make the required file's constants globally accessible to the entire application?
mikepack has joined #ruby
hashpuppy has joined #ruby
<gregf_>
avril14th: r = Regexp.new(/\[(.*)\]/); "foo [bar] [baz]".scan(r)
<bline79>
thank you :)
<kl>
It would be nice if require() only made them available to the file that has that require() call
<shevy>
kl I think this is the only way possible. remember, class Foo <-- Foo is also a constant and must be known to other files too
<shevy>
kl workaround: put them in a module
<kl>
shevy: sure, so every file that wants it requires the file that Foo is in, right
<shevy>
yeah; I think there is no other way too. when you require another file, the top namespace of modules and classes must be known, because otherwise, how do you load up classes and modules defined in other .rb files?
geggam has joined #ruby
<shevy>
perhaps you could treat ALL_CAPS variables special, but as far as I know, the current ruby parser makes no difference between ALL_CAPS and AllCaps or All_caps
wjimenez5271 has joined #ruby
ezio has quit [Read error: Connection reset by peer]
ezio has joined #ruby
heftig has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
bears_ has quit [Remote host closed the connection]
_mtr has joined #ruby
ta has quit [Read error: Connection reset by peer]
<jhass>
waxjar: I can't get you used to open(, &:read) instead? ;)
charles81 has joined #ruby
whoisjake has quit []
<waxjar>
what's the benefit?
nclbr has quit [Ping timeout: 250 seconds]
whoisjake has joined #ruby
<kke_>
eam: changing language won't help much if you still have too much data to fit into memory comfortably, you still need some sort of disk based system
Val_ has quit [Ping timeout: 264 seconds]
<jhass>
for open-url probably none, but for regular calls it makes sure to call .close
xymbol has quit [Ping timeout: 260 seconds]
<waxjar>
ah, i see what you mean
xymbol has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<jheg>
If anyone could give it the quickest of once overs and check im on the right lines i’d be really gratefull
_beechnut has joined #ruby
Hobogrammer has joined #ruby
gr33n7007h has quit [Ping timeout: 272 seconds]
reset has joined #ruby
goodenough has joined #ruby
<havenwood>
jheg: not done reading yet, but a few trivial grammar nits. change `created me and my girlfiend` to `created myself and my girlfriend` and `God like` to `godlike`.
hgl has quit [Ping timeout: 250 seconds]
<havenwood>
`check the worlds` to `check the world's`
JimmyNeutron has joined #ruby
<jheg>
cool good stuff that’s great havenwood
<jheg>
my grammer could be better
<sargas>
what is PP::ObjectMixin in my class#ancestors?
<havenwood>
`Lets move on` to `Let's move on`
<havenwood>
jheg: `in this case its` to `in this case it's`
ChoiKyuSang has joined #ruby
<havenwood>
`As the worlds` to `As the world's`
AlSquirrel has quit [Quit: This computer has gone to sleep]
<havenwood>
`each persons` `each person's`
arietis_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
`what a person. Without the Perosn` to `what a person is. Without the Person`
reset has quit [Quit: Leaving...]
jheg has quit [Read error: Connection reset by peer]
jheg has joined #ruby
<havenwood>
now super-micro nits >.>, `rear facing` to `rear-facing`, okay that's all for pedantic grammar nits :)
<jheg>
sorry got disconnected from 6:25 ‘in this case it’s’
<apeiros_>
I say "usually" because `new` is just a method and can be defined to do whatever.
jheg has quit [Quit: jheg]
dseitz has joined #ruby
sarmiena_ has joined #ruby
eighthbit has joined #ruby
jleishman has joined #ruby
<sargas>
apeiros_: got it
lolmaus__ has quit [Ping timeout: 240 seconds]
jlast has quit [Ping timeout: 265 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
ylluminate has joined #ruby
rbennacer has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
rbennacer has quit [Remote host closed the connection]
tier has joined #ruby
tier_ has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
apoorvparijat has joined #ruby
<kl>
hey guys
<kl>
I've noticed I've started using Structs where I used to use hashes before
<kl>
Is that a bad thing potentially....?
jheg has joined #ruby
ptrrr has quit [Quit: ptrrr]
<apeiros_>
kl: what are potential up- and what potential downsides of you using structs?
umadbor has joined #ruby
<kl>
apeiros_: up is that it guarantees when I receive it in the client I pass it to that the intended fields were assigned (due to it using a constructor rather than keys)
rbennacer has joined #ruby
dfinninger has joined #ruby
wald0 has quit [Quit: Lost terminal]
<kl>
apeiros_: actually, that doesn't apply - because Ruby is a duck-typed language and doesn't even know what it's receiving, really.
rbennacer has quit [Remote host closed the connection]
<kl>
apeiros_: downside I see, is I'm pretty much creating a few new files just to hold a simple struct
<apeiros_>
duck-typed is actually more what you do with the typing system. not a property of the type system itself.
rbennacer has joined #ruby
TerjeLarsen has joined #ruby
timonv_ has joined #ruby
hephaestus_rg has joined #ruby
<kl>
apeiros_: ok, well there basically *isn't* a type system, so the properties I mentioned can't really be held
rdark has quit [Quit: leaving]
<kl>
upheld*
umadbor has quit [Read error: Connection reset by peer]
GeorgesLeYeti has quit [Quit: Leaving]
<apeiros_>
I don't think that's correct.
<apeiros_>
if you actually did write a proper constructor, then yes, you can be reasonably sure the relevant fields are correctly set.
JBreit has quit [Ping timeout: 250 seconds]
<apeiros_>
that's completely unrelated to ruby not having static typing
kinseapo has quit [K-Lined]
Gay-champion has joined #ruby
<Gay-champion>
anyone here is a programmer unity 3d? à0
<kl>
apeiros_: yes, but what I mean is - the client doesn't know which constructor was invoked. All it knows is that it has an object that responds to X methods.
<apeiros_>
Gay-champion: Hanmac might have
eighthbit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrIlyas_ has quit [Quit: Leaving]
<Hanmac>
i worked with other stuff before but not with unity3d
<Hanmac>
Gay-champion: yes but i never used unity3d
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_>
kl: ok. lets go a step back then. why did you start using structs?
tristanp has quit [Remote host closed the connection]
<Gay-champion>
but I want a programmer unity 3d
beef-wellington has quit [Ping timeout: 264 seconds]
<sargas>
apeiros_: so Class.superclass == Module, Ruby has a Module class, but instances of Class include Module, not inherit from it, correct?
theotherstupidgu has joined #ruby
<apeiros_>
sargas: not sure I follow. Module#include (which is the method you call when you do `class Foo; include Bar; end`) adds a module to the receiver's ancestry.
<sargas>
Gay-champion: Last time I checked, Unity3D supports C#, UnityScript, and Boo scripting
<apeiros_>
>> module Bar; end; class Foo; include Bar; end; Foo.ancestors
<apeiros_>
include/extend are forms of inheritance.
geggam has quit [Ping timeout: 240 seconds]
<Hanmac>
sargas: Class.superclass == Module means that each class is also a module (except for include/extend)
sinkensabe has joined #ruby
<arup_r>
Why there is no such protected_constant, but other 2 exist ?
<kl>
apeiros_: to group together related values
<Gay-champion>
But I think that is not the same thing
<sargas>
Hanmac: this is a little confusing at first... I'll study that some more
fgo has quit [Ping timeout: 272 seconds]
<apeiros_>
kl: interesting. in what way does Struct help you grouping values? o0
pauly_oc has joined #ruby
<kl>
apeiros_: which a hash would do, but I wanted that security of knowing it will have been set all the values. But these aren't guaranteed things in Ruby as you don't specify parameter types
sinkensabe has quit [Remote host closed the connection]
frem_ has joined #ruby
theotherstupidgu has quit [Remote host closed the connection]
<kl>
apeiros_: it creates a constructor taking values and provides attr_accessors for each of them, and you can pass that one object around..
lolmaus has joined #ruby
<apeiros_>
ok. using a hash you'd lose the accessors.
<apeiros_>
the other two properties apply to a hash too
<kl>
apeiros_: you can't be sure in the client that anything was set - but you can't do that for a struct anyway as you can't guarantee the object passed WAS an instance of that struct
<apeiros_>
kl: you do sound a bit paranoid :)
<kl>
apeiros_: in a statically typed language, I think what I was doing would've been a good idea over a hash
<kl>
apeiros_: I recently got infected at a Scala conference, I blame that
<apeiros_>
and you can always define a constructor which in turn verifies all fields are set
<apeiros_>
whether doing so is a good idea is a different question altogether
last_staff has joined #ruby
<kl>
apeiros_: yeaaah but we both know that sucks :)
timonv_ has quit [Ping timeout: 240 seconds]
jheg has quit [Quit: jheg]
<kl>
apeiros_: I was just being a statically-typed-infected fool :)
Freelusion has quit [Quit: Freelusion]
freerobby has quit [Quit: Leaving.]
sigurding has joined #ruby
eighthbit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_>
in my personal experience, I'd say types would not have saved me from the majority of bugs I experienced. and/or they'd have introduced a lot more headache than the bugs themselves.
mastro has quit [Quit: Ex-Chat]
freerobby has joined #ruby
<apeiros_>
I do like structs.
<apeiros_>
I like structs because they're explorable, self documenting, fast, versatile.
<apeiros_>
when I've got a Hash, I can only see what it has, not what it could have. documenting an arbitrary hash is difficult. a struct (having a class definition) can easily have a documentation.
<apeiros_>
so IMO go ahead, use structs. they're good.
kenneth has joined #ruby
<kl>
apeiros_: unfortunately I think my colleagues will disagree
<apeiros_>
so?
<apeiros_>
you've got two options: accept their disagreement and do as they want, or debate.
<kl>
apeiros_: I'm already totally the picky one when it comes to code. I'd rather spend my picky credits on things I feel more passionate about
<apeiros_>
personally I'd love to see the rationale against what I said above.
sargas has quit [Quit: This computer has gone to sleep]
<apeiros_>
and if it is "but we will have additional files", all I could do is laugh. because that's a ridiculous reason against it.
sargas has joined #ruby
<kl>
apeiros_: the data structure will only be created in one place in the application; so a one-off hash isn't such a bad thing, perhaps
<havenwood>
apeiros_: i have yearned for types with code like RubyGems' where i can't ever figure out what custom class parameter is expected. just having to go search for what's calling it to figure out what it expects is a pain. other code i don't miss or want types. hmm.
<sargas>
if Class is also a Module... Class.superclass == Module... why doesn't MyClass have Module in the ancestors chain when it is an instance of Class?
agit0 has quit [Quit: This computer has gone to sleep]
<apeiros_>
havenwood: types as a way of forced documentation? ok.
beef-wellington has joined #ruby
rpag has joined #ruby
<havenwood>
apeiros_: basically
<apeiros_>
sargas: again, because MyClass is NOT a subclass of Class.
<sargas>
sorry for asking that again btw... I'm trying to understand Ruby's classes, if you know a good resource for me to read, let me know
codezomb has joined #ruby
<apeiros_>
sargas: you're still confusing instantiation and inheritance. those are two different axes.
<kl>
apeiros_: I do like your rationale
<waxjar>
i would like "types" in the way that you can say "must respond to methods x, y and z"
<kl>
It's definitely better.
jheg has joined #ruby
<waxjar>
i like my duck-typing
<apeiros_>
havenwood: I've seen the effects of such. it's: def ([Object]foo, [Object]bar, …)
renderful has joined #ruby
<apeiros_>
the other effect I've seen is (especially after having used ruby) overly restrictive types
<kl>
apeiros_: actually I do have a counter-question,
<kl>
apeiros_: when should a Hash be used, instead of a Struct?
eichenwald has joined #ruby
<apeiros_>
so color me doubtful about that. but I admit that the amount of using typed languages on my part probably disqualifies me.
<apeiros_>
kl: a) your keys are not symbols/strings, b) your set of keys is not closed
last_staff has quit [Quit: up again in less than X hoursszzssZZZzzzZzz....]
<waxjar>
a hash any time you need to associate keys with a value, a struct for "value object" type objects?
ton31337 has joined #ruby
<waxjar>
*with values
<apeiros_>
and potentially c) your set of keys is very large and all or most keys are optional
<kl>
apeiros_: wow. That means Structs should almost always be used, in many of my cases
<apeiros_>
that said - for one-off value passing I often use hashes too. not because I consider them superior but because I'm too lazy. with ruby's keyword arguments, this will probably even increase.
<kl>
but keyword args suck balls
<apeiros_>
I like the clarity. even with only one or two args. it helps making code even more self-documenting.
klmlfl has joined #ruby
DLander has joined #ruby
<ton31337>
starting unicorn I'm getting
<ton31337>
master failed to start, check stderr log for details
<apeiros_>
and as of 2.2, the performance penalty is minuscule too.
<kl>
apeiros_: method_name(param1: param1, param2: param2) # do you not find this often
sargas has quit [Quit: This computer has gone to sleep]
<kl>
apeiros_: when you name your variable the same name as the param
<havenwood>
ton31337: what does stderr say or you can't find it?
<kl>
which is common if you use good names
<apeiros_>
kl: ask me again in a year :)
renderful has quit [Ping timeout: 258 seconds]
<kl>
apeiros_: why's that? (Not used keyword args much?)
<apeiros_>
correct
ghr has joined #ruby
<kl>
apeiros_: I found it a common theme pretty much from the get-go
<apeiros_>
had to work with 1.9 at work, so I restricted my use of 2.0+ features.
<havenwood>
ton31337: run it not in daemon mode so you can see stderr, or check your config to see where the logs are going (or set up logging in your config).
<ton31337>
havenwood: no idea, how to debug this.. specifying -d -w gives nothing more..
<apeiros_>
but lacking experience with it, I prefer not to argue about it
DLander has quit [Client Quit]
apoorvpa_ has joined #ruby
<kl>
apeiros_: that's fair. Thanks for the chat anyway, and the advice - catch you later
<jheg>
thanks havenwood btw did it seem to make sense as a post? I understand it OK would you say?
<apeiros_>
you're welcome
sigurding has quit [Quit: sigurding]
agit0 has joined #ruby
pengin has quit []
<havenwood>
apeiros_: maybe it is just documentation i want
<ton31337>
havenwood: how it's related with my problem? I see here is capistrano-maintenance
dc_ has quit [Remote host closed the connection]
apoorvparijat has quit [Ping timeout: 250 seconds]
<apeiros_>
havenwood: maybe. I could understand both desires.
bayed has quit [Quit: Connection closed for inactivity]
<havenwood>
ton31337: i'm actually not a capistrano user even, mina is more my style. i'm probably not the best person to help. but it seemed the suggested solutions would be applicable likely. maybe i'm wrong.
bears has joined #ruby
apoorvparijat has joined #ruby
droidburgundy has quit [Read error: Connection reset by peer]
<havenwood>
ton31337: bundle exec
<havenwood>
with rake in the Gemfile
ghr has quit [Ping timeout: 260 seconds]
Mothore has quit [Quit: Be back later ...]
apoorvpa_ has quit [Read error: No route to host]
apoorvparijat has quit [Read error: No route to host]
dc has joined #ruby
apoorvparijat has joined #ruby
kl has quit [Ping timeout: 252 seconds]
pu22l3r has quit [Ping timeout: 244 seconds]
Pupeno has quit [Remote host closed the connection]
mg^ has joined #ruby
tier has quit [Remote host closed the connection]
Gay-champion has quit []
shazaum_ has quit [Quit: This computer has gone to sleep]
frem_ is now known as frem
tristanp has joined #ruby
eighthbit has joined #ruby
^mg^ has quit [Ping timeout: 258 seconds]
fgo has joined #ruby
<havenwood>
jheg: i'll take a closer look at the code, give me a min
msull92 has joined #ruby
dts|pokeball has quit [Quit: Leaving]
dts|pokeball has joined #ruby
sinkensabe has joined #ruby
russt has quit [Quit: russt]
<havenwood>
jheg: i have mixed feelings about showing class variables. it's interesting. on the other hand if the target audience is new Rubyists i'd avoid it like the plague as a distraction that more often leads to anti-patterns than good practice.
wjimenez5271 has quit [Remote host closed the connection]
naftilos76 has joined #ruby
<havenwood>
jheg: odd your syntax highlighter lit `name` parameter in blue
apoorvpa_ has joined #ruby
rodfersou has quit [Ping timeout: 256 seconds]
<havenwood>
jheg: i'd just `person` or `other_person` instead of `person2`
natano has joined #ruby
olekenneth has quit [Ping timeout: 256 seconds]
tristanp has quit [Ping timeout: 245 seconds]
anaeem1_ has quit [Remote host closed the connection]
apoorvparijat has quit [Ping timeout: 245 seconds]
arietis_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tier has joined #ruby
rbennacer has quit [Remote host closed the connection]
bears has quit [Remote host closed the connection]
timonv_ has joined #ruby
<havenwood>
jheg: i think you might want to explain attr_accessor? that might stand out. what's your target audience or just general?
timonv_ has quit [Remote host closed the connection]
rbennacer has joined #ruby
tercenya has joined #ruby
olekenneth has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
anaeem1_ has joined #ruby
<waxjar>
hmm, what's the easiest way to split a String into multiple parts of length n?
<shevy>
regex via .split(/.{n}/) or something like that
<havenwood>
jheg: though ignore my class variable distaste, you have a nice example of how instance/class variables/methods can be used :)
fabrice31 has joined #ruby
<shevy>
no don't ignore it jheg!
<shevy>
class variables stink!!!
<shevy>
but meta variables are the @@@worst
wjimenez5271 has joined #ruby
<shevy>
I should propose them to ruby core
<waxjar>
shevy: hmm, really? don't like :p
<havenwood>
shevy: they rely on the Maybe monad
baweaver has joined #ruby
patrick99e99 has quit [Ping timeout: 255 seconds]
<shevy>
waxjar well, when do you really need a class variable?
noop has quit [Ping timeout: 264 seconds]
<waxjar>
shevy: i meant the string splitting :p
<shevy>
oh that
<shevy>
perhaps .chunks or .bytes or .chars or or .slice or something
<havenwood>
>> n = 3; 'multiple parts of length n'.scan /../
<godd2>
"This summer; havenwood is sleepy, and there's only one substance in the world that can change that. But coffee is illegal. What will he do?? Be prepared for Havenwood: The Search of More Coffee"
mozzarella has quit [Quit: WeeChat 1.0.1]
BadQuanta has quit [Quit: Leaving.]
Kricir has quit [Remote host closed the connection]
Daniel__^_^ has quit [Remote host closed the connection]
ob has quit [Max SendQ exceeded]
bahar has quit [Ping timeout: 244 seconds]
sargas has quit [Quit: This computer has gone to sleep]
ob has joined #ruby
duncannz has joined #ruby
russt has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
bahar has joined #ruby
anaeem1 has joined #ruby
Mothore has joined #ruby
DLSteve has joined #ruby
<shevy>
lol
<shevy>
what is this ... poetry with havenwood
freerobby has quit [Quit: Leaving.]
msull92 has left #ruby ["(null)"]
akaiiro has joined #ruby
<godd2>
It was supposed to be like a movie trailer thing
bears_ has joined #ruby
tgandrews has joined #ruby
rshetty has joined #ruby
mozzarella has joined #ruby
kiyote23 has joined #ruby
echevemaster has joined #ruby
goodenough has quit [Remote host closed the connection]
JBreit has joined #ruby
kaspertidemann has quit []
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkday has joined #ruby
bears_ has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
kaspertidemann has joined #ruby
plukevdh has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pu22l3r has joined #ruby
Tranquility has joined #ruby
StevenNunez has joined #ruby
<xybre>
godd2: Don't worry, I got the joke at least
rshetty has quit [Ping timeout: 265 seconds]
sigurding has joined #ruby
wallerdev has quit [Quit: wallerdev]
bears_ has joined #ruby
Xeago has joined #ruby
AlbertoCG has quit [Ping timeout: 244 seconds]
StevenNunez has quit [Remote host closed the connection]
charliesome has joined #ruby
eighthbit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has joined #ruby
mg^^ has joined #ruby
sigurding has quit [Client Quit]
mg^ has quit [Ping timeout: 272 seconds]
baweaver has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
arup_r has quit [Quit: Leaving.]
bears_ has quit [Remote host closed the connection]
adriancb has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
nfk has joined #ruby
eighthbit has joined #ruby
ohaibbq has joined #ruby
Pyrexkable has quit [Ping timeout: 264 seconds]
tristanp has joined #ruby
StephenA1 has joined #ruby
tier has quit [Remote host closed the connection]
revoohc has joined #ruby
unclouded has joined #ruby
Vile` has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
CorySimmons has joined #ruby
einarj has quit [Remote host closed the connection]
<CorySimmons>
New to programming/Ruby. Anyone know of a place where I could find some real-world exercises to practice with?
<j2p2>
you could try codewars.com
<j2p2>
codingame.com is neat too
xymbol_ has joined #ruby
Spami has joined #ruby
pietr0_ has joined #ruby
pietr0 has quit [Ping timeout: 264 seconds]
pietr0_ is now known as pietr0
xymbol has quit [Ping timeout: 250 seconds]
<CorySimmons>
j2p2: Thanks, these are perfect
tristanp has quit [Remote host closed the connection]
<j2p2>
np!
Spami has quit [Read error: Connection reset by peer]
pietr0 has quit [Remote host closed the connection]
Spami has joined #ruby
jlast has joined #ruby
adriancb has joined #ruby
lw has quit [Quit: b]
rbennacer has quit [Remote host closed the connection]
sk87 has joined #ruby
kish is now known as kish^
ta has joined #ruby
kish^ is now known as kish
boombadaroomba has quit [Remote host closed the connection]
sk87 has quit [Client Quit]
ninjazach has joined #ruby
iamjarvo has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
JohnBat26 has joined #ruby
StephenA1 has quit [Quit: StephenA1]
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
iamjarvo has quit [Client Quit]
apoorvpa_ has quit [Remote host closed the connection]
Phagus has joined #ruby
ta has quit [Ping timeout: 260 seconds]
rkday has quit [Ping timeout: 245 seconds]
<shevy>
dumdedum
fgo has quit [Ping timeout: 250 seconds]
haylon has joined #ruby
elaptics is now known as elaptics`away
Kricir has joined #ruby
decoponio has quit [Quit: Leaving...]
livathin_ has joined #ruby
Rollabunna has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
chrishough has joined #ruby
jshultz has joined #ruby
Notte has joined #ruby
postmodern has joined #ruby
charliesome has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
axelddd has joined #ruby
axelddd has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
Xeago has quit [Remote host closed the connection]
echooo has quit [Read error: Connection reset by peer]
rjc_ has quit [Quit: Konversation terminated!]
echooo has joined #ruby
timonv_ has joined #ruby
spyderman4g63 has joined #ruby
jleishman has quit [Quit: Be back later ...]
vyorkin has quit [Ping timeout: 240 seconds]
galeido has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spyderma_ has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
spyderma_ has joined #ruby
pu22l3r_ has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
n1lo has quit [Quit: Leaving]
sinkensabe has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Freelusion has joined #ruby
livathin_ has quit []
boombadaroomba has joined #ruby
spyderman4g63 has quit [Ping timeout: 252 seconds]
Freelusion has quit [Client Quit]
bears has joined #ruby
yfeldblum has joined #ruby
tristanp has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
naftilos76 has quit [Remote host closed the connection]
CorySimmons has quit [Quit: Zzz...]
ninjazach has quit [Quit: I've closed my mobile client.]
<pontiki>
CorySimmons: also try exercism.io
cpruitt has joined #ruby
phutchin1 has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
pu22l3r_ has quit [Ping timeout: 264 seconds]
straydogstudio has quit [Quit: Leaving]
gwn has joined #ruby
jordsmi has joined #ruby
jheg has joined #ruby
gwn has quit [Quit: leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jheg>
Cheers for the feedback havenwood - all noted
<jheg>
target audience I guess would be entry level like myself
mjuszczak has quit []
<jheg>
but for now it’s more a tool for me to cement my understanding of the language
ninjazach has joined #ruby
goodenough has joined #ruby
geggam has joined #ruby
<jheg>
shevy: you really think class methods should be avoided … all the time?
bears has quit [Remote host closed the connection]
gwn has joined #ruby
<Areessell>
I think he said class variables
Guest70651 is now known as tekacs
KnownSyntax has quit [Quit: Connection closed for inactivity]
Phagus has quit [Quit: leaving]
pu22l3r has joined #ruby
Xeago has quit [Remote host closed the connection]
<jheg>
ah yeah thanks Areessell you are right
<shevy>
jheg I think if you need a counter that keeps track of your classes then perhaps you need it but otherwise I am unsure why you would need a class variable
<electrical>
Hi all. When using bundler 1.7.9 i've seen a weird issue happening that a development dep is set in the lockfile while we run bundler with the --without development option ( using the Bundler::CLI.start api )
<jheg>
aye that was the only example I could think of
<shevy>
class Duck; @@total_ducklings = 0; def initialize; @@total_ducklings += 1; end; end
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
<shevy>
I've seen another example with a togglable flag
<jhass>
electrical: maybe it's pulled in by a non development dep?
mjuszczak has joined #ruby
bmoyles0117 has joined #ruby
<jhass>
see bundle help viz iirc
<electrical>
jhass: when i remove it from our own gemspec, it doesn't show up in the lockfile
<jhass>
oh
<shevy>
jheg but I once hit a bug that was because I used class variables and it was hard to track. When I saw the bug and fixed it, I had to ask myself why I was even using a @@class var in the first place. When I couldn't give a good answer to that (because I did not need it, I just used it because it was available and I read it in the pickaxe), I stopped using them
<electrical>
that's why its so weird :-)
<jhass>
yeah, I don't think (and I wouldn't expect) them to be added to the development group
Takle has quit [Remote host closed the connection]
<jhass>
you have to do that explicitly in the Gemfile
havenwood has quit [Ping timeout: 250 seconds]
devyn has quit [Quit: Lost terminal]
Jackneill has joined #ruby
devyn has joined #ruby
<electrical>
jhass: that would be add_development_dependency right? that's how we've set it
<electrical>
sorry wrong part
<electrical>
let me double check
<jheg>
yeah i guess its the same for me being new - i learn about something i end up looking for reasons TO use it rather than WHY
<shevy>
yeah
jimmyy has joined #ruby
<electrical>
jhass: sorry i was right. we call the gemspec in our Gemfile
jimmyy has quit [Max SendQ exceeded]
<electrical>
so we have a add_development_dependency
<jhass>
yes
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mloveless has joined #ruby
Shazaum has joined #ruby
<shevy>
jheg in such things it is always best to keep on using stuff and try to see whether they work or not. For instance, some people love procs, lambdas and the -> - I never found out why
<jhass>
that that would be parsed by bundler to be automatically added to the development group would be news to me
<electrical>
jhass: so when i've got that in our gemspec it does show up in the lockfile but not installed
patrick99e99 has joined #ruby
<jhass>
after all group names are pure convention
<electrical>
jhass: hmm okay
Calmoto has joined #ruby
michaeldeol has joined #ruby
fgo has joined #ruby
<jheg>
i guess i’ll find the tools that work for me in the fullness of time
AxonetBE has quit [Quit: AxonetBE]
<shevy>
:)
<pontiki>
or you'll find out how to use the tools and make them work for you :D
<atmosx>
the only promise was to finish with my exams, I did that :-P
<shevy>
atmosx I mean like big plans for the next year
<shevy>
mine is to learn C - and rails \o/
claymore has joined #ruby
<Mon_Ouie>
I thought you hated Rails with passion?
<wallerdev>
i want to make a new website in 2015
<wallerdev>
something cool
Mothore has quit [Quit: Be back later ...]
<centrx>
Rails is cool
roolo has joined #ruby
<wallerdev>
rails already has a website
ta has joined #ruby
<banisterfiend>
Mon_Ouie 'alut, where have u been recently, cornered by the world in some bolt-hole ?
Mothore has joined #ruby
codecop has quit [Remote host closed the connection]
<Mon_Ouie>
Internet issues during the week (and the university network blocks many ports, including IRC). Should be fixed from now on though :)
<Mon_Ouie>
Though the exam period is starting in a couple of weeks already
<atmosx>
shevy: Javascript and rails
<shevy>
ewwww
<atmosx>
shevy: also review math, and maybe 2 years from now pursue an MSCS
<dts|pokeball>
2
<shevy>
Mon_Ouie yeah I hate rails
<dts|pokeball>
4
LudicrousMango has joined #ruby
<atmosx>
shevy: the Georgia Tech MSCS is about 7K USD, I think I'll be able to afford it. Also I'd like to work part time (~ 20-25 hrs/week) as a ruby jr dev if I can manage... We'll see. Become better at ruby, combine JS if possible (well ruby == rails when it comes to dev jobs).
<banisterfiend>
Mon_Ouie do you take school seriously or do you spend most of your time lying in bed watching anime and sleeping through lectures?
<pontiki>
gods, that sounds like my worklife
roolo has quit [Ping timeout: 264 seconds]
Megtastique has quit []
Shazaum has quit [Quit: This computer has gone to sleep]
tristanp has joined #ruby
<atmosx>
pontiki: uh what?
tier has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<pontiki>
just laughing about how banisterfiend characterised uni life
<shevy>
atmosx what is that? in the USA?
<atmosx>
shevy: yes
<atmosx>
pontiki: aah nice :-)
<Mon_Ouie>
banisterfiend: No, I actually attend the lectures and listen
Shazaum has joined #ruby
<shevy>
why not study in greece!!!!
ninjazach has joined #ruby
<shevy>
;-D
<banisterfiend>
Mon_Ouie nerd
dts|pokeball has quit [Read error: Connection reset by peer]
dts|pokeball has joined #ruby
dts|pokeball has quit [Read error: Connection reset by peer]
<atmosx>
shevy: because I'll have to give the same amount of money. Having a degree from Georgia Tech is way better...
<atmosx>
everything is reversed in Greece, you pay taxes (extremely large % of taxes the last 7 years) while the state-services are getting worst and worst.
plukevdh has joined #ruby
<atmosx>
rubyonrailed: hash returned by json are a mess usually...
dts_ has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
Prometheian has quit [Remote host closed the connection]
duncannz has joined #ruby
dts_ has left #ruby [#ruby]
snath has quit [Ping timeout: 240 seconds]
snath has joined #ruby
claymore has quit [Quit: Leaving]
revoohc has quit [Quit: revoohc]
freerobby has quit [Quit: Leaving.]
dfinninger has quit [Remote host closed the connection]
bryanmagalski has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
bryanmagalski has quit [Client Quit]
duncannz has joined #ruby
Xiti has quit [Quit: Xiti]
bmags73 has joined #ruby
sargas has joined #ruby
<shevy>
atmosx hehe
<pontiki>
rubyonrailed: the simple thing to do is run your JSON string through JSON.parse to see what the ruy data structure would look like
<pontiki>
ruby*
reinaldob has quit [Ping timeout: 250 seconds]
sfr^ has quit [Excess Flood]
cschneid has quit [Ping timeout: 258 seconds]
mjc_ has quit [Ping timeout: 258 seconds]
<rubyonrailed>
pontiki: Thanks i'll look into it
ob has quit [Max SendQ exceeded]
ob has joined #ruby
terrellt has quit [Ping timeout: 258 seconds]
TgMts_ has joined #ruby
echooo1 has joined #ruby
mjc_ has joined #ruby
<pontiki>
you'll probably discover what you wrote isn't valid JSON, though :D
sfr^ has joined #ruby
duncannz has quit [Ping timeout: 258 seconds]
JaTochNietDan has quit [Ping timeout: 258 seconds]
crdpink2 has joined #ruby
crdpink has quit [Read error: Connection reset by peer]
ob has quit [Max SendQ exceeded]
wookiehangover has quit [Ping timeout: 258 seconds]
ob has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubyonrailed>
pontiki: I have figured that out... What is wrong with it?
duncannz has joined #ruby
cschneid has joined #ruby
yo61 has quit [Ping timeout: 258 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Megtastique has joined #ruby
terrellt has joined #ruby
beef-wellington has quit [Ping timeout: 250 seconds]
wookiehangover has joined #ruby
TgMts has quit [Ping timeout: 258 seconds]
_mtr has quit [Ping timeout: 255 seconds]
_beechnut has quit [Quit: Leaving.]
<pontiki>
JSON is a String representation of data
yo61 has joined #ruby
<pontiki>
the keys need to be strings
JaTochNietDan has joined #ruby
_beechnut has joined #ruby
_beechnut has quit [Client Quit]
bears_ has joined #ruby
<pontiki>
the second internal object containing "NUMBERS" is not attached to anything
jheg has quit [Quit: jheg]
echooo has quit [Ping timeout: 258 seconds]
Soliah has quit [Quit: Soliah]
maletor has joined #ruby
<canton7>
the official website helpfully has a number of easy-to-follow flow diagrams, just to make it even simpler! http://www.json.org/
<Areessell>
Yeah, RTFM is not just advice, but a way of life
rkday has quit [Ping timeout: 245 seconds]
dopie has quit [Ping timeout: 252 seconds]
<shevy>
BTFMS!
<shevy>
but the ... manual sucks!
<canton7>
it's one of the clearest "manuals" I've ever read, that one
<canton7>
they pioneered the flow-diagram-as-syntax thing
tristanp has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
<Areessell>
..What?
axelddd has joined #ruby
<pontiki>
did they??
<frem>
No. No, they did not.
<shevy>
looks like | pipe | instructions on that website
<Areessell>
Absolutely not haha
<canton7>
ok, they're the first people I saw using it
<shevy>
did you guys just IRC downvote canton7
axelddd has quit [Read error: Connection reset by peer]
<pontiki>
i didn't think JSON had been around that long
bears_ has quit [Remote host closed the connection]
<canton7>
looks like I'm wrong :P
* shevy
upvotes canton7!!!
<canton7>
I've only ever seen those flow diagram thingies on json.net and sqlite though
<pontiki>
no, shevy , that looks like this: canton7--
<shevy>
oh yes, that is the better syntax
<frem>
There are flow diagrams in compiler textbooks, too.
<Areessell>
↓
<shevy>
how did they create these graphics on json.org?
<pontiki>
i remember them in ancient proprietary tech manuals
dc has quit [Ping timeout: 258 seconds]
<shevy>
hehe
wjimenez5271 has quit [Remote host closed the connection]
ht__th has quit [Remote host closed the connection]
<eam>
I just encountered a likely jruby/Timeout socket leak this morning and then this afternoon I'm reviewing a error handling recommendations doc and I find use of Timeout recommended
<eam>
today is dedicated to timeout
jobewan has joined #ruby
fgo has joined #ruby
<eam>
or hopefully soon lack thereof
geggam has quit [Ping timeout: 264 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
giuseppesolinas has joined #ruby
agjacome has quit [Quit: leaving]
it0a has quit [Ping timeout: 264 seconds]
<headius>
eam: what doc is that?
iamayam has quit [Ping timeout: 264 seconds]
<headius>
the sad truth is that there's no alternative to Timeout because none of the blocking methods you call accept timeout values
<headius>
my recommendaiton would be a nonblocking IO + select loop rather than Timeout
kaspertidemann has quit []
<eam>
headius: some internal doc, and agreed - that's what I'm changing it to
<headius>
cool
<headius>
change the doc too :-)
jlast has quit [Remote host closed the connection]
<eam>
yup! (and citing your article for detail)
livingstn has quit []
<headius>
excellent
jlast has joined #ruby
iamayam has joined #ruby
user083 has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
jobewan has quit [Quit: Leaving]
CrazyM4n has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]