krainboltgreene has quit [Quit: Computer has gone to sleep.]
thomasfedb has joined #ruby
<A124>
Not sure, but it looks like the one returns class object and the latter instance ?
generalissimo has quit [Remote host closed the connection]
alexim has quit [Quit: sleep]
etcetera has quit [Ping timeout: 256 seconds]
<jasonthesensei>
@A124 I need to know if the cursor is inside a class or an id on an html doc and append either the class or the id using IO to a seperate css file
<freq47>
sorry get is a method, self.class.get () AND self.get()
nfk has joined #ruby
Jedi_SCT1 has joined #ruby
nik_-_ has quit [Quit: nik_-_]
<realDAB>
freq47: it's clear that get is a method (there's nothing else it could be). the difference is that you're sending the message 'get' to different objects.
br4ndon has joined #ruby
<A124>
jasonthesensei: I'm sorr I could not help Automating user input with Ruby is not for me. Also you are unspecific
<realDAB>
freq47: except for one edge case where self and self.class are the same object but never mind that :-)
etcetera has joined #ruby
<jasonthesensei>
thanks figured it out i think
MehLaptop has joined #ruby
razibog has quit [Ping timeout: 264 seconds]
<A124>
Anyone could recommend any small footprint DB with simple but indexed querries?
br4ndon_ has quit [Ping timeout: 264 seconds]
dEPy has quit []
<freq47>
ok, thanks
<freq47>
just was reading some source code and was wondering
justsee has quit [Quit: Leaving...]
Yakko has quit [Remote host closed the connection]
tspike has quit [Ping timeout: 246 seconds]
yshh has quit [Remote host closed the connection]
Washu has left #ruby [#ruby]
wmoxam has quit [Quit: leaving]
skattyadz has quit [Quit: skattyadz]
heliumsocket has joined #ruby
Guest31807 has quit [Quit: Leaving]
kofno has joined #ruby
pkrnj has joined #ruby
h4mz1d has joined #ruby
j^2 has quit [Ping timeout: 256 seconds]
nga4 has quit [Ping timeout: 248 seconds]
poga has quit [Remote host closed the connection]
skattyadz has joined #ruby
pdamer has joined #ruby
Vektur has quit []
ckrailo_ has joined #ruby
nateberkopec has joined #ruby
cyberflux has joined #ruby
cr3 has joined #ruby
justin1 is now known as w|t
w|t has quit [Changing host]
w|t has joined #ruby
crodas has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
crodas has quit [Read error: Connection reset by peer]
fschuindt has joined #ruby
emmanuelux has quit [Remote host closed the connection]
jdunck has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 264 seconds]
endzyme_ has joined #ruby
splud has quit [Quit: splud]
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
lupinstien has quit [Ping timeout: 252 seconds]
miso1337 has quit [Quit: afk]
<A124>
cr3: Anyway.. do you know of some nice DB for Ruby?
<A124>
Smaller, simple records, up to milion of them, simple querry aka search
ezkl has joined #ruby
Rioji has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
Xeago has quit [Remote host closed the connection]
<cr3>
A124: I haven't used ruby much yet, what about sqlite?
endzyme has quit [Ping timeout: 245 seconds]
bricker is now known as bricker`work
mneorr_ has quit [Read error: Connection reset by peer]
h4mz1d has joined #ruby
<A124>
cr3: Yeah That sucks. :D
mneorr has joined #ruby
aLeSD_ has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
xpen has joined #ruby
endzyme_ has quit [Ping timeout: 272 seconds]
<A124>
cr3: I used many just forgot.. anyway MongoDB is cool, but the one that I was waiting for and is ready pretty now is ArangoDB (formely AvocadoDB)
aLeSD_ has joined #ruby
axhlf has quit [Remote host closed the connection]
S3kx has quit [Read error: Connection reset by peer]
Davey has quit [Quit: Computer has gone to sleep.]
<cr3>
A124: why does sqlite suck? if you're only talking about a million records, that should fit easily in memory, no?
S3kx has joined #ruby
pdamer has joined #ruby
<A124>
cr3: Yah. But it's SQL
<A124>
I'll give it a try though.
<cr3>
A124: it's simple, practical if you don't want to setup a whole service
<A124>
cr3: Distributed file management system. But for the other one I'll need better. I made myself one. Got lost 14days of work, thanks to unreliableservice provider
<fragmachine>
FPSDavid: flowcharts, UML diagrams, psuedo code. Better not let the students write too much code!
dhruvasagar has joined #ruby
<fragmachine>
They might learn!
mahmoudimus has joined #ruby
theRoUS has joined #ruby
mneorr has quit [Remote host closed the connection]
xpen has quit [Remote host closed the connection]
sambao21 has joined #ruby
tvw has quit []
<A124>
tubbo: Better recommend me some small DB?
<tubbo>
A124: it's called flat files
<tubbo>
use 'em
<tubbo>
#realunixhackers
<A124>
tubbo: No querry support
<tubbo>
A124: build it
<tubbo>
come on
<A124>
I did
<tubbo>
yu're smarter than that
crodas has quit [Ping timeout: 245 seconds]
<tubbo>
alright then
<tubbo>
:D
<A124>
Fail
<A124>
...
<tubbo>
well g/j i applaud you
justsee has quit [Quit: Leaving...]
<tubbo>
<3 <3 <3
<tubbo>
look here's the deal
<A124>
But thanks to "reliable" service provider I lost 14 days of work on it
fmcgeough has quit [Quit: fmcgeough]
<A124>
So.. I'm looking for somthing done already now
crodas has joined #ruby
Mattix has joined #ruby
<A124>
And if I'd like to have the whole prototype alpha running today (not slept yet) I'l better use sth existing
<tubbo>
i'm a big fan of postgres honestly
<A124>
I'm not a fun of SQL ^^
<A124>
*fan
<tubbo>
sql is fun! ;)
<tubbo>
(nah it's not)
sam113101 has quit [Quit: WeeChat 0.3.8]
<tubbo>
well i usually use an ORM so i'm not really writing SQL all that often
<A124>
If you show me some good connector / driver / gem, etc. for it, then it might
<tubbo>
i've also used mongo
<tubbo>
A124: active_record lol
<A124>
Yeah, I'd like Arango
<tubbo>
i used mongoid, it was pretty nice
<A124>
But Gotta compile it and not sure about windows
<tubbo>
well fuck windows
<A124>
Yep mongo is nice
<tubbo>
get a better os
<tubbo>
;)
<A124>
The thing is.. the client should be WIN
Voodoofish430 has quit [Quit: Leaving.]
<A124>
Did I said I have Win? no
<tubbo>
;D
<A124>
Have I said I'm doing for myself? no
<tubbo>
hmm, that's a good question actually
<tubbo>
never tried to compile mongo on windows
<A124>
But I might make it centralized as processing.
<A124>
Mongo on Win is ok. Not sue about Arango
<tubbo>
though i gotta believe there's some way to integrate a small queryable key/value store in an app
<A124>
Yeah That is 100 lines of code for me including compresstion
<tubbo>
i don't know what arango is
etcetera has quit []
<tubbo>
i thought it was a lib for mongo or something
<A124>
ArangoDB
pkrnj has joined #ruby
<A124>
Look it up ;)
NiteRain has joined #ruby
<ddd>
FPSDavid: hehe my college is using Java, C, C++ as well. Have to take a Computational Thinking class as I just went back to college for my degree, and its all flowcharts and pseudocode
<tubbo>
A124: "For Windows users: We provide an installer script on our download page."
<A124>
tubbo: Can you recomment a mean of getting data from one point to other with Ruby? Ie one comp to another? .. So I can just agther data and do the work on server? .. Which would give me more power and optimizaiton
<tubbo>
yeah i just searched for "arango" lol that's why i didn't find it
<ddd>
i've been turning in pseudo java :)
etcetera has joined #ruby
<tubbo>
A124: oh yeah, i mean...most of the drivers support server-to-server communication. you could just run an ArangoDB on a server and connect toi
<tubbo>
to it*
<A124>
It is formely AvocadoDB
<A124>
I was with it from the forming of language and concepts. So I know how it works and I may say it's awesome
<A124>
tubbo: I meant. Ruby to Ruby, not including DB
quazimodo has joined #ruby
Domon has joined #ruby
FullTiltProspect has joined #ruby
j^2 has quit [Ping timeout: 245 seconds]
<A124>
But filling the DB with data isn't bad idea. Then I can process and let the client retrieve it from DB lol
cburyta has joined #ruby
generalissimo has quit [Remote host closed the connection]
yashshah has quit [Read error: Connection reset by peer]
cburyta has quit [Remote host closed the connection]
fschuind_ has joined #ruby
mikepack has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
DrCode has quit [Remote host closed the connection]
yashshah has joined #ruby
willob has quit [Ping timeout: 256 seconds]
cburyta has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
pepper_chico has quit [Quit: Computer has gone to sleep.]
danman has joined #ruby
DrCode has joined #ruby
Honeycomb has quit [Quit: Leaving.]
Honeycomb has joined #ruby
sleetdrop has joined #ruby
<A124>
tubbo: Not sure how But I had to be blind to overlook Sequel
sam113101 has joined #ruby
cburyta has quit [Ping timeout: 260 seconds]
_maes_ has joined #ruby
bgcoup has joined #ruby
thinkclay has joined #ruby
FullTiltProspect has quit [Quit: FullTiltProspect]
chenwei767 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
thinkclay has quit [Client Quit]
toekutr has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
jbueza has joined #ruby
heliumsocket has joined #ruby
_nitti has joined #ruby
boontdustie has joined #ruby
<defaultro>
i found .ruby.bin string in /var/cache/yum/i386/6/base/2378969423fe43298ab23432ef-primary.sqlite
riffraff169 has quit [Remote host closed the connection]
<billy_ran_away>
Is there a slick way to either a. add an element to an array but have that newly added element returned or b. only have an item added to an array IF it's not already in it?
alexim has quit [Quit: bye]
justsee has joined #ruby
mikepack has quit [Remote host closed the connection]
justsee has quit [Client Quit]
zeade has quit [Quit: Leaving.]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
pdamer has joined #ruby
ebobby has quit [Ping timeout: 246 seconds]
kofno has quit [Remote host closed the connection]
Takehiro has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
nfk has quit [Quit: yawn]
robbyoconnor has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Ping timeout: 255 seconds]
<danneu>
billy_ran_away: you want a Set
<danneu>
billy_ran_away: Set.new
<danneu>
require 'set'
<billy_ran_away>
danneu Awesome thanks!
justsee has quit [Quit: Leaving...]
etcetera has joined #ruby
<danneu>
billy_ran_away: Sets do the whole 'only add if it's not in there' thing for you. (Set.new << 4 << 4 << 4) will only be a collection with element 4.
<billy_ran_away>
danneu: That's awesome, reading the methods now! You're right, this is perfect!
etcetera has quit [Client Quit]
justsee has joined #ruby
xpen has joined #ruby
LiquidInsect has quit [Remote host closed the connection]
Thoma____ has joined #ruby
<danneu>
billy_ran_away: if you hadn't known about sets, you could sorta recreate the functionality with Array#uniq. (array << 4 << 4; array.uniq ;=> [4])
<danneu>
but yeah, not so slick
<billy_ran_away>
danneu: Yea that was my plan C : )
<danneu>
or, even worse, (array << 4 unless array.include?(4))
butblack has joined #ruby
<danneu>
as i would write when i was a ruby noob :(
rismoney has quit [Read error: Connection reset by peer]
pepper_chico has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
dallasm has quit [Remote host closed the connection]
timonv has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
mafolz has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
hasimo has quit [Remote host closed the connection]
tay1 has quit []
Davey has quit [Quit: Computer has gone to sleep.]
tay1 has joined #ruby
arturaz has joined #ruby
tomku has quit [Ping timeout: 240 seconds]
tay1 has left #ruby [#ruby]
r0bby_ has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
mercwithamouth has joined #ruby
sayan has joined #ruby
fragmachine has quit [Remote host closed the connection]
dogweather has quit [Remote host closed the connection]
aapzak has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
idoru has quit [Ping timeout: 608 seconds]
danneu has quit [Ping timeout: 252 seconds]
filipe has joined #ruby
nari has quit [Ping timeout: 245 seconds]
rezzack has quit [Quit: Leaving.]
aapzak has joined #ruby
Takehiro has quit [Remote host closed the connection]
bubblehead has quit [Remote host closed the connection]
idoru has joined #ruby
oposomme has joined #ruby
mneorr has joined #ruby
opioids38 has joined #ruby
hasimo has joined #ruby
timonv has quit [Remote host closed the connection]
<Fuzai>
Is there anything in Ruby that allows someone to easily simulate server side includes from an HTTP server? i'm using evma_httpserver and I've got a html / js template I would like to easily add dymanic information too
quazimodo has quit [Ping timeout: 256 seconds]
nari has joined #ruby
Morkel_ has joined #ruby
mikekelly has quit [Ping timeout: 245 seconds]
Morkel has quit [Ping timeout: 260 seconds]
Morkel_ is now known as Morkel
<Fuzai>
I'm not using rails, i'm using ruby w/eventmachine
mikekelly has joined #ruby
danneu has joined #ruby
linoge has joined #ruby
toekutr has quit [Remote host closed the connection]
carraroj has joined #ruby
cyong has quit [Quit: Leaving.]
ryanf has quit [Quit: leaving]
lemonsparrow has quit [Ping timeout: 245 seconds]
babinho_ is now known as babinho
Takehiro has joined #ruby
wallcloc_ has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 264 seconds]
mneorr has quit [Read error: Connection timed out]
apeiros_ has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
mneorr has joined #ruby
<Fuzai>
nm i think i figured out a solution
whitedawg has joined #ruby
<wiiw>
sinatra?
puppeh has quit [Read error: Connection reset by peer]
<danneu>
padrino!
mercwithamouth has quit [Quit: Lost terminal]
VinceThePrince has joined #ruby
a_a_g1 has quit [Quit: Leaving.]
puppeh has joined #ruby
<Fuzai>
Nope, i figured i could just add a <script> tag and include a dymanically generated js file
hbpoison has quit [Read error: Connection reset by peer]
<apeiros_>
$: is $LOAD_PATH. used by require and load.
<wiiw>
o
<Hanmac>
i know why i have PHP!!! .... $this->func()["key"]; does not work, but $data = $this->func();$data["key"]; does ???? can someone explain me WHY?¿
<hemanth>
yes, aware of that, but $*,$>,$< so on....what are they called as whole?
<apeiros_>
Hanmac: they *still* have not fixed that? o0
<apeiros_>
hemanth: globals
<hemanth>
apeiros_, :) oh yeah
<Hanmac>
apeiros_ when was the last time php fixes something? :P
timonv has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection reset by peer]
douglarek_ has joined #ruby
mneorr has joined #ruby
wiiw has quit [Quit: Lost terminal]
mneorr has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
axhlf has joined #ruby
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
<xeviox>
any ideas, how I can get the modify date of a remote file over http?
mneorr has joined #ruby
<apeiros_>
it's in the header. but only if the server sends it.
mneorr has quit [Read error: Connection reset by peer]
anderse has joined #ruby
<xeviox>
hmm
<apeiros_>
i.e., no reliable way. may work for one site, and not for another.
<xeviox>
ok thanks
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
thebastl has quit [Ping timeout: 245 seconds]
mikekelly has quit [Ping timeout: 245 seconds]
anderse has quit [Client Quit]
mvangala_ has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
mvangala has joined #ruby
adambeynon has joined #ruby
mneorr has joined #ruby
mikekelly has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
ner0x has quit [Quit: Leaving]
mneorr has joined #ruby
stetho has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
hasimo has quit [Remote host closed the connection]
mulinux has quit [Quit: mulinux]
mneorr has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
mneorr has quit [Read error: Connection reset by peer]
<hemanth>
>>"".crypt('')
opioids38 has quit [Ping timeout: 260 seconds]
<hemanth>
>> "".crypt('')
<eval-in>
hemanth => /tmp/execpad-276ead549091/source-276ead549091:2:in `crypt': salt too short (need >=2 bytes) (ArgumentError) ... (http://eval.in/12681)
mneorr has joined #ruby
duosrx has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
<apeiros_>
hemanth: please restrict your use of eval-in to demonstration purposes. you have irb (or pry) on your machine. use that.
yashshah has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
<hemanth>
apeiros_, roger that
mneorr has joined #ruby
opioids38 has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
nomenkun_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
apod has quit []
mneorr has quit [Read error: Connection reset by peer]
lewix_ has quit [Remote host closed the connection]
<Amnesia>
hoelzro: port = rand(65335)
<hoelzro>
interesting
<hoelzro>
wait, why a random port?
ozgura has quit [Read error: Connection reset by peer]
<Amnesia>
just as a test, I had 8080:)
ozgura has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
aaronmcadam has joined #ruby
Thina_02 has left #ruby [#ruby]
<Amnesia>
hoelzro: I'm sure it's not in the TIME_WAIT stage..
jayne_ is now known as jayne
<hoelzro>
Amnesia: I think netstat would help you out there
VinceThePrince has quit [Ping timeout: 272 seconds]
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
<Amnesia>
that's what I'm using:)
Zai00 has joined #ruby
<Amnesia>
btw, the app doesn't fail, the warning's just printed
eka has joined #ruby
uris has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
acoopr has joined #ruby
acoopr has left #ruby [#ruby]
rickmasta has joined #ruby
yacks has joined #ruby
HomoSapiens has joined #ruby
<HomoSapiens>
simply implementing
<Amnesia>
?
gyre007 has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
nari has joined #ruby
<Hanmac>
apeiros_: maybe i have different property classes like IntProperty, FontProperty and others ... would you like to expect the classes as FontProperty or as Property::Font with maybe magic inside const_hidden?
Demux has quit [Ping timeout: 240 seconds]
one has quit []
<JonnieCache>
const_hidden?
<JonnieCache>
do you mean const_missing?
hasimo has joined #ruby
jurassic has joined #ruby
xpen has quit [Remote host closed the connection]
<Hanmac>
yeah that what i meand, but i think apei understand me
Demux has joined #ruby
<apeiros_>
Hanmac: I almost always prefer explicit over implicit
<apeiros_>
but blanket calls like theses are difficult/impossible
<Hanmac>
currently i need to make an class for each Property type ... i thought it can be better with const missing
<apeiros_>
why do you need separate classes?
<apeiros_>
i.e., why not a single Property class?
j0hnny_ has joined #ruby
<apeiros_>
btw. shevy, you asked me when I'd ever do `class Foo; class Bar` - Hanmac's problem might be such a case. i.e. have a generic `Property` class and derived specialized `Property::Foo` classes
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
LouisRoR has quit [Ping timeout: 246 seconds]
LouisRoR has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
Banistergalaxy has quit [Ping timeout: 260 seconds]
gyre007 has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
gyre007 has joined #ruby
<maetthew>
I'm trying to install the gem Cairo but I'm getting an error that I cannot comprehend. Anyone got any ideas what I'm supposed to do? https://gist.github.com/maetthew/5160346
gyre007 has quit [Remote host closed the connection]
berserkr has joined #ruby
xeviox has left #ruby ["Verlassend"]
Neandre has joined #ruby
ferdev has joined #ruby
<Hanmac>
maetthew did you use some precompiled stuff?
<maetthew>
Hanmac, hmm no I think not
lkba has joined #ruby
francisfish has joined #ruby
<maetthew>
why? :p
<Amnesia>
hoelzro: think it
<Amnesia>
's a bug in webrick
<hoelzro>
neat
<hoelzro>
maetthew: it seems you're trying to link a 64-bit and 32-bit binary together
<maetthew>
hoelzro, hmm ok. This is above my competence :) Any ideas?
jmeeuwen has quit [Ping timeout: 256 seconds]
<hoelzro>
well, what does file /usr/local/lib/libfreetype.6.dylib output?
<maetthew>
hoelzro, hmm what do you mean? I can't "cat" that file
<hoelzro>
maetthew: run 'file' on it
<hoelzro>
file /usr/local/lib/libfreetype.6.dylib
<hoelzro>
.oO(maybe I should've put the command in quotes)
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
Takehiro has quit [Remote host closed the connection]
quazimodo has joined #ruby
swarley- has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
rickmasta has quit [Quit: Leaving...]
swarley| has quit [Ping timeout: 276 seconds]
swarley| has joined #ruby
averiso has quit [Quit: Computer has gone to sleep.]
hamed_r has quit [Quit: Leaving]
swarley- has quit [Ping timeout: 264 seconds]
br4ndon has joined #ruby
beiter has joined #ruby
<Hanmac>
apeiros_ i have a question about Ruby + C++ and refernces ... maybe you have an object that has an attribute color like obj.color ... and this Color Object has attributes for the parts like color.red ... so what whould happen if i call obj.color.red *=2 ... it change the returned colour object but should that afffect the color object inside obj too?
swarley- has joined #ruby
ferdev has quit [Read error: Connection reset by peer]
sbusborg has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
t_kjaergaard has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
kofno has joined #ruby
himsin has quit [Remote host closed the connection]
t_kjaergaard has left #ruby [#ruby]
_64k has joined #ruby
himsin has joined #ruby
swarley| has quit [Ping timeout: 260 seconds]
nkr has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
jpfuentes2 has joined #ruby
realDAB has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Atrophius has quit [Quit: Leaving]
blackshirt has joined #ruby
swarley- has quit [Ping timeout: 245 seconds]
stetho has quit [Quit: stetho]
bluOxigen has joined #ruby
<apeiros_>
Hanmac: I have no experience with C++ bindings, sorry
razibog has joined #ruby
<apeiros_>
Hanmac: as for your problem - I think same rules as with plain ruby apply
daniel_hinojosa has quit [Quit: Leaving.]
<Hanmac>
the problem: they give it to me as an color& type ... ruby cant use them , i need an color* ... so i make an heap-copy ... but that means "obj.color.red *=2" cant work anymore :(
hbpoison has joined #ruby
maxmanders has quit [Ping timeout: 256 seconds]
daniel_- has joined #ruby
ferdev has joined #ruby
HomoSapiens has quit [Remote host closed the connection]
mockra has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
bubblehead has joined #ruby
yashshah has joined #ruby
hybris has joined #ruby
h8R has quit [Ping timeout: 260 seconds]
mockra has quit [Ping timeout: 256 seconds]
hashmal has quit [Quit: Computer has gone to sleep.]
wreckimnaked has quit [Ping timeout: 264 seconds]
ArchBeOS has joined #ruby
pskosinski has joined #ruby
<shevy>
guys
<shevy>
I see code from someone else
blackshirt has left #ruby [#ruby]
<shevy>
in a method, it is these 3 lines:
<shevy>
password = $stdin.gets
<shevy>
password.chomp! if password
<shevy>
password
<apeiros_>
psssssh, I have a secret! I can see dead code!
<shevy>
am I right in believing that the .chomp there could be put on the first line where .gets happens?
<apeiros_>
shevy: no
<apeiros_>
gets returns nil upon EOF
<shevy>
aaaah
<apeiros_>
and the given code handles that by returning nil itself
<shevy>
I see I see, thanks, I would have had a wrong assumption :)
<shevy>
Hanmac admit it, you just like to make code complicated :P
<apeiros_>
realDAB: ^
<apeiros_>
but yes, a) chomp, b) only case where that matters is where you'd want the nil anyway
grahtseeeh has joined #ruby
Virunga has quit [Remote host closed the connection]
* realDAB
's taste would probably run to .to_s.chomp
vincent_ has quit [Quit: Leaving]
vincent_ has joined #ruby
<apeiros_>
same
<charliesome>
i reckon we need &&.
bonhoeffer has joined #ruby
* Hanmac
is now creating classes with strings ... i am a bad person?
ThePicard has joined #ruby
<realDAB>
Hanmac: can you give an example?
<realDAB>
Hanmac: before we make any hasty conclusions about whether you're a good or bad person :-)
SECURITI has quit [Quit: SECURITI]
<apeiros_>
charliesome: nobu suggested ?. about 6y back
<apeiros_>
errr, .?
<charliesome>
i could get behind that
<apeiros_>
I'd love to have syntax for abort-on-nil
angusiguess has quit [Ping timeout: 252 seconds]
<apeiros_>
only ugly cases - symbolic methods
mmitchell has joined #ruby
<apeiros_>
a.?+(b)
<Hanmac>
realDAB: registerProperty<wxPropertyCategory>(rb_mWX,"CategoryProperty"); this piece of code creates an class named "CategoryProperty" in module WX, and assign the wxClassInfo of wxPropertyCategory to it, so WX::CategoryProperty.new creates an wxPropertyCategory
<apeiros_>
hash.?[key]
<charliesome>
activesupport's try is pretty cool
<charliesome>
but using it with aref is annoying as hell
<apeiros_>
it's not syntax and can't short-cut
<charliesome>
foo.try(:[], bar) is lame
ExxKA has joined #ruby
<charliesome>
i want foo.try[bar]
<apeiros_>
also fugly
kornnflake_zzz is now known as kornnflake
eka has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
why didn't they implement that actually? should be possible to do
<apeiros_>
class NilClass; def try(name=nil, *); name ? nil : TryProxy; end; end
mmitchell has quit [Remote host closed the connection]
emergion has joined #ruby
<apeiros_>
class Object; def try(name=nil, *args); name ? send(name, *args) : self; end; end
* apeiros_
wonders whether he blindsided a dozen use-cases
iaj has quit [Remote host closed the connection]
khismetix has joined #ruby
hybris has quit [Read error: Connection reset by peer]
iaj has joined #ruby
_whitelogger has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
yshh has quit [Remote host closed the connection]
v0n has joined #ruby
palyboy has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
d34th4ck3r has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
martynas has joined #ruby
mmitchell has joined #ruby
martynas is now known as Guest34045
khismetix has quit [Quit: Computer has gone to sleep.]
Guest34045 has left #ruby [#ruby]
skattyadz has joined #ruby
LouisRoR has quit [Ping timeout: 252 seconds]
tyebud1 has joined #ruby
<tyebud1>
Hey ruby, I've been getting the following - `ArgumentError: invalid byte sequence in UTF-8` when I try to run rails, bundle, or rake in certain projects. Any ideas where I could start troubleshooting? Thanks
IrishGringo has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
<shevy>
tyebud1 should be a problem related to encoding
ferdev has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
d34th4ck3r is now known as sad
skattyadz has quit [Ping timeout: 252 seconds]
sad is now known as d34th4ck3r
hemanth has joined #ruby
duosrx has quit [Read error: No route to host]
jamesfung14 has quit [Ping timeout: 245 seconds]
duosrx has joined #ruby
<tyebud1>
I got that far, but there's been no change in any files in the project
<_bart>
Looks pretty cool, but how do I parse all the 'xpath=//meta' tags?
<tyebud1>
So is there anything I can do to troubleshoot? The error is so cryptic
predator117 has joined #ruby
Adys has quit [Quit: No Ping reply in 90 seconds.]
Adys has joined #ruby
<_bart>
Ah figured out this works too: xpath: '//meta[@name="description"]/@content'
realDAB has quit [Quit: realDAB]
niklasb has quit [Ping timeout: 252 seconds]
<JonnieCache>
xpath is great
whowantstolivefo has joined #ruby
whowantstolivefo has quit [Client Quit]
duosrx has quit [Remote host closed the connection]
<JonnieCache>
xpath is the correct answer to "how do i parse xml with regular expressions"
whowantstolivefo has joined #ruby
angusiguess has joined #ruby
_64k has quit [Quit: leaving]
<shevy>
tyebud1 dunno, encoding is annoying as hell. try to use a magic comment in those files
crodas has quit [Ping timeout: 272 seconds]
<shevy>
tyebud1, you could try to use # Encoding: ASCII-8BIT
geekbri has joined #ruby
<shevy>
that way I got ruby to shut up in like 90% of the cases
slainer68 has quit [Remote host closed the connection]
<shevy>
back in my 1.9.x days
evenix has joined #ruby
Virunga has joined #ruby
<tyebud1>
But the problem is, it's entire rails applications that worked the day before I started seeing the error
<shevy>
use 1.8.x
<shevy>
:)
<tyebud1>
haha
<tyebud1>
Welp, I guess I'll do that :)
<JonnieCache>
tyebud1: is there really nothing thats changed from yesterday?
<tyebud1>
Nothing
chenwei767 has joined #ruby
<JonnieCache>
hmm
sbusborg is now known as sbus_afk
<shevy>
tyebud1, well, encoding is annoying BUT with the ASCII-8BIT things should mostly work... if not, perhaps external files are read in with another encoding
<JonnieCache>
yeah it could be to do with input to the app
<JonnieCache>
it doesnt have to be the source files
<shevy>
like via File.open or .readlines or perhaps YAML.load_file
<Spooner>
_bart, Wombat looks nice as a wrapper for mechanize. I might use it myself.
<shevy>
yeah
<shevy>
what JonnieCache said :)
<tyebud1>
It's actually happening with an octopress project too
os__ has joined #ruby
teamon has joined #ruby
<shevy>
tyebud1 think of encoding as a monster. it wants to leap at you... put it into a prison
<_bart>
Spooner: recommend it, the documentation is a bit short though
chenwei767 has quit [Max SendQ exceeded]
chenwei767 has joined #ruby
crodas has joined #ruby
monkegjinni has joined #ruby
banisterfiend has quit [Remote host closed the connection]
mockra has joined #ruby
banisterfiend has joined #ruby
evenix has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
<Spooner>
_bart, I've mainly had to scrape with Watir/Headless though, because of needing to run Javascript, so it isn't as useful as it might be :D
jbueza has quit [Quit: Leaving.]
khismetix has joined #ruby
Banistergalaxy has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
Al_ has quit [Quit: Al_]
ML_BMT has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
mockra has quit [Ping timeout: 256 seconds]
kornnflake is now known as kornnflake_zzz
LouisRoR has joined #ruby
davetherat has quit [Remote host closed the connection]
nfk has joined #ruby
davetherat has joined #ruby
DarkAce-Z has joined #ruby
pskosinski has quit [Remote host closed the connection]
DarkAceZ has quit [Ping timeout: 252 seconds]
dawkirst has quit [Read error: Connection reset by peer]
<_bart>
Spooner: Ah alright, I use CutyCapt, for screenshooting massive amounts of pages. I tried Watir/Selenium but it isn't so powerful
os__ has quit [Ping timeout: 264 seconds]
heliumsocket has joined #ruby
<Spooner>
_bart, I don't want screenshots though, just scrapes.
banisterfiend has joined #ruby
<Spooner>
_bart, But it really depends on what people need me to do, so I'll bear CutyCapt in mind.
wmoxam has joined #ruby
solidoodlesuppor has joined #ruby
pskosinski has joined #ruby
<_bart>
Spooner: Yeah, it's a tough business ;)
bubblehead has quit [Read error: Connection reset by peer]
<Hanmac>
maetthew no i mean the C lib, with header
hemanth has quit [Read error: Connection reset by peer]
br4ndon has quit [Ping timeout: 255 seconds]
<JonnieCache>
maetthew: youll want to install it through your OS's package manager
<JonnieCache>
its not a ruby thing
vlad_starkov has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
hemanth has joined #ruby
soc42 has quit [Remote host closed the connection]
whitedawg has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
jpcamara has joined #ruby
MrZYX|off is now known as MrZYX
martxel has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
blueOxigen has joined #ruby
krawchyk has joined #ruby
krandi has quit [Ping timeout: 246 seconds]
martxel has joined #ruby
trewe has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
miso1337 has quit [Quit: afk]
yshh has joined #ruby
danslo has joined #ruby
martynas has joined #ruby
johnnygoodmancpa has joined #ruby
martynas is now known as Guest91202
d34th4ck3r has quit [Ping timeout: 240 seconds]
<maetthew>
JonnieCache; Hanmac: What are these "dev" files? I tried installing libxml2 through homebrew (osx) without success
<JonnieCache>
that should have done it really
<JonnieCache>
the homebrew libxml2 package is what you need
Bira has joined #ruby
jerius has joined #ruby
<JonnieCache>
you also need libxslt
johnnygoodmancpa has left #ruby [#ruby]
<JonnieCache>
perhaps the error message from the compilation has changed and its now asking for that and you didnt notice
<JonnieCache>
actually you might not need libxslt i might be thinking of something else
invisime has joined #ruby
mmitchell has joined #ruby
<danslo>
this is probably more a design question than an actual ruby question but here goes anyway. I wish to build a small ruby script that connects to an SSH host and execute a bunch of really specific processes. I'd like to separate these processes into classes, what would be an accepted pattern? I was thinking of using a factory with a predefined interface for each class, but having trouble understanding how to implement it in ruby
<danslo>
sorry for the wall of text^
yshh has quit [Ping timeout: 272 seconds]
aaronmcadam has joined #ruby
adkron has joined #ruby
alex____4 has left #ruby [#ruby]
<Bira>
danslo: Interfaces in Ruby are more "conceptual" than they would be in languages such as Java or C#.
Guest91202 has quit [Client Quit]
gyre007 has quit [Ping timeout: 272 seconds]
<Hanmac>
JonnieCache or maybe the gem is dump and wants the pc files, even the libs and headers are installed
devoper has joined #ruby
<Bira>
You probably don't need factories here, either. If you write a set of classes that respond to the same methods, then you can already consider them to implement the same interface.
cmarques has joined #ruby
<JonnieCache>
danslo yeah youre overdesigning there from a ruby perspective
<sepp2k>
danslo: Could you give more details on what your processes look like? Currently I don't quite see the need for anything more than a simple method that simply issues the given commands.
<Bira>
Factories can have a place in larger projects, but if all you're writing is a script, you probably don't need that particular pattern.
br4ndon has joined #ruby
<danslo>
sepp2k: well to give you a simple example, some process might check available free memory and issue an API call to X at Y.... and another one might just upload some files and ensure proper installation, etc
<danslo>
I want to separate these kinds of logic into separate classes, and just give them the SSH object to work with
miso1337 has joined #ruby
<sepp2k>
Okay, so why not just have a method that takes the ssh connection as a parameter and issues those commands?
<danslo>
but I preferably want to do it in a dynamic manner, so I don't have to instantiate each process manually (or even specify it)
<JonnieCache>
danslo: it sounds like you might benefit from using something like chef
<JonnieCache>
although it is pretty complex
<csmrfx>
am I wrong to say: "Interfaces are kinda useless with dynamic languages"
<danslo>
JonnieCache: those were just examples, in some places it gets -really- specific for our platform
tyebud1 has left #ruby [#ruby]
<JonnieCache>
danslo: there more complex and long-lived these scripts are going to be, the more youd benefit from using a framework like chef
cburyta has joined #ruby
EPIK has joined #ruby
<JonnieCache>
but that aside, the ruby way is to just use the native data structures of Arrays and Hashes for most things
heliumsocket has quit [Quit: heliumsocket]
carlyle has joined #ruby
<JonnieCache>
and to pass them into functions, which can live on classes if you want
<JonnieCache>
but generally to not go making loads of classes everywhere if you dont need them
t0rc has joined #ruby
<danslo>
JonnieCache: maybe you're right, but it still leaves me wondering how such a thing would be implemented.... .each over an array of class names (plugins, processes, whatever you want to call them), then just instantiate and call into them?
yashshah has quit [Read error: Connection reset by peer]
<JonnieCache>
yeah you could do that
t0rc has quit [Changing host]
t0rc has joined #ruby
xargoon has quit [Ping timeout: 245 seconds]
<csmrfx>
I really liked how OCaml does interface-definitions with signatures.
breakingthings has joined #ruby
yashshah has joined #ruby
<csmrfx>
But then, it is a strongly typed lang
<JonnieCache>
you wouldnt need the names, you can put the actual classes into arrays if you want
<sepp2k>
JonnieCache: I disagree. Using hashes and arrays as a replacement for classes/structs is bad design IMHO. That said, I also don't see the need for classes in this specific case.
<A124>
Google fck...me again
codenapper has joined #ruby
<A124>
Anyone has link for Atmel naming convention?
<JonnieCache>
sepp2k: in a big application i would agree
<A124>
Or. knows what frist "P" in Atmega168PA-20PU is?
swex has quit [Read error: Connection reset by peer]
<A124>
omg.. sorry channel mismatch
<JonnieCache>
but for scripting it think its nice to be free of complex OO designs, i like to mix simple imerative with functional styles. i find it very clear and easy to read
danneu has joined #ruby
<A124>
Speaking of Ruby. Small standalone (client integrated) database that does not reside in memory?
<danslo>
I must add that this is pretty much the first ruby script I'm writing and somewhat understand your sentiments to not try and over-engineer everything (coming from java/php/c++)
<danslo>
thanks for the advice anyway :)
shevy has quit [Ping timeout: 276 seconds]
swex has joined #ruby
<csmrfx>
A124: sqlite
<breakingthings>
^
<JonnieCache>
danslo: you can do all the same java style things youre used to and gradually move into rubyish ways as you become more comfortable
<JonnieCache>
danslo: the language wont place any barriers in front of you if you try that
<csmrfx>
plain marshall goes a long way when "small"
<sepp2k>
JonnieCache: You don't need complex OO designs to use Structs instead of hashes that aren't actually used as maps. I'm all for keeping things simple, but overusing hashes actually makes your code harder to understand.
mockra has joined #ruby
tcstar has quit [Read error: Connection reset by peer]
<Hanmac>
danslo good to see you again :P
<JonnieCache>
sepp2k: whats the advantage of using structs over hashes in a simple script? immutability?
<Bira>
csmrfx: Well, support for interface definitions is useless in dynamic languages, but the design concept of interfaces is useful for any OO language.
<breakingthings>
sepp2k: While I agree having some handy dandy structs is better than shoehorning hashes into that purpose, I wouldn't say it really makes anything harder to understand.
<danslo>
Hanmac: :D
jtharris has joined #ruby
<sepp2k>
JonnieCache: Structs aren't immutable. One advantage is readability. Another is that you'll get an error if you accidentally typo member names.
cr3 has joined #ruby
<JonnieCache>
sepp2k: thats what i meant by immutability really. you cant accidentally assign new members
cburyta has quit [Remote host closed the connection]
<sepp2k>
breakingthings: I was thinking because something like Person.new("Sepp") makes it more obvious that you're creating a person than {:name => "sepp"} would.
<sepp2k>
Ah, I see. Then yes.
cburyta has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
nari has quit [Ping timeout: 264 seconds]
<pskosinski>
Ruby + SQLite3 gem, how to sanitize user input? Manually using regex or are there some ready libraries?
<breakingthings>
sepp2k: perhaps, but there are quite a few more hints involved to show that what you're creating is a person.
<pskosinski>
I mean case of web app.
threesome has quit [Ping timeout: 255 seconds]
sambio has joined #ruby
mockra has quit [Ping timeout: 260 seconds]
jgarvey has joined #ruby
dustint has joined #ruby
sleetdrop has joined #ruby
<sepp2k>
JonnieCache: Another advantage is that you can easily add methods to structs, but adding methods to Hash would be a bad idea if the method only makes sense for Hashes that represent a specific kind of thing (like adding an "area" method to a "Rectanlge" struct makes sense, adding it to Hash doesn't).
<apeiros_>
pskosinski: you're aware that userinput can be *anything*
<apeiros_>
i.e., your question is rather unspecific
trewe has left #ruby ["Away"]
<breakingthings>
apeiros_: i think it's implied for sql
pdamer has joined #ruby
<apeiros_>
breakingthings: oh. that might be. but then: oh dear.
<breakingthings>
so, wrap it all in quotes, escape other quotes.
<breakingthings>
wopwopwop.
<JonnieCache>
sepp2k: i tend to keep the functions somewhere else. functions dont have to be attached to data :)
xargoon has joined #ruby
sambao21 has joined #ruby
<breakingthings>
also yes, oh dear indeed.
<apeiros_>
pskosinski: if you mean you intend to interpolate user-input into sql: DO NOT DO THAT!
<apeiros_>
that's what bind-variables are there for.
<JonnieCache>
sepp2k: i have a lot of scripts that read "<hashes> <functions> <function calls that iterate over hashes>"
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
cburyta has quit [Ping timeout: 240 seconds]
wreckimnaked has quit [Ping timeout: 252 seconds]
<apeiros_>
anything for which you can't use bind-variables (e.g. ActiveRecord's .order) you should whitelist input
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<apeiros_>
e.g. .order("#{column} #{direction}") <-- broken and exploitable
<sepp2k>
JonnieCache: Then you lose ducktyping though. If you define an area method that takes a rectangle-hash, then you can't have another area method that works with circle-hashes. So you can't define a method that takes anything that has an area.
ksinkar has quit [Ping timeout: 252 seconds]
hybris has joined #ruby
pavilionXP has joined #ruby
ffranz has joined #ruby
<JonnieCache>
as soon as it got that complex id use a different design. i think we're envisioning quite different tasks
<breakingthings>
JonnieCache: but the point is that you don't need to make it complex
<breakingthings>
structs work pretty darn well for that sort of purpose
<pskosinski>
apeiros_: what are bind-variables…?
<JonnieCache>
youre right i should probably use them more
<danslo>
I see a I sparked a discussion^ :P
<apeiros_>
pskosinski: "SELECT * FROM table WHERE field=?"
hbpoison has quit [Ping timeout: 264 seconds]
<apeiros_>
? is a bind variable, it's supplied separately and for that reason doesn't need any escaping, as it can't alter the meaning of the SQL
<apeiros_>
some databases and/or abstraction layers allow the use of named bind variables.
ehlu has quit [Ping timeout: 258 seconds]
sambao21 has quit [Ping timeout: 252 seconds]
shevy has joined #ruby
<apeiros_>
pskosinski: e.g. AR: SomeModel.where("lower(name)=lower(:name)", name: params[:search_name])
zph has joined #ruby
zph has quit [Client Quit]
Bira_ has joined #ruby
_carloslopes has joined #ruby
carloslopes has quit [Ping timeout: 272 seconds]
Bira has quit [Ping timeout: 272 seconds]
sonda has joined #ruby
<pskosinski>
apeiros_: Ah… Like parametrized statement in PHP. :p Ok, thanks. I try to go from PHP to Ruby, using Sinatra so far but there is nothing about SQL in Sinatra docs. So I want just to use sqlite3 gem, will be enough for my small app.
<apeiros_>
if php decided to use an entirely new name for an existing construct - then yes
samphippen has quit [Quit: Computer has gone to sleep.]
<apeiros_>
the canonical name for this is 'bind variables'
<apeiros_>
pskosinski: of course, sinatra isn't a db and has nothing to do with a db.
<breakingthings>
apeiros_: hahaha of course they do
<apeiros_>
you'd use something like sequel, or datamapper, or activerecord (in about that order of preference)
<breakingthings>
surprised that surprises you
<apeiros_>
breakingthings: not surprised. just didn't know.
slainer68 has joined #ruby
<apeiros_>
stupid things in/about php can't surprise me anymore…
<breakingthings>
are you a grizzled veteran of the webs
<apeiros_>
pskosinski: those libs I named will (obviously) have plenty of documentation
<breakingthings>
apeiros_: generally don't have that problem.
<apeiros_>
even though I dislike SQL, I far prefer it raw for complex queries.
<JonnieCache>
sequel+postgresql=heaven
<apeiros_>
as said, be happy :)
hbpoison has joined #ruby
* breakingthings
shrugs
<breakingthings>
There's a rare case that cannot be solved by a proper database structure
<breakingthings>
But yes
<apeiros_>
but when you have to translate a ~50 line sql to AR, you'll probably understand, why some things are not a good fit for AR ;-)
<breakingthings>
if it is something out of scope of AR
<breakingthings>
raw sql is easy.
<breakingthings>
I just don't like it.
<apeiros_>
those cases aren't that rare
[eDu] has joined #ruby
<apeiros_>
maybe if your average application is a blog or a forum
banisterpig has quit [Remote host closed the connection]
<apeiros_>
the moment you go towards data warehouse, things change
braoru has quit [Remote host closed the connection]
<breakingthings>
Eh. Only when it involves excess calculation.
<breakingthings>
In which case I agree.
<JonnieCache>
you dont want to have to drop down to raw sql just because youre doing a complex query. you want an ORM that can handle arbitrarily complex queries/schemas
sandGorgon has quit [Ping timeout: 246 seconds]
<apeiros_>
JonnieCache: no you don't. but if you haven't done it yet, I don't expect you to understand that.
<breakingthings>
JonnieCache: the scope of things that I consider needing to drop out of an ORM will not be solved by any ORM just due to their nature.
cburyta has quit [Remote host closed the connection]
<JonnieCache>
apeiros_: you dont what?
jpcamara has quit [Ping timeout: 252 seconds]
cburyta has joined #ruby
<breakingthings>
I get where apeiros_ is coming from, and to a certain extent I agree, but for the average transaction I'd much rather a sturdy ORM/AR model to work with over SQL. I'll resort to SQL when it's a specific calculation required.
jpcamara has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
Al____ has joined #ruby
mmitchel_ has joined #ruby
<apeiros_>
14:59 JonnieCache … you want an ORM that can handle … -- maybe you want an ORM that can handle arbitrarily complex queries/schemas, but you don't want to use them for arbitrarily complex queries/schemas
forrest has joined #ruby
<JonnieCache>
hmmm
<JonnieCache>
obviously im not going to argue that i know more than you
heliumsocket has joined #ruby
heliumsocket has quit [Client Quit]
samphippen has joined #ruby
<JonnieCache>
but sequel provides such a nice 1:1 mapping allowing me to manipulate queries with objects rather than raw strings, im struggling to imagine when it would ever become a hindrance
<apeiros_>
well, if you would, I could throw a problem your way and see, how you do that with an ORM, then we compare notes and see, whether you still consider the ORM approach superior :-p
<breakingthings>
It's easier to handle large calculations with sql than with (any) orm.
andikr has joined #ruby
<apeiros_>
also there's a couple of things you don't want to do with an ORM due to performance restrictions. you want the db to do as much as possible within the db itself and not deserialize the data.
<breakingthings>
^
<breakingthings>
Those are the cases I fully agree.
frem has joined #ruby
<dominikh>
sequel has the nice attribute of allowing you to fall back to plain sql and prepared statements
<apeiros_>
AR takes between 0.1ms and 1ms for different objects on our production servers. now run something which involves ~1mio. records.
danneu1 has joined #ruby
<apeiros_>
enjoy the waiting time :)
Davey has joined #ruby
<JonnieCache>
hey im not in favor of AR :P
<dominikh>
I've used it for crunching some millions of records when the ORM on top of it didn't cut it, for obvious reasons
cburyta has quit [Ping timeout: 264 seconds]
mmitchell has quit [Ping timeout: 272 seconds]
<JonnieCache>
im arguing in favor of sequel here
mikecmpbll has joined #ruby
<breakingthings>
Pretty much every AR platform allows plain sql, though.
<apeiros_>
dominikh: indeed. which is the main use-case of sequel for me (the other is covered by AR - which doesn't mean that AR is the ORM of my choice, though ;-) )
<dominikh>
yeah. I often end up using sequel as a fancy db driver
chiel has joined #ruby
<danneu1>
I use Sequel in service objects (pretty much most of my queries) and light AR in AR mdoels.
<dominikh>
well, when I have to deal with SQL once every blue moon :)
danneu has quit [Ping timeout: 252 seconds]
<JonnieCache>
apeiros_: i dont think our views are that different really
<maetthew>
JonnieCache: I installed with libxml and libxslt. Still getting the same error (sry for being off for a while :P)
miso1337 has quit [Quit: afk]
troydm has joined #ruby
heliumsocket has joined #ruby
<troydm>
hey guys! just quick question if i have an A class with private f method can i call it from B (which is A's subclass)
<troydm>
like in Java i can't do that
fermion has quit [Read error: Connection reset by peer]
<hoelzro>
you sure can
Astralum has joined #ruby
<hoelzro>
access control is different in Ruby vs Java
<sepp2k>
troydm: You can do it using the apropriate reflection methods (like you can in Java too by the way), but other than that: no.
<sepp2k>
Oh, wait, I misread your question.
<sepp2k>
Yes, you can.
<JonnieCache>
dont you have to make it protected rather than private
eka has joined #ruby
<JonnieCache>
maetthew: can you gist the specific log output with the errors?
heliumsocket has quit [Client Quit]
<hoelzro>
private's ok as long as it dispatches to self
hbpoison has quit [Ping timeout: 276 seconds]
Monie has quit [Quit: This computer has gone to sleep]
<breakingthings>
^
Stilo has joined #ruby
<troydm>
so it's different from java
<breakingthings>
yes
Thoma____ has joined #ruby
<troydm>
like in Java private can't be called from subclass
<troydm>
in Ruby it can
<troydm>
seems so confusing since i've used to Java :(
<breakingthings>
private is no longer restricted to the defining class
<Hanmac>
in ruby private methods cant be called with self
<sepp2k>
troydm: Right. And in Java you can access private members of a different object of the same class. In Ruby you can't (without reflection).
<maetthew>
JonnieCache: Sure moment
<hoelzro>
they *must* be called on self
<hoelzro>
and they may only be invoked via an implicit invocant
<maetthew>
JonnieCache: Yeah I am on Mountain Lion. And I have tried updating homebrew and reinstalled libxml2. Will try again though, thanks for your help
dallasm has joined #ruby
endzyme has joined #ruby
niklasb has joined #ruby
sleetdrop has quit [Remote host closed the connection]
axl_ has left #ruby [#ruby]
banisterpig has joined #ruby
br4ndon has joined #ruby
* lupine
wishes ruby had a way to declare an enclosing namespace without breaking style guides demanding indentation for such
xpen has joined #ruby
ThePicard has quit [Ping timeout: 245 seconds]
<lupine>
Company::Project::Library::Component::Helper::PDO is an awfully large number of indentation levels for a fil
<lupine>
...e
ThePicard has joined #ruby
__Big0__ has joined #ruby
<Hanmac>
lupine: just do: module Company::Project::Library::Component::Helper; class PDO ;end; end
fmcgeough has joined #ruby
freeayu__ has joined #ruby
<Hanmac>
PS: but with this the modules and classes need to exist before
freeayu has quit [Ping timeout: 256 seconds]
_maes_ has joined #ruby
chenwei767 has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
AxonetBE has joined #ruby
<AxonetBE>
If this is my hash, is it possible to find the destroy value for a specific property_value_id ? http://pastie.org/6491974
<lectrick>
There's no way to include a module in a class definition without making it an immediate dependency, is there?
generalissimo has joined #ruby
endzyme has quit [Remote host closed the connection]
soc42 has quit [Remote host closed the connection]
tspike has joined #ruby
atyz has quit [Quit: Leaving...]
lolmaus has quit []
_nitti_ has quit [Ping timeout: 260 seconds]
m3pow has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
fmcgeough has quit [Quit: fmcgeough]
codecop has quit [Remote host closed the connection]
deepinskin has joined #ruby
fmcgeough has joined #ruby
pdamer has joined #ruby
Appineer has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
vlad_starkov has joined #ruby
jlast has joined #ruby
dawkirst has joined #ruby
yshh has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
dpollen has joined #ruby
Bira__ has joined #ruby
_nitti has joined #ruby
baroquebobcat has joined #ruby
puppeh is now known as artofraw
<danslo>
my google-fu has failed me... how do I elegantly check for nil in this scenario (preferably keeping it a oneliner): return some_object.get_some_string.split
sbusborg has quit [Remote host closed the connection]
<danslo>
this horribly dies when some string is nil :P
carraroj has quit [Ping timeout: 260 seconds]
<lupine>
Hanmac, aye, it breaks my tests, among other things
Bira_ has quit [Ping timeout: 252 seconds]
Appineer has quit [Remote host closed the connection]
<lupine>
I tend to unindent the innermost class these days, which makes me shudder a bit
arturaz has quit [Ping timeout: 272 seconds]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
carraroj has joined #ruby
<Hanmac>
danslo: compact removes the nil's
<danslo>
to_s will do
pepper_chico has joined #ruby
<Hanmac>
ups wrong directing
<Hanmac>
direction
sonda has quit [Ping timeout: 252 seconds]
freeayu__ has quit [Remote host closed the connection]
d34th4ck3r has joined #ruby
neku has joined #ruby
<Hanmac>
ping shevy
<Hanmac>
"if running with warning -w enabled or something" => $-w
<sepp2k>
danslo: What do you want the result to be if some_string is nil? [] or nil? Also: is it possible to restructure your code so that some_string can't be nil?
daniel_-_ has joined #ruby
_jc has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
<danslo>
sepp2k: [], so I fixed it by just to_s'ing before splitting
ddd has joined #ruby
<danslo>
and it was the result of calling another library, so unfortunately no
mmitchell has quit [Remote host closed the connection]
<JonnieCache>
danslo: you could do return some_object.get_some_string && some_object.get_some_string.split
<JonnieCache>
but thats kind of ugly
heliumsocket has joined #ruby
<JonnieCache>
it will return false if some_string is nil
<lectrick>
banisterpig: hmmm let me explain... I want to be able to test a class in isolation, but if it includes other things, then I must load those too I suppose... basically I want a way to load up a class in a unit test without loading up all its dependencies necessarily, and class-level includes have the problem of needing to be resolved immediately
<apeiros_>
JonnieCache: it'll actually return nil in that case
<JonnieCache>
danslo: you can also do `return some_object.get_some_string.split rescue nil` but thats kind of a bad idea, for reasons which can be explained much better by others im sure
<apeiros_>
avoids possible side effects of calling a method
<JonnieCache>
mainly because youre indiscriminately rescuing all exceptions
generalissimo has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 276 seconds]
sayan has quit [Read error: Connection reset by peer]
<JonnieCache>
but apeiros_ suggestion of assigning the local var on another line is probably best. its readable and simple
realDAB has joined #ruby
alex__c2022 has joined #ruby
<Hanmac>
other possible way: return (some_object.get_some_string || "").split
bricker`LA has quit [Ping timeout: 240 seconds]
cburyta has joined #ruby
artofraw has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 252 seconds]
hbpoison has quit [Ping timeout: 252 seconds]
hbpoison has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
pehlert has joined #ruby
artofraw has joined #ruby
joshman_ has quit [Ping timeout: 276 seconds]
<JonnieCache>
ooh its pi day today
Edalek has quit [Quit: Leaving]
<pehlert>
Hey folks. I'm trying to resolve a bug.. Does anyone here have an Ubuntu installation with system Ruby 1.9.3 and could check whether YAML is defined after ruby startup?
<JonnieCache>
and einstein's 134th birthday
<JonnieCache>
thats cool
kojul has quit [Quit: kojul]
artofraw has quit [Remote host closed the connection]
<banisterpig>
Hanmac: the alias one is a cool bug
<banisterpig>
wish i found that :/
apok has joined #ruby
<banisterpig>
i was looking for bugs in #prepend
<banisterpig>
i found one
<JonnieCache>
pehlert: you have to require 'yaml'
<banisterpig>
but not such a cool one
mmitchell has joined #ruby
chrishunt has joined #ruby
<pehlert>
JonnieCache: On my installation (on a couple of nodes actually) the YAML constant is defined
joshman_ has joined #ruby
<pehlert>
Without me manually requiring aynthing
<pehlert>
It breaks bundler
v0n has quit [Ping timeout: 260 seconds]
<JonnieCache>
wtf
<pehlert>
Exactly
<JonnieCache>
and this applies to all uses of ruby? not just irb or whatever?
<Hanmac>
banisterpig do you use ruby-trunk?
rontec76 has joined #ruby
<banisterpig>
Hanmac: sometimes, but not as my regular ruby
<banisterpig>
i have it setup in chruby
bricker`LA has joined #ruby
sambao21 has joined #ruby
blaxter has joined #ruby
<pehlert>
JonnieCache: Apparently all rubies, yes..
<apeiros_>
pehlert: is your RUBYOPT env var set to something?
<pehlert>
Let me check
<Hanmac>
aliased methods have two names now ... the orginal one and the alias one too :P
<pehlert>
apeiros_: Nope, doesn't seem to be
[eDu] has quit [Quit: [eDu]]
<apeiros_>
pehlert: also what does this print? $ ruby -ve 'p Object.const_defined?(:YAML)'
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
pehlert: it could be hiding in some dotfile
haxrbyte has joined #ruby
tubbo has left #ruby [#ruby]
Virunga has quit [Read error: Connection reset by peer]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
xclite has joined #ruby
hogeo has quit [Remote host closed the connection]
tvw has joined #ruby
elux has joined #ruby
lewix has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
ckt1g3r has quit [Quit: Leaving]
akashj87 has joined #ruby
noop has joined #ruby
hbpoison has joined #ruby
FullTiltProspect has joined #ruby
elux has quit [Read error: Connection reset by peer]
elux_ has joined #ruby
elux_ has quit [Client Quit]
seejohnrun has quit [Quit: leaving]
dougireton has joined #ruby
FullTiltProspec1 has joined #ruby
FullTiltProspec1 has left #ruby [#ruby]
FullTiltProspect has quit [Client Quit]
psyprus has joined #ruby
bricker`1A has joined #ruby
FullTiltProspect has joined #ruby
seejohnrun has joined #ruby
qhartman has quit [Quit: Ex-Chat]
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
dougireton has quit [Client Quit]
FullTiltProspect has quit [Client Quit]
FullTiltProspect has joined #ruby
akashj87 has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
troydm has left #ruby ["What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset"]
mneorr has joined #ruby
FullTiltProspect has left #ruby [#ruby]
girija has joined #ruby
bricker`LA has quit [Ping timeout: 256 seconds]
heliumsocket has quit [Quit: heliumsocket]
FullTiltProspect has joined #ruby
adr has joined #ruby
ArchBeOS has quit [Quit: Leaving]
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
<adr>
Hi. To get the decimal balue of 2 bytes (little endian) i'm using "\x4D\xF3".unpack('v*') ---> 62285 How can I get the 2 complemet from a pair of bytes ?
<adr>
*value
notVert has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
heliumsocket has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
bricker`LA has joined #ruby
d34th4ck3r has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<apeiros_>
adr: ~v & 0xffff
<apeiros_>
hm, wait, maybe I misunderstood what you mean…
girija has quit [Ping timeout: 246 seconds]
tonini has quit [Remote host closed the connection]
ArchBeOS has quit [Client Quit]
bricker`1A has quit [Ping timeout: 256 seconds]
<adr>
I mean apeiros that from "\x4D\xF3" (little endian) I have to get - 3.251
<werdnativ>
apeiros_: yeah, I'm sure that's the one. looks broken right now.
anderse has joined #ruby
Hanmac has joined #ruby
dr_bob has joined #ruby
FullTiltProspect has quit [Quit: FullTiltProspect]
casheew has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
rippa has joined #ruby
bricker`LA has quit [Ping timeout: 276 seconds]
anderse has quit [Client Quit]
dr_bob has left #ruby [#ruby]
casheew has joined #ruby
<apeiros_>
werdnativ: yeah, only css issues, the link is outdated
<apeiros_>
he references docco's css, which seems to have moved
wreckimn1 has joined #ruby
mpfundstein has quit [Remote host closed the connection]
niftylettuce has joined #ruby
zero7 has joined #ruby
Guest85414 has joined #ruby
chrishough has joined #ruby
dustint has quit [Ping timeout: 256 seconds]
wreckimnaked has quit [Ping timeout: 245 seconds]
slainer68 has quit [Remote host closed the connection]
<Hanmac>
apeiros_ what if i can get a class from a string? like WX::Property("Int") gets you the wxIntProperty class ... is that okay?
casheew has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
<apeiros_>
wx as in wxwidgets?
glanotte has left #ruby [#ruby]
NimeshNeema has joined #ruby
io_syl has joined #ruby
realDAB has quit [Quit: realDAB]
<Hanmac>
apeiros_ yep
glanotte has joined #ruby
<apeiros_>
are you maintaining the wxwidgets ruby bindings?
<troydm>
preprocess_prog: LineSegment(1.00000999,1.0,1.0,2.0) was expected to preprocess to LineSegment(1.00000999,1.0,1.0,2.0) [incorrect answer]
<troydm>
no that is something wtf O_o
<Hanmac>
apeiros_ yes and no ... i make my own binding
<troydm>
ups sorry
<troydm>
wrong channel
troydm has left #ruby ["What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset"]
<apeiros_>
Hanmac: NIH? :-p
casheew has joined #ruby
<apeiros_>
Hanmac: well, I don't know your use case and the implications of a given choice.
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
tubbo has left #ruby [#ruby]
<apeiros_>
ruby has const_get, which gets you a constant from a string too, so I'd say conceptually it's acceptable. whether it is a good idea - don't know…
sbus_afk has quit [Remote host closed the connection]
<apeiros_>
brb (taking my train)
hidekin has joined #ruby
apeiros_ has quit [Remote host closed the connection]
nomenkun_ has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 255 seconds]
hbpoison has joined #ruby
aleph-null has joined #ruby
dougireton has joined #ruby
ArchBeOS has left #ruby ["Leaving"]
eldariof has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
timonv has quit [Remote host closed the connection]
Liquid-- has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby
eAlchemist has joined #ruby
lewix has quit [Remote host closed the connection]
brianpWins has joined #ruby
eAlche___ has quit [Read error: Connection reset by peer]
lewix has joined #ruby
dougireton has quit [Remote host closed the connection]
noop has quit [Remote host closed the connection]
etcetera has quit []
johnjohnson has quit []
werdnativ_ has joined #ruby
wreckimn1 has quit [Ping timeout: 264 seconds]
werdnativ_ has quit [Client Quit]
werdnativ has quit [Read error: Operation timed out]
mafolz has quit [Ping timeout: 240 seconds]
cburyta has joined #ruby
eAlchemist has quit [Remote host closed the connection]
<csmrfx>
8)
etcetera has joined #ruby
aleph-nu_ has joined #ruby
adr has quit [Ping timeout: 245 seconds]
sayan has quit [Ping timeout: 258 seconds]
rickmasta has quit [Quit: Leaving...]
skattyadz has quit [Ping timeout: 256 seconds]
ahammond has joined #ruby
Eldariof-ru has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
aleph-null has quit [Ping timeout: 258 seconds]
aleph-nu_ has quit [Remote host closed the connection]
nga4 has joined #ruby
aleph-null has joined #ruby
cburyta has quit [Remote host closed the connection]
danneu has joined #ruby
bgcoup has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
cburyta has joined #ruby
eldariof has quit [Ping timeout: 264 seconds]
mrsolo has joined #ruby
banisterpig has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
banisterpig has joined #ruby
alvaro_o has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
<csmrfx>
Mr. Hammer
freakazoid0223 has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
devoper has joined #ruby
s1n4 has joined #ruby
cburyta has quit [Ping timeout: 256 seconds]
mneorr has joined #ruby
d2dchat has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
Liquid-- has joined #ruby
banisterpig has quit [Remote host closed the connection]
hybris has quit [Quit: Leaving]
cburyta has joined #ruby
Goles has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
realDAB has joined #ruby
jpfuentes2 has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
maxmanders has quit [Quit: Computer has gone to sleep.]
devilirium has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby
jlast_ has joined #ruby
ahammond has quit [Quit: ahammond]
jlast_ has quit [Remote host closed the connection]
jlast has quit [Read error: Connection reset by peer]
_nitti has quit [Ping timeout: 245 seconds]
heliumsocket has quit [Quit: heliumsocket]
jpfuentes2 has quit [Client Quit]
jlast has joined #ruby
devilirium has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
heliumsocket has joined #ruby
cburyta has quit [Remote host closed the connection]
dmiller2 has joined #ruby
sayan has joined #ruby
cburyta has joined #ruby
ahammond has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
pepper_chico has quit [Quit: Computer has gone to sleep.]
krawchyk_ has quit [Remote host closed the connection]
toto_ has quit [Quit: Leaving...]
yankeefan04 has quit [Remote host closed the connection]
rh1n0 has joined #ruby
krawchyk has quit [Ping timeout: 260 seconds]
yankeefan04 has joined #ruby
helvete has joined #ruby
aleph-null has quit [Ping timeout: 258 seconds]
kornnflake_zzz is now known as kornnflake
whitedawg has quit [Quit: Leaving.]
yankeefan04 has quit [Remote host closed the connection]
monkegjinni has joined #ruby
aleph-nu_ has quit [Remote host closed the connection]
aleph-null has joined #ruby
alfism has joined #ruby
dawkirst has joined #ruby
monkegjinni has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
realDAB has quit [Quit: realDAB]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
wobblini has joined #ruby
jlast_ has quit [Remote host closed the connection]
kenyabob has joined #ruby
alex__c2022 has quit [Ping timeout: 258 seconds]
_nitti has quit [Remote host closed the connection]
<kenyabob>
Whats the simplist way to filter unwanted items out of an array
monkegjinni has joined #ruby
<apeiros_>
kenyabob: Array#select and #reject are your friends
endzyme has joined #ruby
endzyme has quit [Remote host closed the connection]
cburyta has quit [Remote host closed the connection]
mpfundstein has joined #ruby
endzyme has joined #ruby
jasonthesensei has joined #ruby
cburyta has joined #ruby
forrest has joined #ruby
<kenyabob>
apeiros_: ah I see, thank you! for some reason I thought it would be destructive, but I see it returns a new array
cburyta has quit [Read error: Connection reset by peer]
<csmrfx>
only if !
cburyta has joined #ruby
alainus has joined #ruby
dustint has quit [Remote host closed the connection]
Fuzai has quit [Ping timeout: 240 seconds]
sandGorgon has joined #ruby
<alainus>
hi .. i'm working on this auto shortner for Klipper: http://paste.ubuntu.com/5614420, and when I try it in the console I get ~/bin/url-short.rb:23:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError). any tips?
dustint has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
aaronmcadam has quit [Ping timeout: 252 seconds]
alex__c2022 has joined #ruby
yashshah has quit [Ping timeout: 260 seconds]
mneorr_ has joined #ruby
marr has quit [Ping timeout: 246 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr_ has quit [Remote host closed the connection]
jmeeuwen__ has quit [Quit: Caught sigterm, terminating...]
_emptymag00 has quit [Quit: Leaving]
Zai00 has quit [Ping timeout: 264 seconds]
sandGorgon has quit [Read error: Connection reset by peer]
Fuzai has joined #ruby
danneu has joined #ruby
_emptymag00 has joined #ruby
yankeefan04 has joined #ruby
jlast has joined #ruby
sandGorgon has joined #ruby
adr has joined #ruby
Fuzai has left #ruby [#ruby]
otters has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
danneu has quit [Client Quit]
carraroj has quit [Remote host closed the connection]
p8952 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
xcv has joined #ruby
danneu has joined #ruby
carraroj has joined #ruby
devoper has quit [Remote host closed the connection]
monkegjinni has joined #ruby
nkr has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
jmeeuwen__ has joined #ruby
monkegjinni has joined #ruby
<bean>
somehow you're getting a nil in there.
dawkirst has joined #ruby
dustint has quit [Remote host closed the connection]
Liquid-- has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
chrisja has quit [Ping timeout: 255 seconds]
sbusborg is now known as sbusb_test
sbusb_test has quit []
mbduino has joined #ruby
sbusb_test has joined #ruby
* mbduino
is learning rails - now pay me!
monkegjinni has quit [Remote host closed the connection]
<bean>
this is not a channel for rails
<bean>
lol
csmrfx has left #ruby ["cu"]
<mbduino>
...
sbusb_test is now known as sbusborg
<mbduino>
I was redirected here from #rubyonrails?
<mbduino>
hmm
<bean>
this is a channel for ruby, without rails
<mbduino>
must've hit enter a little too quick in my epic typingness
<mbduino>
let me try that again
carraroj has quit [Ping timeout: 264 seconds]
<mbduino>
odd
carraroj has joined #ruby
<breakingthings>
I find it interesting how quick #ruby jumps on mentions of rails
`p has quit [Remote host closed the connection]
<breakingthings>
:P
<bean>
I've written one rails project ever
<bean>
can't say I'm a fan
<breakingthings>
whysat
FullTiltProspect has joined #ruby
icole has quit [Remote host closed the connection]
Liquid-- has quit [Client Quit]
alvaro_o has joined #ruby
banjara has joined #ruby
lancepantz is now known as lancepantz_
aaronmcadam has joined #ruby
dustint has joined #ruby
thone_ has joined #ruby
FullTiltProspect has quit [Quit: FullTiltProspect]
BizarreCake has quit [Ping timeout: 260 seconds]
c0rn has quit [Ping timeout: 258 seconds]
francisfish has quit [Remote host closed the connection]
razibog has quit [Ping timeout: 245 seconds]
gyre007 has quit [Ping timeout: 260 seconds]
<bean>
Not sure
francisfish has joined #ruby
bricker`work is now known as bricker
bricker is now known as bricker`work
`p has joined #ruby
dustint has quit [Client Quit]
<breakingthings>
was "can't say I'm a fan" a negative or neutral response?
dustint has joined #ruby
<mbduino>
it's a neugative response
daze has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
<breakingthings>
"…because I haven't used it enough" "…I can't put my finger on it"
<mbduino>
anyone here use truecrypt for disk encryption?
<Hanmac>
breakingthings it was an: "if he say that he thinks about rails, it would make you cry" :P
thone has quit [Ping timeout: 255 seconds]
<breakingthings>
mbduino: well yes, but it seems funny to get 'not sure' as an answer :P.
<breakingthings>
Hanmac: It's okay, I'm not DHH, I don't cry at the mere mention of suggesting a different way of doing something
eAlchemi_ has joined #ruby
alainus has left #ruby ["Leaving"]
FullTiltProspect has joined #ruby
_nitti has joined #ruby
pavilionXP has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
bpfh has joined #ruby
bricker`work is now known as bricker
ToTo has joined #ruby
FuzaiDesktop has joined #ruby
jpfuentes2 has joined #ruby
lancepantz_ is now known as lancepantz
tenmilestereo has joined #ruby
apok has joined #ruby
Catbuntu has joined #ruby
ToTo has quit [Read error: Connection reset by peer]
wobblini has quit [Ping timeout: 255 seconds]
pyrac has joined #ruby
poikon has quit [Remote host closed the connection]
fschuindt has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
banjara has quit [Quit: Leaving.]
mneorr has joined #ruby
rickmasta has quit [Quit: Leaving...]
d34th4ck3r has joined #ruby
yankeefan04 has quit [Remote host closed the connection]
lethjakman has joined #ruby
_nitti has quit [Ping timeout: 258 seconds]
<lethjakman>
hey, does anyone have any good articles on threading ruby?
nomenkun has joined #ruby
yxhuvud has joined #ruby
dmerrick has quit [Quit: dmerrick]
sandGorgon has quit [Ping timeout: 252 seconds]
sepp2k has quit [Quit: Leaving.]
mmitchel_ has joined #ruby
AndChat| has quit [Ping timeout: 258 seconds]
yxhuvud2 has quit [Ping timeout: 256 seconds]
dougireton has quit [Quit: Leaving.]
Liquid-- has joined #ruby
MehLaptop has quit [Remote host closed the connection]
kenyabob has quit [Quit: kenyabob]
Banistergalaxy has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
seejohnrun has quit [Ping timeout: 240 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
dmiller2 has quit [Ping timeout: 252 seconds]
c0rn has joined #ruby
mmitchell has quit [Ping timeout: 276 seconds]
fschuindt has quit [Quit: Computer has gone to sleep.]
<lectrick>
lethjakman: google "jruby" :)
jamesfung14 has joined #ruby
<lectrick>
i guess the short answer is, you can use threads, although thread-safety is not guaranteed out of the box in MRI
br4ndon has quit [Ping timeout: 276 seconds]
theRoUS has joined #ruby
<Hanmac>
but MRI has other features you may lose when using jruby
cupakromer has joined #ruby
d34th4ck3r has quit [Ping timeout: 245 seconds]
<mbduino>
anyone here use truecrypt?
Xeago has joined #ruby
cilquirm has quit [Quit: cilquirm]
thinkclay has joined #ruby
<headius>
Hanmac: I think the gains outweigh the losses :-)
dougireton has joined #ruby
Eldariof93-ru has quit []
<mbduino>
nm
<breakingthings>
headius: as with anything else, depends on your needs.
Myconix has joined #ruby
<mbduino>
k peeps, back to rails for me, thanks
mbduino has left #ruby [#ruby]
luckyruby has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
<Hanmac>
headius: some of my gems does not and will never work with jruby
hbpoison has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
<headius>
presumably because they have a lot of C ext stuff
mmitchel_ has quit [Remote host closed the connection]
hbpoison has joined #ruby
mmitchell has joined #ruby
<Hanmac>
headius "lot" is a bad word ... they ARE MADE OF C++ stuff ... with that i can do platformindipent GUI programming with eventhandling ... and that in ruby style :P
<headius>
of course I've pointed out that you can do platform independent GUI programming with JRuby much more easily ;-)
<headius>
and you don't have to compile anything...huzzah
dawkirst has quit [Ping timeout: 260 seconds]
mneorr has quit [Read error: Operation timed out]
bigkevmcd has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Remote host closed the connection]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
bigkevmcd_ has joined #ruby
bigkevmcd_ is now known as bigkevmcd
razibog has joined #ruby
<breakingthings>
Does anyone feel like making their brains hurt and helping me out with a SQL predicament
<breakingthings>
Not really ruby related, raw slq
<breakingthings>
sql*
<GeekOnCoffee>
breakingthings: go for it
<breakingthings>
Alright, give me a sec to describe the scenario
<GeekOnCoffee>
maybe do it in a gist
<breakingthings>
yeah.
<GeekOnCoffee>
rather than explaining the whole thing in the channel :)
<breakingthings>
Yep.
interactionjaxsn has joined #ruby
jonathanwallace has joined #ruby
picca3 has quit [Quit: Leaving...]
<Hanmac>
headius that is not the same, and the Controls i bind are more cool
<luckyruby>
Hanmac: which gem?
<luckyruby>
open source?
<Hanmac>
luckyruby: not gem yet: https://github.com/Hanmac/rwx ... its like wxRuby .... but compared to it its alive :D
<Hanmac>
and yes there is no Readme yet, because i am not finish
adkron has quit [Ping timeout: 252 seconds]
_nitti has joined #ruby
audy has joined #ruby
<headius>
Hanmac: I wonder how wx compares to SWT, which does use native widgets
audy has left #ruby ["something went wrong"]
<headius>
SWT uses GTK widgets though
Davey has quit [Quit: Computer has gone to sleep.]
audy has joined #ruby
sepp2k has joined #ruby
<audy>
once a Hash has been created with a default_proc, is it possible to change that to a default value?
<GeekOnCoffee>
breakingthings: You need to join onto yourself... SELECT unique category_id join (SELECT MIN(price), id, category_id from category group by category_id)
<GeekOnCoffee>
that's pseudosql at best, but I think that's your best bet
pepper_chico has joined #ruby
devilirium has joined #ruby
icole has joined #ruby
<apeiros_>
breakingthings: what db?
<bean>
breakingthings: re:earlier convo. I just prefer to do things my own way, rails seemed a bit heavy as well.
<breakingthings>
apeiros_: mysql
<apeiros_>
oh, out of luck. might see whether it has analytic functions, though
<headius>
and there's lots of third-party libs that add more
Goles has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
LouisRoR has joined #ruby
_nitti has joined #ruby
<headius>
not like I'm going to convince you not to use your own library, I'm just pointing out that there's really nice options on JRuby :-)
ferdev has quit [Quit: ferdev]
wobblini has joined #ruby
yacks has quit [Quit: Leaving]
carraroj has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
itsdavem has joined #ruby
asdasd_ has joined #ruby
Monie has quit [Quit: This computer has gone to sleep]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby
jamesfung14 has quit [Ping timeout: 258 seconds]
dougireton has quit [Quit: Leaving.]
Spooner has joined #ruby
deric_skibotn has joined #ruby
Goles has joined #ruby
timonv has joined #ruby
robotblake has joined #ruby
Goles has quit [Max SendQ exceeded]
ryannielson has quit [Quit: ryannielson]
<deric_skibotn>
Anyone finding a problem with the ruby_core_source gem under 2.0.0-p0? uri.download grabs ruby-2.0.0.tar.gz but writes it out as a plain tar file
DrShoggoth has joined #ruby
Goles has joined #ruby
adambeynon has joined #ruby
marcdel has joined #ruby
m8 has joined #ruby
Monie has joined #ruby
<m8>
we
blaxter has quit [Quit: foo]
pepper_chico has quit [Quit: Computer has gone to sleep.]
toekutr has joined #ruby
dmerrick has joined #ruby
lancepantz is now known as lancepantz_
monkegjinni has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
danslo has quit [Quit: danslo]
pepper_chico has joined #ruby
<lectrick>
How do I left-pad a string with spaces?
pepper_chico has quit [Max SendQ exceeded]
hbpoison has quit [Ping timeout: 264 seconds]
<lectrick>
Or right-pad it for that matter
Goles has quit [Max SendQ exceeded]
pepper_chico has joined #ruby
hbpoison has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
jamesfung14 has joined #ruby
<GeekOnCoffee>
lectrick: did you try looking at the documentation?
<Spooner>
lectrick, You could use #ljust or rjust, but you can just use printf.
Davey has joined #ruby
pepper_chico has joined #ruby
<lectrick>
i like l/rjust. I know I can use printf but I hate looking up the proper syntax for formatting strings every time :)
nicoulaj has joined #ruby
devoper has joined #ruby
daniel_-_ has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
<Spooner>
You pick up most of the formats, that you use a lot, in printf (like in regexps), but we all have to look stuff up now and then.
kofno has joined #ruby
kn330 has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
kpshek has quit []
tealmage has joined #ruby
Goles has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
marr has joined #ruby
ferdev has joined #ruby
Goles has quit [Max SendQ exceeded]
adkron has joined #ruby
hadees has joined #ruby
tenmilestereo[aw has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
itsdavem has quit [Remote host closed the connection]
<wrench>
I've been looking at several ruby projects on github to try and figure out how gems are packaged etc. The two I'm looking at have several classes each under the <projectname>/lib/<projectname> directory. I noticed that in these projects: the classes are encapsulated with module <projectname>. Can someone help me understand why to wrap the classes in the same module?
tenmilestereo has quit [Ping timeout: 258 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
<Spooner>
wrench, Main reason is that it namespaces them and prevents name collisions.
Goles has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
carraroj has joined #ruby
yxhuvud has quit [Ping timeout: 245 seconds]
tonini has joined #ruby
pavilionXP has joined #ruby
<wrench>
Spooner: ah that makes more sense. Could you do: Modulename:Classname.methodname?
<Spooner>
Yes, that is how you'd access a class method.
etcetera has joined #ruby
<wrench>
Spooner: class methods would have to be declared like: self.methodname right?
<Spooner>
Or Mname::Cname.new to create an instance.
<wrench>
in the relevant class
sayan has quit [Ping timeout: 255 seconds]
Monie has quit [Quit: This computer has gone to sleep]
<Spooner>
Yes, either "def self.methodname" or "def methodname" inside a "class << self; end" block.
<wrench>
Can you explain the "def methodname" inside a "class << self; end" block
xbob has quit [Quit: Leaving]
tvw has quit []
vickaita1 has joined #ruby
<Spooner>
They just does exactly the same thing. Just personal preference which one you use (though class << self also lets you do a few things, like add class-based accessors, which you can't otherwise do).
<wrench>
hrmm ok. Thanks for the info Spooner
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<Spooner>
When you define a method on a class (normally) it is accessible in its instances. When you use self (either way) then it defines the method on the class's metaclass, so that it is accessible on the class itself.
Ontolog has quit [Read error: Connection reset by peer]
vickaita1 has quit [Client Quit]
<wrench>
that helps man ty
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
Ontolog has joined #ruby
jpcamara has joined #ruby
<Hanmac>
it is very funny when you asign constants inside a class << self block :P
sbusborg has quit [Remote host closed the connection]
dougireton has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
geekbri has quit [Remote host closed the connection]
sbusborg has joined #ruby
vickaita1 has joined #ruby
francisfish has quit [Ping timeout: 255 seconds]
alfism has quit [Quit: alfism]
banjara has joined #ruby
rh1n0 has quit [Quit: -- I'm out --]
Morkel has quit [Read error: Connection reset by peer]
huoxito has quit [Quit: Leaving]
Nisstyre-laptop has joined #ruby
io_syl has quit [Ping timeout: 252 seconds]
dougireton has quit [Remote host closed the connection]
workmad3 has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
Morkel has joined #ruby
rdark has quit [Quit: leaving]
io_syl has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
vickaita1 has quit [Quit: WeeChat 0.3.9.2]
Catbuntu has quit [Quit: Leaving]
Goles has quit [Remote host closed the connection]
<danneu>
it's not so funny when people use class<<self as 'shorthand' for `def self.____`
Goles has joined #ruby
wchun has quit [Quit: Leaving]
<asdasd_>
hello, guys... i saw a presentation about software testing and the talker told some things about fixtures, what is that, exactly?
<Hanmac>
denneu: its needed when you want attr_accessor as singleton methods for a class or module
<danneu>
yeah
rezzack has quit [Quit: Leaving.]
<asdasd_>
apeiros_: thanks, but that's not too clear (i've looked it up before)
<apeiros_>
asdasd_: then ask a more qualified question
marcdel has quit [Ping timeout: 264 seconds]
lancepantz_ is now known as lancepantz
<asdasd_>
apeiros_: is it the same as a test suite, considering design concerns?
<apeiros_>
no
<apeiros_>
the test suite is the whole thing
ckrailo has quit [Quit: Computer has gone to sleep.]
<asdasd_>
apeiros_: i'm not a ruby guy, and never heard about this keyword before
<apeiros_>
it's not a ruby related word
<apeiros_>
asdasd_: what about the WP article do you have difficulties with?
<danneu>
asdasd_: fixtures are predefined test data. instead of manually creating a User in every test, you can create a generic user fixture in one place and your tests can just call on that user fixture.
<asdasd_>
danneu: some king of mocking?
_nitti has quit [Ping timeout: 246 seconds]
<apeiros_>
danneu: that's only a narrow aspect of fixtures. though rails uses the word only for that.
<apeiros_>
mostly for yaml based db test data
<asdasd_>
danneu: kind*
<danneu>
apeiros_: yeah good point. rails redefined fundamental testing vernacular.
<danneu>
thanks rails!
<asdasd_>
so, fixture == mock?
<apeiros_>
yes. mocks are one kind of fixture.
Nisstyre-laptop has quit [Quit: Leaving]
<apeiros_>
fixtures make sure your test is prepared and isolated.
<asdasd_>
apeiros_: hm, now it makes sense
<asdasd_>
ty very much, guys
danneu has quit [Quit: WeeChat 0.3.8]
jasonthesensei has quit []
vickaita has joined #ruby
axxT has joined #ruby
<bricker>
is there a better method for removing characters that match a regex, rather than `gsub(/\W/, "")`
<apeiros_>
I'm a bit blurry where the diff between test-setup and test-fixture is. maybe setup is the act of setting up… dunno
<apeiros_>
bricker: not really
cupakromer has left #ruby [#ruby]
d34th4ck3r has joined #ruby
<apeiros_>
for a limited set, String#delete
marcdel has joined #ruby
<apeiros_>
but that doesn't accept a regex. only tr style ranges
mark_locklear has quit [Ping timeout: 272 seconds]
<bricker>
apeiros_: thanks
<bricker>
apeiros_: I just want to remove non-word characters (i.e. /\W/)
<bricker>
wait
dmerrick has quit [Quit: dmerrick]
carloslopes has quit [Remote host closed the connection]
<bricker>
yes
<apeiros_>
\W is only [^A-Za-z0-9_] in 1.9
<apeiros_>
i.e. ascii word chars only
<bricker>
apeiros_: perfect
Choobie has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
<apeiros_>
k
<apeiros_>
if you'd want unicode word chars, \p{word} is probably what you'd want
wmoxam has quit [Ping timeout: 260 seconds]
axxT has quit [Changing host]
axxT has joined #ruby
rontec76 has quit [Remote host closed the connection]
xardas has joined #ruby
wf2f has quit []
arturaz has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
markisonfire has quit [Quit: markisonfire]
breakingthings has quit []
jrajav has quit [Quit: I tend to be neutral about apples]
_md has joined #ruby
kpshek has joined #ruby
biff_tannen has joined #ruby
stkowski has quit [Quit: stkowski]
chrishough has quit [Quit: chrishough]
yfeldblum has quit [Ping timeout: 258 seconds]
haxrbyte has joined #ruby
Goles has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
realDAB has joined #ruby
_md has quit [Quit: Leaving...]
cburyta has quit [Remote host closed the connection]
icy`` has joined #ruby
codecop has quit [Read error: Connection reset by peer]
<amacleod>
Lots of programming channels are meaner than #ruby. Too many nice people in here. :-D
cburyta has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
dougireton1 has joined #ruby
bpfh has quit [Ping timeout: 258 seconds]
<matti>
amacleod: LOL
bpfh has joined #ruby
<apeiros_>
amacleod: the complainer already left, though ;-)
<matti>
amacleod: That would mean that banister is on leave.
dougireton has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
<Hanmac>
amacleod its because of php ... it makes you angry and thats because they are mean
<amacleod>
I should pay attention. You guys are so mean for pointing out that I missed that!
<amacleod>
Hanmac, vicious feedback loop, eh?
d34th4ck3r has quit [Quit: Konversation terminated!]
V8Energy has joined #ruby
d34th4ck3r has joined #ruby
icy` has quit [Ping timeout: 258 seconds]
DrShoggoth has joined #ruby
candlej4ck has joined #ruby
<V8Energy>
is there a gui framework for ruby that uses HTML5/javascript? besides Bowline (it doesn't support windows and it seems like the development stopped)
jpcamara has quit [Quit: jpcamara]
cburyta has quit [Ping timeout: 256 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
sailias has quit [Ping timeout: 252 seconds]
jtharris has quit [Quit: WeeChat 0.4.0]
beneggett has quit [Quit: Computer has gone to sleep.]
haxrbyte has quit [Read error: Connection reset by peer]
nateberkopec has quit [Read error: Connection reset by peer]
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
haxrbyte has joined #ruby
rh1n0 has joined #ruby
axl_ has quit [Quit: axl_]
phantasm66 has quit [Quit: *sleeeep….]
Ohga has joined #ruby
glanotte has quit [Quit: glanotte]
danman has quit [Quit: danman]
greenarrow has quit [Ping timeout: 255 seconds]
greenarrow has joined #ruby
piotr__ has joined #ruby
nazty has quit [Ping timeout: 245 seconds]
keyo has joined #ruby
bonhoeffer has joined #ruby
bonhoeffer has quit [Client Quit]
piotr has quit [Ping timeout: 260 seconds]
_veer has joined #ruby
_veer has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
jpcamara has joined #ruby
devoper has quit [Remote host closed the connection]
markisonfire has joined #ruby
ozgura has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
cantonic has quit [Quit: cantonic]
jeffreybaird has quit [Quit: jeffreybaird]
hbpoison has joined #ruby
rh1n0 has quit [Quit: -- I'm out --]
stkowski has quit [Quit: stkowski]
Takehiro has quit [Remote host closed the connection]
bean has quit [Quit: Computer has gone to sleep.]
realDAB has quit [Quit: realDAB]
hoelzro|away is now known as hoelzro
<cr3>
is there a nice way in ruby to return from a function the value in a hash if the key is in the hash? I currently do this but, out of curiosity, I wonder if there's a cooler way to do the same: if foo = ENV['foo']; return foo; end
<apeiros_>
cr3: and what do you return otherwise?
<Spooner>
cr3, You can just do def f; ENV['foo']; end
adkron has quit [Ping timeout: 264 seconds]
vaicine_ is now known as vaicine
<apeiros_>
^ if you return nil otherwise…
vaicine has quit [Changing host]
vaicine has joined #ruby
wyhaines has quit [Remote host closed the connection]
<Hanmac>
or something like: ENV['foo'] || "defaultvalue"
<Spooner>
Yes, you could do def f; ENV['FOO'] || DEFAULT_VALUE; end in the other case.
__Big0__ has quit [Remote host closed the connection]
<apeiros_>
ENV is technically not a hash
<apeiros_>
with a hash, you'd better use fetch if you want a use-case specific default
hbpoison has quit [Ping timeout: 256 seconds]
<apeiros_>
hash.fetch(:key, "default for this fetch")
kpshek_ has quit []
kornnflake_zzz is now known as kornnflake
yfeldblum has joined #ruby
<apeiros_>
if you want a global (per hash) default, define the hash accordingly: h = Hash.new(0) # h[:inexistent_key] will now return 0
hbpoison has joined #ruby
Virunga has quit [Remote host closed the connection]
kpshek has joined #ruby
kpshek has quit [Client Quit]
FuzaiDesktop has quit [Ping timeout: 276 seconds]
stkowski has joined #ruby
linoge has quit [Read error: Connection reset by peer]
<cr3>
apeiros_: nah, the function continues otherwise
<apeiros_>
cr3: ew, spagetthi
<Hanmac>
but beware when you use other values than integer or floats as Hash default value ... because you will still access the default object and maybe not what you want
<apeiros_>
cr3: also, method, not function
<cr3>
apeiros_: I'm open to suggestions :)
linoge has joined #ruby
<apeiros_>
cr3: can't tell without seeing code
<apeiros_>
I'm not psychic
<cr3>
apeiros_: agreed, it's not clear anymore. I'll rework the code to remove some of the spaghetti
<apeiros_>
ah well, actually the suggestion is generic: return at the end of your method.
slainer68 has joined #ruby
whowantstolivef1 has joined #ruby
_nitti_ has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
freakazoid0223 has quit [Ping timeout: 258 seconds]
c0rn has joined #ruby
d34th4ck3r has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
lancepantz_ is now known as lancepantz
Davey has quit [Quit: Computer has gone to sleep.]
solidoodlesuppor has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
alex__c2022 has quit [Quit: alex__c2022]
ner0x has joined #ruby
FuzaiDesktop has joined #ruby
<Xeago>
apeiros_: you feeling hots tonight?
<Xeago>
haven't played ladder yet
<apeiros_>
hmmmm
j^2 has quit [Ping timeout: 240 seconds]
<apeiros_>
reading "LLVM Language Reference Manual" atm, but I'm tempted
casheew has quit [Read error: Connection reset by peer]
<apeiros_>
no work tomorrow… so I could play for an hour, then continue reading
<Xeago>
wtheck are you doing with compilers?
<apeiros_>
shits and giggles
<Xeago>
or, assembler
LouisRoR has quit [Ping timeout: 245 seconds]
<apeiros_>
also still looking for a proper way to implement my own language's runtime
<Xeago>
:O
alvaro_o has quit [Quit: Ex-Chat]
<Xeago>
I've made 'X' for a school project, written in c--
<pskosinski>
Any tip what can be wrong with: http://paste.debian.net/241766/ ? username and password are for 100% valid, script is creating valid hash but query to database is returning empty array, so select failed. When I do it manually then works. When I fill username = … and password = hash just before query then works. I was also trying SHA256.hexdigest(password).to_s but result is same, not working
<Xeago>
still have to get the source back from college, now that I am graduated
rismoney has joined #ruby
<Xeago>
at least 50% of the rights of it
cburyta has quit [Ping timeout: 258 seconds]
ddd has quit [Ping timeout: 245 seconds]
<Xeago>
currently they hold "near-equal share in their favor"
cmarques has quit [Ping timeout: 260 seconds]
<apeiros_>
Xeago: ok, lets HOTS for 30-60min
<Xeago>
skype as well?
<apeiros_>
yeah, ok
dougireton1 has quit [Quit: Leaving.]
danslo has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
_nitti has quit [Ping timeout: 260 seconds]
tonini has quit [Remote host closed the connection]
casheew has joined #ruby
hbpoison has joined #ruby
nicoulaj has quit [Remote host closed the connection]
_nitti has joined #ruby
nomenkun has quit [Remote host closed the connection]
cburyta has joined #ruby
blacktulip has quit [Remote host closed the connection]
yxhuvud2 has joined #ruby
tealmage has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
<markalanevans>
Spooner: ? what do you mean? This is just one example of many, where it would be really handy to know how to get what i want using regex.
Davey has quit [Quit: Computer has gone to sleep.]
<pskosinski>
Is there something else than sqlite and Sequel, for sqlite?
frem has quit [Ping timeout: 246 seconds]
dustint has quit [Quit: Leaving]
<Spooner>
Plenty of ORMs you could use, pskosinski, like ActiveRecord or DataMapper.
havenwood has joined #ruby
jonathanwallace has joined #ruby
<Spooner>
markalanevans, But if you just want to learn some regexp: /\/*.*\/exec\/obidos\/tg\/detail\/-\/(.*)(?=\?)/ or /\/*.*\/exec\/obidos\/tg\/detail\/-\/([^\?]*)/
jlast has quit [Remote host closed the connection]
axxT has quit [Read error: Connection reset by peer]
axxT has joined #ruby
axxT has quit [Changing host]
axxT has joined #ruby
dmiller2 has joined #ruby
johnnygoodmancp1 has quit [Ping timeout: 276 seconds]
carlyle has quit [Remote host closed the connection]
<shevy>
ack
<shevy>
Spooner you scared him for the rest of his life now man :(
<aedorn>
shevy: a good replacement to grep
Ng|Adonixx2845 has joined #ruby
Ng|Adonixx2845 has quit [Client Quit]
<shevy>
hehe
<shevy>
the full unix toolchain in pure ruby!
<aedorn>
ugh.. I'm working through secure boot right now for my "built with Ruby" distro. It's less fun than portage.
<shevy>
hmm portage is written in python right?
<shevy>
dunno if I know secure boot... probably not
felixjet has quit [Quit: Leaving]
hasimo has joined #ruby
<aedorn>
yeah, it's Python. For awhile I was just wrapping it, but I've begun replacing it.
statarb3 has quit [Read error: Connection reset by peer]
Davey has joined #ruby
axxT has quit [Ping timeout: 256 seconds]
drumsrgr8forn8 has quit [Ping timeout: 246 seconds]
<lectrick>
Is there any possible weird way (ruby 1.9.3 latest patch) that a call to "block.call(*args)" would result in a "undefined method `[]' for nil:NilClass" error? Something to do with the splat? I can't seem to dupe it in IRB
Jork1 has joined #ruby
Jork1 has left #ruby [#ruby]
<lectrick>
That's literally the last line of the stack trace
Mon_Ouie has quit [Ping timeout: 246 seconds]
vickaita has quit [Ping timeout: 260 seconds]
piotr__ has quit [Ping timeout: 258 seconds]
deric_skibotn has quit [Ping timeout: 240 seconds]
emergion has joined #ruby
<lectrick>
args at that point is an array of 1 (non-nil) object.
jbueza has quit [Quit: Leaving.]
<lectrick>
And the block it's calling has arity 1.
generalissimo has quit [Remote host closed the connection]
jgarvey has quit [Quit: Leaving]
Takehiro has joined #ruby
Virunga has joined #ruby
alanp_ has joined #ruby
vickaita has joined #ruby
mneorr has quit [Remote host closed the connection]
<lectrick>
maybe some code in the block itself?
pyrac has quit [Quit: pyrac]
<aedorn>
lectrick: most likely
KDiddy has joined #ruby
monkegjinni has quit [Remote host closed the connection]
chrishough has joined #ruby
<lectrick>
so it won't dig into the line number of the block that is actually throwing the error? it stops at the block.call?
neku has quit [Ping timeout: 248 seconds]
<lectrick>
is there any way to hint it?
Liquid-- has joined #ruby
Liquid-- has quit [Client Quit]
alanp has quit [Ping timeout: 272 seconds]
Takehiro has quit [Ping timeout: 256 seconds]
<aedorn>
Just look at what's calling [] in this case
danslo has quit [Quit: danslo]
emergion has quit [Ping timeout: 264 seconds]
tomzx_mac_ has joined #ruby
<lectrick>
yep, ended up being inside the block. thanks. just was wondering why the stack trace didn't delve into the block
FuzaiDesktop has quit [Ping timeout: 256 seconds]
KDiddy has quit [Remote host closed the connection]
nari has joined #ruby
tomzx_mac has quit [Ping timeout: 258 seconds]
anonymuse has quit [Quit: Leaving...]
lazypower has left #ruby [#ruby]
tommyvyo has joined #ruby
kornnflake is now known as kornnflake_zzz
tomzx_mac_ has quit [Ping timeout: 246 seconds]
c0rn has quit [Ping timeout: 246 seconds]
baroquebobcat has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
endzyme has quit [Remote host closed the connection]
tenmilestereo[aw has quit [Quit: Leaving]
felixjet has joined #ruby
c0rn has joined #ruby
niklasb has joined #ruby
etcetera has joined #ruby
h4mz1d has joined #ruby
yankeefan04 has joined #ruby
tcstar has quit [Ping timeout: 272 seconds]
jeffreybaird has joined #ruby
_nitti has quit [Remote host closed the connection]
yxhuvud has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
apalmblad has joined #ruby
quazimodo has joined #ruby
mg^ has joined #ruby
yxhuvud2 has quit [Ping timeout: 264 seconds]
mpfundstein has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Leaving...]
bean has quit [Quit: Computer has gone to sleep.]
biff_tannen has quit [Read error: Connection reset by peer]
ahammond has quit [Read error: Connection reset by peer]
<V8Energy>
guys, any ideas why am i getting such a huge Rational number when deducting today from yesterday? DateTime.now - DateTime.parse("Wed Mar 13 21:13:33 -05:00 2013")
<V8Energy>
I am getting: (39900191441/43200000000)