<Nuck>
Anyone know a way to get a stack trace out of Bundler/Rubygems? I've supposedly got an error in my Gemspec but it's giving me one entirely irrelevant line from the stack trace :/
drager has joined #ruby
<apeiros>
Nuck: I suggest you gist your gemspec and the full exception, even if you deem it irrelevant
rshetty has quit [Remote host closed the connection]
<Igorshp>
Morning, i'm trying to see if a block of xml is part of a larger xml. sort of like .includes? for strings. could anyone point me in the right direction?
<hanmac1>
jhass: my main problem i got was "Assignment Branch Condition" and "Cyclomatic complexity" ... like for the first one i mostly think its to dump to understand what "/\A#{k}(?<n>\d+)\Z/ =~ name && n.to_i.between?(3, v)" does and whines about that the Condition is to complex or something
<jhass>
those are metrics for too many statements in a method, it wants you to make smaller ones, afaik
<canton7>
cyclomatic complexity is the number of routes through a method iirc: i.e. how much branching/looping/jumping about is done
fabrice31 has joined #ruby
Technodrome has quit [Quit: Technodrome]
<hanmac1>
canton7: have you tryed to write a case/when in ruby? it causes rubocop to go overload with cyclomatic complexity ;p
MatthewsFace has joined #ruby
Technodrome has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
<Nuck>
rubocop complains a lot, but it means well
ArchRogem has joined #ruby
MatthewsFace has quit [Ping timeout: 244 seconds]
<Nuck>
Kind of like an overbearing parent
<Nuck>
You know it wants the best for your codebase, but sometimes it's just too much
<canton7>
hanmac1, I haven't - sounds fun
vire has joined #ruby
<jhass>
yeah, tbh I'm thinking about turning those two off
_KISS has quit [Read error: Connection reset by peer]
<Nuck>
All the complexity complainers in rubocop I set to absurd (but sadly realistic) levels
<Nuck>
And use CodeClimate for anything lower
<hanmac1>
good that my rwx code cant be checked by rubocop otherwise it might crash because the error count is to high ;P
<Nuck>
So rubocop is just an alarm for when things slip by and get *really* bad
crdpink has quit [Ping timeout: 252 seconds]
_KISS has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
pontiki has joined #ruby
_KISS has quit [Remote host closed the connection]
bMalum has joined #ruby
_KISS has joined #ruby
iteratorP has quit [Remote host closed the connection]
yh has joined #ruby
_KISS has quit [Read error: Connection reset by peer]
S0da has quit [Read error: Connection reset by peer]
Parker0 has joined #ruby
beat_ has quit [Ping timeout: 264 seconds]
dorei has joined #ruby
plashchynski has joined #ruby
shoutsid has quit []
scripore has joined #ruby
shoutsid has joined #ruby
plashchynski has quit [Client Quit]
S0da has joined #ruby
plashchynski has joined #ruby
fabrice31 has quit [Remote host closed the connection]
Parker0 has quit [Client Quit]
S0da has quit [Read error: Connection reset by peer]
S0da has joined #ruby
nettoweb has joined #ruby
S0da has quit [Read error: Connection reset by peer]
S0da has joined #ruby
last_staff has quit [Quit: last_staff]
plashchynski has quit [Quit: plashchynski]
Rickmasta has joined #ruby
S0da has quit [Read error: Connection reset by peer]
startupality has joined #ruby
S0da has joined #ruby
Deele2 has joined #ruby
<Naypalm>
well yesterday I had to change like two billion things
Deele has quit [Ping timeout: 256 seconds]
shoutsid has quit [Remote host closed the connection]
<Naypalm>
like a readline module that wouldn't work, turns out there was one for ruby 1.9 but then there was a -devel something else one that replaced them both
<adaedra>
ah
<Naypalm>
and nokogiri likes to explode
<Naypalm>
it was just little consistency things here and there
S0da has quit [Read error: Connection reset by peer]
<Naypalm>
I mean yeah I know wanting 2+ years gems to work with bleedin' edge ruby is asking too much
<Naypalm>
I'm just going to vent about it anyway though
<Naypalm>
:)
Kricir has joined #ruby
audy has quit [Remote host closed the connection]
gagrio has joined #ruby
dfinninger has joined #ruby
fabrice31 has joined #ruby
tagrudev has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
<Naypalm>
and now I finally get everything bundle installed and it starts erroring when I try to do anything :(
<gregf_>
er, 2 billion things... you surely wrote a brand new app in 1 day then ;)
S0da has joined #ruby
<Naypalm>
I wrote billions of them gregf_!
fabrice31 has quit [Remote host closed the connection]
<gregf_>
unless you broke the build a million times
<gregf_>
s/m/b/
S0da has quit [Remote host closed the connection]
<Naypalm>
I did dirty things
Igorshp has joined #ruby
<Naypalm>
I went into Gemfile.lock and changed version numbers and changed readline things
<Naypalm>
that's probably not a healthy activity
fabrice31 has joined #ruby
bMalum has quit [Quit: bMalum]
haxrr has joined #ruby
haxr has joined #ruby
michael_mbp has quit [Excess Flood]
longbow has quit [Read error: Connection reset by peer]
Guest59248 has quit [Remote host closed the connection]
DreadKnight has joined #ruby
DreadKnight has left #ruby ["#AncientBeast - Master Your Beasts ( www.AncientBeast.com )"]
<serard>
Is there à way to pass env vars to a ruby program whin launching it via #!/bin/sh .sh script ? (Hope I'm clear enough ^^)
ta has quit [Ping timeout: 264 seconds]
<jhass>
serard: what general way do you know to pass env vars to a ruby script?
brixen has quit [Ping timeout: 248 seconds]
sweeper has quit [Ping timeout: 244 seconds]
SouL_|_ has joined #ruby
sindork has quit [Ping timeout: 245 seconds]
Kovensky has quit [Ping timeout: 264 seconds]
<jhass>
or any program
philtr has quit [Ping timeout: 256 seconds]
SirFunk has quit [Ping timeout: 252 seconds]
<adaedra>
just modify the env in your shell script
<serard>
MYENV=myval ruby myscript.rb
<havenwood>
serard: Tried that ^ yet?
<adaedra>
and does it works, serard ?
<jhass>
did you try that in your shellscript?
Gnubie_ has quit [Ping timeout: 252 seconds]
<adaedra>
combo x3
<apeiros>
I'm not quite sure how you launch a ruby script with #!/bin/sh… do you mean you have a bash script which in turn runs ruby?
orionstein has quit [Ping timeout: 264 seconds]
<apeiros>
s/bash/sh/
<adaedra>
(I'd guess so)
<serard>
apeiros, exactly !
<serard>
oh, my bad, didn't set the env in my container call, sorry....
coderkevin has joined #ruby
dcarper has quit [Remote host closed the connection]
Enki has joined #ruby
bennysan has quit [Ping timeout: 244 seconds]
f0ster has joined #ruby
Hirzu has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 264 seconds]
rkazak has joined #ruby
dcarper has joined #ruby
balazs_ has joined #ruby
senayar has quit [Remote host closed the connection]
blackmesa has joined #ruby
jottr has joined #ruby
audy has joined #ruby
banister has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
ki0 has quit [Ping timeout: 250 seconds]
bennysan has joined #ruby
B1n4r10 has joined #ruby
chinmay_dd has joined #ruby
nhhagen has quit [Ping timeout: 245 seconds]
<catphish>
i'm having trouble with ruby 1.9.3 with OpenSSL 0.9.8k, when connecting to an FTPS server with explicit FTPS, the ssl client handshake appears to be sent, but the server ignores it, as if not enough data was sent to complete the handshake, does anyone have any idea why that might be?
<catphish>
connecting to the same serve with ruby 2.1.5 and OpenSSL 1.0.1f works fine
rkazak has quit [Ping timeout: 252 seconds]
ixti has joined #ruby
<catcher>
How common is it for ruby / ror projects to use a template engine?
<c-c>
common
serivich has joined #ruby
<catcher>
c-c, would you say most use haml or slim?
momomomomo has quit [Quit: momomomomo]
tesuji has quit [Ping timeout: 276 seconds]
ndrei has quit [Ping timeout: 264 seconds]
_ixti_ has quit [Ping timeout: 256 seconds]
<c-c>
no idea what most use
<ytti>
haml is definitely more common than slim
<ytti>
had some slim issues, google-fu failed
<ytti>
for haml, it never fails
<apeiros>
I'd say historically it's erb > haml > slim. new projects it's probably reversed: slim > haml > erb
<catphish>
yaml is very common, iirs rails still prefers eruby/irb which means its still popular despite being (IMO) sucky
<catphish>
*haml
<catphish>
i haven't see much slim, but i believe that it's growing in popularity
<dorei>
isn't haml only for html?
SouL_|_ has quit [Read error: Connection reset by peer]
<apeiros>
dorei: yes, same for slim
<apeiros>
well, might also do xml
SouL_|_ has joined #ruby
<catphish>
i think it does any xml, but basically html
<dorei>
so, only erb is general purpose?
<catphish>
yes, erb isn't really a language, its just "run this ruby code and put the result here"
<apeiros>
from those 3? yes
haxrbyte_ has quit [Remote host closed the connection]
<catphish>
hence can be used for any type of output
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
<catphish>
whereas haml is a way of writing html, that integrated nicely with ruby code, i assume slim is the same though i haven't used it
Kovensky has joined #ruby
haxrbyte has quit [Remote host closed the connection]
MasterPiece has joined #ruby
haxrbyte has joined #ruby
orionstein has joined #ruby
<catphish>
ultimately it comes down to preference, but most people prefer not to write html by hand now from what i've seen, i'd avoid erb for HTML though it can be useful if you have a pre-made html page and just want to put in a little bit of dynamic data
allcentury has quit [Ping timeout: 272 seconds]
SirFunk has joined #ruby
philtr has joined #ruby
brixen has joined #ruby
sindork has joined #ruby
sweeper has joined #ruby
cpt_yossarian has joined #ruby
u- has quit [Remote host closed the connection]
<catcher>
Thanks for the feedback.
kbarry has joined #ruby
Gnubie_ has joined #ruby
livathinos has quit []
lidenskap has joined #ruby
afrianska has quit [Quit: Leaving]
mocha has joined #ruby
mocha is now known as Guest2867
failshell has quit [Read error: No route to host]
codecop has quit [Ping timeout: 276 seconds]
kirun has joined #ruby
bim has joined #ruby
bim is now known as Guest35429
ujihisa has quit [Ping timeout: 252 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lidenska_ has joined #ruby
lidenskap has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
My_Hearing is now known as Mon_Ouie
Caius has quit [Ping timeout: 276 seconds]
Caius has joined #ruby
dcarper has quit [Remote host closed the connection]
ki0 has quit [Remote host closed the connection]
bennysan has quit [Ping timeout: 264 seconds]
cocotton has quit [Remote host closed the connection]
charliesome has joined #ruby
serivich has quit [Ping timeout: 240 seconds]
EminenceHC has joined #ruby
chinmay_dd has quit [Quit: Leaving]
jamto11 has joined #ruby
rshetty has joined #ruby
vt102 has quit [Remote host closed the connection]
mistermocha has joined #ruby
evanjs has quit [Remote host closed the connection]
lavros has quit [Ping timeout: 245 seconds]
RegulationD has quit [Remote host closed the connection]
Hirzu has joined #ruby
hollywood has joined #ruby
bradleyprice has joined #ruby
<EminenceHC>
Say this block returns 100 records: Review.all.each do |review| How can I do something to 40 of them, and something else to 60 of them?
vire has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
DerisiveLogic has joined #ruby
<jhass>
?rails EminenceHC
<ruboto>
EminenceHC, Please join #RubyOnRails for Rails questions. You need to be authenticated with NickServ, see /msg NickServ help
<EminenceHC>
jhass: Sorry didnt realize it was rails specific.
<jhass>
the better solution is rails specific
lavros has joined #ruby
<jhass>
I think
<jhass>
depends on the something I guess
jamto11 has quit [Ping timeout: 240 seconds]
bigmac has quit [Ping timeout: 252 seconds]
<EminenceHC>
jhass: Updating an attribute.
existensil has quit [Ping timeout: 256 seconds]
teddyp1cker has joined #ruby
cocotton has joined #ruby
existensil has joined #ruby
cjim_ has joined #ruby
<shevy>
hanmac why do you use gemtree?
<shevy>
or perhaps why did you write it
<shevy>
damn it... I went to bed way too early, woke up at 2:00 am and now I am getting tired again ... but if I sleep now, I get basically nothing done; I came home about an hour ago...
banister has joined #ruby
startupality has quit [Quit: startupality]
momomomomo has quit [Ping timeout: 245 seconds]
Hijiri has quit [Ping timeout: 265 seconds]
spider-mario has joined #ruby
startupality has joined #ruby
noname1 has quit [Ping timeout: 264 seconds]
oo_ has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fuzzyhorns1 has joined #ruby
joonty has quit [Quit: joonty]
timonv has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
hazelux has quit []
tvw has quit [Remote host closed the connection]
sevvie has quit [Quit: leaving]
alex88 has quit []
CloCkWeRX has left #ruby [#ruby]
Zai00 has quit [Quit: Zai00]
gmas has joined #ruby
maletor has joined #ruby
senayar has quit []
freerobby has quit [Quit: Leaving.]
roolo has quit [Remote host closed the connection]
banister is now known as banisterfiend
startupality has quit [Quit: startupality]
freerobby has joined #ruby
wldcordeiro has joined #ruby
Timba-as has quit [Quit: Be back later ...]
scripore has joined #ruby
lidenska_ has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
sevvie has joined #ruby
rshetty has quit [Remote host closed the connection]
GaryOak_ has joined #ruby
rshetty has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
Guest35429 has quit [Remote host closed the connection]
momomomomo has joined #ruby
Dakuan has quit []
<shevy>
hey jhass did you get any death threads when you suggested to deprecated #ruby-lang?
<shevy>
erm
<shevy>
death *threats
<jhass>
not yet
Crisix has quit [Read error: No route to host]
<shevy>
and *deprecate, not deprecated. I need sleep apparently :(
<shevy>
awww
<GaryOak_>
It seems like there aren't many people talking in there
<shevy>
GaryOak_ tell them that to their faces!
<shevy>
but I have reconciled with my old enemies there ever since they no longer mandated registering to chat
<GaryOak_>
there's a lot of random shit in here though, but we usually stay on topic if someone asks a question
Hirzu has quit [Remote host closed the connection]
<shevy>
free donuts, free love, free chat
rshetty has quit [Ping timeout: 272 seconds]
<eam>
death threads would be like the Timeout module
<shevy>
hey it's ruby relevant
<shevy>
I am just coming home TO WRITE MORE RUBY code
devaraya has quit [Remote host closed the connection]
failshell has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
DaniG2k has quit [Quit: leaving]
<shevy>
I swear
<shevy>
60% of the vim config out on the www
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
is simply copy/pasting of other people's vim config
<shevy>
including their typos :D
<jhass>
it's evolution, copy paste and make random edits
<shevy>
it's now the third time I am reading: 'set cf " Enable error files & error jumping' (no typo there though)
<shevy>
yeah
<shevy>
copy paste for more power
Technodrome has quit [Quit: Technodrome]
edwinvdgraaf has quit [Ping timeout: 248 seconds]
codecop has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<GaryOak_>
who's the ghengis khan of vim configs?
deric_skibotn has joined #ruby
<shevy>
btw why aren't you a vimster jhass?
evanjs has joined #ruby
Rickmasta has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
<shevy>
GaryOak_ DHH?
Rickmasta has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ki0 has joined #ruby
icebourg has joined #ruby
mistermocha has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
<GaryOak_>
Are there any language compilers written in ruby?
mistermocha has joined #ruby
granthatcher has quit []
Technodrome has joined #ruby
krisquigley has joined #ruby
Hirzu has joined #ruby
<shevy>
hmmm
relix has joined #ruby
<shevy>
opal?
<shevy>
I think there are a few... let me think
failshell has quit [Remote host closed the connection]
<billy_ran_away>
Can anyone help me think of a good exercise for consuming or generating an array of hashes?
ki0 has joined #ruby
zorak8 has quit [Quit: Leaving]
doodlehaus has quit [Ping timeout: 256 seconds]
dc has joined #ruby
<eam>
billy_ran_away: can you give a bit more detail about your objective?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niKeITA has joined #ruby
<billy_ran_away>
eam: to demonstrate knowledge and comprehension of how to manipulate an array of hashes
dcarper has quit []
serivich has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
ki0 has quit [Remote host closed the connection]
robustus has joined #ruby
rshetty has quit [Remote host closed the connection]
Zai00 has joined #ruby
jinie has joined #ruby
rshetty has joined #ruby
ki0 has joined #ruby
Cust0sL1men has quit [Ping timeout: 276 seconds]
krisquigley has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
sevvie has quit [Remote host closed the connection]
sevvie has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
PaulCapestany has quit [Quit: .]
jinie has quit [Remote host closed the connection]
colorados has quit [Ping timeout: 265 seconds]
<shevy>
jhass ah, so vim for quickies, I see
jinie has joined #ruby
cocotton has quit [Remote host closed the connection]
Morkel has joined #ruby
<shevy>
billy_ran_away why not create a hash rather than an array?
iasoon has joined #ruby
mistermo_ has joined #ruby
<eam>
billy_ran_away: give someone a few pages of text from a book, ask for a per-paragraph and per-sentence word frequency count, printed in sorted order
<billy_ran_away>
shevy: yea either way, just trying to create a homework exercies...
PaulCapestany has joined #ruby
<billy_ran_away>
anyone know of a good api endpoint I could hit that has an array of hashes? preferably something that could be averaged or manipulated in some way?
momomomomo has joined #ruby
fabrice31 has joined #ruby
<billy_ran_away>
thought about a bitcoin exchange or something but there wasn't anything that looked super great...
fabrice31 has quit [Remote host closed the connection]
<eam>
billy_ran_away: just upload a static json file?
SouL_|_ has joined #ruby
rshetty has quit [Ping timeout: 264 seconds]
<billy_ran_away>
today's class is loops, arrays, and hashes, just need some homework where they loop though an array of hashes, but i can't think of any pre-text for why
ki0 has quit [Ping timeout: 255 seconds]
<apeiros>
billy_ran_away: parse a csv file
colorados has joined #ruby
<apeiros>
returning an array with {header => value, …} hashes
<billy_ran_away>
apeiros: got any interesting data to use for it?
<eam>
call it a ledger for a business with product: sale
SouL_|___ has quit [Ping timeout: 252 seconds]
<eam>
just make up some data
noobQ has quit [Quit: WeeChat 0.4.2]
<apeiros>
billy_ran_away: I'm sure there's plenty of gov data
cocotton has joined #ruby
dksla has joined #ruby
mistermo_ has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 272 seconds]
ki0 has joined #ruby
<billy_ran_away>
yea the only problem is i have to make a rule that you can't use a csv reader, or it can basically be done for them...
<shevy>
he is stealing patient data!
<shevy>
John Doe:
<shevy>
age: 42
iasoon has quit [Ping timeout: 272 seconds]
<shevy>
also add jack the ripper there, in the case your teacher is a psycho geek
<apeiros>
billy_ran_away: sure. use trivial csv, ie unquoted fields
<apeiros>
where you can just split on ,
Guest22781 has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
elaptics is now known as elaptics_away
<dudedudeman>
no, ERB is a templating language that allows you to embed ruby code in to HTML
Timba-as has joined #ruby
<dudedudeman>
so instead of index.html, you use index.erb and the browser will render that as html with ruby passed in to it
<aawe>
what
<aawe>
browsers know nothing about erb
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<dudedudeman>
i didn't say they did
<dudedudeman>
just that the browser will render the page as html with ruby passed in to it
Lloyd is now known as lloyd
Guest49815 has quit [Remote host closed the connection]
<Rakko>
yes, I know that
platzhirsch has left #ruby [#ruby]
<dudedudeman>
wait
<dudedudeman>
i'm looking at this now....
<dudedudeman>
and, i was confused
<dudedudeman>
but according to the wiki gods, erb is an "implementation of eRuby written purely in the Ruby programming language and included in the Ruby standard library"
cocotton has joined #ruby
Hijiri has joined #ruby
Hirzu has joined #ruby
soulcake has quit [Quit: Quack.]
<dorei>
>> require 'erb' ; @name = joe ; ERB.new("hello, my name is <%= @name %>").result(binding)
<ruboto>
dorei # => undefined local variable or method `joe' for main:Object (NameError) ...check link for more (https://eval.in/316058)
<dorei>
>> require 'erb' ; @name = 'joe' ; ERB.new("hello, my name is <%= @name %>").result(binding)
<Technodrome>
shevy: i get a headache too, i just don’t get why they are not consistent sometimes wen it make so much sense, unless there is some very good reasons
krnlsndrs has quit [Read error: Connection reset by peer]
mengu__ has quit [Remote host closed the connection]
<weaksauce>
looks like it yeah
yh has joined #ruby
<weaksauce>
but that's a hash of hashes sure.
jenrzzz has joined #ruby
<shevy>
hmm
milesmatthias has joined #ruby
<shevy>
would you store this as a table, and parse it; or store it directly in a hash?
<weaksauce>
table in the database?
<weaksauce>
probably not unless you needed to do some joins with it
krisquigley has joined #ruby
postmodern has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
mitchellhenke has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
spyderman4g63 has joined #ruby
yxhuvud has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
pen has quit [Remote host closed the connection]
kadoppe has joined #ruby
Joufflu has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
bklane has quit [Ping timeout: 250 seconds]
evanjs has quit [Remote host closed the connection]
Megtastique has joined #ruby
bklane has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
DerisiveLogic has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alienaut has quit [Ping timeout: 245 seconds]
VBlizzard is now known as _blizzy_
Rickmasta has joined #ruby
iasoon has quit [Ping timeout: 256 seconds]
zacts has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
jottr has joined #ruby
Rakko has left #ruby ["Bye"]
lolmaus has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
niKeITA has quit [Quit: ZZZzzz…]
sankaber has joined #ruby
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
momomomomo has quit [Ping timeout: 240 seconds]
pengin has quit [Remote host closed the connection]
failshell has joined #ruby
dc has quit []
jolg42 has joined #ruby
yxhuvud has joined #ruby
doodlehaus has joined #ruby
sargas has joined #ruby
dc has joined #ruby
failshell has quit [Read error: No route to host]
StephenOTT has left #ruby [#ruby]
failshell has joined #ruby
jheg has joined #ruby
ki0 has joined #ruby
momomomomo has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
sigurding has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
sts has left #ruby [#ruby]
jenrzzz has joined #ruby
pengin has joined #ruby
hollywood has quit [Quit: Leaving]
danman has joined #ruby
<shevy>
nono just for ruby
<shevy>
adding a database is overkill
iasoon has joined #ruby
Vols has joined #ruby
SouL_|__ has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
nfk|laptop has joined #ruby
anaeem1 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bklane has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 255 seconds]
ki0 has quit [Ping timeout: 264 seconds]
DerisiveLogic has joined #ruby
wallerdev has quit [Quit: wallerdev]
SouL_|_ has quit [Ping timeout: 245 seconds]
apoplexy has quit [Read error: Connection reset by peer]
EminenceHC has quit [Remote host closed the connection]
bklane has joined #ruby
jamto11 has joined #ruby
n008f4g_ has joined #ruby
stef204 has joined #ruby
vim_shimm has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
juanpaucar has joined #ruby
Hirzu has quit [Ping timeout: 256 seconds]
Hirzu has joined #ruby
basiclaser has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
Hirzu has quit [Remote host closed the connection]
arrnas has joined #ruby
jamto11 has quit [Ping timeout: 245 seconds]
bklane has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
juanpaucar has quit [Ping timeout: 250 seconds]
teddyp1cker has quit [Remote host closed the connection]
zorak8 has joined #ruby
dfinninger has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
lolmaus has joined #ruby
<wasamasa>
you mean, a rdbms
<wasamasa>
since strictly speaking, a fucking json dump is a database
gfawcettpq has quit [Ping timeout: 256 seconds]
marr has joined #ruby
yqt has joined #ruby
bklane has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<shevy>
I don't use json
pengin has quit [Remote host closed the connection]
iamjarvo has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
<eam>
shevy: why not
iamjarvo_ has joined #ruby
iamjarvo_ has quit [Max SendQ exceeded]
iamjarvo_ has joined #ruby
<rom1504>
because he likes yaml ofc
<shevy>
eam dunno, I always used yaml sort of and kind of got used to it
vickleton has quit [Read error: Connection reset by peer]
<shevy>
I remember a long time ago, fowl/fowlmouth having used .ini format files
<shevy>
[header]
<shevy>
bla
<GaryOak_>
Too many tabs in Yaml
<shevy>
[another_header]
<ytti>
i use json for m2m
<shevy>
he ended up with #nim as former ruby hacker :)
<ytti>
yaml for humans
vickleton has joined #ruby
<ytti>
TOML is ini-style, rust uses it for their package manager
<rom1504>
when you have a simple standard like json, what do you do ? invent a new language with the same purpose but with a far more complicated syntax of course
mengu__ has joined #ruby
vickleton has quit [Read error: Connection reset by peer]
Hijiri has quit [Ping timeout: 264 seconds]
vickleton has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
dc has quit []
cpt_yossarian has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<ytti>
there are plenty of serialization formats predating json
jottr has joined #ruby
<ytti>
i think fragmentation encourages innovation and progress
<eam>
yaml is a mess, toml is ugly
<eam>
json is unfortuante too but at least it's not quite so large
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rom1504>
"but not all json are ijson" => ijson is more complicated to check
sohrab has joined #ruby
<havenwood>
Ruby object notation is nice.
pwattste has quit [Remote host closed the connection]
<eam>
rom1504: that's correct, it forces an early failure rather than produce ambiguity
<eam>
usually that's a good thing
<ytti>
i would personally find it much easier to parse IJSON than JSON
relix has joined #ruby
<ytti>
because it's more strict, which means i can make more assumptions and write less code
<eam>
I don't see any changes which would make parsing simplified, the constraints seem to relate to data and datastructure limits
ki0 has joined #ruby
<ytti>
i can rely it's utf8
pengin has joined #ruby
<eam>
ytti: json already is utf8
<ytti>
it's not mandatory
<eam>
pretty sure it is? checking
<dorei>
u can always uuencode :p
<eam>
oh, json is either utf8, 16 or 32
<ytti>
i don't have to be prepared to handle arbitrarily large numbers
<ytti>
i can just put number in fixed size integer
<ytti>
and not worry about it
<havenwood>
Not lispy enough. Let's use EDN.
S0da has joined #ruby
sigurding has quit [Quit: sigurding]
oo_ has joined #ruby
evanjs has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
zoo-zed has joined #ruby
Guest45720 has quit [Remote host closed the connection]
SouL_|_ has joined #ruby
zorak8 has joined #ruby
adamjleonard has joined #ruby
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby
kirun has quit [Quit: Client exiting]
SouL_|__ has quit [Ping timeout: 265 seconds]
mwlang has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
iamjarvo has joined #ruby
momomomomo has quit [Read error: Connection reset by peer]
moeabdol has quit [Ping timeout: 246 seconds]
<mwlang>
I want to break up a large monolithic ruby file into several files organized by class names of the objects in the file. I am wondering what the best way to do the requires. I’ll likely organize the model classes similar to Rails’ models into two or three sub-folders, but I wasn’t sure if I could somehow do an auto-load approach without having to name everything explicitly with a require.
<mwlang>
anyway, what are some suggested gems out there that I can steal the playbook from that do project file organization and autoload extremely well?
<dorei>
mwlang: something like this: Dir[File.join(File.dirname(__FILE__), '..', 'models', '*.rb')].each { |f| puts f;require f } might help
<pipework>
mwlang: I make files require their dependencies.
hanmac has quit [Ping timeout: 265 seconds]
<havenwood>
mwlang: Have the file structure mirror the namespace.
<mwlang>
dorei: I’ve done that before. Just seems a little hacky.
allcentury has quit [Ping timeout: 250 seconds]
ki0 has quit [Remote host closed the connection]
<mwlang>
havenwood: that’s what I’m after…mirroring the namespace with sub-folders..but I wasn’t sure the best way to load all the parts up.
bklane has quit [Ping timeout: 256 seconds]
<mwlang>
one of my concerns is I do have a Base class that a bunch of models inherit from, so that base.rb definitely has to get loaded before the first model that uses it.
momomomomo has joined #ruby
<havenwood>
mwlang: Like pipework said, have the files require their deps.
lolmaus has quit [Quit: Konversation terminated!]
bruno- has joined #ruby
wldcordeiro has quit [Ping timeout: 250 seconds]
bklane has joined #ruby
Ellis has joined #ruby
<Ellis>
how do i return the value of an instance variable after creating an instance of a class?
<havenwood>
Ellis: As the instance of the class by way of a method it exposes.
<havenwood>
Ellis: s/As/Ask
<havenwood>
Ellis: So like an attr_reader is the simplest.
milesmatthias has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
<Ellis>
woo! thanks havenwood, i appreciate it
aswen has joined #ruby
bklane has quit [Read error: Connection reset by peer]
aswen has quit [Client Quit]
<catcher>
What's used more commonly, procs or lambdas?
fryguy9 has joined #ruby
<pipework>
yes
<GaryOak_>
perfect
hanmac has joined #ruby
<GaryOak_>
I've seen more proc examples
<catcher>
I see what their differences are, but when those don't matter, what's used more?
<catcher>
I haven't seen dashrockets for blocks yet, I'm sure I will soon
fryguy91 has quit [Ping timeout: 248 seconds]
aswen has joined #ruby
_honning_ has joined #ruby
bklane has joined #ruby
allcentury has joined #ruby
lidenskap has joined #ruby
bklane has quit [Client Quit]
momomomomo_ has joined #ruby
_djbkd has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ is now known as momomomomo
timonv has joined #ruby
anaeem1 has quit [Remote host closed the connection]
evanjs has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 255 seconds]
milesmatthias has joined #ruby
ki0 has joined #ruby
zzing has joined #ruby
NinjaOps has quit [Quit: Konversation terminated!]
jolg42 has quit [Quit: ZZZzzz…]
spider-mario has joined #ruby
Vols has joined #ruby
pengin has quit [Remote host closed the connection]
vim_shimm has joined #ruby
bootstrappm has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
Morkel has quit [Quit: Morkel]
towler has joined #ruby
Pumukel has joined #ruby
ki0 has quit [Client Quit]
edwinvdgraaf has quit [Remote host closed the connection]
mwlang has quit [Quit: mwlang]
edwinvdgraaf has joined #ruby
jamto11 has joined #ruby
aswen has quit [Quit: WeeChat 1.0.1]
sargas has quit [Remote host closed the connection]
sargas has joined #ruby
sargas has quit [Max SendQ exceeded]
Hijiri has joined #ruby
sargas has joined #ruby
hdkwkd has joined #ruby
cefkamcau has joined #ruby
<ninjs>
I really want to like python more (it runs on more things, it has a bunch more libraries for standard computing stuff) but I just can't. I always keep deferring to Ruby. Ruby is too good
<GaryOak_>
ninjs: I feel the same way
JDiPierro has joined #ruby
<ninjs>
GaryOak_: It's just so much more natural to me. Writing ruby I don't even have to think about it. Python on the other hand...
jolg42 has joined #ruby
jamto11 has quit [Ping timeout: 276 seconds]
zzing has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
zzing has joined #ruby
techietrash has joined #ruby
<bootstrappm>
it makes me sad that the python DevOps tools are considered better than the Ruby ones
<bootstrappm>
I wanna be able to use Ruby in my whole stack
yh has quit [Ping timeout: 272 seconds]
zachrab has joined #ruby
nszceta has joined #ruby
<ninjs>
I think python scripts seem to work with less errors on a PC, not sure why. The python way is just more PC friendly. but in a linux/unix environment, Ruby has been king for all of my devops stuff
edwinvdgraaf has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjs2600 has joined #ruby
jheg has quit [Ping timeout: 245 seconds]
eshiffob has quit [Ping timeout: 264 seconds]
pengin has joined #ruby
failshell has joined #ruby
<hdkwkd>
I think the differences between python and ruby are not very deep
edwinvdgraaf has joined #ruby
jheg has joined #ruby
<ytti>
if pc means windows, ruby definitely isn't too strong there
zzing has quit [Read error: Connection reset by peer]
<Hijiri>
are you including PC linux/unix with PC?
<Hijiri>
nevermind, ytti beat me
scripore has quit [Quit: This computer has gone to sleep]
konsolebox has joined #ruby
<ninjs>
yeah that's what I meant by PC. Windows
<ytti>
i've had my first windows desktop for 6months or so now
<ytti>
it makes me misarable
<ytti>
i don't say windows is worse, it's just not what i'm used to
<ninjs>
for instance, my python script that renames folders works flawlessly on mac and windows. My ruby script works great on mac, not on windows. Working on the same directory
<ytti>
but i've let myself understand windows is big deal for game devels
<Hijiri>
if you adopt stallmanism you will have no trouble saying that windows is worse
<ninjs>
ytti: it is, unless you consider the fact that 'gaming' branches to a huge mobile gaming market now, which is almost solely done in xcode on macs
yh has joined #ruby
<ninjs>
except for android stuff I guess... but the real money is in iOS anyways
relix has joined #ruby
<Hijiri>
year of the linux desktop!
JDiPierro has quit [Read error: Connection reset by peer]
hectortrope has joined #ruby
<ninjs>
That's what I've done at home. Built a super beefy desktop that runs windows for games and linux for everything else
<Hijiri>
pulseaudio driver means wine won't steal my audio if I use PA for stuff?
<diegoviola>
pulseaudio driver means wine will use be able to use pulseaudio
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<diegoviola>
so you don't have to redirect alsa to pulse
<Hijiri>
thanks diegoviola
<diegoviola>
it's beyond me why wine devs don't add pulse support to wine yet
<diegoviola>
I refuse to use wine without pulse support
krisquigley has quit [Ping timeout: 250 seconds]
JDiPierro has quit [Ping timeout: 256 seconds]
<jhass>
it's been ages since I needed wine
codecop has quit [Remote host closed the connection]
<diegoviola>
I don't game anymore so I don't need wine
yh has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 250 seconds]
kostitas has joined #ruby
yh has joined #ruby
<bricker>
what
* bricker
reads history
<bricker>
oh
RegulationD has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
kostitas has left #ruby [#ruby]
<GaryOak_>
games that have in-app purchases are better off providing as many platforms as possible, which also encourages new tech to be built for those platforms
postmodern has quit [Quit: Leaving]
anthony_ has joined #ruby
sfate has joined #ruby
sfate has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<catcher>
Is linux generally the preferred OS for ruby dev?
duderonomy has joined #ruby
<GaryOak_>
I think unix in general
<GaryOak_>
there aren't that many differences between linux and mac
<havenwood>
catcher: A BSD or GNU/Linux of some flavor, generally.
<catcher>
havenwood, nice. More common than mac you think?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
catcher: Lots of OS X and some FreeBSD, OpenBSD and NetBSD too. I was counting OS X as a BSD since it is.
<catcher>
fair enough
zachrab has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
zzing has quit [Read error: Connection reset by peer]
zzing has joined #ruby
phutchins has joined #ruby
RegulationD has joined #ruby
yfeldblum has joined #ruby
parduse has joined #ruby
juanpaucar has joined #ruby
giuseppesolinas has quit [Quit: Leaving]
prphp has quit [Client Quit]
timonv has quit [Ping timeout: 256 seconds]
Hirzu has joined #ruby
danman has quit [Quit: danman]
momomomomo has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
momomomomo has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
<Naypalm>
so right I have this 45 year old filthy rails app that won't run and 1/50000 of the gems in its Gemfile have been updated in the past century
<Naypalm>
what's the best course of action of redeploying this
<Naypalm>
from Heroku and their magical woo-wee cloud solution?
Rapier- has quit [Quit: (null)]
zzing has quit [Read error: Connection reset by peer]
spyderman4g63 has quit [Remote host closed the connection]
<Naypalm>
haven't been updated*
juanpaucar has quit [Ping timeout: 245 seconds]
zzing has joined #ruby
spyderman4g63 has joined #ruby
iamninja_ has joined #ruby
<Naypalm>
at the moment I'm thinking a nuclear bomb would do the trick
avleen has joined #ruby
Powf has joined #ruby
scripore has joined #ruby
<Powf>
Hi, is there a way to force print or puts in an erb file please ? <%= is not working well for me because I am doing <%= Object.print %> which is using puts
hiyosi has joined #ruby
<jhass>
Naypalm: we may be able to help with concrete issues (and #RubyOnRails even more so), but you won't get anything useful in the vague
jheg has quit [Quit: jheg]
<avleen>
hey folks, i've got a real weird one here: https://gist.github.com/avleen/51d15d8d327787d0e7ab array.each -> if -> if I'm updating a variable (@mac_address), if i do it inside an if, which is inside another if, which is inside an Array.each, the variable is never updated in the global scope.
Hirzu has quit [Ping timeout: 255 seconds]
<jhass>
Powf: <%= foo %> or <%= foo.inspect %>, depending on what you want
<avleen>
if i update it one level up inside the first if, then it is updated
<Naypalm>
yeah I know, it's just *sigh*
<avleen>
anyone seen that before?
<Naypalm>
let me see
JDiPierro has quit [Ping timeout: 252 seconds]
JDiPierro has joined #ruby
yh has quit [Ping timeout: 265 seconds]
<jhass>
Naypalm: you get the output of the puts though?
chipotle has joined #ruby
<jhass>
er avleen ^, sorry
vim_shimm has quit [Ping timeout: 256 seconds]
<avleen>
jhass: totally
SouL_|__ has joined #ruby
<Naypalm>
the "puts"?
<avleen>
jhass: the puts works fine, and can correctly print the value
edwinvdgraaf has joined #ruby
loechel has joined #ruby
loechel has quit [Client Quit]
<Naypalm>
I think this is more RoR based so I might migrate my questions to there
<jhass>
avleen: is that intended to be a find last algorithm, not find any or find first?
<Powf>
jhass: No, I already have a specific function that prints what I want (MyObject.print does exactly my need). I need to call it in the erb file but the erb file overwrite my behavior
gusrub has joined #ruby
<avleen>
jhass: it'll only ever find one or none, but yeah find last. i've tested it a few other ways to make sure @mac_address isn't getting set back to nil later or something, and that's definitely not happening
JDiPierro has quit [Remote host closed the connection]
<jhass>
Powf: you can't redirect stdout to an erb file in a sane manner, rewrite your method to return the string
jamto11 has joined #ruby
Pumukel has quit [Ping timeout: 276 seconds]
ghr has joined #ruby
<jhass>
avleen: try using .find then
yh has joined #ruby
<jhass>
@mac_address eths.find {|iface| ...
SouL_|_ has quit [Ping timeout: 246 seconds]
<avleen>
jhass: lemme give that a shot
<jhass>
er, @mac_address = eths.find {|iface|
<avleen>
good call
<Shidash_>
Hi- I'm getting a weird warning I've never seen before when I try to build a gem- "WARNING: lib/extract_set_terms.rb is not world-readable"
<Shidash_>
What does world-readable here mean? I can't seem to find any explanation of this anywhere
<Shidash_>
and the permissions look the same as on the files for any other gems I've made
cjim_ has quit [Quit: (null)]
<jhass>
Shidash_: o+r
adamjleonard has quit [Quit: Leaving...]
Juanchito has quit [Quit: Connection closed for inactivity]
shevy has quit [Ping timeout: 252 seconds]
platzhirsch has joined #ruby
<platzhirsch>
How's everyone
<avleen>
jhass: looks like .find isn't in 2.0, so that'll break when i upgrade ruby. any idea for a method that is more future proof? :)
<jhass>
what? what kind of object is eths?
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
it's there since ever afaik
<avleen>
oh, the 2.0 docs for Array didn't show it
<dudedudeman>
i have 4 get requests that i'm trying to pass
aevitas has joined #ruby
<jhass>
?gist-usage dudedudeman
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
aevitas has quit [Client Quit]
<dudedudeman>
the first 13 lines pass correctly
Zai00 has joined #ruby
cjim_ has joined #ruby
moted has joined #ruby
vdamewood has joined #ruby
<dudedudeman>
what i'm trying to do, is pass my params back in on line 20 so i can make a thing/new page here
ndrei has joined #ruby
aevitas has joined #ruby
<dudedudeman>
i currently can get /monitors/:tag/calibrations to work
aevitas has quit [Client Quit]
<dudedudeman>
what i want, is a /monitors/:tag/calibrations/new page
aevitas has joined #ruby
aevitas has quit [Client Quit]
aevitas has joined #ruby
mtakkman has quit [Ping timeout: 250 seconds]
shoutsid has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
Igorshp has quit [Remote host closed the connection]
zachrab has joined #ruby
rodfersou has quit [Quit: leaving]
cocotton has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<dudedudeman>
i know i can add a ?tag=abcdef to the end of a calibrations/new route, but that doesn't help solve the issue of how to call which ever tag is stored in params[:tag]?
<dudedudeman>
my console output gives me this: "GET /monitors//calibrations/new HTTP/1.1" 404 400 0.0026
<dudedudeman>
so it's routing, just skipping over the :tag param that i want to pass in to it
mary5030 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
arrnas has quit [Remote host closed the connection]
<jhass>
does params["tag"] work?
<dudedudeman>
it does in my first route
<dudedudeman>
oh, you mean not :
<havenwood>
Well, it's 4/20, so Happy Spring Equinox to all!
catcher has quit [Ping timeout: 250 seconds]
<dudedudeman>
where would you recommend placing that, jhass
<dudedudeman>
?
<jhass>
?
<adaedra>
?
<dudedudeman>
to try it
<jhass>
well, what options do you see?
<adaedra>
havenwood: it’s 20/4 é_è
<havenwood>
Or if you prefer, Happy Setting Orange, this fine 37th day of Discord.
<jhass>
isn't it hitlers birthday or something?
<adaedra>
ó_ò
julskds has joined #ruby
zzing has joined #ruby
<dudedudeman>
as i look at it(in reference to my gist), i could place it in my redirect on line 16, or i could place it after my call to calibrations/new on line 15?
DEA7TH has quit [Ping timeout: 245 seconds]
<Scriptonaut>
4/20 here involves a bunch of the ganja stores giving out free samples
<jhass>
dudedudeman: huh? I'd like how you place in line 15 :P
cocotton has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<jhass>
*like to see
<Scriptonaut>
no hitler stuff
rgb-one has quit [Ping timeout: 240 seconds]
<dudedudeman>
ah, you're right. i wouldn't that wouldn't be string interpolation. sorry.. lol
<bricker>
#NoHitlerStuff
<dudedudeman>
what i mean, is in my .erb template, where i call a href on that calibrations/new
SouL_|__ has quit [Remote host closed the connection]
julskds has left #ruby [#ruby]
<Scriptonaut>
huehue
<avleen>
jhass: thanks for the tip earlier. .find worked like a charm.
pika_pika has quit [Ping timeout: 245 seconds]
<jhass>
avleen: yw
avleen has left #ruby ["WeeChat 1.0.1"]
<jhass>
dudedudeman: now that's a quite different question
zachrab has quit []
<jhass>
dudedudeman: why would you ever call that route if all it does is redirectß
<jhass>
?
<jhass>
I thought you're providing stuff to legacy clients there
evanjs has quit [Remote host closed the connection]
rgb-one has joined #ruby
<dudedudeman>
i do that because you can't do string interpolation on an a href? as far as i understood
<jhass>
sure you can
<GaryOak_>
Does ruby's case, have the ability to fall through to the next case?
<jhass>
dudedudeman: erb doesn't call _at all_ where you insert a <%=
<bricker>
GaryOak_: sadly, no, ruby's implicit return also means implicit break
<jhass>
er, doesn't care
<dudedudeman>
oh my god.... is that what i've been sitting here missing
<bricker>
GaryOak_: HOWEVER, ruby does let you specify multiple conditions for a single case block: `case String, Array `
<GaryOak_>
bricker: so the best I can do is a bunch of if statements?
<jhass>
dudedudeman: erb is just fancy way to build a string, it doesn't even know you're building HTML
<bricker>
GaryOak_: Closest you'll get is to use the multi-condition case as I said above
adamjleonard has quit [Quit: Leaving...]
<GaryOak_>
I'm building a custom sql query builder that can check if a value is set and add it to a query
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Client Quit]
Rickmasta has joined #ruby
cjim_ has quit [Quit: (null)]
<dudedudeman>
jhass: if i'm using this to call my route: <a href="/calibrations/new">Add Calibration</a>, where would <%= %> fit in that/
<dudedudeman>
?
<dudedudeman>
i tried putting it inbtween calibration and new, but that didn't work
Mon_Ouie has quit [Ping timeout: 276 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
<jhass>
dudedudeman: <a href="/monitors/<%= tag %>/calibrations/new">Add Calibration</a>
Mon_Ouie has joined #ruby
<jhass>
replace tag with whatever you get the tag from
ghr has quit [Ping timeout: 244 seconds]
failshell has quit [Remote host closed the connection]
DerisiveLogic has quit [Remote host closed the connection]
<dudedudeman>
but, passing params["tag"] would be a better option
<adaedra>
(I’ll need a moment to backlog all that)
<dudedudeman>
ok
charliesome has quit [Read error: Connection reset by peer]
charliesome_ has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
failshell has quit [Remote host closed the connection]
MatthewsFace has quit [Ping timeout: 248 seconds]
<jhass>
dudedudeman: no, I think you just incorrectly described your issue, we're past that aren't we? You don't need the additional routes at all
edwinvdgraaf has joined #ruby
<dudedudeman>
i'd agree, i'm not wanting to add additional routes, but it seems that one of my routes is wrong?
_djbkd has quit [Read error: Connection reset by peer]
DerisiveLogic has quit [Remote host closed the connection]
<jhass>
you do know that we don't see your screen?
_djbkd has joined #ruby
<dudedudeman>
yes i do know that.
<dudedudeman>
what else can i gist for you
krisquigley has joined #ruby
mwlang has joined #ruby
<jhass>
start by properly describing your issues, if you use "X is wrong" and "X doesn't work", you're doing it wrong
<jhass>
1) assumption 2) steps you took to verify your assumption 3) actual behavior
riotjone_ has joined #ruby
<adaedra>
standard format: This is my code, I want it to do this, It does this. (Replace this by concrete, reproductible samples)
fryguy9 has quit [Ping timeout: 265 seconds]
ghr has joined #ruby
bim has joined #ruby
<mwlang>
I’m working on setting up specs for my project. This project is processing about 500mb of data each time the scripts run for it, so I want to be sure the PORO’s are being released/garbage collected at the end of each section. How can I be sure the objects are getting GC’d (other than just watching memory consumption via top, etc. in the OS?
Zai00 has joined #ruby
bim is now known as Guest91497
<mwlang>
for those curious, its using the Ox gem and the SaxParser to process large XML files.
<adaedra>
mwlang: I don’t think GC is predictable
<adaedra>
supposed to be*
<mwlang>
adaedra: aren’t there techniques for peeking into the GC and or doing a manual flush and then checking things?
<dudedudeman>
adaedra: possible? at this point i don't care if it's a button or a link or whatever, i just need to get to my '/new' page
<jhass>
>> GC.stat
<ruboto>
jhass # => {:count=>5, :heap_allocated_pages=>35, :heap_sorted_length=>36, :heap_allocatable_pages=>0, :heap_av ...check link for more (https://eval.in/316133)
Rollabunna has quit [Remote host closed the connection]
<mwlang>
jhass: bingo
Rollabunna has joined #ruby
<adaedra>
dudedudeman: so what’s your problem with "/monitors/#{params[:tag]}/calibrations/new" ?
<adaedra>
just put some erb code that outputs that
MatthewsFace has joined #ruby
<jhass>
dudedudeman: <a href="/monitors/<%= tag %>/calibrations/new">Add Calibration</a> # what's wrong with that?
<adaedra>
(it’s late, my backlogging capacity is down actually, sorry)
a5i has quit [Quit: Connection closed for inactivity]
<dudedudeman>
adaedra: no worries. when i first posted my issue here, my output console is showing /monitors//calibrations/new. it's skpping over where i want to put the params entirely
FernandoBasso has joined #ruby
<dudedudeman>
jhass: what's wrong with that, is me. i'm sure i'm not using that correctly
<adaedra>
what do you mean, not using that correctly
<adaedra>
it doesn’t work?
<adaedra>
what does it displays?
<jhass>
dudedudeman: since I don't want to guess how you get the tag, you need to replace it
Zai00 has quit [Quit: Zai00]
ghr has quit [Ping timeout: 240 seconds]
<dudedudeman>
i'm getting it like so: @tag = DreamColorMonitor.find_by_tag(params[:tag])
<jhass>
if you did that, back to our base 3: what did you replace it with (your assumption), how did you verify your assumption (looking at the generated source, just clikcing on it?), what's the actual behavior
mjs2600 has quit [Quit: Connection closed for inactivity]
paulcsmith has quit [Quit: Be back later ...]
<mwlang>
havenwood: thanks for that link. Good coverage of GC in general.
<dudedudeman>
my apologies for not seeming to grasp this, guys
adamjleonard has quit [Quit: Leaving...]
Nuck has joined #ruby
<jhass>
don't apologize, provide more info
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<dudedudeman>
ok
<dudedudeman>
jere
roolo_ has quit [Remote host closed the connection]
<dudedudeman>
and i'm attempting to call from my erb template based on what you mentioned, jhass: <a href="/monitors/<%= @tag %>/calibrations/new">Add Calibration</a>
hannahkoala has joined #ruby
<havenwood>
dudedudeman: name the gist filename with a .rb extension
hannahkoala has quit [Read error: Connection reset by peer]
hannahkoala has joined #ruby
<adaedra>
and I suppose you’re trying to get this displayed from the calibrations.erb file ?
<jhass>
you provided your assumption, you still refuse to provide actual behavior
teddyp1cker has joined #ruby
<dudedudeman>
on that gist, lines 1-12 show up correctly in my browser as i want them to
<jhass>
all we know so far is that "it doesn't work"
<adaedra>
ok, time to go to sleep for me, see ya all
zzing has quit [Read error: Connection reset by peer]
<dudedudeman>
i guess what's frustrating here, jhass, is that i feel my code is my actual behavior. i'm trying to write out in code what i want to do
AlphaAtom has quit [Ping timeout: 255 seconds]
<jhass>
I think I bail out of this, somebody else can try to get any kind of useful information out of this guy
roolo has quit [Ping timeout: 250 seconds]
dfinninger has quit [Remote host closed the connection]
<Rennex>
heh, you guys
Filete has joined #ruby
juanpaucar has joined #ruby
Nuck has joined #ruby
<Rennex>
looks a bit like you get yourselves frustrated a bit too... you're hung up some 1-2-3 process but not saying what exactly you want to know (even if it'd be nice to not have to ask) :P
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
teddyp1cker has quit [Ping timeout: 264 seconds]
<dudedudeman>
i'd agree to that. lol. i do realize there are rules to a chat like this, but i joined like, a week ago? i'm still working on navigating all of them.
<dudedudeman>
but it's not just rules for this chat, there are rules to properly asking a question so that one is not wasting someone's time who is willing to help out
<dudedudeman>
which i believe is what jhass is frustrated about
startupality has joined #ruby
noname1 has joined #ruby
juanpaucar has quit [Ping timeout: 256 seconds]
phutchins has quit [Read error: No route to host]
doodlehaus has joined #ruby
<jhass>
your code is your assumption, it should do something, you observe it and it doesn't do what you assumed, which leads you to saying "it doesn't work". What you observe there is the actual behavior. You share your conclusion of the actual behavior ("it doesn't work"), but not the actual behavior (the output of your program in most cases)
DerisiveLogic has joined #ruby
<dudedudeman>
i did share my output, jhass, a couple times. i says this: "GET /monitors//calibrations/new HTTP/1.1" 404 400 0.0022
<dudedudeman>
unless i'm royally f*cking up what i'm thinking my output is
danzilio has joined #ruby
<dudedudeman>
but when i run my code, click my links, that's what shows up. that exact 'error'
<dudedudeman>
in my console
<jhass>
that's actually input, in this case affected by previous output
<Rennex>
...
danzilio has quit [Max SendQ exceeded]
<jhass>
your output would be the generated HTML in this case
<Rennex>
dudedudeman: so, add a p(params) before that redirect "/monitors/#{params[:tag]}/calibrations/new", and see what it prints to console?
doodlehaus has quit [Remote host closed the connection]
<Rennex>
jhass: semantics which are at best tangential to the problem
<jhass>
Rennex: he only does that redirect because he can't believe that you can use erb tags inside an a's href
<dudedudeman>
please don't make assumptions about me like that, jhass
zorak8 has joined #ruby
<jhass>
23:50 <dudedudeman> i do that because you can't do string interpolation on an a href? as far as i understood
gusrub has quit [Quit: Leaving]
ghr has joined #ruby
<dudedudeman>
and then you told me differently, and then i realized my mistake, and moved on
Deele has quit [Ping timeout: 256 seconds]
<jhass>
then why do we still bother with the redirect?
<Rennex>
i like to think that the first objective is to make things work, and only second to make it good if the author has the time and enough knowledge of ruby.. :)
<dudedudeman>
because i'm not quick enough to rewrite what i'm attempting to do. i know the redirect works in the first place. i have one of them working. the other is not working, that is the one i'm coming to you guys with issues about. why try to fix something that isn't broken?(yet..)
paulcsmith has joined #ruby
<jhass>
share your current code (including the view), you mentioned you set @tag, none of the code you shared does so
<dudedudeman>
i have your notes about what you said about erb tags inside of a href, and when i get my issue worked out, i was actually planning on going back and refactoring all of this
<dudedudeman>
do you want my entire github to the project?
<jhass>
why not
milesmatthias has quit [Remote host closed the connection]
<dudedudeman>
ok, i'll push my latest and share
vdamewood has joined #ruby
<dudedudeman>
also, Rennex, when i do p(params) i get a {} after that redirect
milesmatthias has joined #ruby
zzing has quit [Read error: Connection reset by peer]
<Rennex>
dudedudeman: even when you get that route with a query string, like "/calibrations/new?tag=abc123" ?
realinam has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<dudedudeman>
GaryOak_: it's a type of monitor made by HP used for color accurate display
milesmatthias has quit [Ping timeout: 264 seconds]
<dudedudeman>
i'm in charge of calibrating them at work(i do not have a full-time dev job) and i'm working on building an app that will let me keep track of them online
<dudedudeman>
Rennex: i did that earlier, and while it does pass in the tag to the position i want, it still gives me an error and wont display my erb file
<dudedudeman>
an html error, not an input from my console, as i learned from jhass
iceden has quit [Read error: Connection reset by peer]
<dudedudeman>
now, when i look at my console, it does have a has of {"tag"=>"abc123"} from the p(params)
xploshioon has quit [Quit: Leaving]
<Rennex>
ok. so what's the html error? like sinatra's own debugging page?
<dudedudeman>
sorry, didn't realize that would break it up in to three lines
nfk|laptop has quit [Quit: yawn]
nfk has quit [Remote host closed the connection]
<dudedudeman>
it throws a 404 and 407 http error?
aevitas has quit []
lidenskap has joined #ruby
failshell has quit [Ping timeout: 276 seconds]
<Rennex>
you have a `get 'monitors/:tag/calibrations/new' do`
icebourg has quit []
_djbkd has quit [Read error: Connection reset by peer]
<Rennex>
that's missing a slash from before monitors :P
<dudedudeman>
... can i swear in here?
_djbkd has joined #ruby
<Rennex>
i dunno, i don't mind ;)
<dudedudeman>
fuck me.
* dudedudeman
is fucked
iceden has joined #ruby
bim has joined #ruby
<dudedudeman>
well, fixing that brings about another error
<dudedudeman>
this time i get an actual error page
bim is now known as Guest1505
Timba-as_ has quit [Quit: Be back later ...]
Billias has joined #ruby
<dudedudeman>
undefined method 'get'
<dudedudeman>
i'm googling that now
<Rennex>
dudedudeman: you get that if you try to put a route definition inside another
<dudedudeman>
a route definition inside another
<Rennex>
like get "/foo" { get "/bar" ... }
<dudedudeman>
oh!
<dudedudeman>
i see that
snockerton has quit [Quit: Leaving.]
Guest1505 has quit [Ping timeout: 240 seconds]
<dudedudeman>
inside that get request, i had @tag = DreamColorMonitor.get(params[:tag])
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rennex>
ah, yes
<dudedudeman>
i didn't think about that possibly messing with my http get request
iasoon has quit [Ping timeout: 245 seconds]
<Rennex>
it wouldn't, if that class actually defined a get() method
TheNet has quit [Quit: leaving]
serivich has joined #ruby
<dudedudeman>
making the appropriate instance variables for erb as directed by jhass, adding in a freaking / where i didn't realize i was missing one, and then the get thing you just described... well, that made it work!
<Rennex>
finally :)
<dudedudeman>
:-!
failshell has joined #ruby
<dudedudeman>
jhass: thank you.
<dudedudeman>
you too, Rennex
doodlehaus has joined #ruby
<Rennex>
no prob
<dudedudeman>
i'm going to go re-think a few things and write down what i've learned
doodlehaus has quit [Remote host closed the connection]
vickleton has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
bricker has joined #ruby
a5i has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Ping timeout: 252 seconds]
vdamewood has quit [Quit: Computer has gone to sleep.]
hiyosi has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
tjbiddle has joined #ruby
iasoon has joined #ruby
VBlizzard has joined #ruby
_blizzy_ has quit [Disconnected by services]
VBlizzard is now known as _blizzy_
failshell has quit []
scripore has quit [Quit: This computer has gone to sleep]
_honning_ has joined #ruby
evanjs has joined #ruby
steffes has joined #ruby
QKO has joined #ruby
Ellis has joined #ruby
zorak8 has quit [Quit: Leaving]
Ellis has quit [Client Quit]
blackmesa has quit [Ping timeout: 276 seconds]
DerisiveLogic has quit [Ping timeout: 276 seconds]
kblake has quit [Read error: Connection reset by peer]
scripore has joined #ruby
chipotle has joined #ruby
Vols has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Max SendQ exceeded]
kblake has joined #ruby
f3ttX] has joined #ruby
chipotle has joined #ruby
dodobrain has joined #ruby
Vivex_ has joined #ruby
neohunter has joined #ruby
doodlehaus has joined #ruby
zzing has quit [Read error: Connection reset by peer]