<ruurd>
hays it looks for an F case insensitive (i think) in a string
<ruurd>
F for Female
<Ox0dea>
hays: It's just another way to match.
jeramyRR has joined #ruby
dimasg has quit [Ping timeout: 246 seconds]
<ruurd>
/something/options is a shorthand for creating a regular expression
<Ox0dea>
hays: You've got String#match, Regexp#match, String#=~, Regexp#=~, and String#[] with a Regexp in the first slot.
<Ox0dea>
I'm partial to the last, though I couldn't say precisely why.
cball has joined #ruby
juanpablo_____ has joined #ruby
<hays>
i was thinking of the clearest way to toggle between 1 and 0 and I came up with watchdog ^= 1
<bazbing80>
Ox0dea thanks..too much for me though. those are instructions that 'build' ruby code? I get that concept. How I could alter those instructions to create something slightly different is beyond me though...[:putstring, "foo"] makes sense, I could alter that easily...I'm going to see how it looks with a method that takes a block. Maybe it'll be self explanatory to a degree what I have to delete to get rid of the block.
<Ox0dea>
bazbing80: No, nothing is easy in this domain. :/
<bazbing80>
Ox0dea haha didn't think so
<Ox0dea>
Then again, you mentioned you were aware that you're trying to do something crazy.
godhelp has joined #ruby
<bazbing80>
Ox0dea indeed. only mucking about as always :P
vyorkin has quit [Quit: WeeChat 1.2]
rehat has quit [Remote host closed the connection]
ismaelga has joined #ruby
drewo has joined #ruby
juanpablo_____ has quit [Ping timeout: 246 seconds]
valeri_ufo has quit [Read error: Connection reset by peer]
valeri_ufo has joined #ruby
<Ox0dea>
bazbing80: Are you aware of Fiddle?
al2o3-cr has quit [Ping timeout: 256 seconds]
neoseeker has quit [Remote host closed the connection]
eggoez has quit [Ping timeout: 252 seconds]
f4cl3y has quit [Ping timeout: 252 seconds]
unreal has joined #ruby
<Ox0dea>
I suspect there must be something in a Proc's `flags` RStruct field indicating there's an actual block attached.
ujjain has quit [Ping timeout: 256 seconds]
shadeslayer has quit [Remote host closed the connection]
neoseeker has quit [Remote host closed the connection]
<al2o3-cr>
:p
mleung has quit [Quit: mleung]
<Radar>
STORY TIME: Once upon a time, I took my Macbook Pro to the retailer I bought it from to get repaired... and they tried to charge me $1k more than the cost of an MBP at the time.
<hays>
oh wow collect and map are really quite similar then
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konsolebox has quit [Max SendQ exceeded]
<sevenseacat>
mozzarella: nice.
theery has joined #ruby
konsolebox has joined #ruby
hololeap has joined #ruby
bronson has joined #ruby
<Ox0dea>
hays: They're different names for the exact same thing.
tsujp has joined #ruby
PaulCapestany has quit [Ping timeout: 244 seconds]
Sembei has quit [Read error: Connection reset by peer]
MyMind has joined #ruby
shinnya has quit [Ping timeout: 264 seconds]
danman has quit [Quit: danman]
werelivinginthef has joined #ruby
hashrocket has joined #ruby
postmodern has quit [Quit: Leaving]
drewo has joined #ruby
lkba has joined #ruby
aaeron has quit [Quit: Leaving.]
bronson has quit [Ping timeout: 246 seconds]
konsolebox has quit [Ping timeout: 265 seconds]
scripore has quit [Quit: This computer has gone to sleep]
MyMind has quit [Read error: No route to host]
braincrash has quit [Quit: bye bye]
Pisuke has joined #ruby
danman has joined #ruby
lkba_ has quit [Ping timeout: 246 seconds]
juanpablo_____ has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has quit [Remote host closed the connection]
Pisuke has quit [Read error: No route to host]
drewo has quit [Ping timeout: 255 seconds]
s1kx_ is now known as s1kx
Sembei has joined #ruby
braincrash has joined #ruby
triangles2 has joined #ruby
wldcordeiro_ has joined #ruby
juanpablo_____ has quit [Ping timeout: 272 seconds]
Sembei has quit [Read error: No route to host]
tjbiddle has joined #ruby
MyMind has joined #ruby
blaines has joined #ruby
konsolebox has joined #ruby
triangles has quit [Ping timeout: 244 seconds]
wldcordeiro_ has quit [Client Quit]
wldcordeiro__ has joined #ruby
MyMind has quit [Read error: No route to host]
Pisuke has joined #ruby
workmad3 has joined #ruby
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecksit has joined #ruby
thang has quit [Ping timeout: 250 seconds]
adzuci has quit [Ping timeout: 246 seconds]
casadei_ has quit [Remote host closed the connection]
_djbkd has quit [Quit: My people need me...]
<bazbing80>
not holding out much hope for this, but do you think it's possible to get the starting column number from my_proc.source_location or a similar method? rn I can only get the proc's file and line number. I'd like its starting column and ending column if possible :)
Pisuke has quit [Read error: Connection reset by peer]
wldcordeiro__ has quit [Ping timeout: 256 seconds]
Sembei has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<sevenseacat>
surely the starting column would be 0, no?
Musashi007 has quit [Quit: Musashi007]
casadei_ has joined #ruby
kristian_on_linu has quit [Quit: Leaving]
<bazbing80>
sevenseacat true but there could be an edge case where someone's defined 2 procs on the same line using ';'
Sembei has quit [Read error: Connection reset by peer]
MyMind has joined #ruby
<bazbing80>
basically I want to create a gem that looks inside procs to get their source as a learning tool..my first gem. There's the sourcify gem but its deprecated and I found it buggy
<Ox0dea>
bazbing80: You're not going to be able to do it without a full-fledged parser.
darkf has joined #ruby
Mendenhall has joined #ruby
yokel has joined #ruby
thang has joined #ruby
symm- has quit [Ping timeout: 256 seconds]
adzuci has joined #ruby
MyMind has quit [Read error: No route to host]
dgutierrez1287 has joined #ruby
Pisuke has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
curses has joined #ruby
blaines has joined #ruby
<Ox0dea>
I reckon you could get most of the way there just by keeping track of the number of unclosed `do`s and `{`s, but Ruby's syntax is zany enough to subvert such an approach.
Pisuke has quit [Read error: Connection reset by peer]
blaines has quit [Client Quit]
axl_ has joined #ruby
<sevenseacat>
and I'm sure someone like Ox0dea could subvert it about fifteen times before you could blink
aaeron has joined #ruby
gix has quit [Ping timeout: 240 seconds]
<sevenseacat>
he is leet hax0r
Sembei has joined #ruby
rbowlby has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 244 seconds]
curses has quit [Ping timeout: 250 seconds]
iwaffles has quit [Quit: iwaffles]
dimasg has joined #ruby
<Aeyrix>
Someone said hax
gix has joined #ruby
MyMind has joined #ruby
Sembei has quit [Read error: No route to host]
axl_ has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Quit: Leaving]
gabriel_ has joined #ruby
radgeRayden has joined #ruby
<gabriel_>
hello
<bazbing80>
Ox0dea sevenseacat haha yeah Ruby is zany indeed. although all you'd have to regex is the string 'Proc.new' and then count the opening '{' / 'do' and maktch until the closing '}' / 'end' equals that? couldn't be pure regex...not mad insane, right? or what parser would you recommend?
fedexo has joined #ruby
iateadonut has joined #ruby
MyMind has quit [Read error: No route to host]
Pisuke has joined #ruby
<bazbing80>
Ox0dea I just read what you read about tracking the do's and { :D haha fml
<bazbing80>
*read what you SAID
<bazbing80>
sleep now
<bazbing80>
night
Westerbly_ has quit [Ping timeout: 265 seconds]
Westerbly_ has joined #ruby
Westerbly__ has joined #ruby
nobitanobi has joined #ruby
<hays>
@staticdb.map( &:downcase!) <--- is there a way to do this where the nils are ignored?
<Ox0dea>
bazbing80: whitequark/parser > seattlerb/ruby_parser, but they're both very good.
<hays>
staticdb is just an array
serivichi has quit [Ping timeout: 246 seconds]
blue_deref has joined #ruby
<Ox0dea>
bazbing80: There are eight different syntaxes for creating a Proc.
Pisuke has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
Sembei has joined #ruby
<Ox0dea>
hays: You could just use #compact first to discard the nils.
eggoez has quit [Ping timeout: 240 seconds]
radgeRayden has quit [Ping timeout: 244 seconds]
<Ox0dea>
Otherwise, you'll have to explicitly open a block and use something like ActiveSupport's #try.
RegulationD has joined #ruby
<Ox0dea>
Or, well, anything to handle the nils, but #try is handy.
tjohnson has quit [Quit: Connection closed for inactivity]
eggoez has joined #ruby
Westerbly_ has quit [Ping timeout: 244 seconds]
<gabriel_>
Is it possible to use division in ruby?
<Ox0dea>
Division isn't real.
<gabriel_>
word
ramfjord has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
<hays>
Ox0dea: hmm I think im going to change the data structure from an array to a hash
<hays>
that will also save some memory
<Ox0dea>
Why do you think so?
<sevenseacat>
o.O
<hays>
right now @staticdb[7] is a value where the 7 is important
<hays>
and its a sparse array
Sembei has joined #ruby
arescorpio has quit [Quit: Leaving.]
<Ox0dea>
Yes, then you'll want a Hash, but only because it's semantically correct, not because it'll save on memory.
<gabriel_>
if I'm trying to us a .to_f to make a script to give back 10% of a total, what would I use to get a percentage?
<Inside>
I've found that, but it seems kinda...... ghetto
theery has joined #ruby
vdamewood has quit [Ping timeout: 252 seconds]
Pisuke has quit [Read error: No route to host]
<Inside>
(basically I want to write an application which automatically prints a label whenever it senses a new row in a local database which matches some criteria
theery has quit [Read error: Connection reset by peer]
arooni-mobile has quit [Ping timeout: 246 seconds]
theery has joined #ruby
theery has quit [Read error: Connection reset by peer]
theery has joined #ruby
<Ox0dea>
Inside: Are you on Windows, then?
theery has quit [Remote host closed the connection]
Pisuke has joined #ruby
<Inside>
yes
theery has joined #ruby
<Ox0dea>
In that case, run Linux in a VM and use `lp`. :P
<Inside>
cant
<Inside>
this is a work station driving a plc
astrobunny has joined #ruby
dimasg has quit [Ping timeout: 246 seconds]
<hays>
welcome to the ghetto
<hays>
i like to call it windows system programming
<nofxx>
Inside, parallel or usb?
Pisuke has quit [Read error: No route to host]
<Aeyrix>
Inside: mssql?
<nofxx>
if you have to understand that something dontot run on windows is a feature, not a bug.
Pisuke has joined #ruby
<Ox0dea>
Amen.
<nofxx>
and if the printer is USB VM will work fine, as Ox0dea said Inside
fedexo has joined #ruby
codecop has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
<nofxx>
Inside, neat solution: use a rpi2 or bananapi or beaglebone, put linux and the printer, and it'll poll your db
<nofxx>
plus, no PC ON 24hrs just to wait to print
<Inside>
pc is on all the time anyway
<nofxx>
rpi consume is around 1W iirc
<nofxx>
if the world matters to you =P
<Ox0dea>
Inside: You're not using Step7, are you? ;)
<Inside>
ummm not sure
<Ox0dea>
Uh-oh.
Pisuke has quit [Read error: Connection reset by peer]
<Inside>
its a refrigeration charge control pc
<nofxx>
that's really ugly
<Inside>
theres basically a hardware button which says 'fill with refrigerant'.... which drives a plc through some HMI
werelivinginthef has quit [Remote host closed the connection]
<Inside>
and then writes a row to a local sql server db
Pisuke has joined #ruby
<nofxx>
windows as embedded hardware controller -> how things like fujushima happen
<Ox0dea>
nofxx: Also Stuxnet.
<hays>
a lot of hvac are windows machines
<nofxx>
Ox0dea, heard that the US successfully f* all iran nuclear stuff just because they used windows?
<Aeyrix>
Glad the Internet's top minds wrt security are in #ruby.
<Aeyrix>
Oh wait, they're not.
theery has quit []
<nofxx>
it's true.. they tried with the north koreans but apprently it's no windows haha
<Ox0dea>
NK uses Red Star, right?
danman has quit [Quit: danman]
<Ox0dea>
Aeyrix: You sound like a Windows user.
tsujp has quit [Quit: tsujp is snoozing]
drewo has joined #ruby
<Aeyrix>
Nope.
<nofxx>
Ox0dea, yeah
<Aeyrix>
I'm just tired of the horribly ill-informed rhetorics.
astrobunny has quit [Remote host closed the connection]
_jasonmit has quit [Quit: quit]
<Ox0dea>
Of course Windows boxen can be hardened.
helpa has quit [Remote host closed the connection]
dseitz has quit [Read error: Connection reset by peer]
Pisuke has quit [Read error: No route to host]
<Aeyrix>
RIP helpa
<nofxx>
Ox0dea, the about page should have this: ☭
christia_ has quit [Read error: Connection reset by peer]
<nofxx>
(red star)
<Ox0dea>
nofxx: I use Red Star...
kokoleavia has joined #ruby
christiandsg has joined #ruby
<hays>
Aeyrix: to be fair the stuxnet report itself said that a big contributor to the success of stuxnet was the use of windows
<nofxx>
Ox0dea, cool, there's english ?
<Ox0dea>
nofxx: No, I'm Best Korean.
<Aeyrix>
> this fucking channel
Pisuke has joined #ruby
<nofxx>
Ox0dea, south ?
helpa has joined #ruby
<Ox0dea>
Aeyrix: What's up? This side of you is new to me.
<nofxx>
Ox0dea, friend here asked if you are from north: I replied: only if we're talking with kim jon
<Aeyrix>
Ox0dea: I work in security, half in research half in pentesting.
<Ox0dea>
Aye, I was recently made aware of such.
<Aeyrix>
Tired memes about "muh windoze amirite? dae micro$oft?" fucks me off.
<Aeyrix>
I'm currently using, by statistics of 2014 - 2015 FY, the most vulnerable operating system.
<Aeyrix>
Not Linux, not Windows. OS X.
<Ox0dea>
I don't buy it.
<hays>
oh i thought we were talking stuxnet
juanpablo_____ has joined #ruby
<Aeyrix>
Uninformed rhetorics about proposed vulnerabilities within operating systems are irritating due to the incredible ease in which someone can *get* informed.
<hays>
not sure if you've seen what kali linux can do to a 15 year old windows machine running scada software
drewo has quit [Ping timeout: 260 seconds]
leat1 has quit [Remote host closed the connection]
<hays>
specifically metasploit's vulnerability database and toolsets
Pisuke has quit [Read error: No route to host]
<Aeyrix>
hays: I've presented papers on the topic.
<Aeyrix>
I've also contributed to metasploit.
leat1 has joined #ruby
<Aeyrix>
:)
Channel6 has quit [Quit: Leaving]
<hays>
alright, so then you are aware of where we are with regards to control systems and the use of windows
casadei_ has joined #ruby
rbowlby has joined #ruby
Pisuke has joined #ruby
<Aeyrix>
Ox0dea: RE your not buying it
<Aeyrix>
OS X: 177 unique CVE identifiers in 2015
<Aeyrix>
Linux: 41 unique CVE identifiers in 2015.
dseitz has joined #ruby
<Aeyrix>
Windows: 83.
<hays>
i'd be curious how those numbers flesh out if you use none of the mac os applications
krz has joined #ruby
juanpablo_____ has quit [Ping timeout: 240 seconds]
<Aeyrix>
Why would anyone do that
astrobunny has joined #ruby
<hays>
because most of them suck
amclain has quit [Quit: Leaving]
blue_deref has quit [Quit: bbn]
<Aeyrix>
Alright so I've come to the conclusion that you're probably DarqWolff
riotjones has quit [Ping timeout: 260 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<hays>
i don't know who that is, but the way i've ended up running macos is I run Chrome or Firefox as my browser and get almost everything from macports
<hays>
meh, whatever im actually curious about it. i don't think im alone in running macs this way--I think a lot of software developers moved to mac because they liked having the commandline
<Aeyrix>
As a general rule, yes.
<hays>
maybe its still insecure as fuck--im not ruling that out
casadei_ has quit [Ping timeout: 246 seconds]
<Aeyrix>
As a general rule, no.
<Aeyrix>
This last July - June has been a pretty bad year for OS Xploits.
<Ox0dea>
I'm sure you know using the total number of CVEs is disingenuous.
<hays>
its been kind of a challenging year for open source projects too.
<Aeyrix>
Ox0dea: between 9 and 2.99)
<hays>
well hell. its been a challenging year.
<Aeyrix>
uh
<Ox0dea>
Oops.
workmad3 has joined #ruby
<Aeyrix>
[15:04:23] <Aeyrix>DeBot: !hangman reasons to not hate #ruby entirely
<Aeyrix>
No response.
<Aeyrix>
Also, Ox0dea
<Aeyrix>
congratulations
<Aeyrix>
you linked MS as a vendor
Sembei has quit [Read error: No route to host]
<Aeyrix>
not Windows as an OS
<hays>
i am guilty of using iMail or whatever this piece of s*** software is that can't seem to download my mail from my work's exchange server
<hays>
grr I want to read my mail and go to bed damnit
<Aeyrix>
Ox0dea: For reference
<Aeyrix>
OSX: 54 > 9.0 in 2015
<Aeyrix>
Windows: 20 > 9.0 in 2015.
<Aeyrix>
But as you provided a second glance at my research already, I'm sure you already knew those numbers.
Sembei has joined #ruby
chrissonar has joined #ruby
Inside has quit [Read error: Connection reset by peer]
<Ox0dea>
Let's count our blessing in iThings being too pretty for use in industrial environments.
<Aeyrix>
[ sighing intensifies ]
workmad3 has quit [Ping timeout: 244 seconds]
Sembei has quit [Read error: No route to host]
Mendenhall has quit [Ping timeout: 246 seconds]
Sembei has joined #ruby
<hays>
fwiw the sandia guys gave me a chuckle when I asked if free software provided any more security as a platform/OS. and this was not too long after Stuxnet
ejnahc_ has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
* sevenseacat
looks up from screen of iThing
<Aeyrix>
Don't bother.
arup_r has quit [Quit: Leaving]
duncannz has joined #ruby
_blizzy_ has joined #ruby
duncannz has quit [Max SendQ exceeded]
ejnahc has joined #ruby
icebourg has joined #ruby
duncannz has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
duncannz has quit [Max SendQ exceeded]
tsujp has joined #ruby
duncannz has joined #ruby
<hays>
i'd love to have seen what they actually had access to in terms of 0-days
duncannz has quit [Max SendQ exceeded]
SOLDIERz has joined #ruby
Sembei has joined #ruby
* sevenseacat
looks back down
<hays>
one of them had bought a new car essentially because he wanted to screw with the new computers in it
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
<hays>
apparently Progressive actually will send you something to stick on your car so they can track it. thing had a sim card. ah fun times for them im sure
Hijiri has joined #ruby
duncannz has joined #ruby
vdamewood has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Sembei has quit [Read error: No route to host]
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
Sembei has joined #ruby
Lucky___ has joined #ruby
ips|malc has joined #ruby
Sembei has quit [Read error: No route to host]
curses has joined #ruby
iateadonut has quit [Quit: Leaving.]
ips|malc has quit [Client Quit]
ruby-lang731 has joined #ruby
Mendenhall has joined #ruby
<hays>
brony community
ips|malc has joined #ruby
<hays>
i've heard of this...
Sembei has joined #ruby
christiandsg has quit [Remote host closed the connection]
Xiti` has joined #ruby
Musashi007 has quit [Quit: Musashi007]
danman has joined #ruby
curses has quit [Ping timeout: 244 seconds]
Sembei has quit [Read error: Connection reset by peer]
Xiti has quit [Ping timeout: 246 seconds]
MyMind has joined #ruby
ips|malc has quit [Client Quit]
scripore has joined #ruby
leat2 has joined #ruby
ReK2GnULinuX has joined #ruby
leat1 has quit [Remote host closed the connection]
omegamike has joined #ruby
aganov has joined #ruby
MyMind has quit [Read error: No route to host]
theery has joined #ruby
ReK2 has quit [Ping timeout: 246 seconds]
shpoont has joined #ruby
skade has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MyMind has joined #ruby
MyMind has quit [Read error: No route to host]
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
yfeldblum has joined #ruby
omegamike has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
MyMind has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
sinkensabe has joined #ruby
MyMind has quit [Read error: No route to host]
knu has quit [Ping timeout: 244 seconds]
MyMind has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
fedexo has joined #ruby
_ht has joined #ruby
drewo has joined #ruby
Eiam_ has quit [Ping timeout: 272 seconds]
MyMind has quit [Read error: No route to host]
tsujp has quit [Quit: tsujp is snoozing]
scripore has joined #ruby
icebourg has quit []
MyMind has joined #ruby
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
sdwrage has joined #ruby
oo_ has quit [Remote host closed the connection]
MyMind has quit [Read error: No route to host]
drewo has quit [Ping timeout: 272 seconds]
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n_blownapart has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 252 seconds]
werelivinginthef has joined #ruby
MyMind has joined #ruby
yardenbar has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
yfeldblu_ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
MyMind has quit [Read error: No route to host]
yfeldblum has quit [Ping timeout: 246 seconds]
MyMind has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
werelivinginthef has quit [Ping timeout: 255 seconds]
vdamewood has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pontiki has joined #ruby
khebbie has joined #ruby
khebbie_ has joined #ruby
MyMind has quit [Read error: No route to host]
chipotle has quit [Quit: cheerio]
yardenbar has quit [Read error: Connection reset by peer]
bronson has joined #ruby
yardenbar has joined #ruby
riotjones has quit [Ping timeout: 244 seconds]
MyMind has joined #ruby
baweaver has joined #ruby
danman has quit [Ping timeout: 240 seconds]
MyMind has quit [Read error: No route to host]
bronson has quit [Ping timeout: 244 seconds]
shock_one has quit [Remote host closed the connection]
Pisuke has joined #ruby
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has joined #ruby
oo_ has joined #ruby
jack_rabbit has joined #ruby
Rickmasta has joined #ruby
Pisuke has quit [Read error: No route to host]
shock_one has joined #ruby
roolo has joined #ruby
Pisuke has joined #ruby
kies^ has joined #ruby
{756d6f} has joined #ruby
jenrzzz has joined #ruby
towski_ has joined #ruby
Pisuke has quit [Read error: No route to host]
knu has joined #ruby
Pisuke has joined #ruby
ruby-lang731 has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
Pisuke has quit [Read error: No route to host]
Pisuke has joined #ruby
tvw has joined #ruby
rsc___ is now known as rstacruz
vdamewood has joined #ruby
Pisuke has quit [Read error: No route to host]
Zai00 has quit [Quit: Zai00]
_blizzy_ has quit [Read error: Connection reset by peer]
Sembei has joined #ruby
Zai00 has joined #ruby
max_v has joined #ruby
riotjones has joined #ruby
pengin has quit [Remote host closed the connection]
eGGsha has joined #ruby
theery has quit [Remote host closed the connection]
Sembei has quit [Read error: No route to host]
texasmade has joined #ruby
christiandsg has joined #ruby
max_v has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
Sembei has joined #ruby
DoubleMalt has joined #ruby
aaeron has quit [Quit: Leaving.]
schaerli has joined #ruby
{756d6f} has quit [Ping timeout: 244 seconds]
GriffinHeart has joined #ruby
swgillespie has joined #ruby
Sembei has quit [Read error: No route to host]
Lucky___ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Lucky___ has quit [Client Quit]
Mendenhall has joined #ruby
Sembei has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
Sembei has quit [Read error: No route to host]
Zai00 has quit [Quit: Zai00]
solars has joined #ruby
pepperbreath has left #ruby [#ruby]
Sembei has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
Lucky___ has joined #ruby
yfeldblum has joined #ruby
RTG` has quit [Ping timeout: 246 seconds]
drewo has joined #ruby
Sembei has quit [Read error: No route to host]
max_v has joined #ruby
MyMind has joined #ruby
arturmartins has joined #ruby
MyMind has quit [Read error: No route to host]
drewo has quit [Ping timeout: 250 seconds]
juanpablo_____ has joined #ruby
MyMind has joined #ruby
sameerynho has joined #ruby
Philipp__ has joined #ruby
Oka has joined #ruby
juanpablo_____ has quit [Ping timeout: 250 seconds]
hashrocket has quit [Quit: Connection closed for inactivity]
f4cl3y has joined #ruby
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 264 seconds]
ledestin has quit [Ping timeout: 244 seconds]
dtcristo has joined #ruby
dtcristo has quit [Client Quit]
allomov has joined #ruby
ips|malc has joined #ruby
werelivinginthef has joined #ruby
schaerli has quit [Remote host closed the connection]
dtcristo has joined #ruby
workmad3 has joined #ruby
andikr has joined #ruby
fabrice31 has joined #ruby
f4cl3y has quit [Ping timeout: 264 seconds]
allomov has quit [Remote host closed the connection]
shpoont has joined #ruby
allomov has joined #ruby
<Ox0dea>
Would Sun light Moon if he could not?
werelivinginthef has quit [Ping timeout: 244 seconds]
<Aeyrix>
no
strixd has joined #ruby
strixd has quit [Excess Flood]
workmad3 has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
schaerli has joined #ruby
lampshade has joined #ruby
kokoleavia has quit [Ping timeout: 244 seconds]
towski_ has quit [Remote host closed the connection]
<baweaver>
well, answering my own questions, that's a sign to go to bed already.
ruby361 has joined #ruby
<certainty>
moin
<ruby361>
Hi everyone. I'm trying to work with devise + omniauth to link multiple providers with one user identity. Can someone help me to get the account linkage working? or does anyone know any good resources to understand how to go about doing so myself?
<Ox0dea>
baweaver: Mayhap I shall have something non-alphanumeric and Scrabble-ish for you upon your return.
<baweaver>
on vacation so might take me a bit to pop up this week.
<Ox0dea>
Noted.
<pontiki>
oh, baweaver, just have fun on vacation. :)
Iskarlar has joined #ruby
<baweaver>
I don't do well at this "Don't code for a week" shtick.
<pontiki>
lol
<Ox0dea>
I'd forgotten there was such a thing.
michele has left #ruby ["undefined"]
<pontiki>
i am in sore need of a vacation
<baweaver>
To be fair this is the first time I've coded this week.
<baweaver>
ruby361: Probably best to ask on #RubyOnRails
<pontiki>
baweaver: just so you don't, you know, do any *work*
ruby361 has quit [Client Quit]
bruno- has quit [Ping timeout: 272 seconds]
<baweaver>
I shut down Vim before I made a smart scrabble solver which tried to play close and hard to prevent other players from racking up any points.
<pontiki>
heehee
<cheeti>
is this possible to covert pdf to csv using ruby code
<baweaver>
Almost as bad as me using my flight home on Christmas to make a Clue solver.
<baweaver>
cheeti: Why would you want to?
<Radar>
cheeti: dear god why would you want to do that?
<pontiki>
clue the board game?
<baweaver>
indeed
<pontiki>
lol, that's a cool idea
<cheeti>
Radar my client requirment
<sevenseacat>
lol
<Radar>
cheeti: Your client is insane.
sdwrage has quit [Quit: This computer has gone to sleep]
<Radar>
cheeti: Why do they want a CSV from the PDF?
<sevenseacat>
pdf to csv... that doesnt even make sense
<baweaver>
except I found out I was sitting next to a google coder and got carried away chatting on other things.
robbyoconnor has joined #ruby
<baweaver>
Radar: sevenseacat the only way I can figure on that is that they have tables inside there.
<sevenseacat>
thats what I sincerely hope
bluOxigen has quit [Ping timeout: 260 seconds]
<sevenseacat>
either way, it doesnt make much sense
<baweaver>
in which case, still painful and confounded, but believable.
<pontiki>
if you had PDFs with tons of data tables, and that's all you had access too, you, too, would pray for such a converter
bluOxigen has joined #ruby
<baweaver>
pdf -> html -> nokogiri (find all tables) -> csv
<sevenseacat>
I'm normally the one making said pdfs full of tables
<Ox0dea>
cheeti: You wouldn't happen to have the lucky fortune of being on JRuby, would you?
<sevenseacat>
prawn craps out when you have a table cell that spans multiple pages. found hat one out.
<sevenseacat>
*that
<soros1980>
ello
CustosLimen has quit [Ping timeout: 256 seconds]
<baweaver>
ello ello ey ey ey
* Ox0dea
gives baweaver his umbrella.
<baweaver>
danke
<pontiki>
damn those googlers are everywhere
vdamewood has joined #ruby
<baweaver>
met one today too
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
c0m0 has joined #ruby
<baweaver>
was at Seattle Ruby. I forget they have a place up here.
<baweaver>
pontiki: Give me a month, I might be one of them
<pontiki>
everywhere
<pontiki>
:)
anaeem1_ has joined #ruby
livathinos has joined #ruby
<pontiki>
you'll be well-fed
mikecmpbll has quit [Quit: i've nodded off.]
<baweaver>
If I can get past the interview of doom
ohaibbq has quit [Quit: Leaving...]
<Ox0dea>
Oh, jeeze, my binary tree's the wrong way round.
<Radar>
I interviewed at Google 2 years ago and they wanted examples of my technical writing
<cheeti>
Ox0dea ok iwant to convert my pdf to html and after that i want convert it into csv is this possible
<Radar>
I linked them to Rails 3 in Action
<baweaver>
Site Reliability Engineer or System Admin, working on deciding.
<Radar>
They said they wanted more examples.
<Radar>
I told them (politely) to fuck off.
<baweaver>
Radar: *high fives*
<Ox0dea>
cheeti: I asked if you were using JRuby because Tabula (http://tabula.technology/) looks pretty good.
webhat has quit [Read error: Connection reset by peer]
<cheeti>
Radar ok iwant to convert my pdf to html and after that i want convert it into csv is this possible
<ljarvis>
lol
<sevenseacat>
Radar: lol
<Radar>
cheeti: No. No. annnnd guess what? No.
<sevenseacat>
so they dont want the writer of homebrew, or the writer of books
<Radar>
cheeti: I can't tell if you're seriously wanting to do this or if it's a troll
<sevenseacat>
who *does* google hire these days
<baweaver>
spamming multiple users on the channel the same question does not work well
<Ox0dea>
Radar: Hanlon's razor applies, I reckon.
<baweaver>
sevenseacat: with any luck, me
<Radar>
cheeti: nothing will do what you want to do except a human person looking at the PDF and HAND CONVERTING it
<sevenseacat>
baweaver: :D
webhat has joined #ruby
<Radar>
sevenseacat: People who desperately want to work there because it's Google.
<Ox0dea>
Radar: PDFs can contain actual tabular data, for what that's worth.
<sevenseacat>
it would look nice on the resume, for sure.
<Radar>
Ox0dea: glhf parsing it out
<baweaver>
Radar: still more keen on the free food bit honestly.
* sevenseacat
doesnt even have a resume
schaerli has quit [Remote host closed the connection]
<cheeti>
Radar ok thanks
<sevenseacat>
s/resume/linkedin profile/
<Radar>
bbl
<baweaver>
I'm far too easily bribed with Chipotle
<Radar>
ruby meetup time
<ljarvis>
baweaver: so join any SF startup
<Radar>
time to meet Aeyrix
<pontiki>
have fun, Radar
<Radar>
If he doesn't pike again
<sevenseacat>
Radar: try not to punch him too much.
<Radar>
sevenseacat: :)
<baweaver>
Oh I could ljarvis, Google's just on my bucket list out here.
<pontiki>
baweaver: if i ever get a vacation back home, we have to hang out
<ljarvis>
interesting
<sevenseacat>
I don't really have any companies I aspire to work for
<baweaver>
pontiki: Sure, let me know.
RegulationD has joined #ruby
<sevenseacat>
other than 'my own'
<baweaver>
Could go work for Tesla too.
<pontiki>
does tesla serve chipotle?
<baweaver>
sevenseacat: Still trying to find a good idea to try that one myself :/
<sevenseacat>
hey maybe someone like pragprog.
<baweaver>
they might
<baweaver>
I have to ask.
<pontiki>
i very much am enjoying contracting and freelancing
<pontiki>
except for the continual marketing myself
<agent_white>
I want to work for Tesla... just first needa invent a time machine to boost my highschool GPA and get into an Ivy League School...
<sevenseacat>
I am absolutely appalling at marketing myself.
lkba has quit [Ping timeout: 246 seconds]
<agent_white>
sevenseacat: Do you have stickers?
<pontiki>
i have stickers
<baweaver>
Still working on getting a solid enough base established to go full freelancer later.
<agent_white>
See, pontiki's got it on lock!
<pontiki>
but they aren't a logo of me
<baweaver>
could I now? Probably
<pontiki>
but if i meet you, i'll give you a sticker
Westerbly__ has quit [Ping timeout: 244 seconds]
tjbiddle has quit [Quit: tjbiddle]
<pontiki>
meh, baweaver, it took me nearly 2.5 decades to get out
<baweaver>
As for right now I have the young and single thing still going.
chouhoulis has quit [Ping timeout: 240 seconds]
<pontiki>
and i have the old and uninterested thing going on :)
<soros1980>
I was never good at marketing myself.. until the guy that contracts me out accidentally sent me one of his props - I never knew what market rate was until that day.
<agent_white>
pontiki: Yayay! I'll put it on my arm and tell everyone it's a new tattoo!
{756d6f} has joined #ruby
krz has quit [Quit: WeeChat 1.2]
* sevenseacat
has the 'oh shit I'm adult and have to support a bunch of people now' thing going on
slowlag has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
CustosLimen has joined #ruby
khebbie has quit [Remote host closed the connection]
khebbie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobunny has quit [Remote host closed the connection]
kokoleavia has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
havenwood has quit [Ping timeout: 240 seconds]
schaerli has quit [Remote host closed the connection]
quimrstorres has joined #ruby
Contigi has quit [Quit: Leaving]
quimrstorres has quit [Remote host closed the connection]
christiandsg has joined #ruby
<agent_white>
pontiki: Ooo... I like it!
quimrstorres has joined #ruby
DaniG2k has joined #ruby
<yorickpeterse>
morning
ruurd has joined #ruby
krz has joined #ruby
polyrob has quit [Ping timeout: 250 seconds]
axl_ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
<adaedra>
hi yorickpeterse
<ruurd>
good morning y'all
<DaniG2k>
hello all
<DaniG2k>
yesterday I added a dependency to my gem (i.e. ruby-stemmer). When I tried to include my gem into a Rails app, `bundle install`, then `rails console`, I was told that it couldn't find ruby-stemmer. What gives?
<DaniG2k>
basically, how can I include gem dependencies from my gem into a Rails app
<Ox0dea>
unshadow_: I wonder why StringScanner isn't being used to cleanly handle #gets with a Regexp.
ttilley has quit [Quit: Leaving...]
eGGsha has joined #ruby
<Ox0dea>
Ah, well, it wouldn't do for streams, I suppose.
agent_white has quit [Remote host closed the connection]
gion has joined #ruby
<unshadow_>
Ox0dea: looking at the code, you can see that sometime size would be nil, so if limit and limit >= 0; size = [size, limit].min; end can return this error
<Ox0dea>
vyorkin: Nice! Did you happen to benchmark conditional #pop + #unshift?
<Ox0dea>
vyorkin: Also, consider using benchmark-ips for more informative results.
vyorkin has quit [Ping timeout: 240 seconds]
<gion>
is there a way to execute an external process without the use of the shell mechanism ? Open3 popen, system, `` .. they all seem to use shell and apply shell escaping/piping ...
<Ox0dea>
unshadow_: Aye, putting nil in a variable called `size` ought to indicate you've done something wrong. :P
agent_white has joined #ruby
<unshadow_>
Ox0dea: XD it's all becuase that you cannot [nil, 4096].min
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
Zai00 has joined #ruby
<gion>
Ox0dea: escaping is not liked by ffmpeg -> it receives this string as is: "concat:chunks/1.ts\|chunks/2.ts\|chunks/3.ts: Invalid argument"
psy_ has quit [Ping timeout: 252 seconds]
<Ox0dea>
gion: That's regrettable.
bustrarm has joined #ruby
<gion>
Ox0dea: :) any idea, tip on how to overcome this ? create a wrapper shell script that gets those files separated differently ?
Mendenhall has quit [Ping timeout: 256 seconds]
leafybasil has quit [Ping timeout: 264 seconds]
<gion>
Ox0dea: create a bash script on the fly in a temporary file that contains that ffmpeg command, and i invoke the bash wrapper from ruby using popen instead of running the ffmpeg command
busterarm has quit [Ping timeout: 260 seconds]
<Ox0dea>
gion: That would likely do, but it's a little gross, no?
<gion>
Ox0dea: it would be absolutely horrible :)
<gion>
Ox0dea: could also modify ffmpeg to use a different separator than the bloody pipe
leat2 has joined #ruby
<Ox0dea>
gion: Well, you could use `tr` to achieve that without modifying ffmpeg.
<gion>
Ox0dea: even more horrible
<Ox0dea>
More shells!
<Ox0dea>
;'(
Igorshp has joined #ruby
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
<Ox0dea>
gion: You should endeavor to determine the exact offset of the 0x7c byte in your ffmpeg binary that you'd need to swap out to make it accept something different in its concat: parameter. :P
bumbar_ has joined #ruby
leat2 has quit [Remote host closed the connection]
vyorkin has joined #ruby
leat2 has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
As an aside, it's both wondrous and terrifying to realize that doing so would almost certainly work.
<Ox0dea>
So many "cracks" used to work their magic by turning a single 0 byte to a 1 or vice-versa.
robbyoconnor has quit [Remote host closed the connection]
<adaedra>
the art of the thing is to find this byte.
<Ox0dea>
adaedra: Easiest is to change it in source, recompile, and use `cmp`.
<adaedra>
Ox0dea: I'm talking about cracks
AlxAltea has quit [Ping timeout: 244 seconds]
<gion>
Ox0dea: on a side note - executing this: bash -c 'ffmpeg -y -f mpegts -i "concat:chunks/1.ts|chunks/2.ts|chunks/3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb output.mp4' has the same effect as popen3
bronson has joined #ruby
curses has joined #ruby
<gion>
Ox0dea: when not hanging
entropie has quit [Ping timeout: 250 seconds]
senayar has joined #ruby
senayar has joined #ruby
<Ox0dea>
gion: Does that ffmpeg command produce output on stdout?
<gion>
Ox0dea: yes, both stdout and stderr, even if without error
miah has quit [Ping timeout: 250 seconds]
miah has joined #ruby
entropie has joined #ruby
leafybasil has joined #ruby
robbyoconnor has joined #ruby
<Ox0dea>
gion: Given the plethora of things that can and seem to have gone wrong, dropping it into a tempfile and executing from there doesn't seem all that terrible.
postmodern has quit [Quit: Leaving]
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
curses has quit [Ping timeout: 244 seconds]
Violentr has quit [Ping timeout: 244 seconds]
Oog_ has joined #ruby
<Ox0dea>
It's hard to say whether Ruby or ffmpeg is ultimately to blame on this one.
* Ox0dea
inconspicuously recommends trying it with Python's os.system() to narrow the suspects.
<gion>
Ox0dea: more and more convinced it is ffmpeg + bash
senayar has quit [Remote host closed the connection]
omegamike has joined #ruby
<adaedra>
gion: did you try a classical exec?
<Ox0dea>
adaedra: He doesn't want to replace his process.
<adaedra>
and?
<Ox0dea>
exec replaces processes?
<adaedra>
duh
<gion>
gion: exec works but it replaces current process, so not good
<adaedra>
so it's your shell that derps
arup_r has joined #ruby
<gion>
no, it is any other command different than exec
bayed has joined #ruby
<adaedra>
then you have to set your pipery by hand
robbyoconnor has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
<Ox0dea>
As opposed to letting Wolfram|Alpha figure it out for you.
<adaedra>
yes, but what are you trying to do, above, since I read about popen3
robbyoconnor has joined #ruby
withnale_ has joined #ruby
workmad3 has joined #ruby
omegamike has quit [Ping timeout: 244 seconds]
<gion>
execute ffmpeg, get its return code and all stderr and stdout output
<adaedra>
then yes, you have pipery, which is usually hidden by popen
rbowlby has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
<gion>
adaedra: do you have any recommendation from where to start from ?
eminencehc has joined #ruby
neanderslob_ has joined #ruby
<workmad3>
gion: the stderr and stdout are pipes... as adaedra said, look @ popen3
neanderslob_ has quit [Read error: Connection reset by peer]
<adaedra>
workmad3: the problem is that popen3 fails at executing the process
arup_r has quit [Ping timeout: 240 seconds]
<adaedra>
when exec works correctly, as gion says
neanderslob has joined #ruby
<adaedra>
gion: at the exec() step, you don't need the bash -c wrapper, no?
max_v has quit [Ping timeout: 252 seconds]
<gion>
adaedra: maybe i confused you, it does not fail, it just hangs until i kill ruby interpreter manually, then i see the file is correctly generated, but only after manual killing the ruby process
<adaedra>
ah
robbyoconnor has quit [Client Quit]
<adaedra>
before you kill the ruby process, in your ps/top/htop/whatever, is there still the ffmpeg child?
<gion>
adaedra: exec works with or without bash, but it is not an acceptable solution as i have to do other logic post exec in the same ruby script
Hounddog has joined #ruby
<gion>
adaedra: yes, not doing anything
<adaedra>
in what state? S? Z?
platzhirsch has joined #ruby
<gion>
adaedra: looking
<workmad3>
gion: did you try adding 'wait_thr.join' at the top of the popen3 block?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has quit [Ping timeout: 256 seconds]
<workmad3>
gion: or do 'exit_status = wait_thr.value' at the top, so that you don't close any io pipes until the process has finished
<gion>
adaedra: S
<adaedra>
strange
<adaedra>
well, it would have been strange both ways, but heh
astrobunny has joined #ruby
livathinos has joined #ruby
Rollabunna has joined #ruby
drewo has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
Musashi007 has joined #ruby
<gion>
workmad3: same haning with or without join and reading the status at the top
{756d6f} has quit [Ping timeout: 260 seconds]
<workmad3>
gion: if what you really want is a blocking "Run cmd and get output", you could also try `ffmpeg_out, ffmpeg_err, ffmpeg_status = Open3.capture("your command here")`... but it's sounding almost like something weird is going on with ffmpeg in the background :/
<solars>
Time.now.utc.localtime ("GMT+1:00") but that won't work as it only recognizes -/+HH:MM
<solars>
same for strftime
<ytti>
DateTime#strptime can generate arbitrary format to DataTime
<solars>
so I guess I have to alter the string anyway
<solars>
I think you misunderstood, I have the time object already, and need to output the time in timezone X
<solars>
not utc
quimrstorres has quit [Remote host closed the connection]
<adaedra>
.localtime() to convert the time
<adaedra>
ah I see
<solars>
yeah, I'll change GMT+1:00 to +01:00
<solars>
the GMT string doesn't seem to be any kind of standard
<adaedra>
iso8601 is the standard, all praise iso8601
oo_ has joined #ruby
<workmad3>
adaedra: yeah, praise iso8601, even though it only supports time offsets, not timezones :(
<adaedra>
timezones are confusing, offsets are clear
<ljarvis>
psh why could you want the zone if you have the offset
<workmad3>
ljarvis: because you want to do a calculation with the time? such as adding 2 weeks to it?
krasnus has joined #ruby
<adaedra>
what is easier to read: CEST or +02:00 ?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
symbol has quit [Ping timeout: 252 seconds]
<ljarvis>
workmad3: why does that make the zone better than the offset? am i missing something
<workmad3>
ljarvis: daylight savings changes
<ljarvis>
heh
<ljarvis>
had to deal with that shit in chronic and it make me mad
<ljarvis>
and by deal with i mean mask with lots of abstract turd
<workmad3>
ljarvis: different timezones can have the same offset at some points in the year, and once you only store the offset you completely lose that info :(
<ljarvis>
time is hard
{756d6f} has joined #ruby
<bnagy>
eh?
<bnagy>
zones are fixed
<adaedra>
workmad3: er, I thought named timezones stay the same
fabrice31 has joined #ruby
<ljarvis>
^
<bnagy>
it's just that the zone that applies to X geography at any given time chages
<adaedra>
^
ndrei has joined #ruby
<adaedra>
like we're having CEST here iirc, and outside of DST switch to CET
<workmad3>
bnagy: the timezone contains that information though ;) the offset doesn't
<bnagy>
workmad3: well no, it kind of doesn't
<darix>
UTC everywhere
<adaedra>
no
<darix>
yes
<bnagy>
the timezone doesn't tell you what the associated daylight time is
<bnagy>
or when it applies
<bnagy>
or if there is one
<adaedra>
it's even more retarded than TZ, darix
<bnagy>
hence tzinfo horror
apfeluser has joined #ruby
<darix>
adaedra: not really. especially for servers
lkba_ has joined #ruby
sdothum has joined #ruby
<bnagy>
anyway, I agree with "always store utc" ;)
<adaedra>
yes, but you don't only store your data. At a moment, you have to show it to your user.
<adaedra>
For data storage I agree.
<workmad3>
bnagy: I'm happy with 'store dates normalised in UTC, with the timezone or geographic region it originally came from' :)
<workmad3>
bnagy: at least some hint to recover the context to potentially map back to tzdata rules for changes
bruno- has joined #ruby
<darix>
workmad3: tzdata changes are not applied retrospectively
<darix>
that would cause even more chaos
dumdedum is now known as blaxter
<workmad3>
darix: by changes I mean calculations involving the date
<workmad3>
darix: as in "I want to add 2 weeks to this date"
<bnagy>
also, zoned times means that there can be times that never existed
<bnagy>
which is hilarity
<bnagy>
all you can do imvho is store and operate on UTC and then present UTCs as hopefully-correct localtimes
<adaedra>
tbh, we didn't need timezones to have not existing dates
lkba_ has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 272 seconds]
<workmad3>
adaedra: heh :) gotta love calendar changes too, eh?
<adaedra>
yep
<solars>
thanks for the discussion workmad, I just realized that we are missing the timezone informatino in our database as we have just the offset, so half of the year the shown timestamps are wrong.. haha
<adaedra>
and it changes by countries, too, wonderful
<solars>
workmad3, is there a standardized list of timezone names?
<workmad3>
solars: use tzdata
<bnagy>
that's tzdata
<workmad3>
solars: and then try to forget about it, because it'll just drive you insane
<solars>
I mean in general, not ruby specific
<workmad3>
solars: tzdata is in general
senayar_ has quit [Remote host closed the connection]
<bnagy>
"clocks were turned backward 0:05:52" ... obviously
<ljarvis>
they could have at least rounded it
apfeluser has quit [Quit: Leaving]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<solars>
is there a way with tzdata to specify utc time, base offset and country and get it corrected to DST or non DST?
<solars>
:)
<solars>
I have: timestamp, country, offset
<solars>
hm I guess country is not needed, should be possible
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<solars>
if offset is consistent
darkf has quit [Ping timeout: 246 seconds]
<nofxx>
solars, that's not good, you should have a location to calculate DST
<adaedra>
Like if Country was a viable information
<bnagy>
solars: you should only need utc and location
Outlastsheep is now known as zz_Outlastsheep
<solars>
hm right I need location
darkf_ is now known as darkf
<bnagy>
country might not be enough :/
<solars>
yeah
<solars>
just figured
<solars>
damnit
<workmad3>
solars: or the tzdata style timezone, e.g. 'America/New_York'
<solars>
yeah, the geniouses only stored the offset :)
felixrsmith has quit [Ping timeout: 244 seconds]
<bnagy>
and the country?
<solars>
country and offset
<nofxx>
yeah, timezone... solars you may do a batch update there... if you assume it's all not-dst ;)
max_v has quit [Ping timeout: 260 seconds]
einarj has quit [Ping timeout: 244 seconds]
<bnagy>
ok well sounds like you might need to write code :<
<workmad3>
solars: with a tzdata aware DateTime, you can load the time as UTC, move it into the tzdata timezone and then do calculations on it... the implementation will then handle changing the offset if required by the tzdata rules
<solars>
hmm but country and offset should work as it's the same for the whole country, or not?
<adaedra>
if you have the tzdata timezone, country is useless
<workmad3>
solars: HAHAHAAHAHA
<solars>
workmad3, :)
<solars>
the timezone string is the missing link
<workmad3>
'the same tz for the whole country'... that would actually make sense...
<bnagy>
solars: if you have the country and the offset and the date you can find a tzdata entry that fits
<solars>
not the same tz, the same DST setting
<adaedra>
Look at the US or Russia
<solars>
bnagy, that's what I meant
<solars>
bnagy, which methods are you referring to? I cannot try atm
<bnagy>
like if you know it's December in Australia only one of the three zones will match the offset you have
<solars>
workmad3, to explain: I meant if I have the country and offset (base) the DST is probably the same across the whole country
<solars>
bnagy, exactly
<bnagy>
assuming the offset was correct tat the time :(
<solars>
yeah, question is if they just stored the "current" offset haha
<workmad3>
solars: apart from actually on a DST shift... the DST shift is typically done at 2a.m. in the current offset, so if you have a country that spans multiple timezones, different parts of it will be changing to/from DST at different UTC times...
eGGsha has joined #ruby
<solars>
hm indeed..
<solars>
damn what a mess
vyorkin has quit [Quit: WeeChat 1.2]
<unshadow>
Where is a good place to find Ruby (not rails) programmers for hire (for a single project) ?
<workmad3>
solars: you could probably just go "Meh" and keep your assumption at that point though ;) that edge-case is probably not too important in most situations
<workmad3>
tbuehlmann: not to mention that getting to/from mars will probably involve speeds where relativistic shifts become noticable
<solars>
workmad3, you mean the assumption of getting the DST info with country and offset?
<adaedra>
I ahah
<adaedra>
oops, remove the I
BTRE has joined #ruby
dfockler has joined #ruby
<workmad3>
solars: yeah, I mean you can probably ignore the edge-case where different parts of a country have applied DST at different UTC times
<adaedra>
or different have DST or NOT
<solars>
workmad3, yeah I think I will just ignore it, or let someone else fix the timezones
<adaedra>
or not*
rmoriz has joined #ruby
oo_ has quit [Remote host closed the connection]
drPoggs has joined #ruby
<adaedra>
Even a timezone name can have different DST, fun
Narzew has quit [Ping timeout: 256 seconds]
soahccc has joined #ruby
Trieste has joined #ruby
elektronaut has joined #ruby
phrozen77 has joined #ruby
nemesit|znc has joined #ruby
tkuchiki has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
lampshades has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DaniG2k has joined #ruby
_whitelogger____ has joined #ruby
christiandsg has joined #ruby
skade has quit [Client Quit]
Guest70208 has quit [Remote host closed the connection]
{756d6f} has joined #ruby
<adaedra>
have to find the city representing the TZ and the country
frem has quit [Quit: Connection closed for inactivity]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy>
use geonames for city -> lat long then use goog for lat-long -> tz
<bnagy>
for this particular problem, anyway, where we have a country and city
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
<solars>
bnagy, yep, the gem linked above does (should) exactly this
<abdulrehman>
quick question; any chance I can embed ruby code in a string where by some part of the string get replaces on the fly by some sort of a condition?
<adaedra>
use interpolation
iateadonut has joined #ruby
lkba has joined #ruby
<adaedra>
>> a = 'world'; "Hello, #{world.capitalize}!"
<ruboto>
adaedra # => undefined local variable or method `world' for main:Object (NameError) ...check link for more (https://eval.in/408034)
<adaedra>
erf
<adaedra>
>> a = 'world'; "Hello, #{a.capitalize}!"
<abdulrehman>
ok, i thought we can only have variables in there
{756d6f} has quit [Ping timeout: 244 seconds]
<adaedra>
anything
omegamike has joined #ruby
<abdulrehman>
something like this; strg = "World is #{ 'great' unless false}"
xfbs has quit []
<abdulrehman>
awesome, love ruby!!!
<abdulrehman>
thanks
dimasg has joined #ruby
niemcu has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
mxrguspxrt has joined #ruby
joonty has quit [Ping timeout: 260 seconds]
decoponio has joined #ruby
joonty has joined #ruby
<workmad3>
abdulrehman: there's a slight restriction on the contents of interpolation... it can be any ruby that evaluates to an object that responds to `to_s`... in practice, this is pretty much anything though :)
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
omegamike has quit [Ping timeout: 244 seconds]
jack_rabbit has quit [Ping timeout: 244 seconds]
rikkipit_ has joined #ruby
rikkipitt has quit [Ping timeout: 260 seconds]
bronson has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
senayar has joined #ruby
<abdulrehman>
workmad3: ya, but I think it wont do me good sadly, the reason being is that I am written some strings in a seperate rb file and include that, now some part of the string is like this #{testing} and testing is a variable I have just before bringing the string from the other file, so it complains it can't find it, I need a way to pass these to the file without complaining, and sorry I do not think I am being clear hahahahah
ndrei has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<ljarvis>
at least you sound like you're having fun
<ljarvis>
or that's the laugh of a maniac
<abdulrehman>
hahah I am
spider-mario has joined #ruby
<abdulrehman>
bit of both
<abdulrehman>
but maybe I can use lambdas
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
ldnunes has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
symbol has joined #ruby
DaniG2k has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 252 seconds]
but3k4 has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bumbar_ has quit [Ping timeout: 255 seconds]
{756d6f} has joined #ruby
sarkyniin has joined #ruby
symm- has joined #ruby
lannonbr has joined #ruby
AugustoCesar has joined #ruby
omegamike has joined #ruby
AugustoCesar has left #ruby [#ruby]
ta has quit [Remote host closed the connection]
{756d6f} has quit [Ping timeout: 246 seconds]
DaniG2k has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
s00pcan has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
B1n4r10 has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby
davedev24 has joined #ruby
supergeek has quit [Quit: Goodbye cruel world...]
bluOxigen has joined #ruby
eGGsha has joined #ruby
felixr has joined #ruby
rikkipit_ has quit [Remote host closed the connection]
scripore has joined #ruby
drewo has joined #ruby
allomov has quit [Remote host closed the connection]
Papierkorb has joined #ruby
arup_r has quit [Remote host closed the connection]
A124 has quit [Ping timeout: 264 seconds]
skade has joined #ruby
Rollabunna has joined #ruby
joonty has quit [Quit: joonty]
DaniG2k has quit [Quit: leaving]
afrianska has joined #ruby
{756d6f} has joined #ruby
jas02 has joined #ruby
felixr has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
drewo has quit [Ping timeout: 264 seconds]
sdwrage has quit [Client Quit]
strixd has joined #ruby
juanpablo_____ has joined #ruby
leat2 has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
Rollabunna has quit [Ping timeout: 244 seconds]
Bloodshot has joined #ruby
Yzguy has joined #ruby
xfbs has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
platzhirsch has quit [Ping timeout: 264 seconds]
leat2 has joined #ruby
CustosLimen has quit [Ping timeout: 244 seconds]
sarkyniin has quit [Read error: No route to host]
AlexAltea has quit [Ping timeout: 246 seconds]
minmax has quit [Quit: WeeChat 0.4.3]
davedev24 has joined #ruby
sarkyniin has joined #ruby
juanpablo_____ has quit [Ping timeout: 246 seconds]
_blizzy_ has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
quimrstorres has joined #ruby
Darkwater has joined #ruby
<Darkwater>
I'm using find_all (followed by each to do something) on an array, and then delete_if to remove the elements that have matched, is there a faster method for this?
<Darkwater>
like a combined find_all + delete_if? (like a selective pop)
bruno- has quit [Ping timeout: 256 seconds]
<lannonbr>
I believe there is a select function that creates a new array based on a condition
<Darkwater>
actually it's probably not literally a queue
<jhass>
lannonbr: find_all is just the ugly name for select
last_staff has quit [Ping timeout: 265 seconds]
<lannonbr>
Okay
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
<Darkwater>
it's an array containing objects, and occasionally I want to take all objects from the array that match a certain criteria (a certain key equalling a certain value) and do something with those
<Darkwater>
while removing them from the list
<[k->
array*
<jhass>
Darkwater: Array#- I guess, though that'll go by equality, not identity
Yzguy has quit [Quit: Zzz...]
<jhass>
or splat into #delete
<manveru>
that won't look by a key
<Darkwater>
well, guess I'll just stick with delete_if
<[k->
what is the problem with reject
<Darkwater>
thanks for the suggestions tho
<[k->
or reject!
<jhass>
[k-: delete_if is the ugly name for reject! ;)
<Darkwater>
none, but I already wrote delete_if :>
ynroot has joined #ruby
<[k->
you just heard that it is ugly!
arup_r has joined #ruby
<Darkwater>
it's also more explanatory imo
<jhass>
Darkwater: if you don't need self-modifying, #partition would indeed be the correct tool actually
<Darkwater>
yeah but I do need self-modifying
sdwrage has joined #ruby
<ynroot>
hi there im using opensuse 13.2 and ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux-gnu], how to update it
fabrice31_ has joined #ruby
<[k->
self-modifying is bad!, but then again ruby gc isnt designed for immutability exploits
dimasg has quit [Ping timeout: 252 seconds]
<[k->
designed to exploit immutability*
<Darkwater>
I'm not going to overengineer this though
mxrguspxrt has quit [Remote host closed the connection]
cheeti has quit [Quit: Page closed]
fabrice31 has quit [Ping timeout: 264 seconds]
joonty has joined #ruby
CustosLimen has joined #ruby
felixr has joined #ruby
tmtwd has joined #ruby
felixrsmith has joined #ruby
x12 has joined #ruby
timonv has joined #ruby
Kyuujitsu has joined #ruby
felixrsmith has quit [Client Quit]
ValicekB has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
Pumukel has joined #ruby
anaeem1_ has joined #ruby
kully3xf has joined #ruby
[k-_ has joined #ruby
fabrice31 has joined #ruby
ynroot has quit [Quit: Konversation terminated!]
felixr has quit [Ping timeout: 244 seconds]
fabrice31_ has quit [Read error: Connection reset by peer]
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<[k-_>
one line only for ruboto pls
Yiota has joined #ruby
hashrocket has joined #ruby
dmolina has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
kully3xf has quit [Ping timeout: 255 seconds]
AlexAltea has joined #ruby
woodruffw has quit [Ping timeout: 255 seconds]
curses has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
schaerli has joined #ruby
<[k-_>
gregf_: that code is to get random numbers?
sgambino has joined #ruby
<apeiros>
[k-_: what do you mean, "one line only for ruboto pls"?
<[k-_>
the use of semicolons should only be allowed when using ruboto to evaluate something!
DLSteve has joined #ruby
<manveru>
oO
<apeiros>
0o
<gregf_>
[k-_: nono :/. its to filter Foo's based on foo.name starting with a, h or z. well not really needed. but just to explain how Darkwater can do the filtering since he/she was talking about objects
<[k-_>
totally why you shouldnt write in a line!
xfbs has quit [Ping timeout: 256 seconds]
<gregf_>
too lazy to gist it :/
<apeiros>
meh. ; to give code in a single message is common
<Darkwater>
gregf_: I understand how to use partition
<apeiros>
IMO not too much expected from the recipient to unfold themselves
<Darkwater>
but it's just not what I want in this case
sankaber has joined #ruby
max_v has quit [Ping timeout: 272 seconds]
<[k-_>
time for daily obfuscation then, apeiros!
xfbs has joined #ruby
<[k-_>
what do you say?
<apeiros>
folding newlines ain't obfuscation
<[k-_>
i always have libobf.min.rb in my repository1
<Rhainur>
got a coding style question. I've generally heard that keeping lines to 80 chars or below is good for readability and I totally agree with it, and even if it needs to be stretched I avoid going beyond 100 chars
<wnd>
I have had the questionable pleasure to work with code that essentially does "@date_gt = DateTime.parse(params[:date_gt]) rescue 6.months.ago.to_date" which (obviously) happily sweeps trouble under the carpet
bumbar_ has joined #ruby
bumbar_ has joined #ruby
schaerli has quit [Remote host closed the connection]
max_v has joined #ruby
rodferso1 has quit [Ping timeout: 264 seconds]
Kully3xf_ has quit [Ping timeout: 255 seconds]
lxsameer_ has quit [Quit: Leaving]
sarkyniin has quit [Read error: Connection reset by peer]
banister has joined #ruby
sarkyniin has joined #ruby
zeeraw has joined #ruby
<[k-_>
amazing!
<[k-_>
+1
riscky has quit [Quit: riscky]
leat2 has quit [Ping timeout: 250 seconds]
gamename has joined #ruby
kully3xf has joined #ruby
BeatzKilla has joined #ruby
<ljarvis>
...
<ljarvis>
please tell me "amazing!" and "+1" was a troll
<ljarvis>
right but we're talking about proper clean code, not the mess of shit that is that library
juanpablo_____ has joined #ruby
<[k-_>
:(
<[k-_>
ruby -e "eval('__END__'); p \"test\""
<[k-_>
"test"
<[k-_>
that amazingly works!
The_Phoenix has joined #ruby
rodfersou has quit [Quit: leaving]
vifino has quit [Ping timeout: 246 seconds]
<[k-_>
shouldn't use rescue for control flow though. also it is more expensive
leat2 has joined #ruby
schaerli has quit [Ping timeout: 252 seconds]
Igorshp has joined #ruby
<ljarvis>
[k-_: do you write code for a job?
<[k-_>
no :)
Tiriricakkk has joined #ruby
juanpablo_____ has quit [Ping timeout: 256 seconds]
<solars>
workmad3, one more tz thing :) the tzdata list is quite comprehensive, rails seems to use only a subset (http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html) is this a custom list or is this also a tzdata suggestion or subset commonly used?
Tiriricakkk has quit [Client Quit]
felixr has joined #ruby
dblessing has joined #ruby
axl__ has joined #ruby
rodfersou has joined #ruby
schaerli has joined #ruby
safeforg_ has quit [Remote host closed the connection]
<bronson>
[k-_: is your username obfuscated?
rikkipitt has joined #ruby
ttilley has joined #ruby
<[k-_>
no, it doesn't mean anything in ruby
arup_r has quit []
<[k-_>
or any other languages (that i know of)
ttilley has quit [Changing host]
ttilley has joined #ruby
paulcsmith has joined #ruby
codecop has quit [Remote host closed the connection]
JoshL has joined #ruby
<wasamasa>
"If you do not pass a block to the mail method, it will find all templates in the view paths using by default the mailer name and the method name that it is being called from, it will then create parts for each of these templates intelligently, making educated guesses on correct content type and sequence, and return a fully prepared Mail::Message ready to call :deliver on to send."
<wasamasa>
raaaaaails
<wasamasa>
screw these educated guesses
mkosaki_ has quit [Quit: Leaving...]
danman has joined #ruby
drewo has joined #ruby
radgeRayden has quit [Read error: Connection reset by peer]
sevenseacat has quit [Quit: Me dun like you no more.]
dorei has joined #ruby
leat2 has quit [Remote host closed the connection]
<shevy>
I like the part where they state that these templates are created intelligently
Kully3xf_ has joined #ruby
leat2 has joined #ruby
<shevy>
rails is no longer a framework - it's an intelligent AI now
vt102 has joined #ruby
christiandsg has joined #ruby
<shevy>
although in fairness, a rails skynet would be too slow to be dangerous
gregf has joined #ruby
kully3xf has quit [Ping timeout: 240 seconds]
rikkipit_ has joined #ruby
jas02 has quit [Quit: jas02]
Rollabunna has joined #ruby
vifino has joined #ruby
rikkipitt has quit [Ping timeout: 272 seconds]
drewo has quit [Ping timeout: 255 seconds]
<wasamasa>
zombie skynet?
Igorshp has quit [Remote host closed the connection]
jrochkind has left #ruby [#ruby]
whippythellama has joined #ruby
tagrudev has quit [Remote host closed the connection]
juanpablo_____ has joined #ruby
aganov has quit [Remote host closed the connection]
christiandsg has quit [Ping timeout: 265 seconds]
anaeem1_ has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 244 seconds]
alex88 has quit [Ping timeout: 244 seconds]
zack6849 has quit [Ping timeout: 256 seconds]
Hobbyboy has quit [Ping timeout: 256 seconds]
bihi has quit [Ping timeout: 252 seconds]
calleerlandsson has quit [Quit: Connection closed for inactivity]
teotwaki has quit [Ping timeout: 244 seconds]
thejoecarroll has quit [Ping timeout: 255 seconds]
failshell has joined #ruby
erichf has quit [Ping timeout: 244 seconds]
diegok has quit [Ping timeout: 244 seconds]
soloone has quit [Ping timeout: 256 seconds]
Fluent has quit [Ping timeout: 252 seconds]
eregon has quit [Quit: No Ping reply in 180 seconds.]
swistak35 has quit [Ping timeout: 265 seconds]
gattuso has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
deavid has quit [Quit: No Ping reply in 180 seconds.]
deavid has joined #ruby
tabakhase has quit [Ping timeout: 272 seconds]
bier_ has quit [Ping timeout: 244 seconds]
diegok has joined #ruby
beef-wellington has joined #ruby
loop3r_ has quit [Ping timeout: 256 seconds]
oz has quit [Ping timeout: 264 seconds]
tommylommykins has quit [Ping timeout: 256 seconds]
Zackio has quit [Ping timeout: 244 seconds]
patteh has quit [Ping timeout: 244 seconds]
loop3r has joined #ruby
swistak35 has joined #ruby
oz has joined #ruby
ght has quit [Ping timeout: 256 seconds]
bier has joined #ruby
gattuso has joined #ruby
shpoont has joined #ruby
tommylommykins has joined #ruby
Igorshp has joined #ruby
aryaching has joined #ruby
benlovell has joined #ruby
fabrice31_ has joined #ruby
shpoont has quit [Max SendQ exceeded]
benlovell has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
schaerli has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 244 seconds]
segfalt has quit [Quit: segfalt]
chills42 has quit [Remote host closed the connection]
<AckZ>
any ruby-pg experts here? I have a question about how PG::Result#stream_each works
chrissonar has quit [Remote host closed the connection]
werelivinginthef has joined #ruby
anaeem1_ has joined #ruby
Axy has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
CustosLimen has quit [Ping timeout: 244 seconds]
tmtwd has joined #ruby
scripore has joined #ruby
atomical has joined #ruby
roa is now known as Roa
<[k-_>
?ask
<ruboto>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<abdulrehman>
?
platzhirsch has quit [Ping timeout: 240 seconds]
DroidBurgundy has quit [Ping timeout: 264 seconds]
fractalis has joined #ruby
Hobbyboy has joined #ruby
soloone has joined #ruby
teotwaki has joined #ruby
CustosLimen has joined #ruby
erichf has joined #ruby
atomical has quit [Client Quit]
Fluent has joined #ruby
centrx has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
abdulrehman: hi
pengin_ has quit [Remote host closed the connection]
Kully3xf_ has quit [Remote host closed the connection]
zack6849 has joined #ruby
zack6849 has joined #ruby
yardenbar has quit [Quit: Leaving]
kully3xf has joined #ruby
<[k-_>
jhass: hi
<apeiros>
abdulrehman: "I have a question about how PG::Result#stream_each works" - just ask the question.
<apeiros>
you reduce the likeliness of somebody answering by this indirection.
<jhass>
apeiros: check nicks :P
<centrx>
abdulrehman, I have a question about your question?
symm- has quit [Ping timeout: 264 seconds]
<apeiros>
oh
<apeiros>
AckZ: "I have a question about how PG::Result#stream_each works" - just ask the question.
<apeiros>
you reduce the likeliness of somebody answering by this indirection.
<apeiros>
sorry @ abdulrehman :D
<shevy>
poor abdulrehman ... he did not even have a question!
<jhass>
but a questionmark!
<[k-_>
poor me
<shevy>
perhaps he wanted to test the bot
kies^ has joined #ruby
<shevy>
?syntax
<ruboto>
I don't know anything about syntax
<centrx>
?I have a question
<ruboto>
have, I don't know anything about I
<jhass>
?life
<ruboto>
I don't know anything about life
<shevy>
lol... the bot speaks Yoda
<adaedra>
¿life
<shevy>
What editor would Yoda use if he were to program in ruby?
<wasamasa>
cat
<shevy>
lol
<adaedra>
what would he program?
dopie has joined #ruby
<adaedra>
a websith?
<shevy>
a padawan trainer
<abdulrehman>
centrx: question away my friend
<shevy>
because he got tired of having to answer silly questions
<abdulrehman>
jhass: hi sorry for late reply, at work can't always look at the screen
<Scriptonaut>
Hey guys, I have a class, with a collection of private methods. I would like to be able to do: MyClass::list_of_these_methods. I don't want all private methods, just these methods. Is there an easy way I can namespace them or something, so that I can return a list of these methods?
<[k-_>
lol you dont look at the screen while you work?
<adaedra>
abdulrehman: like a lot of people here, long replies are normal phenomenon
<TMM>
hello! I'm not sure if this is the right place to ask but I'm trying to use active_record without rails and I want to use rspec fixtures with it. I've been struggling to find some documentation on this. could anyone point me in the right direction please? I've tried googling the obvious but I can't find anything that's at my knowledge level it seems
<Scriptonaut>
oh cool
<Scriptonaut>
ljarvis: thanks
anaeem1_ has quit [Ping timeout: 260 seconds]
xfbs_ has joined #ruby
* adaedra
would point at Sequel
<Scriptonaut>
how does one get private class methods?
<ljarvis>
TMM: have you tried #rspec?
<TMM>
ljarvis, I haven't thank you
<Scriptonaut>
adaedra: lots of people have recommended that to me so far
<[k-_>
Scriptonaut: extend
xfbs has quit [Ping timeout: 264 seconds]
<Scriptonaut>
thanks
<adaedra>
Scriptonaut: Sequel? It's amazing.
Gadgetoid has joined #ruby
<ljarvis>
>> Class.private_methods # Scriptonaut
<ruboto>
ljarvis # => [:inherited, :initialize, :included, :extended, :prepended, :method_added, :method_removed, :method_ ...check link for more (https://eval.in/408343)
skade has quit [Read error: Connection reset by peer]
<Scriptonaut>
thanks
schaerli has joined #ruby
<Scriptonaut>
hrm, private_methods doesn't take false
scripore has quit [Quit: This computer has gone to sleep]
svdb64 has quit [Quit: WeeChat 1.2]
abdulrehman has quit [Quit: Page closed]
theery has joined #ruby
abdulrehman has joined #ruby
baweaver has joined #ruby
tuelz has joined #ruby
Scriptonaut has left #ruby [#ruby]
schaerli has quit [Remote host closed the connection]
Rollabunna has joined #ruby
startupality has joined #ruby
j4cknewt has joined #ruby
drewo has quit [Ping timeout: 255 seconds]
scripore has joined #ruby
sinkensabe has quit [Remote host closed the connection]
BeatzKilla_ has joined #ruby
sepp2k has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
Rollabunna has quit [Ping timeout: 244 seconds]
blaxter has quit [Quit: foo]
christiandsg has quit [Remote host closed the connection]
_kfpratt has joined #ruby
pyon is now known as phoas-pyon
kfpratt has quit [Read error: Connection reset by peer]
Philipp__ has quit [Read error: Connection reset by peer]
theery has quit [Remote host closed the connection]
BeatzKilla has quit [Ping timeout: 265 seconds]
christiandsg has joined #ruby
<startupality>
how can i have a new line char in excel cell (using axlsx to produce excel file)?
<[k-_>
you might get better responses in #axlsx
j4cknewt has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
fabrice31 has joined #ruby
white_bear has quit [Ping timeout: 244 seconds]
<[k-_>
to my knowledge, though, newlines arent allowed to be in cells
j4cknewt has joined #ruby
afrianska has quit [Ping timeout: 264 seconds]
<apeiros>
they are
quimrsto_ has quit [Read error: Connection reset by peer]
rikkipitt has joined #ruby
<apeiros>
but (in excel, no idea about axlsx) you have to set the cell to accept them
fabrice31 has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
quimrsto_ has joined #ruby
<apeiros>
and (because excel) once you do that, excel can no longer automatically align all columns to their optimal width
<[k-_>
you used them before? :O
d10n-work has quit [Remote host closed the connection]
benlakey has quit [Remote host closed the connection]
dede has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
ziyadb has quit [Remote host closed the connection]
howdoi has quit [Remote host closed the connection]
shelling__ has quit [Remote host closed the connection]
iamdevnul has quit [Remote host closed the connection]
ELLIOTTCABLE has quit [Remote host closed the connection]
Lloyd has quit [Remote host closed the connection]
prosodyContext has quit [Remote host closed the connection]
Juanchito has quit [Remote host closed the connection]
hoey_ has quit [Remote host closed the connection]
hashrocket has quit [Remote host closed the connection]
jimbeaudoin has quit [Remote host closed the connection]
lancetw has quit [Remote host closed the connection]
akitada has quit [Remote host closed the connection]
krainboltgreene has quit [Remote host closed the connection]
codeitagile has quit [Remote host closed the connection]
yo61 has quit [Remote host closed the connection]
countryHick has quit [Remote host closed the connection]
machty has quit [Remote host closed the connection]
bove has quit [Remote host closed the connection]
im0b has quit [Write error: Broken pipe]
neersighted has quit [Remote host closed the connection]
Guest85414______ has quit [Remote host closed the connection]
zero7 has quit [Remote host closed the connection]
Heero has quit [Remote host closed the connection]
AckZ has quit [Remote host closed the connection]
lacrosse has quit [Remote host closed the connection]
exadeci has quit [Remote host closed the connection]
kapowaz has quit [Write error: Broken pipe]
pmarreck has quit [Write error: Broken pipe]
livathinos has quit []
higuys has quit [Ping timeout: 255 seconds]
rikkipit_ has quit [Ping timeout: 272 seconds]
startupality has quit [Ping timeout: 260 seconds]
fabrice31_ has quit [Ping timeout: 256 seconds]
startupality has joined #ruby
tkuchiki has joined #ruby
Pyrotecnix has quit [Quit: WeeChat 0.4.2]
Pyrotecnix has joined #ruby
icebourg has joined #ruby
avocadorivalry has joined #ruby
ballingt has joined #ruby
solars has quit [Ping timeout: 265 seconds]
riotjones has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
dgutierrez1287 has joined #ruby
Igorshp has quit [Remote host closed the connection]
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
benlovell has quit [Ping timeout: 250 seconds]
howdoi has joined #ruby
nobitanobi has joined #ruby
ruby-lang852 has joined #ruby
ramfjord has joined #ruby
<shevy>
he is an avid excel god!
DaniG2k has joined #ruby
startupality has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
ndrei has joined #ruby
_kfpratt has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
BeatzKilla_ has quit [Read error: Connection reset by peer]
Guest85414______ has joined #ruby
anaeem1_ has joined #ruby
startupality has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
amargherio has joined #ruby
dgutierrez1287 has quit [Ping timeout: 246 seconds]
kapowaz has joined #ruby
GriffinHeart has joined #ruby
niiamon has joined #ruby
shock_one has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
<abdulrehman>
where I work, they prefer csv files, and to be honest, they are so easy to work with, and can also be opened with excel
benlovell has joined #ruby
quimrstorres has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
anaeem1_ has quit [Ping timeout: 244 seconds]
<shevy>
csv is nice because it is quite simple
x12 has quit [Quit: Page closed]
ta has joined #ruby
anaeem1_ has joined #ruby
ponga has quit []
ELLIOTTCABLE has joined #ruby
niiamon has quit [Ping timeout: 256 seconds]
nzst has joined #ruby
felixr has quit [Quit: Konversation terminated!]
Oka has quit [Quit: さようなら]
anaeem1__ has joined #ruby
rikkipitt has quit [Remote host closed the connection]
anaeem1_ has quit [Read error: Connection reset by peer]
segfalt has joined #ruby
<[k-_>
you definitely cant have newlines there!
<ruby-lang852>
quit
ruby-lang852 has quit []
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
niiamon_ has joined #ruby
benlovell has quit [Read error: Connection reset by peer]
safeforge has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baroquebobcat has quit [Quit: baroquebobcat]
apfeluser has joined #ruby
NeverDie has joined #ruby
TMM has quit [Quit: Ex-Chat]
ta has quit [Remote host closed the connection]
<firoxer>
Hey everyone, got a question... I'm working on a Sinatra application and I'm wondering whether it would be better to require gems in the files that actually need them (e.g. mysql2 in models, sinatra/cookies in controllers) or have all the requires in the "main" file, app.rb?
psy_ has joined #ruby
ta has joined #ruby
<jhass>
I tend to require everything a file needs at the top of it. To me that makes it easier to manage and recognize whether a dependency is still needed/used
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
Rollabunna has joined #ruby
chinmay_dd has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<firoxer>
Alright, thanks
Rollabunna has joined #ruby
<firoxer>
It seems easier to have them in one place but more logical to do it your way
pmarreck has joined #ruby
bazbing81 has joined #ruby
gion has quit [Ping timeout: 246 seconds]
niiamon_ has quit [Ping timeout: 252 seconds]
yqt has quit [Ping timeout: 250 seconds]
<adaedra>
keep the dependencies close to the dependent code
anaeem1__ has quit [Remote host closed the connection]
rcvalle has joined #ruby
<firoxer>
Will do
ziyadb has joined #ruby
dwithers is now known as pl1ght
<firoxer>
Thanks for the advice
yqt has joined #ruby
startupality has quit [Ping timeout: 255 seconds]
sarkyniin has quit [Ping timeout: 250 seconds]
lannonbr has quit [Quit: WeeChat 1.2]
alex88 has quit [Changing host]
alex88 has joined #ruby
alex88 has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
krainboltgreene has joined #ruby
rikkipitt has joined #ruby
christiandsg has joined #ruby
im0b has joined #ruby
shock_one has joined #ruby
chinmay_dd has quit [Quit: See ya!]
soultadu has joined #ruby
ReK2GnULinuX is now known as ReK2
nsuke has quit [Remote host closed the connection]
snockerton has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dvb_ua has joined #ruby
neersighted has joined #ruby
niiamon__ has joined #ruby
drewo has joined #ruby
Lamarus has joined #ruby
startupality has joined #ruby
Cache_Money has joined #ruby
sarkyniin has joined #ruby
rehat has joined #ruby
werelivi_ has joined #ruby
niiamon has joined #ruby
werelivinginthef has quit [Ping timeout: 265 seconds]
drewo has quit [Ping timeout: 240 seconds]
mtakkman has quit [Quit: y]
ponga has joined #ruby
rsc___ has joined #ruby
blue_deref has joined #ruby
casadei_ has joined #ruby
drewo has joined #ruby
Rollabun_ has joined #ruby
khebbie_ has joined #ruby
khebbie has joined #ruby
shock_one has quit [Remote host closed the connection]
atmosx has quit [Quit: WeeChat 0.4.4-dev]
SHyx0rmZ has quit [Remote host closed the connection]
rippa has joined #ruby
SHyx0rmZ has joined #ruby
treehug88 has joined #ruby
<treehug88>
question: suppose I have a Module that's mixed in to a class, and that module has a method called. How can I figure out which class I'm 'mixed into' ?
Rollabunna has quit [Ping timeout: 272 seconds]
<jhass>
self.class
<jhass>
though sounds like a fishy design
soultadu has quit [Ping timeout: 240 seconds]
<treehug88>
duh. Thanks jhass. Why do you say that
<shevy>
class Fish # a fishy design
<jhass>
well, you couple your module to the classes its included to, which harms its resusability tremendously
stan has quit [Ping timeout: 244 seconds]
<treehug88>
so you're against modules
<treehug88>
?
<jhass>
no, against modules who care about the class they're included to
ivanskie has joined #ruby
<treehug88>
gotcha, I'm on board with that thinking. Thanks jhass
gizmore has joined #ruby
Zai00 has quit [Quit: Zai00]
<startupality>
how to merge rows with axslx?
niiamon__ has quit [Read error: Connection reset by peer]
niiamon has quit [Remote host closed the connection]
<[k-_>
is that not in the docs?
sinkensabe has quit [Remote host closed the connection]
Ilyas has joined #ruby
Hounddog has quit [Remote host closed the connection]
eggoez has quit [Ping timeout: 256 seconds]
strixd has quit [Quit: 500]
<treehug88>
I can't find this documented quickly - can someone tell me - if I have a class with a module mixed in, and both provilde the same method name, which is called first, and which is access via super (let me know if I have this logic wrong too please) Thanks in advance
<startupality>
@[k-_: you can merge the cells, or you can merge the rows by explicitly saying which cell and which cell, but I want to be able to use something similar to sheet.rows.last.cells
<[k-_>
treehug88: the class overrides the module's method
Igorshp has quit [Remote host closed the connection]
<[k-_>
super calls the module's method
werelivi_ has quit [Read error: Connection reset by peer]
<treehug88>
thanks jk
poguez_ has joined #ruby
doodleha_ has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
rtt_: Do you know any Ruby yet or starting with that first?
skmp has joined #ruby
startupality has quit [Quit: startupality]
blackmesa has joined #ruby
chinmay_dd has quit [Ping timeout: 246 seconds]
startupality has joined #ruby
startupality has quit [Client Quit]
Alayde has joined #ruby
cstrahan has joined #ruby
<ryanprior>
I want to take a path as provided by the user and interpret resolve it like Bash would, ie "~/foo"=>"/home/myuser/foo" -- should I just use an inferior bash process to do that, or is there a standard in-process way of doing path substitutions?
Hobogrammer has quit [Quit: さようなら]
MiracleBlue has joined #ruby
segfalt has quit [Quit: segfalt]
nateberkopec has joined #ruby
chrisseaton has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
nzst has quit [Ping timeout: 252 seconds]
MatthewsFace has quit [Remote host closed the connection]
fractalis has quit [Ping timeout: 265 seconds]
skade has joined #ruby
casadei_ has joined #ruby
tenderlove has joined #ruby
baweaver has joined #ruby
<rtt_>
havenwood i have litlle knowledge of ruby studied from code acedmy and ruby monk
<jhass>
&ri File::expand_path
<`derpy>
No results
<jhass>
:o
eminencehc has quit [Remote host closed the connection]
<jhass>
rtt_: https://github.com/trending?l=ruby&since=monthly you can check if you find an interesting project and if there are any open issues you'd feel ready to tackle. Then just submit a PR
quimrstorres has joined #ruby
nkts has quit [Read error: Connection reset by peer]
quimrsto_ has quit [Ping timeout: 244 seconds]
baweaver has quit [Read error: Connection reset by peer]
nkts has joined #ruby
nkts has quit [Read error: Connection reset by peer]
tonini has joined #ruby
grubernaut has joined #ruby
baweaver has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
afrianska has joined #ruby
shock_one has quit [Ping timeout: 265 seconds]
shadoi has joined #ruby
deol has joined #ruby
<nini1294>
Hey, I tried to find this just about everywhere but had not luck, whats the best way to set a title for the page?
<nini1294>
Sorry if its a stupid question, im new to Rack applications
arup_r has joined #ruby
<jhass>
nini1294: you set the <title> tag in the HTML you return
<jhass>
nilcolor: self is Redis in that context, so class Store < Redis
<nilcolor>
me too )) google it with no luck
<jhass>
idk why they did that
JoshL has quit [Read error: No route to host]
JoshL has joined #ruby
CustosLimen has quit [Ping timeout: 246 seconds]
<nilcolor>
jhass: yeah? inherited from outer class? that is... strange
<jhass>
yeah
<centrx>
This solves all my problems!
prestorium has joined #ruby
<shevy>
nilcolor yeah... they could have done class Store < Redis just fine, I think it would be more in line with 99,9% of the rest of the ruby code out there
curses has quit [Remote host closed the connection]
<nilcolor>
shevy: hmm.. just checked. and yes - that is inherited from outer class. Still have no clue - why do this =)
ElSif has quit [Read error: Connection reset by peer]
<cschneid_>
havenwood: thanks, slightly odd this isn't a built-in :)
<havenwood>
cschneid: It has been proposed and they said let's see if anyone uses it as a gem.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
rbowlby has quit [Remote host closed the connection]
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #ruby
tejasmanohar has quit [Ping timeout: 272 seconds]
sdothum has joined #ruby
<havenwood>
cschneid: You could add it yourself similar to the several gems that add something like: class Hash; def map_value; each_with_object({}) { |(k, v), h| h[k] = yield(v) } end end
<havenwood>
cschneid: But yeah, the idiom to get around lack of such methods is: map { |k, v| [k, v] }.to_h
<havenwood>
cschneid_: ^
<havenwood>
cschneid: Maybe in Ruby 3.0. ;)
dorei has joined #ruby
<centrx>
cschneid_, Rails/ActiveSupport has Hash#transform_values and Hash#transform_keys
dented42 has joined #ruby
douglasssss has joined #ruby
bumbar_ has quit [Ping timeout: 244 seconds]
<postmodern>
how does one automatically login a user with warden?
tenderlove has quit [Ping timeout: 252 seconds]
symm- has joined #ruby
Phagus has joined #ruby
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
Phagus has left #ruby [#ruby]
treehug88 has joined #ruby
tenderlove has joined #ruby
ruurd has joined #ruby
pipework has quit [Quit: pipeworkin' it]
scripore has quit [Quit: This computer has gone to sleep]
allomov has joined #ruby
jackjackdripper has joined #ruby
ruurd has quit [Client Quit]
BradPitt_ has joined #ruby
scripore has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
Musashi007 has joined #ruby
nilcolor has quit [Remote host closed the connection]
Papierkorb has joined #ruby
BradPitt_ has quit [Client Quit]
pipework has joined #ruby
BradPitt_ has joined #ruby
Lamarus has quit [Ping timeout: 246 seconds]
rikkipitt has joined #ruby
bronson has quit [Remote host closed the connection]
christiandsg has joined #ruby
blackmes1 has joined #ruby
bronson has joined #ruby
BradPitt_ has quit [Quit: leaving]
MatthewsFace has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
zz_Outlastsheep is now known as Outlastsheep
Lamarus has joined #ruby
jackjackdripper has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
shock_one has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
troulouliou_dev has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
atmosx has joined #ruby
BradPitt_ has joined #ruby
makerops_ has quit [Quit: Page closed]
Notte has joined #ruby
Lamarus_ has joined #ruby
Lamarus_ has left #ruby [#ruby]
yardenbar has joined #ruby
shock_one has quit [Remote host closed the connection]
BradPitt_ has quit [Client Quit]
Lamarus is now known as Guest42851
timonv has quit [Ping timeout: 244 seconds]
Guest42851 has quit [Ping timeout: 252 seconds]
BradPitt_ has joined #ruby
<EllisTAA>
what’s warden
mannyt has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
BradPitt_ has quit [Client Quit]
kadoppe has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
BraddPitt has joined #ruby
Matthews_ has joined #ruby
<tuelz>
automatically log a user in? What would be the point of logging in if it's automatic?
<Antiarc>
testing, probably. And check the docs :)
MatthewsFace has quit [Ping timeout: 246 seconds]
kadoppe has joined #ruby
anshu19 has joined #ruby
swgillespie has joined #ruby
lwu has quit [Quit: This computer has gone to sleep]
<EllisTAA>
havenwood: reminds me of bcrypt. is that right?
niiamon has joined #ruby
fabrice31 has joined #ruby
polpak has joined #ruby
lwu_ has joined #ruby
<anshu19>
what is havenwood?
rbowlby has joined #ruby
BraddPitt has quit [Quit: leaving]
felltir has quit []
BraddPitt has joined #ruby
<Antiarc>
warden is a rack middleware for authentication in web apps. It may use bcrypt, but it is not analogous to it
<anshu19>
where can a new user learn ruby from ? the best place ?
mustmodify has joined #ruby
la__ has joined #ruby
<craysiii>
codecademy has a good intro.
<anshu19>
codecademy tells just basics
la__ has quit [Quit: la__]
<craysiii>
hence the word 'intro'
Matthews_ has quit [Remote host closed the connection]
niiamon has quit [Ping timeout: 240 seconds]
EllisTAA has quit [Quit: EllisTAA]
<anshu19>
a friend told me a book "beginning to ruby", is it good?
<craysiii>
no idea.
<craysiii>
the smart thing to do would be to use various sources instead of relying on one
rikkipitt has quit [Remote host closed the connection]
<anshu19>
okay
lampshad_ has quit [Remote host closed the connection]
safeforge has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
<atmosx>
how do you open a berkley-db file in ruby-2.x ?
loc22 has joined #ruby
<atmosx>
nm
pandaant has joined #ruby
MVPhelp has quit [Remote host closed the connection]
mdih has joined #ruby
BraddPitt has quit [Quit: leaving]
MVPhelp has joined #ruby
EllisTAA has joined #ruby
BraddPitt has joined #ruby
renderful has quit []
<EllisTAA>
anshu19: do you need to learn programming? or do you already know how to program?
Notte has quit [Remote host closed the connection]
fenjamin has quit [Ping timeout: 264 seconds]
fenjamin has joined #ruby
rodfersou has quit [Ping timeout: 265 seconds]
<havenwood>
anshu19: I am havenwood. Greetings!
<craysiii>
can i be havenwood too?
zz_barkerd427 has joined #ruby
<havenwood>
craysiii: As a job title, yes.
<havenwood>
craysiii: Just talk to HR.
<EllisTAA>
anshu19: if you know how to code check out codewars, if you don’t know how to program do codeacademy then codewars
<havenwood>
I approve.
anaeem1 has joined #ruby
<havenwood>
EllisTAA: Hem, not same as in doing the same job.
<havenwood>
EllisTAA: (Late reply.)
<anshu19>
i know how to code, and i have learnt basic like class, methods, inheritance, files, etc
<EllisTAA>
i was asking someone yesterday if i need to understand the OS, servers, networks, and middleware if i am trying to get a job as a junior dev, and they said no, do you all agree with this?
erts has joined #ruby
anshu19 has left #ruby [#ruby]
Muhannad has quit [Ping timeout: 255 seconds]
CustosLimen has quit [Ping timeout: 250 seconds]
<shevy>
depends on the job
<craysiii>
junior dev != sysadmin. it certainly wouldn't hurt though
<shevy>
probably if you just churn out websites then you won't need to know everything
<EllisTAA>
shevy: this might sound like i’m not being serious, but developing a website … is the job i want
anaeem1 has quit [Client Quit]
<shevy>
yeah
<Antiarc>
EllisTAA: I don't expect junior devs to know sysadmin stuff, but knowing it is a HUGE plus
<shevy>
I guess it also depends on their cluster; I had to compile stuff in my home dir e. g. to get an up-to-date running ruby
<atmosx>
Is this string convertable to something 'readable' \x9E\xE2\xB8U\x00\x00\x00\x00\xDE\x1A\xB9U\x00\x00\x00\x00\xDE\x1A\xB9U\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00 ?
<Antiarc>
Devs who don't understand the systems they deploy on tend to write bad code, in my experience. It's acceptable for a junior to not know it, but I expect them to learn it. It's not acceptable for a senior dev to not know that stuff.
<atmosx>
comes fron a berkeley db, must an email address or something
Muhannad has joined #ruby
<centrx>
EllisTAA, Related skills are always a plus
<atmosx>
ascii to utf8 maybe
<EllisTAA>
so i broke the web dev job into 6 areas: hardware, system software, servers, coding, design, and git workflow. am i missing anything?
zz_barkerd427 has quit [*.net *.split]
CustosLimen has joined #ruby
<eam>
what's the difference between hardware and servers?
<craysiii>
QA?
<EllisTAA>
application server
<atmosx>
EllisTAA: I have a similar project, you missed mobile dev (through APIs probably)
<atmosx>
lol
rodfersou has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
<Antiarc>
There's a really good web dev competency matrix out there somewhere
<EllisTAA>
atmosx: for sure thanks
<atmosx>
I don't understand the 'system software' part either
yqt has joined #ruby
<EllisTAA>
system software, by that i meant OS
<atmosx>
EllisTAA: A friend of mine has a project that starts from a raspberry pi and ends to a mobile applications (with everything in between except of course a desktop app)
<EllisTAA>
atmosx: sounds cool. link?
<atmosx>
EllisTAA: ah, okay. Maybe operating system would be more self-explainatore (or distribution since 80+ of servers runs some linux flavor).
<atmosx>
EllisTAA: it's vaporware.
sarkyniin has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving]
sarkyniin has joined #ruby
<atmosx>
EllisTAA: Maybe after Sept we'll start working on it. But we've discuss it extensively.
jgpawletko has quit [Quit: jgpawletko]
jenrzzz has joined #ruby
Pumukel has quit [Ping timeout: 256 seconds]
<centrx>
That's a key component of being a programmer - discussing things in meeting
yfeldblum has quit [Ping timeout: 244 seconds]
<EllisTAA>
ok cool. thanks yall
<eam>
centrx: and success means more meetings and less code
<mustmodify>
centrx: Can I quote you on that? I think you have unconvered something profound.
<atmosx>
centrx: hahah meeting, two guys drinking beers discussing shit they never implemented is hardly considered a "meeting" but anyway.
<shevy>
lo
<shevy>
l
<craysiii>
how does one have a meeting with themselves?
<atmosx>
lo0
niiamon has joined #ruby
<shevy>
craysiii have you never met yourself?
fantazo has quit [Ping timeout: 244 seconds]
<atmosx>
craysiii: easy, go run, make some self-assesment in the meantime.
<atmosx>
the mind works better when walking/running
niiamon_ has joined #ruby
<centrx>
atmosx, In fact, the most common type of meeting is where nothing productive comes out of it
<EllisTAA>
atmosx: during that time the mind can engage ‘diffuse thinking'
tubuliferous has quit [Ping timeout: 240 seconds]
<craysiii>
i agree. i do a lot of pacing. but sometimes you need an outside source to bounce ideas off of and to point things out
SCHAAP137 has joined #ruby
rbowlby has quit [Remote host closed the connection]
erts_ has joined #ruby
rbowlby has joined #ruby
BraddPitt has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 246 seconds]
bstrarm has joined #ruby
<mustmodify>
ok, let's see ... ways to call procs... Proc#call, instance_eval( #Proc ), ...
riscky has joined #ruby
<mustmodify>
class_eval apparently
erts has quit [Ping timeout: 240 seconds]
<craysiii>
.() ?
<Ox0dea>
Proc === args
<mustmodify>
.() and []
sinkensabe has joined #ruby
<mustmodify>
that's true.
bustrarm has quit [Ping timeout: 260 seconds]
bronson has quit [Remote host closed the connection]
<mustmodify>
Ways to call Procs with different scopes.
<mustmodify>
() and [] are effectively the same as call, IIRC
nobitanobi has quit [Remote host closed the connection]
<kossae>
I have a question with an ActiveRecord migration, using Sinatra and AR as the ORM. I'm trying to create a MEDIUMBLOB field type, but the code snippets I've seen only mention doing a :binary, :limit => 10.megabyte, which appears to be a rails thing
nobitanobi has joined #ruby
<kossae>
any ideas?
riscky has quit [Quit: riscky]
tenderlove has joined #ruby
niiamon has quit [Quit: Leaving.]
niiamon_ has quit [Remote host closed the connection]
<mustmodify>
so instance_exec works for me but not class_exec, though I see it in some documentation from 1.9.3... was it deprecated / removed?
<Ox0dea>
kossae: You're using ActiveRecord, but not ActiveSupport?
<kossae>
right, should I be using ActiveSupport as well? sorry, I'm used to a boilerplate rails setup and am doing a lightweight project with sinatra, so trying to include as little as possible
<kossae>
also quite new to the ruby/rails community in general
<centrx>
ActiveSupport is useful. In this case, it has Numeric#megabyte
<shevy>
"After several weeks of frustration, where entire days devoted to experimentation had produced no results, I ended up basically adding printf statements to every single line"
<shevy>
this is how I do ruby too!!!
kies has quit [Ping timeout: 244 seconds]
<kossae>
ahh okay, thanks centrx!
<Ox0dea>
kossae: You could just as well use `limit: 10485760` if you don't want to bring in AS.
dorei has quit []
loc22_ has joined #ruby
BraddPitt has joined #ruby
<kossae>
ah okay, is AS basically helper functions for AR stuff?
<miah>
shevy: this is where mutation testing is useful
<kossae>
wondering if I may need to use anything else from it going foward
<Ox0dea>
kossae: It adds convenience methods on everything.
<shevy>
miah mutation testing? Will I become like the Hulk??
<miah>
lol
casadei_ has quit [Remote host closed the connection]
khebbie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has quit [Remote host closed the connection]
loc22 has quit [Read error: Connection reset by peer]
<mustmodify>
and am I also correct in thinking that if I did, I could pass in a context and a proc? Because that would be great.
<shevy>
I dig the japanese explanation
<craysiii>
me too, though i dont know what it means.
Scriptonaut has joined #ruby
<craysiii>
i just like the pretty lines.
<shevy>
hehe
<Ox0dea>
mustmodify: It is the case that Ruby doesn't expose that function, but you could surely get at it via FFI.
<Ox0dea>
コンテキスト = kontekisuto = context
<mustmodify>
I want to call a Proc and pass in a context... is that a thing? Or are the only options to run in the calling context or the definition context?
schaerli has joined #ruby
<Ox0dea>
mustmodify: Do you know about Binding?
<mustmodify>
I guess it depends on the context.
<mustmodify>
lol
<mustmodify>
I'm not sure what you're asking.
<Ox0dea>
Binding, the Ruby class.
MatthewsFace has joined #ruby
schaerli has quit [Remote host closed the connection]
Jackneill has quit [Read error: Connection reset by peer]
bodgix has left #ruby [#ruby]
<mustmodify>
Hm, no, I don't think so.
<mustmodify>
Sounds familiar.
<dfockler>
Binding, the Ruby Musical
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rdark has quit [Ping timeout: 240 seconds]
<Ox0dea>
mustmodify: You'll have to clarify how exactly you're using "context", but finagling with Binding (or perhaps even binding_of_caller, if you're doing something really crazy) should get you there.
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
bstrrm has joined #ruby
<mustmodify>
Wow, that's great. That's exactly what I wanted.
tenderlove has joined #ruby
Igorshp has joined #ruby
rdark has joined #ruby
dimasg has joined #ruby
Blaguvest has joined #ruby
B1n4r10 has quit [Remote host closed the connection]
<mustmodify>
Any thoughts on why binding() private?
bstrarm has quit [Ping timeout: 244 seconds]
Notte has joined #ruby
<mustmodify>
seems like the kind of method that was written specifically to be used by outside callers.
loc22_ has quit [Quit: Be back later ...]
Outlastsheep is now known as zz_Outlastsheep
<mustmodify>
So wait, you can only use Binding with a string, you can't use it on a Proc?
<mustmodify>
That's interesting.
nobitanobi has quit [Remote host closed the connection]
leesharma has quit [Ping timeout: 246 seconds]
havenwood has quit [Read error: Connection reset by peer]
ramfjord has quit [Quit: Lost terminal]
kies has joined #ruby
<drbrain>
you can instance_exec
<drbrain>
(but I haven't been following enough to know if that will do what you need)
mleung has quit [Quit: mleung]
tenderlove has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
<mustmodify>
drbrain: I have a DSL and I'd like to separate helper methods from the class that has the "this is how a DSL works" logic.
_blizzy_ has joined #ruby
piotrj has quit [Remote host closed the connection]
<mustmodify>
I can always include a module, but I just thought it would be cool to do proc.call(parameters, binding)
<mustmodify>
or
<mustmodify>
Proc.call( proc, params, binding)
<mustmodify>
or ...
<mustmodify>
whatever
anisha has joined #ruby
<dfockler>
how do you truncate a float to a specific precision in ruby?
Zai00 has joined #ruby
<ytti>
#round
doodleha_ has joined #ruby
<craysiii>
dfockler is it just for display or for calculation
<dfockler>
for calculation
nkts has quit [Ping timeout: 240 seconds]
<dfockler>
#round rounds up after the specified precision
lwu_ has quit [Quit: This computer has gone to sleep]
<dfockler>
craysiii: thanks, I just found basically this method
dimasg has quit [Ping timeout: 260 seconds]
nahtnam has joined #ruby
<craysiii>
haha i was just messin around in irb.
jobewan has quit [Ping timeout: 255 seconds]
rsc___ has quit [Quit: rsc___]
christiandsg has quit [Ping timeout: 265 seconds]
leesharma has joined #ruby
allomov has quit [Remote host closed the connection]
loc22_ has quit [Client Quit]
curses has quit [Ping timeout: 265 seconds]
tenderlove has quit [Ping timeout: 256 seconds]
piotrj has quit [Remote host closed the connection]
kies has joined #ruby
freeze has quit [Ping timeout: 255 seconds]
khebbie has joined #ruby
khebbie_ has joined #ruby
phutchins has joined #ruby
tenderlove has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Remote host closed the connection]
EllisTAA has joined #ruby
<craysiii>
dfockler why wouldn't you want the rounded number though? wouldn't it be more accurate in terms of your calculation results than a simple truncate?
shinnya has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
<dfockler>
it's for a codewars challenge :P
<craysiii>
ohhh okay :)
<dfockler>
but now I'm getting NaN values
<craysiii>
i was going to start doing codewars myself
aryaching has joined #ruby
iszak has quit [Quit: Lost terminal]
Muhannad has quit [Ping timeout: 260 seconds]
dgutierrez1287 has joined #ruby
<craysiii>
do they give you the example which resulted in NaN
<dfockler>
nope
sepp2k has quit [Read error: Connection reset by peer]
<craysiii>
is the input guaranteed to be a float?
<dfockler>
I'm assuming it's an int
iszak has joined #ruby
iszak has quit [Changing host]
iszak has joined #ruby
<dfockler>
but it's going so high that I end up with a bignum which can't divide like normal
curses has joined #ruby
<dfockler>
nvm that's not true
dgutierrez1287 has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
juanpablo______ has joined #ruby
<craysiii>
hm
doodleha_ has quit [Remote host closed the connection]
Helheim has quit [Ping timeout: 260 seconds]
erts_ has joined #ruby
juanpablo_____ has quit [Ping timeout: 256 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Remote host closed the connection]
GeissT has joined #ruby
freeze has quit [Ping timeout: 244 seconds]
juanpablo______ has quit [Ping timeout: 246 seconds]
juanpablo______ has joined #ruby
freeze has joined #ruby
mandarinkin has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
bootstrappm has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arturmartins has joined #ruby
poguez_ has joined #ruby
<aaeron>
@jhass: can u provide me an example if possible.
juanpablo______ has quit [Ping timeout: 240 seconds]
<aaeron>
They dont have any proper examples on how to use it
<aaeron>
I did what he says and it does not mock
drewo has quit [Ping timeout: 252 seconds]
<jhass>
oh, sorry adaedra, weechat tricked me by assigning the same color to a similar length nick with same starting letter :/
<jhass>
aaeron: no, never used it myself, but the readme appears to be fairly extensive
<aaeron>
@jhass: I'll look into it and update. Thanks
pengin has quit [Remote host closed the connection]
freeze has quit [Ping timeout: 246 seconds]
rbowlby has joined #ruby
pengin has joined #ruby
freeze has joined #ruby
leesharma has quit [Ping timeout: 246 seconds]
_blizzy_ has joined #ruby
<zenspider>
aaeron: design it so you can hand it a StringIO. Or don't worry about it. Since you haven't measured the performance impact, you don't have a problem yet.
pietr0_ has quit [Quit: pietr0_]
fenjamin has quit [Ping timeout: 256 seconds]
PotatoCrisps has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
leesharma has joined #ruby
rbowlby_ has quit [Ping timeout: 250 seconds]
werelivinginthef has joined #ruby
Rickmasta has joined #ruby
segfalt has quit [Quit: segfalt]
MVPhelp has quit [Ping timeout: 256 seconds]
MVPhelp has joined #ruby
godd2 has joined #ruby
swgillespie has joined #ruby
mdih has quit [Ping timeout: 256 seconds]
chipotle has joined #ruby
freeze has quit [Ping timeout: 255 seconds]
drewo has joined #ruby
freeze has joined #ruby
CloCkWeRX has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
unclouded has quit [Read error: Connection reset by peer]
arooni-mobile has quit [Ping timeout: 244 seconds]