apeiros changed the topic of #ruby-lang to: Ruby 2.1.4; 2.0.0-p594; 1.9.3-p550: http://ruby-lang.org || Paste code on http://gist.github.com
brnorion has quit [Ping timeout: 244 seconds]
allomov has quit [Remote host closed the connection]
brnorion has joined #ruby-lang
jimbach has joined #ruby-lang
brnorion has quit [Ping timeout: 250 seconds]
apeiros has quit [Remote host closed the connection]
surrounder has quit [Ping timeout: 265 seconds]
apeiros has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
amsha has joined #ruby-lang
yfeldblum has quit [Ping timeout: 244 seconds]
shinnya has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
araujo has quit [Ping timeout: 245 seconds]
araujo has joined #ruby-lang
surrounder has joined #ruby-lang
snsei has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
snsei has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
nathanstitt has joined #ruby-lang
tkuchiki has joined #ruby-lang
snsei has joined #ruby-lang
jimbach has joined #ruby-lang
mattyohe has joined #ruby-lang
yusuf has joined #ruby-lang
tkuchiki has quit [Ping timeout: 244 seconds]
marr has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
caseypatrickdris has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
snovity has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
caseypatrickdris is now known as caseydriscoll
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
rkowalick has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
rickyrickyrice has joined #ruby-lang
rkowalick has quit [Quit: leaving]
snsei has joined #ruby-lang
jmrepetti has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
JoshuaPaling has quit [Client Quit]
snsei has joined #ruby-lang
jimbach has joined #ruby-lang
snsei has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
araujo has quit [Quit: Leaving]
g0bl1n has quit [Ping timeout: 245 seconds]
jimbach has quit [Remote host closed the connection]
arooni-mobile has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
qw3r has joined #ruby-lang
GaelanAintAround has quit [Quit: Bye!]
zz_dlu has quit [Quit: ZNC - http://znc.in]
imperator has joined #ruby-lang
GaelanAintAround has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
zz_dlu has joined #ruby-lang
cleopatra has quit [Remote host closed the connection]
acalewin has quit [Ping timeout: 272 seconds]
Paradox has quit [Ping timeout: 265 seconds]
cleopatra has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby-lang
cantonic has quit [Client Quit]
Lewix has joined #ruby-lang
Lewix has quit [Read error: Connection reset by peer]
mattyohe has quit [Quit: Connection closed for inactivity]
<epitron> has anyone here ever tried reading NTFS Alternate Data Streams in ruby before?
<epitron> i'm having a problem opening the stream -- it looks like ruby is checks to see if the file exists before opening it
<epitron> (all you do is open a file called "filename:stream" and read/write from/to it)
<epitron> -is
<banister> epitron what're you working on?
<epitron> porting my xattr printer to windows
<epitron> i couldn't find a decent one
<epitron> ok, it turns out it's a POSIX compatability layer issue (cygwin/mingw)
rickyrickyrice has quit [Remote host closed the connection]
<epitron> cygwin removed the ability to put :'s in filenames
ahmetkapikiran has quit [Ping timeout: 265 seconds]
rcvalle has quit [Quit: rcvalle]
rickyrickyrice has joined #ruby-lang
acalewin has joined #ruby-lang
Paradox has joined #ruby-lang
rickyrickyrice has quit [Remote host closed the connection]
<epitron> err, cygwin-only
<epitron> mingw works
<epitron> guess i can use win32/api or dlopen to do some direct system calls :(
mattyohe has joined #ruby-lang
<bnagy> do you really mean system calls?
<bnagy> because you won't be able to do that with those
<bnagy> also, imho, FFI is a lot easier to work with for windows native api stuff
dorei has quit []
<imperator> epitron, if you just need to read, there's win32-nio
cleopatra has quit [Read error: Connection reset by peer]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron> all i need is a file open method that won't try to mangle the ":" in the filename
<epitron> bnagy: what do you call the windows API calls?
<bnagy> windows API calls
<epitron> and those are not system calls?
mistym has joined #ruby-lang
<bnagy> syscalls are specifically the bridge between userland and kernel
ahmetkapikiran has joined #ruby-lang
<epitron> isn't accessing the filesystem part of the kernel?
<bnagy> they're performed by specific undocumented dlls like ntdll
<bnagy> ntdll sometimes referred to as the native api, but ntdll calls are still api calls
<imperator> epitron, File.open("test.txt:stream") worked for me, or do you mean in a cygwin shell?
<bnagy> anyway then all of those NtXxxxCall or ZYyyacll or whatever make syscalls
<epitron> imperator: i'm using cygwin ruby :\
<epitron> works with mingw ruby
<imperator> what fer?
<bnagy> but they all go through one syscall gate, and a number gets filled in
<epitron> imperator: 2.0.0p576
<epitron> the problem is in cygwin's posix emulation though, not ruby
<imperator> so...don't use cygwin?
<bnagy> windows is 'unusual' in that on *nix people are used to being able to make certain syscalls directly
<epitron> bnagy: so you're saying that there's lots of middleware between your OpenFile function and the kernel? :)
<bnagy> you _can_ actually make genuine syscalls from ruby but it's a PITA and you need to create an asm stub
<epitron> well, all i need is some kind of non-cygwin "read from file" function
<bnagy> all I'm saying is that syscalls are syscalls, and it's not semantics or 'terminology'
<epitron> i guess i could popen more.exe
<bnagy> which is what you seemed to be implying
<bnagy> anyway, end of lecture, time for gym :)
<epitron> bnagy: i was trying to make sure i understood what you were saying
<epitron> otherwise, i'll have learned nothing!
<epitron> your lecture will have been for naught!
<bnagy> the x64 version 'works' but I am suspicious about some of my arg handling tbh
<epitron> oh yeah, also, i can't build ffi \o/
<bnagy> if you ever need any of that IRL you're probably doing something Very Unusual, it's just fyi
<epitron> i'll star it just in case :)
<imperator> can't build ffi? why not?
<epitron> .gem/ruby/gems/ffi-1.9.6/ext/ffi_c/Call.c:294: undefined reference to `ffi_call'
caseydriscoll has quit [Remote host closed the connection]
<epitron> lol
<epitron> this is insane
<epitron> i'm just going to port this to python
<epitron> i'm not going to patch FFI on every windows machine when i want to show xattrs
red_menace has quit []
<epitron> thank you for your help imperator!
<epitron> i have learned some interesting things about win32/cygwin
<imperator> ok, sorry we didn't have a nicer solution
<epitron> i blame cygwin
<epitron> you guys are heroessss
avishastry has joined #ruby-lang
gorsuch has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
ledestin_ has joined #ruby-lang
ledestin has quit [Ping timeout: 250 seconds]
ledestin_ is now known as ledestin
hramrach_ has joined #ruby-lang
SuMo_D has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
cleopatra has joined #ruby-lang
djbkd_ has quit [Quit: Leaving...]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nathanstitt has quit [Quit: I growing sleepy]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 258 seconds]
hightower4 has quit [Ping timeout: 272 seconds]
gix has quit [Ping timeout: 245 seconds]
amsha has quit [Quit: Be back later ...]
mistym has quit [Remote host closed the connection]
kalehv has joined #ruby-lang
gix has joined #ruby-lang
kyb3r_ has joined #ruby-lang
<imperator> i should modify win32-file-stat so it shows stream info
michaeldeol has joined #ruby-lang
rickyrickyrice has joined #ruby-lang
banister has joined #ruby-lang
gianlucadv has joined #ruby-lang
rickyrickyrice has quit [Ping timeout: 255 seconds]
kalehv has quit [Remote host closed the connection]
sunaku has quit [Ping timeout: 256 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
imperator has quit [Quit: Valete!]
snsei has joined #ruby-lang
hightower4 has joined #ruby-lang
snsei has quit [Ping timeout: 264 seconds]
avishastry has quit [Quit: avishastry]
rickyrickyrice has joined #ruby-lang
rickyrickyrice has quit []
mistym has joined #ruby-lang
<epitron> that would be pretty nifty
<epitron> (since it requires API calls to get the names of the alternate streams)
hahuang61 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 260 seconds]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblu_ has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
<bnagy> epitron: re FFI, what ruby are you trying to use? I have good results with the new rubyinstaller ( MRI ) and jruby now, even on x64
<bnagy> haven't used cygwin bullshit for years now
<epitron> i really like having a real commandline
<epitron> with working unix tools
<bnagy> yeah, you just think you do
<bnagy> learn powershell :)
<epitron> pfft :)
<epitron> if i used windows more than once per month, i'd do that
<bnagy> anyway, nobody _uses_ windows, that's crazy. You just need your code to run on it
<epitron> yep
<bnagy> anyway, having what appears to be proper unix tools and yet are actually waiting patiently to trick you and destroy your sanity is < just using rubyinstall and cmd.exe imho
<epitron> i have a large collection of scripts that i use for day-to-day file operations that i can't live without
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
<epitron> i prefer the occasional cygwin hiccup to having nothing
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby-lang
michaeldeol has joined #ruby-lang
clauswit_ has quit [Max SendQ exceeded]
yfeldblum has quit [Remote host closed the connection]
clauswitt has joined #ruby-lang
yfeldblum has joined #ruby-lang
gianlucadv has quit [Ping timeout: 265 seconds]
clauswitt has quit [Max SendQ exceeded]
clauswitt has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vieq has quit [Ping timeout: 256 seconds]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
RobertBirnie has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
vieq has joined #ruby-lang
amsha has joined #ruby-lang
amsha has quit [Ping timeout: 250 seconds]
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
mark_slight has joined #ruby-lang
voxxit has joined #ruby-lang
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AKASkip has quit [Ping timeout: 258 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
apeiros has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
oleo has quit [Quit: Verlassend]
jmrepetti has joined #ruby-lang
miqui_ has joined #ruby-lang
rahul_j has joined #ruby-lang
kaczmar has joined #ruby-lang
ledestin_ has joined #ruby-lang
rippa has joined #ruby-lang
ledestin has quit [Ping timeout: 265 seconds]
ledestin_ is now known as ledestin
mark_slight has quit [Quit: mark_slight]
Forgetful_Lion has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
miqui has quit [Read error: Connection reset by peer]
SuMo_D has quit [Ping timeout: 272 seconds]
chinmay_dd_ has joined #ruby-lang
miqui_ has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
solars has joined #ruby-lang
allomov has joined #ruby-lang
pr0ton_ has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 1.0.1]
mamantoha has joined #ruby-lang
JohnBat26 has joined #ruby-lang
pnbeast has quit [Quit: leaving]
qba73 has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clauswitt has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
amsha has joined #ruby-lang
rahul_j has joined #ruby-lang
clauswitt has quit [Client Quit]
mistym has quit [Remote host closed the connection]
amsha has quit [Ping timeout: 272 seconds]
RitterJack has joined #ruby-lang
futilegames has joined #ruby-lang
futilegames has quit [Client Quit]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
apeiros has joined #ruby-lang
oak has quit [Ping timeout: 265 seconds]
muskalek has quit [Ping timeout: 245 seconds]
qba73 has quit []
rahul_j has quit [Ping timeout: 264 seconds]
kaczmar has quit [Quit: kaczmar]
rahul_j has joined #ruby-lang
vondruch has joined #ruby-lang
clauswitt has joined #ruby-lang
muskalek has joined #ruby-lang
clauswitt has quit [Max SendQ exceeded]
nofxx has quit [Ping timeout: 265 seconds]
clauswitt has joined #ruby-lang
michael_mbp has quit [Excess Flood]
clauswitt has quit [Max SendQ exceeded]
benlovell has joined #ruby-lang
Kabaka has quit [Ping timeout: 245 seconds]
clauswitt has joined #ruby-lang
michael_mbp has joined #ruby-lang
clauswitt has quit [Max SendQ exceeded]
kyb3r_ has quit [Read error: Connection reset by peer]
clauswitt has joined #ruby-lang
clauswitt has quit [Max SendQ exceeded]
allomov has quit [Remote host closed the connection]
clauswitt has joined #ruby-lang
allomov has joined #ruby-lang
pr0ton_ has quit [Quit: pr0ton_]
AKASkip has joined #ruby-lang
allomov has quit [Remote host closed the connection]
mark_slight has joined #ruby-lang
GBrawl has joined #ruby-lang
allomov has joined #ruby-lang
kaczmar has joined #ruby-lang
clauswit_ has joined #ruby-lang
clauswitt has quit [Ping timeout: 250 seconds]
GBrawl has quit [Quit: (null)]
snovity has joined #ruby-lang
michd is now known as MichD
RitterJack has quit [Ping timeout: 255 seconds]
face has joined #ruby-lang
faces has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
<yorickpeterse> morning
GBrawl has joined #ruby-lang
tbuehlmann has joined #ruby-lang
GBrawl has quit [Client Quit]
RitterJack has joined #ruby-lang
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
marr has joined #ruby-lang
mark_slight has quit [Read error: No route to host]
kaczmar has quit [Quit: kaczmar]
yfeldblu_ has joined #ruby-lang
alvadorn has joined #ruby-lang
vuwon has joined #ruby-lang
alvadorn has quit [Client Quit]
vuwon has quit [Client Quit]
yfeldblu_ has quit [Ping timeout: 255 seconds]
arBmind1 has quit [Quit: Leaving.]
workmad3 has joined #ruby-lang
amsha has joined #ruby-lang
mikecmpbll has joined #ruby-lang
amsha has quit [Ping timeout: 256 seconds]
skade has joined #ruby-lang
kaczmar has joined #ruby-lang
jmrepetti has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
jmrepetti has joined #ruby-lang
stamina has joined #ruby-lang
allomov has quit [Remote host closed the connection]
banister has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
rahul_j has joined #ruby-lang
tkuchiki has quit [Ping timeout: 255 seconds]
muskalek has quit [Ping timeout: 244 seconds]
<ljarvis> moin
siwica1 has joined #ruby-lang
siwica has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby-lang
ldnunes has joined #ruby-lang
yfeldblum has quit [Ping timeout: 258 seconds]
muskalek has joined #ruby-lang
allomov has joined #ruby-lang
<yorickpeterse> "hm why does this thing not start on rbx"
<yorickpeterse> "RELEASE_RUBY_VERSION: ruby-2.1"
<yorickpeterse> durrr Mondays
caseydriscoll has joined #ruby-lang
<ljarvis> durrrr everyday*
<ljarvis> i received an excel spreadsheet for a certification process, and the mac client doesn't support macros so it's broken #macproblems
jds has joined #ruby-lang
<yorickpeterse> well you already failed the certification it seems
<workmad3> ljarvis: is it a certification process for something mac-based? :)
<ljarvis> no :)
ledestin has quit [Ping timeout: 245 seconds]
<workmad3> ljarvis: no excuse then... boot up your favourite malware-OS and run it properly! :P
<yorickpeterse> "Re: Certified Windows Developer Training"
<ljarvis> aye :(
<yorickpeterse> "Body: I'm on a Mac"
<ljarvis> I don't have anything to run windows either
<ljarvis> so maybe I just tell them I'll forward everything in text files
<workmad3> ljarvis: you have a mac, which should be capable of running virtualbox? :P
mamantoha has quit [Ping timeout: 260 seconds]
<ljarvis> I guess, i'm already tired of just thinking about what I'll need to go to get up and running just to open a file
<workmad3> :)
<yorickpeterse> ljarvis: well you need to double click, then clap your hands, then update your anti-virus software
<yorickpeterse> Then you need to reboot because Windows Update tells you to
<yorickpeterse> well what teh fuck is this, this one app is running without any errors so far
<yorickpeterse> I expected errors due to https://github.com/aws/aws-sdk-ruby/issues/455
<yorickpeterse> interesting
ledestin has joined #ruby-lang
benlovell has quit [Ping timeout: 258 seconds]
dagda1 has joined #ruby-lang
clauswit_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> (most likely, not sure yet)
Kabaka has joined #ruby-lang
clauswitt has joined #ruby-lang
kaczmar has quit [Quit: kaczmar]
clauswitt has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby-lang
rahul_j has quit [Ping timeout: 265 seconds]
kaczmar has joined #ruby-lang
spuk has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby-lang
benlovell has joined #ruby-lang
banister has joined #ruby-lang
clauswitt has joined #ruby-lang
devPunk has joined #ruby-lang
rahul_j has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
spuk has joined #ruby-lang
mamantoha has joined #ruby-lang
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cornerma1 has joined #ruby-lang
cornerman has quit [Read error: Connection reset by peer]
cornerma1 is now known as cornerman
amsha has joined #ruby-lang
rahul_j has left #ruby-lang [#ruby-lang]
proxima has joined #ruby-lang
<proxima> I want to uninstall bundler from ubuntu 14.04
justinmcp has joined #ruby-lang
<proxima> So I executed : gem uninstall bundler
<proxima> and gem list | cut -d" " -f1 | xargs gem uninstall -aIx
amsha has quit [Ping timeout: 240 seconds]
<proxima> but still after this on typing bundle --version , it gives Bundler version 1.3.5
<proxima> So, how can I uninstall it completely?
<ljarvis> proxima: where is it? `which bundle`
<proxima> ljarvis: I could not get you?
<ljarvis> proxima: run `which bundle` to find out where it's being executed from
<proxima> usr/bin/bundle
<ljarvis> that's why
<ljarvis> it's not managed by rubygems
workmad3 is now known as wm3|busy
<ljarvis> so maybe it's been installed by apt
<proxima> So shall I delete it..Oh
<ljarvis> I'd check and purge it from apt
<ljarvis> with*
<ljarvis> then install ruby using a package manager that isn't apt
<proxima> will doing that remove this one?
<ljarvis> you need to remove that yourself, using apt probably
<proxima> but I had installed ruby with package only
x0f has quit [Ping timeout: 265 seconds]
x0f has joined #ruby-lang
devPunk1 has joined #ruby-lang
devPunk has quit [Read error: Connection reset by peer]
devPunk has joined #ruby-lang
devPunk1 has quit [Read error: Connection reset by peer]
jmrepetti has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
yusuf has quit [Quit: Leaving.]
spastorino has joined #ruby-lang
<proxima> thanks ljarvis
kaczmar has quit [Quit: kaczmar]
Guest7 has joined #ruby-lang
Xzanron has joined #ruby-lang
devPunk has quit [Quit: Leaving.]
Xzanron has quit [Quit: Leaving]
Xzanron has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ledestin has quit [Read error: Connection reset by peer]
ledestin has joined #ruby-lang
yfeldblum has joined #ruby-lang
dangerousdave has joined #ruby-lang
ledestin has quit [Ping timeout: 244 seconds]
proxima has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 258 seconds]
ledestin has joined #ruby-lang
cantonic has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
skade has joined #ruby-lang
lele|w has quit [Remote host closed the connection]
hinbody has joined #ruby-lang
arBmind1 has joined #ruby-lang
benlovell has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Squarepy has joined #ruby-lang
Squarepy has quit [Max SendQ exceeded]
dangerousdave has joined #ruby-lang
anjen has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
lguardiola_ has quit [Quit: ZNC - http://znc.in]
kurko__ has joined #ruby-lang
a1digital has joined #ruby-lang
stamina has quit [Quit: WeeChat 1.0.1]
anjen has quit [Quit: anjen]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby-lang
[spoiler] has joined #ruby-lang
yfeldblum has quit [Ping timeout: 258 seconds]
dangerousdave has joined #ruby-lang
dangerousdave has quit [Client Quit]
sepp2k has joined #ruby-lang
amsha has joined #ruby-lang
lele|w has joined #ruby-lang
chouhoulis has joined #ruby-lang
amsha has quit [Ping timeout: 250 seconds]
chouhoul_ has joined #ruby-lang
jonuts has joined #ruby-lang
chouhoulis has quit [Ping timeout: 260 seconds]
crankharder has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 1.0.1]
<maloik> long shot, but does anyone happen to know if it's possible to make kramdown turn codeblocks (using ```) into <code><pre></pre></code> instead of just the code element?
<maloik> standard bootstrap markup requires the pre element for proper formatting
momomomomo has joined #ruby-lang
<apeiros> you could post-process it with nokogiri
<yorickpeterse> maloik: you can extend the parser
<yorickpeterse> Also, Kramdown already does that
<yorickpeterse> at least when you use CodeRay by the looks of it
<darix> maloik: how about just setting up <code> to render it in a way you want?
<yorickpeterse> you get something like .CodeRay -> .code pre code
jmrepetti has joined #ruby-lang
<maloik> darix: that's pretty much my question :P
<maloik> oh you mean the css?
<darix> yes css
<maloik> mostly because of maintainability
<maloik> I don't want to touch the css unless I REALLY have to
<darix> you can just overwrite it locally
<darix> code { display: block; }
<darix> should do it
<maloik> what? that makes no sense :) that's not the problem at all
<darix> what is?
dwknoxy has joined #ruby-lang
<maloik> bootstrap (and our custom "theme" for it) applies styles to both code and pre elements, and in this case I want pre inside of the code element when turning the markdown file into html
Guest7 has quit [Quit: Textual IRC Client: www.textualapp.com]
godd2 has quit [Ping timeout: 245 seconds]
<darix> maloik: but you dont need a pre there.
<maloik> so I'm thinking postprocessing the output is easiest here
<maloik> yes I do
<darix> just to apply css
<maloik> wat
<maloik> that's not a call you can make without seeing the css right? :P
mbr has joined #ruby-lang
<darix> i am sure you can manage to add additional selectors.
<maloik> sure, but that's not a good solution
ta has quit [Ping timeout: 272 seconds]
shinnya has joined #ruby-lang
MichD has left #ruby-lang ["WeeChat 0.4.2"]
benlovell has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
ta has joined #ruby-lang
jmrepetti has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has joined #ruby-lang
jgpawletko has joined #ruby-lang
lguardiola has joined #ruby-lang
allomov has quit [Remote host closed the connection]
ruby-lang856 has joined #ruby-lang
allomov has joined #ruby-lang
araujo has joined #ruby-lang
miqui has joined #ruby-lang
SuMo_D has joined #ruby-lang
Sunlorhic has joined #ruby-lang
mattyohe has joined #ruby-lang
oleo has joined #ruby-lang
yfeldblum has joined #ruby-lang
seank__ has quit []
ruby-lang856 has quit [Ping timeout: 246 seconds]
a1digital has quit [Quit: a1digital]
yfeldblum has quit [Ping timeout: 250 seconds]
vladgh has joined #ruby-lang
jmrepetti has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
chinmay_dd_ has quit [Quit: Leaving]
malconis has joined #ruby-lang
seank_ has joined #ruby-lang
imperator has joined #ruby-lang
<imperator> Grettings Programs!
j2p2 has joined #ruby-lang
mirageglobe has joined #ruby-lang
momomomomo has quit [Ping timeout: 265 seconds]
AKASkip has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby-lang
<yorickpeterse> bleep bloop
j2p2 has quit [Ping timeout: 264 seconds]
cantonic has quit [Quit: cantonic]
j2p2 has joined #ruby-lang
cantonic has joined #ruby-lang
banister has joined #ruby-lang
Sunlorhic has quit [Ping timeout: 264 seconds]
hinbody has quit [Quit: leaving]
<yorickpeterse> "ArgumentError: A copy of ActiveRecord::PredicateBuilder has been removed from the module tree but is still active!"
<yorickpeterse> what the fuck
hinbody has joined #ruby-lang
Xzanron has quit [Quit: Leaving]
kaczmar has joined #ruby-lang
<yorickpeterse> ughhh I need to get rid of ActiveRecord
<ljarvis> what's that to do with AR?
gss has joined #ruby-lang
bradland has joined #ruby-lang
<yorickpeterse> this particular project uses AR
<yorickpeterse> which uses AS
<yorickpeterse> basically I need to get rid of Active*
<bradland> Opinions on `Signal::trap` vs `rescue Interrupt` for handling SIGINT in Ruby shell scripts? Are my sentiments here accurate? https://gist.github.com/bradland/08a0ffa3d92674556a13
benlovell has joined #ruby-lang
<imperator> bradland, gem install file-tail
<bradland> imperator: this is just an example.
<bradland> would normally use to trap some long running process.
clauswitt has quit [Ping timeout: 245 seconds]
jimbach has joined #ruby-lang
<imperator> i think it's fine either way for tiny programs like that, though in practice you'll typically use trap
<imperator> saves you the trouble of wrapping the whole thing in begin/rescue block
snsei has joined #ruby-lang
ta has quit [Ping timeout: 264 seconds]
jonuts has quit [Quit: WeeChat 1.0.1]
<bradland> my rule of thumb has been: prefer rescue blocks in libraries, but Signal::trap is fine in executables.
diegoviola has joined #ruby-lang
<ljarvis> bradland: your comments sum it up fine
ta has joined #ruby-lang
<bradland> excellent article!
<bradland> thanks for that
momomomomo has quit [Ping timeout: 272 seconds]
g0bl1n has joined #ruby-lang
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby-lang
nathanstitt has joined #ruby-lang
mirageglobe has quit []
momomomomo has joined #ruby-lang
momomomomo_ has joined #ruby-lang
Aova has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 256 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #ruby-lang
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
enebo has joined #ruby-lang
enebo has quit [Client Quit]
bantic has joined #ruby-lang
cantonic has quit [Quit: cantonic]
SuMo_D has joined #ruby-lang
enebo has joined #ruby-lang
cantonic has joined #ruby-lang
snsei has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby-lang
Miphix has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 256 seconds]
GBrawl has joined #ruby-lang
gss has quit []
tenderlove has joined #ruby-lang
GBrawl has quit [Quit: (null)]
arrubin has joined #ruby-lang
GBrawl has joined #ruby-lang
GBrawl has quit [Client Quit]
mistym has joined #ruby-lang
GBrawl has joined #ruby-lang
Miphix has joined #ruby-lang
whippythellama has joined #ruby-lang
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
<[spoiler]> why are nibbles not called hexytes or something
mistym has quit [Remote host closed the connection]
chinmay_dd has joined #ruby-lang
<ohsix> probably because the meaning of 'nibble'
mcclurmc has joined #ruby-lang
caseydriscoll has joined #ruby-lang
<yorickpeterse> "4 Hours Of Emotional Music" Thanks Youtube, just what I needed
<yorickpeterse> because dealing with Ruby and thread-safety is so much easier with that kind of music
qw3r has quit [Remote host closed the connection]
dabradley has quit [Quit: WeeChat 0.3.8]
dabradley has joined #ruby-lang
Sunlorhic has joined #ruby-lang
<j2p2> lol
<j2p2> alas, poor yorick
<yorickpeterse> hurr hurr
<j2p2> :D
<darix> yorickpeterse: why do i have the feeling that threads and threadsafety is a pain in any language?:p
amsha has joined #ruby-lang
amsha has quit [Read error: Connection reset by peer]
amsha has joined #ruby-lang
<apeiros> [spoiler]: because there's nothing inherently hex-y about them. hex is just one way to represent the nibble of an 8bit byte
<[spoiler]> apeiros, but a nibble can hold 0-15 values (which is 0-F, which is hexadeximal, and hexyte sounds cool as fuck)
<apeiros> darix: naaah, there are languages which don't have threads :-D
<darix> apeiros: lol
<apeiros> (php, js, …)
<apeiros> I'll be very scared when php introduces threads
mistym has joined #ruby-lang
* apeiros off, laters!
mamantoha has quit [Ping timeout: 255 seconds]
apeiros has quit [Ping timeout: 250 seconds]
__butch__ has joined #ruby-lang
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
<yorickpeterse> darix: haha, php and threads
<bradland> [spoiler]: byte is a homonym for bite (as in take a bite of a sandwich). a nibble is a small bite.
<darix> yorickpeterse: i just wanted to ruin apeiros' night ;)
<[spoiler]> bradland, I understand the correlation, but hexyte just sounds cooler :P
<bradland> yeah, but it doesn’t make any sense
<[spoiler]> nor does a nibble
<bradland> and 0-15 is not “hex”. hex is base-16, which is one possible way to represent quantity.
<[spoiler]> yes, but base16 covers digits in the range of values 0-15, no?
<bradland> base16 covers all possible values, as does base2, base10, and every other positional numerical system.
<[spoiler]> I said digits
<bradland> a nibble is no more a hexyte than a byte is a hexyte.
<[spoiler]> yes, but 1 nibble can hold values 1-15
joast has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
misterbean has joined #ruby-lang
|jemc| has joined #ruby-lang
SuMo_D has quit [Ping timeout: 272 seconds]
centrx has joined #ruby-lang
kaczmar has quit [Quit: kaczmar]
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
cmhobbs has joined #ruby-lang
imkmf has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
nertzy has joined #ruby-lang
misterbean has quit [Quit: Page closed]
caseydriscoll has quit [Remote host closed the connection]
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
symm- has joined #ruby-lang
AKASkip has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
imperator has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
loincloth has joined #ruby-lang
ahmetkapikiran has joined #ruby-lang
SuMo_D has joined #ruby-lang
SuMo_D has joined #ruby-lang
haxxtivist has joined #ruby-lang
<haxxtivist> Hello, people!
allomov_ has joined #ruby-lang
<jhass> hi
xwq17 has quit [Ping timeout: 256 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
allomov has quit [Ping timeout: 240 seconds]
caseydriscoll has joined #ruby-lang
mistym has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 265 seconds]
havenwood has joined #ruby-lang
muskalek has quit [Ping timeout: 255 seconds]
benlovell has quit [Ping timeout: 245 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<haxxtivist> Anyone wanna help me with installing rails on arch?
<centrx> gem install rails
<haxxtivist> Didn't seem to work.
<haxxtivist> :(
<haxxtivist> Trying to install from AUR now, but I'm in an infinite loop of pressing y lol
<centrx> What didn't work with gem install
<centrx> is there an error message
<haxxtivist> It said it installed successfully
<haxxtivist> added it to the PATH
<haxxtivist> then says rails isn't a command
<centrx> oh you may want to use bundler
<haxxtivist> ?
<centrx> but that is odd, it should be there
<haxxtivist> hm.
<haxxtivist> I exited the infinite loop of bullcrap
<haxxtivist> and tried again
<haxxtivist> rails worked
<haxxtivist> but on doing rails new blahblah
<haxxtivist> got this
<haxxtivist> Your user account isn't allowed to install to the system Rubygems.
<haxxtivist> You can cancel this installation and run:
<haxxtivist> bundle install --path vendor/bundle
<haxxtivist> to install the gems into ./vendor/bundle/, or you can enter your password
<haxxtivist> and install the bundled gems to Rubygems using sudo.
<bougyman> that aur package is crap
<bougyman> dont' do it that way.
<haxxtivist> I installed like 20 things, and gave up. What do now?
<bougyman> you gave up? Take a nap, now, then.
<haxxtivist> Gave up on the AUR package*
<haxxtivist> I was sitting here for 20 minutes pressing y, it was just reinstalling packages over and over.
momomomomo has quit [Ping timeout: 264 seconds]
<bougyman> it probably got bundler installed, at least.
<bougyman> so you could gem install rails
<bougyman> sudo gem install rails for system-wide.
momomomomo has joined #ruby-lang
<haxxtivist> cool, cool. Thanks a bunch.
jmrepetti has quit [Remote host closed the connection]
wm3|busy has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
bantic has quit [Quit: bantic]
wallerdev has joined #ruby-lang
muskalek has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby-lang
<haxxtivist> Ugh. "Could not find a JavaScript runtime"
<haxxtivist> D;
<haxxtivist> What do?
malconis has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<jhass> pacman -S nodejs
malconis has joined #ruby-lang
yfeldblum has joined #ruby-lang
banister has quit [Ping timeout: 250 seconds]
<haxxtivist> That evidently doesn't exist anymore. 404 at all mirrors. D:
<haxxtivist> Nevermind, finally found it.
<haxxtivist> Thanks, again.
hahuang61 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby-lang
postmodern has joined #ruby-lang
jmrepetti has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
postmodern has quit [Ping timeout: 265 seconds]
momomomomo has quit [Ping timeout: 250 seconds]
thagomizer has joined #ruby-lang
sunaku has joined #ruby-lang
RobertBirnie has joined #ruby-lang
allomov_ has quit [Remote host closed the connection]
<haxxtivist> Shoot.
<haxxtivist> Undefined method attr accessible?
<haxxtivist> Why isn't that working?
kaczmar has joined #ruby-lang
<nofxx> haxxtivist, missing an underline?
<haxxtivist> nofxx, I tried both ways, same error.
<nofxx> haxxtivist, accessor
<nofxx> reader/writer/accessor
<haxxtivist> ?
<nofxx> attr_accessor not accessible
<jhass> haxxtivist: are you following a Rails 3 tutorial in a Rails 4 app (btw. #RubyOnRails for rails talk)?
Xney2 is now known as Xney
<nofxx> haxxtivist, ahhh...rails mass assignment protection. Moved to controllers!
<haxxtivist> Sorry about the wrong irc channel, jhass. Also, yes I am lol.
<haxxtivist> but changing that actually did work, nofxx
<nofxx> haxxtivist, not the same thing man
<nofxx> haxxtivist, get a ruby tut first, one afternoon you get the basics
<haxxtivist> It gave the desired output :S
<jhass> get a rails 4 tutorial
<haxxtivist> I've done several basics tutorials. No tutorials go past basic usage of any given language.
<haxxtivist> :(
<nofxx> for that use a book, the pickaxe has nice examples
<jhass> guides.rubyonrails.org is not too bad actually
<haxxtivist> gah. All of this is confusing.
<haxxtivist> I go one place, they say dive right into a project and learn. I go another place, they say start with basics tutorials.
<haxxtivist> What do, what do.
justinmburrous has joined #ruby-lang
justinmburrous has quit [Remote host closed the connection]
<nofxx> haxxtivist, no excuses man, attr_* helpers are ruby basics you should know ;)
djbkd has quit [Remote host closed the connection]
<haxxtivist> Real quick, for my purposes here, what is the difference between attr_accessible and attr_accessor? Because switching those made the method work.
arBmind1 has quit [Quit: Leaving.]
<jhass> attr_accessible is an old rails ism that was removed in rails 4
<jhass> attr_accessor is a shortcut to define methods that read and set an instance variable
<jhass> which ActiveRecord already does for all your columns, without any of the two
<haxxtivist> Ah. I'm doing a tutorial on creating a blog with rails. The method was used for posting, defining title and content.
djbkd has joined #ruby-lang
<jhass> seriously
<jhass> get a rails 4 tutorial
<haxxtivist> Any suggestions on a good one to begin with?
apeiros has joined #ruby-lang
<Sunlorhic> attr_accessible was used to allow an attribute to be set with mass assignment
<Sunlorhic> i think it also called attr_accessor under the hood
benlovell has joined #ruby-lang
<nofxx> Sunlorhic, nope, with SQL the mapper does that, with mongoid /nosql usually you do when field :foo
<Sunlorhic> ahh
<nofxx> someday I'll write a gem to replace migrations when creating fields... using nosql way... wouldn't that be nice?
<nofxx> you can add/remove fields and just run something to create a migration under the hood
<haxxtivist> gems = libraries, yeah?
<jhass> yeah
<haxxtivist> Koans a good place to start?
<jhass> not if you're new to programming
sarkyniin has joined #ruby-lang
<haxxtivist> I'm new to ruby, but I'm a junior comp sci major.
benlovell has quit [Ping timeout: 245 seconds]
<nofxx> haxxtivist, which langs have you seen on school?
solars has quit [Quit: WeeChat 0.4.2]
sunaku has quit [Ping timeout: 244 seconds]
skade has joined #ruby-lang
kyb3r_ has joined #ruby-lang
<haxxtivist> I'm familiar with C++, Java, unityScript, and some php.
momomomomo has joined #ruby-lang
persand has joined #ruby-lang
futilegames has joined #ruby-lang
<yorickpeterse> MongoDB: where removing documents may or may not take an entire day
<yorickpeterse> because herp derp lets lock everything
<yorickpeterse> (╯°□°)╯︵ ┻━┻
persand has quit [Client Quit]
persand has joined #ruby-lang
michael_mbp has quit [Excess Flood]
skade has quit [Remote host closed the connection]
clauswitt has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
marr has quit [Ping timeout: 250 seconds]
michael_mbp has joined #ruby-lang
sunaku has joined #ruby-lang
yfeldblum has joined #ruby-lang
bantic has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
dorei has joined #ruby-lang
mikecmpbll has joined #ruby-lang
sunaku has quit [Ping timeout: 255 seconds]
jmrepetti has quit [Remote host closed the connection]
solars has joined #ruby-lang
imkmf_ has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
imkmf has quit [Ping timeout: 244 seconds]
loincloth has quit [Remote host closed the connection]
kaczmar has quit [Quit: kaczmar]
jmrepetti has joined #ruby-lang
<haxxtivist> assert_equal (what goes here?), nil.is_a?(object)
sunaku has joined #ruby-lang
momomomomo has quit [Ping timeout: 255 seconds]
M3M0CooL has joined #ruby-lang
<yorickpeterse> http://rubini.us/2014/11/10/rubinius-3-0-part-1-the-rubinius-team/ also I'll just leave this here
* yorickpeterse quietly walks away
postmodern has joined #ruby-lang
postmodern has quit [Changing host]
postmodern has joined #ruby-lang
dabradley has quit [Ping timeout: 245 seconds]
ZaRDaK has joined #ruby-lang
Onk has joined #ruby-lang
cleopatra has quit [Ping timeout: 260 seconds]
dayas has joined #ruby-lang
dayas has quit [Quit: dayas]
hinbody has quit [Quit: leaving]
chinmay_dd has joined #ruby-lang
onkara has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
jmrepetti has quit [Remote host closed the connection]
dabradley has joined #ruby-lang
danijoo has joined #ruby-lang
sepp2k has quit [Quit: Konversation terminated!]
loincloth has joined #ruby-lang
jxpx777 has joined #ruby-lang
yfeldblum has joined #ruby-lang
michael_mbp has quit [Excess Flood]
clauswitt has quit [Quit: Textual IRC Client: www.textualapp.com]
michael_mbp has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
ducklobster has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmrepetti has joined #ruby-lang
dagda1 has joined #ruby-lang
kaczmar has joined #ruby-lang
marr has joined #ruby-lang
cout has joined #ruby-lang
<cout> :(
ducklobster has quit [Remote host closed the connection]
<cout> OpenStruct.new(foo: 42).clone.delete_field(:foo) #=> NameError: method `foo' not defined in OpenStruct
<cout> probably fixed in some newer version of ruby since I can't convince the powers that be to upgrade
nathanstitt has quit [Ping timeout: 245 seconds]
clauswitt has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
ducklobster has joined #ruby-lang
<centrx> Poor guy
ldnunes has quit [Quit: Leaving]
<cout> I'm just curious why it happens, since I expect #clone to copy the singleton class
nertzy has joined #ruby-lang
siwica1 has quit [Quit: siwica1]
michael_mbp has quit [Excess Flood]
tanema has joined #ruby-lang
clauswitt has quit [Max SendQ exceeded]
michael_mbp has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
tanema has quit [Client Quit]
cleopatra has joined #ruby-lang
cleopatra has left #ruby-lang [#ruby-lang]
sirene has joined #ruby-lang
benlovell has joined #ruby-lang
<darix> >> OpenStruct.new(foo: 42).clone.delete_field(:foo)
<eval-in__> darix => uninitialized constant OpenStruct (NameError) ... (https://eval.in/219612)
<darix> >> require 'ostruct'; OpenStruct.new(foo: 42).clone.delete_field(:foo)
<eval-in__> darix => 42 (https://eval.in/219613)
allomov has joined #ruby-lang
<cout> darix: what version are you using?
<darix> that isnt my bot
<cout> oh
<cout> >> RUBY_VERSION
<eval-in__> cout => "2.1.3" (https://eval.in/219614)
jimbach has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 265 seconds]
allomov has quit [Ping timeout: 250 seconds]
<apeiros> cout: unrelated to the singleton class
<apeiros> cout: sounds like that openstruct version forgot to properly implement initialize_copy
<apeiros> cout: what version is that?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clauswitt has joined #ruby-lang
RobertBirnie has joined #ruby-lang
<apeiros> oh, hm, I guess I see what you meant
<apeiros> I forgot that ostruct doesn't use method_missing but actually defines methods
clauswitt has quit [Max SendQ exceeded]
<darix> apeiros: in case you missed it earlier http://php.net/manual/en/class.thread.php
<cout> it is interesting that initialize_copy calls @table.dup, even though I was copying with #clone (so @table's singleton methods don't get copied.. but I don't think that's a problem)
diegoviola has quit [Remote host closed the connection]
<apeiros> darix: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah!
yfeldblum has joined #ruby-lang
<yorickpeterse> wat
kaczmar has quit [Quit: kaczmar]
<apeiros> yorickpeterse: php. threads. threads. in. php.
<yorickpeterse> hihi
<apeiros> T.E.H. hOrROr
<yorickpeterse> but bro, running multi-threaded PHP inside Apache is totally webscale
<apeiros> the amount of damage which will be done is webscale too
<yorickpeterse> does PHP actually have a GIL?
<apeiros> php itself is single threaded
<yorickpeterse> Ah
<apeiros> I'm curious as to how that pear lib actually adds threads
<yorickpeterse> wouldn't be surprised if it copies an entire PHP VM between threads
<apeiros> see my comment
<yorickpeterse> and somehow, _somehow_ tries to synchronize that
<apeiros> ("aaaa…ah")
<yorickpeterse> also yay, seems I've slain the hydra that is aws-sdk/activedurrrcord
<yorickpeterse> no more race conditions on Rbx
<darix> oh i need to upgrade my rubinius package
nathanstitt has joined #ruby-lang
<yorickpeterse> darix: yeah pfft hurry up already :P
<darix> you didnt tell me about the release!:p
<yorickpeterse> darix: well...check the website!
<darix> yorickpeterse: i have a bit too many packages for that ;)
<yorickpeterse> Ah yes, the Linux package manager's lyfe
<darix> yorickpeterse: also currently porting gem_install.sh to gem_install.rb
<darix> which should help me to solve some problems
<yorickpeterse> gem_install.sh?
[spoiler] has quit [Quit: Leaving]
<yorickpeterse> dat bash
yfeldblu_ has joined #ruby-lang
hinbody has joined #ruby-lang
oleo__ has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 265 seconds]
oleo is now known as Guest55827
Guest55827 has quit [Ping timeout: 250 seconds]
oleo__ has quit [Read error: Connection reset by peer]
Miphix has quit [Read error: Connection reset by peer]
Miphix has joined #ruby-lang
persand has quit [Quit: persand]
chinmay_dd has quit [Quit: Leaving]
doosy has joined #ruby-lang
Antiarc has quit [Read error: Connection reset by peer]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doosy has quit [Remote host closed the connection]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
<zenspider> cout: you live. how goes? it's been a long time
banister has quit [Client Quit]
jmrepetti has quit [Remote host closed the connection]
oleo__ has joined #ruby-lang
allomov has joined #ruby-lang
doosy has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
miqui has quit [Remote host closed the connection]
dagda1 has joined #ruby-lang
benlovell has joined #ruby-lang
amsi has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 1.0.1]
|jemc| has joined #ruby-lang
mistym has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
oleo__ is now known as oleo
amsi has quit [Quit: Leaving]
wallerdev has quit [Client Quit]
wallerdev has joined #ruby-lang
loincloth has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
emmesswhy has quit [Quit: emmesswhy]
malconis has quit [Write error: Broken pipe]
__butch__ has quit [Quit: Leaving.]
malconis_ has joined #ruby-lang
emmesswhy has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 1.0.1]
<cout> zenspider: I do live
<cout> zenspider: dropped out of school to go back into programming again
|jemc| has joined #ruby-lang
postmodern has quit [Ping timeout: 264 seconds]
<haxxtivist> Is it better to use obj.nil? or obj==nil andwhy?
doosy has quit [Remote host closed the connection]
<cout> zenspider: kept failing tests due to health issues and racing addiction and being old
ledestin_ has joined #ruby-lang
dacamp has joined #ruby-lang
postmodern has joined #ruby-lang
<ljarvis> haxxtivist: use !obj unless you really care if it's exactly nil
<dacamp> Anyone have a suggestion on using RDoc to gather all flags with ':feature:'? I'm trying to create a single page with links to all new features.
<zenspider> cout: what were you studying?
arBmind has joined #ruby-lang
<zenspider> drbrain: *ping* see dacamp
ledestin has quit [Ping timeout: 296 seconds]
SuMo_D has joined #ruby-lang
twe4ked has quit [Ping timeout: 244 seconds]
<cout> zenspider: was doing pre-med
<zenspider> oh damn. yeah. that's a bitch.
SuMo_D_ has joined #ruby-lang
<cout> zenspider: applied and got turned down. I think I would have gotten in if I kept trying, but it wasn't worth the cost.
<zenspider> my dad was an md
<haxxtivist> So I'm doing the Koans
<haxxtivist> assert_equal __, 1.5.is_a?(Object)
<haxxtivist> Does this REALLY just want me to say the same thing as is on the right?
<cout> zenspider: but at least now I can understand what these daggum wikipedia articles about various drugs are saying
<zenspider> haxxtivist: no
ledestin_ has quit [Ping timeout: 250 seconds]
<zenspider> haxxtivist: think about what is_a? would return in that case, and put than in ___
<zenspider> and I _do_ mean think. don't just put it in irb
<zenspider> koans are for contemplating
<haxxtivist> I would say it returns true, if everything is an object.
SuMo_D_ has quit [Remote host closed the connection]
<haxxtivist> yeah?
ledestin has joined #ruby-lang
<haxxtivist> Would it be true then, zenspider?
<zenspider> put it in and try it
<haxxtivist> Oops, sorry. I did. It worked.
twe4ked has joined #ruby-lang
<haxxtivist> I feel like those aren't the only things that would work there, though?
<zenspider> awesome
<zenspider> assert_equal is there to ensure the result is equal to the expected
SuMo_D has quit [Ping timeout: 272 seconds]
<haxxtivist> Ahh. That makes much more sense. Thank you. I may be on here blabbing on about other koans I don't understand.
doosy has joined #ruby-lang
<zenspider> that's what we're here for. just think about it and come to us when you're confused
toretore has quit [Quit: This computer has gone to sleep]
fusillicode1 has quit [Ping timeout: 255 seconds]
<yorickpeterse> haxxtivist: nobody here minds people asking questions/talking a lot
<dacamp> drbrain: does RDoc have its own channel? Google says no, wanted to confirm.
<yorickpeterse> unless it's me ranting about things
M3M0CooL has quit []
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doosy_ has joined #ruby-lang
mistym has joined #ruby-lang
onkara has quit [Quit: onkara]
Onk has quit [Remote host closed the connection]
onkara has joined #ruby-lang
emmesswhy has quit [Quit: Leaving]
doosy has quit [Ping timeout: 258 seconds]
<yorickpeterse> oh sweet, Baruco videos are finally all online
<yorickpeterse> now I can enjoy myself sucking at presentations on Linux
<yorickpeterse> hihi
<yorickpeterse> dang it, they cut the part where I made a "year of the desktop" joke
yfeldblu_ has quit [Remote host closed the connection]
havenwood has quit []
doosy_ has quit [Remote host closed the connection]
whippythellama has joined #ruby-lang
yfeldblum has joined #ruby-lang
_djbkd has joined #ruby-lang
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby-lang
sunaku has quit [Quit: WeeChat 1.0.1]
sunaku has joined #ruby-lang
<haxxtivist> What does the .inspect method do?
djbkd has quit [Ping timeout: 256 seconds]
<|jemc|> haxxtivist: returns a more detailed string version of the object than "puts"
<yorickpeterse> haxxtivist: it basically converts an object to a "pretty formatted" string
<yorickpeterse> e.g.
<yorickpeterse> >> 10.inspect
<eval-in__> yorickpeterse => "10" (https://eval.in/219661)
<yorickpeterse> >> "foo".inspect
<eval-in__> yorickpeterse => "\"foo\"" (https://eval.in/219662)
<|jemc|> err... "to_s" I mean
<yorickpeterse> ^ note the quotes
<yorickpeterse> >> nil.inspect
<eval-in__> yorickpeterse => "nil" (https://eval.in/219663)
<yorickpeterse> Some libraries overwrite the method to provide more meaningful output
<yorickpeterse> >> class Foo; def inspect; 'ha no'; end; end; Foo.new.inspect
<eval-in__> yorickpeterse => "ha no" (https://eval.in/219664)
<yorickpeterse> >> class Foo; end; Foo.new.inspect
<eval-in__> yorickpeterse => "#<Foo:0x4165cfac>" (https://eval.in/219665)
<zenspider> it's like #to_s, but meant for nerds to read
<zenspider> not regular ppl
<yorickpeterse> pretty much
<zenspider> or: the debugging version of to_s
_djbkd has quit [Remote host closed the connection]
<haxxtivist> Hm. So if 123.to_s outputs "123", 123.inspect outputs "123" as well or?
<zenspider> >> 123.to_s == 123.inspect
<eval-in__> zenspider => true (https://eval.in/219668)
Sunlorhic has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby-lang
<zenspider> >> "blah\n".to_s == "blah\n".inspect
<eval-in__> zenspider => false (https://eval.in/219669)
onkara has quit [Quit: onkara]
<haxxtivist> Why is that false?
<zenspider> haxxtivist: you have irb. use it.
<haxxtivist> I'm new here. I don't know what irb is lol.
<yorickpeterse> haxxtivist: sometimes it's the same, sometimes not, depends on the object
<zenspider> haxxtivist: open your terminal
<zenspider> type irb
onkara has joined #ruby-lang
<zenspider> you _should_ get an irb prompt
<haxxtivist> ahhh.
<zenspider> type: 2 + 3<return>
<zenspider> >> 2 + 3
<eval-in__> zenspider => 5 (https://eval.in/219671)
<zenspider> then type: puts "blah\n"
<zenspider> then type: puts "blah\n".to_s
<|jemc|> haxxtivist: better yet, type "gem install pry", then "pry" for a more feature-rich interactive prompt
<zenspider> then type: puts "blah\n".inspect
<zenspider> |jemc|: don't confound things
<zenspider> the guy doesn't know to_s vs inspect. baby steps
<yorickpeterse> pry is way too heavy for beginners
<haxxtivist> Used irb to try and test, and it reports that assert_equal isn't a method.
GBrawl has quit [Quit: (null)]
<|jemc|> I disagree - pry's extra features and niceties make it more approachable for beginners
<yorickpeterse> haxxtivist: correct, assert_equal isn't available by default
<haxxtivist> Eff approachable, I wanna learn the barebones of things, and then get fancy with it. In that order.
<zenspider> haxxtivist: assert_equal isn't loaded in that context
<zenspider> |jemc|: working out of the box > explaining gems + pathing + all sorts of shit.
<zenspider> haxxtivist: don't use irb to work on koans directly. use it to ask questions you come up with on your own: "I wonder if X" type things
futilegames has quit [Quit: futilegames]
<haxxtivist> Hm. Alright. Help me understand this real quick. Why does nil.inspect == "nil", but nil.to_s !="nil"
<haxxtivist> ?
<zenspider> many of those types of questions are gonna be answered with: because
<zenspider> or: that's what matz wanted
<yorickpeterse> to_s just converts it to a string meant for computers basically
<yorickpeterse> while inspect is meant for humans
<zenspider> nil is an object that represents nothing. to_s => "" makes sense in that regard
<yorickpeterse> say you have some kind of variable, like so:
<yorickpeterse> number = nil
<zenspider> but for debugging, you want to see that it is nil, and not an actual empty string
<yorickpeterse> and somewhere in your code you want to see what `number` is while debugging
<yorickpeterse> If you just get an empty string that's not very useful
<yorickpeterse> heh, zenspider beat me to it
<haxxtivist> Right. That makes a lot more sense. Thanks guys.
<zenspider> you'll get it. it takes time
<haxxtivist> Inspect = strings for nerds.
havenwood has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<haxxtivist> There's so many predefined keywords in ruby lol. It's confusing, coming from C++ where you have to make everything before making anything else.
<yorickpeterse> actually the amount of keywords is lower than in C++
<haxxtivist> useful keywords*
<|jemc|> haxxtivist: note that to_s and inspect are not keywords
<|jemc|> they're only methods called on the object
mistym has quit [Remote host closed the connection]
GBrawl has joined #ruby-lang
<haxxtivist> I had moved on, I know that
<haxxtivist> Was talking about Fixnum.
<|jemc|> well, Fixnum is also not a keyword - it's a constant :)
<yorickpeterse> haxxtivist: there are very few _actual_ keywords in Ruby
<haxxtivist> Well eff me and my poor word choice, man.
<haxxtivist> lol
<yorickpeterse> e.g. "def" and "class" are keywords
<cout> and even the keywords that ruby has can be used as regular identifiers in certain contexts
<cout> e.g. you can have a method named 'if' and ruby doesn't complain
vlad_starkov has quit [Quit: ZNC - http://znc.in]
<yorickpeterse> cout: as long as you include the parenthesis when calling, yes
<yorickpeterse> at least I think so
<yorickpeterse> >> def if; end; if
<eval-in__> yorickpeterse => /tmp/execpad-de430414770e/source-de430414770e:3: syntax error, unexpected keyword_rescue ... (https://eval.in/219690)
<yorickpeterse> yup
<yorickpeterse> >> def if; end; if()
<eval-in__> yorickpeterse => /tmp/execpad-e1bb41e4a68b/source-e1bb41e4a68b:3: syntax error, unexpected keyword_rescue ... (https://eval.in/219691)
<yorickpeterse> huh
* womble dreams of the fun that could be had with `def def`...
* yorickpeterse pulls out glove
<cout> yorickpeterse: I think you need an explicit receiver
<yorickpeterse> >> define_method(:if) { }; if()
<eval-in__> yorickpeterse => /tmp/execpad-c4c653d0851e/source-c4c653d0851e:3: syntax error, unexpected keyword_rescue ... (https://eval.in/219692)
<yorickpeterse> hmpf
<yorickpeterse> cout: probably
<ljarvis> you need to use parens for the def
<|jemc|> yes, explicit receiver
onkara has quit [Quit: onkara]
<yorickpeterse> >> def if; end; self.if()
<eval-in__> yorickpeterse => private method `if' called for main:Object (NoMethodError) ... (https://eval.in/219693)
<zenspider> wow. 38 keywords
<ljarvis> >> def if(); end; if()
<eval-in__> ljarvis => /tmp/execpad-59afec51f69a/source-59afec51f69a:3: syntax error, unexpected keyword_rescue ... (https://eval.in/219694)
<ljarvis> u wot
<yorickpeterse> ljarvis: ha
<yorickpeterse> take that
vlad_starkov has joined #ruby-lang
<zenspider> err reserved words
<cout> rescue!? weird
<|jemc|> >> def if; 88 end; self.if
<eval-in__> |jemc| => private method `if' called for main:Object (NoMethodError) ... (https://eval.in/219695)
<ljarvis> ;D
<yorickpeterse> cout: eval.in bot wraps stuff in begin/rescue
onkara has joined #ruby-lang
kaczmar has joined #ruby-lang
<ljarvis> ths is all a terrible idea anyway
<yorickpeterse> no worse than overwriting TrueClass#==
<zenspider> you can always send("if")... still a terrible idea
<cout> >> ass CodeGenerator; def if(expr, &block); end; end; c = CodeGenerator.new; c.if(true) { }
<eval-in__> cout => /tmp/execpad-eab669ca6b21/source-eab669ca6b21:3: syntax error, unexpected keyword_rescue, expecting end-of-input ... (https://eval.in/219696)
<cout> >> class CodeGenerator; def if(expr, &block); end; end; c = CodeGenerator.new; c.if(true) { }
<eval-in__> cout => nil (https://eval.in/219697)
<ljarvis> ass
<cout> hehe, I said ass
<|jemc|> heh, "ass CodeGenerator"
<yorickpeterse> hurr
<haxxtivist> Why do object ids of small numbers have a pattern of x*2+1?
<haxxtivist> Is that some kind of sick joke, or is it practical?
<|jemc|> haxxtivist: they are preallocated
<zenspider> practical optimization
<zenspider> preallocated? no
<zenspider> haxxtivist: you know C/++ ?
<haxxtivist> Fairly well, it's been a year or two.
<haxxtivist> Why?
<zenspider> VALUE = (n << 1) | 1
<zenspider> they're encoded directly into the object pointer. the | 1 is the "fixnum" flag
<cout> ljarvis: real-world example: https://github.com/cout/ruby-libjit/blob/master/sample/fib.rb (in this case it's #while though and not #if)
<haxxtivist> Fair enough
djbkd has quit [Remote host closed the connection]
vlad_starkov has quit [Client Quit]
vlad_starkov has joined #ruby-lang
g0bl1n has quit [Ping timeout: 265 seconds]
|jemc| has left #ruby-lang ["WeeChat 1.0.1"]
sarkyniin has quit [Quit: Quitte]
Thecrazylumberja has joined #ruby-lang
spuk has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 250 seconds]
amsi has joined #ruby-lang
mistym has joined #ruby-lang
supergeek has joined #ruby-lang
supergeek has quit [Max SendQ exceeded]
supergeek has joined #ruby-lang
spuk has joined #ruby-lang
supergeek has quit [Max SendQ exceeded]
solars has quit [Ping timeout: 245 seconds]
godd2 has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
GBrawl has quit [Quit: (null)]
charliesome has joined #ruby-lang
AKASkip has quit [Ping timeout: 260 seconds]
<jxpx777> Silly Ruby question: is there a simple way to check an array for elements matching some condition but if none do fall back to a second condition? If possible I'd like to avoid iterating over the entire array multiple times.
<apeiros> how would it know before iterating over all that none matches?
<apeiros> but to answer it: no, there's no pre-made method which does that
postmodern has quit [Ping timeout: 260 seconds]
bantic has quit [Quit: bantic]
djbkd has joined #ruby-lang
charliesome has quit [Quit: zzz]
duderonomy has quit [Ping timeout: 272 seconds]
<ledestin> jxpx777: choose between iterating twice or spending extra time for second check right away
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<apeiros> godd2: google "inject abuse"
* apeiros tired of explaining that one
<bnagy> jxpx777: each over it and fill two result arrays for cond1 and cond2
<godd2> well still, there -is- a method that does it in one pass
<apeiros> godd2: yes. each.
loincloth has quit [Remote host closed the connection]
<apeiros> godd2: by that logic, that is.
djbkd has quit [Ping timeout: 244 seconds]
<apeiros> yes, you can build something which does that. inject does not directly do what he wants. you need to code it up. you can do that in a dozen ways.
<godd2> fair enough. also, "inject abuse" and "inject abuse programming" just give me drug results on teh google
<apeiros> lol
<apeiros> dang :)
<apeiros> just means either your google search result personalization says something bad about you, or isn't up to speed yet ;-p
<bnagy> oh wait if you just want to check for _any_ then you can each with an early break for cond1 and a flag for cond2
<apeiros> (and yes, google search result personalization is a thing - I remember yelling at somebody for failing to click the first link in the results for a given term - just to learn that it was the first result only for me. with a pristine browser it was like result #30)
slawrence00 has joined #ruby-lang
<womble> duckduckgo's first page of results for "inject abuse" is all drugs
<womble> ruby inject abuse seems more relevant.
<bnagy> yeah I just get a bunch of visited links foe methadone suppliers
nathanstitt has quit [Quit: I growing sleepy]
<jxpx777> Here's what I ended up coming up with: Dir.glob(File.join(profile_home, "*.{default,devmode}*")).each { |p| break [p] if p.to_s =~ /devmode/i }[0]
<jxpx777> Basically, I want the devmode profile if it's available. Otherwise, default
kaczmar has quit [Quit: kaczmar]
<ericwood> I prefer reduce to inject
<ericwood> makes more sense to me mentally...it's a many --> one operation
<womble> And as a bonus, "reduce abuse" has a nice rhyming quality
<havenwood> reduce reduce abuse
<jxpx777> reduce would definitely technically allow me to do what I want but it feels super wrong as a "find-y" method
<ericwood> I'm only in it for the alliteration
<ericwood> reduce is an alias of inject
<jxpx777> yah, I know reduce/inject
<jxpx777> :)
<ericwood> if you chain the two together I'll hurt you
<jxpx777> Any thoughts on the oneliner I came up with? Feels almost too clever…
<jxpx777> (My actual glob is on a separate line)
<zenspider> godd2: why in the fuck would you use reduce in that example?
cmhobbs has quit [Remote host closed the connection]
<bnagy> jxpx777: tbh I think inject would be kinda readable for that :)
<bnagy> early break is always a bit smelly
<godd2> zenspider cause he wanted to filter with a default
<zenspider> that's _horrible_
<godd2> Why?
<bnagy> jxpx777: imho IRL I would just write it as an if find?
<godd2> (honest question, I'd like to understand why it's bad)
<jhass> jxpx777: I'm obvisouly missing something, why is this not .find {|path| path.include? 'devmode' } ?
<jhass> where's the second condition?
<jxpx777> well, the second condition is in the globbing. devmode vs default
<bnagy> the first default glob is the second conditionb
<bnagy> but you can easily extract that before you start
<jhass> so just .find
<bnagy> ^^
nertzy has joined #ruby-lang
<zenspider> "but if none do fall back to a second condition? If possible I'd like to avoid iterating over the entire array multiple times."
<zenspider> how does that make sense?
benlovell has joined #ruby-lang
<zenspider> you want to apply a second condition AFTER figuring out that nothing satisfies the first condition, but you want to do it WITHOUT going over the collection again?
<bnagy> jxpx777: imho, always prefer readable over 'fast' for anything that's not scicomp
RitterJack has quit [Remote host closed the connection]
<zenspider> not just readable... UNDERSTANDABLE
<jxpx777> OK, I just discovered the ifnone argument for find, so I think this is better: profiles.find(profiles.first) { |profile| profile.include?('devmode') }
<bnagy> jxpx777: still wouldn't use it
<jxpx777> ? what's wrong with that version?
<zenspider> doesn't second condition imply testing the contents again?
<bnagy> less readable than if profiles.find blah
<bnagy> or profiles.find blah || default
<zenspider> I prefer: profiles.find { ... } || profiles.first
<haxxtivist> Is the entirety of the koans just asserts?
<zenspider> haxxtivist: pretty much, iirc
<jhass> haxxtivist: pretty much, later some game implementations iirc
<zenspider> it's just a framework for you to work out the koans in
<zenspider> provides structure
<jxpx777> bnagy, zenspider: those are just the same as the ifnone argument right? Just a little more verbose but functionally no different?
<bnagy> right. I can't really explain why profiles.find {blah} || default is the most idiomatic, but imho it is
<bnagy> guess it's just based on reading lots of ruby
<jhass> jxpx777: note that ifnone wants a callable like a lambda
<zenspider> >> ["profiles.find { ... } || profiles.first", "profiles.find(profiles.first) { ... }"].map(&:length)
<eval-in__> zenspider => [39, 37] (https://eval.in/219714)
<zenspider> 2 chars...
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> and it SAYS what it is doing clearly
<zenspider> find or fall back to X
<godd2> zenspider Okay then I'll admit that it wasn't the best solution to the problem at hand, but it was more a counter to the claim that there was no such method he could use.
<jxpx777> zenspider: good point. thanks
benlovell has quit [Ping timeout: 250 seconds]
malconis has joined #ruby-lang
malconis has quit [Client Quit]
<zenspider> oh shit. I didn't realize that the ifnone was a callable
<zenspider> >> ["profiles.find { ... } || profiles.first", "profiles.find(lambda { profiles.first }) { ... }"].map(&:length)
<eval-in__> zenspider => [39, 48] (https://eval.in/219715)
g0bl1n has joined #ruby-lang
<bnagy> :<
<zenspider> so now there is two reasons why the || form is more idiomatic
<jxpx777> true. good info. thanks for helping me learn something new. :)
<zenspider> me too :)
<jhass> yeah, no idea why they suddenly want a callable there
<zenspider> jhass: just for the delayed evaluation
<zenspider> you don't want to calculate the result if it isn't applicable
<zenspider> same reason why minitest doesn't calculate error messages until there is one
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> all that string interpolation is costly
<haxxtivist> Super stupid question, but what is "<<" in ruby?
<jhass> well, ideally you would have an interface for both, like with Hash#fetch
<bnagy> hahah so you could have find(lambda{ profiles.find {cond2}}) {cond1} ?
lcdhoffman has quit [Quit: lcdhoffman]
<jhass> haxxtivist: a method call. It depends on what you call it
<haxxtivist> context: array << 333
<jhass> haxxtivist: "append element"
<ledestin> haxxtivist: ri Array.<<
banister has joined #ruby-lang
<zenspider> haxxtivist: short answer: a method call
<haxxtivist> The good answer was append. Thanks.
<zenspider> except that answer isn't actually right :)
<godd2> haxxtivist also works to concatenate strings. "Hello " << "world" == "Hello world"
<haxxtivist> Koans 17/282 done. Gonna be a long night.
<jhass> and for bitshifting and for whatever you define it
<zenspider> jhass' answer of "it depends on the receiver" is
<haxxtivist> godd2 in my mind, that makes sense. Appending ~ concatenating.
<jhass> >> 1 << 4
<eval-in__> jhass => 16 (https://eval.in/219716)
<haxxtivist> I get the idea of what it does.
<godd2> ahh, bit appending, my old friend
<zenspider> >> class X; def << n; 2 + n; end; end; X.new << 4
<eval-in__> zenspider => 6 (https://eval.in/219717)
<zenspider> it's just a method
<zenspider> nothing more
<haxxtivist> nothing less?
<haxxtivist> ;D
<zenspider> haxxtivist: what does "+" do ?
<jhass> >> obj = "foo"; class << obj; def bar; 3; end; end; obj.bar
<eval-in__> jhass => 3 (https://eval.in/219720)
<jhass> okay, I'm mean now :P
<haxxtivist> + adds, silly.
<haxxtivist> :D
<zenspider> the answer is always the same: depends on the receiver of the "+" message what it means
<zenspider> no, it doesn't
caseydriscoll has quit [Remote host closed the connection]
jmrepetti has joined #ruby-lang
<zenspider> >> class X; def + n; 0 - n; end; end; X.new + 4
<eval-in__> zenspider => -4 (https://eval.in/219721)
<jhass> >> class Foo; def +@; 23; end; end; +Foo.new
<eval-in__> jhass => 23 (https://eval.in/219722)
<godd2> >> dog = "hello"; class << dog; def bark; puts "woof!"; end; end; dog.bark
<eval-in__> godd2 => woof! ... (https://eval.in/219723)
<jhass> already had that
<godd2> :(
djbkd has joined #ruby-lang
jimbach has joined #ruby-lang
<godd2> ok I've got another one
<godd2> >> endl = "\n"; cout = $stdout; cout << "Hello, world!" << endl
<eval-in__> godd2 => Hello, world! ... (https://eval.in/219724)
nertzy has quit [Quit: This computer has gone to sleep]
jimbach has quit [Ping timeout: 265 seconds]
<haxxtivist> How does slicing arrays work?
<zenspider> vague question is vague
<zenspider> with C code
<haxxtivist> Like, why are array[2,2] and array[2,20] the same?
<womble> They're... not?
<haxxtivist> assert_equal [:and,:jelly], array[2,2]
<haxxtivist> assert_equal [:and,:jelly], array[2,20]
<haxxtivist> That's correct in the koans....
<zenspider> haxxtivist: have you found `ri` yet?
<godd2> haxxtivist because its giving back everything it can
<bnagy> this is the special invisible element
duderonomy has joined #ruby-lang
<womble> That doesn't mean they're the same, it only means that they're returning the same result for a certain value of `array`
<bnagy> you should search around for some blog posts
<zenspider> haxxtivist: type `ri Array.slice` into a new terminal
<haxxtivist> "Nothing known about Array"
<godd2> haxxtivist that would be equal if the array has between 3 and 24 things in it
<bnagy> it's a bit of a hack, tbh, but it makes a lot of stuff work
<zenspider> *sigh* I fucking hate rvm
<haxxtivist> The first number is obviously the starting point. I suppose I'm asking what is the significanace of the second number?
<bnagy> >> [ [1,1][2], [1,1][2,2], [1,1][3,3] ]
<eval-in__> bnagy => [nil, [], nil] (https://eval.in/219740)
<godd2> haxxtivist the second number is how many to grab after the start
jimbach has joined #ruby-lang
<haxxtivist> And from what I can tell, it wraps around (if array[-2] is two from the last and all)
<haxxtivist> so why doesn't it grab everything in the array if it goes around 20 times?
<godd2> haxxtivist negative indeces start from the end
<zenspider> haxxtivist: I think there is some command to rvm to make it generate the rdoc
<zenspider> find it. you want it
kalehv has joined #ruby-lang
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
caseydriscoll has joined #ruby-lang
duderonomy has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Sirele has joined #ruby-lang
davispuh has joined #ruby-lang
Sirele is now known as cleopatrax
Sirele has joined #ruby-lang
Sirele has quit [Client Quit]
SuMo_D has joined #ruby-lang
cleopatra1 has joined #ruby-lang
cleopatra1 has quit [Client Quit]
jgpawletko has quit [Quit: jgpawletko]
selenex has joined #ruby-lang
selenex has left #ruby-lang [#ruby-lang]
matp has quit [Remote host closed the connection]
sleopatra has joined #ruby-lang
matp has joined #ruby-lang
sleopatra has left #ruby-lang [#ruby-lang]
spastorino has quit [Quit: Connection closed for inactivity]
sleopatra has joined #ruby-lang
sleopatra has quit [Client Quit]
cleopatra77 has joined #ruby-lang
cleopatra77 has quit [Client Quit]