adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.1, 2.7.3, 2.6.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
robotbee has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
explorier has quit [Ping timeout: 260 seconds]
thinkpad has joined #ruby
duckpuppy has quit [Quit: ZNC 1.8.2 - https://znc.in]
duckpuppy has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 250 seconds]
Technodrome has joined #ruby
explorier has joined #ruby
roshanavand__ has quit [Ping timeout: 260 seconds]
explorier has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
HannaM has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
xf3rno has joined #ruby
venue has quit [Quit: venue]
venue has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
xf3rno has quit [Ping timeout: 268 seconds]
explorier has joined #ruby
venue has quit [Quit: venue]
venue has joined #ruby
venue has quit [Quit: venue]
robotbee has quit [Ping timeout: 252 seconds]
venue has joined #ruby
venue has quit [Client Quit]
baojg has joined #ruby
robotbee has joined #ruby
venue has joined #ruby
explorier has quit [Ping timeout: 260 seconds]
pwnd_0 has joined #ruby
pwnd_ has quit [Read error: Connection reset by peer]
pwnd_0 is now known as pwnd_
neshpion has quit [Quit: neshpion]
explorier has joined #ruby
venue has quit [Quit: venue]
robotbee has quit [Quit: Leaving]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
explorier has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
MalkbabY_ has quit [Remote host closed the connection]
MalkbabY has joined #ruby
crankharder has joined #ruby
explorier has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
explorier has quit [Ping timeout: 265 seconds]
cd has quit [Quit: cd]
sagax has quit [Quit: Konversation terminated!]
explorier has joined #ruby
gix has quit [Ping timeout: 240 seconds]
explorier has quit [Ping timeout: 260 seconds]
explorier has joined #ruby
explorier has quit [Ping timeout: 252 seconds]
explorier has joined #ruby
maryo has joined #ruby
explorier has quit [Ping timeout: 246 seconds]
maryo87 has joined #ruby
ur5us_ has joined #ruby
maryo has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 250 seconds]
explorier has joined #ruby
maryo87 has quit [Read error: Connection reset by peer]
maryo87 has joined #ruby
stormbytes has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
explorier has quit [Ping timeout: 260 seconds]
akem has quit [Ping timeout: 265 seconds]
akem has joined #ruby
konsolebox has quit [Ping timeout: 246 seconds]
explorier has joined #ruby
m27frogy has quit [Ping timeout: 240 seconds]
explorier has quit [Ping timeout: 240 seconds]
maryo_87 has joined #ruby
dviola has quit [Quit: WeeChat 3.1]
dviola has joined #ruby
maryo87 has quit [Ping timeout: 265 seconds]
xf3rno has joined #ruby
venue has joined #ruby
patr0clus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Benett has quit [Remote host closed the connection]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
venue has quit [Quit: venue]
ChmEarl has quit [Quit: Leaving]
<User4588> Hi, how do I iterate from Range of Time, like `(Time.parse("1999-1-1")..Time.now).to_a` ?
<mozzarella> iterate what
Benett has joined #ruby
blackmesa has joined #ruby
xf3rno has quit [Quit: WeeChat 2.8]
<User4588> mozzarella good question, I want to iterate days for example
<mozzarella> User4588: there's probably no easy way to do it, other than adding (24 * 60 * 60) seconds every time and using strftime to get the date
<mozzarella> and that's if you really want to go that route, I'm not saying it's a good way to do it
<User4588> my goal is to have the days between a Time Range, I will investigate further
<User4588> mozzarella thx
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 246 seconds]
explorier has joined #ruby
xf3rno has joined #ruby
maryo_87 has quit [Read error: Connection reset by peer]
ur5us_ has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
xf3rno has quit [Quit: WeeChat 2.8]
jla has joined #ruby
Qchmqs has joined #ruby
explorier has quit [Ping timeout: 260 seconds]
Qchmqs has quit [Read error: Connection reset by peer]
* jla Ruby newbie following .... https://shopify.engineering/building-web-app-ruby-rails steps to get familiar with libraries like sockets
Qchmqs has joined #ruby
<jla> i see 'require 'socket' ' in the simple code sample .rb ... may i run 'gem install socket' or am i getting confused with gems and libraries ?
<Qchmqs> jla, unrelated note, but it's usually prefered to use bundler to install dependencies locally rather than gem to install them globally
<baweaver> For the sake of simple experiments just use gem instal
<baweaver> Worry about bundler later once you get into making gems, scripts, apps, or otherwise.
<Qchmqs> baweaver, I had my young sibling experiment with ruby, when he was interested in programming, using gem can quickly become cumbersome
<baweaver> For just testing in a REPL (IRB, Pry) gem install is fine
<baweaver> For just getting started it's fine.
<Qchmqs> another approach he ended up using, he found on some online tutorial, was to use a docker image with ruby installed, and have your REPL inside it
<jla> thX Qchmqs ... yes, as best practice.
<baweaver> "I want to try this" should not be encumbered quite so fast with package management
<baweaver> Though it will be an eventual step, yes.
Rounin has joined #ruby
<jla> yet, i see my socket divertimento works... without gem (socket) install,
<Qchmqs> baweaver, the opposite was true in my experience, while experimenting, you end up installing a lot of stuff
<baweaver> Then that's your experience
<Qchmqs> jla, sockets is shipped with ruby, there are bunch of similar stuff
<jla> may i guess i've just learned the difference between gems and libraries ?
<jla> ah
<baweaver> What I'm saying is it's wise to minimize
<baweaver> gems == libraries
<Qchmqs> jla, gems are just libraries, it's just some are standard, and the rest are community provided
<jla> oh
<baweaver> Start simple, add tools as you go. Things like Docker are a few steps removed unless someone has familiarity there already.
<baweaver> Unless you're on Windows then bets are kind of off
<Qchmqs> baweaver, yeah in my case, my brother had me to bug about stuff, so it makes sense
<baweaver> Then it's into WSL2 / etc and some real interesting rabit holes.
<jla> may i say that sockets is a standard ruby library , hence ...no need to 'gem it ' ?
<baweaver> Ruby's STDLIB is gemified, or rather they're mostly gems
<Qchmqs> it's a gem, that just happens to be shipped by default
<baweaver> ^
<baweaver> That's done so they can update those gems rather than releasing a whole new Ruby version to change something minor
* jla so much to learn ... | loves Ruby
<baweaver> Give this a read
<baweaver> It's in the channel topic as well as a shortened link
<baweaver> Book list, though mostly I'd go with Eloquent Ruby to start.
<Qchmqs> sending that link to my brother
<Qchmqs> thanks
<baweaver> I should really finish that book already...
<baweaver> dev.to/baweaver - I have a lot of articles there
<baweaver> or if you want something a bit more out there I've spoken at RubyConf a few times on interesting subjects
<jla> ThX !
* jla see you in dev.to ...
<baweaver> This one is more entry level, explaining reduce: https://www.youtube.com/watch?v=x3b9KlzjJNM
<jla> ah
<baweaver> This one is much more advanced and explores playing with Ruby syntax: https://www.youtube.com/watch?v=TVwVLBor8WE
* jla is with ruby koans ...
<baweaver> There's also exercism.io
<jla> ah
al2o3-cr has quit [Ping timeout: 240 seconds]
blackmesa1 has joined #ruby
<Qchmqs> jla, if you're starting out with programming, don't forget to get the basics of algorithms and data structures
<Qchmqs> it's more important than any language syntax
<baweaver> It does help to know enough syntax to implement them though ;)
<jla> baweaver ... i see your site ... Octopress ? Just curious...
<baweaver> Ah that one?
<baweaver> Real old
<baweaver> Should fix it later but don't quite care enough
<jla> yes Qcmqs ...say i'm re-starting
<jla> i used it ... in the past (just simple Jekyll now ) wasn't Octopress kind of deprecated kind of ?
<Qchmqs> if you already know the basics, then it might also be worth your while to learn more in depth OOP, like design patterns, it goes alongside exploring ruby
blackmesa has quit [Ping timeout: 258 seconds]
<Qchmqs> you'll love ruby more the more you learn
vondruch has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
jla has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
teclator has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
MalkbabY has joined #ruby
tosaraja_ is now known as tosaraja
blackmesa1 has quit [Ping timeout: 240 seconds]
akem_ has joined #ruby
brigitte is now known as aloy
akem has quit [Ping timeout: 265 seconds]
akem_ has quit [Ping timeout: 240 seconds]
<banisterfiend> jla socket prrogramming is a very intense way to start your programming career :)
<banisterfiend> I think game dev is the best route, check out the library libgosu.org
<banisterfiend> sockets are a pain in the ass, u have to learn about endianness, dns ,address families, file descriptors, threads most likely, and so on
lurkless has joined #ruby
akem has joined #ruby
<banisterfiend> then there's the kerfuffle over ipv4 vs ipv6 too, which can be the source of a lot of confusion for everyone
akem has quit [Ping timeout: 265 seconds]
akem has joined #ruby
baojg has quit [Remote host closed the connection]
GankMove has joined #ruby
GankMove is now known as StayinPaid
baojg has joined #ruby
gearnode has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 260 seconds]
vondruch has quit [Ping timeout: 252 seconds]
blackmesa1 has joined #ruby
akem_ has quit [Ping timeout: 268 seconds]
akem has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 260 seconds]
jla has joined #ruby
shtirlic has joined #ruby
<jla> can you recommend me any forum ( 'Discourse' like ... ? ) on ruby in general and/or RoRails in particular ?
akem has joined #ruby
akem_ has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
<banisterfiend> jla why ruby though? it seems like the language isn't so hot these days
<banisterfiend> if i was starting out again now, i'd probably focus on Python or Go
<banisterfiend> actually if i was starting out again, i'd avoid web dev like the plague; it's the least interesting kind of proogramming and a day working as a web developer is just the same day on repeat (unless you're extremely lucky)
<banisterfiend> i spent 5 years as a web dev, and it was a ground-hog day style nightmare
<banisterfiend> create model -> create controller -> endpoint, endpoint -> maybe a little bit of auth, now some boring ass javascript in whateever is the flavor of the day framework; and if i'm ReALLY lucky i can do some CSS
<banisterfiend> it's a spirit crushing nightmareee
<banisterfiend> better alternatives to being a web monkey: devops, data science, system devleopment, mobile development
blackmesa1 has quit [Quit: WeeChat 3.1]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Qchmqs> I was thinking of going devops too
<Qchmqs> for exactly this reason, being a web monkey is all about dem controllers logic, some models thinking, and then boring ass tiring and clunky JSX or wandering accross tempates and doing html with a twist in vue
<Qchmqs> I've done some mobile, it's even lamer, and reminds me of my early days as a Qt/C++ dev
<Qchmqs> data science isn't for me, it's more math than IT
<Qchmqs> sys dev ? idk much about that, but C always scared me
<banisterfiend> devops is great, you get to mess with some cutting edge tech too; BPF, namespaces, cgroups, etc
Qchmqs_ has joined #ruby
JanHebler[m] has quit [Quit: Idle for 30+ days]
Qchmqs_ has quit [Client Quit]
crankharder has joined #ruby
Qchmqs_ has joined #ruby
<banisterfiend> Qchmqs if you did C++, not sure why C would scare you :) C++ is 100x scarier than C :D
<Qchmqs_> what to do when I get disconnected and my name is suddenly still in use ?
<Qchmqs_> banisterfiend, not to me xD
<Qchmqs_> I worked as a C++ dev for a while, I still found C scary
Qchmqs has quit [Ping timeout: 240 seconds]
Qchmqs_ is now known as Qchmqs
<banisterfiend> not sure ehwo you can think that, c++ is just C with more features, it's essentially a super set
<Qchmqs> C feels like my abandoned childhood all over again
<banisterfiend> C is extremely simple
<Qchmqs> you gotta handle everything
<banisterfiend> ya it's cumbersome sometimes
<banisterfiend> but if you can just stick everything on the stack as much as possible yoou dont have to woorry about managing memory
<Qchmqs> I prefer ruby and crystal nowadays
<Qchmqs> and even swap js for coffee when I can
<Qchmqs> > but if you can just stick everything on the stack as much as possible yoou dont have to woorry about managing memory
cd has joined #ruby
<Qchmqs> aka if you worry the whole time about worrying, you won't have to worry
<banisterfiend> not surre what you meean, that's the emodern approach even in c++
<jla> banisterfiend ... i don't care about hot, or 'coolness' ... in a programming language :-) , really
crankharder has quit [Ping timeout: 260 seconds]
<banisterfiend> jla i figured u'd care about employabiliity :)
<Qchmqs> banisterfiend, I mean it's not really much of a help, it's still worrying about memory, that I'd rather not do nowadays
<banisterfiend> Qchmqs no, if someone is on the stack it gets cleared up automatically, u dont have to expllicitlly free it
<Qchmqs> jla, if you care about employability, it's all TypseScript and NodeJs out there
<banisterfiend> something*
<Qchmqs> banisterfiend, wow, the Cpp world isn't painful anymore ?
<jla> devops ...yeah, i rings me a bell, banisterfiend , data science too ... One day ?
<banisterfiend> modern c++ is amazing actually
<banisterfiend> Qchmqs auto filteredPeople = peopleVector
<banisterfiend> | views:filter([](auto &person) { return person.age > 30; })
<banisterfiend> | views::transform(&Person::name)
<banisterfiend> | views::drop(2);
Tziltzal has joined #ruby
<banisterfiend> that's c++20
<banisterfiend> it's even nicer than Ruby iterators in many ways
<jla> banisterfiend ... i'm (poorly) self-employed
<Qchmqs> so the rust rewrite of firefox was unneccessary after all N
<jla> or, trying to associate with some (more successful) colleagues... or dream about a coop ?
<banisterfiend> welll, i'd say the c++ in firefox was written in ancient and leaky c++98
<Qchmqs> the cpp I know
<banisterfiend> if they rewrote it in c++20 it would be much better
<banisterfiend> but rust is just as good i guess
<Qchmqs> rust gives me cozy feels
<Qchmqs> nothing scary
<banisterfiend> c++ has some advantages over rust though, compile-time programming in Rust isn't even close to C++
<banisterfiend> c++ also has variadic templates, which rust doesn't have
<banisterfiend> 'concepts' are also very cool
<Qchmqs> rust doesn't do macros with a preprocessor
<Qchmqs> I always thought of templates as a confusing ass thing, it took me a while to wrap my head around them
<banisterfiend> macros are mainly a C thing, keept in c++ for compat reasons
<Qchmqs> man I'm glad I switched to dynamic languages, ruby and php and js for years now
<banisterfiend> tho they can be handy sometimes
<Qchmqs> won't touch anything else
shtirlic has quit [Remote host closed the connection]
<banisterfiend> i feel exacttly the oppositee
<banisterfiend> i transitioned from ruby -> c++ and c++ is infinitely more fun
<banisterfiend> the variety of things i work on now is sky high
<banisterfiend> from very high level UI things in QT
rafadc has quit [Ping timeout: 240 seconds]
<banisterfiend> to extreemely low level kernel extension and driver code
<Qchmqs> I migrated exactly from the opposite lol
<Qchmqs> from Qt4 when I stopped doing apps and went web into php, then discovered rails
<banisterfiend> what qtt apps were you working on tho?
<banisterfiend> what was the product
<Qchmqs> stock management
<Qchmqs> and similar stuff
<banisterfiend> there u go :)
<Qchmqs> what are you working on ?
<banisterfiend> the domain i'm working on is system-level networrking, and it's a veery competitive industry, so the more creative and wacky and low-level we go, the more powerful we make our product
<banisterfiend> VPN
<banisterfiend> s
va5c0 has joined #ruby
<Qchmqs> interesting, explains why you're not bored with it
<Qchmqs> my work in Cpp was mostly lame ass products that are sold as solutions to traders and so on
<banisterfiend> tjhere's always crazy-ass problems to solve
<Qchmqs> it might help clear things up when you know I'm from north africa
<Qchmqs> the economy here is a factor
<Qchmqs> no one's is building a complex product
<banisterfiend> recently we had to figure out how to implement split tunneling on macos after they took away kernel extensions
rafadc has joined #ruby
<banisterfiend> our previouos approach was to just write a kernel extension to control routing behaviour for specific app traffic, but that no longer works on big sur
<Qchmqs> and I'm here writting php
<banisterfiend> so we had to figure out a completely different approach :) We're currently the only VPN that offerers split tunneling on big sur, no one else could figure it out
<Qchmqs> and worrying about my gf waiting the train delay to come back home
<Qchmqs> with her luggage
<banisterfiend> you'er in europe?
<Qchmqs> nope, north africa
<Qchmqs> algeria
<banisterfiend> you're from there originallly? or mved there?
<Qchmqs> I'm from here originally yes
<Qchmqs> local berber fella
<banisterfiend> haha
<banisterfiend> i was in tangier morocco a few years back
<banisterfiend> had an incrrediblle time, wish i'd visited algeeria too
<Qchmqs> I'll invite you for a beer if you ever visited
<Qchmqs> yes we have bars in the berber regions :')
<banisterfiend> is algiers similar to morocco?
<banisterfiend> i visited berber hill tribes while i was in morocco
<Qchmqs> never been to morroco
<Qchmqs> so I don't know
<banisterfiend> they were in the middle of some kind of festival where a guy dressed up like a goat and chased the children over the roof tops
<banisterfiend> he beat them with a stick when he caught them
<Qchmqs> we don't have that
<Qchmqs> what we have are two main cultures, the norther and the southern
<Qchmqs> the northern is liberal to an extent, the southern is conservative
<Qchmqs> I moved out from the south to here, because down south, you can't even get alcohol legally
<Qchmqs> it's "haram"
<Qchmqs> so if you visit, don't wander far from the capital
<banisterfiend> can u easily visit spain?
<banisterfiend> it was a couple hour boat ride from malaga to morocco
<Qchmqs> if I wanted to, but I'm not interested in visiting any place, I have a lot to handle this year
<Qchmqs> the aftermath of 2020
<banisterfiend> i'm thee opposite
<banisterfiend> so stuck in this stupid country i wanna travel again asap
<Qchmqs> didn't you have a 2020 ?
<banisterfiend> 2020 was a good year for thte VPN industry
<banisterfiend> everyone at home online
<Qchmqs> I had to dismantle my team and go on loner again
<banisterfiend> yea that sucks
<banisterfiend> most industries had a rough year, but a few did betterr
<banisterfiend> i got lucky that's all
<Qchmqs> well, good for you folks
<banisterfiend> my gf lost her job
<banisterfiend> so it's not all sunshine in my house
<Qchmqs> we postponed marriage a year :v
<Qchmqs> talking of that, I have to get dinner ready now
<banisterfiend> dinner?
<banisterfiend> waht's the time there?
<banisterfiend> 10:30am right?
va5c0 has quit [Ping timeout: 240 seconds]
StayinPaid has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 240 seconds]
akem has joined #ruby
Rudd0 has joined #ruby
Tziltzal has quit [Ping timeout: 268 seconds]
infinityfye has joined #ruby
HeavenDestroyer has joined #ruby
john___ has joined #ruby
infinityfye_ has joined #ruby
infinityfye__ has joined #ruby
infinityfye has quit [Ping timeout: 240 seconds]
infinityfye has joined #ruby
infinityfye_ has quit [Ping timeout: 240 seconds]
infinityfye__ has quit [Ping timeout: 240 seconds]
HeavenDe1troyer has joined #ruby
<HeavenDe1troyer> HeavenDe1troyer: hi
HeavenDe1troyer has quit [Client Quit]
HeavenDestroyer has quit [Quit: leaving]
HeavenDestroyer has joined #ruby
va5c0 has joined #ruby
HeavenDestroyer has quit [Quit: leaving]
HeavenDestroyer has joined #ruby
andremedeiros has joined #ruby
HeavenDestroyer has quit [Client Quit]
ur5us_ has joined #ruby
va5c0 has quit [Quit: WeeChat 3.1]
HeavenDestroyer has joined #ruby
crankharder has joined #ruby
m27frogy has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
crankharder has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
jla has quit [Ping timeout: 260 seconds]
ejjfunky has joined #ruby
ur5us_ has quit [Ping timeout: 258 seconds]
StarOnD has joined #ruby
jla has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
TCZ has joined #ruby
xf3rno has joined #ruby
StarOnD has quit [Quit: Connection closed]
maroloccio has joined #ruby
crankharder has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
alexherbo2 has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
xf3rno has quit [Ping timeout: 260 seconds]
jetchisel has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
jetchisel has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
john___ has quit [Quit: Connection closed for inactivity]
jla has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
maroloccio has quit [Quit: WeeChat 2.3]
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
ejjfunky has quit [Quit: Leaving]
crankharder has joined #ruby
deviantfero has quit [Quit: WeeChat 3.1]
<splud> I want to run an .each against an array to invoke a function, and assign the result of the function to a variable. basically: tweaker=(-5..5).to_a.each {|x| f(x)}
<splud> the ellipse expansion is what gets assigned. How can I get the results from f(x) ?
<clemens3_> v << f(x) inside the each loop
clemens3_ has quit [Quit: WeeChat 2.7]
clemens3 has joined #ruby
<splud> oh, duhr.
Rudd0 has quit [Ping timeout: 260 seconds]
infinityfye has quit [Quit: Leaving]
croberts has joined #ruby
Emmanuel_Chanel has joined #ruby
<splud> thanks for that. btw.
<splud> got busy trying to get gnuplot to work with the data.
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> splud: foo = (-5..5).map { |x| f(x) }
<splud> ah, clemens3 's suggestion worked, but yea, map is what i was originally after.
<splud> ATM, my chief issue is with gnuplot. Trying to sort how I can just pass it the x and y values for a plot.
<splud> because I can't just give it the function (which is in ruby, not gnuplot)
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
shtirlic has joined #ruby
TCZ has quit [Quit: Dowidzenia]
jetchisel has quit [Ping timeout: 260 seconds]
ChmEarl has joined #ruby
TCZ has joined #ruby
konsolebox has joined #ruby
jetchisel has joined #ruby
HannaM has joined #ruby
TCZ has quit [Quit: Dowidzenia]
jla has joined #ruby
explorier has joined #ruby
cthulchu has joined #ruby
explorier has quit [Ping timeout: 265 seconds]
explorier has joined #ruby
explorier has quit [Ping timeout: 265 seconds]
SeepingN has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY_ has joined #ruby
desnudopenguino has joined #ruby
TCZ has joined #ruby
TorpedoSkyline has joined #ruby
explorier has joined #ruby
Rudd0 has joined #ruby
HannaM has quit [Read error: Connection reset by peer]
Qchmqs has quit [Quit: leaving]
jla has quit [Ping timeout: 240 seconds]
ua has quit [Ping timeout: 240 seconds]
VeryBewitching has joined #ruby
Technodrome has joined #ruby
ua has joined #ruby
howdoi has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
TCZ has quit [Quit: Dowidzenia]
crankharder has quit [Ping timeout: 252 seconds]
HannaM has joined #ruby
roshanavand__ has joined #ruby
gix has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has joined #ruby
Xiti` has joined #ruby
cthulchu_ has joined #ruby
gearnode has quit [Ping timeout: 260 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
Xiti has quit [Ping timeout: 240 seconds]
gearnode has joined #ruby
robotbee has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
cuerbot has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
elcuervo has joined #ruby
mnathani has quit [Remote host closed the connection]
mnathani has joined #ruby
crankharder has joined #ruby
gearnode has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
towo_ has quit [Quit: I am the vanguard of your destruction. This exchange is over.]
towo has joined #ruby
neshpion has joined #ruby
neshpion has quit [Quit: neshpion]
explorier has quit [Ping timeout: 240 seconds]
maroloccio has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jla has joined #ruby
gix has quit [Quit: Client exiting]
SeepingN has joined #ruby
gix has joined #ruby
thinkpad has quit [Ping timeout: 260 seconds]
maroloccio has quit [Quit: WeeChat 2.3]
thinkpad has joined #ruby
lockweel has joined #ruby
konsolebox has quit [Remote host closed the connection]
hiroaki has joined #ruby
konsolebox has joined #ruby
explorier has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
patr0clus has joined #ruby
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
Vaevictus has joined #ruby
explorier has quit [Quit: leaving]
jinie has joined #ruby
<Vaevictus> my ruby's a bit rusty... i've got an array of strings and objects that have matching strings as attributes... how can i create an array of the objects that contains the matching objects?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Vaevictus> slightly misworded... i've two arrays, one of strings, one of objects (with the attributes to match against)
crankharder has quit [Ping timeout: 246 seconds]
<Vaevictus> hmm... (it's from ldap, the users are objects, the attributes are "canonical names" aka cn) ... i suppose i could Users.select{ |u| theotherlist.include?(u[:cn])}
<havenwood> Vaevictus: Yeah, that's the typical way, #select those than #include?.
<Vaevictus> thanks... my ruby book is at home and it's been a long while :D nice to derust though :D
<havenwood> Vaevictus: In Rails, there's also #in? as an alternative to #includes? if you prefer.
<Vaevictus> i learned rails and ruby together ages ago, this project is just ruby :D
<havenwood> Vaevictus: Users.filter { |user| user.fetch(:cn).in? theotherlist }
<Vaevictus> back in the 1.x days :D
<havenwood> Vaevictus: Yeah, #include? is just as good.
<havenwood> Users.filter { |user| theotherlist.include? user.fetch(:cn) }
<havenwood> Vaevictus: You might consider #fetch to avoid #[] checking if `nil` is in theotherlist.
<havenwood> Sometimes nice to raise rather than have unexpected nils.
<havenwood> Vaevictus: I joined Ruby right as 1.9 was landing.
<Vaevictus> that may help elsewhere. :D
<havenwood> The 1.9.1 days, if you will.
<Vaevictus> 2005-6ish i think
<havenwood> Ah, that's earlier than me.
<havenwood> I was in law school then.
roshanavand_ has joined #ruby
<Vaevictus> i could be wrong, that's 15 years and 3 kids ago :D
<havenwood> i'm only 10 years and 1 kid into Ruby :)
<Vaevictus> looks like 1.2 and 2.0 were 2007
<Vaevictus> for rails
konsolebox has quit [Quit: Leaving]
<leah2> my first was 1.6.5 but 1.8 came out soon
<Vaevictus> so i was likely fairly close in my estimate
<havenwood> the heart is aerogel, fun stuff
roshanavand__ has quit [Ping timeout: 240 seconds]
MalkbabY_ has quit [Remote host closed the connection]
MalkbabY has joined #ruby
thinkpad has quit [Ping timeout: 265 seconds]
HeavenDestroyer has quit [Quit: leaving]
thinkpad has joined #ruby
Guest48 has joined #ruby
jla has quit [Ping timeout: 265 seconds]
Guest48 is now known as hejhaj
Technodrome has joined #ruby
TCZ has joined #ruby
crankharder has joined #ruby
jess is now known as j
roshanavand__ has joined #ruby
roshanavand_ has quit [Ping timeout: 265 seconds]
eddof13 has joined #ruby
<Vaevictus> woo, that worked... now... apparently i'm using erb wrong :D
<Vaevictus> casting wrong, probably.
<Vaevictus> i've got 3 arrays i'm passing in to result_with_hash and erb sees them nil
neshpion has joined #ruby
roshanavand_ has joined #ruby
roshanavand__ has quit [Ping timeout: 240 seconds]
klaas has quit [Quit: ZNC 1.8.2 - https://znc.in]
klaas has joined #ruby
roshanavand_ has quit [Ping timeout: 260 seconds]
robotbee has quit [Ping timeout: 240 seconds]
roshanavand_ has joined #ruby
lockweel has quit [Quit: Leaving]
dpl has joined #ruby
lockweel has joined #ruby
shtirlic has quit [Ping timeout: 246 seconds]
lockweel has quit [Quit: Leaving]
TCZ has quit [Quit: Dowidzenia]
deviantfero has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
robotbee has joined #ruby
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #ruby
Xiti` has quit [Quit: Leaving]
ur5us_ has joined #ruby
Xiti has joined #ruby
HannaM has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
schne1der has quit [Ping timeout: 260 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
cthulchu_ has quit [Ping timeout: 268 seconds]
<Vaevictus> got erb squared away and the app done... except now my html emails have doubled my carriage returns in outlook ;_;
crankharder has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gearnode has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
roshanavand_ has quit [Ping timeout: 260 seconds]
roshanavand_ has joined #ruby
Technodrome has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
hejhaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 260 seconds]
shokohsc has quit [Ping timeout: 240 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shokohsc has joined #ruby
cow[moo] has joined #ruby
cow[moo] has quit [Client Quit]
cow[moo] has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
cow[moo] has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
cow[moo] has quit [Client Quit]
cow[moo] has joined #ruby
crankharder has joined #ruby
stormbytes has quit [Ping timeout: 265 seconds]
crankharder has quit [Ping timeout: 260 seconds]
<scriptonaut> have you guys ever had a rescue just not work
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<scriptonaut> I have tried rescue StandardError, Exception, and even just => e, which I think is Exception as well
<scriptonaut> and I keep getting ActiveRecord::StatementInvalid: NoMethodError: undefined method `each' for false:FalseClass
<scriptonaut> I seriously cannot catch this activerecord error
elcuervo has quit [Quit: ZNC 1.7.5 - https://znc.in]
<leftylink> well we might be in a situation such as the contrast between the two following things
elcuervo has joined #ruby
<leftylink> &>> begin raise; :not_rescued; rescue; :rescue_worked end
<rubydoc> # => :rescue_worked (https://carc.in/#/r/asd5)
<leftylink> &>> begin raise; :not_rescued; rescue; false.each end
<rubydoc> # => -e:4:in `rescue in <main>': undefined method `each' for false:FalseClass (NoMethodError)... check link for more (https://carc.in/#/r/asd6)
crankharder has joined #ruby