<Ox0dea>
molay: Well, persistence is almost always a precursor to querying; you do intend to query the data, right?
wldcordeiro has joined #ruby
diegoaguilar has quit [Ping timeout: 250 seconds]
eightbellyoct has quit [Quit: leaving]
zeroDivisible has quit [Quit: WeeChat 1.3]
yfeldblum has quit [Ping timeout: 246 seconds]
zeroDivisible has joined #ruby
djbkd has joined #ruby
leafybas_ has quit [Remote host closed the connection]
atomical has joined #ruby
joneshf-laptop has quit [Ping timeout: 246 seconds]
zeroDivisible has quit [Client Quit]
zeroDivisible has joined #ruby
infamos has quit [Ping timeout: 250 seconds]
TomPeed has joined #ruby
yfeldblum has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.4-dev]
cmoneylulz has joined #ruby
cicloid has quit [Ping timeout: 250 seconds]
<danneu>
molay: it's often a bad sign if you're manually escaping things.
Ox0dea has joined #ruby
Uranio has quit [Ping timeout: 246 seconds]
<molay>
Ox0dea: yes I will need to query too
cicloid has joined #ruby
<Ox0dea>
molay: Then SQLite3 is a fine choice, and the Sequel gem is great for interacting with it.
rgb-one has quit [Ping timeout: 260 seconds]
Steve_Jobs has quit [Quit: WeeChat 0.4.2]
Trynemjoel has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
<eam>
not sqlite4?
jorb has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
Yzguy has joined #ruby
<molay>
Ox0dea: well i'm noticing a lot of comments saying its not a good idea doing it the way i'm doing it... each line of the table has 25 items, and I wasn't sure how else to input that many without building a string as i was writing the query
djbkd has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
<dorei>
how can i find which items of an array are duplicate?
<Ox0dea>
molay: You should probably be using a prepared statement.
Steve_Jobs has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
tvw has quit [Remote host closed the connection]
<molay>
Ox0dea: how do you mean "prepared statement" ?
Guest20167 has quit [Ping timeout: 246 seconds]
<eam>
fun fact: a lot of database drivers just turn prepared statements into interpolated strings within the driver
cicloid has quit [Read error: No route to host]
<Ox0dea>
molay: It's very Google-able. :P
jorb has joined #ruby
cicloid has joined #ruby
<molay>
Ox0dea: yep, found it.. thank you
<molay>
I sure have a long way to go... the ruby world is huge!!
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<Ox0dea>
It's... pretty big, yeah.
eightbellyoct has joined #ruby
<eam>
the sun never sets, etc
diegoaguilar has joined #ruby
Steve_Jobs has quit [Client Quit]
<molay>
haha. eam you must be british
Steve_Jobs has joined #ruby
<shevy>
is it vampire time again?
axsuul has joined #ruby
leafybas_ has joined #ruby
Eiam has joined #ruby
<molay>
ok bbl.. thanks guys
infamos has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
spawn of, at least
<Ox0dea>
shevy: 1827 is a vampire time, and it's just around the corner for some folks.
<Ox0dea>
There's one O(n) approach, but there are others.
kies has joined #ruby
<Ox0dea>
It's better than the O(n^2) approach of assigning your collection to a variable and using `foo.select { |e| foo.count(e) > 1 }`, at any rate.
<jericon>
Ox0dea: you helped me a couple weeks ago about finding a Ruby equivilent to MySQL's "to_days" function and it was 2 days off. I figured out why.
<Ox0dea>
jericon: Enlighten me. :)
<jericon>
Ox0dea: Ruby starts at day 0, while mysql starts at day 1 (0000-01-01).
<jericon>
so that's one day
<jericon>
also, ruby figured that 0000 was a leap year
<Ox0dea>
Ah, interesting.
<Ox0dea>
It's hard to say whether those assumptions are entirely wrong or right.
<Ox0dea>
We index everything else from zero; why not history?
<Ox0dea>
Counting 0 as a leap year seems a little weird, though.
<eam>
dealing with dates which span governments is always difficult
djbkd has joined #ruby
<Ox0dea>
/which span governments/d
<eam>
yes, I should say even moreso than usual
<eam>
see also: maps
centrx has joined #ruby
charliesome has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
TPBallbag has joined #ruby
<jericon>
exactly, 0000 was a leap year, and MySQL didn't even recognize 0000-02-29 as a valid day.
eminencehc has quit [Remote host closed the connection]
<Ox0dea>
I think it's probably the case that MySQL's interpretation is more accurate by dint of including some of the "political" information.
<jericon>
although ultimately... I updated my script to use this:
<jericon>
cur_days = @client.query("SELECT to_days(now()) as days").first["days"]
patdohere has joined #ruby
djbkd has quit [Remote host closed the connection]
<jericon>
Then I can rely on MySQL giving me what it believes is the number, and only using that. No fiddling necessary
Arkon has joined #ruby
atomical has joined #ruby
<Ox0dea>
If it fits, you ships.
ciampix has quit [Ping timeout: 265 seconds]
lazyatom has quit [Quit: Connection closed for inactivity]
<jericon>
My fear is that somewhere down the line, something would change and then Ruby would be 1 day off... or 3 days off... and then the script breaks.
<jericon>
but thanks for the help :)
patdohere has quit [Ping timeout: 276 seconds]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
KINGSABRI has quit [Remote host closed the connection]
<FailBit>
nexus 5x doesn't come with a regular USB cable so I had to wait to get an adapter
<FailBit>
now it takes a nanosim instead of a microsim
<FailBit>
so I have to clip my simcard
<FailBit>
-.-
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
rgtk has quit [Read error: No route to host]
northfurr has joined #ruby
rgtk_ has joined #ruby
paradisaeidae has joined #ruby
djbkd has quit [Quit: My people need me...]
RegulationD has joined #ruby
rgtk has joined #ruby
rgtk_ has quit [Ping timeout: 260 seconds]
poguez_ has joined #ruby
roxtrongo has quit [Remote host closed the connection]
pkrnj has joined #ruby
jobewan has quit [Ping timeout: 240 seconds]
pkrueger has quit [Quit: Leaving]
axsuul has quit [Read error: No route to host]
musou has quit [Quit: Connection closed for inactivity]
DLSteve has joined #ruby
tubuliferous_ has quit [Ping timeout: 252 seconds]
rgtk has quit [Ping timeout: 260 seconds]
h99h9h88 has joined #ruby
rgtk has joined #ruby
NeverDie has joined #ruby
leafybas_ has joined #ruby
atomical_ has joined #ruby
amclain has quit [Quit: Leaving]
CloCkWeRX has joined #ruby
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #ruby
NeverTired has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
mattwildig has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
mattwildig has quit [Client Quit]
s00pcan has quit [Ping timeout: 250 seconds]
leafybas_ has quit [Ping timeout: 252 seconds]
eminencehc has joined #ruby
skweek has joined #ruby
JDiPierro has quit [Remote host closed the connection]
s00pcan has joined #ruby
baweaver has joined #ruby
rgtk has joined #ruby
NeverDie has quit [Ping timeout: 250 seconds]
jobewan has joined #ruby
Sembei has quit [Ping timeout: 240 seconds]
Yzguy has quit [Quit: Zzz...]
Jardayn has quit [Quit: Leaving]
hxegon has quit [Ping timeout: 276 seconds]
|ifei5good has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
jessemcgilallen has joined #ruby
skweek has quit [Remote host closed the connection]
rgtk has quit [Ping timeout: 260 seconds]
kp666_ has quit [Quit: Leaving]
towski_ has quit [Remote host closed the connection]
charany1 has joined #ruby
|ifei5g00d has quit [Ping timeout: 264 seconds]
droptone has joined #ruby
<droptone>
Question: I've been studying YAML for a bit using Ruby, and I'm attempting to write an array to a YAML file.
<droptone>
Anyone have any recommendations on a tutorial for such?
northfurr has quit [Quit: northfurr]
vdamewood has quit [Quit: Life beckons.]
<droptone>
I read about PSStore, is there a quick way to write, for example, a hash that has a string and an array, to a yaml file?
NeverDie has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
rgtk has joined #ruby
DiCablo has joined #ruby
<Ox0dea>
droptone: You can use `YAML.dump hash` or `hash.to_yaml` to get a string, and then write that to a file however you know how.
<droptone>
Can you simply use Yaml::load_file if the file doesn't exist?
<droptone>
Ox0dea: Thank you.
northfurr has joined #ruby
cdg has quit [Remote host closed the connection]
favadi has joined #ruby
<Ox0dea>
droptone: File.write('foo', bar) will open 'foo' in write mode (thus overwriting its previous contents if they existed), write `bar` as a string (by invoking its #to_s method), and then close the file.
northfurr has quit [Client Quit]
favadi has quit [Max SendQ exceeded]
<droptone>
Ok, so for writing a file in YAML format, are there no YAML-specific methods I should leverage?
cicloid has joined #ruby
<droptone>
Or just use standard File.write and manually write in YAML-compatible format?
gambl0re has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
rgtk has quit [Ping timeout: 260 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
<Ox0dea>
droptone: YAML.dump can be given an IO-like as its second argument.
<Ox0dea>
I guess that's probably the one you want.
hxegon has joined #ruby
ruby-lang674 has joined #ruby
ruby-lang674 has left #ruby [#ruby]
<Ox0dea>
"IO-like" here means anything which has IO as an ancestor or responds to #write.
devoldmx has joined #ruby
rgtk has joined #ruby
<droptone>
Gotcha, thank you.
ruby-lang429 has joined #ruby
<ruby-lang429>
hi
<ruby-lang429>
can someone help me with a webscraper
<droptone>
lol
<ruby-lang429>
i need an algorithm to scrape all the text from each profile in angel list
Rickmasta has joined #ruby
<baweaver>
do they have an API?
<ruby-lang429>
no
<baweaver>
if not, it's generally considered bad form to scrape
<ruby-lang429>
i was able to scrape the names of the people
paradisaeidae has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
<Ox0dea>
> [C]rawling the Service is permissible in accordance with this agreement, but scraping the Service without the prior consent of AngelList except as permitted by this agreement is expressly prohibited.
<Ox0dea>
ruby-lang429: ^
rbowlby has quit [Remote host closed the connection]
rbowlby has joined #ruby
rgtk has joined #ruby
scmx has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hxegon has quit [Ping timeout: 276 seconds]
<baweaver>
Use the API
<baweaver>
it'd be easier to use anyways
paradisaeidae has joined #ruby
hxegon has joined #ruby
charliesome has joined #ruby
<ruby-lang429>
i'd rather not use it
<Ox0dea>
I'm phoning the authorities.
vigintas has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* baweaver
kinda is the law in these here parts
Sembei has joined #ruby
<baweaver>
ruby-lang429: we're not going to help you break their rules
houhoulis has joined #ruby
<havenwood>
AngelList Terms of Service § XIII(c)(xvii): Participants in the AngelList community will not ... use or launch, develop or distribute any automated system, including, without limitation, any spider, robot (or "bot"), cheat utility, scraper or offline reader that accesses the Service....
<baweaver>
The API will be a cleaner and easier interface to work with.
bruno- has joined #ruby
cmoneylulz has joined #ruby
diegoaguilar has joined #ruby
scmx has quit [Ping timeout: 252 seconds]
bruno- is now known as Guest8103
<Ox0dea>
ruby-lang429: Scraping is a gateway crime.
rgtk has quit [Ping timeout: 260 seconds]
<havenwood>
And unfortunately probably a Federal crime under the CFAA.
<havenwood>
(If you're in the States.)
<baweaver>
well, we've already covered that it's bad, so we can leave it at that.
<dorei>
scraping is a crime? :O
Arkon has quit [Remote host closed the connection]
<baweaver>
no need to go over it multiple different ways.
<havenwood>
dorei: The Computer Fraud and Abuse Act is incredibly broad.
framlinqp has quit [Ping timeout: 255 seconds]
Arkon has joined #ruby
<dorei>
how is scraping different from having someone clicking each link and then print screen? or is that a crime too? :O
tubuliferous_ has joined #ruby
vigintas has quit [Ping timeout: 244 seconds]
<havenwood>
dorei: Everything is a crime. They just pick whom to prosecute.
<baweaver>
let's go to offtopic if we want to delve this much deeper
goodcodeguy has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
Trieste has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
pdoherty has quit [Ping timeout: 252 seconds]
cmoneylulz has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
Guest8103 has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
Arkon has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
karapetyan has joined #ruby
CVTJNII has quit [Ping timeout: 264 seconds]
<BraddPitt>
Can anyone lend an eye to do a code review on a gem I wrote?
eminencehc has quit [Remote host closed the connection]
NeverDie has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
karapetyan has quit [Remote host closed the connection]
NeverDie has joined #ruby
jorb has joined #ruby
karapetyan has joined #ruby
SamGerber has quit [Quit: Leaving]
Sam_Gerber has quit [Quit: Leaving]
EllisTAA has left #ruby [#ruby]
Arkon has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has quit [Remote host closed the connection]
NeverDie has quit [Client Quit]
solocshaw has joined #ruby
NeverDie has joined #ruby
asas has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
jgpawletko has quit [Ping timeout: 265 seconds]
wildlander has joined #ruby
NeverDie has quit [Max SendQ exceeded]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vigintas has joined #ruby
molay has quit [Quit: Leaving]
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest17385
vigintas has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
x-light has quit [Ping timeout: 264 seconds]
Rinzlit_ has joined #ruby
Rinzlit has quit [Ping timeout: 264 seconds]
Guest17385 has quit [Ping timeout: 240 seconds]
Rinzlit has joined #ruby
charliesome has joined #ruby
Rinzlit_ has quit [Ping timeout: 240 seconds]
x-light has joined #ruby
eminencehc has joined #ruby
Arkon has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
Rinzlit_ has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
tubuliferous_ has quit [Read error: Connection reset by peer]
Rinzlit has quit [Ping timeout: 240 seconds]
TPBallbag has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has quit [Ping timeout: 240 seconds]
braincras has quit [Quit: bye bye]
x-light has quit [Ping timeout: 255 seconds]
sam_ has joined #ruby
Eiam_ has joined #ruby
gix has quit [Ping timeout: 250 seconds]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
jobewan has quit [Ping timeout: 252 seconds]
TPBallbag has quit [Ping timeout: 250 seconds]
agent_white has joined #ruby
<sam_>
Hi there, sorry for bothering everyone...a bit of a newbie question here, but I have looked and can't find what I'm looking for. I'd like to see ruby documentation in the command line. I've been trying to massage ri to fit the need, but keep running into issues and have read that when used in conjunction with rvm it will eat a lot of memory. Can anyone recommend a way to find ruby documentation that interrupts one's workflow less than naviga
<sam_>
ting to ruby-doc.org?
<dionysus69>
i know how to access last object in array but how do I access one before last?
<sam_>
.[-2]
<dionysus69>
oh nice didnt know negative worked thanks sam_
skweek has joined #ruby
Yzguy has quit [Quit: Zzz...]
braincrash has joined #ruby
paradisaeidae has joined #ruby
Yzguy has joined #ruby
gix has joined #ruby
musou has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white>
Evenin' folks
<Ox0dea>
sam_: I'm not sure I follow; ri is really how you ought to be accessing Ruby documentation from the command line.
colegatron has joined #ruby
freedrull has joined #ruby
ruby-lang429 has quit [Ping timeout: 246 seconds]
<freedrull>
module names matching the file path, convention or hard requirement? eg Foo::Bar::Baz is located foo/bar/baz.rb
<Ox0dea>
freedrull: Convention, but there's no particularly compelling reason to break it.
<freedrull>
right
watsy has joined #ruby
Yzguy has quit [Quit: Zzz...]
DLSteve has joined #ruby
<freedrull>
its kind of hard to make a good case against it in a code review, since it doesn't necessarily break anything
<Ox0dea>
It breaks Rails' autoloading mechanism.
<pontiki>
breaking a convention is a great reason to flag it
<pontiki>
there should be good reasons given for breaking conventions, not the other way 'round
northfurr has joined #ruby
s00pcan has quit [Remote host closed the connection]
<freedrull>
Ox0dea: oh right, thats true, i have definitely seen that before
<freedrull>
pontiki: makes sense
fedexo has joined #ruby
Yzguy has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
dorei has quit []
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
rbowlby has joined #ruby
RobertBirnie has joined #ruby
maxzda has joined #ruby
shock_one has joined #ruby
<sam_>
Ox0dea, thank you, I will try harder to get it working.
<bnagy>
sam_: I think pry does docs
agent_white has quit [Read error: Connection reset by peer]
<bnagy>
and most ruby workflows probably involve an open pry (or irb) window
yfeldblum has quit [Ping timeout: 240 seconds]
govg has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sam_ has quit [Remote host closed the connection]
sam_ has joined #ruby
kobain has quit [Ping timeout: 250 seconds]
agent_wh1te has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Zzz...]
agent_wh1te is now known as agent_white
freerobby has quit [Quit: Leaving.]
agent_white has quit [Changing host]
agent_white has joined #ruby
<sam_>
bnagy, what would you type in a pry or irb prompt
Rickmasta has joined #ruby
newdan has quit [Remote host closed the connection]
ThatsNotJack has quit [Remote host closed the connection]
<Ox0dea>
sam_: help
ThatsNotJack has joined #ruby
<sam_>
Ox0dea, thanks
<Ox0dea>
sam_: Sure thing.
<sunya7a>
how do i sort an array of objects into groups based on a property of the object?
ThatsNotJack has quit [Remote host closed the connection]
craigp_ has quit [Remote host closed the connection]
_blizzy_ has quit [Quit: Leaving]
Arkon has quit [Remote host closed the connection]
Arkon has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkf has joined #ruby
ngscheurich has joined #ruby
h99h9h88 has joined #ruby
Arkon has quit [Read error: Connection reset by peer]
ngscheurich has quit [Client Quit]
Arkon has joined #ruby
leafybas_ has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infamos has quit [Ping timeout: 250 seconds]
leafybas_ has quit [Ping timeout: 265 seconds]
<sam_>
Ox0dea and bnagy, I know you probably think me a fool (and are likely right) but your simple instructions helped me out worlds - I wasn't using half of what pry is good for.
<Ox0dea>
sam_: Probably not even a tenth! :P
<sam_>
Thank you
<Ox0dea>
It's a very powerful tool.
<sam_>
Ox0dea, even that's generous
<Ox0dea>
sam_: In any case, I'm glad we've helped you to see that particular light.
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
h99h9h88 has quit [Remote host closed the connection]
sleetdrop has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
<Ox0dea>
mallu: Yep, just flip the parameters for `calculate`.
<mallu>
Then I get this error syntax error, unexpected '=', expecting ')' def calculate(*numbers, options = {} ) ^ from C:/Ruby22-x64/bin/irb:11:in `<main>'
devoldmx has joined #ruby
<Ox0dea>
mallu: You'll need to make options a keyword argument.
<mallu>
Ox0dea: how do you do that? I'm new at this
<Ox0dea>
mallu: Er, sorry, that wouldn't quite work. You'll have to use `add` and `subtract` as optional keyword arguments.
jobewan has joined #ruby
<Ox0dea>
Alternatively, you could just accept *arguments, and then pop the last and use it as the options if and only if it's a Hash, but that's hackish.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Remote host closed the connection]
framling has joined #ruby
favadi has joined #ruby
<mallu>
"You'll have to use `add` and `subtract` as optional keyword arguments" How do you do that?
ss_much has quit [Quit: Connection closed for inactivity]
marr has quit [Ping timeout: 250 seconds]
rbowlby has quit [Ping timeout: 240 seconds]
<blubjr>
oh im an idiot i didnt read far enough down that page
<blubjr>
thank you
yes`r has quit [Ping timeout: 265 seconds]
colegatron has joined #ruby
Rollabunna has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
DEA7TH has quit [Quit: DEA7TH]
karapetyan has joined #ruby
unclouded has quit [Ping timeout: 246 seconds]
noodle has quit [Ping timeout: 252 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 272 seconds]
avelldiroll has quit [Quit: WeeChat 0.3.8]
skade has joined #ruby
DEA7TH has joined #ruby
voodo has quit [Quit: Leaving...]
DEA7TH has quit [Client Quit]
blackmesa has quit [Ping timeout: 240 seconds]
voodo has joined #ruby
avelldiroll has joined #ruby
Peg-leg has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
astrobunny has quit [Remote host closed the connection]
favadi has joined #ruby
pandaant has quit [Remote host closed the connection]
qiukun has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
__desmondhume has quit [Remote host closed the connection]
doddok has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
dikaio_ has quit [Quit: ........]
agent_white has quit [Quit: blur]
shock_one has quit [Read error: Connection reset by peer]
sinkensabe has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
ldnunes has joined #ruby
sinkensabe has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
skade has quit [Ping timeout: 240 seconds]
guillaume-rb has quit [Quit: guillaume-rb]
yeticry has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
yeticry has joined #ruby
platzhirsch has joined #ruby
ctp has quit [Quit: Connection closed for inactivity]
vondruch_ has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lipoqil has quit [Quit: Connection closed for inactivity]
Pupp3tm4st3r has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest73316
__desmondhume has joined #ruby
craigp has quit [Remote host closed the connection]
<norc>
Other than Ripper.sexp or compiling with CPDEBUG, is there a way to get a look at the AST, ideally seeing the actual NODE_ types and underlying structures?
<norc>
Or do I have to plug in my debugger for this?
<norc>
yorickpeterse: Thank you I shall assess its usability for my scenario. :)
noodle has joined #ruby
dhjondoh has joined #ruby
<norc>
Or maybe I should just figure out whether I can fix this bug in the compiler. CPDEBUG really is what I want in the end.
dionysus69 has joined #ruby
senayar has joined #ruby
lseactuary has joined #ruby
lubekpl has joined #ruby
<lseactuary>
anyone here know of a software where i can build a 'front end' to a manhattan/vertica back end y dragging/dropping elements instead of actually coding. similar to this: http://pinegrow.com/docs/editing/layout.html
<lubekpl>
lseactuary I guess you can create a simple template quickly and easily in this, and then use something like https://github.com/ankane/chartkick for graphs
minimalism has quit [Quit: leaving]
<lseactuary>
lubekpl the problem is i cant code - therefore i need a tool where i can drag/drop/change stuff
skade has joined #ruby
dionysus69 has joined #ruby
beauby has joined #ruby
<kiki_lamb>
if my class has both an cluded module and a parent class, both containing an initialize method, how do I control which one I am calling with super in my own class's initialize method?
karapetyan has quit [Remote host closed the connection]
dhjondoh has quit [Remote host closed the connection]
stamina has joined #ruby
<kiki_lamb>
suchness: if i'm reading that right, there's no way to ensure both intializers are called, assuming the module and parent class don't know about each other
<kiki_lamb>
sounds like super will hit the included module, and the parent class's initialize will never be called?
<suchness>
Correct
blackmesa has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
<suchness>
Well
<suchness>
You could call super in the module
govg has joined #ruby
subscope has joined #ruby
govg is now known as Guest28473
<norc>
Just remember the difference between super and super()
<kiki_lamb>
seems like for that to work properly, the module would need to know something about the parent class
* norc
is still baffled by that
avril14th has joined #ruby
<suchness>
kiki_lamb: Well, it depends on what exactly you are trying to accomplish, in some situations the module would know, other times not so much. I don't know what you are implementing, but basically that's the lookup, if you need it to do something different you need to call super where necessary, or implement your architecture differently.
<norc>
kiki_lamb: Best way would be to not define an initialize method in a module, but work with callbacks rather.
<norc>
Let your class hierarchy call callbacks, that your module can register.
<norc>
For example
dionysus69 has quit [Ping timeout: 246 seconds]
Azure has joined #ruby
voodo has joined #ruby
dionysus69 has joined #ruby
<kiki_lamb>
right now i've got something like 'class Instruments < Hash; include TimingScope; ...; end'. Each Instruments needs to initialize it's parent Hash with certain arguments, but it also needs to do the same with it's TimingScope.
<blubjr>
super without parens implicitly passes arguments up right
<kiki_lamb>
there are plenty of other classeds including TimingScope that are not descendents of Hash, so having TimingScope initialize the Hash seems impractical
<kiki_lamb>
blubjr: yup
<norc>
blubjr: It also passes a block if present. ;-)
<kiki_lamb>
^ figured that was kind of implied, but yeah
<norc>
Ideally just use super() - it is so much more readable.
<kiki_lamb>
suchness: so, for my snippet there, is there any possible way for Instruments (not it's included TimingScope) to initialize it's parent Hash?
<norc>
kiki_lamb: Heh, internally blocks are considered very much differently from arguments.
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus70 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<suchness>
kiki_lamb: I don't see a snippet
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
<kiki_lamb>
norc: maybe under the hood, sure.. but from a language user perspective, though, they're integrated into the method argument system and at any given time they're a character or two of sugar away from being the same as any typical Proc argument.
trosborn has quit [Quit: trosborn]
<kiki_lamb>
suchness: 'class Instruments < Hash; include TimingScope; ...; end'
tvw has joined #ruby
Jamo has quit [Remote host closed the connection]
<blubjr>
blocks are a really ugly wart to me right now still i've only been doing ruby for like a week tho, maybe theyll grow on me
<suchness>
kiki_lamb: I think if that's your goal you need to look at composition over inheritance
dhjondoh has joined #ruby
Jamo has joined #ruby
DEA7TH has joined #ruby
<kiki_lamb>
blubjr: definitely. once you get to the point where you're building your own little task specific DSLs you'll find that often half the arguments you're dealing with are blocks.
lxsameer has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
voodo has quit [Read error: Connection reset by peer]
<norc>
kiki_lamb: The most interesting part about blocks is, is that they are one of the very few things that actually are not objects in Ruby.
donske has joined #ruby
lkba has joined #ruby
bweston92 has quit [Quit: Leaving]
devbug_ has joined #ruby
Guest66467 has quit [Changing host]
Guest66467 has joined #ruby
<kiki_lamb>
norc: sure, just not something you have to think about a lot as a user, given how trivial it is to box/unbox them in Procs
Musashi007 has joined #ruby
Guest66467 is now known as Affix
<pontiki>
the most interesting part about blocks to me is how i can use them
favadi has joined #ruby
<norc>
kiki_lamb: I was just trying to make a point. IMO it is not obvious that super should also pass along a block, especially since is neither implemented as an argument, nor does it look like one, or becomes apparent that one can be passed.
zacts has quit [Read error: Connection reset by peer]
<lseactuary>
anyone have ideas?
devbug has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
dreinull75 has quit [Remote host closed the connection]
<suchness>
lseactuary: You want a drag and drop front end because you can't code and you're asking in an IRC dedicated to coding, I don't think you will get much in the way of help.
<suchness>
wordpress
<suchness>
shopify
<lseactuary>
suchness then what do i do?
<suchness>
tumblr
<suchness>
lseactuary: Well, learn to code perhaps.
<pontiki>
pay someone(s) to make it for you
<suchness>
^
<lseactuary>
i dont have that option
<lseactuary>
and i have tried learning but i dont even know where to start
<suchness>
Better start learning then.
__desmondhume has quit [Remote host closed the connection]
<norc>
kiki_lamb: And in cases of class hierarchies, an upper method that does fancy things based on block_given? can suddenly lead to bugs. :D
<suchness>
There are a lot of first rails app tutorials on the internet, pick one.
<lseactuary>
and there is no one at my company who can walk me through stuff
zacts has joined #ruby
<lseactuary>
i dont even know if rails is what i need
gusTester has joined #ruby
<suchness>
lseactuary: What is your job?
<lseactuary>
my job is to analyse data and scope tools
<lseactuary>
the problem is without programming i cant get the data nor build any tools
<lseactuary>
so we hired a data engineer who is writing scripts for data
<suchness>
lseactuary: I think you might need to find another job then.
<lseactuary>
but i need to help him wit hthe front end
rgtk has joined #ruby
beauby has quit [Ping timeout: 252 seconds]
<lseactuary>
because we are under-resources
<suchness>
If you aren't willing to learn how to do your job it's better you let someone who is.
<lseactuary>
well i didnt say i dont want to learn
<lseactuary>
i just have no clue where to start
<lseactuary>
people send me a bunch of github links and i dont get it
<lseactuary>
i dont have any background in this
<norc>
lseactuary: What do you want to learn?
<blubjr>
oh, i asked the other day but i dont think anyone answered, does ruby have something like lisp's FRESH-LINE, where it prints a newline unless you're already at the start of the line
<lseactuary>
its like learning a newl anguage
<lseactuary>
without any help
arup_r has quit [Ping timeout: 240 seconds]
holsee_ has quit [Quit: Connection closed for inactivity]
devbug_ has quit [Read error: Connection reset by peer]
<lseactuary>
i see
solocshaw has joined #ruby
chipotle has joined #ruby
<suchness>
lseactuary: For the future, HTML and CSS are not 'coding', though javascript is.
<lseactuary>
ok
<adaedra>
CSS is 'torture'.
<norc>
CSS is just widely misunderstood.
<suchness>
I like css
<suchness>
When it's nice and neat
<suchness>
But when it's not, then kill me please
<sapslaj>
Vanilla CSS can be a pain.
Ilyes512 has joined #ruby
<sapslaj>
Using a preproccessor makes things a little more managable.
Musashi007 has joined #ruby
<suchness>
lseactuary: Did one of those tools help?
fivnay has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
<lseactuary>
yes - exactly what i needed :)
Musashi007 has quit [Client Quit]
<suchness>
lseactuary: Good
monthy has quit [Ping timeout: 240 seconds]
sanjayu has quit [Quit: Leaving]
baweaver has joined #ruby
arup_r has joined #ruby
arup_r is now known as Guest3585
infamos has joined #ruby
tvw has quit [Ping timeout: 276 seconds]
TvL2386 has joined #ruby
Guest3585 is now known as arup_r
Guest28473 has quit [Ping timeout: 240 seconds]
kp666 has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: Ex-Chat]
blackmesa has quit [Ping timeout: 260 seconds]
beauby has quit [Ping timeout: 250 seconds]
syath has joined #ruby
infamos has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
lseactuary has quit [Quit: Page closed]
shredding has quit [Ping timeout: 240 seconds]
dhjondoh1 has joined #ruby
Guest58448 has quit [Quit: Leaving]
I has joined #ruby
I is now known as Guest61686
dhjondoh has quit [Read error: Connection reset by peer]
dhjondoh1 is now known as dhjondoh
ValicekB has quit [Ping timeout: 240 seconds]
heinrich5991 has quit [Ping timeout: 250 seconds]
SHyx0rmZ has quit [Ping timeout: 276 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scmx has quit [Ping timeout: 240 seconds]
valeri_ufo has quit [Ping timeout: 255 seconds]
parus has quit [Ping timeout: 255 seconds]
FailBit has quit [Ping timeout: 255 seconds]
ccooke has quit [Ping timeout: 246 seconds]
dooo has joined #ruby
ccooke has joined #ruby
lukaszes has quit [Ping timeout: 250 seconds]
<dooo>
hey
hxegon has quit [Ping timeout: 255 seconds]
<adaedra>
hej
Guest61686 has quit [Client Quit]
<blubjr>
hi dooo
heinrich5991 has joined #ruby
parus has joined #ruby
vondruch has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abbe has quit [Ping timeout: 240 seconds]
valeri_ufo has joined #ruby
LiamW has joined #ruby
LiamW is now known as FailBit
Ilyes512 has joined #ruby
<FailBit>
fuck freenode, okay
<FailBit>
grr
__desmondhume has joined #ruby
<adaedra>
?
trabulmonkee has joined #ruby
<FailBit>
splitting
abbe has joined #ruby
Guest73316 has quit [Ping timeout: 272 seconds]
Mon_Ouie has joined #ruby
<FailBit>
suchness: how did elastic stuff go
dhjondoh has quit [Quit: dhjondoh]
vondruch has quit [Quit: Ex-Chat]
benlovell has joined #ruby
MuffinPimp has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 244 seconds]
ValicekB has joined #ruby
Coldblackice_ has quit [Ping timeout: 240 seconds]
MuffinPimp has joined #ruby
donske has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
vondruch has joined #ruby
CloCkWeRX has joined #ruby
bruno- is now known as Guest80595
sunya7a__ has quit [Ping timeout: 252 seconds]
lkba_ has joined #ruby
<dooo>
I'm trying to translate some code from ruby from python. I stuck on line: .pack('n'). How that would be in python? What struct directive is equivalent to pack('n')?
zenguy_pc has quit [Ping timeout: 252 seconds]
benlovell has quit [Ping timeout: 260 seconds]
prestorium_ has joined #ruby
dhjondoh has joined #ruby
sunya7a__ has joined #ruby
RegulationD has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
CloCkWeRX has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
__desmondhume has quit [Remote host closed the connection]
__desmondhume has joined #ruby
prestorium has quit [Ping timeout: 276 seconds]
Icey has joined #ruby
gowikel has joined #ruby
freerobby has joined #ruby
AndyBotwin has joined #ruby
solocshaw1 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
zenguy_pc has joined #ruby
benlovell has joined #ruby
CloCkWeRX has joined #ruby
phutchins has quit [Disconnected by services]
phutchins1 has joined #ruby
beast has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<suchness>
FailBit: Really well, I decided to just do the one to one correlation, we don't really have a requirement to have more than one parent, so it should work out fine. We are collapsing all our indexes to just be in one with different types. It's going to be a couple months before we get through it all though. I have high hopes.
tkuchiki has joined #ruby
avril14th has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
voodo has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 272 seconds]
gowikel has quit [Ping timeout: 246 seconds]
doddok has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
karapetyan has joined #ruby
CloCkWeRX has quit [Client Quit]
CloCkWeRX1 has joined #ruby
<norc>
dooo: Array#pack
tk__ has joined #ruby
_blizzy_ has joined #ruby
|ifei5g00d has quit [Remote host closed the connection]
teclator has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
atomical has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 244 seconds]
avril14th has joined #ruby
Miron has quit [Ping timeout: 240 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbowlby has joined #ruby
jokke has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
brendan- has joined #ruby
jokke has joined #ruby
curses has joined #ruby
C0r3 has joined #ruby
sankaber has joined #ruby
roxtrongo has joined #ruby
rbowlby has quit [Ping timeout: 240 seconds]
build22 has quit [Ping timeout: 276 seconds]
CloCkWeRX has quit [Ping timeout: 260 seconds]
govg has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
joonty has quit [Quit: joonty]
yfeldblum has quit [Ping timeout: 240 seconds]
Miron has joined #ruby
dooo has quit [Quit: Page closed]
baweaver has joined #ruby
EldSEC has joined #ruby
htmldrum has quit [Ping timeout: 276 seconds]
mwlang has joined #ruby
prestorium_ is now known as prestorium
doddok has joined #ruby
fivnay has quit [Remote host closed the connection]
<bougyman>
According to the Ruby language docs, Dir.entries() does not guarantee any particular order of the listed files, so if you require some order it's best to do it explicitly yourself.
nibbo has quit [Ping timeout: 246 seconds]
<bougyman>
^ found on stackexchange
<mikecmpbll>
"Note that case sensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as does the order in which the results are returned."
abbe has quit [Ping timeout: 264 seconds]
<mikecmpbll>
but the results are still consistent for one OS
<mikecmpbll>
so it's not like, random.
<bougyman>
i think we're seeing cached results
<bougyman>
like if we did it again tomorrow it might be different.
th0m_ has quit [Ping timeout: 240 seconds]
abbe has joined #ruby
jdawgaz has joined #ruby
<bougyman>
. and .. are always first.
null__ has quit [Ping timeout: 264 seconds]
<bougyman>
ah, I jsut got diff results.
<bougyman>
copied my dir to another name, did the Dir.entries on that one, and the results are different.
<mikecmpbll>
ah, good thinking
<bougyman>
the only order that doesn't seem to change is . and ..
based_pdev_ has joined #ruby
<mikecmpbll>
cool :) well now I know!
based_pdev has quit [Ping timeout: 264 seconds]
null__ has joined #ruby
<bougyman>
me, too!
C0r3 has quit [Ping timeout: 264 seconds]
awk has quit [Ping timeout: 264 seconds]
C0r3 has joined #ruby
awk has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
infamos has quit [Ping timeout: 272 seconds]
Hounddog_ has joined #ruby
awk is now known as Guest71666
sepp2k has quit [Ping timeout: 240 seconds]
Guest80595 has quit [Ping timeout: 265 seconds]
dhjondoh has quit [Quit: dhjondoh]
Hounddog has quit [*.net *.split]
voodo|away is now known as voodo
whippythellama has joined #ruby
rodfersou is now known as rodfersou|lunch
<FailBit>
derp
<FailBit>
derpity derp derp
<FailBit>
it is only so fitting when I say that, I run a site with "derp" in the name :V
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
The_Phoenix has joined #ruby
<mikecmpbll>
underpants.io ?
<mikecmpbll>
tehe.
benlovell has quit [Ping timeout: 276 seconds]
kies has quit [Ping timeout: 272 seconds]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
daivyk has quit [Read error: Connection reset by peer]
frode15243 has quit [Ping timeout: 264 seconds]
Jardayn has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
Jardayn_two has joined #ruby
frode15243 has joined #ruby
baweaver has quit [Remote host closed the connection]
<apeiros>
blubjr: you can write a method to do that.
lxsameer has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 272 seconds]
mloy has quit [Ping timeout: 250 seconds]
plonk has joined #ruby
<apeiros>
x = or_set(foo(), default) { |x| bar?(x) }
naftilos76 has joined #ruby
bigmac_ has joined #ruby
ekinmur has joined #ruby
<apeiros>
but IMO that signature would be ugly
__desmondhume has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
__desmondhume has joined #ruby
<blubjr>
the closure complicates it
bigmac has quit [Ping timeout: 264 seconds]
mattwildig has quit [Remote host closed the connection]
bigmac has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
bigmac__ has quit [Ping timeout: 255 seconds]
dagda1 has joined #ruby
<plonk>
hi, when deploying a ruby app that has a Gemfile and a Gemfile.lock in VCS, but also uses a non-VCS Gemfile.plugins that somehow automagically adds stuff to Gemfile.lock when bundle install is run, what's the best practice? Re-Commit Gemfile.lock?
charliesome has joined #ruby
jgpawletko has joined #ruby
<plonk>
sorry, ultimate ruby noob here, just a sysadmin
kerunaru has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
bigmac__ has joined #ruby
jordanm has joined #ruby
<__desmondhume>
shouldn't be enough to add Gemfile and Gemfile.lock and let Gemfile.plugins do his job when deploying && bundling on the server?
bigmac_ has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
goodcodeguy has joined #ruby
hxegon has joined #ruby
<__desmondhume>
I would go for a hook after the deploy that runs bundle install (if it's not already like that)
benlovell has joined #ruby
<plonk>
the problem here being that my deployment managment borks on the second run after installing because there are uncommitted changes in the repository
bigmac_ has joined #ruby
infamos has joined #ruby
<__desmondhume>
oh, i see...
bigmac has quit [Ping timeout: 250 seconds]
bigmac has joined #ruby
<plonk>
i read somewhere that Gemfile.lock should be version controlled, but am unsure how to deal with that
bigmac__ has quit [Ping timeout: 240 seconds]
<__desmondhume>
yeah it should
<__desmondhume>
oh ok, sorry i misread it
bigmac__ has joined #ruby
<__desmondhume>
i think the best way then would be to check in the updated Gemfile.lock
DEA7TH has joined #ruby
hxegon has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
<__desmondhume>
well, it IS the best practice, so that's the way to go (and that's the way i usually go :) )
bigmac_ has quit [Ping timeout: 240 seconds]
norc has quit [Ping timeout: 246 seconds]
bigmac_ has joined #ruby
step1step2_ has joined #ruby
teclator has joined #ruby
rodfersou|lunch is now known as rodfersou
craigp_ has joined #ruby
kies has joined #ruby
waka has joined #ruby
mloy has joined #ruby
bigmac has quit [Ping timeout: 276 seconds]
bigmac has joined #ruby
bigmac__ has quit [Ping timeout: 265 seconds]
craigp has quit [Ping timeout: 252 seconds]
<ddv>
plonk: git add Gemfile.lock
<ddv>
that is all?
<ddv>
:)
step1step2 has quit [Ping timeout: 260 seconds]
roxtrongo has joined #ruby
senayar has quit [Read error: Connection reset by peer]
bigmac__ has joined #ruby
bigmac_ has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<plonk>
what would happen if I then removed things from the Gemfile?
bigmac_ has joined #ruby
<FailBit>
then you check in changes to both
guillaume-rb has joined #ruby
TvL2386 has quit [Remote host closed the connection]
craigp_ has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
nitrix is now known as nitrixu-san
infamos has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Ping timeout: 260 seconds]
<centrx>
both Gemfile and Gemfile.lock should be version controlled
AlexRussia has quit [Quit: WeeChat 1.4-dev]
krz has quit [Ping timeout: 246 seconds]
<__desmondhume>
ì
<__desmondhume>
^
nitrixu-san is now known as nitrix
_stu_ has joined #ruby
<centrx>
plonk, if you remove gems from the Gemfile, they are no longer in your bundle, but they are not automatically uninstalled
<plonk>
Additional gemfiles that are not in source control being sourced
The_Phoenix has quit [Quit: Leaving.]
bigmac has quit [Ping timeout: 265 seconds]
bigmac has joined #ruby
Fire-Dragon-DoL has joined #ruby
krz has joined #ruby
<centrx>
plonk, Could you comment out that section?
bigmac__ has quit [Ping timeout: 264 seconds]
roxtrongo has quit [Ping timeout: 276 seconds]
guillaume-rb has quit [Client Quit]
skade has quit [Ping timeout: 240 seconds]
voodo is now known as voodo|away
<plonk>
centrx: Since I am deploying a tagged revision of that onto a porduction system and I just want to add plugins, I'd rather not commit stuff into VCS or touch any of the sources...
bigmac__ has joined #ruby
bigmac_ has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
<plonk>
the idea here being stable automatic deploys :S
freerobby has quit [Client Quit]
bigmac_ has joined #ruby
eminencehc has quit [Remote host closed the connection]
lacrymology has left #ruby [#ruby]
Xeago has joined #ruby
mloy has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
guillaume-rb has joined #ruby
sinkensabe has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 276 seconds]
pandaant has joined #ruby
sinkensabe has joined #ruby
codeurge has joined #ruby
fedexo has joined #ruby
aufi has joined #ruby
bigmac has joined #ruby
bigmac__ has quit [Ping timeout: 246 seconds]
codeurge has quit [Max SendQ exceeded]
bigmac__ has joined #ruby
guillaume-rb has quit [Client Quit]
bigmac_ has quit [Ping timeout: 240 seconds]
<shevy>
we all have our grand ideas
<shevy>
then we end up using wordpress :(
<ddv>
not me
* plonk
does not use wordpress
skweek has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pandaant has quit [Remote host closed the connection]
codeurge has joined #ruby
<ddv>
shevy loads up wordpress inside an iframe in his rails projects
<shevy>
I don't use rails
bigmac_ has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
sinkensabe has quit [Ping timeout: 244 seconds]
<ddv>
what do you use bb?
<shevy>
cgi
<yorickpeterse>
shevy: gtfo
polishdub has joined #ruby
<havenwood>
shevy: I knew you were going to say cgi! Ruby Par Avion.
diegoaguilar has joined #ruby
<shevy>
yorickpeterse: stfu
<ddv>
lol what just happened
bigmac has quit [Ping timeout: 265 seconds]
mattwildig has joined #ruby
bigmac__ has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
tkuchiki has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
<shevy>
havenwood oldschool never dies!
Hounddog has quit [*.net *.split]
<yorickpeterse>
shevy: 1990 called, they want their web app setup back
<__desmondhume>
shevy loads up wordpress inside an iframe in his rails projects
<__desmondhume>
16:52 shevy
<__desmondhume>
I don't use rails
<__desmondhume>
LOL
<yorickpeterse>
shevy: :>
bigmac__ has joined #ruby
<ddv>
shevy: yorickpeterse practices krav maga better not get him mad
Hounddog has joined #ruby
<shevy>
ddv something strange is going on, now we have an echo :/
<shevy>
Krav Maga is unfair, they kick into the balls
tkuchiki has quit [Remote host closed the connection]
<__desmondhume>
so np
bigmac has quit [Ping timeout: 240 seconds]
<momomomomo>
who will stop the damn lead pipe bashings
<shevy>
__desmondhume northern italy?
<__desmondhume>
yeah shevy
<shevy>
well that's like central europe so it's fine
<yorickpeterse>
momomomomo: see, krav maga at least teaches you how to sorta deal with that
hxegon has joined #ruby
<__desmondhume>
fine about taxes? lol
<yorickpeterse>
Though guns is mostly higher levels and for the police/army branch of krav maga
ekinmur has quit [Read error: Connection reset by peer]
<shevy>
there even were people doing bioinformatics/bioruby in milano + hiring a few years ago ... I didn't wanna go though
bigmac__ has quit [Ping timeout: 264 seconds]
<havenwood>
"Ruby, you'll shoot your eye out!"
karapetyan has quit [Remote host closed the connection]
bigmac has joined #ruby
<__desmondhume>
yeah i work in milano, but i just moved to my hometown
karapetyan has joined #ruby
<__desmondhume>
remote work is cool
<__desmondhume>
so startup
<__desmondhume>
much wow
<shevy>
__desmondhume dunno you could be living in Sicilia too :)
<momomomomo>
working from home atm but have a meeting in an hour :(
<momomomomo>
yay spark job done, time to go in :/
marr has quit [Ping timeout: 265 seconds]
bigmac__ has joined #ruby
ekinmur has joined #ruby
<__desmondhume>
the best part of having meeting from home is wearing just ashirt
<bougyman>
+1
<__desmondhume>
could u please stand up? well no
<bougyman>
I did that in a training session last night
baroquebobcat has quit [Read error: Connection reset by peer]
Hounddog has joined #ruby
<momomomomo>
:| my workplace is pretty laid back anyhow, most days I just hang out on the top floor next to the fireplace with my shoes off
<shevy>
top floor
<momomomomo>
about as comfy as home, but better coffee
<shevy>
did they lock you away?
<havenwood>
top level
<momomomomo>
nah, we have a roof and a penthouse
<__desmondhume>
humor is getting better and better
kernik has left #ruby [#ruby]
<shevy>
ooooh penthouse coding suite!
<shevy>
coding like a boss
<__desmondhume>
penthouse?
bigmac_ has quit [Ping timeout: 276 seconds]
dreinull75 has joined #ruby
<__desmondhume>
isn't it like a naked women thing?
indignatio has joined #ruby
<momomomomo>
:|
<havenwood>
?ot __desmondhume
<ruboto>
__desmondhume, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
infamos has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
<__desmondhume>
lol i'm just asking guys
<__desmondhume>
what is penthouse?
baroquebobcat has joined #ruby
<momomomomo>
nah it's like the top floor of a hotel / building
<havenwood>
?huys __desmondhume
<ruboto>
__desmondhume, I don't know anything about huys
<shevy>
no, just top floor, usually the costlier flats
<__desmondhume>
oh, LOL
<__desmondhume>
sry :D
<shevy>
I am almost in the basement :(
<havenwood>
Ruby.
bigmac_ has joined #ruby
<__desmondhume>
sorry havenwood
<shevy>
havenwood codes in a skyscraper, at the very top of the top!
bigmac has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
<momomomomo>
shevy: he's sauron
bricker has joined #ruby
<__desmondhume>
lol
skade has joined #ruby
<shevy>
lol
bigmac__ has quit [Ping timeout: 255 seconds]
bigmac has joined #ruby
Spami_ has quit [Quit: Leaving]
indignatio has quit [Remote host closed the connection]
rgtk has joined #ruby
bigmac__ has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
<__desmondhume>
do you guys read medium?
TomyWork has quit [Ping timeout: 260 seconds]
<shevy>
what is that
<momomomomo>
only when it pops up on HN/reddit
rgtk has quit [Read error: Connection reset by peer]
araujo has joined #ruby
araujo has joined #ruby
Guest53 has quit [Read error: Connection reset by peer]
<momomomomo>
shevy: like a blog for fancy people on someone else's platform
<__desmondhume>
blogging platform
<__desmondhume>
^
bigmac_ has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
<__desmondhume>
aka 57M investment for dunno-why
<momomomomo>
fancy people like fancy things
<__desmondhume>
btw, i wrote an article on that lol
<momomomomo>
and to sit on fancy soap boxes
<momomomomo>
not that there's anything wrong with that
<havenwood>
ruby-lang383: I really do think the CFAA needs to be amended to allow tinkering or educational exceptions and to bar prison time for violating TOS... but alas...
podman has quit [Quit: Connection closed for inactivity]
dopie has joined #ruby
bigmac__ has quit [Ping timeout: 240 seconds]
lukaszes has joined #ruby
bigmac__ has joined #ruby
bigmac has quit [Ping timeout: 250 seconds]
framling has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 250 seconds]
bigmac_ has quit [Ping timeout: 250 seconds]
towski_ has joined #ruby
bigmac has joined #ruby
scmx has quit [Ping timeout: 276 seconds]
axsuul has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
bigmac_ has joined #ruby
Xeago has joined #ruby
bigmac__ has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
mattwildig has joined #ruby
doddok has quit [Quit: Leaving]
bigmac__ has joined #ruby
bigmac has quit [Ping timeout: 240 seconds]
Alayde has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the way, kill him.]
skade has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
Alayde has left #ruby [#ruby]
bigmac has joined #ruby
bigmac_ has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
bigmac_ has joined #ruby
bMalum has joined #ruby
troyready has quit [Remote host closed the connection]
bricker has joined #ruby
SCHAAP137 has joined #ruby
synthroid has joined #ruby
bigmac__ has quit [Ping timeout: 260 seconds]
mdih has quit [Ping timeout: 272 seconds]
<__desmondhume>
lol ruby is becoming a selfpromoting channel
bigmac__ has joined #ruby
troyready has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
Alayde has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 252 seconds]
<_blizzy_>
ugh, I can't seem to install rest-client on my comp
bigmac_ has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
bigmac__ has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
craigp has joined #ruby
craigp has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
PaulCape_ has quit [Quit: .]
PaulCapestany has joined #ruby
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
momomomomo has joined #ruby
rbowlby has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
adac has quit [Ping timeout: 244 seconds]
indignatio has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CodingWolf has quit [Read error: Connection reset by peer]
tomphp has quit [Ping timeout: 260 seconds]
CrazyEddy has quit [Ping timeout: 240 seconds]
CodingWolf has joined #ruby
freerobby has quit [Quit: Leaving.]
|ifei5good has joined #ruby
rbowlby has quit [Ping timeout: 240 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stu_ has joined #ruby
stu_ is now known as _stu_
|ifei5g00d has quit [Ping timeout: 250 seconds]
<hxegon>
with the stdlib CSV, why won't csv.each { |row| row.headers.each { |h| row[h] = 'foo' } } work?
polysics has quit []
ekinmur has joined #ruby
<hxegon>
If you try and read the csv after that, the rows are unchanged
CrazyEddy has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
pdev_champ_1996 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
<DEA7TH>
I have a string which looks like this: "{\"a\":\"some customer data\", (...) ". Notice that there is a backslash before every ". How can I display it without the backslashes?
blackmesa has quit [Ping timeout: 272 seconds]
senayar has quit []
<DEA7TH>
It says that the second character is \" - this is a single character. inspect only makes things worse
The_Phoenix has quit [Ping timeout: 272 seconds]
TomPeed has joined #ruby
<hxegon>
DEA7TH: puts it. It shows up in the string rep, but not when you print it. or use single quotes, but I'm not sure how well that would work with what I assume is JSON
<DEA7TH>
oh, that worked! I thought that puts = p
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DEA7TH>
and it didn't work with p
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Peg-leg has quit [Quit: Leaving.]
<adaedra>
hxegon: well, you're modifying the data in-memory, you have to write the data back
<hxegon>
DEA7TH: I'm looking it up, and I guess p is basically prints foo.inspect vs puts, which uses foo.to_s
<blubjr>
'p foo' == 'puts foo.inspect'
<hxegon>
DEA7TH: so, #to_s might be more appropriate
The_Phoenix has joined #ruby
<DEA7TH>
it's all right, I'll throw away the code in several minutes anyway
th0m_ has quit [Ping timeout: 252 seconds]
<blubjr>
#to_s on a string is identity..
skade has joined #ruby
skade has quit [Client Quit]
<hxegon>
adaedra: so your saying its just passing me a copy of the row and not a ref to that row?
blackmesa has joined #ruby
gard_ has joined #ruby
step1step2_ is now known as stepstep2
<adaedra>
hxegon: well, how did you get your csv variable?
baweaver has quit [Remote host closed the connection]
<segfalt>
User458764: Maybe you could show me a code sample if I'm not understanding correctly.
malcolmva has quit [Ping timeout: 252 seconds]
Guest47884 is now known as arup_r
jpfuentes2 has joined #ruby
momomomomo has joined #ruby
<plonk>
hxegon: sure
Arkon has joined #ruby
doddok has joined #ruby
goodcodeguy has joined #ruby
<hxegon>
plonk: that's my only suggestion, sorry :P
chris2 has joined #ruby
gusTester has joined #ruby
mdih has joined #ruby
rbowlby has joined #ruby
<User458764>
segfalt I use ruby for years and I am just asking myself how do I build code so that I don't pass an array where an integer is expected?
RegulationD has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
gusTester has left #ruby [#ruby]
<spaceghost|work>
User458764: Always wrap everything into an array?
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<spaceghost|work>
Deal with collections rather than singular objects?
<segfalt>
User458764: Oh, you want a type system. There are some projects that half-bake in a type system. What I did was switch to another programming language. :)
<User458764>
segfalt lol
<spaceghost|work>
type like a duck.
luriv_ has joined #ruby
NO_BOOT_DEVICE has joined #ruby
<platzhirsch>
kill the duck
<spaceghost|work>
be the duck
<segfalt>
That works for a while, generally until you have 10,000 lines of code in production and wonder why you thought class-level DSLs were cool.
<User458764>
but ruby is awesome because it is not type base
InternetFriend has quit [Remote host closed the connection]
<segfalt>
User458764: and yet, you're asking how to add a type system.
<spaceghost|work>
segfalt: They can be if you don't screw them up.
build22 has quit [Ping timeout: 240 seconds]
<User458764>
segfalt yes I think my solution is to better comment my code
<spaceghost|work>
It works whale beyond 10K LOC.
<spaceghost|work>
User458764: Or just wrap everything into an array!
rwilcox_ has joined #ruby
<User458764>
spaceghost|work thanks I will check that
<spaceghost|work>
.Array() is neat.
yardenbar has joined #ruby
<segfalt>
I definitely use Array() in code that accepts one or many things. Clean approach.
<NO_BOOT_DEVICE>
is it possible to on init of a class have it fail gracefully without throwing or the like?
<segfalt>
NO_BOOT_DEVICE: your initialize is throwing an exception?
luriv has quit [Ping timeout: 250 seconds]
<spaceghost|work>
NO_BOOT_DEVICE: When you say init of a class, do you mean when the class is defined?
CloCkWeRX has joined #ruby
<spaceghost|work>
Or when you're instantiating an instance of the class?
_blizzy_ has quit [Ping timeout: 240 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rwilcox has quit [Ping timeout: 250 seconds]
<NO_BOOT_DEVICE>
segfalt: no, and i don't want it to, but i want it to not do full init and such when it won't work basically saying "fail_gracefully() if [bad init check condition]"
mattwildig has quit [Remote host closed the connection]
InternetFriend has joined #ruby
<segfalt>
NO_BOOT_DEVICE: What's gracefully mean? What do you want .new to return instead?
<NO_BOOT_DEVICE>
spaceghost|work: instantiating
<spaceghost|work>
NO_BOOT_DEVICE: What have you tried? Did you try raising an exception?
CloCkWeRX has quit [Client Quit]
trav408 has joined #ruby
CloCkWeRX1 has joined #ruby
InternetFriend has quit [Client Quit]
<NO_BOOT_DEVICE>
spaceghost|work: i'd rather not, i'd like for it to more just say, return "nil", as it's not really an exception, it's just "this functionality isn't implemented"
ashleyhindle has joined #ruby
<spaceghost|work>
NO_BOOT_DEVICE: #initialize always returns the instance, override .new if you want to do something else.
ashleyhindle has left #ruby [#ruby]
baweaver has quit [Remote host closed the connection]
<segfalt>
NO_BOOT_DEVICE: I'd find it really confusing for .new to return nil, as a user.
<spaceghost|work>
NO_BOOT_DEVICE: There is NotImplementedError though. That way at least the caller can get a chance to rescue it and handle it themselves.
<segfalt>
It seems like immediately after that happens you'll end up with NoMethodErrors on whatever you try to do with the nil, anyway.
CloCkWeRX1 has quit [Client Quit]
<NO_BOOT_DEVICE>
spaceghost|work: oh, that's actually probably what i'm looking for, i guess if the program makes it clear that it's just "not implemented"
<NO_BOOT_DEVICE>
thanks
h99h9h88 has joined #ruby
CloCkWeRX has joined #ruby
<spaceghost|work>
NO_BOOT_DEVICE: Cheers. :D
h99h9h88 has quit [Remote host closed the connection]
troulouliou_div2 has quit [Remote host closed the connection]
skweek has joined #ruby
cfinley has joined #ruby
blue_deref has joined #ruby
CloCkWeRX has quit [Client Quit]
CloCkWeRX1 has joined #ruby
devoldmx has joined #ruby
Guest53 has joined #ruby
last_staff has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Client Quit]
fantazo has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 260 seconds]
mattwildig has joined #ruby
_blizzy_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fumk has quit [Excess Flood]
charliesome has joined #ruby
fumk has joined #ruby
|ifei5good has quit [Read error: Connection reset by peer]
gusTester has joined #ruby
dionysus69 has joined #ruby
gusTester has left #ruby [#ruby]
|ifei5g00d has joined #ruby
karapetyan has joined #ruby
krz has quit [Quit: WeeChat 1.2]
diegoviola has joined #ruby
Aderium has joined #ruby
malcolmva has joined #ruby
freerobby has quit [Quit: Leaving.]
fumk has quit [Remote host closed the connection]
User458764 has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
codeurge has quit [Ping timeout: 250 seconds]
ESpiney__ has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
fumk has joined #ruby
Hounddog has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 252 seconds]
th0m_ has joined #ruby
<jhass>
csv was dropped from stdlib and fastercsv renamed to csv with 1.9 (iirc)
subscope has joined #ruby
aredridel is now known as Aria
Fire-Dragon-DoL has quit [Remote host closed the connection]
<pabs>
jhass: could be, the api is certainly better than 1.8 :/
th0m_ has quit [Max SendQ exceeded]
<pabs>
jhass: (i have to use 1.8 for work stuff, it's, uh, clunky)
cdg has quit [Remote host closed the connection]
th0m_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nfk|laptop has quit [Quit: yawn]
th0m_ has quit [Max SendQ exceeded]
karapetyan has joined #ruby
Fire-Dragon-DoL has joined #ruby
th0m_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
AccordLTN has quit []
User458764 has joined #ruby
<hxegon>
pabs: do you know why this doesn't work? csv = CSV.new("foo\nbar", headers: true); csv.each { |row| row['foo'] = 'anything' } # it changes row in the scope but not in csv
diegoaguilar_ has quit [Quit: Leaving]
Xeago has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
AccordLTN has joined #ruby
wilbert has joined #ruby
benlovell has joined #ruby
wilbert has quit [Client Quit]
aaeron has joined #ruby
wilbert has joined #ruby
<aaeron>
hi. I am trying to write tests for concurrency using concurrent gem.
blackmesa has quit [Ping timeout: 260 seconds]
<aaeron>
Is there a good way of testing concurrency?
<aaeron>
I did not find anything useful yet.
diegoaguilar has joined #ruby
<yorickpeterse>
what specifically do you want to test?
<aaeron>
I want to test that the deployments are going in parallel
not_a_robot has joined #ruby
_blizzy_ has joined #ruby
<not_a_robot>
hello
matp has joined #ruby
<blubjr>
hi not a robot
<yorickpeterse>
aaeron: parallelism is impossible to test using some form of runtime testing
<yorickpeterse>
You can test if something is "most likely" parallel, but it's impossible to get a 100% guarantee
benlovell has quit [Ping timeout: 260 seconds]
<aaeron>
Ok.
chris2 has joined #ruby
<atmosx>
Anyone knows if AWS will allow me to fetch RDS stats?
<aaeron>
Make one blocking
haxrbyte has quit [Quit: Leaving...]
<aaeron>
And run the second one.
<yorickpeterse>
atmosx: Cloudwatch has them
<atmosx>
yorickpeterse: has what?
<adaedra>
not_a_robot: beep bop?
<yorickpeterse>
atmosx: RDS statistics
<pabs>
hxegon: you'll need to read the csv in, make your changes, then write it back out again, it doesn't make the changes on disk when you edit
<atmosx>
ah yes, I'm on it (google)
freerobby has quit [Quit: Leaving.]
<atmosx>
yorickpeterse: and I can access cloudwatch via ruby SDK?
<yorickpeterse>
Yes
not_a_robot has quit [Client Quit]
<yorickpeterse>
aaeron: then you're no longer really testing parallelism
adac has joined #ruby
hxegon_ has joined #ruby
<atmosx>
awesome
opensource_ninja has joined #ruby
Guest58404 has quit [Ping timeout: 250 seconds]
<aaeron>
Yeah. But i need to be able to write tests which shows that the process is concurrent
* atmosx
Sam Cooke - Cupid
<aaeron>
If not 100% correct
hxegon has quit [Ping timeout: 272 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
opensource_ninja has quit [Client Quit]
wilbert has quit [Quit: quit]
baweaver has quit [Remote host closed the connection]
x-light has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<yorickpeterse>
aaeron: you can not test something happened in parallel, only _that_ it happened
Xeago has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
kopykat has joined #ruby
<aaeron>
That would work
jdawgaz has joined #ruby
kopykat has left #ruby [#ruby]
<yorickpeterse>
e.g. if you have something like `a = nil; b = nil; Thread.new { a = 10 }; Thread.new { b = 20 }` there's no guarantee (or way to ensure) that the two threads actually run in parallel
<yorickpeterse>
the same applies to processes
<yorickpeterse>
Heck, on MRI the threads won't even run in parallel in the first place
freerobby has joined #ruby
<aaeron>
I got ur point yorickpeterse
baweaver has joined #ruby
<yorickpeterse>
also in both cases the OS might take longer to start them up, which could break any timing sensitive tests
<yorickpeterse>
so I'd test "did it happen" instead of "did it happen at exactly the same time"
<aaeron>
Exactly
chouhoulis has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has joined #ruby
<aaeron>
I think I am just going to test if the state of all the threads is pending after sleeping for half a second
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Ping timeout: 240 seconds]
<yorickpeterse>
that does not work at all
<yorickpeterse>
read again what I said
<yorickpeterse>
timing sensitive execution is seriously difficult when dealing with parallelism
chouhoul_ has quit [Ping timeout: 244 seconds]
baweaver has quit [Ping timeout: 240 seconds]
arthurix_ has joined #ruby
<aaeron>
When I call execute on concurrent promises. It would change the status of the promises to pending. It might not execute them
<aaeron>
So will that not be a good test?
mattwildig has quit [Remote host closed the connection]
<yorickpeterse>
That sentence makes no sense
<aaeron>
Sorry about that yorickpeterse. I am new to concurrency
skweek has joined #ruby
arthurix has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
roxtrongo has joined #ruby
<yorickpeterse>
The difficulty of concurrency is that there's no guarantee as to when what happens
kies has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<aaeron>
Got that.
rgtk has quit [Read error: Connection reset by peer]
<aaeron>
But when I call p = Concurrent::Promise.execute{ "Hello, world!" }
<aaeron>
It would make the p.state as pending. Pending does not mean its getting implemented. (afaik)
<yorickpeterse>
getting implemented?
<aaeron>
executed
eminencehc has quit [Remote host closed the connection]
<yorickpeterse>
If the state is not "pending" by default and it's modified from another thread it could be that when you call "p.state" the state hasn't been set to "pending" yet
<yorickpeterse>
so you'd get a race condition
Arkon has quit [Remote host closed the connection]
<yorickpeterse>
but this depends on how things are implemented
roxtrongo has quit [Ping timeout: 240 seconds]
Arkon has joined #ruby
<yorickpeterse>
for such a condition the code would probably pass 999 out of 1000 runs
<yorickpeterse>
and fail one time on Friday the 13th at 17:00
karapetyan has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<aaeron>
Haha.
z4j5 has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
fantazo has quit [Quit: Verlassend]
__desmondhume has quit [Remote host closed the connection]
h99h9h88 has quit [Remote host closed the connection]
<aaeron>
I think I am going to test parallelism by making it sequential. Block the first thread. And wait for the second to finish.
ldnunes has quit [Quit: Leaving]
<aaeron>
This will just guarantee that one thread does not block the other one.
<aaeron>
and hence they are in parallel.
<yorickpeterse>
one thread not blocking the other doesn't make them parallel
<yorickpeterse>
e.g. a paused thread won't block another, but isn't running in parallel
Arkon has quit [Ping timeout: 240 seconds]
Arkon has joined #ruby
djbkd has quit [Remote host closed the connection]
ekinmur has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
<aaeron>
in my case: I was running deploys in sequence running a loop. So lets say jobA, jobB. If I block jobA, jobB would never get executed. As it is sequential.
baweaver has joined #ruby
pglombardo has joined #ruby
<aaeron>
But now that they are running independent of each other. I can block jobA and expect jobB to finish.
<aaeron>
It was a single threaded deploy previously.
mattwildig has joined #ruby
Eiam_ has joined #ruby
eminencehc has joined #ruby
sparr has quit [Changing host]
sparr has joined #ruby
devoldmx has joined #ruby
ta has joined #ruby
yfeldblum has joined #ruby
podman has joined #ruby
freerobby has joined #ruby
yaewa has joined #ruby
moei has quit [Ping timeout: 252 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
prestorium has quit [Quit: Leaving]
yaewa has quit [Client Quit]
bruno- has joined #ruby
moei has joined #ruby
karapetyan has joined #ruby
bruno- is now known as Guest23347
beast has quit [Quit: Leaving]
Coldblackice_ has joined #ruby
adac has quit [Ping timeout: 240 seconds]
infamos has quit [Ping timeout: 264 seconds]
rodfersou has quit [Quit: leaving]
dfockler has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
futilegames has joined #ruby
vigintas has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
eminencehc has quit [Remote host closed the connection]
eminencehc has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
blackmesa has joined #ruby
seydar has joined #ruby
djbkd has joined #ruby
lukaszes has joined #ruby
adac has joined #ruby
Eiam_ has joined #ruby
seydar has left #ruby [#ruby]
seydar has joined #ruby
Arkon has quit [Remote host closed the connection]
<seydar>
what's the hardest part about parsing ruby?
<yorickpeterse>
seydar: parsing ruby
[Butch] has quit [Quit: I'm out . . .]
Arkon has joined #ruby
newmanships has joined #ruby
<seydar>
yorickpeterse: no further questions, thank you
willardg has joined #ruby
chouhoulis has quit [Remote host closed the connection]
charliesome has joined #ruby
chouhoulis has joined #ruby
johnkacz has joined #ruby
solenoids has quit [Ping timeout: 240 seconds]
Oatmeal has quit [Ping timeout: 240 seconds]
johnkacz has left #ruby [#ruby]
baweaver has quit [Remote host closed the connection]
arthurix has joined #ruby
<FailBit>
ruby syntax is implicit to the point of near ambiguity
<FailBit>
that's the hardest part
TheHodge has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 250 seconds]
<seydar>
FailBit: can you expound upon that?
Arkon has quit [Ping timeout: 276 seconds]
charliesome_ has joined #ruby
charliesome has quit [Ping timeout: 276 seconds]
<FailBit>
say you wanted to pass a hash to a function
Meeh has quit [Read error: Connection reset by peer]
<shevy>
FailBit: ruby allows people to be lazy in what they write; nobody stops you from satisfying the parser with more syntax
<shevy>
if less syntax could be achievable then ruby core would do it
willardg has joined #ruby
Meeh has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 260 seconds]
infamos has joined #ruby
djbkd has joined #ruby
platzhirsch has joined #ruby
__desmondhume has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
<seydar>
shevy: do you read reddit? did you see the new Rush shell that was posted to /r/ruby?
northfurr has joined #ruby
kies has joined #ruby
wprice has quit [Quit: wprice]
northfurr has quit [Client Quit]
nchambers\dead is now known as nchambers\undead
<Papierkorb>
That shell that doesn't even offer pipes?
nchambers\undead is now known as nchambers\fsckin
<shevy>
seydar I do read reddit sometimes, not regularly though. The rush shell... was that the extension from the old ncurses one, with the in-built dropdown box when someone hits tab?
<shevy>
people often fatigue or tire in projects :(
SenpaiSilver has quit [Quit: Leaving]
SenpaiSilver has joined #ruby
h99h9h88 has joined #ruby
wprice has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nchambers\fsckin is now known as nchambers
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has quit []
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
baweaver has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
<seydar>
shevy: yeah i just remember it as the project that was parsing bash grammar and running it on ruby
vigintas has joined #ruby
<seydar>
BUT THAT WAS US
<seydar>
WE WERE THERE
<seydar>
WE WERE SOLDIERS
diegoaguilar has quit [Ping timeout: 260 seconds]
<eam>
well, ruby itself does a bit of shell syntax analysis as well doesn't it
lukaszes has joined #ruby
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<seydar>
eam: i can't remember how the original project was done. me, shevy, and the original guy all kinda worked on our own separate shells under the single banner of "rush"
<seydar>
i came back years later and wrote chitin
bMalum has quit [Quit: bMalum]
<seydar>
and someone just took the name rush and wrote something similar to chitin
<slash_nick>
i've heard of chitlins
<slash_nick>
and now, chitin
<seydar>
if i could get the startup time down to zilch, i think it'd be more usable as a shell
lukaszes has quit [Client Quit]
jgpawletko has quit [Quit: jgpawletko]
<seydar>
but on my computer it takes like 3 seconds to start up because of gems and my shitty-ass laptop
Xeago has quit [Remote host closed the connection]
charliesome has joined #ruby
benlovell has joined #ruby
kurzweil has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
Xeago has joined #ruby
jgpawletko has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
trosborn has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
Guest23347 has quit [Ping timeout: 240 seconds]
lukaszes has joined #ruby
benlovell has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
overcrush has joined #ruby
diegoaguilar has joined #ruby
overcrush has left #ruby ["Leaving..."]
CloCkWeRX has quit [Ping timeout: 250 seconds]
kies has quit [Ping timeout: 240 seconds]
lukaszes has quit [Client Quit]
CloCkWeRX has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TTilus>
nnngh...
seydar has quit [Quit: leaving]
th0m_ has quit [Quit: Leaving]
k3asd` has joined #ruby
<hxegon_>
hmm... so that row mutation works when I do CSV.parse, but not CSV.new...
<TTilus>
i'm trying to beat a bit ancient radiant 0.8.0 site into working shape to serve until i figure out where to transition to
harumph has joined #ruby
arup_r has quit [Quit: Leaving]
_blizzy_ has joined #ruby
jessemcgilallen has joined #ruby
harumph has left #ruby [#ruby]
CloCkWeRX has quit [Ping timeout: 240 seconds]
<TTilus>
so i figure i'll just `ruby-install ruby 1.8.7 && chruby 1.8 && gem install radiant --version 0.8.0` and be done with it
lukaszes has joined #ruby
netule has joined #ruby
<TTilus>
but for some weird reason `ruby-install ruby 1.8.7-p358` gives me a ruby without gem :-/
trosborn has quit [Quit: trosborn]
lukaszes has quit [Client Quit]
<TTilus>
like 'gem: command not found'
bb010g has quit [Quit: Connection closed for inactivity]
<blubjr>
i thought gem didn't come with ruby until 1.9
nchambers is now known as {0xc6}
{0xc6} is now known as nchambers
poguez_ has joined #ruby
willardg has joined #ruby
trosborn has joined #ruby
adac has quit [Ping timeout: 252 seconds]
<TTilus>
blubjr: that would explain
Ilyes512 has joined #ruby
Kabal has joined #ruby
sepp2k has quit [Quit: Leaving.]
steve_ has joined #ruby
spider-mario has joined #ruby
<steve_>
Is anyone in here?
<havenwood>
Steve_: yup
codecop has quit [Remote host closed the connection]
<havenwood>
Steve_: A thousand Rubyists.
infamos has quit [Ping timeout: 244 seconds]
pdoherty has quit [Ping timeout: 240 seconds]
<steve_>
Cool. Can anyone help me out with a RoR question?
<havenwood>
?rails Steve_
<ruboto>
Steve_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<steve_>
Thanks for pointing me in the right direction ruboto
craigp has quit [Remote host closed the connection]
<Ox0dea>
What're some ways the new Hash#to_proc is useful other than, say, in a call to #map as an alternative to Hash#values_at?
bruno-_ has joined #ruby
djbkd has joined #ruby
maikowblue has joined #ruby
<Ox0dea>
I guess being able to #call a Hash lets you remove the distinction between a lookup and a real invocation in a memoized method, but that's the only other use case I can see.
<Ox0dea>
It's kinda weird that it got accepted, I'm saying.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 276 seconds]
wldcordeiro has quit [Ping timeout: 260 seconds]
jessemcgilallen has joined #ruby
jessemcgilallen has quit [Read error: Connection reset by peer]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colegatron has joined #ruby
ytti has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
agentmeerkat has quit [Ping timeout: 264 seconds]
h99h9h88 has joined #ruby
djbkd has joined #ruby
Guest53 has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
sinkensabe has quit [Remote host closed the connection]
h99h9h88 has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Ping timeout: 265 seconds]
CloCkWeRX1 has joined #ruby
<Sou|cutter>
amazingly there is nothing parked at yes.com
johnzorn has quit [Ping timeout: 255 seconds]
<ericwood>
hmmm is anyone using mruby for anything yet?
mary5030_ has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
h99h9h88 has quit [Remote host closed the connection]
johnzorn has joined #ruby
baweaver has quit [Remote host closed the connection]
gambl0re has quit []
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX1 has quit [Ping timeout: 276 seconds]
willardg has joined #ruby
iateadonut has joined #ruby
baweaver has joined #ruby
pdoherty has joined #ruby
solenoids has quit [Ping timeout: 244 seconds]
stamina has quit [Ping timeout: 240 seconds]
stepstep2 has quit [Quit: Leaving]
<Ox0dea>
darix: I was more referring to Tom Stuart's "Programming with Nothing".
malconis has quit [Ping timeout: 260 seconds]
gambl0re has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rontec76 has joined #ruby
pglombardo has joined #ruby
polishdub has quit [Quit: Leaving]
renderf__ has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
renderf__ has joined #ruby
riotjone_ has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
riotjon__ has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
pglombardo has quit [Ping timeout: 240 seconds]
simplyianm has quit [Read error: Connection reset by peer]
overcrush has left #ruby ["Leaving..."]
spider-mario has quit [Remote host closed the connection]
leafybas_ has joined #ruby
cicloid has joined #ruby
benlovell has joined #ruby
cicloid has quit [Max SendQ exceeded]
leafybas_ has quit [Remote host closed the connection]
cicloid has joined #ruby
mary5030 has quit [Remote host closed the connection]
lukaszes has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
solenoids has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
vigintas has quit [Remote host closed the connection]
<shevy>
programming with nothing
<shevy>
not even a computer
simplyianm has joined #ruby
edj has joined #ruby
grill has joined #ruby
wldcordeiro has joined #ruby
umgrosscol has quit [Quit: End of Line]
<grill>
you know how you can add a main method to a module in ruby? this way, you can run the module on its own AND include its methods? how can you do this with ruby?
k3asd` has quit [Ping timeout: 240 seconds]
<shevy>
not sure what you are asking
<shevy>
you mean both standalone and module methods?
<shevy>
one way is private_function :name
<Ox0dea>
grill: Use `module_function`.
<shevy>
another is: extend self
<shevy>
or def self.foo manually, with def foo calling that method