<Senjai>
I'm fine with that, I just feel like its probably worth raising an issue on Teaspoon about it
freerobby has joined #ruby
Niandalu has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Niandalu>
PART
<Senjai>
Niandalu: NO
Aswebb_ has quit [Ping timeout: 246 seconds]
pengin has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
sharpmachine has quit [Remote host closed the connection]
ruby-lang111 has joined #ruby
Muhannad has quit [Ping timeout: 276 seconds]
Akagi201 has quit [Remote host closed the connection]
Akagi201 has joined #ruby
m3_del has quit [Remote host closed the connection]
AndyBotwin has quit [Quit: Leaving]
axsuul has joined #ruby
millerti has joined #ruby
Niandalu` has joined #ruby
ruby-lang111 has quit [Ping timeout: 246 seconds]
mrmargolis has joined #ruby
mister_solo has quit [Ping timeout: 264 seconds]
nateberkopec has joined #ruby
Akagi201 has quit [Ping timeout: 246 seconds]
Niandalu has quit [Ping timeout: 250 seconds]
graft_ has quit [Quit: Lost terminal]
<Ox0dea>
Senjai: The C source indicates that only brackets are treated like they are in regular expressions, so you can't group or negate a whole string.
DLSteve has quit [Quit: Leaving]
<Ox0dea>
You could put together a character class that will match everything but "legacy", but that's gross.
_whitelogger has joined #ruby
[H]unt3r has quit [Quit: Leaving]
s2013 has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
s2013 has quit [Client Quit]
wallerdev_ has quit [Ping timeout: 246 seconds]
findaway has joined #ruby
axilla_ has joined #ruby
mrmargolis has joined #ruby
oo_ has joined #ruby
axilla has quit [Ping timeout: 255 seconds]
d0lph1n98 has quit [Ping timeout: 264 seconds]
findaway has quit [Ping timeout: 264 seconds]
i8igmac has joined #ruby
Soda has quit [Remote host closed the connection]
RoryHughes has quit [Ping timeout: 256 seconds]
iooner has quit [Ping timeout: 256 seconds]
teotwaki has quit [Ping timeout: 256 seconds]
Dwarf has quit [Ping timeout: 256 seconds]
<Tarkers34>
regex to match all numbers, regardless of how many decimal points are in them? I literally mean that, even if a "number" has 4 decimal points. So it would match: 3, 4.4, 5.554, 543.43.54.34.43. However, with this string "..2.3.4.5.....6.7.8.9" it would have 2 match groupsL 2.3.4.5 and 6.7.8.9
lolmaus has quit [Ping timeout: 256 seconds]
<Tarkers34>
my attempt was /[+-]?(?=\d*)(?=\.?\d)\d*\.?\d*(?:[+-]?\d+)?/, gone very arwy :(
arooni-mobile has quit [Ping timeout: 248 seconds]
jaxxstorm has quit [Ping timeout: 256 seconds]
aamador has quit [Quit: Leaving]
<stoodfarback>
Ox0dea: Could you? I tried for a few minutes, couldn't think of a way.
weaksauce has quit [Ping timeout: 248 seconds]
<jfarmer>
Tarkers34 Decimal points can't follow each other?
<jfarmer>
I assume like "2..4" is bad
jaxxstorm has joined #ruby
bradleyp_ has quit [Ping timeout: 248 seconds]
<Tarkers34>
jfarmer, yeah that's it. Decimal points can't follow each other :)
RoryHughes has joined #ruby
iooner has joined #ruby
teotwaki has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
Pupeno has joined #ruby
<zenspider>
?regexp
<ruboto>
I don't know anything about regexp
<jfarmer>
Oh..
<Tarkers34>
A test string could be ".45.5xei68.6g5554.4343.23232...43323...4"
<jfarmer>
Uhm...
<Tarkers34>
no worries, it's tricky stuff regex haha
<zenspider>
put all the data it could match in the text box, and your regexp in the regxp box, tweak until it looks right
bruno- has quit [Ping timeout: 248 seconds]
Dwarf has joined #ruby
<Tarkers34>
zenspider : Yeah thought I had it http://rubular.com/r/GEWyQU04Nc :( the match groups are all wrong though...those aren't isolated groups (rubular isn't showing the matches for some reason, at least not for me)
<Tarkers34>
it's matching 'number' fragments, and they're right next to each other...it isn't working :/
dgutierrez1287 has quit [Ping timeout: 246 seconds]
sharpmachine has quit [Ping timeout: 256 seconds]
ooesili has quit [Quit: leaving]
vdamewood has joined #ruby
pepperbreath has left #ruby [#ruby]
sharpmachine has joined #ruby
mbff has quit [Remote host closed the connection]
sharpmachine has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 256 seconds]
psyprus has quit [Ping timeout: 248 seconds]
blue_deref has quit [Quit: bbn]
devbug_ has joined #ruby
devbug has quit [Ping timeout: 252 seconds]
rushed has joined #ruby
Randroid has joined #ruby
michael_mbp has quit [Excess Flood]
psyprus has joined #ruby
michael_mbp has joined #ruby
arescorpio has quit [Quit: Leaving.]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revath has joined #ruby
skade has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
revath has left #ruby [#ruby]
chrisco has joined #ruby
blahwoop has joined #ruby
<blahwoop>
hi all, im writing a caesar cipher rot-13. i can get it to work for all the letters but i don't know how to ignore the spaces and keep the spaces or any other non characters
<Aeyrix>
What's your current code?
i8igmac has quit [Ping timeout: 264 seconds]
<baweaver>
Ox0dea: little later than I wanted to get home
<baweaver>
What fresh hell have you brought me tonight?
chrisco has quit []
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blahwoop>
basically i just need it to ignore the spaces or non letters
<blahwoop>
as is
jpfuentes2 has joined #ruby
Randroid has quit [Quit: Randroid]
s2013 has joined #ruby
chrisco has quit [Client Quit]
devbug has joined #ruby
jpfuentes2 has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
haudoing has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
devbug_ has quit [Ping timeout: 246 seconds]
thiagovsk has quit [Quit: Connection closed for inactivity]
Al3ks has joined #ruby
Pupeno has joined #ruby
jenrzzz has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
_blizzy_ has quit [Ping timeout: 246 seconds]
revath has joined #ruby
iamninja has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
Al3ks has quit [Quit: Leaving]
bigkevmcd has quit [Read error: Connection reset by peer]
<Aeyrix>
blahwoop: eh
<Aeyrix>
line 14
<Aeyrix>
cipher(rotation)[letter] unless letter == ' '
tyl has joined #ruby
<tyl>
Hi, Is having an activerecord object with less attributes more efficient? in irb when you type ObjectSpace.memsize_of("ActiveRecordObject") most of the activerecord instances are of the same size despite having less attributes
sarkyniin has quit [Quit: Quit]
yfeldblum has quit [Ping timeout: 248 seconds]
<pontiki>
hello folks
<baweaver>
tyl #RubyOnRails
<baweaver>
short: it doesn't matter enough to care
keen__________10 has joined #ruby
<blahwoop>
Aeyrix: i went with return letter if /[^a-zA-Z]/.match(letter) right above that cipher method
<baweaver>
If it does you either need to rethink your database or use a different framework
<Aeyrix>
blahwoop: Slightly more efficient to only do the substitution if it's a letter
<havenwood>
pontiki: hey
<Aeyrix>
as opposed to doing the sub and only returning it if it's a letter
<tyl>
baweaver I have asked rubyonrails but they don't seem to know how rails is loading the activerecord object, so I was thinking since this has more to do with the mem a ruby object holds I should just ask it here. in other languages like C++ i have found if an object instance is big it takes more cycles when it goes through the cpu
keen___________9 has quit [Ping timeout: 276 seconds]
<baweaver>
>> alpha = [*?a..?z,*?A..?Z]
<ruboto>
baweaver # => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", ...check link for more (https://eval.in/391392)
<blahwoop>
Aeyrix: the problem is it wont decrypt properly
<Aeyrix>
tyl: Is having an engine with less cylinders more efficient?
<tyl>
Aeyrix i guess smaller cc cars are always said to be more econimical
<Aeyrix>
tyl: Unless?
tkuchiki has joined #ruby
<darlinger>
hey I need a little help with a ruby exercise I'm doing. I'm building a towers of hanoi game as an object with instance variables as arrays representing the disks and pegs for the game. I can't think of a good way to take user input to designate the pegs.
chouhoulis has quit [Remote host closed the connection]
<tyl>
baweaver this kinda goes reverse from most of the computer languages i have learnt, usually we really care about the size of the object in the memory
<Aeyrix>
You're not answering my questions, which will help you answer yours.
<tyl>
well i am not sure why it would not be less uneconomical
<baweaver>
blahwoop: see my mad stream above
<Aeyrix>
The "unless" is "unless you need the power". You can't run a minesite truck on a tiny four cylinder engine.
<tyl>
i guess only if the person steps on the acceperator
<tyl>
accelerator
<Aeyrix>
[15:08:26] <Aeyrix>The "unless" is "unless you need the power". You can't run a minesite truck on a tiny four cylinder engine.
niemcu has joined #ruby
<darlinger>
i just need to know how to take input from gets to specify instance variables in an object
<Aeyrix>
If you need an AR object with 30 attributes
<Aeyrix>
you need an AR object with 30 attributes
<pontiki>
darlinger: without looking at the gist; what i would think of is the *only* input you have for TOH is from peg and to peg, all you should need is 1, 2 or 3, 1
<Aeyrix>
you can't optimise that away
skade has quit [Quit: Computer has gone to sleep.]
<tyl>
Aeyrix i don't actually need all the attributes like all of them time
<jfarmer>
tyl Comparatively speaking, among all the the things put into memory when you instantiate a new AR object, the number of attributes is insignificant
<sevenseacat>
tyl: sounds like in the past you've been dealing with a lot lower-level languages
<tyl>
some of them could be put into a different table
<Aeyrix>
^
<sevenseacat>
Ruby is a very high-level language
<Aeyrix>
tyl: If it's related to one model
<Aeyrix>
put them on that model
<Aeyrix>
don't push them around places trying to save memory
<baweaver>
which cares very little for memory economy
<sevenseacat>
we care more about better ways to do things, than micro-optimizing every byte of memory
<jfarmer>
tyl It's like you're looking at two bathtubs and wondering if the one that has a slightly dimpled floor is more water-efficient.
<baweaver>
High level languages focus on solving problems themselves
<darlinger>
pontiki: but how do i take that input and use it to designate the pegs within the object?
<sevenseacat>
jfarmer: nice analogy.
phutchins1 has quit [Ping timeout: 255 seconds]
<tyl>
ok
<darlinger>
pontiki: i was thinking possibly an if statement that just returns the identifier for the array depending on the input
<havenwood>
jfarmer: what pattern are the dimples? bumping up or down?
Wolland has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
<sevenseacat>
who cares if one bathtub is foot shorter than the other, or made out of steel instead of ceramic
Rickmasta has joined #ruby
<sevenseacat>
or is missing a plughole
<Aeyrix>
people who dislike steel?
<Aeyrix>
:^)
<baweaver>
the point is that while some would focus on getting memory efficiency up and keeping objects down, another could have a basic blogging site already done.
<pontiki>
hum, darlinger, i thought the question was how to represent and request the input
cirn0 has quit [Remote host closed the connection]
<baweaver>
some can do that in 15 minutes
<baweaver>
god speed trying that in C++/C/Java
<pontiki>
i apologize, i haven't got mental bandwidth to go deeper
tkuchiki has quit [Ping timeout: 252 seconds]
<tyl>
baweaver well the main app is finished already I am just looking at weaknesses in the code
<jfarmer>
tyl Put another way: by the point you've decided to use an ActiveRecord object (or even Ruby, really), you're well past the point of caring about low-level memory optimizations.
<baweaver>
NewRelic
<jfarmer>
That ship has sailed.
<tyl>
i usually do optimisation during the refactor stage
<baweaver>
Focus on N+1 queries
<baweaver>
that's going to be your biggest win
<sevenseacat>
you've got bigger weaknesses to worry about than memory allocation of AR objects.
radialneon has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
mrmargolis has joined #ruby
<tyl>
jfarmer yeah i see the philosophy here
<sevenseacat>
get something like bullet to detect common problems
<jfarmer>
tyl I wouldn't call it a "philosophy" — it's a statement of fact.
<tyl>
its a different type of mindset you have to have
<darlinger>
pontiki: yes. i get that the user would use 1, 2, or 3 to designate pegs. but how do I take that strings from input and use them to designate variables?
<jfarmer>
If you care about memory efficiency at that level then you shouldn't use Ruby (or Python or other high-level, interpreted, dynamically-typed languages).
jenrzzz has joined #ruby
<jfarmer>
It's just the wrong tool if that's honestly your priority.
speaking1ode has joined #ruby
tkuchiki has joined #ruby
<baweaver>
If you _really_ need speed, better frameworks are Yesod, Scotty, Play, and Phoenix
<sevenseacat>
omg phoenix
<baweaver>
Warp in Haskell is extremely fast
abuzze has joined #ruby
<jfarmer>
tyl I'll put it a third and final way: if you want to optimize the memory usage of your Ruby apps, the win you get by allocating one fewer object will dwarf virtually any optimization you could practically make to the memory usage of a particular class of objects.
<pipework>
I would suggest measuring to determine what needs looking at. Only then should you consider how you should rectify it.
SOLDIERz has joined #ruby
cirn0 has quit [Remote host closed the connection]
blahwoop has quit [Remote host closed the connection]
<pipework>
benchmarking and profiling.
<tyl>
pipework thats what i intend to do later
cirn0 has joined #ruby
<pipework>
tyl: Ah then do it later and don't worry now.
sharpmachine has joined #ruby
<pontiki>
steps to beautiful code: 1) make it work. 2) make it pretty. 3) make it fast.
<havenwood>
tyl: In Rubyland Rails is quite a heavyweight in general. Compare for example with Roda and Sequel. Here're some non-db plain ole "Hello World" memory comparisons per request for various Ruby frameworks: https://github.com/luislavena/bench-micro#memory-allocationrequest
<baweaver>
Amusingly Warp and Yesod give Phoenix a run for its money, if not leave it in the dust in some cases.
<baweaver>
Though you have to learn Haskell
<baweaver>
tradeoffs
<jfarmer>
Yeah. Every single request to a Rails app is going to generate hundreds of String and/or Symbol objects.
<havenwood>
ngx_mruby smokes all of the above
bruno- has joined #ruby
<pontiki>
yesod is kind of freaky
<havenwood>
apples and oranges
<tyl>
havenwood thanks for the link
<darlinger>
is there an easy way to write a conditional like "if variable is equal to this or that"?
cirn0 has quit [Remote host closed the connection]
<havenwood>
tyl: Do take a look at Roda, it's lovely to use. I've heard good things about Lotus but not used it personally.
<baweaver>
Really all things being equal all of those above are within the same order of magnitude
<tyl>
jfarmer according to this old 2.x rails report its about 8,500 objects per request
<baweaver>
anything past that is splitting hairs honestly.
<jfarmer>
tyl Anything about Rails 2 is irrelevant at this point, really.
workmad3 has quit [Ping timeout: 256 seconds]
whiteline has quit [Ping timeout: 248 seconds]
<baweaver>
tyl: We have two startup teams. One focuses on getting something out the door no matter how slow it is, the other focuses on making it fast. Who's going to win?
<tyl>
yeah but it kinda gives you a ballpark figure
<pipework>
tyl: Not really.
<pipework>
Things have changed a lot since then.
<sevenseacat>
no, it really doesn't.
<jfarmer>
Rails 2 and Rails 3 are very different things internally
<pipework>
Try to keep within 2 years.
<pipework>
And ruby has changed since then.
<baweaver>
The first team would destroy the second, hands down. Fast counts for junk if you're not the first out the door.
<sevenseacat>
try to keep within at least the last major version
<tyl>
baweaver the app is done already i am just looking at where code could be improved, yes I do realize the main goal of a startup is to get stuff out of the door asap
<pipework>
baweaver: Win what?
<pipework>
Getting to market first?
<sevenseacat>
tyl: again, new relic, bullet. go. play.
Aswebb_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
getting to market is most of the battle. If you can crank new features faster than the other team can think you're going dominate
sharpmachine has quit [Ping timeout: 255 seconds]
<baweaver>
of course other factors abound, yes
casadei has quit [Remote host closed the connection]
stoodfarback has joined #ruby
<baweaver>
then again you could also react substantially faster to said factors as well.
<tyl>
rails 4 seems around 2740 compared to rails 2 1820 for the example quoted in this blog
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Radar>
Awww snap
<Radar>
LOL
<Radar>
Someone is heavily invested in PHP / Asp.net :)
oo_ has quit [Remote host closed the connection]
<swiftynb>
lol, i have not done any php for like 6 years
arup_r has joined #ruby
<Radar>
There's a good future in both Ruby + Python.
<swiftynb>
but apperently ruby is "garbage" and i should pay him
<Radar>
They're not dead.
<Radar>
No, he's an idiot.
<Radar>
That's just like my opinion
oo_ has joined #ruby
olistik has quit [Remote host closed the connection]
<swiftynb>
lol, i just don't want to relearn php and would rather pay someone to use a language i have exp with >_>
Trynemjoel has joined #ruby
<swiftynb>
cause php sucks ballz
<tbuehlmann>
"is not so secure" brought a big smile to my face
<swiftynb>
lawl
<pontiki>
[citation needed]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<swiftynb>
he wants like $500 to make a simple 5 page wordpess site...... no login functions or anything like that
ta has joined #ruby
<Radar>
How many hours do you expect it to take?
<tbuehlmann>
totally agreeing with radar. that person has a strong opinion here, not reflecting reality accurately
chinmay_dd has joined #ruby
howdoi has joined #ruby
<swiftynb>
lol well all i wanted was a simple 5 page professional site, i could build the entire thing minus the graphics in about an hour.....
<Sypheren>
O_O
<pontiki>
then just use jekyll or middleman...
arup_r_ has joined #ruby
<swiftynb>
the oonly thing i was looking for was someone good with graphics and clean layouts and able to write professionally
<pontiki>
then you don't want a developer at all!!! LOL
m3_del has joined #ruby
<swiftynb>
meh, didn't have time to do it myself, now i do/work with a visual artist that is also free that i will pawn most of it off to. Just though that was quite the opinion about ruby any python
<shevy>
hmm
<shevy>
hire pontiki
<shevy>
let her use MS paint
<swiftynb>
PAInt IS AMAZING!!!
<pontiki>
i don't have MS Paint :(
<swiftynb>
I tried adobe stuff and it is hardz
<pontiki>
i have to use shit like Corel Painter n stuff
<swiftynb>
NO! Microsoft paint is the only option!
chouhoulis has joined #ruby
arup_r has quit [Ping timeout: 276 seconds]
<shevy>
:)
<pontiki>
i no have anys MS :(
<swiftynb>
NOOB u should be using vista with php like the rest of us
<pontiki>
*sniff*sniff*
* pontiki
weeps in her wheaties
<swiftynb>
pontiki: Unignore <_>
m3_del has quit [Ping timeout: 264 seconds]
devbug has quit [Read error: Connection reset by peer]
lictor36 has joined #ruby
<pontiki>
err, wut?
<pontiki>
oh, i'm +g
speaking1ode has quit [Ping timeout: 244 seconds]
<swiftynb>
idk what that is lol
<pontiki>
ok, give it a go, swiftynb
<swiftynb>
done
<pontiki>
it sets your user so you get to control who can PM
<sphex>
bah. at this point, the only reason PHP still exists must be because outsourcing PHP web development to India is really cheap.
riotjones has joined #ruby
stan has joined #ruby
<shevy>
well legacy code
<shevy>
phpBB forum and mediawiki
<sevenseacat>
*cough wordpress
<shevy>
sphex on a game, they were using moin-wiki, which I think is in python; I hated to use it compared to mediawiki, it really was a usability disaster. only phpwiki is worse haha, but it is also simpler in usage
scripore has quit [Quit: This computer has gone to sleep]
serivich has joined #ruby
scripore has joined #ruby
Deele has quit [Quit: User excited]
<sphex>
eh, yeah.. I guess. the good PHP web apps tend to be *really* good; insane amounts of (cheaper) developer dev time went in them...
<sphex>
and when people need them modified they know it can be outsourced easily
sharpmachine has joined #ruby
<baweaver>
Ox0dea: O_O
ta has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
roolo has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
tyl has joined #ruby
Royalb15 has quit [Quit: Leaving]
tyl has left #ruby [#ruby]
uptownhr has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
hedgecore has quit [Quit: leaving]
bigkevmcd has joined #ruby
bigkevmcd has quit [Excess Flood]
revath has joined #ruby
bigkevmcd has joined #ruby
jlast has joined #ruby
yfeldblum has joined #ruby
brain_shim has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
micmus has joined #ruby
vdamewood has quit [Quit: Life beckons.]
ta has joined #ruby
skade has joined #ruby
oo_ has joined #ruby
codecop has joined #ruby
lolmaus has quit [Remote host closed the connection]
blaines_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dopagod has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
anisha has joined #ruby
lordkryss has joined #ruby
Dopagod has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
GnuYawk has quit [Quit: WeeChat 1.0]
rdark has joined #ruby
tesuji has joined #ruby
dhjondoh has joined #ruby
fabrice31 has joined #ruby
olistik has joined #ruby
fabrice31 has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
fabrice31 has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
_ht has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
GnuYawk has joined #ruby
postmodern has quit [Quit: Leaving]
mrmargolis has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
fabrice31 has quit [Read error: Connection reset by peer]
lala has quit [Quit: Connection closed for inactivity]
fabrice31 has joined #ruby
oo__ has joined #ruby
GnuYawk has quit [Client Quit]
oo_ has quit [Read error: Connection reset by peer]
fabrice31_ has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 264 seconds]
Sehryn_ has quit [Quit: Leaving]
m3_del has joined #ruby
fabrice31_ has joined #ruby
GnuYawk has joined #ruby
GnuYawk has joined #ruby
brain_shim has joined #ruby
blueOxigen has joined #ruby
corecode_ has joined #ruby
petems_ has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
Freijo has joined #ruby
dhjondoh1 has joined #ruby
sphex_ has joined #ruby
perrier_ has joined #ruby
rvchangue_ has joined #ruby
funnel_ has joined #ruby
howdoicomputer has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 250 seconds]
Helheim has quit [Ping timeout: 250 seconds]
corecode has quit [Ping timeout: 250 seconds]
petems has quit [Ping timeout: 250 seconds]
n1ftyn8 has quit [Ping timeout: 250 seconds]
Heero has quit [Ping timeout: 250 seconds]
perrier has quit [Ping timeout: 250 seconds]
sphex has quit [Read error: Connection reset by peer]
dhjondoh has quit [Ping timeout: 250 seconds]
rdark has quit [Ping timeout: 250 seconds]
izzol has quit [Ping timeout: 250 seconds]
funnel has quit [Ping timeout: 250 seconds]
rvchangue has quit [Ping timeout: 250 seconds]
stylus has quit [Ping timeout: 250 seconds]
drizz has quit [Ping timeout: 250 seconds]
Fraeon has quit [Ping timeout: 250 seconds]
d0lph1n98 has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 250 seconds]
skyjumper has joined #ruby
drzel has quit [Ping timeout: 250 seconds]
skyjumper has quit [Ping timeout: 250 seconds]
skyjumper has joined #ruby
skyjumper has quit [Changing host]
rvchangue_ is now known as rvchangue
Spleeze has quit [Ping timeout: 250 seconds]
marens_ has quit [Ping timeout: 250 seconds]
Prira has quit [Ping timeout: 250 seconds]
izzol has joined #ruby
petems_ has quit [Changing host]
petems_ has joined #ruby
drizz has joined #ruby
stylus has joined #ruby
funnel_ is now known as funnel
marens has joined #ruby
n1ftyn8_ has joined #ruby
Helheim_ has joined #ruby
d0lph1n99 has joined #ruby
Prira has joined #ruby
rdark has joined #ruby
petems_ is now known as petems
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Remote host closed the connection]
certainty has joined #ruby
drzel has joined #ruby
Heero has joined #ruby
Aswebb_ has joined #ruby
andikr has joined #ruby
Spleeze has joined #ruby
Akagi201 has quit [Ping timeout: 255 seconds]
niemcu has joined #ruby
terlar has joined #ruby
polysics has joined #ruby
oo__ has quit [Remote host closed the connection]
eGGsha has joined #ruby
Aswebb_ has quit [Ping timeout: 246 seconds]
ta has quit [Remote host closed the connection]
alex88 has joined #ruby
oo_ has joined #ruby
GitGud is now known as GitGod
arup_r_ has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
Helheim_ is now known as Helheim
jenrzzz has quit [Ping timeout: 255 seconds]
sharpmachine has joined #ruby
klingeldraht has joined #ruby
arup_r has joined #ruby
xcesariox has joined #ruby
d0lph1n99 has quit [Ping timeout: 248 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
sharpmachine has quit [Ping timeout: 250 seconds]
d0lph1n98 has joined #ruby
brain_shim has quit [Ping timeout: 252 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
tkuchiki has joined #ruby
krz has quit [Read error: Connection reset by peer]
KrzaQ has quit [Ping timeout: 264 seconds]
amclain has quit [Quit: Leaving]
glowcoil_ has joined #ruby
pjaspers_ has joined #ruby
daxroc_ has joined #ruby
glowcoil has quit [Ping timeout: 250 seconds]
daxroc has quit [Ping timeout: 250 seconds]
pjaspers has quit [Ping timeout: 250 seconds]
glowcoil_ has quit [Changing host]
glowcoil_ has joined #ruby
glowcoil_ is now known as glowcoil
daxroc_ is now known as daxroc
krz has joined #ruby
sphex_ is now known as sphex
dhjondoh1 has quit [Quit: dhjondoh1]
shoutsid has joined #ruby
arup_r has quit []
revdan has joined #ruby
blackmesa has joined #ruby
senayar has joined #ruby
iamninja has quit [Ping timeout: 252 seconds]
sandelius has joined #ruby
RazorX has quit [Ping timeout: 252 seconds]
coetry has joined #ruby
<coetry>
What are your guys' thoughts on Ruby targeting wasm (web assembly)?
serivich has quit [Ping timeout: 255 seconds]
<coetry>
and potentially allow ruby to replace javascript as a client side programming language?
<bnagy>
there was a big goaround the day of the wasm announce
<coetry>
do you guys see this as a new page for the ruby community and more specifically the rails community?
<bnagy>
upshot was "maybe mruby"
jfarmer has quit []
<coetry>
taking the principles of mruby and going even further though, building on that inspiration
<coetry>
do you feel the advancements in the web platform can also impact the development of the ruby language and other languages as well?
dionysus69 has joined #ruby
doertedev has joined #ruby
jfarmer has joined #ruby
<contradictioned>
can anybody help me with bundler? i am developing on two gems A and B in parallel, thus i have in A's Gemfile an entry 'B', path: '/some/where/B'
yfeldblum has quit [Ping timeout: 248 seconds]
uptownhr has quit [Ping timeout: 255 seconds]
<contradictioned>
but somehow updates in B are not visible in A
_blizzy_ has joined #ruby
shoutsid has quit []
<adaedra>
Bonjour
<contradictioned>
i.e. if i add stupid `puts "blabla"` code in B, it is not output when I call the according method in A. is there something i'm loosing sight of?
towski_ has joined #ruby
mister_solo has joined #ruby
dhjondoh has joined #ruby
hagabaka has quit [Read error: Connection reset by peer]
Nirgali43 has quit [Ping timeout: 250 seconds]
scottymeuk has quit [Ping timeout: 250 seconds]
coffeeju1 has quit [Ping timeout: 250 seconds]
spectra has quit [Ping timeout: 250 seconds]
aep has quit [Ping timeout: 250 seconds]
andikr has quit [Ping timeout: 265 seconds]
Nirgali42 has joined #ruby
aep has joined #ruby
scottymeuk has joined #ruby
coffeeju1 has joined #ruby
uptownhr has joined #ruby
Aswebb_ has joined #ruby
<apeiros>
contradictioned: did you gist your code? (don't have the backlog, so I can't look)
hagabaka has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
spectra has joined #ruby
coffeecupp has joined #ruby
RazorX has joined #ruby
unshadow_ has joined #ruby
k3asd` has joined #ruby
jfarmer has quit []
ndrei has quit [Ping timeout: 252 seconds]
Joufflu has joined #ruby
brain_shim has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
blackmesa has quit [Ping timeout: 244 seconds]
unshadow has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
<contradictioned>
apeiros: there's not much code to show ;)
<contradictioned>
but this means, i have to do a version bump for every little code change
lkba_ has quit [Ping timeout: 244 seconds]
langlands has joined #ruby
<ruby-lang693>
It's a french tutorial
<ruby-lang693>
but i don't if it is good for ruby 2
coetry has quit [Quit: Lost terminal]
whiteline has joined #ruby
<baweaver>
2003 is too old
Matthews_ has joined #ruby
<baweaver>
seeing if I can find anything
IanV0rn2341 has joined #ruby
GnuYawk has quit [Read error: Connection reset by peer]
<baweaver>
though honestly (and take as you will) you would be better served by going with the english versions as they're far more likely to be up to date.
ton31337 has joined #ruby
tvb has joined #ruby
<adaedra>
ruby-lang693: bonjour
<ton31337>
anyone is using gem 'zk' for zookeeper?
<adaedra>
as baweaver said, you will have more luck with english resources
<ruby-lang693>
Un francais !
mikecmpbll has joined #ruby
<tvb>
Hi, I need some help with exception raising and rescueing
m3_del has joined #ruby
<ruby-lang693>
thank you, have you got a good english tutorial
<baweaver>
sphex: It might be, but 2003 is pushing your luck a bit. Best to stay within 3 years just to avoid fun little gotchas.
eGGsha is now known as eGGshke
<tvb>
adaedra: the raise is working if x is 0 but the code is not contineuing
IanV0rn2341 has joined #ruby
<ruby-lang693>
Okay, it's not a good tutorial for ruby 2
<tvb>
and if x = 1 or higher I won't get any errors but the result after will be null
<tvb>
what am I doing wrong?
<ruby-lang693>
But have you got a good english tutorial
adminc has quit [Remote host closed the connection]
stoodfarback has quit [Ping timeout: 256 seconds]
jeanlinux has joined #ruby
<baweaver>
ruby-lang693: see that above link for book recommendations
<bnagy>
tvb: don't do anything you're doing in that code :)
<baweaver>
past that, look into try-ruby or 'learn ruby the hard way'
<bnagy>
if you raise, just raise "whatever"
<sphex>
baweaver: yeah.. I would have assumed so. but I don't notice anything deprecated in it.. looks surprisingly good to me. it doesn't seem to cover encodings at all though.
ton31337 has left #ruby [#ruby]
<bnagy>
because mostly you want to be using StandardError
ryba has joined #ruby
<baweaver>
most people won't touch them honestly.
<bnagy>
tvb: also, don't use rescue to set default
m3_del has quit [Ping timeout: 255 seconds]
<adaedra>
ruby-lang693: please note that channel rules state that you shouldn't pm someone without asking first.
<baweaver>
semantics, but more specific errors are better for later reference
<tvb>
bnagy: "don't do anything you're doing in that code :)" you mean all is wrong?
<baweaver>
all is Zuul
<bnagy>
tvb: pretty much, yeah, sorry :/
<baweaver>
agreed
<baweaver>
try instead:
<tvb>
ok it is my first day of ruby, so what do I need to do different?
<adaedra>
ruby-lang693: it is often considered as a good resource, yes :)
<bnagy>
HI WELCOME TO RUBY HAVE A FACEFUL OF TERNARY
blackmesa has joined #ruby
eGGshke is now known as eGGsha
uptownhr has quit [Quit: uptownhr]
<bnagy>
tvb: x = 1 if x.zero?
<baweaver>
>> x = 0; x = if x > 0 then x else 1
<ruboto>
baweaver # => /tmp/execpad-ad7c191cdd37/source-ad7c191cdd37:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/391582)
senayar has joined #ruby
<baweaver>
>> x = 0; x = if x > 0 then x else 1 end
<Ox0dea>
Alas, it's specialized for strings to keep things short, but the generalization falls right out.
<yorickpeterse>
morning
sharpmachine has quit [Ping timeout: 252 seconds]
Hounddog has joined #ruby
<adaedra>
Ox0dea: that's horiffic
toretore has quit [Quit: This computer has gone to sleep]
_whitelogger has joined #ruby
tekacs has joined #ruby
Oka has joined #ruby
lee-jon has quit [Quit: lee-jon]
elektronaut has joined #ruby
drPoggs has joined #ruby
axl_ has quit [Quit: Leaving]
dionysus69 has quit [Quit: dionysus69]
coffeecupp has joined #ruby
axl_ has joined #ruby
brain_shim has quit [Ping timeout: 264 seconds]
<baweaver>
Ox0dea: half asleep, probably going to call it a night on this one. Got a good way through the first lambda expression
<Ox0dea>
baweaver: Ah, all right, then.
<baweaver>
'night mate, I'll ping you when I have something.
<Ox0dea>
Good night. I eagerly await said ping.
<adaedra>
gn Ox0dea
dionysus69 has joined #ruby
baweaver has quit [Remote host closed the connection]
IanV0rn2341 has quit []
lee-jon has joined #ruby
darlinger has joined #ruby
<darlinger>
is there any way to create an empty array without it automatically turning into Nil class?
<sevenseacat>
foo = [] ?
lee-jon has quit [Client Quit]
<zotherstupidguy>
whats the name of the channel of unrelated ruby things?
<darlinger>
sevenseacat: still get a method error with NilClass
mister_s_ has joined #ruby
<sevenseacat>
darlinger: and the error is?
<Ox0dea>
?ot zotherstupidguy
<ruboto>
zotherstupidguy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<sevenseacat>
and the code is?
lee-jon has joined #ruby
<sevenseacat>
you might be trying to access the first element of an empty array, which is nil
<darlinger>
sevenseacat: give me a second and I will send a gist
Scroff has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Scroff has quit [Read error: Connection reset by peer]
<flughafen>
what's the biggest/best ruby connference to go to in europe?
<sevenseacat>
darlinger: and the error is?
n008f4g_ has joined #ruby
Akagi201 has joined #ruby
<darlinger>
sevenseacat: run it. anything Array#method that I try to use with the empty arrays gives me a missing method error because it automatically turns into NilClass
<sevenseacat>
darlinger: no it doesn't. I'd appreciate if you could post the full error you obviously have right in front of you on your screen.
houhoulis has quit [Remote host closed the connection]
<Ox0dea>
sevenseacat: It's okay; that's enough code to see the problem.
<darlinger>
./towers_of_hanoi.rb:38:in `move': undefined method `empty?' for nil:NilClass (NoMethodError) from ./towers_of_hanoi.rb:59:in `<main>'
<darlinger>
it's infuriating
<Ox0dea>
darlinger: You don't need to pass @left and @right into the call to #move.
<sevenseacat>
darlinger: you havent defined @left and @right
<Ox0dea>
The instance knows its own @left and @right, so just access them directly from within #move.
<sevenseacat>
therefore they are nil
<canton7>
darlinger, line 59, @left and @right are undefined
<darlinger>
ohhhhh
<canton7>
Ox0dea, I think that will defeat the point of the game :P
<sevenseacat>
Ox0dea: it is enough to tell the error, but we dont encourage people to just dump their code and go 'fix it for me'
corecode_ has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<sevenseacat>
'you run the code, find the problem, and tell me how to fix it'
<darlinger>
hmmm. well then how do i take user input to designate which instance variables I want to mess with it
<Ox0dea>
You'll need to do some restructuring.
<canton7>
you could: expose left, right, and middle to users of TowerGame, so usage is 'game1.move(game1.left, game1.right)'
<darlinger>
sevenseacat: in my defense I did tell you a description of the error as well as present the code. i just didn't copy and paste the error for you
<canton7>
or you could accept another form of identifier, e.g. 'game1.move(:left, :right)'
<sevenseacat>
darlinger: against your defence, the error has nothing to do with arrays
dramforever has joined #ruby
dramforever has left #ruby [#ruby]
<darlinger>
canton7: oh that works? thanks
<canton7>
darlinger, also, line 53, did you mean to have a '5' in there?
<canton7>
darlinger, you'll need to write some more code for either of those options, but they're both valid end goals
<darlinger>
canton7: oh good catch. still a work in progress. I have to fix that so that it changes with the number of rings
olistik has joined #ruby
mrmargolis has joined #ruby
<darlinger>
canton7: i plan on handling all the moves with private methods
<canton7>
darlinger, heck you've already got a @pegs dict - you could pass 'left', 'middle' or 'right' to move, and use @pegs to map that to the right column
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<darlinger>
canton7: that's the plan :D i just was testing the move method to see if it worked. didn't realize I was having a scope issue >_>
<canton7>
:P
dagda1 has quit [Read error: No route to host]
dagda1 has joined #ruby
_blizzy_ has joined #ruby
<darlinger>
canton7: thanks for your help. i've been bashing my head against this for a few hours now
unshadow has joined #ruby
mrmargolis has quit [Ping timeout: 248 seconds]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Asher has quit [Quit: Leaving.]
rikkipitt has joined #ruby
gizmore has joined #ruby
ndrei has joined #ruby
unshadow_ has quit [Ping timeout: 265 seconds]
<darlinger>
canton7: still getting nil class error
Asher has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<darlinger>
canton7: with correct scope this time
bigkevmcd has quit [Read error: Connection reset by peer]
<canton7>
darlinger, pastie your modified code and the exact error message
<darlinger>
./towers_of_hanoi.rb:50:in `move': undefined method `push' for nil:NilClass (NoMethodError) from ./towers_of_hanoi.rb:67:in `<main>'
nolic has joined #ruby
bigkevmcd has joined #ruby
<canton7>
darlinger, @left is nil
<canton7>
see if you can figure out why ;)
<darlinger>
just realized i had a mistake with TowerGame#move. had @left and @right switched
Oka has quit []
<darlinger>
canton7: still throws same error
_blizzy_ has joined #ruby
avril14th has joined #ruby
<canton7>
darlinger, @left is nil
<canton7>
see if you can figure out why ;)
revath has left #ruby [#ruby]
MissionCritical has quit [Ping timeout: 252 seconds]
<darlinger>
canton7: the TowerGame#initialize
<canton7>
indeed
<darlinger>
canton7: why doesn't @left take the contents of @win?
<sphex>
hey. so when a block is passed down to a method, how are return/next/break from the block handled? they seem to do the right thing for built-in iterators, but how do they work? do they throw special exceptions?
<canton7>
darlinger, because you don't assign @win to it ;)
<darlinger>
canton7: does win not have a value until the method is done executing?
<canton7>
darlinger, again, you don't assign @win to @left
<canton7>
read your code, very carefully
beilabs_ has quit [Ping timeout: 276 seconds]
stamina has joined #ruby
ton31337 has joined #ruby
mister_s_ has quit [Ping timeout: 264 seconds]
<ton31337>
anyone is using zookeeper with ruby?
<darlinger>
canton7: ohhhh oops. caught it. who keeps changing my identifiers?? :p
<ljarvis>
tvb: so.. if it's a string why do you need to check if it's a string?
<tvb>
because one can type 2 as well
<bnagy>
you should be checking if it's a valid instance type
<ljarvis>
tvb: why?
<bnagy>
there's no benefit to just checking if it's a string
<tvb>
becuase instance_type can be submitted as option parse
<avril14th>
tvb: yes, default if you pass nil. In which case you can write that better. Now, your code handles the case where a guy could call for instance "num_instance = -2". Should you really check that? if yes, why not raise an exception?
marcoecc has quit [Ping timeout: 264 seconds]
ahmetkapikiran has joined #ruby
<ljarvis>
tvb: but you discard the 2 completely
<tvb>
avril14th: not writing an exception because bnagy advised me not to
<ljarvis>
"if this is 2, ignore it completely and use t1.small" it makes no sense
<avril14th>
tvb: :)
<bnagy>
sigh. I told you not to use an exception to check if an arg is < 0 and then instantly handle it
<tvb>
true
<bnagy>
because that's dumb.
sharpmachine has quit [Ping timeout: 264 seconds]
apofis has joined #ruby
<bnagy>
here, imvho, just validate the arg directly, don't mess about wondering what ruby type it is
<avril14th>
tvb: default values are useful to avoid writing them everywhere. Checking that something not supposed to happen is the point of exceptions isn't it?
<tvb>
avril14th: true
<bnagy>
someone is going to pass something else stringish one day and your api will be broken for no reason
lee-jon has quit [Quit: lee-jon]
lxsameer has joined #ruby
<avril14th>
maybe so
<bnagy>
so just look it up in a hash of valid instance types, which you're going to have to do at some point
<avril14th>
or maybe you have backend logic that does the stuff rights and before that you have methods that check that params are fine
<tvb>
bnagy: right
<avril14th>
aren't controllers supposed to check passed params, and not backend logic code?
<tvb>
avril14th: meh I want to keep it simple
<bnagy>
then you can do instance_type = valid[instance_arg] || "some default"
<ljarvis>
valid.fetch
bruno- has quit [Ping timeout: 252 seconds]
<shevy>
if I have a string for a class method, called string = 'foobar'; and that class method exists, like Bar.foobar; the way I invoke this is: Bar.send(string) # string can be a different method, foobar is just one example) - My question is, is there an alternative to .send() in this example?
<ljarvis>
shevy: public_send is what you want
<ljarvis>
unless you actually want it to potentially call a private method (almost never what you want)
<ljarvis>
tvb: define INSTANCE_TYPES with an array of allowed types, and write: instance_type = INSTANCE_TYPES.fetch(instance_type, 't2.small')
<ljarvis>
you are done
<tvb>
ljarvis: well, they can but I thought to keep it simple and just won't allow it for now
<ljarvis>
tvb: this is simple eitherway, really
<tvb>
ljarvis: true
krz has joined #ruby
<shevy>
tvb btw you can also simplify such an array: instance_types = %w( t1.small t2.small ) <--- saves you the ',' in the middle, especially useful the longer the Array is
<bnagy>
tvb: stop writing ternary
<bnagy>
especially with boolean? methods :<
<shevy>
haha
<shevy>
or use ONLY boolean methods when you use the ternary!
sinkensabe has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
renderful has joined #ruby
towski_ has quit [Remote host closed the connection]
chinmay_dd has quit []
ramfjord has quit [Ping timeout: 244 seconds]
Aswebb_ has quit []
renderful has quit [Ping timeout: 265 seconds]
fantazo has joined #ruby
lkba_ has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
<tvb>
ljarvis: getting fetch': no implicit conversion of String into Integer
<tvb>
because im submitting 2
michael_mbp has quit [Excess Flood]
andikr has joined #ruby
IanV0rn2341 has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
lkba has quit [Ping timeout: 252 seconds]
d0lph1n98 has joined #ruby
User458764 has quit [Ping timeout: 252 seconds]
astrobun_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
codecop has quit [Remote host closed the connection]
michael_mbp has joined #ruby
<bnagy>
I suspect ljarvis meant a hash not an array
User458764 has joined #ruby
ndrei has joined #ruby
<bnagy>
Array also has a fetch method, which is probably what's causing the confusion
<tvb>
hmm ok lets try that
<shevy>
bnagy uses remote mind reading technique
<shevy>
he is watching you as you type tvb!
el3k0n has joined #ruby
<tvb>
shevy: I am real happy with all the help from all of you guys :)
<shevy>
yeah you should buy bnagy a beer when he comes around!
<bnagy>
when you define the hash it's kind of ugly though, cause it would have to be {'t1.small' => 't1.small'} if you're using fetch
<bnagy>
but it makes the rest of the code clean, so meh
KrzaQ has quit [Read error: Connection reset by peer]
<bnagy>
tvb: oh, you want to look up from a number to a string?
<bnagy>
then yes, using a hash is perfect now
darlinger has quit [Quit: leaving]
<tvb>
define number?
<bnagy>
instance_types[1] = 't1.small' means the key is the number 1
marr has joined #ruby
Indian has joined #ruby
<bnagy>
also, don't paste into the chan
KrzaQ has joined #ruby
blackmesa has joined #ruby
<tvb>
bnagy: sorry about that
pepperbreath1 has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
pepperbreath1 has left #ruby [#ruby]
olistik has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
gf3 has quit [Ping timeout: 264 seconds]
olistik has joined #ruby
JStoker has quit [Ping timeout: 264 seconds]
JStoker has joined #ruby
JStoker has quit [Changing host]
JStoker has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
gf3 has joined #ruby
lkba has joined #ruby
drager has quit [Ping timeout: 256 seconds]
m3_del has joined #ruby
drager has joined #ruby
machty has quit [Ping timeout: 256 seconds]
<tvb>
bnagy: I am not sure what you mean with "look up for a number to a string". I am submitting `2` and wanting to check that against the hashes defined in instance_types
Igorshp has quit [Remote host closed the connection]
<tvb>
if not found, make instance_type 't2.small'
Igorshp has joined #ruby
KrzaQ has quit [Remote host closed the connection]
KrzaQ has joined #ruby
lkba has quit [Remote host closed the connection]
<bnagy>
do INSTANCE_TYPES = %w( blah.large blah.small .. more here) VALID_INSTANCES = INSTANCE_TYPES.zip(INSTANCE_TYPES).to_h
<bnagy>
tvb: another thing you could consider instead of all of this stuff is just raising ArgumentError
<bnagy>
some people would argue that silently substituting a default for an invalid arg is bad API behaviour
revath has joined #ruby
<tvb>
well lets throw in an argument error for my next task, just for fun
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi
shredding has joined #ruby
<bnagy>
like.. user makes a typo, keeps seeing wrong instance launch, spends hours wondering why
<tvb>
bnagy: valid point
<ljarvis>
^ +1
sharpmachine has quit [Ping timeout: 248 seconds]
<tvb>
first I need to verify the correctness of an ip address that has been submitted
<ljarvis>
what does correctness mean?
<tvb>
and convert it to the correct CIDR
bruno- has joined #ruby
<GeorgesLeYeti>
I'm using a gem which display some info while using it. Is it possible no to print these info but only the ones i'm using into my function
<GeorgesLeYeti>
Sorry if it's not clear
<ljarvis>
GeorgesLeYeti: a gem prints something to STDOUT?
AlexRussia_ has quit [Remote host closed the connection]
oo_ has joined #ruby
fabrice31 has joined #ruby
jenrzzz has joined #ruby
sharpmachine has quit [Ping timeout: 244 seconds]
nettoweb has joined #ruby
intinig has joined #ruby
fabrice31 has quit [Remote host closed the connection]
AlexRussia_ has joined #ruby
<tvb>
guys what does the @ mean in ruby?
fabrice31 has joined #ruby
<tvb>
@aws = Aws.new
AlexRussia_ is now known as AlexRussia
<centrx>
tvb, it means it's an instance variable
<adaedra>
it's not a symbol, it's part of the name
<tvb>
ah
<tvb>
so if I want to call aws.function()
<tvb>
I rather call @aws.function()
<tvb>
..are prefixed by the @ symbol. This is enforced by Ruby - if your variable does not start with a @, it is considered to be a local variable.
<jhass>
it's @aws.method, girl, but yeah ;)
<tvb>
:P
<DefV>
jhass: <3 for your effort on the BUNDLED_WITH issue
<DefV>
100x <3
ndrei has joined #ruby
<tvb>
!jhass:++
millerti has joined #ruby
<tvb>
so im not sure how many kudos I have left but I am on a roll now :) and my next question is I have two files. One with a class definition and one where I want to call the class en do something with output
yeticry has quit [Ping timeout: 252 seconds]
Meeh_ is now known as Meeh
<tvb>
assume the one with the output is called output.rb and the one with the class is called class.rb. Then I would require 'class' in output.rb, right?
nfk has joined #ruby
<jhass>
DefV: you're welcome, I guess
<jhass>
tvb: well, that's how it should be but you have to setup $LOAD_PATH in order to work with require (instead of require_relative)
<tvb>
hmm
<tvb>
i guess it needs to load relatively
<tvb>
yeah
<jhass>
$LOAD_PATH is the list of directories require searches through
<tvb>
works better :)
diegoviola has joined #ruby
<jhass>
the require 'bundler/setup' for example adds all the directories of the gems specified in your Gemfile and removes everything else
aryaching has quit [Ping timeout: 264 seconds]
oo_ has quit [Remote host closed the connection]
<jhass>
hence you couldn't load ipaddress earlier
<tvb>
right!
<tvb>
bah
<jhass>
so a common thing to do is to setup $LOAD_PATH (it's just an Array), at the entry point of your application
intinig has quit [Remote host closed the connection]
<sevenseacat>
that answers your question
<tvb>
but what is best practice here?
sharpmachine has joined #ruby
intinig has joined #ruby
<tvb>
run every expect in its own it and describe in the it what it tests?
<sevenseacat>
to delete most of that spec and rewrite it
<izzol>
As I remember you can do is like: it 'bla bla bla' do (...)
<tvb>
sevenseacat: hah!
<sevenseacat>
one assertion per test, better descriptions
<tvb>
sevenseacat: check
<sevenseacat>
your error and success messages are all going to be meaningless
anarang has quit [Quit: Leaving]
fabrice31_ has quit [Remote host closed the connection]
gamename has joined #ruby
unshadow_ has quit [Quit: leaving]
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
kobain has joined #ruby
fabrice31 has joined #ruby
m3_del has joined #ruby
dopie has joined #ruby
kraljev11 has joined #ruby
BTRE has quit [Ping timeout: 256 seconds]
intinig has quit [Ping timeout: 256 seconds]
otisZart has joined #ruby
nfk has quit [Quit: yawn]
<tvb>
writing good tests is hard
riotjones has quit [Remote host closed the connection]
bruno- has joined #ruby
m3_del has quit [Ping timeout: 265 seconds]
<sevenseacat>
just takes a lot of practice.
DoubleMalt has joined #ruby
terlar has quit [Quit: WeeChat 1.2]
thiagovsk has joined #ruby
<izzol>
tvb: try with minitest. Rspec is not so easy.
acke has quit [Remote host closed the connection]
<tvb>
izzol: I have to work with rspec this time, thanks
rawtext has joined #ruby
OrbitalKitten has quit [Read error: Connection reset by peer]
dagda1 has joined #ruby
brain_shim has joined #ruby
OrbitalKitten has joined #ruby
jpfuentes2 has joined #ruby
Rollabunna has joined #ruby
_blizzy_ has joined #ruby
Exuma has joined #ruby
revath has joined #ruby
i8igmac has joined #ruby
rawtext has quit [Client Quit]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has quit [Remote host closed the connection]
Exuma has quit [Client Quit]
fabrice31 has joined #ruby
chouhoulis has joined #ruby
BTRE has joined #ruby
brettnem has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
sluukkonen has quit [Ping timeout: 264 seconds]
_blizzy_ has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Muhannad has quit [Remote host closed the connection]
psyprus has quit [Changing host]
psyprus has joined #ruby
senayar has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 246 seconds]
Muhannad has joined #ruby
k3asd` has quit [Ping timeout: 265 seconds]
decoponio has joined #ruby
Baprath has joined #ruby
davedev24_ has joined #ruby
lavros has joined #ruby
izzol has quit [Ping timeout: 246 seconds]
izzol has joined #ruby
diegoviola has joined #ruby
<Darkwater>
wait, you don't need parentheses around arguments when defining a function?
<adaedra>
no
<adaedra>
some people like it without, some people with
<Darkwater>
I've never seen anyone use it without
<Darkwater>
I think it's ugly with
mrmargolis has quit [Remote host closed the connection]
<ljarvis>
no it's ugly without :)
<adaedra>
I think it's ugly without
<Darkwater>
thought they were necessary
AlexRussia has quit [Quit: WeeChat 1.3-dev]
<ljarvis>
Darkwater: most of mechanize/nokogiri is built without parens.. some people just like the style
sharpmachine has quit [Remote host closed the connection]
sepp2k has joined #ruby
AlexRussia has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
mary5030 has quit [Remote host closed the connection]
arturmartins has joined #ruby
senayar has joined #ruby
i8igmac has quit [Ping timeout: 244 seconds]
<yorickpeterse>
I heard there are also people that use "then" in if statements
headius has joined #ruby
Exuma has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<ljarvis>
yeah also lots of those in mechanize
<ljarvis>
drbrain loves a then
<yorickpeterse>
I really don't get why
eGGsha has joined #ruby
<yorickpeterse>
They add exactly nothing
Baprath has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0/20150511103725]]
diegoviola has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 264 seconds]
sharpmachine has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<eam>
next you're going to hate on the semicolon
<adaedra>
def foo;
<adaedra>
puts "bar";
<adaedra>
...
cpruitt has joined #ruby
n008f4g_ has quit [Ping timeout: 265 seconds]
sluukkonen has joined #ruby
kies^ has joined #ruby
<maloik>
I still think we should switch to a tab and 3 spaces for indentation
<workmad3>
maloik: we should switch to a space and a >
<yorickpeterse>
I think the first step is to must make "then" a syntax error
<workmad3>
> > >indented 3 times
<maloik>
nice!
<yorickpeterse>
but I think it's more likely for me to get married tomorrow than for parse.y to ever be cleaned up
<maloik>
much more obvious
<maloik>
yorickpeterse: mail order bride!
<apeiros>
I think we should be more avant-garde than that
skade has joined #ruby
<apeiros>
we should use ; for indentation
<maloik>
(or groom, if that is your thing)
<eam>
yorickpeterse: probably easier for you to get married
senayar has quit [Read error: Connection reset by peer]
<workmad3>
ooh, how about
dopie has quit [Quit: This computer has gone to sleep]
<adaedra>
oooh, how about DON'T
<yorickpeterse>
eam: yeah, I'm at least not made out of 11000 lines of wtf
<workmad3>
adaedra: hmm... it would look a bit odd multiple times at the start of a line
<eam>
and that's not counting the regex parser
<workmad3>
DON'TDON'TDON'T some indent...
<ljarvis>
obviously we should use back to back parenthesis. ()def foo;()()bar -- it would be a syntax error if one wasn't closed so we can ensure at the very least, the number of parens are always even
darkf has quit [Quit: Leaving]
<eam>
ljarvis: hm, this guarantees an even number of indent characters, I like it
sharpmachine has quit [Read error: Connection reset by peer]
<adaedra>
You're all horrible
<adaedra>
Is it the heat that affects you?
skade has quit [Client Quit]
<ljarvis>
I should propose it, shouldn't be hard to add to parse.y
senayar has joined #ruby
Exuma has quit []
<workmad3>
adaedra: no, we're like this anyway :P
<yorickpeterse>
sounds like somebody wants to cut their wrist
<yorickpeterse>
should we call the police?
<ljarvis>
the parse.y police
<ljarvis>
that thing really should be policed
<eam>
rubocop
adambeynon has quit []
<adaedra>
I can't cut my wrist, it melted
adambeynon has joined #ruby
emilkarl has quit [Quit: emilkarl]
jaygen has joined #ruby
<yorickpeterse>
OFFENCE DETECTED: NO WHITESPACE BEFORE CLOSING }
<yorickpeterse>
OFFENCE DETECTED: CODE DOES NOT FOLLOW GUIDELINES SET BY SOME RUBY DEV [10.000 instances]
<yorickpeterse>
^ rubocop
<yorickpeterse>
I also really don't get why it suggests "fail" over "raise"
sharpmachine has joined #ruby
<yorickpeterse>
it's literally just a meaningless alias
<yorickpeterse>
and you don't fail errors, you raise them
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Darkwater>
yes
<Ox0dea>
I thought so.
riotjones has joined #ruby
<Darkwater>
clever use of $.
<Darkwater>
and $$/$$
Igorshp_ has joined #ruby
gamename has quit []
m3_del has quit [Ping timeout: 244 seconds]
Aztec_ has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Aztec_>
I have an array of objects with a "start" date property that is sorted asc. by that property
thoraxe has joined #ruby
xcesariox has joined #ruby
<Aztec_>
I want to move all elements with a start-date smaller than Time.now to be moved to the back. can i do this in-place or should i use a new array for the sorted objects?
<thoraxe>
if I have a Gemfile that specifies only one source, why would "bundle install" go to rubygems.org if that is not the source specified?
<Ox0dea>
Aztec_: ^ Replace the 3 with Time.now and everything ought to fall into place.
joneshf-laptop has quit [Ping timeout: 256 seconds]
<Aztec_>
yea i didn't get #rotate until now
joneshf-laptop has joined #ruby
<Aztec_>
but i'm getting nil from #index...pretty sure it's just a detail though
pizzaops has quit []
pizzaops has joined #ruby
xcesariox has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
dopie has joined #ruby
sharpmachine has joined #ruby
<ccooke>
Aztec_: I must admit, in a similar problem (a set of metrics for a monitoring system), I always simply use sort_by and resort the metric set each time.
kies^ has quit [Ping timeout: 265 seconds]
<ccooke>
However, that's also because the metrics after being processed need to be reinserted at effectively random points.
<ccooke>
A b-tree would be more efficient, but for the datasets I'm using it's not necessary
<ccooke>
(and sort_by is much easier to read)
<Aztec_>
i'm dealing with, at most, 30 items so a b-tree would be overkill
<ccooke>
yeah. sort_by is a perfectly reasonable solution, and it's clearer to read what's going on
<Aztec_>
but is there a way to use sort_by in the way i want to use it? having a delimiter, with the values smaller ending up behind the values larger than the delimiter?
<Ox0dea>
ccooke: I think you've misinterpreted the problem Aztec_ is trying to solve.
<Aztec_>
:>
<ccooke>
Ox0dea: entirely possible, I just came back from a meeting :-)
<Aztec_>
it's always nice to have b-trees appear in discussions though
havenwood has joined #ruby
bruno- has quit [Quit: Lost terminal]
<ccooke>
ah, yes
timonv has joined #ruby
<Ox0dea>
ccooke: Aztec_ wants to, essentially, join the partitions of a sorted array in the opposite order.
<Ox0dea>
But using #rotate and #index is a little nicer and can be done in-place.
avril14th has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
langland_ has joined #ruby
Channel6 has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
<Aztec_>
test passes Ox0dea....my setup/data-prep was a mess, which is why index found nothing
langlands has quit [Ping timeout: 250 seconds]
michael_mbp has quit [Excess Flood]
alex88 has quit []
jeanlinux has joined #ruby
<Ox0dea>
Aztec_: That's good, but I've got some crow to eat; #sort_by is indeed better, but you have to account for the fact that Ruby's booleans aren't comparable/ordered.
<sbhatore>
and gives this error: OpenSSL::Cipher::CipherError: in the decipher.final. Can someone help me with this please, on how to make the gcm encryption work. It encrypts perfectly, but gives the above error in decryption.
sharpmachine has quit [Ping timeout: 264 seconds]
bryancp has quit []
bryancp has joined #ruby
abuzze has quit [Remote host closed the connection]
arturmartins has quit [Quit: Leaving...]
senayar has quit [Ping timeout: 246 seconds]
lictor36 has quit [Read error: Connection reset by peer]
dopie has joined #ruby
deimos has quit []
chinmay_dd has joined #ruby
deimos has joined #ruby
findaway has quit [Ping timeout: 265 seconds]
pgatt has quit [Quit: Connection closed for inactivity]
stan has quit [Ping timeout: 246 seconds]
mandarinkin has joined #ruby
chinmay_dd_ has quit [Ping timeout: 265 seconds]
abuzze has joined #ruby
blackmesa has joined #ruby
Aryasam has joined #ruby
<havenwood>
sbhatore: You're not setting the #auth_tag=?
<sbhatore>
havenwood: Hmmm..I think I tried that. Let me try again
<havenwood>
sbhatore: Err, rather saving #auth_tag and providing it to the decipher.
neanderslob has joined #ruby
sharpmachine has joined #ruby
<havenwood>
sbhatore: tag = cipher.auth_tag
rdema has joined #ruby
chinmay_dd has quit [Ping timeout: 265 seconds]
n008f4g_ has joined #ruby
mburns has joined #ruby
chinmay_dd has joined #ruby
chouhoulis has joined #ruby
axl_ has quit [Quit: Leaving]
<sbhatore>
havenwood: Thanks a bunch. You saved my day :) I think I did the tag think incorrectly before
<sbhatore>
thing*
<havenwood>
sbhatore: you're welcome!
fgo has joined #ruby
jaredrhine has joined #ruby
<shevy>
\o/
<shevy>
we dance the RUBY dance
elektronaut has quit [Ping timeout: 252 seconds]
<shevy>
pythons can dance too... I saw it in the jungle book :)
<sweeper>
you can leave python behind
Agoldfish has joined #ruby
<sweeper>
you can dance if you want to
drPoggs has quit [Ping timeout: 252 seconds]
<shevy>
your nick invites me to dance!
chouhoulis has quit [Ping timeout: 264 seconds]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
catphish has quit [Quit: Leaving]
lee-jon has quit [Quit: lee-jon]
User458764 has quit [Remote host closed the connection]
drPoggs has joined #ruby
elektronaut has joined #ruby
fgo has quit [Ping timeout: 276 seconds]
charles81 has quit []
charles81 has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bf4 has quit [Ping timeout: 248 seconds]
manveru has quit []
manveru has joined #ruby
bcavileer has quit []
bcavileer has joined #ruby
d0lph1n98 has quit [Quit: Lost terminal]
chinmay_dd_ has joined #ruby
Hounddog has quit [Remote host closed the connection]
dagda1 has quit [Read error: No route to host]
chinmay_dd_ has quit [Remote host closed the connection]
mleung has joined #ruby
mfranzwa has joined #ruby
chinmay_dd has quit [Ping timeout: 244 seconds]
speaking1ode has joined #ruby
Jackneill has joined #ruby
konsolebox has quit [Remote host closed the connection]
JimmyNeutron has joined #ruby
willharrison has joined #ruby
Channel6 has quit [Quit: Leaving]
mleung has quit [Client Quit]
jaroslav has joined #ruby
tlarevo has joined #ruby
<jaroslav>
guys, can somebody please help me understand how to properly build a simple gem, with the main file "lib/foo.rb" implementing class, not module?
<jaroslav>
I know it is possible, saw some examples, however I'd like to follow standard 'bundler' setup, with gem version in "lib/foo/version.rb" <- that's causing problems
Pupeno has quit [Ping timeout: 246 seconds]
<havenwood>
jaroslav: class Foo; VERSION =
northfurr has joined #ruby
<apeiros>
?guys jaroslav
<ruboto>
jaroslav, we're not all guys - did you mean folks, y'all, everyone?
<havenwood>
jaroslav: Change that file to `class Foo` instead of `module Foo`.
sarkyniin has quit [Ping timeout: 256 seconds]
Akagi201 has joined #ruby
<jaroslav>
apeiros: sorry, I guess that can be a language difference, I'm using "guys" thinking about all possible genders
davedev2_ has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<apeiros>
jaroslav: cool. but in here, not everybody feels that way, so please try to use another word (or just leave it off - your question works without it too)
<jaroslav>
apeiros: ack
<apeiros>
thx :)
bmurt has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
abuzze has quit [Remote host closed the connection]
<shevy>
jaroslav basically, all you have to do is load up all the .rb files in your gem-structured code
<shevy>
so lib/foo/version is really: require 'foo/version.rb'
Aztec_ has quit [Ping timeout: 246 seconds]
<jaroslav>
havenwood: I have additional problem, my class 'Foo' inherits from 'JIRA::Client'. And that's what I have in my foo.rb; But if in lib/foo/version.rb I just write: "class Foo; VERSION = ", it doesn't work as it complains 'superclass mismatch' ;)
tlarevo has quit []
<jhass>
jaroslav: yap, you have to repeat it everywhere. Or reconsider making the toplevel a class
davedev24_ has quit [Ping timeout: 248 seconds]
<jhass>
common alternatives are Foo::Client and such
bigkevmcd has quit [Quit: Outta here...]
cmisenas has joined #ruby
enedil has joined #ruby
<jaroslav>
jhass: right... and that was what I had initially; however, I didn't like the fact that my gem name does not correspond to namespacing of my modules / classes.
<jaroslav>
But maybe there's no other way
langland_ has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
<jhass>
what do you mean it didn't correspond?
<jaroslav>
I wanted to have a gem called 'foo-client', where Foo is a module, Client is a class in it, that inherits from JIRA::Client
<jaroslav>
I don't want to call the gem just 'foo'
<jhass>
well, then you're even supposed to have Foo::Client
podman has joined #ruby
<jhass>
oh, wait, I see what you mean
<jaroslav>
jhass: yup, I have Foo::Client, but this client is a class ;)
jeanlinux has quit [Remote host closed the connection]
dfockler has joined #ruby
<jaroslav>
I don't want to have a Foo::Client *module* with Foo::Client::Client class in it, that would be... weird ;)
<ruboto>
Salehi, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<mozzarella>
there's a gender neutral "guys", look it up
dopie has joined #ruby
<shevy>
adaedra is my french girl
<drew0>
ruboto: That's a good point. I am guilty of using 'guys' in place of plural 'you', but I should make an effort to not. Thanks for pointing it out!
<adaedra>
?bot
<ruboto>
I don't know anything about bot
<adaedra>
-_-
<shevy>
?python
<ruboto>
I don't know anything about python
<jhass>
mozzarella: it's regionally different, hence better to avoid
<shevy>
this bot needs to learn more
revath has quit [Ping timeout: 264 seconds]
linocisco has left #ruby ["Leaving"]
<adaedra>
?ruboto
<ruboto>
I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<bougyman>
why are you advertising some crappy poll.
<Salehi>
bougyman: Because I don't like python! and I wanna Ruby wins this voting!
<shevy>
\o/
<shevy>
Salehi,
mister_solo has joined #ruby
<shevy>
oops
<shevy>
sentence was not finished yet
bb010g has quit [Quit: Connection closed for inactivity]
<shevy>
Salehi, #python has like 2000 people
<bougyman>
Salehi: I'm pretty sure it doesn't matter to me.
<bougyman>
I'm absolutely sure, in fact.
<shevy>
yeah but it matters to him!
<Salehi>
bougyman: Yeah, this is another perspective :D
<shevy>
he wins a cookie if ruby wins
<Salehi>
shevy: I don't join in #python ;) :D
<rapha>
ruboto: "guys" has pretty much changed to mean "y'all" and is definitely inclusive of women nowadays.
<shevy>
I would but for some reason I can not pick the nick "python" :(
<bougyman>
my son codes python for a living.
<shevy>
damn
CatMartyn has quit [Client Quit]
<bougyman>
not by choice, he's 21 so he had to take what he could get.
<bougyman>
he got some django gig.
<Salehi>
rapha: I think so
<shevy>
django looked more interesting than the rest of python
CatMartyn has joined #ruby
jeramyRR has joined #ruby
tomaz_b has joined #ruby
<shevy>
and rails :)))
<bougyman>
i've been spending 1.5 years on getting my current $dayjob off-rails
<shevy>
but I dunno, does anyone actually use both ruby and python at the same time, in equal parity?
<bougyman>
we're really close.
<Salehi>
shevy: but seems to stopped development for a while :D
<bougyman>
moving to roda and sinatra micro-apps.
<Salehi>
shevy: Django is good, but Rails is awesome :D
<baweaver>
shevy: /me raises hand
<drew0>
rapha, I shared that opinion for a while, but I later realized that it's not just "how you intend it," but also "how it is received."
<bougyman>
I prefer roda but a lot of the devs like barrister, which is sinatra-backed.
<shevy>
baweaver wow
<bougyman>
there's a clear path to replacing sinatra with roda behind barrister, though.
<shevy>
you are one clever beaver
<bougyman>
we just haven't taken the time to do so.
<baweaver>
Saltstack as opposed to Chef
* baweaver
has a seething hatred of Chef
<bougyman>
if you hate chef, you'll hate salt, too
Scrofff has joined #ruby
<bougyman>
salt, puppet, ansible, chef, others.
<bougyman>
i've used probably a dozen.
<baweaver>
All CMs are junk honestly.
<Salehi>
shevy: & me ( raising hand )
<bougyman>
they all have hatable factors.
<shevy>
wow
<bougyman>
baweaver: exactly.
<baweaver>
First one to incite stockholme syndrome wins
<bougyman>
you just have to make the most of them and workaround the individuaal weaknesses.
<rapha>
drew0: that's true for any and all communication and imo not solved by picking out a word here or a word there.
<baweaver>
Indeed.
<bougyman>
confluence is a meta-meta-cm
scripore has quit [Quit: This computer has gone to sleep]
<bougyman>
it has some hope.
<baweaver>
The entire metaphor game is cute and all, but really should be kept out of design
<shevy>
Salehi you really use both ruby and python?
<bougyman>
I use both.
atom3 has quit [Ping timeout: 276 seconds]
<baweaver>
especially if you can't even keep to your own metaphor (Chef / cooking)
mister_solo has quit [Ping timeout: 276 seconds]
<bougyman>
we're heavily dependent on buildbot, which is all python.
<Salehi>
shevy: Yes, but I'm new to Rails
Scroff has quit [Ping timeout: 246 seconds]
<apeiros>
slash_nick: it does. github doesn't process the links that way. i.e. if you open the docs locally it's linked
<Salehi>
shevy: I found the rails awful :D
<apeiros>
rapha: sorry, I'm off for today. if you ping me tomorrow, I'll have a look :)
<bougyman>
i prefer buildbot to all of the other ci implementations i've tried.
<baweaver>
Admittedly working on getting more into Scala and Spark at the moment. DevOps is getting a bit tedious.
atom3 has joined #ruby
<drew0>
rapha: agreed, but it's a very easy courtesy, imho.
yqt has joined #ruby
Akagi201 has joined #ruby
<Salehi>
shevy: /msg ?
<drew0>
@shevy we use both ruby and python daily.
<rapha>
apeiros: okay, have a nice day! :)
<baweaver>
As of now I'm about equal parts Javascript, Ruby, Python, and Scala if you average the days of the week.
radialneon has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
<rapha>
drew0: i guess i have become defensive about these matters... the city in which i live has a lot of left-wing political people in it and for a while now there've been posters and flyers saying things like "make feminism a threat" everywhere. and while i'm 100% for equal rights, equal chances, equal pay, equal whatnot, this sort of aggressive and antipacifistic rhethoric appals me.
<bougyman>
70/20/10 ruby, pg/plsql, python.
<jhass>
rapha: drew0 if you want to discuss this extensively, please head over to #ruby-offtopic ;)
PaulCapestany has quit [Read error: Connection reset by peer]
tenseiten has quit [Read error: Connection reset by peer]
<baweaver>
then again I'm still a young pup myself at 25, so a ways to go yet.
m3_del has joined #ruby
PaulCapestany has joined #ruby
el3k0n has joined #ruby
seitensei has joined #ruby
seitensei has joined #ruby
Channel6 has joined #ruby
wallerdev has joined #ruby
s00pcan has joined #ruby
Akagi201 has quit [Ping timeout: 244 seconds]
chris2 has quit [Ping timeout: 256 seconds]
adamski2600 has quit [Remote host closed the connection]
scripore has joined #ruby
davedev2_ has quit [Ping timeout: 248 seconds]
m3_del has quit [Ping timeout: 265 seconds]
davedev24_ has joined #ruby
rmoriz has quit [Ping timeout: 252 seconds]
sharpmachine has quit [Read error: Connection reset by peer]
artmann has quit [Quit: No Ping reply in 180 seconds.]
sharpmachine has joined #ruby
balazs_ has joined #ruby
cstrahan has quit []
cstrahan has joined #ruby
nwhirschfeld has quit [Quit: No Ping reply in 210 seconds.]
whippythellama has quit [Ping timeout: 252 seconds]
<slash_nick>
baweaver: i like the sound of that
<baweaver>
I might go over Clairvoyance and actually release part of it finally
<baweaver>
Think TDD on steroids
<baweaver>
RSPEC code is still just code, which means you can totally run it through another parser
codecop has joined #ruby
<baweaver>
what if that parser, instead of testing the code, wrote the code it thought the test was referring to?
MiracleBlue has quit []
MiracleBlue has joined #ruby
tvw has joined #ruby
fmcgeough has joined #ruby
<baweaver>
(psuedo) describe MyClass: describe '#function': it 'returns 5': expect(subject.function).to eq(5) -> class MyClass; def function; 5 end end
<baweaver>
then just ping pong it until it can get the tests to pass.
<baweaver>
or give up and give you what its best guess is as to the code as it should be written.
<baweaver>
Fair warning, this thing is a nightmare to make work properly.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abuzze has quit [Remote host closed the connection]
<baweaver>
Submitting that as my talk.
abuzze has joined #ruby
OrbitalKitten has quit [Read error: Connection reset by peer]
maasha has joined #ruby
<baweaver>
shevy: I need opinions on this madness of mine.
Scroff has joined #ruby
OrbitalKitten has joined #ruby
jaygen_ has joined #ruby
frem has joined #ruby
<shevy>
ack
<shevy>
the shevy shall bring order into the chaos of the mind!
<shevy>
first - grab a cold beer. that's always a good start
DEA7TH_ has joined #ruby
<shevy>
you'll be giving a talk?
<DEA7TH_>
Is there any drawbacks to using a shell command (`mkfifo`) in my Ruby program, as opposed to a Ruby function? (I'm not concerned with portability)
<baweaver>
Maybe
senayar has joined #ruby
senayar has joined #ruby
<baweaver>
submitting it to Keep Ruby Weird
<shevy>
cool
Scroff_ has quit [Ping timeout: 248 seconds]
<baweaver>
DEA7TH_: cross system compatibility
<baweaver>
Windows if it's a gem
<shevy>
DEA7TH_ don't think there should be any drawbacks, after all that was a good use case for perl as well
<wasamasa>
I bet that wouldn't work on windows anyways
<maasha>
Generic computer science question: Is there a described standard way of dealing with parantheses when evaluating expressions?
<shevy>
yeah in this case, using `` is simpler because you won't need an external gem; ideally though, that could become part of File
<shevy>
or FileUtils
<wasamasa>
maasha: use a stack
<DEA7TH_>
even if I installed the gem, it still probably won't work on Windows
<maasha>
I am going to write a parser for some pattern matching logic involving regex type operators and modifiers including logical operators.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fantazo has joined #ruby
<shevy>
do you actually use windows? :)
eGGshke has joined #ruby
jfarmer has joined #ruby
<maasha>
wasamasa: I was thinking of a clear system of reducing parans (or whatever it is called when you remove redundant parans)
<baweaver>
on the talk, it's more of wondering if it's an interesting subject.
<maasha>
paren
<baweaver>
Clairvoyance is freaking ambitious to get made.
<shevy>
baweaver add in some pictures of cats and beavers and it'll be alright
krzkrz has joined #ruby
<wasamasa>
maasha: that should be a job for the optimizing part of a compiler
<shevy>
matz did this as well during his talk
<shevy>
he showed one duck that was typing
<wasamasa>
maasha: not evaluation
bruno-_ has quit [Ping timeout: 252 seconds]
<maasha>
wasamasa: ok, so what rules does the compiler follow and is there an easy read on that topic?
<wasamasa>
maasha: well...
<wasamasa>
maasha: the problem is that the most famous compilers out there are monolithic blobs of magic
krz has quit [Read error: Connection reset by peer]
<wasamasa>
maasha: anyhow, if you want an easy read, I was reading emacs internals after finding out about a matz talk regarding ruby implementation choices
JoshL has joined #ruby
<wasamasa>
maasha: and was surprised how understandable the peephole optimization parts of its bytecode optimizer were
<maasha>
wasamasa: I guess to. I am just beginning researching this. I am going to look at compiler compilers - like YACC - but maybe that will just kill you :o)
<wasamasa>
maasha: which could work out for your task
enedil has quit [Remote host closed the connection]
<wasamasa>
maasha: it's basically about looking at a sufficiently simple form of your instructions and transforming known forms of it into more performant ones
<wasamasa>
maasha: like, (+ x 1) into (1+ x)
jamesaxl has joined #ruby
Lucky___ has quit [Ping timeout: 255 seconds]
Scroff has quit [Ping timeout: 264 seconds]
lavros has quit [Quit: leaving]
Muhannad has joined #ruby
senayar has quit [Remote host closed the connection]
<maasha>
wasamasa: right. I kinda dig reverse polish notation since it eliminates parens. I fear there are several ways parens can be dealt with and you end up with monolithic blobs of evil.
eGGshke has quit [Ping timeout: 256 seconds]
<eam>
I wish method parens functioned as precedence parens
sharpmachine has quit [Read error: Connection reset by peer]
Muhannad has quit [Max SendQ exceeded]
havenwood has quit [Ping timeout: 265 seconds]
Muhannad has joined #ruby
eGGshke has joined #ruby
lkba has joined #ruby
Lucky_ has joined #ruby
<baweaver>
>> def plus(*xs) xs.reduce(0, :+) end; (plus 1, 2, 3) # not quite lispy though
msnyon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has joined #ruby
micmus has quit [Ping timeout: 265 seconds]
Scroff has quit [Ping timeout: 246 seconds]
micmus has joined #ruby
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has quit [Remote host closed the connection]
dseitz has joined #ruby
gambl0re has joined #ruby
towski_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
maasha has quit [Quit: Page closed]
m3_del has quit [Ping timeout: 265 seconds]
platzhirsch has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
abuzze has quit [Remote host closed the connection]
mrmargolis has joined #ruby
mwlang has joined #ruby
<mwlang>
I’m working on a phone reg expr to extract the digits of a (XXX)-XXX-XXXX input where I don’t care what separates the digits, but I want area code to be optional.
<mwlang>
I have this so far: /(\d{3})?[^\d]+?(\d{3})[^\d]+?(\d{4})/
<mwlang>
and it works for the full number but not for when area code is absent…I thought the “?” specified the partial match as optionally appearing…
dgutierrez1287 has joined #ruby
s2013 has joined #ruby
jfarmer has quit []
chouhoulis has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
jpfuentes2 has quit [Ping timeout: 246 seconds]
jeramyRR has joined #ruby
mansel has quit [Max SendQ exceeded]
toretore has joined #ruby
mansel has joined #ruby
lala has joined #ruby
<mwlang>
wow, ultra quiet room today
chouhoulis has quit [Ping timeout: 246 seconds]
findaway has joined #ruby
MatthewsFace has joined #ruby
balazs_ has quit [Remote host closed the connection]
Pupeno has joined #ruby
<shevy>
mwlang it's too hot in europe :(
<mwlang>
ah…meltdown
<shevy>
it's almost 22:00, 10 pm that is I guess, and it's almost 29.0°C outside still; and my room isn't cooling down, it's getting hotter
gambl0re has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
axsuul has joined #ruby
chendry has joined #ruby
GitGud has joined #ruby
chendry has left #ruby [#ruby]
<jhass>
mwlang: are you sure? that should work. make a rubular with some examples?
bruno- has joined #ruby
MatthewsFace has quit [Ping timeout: 246 seconds]
casadei has joined #ruby
<mwlang>
sure…one sec.
findaway has quit [Ping timeout: 252 seconds]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupeno has quit [Ping timeout: 264 seconds]
rawtext has joined #ruby
rawtext has left #ruby [#ruby]
mleung has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
<mwlang>
add one more example to the examples: 4045551234
<mwlang>
I had to change \D+ to \D* since delimiters were optional.
<shevy>
<mwlang> I just scanned 10 years of data
<shevy>
are you working for the agency!
phutchins1 has joined #ruby
sargas has joined #ruby
adamski2600 has quit [Ping timeout: 252 seconds]
niemcu has joined #ruby
Wolland has joined #ruby
Spami has joined #ruby
<mwlang>
shevy: :-)
<toretore>
number.scan(/\d+/).join[0,9]
zachk has joined #ruby
willharrison has joined #ruby
roolo has joined #ruby
<mwlang>
toretore: I started to do that, but I’m about to extend the cases to extensions and that whole bit were somebody keeps entering area code and trailing with “or 678” was nuts.
<mwlang>
so I just decided I wanted a definite XXX? XXX XXXX pattern
__butch__ has joined #ruby
scripore has joined #ruby
<mwlang>
or that it can be turned into such where the delimiters are optional.
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<mwlang>
wmoxam: hmmm….that’s an idea.
shadoi has quit [Quit: Leaving.]
niemcu has joined #ruby
<mwlang>
only concern is performance needs to be fast since this is a data exchange server (sucking data from one pipeline and stuffing it into another)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has quit [Ping timeout: 265 seconds]
tomaz_b has quit [Ping timeout: 264 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
brain_shim has quit [Ping timeout: 248 seconds]
<mwlang>
not exactly pre-mature optimization here since they hired me specifically to fix performance issues as well as improve the sanity of the data going through the pipes.
Scroff has quit [Ping timeout: 246 seconds]
<mwlang>
if I handle 99% of the phone numbers and kick back the non-valid stuff, we’re solid.
m3_del_ has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Salehi has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 250 seconds]
m3_del has quit [Read error: Connection reset by peer]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
anyway, jhass and toretore, I have a solid solution and all specs passing. Thanks for nudging me over the bump.
AlexRussia has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
drewo has joined #ruby
matp has joined #ruby
<mwlang>
wmoxam: phonie’s nice. I know just the place I can use this gem (another client’s project)
niemcu has quit [Ping timeout: 256 seconds]
symm- has quit [Quit: Leaving...]
symm- has joined #ruby
armyriad has quit [Quit: Leaving]
<wmoxam>
mwlang: :D
niemcu has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
brain_shim has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 256 seconds]
niemcu has joined #ruby
lessless has joined #ruby
blackmesa has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
acke has quit [Remote host closed the connection]
millerti has joined #ruby
fgo has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
findaway has joined #ruby
MatthewsFace has joined #ruby
balazs_ has joined #ruby
Limix has joined #ruby
niemcu has quit [Ping timeout: 252 seconds]
jaygen has joined #ruby
benlieb has joined #ruby
MatthewsFace has quit [Ping timeout: 246 seconds]
niemcu has joined #ruby
jaygen_ has quit [Ping timeout: 256 seconds]
findaway has quit [Ping timeout: 264 seconds]
sharpmachine has joined #ruby
balazs_ has quit [Ping timeout: 244 seconds]
fgo has quit [Ping timeout: 276 seconds]
m8 has quit [Quit: Sto andando via]
dik_dak has joined #ruby
sankaber has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
Jackneill has quit [Remote host closed the connection]
m3_del_ has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
niemcu has joined #ruby
JDiPierro has joined #ruby
nfk has joined #ruby
axsuul has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
<jhass>
well, on OS X it's Cmd instead of Ctrl so you can feel special, yeah
<toretore>
i'm getting a pc
drPoggs has joined #ruby
elektronaut has joined #ruby
<adaedra>
jhass: yeah, not like the platform that has a key named after the system. :p
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niemcu has quit [Ping timeout: 265 seconds]
<mwlang>
What’s the proper way to handle a param passed in that may be an array of hashes or just a hash? Normally, when I know something can be either a single value or an array of values I just wrap with Array(some_param) and know I always have an array.
<mwlang>
but when dealing with hashes, Array(some_hash) turns that entire hash into an array of tuples.
<jhass>
mwlang: fix your API to always get an array
Aryasam has quit [Ping timeout: 276 seconds]
<jhass>
or take a splat and don't accept an array
<mwlang>
jhass: That’s what I’m doing
<jhass>
have the caller splat it
<mwlang>
jhass: it’s coming from the Nori gem.
niemcu has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
<jhass>
so that has inconsistent returns? *sigh*
<toretore>
"i have a great idea! if only one result is found, i'll not return an array"
<toretore>
said the idiot
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
nori basically gives me either a hash when an XML section appears only once, or an Array of hashes when a section repeats.
<jhass>
meh
<jhass>
[foo].flatten(1)
<jhass>
there's sadly no nicer way
scripore has joined #ruby
<toretore>
v = [v] unless v.is_a?(Array)
<toretore>
is what i do
<adaedra>
a.is_a?(Array) ? a : [a]
<mwlang>
jhass: that’s nice enough…At least I stop the perpetuation and always return an array. :-D
<adaedra>
putting into an array and using flatten seems like a little much to me
<mwlang>
I wonder which is more performant! I’ve done all three of the above, but just kinda sick of it, I suppose.
<jhass>
well, the is_a? is certainly faster
<adaedra>
you should also bug the library creator to fix his API and introduce consistency
micmus has quit [Quit: Leaving]
<adaedra>
we've already .count to know if an array contains only one element, no need to unwrap it
niemcu has quit [Ping timeout: 246 seconds]
sargas has quit [Quit: This computer has gone to sleep]
<mwlang>
adaedra: I’m actually bordering on forking and doing it myself…it’s a part of the Savonrb project, but entire thing is riddled with inconsistencies.
<adaedra>
nuke them then
<mwlang>
and kinda un-ruby-like.
<toretore>
make everything return streams
niemcu has joined #ruby
<mwlang>
toretore: heh…speaking to that…I’m considering building something similar to Savon but SAX parsing with Ox and making it return PORO
<mwlang>
I find that although a hash representation of a SOAP message is somewhat nice, I end up wanting Ruby classes anyway.
<adaedra>
Yeah, I know some of these words.
<mwlang>
so why not figure out how to go to that (and I don’t mean Nokogiri’s whole Node style approach)
<toretore>
what's wrong with e.g. nokogiri?
<adaedra>
it's not written by yorickpeterse.
<mwlang>
toretore: nothing. It’s good at what it does.
<toretore>
or do you mean represent soap messages and not xml?
Musashi007 has joined #ruby
<zenspider>
mwlang: you know another name for PORO? object
<mwlang>
toretore: I want smart ruby classes that get their attributes automatically populated.
nolic has quit [Ping timeout: 252 seconds]
<toretore>
right
Alayde has quit [Ping timeout: 246 seconds]
<mwlang>
zenspider: Plain Ole Ruby Object?
<toretore>
sounds reasonable; i don't know enough about soap to have an opinion
<zenspider>
object
<jhass>
toretore: feel lucky
<mwlang>
zenspider: ah.
<zenspider>
there's no real non-objects in ruby.
<toretore>
as opposed to those fancy new ruby objects
<jhass>
zenspider: fun fact. when they say PORO they usually mean a class
perturbation has quit []
niemcu has quit [Ping timeout: 244 seconds]
dopie has quit [Quit: This computer has gone to sleep]
<mwlang>
zenspider: true…just too used to distinguishing “non Active Record” models to others in conversation. (do we create an Active Model class or a PORO class for this?)
<zenspider>
jhass: sad, isn't it?
<zenspider>
active record objects are ALSO objects.
<mwlang>
yeah, we all know that, right?
<zenspider>
sometimes I'm not so sure
niemcu has joined #ruby
<toretore>
poro is a term taken from java that doesn't make sense to say in ruby
<toretore>
i think is the point
<mwlang>
I guess I’m usually telling devs “you don’t need all the bells and whistles of ActiveModel when a PORO will do"
<darix>
I think AR objects are just PORO as well. calling them anything else would be discrimination.
findaway has joined #ruby
<zenspider>
"The POJO phenomenon has most likely gained widespread acceptance because of the need for a common and easily understood term that contrasts with complicated object frameworks."
Pupeno has joined #ruby
<mwlang>
well heck, I *am* discriminating in the conversations…but of course my use above should’ve just been “object” since AR wasn’t anywhere in sight other than in my project I’m not processing SOAP with ActiveRecord classes as the Rails 2.x version of the app I’m rewriting is.
JDiPierro has quit [Remote host closed the connection]
nettoweb has joined #ruby
<zenspider>
other than the fact that AR hides a lot of their state in the attributes hash instead of ivars, I can't really say that AR is a "complicated object framework" with "special restriction"s
<zenspider>
SOAP. there's an acronym I don't miss. :P
<toretore>
i think it's more interesting to contrast pure data with objects that encapsulate and have behavior
<darix>
zenspider: everyone needs a little SOAP each day ;)
<zenspider>
toretore: what's "pure data" ?
<mwlang>
yeah, SOAP can be a royal pain.
<toretore>
not objects
<slash_nick>
i think of a poro as something that depends only on stdlib...
<zenspider>
darix: that's different! It's 90 here right now
<toretore>
as in !object
<zenspider>
toretore: and where do you do that?
<toretore>
fp
JDiPierro has joined #ruby
niemcu has quit [Ping timeout: 256 seconds]
<slash_nick>
if you implement your poro using a library that depends on stdlib alone, yeah... that flies
<zenspider>
fun fact: everything in scheme is called an object
<darix>
zenspider: so what? we will have 100-104 tomorrow and I will have a nice 10.5h train ride where i can only hope the AC holds
<mwlang>
Well, I’m going back to my PORO reimplementation of a messy, cumbersome AR-oriented approach. :-D
<zenspider>
"All objects created in the course of a Scheme computation, including procedures and continuations, have unlimited ex- tent."
<darix>
mwlang: give us a call when you found out how much of AR you reimplemented in the process. ;)
findaway has quit [Ping timeout: 246 seconds]
<darix>
or ActiveModel for that matter.
<zenspider>
darix: yeah but I live in a place where this doesn't happen enough for ppl to buy AC
<zenspider>
it SUCKS here right now
SCHAAP137 has quit [Ping timeout: 264 seconds]
cnngimenez has quit [Ping timeout: 264 seconds]
fmcgeough has quit [Quit: fmcgeough]
Pupeno has quit [Ping timeout: 246 seconds]
<mwlang>
darix: heh…let’s just say the new solution is about a 70% reduction in code base since it’s actually domain model driven instead of tables in a database driven.
<zenspider>
at least the desert (usually) gets cold at night.
rodfersou has quit [Quit: leaving]
<shevy>
hehe
<darix>
mwlang: and you persist into what?
<darix>
just curious
<darix>
22°C here now^^
JDiPierro has quit [Remote host closed the connection]
<zenspider>
I would love that
<baweaver>
zenspider: SF is almost always between 55 and 75
<mwlang>
darix: well, I’ll tie into the DB later, but at least it’ll be a very simple some_ar_model_instance.some_attribute = some_soap_model.some_attribute assignment straight down the entire method rather than a whole bunch if if/else/unless conditional. and I’ll probably do it with an iterator like “some_ar_model_instance.attributes.keys.each …”
<darix>
so you actually just put in another layer :)
<mwlang>
and not everything’s going into the db, either.
<darix>
so
<mwlang>
darix: yes, and on purpose.
<mwlang>
I don’t need to write the same code to store addresses, phone numbers, people’s names over and over, yet the legacy database just has the same basic fields over and over.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
and I don’t control the db.
acke has joined #ruby
casadei has joined #ruby
tomphp has joined #ruby
JoshL has joined #ruby
alem0lars has quit [Ping timeout: 252 seconds]
Guest77924 has quit [Ping timeout: 252 seconds]
silverdust has joined #ruby
alem0lars has joined #ruby
alem0lars has quit [Changing host]
alem0lars has joined #ruby
Alayde has joined #ruby
silverdust is now known as Guest59510
<mwlang>
darix: another point is the SOAP classes are going to be used to push data from one stream to three separate databases which the schemas are different in each (it’s a data exchange service, after all)
Akagi201 has joined #ruby
<zenspider>
baweaver: but then I have two problems
Alayde has quit [Read error: Connection reset by peer]
<baweaver>
no pleasing you is there? :P
Alayde has joined #ruby
<zenspider>
I loooove seattle, 9-10 months of the year
<mwlang>
zenspider: move a little further south of SF to SD and deal with 65 - 75 temps. :-)
<zenspider>
san diego?
<shevy>
or move to canada 2 months per year, but the french speaking part
<zenspider>
we were there for ... rubyconf? twice? not my people
<mwlang>
zenspider: yup. just moved from Georgia — loving it so far.
<zenspider>
mwlang: not a very high bar, is it? :P
<zenspider>
shevy: I liked what little I've experienced of eastern canada
<mwlang>
zenspider: heh…you referring to the rednecks or to the sweltering 100% humidity heat waves?
<zenspider>
where was that? montreal or toronto ... sec
renderfu_ has joined #ruby
<prosodyContext>
et sec map era
findaway has joined #ruby
<zenspider>
must have been montreal
MatrixBridge has joined #ruby
blackmesa has joined #ruby
phutchins1 has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
<zenspider>
mwlang: yes?
Akagi201 has quit [Ping timeout: 256 seconds]
renderfu_ has quit [Ping timeout: 265 seconds]
adamski2600 has joined #ruby
phutchins1 has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
Alayde has quit [Ping timeout: 244 seconds]
senayar has joined #ruby
fantazo has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
adamski2600 has quit [Ping timeout: 246 seconds]
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
Joufflu has joined #ruby
havenwood has joined #ruby
alextheman has joined #ruby
alextheman has left #ruby [#ruby]
Musashi007 has joined #ruby
<nofxx>
just tryed working with objective C... I'm already depressed. Out of a handful of langs I've played I don't know any other so obfuscated.
DLSteve has joined #ruby
workmad3 has joined #ruby
<nofxx>
jobs always bragged about who cares about soft makes he's own hardware... that's because he never coded for real
<shevy>
lol
<shevy>
didn't swift promise to make things better?
baweaver has quit [Remote host closed the connection]
<nofxx>
shevy, nah... don't care about either. It's like 2 lines change, did in 10minutes in java which I never code, going to ask a ios friend ;)
<nofxx>
ah, it's a phonegap plugin.. hence the objc/java thing...
Alayde has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
<nofxx>
he would say: makes he's own DECENT language
<nofxx>
adaedra, I meant rubymotion. the 'from macruby thing'
<havenwood>
adaedra: It lives on through it's progeny, RubyMotion.
<adaedra>
also, obj-c is made to try to keep language in the syntax. Parameters are all named, so you know which one is what, which can be ambigous otherwise.
bruno- has joined #ruby
<adaedra>
Also, NSNumber* value = [[NSNumber alloc] initWithFloat:1.0] is not float value = 1.0
<shevy>
you can relate to the comic book guy I can see ;)
<shevy>
He had a lot of domain-specific knowledge
bf4 has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brain_shim has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Client Quit]
EllisTAA has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
workmad3 has joined #ruby
seanstickle has quit [Quit: leaving]
ixti has joined #ruby
<Gnea>
I'm having troubles installing the gem 'json' of a particular version (1.7.7) that's required for a specific application. It fails with the following errors: https://gist.github.com/anonymous/a9960dd457046d2b50c3 which I can fix manually, but if I try to re-run the installation, it pulls in fresh json code and overwrites the fix. How can I reliably fix the code and still obtain a compiled & installed gem?
djbkd has joined #ruby
blackmesa has joined #ruby
<havenwood>
Gnea: JSON is in the stdlib in modern Ruby.
idiocrash has quit [Remote host closed the connection]
<zenspider>
Gnea: this means something is stupid about your compiler
<yxhuvud>
<3 recursive macros
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider>
recursive?
<zenspider>
../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
<zenspider>
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
<zenspider>
that's just wrong afaict
<yxhuvud>
macros to another macro. they are not self-recursive
<darix>
also snorby on a rasperry pi or so
<darix>
that will go well ;)
<zenspider>
you keep using that word. I don't think it means what you think it means
Indian has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
<zenspider>
if it did, all methods that did _anything_ would be recursive in your mind.
<EllisTAA>
are sessions a form of chaching?
balazs has quit [Ping timeout: 248 seconds]
<darix>
EllisTAA: you can abuse them as a cache
<darix>
but generally speaking no
<EllisTAA>
darix: thank you
<Gnea>
zenspider: I agree, so when I found and implemented the fix, I was able to get generator.o to appear, but that was just one component, and the overall system wants fresh code already in place.
<darix>
Gnea: your ruby 2.2 already comes with json
<Gnea>
darix: but I'm back to square one.
<darix>
you just need to allow it to use that version
guideX has joined #ruby
<darix>
could even comment out the json line in the gemfile
<Gnea>
I can edit the Gmakefile easily, but I don't know what command it's running since I'm just running "bundle install" overall
<darix>
Gemfile
<zenspider>
Gnea: you don't fix a broken complier by futzing with the source of its target
<Gnea>
sorry, Gemfile
<zenspider>
compiler, even.
<darix>
that file is read by bundle install
bf4 has quit [Ping timeout: 265 seconds]
<Gnea>
zenspider: yes, but the compiler isn't the problem
<zenspider>
yes, it is
Papierkorb has joined #ruby
<Gnea>
it doesn't matter
senayar has quit [Remote host closed the connection]
<zenspider>
it does matter. this isn't going to be the only problem you have. if it can't even preprocess a C file correctly and then compile it, you're going to be in a world of hurt
<darix>
missing tons of security fixes
<darix>
e.g. for rails
* Gnea
sighs
<darix>
good thing that isnt a security related project!
* Gnea
drops a pin into an ocean
<zenspider>
sigh all you want, but that isn't the only C dependency you're going to have with a gemfile that big
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Gnea>
well it's gcc 5.1.0
<Gnea>
I don't know why that makes a difference
Musashi007 has joined #ruby
<darix>
Gnea: it is a big step for the gcc project
<darix>
from the distros point of view i can tell you we had to fix a lot of things for gcc 5
<Gnea>
look, you're talking about apples and oranges that I can even see
<Gnea>
can't*
<Gnea>
okay
<darix>
Gnea: given the snorby website is down
<Gnea>
and that's great, fixes are appreciated
<darix>
one could argue the project is deadish
<Gnea>
as is the amount of time put into them
<darix>
Gnea: maybe hop into the snorby channel (same network) and ask them if they plan to update the dependencies in the gemfile to include security fixes
<darix>
also ruby 2.2 needed some fixes in gems to work properly
<zenspider>
still won't matter if you can't compile fairly straightforward c files correctly.
<Gnea>
I don't think it's entirely dead, there was an update 2 days ago
<darix>
json might be one of them
<darix>
Gnea: a project which still pulls library versions from 2013
<Gnea>
darix: I can surely ask that, it's not as dead as #sagan is
pgatt has joined #ruby
<zenspider>
the FBUFFER_PAIR code is exactly the same as before in the latest version of json
<darix>
nn
<Gnea>
zenspider: so how was the issue addressed?
<zenspider>
you're REALLY not listening
djbkd has quit [Quit: My people need me...]
<Gnea>
oh I'm sorry, I didn't realize that it was against the rules to ask questions.
<zenspider>
done
danielpclark has quit [Ping timeout: 246 seconds]
<Gnea>
zenspider: perhaps you have a link to some documentation that I could read regarding the compiler fix?
allomov has quit [Remote host closed the connection]
willharrison has joined #ruby
AhabsBeard has joined #ruby
kb3ien has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
bf4 has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
<Gnea>
zenspider: I am sorry, this is very frustrating. I will try again later.
<kb3ien>
I've had to make changes to a ruby gem, to add functionality that was missing in the original. I'd like to include the modified gem in the /vendors dir of my project, to keep my SVN copy more meaningful and because editing files that may be updated by bundler seems like the WRONG way to admin this project.
<Coraline>
It would be better to wrap the gem than to work with a modified version of it.
<Coraline>
You won't get any updates the way you're doing it.
MatthewsFace has joined #ruby
sharpmachine has joined #ruby
zotherstupidguy has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
<kb3ien>
Okay. So I modified one file in the gem, basically forcing HTTPS connects to use a caching proxy server using HTTP. The gem contains multiple files, but I only changed one. What specifically do you suggest I read first?
findaway has quit [Ping timeout: 256 seconds]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
danielpclark has joined #ruby
cnngimenez has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<zenspider>
kb3ien: consider sending the original a PR with your change?
MatthewsFace has quit [Remote host closed the connection]
dopie has quit [Quit: Leaving]
<zenspider>
that way everyone benefits
wallerdev_ has joined #ruby
<kb3ien>
I'm not sure if I want updates, until I know that the code is changed to allow HTTPS to be initiated by the proxy, not the ruby code.
wallerdev has quit [Ping timeout: 256 seconds]
wallerdev_ is now known as wallerdev
<kb3ien>
I'm trying. These things take time.
Wolland has quit [Remote host closed the connection]
Channel6 has joined #ruby
ramfjord has joined #ruby
findaway has joined #ruby
<kb3ien>
What's the best way to move it to vendor, even if I fall off the upgrade train.
JDiPierro has joined #ruby
gregf has quit [Quit: WeeChat 1.1.1]
<kb3ien>
there is a repo, but it is SVN, not git, so git-centric concerns need not apply.
<zenspider>
kb3ien: if you're using bundler, you can fork the project, put your change in there, and then point your gemfile at your repo/branch
<kb3ien>
The original gem downloads to '/usr/local/lib/ruby/gems/2.0.0/gems/ebsco-discovery-service-api-1.0.4' which contains only one file 'lib/ebsco-discovery-service-api.rb'
scripore has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
claptor has joined #ruby
casadei has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 255 seconds]
redlegion has joined #ruby
<kb3ien>
should the path be '/usr/local/lib/ruby/gems/2.0.0/gems/' ?
<jhass>
no
<kb3ien>
or the equivilent depth in /var/www/site...
<kb3ien>
okay. assuming /var/www/site/path/vendor/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb what should 'path' point to ?
<jhass>
well, since it's apparently not on that guys github, we'll have to reconstruct a bit
<jhass>
start with gem unpack ebsco-discovery-service-api
<jhass>
to the resulting ebsco-discovery-service-api-1.0.4 directory, add a copy of /var/www/site/path/vendor/vendor/bundle/ruby/2.1.0/specifications/ebsco-discovery-service-api-1.0.4.gemspec
<jhass>
try pointing path: at that directory then
solocshaw has joined #ruby
<yorickpeterse>
01:30: finally cooling down
<jhass>
26°C indoors here
<yorickpeterse>
it's 25C-ish here
pen has joined #ruby
eggoez has joined #ruby
<kb3ien>
I'm not looking at my temp. I'd rather NOT KNOW. Its been up to 30 here ( Southern .ny.us )
<yorickpeterse>
23,1C at 80% humidity :<
frem has quit [Quit: Connection closed for inactivity]
m3_del has quit [Remote host closed the connection]
<kb3ien>
where do i run 'gem unpack' ?
MatrixBridge has quit [Ping timeout: 252 seconds]
rvchangue has quit [Ping timeout: 252 seconds]
<jhass>
somewhere convenient
<kb3ien>
okay. /tmp it is.
<jhass>
well, you want it to persist since you want to point path: to the result after adding the gemspec
rvchangue has joined #ruby
idiocrash has joined #ruby
ubuntu_ has left #ruby [#ruby]
manveru has quit [Ping timeout: 252 seconds]
marcoamorales has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
marcoamorales has joined #ruby
daas has joined #ruby
zack6849 has quit [Ping timeout: 252 seconds]
<mwlang>
why did TextMate go open source? (finally getting around to trying out TM2 today)
drPoggs has quit [Ping timeout: 252 seconds]
artmann has quit [Ping timeout: 252 seconds]
kalleth has quit [Ping timeout: 252 seconds]
pawz has quit [Ping timeout: 252 seconds]
5EXABLYGN has joined #ruby
1JTAAGLFW has joined #ruby
drPoggs has joined #ruby
idiocrash has joined #ruby
<ruboto>
mwlang, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
The_Phoenix has quit [Quit: Leaving.]
<jhass>
?ot mwlang
manveru has joined #ruby
AhabsBeard has quit []
idiocrash has quit [Remote host closed the connection]
phrozen77 has quit [Ping timeout: 252 seconds]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
artmann has joined #ruby
kalleth has joined #ruby
<mwlang>
didn’t even know that channel existed!
Pupeno has joined #ruby
fgo has joined #ruby
phrozen77 has joined #ruby
<yorickpeterse>
mwlang: tl;dr because IIRC the author couldn't maintain/support it
<ruboto>
we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<nofxx>
totally forgot the name of ';' hehe.... going to eat. til soon
<jhass>
kb3ien: yeah
<jhass>
kb3ien: does gem fetch ebsco-discovery-service-api work?
pen has quit []
nobitanobi has joined #ruby
idafyaid has quit [Ping timeout: 256 seconds]
el3k0n has quit [Ping timeout: 265 seconds]
<Tarkers34>
Okay guys, now I'm learning about blocks and I've got a bit of a headscratcher. When you put put statements inside a block, why aren't those put statements outputted to the console when yield is called inside the method? Here is an example of what I mean https://gist.github.com/anonymous/18ab198308a7dfdf4668 See? I would expect us to get 'nil' reported to the console every time yield is called...
DLSteve has quit [Quit: Leaving]
<daas>
?guys
<ruboto>
we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<Tarkers34>
is console output surpressed inside the method or is something cleverer going on?
<kb3ien>
sorry i used the version number too.
<kb3ien>
both work.
EllisTAA has quit [Quit: EllisTAA]
adamski2600 has joined #ruby
5EXABLYGN has quit [Remote host closed the connection]
1JTAAGLFW has quit [Remote host closed the connection]
EllisTAA has joined #ruby
<Tarkers34>
* okay guys, girls, transexuals, aliens w/e it takes to make the PC police stop :'(
MatrixBridge has joined #ruby
<zenspider>
Tarkers34: you exp... nevermind
mfranzwa has quit [Quit: mfranzwa]
<Tarkers34>
zenspider ??
michael_mbp has quit [Excess Flood]
<zenspider>
cut out the jackassery and we'll talk
<Tarkers34>
okay, go on
<Tarkers34>
if you would
Musashi007 has joined #ruby
<kb3ien>
jhass done, it deposited only one file again. /tmp/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb
<jhass>
kb3ien: yep, do you remember the second step I wrote?
adamski2600 has quit [Ping timeout: 246 seconds]
willharrison has joined #ruby
michael_mbp has joined #ruby
Lucky_ has joined #ruby
baweaver has quit [Remote host closed the connection]
JoshL has quit []
<kb3ien>
found it. done.
<jhass>
Tarkers34: I'm not sure why you expect the nil's
Rickmasta has joined #ruby
drew0 has quit [Remote host closed the connection]
drew0 has joined #ruby
<kb3ien>
Should I be able to use path to point to that dir, now ?
<jhass>
Tarkers34: and each_with_index returns the receiver, it's not .map_with_index
<jhass>
kb3ien: yeah
zzor has quit [Ping timeout: 250 seconds]
<zenspider>
kb3ien: ruby -I<path/to/lib> or modify the pathing in your code
<zenspider>
(before require)
<Tarkers34>
jhass Not necessarily nils...just some sort of error. I mean I don't actually expect it from a ruby native method but you see what I mean? We're executing puts 'index ' + i.inspect What is 'i'? in the context of the method? nil, right? Or, if it's not nil, it's the index. So it would be executed twice. If you were to create an interaor from scratch you'd see what I mean :P
chipotle has joined #ruby
JDiPierro has joined #ruby
<Tarkers34>
*so it would be printed twice **iterator
Channel6 has quit [Quit: Leaving]
kkeuning has joined #ruby
<jhass>
Tarkers34: no, I don't see what you mean. each_with_index is basically def each_with_index; i = 0; each do |e| yield e, i; i += 1; end; self; end;
<jhass>
just implemented in C
<zenspider>
what?
<zenspider>
executed twice? why?
arooni-mobile has joined #ruby
<zenspider>
nil?
<toretore>
anyone happen to know where to find the "concurrent" gem source? i remember seeing it on github before
<Tarkers34>
zenspider printed twice. ill make a gist
<toretore>
(not "concurrent-ruby")
<zenspider>
hey, that's one of our gems!
<zenspider>
mentalguy wrote that
thalassa has quit [Ping timeout: 264 seconds]
<toretore>
yeah, that's the one
<jhass>
toretore: use the github search, either for repo name or the gemspec
<kb3ien>
sookay. Sound whre would the path point (the files are now in : /var/www/site/path/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4/ebsco-discovery-service-api-1.0.4.gemspec and /var/www/site/path/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb ) ?