nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banjara has quit [Quit: Leaving.]
nettoweb has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
nettoweb has quit [Client Quit]
Juanchito has quit [Quit: Connection closed for inactivity]
benlieb has quit [Quit: benlieb]
stardiviner has joined #ruby
<wkoszek>
shevy: Thanks man. Will check #rack. Wrt. middleman: I use it for my website https://circleci.com/gh/wkoszek/me/70, and I added 1 article the same way as always, and it is not picked up.
otacon- has joined #ruby
ramfjord has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
Timba-as has quit [Ping timeout: 260 seconds]
<wkoszek>
So I did simple debugging: copied the content from YYYYMMDD-new-article-here.md to YYYYMMDD-existing-....md and it rendered OK.
kidoz_ has joined #ruby
<wkoszek>
(this eliminated my suspicionnthat I got frontmatter messed up). Then I copied existing article to a new file, changed the date in the frontmatter and it still doesn't render.
Sembei has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
neanderslob has joined #ruby
Alina-malina has joined #ruby
pepperbreath has quit [Ping timeout: 240 seconds]
pepperbreath has joined #ruby
m4rCsi has quit [Read error: Connection reset by peer]
Morrolan has quit [Ping timeout: 240 seconds]
m4rCsi has joined #ruby
cantaberry has joined #ruby
kidoz has quit [Ping timeout: 240 seconds]
tockitj has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
Pisuke has quit [Ping timeout: 240 seconds]
reprazent has quit [Ping timeout: 240 seconds]
tockitj has joined #ruby
Morrolan has joined #ruby
reprazent has joined #ruby
hfp_work has quit [Ping timeout: 252 seconds]
SCHAAP137 has joined #ruby
firoxer has quit [Ping timeout: 252 seconds]
redlegion has quit [Ping timeout: 252 seconds]
devoldmx has joined #ruby
firoxer has joined #ruby
_djbkd has joined #ruby
djbkd has quit [Ping timeout: 252 seconds]
edwardly has quit [Ping timeout: 252 seconds]
renderful has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
ruisantos has quit [Ping timeout: 244 seconds]
Biohazard has quit [Ping timeout: 252 seconds]
Newtonianb has joined #ruby
Musashi007 has quit [Quit: Musashi007]
CrazyEddy has quit [Ping timeout: 252 seconds]
chrisarcand has quit [Ping timeout: 252 seconds]
ruisantos has joined #ruby
howdoico1 has quit [Ping timeout: 256 seconds]
jgt1 has joined #ruby
chrisarcand has joined #ruby
snockerton has quit [Quit: Leaving.]
devoldmx has quit [Ping timeout: 240 seconds]
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Biohazard has joined #ruby
redlegion has joined #ruby
allcentury has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hfp_work has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
jgt1 has quit [Ping timeout: 240 seconds]
jxv has quit [Quit: Leaving]
CrazyEddy has joined #ruby
hinbody has quit [Quit: leaving]
bruno- has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
bnagy has quit [Ping timeout: 240 seconds]
jso has quit [Ping timeout: 240 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I don't like that javascript has a monopoly :(
bigmac has quit [Ping timeout: 268 seconds]
<pwnd_nsfw>
Do something about it
barhum2013 has quit [Quit: barhum2013]
michael_mbp has joined #ruby
eminencehc has quit [Remote host closed the connection]
sp4rrow has joined #ruby
glundgren has quit []
jackjackdripper has quit [Quit: Leaving.]
<shevy>
yeah, I will single-handedly change the world
freerobby has joined #ruby
<ramfjord>
java 8 has at least added a lot of good new features
hashrocket has quit [Quit: Connection closed for inactivity]
<ramfjord>
default method implementation on interfaces (mixins), lambdas
<ckuhn>
Still sucks to write
<shevy>
hehehe
AckZ has quit []
<Ox0dea>
ckuhn: I would wager more Java code has been auto-generated/tab-completed than hand-written.
<Ox0dea>
By a sizeable margin, even.
<ramfjord>
I think in my experience it's about 50-50
<Ox0dea>
ramfjord: Sounds like you need a better IDE. :P
<ckuhn>
Ox0dea: Agreed
<ramfjord>
but the pros can probably autogenerate a lot more
JDiPierro has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<baweaver>
If your language requires an IDE, something is horribly wrong
<ckuhn>
My Java build setup is so fckd that I can't build it successfully outside of eclipse
<baweaver>
IntelliJ tends to be a nicer editor
bigmac has joined #ruby
infernix has joined #ruby
<ramfjord>
Yeah, I really miss my Gemfile.lock files in ivy
<ramfjord>
configuring things to take the latest version is dangerous - every time you build it will update it
<shevy>
ckuhn this has always scared me in java... that I need an IDE...
<ckuhn>
baweaver: Except I can't change as of now lol
<ckuhn>
shevy: ya it really sucks
<ckuhn>
I have a entry level CS class that's in Java
EllisTAA has joined #ruby
sphex has quit [Ping timeout: 264 seconds]
<shevy>
ewww so you must pass some java exam right
<ckuhn>
shevy: probably. but im not an entry level java programmer
<Ox0dea>
ckuhn: You should see what happens if you write your assignment in a JVM-backed language and just submit the disassemby.
<Ox0dea>
*disassembly
<Ox0dea>
Even better, run it through something that tries to reconstruct it into Java. :P
<ckuhn>
Ox0dea: we have to submit eclipse projects. like wtf
tkuchiki has quit [Remote host closed the connection]
<Ox0dea>
That's not necessarily a deal-breaker.
paradisaeidae has joined #ruby
swgillespie has joined #ruby
<ckuhn>
Will eclipse compile any other jvm languages otb?
<Ox0dea>
I would imagine so.
SCHAAP137 has quit [Quit: Leaving]
hays_ is now known as hays
<Ox0dea>
Damn, it looks like not; are plugins strictly off-limits?
<ckuhn>
Obviously with plugins but not sure about fresh install
<ckuhn>
Yes probably
<Ox0dea>
Probably strictly?
<ckuhn>
I think im gonna ask if I can just be a TA
lxsameer has quit [Quit: Leaving]
<ckuhn>
Ya, no plugins
<Ox0dea>
You want to read code instead of write it?
<ckuhn>
Maybe I could submit binaries tho
<Ox0dea>
Masochism.
<ckuhn>
I like teaching people. so maybe
bffff_ has joined #ruby
<Ox0dea>
I also like teaching, but I've never been able to pinpoint precisely why.
<ckuhn>
Agreed. Helps you learn better too
<Ox0dea>
Well, it solidifies what you've already learned.
<ckuhn>
Anyone else have that one IT guy that they hate?
bigmac has quit [Ping timeout: 250 seconds]
<baweaver>
It will, at least with Scala
sphex has joined #ruby
Soda has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
Yzguy has quit [Quit: Zzz...]
Soda has quit [Remote host closed the connection]
<ckuhn>
baweaver: How?
DanKnox has quit [Ping timeout: 250 seconds]
sphex has quit [Remote host closed the connection]
<baweaver>
Plugins
workmad3 has joined #ruby
momon has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
evanjs has joined #ruby
howdoico1 has joined #ruby
momon has left #ruby [#ruby]
benlovell has joined #ruby
chris6131 has joined #ruby
baweaver has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
bigmac has joined #ruby
<chris6131>
Hi y'all. I've been using rjr to do RPC over websockets but have a service where I need to use TLS (wss://) which AFAICT the underlying em-websocket library does not support. Can anyone recomend an alternative RPC over websockets implementation I should try? Having trouble searching one out
Newtonianb has quit [Ping timeout: 250 seconds]
<ckuhn>
baweaver: no plugins
evanjs has quit [Remote host closed the connection]
bkulbida has joined #ruby
blackmesa has joined #ruby
benlovell has quit [Ping timeout: 244 seconds]
PaulCapestany has quit [Quit: .]
jenrzzz has joined #ruby
sphex has joined #ruby
towski_ has quit [Remote host closed the connection]
<chris6131>
Ox0dea: Well I'll be damned. Thank you and sorry for the silliness.
* chris6131
will try this immediately
howdoicomputer has joined #ruby
ckuhn_ has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
howdoico1 has quit [Ping timeout: 255 seconds]
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
doritostains has quit [Quit: WeeChat 1.1.1]
howdoico1 has joined #ruby
ckuhn has quit [Ping timeout: 255 seconds]
benlieb has joined #ruby
<chris6131>
Ox0dea: That is for accepting TLS connections. I'm concerned with this "At this time, the wss (WebSocket over SSL) protocol is not supported." (https://github.com/mwylde/em-websocket-client) I take back my silliness remark - it was LATE last night, but I was not hallucinating :)
ckuhn_ has quit [Read error: Connection reset by peer]
<chris6131>
em-websocket != em-websocket-client, though :P
howdoicomputer has quit [Ping timeout: 240 seconds]
arescorpio has joined #ruby
<Ox0dea>
chris6131: Ah, that's unfortunate.
<Ox0dea>
How about Faye?
devoldmx has joined #ruby
<chris6131>
Yeah I was really liking rjr. If I can't find anything maybe I can just try adding it.
<chris6131>
I saw Faye but it looks like I'd need something else to add the json-rpc unless I wanted to rewrite that
<chris6131>
Thanks for the suggestions
v0n has quit [Ping timeout: 256 seconds]
v0n has joined #ruby
michaeldeol has quit [Ping timeout: 240 seconds]
cb_ has quit [Remote host closed the connection]
gambl0re has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
renderful has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
weemsledeux has joined #ruby
<shevy>
hmm
maletor has joined #ruby
NeverDie has joined #ruby
casadei_ has joined #ruby
<shevy>
what ways exist to disable checks like: class Foo; end; puts 'it exists' if Object.const_defined? :Foo
<shevy>
doing Foo = nil in irb afterwards does not seem to work
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<toretore>
what do you mean disable?
<toretore>
make it return false?
<shevy>
I guess to get completely rid of that constant
<toretore>
remove_const
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
<shevy>
oh yes... I tried Object.const_remove :D
renderful has quit [Ping timeout: 240 seconds]
rodfersou has quit [Quit: leaving]
maletor has quit [Client Quit]
casadei_ has quit [Ping timeout: 246 seconds]
keen__ has quit [Read error: Connection reset by peer]
keen__ has joined #ruby
jgt1 has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
<Ox0dea>
shevy: #const_{g,s}et led you astray! :/
workmad3 has joined #ruby
havenwood has joined #ruby
<shevy>
yeah
devbug has joined #ruby
evanjs has joined #ruby
j4cknewt has joined #ruby
jgt1 has quit [Ping timeout: 240 seconds]
ruby-lang691 has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
eminencehc has joined #ruby
<Ox0dea>
shevy: #const_remove won't actually destroy the class.
workmad3 has quit [Ping timeout: 252 seconds]
mary5030 has quit [Remote host closed the connection]
iamninja has quit [Read error: Connection reset by peer]
bmurt has quit []
iamninja has joined #ruby
gener1c_ has quit [Ping timeout: 240 seconds]
<nofxx>
gambl0re, REPL?
<nofxx>
irb
<nofxx>
Ox0dea, yo!
benlovell has quit [Ping timeout: 252 seconds]
braincrash has quit [Quit: bye bye]
workmad3 has quit [Ping timeout: 252 seconds]
<gambl0re>
what?
<gambl0re>
irb?
deavid has quit [Ping timeout: 244 seconds]
tjbiddle has quit [Quit: tjbiddle]
benlieb has quit [Quit: benlieb]
braincrash has joined #ruby
<havenn>
gambl0re: It depends on the implementation of Ruby. The reference implementation is YARV (Yet Another Ruby VM) or there's JRuby on the JVM or Rubinius with an LLVM-base JIT, etc.
<havenn>
gambl0re: man irb
<havenn>
(If you really don't know what irb is?)
ddrmanxbxfr has quit [Quit: This computer has gone to sleep]
favadi has joined #ruby
banjara has quit [Quit: Leaving.]
<gambl0re>
i know irb
<havenn>
ah, k
<gambl0re>
nodejs is a run time environment for javscript?
aghalarp has joined #ruby
<havenn>
gambl0re: So Ruby has multiple runtime environments. I mentioned some prominent ones above.
beauby has joined #ruby
aghalarp has quit [Max SendQ exceeded]
<gambl0re>
oh ok, i guess those werent the answers i was looking for
j4cknewt has joined #ruby
<havenn>
gambl0re: So like the JRE (Java Runtime Environment).
<shevy>
these are not the passports you are looking for *waves hand like a jedi*
<gambl0re>
the guys in #web said that Ruby MRI was ruby's runtime environment..
<rgb-one>
Ox0dea: is there a way to use product on that dataset?
jenrzzz has quit [Ping timeout: 260 seconds]
shadoi has quit [Quit: Leaving.]
RobertBirnie has quit [Ping timeout: 265 seconds]
minimalism has joined #ruby
<rgb-one>
Ox0dea: Without having to specify them in the form %w"A a @".product(%w"B b 8", %w"B b 8", %w"A a @") where I have to explicitly set the arrays to combine
<rgb-one>
?
gix has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
rgb-one: Of course there is.
dima_ has joined #ruby
<Ox0dea>
They're just values, after all.
<Ox0dea>
rgb-one: Do you know how to go from "Aa@" to %w"A a @"?
aghalarp has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<rgb-one>
Ox0dea: split("")
<Ox0dea>
That'd do, but we have the #chars method to say the same thing slightly more meaningfully.
j4cknewt has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 268 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
A slightly neater approach presents itself if you're interested in the first and the rest, and you don't mind mutating the receiver.
VeryBewitching has quit [Quit: Konversation terminated!]
<Ox0dea>
The #shift method is like #first, with the side effect that it actually removes the element from the Array before returning it.
j4cknewt_ has quit [Read error: Connection reset by peer]
tejasmanohar has joined #ruby
jgt1 has quit [Ping timeout: 272 seconds]
j4cknewt_ has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
HAL2328 has joined #ruby
pontiki has joined #ruby
jobewan has quit [Ping timeout: 268 seconds]
j4cknewt_ has quit [Remote host closed the connection]
mghaig has joined #ruby
wldcordeiro has joined #ruby
fedexo has joined #ruby
tkuchiki has joined #ruby
banister_ has joined #ruby
mghaig has quit [Client Quit]
tlolczyk has joined #ruby
deavid has joined #ruby
Lucky__ has joined #ruby
Wolland has joined #ruby
Wolland has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
dseitz has quit [Max SendQ exceeded]
pen has quit [Remote host closed the connection]
dseitz has joined #ruby
<tlolczyk>
I'm having trouble doing something. I want to take a string and create a new string. The old string will have a number in it. I want to replace the with a right justified version.
<tlolczyk>
Example: I want in a program: to take the string "foo :appears in line 15 of x.txt" I'm assuming that "foo :" is already justified I want 15 justified on 4 characters.
<pontiki>
up above, if rest is an Array, how can you apply .split to it?
pen has quit [Remote host closed the connection]
pen has joined #ruby
HAL2328 has quit [Quit: Leaving]
<Ox0dea>
rgb-one: See how #sum3 expects three separate arguments? I was able to use the elements of the Array as individual arguments with * (the splat operator).
roxtrong_ has joined #ruby
roxtrongo has quit [Ping timeout: 255 seconds]
beauby has quit [Ping timeout: 240 seconds]
<rgb-one>
Ox0dea: :)
<Ox0dea>
rgb-one: Did you win?!
bb010g has joined #ruby
<rgb-one>
Ox0dea: Big time
eminencehc has quit [Remote host closed the connection]
<Ox0dea>
Yus!
benlovell has joined #ruby
cb_ has quit [Remote host closed the connection]
<rgb-one>
hash = {a: %w'A a @', b: %w'B b 8'}; acronym = "aabb"; leet = acronym.chars; leet.map! {|y| y.to_sym}; x = hash.values_at *leet; first, *rest = x; first.product(*rest).map(&:join)
<rgb-one>
>> hash = {a: %w'A a @', b: %w'B b 8'}; acronym = "aabb"; leet = acronym.chars; leet.map! {|y| y.to_sym}; x = hash.values_at *leet; first, *rest = x; first.product(*rest).map(&:join)
<ruboto>
rgb-one # => ["AABB", "AABb", "AAB8", "AAbB", "AAbb", "AAb8", "AA8B", "AA8b", "AA88", "AaBB", "AaBb", "AaB8", "Aa ...check link for more (https://eval.in/437110)
<Ox0dea>
rgb-one: Looks good. <3
<rgb-one>
Ox0dea: :D
<Ox0dea>
Instead of extracting with `first, *rest`, you could just say `x.shift.product(x)`.
<pxlsinmotion>
i assume regex is the best way to solve this. i've been attempting to use StringScanner and only put myself in a worse condition that i started i think lol
<baweaver>
pxlsinmotion: ?xy
<baweaver>
pxlsinmotion: !xy
<Ox0dea>
?xy pxlsinmotion
<ruboto>
pxlsinmotion, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<apeiros>
it doesn't handle your notation, but you should be able to use it as a starting point for your parser
SCHAAP137 has joined #ruby
duncannz has joined #ruby
<apeiros>
if you can change the serialization however, I'd strongly recommend that over rolling your own.
psy_ has joined #ruby
<pxlsinmotion>
the problem i have is the text file i'm parsing is formated as above and when i try using JSON.parse it fails because the key 5 does not have the quotes around the time and causes the parser to fail
<Ox0dea>
pxlsinmotion: Why doesn't it have quotes around it?
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
<pxlsinmotion>
i wish i knew....client provided an export of the data and this is how it's formatted guessing whoever created the internal program they are using didn't think to wrap dates with quotes on export
lxsameer has joined #ruby
<apeiros>
smack your client with a cluebat
<Ox0dea>
pxlsinmotion: Do you know their current whereabouts?
<apeiros>
tell them the cost difference between a custom rolled format and using a proper standard
<pxlsinmotion>
trust me they are going to pay extra for me dealing with this insanity
<pxlsinmotion>
thanks for the help. after i find the developer that made my life hell today i'm going to brush up on my regex i find myself needing it more and more
<MichaelJJackson>
hello little boys
<Ox0dea>
!cops
blackmesa has joined #ruby
<apeiros>
don't drop the baby!
<karapetyan>
Ox0dea: is thx is not ok? :)
<Ox0dea>
pxlsinmotion: What are value_1, &c.?
VeryBewitching has quit [Quit: Konversation terminated!]
<baweaver>
No?
<baweaver>
Fine
<baweaver>
!mute MichaelJJackson
drewvanstone has joined #ruby
<Ox0dea>
karapetyan: Are you kidding? It even has its own logo.
<pxlsinmotion>
they are string values like first and last name
<karapetyan>
;)
<karapetyan>
))))
firstdayonthejob has quit [Ping timeout: 268 seconds]
weemsledeux has joined #ruby
drewvanstone has quit [Ping timeout: 250 seconds]
<Ox0dea>
>> a, b, c = while true; break 1, 2, 3; end; a + b + c
karapetyan has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
weemsledeux has quit [Max SendQ exceeded]
<Ox0dea>
pxlsinmotion: In that case, StringScanner isn't the worst approach.
pawnbox has quit [Remote host closed the connection]
bronson has joined #ruby
pawnbox has joined #ruby
scoot has joined #ruby
<pxlsinmotion>
Ox0dea: thanks i'll keep going down the StringScanner route to solve the problem. after typing out my problem i think i know how to solve it now
<maasha>
I am experiencing what appears to be a memory leak or a problem with GC. I am filtering huge amounts of strings using a hash lookup to pick candidates. Ruby 2.1.2p95
<maasha>
Memory use exeeds 6Gb
prosodyC has joined #ruby
drewvanstone has quit [Ping timeout: 268 seconds]
tomphp has joined #ruby
<maasha>
The hash is build from an ascii table ~60M and the data is streamed.
zipkid has joined #ruby
<apeiros>
wow, what's with that K-Line orgy?
<baweaver>
probably blacklisted part of DO again by accident
<baweaver>
they do that.
tkuchiki has joined #ruby
<apeiros>
maasha: with such bugs it's advisable to start by upgrading to at least the newest patchlevel of the version you're using
arup_r has quit [Remote host closed the connection]
<baweaver>
maasha: upgrade to 2.2.x if possible, see if it still happens.
<baweaver>
GC improvements were made.
lipoqil has joined #ruby
<maasha>
yeah, I am compiling and reading what Sam Saffron has blogged on
<baweaver>
fairly sure that was on 2.0.x, but I'd have to look
<baweaver>
and now is most certainly time for bed.
<baweaver>
'night.
<apeiros>
n8 baweaver
baweaver has quit [Remote host closed the connection]
<maasha>
So I am also using Set and wonder if it may be better to use Google Hash where GC is disabled.
skade has joined #ruby
cb_ has quit []
blackmesa has quit [Ping timeout: 252 seconds]
scoot has quit [Remote host closed the connection]
skade has quit [Client Quit]
jschmid has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 268 seconds]
wldcordeiro has joined #ruby
scoot has joined #ruby
bruno- has joined #ruby
hadrig has joined #ruby
anisha has joined #ruby
krainboltgreene has joined #ruby
Hounddog has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
startupality has joined #ruby
ndrei has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
pecpec has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt1 has quit [Ping timeout: 246 seconds]
Hounddog has joined #ruby
blackmesa has joined #ruby
nanoz has joined #ruby
Technodrome has quit [Quit: Technodrome]
wldcordeiro has joined #ruby
michael_mbp has quit [Excess Flood]
startupality has quit [Quit: startupality]
michael_mbp has joined #ruby
SenpaiSilver has joined #ruby
<maasha>
Hm, Set is also 25% slower than Hash, really?
blaxter has joined #ruby
michael_mbp has quit [Excess Flood]
ndrei has quit [Ping timeout: 255 seconds]
devoldmx has joined #ruby
rdark has joined #ruby
Kendos-Kenlen has joined #ruby
bigmac has quit [Ping timeout: 260 seconds]
doublemalt_ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 265 seconds]
michael_mbp has joined #ruby
<apeiros>
maasha: Set uses a Hash
<apeiros>
so it's Hash performance + overhead
Zai00 has joined #ruby
<maasha>
apeiros: but that is a lot of overhead :o(
devbug has quit [Remote host closed the connection]
<maasha>
apeiros: I would expect it could be optimized to run at the same speed as Hash?
<apeiros>
sure
krisquigley has joined #ruby
kith_ is now known as kith
<apeiros>
reimplement it in C using the Hash source
<maasha>
apeiros: hm, wonder if that is a feature request @ rubylang?
arup_r has joined #ruby
youngbaks has joined #ruby
<apeiros>
go ahead and implement it?
TheHodge has joined #ruby
weemsledeux has joined #ruby
<adaedra>
Bonjour
<maasha>
apeiros: I wonder if I could.
beauby has joined #ruby
<apeiros>
you'll know once you tried :)
wldcordeiro has quit [Ping timeout: 240 seconds]
Zai00 has quit [Client Quit]
dmolina has joined #ruby
<maasha>
apeiros: how wise
<maasha>
:o)
workmad3 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
merlinp has joined #ruby
scoot has quit []
<maasha>
apeiros: looking at the source in set.rb it looks sort of OK, until you get to SortedSet
beauby has quit [Ping timeout: 265 seconds]
lele|w has quit [Ping timeout: 240 seconds]
<maasha>
apeiros: of cause it is all ruby, and would benefit from using the C API
workmad3 has quit [Ping timeout: 250 seconds]
hmnhf has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
quazimodo has joined #ruby
DrCode has quit [Remote host closed the connection]
hmnhf has quit [Remote host closed the connection]
hmnhf has joined #ruby
bigmac has joined #ruby
leafybasil has quit [Remote host closed the connection]
sectoral has joined #ruby
leafybasil has joined #ruby
maasha has quit [Ping timeout: 246 seconds]
solocshaw1 has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
<yorickpeterse>
morning
rattatmatt has quit [Quit: Leaving]
<sectoral>
morning
andikr has joined #ruby
marr has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
hmnhf has quit [Remote host closed the connection]
hmnhf has quit [Remote host closed the connection]
hmnhf has joined #ruby
<yottanami>
apeiros, I searched there but there is no active WSDL client project
<apeiros>
yottanami: then maybe patch wsdl import support into savon
beauby has joined #ruby
<yottanami>
apeiros, So you think using Net::HTTP is bad idea?
<apeiros>
it depends
<yottanami>
to?
<apeiros>
on ;-)
<yottanami>
:D
<yottanami>
on
<apeiros>
it depends on your requirements, your context
<yottanami>
apeiros, I just needs to send an Parlay 2 XML and recieve an XML result to an API
<apeiros>
I use hand-built clients for the SOAP APIs we serve. but mostly for two reasons: savon wasn't multi-tenancy capable back when I needed it, and many of the SOAP services we interact with have, lets say, bad wsdls
codenapp_ has joined #ruby
<apeiros>
so it's possible to do. but it can be annoying and a lot of work
<apeiros>
whether it's more work to make savon do what you need or build a custom soap client depends on the specifics of your task.
jishankai has joined #ruby
shredding has joined #ruby
hmnhf_ has joined #ruby
beauby has quit [Ping timeout: 240 seconds]
codenapper has quit [Ping timeout: 264 seconds]
hmnhf has quit [Ping timeout: 268 seconds]
jishankai has quit [Remote host closed the connection]
beauby has joined #ruby
<yottanami>
apeiros, As I checked unstable version of Savon can support WSDL imports
<yottanami>
Is it risky to use it?
jishankai has joined #ruby
jishankai has left #ruby [#ruby]
<apeiros>
yottanami: no idea
leafybasil has joined #ruby
hmnhf__ has joined #ruby
jgt1 has joined #ruby
yosafbridge has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
krz has joined #ruby
hmnhf_ has quit [Ping timeout: 244 seconds]
beauby has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby
hmnhf has joined #ruby
codenapper has joined #ruby
yosafbridge has joined #ruby
ByronJohnson has joined #ruby
allomov has joined #ruby
codenapp_ has quit [Ping timeout: 268 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
platzhirsch has joined #ruby
hmnhf__ has quit [Ping timeout: 264 seconds]
hmnhf_ has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
exadeci has joined #ruby
beauby has joined #ruby
yardenbar has joined #ruby
hmnhf has quit [Ping timeout: 264 seconds]
hmnhf_ has quit [Remote host closed the connection]
hmnhf_ has joined #ruby
mikecmpbll has joined #ruby
mrityunjay has joined #ruby
subshad has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
beauby has quit [Ping timeout: 268 seconds]
ndrei has joined #ruby
hmnhf__ has joined #ruby
<yottanami>
I am trying to use Savon unstable version like this : client = Savon.client(wsdl: "URL")
devoldmx has joined #ruby
<yottanami>
and I got this error NoMethodError: undefined method `client' for Savon:Class
<yottanami>
But it works in stable version
<apeiros>
yottanami: so the API changed
Voker57 has joined #ruby
<apeiros>
generate the docs for your current version and see how it works there
hmnhf__ has quit [Remote host closed the connection]
hmnhf__ has joined #ruby
hmnhf_ has quit [Ping timeout: 264 seconds]
Igorshp has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
jgt1 has quit [Quit: WeeChat 1.2]
jgt has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
hmnhf__ has quit [Remote host closed the connection]
hmnhf__ has joined #ruby
ELCALOR has joined #ruby
karapetyan has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
pawnbox has quit [Remote host closed the connection]
hmnhf__ has quit [Remote host closed the connection]
hmnhf__ has joined #ruby
c0m0 has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocshaw has quit [Ping timeout: 246 seconds]
karapetyan has quit [Remote host closed the connection]
<shevy>
long live ruby!
hmnhf__ has quit [Remote host closed the connection]
hmnhf__ has joined #ruby
dhjondoh has joined #ruby
hmnhf has joined #ruby
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
charliesome has joined #ruby
<tbuehlmann>
... that shalt be king hereafter!
postmodern has quit [Quit: Leaving]
<tbuehlmann>
wait, wrong play
hmnhf__ has quit [Ping timeout: 265 seconds]
anisha has quit [Quit: Leaving]
hadrig has quit []
hadrig has joined #ruby
OrbitalKitten has joined #ruby
hmnhf_ has joined #ruby
Gnomethr_ has joined #ruby
Gnomethr_ is now known as R\vv\c
suchness has joined #ruby
Gnomethrower has quit [Disconnected by services]
robinboening has joined #ruby
pontiki has joined #ruby
Gnomethrower has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
R\vv\c has quit [Client Quit]
hmnhf has quit [Ping timeout: 255 seconds]
hmnhf__ has joined #ruby
stamina has joined #ruby
<yottanami>
I am trying to use Savon and I got this error client.operations NoMethodError: undefined method `element_children' for nil:NilClass from /home/.../wasabi-3.5.0/lib/wasabi/parser.rb:311:in `sections'
<yottanami>
How should I fix it?
cbednarski has joined #ruby
apipkin has joined #ruby
Kharma has joined #ruby
danzilio has joined #ruby
jpinnix______ has joined #ruby
frode15243 has joined #ruby
<suchness>
yottanami: You should vim /home/.../wasabi-3.5.0/lib/wasabi/parser.rb and look at line 311 for what would be nil.
bffff_ has joined #ruby
daxroc has joined #ruby
Eleeleth has joined #ruby
youngbaks has quit [Ping timeout: 240 seconds]
alekst_ has joined #ruby
pontiki has quit [Ping timeout: 252 seconds]
glowcoil has joined #ruby
dmoe has joined #ruby
knowtheory has joined #ruby
cbetta has joined #ruby
hmnhf_ has quit [Ping timeout: 250 seconds]
hmnhf__ has quit [Remote host closed the connection]
<suchness>
yottanami: So not only have you not even attempted to look at this yourself in the first place, you don't even care enough to check the right line number?
Guest85414______ has joined #ruby
twodayslate has joined #ruby
bcavileer has joined #ruby
benlakey has joined #ruby
bryancp has joined #ruby
makufiru has joined #ruby
petems has joined #ruby
ELLIOTTCABLE has joined #ruby
lacrosse has joined #ruby
rfv has joined #ruby
avdi has joined #ruby
pfg has joined #ruby
keyvan has joined #ruby
nyandoge has joined #ruby
pmarreck has joined #ruby
pizzaops has joined #ruby
ggherdov has joined #ruby
bb010g has joined #ruby
vcoinminer has joined #ruby
deimos_ has joined #ruby
chrisseaton has joined #ruby
schaary has joined #ruby
ArchRogem has joined #ruby
<yottanami>
suchness, I taged wrong number on github but I am reading the correct lines in local, it seams document.root is nill
djbender has joined #ruby
calleerlandsson has joined #ruby
akitada has joined #ruby
<suchness>
yottanami: You just said you couldn't figure it out.
<platzhirsch>
apeiros: just thinking.. how you said the bijective_encode and bijective_decode is redundant in the code I linked yesterday
krz has quit [Ping timeout: 240 seconds]
<platzhirsch>
is it though? It gives out information that the method used is actually bijective, where else would you put that, except let's say docs
sanjayu has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 260 seconds]
chills42 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tvw has joined #ruby
sanjayu has joined #ruby
nettoweb has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<shevy>
what the hell is bijective, is this like .inject
soc42 has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
crack_user has joined #ruby
mondayrain has quit [Ping timeout: 250 seconds]
<apeiros>
platzhirsch: encode implies it can be decoded and vice versa
<platzhirsch>
fair enough
<platzhirsch>
shevy: mathematical term
<platzhirsch>
means both directions
<shevy>
aha
<apeiros>
shevy: basically a function f(x) is bijective iff a function f'(y) exists for all x with x == f'(f(x))
<apeiros>
or at least that's how I remember. been a while :D
tockitj has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
greenarrow has joined #ruby
bffff_ has quit [Quit: Connection closed for inactivity]
lulzmachine has joined #ruby
skweek has quit [Remote host closed the connection]
howdoico1 has quit [Ping timeout: 240 seconds]
favadi has joined #ruby
rurik has joined #ruby
allcentury has joined #ruby
duncannz has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
tockitj has joined #ruby
rodfersou has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nateberkopec has joined #ruby
andikr has quit [Ping timeout: 268 seconds]
prestorium has joined #ruby
andikr has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
rurik has quit [Ping timeout: 265 seconds]
sylvain31 has joined #ruby
rurik has joined #ruby
iateadonut has quit [Ping timeout: 246 seconds]
framling has quit [Ping timeout: 260 seconds]
chills42 has quit [Remote host closed the connection]
karapetyan has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
<sylvain31>
Hi, I would like to unittest my ruby task in my Rakefile. What lib must I require in my ruby file which wrap my task's code into a class to have access to rake method over filesystem like rm
nateberkopec has quit [Quit: Leaving...]
<sylvain31>
I got: NoMethodError(<undefined method `rm' for RCommand:Class>)
<adaedra>
From where does this to_datetime comes from
<adaedra>
Ah, rails.
<adaedra>
Looks like it wants dd/mm/yyyy, and you have mm/dd/yyyy, arup_r
schlubbi has joined #ruby
beauby has quit [Ping timeout: 240 seconds]
<sylvain31>
rake-10.4.2 may add
juzmach has left #ruby [#ruby]
pecpec has quit [Remote host closed the connection]
tjbiddle has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
<arup_r>
No. adaedra I have what I shown you
<adaedra>
?
mikecmpbll has joined #ruby
<arup_r>
one min
<apeiros>
and that would be why you don't use DateTime.parse (which backs String#to_datetime)
<apeiros>
arup_r: yes, you have what you've shown. and that's mm/dd/yyyy - unless you're telling us that there's a month 24.
dhjondoh has joined #ruby
<adaedra>
(Also known as the "America wtf"-format)
<adaedra>
:p
benlovell has quit [Ping timeout: 250 seconds]
<apeiros>
aka "who needs big- or little-endian?!?"
<apeiros>
-format
<karapetyan>
guys
<apeiros>
yo girl?
<karapetyan>
oh
<karapetyan>
folks!
<karapetyan>
sorry ! :)
stan has quit [Ping timeout: 246 seconds]
<adaedra>
yo ga!
<karapetyan>
i really don't understand difference between block.call and yield
jenrzzz has joined #ruby
<apeiros>
karapetyan: one requires a variable (block) which references an object which responds to call
<apeiros>
the other works with the block passed to the method
<certainty>
moin
<arup_r>
apeiros: You are right.. wrong paste. But actuall issue is "09/24/2015 09:59".to_datetime
<apeiros>
there's no *functional* difference between `def foo(&b); b.call; end` and `def foo; yield; end`. it's a difference in performance.
<apeiros>
arup_r: you may want to read what you just wrote.
<arup_r>
dunno what you meant
<adaedra>
arup_r: How is the 24th month called?
<certainty>
apeiros: what's the performance difference?
chills42 has quit [Remote host closed the connection]
jeffreylevesque has joined #ruby
<apeiros>
certainty: no object allocated, no method call overhead
<ccooke>
arup_r: the problem is that you are using the US date layout, with the day between month and year, while to_datetime uses the more common international format, and expects the month to be in the middle
<apeiros>
certainty: oh, and no object GC'ed
<jeffreylevesque>
whats the most used ruby linter?
<arup_r>
adaedra: leave that part,, to_datetime don't accept the format I gave
<ccooke>
to_datetime thinks that you want the 9th day of the 24th month
<arup_r>
ccooke: U are right
<certainty>
apeiros: ruby checks if a block yields and only then creates the proc, whereas an explicit argument is always allocated?
but3k4 has joined #ruby
<adaedra>
arup_r: because there are not 24 months in a year
<apeiros>
certainty: it doesn't create a proc at all
<arup_r>
ccooke: I need to format it first using strptime
<apeiros>
certainty: it only creates one if you have def foo(&block)
<arup_r>
then it will be done
<jhass>
jeffreylevesque: rubocop I'm afraid
<apeiros>
at that point the difference is only the method call vs. syntax (yield isn't a method)
<apeiros>
certainty: I don't have any specific resources, sorry. last I've seen it discussed in detail was in some rails issue years ago.
youngbaks has joined #ruby
<certainty>
apeiros: thanks. I'll do a search and dig deeper
codecop has quit [Remote host closed the connection]
<apeiros>
certainty: and of course, this applies to MRI. any other implementation may not have that difference.
stan has joined #ruby
<certainty>
apeiros: yeah I assumed that
<jeffreylevesque>
yorickpeterse: can i use rubocop to lint a Puppetfile, what's the syntax?
<yorickpeterse>
No idea, I don't use rubocop
<jeffreylevesque>
`rubocop Puppetfile`
karapetyan has quit [Remote host closed the connection]
<jeffreylevesque>
ok
syath has joined #ruby
Rollabunna has joined #ruby
<shevy>
isn't a puppetfile just ruby code anyway
karapetyan has joined #ruby
<jeffreylevesque>
yeah
schlubbi has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
karapetyan has quit [Ping timeout: 240 seconds]
iateadonut has joined #ruby
mrityunjay has quit [Quit: Leaving]
schlubbi has joined #ruby
rikkipitt has joined #ruby
<sylvain31>
in Rakefile I can use filesytem method wrapper, like rm 'filename'. Do you know which lib is providing those method? If I would use such method outside of a Rakefile.
<adaedra>
FileUtils
but3k4 has quit [Read error: Connection reset by peer]
y0da has joined #ruby
<jhass>
sylvain31: method(:rm).owner
<adaedra>
It's in the stdlib
workmad3 has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
pwnd_nsfw has joined #ruby
<arup_r>
boring!
<adaedra>
?
<shevy>
people know rakefiles but no longer core ruby :)
<certainty>
apeiros: ok found a somewhat old thread, but it doesn't seem to have changed since then. I have no idea about the internal reification of methods in mri, but i can see that just calling some code which is probably really just a function call, costs less memory wise than haveing to instantiate/allocate a full proc object with all it needs
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
elperdut has joined #ruby
elperdut has quit [Client Quit]
<certainty>
oh sorry s/methods/blocks/
<yorickpeterse>
certainty: generally you just want to use `yield` without &block
<yorickpeterse>
&block is useful when you want to pass the block to another method
ldnunes has joined #ruby
krisquigley has quit [Remote host closed the connection]
<certainty>
yorickpeterse: yepp. sometimes i can't though. for example in recursive methods
rurik has quit [Read error: Connection reset by peer]
elperdut has joined #ruby
Xiti has quit [Ping timeout: 252 seconds]
rurik has joined #ruby
rurik has quit [Changing host]
rurik has joined #ruby
greenarrow has quit [Quit: 500]
<sylvain31>
jhass, thanks no mention of rm yet. I must check further in the inheritance path, thanks for the hint
elperdut has quit [Client Quit]
jgt has quit [Ping timeout: 264 seconds]
<adaedra>
FileUtils
<[k->
Tempfile
benlovell has quit [Ping timeout: 246 seconds]
Xiti has joined #ruby
krz has quit [Ping timeout: 246 seconds]
iamninja has quit [Ping timeout: 246 seconds]
agent_white has quit [Quit: night]
emilkarl has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby
startupality has joined #ruby
xMopxShell has quit [Ping timeout: 240 seconds]
iceyec has quit [Remote host closed the connection]
bruno- has quit [Quit: Lost terminal]
devoldmx has joined #ruby
<shevy>
damn... does autoload make it harder to check against runtime errors when something is unavailable?
karapetyan has quit [Ping timeout: 250 seconds]
greenarrow has joined #ruby
shredding has joined #ruby
<shevy>
I suddenly get a LoadError from a line that in itself does not require anything
jeffreylevesque has quit [Ping timeout: 250 seconds]
<adaedra>
if you know how it works, no.
yqt has joined #ruby
<shevy>
from precisely something like: autoload :Foo, 'foo'
nateberkopec has joined #ruby
Klamber|ext has joined #ruby
karapetyan has joined #ruby
bruno- has joined #ruby
<shevy>
yeah... now I removed autoload, and the error message is different
<shevy>
uninitialized constant Foo
<shevy>
I should have listened to jhass
devoldmx has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
<Klamber|ext>
Hey! I recently (24 hours ago) started learning a bit of Ruby for some custom stuff on Jekyll. Now when I loop over some array caontaining for example pages then I get the error "cant convert nil to string". This is understandable but when I use to_s every string is as it should be. Why is that ?
Guest41422 has quit [Remote host closed the connection]
<jhass>
what line was raising that?
<suchness>
Klamber|ext: nil.to_s
ulak has joined #ruby
cornerman has joined #ruby
<Klamber|ext>
suchness: What do you mean ?
<terabytes>
.to_s
<jhass>
Klamber|ext: it's way easier to explain on your real code
arian0n has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
jgt has joined #ruby
<terabytes>
the var in nil... you don't can onvert nil to string
<Klamber|ext>
Heh. :D What I'm saying is that the array element is not empty.. but it complains and to_s outputs the string inside that element.
<suchness>
Klamber|ext: You would need to show your code. Presumably you are trying to use a method on the elements of the array that require the object to be a string. You also have a nil object in the array that is not a string, hence the error. When you call to_s on your nil, it turns it into a string.
ulak has quit [Client Quit]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto>
Klamber|ext, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<Klamber|ext>
Ok.
workmad3 has quit [Ping timeout: 255 seconds]
<sylvain31>
Thanks about FileUtils modules hint. I make it working, require 'fileutils' and also import method into current namespace with include FileUtils.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Klamber|ext>
I want to understand this in Ruby. When someting is nil in other languages it's usually really empty. Then this has to do something with "everything is object" mentality.
Xiti has quit [Quit: Xiti]
deject3d has quit [Quit: Computer has gone to sleep.]
krisquigley has joined #ruby
<shevy>
nil is an object too :)
<[k->
vondruch: zenspider is asleep
<shevy>
you can assume for the most part to just treat nil as false
rikkipitt has quit [Remote host closed the connection]
<vondruch>
[k-, np ... i can wait for answer :)
<shevy>
def initialize; @config = nil; load_config # may manipulate @config and set it to another value than nil
<shevy>
btw if you append to a string, you could use << rather than output +=
<shevy>
the += will create a new string object, << will just append to the existing string object
nanoz has quit [Ping timeout: 260 seconds]
<[k->
i think Ruby is smarter in manipulating strings now
futilegames has joined #ruby
<[k->
i think Ruby actually shares the string
<[k->
am i right?
andyrs has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
<Klamber|ext>
shevy: goot to know..
Salehi has joined #ruby
<Klamber|ext>
So yes, nil is an object, but how dows nil contain my string then ?
<jhass>
Klamber|ext: so page.data["title"] may return nil
<Klamber|ext>
jhass: yes.
nzst has joined #ruby
cball has quit [Ping timeout: 246 seconds]
<jhass>
Klamber|ext: use this form which calls to_s for you: output << %(<li><a href="#{page.url}">s: #{page.data['title']}</a></li>)
<Klamber|ext>
There are 7 elements in pages array, all are outputed. Where is the nil element ?
<Klamber|ext>
With ifs and elses and with OR operator.
<Klamber|ext>
It tests for nil never come true.
<jhass>
the version you showed works and removing to_s does not, then your testing was flawed, sorry
<jhass>
*if the
sgambino has quit [Client Quit]
last_staff has quit [Quit: last_staff]
startupality has quit [Quit: startupality]
<jhass>
Klamber|ext: you can built your pages array like this btw: site.pages.select {|page| current_page["category"] == page.data["category" }
roxtrongo has quit [Remote host closed the connection]
<jhass>
pages = ...
<Klamber|ext>
jhass: I will look into those Ryby style stuff later on. I started using it last night.
pecpec has joined #ruby
JDiPierro has quit [Client Quit]
<Klamber|ext>
What I now whant to understand is how does array element be nil and also contain my string. But testing it for nil never comes true.
<shevy>
if it is nil
<shevy>
it is not your string
krisquigley has joined #ruby
pecpec_ has joined #ruby
<apeiros>
Klamber|ext: it can't.
roxtrongo has joined #ruby
lkba_ has joined #ruby
futilegames has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 240 seconds]
<shevy>
the [] are method calls too, page.data['some_key']; if page is nil, or page.data is nil, or if page.data['this_key_does_not_exist'], may all give you nil
charliesome has joined #ruby
<Klamber|ext>
From 7 elements all 7 are outputed. If there would be an empty element there should be 8 or more leemnts in array then. array.length gives me 7.
<shevy>
btw nil.to_s will give you '' # empty string
SylarRuby has joined #ruby
<Klamber|ext>
But no empty string is outputed.
<Klamber|ext>
There is no empty string.
<Klamber|ext>
Forgive me for being such a whiny cunt but that is just suprising to me right now.
Xiti has joined #ruby
last_staff has joined #ruby
<shevy>
.length will return the amount of elements you have there
<jhass>
it's impossible and that's all we can say from the information you have given
<jhass>
Klamber|ext: again, you never confirmed the assumptions I posed above, but if the version you showed works and removing the to_s breaks it again, the last version I gave must return "TITLE IS NIL!" somewhere
greenarrow has joined #ruby
decoponio has joined #ruby
Jardayn has joined #ruby
<jhass>
shevy: I think that was proposed a couple of times already
lkba_ has quit [Ping timeout: 272 seconds]
<shevy>
yeah but the syntax suggestion seemed new... u.?profile.?thumbnails.?large
phutchins has quit [Ping timeout: 264 seconds]
<shevy>
really weird to my eyes
phutchins2 has joined #ruby
<shevy>
I hope I will be able to append ? too so that I can have u.?profile?.?thumbnails?.?large?
<shevy>
I am sure [k- and Ox0dea will make heavy use of it
<[k->
no
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
im talking about non significant whitespace here
<[k->
how dare you suggest a breaking change!
kirun has joined #ruby
<shevy>
hey I did not suggest that syntax!
<apeiros>
[k-: in what situation is a . valid in front of ? from ternary now?
devoldmx has joined #ruby
sylvain31 has quit [Quit: Leaving]
but3k4 has joined #ruby
shinnya has joined #ruby
OrbitalKitten has joined #ruby
<[k->
is there a dot before a question mark?
y0da has quit [Read error: Connection reset by peer]
jmignault has joined #ruby
<apeiros>
ok, let me rephrase: which expression which is now valid would work differently with .? being a thing?
bronson has joined #ruby
<shevy>
I want a method called .
<Klamber|ext>
jhass: SO now i have tested both ways: Your example using || operator never returns "Title is nil" but when I test it with .inil? in a IF before outputing then there is no error but the .nil? (true) instrunction also never executes. So what ever I do on nil case it's not executed.
<shevy>
.inil?
<Klamber|ext>
nil? sorry.
<jhass>
that sounds rather unlikely
<Klamber|ext>
I'll show you my code..
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
probably missing that they're doing another method call
<apeiros>
yes please :)
<jhass>
yeah, can you make a runnable github repo or so?
yosafbridge has joined #ruby
<shevy>
code that shows the error!
<[k->
shevy, you can . in Ruby
<Klamber|ext>
This is a jekyll module so I would probably have to make a jekyll site ?
<shevy>
ack
roxtrong_ has joined #ruby
<Klamber|ext>
So yes ?
<jhass>
whatever you do to produce your error, I want to be able to do the same
chills42 has quit [Remote host closed the connection]
crack_user has quit [Quit: Leaving.]
<[k->
>> class Foo; def call(*args); args; end end; Foo.new.("hi", "shevy")
<ruboto>
[k- # => /tmp/execpad-e289d4eb3807/source-e289d4eb3807:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/437417)
karapetyan has quit [Remote host closed the connection]
niro has joined #ruby
ta has quit [Ping timeout: 264 seconds]
kirun has quit [Ping timeout: 252 seconds]
allcentury has quit [Ping timeout: 246 seconds]
bruno- has quit [Quit: Lost terminal]
iceyec has quit [Remote host closed the connection]
nettoweb has joined #ruby
bruno- has joined #ruby
evanjs has joined #ruby
rikkipitt has joined #ruby
krz has quit [Ping timeout: 255 seconds]
benlovell has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
tjbiddle has joined #ruby
iceyec has joined #ruby
arup_r has quit []
jeffreylevesque has joined #ruby
whippythellama has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
emilkarl has quit [Quit: emilkarl]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
suchness has quit [Remote host closed the connection]
suchness has joined #ruby
bkulbida has joined #ruby
casadei_ has joined #ruby
mrrobot_ has joined #ruby
<mrrobot_>
Hi. Can someone explain what symbols are in Ruby in the simplest way possible?
<[k->
strings that save memory (from repetition)
Kendos-Kenlen_ has joined #ruby
<[k->
basically, immutable strings
Kendos-Kenlen has quit [Ping timeout: 256 seconds]
<mrrobot_>
[k-: Why are they used in hashes?
ta has joined #ruby
Kendos-Kenlen_ has quit [Client Quit]
andyrs has quit [Quit: I'm leaving now, bye.]
emilkarl has joined #ruby
<yorickpeterse>
mrrobot_: because Hash keys often re-occur
<yorickpeterse>
it's also a tad shorter to type
<mrrobot_>
yorickpeterse: So a symbol is basically like an integer but it's a string?
Ropeney has joined #ruby
lidenbrock has joined #ruby
iamninja has joined #ruby
emilkarl has quit [Client Quit]
Ropeney has quit [Client Quit]
spcmastertim has joined #ruby
<Sou|cutter>
also it's bad to mutate a hash key, at least if it changes its hash
jeffreylevesque_ has joined #ruby
<yorickpeterse>
mrrobot_: that's a with like comparing apples and pears
victortyau has joined #ruby
<yorickpeterse>
Symbols are immutable strings of which the memory is not freed prior to 2.2.0
renderful has joined #ruby
<yorickpeterse>
Even starting with 2.2.0 the memory of some symbols may be freed
sanguisdex has joined #ruby
sanguisdex has left #ruby [#ruby]
emilkarl has joined #ruby
chris6131 has joined #ruby
<[k->
it might be worthy to mention that this was done because people were carrying out dos attacks on ruby servers by exploiting the creation of symbols
lidenbrock has quit [Client Quit]
<mrrobot_>
yorickpeterse: So if I have a hash with a key of :sample_key, there's only 1 of this key in memory regardless of how many times it's mentioned in the code?
jeffreylevesque has quit [Ping timeout: 260 seconds]
<[k->
Sou|cutter: hash stores a frozen copy of the key
<[k->
it cannot be modified
<[k->
by copy i mean a copy
<hoylemd>
Hey, quick question: do blocks return values? e.g. `result = do\n a = 5\n b = 3\n a + b\nend`
iceyec has quit [Remote host closed the connection]
jcoe has quit [Read error: Connection reset by peer]
iceyec has joined #ruby
<Klamber|ext>
Ok. I'm back now with a simple Jekyll site that demonstrates my problem. In the _plugins directory is my code that has the comments and explanations.
<ruboto>
->, I don't know anything about fortunecookie
jeffreylevesque_ has joined #ruby
<certainty>
apeiros: it might be because strings actually change the value of #hash if the content changes. Other objects don't do this. You can set ivars or add/remove methods, it will not affect the value of #hash on that object afair
<certainty>
so it's kind of reasonable to special case for strings
davedev24 has joined #ruby
bruno- has joined #ruby
<certainty>
first copy then make sure it never changes
iceyec has quit [Remote host closed the connection]
<jhass>
current_page is {"layout"=>"default", "title"=>"Page 6", "content"=>"Does not belong to the testcat category.\n", "dir"=>"/some-pages", "name"=>"6-page.md", "path"=>"some-pages/6-page.md", "url"=>"/some-pages/6-page.html"}
<apeiros>
[k-: what do you mean, case for what?
iceyec has joined #ruby
Joffily has left #ruby [#ruby]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 250 seconds]
dopamean_ has quit [Ping timeout: 252 seconds]
yottanami has joined #ruby
<[k->
the nick!
<apeiros>
I don't follow
<Klamber|ext>
[k-: Not really sure. Jekyll has the example like that. Removing it makes no difference also not an expert on YAML.
<apeiros>
[k-: it'll not count as "addressed person", but it'll be in the "mentions" list
<[k->
but im addressing him!
<Klamber|ext>
[k-: Why not use tabs ?
<[k->
?tabs
<ruboto>
I don't know anything about tabs
<[k->
why dont we have that?!
<[k->
it's a common source of mistakes!
<Klamber|ext>
jhass: Is this running in Jekyll ?
iceyec has quit [Remote host closed the connection]
<jhass>
yes
yosafbridge has quit [Ping timeout: 246 seconds]
iceyec has joined #ruby
Kricir has joined #ruby
iceyec has quit [Remote host closed the connection]
iceyec has joined #ruby
yottanami_ has joined #ruby
kies^ has joined #ruby
<Klamber|ext>
(So mutch scrolling... )
<certainty>
apeiros: does my guess about why strings are special cased like that sound reasonable or am i wrong here?
krisquigley has quit [Remote host closed the connection]
<apeiros>
certainty: sorry, I might have missed it. lemme see…
<Klamber|ext>
[k-: So Tabs are source of mistakes in Ruby ?
<apeiros>
16:01 certainty: apeiros: it might be because strings actually change the value of #hash if the content changes. Other objects don't do this. You can set ivars or add/remove methods, it will not affect the value of #hash on that object afair
<apeiros>
this?
<certainty>
yeah this one
<apeiros>
ok, no. that's wrong.
<apeiros>
other objects change their #hash too
bigmac has quit [Ping timeout: 250 seconds]
yottanami has quit [Ping timeout: 240 seconds]
<apeiros>
#hash and #eql? are in tandem
sharky has joined #ruby
freerobby has joined #ruby
jenrzzz has joined #ruby
<apeiros>
if an object's #eql? changes depending on its attributes, then so will its #hash
<certainty>
hmm i thought i've checked that
<sharky>
i am a sharkman
jeffreylevesque has joined #ruby
AlphaAtom has joined #ruby
<apeiros>
certainty: note that Object#eql? uses identity, i.e. is an alias of equal?
<apeiros>
so Object#eql? and Object#hash won't change when attributes change
devoldmx has joined #ruby
jeffreylevesque_ has quit [Ping timeout: 246 seconds]
<[k->
Klamber|ext: tabs are a source of mistake in, like, almost everywhere
tkuchiki_ has quit [Remote host closed the connection]
Meow-J has joined #ruby
<certainty>
apeiros: can you give a case when it changes?
yosafbridge has joined #ruby
<[k->
why would Object use eql? as equal?
<[k->
that makes no sense
iceyec has quit [Remote host closed the connection]
<Klamber|ext>
[k-: How can tab cause error as it's a character like a space.
<apeiros>
>> a = [1,2,3]; before = a.hash; a.pop; after = a.hash; [before, after]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Klamber|ext>
[k-: yes YAMS don't like them... thats the only case I have seen tabs not liked... or some GNU style guides..
<apeiros>
[k-: makes perfect sense
<[k->
howwww
<[k->
whyyyyy
<apeiros>
it's the strictest kind of comparison
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
so if you want less strict comparison, you have to implement it
<Klamber|ext>
[k-: And also the problem on page 6 is that I have not accounted for categorys being nill yet. Why does it give me the nil error on page 1 for example ?
<apeiros>
sane default.
jenrzzz has quit [Ping timeout: 260 seconds]
sharkman has quit [Quit: Leaving]
<[k->
ohhhhhh
tkuchiki has joined #ruby
AlphaAtom has quit [Ping timeout: 268 seconds]
<[k->
Klamber|ext: you'd have to ask jhass!
alphaatom|pc has joined #ruby
jeffreylevesque_ has joined #ruby
<Klamber|ext>
Sorry...
devoldmx has quit [Ping timeout: 272 seconds]
<jhass>
Klamber|ext: it doesn't, it compiles all pages
dorei has joined #ruby
jcoe has joined #ruby
jeffreylevesque has quit [Ping timeout: 252 seconds]
yottanami__ has joined #ruby
<Klamber|ext>
But the TEST 3 has no output that says "TITLE IS NIL" ...
<jhass>
so?
bigmac has joined #ruby
<Klamber|ext>
Does that TEST 3 compile aswell ?
araujo_ has joined #ruby
tejasmanohar has joined #ruby
araujo_ has quit [Max SendQ exceeded]
chouhoulis has joined #ruby
<certainty>
apeiros: it's rather unusual for an object to change its #hash though right? the examples i can think of are hash,set,array etc. which are kind of defined by their structure. Not so much in terms of ivars. So it's kind of intuitive that these kinds of objects change
<certainty>
don't know how to phrase that better
yottanami_ has quit [Ping timeout: 240 seconds]
<certainty>
thanks for the explanation
araujo_ has joined #ruby
rbennacer has joined #ruby
araujo_ has quit [Read error: Connection reset by peer]
<jhass>
Klamber|ext: test 3 is not in the same "category"
<Klamber|ext>
jhass: Why so ?
<jhass>
because the category is the there's no category
<jhass>
and the only items of it are feed.yml and page 6
jas02 has quit [Quit: jas02]
havenwood has joined #ruby
<apeiros>
certainty: not the least unusual. I expect every mutable object to change its #hash.
araujo has quit [Ping timeout: 244 seconds]
<Klamber|ext>
jhass: Wait.. so since feed.yml and Page 6 belong to category nil (let's say so) and feed toes not have title then it gives me the error ?
Gachr has joined #ruby
<apeiros>
as said, if a change to the object means it's not considered to be eql? to a copy of its previous state, then its #hash *must* change.
UtkarshRay has joined #ruby
jeffreylevesque has joined #ruby
<Gachr>
Hi everyone.
araujo has joined #ruby
<apeiros>
hi Gachr
voltalio has joined #ruby
araujo has quit [Max SendQ exceeded]
ckuhn has joined #ruby
ckuhn has quit [Client Quit]
<[k->
sometimes i wish Object was just called Obj (i just thought of this today)
jeffreylevesque_ has quit [Ping timeout: 246 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Klamber|ext>
Man, i feel sutch an Idiot right now. Thanks everyone for putting up with this. (I'll look more into how jekyll does what it's doing.)
banister has joined #ruby
araujo has joined #ruby
ckuhn has joined #ruby
<ckuhn>
ls
<ckuhn>
Oops, this isnt bash
araujo has quit [Max SendQ exceeded]
freerobby has quit [Quit: Leaving.]
alexUaN has quit [Ping timeout: 246 seconds]
Exuma has quit [Read error: Connection reset by peer]
<jhass>
Klamber|ext: yes
<Klamber|ext>
jhass: Thanks.
araujo has joined #ruby
alexUaN has joined #ruby
freerobby has joined #ruby
araujo has quit [Read error: Connection reset by peer]
skweek has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 246 seconds]
Kendos-Kenlen has quit [Ping timeout: 250 seconds]
Kendos-Kenlen has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
<Klamber|ext>
jhass: I'll learn on it.
tjbiddle has quit [Quit: tjbiddle]
tejasmanohar_ has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
araujo has joined #ruby
karapetyan has joined #ruby
Respek has joined #ruby
dopamean_ has joined #ruby
elperdut has joined #ruby
yottanami__ has quit [Quit: Leaving]
tejasmanohar has quit [Ping timeout: 240 seconds]
tejasmanohar_ is now known as tejasmanohar
JoshL has quit []
workmad3 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
rvchangue has joined #ruby
skweek has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 260 seconds]
platzhirsch has left #ruby [#ruby]
jeffreylevesque has quit [Read error: Connection reset by peer]
krz has joined #ruby
<shevy>
if you people have several include statements
<shevy>
do you sort them alphabetically? :D
emilkarl has quit [Quit: emilkarl]
<ankr>
yes
<[k->
no, too much worj
<[k->
k
beauby has quit [Ping timeout: 260 seconds]
decoponio has quit [Ping timeout: 250 seconds]
<Klamber|ext>
shevy: Your editor can probably do that
youngbaks has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
<Klamber|ext>
I select a block and press F9 - all work done..
<Papierkorb>
shevy: I sort them first by length and then in alphabetical order. Doing that since C++. Helps to quickly find if something is included if you know its name and thus can estimate its position based on the names length
moeabdol has joined #ruby
jcoe has quit [Read error: Connection reset by peer]
momon has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momon has left #ruby [#ruby]
EllisTAA has joined #ruby
ckuhn has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 264 seconds]
kristofferR has joined #ruby
but3k4_ has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
SOLDIERz_ has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
rippa has joined #ruby
hashrocket has joined #ruby
Rodya_ has quit [Remote host closed the connection]
bronson has joined #ruby
decoponio has joined #ruby
Rodya_ has joined #ruby
tomphp has joined #ruby
jeffreylevesque has joined #ruby
aswen has quit [Ping timeout: 260 seconds]
meatherly has joined #ruby
kristofferR has quit [Read error: Connection reset by peer]
dopie has joined #ruby
<shevy>
Papierkorb lol
<shevy>
well ok that is also sorting
<shevy>
one could also just randomly add includes
workmad3 has joined #ruby
beauby has joined #ruby
ebragaparah has quit [Remote host closed the connection]
deject3d has joined #ruby
<[k->
you can definitely do that in Ruby
alexUaN has quit [Quit: alexUaN]
solars has quit [Ping timeout: 255 seconds]
<Papierkorb>
Well here most things are autoloaded, so less need to put structure into it
<Papierkorb>
You think differently when you need to #include much stuff manually in a lot of files
<sharky>
how do i access the text in this matchdata object, /^.+Top of 2nd/i.match(self.plays)
<sharky>
oh its like an array, [0]. weird
ankr has quit [Quit: bye bye]
pawnbox has quit [Remote host closed the connection]
iceyec has quit [Remote host closed the connection]
drewvanstone has joined #ruby
nuck has quit [Ping timeout: 252 seconds]
iceyec has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
roxtrong_ has quit [Remote host closed the connection]
momomomomo has joined #ruby
karapetyan has joined #ruby
iceyec has quit [Remote host closed the connection]
iceyec has joined #ruby
iceyec has quit [Remote host closed the connection]
iceyec has joined #ruby
codecop has joined #ruby
nettoweb has quit [Ping timeout: 255 seconds]
banister has quit [Read error: Connection reset by peer]
andikr has quit [Read error: Connection reset by peer]
<apeiros>
sharky: it's a MatchData instance. you can use .class to figure that out.
<sharky>
oh i see
fertapric has joined #ruby
fierycatnet has joined #ruby
vjdhama has joined #ruby
fertapric has quit [Remote host closed the connection]
eminencehc has joined #ruby
nettoweb has joined #ruby
bronson has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Soda has joined #ruby
lulzmachine has quit [Quit: Connection closed for inactivity]
vjdhama has quit [Remote host closed the connection]
andrew-l has joined #ruby
krisquigley has joined #ruby
psy has joined #ruby
rikkipitt has quit [Ping timeout: 264 seconds]
psy has quit [Max SendQ exceeded]
vjdhama has joined #ruby
psy has joined #ruby
snockerton has joined #ruby
pecpec_ has quit [Remote host closed the connection]
pecpec has joined #ruby
SylarRuby has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
<sharky>
dummies/.scan(irc ruby channel)
<sharky>
hold on the page is about to overflow with text
User458764 has joined #ruby
SenpaiSilver has joined #ruby
nickjj has quit [Ping timeout: 240 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
andyrs has joined #ruby
schlubbi has quit [Remote host closed the connection]
polishdub has joined #ruby
vjdhama has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
pecpec has quit [Ping timeout: 268 seconds]
hs366 has quit [Read error: Connection reset by peer]
mwlang has joined #ruby
eminencehc has joined #ruby
rcvalle has joined #ruby
<andrew-l>
hi, is anyone here familiar with ruby Threads? I'm looking for an explanation of code i'm using
[k- has quit [Ping timeout: 256 seconds]
evanjs has quit [Remote host closed the connection]
<havenwood>
andrew-l: Yes, there are folk here who are familiar with Threads. Ask away!
platzhirsch has joined #ruby
evanjs has joined #ruby
circ-user-7dItm has joined #ruby
<havenwood>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<sharky>
whats the VIM command to delete all the white space going backwards until i reach non-whitespace
karapetyan has quit [Remote host closed the connection]
<havenwood>
sharky: Wrong channel?
<sharky>
oh sorry i thought it was related
<sharky>
i thought maybe people coded ruby in VIM
karapetyan has joined #ruby
<andrew-l>
I understand Thread.new creates a new thread, but it doesn't look like it's running, but when i throw a message into the redis channel, the message is processed.
ArnaudM_ has left #ruby ["."]
<andrew-l>
sharky: emacs user checking in :-)
<suchness>
sharky: d^ will delete from current backward to first non-white-space character
<andrew-l>
(from erc = emacs irc)
<havenwood>
sharky: We also drink coffee and tea and eat chunky bacon. But only the bacon is ontopic.
<shevy>
use a better editor people
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<andrew-l>
shevy: uh oh... editor flame war on?! :-)
SCHAAP137 has quit [Remote host closed the connection]
<shevy>
what flame war
iamninja has joined #ruby
<Sou|cutter>
>> class A; class B; end; end; A.const_defined?(:B, false)
<havenwood>
andrew-l: Yeah, a single new Thread is created when ChatDemo::ChatBackend.new is called. You're welcome!
yfeldblum has joined #ruby
jobewan has quit [Ping timeout: 244 seconds]
bluOxigen has joined #ruby
<andrew-l>
havenwood: just wondering, if there were multiple instances, each would have its own thread for the redis.subscribe and each would process whatever message published into that redis queue?
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
Narzew has quit [Ping timeout: 246 seconds]
<andrew-l>
(i'm wondering when there's multiple rails server with this app, would they be synchronized using this method or would i have to implement another method to sync/execute)
vjdhama has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
startupality has quit [Quit: startupality]
psy has quit [Ping timeout: 246 seconds]
InternetFriend has joined #ruby
codenapper has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 272 seconds]
<Sou|cutter>
ah ha! I got it
Asher has quit [Quit: Leaving.]
rbennacer has quit [Remote host closed the connection]
<havenwood>
andrew-l: Are they sharing unsynchronized access to mutable data? I'm not sure I understand what you're asking. Do make sure there are fewer threads spawned at a given time than the number of maximum system threads allowed.
<havenwood>
andrew-l: To illustrate in irb try: 1.upto(Float::INFINITY) { |n| puts "Spawning Thread #{n} ..."; Thread.new { sleep } }
<havenwood>
andrew-l: On this box I get to: Spawning Thread 2047 ...
<shevy>
people seem so happy to try and avoid GNU autoconfigure these days :)
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
Jackneill has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
eregon_ is now known as eregon
andyrs has quit [Ping timeout: 240 seconds]
<darix>
shevy: that script is a bit more than the usual things covered in autotools things
blackmesa has quit [Ping timeout: 240 seconds]
NeverDie has joined #ruby
<shevy>
yeah... almost 1300 lines :D
InternetFriend has joined #ruby
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
ragingcake has joined #ruby
ngscheurich has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
rikkipitt has quit [Remote host closed the connection]
andyrs has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
renderful has joined #ruby
Soda has quit [Remote host closed the connection]
Technodrome has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
cool
mondayrain has joined #ruby
mondayrain has quit [Client Quit]
<shevy>
andrew-l that seems to have worked
<platzhirsch>
shevy: so you're studying biology?
dmolina has quit [Quit: Leaving.]
howdoico1 has joined #ruby
<andrew-l>
shevy: awesome. that was pretty fast... and painless ;-)
<shevy>
platzhirsch sorta, more in the past, currently more biochemistry/biotech/chemistry
<platzhirsch>
nice
<shevy>
andrew-l yeah... let me try to look at the .pdf first...
<shevy>
I just realized that a black background is not ideal to read in a .pdf :\
<dfockler>
haha
whippythellama has quit [Ping timeout: 250 seconds]
nzst has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<shevy>
andrew-l - but, all the minor glitches aside... that is already better than what I have been able to come up with via html->prawn->pdf on my own... here is the rendered output... I can easily change the rest, it's css for the most part... http://shevegen.square7.ch/dia.pdf
krisquigley has joined #ruby
<shevy>
but now I'm going to grab some food
freerobby has quit [Quit: Leaving.]
podman has joined #ruby
<centrx>
shevy, glhf
stamina has quit [Quit: WeeChat 1.3]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffreylevesque has quit [Ping timeout: 244 seconds]
nanoz has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
dima_ has quit [Quit: Leaving]
dima_ has joined #ruby
dima_ has quit [Client Quit]
tomphp has joined #ruby
dima_ has joined #ruby
dima_ has quit [Remote host closed the connection]
dima_ has joined #ruby
elperdut has joined #ruby
Balzrael has quit [Quit: Leaving]
whippythellama has joined #ruby
yqt has joined #ruby
Musashi007 has joined #ruby
cschnei__ has joined #ruby
imperator has joined #ruby
paulcsmith has joined #ruby
tacit7 has joined #ruby
workmad3 has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
evanjs has joined #ruby
ruurd has joined #ruby
skullcrasher has quit [Remote host closed the connection]
djbkd has joined #ruby
last_staff has quit [Quit: last_staff]
skweek has joined #ruby
voltalio has joined #ruby
evanjs has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 272 seconds]
banjara has joined #ruby
iamninja has joined #ruby
ta has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
rakm has joined #ruby
casadei_ has quit [Remote host closed the connection]
leafybas_ has joined #ruby
AccordLTN has quit [Ping timeout: 264 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
snockerton1 has joined #ruby
symm- has joined #ruby
FernandoBasso has joined #ruby
otacon- has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
jeffreylevesque has joined #ruby
fedexo has joined #ruby
InternetFriend has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
snockerton has quit [Ping timeout: 265 seconds]
rakm has quit [Ping timeout: 264 seconds]
leafybas_ has quit [Ping timeout: 246 seconds]
doddok has joined #ruby
jeffreylevesque_ has joined #ruby
krisquigley has quit [Remote host closed the connection]
Rickmasta has joined #ruby
gregf has joined #ruby
dionysus69 has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
roxtrongo has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
jcoe has joined #ruby
dima_ has quit [Quit: Leaving]
AccordLTN has joined #ruby
mjuszczak has quit []
jschmid has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
SylarRuby has joined #ruby
FernandoBasso1 has joined #ruby
rbennacer has joined #ruby
<beauby>
Let's say I'm inside a class method `self.m(x)` of a class `A`: what's a sound way to bind a new class named `"Class#{x}"`, namespaced inside `A`? I've been toying with stuff like `c = Class.new() do ... end; const_set("Class#{x}", c)` Is there an other way?
<platzhirsch>
Interesting, why does
<platzhirsch>
statement rescue 'success' not rescue on Interrupt?
<centrx>
beauby, That seems like the best way
apt-get has joined #ruby
<centrx>
platzhirsch, StandardError -- default for rescue
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx>
platzhirsch, So rescue by default only gets Exceptions under StandardError
<platzhirsch>
ah that makes sense
FernandoBasso has quit [Ping timeout: 255 seconds]
<beauby>
Cool, now what if I'm doing this inside a module `M` included in the class `A`, and I want to define `"A::Class#{x}"`?
allomov has quit [Remote host closed the connection]
<beauby>
Basically, how do I get ahold of the namespace of "execution"?
c0m0 has quit [Ping timeout: 240 seconds]
Billias has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
yeticry has joined #ruby
InternetFriend has joined #ruby
leafybasil has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
Billias has joined #ruby
jenrzzz has joined #ruby
devoldmx has joined #ruby
jeffreylevesque has joined #ruby
wildlander has joined #ruby
petricore has joined #ruby
jeffreylevesque_ has quit [Ping timeout: 240 seconds]
weemsledeux has joined #ruby
yfeldblum has joined #ruby
bruno- has joined #ruby
hanmac has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
cschnei__ has quit [Remote host closed the connection]
<Ox0dea>
>> module Foo; class Bar; singleton_class.nesting; end end # beauby
<beauby>
Class, dynamically from whithin `has_many`
dasher00 has joined #ruby
evanjs has joined #ruby
jeffreylevesque has joined #ruby
futilegames has left #ruby [#ruby]
<callumacrae>
heya! i have previous experience in coding (but not ruby), can anyone recommend me a book that is short and concise that will teach me ruby?
freerobby has joined #ruby
<callumacrae>
emphasis on short. I don't need a comprehensive explanation of absolutely everything, I just need to know enough that I can figure the rest out myself
<beauby>
callumacrae: I personally find books useful only once you have some experience with a techno, so I'd recommend you start building stuff in ruby/follow tutorials, but that's just my 2cts
jcoe has joined #ruby
<Ox0dea>
beauby: I'm trying to see if there's some clever way to get everything in place with Module#prepend.
<beauby>
Ox0dea: Awesome, thanks for taking the time
<callumacrae>
Ox0dea: Thanks!
<callumacrae>
beauby: I've been working at a ruby shop for over a year now so I've read my fair share of ruby, and written a few erb files myself, so the syntax isn't that unfamiliar anymore
eminencehc has quit [Remote host closed the connection]
renderful has quit [Remote host closed the connection]
bigmac has joined #ruby
<callumacrae>
Also did tryruby.com or whatever it's called a while back
evanjs has quit [Ping timeout: 244 seconds]
<beauby>
Ox0dea: Note that I don't want to override has_many, I actually want to do my stuff from within has_many
User458764 has joined #ruby
<Ox0dea>
beauby: Module#prepend lets you "decorate" methods, so to speak.
casadei_ has quit [Remote host closed the connection]
shadoi has joined #ruby
<Ox0dea>
You do your custom thing and then usually invoke `super`.
<beauby>
Ox0dea: I see. I can actually modify the Associations file though, I just don't want to modify the structure of the file too much
<Ox0dea>
Oh, I see.
TheHodge has quit [Quit: Connection closed for inactivity]
<beauby>
Currently, when I do what we discussed it defines MyClass like ActiveModel::Serializer::Associations:ClassMethods::MyClass
imperator has quit [Quit: This computer has gone to sleep]
<Ox0dea>
beauby: And you're sure it's not Module#nesting you're looking for?
karapetyan has joined #ruby
agent_meerkat has joined #ruby
face has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
face has joined #ruby
<beauby>
Ox0dea: Well, no, because I'm calling has_many as follows: class PostSerializer < ActiveModel::Serializer; has_many :stuff; end, and PostSerializer is not present in the nesting chain
hahuang65 has joined #ruby
platzhirsch has quit [Remote host closed the connection]
<beauby>
(ActiveModel::Serializer is, though)
dasher00 has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 255 seconds]
dasher00 has joined #ruby
decuser has joined #ruby
[Butch] has joined #ruby
<beauby>
(Hence my initial question about the "namespace of the execution context")
Musashi007 has quit [Quit: Musashi007]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
youngbaks has joined #ruby
User458764 has joined #ruby
baweaver has joined #ruby
renderful has joined #ruby
einarj has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
segfalt has joined #ruby
einarj has quit [Remote host closed the connection]
ruurd has joined #ruby
krisquigley has joined #ruby
howdoico1 has joined #ruby
jenrzzz has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
DrCode has joined #ruby
jeffreylevesque_ has joined #ruby
decuser has quit [Quit: Leaving]
Hounddog has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
warreng has left #ruby [#ruby]
jeffreylevesque has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
suchness has quit [Ping timeout: 250 seconds]
evanjs has joined #ruby
snockerton1 has quit [Quit: Leaving.]
segfalt has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
dseitz has quit [Ping timeout: 268 seconds]
snockerton has joined #ruby
djbkd has joined #ruby
Xeago_ has joined #ruby
eminencehc has joined #ruby
Xeago_ has quit [Remote host closed the connection]
jeffreylevesque has joined #ruby
<beauby>
Ox0dea: Nevermind, it actually works, I was probably doing something else wrong. Thanks for the time and the examples though!
jeffreylevesque_ has quit [Ping timeout: 240 seconds]
dfockler has quit [Remote host closed the connection]
dseitz has joined #ruby
<Ox0dea>
beauby: Ha. All right, then.
Musashi007 has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
elperdut has joined #ruby
djbkd has joined #ruby
bruno- has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 240 seconds]
DexterLB has quit [Ping timeout: 260 seconds]
DexterLB has joined #ruby
Andrey_ has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
andyrs has quit [Quit: leaving]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ericjphillips has joined #ruby
noethics has joined #ruby
imperator has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
roxtrongo has joined #ruby
j4cknewt has joined #ruby
tkuchiki has joined #ruby
allomov has joined #ruby
Xeago has joined #ruby
freerobby has quit [Quit: Leaving.]
baweaver has joined #ruby
freerobby has joined #ruby
michael_mbp has quit [Excess Flood]
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
atmosx_laptop has joined #ruby
Konstruktionist has joined #ruby
cndiv has joined #ruby
tomaz_b has joined #ruby
rbennacer has quit [Remote host closed the connection]
michael_mbp has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 240 seconds]
eminencehc has quit [Remote host closed the connection]
sanjayu has joined #ruby
pen has quit [Remote host closed the connection]
eminencehc has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kobain has joined #ruby
cndiv has quit [Ping timeout: 250 seconds]
jeffreylevesque has joined #ruby
jenrzzz has joined #ruby
Andrey_ has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
ItSANgo has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 272 seconds]
ItSANgo has joined #ruby
cndiv has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
eminencehc has quit [Remote host closed the connection]
cyklOpz has joined #ruby
jeffreylevesque_ has joined #ruby
cyklOpz has quit []
benlovell has joined #ruby
dstarh has joined #ruby
Technodrome has quit [Quit: Technodrome]
sshuff|gone is now known as sshuff
jeffreylevesque has quit [Ping timeout: 240 seconds]
shadow has joined #ruby
j4cknewt_ has joined #ruby
shadow is now known as Guest69987
blackmesa has joined #ruby
<Guest69987>
Hello
voltalio has joined #ruby
<adaedra>
Hi
evanjs has quit [Remote host closed the connection]
<agent_meerkat>
hi
djbkd has quit [Remote host closed the connection]
phutchins2 has quit [Ping timeout: 272 seconds]
Coldblackice has joined #ruby
lxsameer has joined #ruby
jeffreylevesque has joined #ruby
SylarRuby has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
jgt has joined #ruby
User458764 has joined #ruby
frmendes has joined #ruby
jeffreylevesque_ has quit [Ping timeout: 240 seconds]
Igorshp has quit [Remote host closed the connection]
dyleted has quit [Ping timeout: 240 seconds]
<atmosx_laptop>
hello
ndrei has joined #ruby
Macaveli has joined #ruby
skweek has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
<Guest69987>
Hello I forked a file from github then cloned it, I edited the view-layout file and am unable to view the results. I can't do rails s to see the server running nor push it back to github repository.
<centrx>
atmosx_laptop, Are you related to atmosx?
<Guest69987>
any idea why? Thanks
<atmosx_laptop>
centrx: we're extremely close, but don't tell.
eminencehc has joined #ruby
spider-mario has joined #ruby
Soda has joined #ruby
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
HAL2328 has joined #ruby
HAL2328 has quit [Max SendQ exceeded]
djbkd has joined #ruby
jeffreylevesque has quit [Ping timeout: 272 seconds]
agent_meerkat has left #ruby [#ruby]
pen has joined #ruby
rbennacer has joined #ruby
j4cknewt_ has quit [Read error: Connection reset by peer]
Guest69987 is now known as chicagob2
Macaveli has quit [Ping timeout: 264 seconds]
cmisenas has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
<chicagob2>
Hello I forked a file from github then cloned it, I edited the view-layout file and am unable to view the results. I can't do rails s to see the server running nor push it back to github repository.
<chicagob2>
any idea why? Thanks
sharky has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby
pencilcheck has joined #ruby
cyklOpz has joined #ruby
pen has quit [Ping timeout: 240 seconds]
Stalkr_ has joined #ruby
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
<Sou|cutter>
chicagob2: Are you a designer working with a team?
cyklOpz has quit [Client Quit]
cyklOpz has joined #ruby
casadei_ has joined #ruby
jenrzzz has joined #ruby
dfockler has joined #ruby
beast has quit [Quit: Leaving]
EmeraldExplorer has joined #ruby
craysiii has joined #ruby
<EmeraldExplorer>
Hi
pwnd_nfsw has quit [Remote host closed the connection]
<dfockler>
Hello
evanjs has joined #ruby
banjara has quit [Quit: Leaving.]
wldcordeiro has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
pwnd_nsfw has joined #ruby
<EmeraldExplorer>
I bet this is a stupid question, but what exactly does the colon mean (what is it called) in this situation: create_table :employees do |t| t.column :name, :string
Stalkr_ has quit [Client Quit]
Pupeno has quit [Remote host closed the connection]
<dfockler>
EmeraldExplorer: It's ruby's syntax for a symbol
Pupeno has joined #ruby
<Sou|cutter>
It's the same at "employees".to_sym
<Sou|cutter>
end result, anyway
<EmeraldExplorer>
Oh wait... I think I was interpreting it the wrong way... sorry I'm from Java. It is basically like this, right? create_table( :employees ) do |t| {}
djbkd has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 260 seconds]
<centrx>
Yes
t_mmyv has joined #ruby
<jhass>
no idea where the {} comes from all of the sudden, but up to that, yes
<Sou|cutter>
EmeraldExplorer: yeah. Except in ruby you wouldn't have those braces. do/end is the start/end of a block
Xeago has quit [Read error: Connection reset by peer]
<Synthead>
is there a way I can put a function in an rc file somewhere so I can run a special function when needed (instead of declaring it every time I open a prompt)?
<bazbing80>
sooo...how are you meant to pass an argument chain to a method in rspec? I know rspec isn't pure ruby but it's a pure ruby question.. | def method *args | let(:args){ 4,5,6 } #=> syntax error, unexpected ',' | see my probs?
<dfockler>
breadmonster: there's the opposite direction guides
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
drptbl has quit [Ping timeout: 264 seconds]
irctc894 has joined #ruby
<baweaver>
I still think X for Y developers is a bad idea.
NeverDie has joined #ruby
<baweaver>
The more metaphors you try and carry over, the worse it'll be.
<dfockler>
That's partially true
<baweaver>
It works for similar languages well enough
michael_mbp has quit [Excess Flood]
<baweaver>
Java -> Ruby is nasty ugly
j4cknewt_ has joined #ruby
irctc337 has joined #ruby
<baweaver>
Speaking of which, still need to write that Ruby accents guide some time
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
<dfockler>
I was a java dev that switched to ruby and my old code looked like bad ruby and worse java
<irctc337>
hello, i want to be able to use this http://www.avalara.com/ in my iOS app, my question is do i make it server side or on the iOS side?
baweaver has quit [Remote host closed the connection]
<oddmunds>
baweaver: X for Y devs could be documenting what metaphors you need to "forget"
kinduff has joined #ruby
irctc894 has quit [Ping timeout: 246 seconds]
youngbaks has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
ekleog has quit [Ping timeout: 272 seconds]
unop has quit [Ping timeout: 240 seconds]
<dfockler>
I think OOP should be taught from the POODR/messaging perspective, it certainly makes a lot more sense than 'this is a class, etc'
lapide_viridi has joined #ruby
j4cknewt_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
<HAL2328>
i suggest chris pine's learn to program
Torrieri has joined #ruby
<jhass>
irctc337: welcome to the Ruby programming language channel. Are you writing your app with Ruby?
elperdut has joined #ruby
<irctc337>
no my app is iOS
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
I don't follow how your question relates to Ruby then
benlovell has joined #ruby
phutchins2 has joined #ruby
Spami has joined #ruby
ekleog has joined #ruby
<irctc337>
dont i integrate avalara.com api in ruby? then somehow communicate back to iOS ?
<jhass>
So you wrote a backend in Ruby for your app?
Exuma has joined #ruby
<irctc337>
i actually used Parse.com for ios
shinnya has joined #ruby
<adaedra>
So what is in Ruby then?
<bricker>
irctc337: you're asking if you should point the iOS client to avaltara directly, or make a proxy API on your servers?
<irctc337>
yes
lapide_viridi has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 244 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
_blizzy_ has joined #ruby
arup_r has quit [Quit: Leaving]
<bricker>
irctc337: Hard to say for sure without having some knowledge of your business and future plans, but generally for iOS I would just connect directly to avaltara's servers.
<Ox0dea>
dfockler: -> can be made much more boring.
<dfockler>
haha
<Ox0dea>
`->{}` == `lambda do end`.
<[k->
Inlined version: [[
<[k->
[]*
startupality has quit [Quit: startupality]
<Ox0dea>
[k-: Can we use you as a Ruby compiler?
chouhoulis has joined #ruby
* dfockler
compiling any program "That uhhh does some stuff"
whippythellama has quit [Quit: WeeChat 1.3]
<jhass>
>> require "json"; JSON.parse("1") # weird, what might the reason for that?
<[k->
i won't look through your code!
<ruboto>
jhass # => A JSON text must at least contain two octets! (JSON::ParserError) ...check link for more (https://eval.in/437774)
<jhass>
ah they still didn't update to the new spec I guess
swgillespie has joined #ruby
<dfockler>
Is that valid JSON?
<Ox0dea>
Nope.
NeverDie has joined #ruby
<Ox0dea>
The outermost JSON value must be a collection.
<jackjackdripper>
ohai_hash is not nil but ohai_hash["core"]["cores"] was nil. I essentially would prefer that it ignores the nil value from the hash and set the ' ' value
<Ox0dea>
Where's the video footage of Crockford eating a crow?
<jhass>
jackjackdripper: the error message indicates that ohai_hash["core"] is nil (null or not existent), so check that before calling ["cores"] on it
<drbrain>
pro-tip: if an element in a Hash is nullable, use Hash#fetch
<drbrain>
ohai_hash.fetch 'core' # raises KeyError if the element is not found
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
AccordLTN has quit [Ping timeout: 240 seconds]
<Narzew>
Why data=File.read(x) don't work with binary data on windows? It works with binary data well on Linux (tested on Zlib compression); I use working but complicated equivalent on Windows: data=lambda{File.open(x,'rb'){|r|return r.read}}.call
<jhass>
Narzew: might need the File.read(x, "rb") explicitly
<Ox0dea>
It's a program that counts the number of squigglies.
<jackjackdripper>
thanks
<Narzew>
jhass: thanks ;)
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
<drbrain>
Narzew: or File.binread
j4cknewt has quit [Ping timeout: 240 seconds]
dravine has joined #ruby
agent_meerkat has quit [Ping timeout: 250 seconds]
<drbrain>
Narzew: windows is special and does newline conversion for historical reasons
<Ox0dea>
Are they really "historical" if they'll be with us forever?
zenspider has quit [Ping timeout: 250 seconds]
<drbrain>
the reasons are historical, but that is separate from when the behavior will change
<drbrain>
or even if
<Narzew>
I use windows only for playing games - almost all programming work I do on Linux
<dorei>
from an old typewritter perspective the windows approach to newlines seams correct xD
<Narzew>
i have some encoding errors, when I read contents to gsub from file all works ok, but when I type str.gsub("ąćę","ace") for example I get error in that line; #encoding: utf-8 is my first line of script, any ideas ?
ngscheurich has quit [Quit: WeeChat 1.2]
ngscheurich has joined #ruby
<jhass>
does that actually reflect your file encoding?
<jhass>
given windows...
<RickHull>
dorei: from files as a stream of bytes perspective, the windows approach is hilarious
<jhass>
declaring it as utf-8 doesn't make your editor save it as such
tvon has joined #ruby
tvon has quit [Client Quit]
RegulationD has quit [Remote host closed the connection]
<Narzew>
So I need to use UTF-8 encoding for script file, yeah ? Is the way to fix ASCII-8BIT and UTF-8 incompatibility on the fly?
<jhass>
yes, try to use UTF-8 always and everywhere
<jhass>
especially for code these days
dfockler has quit []
EllisTAA has quit [Quit: EllisTAA]
mikecmpbll has quit [Quit: i've nodded off.]
beauby has joined #ruby
<jhass>
wait, is str the thing you read with File.binread / File.read(, "rb") ?
firstdayonthejob has quit [Ping timeout: 240 seconds]
<jhass>
Narzew: sounds like you read your HTML in the wrong encoding then
NeverDie has joined #ruby
<Gachr>
jhass; Thanks, however I never used STDIN instead of gets before tho.
<jhass>
specifically in no encoding (ASCII-8bit is just bytes)
<jhass>
Gachr: don't worry, just try it
<Narzew>
jhass: most of files work fine, but sometimes I get problem with encoding, so I guess some of .html are ASCII-8BIT encoded
voltalio has joined #ruby
<jhass>
Narzew: ASCII-8bit is no encoding, hence it's also aliases as "binary". It's there for things that are just sequences of bytes
<jhass>
*aliased
charliesome has joined #ruby
rikkipitt has joined #ruby
<jhass>
a html document can't really be ASCII-8bit encoded, you just read it with that (and thus effectively with no encoding)
platzhirsch has joined #ruby
<Gachr>
jhass; It works after playing with it, thanks. The only issue is that it doesn't insert a newline, can I do it with the STDIN thingy or do I need to just print a newline separately?
Spami has quit [Quit: This computer has gone to sleep]
<platzhirsch>
apeiros: Another funny fact about the posted code with the bijective function
<Ox0dea>
Gachr: Do take some time to clarify your understanding of this "STDIN thingy"; it's quite important.
<platzhirsch>
this can be shortened by using Fixnum#to_s(base)
<platzhirsch>
Ruby has it all
<Ox0dea>
platzhirsch: It doesn't have Unicode character name literals. :/
<jhass>
Gachr: stdin is where you read from, the newline should go to stdout, so a regular puts is fine
<Gachr>
Ox0dea; I do understand it.
<platzhirsch>
Ox0dea: say that again?
r00ster has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
DLSteve has quit [Quit: Leaving]
<Ox0dea>
platzhirsch: You can, for instance, say '\N{PILE OF POO' in Python.
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
*'\N{PILE OF POO}'
<Gachr>
jhass; I just inserted it in the beginning of the next puts, thanks, you helped me create an app for evil purposes.
<Gachr>
;D
<platzhirsch>
mhmm
<platzhirsch>
and the semantic of it is what?
<Ox0dea>
Perl and LOLCODE too, but not Ruby. :(
<Ox0dea>
platzhirsch: PILE OF POO is a Unicode character.
polysics has quit [Remote host closed the connection]
<platzhirsch>
Well, wasn't that a necessity back than due to memory limitations?
<sp_>
platzhirsch, magic numbers refer to literal values, as opposed to any sort of constant - where you directly use a `number` of no significant meaning in code.
<Ox0dea>
platzhirsch: Not really.
<Ox0dea>
Naming things is hard.
<Ox0dea>
But the Unicode Consortium has already done the hard part for us in this case.
j4cknewt has quit [Read error: Connection reset by peer]
<sp_>
platzhirsch, i think 0 and 1 are mostly the only sort of exceptions to this.
<Ox0dea>
And yet <stdbool> is a thing.
<sp_>
but hardcoded values are bad mojos.
j4cknewt has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch>
As a UNIX user I don't frown too much upon it ;) but I get it
EllisTAA has joined #ruby
<sp_>
platzhirsch, which UNIX do you use?
<Ox0dea>
Got 'em.
<platzhirsch>
Linux/Ubuntu
<Ox0dea>
platzhirsch: That's not a UNIX.
Narzew has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
j4cknewt has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 260 seconds]
shpoont has quit [Max SendQ exceeded]
<platzhirsch>
As a UNIX-like user I don't frown too much upon it ;) but I get it
CloCkWeRX has joined #ruby
<platzhirsch>
I want to call my lawyer!
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r00ster has quit [Quit: Peace]
CloCkWeRX has left #ruby [#ruby]
Narzew has joined #ruby
<RickHull>
It's a Gnu's Not Unix / Linux
<sp_>
I wonder how many people use Linux think they're using UNIX.
[k- has quit [Ping timeout: 250 seconds]
Pupeno has quit [Remote host closed the connection]
<RickHull>
linux is a unix in some sense
<RickHull>
the categories are fuzzy
blackmesa has joined #ruby
Technodrome has quit [Quit: Technodrome]
<platzhirsch>
Well, insisting that there is a big difference is surely farting into the gravel
<RickHull>
better than a straw, I suppose
<platzhirsch>
but I can sympathize, I also insist on differentiating methods vs. functions
circ-user-7dItm has quit [Remote host closed the connection]
rikkipitt has quit [Remote host closed the connection]
<Ox0dea>
platzhirsch: Which language do we have to thank for that colorful expression?
<platzhirsch>
German
pwnd_nfsw has joined #ruby
<RickHull>
reminiscent of pissing into the wind
<Ox0dea>
Except there are repercussions there.
<platzhirsch>
Surely is some very niche phrase even in that language
<Ox0dea>
"Pissing into the wind" isn't terribly obscure.
iamninja has quit [Ping timeout: 240 seconds]
<Ox0dea>
platzhirsch: Does Ruby have functions?
vF3hNGxc47h8 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
<platzhirsch>
oh it has actually a different meaning, it means something a long the lines of building upon sand, basically misjudgement of a situation
j4cknewt has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
slackbotgz has joined #ruby
<platzhirsch>
Ox0dea: I just tell people to inhabit the language's name convention
<Ox0dea>
platzhirsch: So methods vs. functions is about naming?
bigmac has quit [Read error: Connection reset by peer]
<platzhirsch>
from a CS point of view I'd always argue, it's not a function unless it evaluates to a result
bigmac has joined #ruby
Technodrome has joined #ruby
RickHull has left #ruby [#ruby]
<Ox0dea>
It should be a crime to so thoroughly beat around a bush.
<platzhirsch>
I didn't mean names as in naming things, but rather how constructs like sub-routines are normally called in a particular language
SCHAAP137 has quit [Quit: Leaving]
rehat has quit [Remote host closed the connection]
<centrx>
Ox0dea, You could call a method defined outside of a class in a simple script, a function
j4cknewt has quit [Read error: Connection reset by peer]
<centrx>
Ox0dea, Or things like lambda or procs
<platzhirsch>
I personally wouldn't
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has joined #ruby
<platzhirsch>
though I get the point, because methods are often seen in a OOP related concept
pabs has quit [Ping timeout: 246 seconds]
pabs has joined #ruby
michael_mbp has quit [Excess Flood]
Moblin has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<Ox0dea>
platzhirsch: The notion of a method doesn't make sense outside of object-orientation.
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
<platzhirsch>
yeah
michael_mbp has joined #ruby
j4cknewt_ has joined #ruby
snockerton has quit [Quit: Leaving.]
renderful has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jdawgaz has joined #ruby
baweaver has joined #ruby
Ebok has quit [Ping timeout: 240 seconds]
sargas has quit [Quit: Leaving]
j4cknewt has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
<Ox0dea>
centrx: Yes, Procs are functions, but methods defined at the top level are not, technically (and even definitionally, in Ruby's case).
rcvalle has quit [Quit: rcvalle]
tmtwd has joined #ruby
<centrx>
Would a rose by any other name execute as efficiently?
yfeldblum has quit [Read error: Connection reset by peer]
<Ox0dea>
Precision matters.
<platzhirsch>
As does farting into the gravel.
yfeldblum has joined #ruby
<platzhirsch>
Procs are first and foremost objects
ramfjord has quit [Ping timeout: 260 seconds]
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
<Ox0dea>
No, that Procs are objects is an implementation detail.
drewvanstone has quit [Ping timeout: 240 seconds]
prestorium has quit [Quit: Konversation terminated!]
maletor has joined #ruby
<platzhirsch>
Proc for me is an implementation of a concept that is called subroutine
baweaver has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch>
Because Proc is such a Ruby-specific thing if you want to go down that route
<Ox0dea>
It's really not, though.
<Ox0dea>
A Proc is just a closure.
<platzhirsch>
Then you have a different definition of subroutine than me
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<Ox0dea>
platzhirsch: Do subroutines have an environment?
<bazbing80>
is it possible to use matchers that support block expectations like this: | it{ is_expected.to raise_error } | Because that fails. I only get block matchers to work if using the specify method: | specify{ expect{ foo }.to raise_error } | Is that normal?
<bazbing80>
I hope the next version of rspec will support it{ is_expected.to raise_error } for block matchers if this is indeed normal!
<platzhirsch>
That again is implementation detail
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch>
oh that's cool Closures go back to functional programming, lambda calculus, how dare you mixing lambda calculus with something so procedural like Ruby
<platzhirsch>
;-P
<Ox0dea>
platzhirsch: Your misconstrual is almost painful to behold.
aghalarp has joined #ruby
duncannz has joined #ruby
<Ox0dea>
Ruby is quite "functional", precisely because of things like Proc and blocks.