<domgetter>
shellie_: Learning a new language usually makes you a better programmer overall. The exception would be if you already know like 20 languages really well, but that's very very few people.
nanoz has joined #ruby
<domgetter>
And it helps gives perspective of a lot of the design decisions in your first language and you can code better in it cause you have a bigger picture
<shellie_>
agree :)
mary5030_ has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
huddy has joined #ruby
weemsledeux has joined #ruby
<al2o3-cr>
list comps are so the power
Icey has quit [Quit: Bye!]
Icey has joined #ruby
kies^ has joined #ruby
<shevy>
al2o3-cr you are an oldschool lisper? :)
<al2o3-cr>
not per se
mistermocha has quit [Remote host closed the connection]
<al2o3-cr>
one thing that i wish ruby added is list comps
praveen has joined #ruby
<Radar>
Why?
bkxd has joined #ruby
<shellie_>
not enough syntactic sugar? :)
mistermocha has joined #ruby
cschneid_ has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
tvw has quit [Remote host closed the connection]
<al2o3-cr>
Radar: [ math.sin(x) for x in [1,2,3] ] vs [1,2,3].map { |n| Math.sin(n) }
<Radar>
I think the latter is more readable.
<Radar>
"perform this function for each element in this list" vs "take this list and perform this function on it"
<al2o3-cr>
Radar: personal opinion lv ruby me
<shellie_>
I think the former is more readable, but I'm biased
praveen has quit [Ping timeout: 245 seconds]
<al2o3-cr>
it is
mistermocha has quit [Remote host closed the connection]
<al2o3-cr>
but i love ruby
bkxd has quit [Ping timeout: 250 seconds]
ruid has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
mic_e has joined #ruby
<al2o3-cr>
one thing i would like Ruby to inherit from Python is list comps
mistermocha has joined #ruby
<al2o3-cr>
python inherited from other langs
<hxegon>
al2o3-cr that would be nice. I find HOF replaces a lot of the uses I would get, but not 100%
<al2o3-cr>
just tried to drown myself
<hxegon>
al2o3-cr D:
firstdayonthejob has quit [Ping timeout: 255 seconds]
<al2o3-cr>
another thing control flow from within print
ByronJoh1son has quit [Ping timeout: 264 seconds]
ByronJoh1son has joined #ruby
ruid has quit [Ping timeout: 260 seconds]
<domgetter>
part of the definition of a "list comprehension" is that it is syntactic sugar for set building notation
<domgetter>
so if you have a mathematical background, list comps look preeeeeeetty nice
woodruffw has joined #ruby
<shevy>
my brain also works how Radar described above :D
<shevy>
maths people to haskell!
rkazak_ has joined #ruby
agent_white has quit [Quit: farmstuff]
<al2o3-cr>
haskell is || 77
<domgetter>
al2o3-cr: or 77?
<al2o3-cr>
77 IS FOR GIDDY UP
<domgetter>
I don't understand what that means.
<al2o3-cr>
domgetter: no one does
<shevy>
it's like 42 apparently
<volty>
list comprehensions look nice, but pity when it comes to the rest you get comprehended in void
guacamole has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
Wompy has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
<al2o3-cr>
Why does no one on here speak a fucking sense on common
<volty>
just cute, there's a nice interview of one of the creators of haskell on youtube — «Haskell is useless» (more or less, search on yt)
<al2o3-cr>
why?
<volty>
on common what?
<Radar>
al2o3-cr: Ironic that you didn't make sense.
<al2o3-cr>
grounds, anyting
<shevy>
volty I heard that before but usually in another context - "having a barrier is good"
hxegon has quit [Ping timeout: 240 seconds]
<nfk|laptop>
i'm looking at something along the lines of jira and ideally with time tracking features, any recommendations? right now i'm considering taiga.io
<al2o3-cr>
Radar: really?
<shevy>
1482 people on #haskell so I assume it works for them
<Papierkorb>
nfk|laptop: afaik Redmine has time tracking stuff too
<nfk|laptop>
wow, didn't know that
<Radar>
"speak a fucking sense on common" is not any phrase that I know
jam_ has joined #ruby
<domgetter>
execute order 77
<Radar>
Redmine still isn't dead? Jeez.
<al2o3-cr>
Radar: common fucking sense
<volty>
no grounds there, you can play with haskell just for fun (funny comprehension), but when it comes to product it's useless (as his author rightly states)
<nfk|laptop>
shevy, i considered haskel for my next project, looking at the source for about 10 minutes was enough to make me reconsider ruby
<Radar>
al2o3-cr: right
<Papierkorb>
Radar: we're using it at work. it's still better than gerrit ....
<shevy>
it is not! it's even growing! yesterday I had to register for a redmine account at... let me try to remember the name of the project...
pawnbox has joined #ruby
<Radar>
I've got my time tracking separate from my projects because the company I'm currently working for doesn't care about time tracking.
<Radar>
nfk|laptop: How often does the time something take matter in your company?
<shevy>
ah yes, it was audacious, they use redmine too, I had to use it because audacious-plugins has no way to find audacious in non-standard locations
zeroDivisible has quit [Client Quit]
<nfk|laptop>
not a company and i'm pretty sure the powers beyond will want to see the timesheets
<Radar>
nfk|laptop: If it's just the timesheets they want to see, then I reckon using Toggl and its reporting feature will do.
<nfk|laptop>
i'd love to just code and maybe do a conference once in a while but life isn't that sweet
<volty>
shevy: just nerds. they master comprehensions, and pose as experts, but they are stuck there
zeroDivisible has joined #ruby
<Radar>
nfk|laptop: As for the project management stuff itself, maybe sprint.ly, Pivotal Tracker or even GitHub's issues.
<nfk|laptop>
i can't use github as powers beyond were not quite happy with the public nature
mary5030 has joined #ruby
<nfk|laptop>
even though it's sort of internal academic project so there's no direct danger
<volty>
you should ALL advice people to stay away from Haskell (except for just surfacing it)
<Papierkorb>
GH Enterprice :P
<Radar>
nfk|laptop: Get a private repo
<nfk|laptop>
volty, i have no idea why you'd say that, haskell is fine if you can get your mind around it
<nfk|laptop>
though i don't think many can
jam_ has quit [Ping timeout: 255 seconds]
<Papierkorb>
nfk|laptop: one (or the?) of the designers of haskell did a interesting video on it
rkazak_ has quit [Ping timeout: 240 seconds]
<nfk|laptop>
Radar, i'm currently considering if i should spend something like 14 euros on new winter gloves, you think i can afford a monthly subscription?
<Papierkorb>
nfk|laptop: lowtech? Excel spreadsheet .. in GDrive? .. with a stop watch desktop widget?
pawnbox has quit [Ping timeout: 256 seconds]
<Radar>
nfk|laptop: I see.
<Radar>
Toggl is free btw.
<volty>
nfk|laptop: it's a crap phrase — very like the one (attributed to Einstein) that say our brain works only at 10 % — the answer is very simple, our brain evolved to work this way, no miracles there . The fact is that you cannot get your mind around it. You can only get around mastering structures and comprensions, but you just cannot decompose the big projects / problems
<nfk|laptop>
and sadly that consideration is kinda lost as my current ones gave me a freeze burn today and i was just out for like 2x15 minutes to the local bistro
nwhirschfeld has quit [Ping timeout: 240 seconds]
<nfk|laptop>
Papierkorb, that's i guess not that bad though i'd like for something a bit more modern
<al2o3-cr>
>> $<<
<ruboto>
al2o3-cr # => /tmp/execpad-bef34210a45e/source-bef34210a45e:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/497353)
<al2o3-cr>
its gone >.?/'
<al2o3-cr>
thee bot is wank
<Papierkorb>
nfk|laptop: a ruby script which .. autoupdates the spreadsheet! .. Not trying to troll you, if I were in such a position I'd do something similar. Heck, make the ruby script write a CSV file which you import into excel and you're done. – IF for some reason one of the other free solutions just don't cut it for you
<nfk|laptop>
volty, i mean, python and ruby require you to get used to them
Melpaws has joined #ruby
<nfk|laptop>
i have also done some FORTH and even brainfuck and dipped the top of my pinky into clojure but haskell is a bit too much
<nfk|laptop>
Papierkorb, now that i think about it, i'll just have a local file and sync it via git
<volty>
nfk|laptop: it's not that. in langs like ruby & python it's much easier to decompose a problem, to test it, to debug it. In haskell it's much more difficult to decompose. It's all flow, no break, no pause, no rest.
<nfk|laptop>
the main issue is actually the time counting itself
<nfk|laptop>
volty, it's the syntax i object to
mistermo_ has joined #ruby
<nfk|laptop>
or rather, the way stuff is done
<nfk|laptop>
it's just too alien
<Papierkorb>
nfk|laptop: have a script which takes start|stop as argument. on start, it writes a YAML file with the current time stamp. on stop, it reads it back and updates the CSV or whatever.
ta has joined #ruby
Melpaws1 has joined #ruby
<nfk|laptop>
Papierkorb, yeah, i have such software already, it's just local to the machine and i'm working on two different linux boxes
<nfk|laptop>
having them share the data would be best
<Papierkorb>
nfk|laptop: That thing is so dumb that not only you could technically do it with a bash script, no, everything that can fork() to processes can intergrate it (e.g. your favorite text editor)
azzgil has quit [Quit: Leaving]
<volty>
it is too alien for human brains — we, humans, spent thousands of years to get where we are. at the same time we have some experts, confined to their list comprehensions (and nothing else, almost) that try too cheat us with «you should adjust your mind .... »
<nfk|laptop>
but alas ktimetracker hasn't been ported to plasma 5 and hamster is just shit, good looking but shit
<volty>
s/too/to/
<Papierkorb>
nfk|laptop: I feel your KDE related pain :(
<shevy>
hamster!
<shevy>
i like them
<al2o3-cr>
not known lately
<shevy>
alien hamsters learning haskell
<nfk|laptop>
that's go
<shevy>
hahah
<nfk|laptop>
or whatever they have for mascot
<Papierkorb>
wasn't that some kind of rat?
<shevy>
yeah a gopher or whatever the name is for that obese rat-like thing... but it's actually cute
<nfk|laptop>
Papierkorb, i don't think anyone has moomins for logo
<al2o3-cr>
haskell is good (for it is useless)
<nfk|laptop>
shevy, so it's a programmer?
<volty>
i gave up as soon as I saw there was no inheritance, when I saw the libraries for xml parsing — a nightmare masked by overuse of operators
mistermo_ has quit [Ping timeout: 246 seconds]
Melpaws has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 255 seconds]
Melpaws1 has quit [Read error: No route to host]
Melpaws has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
RegulationD has quit [Remote host closed the connection]
veg__ has joined #ruby
<al2o3-cr>
m4p r3v3rs3 [elkjfkkskjfkljfkldkljf]
<Radar>
al2o3-cr: really
<al2o3-cr>
Radar: ?
veg has quit [Ping timeout: 240 seconds]
<Radar>
al2o3-cr: y u spam
duckpuppy has joined #ruby
hxegon_ has joined #ruby
<volty>
anyone experience with ruby extensions? what tools can you suggest?
<Ox0dea>
hxegon_: I don't remember whether I've shown al2o3-cr, and he's into list comprehensions.
<Radar>
!unmute al2o3-cr
bb010g has quit [Quit: Connection closed for inactivity]
<al2o3-cr>
Radar: +)
nwhirschfeld has joined #ruby
<al2o3-cr>
Ox0dea: you didn't write surely haha
<Ox0dea>
al2o3-cr: What didn't I write?
auzty has joined #ruby
<al2o3-cr>
your fingers
<shevy>
haha
<Ox0dea>
So meta.
<shevy>
no, he used his toes and nose
<Ox0dea>
My toeses and noses.
<nfk|laptop>
okay, i'm trying to figure out a good name for the project
ta has quit [Ping timeout: 240 seconds]
<nfk|laptop>
i think i'm about to source on kanjis
<shevy>
that is one of the biggest problems out there
<nfk|laptop>
it always is
<shevy>
finding a good name
Azure has quit [Ping timeout: 264 seconds]
<shevy>
how about:
<shevy>
- kanji-ninjas
<nfk|laptop>
it's not about kanjis or anything nippon related
<Ox0dea>
The hardest problems in programming: naming things, cache invalidation, naming things, and cache invalidation.
<nfk|laptop>
also you can't beat kanji damage
<nfk|laptop>
An official KanjiDamage deck is now available for Anki , a popular flashcard program. Many thanks to miwuc, KD user and great coder! This KanjiDamage deck contains all of KD's kanji plus stroke order diagrams. Please check it out here!
<shevy>
zacts dunno, it sorta changed when _why was no longer in charge, in principle shoes is a good idea; one variant requires java/jruby though
<Ox0dea>
Papierkorb: You didn't invoke a method.
<Papierkorb>
and you're just bitching around.
<shevy>
:D
<craysiii>
documentation is lacking and the newer version requires jruby as its been said
<craysiii>
i would personally use C#/Mono for GUI but thats me.
<shevy>
it would be nice if we could have a shoes-like API for all the ruby-GUI bindings on top of their regular way to use them
<Ox0dea>
>> foo = [1,2,3].sample until foo.nonzero? # Papierkorb
<ruboto>
Ox0dea # => undefined method `nonzero?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/497357)
<Ox0dea>
Papierkorb: I am genuinely interested in your answer: what the fuck is the point of providing incorrect "advice"?
weemsledeux has joined #ruby
<nfk|laptop>
craysiii, there's also qml
roshanavand has quit [Ping timeout: 240 seconds]
<Ox0dea>
Papierkorb: Who benefits?
praveen has quit [Ping timeout: 260 seconds]
weemsledeux has quit [Client Quit]
<Papierkorb>
Ox0dea: you've been asking me stuff every time I said something since last week or so. It's becoming obvious.
<nfk|laptop>
and can you even use Mono for GUI? last time i checked they only had explicit GTK bindings not WPF or winforms emulation
Dimik has joined #ruby
<zacts>
shevy: so perhaps a QT gem might work for me?
<zacts>
I want to support only Linux / BSD / OSX
<zacts>
I don't even care about Windows
<nfk|laptop>
the dirty little secret of .NET is that winforms and probably also WPF are part of windows and .NET is just binding to it
<shevy>
zacts I dunno... Papierkorb tried the ruby-qt bindings some time ago, I am more into ruby-gnome. all of them could require a LOT of improvements
Dimik has quit [Client Quit]
<zacts>
ah yeah
<zacts>
so does ruby-gnome work for OSX too?
Dimik has joined #ruby
<zacts>
if so, I don't mind using that
<nfk|laptop>
hence Mono has to provide bindings to something else and it's not even trying to act like what you have on windows
<shevy>
zacts when I tried them when qt4 / kde 4 came out, qtruby was nice though but that was when rdale was still around. I dunno who took over, it's on some github mirror nowadays
<zacts>
(it's for a simple app)
<craysiii>
i dont see how that matters when they only want to support linux
ur5us_ has joined #ruby
<shevy>
I know that ruby-gnome works on windows, not sure about OSX but I assume it will work if gtk2/gtk3 works on OSX (does it?)
freerobby has joined #ruby
<zacts>
no idea re: gtk2/gtk3 on OSX, although GIMP works on OSX, and it uses gtk
<shevy>
aha yeah
<volty>
qtbindings are fine
<zacts>
volty: which gem do you use for this?
<volty>
I just missed (these days) the phonon framework but I've done it just now
<nfk|laptop>
shevy, there is a gem
scripore has quit [Quit: This computer has gone to sleep]
<volty>
zacts: qtbindings (4.8.6.2)
jbrhbr1 has joined #ruby
janebootydoe has quit [Quit: Leaving]
<volty>
pay ATTN, you have to have ruby compiled with shared libraries enabled
<nfk|laptop>
there's qt5 binding, people, qml only
<nfk|laptop>
it's either gem install qt or gem install qml
<nfk|laptop>
iirc
janebootydoe has joined #ruby
jbrhbr has quit [Ping timeout: 240 seconds]
<Papierkorb>
QML already uses JS, what's the point of integrating that?
<volty>
I hope the classical qtbindings will live on
<nfk|laptop>
Papierkorb, so that you can write the logic in Ruby and integrate with your ruby code
<nfk|laptop>
also you'll be displeased if you knew how shitty qml is
<Papierkorb>
Last time (~1.3 years ago?) QML just didn't cut it on the desktop for UI
<craysiii>
writing gui is ruby is just a pita it seems.
<nfk|laptop>
with my python project i literally did everything from python if it couldn't be done in pure qml
<nfk|laptop>
any kind of interaction from qml to python was fucking pain
<volty>
I gave it a look (at qml) long time ago and I didn't like it
<nfk|laptop>
or rather, fucking impossible without doing crazy stuff
<shevy>
you people make me sad :(
<Papierkorb>
Looks like qtbindings is not compatible with Ruby 2.3. it installed fine with 2.2.4
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dextertzu has joined #ruby
<Darmani>
shevy: don't be sad.
<Darmani>
Be happy.
<Darmani>
<33
<nfk|laptop>
i did install qt gem on 2.3 already
Lucky__ has joined #ruby
mistermocha has quit [Remote host closed the connection]
<Papierkorb>
nfk|laptop: "qtbindings" ?
<nfk|laptop>
no
<volty>
Papierkorb: and how that incompatibility manifests ?
<nfk|laptop>
gem install qt would be my first guess
Lucky__ has quit [Client Quit]
<nfk|laptop>
Papierkorb, note that it's qml 2 only
<nfk|laptop>
but on the upside it's very fast to build
<nfk|laptop>
pyqt5 takes about as long to build as most qt modules
<shevy>
Ox0dea could you please stop using words such as "meant"?
<Ox0dea>
Of course not.
<agent_white>
?meant
<ruboto>
I don't know anything about meant
<shevy>
Ox0dea it is the same problem that Papierkorb mentioned. Stop harassing people.
tk___ has quit [Quit: ばいばい]
<Ox0dea>
You're so small.
<pontiki>
o.o
nerium has quit [Quit: nerium]
<Ox0dea>
I mean, like, petty.
<shevy>
Ox0dea This is a matter of netiquette. If you have a proper solution, it's perfectly fine to present it without attempting to lower other people you dislike. It's similar problems in the past such as your ad hominem attack against me.
agent_white has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
<Ox0dea>
shevy: What is the purpose of this channel?
<agent_white>
towlie.jpg
jackjackdripper has joined #ruby
psy_ has quit [Quit: Leaving]
renderfu_ has quit [Read error: Connection reset by peer]
<shevy>
Ox0dea For you to stop highlighting me with unimportant boring trivia.
kknight has joined #ruby
<Ox0dea>
I hope things get better.
renderfu_ has joined #ruby
<shevy>
I sure hope so as well.
<Ox0dea>
shevy: How many times do you reckon I've helped somebody in this channel? Two, three tops?
<shevy>
Ox0dea I don't care. Stop highlighting me if you help someone else.
<Ox0dea>
You look stupid.
<shevy>
Ox0dea And if you don't, it is harassment. Plain and simple.
<agent_white>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<agent_white>
HUMANS... stop it?
<wolffles>
lol
<wolffles>
girls dont mind being called guys ruboto
<agent_white>
TRIGGERED
* Darmani
enters the room
<agent_white>
wolffles: Yeah I got banned for saying that a bit ago. So be careful.
Channel6 has quit [Quit: Leaving]
<Darmani>
Are we fighting?
pontiki has left #ruby [""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson"]
<Darmani>
o.o
<wolffles>
for reals?
<agent_white>
Yes. So be careful.
n00bdev has quit []
<shevy>
Darmani nah, I think it's over already
<wolffles>
thats a bit harsh i feel
<Darmani>
Usually I'm the one who says something controversial.
<Darmani>
Well not really.
ElFerna has joined #ruby
<Darmani>
But usually someone gets offended by something I say.
lyoshajapan has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
<shevy>
Any more programming you did as of late Darmani?
baweaver has quit [Remote host closed the connection]
<Ox0dea>
Darmani: Step 1: Be attractive. Step 2: Don't be unattractive.
<Ox0dea>
It was a meme, bro! Do you even Internet?
<Darmani>
Step3: Profit????
<Darmani>
I didn't recognize that one.
jam_ has quit [Ping timeout: 240 seconds]
<wolffles>
Ox0dea: your a monster tonight, or ive just never noticed it
tokik has joined #ruby
lacuna has quit [Remote host closed the connection]
<wolffles>
:D not jugding just saying
adgtl_ has joined #ruby
<Ox0dea>
wolffles: How do you mean?
jam___ has quit [Client Quit]
<Darmani>
wolffles: How so?
jam_ has joined #ruby
<Ox0dea>
wolffles: Please clarify.
adgtl has quit [Ping timeout: 265 seconds]
<Darmani>
wolffles: Please.
<wolffles>
with the witty comments
<wolffles>
you must be a hit at partys :P
<Darmani>
Nah he just took his medication today.
<wolffles>
riterall?
<Darmani>
lulz
<agent_white>
:/
<Ox0dea>
wolffles: I don't get it?
<Ox0dea>
Wit is monstrous now?
<agent_white>
Nah only indirect object... nevermind.
<Darmani>
Ox0dea: Well I for one appreciate your wit.
<wolffles>
Ox0dea: what dont you get
<wolffles>
Ox0dea: please clarify
<Ox0dea>
Are you... trolling?
<agent_white>
Do... we move this to offtopic?
kith has joined #ruby
<wolffles>
nah im walffing
praveen has quit [Remote host closed the connection]
* Darmani
presents wolffles with the trophy for Master Troller
lolktnxbye has joined #ruby
<lolktnxbye>
rya
<lolktnxbye>
oops
<lolktnxbye>
newb question. why does the nil? method return false on an empty array? thanks!
<domgetter>
lolktnxbye: only nil is nil
<Ox0dea>
That said, any object can lie.
<domgetter>
an empty array is still a thing. it's an empty bucket. buckets aren't nothing. for example, you can ask a bucket how many things it contains
<DarkElement>
Like if I have a string "This is a random stringasdjk", I want to be able to do $new_str = $str[-5...-1].sub("asdfj", "")
<Ox0dea>
DarkElement: So by "sub" you mean "remove"?
<DarkElement>
However when I tried that it just yields the result of the sub, and I need to only execute the sub on the last 5 and not assign the string it's last 5 chars
<DarkElement>
Is there a way to do that with sub, perhaps?
skcin7 has quit [Max SendQ exceeded]
radgeRayden has joined #ruby
<DarkElement>
Sorry Ox0dea, un-ignored. You were saying?
skcin7 has joined #ruby
mistermocha has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.3/20151223140742]]
ur5us_ has joined #ruby
arup_r has quit [Remote host closed the connection]
<DarkElement>
Never mind I cam eup with my own solution
dionysus69 has joined #ruby
ta has quit [Ping timeout: 265 seconds]
rkazak_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
praveen has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
ur5us_ has quit [Ping timeout: 265 seconds]
praveen has quit [Ping timeout: 276 seconds]
claw has joined #ruby
yardenbar has joined #ruby
haraigo has joined #ruby
defendguin has quit [Ping timeout: 265 seconds]
colegatron has joined #ruby
pawnbox has quit [Remote host closed the connection]
anisha has joined #ruby
pawnbox has joined #ruby
d0nn1e has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
dwfait has quit [Remote host closed the connection]
d0nn1e has joined #ruby
SOLDIERz has joined #ruby
Darmani has quit [Ping timeout: 252 seconds]
UtkarshRay has quit [Remote host closed the connection]
<norc>
apeiros: Alright this is even more bizarre now. Apparently I still had a left over jruby in my PATH at the _end_... removing it magically fixed it.
* norc
scratches his head
zz_denym_ is now known as denym_
<norc>
Im not sure how a jruby at the end of my path causes chruby to use my OSX Ruby, but fine.
<apeiros>
bizarre seems to capture that pretty well
<norc>
Im just happy it works. :-)
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
<norc>
At least now I can &. all around in my Ruby. That should be fun.
terlar has joined #ruby
elaptics is now known as elaptics`away
praveen has joined #ruby
araujo_ has quit [Quit: Leaving]
El3ktra has joined #ruby
ElFerna has joined #ruby
ur5us has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
roshanav_ has joined #ruby
tokik has quit [Ping timeout: 276 seconds]
<apeiros>
I hope ruby's &. does not become the equivalent of php's @
<apeiros>
(but they're structurally quite different, so chances are it won't)
<Ox0dea>
@ is the nuclear option.
<apeiros>
nucular
andikr has joined #ruby
mdw has joined #ruby
raz has joined #ruby
<norc>
Considering how Ruby seems to behave, auto vivifying ivars, I can see that coming.
tokik has joined #ruby
mdw has quit [Client Quit]
<DEA7TH>
In irb, how can I declare global variables which can be accessed inside global functions? This works in Python, I thought it worked in irb too.
<norc>
Until yesterday I never gave much thought to this particular behavior...
<Ox0dea>
The PHP community never really took to giving their operators cute names, but I think @ would've been called the "Nike operator".
roshanavand has quit [Ping timeout: 240 seconds]
<apeiros>
non-raising constant reassignment and auto-vivifying ivars are some of my ruby pet peeves
<raz>
hmm.. i'm feeling stupid.. why does this expression give a syntax error? puts (n * (n + 1) / 2) – ((a - 1) * a / 2)
<apeiros>
DEA7TH: $vars are global
<norc>
DEA7TH: If you want to have state, chances are you want a module or a class.
<apeiros>
DEA7TH: but generally you don't want that
<DEA7TH>
I know it's just a small script with 1 global in total
<norc>
DEA7TH: Put it inside a module then.
<apeiros>
Ox0dea: not the "shut the f up" operator?
<DEA7TH>
Ruby had a dollar operator and I didn't even know about it? Heh. It works anyway.
<norc>
DEA7TH: Don't use it. Use a module, really.
<apeiros>
DEA7TH: it's not an operator
mark2 has joined #ruby
<norc>
Some things really don't belong into Ruby. Custom globals are one of them. :-
<apeiros>
and +1 to norc - better learn how to properly do it.
<norc>
:-S
karapetyan has joined #ruby
<Ox0dea>
apeiros: "Just Do It".
futilegames has joined #ruby
krzkrz has joined #ruby
<DEA7TH>
norc: It's throwaway code for a signle task, 5-15 lines in total. Globals are made for this use case.
<Ox0dea>
raz: That's really weird.
krz has quit [Read error: Connection reset by peer]
<apeiros>
Ox0dea: got that, but it's a misnomer since it won't make it do it any more than without :)
<Ox0dea>
apeiros: The focus is on the absence of complaint.
<raz>
Ox0dea: tell me more! :D i tried a few things, but it just leaves me baffled (e.g. if you split at the - into two expressions, they both run fine)
<norc>
DEA7TH: I think globals just exist for historical reasons.
<apeiros>
raz: it's a bad idea to have a method call with a paren a space away
techsethi has quit [Quit: techsethi]
<Ox0dea>
raz: I... it might be a bug? I don't see why the parser should have trouble disambiguating.
<raz>
apeiros: well it's a simple formula... i don't know why the parser has trouble with it?
<ruboto>
Ox0dea # => /tmp/execpad-972909647755/source-972909647755:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/497445)
<norc>
Can ruboto execute with -y ?
<Ox0dea>
It looks like a parser bug.
<apeiros>
ok, seems indeed unrelated to having issues with args vs. other parens
antgel has joined #ruby
<norc>
Ox0dea: Does it?
<apeiros>
and it's not confused about // being a regex either
<norc>
What is this character: –
<apeiros>
ah
<apeiros>
heh
<apeiros>
yeah, – vs -
<apeiros>
well spotted norc :)
<raz>
ohhhhhhhhhhhh
<norc>
@raz ^^
<raz>
fml
lacuna has quit [Remote host closed the connection]
<apeiros>
lel?
<raz>
that's what you get for copy pasting from websites
<norc>
apeiros: The advantage of getting familiar with ruby -y :-)
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros>
note that it's still a bad idea to put a space between parenthesized args and method name ;-)
<raz>
thanks guys... lol.. sorry about this
<apeiros>
norc: interesting flag. gotta take a look at it.
praveen has quit [Remote host closed the connection]
<apeiros>
related to your question of understanding ruby parsing process?
<raz>
apeiros: well in principle you are right. but i don't see why i should format math formulas weirdly just to please ruby ;)
<apeiros>
raz: you don't have to. just either put a proper arg paren around the whole or don't have a paren at all.
<norc>
raz: It's to please people who read your code (which might be yourself)
<apeiros>
and yes, yes, you will have to please syntax rules of whichever language you're writing in.
<norc>
raz: The only few times when you have to please the parser is when you try to leave too many fcall parens away. The Ruby parser quickly chokes on that.
<apeiros>
unless of course you don't care about the outcome.
<raz>
apeiros: hm, bit confused right now, how exactly would you rewrite it? (n * (n + 1) / 2) – ((a - 1) * a / 2)
<norc>
raz: Again. – is not -
<apeiros>
raz: `puts (` <- bad
<norc>
- is an operator, – is an identifier.
<apeiros>
raz: `puts(` <- correct
<apeiros>
ruby will (sadly) try to figure out what you meant, but it won't always get it right.
Anderson69s_Deb has joined #ruby
<raz>
norc: sorry, still had the bad version in the clipboard
<apeiros>
norc: they referred to my "space before paren" thingy
<norc>
Ah.
TheHodge has joined #ruby
futilegames has quit [Quit: futilegames]
<raz>
apeiros: ah, gotcha.. well.. yea bad habit maybe. i just never use parents for puts.
<raz>
parens
<raz>
jesus, today is not my irc day ;)
<norc>
>> (a) b
<ruboto>
norc # => /tmp/execpad-14860bfa19ea/source-14860bfa19ea:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/497452)
<apeiros>
so the way I'd write it is: `puts((n * (n + 1) / 2) - ((a - 1) * a / 2))`
<norc>
This is basically what that original parser error boiled down to by the way.
<raz>
well, whoever puts code or formulas on their website and lets a "beautifier" mangle them should be tarred and feathered anyway
<Ox0dea>
Seconded.
<raz>
has bitte me often enough that i 'm just tempted to write a keyboard maestro "clipboard unmangler" or such
<raz>
well, bucket list 2016...
Sembei has quit [Excess Flood]
Anderson69s_Deb has quit [Client Quit]
dfdfdf has joined #ruby
Sembei has joined #ruby
blackgoat has quit [Ping timeout: 260 seconds]
chipotle has quit [Quit: cheerio]
<apeiros>
raz: beautifier is ok, as long as there's a "raw" button which has it in plaintext
elaptics`away is now known as elaptics
<apeiros>
or better yet, a copy button. less annoying anyways. sad thing is just that that won't work without flash across browsers :(
<raz>
well.. guess so.. but i never want to look at "beautified code" anyway
<raz>
beautifier is fine for blog text.. but code is code
<apeiros>
replacing a - with a – is just wrong, though :)
<norc>
Ox0dea: Don't second it. Here we should advocate mindless use of rubocop. Let beautifies and code static code analyzers improve code styles. Who are we to meddle with the machines of today.
jbrhbr has quit [Quit: Leaving.]
adgtl_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
Somebody wants `rubyfmt`.
<Ox0dea>
It isn't me.
<raz>
yeh i'm a bit wary about that new magical comments stuff
<Ox0dea>
That's not to say we shouldn't give the machines their due, mind.
ur5us has joined #ruby
* raz
wonders if 2016 will be the year when 'gem install' won't take minutes anymore...
haraigo has quit [Ping timeout: 250 seconds]
<norc>
raz: It shouldn't take more than a few seconds for most gems. What are you trying to install?
<norc>
raz: Also, skip rdoc/ri if you want to seriously speed things up.
<norc>
Aside from gems building native extensions, that is how gem spends most of its time.
DoubleMalt has joined #ruby
<raz>
norc: doesn't matter what. yes i know about nordoc/nori. rubygems is just slow far beyond the point of ridiculousness.
<Ox0dea>
Could be network or potato issues.
<raz>
our Rails Gemfile takes upwards of 5min to install..
<raz>
not the network. fastly is fast
<norc>
raz: I cannot share that opinion. It took me a fair 45s to install my entire gem dependencies for one of our larger Rails applications. Half of that was spent in the compiler.
<ddv>
raz: so?
<norc>
And that was a total of maybe 200 gems?
<norc>
Which is pretty fast.
<raz>
norc: seems unlikely tbh, then again, npm would've probably done it in 5s ;)
<Ox0dea>
raz: Y U DO DIS? Our granary is so far away.
<Ox0dea>
I didn't realize we were running so low.
chthon has joined #ruby
<raz>
oh just to rub it, i launched a random gem install
<raz>
i'll let you know when it finishes :P
<raz>
$ time gem install --no-rdoc --no-ri activerecord
poguez_ has quit [Quit: Connection closed for inactivity]
<norc>
I honestly had that situation where a buddy wanted to come over to watch a movie, and I had to tell him "Next week. Next couple days my computer is busy compiling X11 and Firefox".
blackgoat has joined #ruby
<norc>
At the time I didn't even consider that it was pretty retarded...
<Ox0dea>
I bet you did, though.
ta has joined #ruby
<raz>
so for fun, activerecord-4.2.5.gem is 325kb. it takes 0m0.006s to unzip here. so, i'd say 0.006s + 0.1s network latency = 0.106s would be an acceptable latency for a gem install.
<raz>
and i'm being generous with the network here :P
<norc>
Well. You are right, I did. And I concluded that it was worth it, since you got an optimized build... but I was just a kid back then and felt pretty cool about my monitor showing compiler output all day long.
techsethi has joined #ruby
<norc>
raz: Rubygems does more than just fetch and unzip. But just a bit. ;-)
<raz>
norc: yes, and very, very poorly :/
tulak has quit [Remote host closed the connection]
<norc>
raz: I couldn't tell, since I don't know what that exactly is, and why that would be considered poor.
<raz>
i'll just stop ranting already. be glad you don't. :)
<norc>
raz: Feel free to enlighten me then.
<Ox0dea>
>> "#{%w[good great awesome best perfect].sample} idea"
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<norc>
So I have this rather expensive piece of proprietary software here. The developers thought it would look cool and modern to store the session id in HTML5 local storage. Can someone here think of an elegant way to tell them about their stupidity?
<shevy>
hehe
ElFerna has joined #ruby
<shevy>
raz I always wanted a variant of gentoo but with ruby rather than portage
<raz>
that's probably not the kind of persistence they were looking for... :P
<norc>
The issue is not the persistence...
Guest88361 has joined #ruby
<shevy>
gem installation can be quite slow, especially when you also include documentation, but you can keep local copies, and then install from there
<domgetter>
norc: explain that what they've done is the equivalent of a bank giving the other key to the lockbox to the customer for safe keeping
roshanav_ has quit [Remote host closed the connection]
roshanavand has joined #ruby
<norc>
Wait correction. I meant to write session storage there.
<raz>
shevy: yea it's just a ball on a chain. npm, go etc. just install in split seconds. and then its ruby's turn and you go make a coffee...
waka has joined #ruby
<domgetter>
norc: oh then tell them theyve locked the key in the lockbox
dn` has joined #ruby
<Ox0dea>
norc: When you came pulling in here, did you notice the sign out in front of my house that said "HTML5 localStorage"?
<norc>
domgetter: The iceberg went a lot bigger when they reimplemented SHA with their own modifications for HMAC that is used in various places. That was quite amusing to look at last week.
Xentil has joined #ruby
<domgetter>
norc: I'll bet there's a Mr. Bean sketch of a very similar problem
<domgetter>
he often did the "saw off the branch you're sitting on" kind of humor
<raz>
reimplemented SHA...
karapetyan has quit [Remote host closed the connection]
<raz>
that's right from the book of great ideas
huyderman has joined #ruby
<raz>
wouldn't trust an existing impl with my precious HMACs either
yfeldblum has quit [Remote host closed the connection]
<domgetter>
They'd better build their own cpu, just in case
yfeldblum has joined #ruby
<norc>
raz: The reason security related companies do this is often: "It is more likely that someone will break the well known encryption, than someone to scrape off the top of a chip, delete fuse bits with uv light, and reverse engineer your custom implementation on your chip"
waka has quit [Remote host closed the connection]
<raz>
norc: um.
<norc>
They usually rely on keeping that modification secret.
<norc>
Which is a bit silly, because reverse engineering your implementation is usually much easier. :-)
* raz
tries to decide how many levels of wrong that idea stacks
startupality has quit [Quit: startupality]
waka has joined #ruby
<norc>
raz: Just consider how Enigma was rendered useless by politicians who didn't know anything about encryption or mathematics. It's the same story probably, people with power but no knowledge trying to influence things.
<norc>
On encryption that tends to end badly.
<Ox0dea>
Some worlds just want to watch the people burn.
<raz>
there's a fairly simple rule about crypto code. don't write it.
<raz>
if you were one of the few people who are qualified to write it, you'd know.
MahaDev has joined #ruby
antgel has quit [Ping timeout: 255 seconds]
<raz>
and if you think mucking with SHA is a sensible thing to do, well. refer to the one rule. :P
<Ox0dea>
Are we talking about SHA-1, then?
waka has quit [Remote host closed the connection]
antgel has joined #ruby
postmodern has quit [Quit: Leaving]
<raz>
don't see why you would patch any of them
karapetyan has joined #ruby
<domgetter>
they wanted to make it a little more random
pawnbox has quit [Remote host closed the connection]
startupality has joined #ruby
pawnbox has joined #ruby
<Ox0dea>
Cryptographic security peaked with memfrob(3), imo.
pawnbox has quit [Remote host closed the connection]
startupality has quit [Client Quit]
pawnbox has joined #ruby
futilegames has joined #ruby
abkabkabk has joined #ruby
<abkabkabk>
!paste
cmolenda has quit [Remote host closed the connection]
<domgetter>
abkabkabk: a symbol is kinda like a string but more efficient
<apeiros>
symbols are used internally by ruby to identify all things with a name (methods, ivars, lvars etc.)
<abkabkabk>
thx mucho
<abkabkabk>
ahh k
<livcd>
I am going to build a cli todo tool. What would be the "best" approach to take. Obviously there are dozens of such tools on github but I'd like to ask here first
<apeiros>
and hence they're built to be fast for all identification purposes.
<shevy>
livcd as awful as it is, I'd recommend to start with optionparser until you want to take an alternative lateron
<apeiros>
livcd: the old "how do I write a game" question. this is out of scope of this channel.
<domgetter>
(and super-duper internally, symbols are integers, so they're super fast n stuff)
<apeiros>
livcd: break your question down into answerable questions please.
<livcd>
apeiros: ok
<shevy>
livcd afterwards just add on elements that you feel have to be included into a todo script; I assume being able to designate different files, toggle behaviour, autogenerate some code based on that etc...
marr has joined #ruby
<livcd>
shevy: so why is optionparser awful and what is the alternative you would recommend ?
<shevy>
I mostly just use local textfiles in a single directory called todo/ :)
<domgetter>
livcd: the "thor" gem can be used to make a cli tool. of course, there might be others
<livcd>
ah yeah i have heard about thor gem
<shevy>
livcd I dunno, I just can't stand the API really, others have less of a problem here http://docs.ruby-lang.org/en/2.2.0/OptionParser.html - there is a reason why you have alternatives such as slop or thor though
<livcd>
i mean i could perhaps glue it together that would not be a problem. I think i'd like some key/value store maybe some sqlite
Anderson69s_Deb has joined #ruby
<shevy>
sounds trivial
<shevy>
perhaps you can even use sequel
lkba_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
waka has joined #ruby
karapetyan has joined #ruby
trautwein has joined #ruby
<livcd>
shevy: well i hope it's trivial :-))
anisha has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
<livcd>
I am concerned about how do I compose things..If I'll have a single class with many methods or a module with dozens of classes. I'd like to keep it small but be able to add "bloat" incrementally
roshanavand has joined #ruby
<livcd>
maybe i should read about some design patterns or finally JDI
abkabkabk has quit [Quit: Page closed]
futilegames has quit [Quit: futilegames]
lkba_ has quit [Ping timeout: 264 seconds]
rdark has joined #ruby
matp has joined #ruby
finisherr has quit [Quit: finisherr]
rodfersou has joined #ruby
<shevy>
start with a single class anyway
astrobun_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<DEA7TH>
Ruby has no sum method? I have to do [1,2,3].reduce(:+) ?
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
UtkarshRay has joined #ruby
ibouvousaime has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
ElFerna has quit [Ping timeout: 260 seconds]
mdw has quit [Ping timeout: 245 seconds]
DonOtreply has quit [Quit: DonOtreply]
<apeiros>
IMO cucumber is not well suited for anything below large enterprise. and even there I'm not sure it's a fit. you still need to understand too much about how programming works. otherwise programmers will have to rewrite your stories.
nertzy has joined #ruby
f3ttX] has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
<agent_white>
If the shoe fits. Use it.
cmolenda has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
jackcom has joined #ruby
pontiki has joined #ruby
blackmesa has joined #ruby
themsay has joined #ruby
charliesome has joined #ruby
mdw has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sgambino has joined #ruby
sigurding has quit [Quit: sigurding]
roshanavand has joined #ruby
themsay has quit [Read error: Connection reset by peer]
<ratsss>
Hmm, so I tried just editing that line out.
<ratsss>
then reinstlaling rubygems
<ratsss>
and that seems to have done it
<ratsss>
hurah
<apeiros>
ratsss: you generally shouldn't touch system ruby
pdoherty has quit [Remote host closed the connection]
<Eising>
apeiros: it seems that homebrew is to blame
<apeiros>
install and maintain your own ruby. much less problematic.
<Eising>
but yes, that advise I can back
<ratsss>
yah
<apeiros>
Eising: the paths in their paste are all from system ruby
<Eising>
right
<apeiros>
if homebrew is to blame (which is entirely possible, as it does a couple of things in the most crappy way possible), then it's quite bad (yet again), as it'd mean that it touches system ruby.
pdoherty has joined #ruby
<shevy>
:D
tulak has joined #ruby
ruid has quit [Ping timeout: 255 seconds]
<cmolenda>
ratsss: Just curious, what does "which gem" get you?
<shevy>
great evil!
gregf has quit [Quit: WeeChat 1.3]
<ratsss>
oh wait no it isn't fixed at all
asmodlol has quit [Ping timeout: 240 seconds]
<ratsss>
if I rm that line, ruby now works if I run it as root
<ratsss>
and root can install gems
gregf has joined #ruby
<ratsss>
but then once root installs gems, it's broken for my user again :O
<ratsss>
like wut
<cmolenda>
as your user, what does running "which gem" give you?
nertzy has quit [Quit: This computer has gone to sleep]
<cmolenda>
hah, wow
techsethi has quit [Quit: techsethi]
<ratsss>
and my rvm ruby works fine
<apeiros>
rvm implode
<apeiros>
and start over ;-)
<cmolenda>
definitely
<cmolenda>
implode and start over with rbenv :p
<apeiros>
or `rvm get stable` first
bkxd has joined #ruby
roshanavand has joined #ruby
<ratsss>
ok I've killed rvm entirely
asmodlol has joined #ruby
<ratsss>
http://dpaste.com/0KFQM39 ok this looks healthier, but ruby still only works if I manually remove that thing from rubygems.rb
<cmolenda>
just a heads up, rvm does a bunch of strange things, such as changing the native change directory "cd" command of your system
<apeiros>
ok, I'd have tried cleanup, repair and fix-permissions first
duckpuppy has joined #ruby
<apeiros>
but nuking might be a good idea if you have an ancient rvm.
<ratsss>
yeah
<ratsss>
so I nuked rvm
Xeago has quit [Remote host closed the connection]
<ratsss>
now using system ruby
<ratsss>
which i'm fine with
<apeiros>
cmolenda: do you happen to know how e.g. direnv does its job?
<ratsss>
but want rubygems to not break at first thing
<ratsss>
gem --version === 2.4.8
<ratsss>
perhaps system gems needs more updated system ruby??
<cmolenda>
apeiros: Nope, not familiar, sorry.
<shevy>
ratsss what ruby version? 2.3.0 has a more recent gem version
joonty has joined #ruby
<ratsss>
2.0.0
<ratsss>
I don't know if you can upgrade system version on OSX
<cmolenda>
apeiros: is that an example of something that changes system functionality for good reason?
sandstrom has quit [Quit: My computer has gone to sleep.]
<ratsss>
unless I can and should
bkxd has quit [Ping timeout: 264 seconds]
<ratsss>
I think that was the rationale behind getting rvm in the first place
<apeiros>
cmolenda: no, I just wonder how many people use direnv, which probably changes cd too (can't imagine how it'd work otherwise), but shame rvm for changing cd
<pontiki>
ruby-install + chruby
<ratsss>
So I'm wondering if I've updated the system gems to a version not supported by ruby 2.0.0
sigurding has joined #ruby
<ratsss>
can anyone else do /usr/bin/gem --version on OSX?
<apeiros>
ratsss: as said, you shouldn't touch system ruby
<apeiros>
and the developer of anything which touches system ruby should be flogged publicly :)
<ratsss>
apeiros: ikr, apparently I didn't understand this when I got the laptop
<cmolenda>
apeiros: That's an interesting tool, either way. Yeah, I mean, I figure if something like a system command is going to be changed it should be done carefully and since rbenv gives just as good, if not better (as far as I've experienced) functionality without the system changes.
skade has quit [Ping timeout: 245 seconds]
<pontiki>
i get 2.0.14, ratsss
<ratsss>
interesting
<ratsss>
I'm going to downgrade in that case
kam270 has quit [Ping timeout: 245 seconds]
<apeiros>
cmolenda: never used rbenv - how does rbenv juggle the rubies?
techsethi has joined #ruby
felixal has joined #ruby
<ratsss>
COOL
Anderson69s has joined #ruby
<ratsss>
that seems to have sorted it entirely
Anderson69s_Deb has quit [Quit: Quitte]
<apeiros>
ratsss: "that"? imploding and reinstalling rvm?
<cmolenda>
apeiros: it creates shims that it references for whichever ruby you want it to point to. Then, based on the folder you're in, it looks for a hidden file (.rbenvrc i think?) that specifies which ruby should be used and it loads up the appropriate shim.
<apeiros>
or updating/reinstalling rubygems?
<ratsss>
apeiros: downgrading system rubygems
<ratsss>
i dont think rvm was the issue
<pontiki>
rbenv also supports the .ruby-version file
<ratsss>
I think I'd updated system rubygems to a version that is unsupported by 2.0.0
<cmolenda>
ah, yeah, .ruby-version
<cmolenda>
that's what I meant
<apeiros>
cmolenda: so the ruby in PATH must be a shim itself which contains the switching logic?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
I might make a mess, but isn't rbenv rather unsupported/maintained? at least I seem to remember that almost always when somebody had a problem here with it, nobody was able to help.
<apeiros>
not sure which one people recommended more in here, but iirc it was chruby?
<apeiros>
(and I don't know how that one works either)
Snowy has quit [Remote host closed the connection]
<cmolenda>
but also, i've never had a problem with it
dlitvak_ has joined #ruby
Snowy has joined #ruby
<cmolenda>
so i've not had to deal with the support community (knock on wood) and can't speak to that
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
<apeiros>
I *really* hate how `man <some builtin>` does NOT bring up proper man for that built-in but instead bash's help.
ElFerna has joined #ruby
<apeiros>
I really really hate that. soooo f*cking useless.
colegatron has quit [Ping timeout: 265 seconds]
<apeiros>
cmolenda: I see. similar to my rvm experience then :D
<apeiros>
(main reason I'm still on it)
<cmolenda>
yeah, honestly, use whatever works. Place I recently worked at has been using it in production for a very long time without issue.
<shevy>
bash, aren't you on OSX? do they use bash too?
<cmolenda>
But since ratsss was having an issue with one, i figured i'd suggest my preference
<ddv>
apeiros: dash is pretty usefull too search manual pages
<ddv>
apeiros: dash app
<apeiros>
ddv: don't want to pay for that
<ddv>
apeiros: ask your employer :p
<ddv>
besides you make plenty of cash
<shevy>
:D
<ddv>
like seriously
<apeiros>
ddv: I've got principles
<apeiros>
I know, hard to believe, but I really do :)
<apeiros>
and yeah, at work I think we even have licenses.
dlitvak has quit [Ping timeout: 240 seconds]
<ddv>
you're stubborn apeiros
<ddv>
:p
<apeiros>
but internets to the rescue. apparently you have to use `help` instead of `man` for builtins.
karapety_ has quit [Remote host closed the connection]
<apeiros>
ddv: that too.
<apeiros>
ddv: aaand stubborn about my principles :D
charliesome has joined #ruby
<ddv>
yeah
<ddv>
:p
ElFerna has quit [Ping timeout: 245 seconds]
ratsss has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
kam270 has joined #ruby
mdw has quit [Ping timeout: 264 seconds]
charliesome has quit [Ping timeout: 260 seconds]
dfdfdf has quit [Quit: Leaving]
Anderson69s_Deb has joined #ruby
d0nn1e has joined #ruby
radgeRayden_ has joined #ruby
<apeiros>
re rvm - should rvm2 have been ready ~1y ago?
bkxd has joined #ruby
tulak has quit []
radgeRayden has quit [Ping timeout: 250 seconds]
speakingcode has joined #ruby
<shevy>
hehe
Anderson69s_Deb has quit [Quit: Leaving]
<apeiros>
shevy: could be one of mine or your projects, eh? :D
kam270 has quit [Ping timeout: 264 seconds]
Dreamer3 has quit [Ping timeout: 276 seconds]
<agent_white>
apeiros: Where are you from?
shredding has joined #ruby
<agent_white>
apeiros: Sorry, offtopic -- just rememberd you asking how to say something in english a few hours ago.
mdw has joined #ruby
kam270 has joined #ruby
adgtl has joined #ruby
<apeiros>
agent_white: CH
adgtl has quit [Client Quit]
colegatron has joined #ruby
<agent_white>
And odd I never noticed you weren't native until today. Your english is kickass.
<agent_white>
apeiros: Ah!
<apeiros>
agent_white: thanks :D
kam270 has quit [Max SendQ exceeded]
platzhirsch has left #ruby [#ruby]
<domgetter>
wings of a feather?
<shevy>
apeiros yeah! I think most of these projects follow a similar pattern e. g. install into the home directory and make things work right from there
<agent_white>
Haha of course. You've 'fooled' me for two years or more, so that says something.
<ddv>
g.
<ddv>
gangsta
<shevy>
but your comment about rvm2 I found funny because it was along the lines of "we should have had the future already in the past!" :D
<agent_white>
245
krz has joined #ruby
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
Hounddog has joined #ruby
ruid has quit [Ping timeout: 250 seconds]
penne12 has joined #ruby
<apeiros>
domgetter: wings/birds of a feather, feeling with you etc. all don't really have the intended ring IMO :-/
blackmesa has quit [Ping timeout: 240 seconds]
<domgetter>
commiserator?
<domgetter>
(though that's borderline made-up)
blackmesa has joined #ruby
<apeiros>
german is just so much better at self-pitying idioms ;-)
<domgetter>
that is, while it's not in the dictionary, anyone who knew what commiserate meant would know what you mean
pdoherty has quit [Remote host closed the connection]
<agent_white>
commiserate - "express or feel sympathy or pity"
<agent_white>
I had to google it. Hope to have saved another a trip.
* apeiros
wields the power of latin
<domgetter>
I just remember it as co-misery
penne12 has quit [Client Quit]
<domgetter>
to be miserable with
<agent_white>
Hahaha nice.
<agent_white>
I just remember... I should google it. :D
<apeiros>
latin + german helps to get around understanding an awful lot of west-european languages
Icey has quit [Remote host closed the connection]
Icey has joined #ruby
pawnbox has quit [Remote host closed the connection]
<domgetter>
I guess it's a blessing and a curse that English is best understood through French
mistermocha has joined #ruby
<domgetter>
of course, thank you for the word "twelve"
<apeiros>
zwölf?
<apeiros>
like… so french? :)
<domgetter>
I was thanking you specifically. though the context was ambiguous
sandstrom has joined #ruby
arup_r has quit [Remote host closed the connection]
<agent_white>
It's a curse that folks here in the US aren't taught languages fully like in the EU... normally we only have a requirement to pick one of 3-4 languages and take it for a year.
<apeiros>
ah, yes, you set up the context as if you were thanking the french for twelve :)
<livcd>
anyone built a mariadb on alpine container ?
<apeiros>
I don't like our numbering system tbh
karapetyan has joined #ruby
<apeiros>
but… we're quite ot actually :D
<apeiros>
livcd: no, anyone uses postgres
<livcd>
apeiros: doh wrong channel
<domgetter>
In California we have a choice between a foreign language and an art like choir or something. so you don't even need to touch a language to graduate high school
<apeiros>
livcd: you might ask someone, though, I think someone used mariadb
roshanavand has quit [Remote host closed the connection]
dlitvak has joined #ruby
<apeiros>
domgetter: I think that's pretty sad
<livcd>
uhm why would you guys want to force people in the US to learn another lang ?
<agent_white>
domgetter: Ah no shit?! Required just 2 semesters/one year of a foreign language here in Colorado.
<apeiros>
learning another language is IMO pivotal for perspective in thinking.
<livcd>
apeiros: why would that be ?
<agent_white>
livcd: Force? No. The question is, why would you be opposed to it?>
<domgetter>
its okay, I did both. 4 years of choir, and zwei und ein halb jahren of Deutsch
<apeiros>
livcd: because language informs thinking
<apeiros>
livcd: research it a bit. it's astounding how much of our thinking critically depends on how we express ourselves through language
Drakx has joined #ruby
Snowy has quit [Remote host closed the connection]
<apeiros>
it's not much different from how you solve the same problem differently depending on which programming language you use.
Snowy has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
<livcd>
a lot of asians are forced to learn english yet there is still too few of them that are able to express themselves freely
<agent_white>
livcd: Programming as a whole is in english. It's weird to try to imagine if it weren't... at least I can't.
<agent_white>
s/is in/is largely in/
<apeiros>
livcd: not quite sure what you want to say with that
<apeiros>
livcd: can you express yourself freely in an asian language?
dlitvak_ has quit [Ping timeout: 246 seconds]
<livcd>
apeiros: kind of
<norc>
Okay... I just learned about the existence of $_ in Ruby, and that it does not behave nicely....
techsethi has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
<bhaak>
livcd: think about how reading stuff from only one author would be limiting. the same with languages. also, you get a change of indulging into a culture different from your own.
devbug has quit [Read error: Connection reset by peer]
<livcd>
bhaak: one should be able to choose what language (and if any) he wants to study
<apeiros>
livcd: (re why learn another language) also it might be a good way to learn a bit of humility
<norc>
Honest question, what exactly is $_ - it does not seem to behave exactly like a variable but I cannot figure out what it is.
<apeiros>
livcd: I've met so many americans who were like "yeah, why doesn't everybody just learn english, it's so easy you know"
<apeiros>
livcd: and they were completely oblivious as to how much effort it is to actually master a foreign language, themselves only knowing english…
pawnbox has quit [Remote host closed the connection]
<ddv>
yeah try learning Dutch
<ddv>
or Chinese
f3ttX] has quit [Remote host closed the connection]
pawnbox has joined #ruby
<norc>
>> p $___
<livcd>
apeiros: i agree and understand that but i think that the main purpose of a language is to pass information as easily as possible
<apeiros>
livcd: yes. hence also the stuff I mentioned first.
<bhaak>
livcd: we're talking about kids here. would you also say "one should be able to choose what part of mathematic (and if any) they want to study"?
arup_r has joined #ruby
<livcd>
bhaak: so you would give kids (or their parents) a list of languages and force them to choose one as a secondary lang ?
roshanavand has joined #ruby
<bhaak>
livcd: I don't have to. our schools already do that :-]
kobain has joined #ruby
<bhaak>
although the "choose from" part is not as conditional as it could be
blackmesa has quit [Ping timeout: 256 seconds]
<livcd>
apeiros: well my comment about asians was that they are "forced" to learn english but they are so disconnected from the english speaking world that it has a minimal impact on the people
<norc>
livcd: The whole idea of mandatory school revolves around the assumptions that children don't know what they will probably need to be able to do most things later on.
msankhala has quit [Quit: This computer has gone to sleep]
<norc>
livcd: Having a mandatory language is not that much different.
<norc>
Anyway, back to my Ruby question:
<bhaak>
livcd: I learnt Latin at school. how more disconnected can you be from a language and culture than a language and culture that has been dead for more than 1000 years?
<norc>
What the heck is $_
<livcd>
norc: well the generation of my parents have been given an opportunity (lol not really) to learn russian and nowdays it's very much useless for them
<Mon_Ouie>
The last line that has been read using gets
<bhaak>
livcd: despite that, it had quite an impat on my personal development. it depends on how you learn a language and what goes with it.
<Mon_Ouie>
I've only ever used it with ruby -pe '…'
jmonreal has quit [Ping timeout: 250 seconds]
<norc>
Mon_Ouie: Then why does something like: puts -e "puts $_.class" just throw weird exceptions?
<norc>
errr: ruby -e "puts $_.class"
<Mon_Ouie>
$_ is being replaced by your shell if you use double quotes
arup_r has quit [Remote host closed the connection]
jmonreal has joined #ruby
<Mon_Ouie>
ruby e 'puts $_.class' prints NilClass
<Mon_Ouie>
-e*
arup_r has joined #ruby
<norc>
Mon_Ouie: Oh well. Thank you for solving my weirdest headache in a while.
sankaber has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
sankaber has joined #ruby
b3nt_pin is now known as beagles
<Mon_Ouie>
It's part of the method name, gsub and gsub! are two different methods
<Mon_Ouie>
The bang variant usually implies that it's a more "dangerous" form of the regular method. In the cases you mention, it means that the method modifies the receiver (x) instead of returning a new string.
blackmesa has joined #ruby
Bloomer has quit [Remote host closed the connection]
Couch has joined #ruby
pl1ght has joined #ruby
<sivam>
Mon_Ouie: Thanks for clear explanation. got it. so gsub doesn't modifies the argument and gsub! modifies the arg
krz has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
Not the argument, the object on which you call the method
symbol_ has quit [Quit: WeeChat 1.1]
sagui has joined #ruby
pl1ght has quit [Client Quit]
jdawgaz has joined #ruby
sagui has quit [Client Quit]
blackmesa has quit [Ping timeout: 264 seconds]
Anderson69s_Deb has quit [Read error: Connection reset by peer]
<jmonreal>
anyone on how to rotate properly log files?
<jmonreal>
created with logger.rb lib
Anderson69s_Deb has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
krz has joined #ruby
prestorium has quit [Read error: Connection reset by peer]
ibouvousaime has joined #ruby
Xeago has joined #ruby
ta0 has joined #ruby
rodfersou is now known as rodfersou|lunch
radgeRayden_ has quit [Ping timeout: 265 seconds]
penne12 has joined #ruby
TomPeed has joined #ruby
mary5030 has quit [Remote host closed the connection]
penne12 has quit [Client Quit]
genpaku has joined #ruby
cmolenda has joined #ruby
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #ruby
Xeago has quit [Remote host closed the connection]
praveen has quit [Remote host closed the connection]
krobzaur has joined #ruby
dlitvak has joined #ruby
davedev24 has joined #ruby
jmonreal has quit [Quit: Lost terminal]
jmignault has joined #ruby
Anderson69s_Deb has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
Anderson69s_Deb has joined #ruby
FooMunki has joined #ruby
jmonreal has joined #ruby
<jmonreal>
hello
rippa has joined #ruby
praveen has joined #ruby
Kendos-Kenlen has joined #ruby
ElFerna has joined #ruby
nertzy has joined #ruby
hxegon has joined #ruby
praveen has quit [Ping timeout: 245 seconds]
praveen has joined #ruby
<havenwood>
jmonreal: hi
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
Anderson69s_Deb has quit [Quit: Leaving]
jas02 has joined #ruby
voker57 has quit [Quit: voker57]
Anderson69s_Deb has joined #ruby
vondruch has quit [Quit: Ex-Chat]
Wompy has joined #ruby
Wompy has quit [Read error: Connection reset by peer]
malconis has joined #ruby
gusTester has joined #ruby
vondruch has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
hxegon has joined #ruby
mdw has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has joined #ruby
praveen has quit [Remote host closed the connection]
<jmonreal>
the size I changed it for testing, because it was not rotating after the size
howdoi has quit [Quit: Connection closed for inactivity]
dlitvak_ has joined #ruby
platzhirsch has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
yes`r has quit [Ping timeout: 276 seconds]
anisha has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
ta has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 260 seconds]
skade has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
sandstrom has quit [Quit: My computer has gone to sleep.]
anisha has joined #ruby
shlomo has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
speaking1ode has joined #ruby
mary5030 has joined #ruby
<jmonreal>
havenwood: I got the error, instead of using file I just passed the filename and now it works!
<jmonreal>
like a charm
charliesome has quit [Ping timeout: 276 seconds]
PedramT has joined #ruby
RaceCondition has joined #ruby
<atmosx>
Papierkorb: for parsing I guess.
speakingcode has quit [Ping timeout: 260 seconds]
<atmosx>
Papierkorb: I have a 'string' (file) which has data formatted in JSON. However, I parse the file with ruby or python comes up with JSON:ERROR which means that it's not valid.
blackmesa has joined #ruby
<Papierkorb>
So?
<atmosx>
the strange thing I noticed is that if it's 1 line, it parses nicely, if I add a second line it doesn't.
<atmosx>
I wanna know where's the error
<Papierkorb>
ask the parser for the error position?
<ja>
but 2.3?! so I’ve been able to use it since December 25 without realizing? O_O Thanks, ljarvis & shlomo! I’ve got tons of find/replace work to do now, hehe; brb
msankhala has quit [Quit: This computer has gone to sleep]
<ljarvis>
generally when you see a parse error like that, it's worth combing the line number with your eyes a couple of times. Chances are something will pop out
<ljarvis>
and when it doesn't, there's always other peoples eyes :)
<atmosx>
no that's not it, removing hits again with an error.
<atmosx>
ljarvis: thanks :-)
<ljarvis>
also *technically* the document isn't valid JSON at all
<ljarvis>
it's JSON delimited by newlines
<atmosx>
ljarvis: so json doesn't have new lines?
<atmosx>
I see
<ljarvis>
which most parsers wont handle. You'll want to use YAYL
<ljarvis>
er
<ljarvis>
YAJL?
<ljarvis>
it'll parse those, but really you should prefer valid JSON for the entire document
Chau_ has joined #ruby
<ljarvis>
atmosx: I mean there's no surrounding object, it's just JSON objects delimited by newlines
<ljarvis>
if you added [ and ] it would be valid
<ljarvis>
(and commas separating the objects)
<atmosx>
ah I see
mary5030 has quit [Ping timeout: 240 seconds]
praveen has quit []
Anderson69s_Deb has quit [Ping timeout: 246 seconds]
<ljarvis>
this method is usually used for JSON http streaming
Anderson69s has quit [Ping timeout: 260 seconds]
<ljarvis>
(since there might technically *never* be a document end
<ljarvis>
)
<ljarvis>
meta sentence there
lkba has joined #ruby
mary5030 has joined #ruby
atomical_ has joined #ruby
Chau has quit [Ping timeout: 246 seconds]
<ljarvis>
also the rogue } I thought of was because I missed the starting { :) see, always worth scanning it by eye a few times
sandstrom has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
<atmosx>
jlyndon: indeed, if I add square brackets and commas works!
<ljarvis>
yep, now you have an array of objects (in javascript speak)
aganov has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
aadam21 has joined #ruby
jobewan has joined #ruby
aspire has quit [Quit: Leaving]
atomical has quit [Ping timeout: 272 seconds]
Bloomer has joined #ruby
mrtomme has quit [Ping timeout: 246 seconds]
Anderson69s has joined #ruby
dstarh has quit [Remote host closed the connection]
norc has quit [Ping timeout: 252 seconds]
roshanavand has joined #ruby
mrtomme has joined #ruby
hxegon has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
denym_ is now known as zz_denym_
al2o3-cr has quit [Quit: WeeChat 1.3]
f3ttX] has joined #ruby
crystalmaiden has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crystalmaiden has quit [Max SendQ exceeded]
bihi has joined #ruby
crystalmaiden has joined #ruby
stannard has quit [Remote host closed the connection]
atomical has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
stannard_ has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
<ljarvis>
class A; def b?; false; end; end; class B < A; def b?; true; end; end vs class A; def b?; is_a?(B); end; which and why?
hxegon has joined #ruby
crystalmaiden has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
jdawgaz has quit [Ping timeout: 260 seconds]
speakingcode has quit [Ping timeout: 240 seconds]
araujo has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
<apeiros>
ljarvis: former. doesn't require knowledge about B in A.
abq has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
<ljarvis>
that was my thinking too, don't have anything better than that, but that probably doesn't matter
yardenbar has quit [Ping timeout: 272 seconds]
crystalmaiden has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
bihi has quit [Ping timeout: 264 seconds]
s00pcan has quit [Ping timeout: 250 seconds]
crystalmaiden has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
solenoids has quit [Ping timeout: 240 seconds]
crystalmaiden has joined #ruby
arup_r has quit [Remote host closed the connection]
s00pcan has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
govg has quit [Quit: leaving]
crystalmaiden has joined #ruby
govg has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
robbyoconnor has quit [Max SendQ exceeded]
crystalmaiden has quit [Max SendQ exceeded]
jackjackdripper has joined #ruby
robbyoconnor has joined #ruby
crystalmaiden has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
crystalmaiden has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
<[spoiler]>
gosh inline code gives me such a headache lmao
crystalmaiden has joined #ruby
al2o3-cr has joined #ruby
crystalmaiden has quit [Max SendQ exceeded]
sivam has joined #ruby
crystalmaiden has joined #ruby
rkazak has joined #ruby
psy_ has joined #ruby
<ljarvis>
heh my brain removes the semi-colons and formats it in a relatively timely manner so it's not too offensive
gregf_ has quit [Read error: No route to host]
arup_r has joined #ruby
renderf__ has quit [Read error: Connection reset by peer]
<canton7>
I didn't spot the 'vs' in the middle until I tried to actually run it :P
mdw has quit [Ping timeout: 276 seconds]
<ljarvis>
I could have done a better job of formatting it though
<ljarvis>
hah yeah good point, canton7
Anderson69s has quit [Ping timeout: 260 seconds]
krobzaur has quit [Quit: WeeChat 1.2]
renderfu_ has joined #ruby
FernandoBasso has quit [Quit: Leaving]
rdavila has joined #ruby
FernandoBasso has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
centrx has joined #ruby
Jackneill has joined #ruby
solenoids has joined #ruby
arup_r has quit [Ping timeout: 276 seconds]
prestorium has joined #ruby
gusTester has quit [Read error: Connection reset by peer]
gusTester has joined #ruby
gregf_ has joined #ruby
malconis_ has joined #ruby
atomical_ has joined #ruby
malconis has quit [Read error: Connection reset by peer]
YP-QMUL-W has joined #ruby
tvw has quit []
tvw has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
ElFerna has quit [Ping timeout: 265 seconds]
jas02 has quit [Quit: jas02]
RegulationD has joined #ruby
aufi has quit [Quit: Konversation terminated!]
azgil has quit [Quit: Leaving]
cdg has joined #ruby
jobewan is now known as jobewan_away
aegis3121 has joined #ruby
<ljarvis>
->{{}&.dig(%%%,??)}&.===
rodfersou|lunch is now known as rodfersou
Kaboom has joined #ruby
mark2 has quit [Quit: Leaving.]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
solenoids has quit [Ping timeout: 264 seconds]
YP-QMUL-W has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
karapetyan has quit [Remote host closed the connection]
arup_r has joined #ruby
malconis_ has quit [Remote host closed the connection]
mdw has joined #ruby
karapetyan has joined #ruby
malconis has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
YP-QMUL-W has joined #ruby
dopie has quit [Quit: Lost terminal]
gagrio has quit [Ping timeout: 264 seconds]
Wompy has joined #ruby
momomomomo has joined #ruby
Wompy has quit [Client Quit]
prestorium has quit [Quit: Leaving]
chipotle has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
build22 has joined #ruby
dopie has joined #ruby
sivam has quit [Quit: Leaving.]
build22 has left #ruby [#ruby]
jackcom has quit [Quit: jackcom]
felixal has quit [Ping timeout: 264 seconds]
skade has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
ta0 has quit [Ping timeout: 276 seconds]
PsionTheory has joined #ruby
huyderman has quit [Ping timeout: 246 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
solenoids has joined #ruby
skade has joined #ruby
karapetyan has joined #ruby
momomomomo_ has joined #ruby
mistermocha has joined #ruby
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
wolffles has joined #ruby
stannard_ has quit [Remote host closed the connection]
wolffles has quit [Client Quit]
Kaboom has quit [Remote host closed the connection]
hxegon has quit [Ping timeout: 250 seconds]
mistermo_ has joined #ruby
Coldblackice has quit [Ping timeout: 260 seconds]
dvxam has joined #ruby
<dvxam>
hello here
yes`r has joined #ruby
huyderman has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
abyss has quit [Ping timeout: 265 seconds]
<dvxam>
Does anyone knows if regex are "classic" object in ruby? I'm concerns about how it's memory are allocated/free
chouhoul_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
wolffles has quit [Quit: wolffles]
anisha has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
weemsledeux has joined #ruby
mic_e has joined #ruby
peeja has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
Xeago has quit [Remote host closed the connection]
peeja has joined #ruby
polishdub has quit [Ping timeout: 276 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
sol has joined #ruby
patchedmonkey has joined #ruby
yardenbar has joined #ruby
patchedmonkey has quit [Client Quit]
sol is now known as Guest63835
patchedmonkey has joined #ruby
peeja has quit [Read error: Connection reset by peer]
themsay has quit [Quit: AtomicIRC: The nuclear option.]
vikas027 has quit [Read error: Connection reset by peer]
davedev24 has quit [Remote host closed the connection]
themsay has joined #ruby
mary5030 has joined #ruby
<volty>
can I make a gem install verbose ?
peeja has joined #ruby
patchedmonkey has quit [Remote host closed the connection]
patchedmonkey has joined #ruby
<shevy>
volty you mean a compiled gem?
joonty has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
solars has quit [Ping timeout: 264 seconds]
<volty>
hi shevy, i am reinstalling qtbindings and would like to see what's going on
<shevy>
yeah hmmm
hxegon_AFK is now known as hxegon
freerobby has quit [Quit: Leaving.]
Snowy has quit [Remote host closed the connection]
mic_e has quit [Ping timeout: 276 seconds]
anisha has joined #ruby
<shevy>
gem list has --details but I suppose this is available only to that subcommand
momomomomo has quit [Quit: momomomomo]
Lucky__ has joined #ruby
freerobby has joined #ruby
<volty>
Yes. Should I try to run its extconf in a separate dir ?
rdark has quit [Quit: WeeChat 1.0.1]
lacuna has quit [Remote host closed the connection]
<shevy>
if you run extconf.rb manually, you should get the full output directly... but I think there is a way to do this with gem too, I don't have it noted down but I vaguely remember that this was possible
DEA7TH has quit [Quit: DEA7TH]
ellistaa has joined #ruby
RegulationD has quit [Remote host closed the connection]
<ellistaa>
is an object an abstract data type?
joonty has joined #ruby
<volty>
if I run it manually, into another, separate directory, extconf is going to copy ?
<shevy>
it is not very abstract, you have methods to query or manipulate the data
momomomomo has joined #ruby
patchedmonkey has quit [Ping timeout: 240 seconds]
<jhass>
ellistaa: I guess people argue so
<shevy>
volty I don't know if it works in a separate directory, but if I run extconf.rb manually or copy setup.rb, I can get things to compile or at least see the root cause of the problem on the terminal; I do this when I install the rubygnome bindings for instance, an alias called "trainst" for "traverse_install" to enter every directory and run setup.rb or extconf.rb there (I don't remember which one it was offha
<shevy>
nd)
wolffles has joined #ruby
<ellistaa>
ok cool
<volty>
ellistaa: it all depends on what you have to do, for example its 'to_s' is abstract since you don't get a meaningful result (for your context). It's not abstract as in C++
<volty>
ok shevy, thx
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
Anderson69s has joined #ruby
krobzaur has joined #ruby
snockerton has joined #ruby
ta0 has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
amoeba_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
trautwein has joined #ruby
daivyk has joined #ruby
gatman has joined #ruby
zast has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
treehug88 has joined #ruby
stannard has joined #ruby
Anderson69s_Deb has joined #ruby
anisha has quit [Quit: Leaving]
mary5030 has quit [Remote host closed the connection]
sigurding has joined #ruby
chipotle has joined #ruby
Encapsulation has quit [Quit: Leaving]
radgeRayden_ has joined #ruby
jaxxstorm has joined #ruby
SCHAAP137 has joined #ruby
djbkd has joined #ruby
radgeRayden has quit [Ping timeout: 256 seconds]
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
wolffles has quit [Quit: wolffles]
build22 has joined #ruby
Emplitz has quit []
devbug has joined #ruby
TomyLobo has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
Bloomer has quit [Remote host closed the connection]
celly has quit [Remote host closed the connection]
hxegon has quit [Ping timeout: 276 seconds]
psy_ has quit [Ping timeout: 240 seconds]
UtkarshRay has quit [Ping timeout: 240 seconds]
last_staff has joined #ruby
shadoi has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
hxegon has joined #ruby
tvw has quit [Remote host closed the connection]
dlitvak has joined #ruby
rdark has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
<zacts>
hey rubyists
aegis3121 has joined #ruby
Darmani has joined #ruby
<Darmani>
It is raining so hard over here..
<Darmani>
How am I supposed to write code with all this rain?!
<Darmani>
Q.Q
lucasb has joined #ruby
dlitvak_ has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
Anderson69s_Deb has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
build22 has quit [Remote host closed the connection]
celly has joined #ruby
Anderson69s_Deb has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
<lucasb>
hi! If I type ARGV.class I get a class named ARGF.class? ARGF.class.to_s returns "ARGF.class". Is this expected?
<centrx>
You mean ARGF.class
jbrhbr has joined #ruby
<lucasb>
yes, sorry, I mean ARGF
aadam21 has quit [Remote host closed the connection]
<Ox0dea>
Consistency with... the likes of NilClass?
Ishido has quit [Read error: Connection reset by peer]
<apeiros>
or Module even
<eam>
or the naming conventions of class names
<apeiros>
no, revoke that
<apeiros>
would cause troubles with include etc.
<eam>
what if I build a system in a database to store class names of objects, maybe I'm doing some kind of GC profiler
chouhoulis has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
and I put a reasonable constraint on the class name table based on ruby's class name restrictions (no dot)
<eam>
ARGF blows up my database
brendan- has quit [Excess Flood]
<apeiros>
Ox0dea: the likes of NilClass - there's 3 of those - true/false/nil all follow the same pattern. but IMO it doesn't need 2 levels. ARGF can just be an instance of Object.
gatman has joined #ruby
Ishido has joined #ruby
<apeiros>
so, revoke my ARGF.class # => Class and Module, replace it with ARGF.class # => Object
pryster has joined #ruby
<apeiros>
define all its behavior in ARGF.singleton_class
<pryster>
>> foo&.[0]
<ruboto>
pryster # => /tmp/execpad-ecb102cf818e/source-ecb102cf818e:2: syntax error, unexpected '.' ...check link for more (https://eval.in/497800)
brendan- has joined #ruby
<pryster>
Why does Ruby 2.3 choke on this? :(
<apeiros>
pryster: &.[](0)
<aegis3121>
^
<pryster>
apeiros: Oh lord...
mic_e has quit [Ping timeout: 272 seconds]
<apeiros>
pryster: because &: does not work with syntax sugar
<apeiros>
&.
<apeiros>
pryster: same for +, - etc.
<apeiros>
and != apparently (re blog post)
<Ox0dea>
pryster: You can't say `foo.[0]` either, so you shouldn't be surprised.
<apeiros>
^
<pryster>
Ox0dea: Maybe I should take a look at how this was implemented...
<Ox0dea>
pryster: Why?
<apeiros>
pryster: no, just understand that the method name is []
<apeiros>
and that calling it via [arg1, …] is syntax sugar
<Ox0dea>
>> class C; def [] a, b; a + b end end; C.new[17, 25] # pryster
<eam>
how do I overload the subtraction operator in the expression 5e-10 + 1
<eam>
er, the unary minus operator I mean
<Ox0dea>
There is no subtraction operator there.
<Ox0dea>
Nor that.
<eam>
;)
<Ox0dea>
<3
chadhs has joined #ruby
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
<eam>
I mean, mathmatically there is
guacamole has joined #ruby
<Darmani>
Ox0dea: Good morning sweetheart<33
<Ox0dea>
Ohai, Darmani!
<Ox0dea>
Did you eat a well-balanced breakfast?
ascarter has joined #ruby
<Darmani>
I went to a diner.
<Darmani>
does that count? lol
<Ox0dea>
Maybe?
<Ox0dea>
Did you eat the seating arrangements?
<Darmani>
the seating arrangements??
Jamo has quit [Remote host closed the connection]
<Darmani>
dafuq
<Ox0dea>
You ever put chicken in an omelette?
<chadhs>
are many of your managing ruby processes with supervisor?
renderfu_ has joined #ruby
<chadhs>
having a heck of a time getting something like this `cd /home/app && sudo -u appuser bundle exec /home/app/ruby_daemon -d` to work in supervisor
<Darmani>
Ox0dea: Chicken?
<Darmani>
In an omelette?
<Darmani>
Why would you ruin a perfectly good omelette?
<jbrhbr>
chadhs: supervisor lets you specify a user and a directory, i don't see why that would be in your command
<Ox0dea>
Darmani: Pfft. It's delicious.
pryster is now known as norc
<norc>
Oh. Somehow it kept the nick weird.
<norc>
Anyway
<jbrhbr>
(maybe irrelevant but that's all i see)
<chadhs>
jbrhbr: it's not, i've tried that, but that command works in a simple shell script
<Ox0dea>
But wrapping something in its own liquefied babies and cooking it is the most disrespectful thing ever.
<Darmani>
Ox0dea: Lmao the eggs have feelings now do they?
<adaedra>
Off-topic? In my #ruby? More likely than you think!
<Darmani>
god the lives I've taken over the years....
<Ox0dea>
Darmani: You kill your food?
<chadhs>
i'm probably missing something that sudo -u appuser is giving me ENV wise
<Darmani>
Ox0dea: If it's not dead already then yeah
<jbrhbr>
chadhs: all i can suggest is to try to use the proper supervisor settings for this. `sudo` and `cd` shouldnt' be in there
<Darmani>
Someone has to.
<Ox0dea>
What is dead may never die.
rrichardsr3 has joined #ruby
<chadhs>
Ox0dea: technically those are unfertilized eggs
<Ox0dea>
chadhs: You're not wrong.
<Darmani>
Ox0dea: valar morghulis
<chadhs>
Hen periods
<Ox0dea>
Darmani: Jon Starkgaryen = Azor Ahai?
<norc>
Ox0dea: It is all clear now, I understand how foo[] is parsed now - and why a&.[0] cannot be simply patched in.
<Ox0dea>
norc: Via -y?
<Darmani>
lmao idk who Azoe Ahai is :3
renderf__ has quit [Ping timeout: 250 seconds]
colegatron has quit [Ping timeout: 250 seconds]
<chadhs>
jbrhbr: correct, i'll keep playing around with it and hit up the supervisor irc as well thnx
<norc>
Ox0dea: With the help of and just figuring out some other parts of the syntax.
MattV has joined #ruby
<norc>
The implementation of &. is surprisingly simple.
aryaching has quit [Remote host closed the connection]
<Ox0dea>
I looked at it when it was .?, but not deeply.
PedramT has joined #ruby
ta0_ has joined #ruby
aryaching has joined #ruby
lianj_ is now known as lianj
<Ox0dea>
Does & (the #to_proc operator) throw any spanners into the works?
ta0 has quit [Ping timeout: 240 seconds]
Encapsulation has joined #ruby
haraigo has joined #ruby
<MattV>
I'm trying to optimize an Ansible playbook and at this point the Ruby install is the longest running step (typically 7+ minutes). Any tips for speeding up "rbenv install 2.1.2"?
RegulationD has joined #ruby
arup_r has quit []
wolffles has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
peeja has quit [Ping timeout: 240 seconds]
p|p has quit [Ping timeout: 240 seconds]
yes`r has quit [Read error: No route to host]
agent_white has joined #ruby
<Darmani>
So guys. I'm kinda stuck.
<lucasb>
So I understood ARGF.class is just a minor internal detail, harmless. I'll not get surprised next time I see it. Thanks everybody for answering.
<Darmani>
I'm supposed to create methods like .each, and .eachwithindex etc. But I'm not sure how to do that.
sigurding has quit [Quit: sigurding]
<jhass>
Darmani: with def
<Darmani>
I know I need to use yield in some way... but idk how to do it Q.Q
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lucasb has quit [Quit: leaving]
<jhass>
which tutorial are you following?
Channel6 has joined #ruby
platzhirsch has left #ruby [#ruby]
<Darmani>
Well the website is called "The Odin Project" but it's not a tutorial
<Darmani>
It's my next challenge I suppose.
baweaver has joined #ruby
<jhass>
if you're unable to look up "ruby yield" or "how is each implemented in ruby" another way to learn ruby might be better for you
lemur has joined #ruby
<norc>
Ox0dea: Most of the work on that big advertised feature was just the discussions about whether it should look like &., .? or `}~
<Darmani>
jhass: Lol wow.
lemur has quit [Read error: Connection reset by peer]
juddey has joined #ruby
<Darmani>
jhass: What's the point of this chatroom then? If you can look up everything then why is anyone even here?
lemur has joined #ruby
<norc>
Darmani: If you want us to write code for you? Hire us. If you want us to be a fully fledged teacher? Hire us. If you have a specific question that you have exhausted your own options? Ask us.
<norc>
It is that simple.
<jhass>
Darmani: see the channel rules, 2.2 and 2.3 in particular
jbrhbr has quit [Quit: Leaving.]
<Darmani>
norc: Hmm. That's a good point.
<Darmani>
norc: Well said. I rest my case.
<Ox0dea>
Darmani: On the flip side, what's the point of Google if nobody uses it?
FooMunki has quit [Quit: FooMunki]
<Darmani>
Ox0dea: No one asked for your opinion xP
<Ox0dea>
And yet I kindly supplied it.
<Ox0dea>
See how much I love you?
<Darmani>
lmao is that love?
<Darmani>
I don't want it.
<norc>
Isn't Ox0dea gracious.
FooMunki has joined #ruby
<Darmani>
norc: Like a god come down to grace me with his presence.
Macaveli has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
Gmi has joined #ruby
<norc>
Darmani: Respecting the hierarchy is a good start.
<jhass>
can we skip the noise please? thanks
<norc>
Ox0dea: Back to topic. What did you mean with regards to to_proc?
colegatron has joined #ruby
<Darmani>
norc: Will do captain.
toretore has quit [Ping timeout: 265 seconds]
<Ox0dea>
norc: `foo&:bar` parses.
<norc>
What.
<Ox0dea>
>> [1,2,3].map&:succ
<ruboto>
Ox0dea # => undefined method `&' for #<Enumerator: [1, 2, 3]:map> (NoMethodError) ...check link for more (https://eval.in/497813)
<Ox0dea>
Er... it parses, but it doesn't do the right thing. :P
mary5030 has joined #ruby
<norc>
Yeah I can see that.
jbrhbr has joined #ruby
<Ox0dea>
I thought it might've been something that needed taken into consideration for `&.`.
<Darmani>
norc: I'm curious. How much would it cost to hire you for a tutoring sort of position?
<norc>
Darmani: You would have to ask my employer.
cmolenda has quit [Remote host closed the connection]
<eam>
Darmani: I'll tutor you for free, if you ask directed and specific questions
sivam has left #ruby [#ruby]
<Darmani>
eam: umm. What's your favorite color?
<eam>
Darmani: questions related to your ruby issue
<Darmani>
eam: I know I'm kidding =P
<eam>
;)
<Darmani>
eam: Thanks though I'll pm you if that's cool(:
<eam>
well, I'd rather do it in the channel so everyone can learn too
<Darmani>
But they don't want me to ask questions if I don't google the shit out of them first lol
<eam>
what would help is to phrase stuff like "I tried X in implementing each() but I'm stuck on Y"
<norc>
Ox0dea: Checking now, I have absolutely no clue how &:sym is implemented.
<eam>
you don't need to google -- but being more specific about what you've tried and where you're confused is pretty important
<Darmani>
jhass: Thanks you sir. I'll read that ^^
<Ox0dea>
Darmani: How might you iterate over a collection without #each?
<jhass>
?guys Darmani
<ruboto>
Darmani, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<Darmani>
Ox0dea: For i in ___?
<eam>
he didn't even say guys
<Darmani>
I would assume.
<Ox0dea>
Darmani: That's one way to do it, sure.
<baweaver>
Python yeah
<jhass>
eam: actually they did
<baweaver>
Does Ruby have for in? Can't remember
<baweaver>
never used it
<Ox0dea>
It does, but it literally gets turned into a call to #each.
momomomomo has joined #ruby
<baweaver>
I just never use it so I never remember :P
<Mon_Ouie>
Also the iterator variable has a different reach than when you use #each
<Darmani>
Ox0dea: hang on
<Ox0dea>
>> class C; def each; 42 end end; for _ in C.new; end
<jhass>
Darmani: you should discard it and try to find another solution
<norc>
Ox0dea: Well, if the whole parser got rewritten as a recursive descent parser - it would probably eliminate most of it and allow for new things.
<jhass>
explaining it requires understanding the other solution(s) first
<Darmani>
jhass: I should? why???
<jhass>
see above
<norc>
Ox0dea: There is a lot of it to make a non LALR syntax work somehow.
<jhass>
and given the frequency with which you write I don't believe you that you spent serious thought on it
<Ox0dea>
And it's prime!
s00pcan has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
<zotherstupidguy>
Darmani whats the q?
stannard has quit [Remote host closed the connection]
asmodlol has joined #ruby
<Darmani>
zotherstupidguy: Meh it's nothing. I have like 6 people helping me.
<Darmani>
I'll figure it out.
<Darmani>
Thank you though.
radgeRayden has joined #ruby
Xeago has joined #ruby
codecop has joined #ruby
s00pcan has joined #ruby
<Darmani>
jhass: Well if the answer has to do with Mixins. I obviously don't understand them as well as I should.
<Darmani>
I thought I just needed to require the module I made.
<Darmani>
But that's not it.
radgeRayden_ has quit [Ping timeout: 276 seconds]
ta has joined #ruby
Ishido has joined #ruby
<jhass>
do you know the difference between a method and a function?
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
<Darmani>
No.
pawnbox has joined #ruby
<norc>
Ox0dea: Though I think the issue here is just rather simplistic syntax highlighting on eval.in side.
<norc>
It should be able to highlight the actual string.
<jhass>
Darmani: look it up then ;)
<Darmani>
I guess.
<Ox0dea>
norc: Aye, Vim handles it just fine.
<Ox0dea>
I was pleased to see eval.in doesn't. :)
<jhass>
and if you workshop or whatever throws you into all this claiming it's okay for complete beginners, it's bullshit, should be distrusted and replaced ;)
<norc>
Ox0dea: Im pleased to see eval.in has Ruby 2.3 already. :)
<norc>
Though the whole thing feels completely lack luster already.
Guest63835 has quit [Quit: WeeChat 0.4.2]
chipotle has joined #ruby
<Ox0dea>
Ouch.
solars has joined #ruby
<Ox0dea>
I do think `%d[1 2 3]` and `[1, 2r, 3.14].all?(Numeric)` would've been shiny.
<norc>
Here we go again....
<norc>
:-)
<Ox0dea>
I'll stop, then.
<norc>
No it is fine, I thought about it a good while and you are absolutely right.
Icey has quit [Quit: icey]
<norc>
The second I would see actual use in a lot of places.
<norc>
The first is just, well - it should have been there already.
Icey has joined #ruby
Respek has joined #ruby
<norc>
>> puts(1 if 1)
<ruboto>
norc # => /tmp/execpad-a03929076af6/source-a03929076af6:2: syntax error, unexpected modifier_if, expecting ')' ...check link for more (https://eval.in/497826)
guacamol_ has quit [Ping timeout: 240 seconds]
<norc>
This one is still bugging me. :S
cmolenda has joined #ruby
<jbrhbr>
norc: you mean it's bugging you because you're reading through the parser code to try and understand why?
<norc>
jbrhbr: I think I understand why at this point.
guacamole has joined #ruby
<norc>
Im just a bit scared to actually try and patch it.
<jbrhbr>
:)
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
cmolenda_ has joined #ruby
stannard has joined #ruby
weemsledeux has joined #ruby
skade has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<norc>
I mean it would actually be sweet, since it would make things like: method(arg, {opt: 1} if setting.true?) a bit more readable than wrapping it inside parens.
<norc>
Not that a setting.true? would by itself help with readability, but anyway...
<Ox0dea>
jbrhbr: They're not odd if you use them appropriately. :)
<tubbo>
Darmani: no i meant with the SO article
chouhoul_ has joined #ruby
skade has quit [Ping timeout: 245 seconds]
<Darmani>
oh.
<tubbo>
explains the diff between a method and a function pretty clearly imho
<jbrhbr>
heh, happy new year Ox!
<Ox0dea>
Darmani: Name your module Enumerable. :P
<norc>
Ox0dea: They are just odd in that too many people abuse them, and sooner or later you will work on a project that is just riddled with a mixture of both, filled with parens to "fix" the wrong precedence order...
symm- has quit [Ping timeout: 256 seconds]
<norc>
Which is annoying.
<Ox0dea>
>> 'Happy New Year, #rudy! <3'.bytes.reduce :+
<norc>
tubbo: Oh oh. Is that from ECMA6 and I missed it completely?
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
<norc>
tubbo: I kinda like how that feature is not implemented on any browser yet. :-)
nickjj has joined #ruby
cpup has joined #ruby
skade has joined #ruby
<norc>
tubbo: Anyhow. I stand corrected.
p|p has quit [Remote host closed the connection]
joonty has joined #ruby
daivyk has quit [Quit: Part & Quit]
synthroid has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
<tubbo>
norc: yup :)
<tubbo>
i'm surprised that any of the ES6 features are implemented in any browser
<tubbo>
:P
<norc>
Well, Promises are about the most exciting thing in my opinion.
ta has joined #ruby
Xeago has joined #ruby
karapetyan has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
<tubbo>
i like the class syntax
<norc>
Well its just syntactic sugar.
<tubbo>
but modules are probably the most important thing
<norc>
And the issue with that is is that people will step away from looking at JS as a prototype based language.
<tubbo>
that's my fear as well
jmonreal has quit [Quit: leaving]
chipotle has joined #ruby
mary5030 has joined #ruby
<norc>
Well, Promises by themselves greatly reduce the need to load jQuery, promisejs or your own implementation in half the implementations - just because you want that pattern.
joonty has quit [Ping timeout: 272 seconds]
Rutix has quit []
<tubbo>
norc: did that happen with coffeescript? did people use CS as a classically-inherited language?
<norc>
Well, iterators are absolutely ugly to use in C++ too, but they are useful there too.
<norc>
;-)
minimalism has quit [Quit: minimalism]
<tubbo>
i just wish it was like Ruby wherein all you have to do is mix in a module and define each()
<norc>
tubbo: Also all the magic things like $ itself give you the impression that jQuery modifies the language.
minimalism has joined #ruby
<norc>
But if you understand that $ is just a function object that just acts differently depending on what it gets passed, things are a lot more obvious
skcin7 has joined #ruby
<norc>
Starting developers completely dont understand it and often end up in ##jquery asking all kinds of weird questions.
<tubbo>
i dunno, i never got that impression
<tubbo>
but i can see why one might
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Darin_ has joined #ruby
<norc>
tubbo: Or another common problem is cloning an object.
ur5us has joined #ruby
cmolenda_ has quit [Remote host closed the connection]
<Darin_>
Hey, if I want to call a function in another function as a result of a if/else statement do I just say if x (name of method) else (name of other method)?
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<norc>
darin_: Try it out and see what happens.
<tubbo>
norc: compared to the DOM, jQuery is the greatest API ever made.
nertzy has quit [Quit: This computer has gone to sleep]
<norc>
tubbo: Absolutely. A lot of it has become obsolete due to new features in ECMAScript however.
<Darin_>
I did, but I suck at coding and Im not sure what my problem is. Either way, it's not getting the result I want.
<norc>
But the sheer power of selectors alone just makes me keep it.
<norc>
darin_: Then share us your code and the error message you are getting
<MattV>
I'm trying to optimize an Ansible playbook where the Ruby install is the longest running step (typically 7+ minutes). Any tips for speeding up "rbenv install 2.1.2"?
<eam>
MattV: try profiling it. Is it installing a precompiled ruby?
<norc>
That code reflects what a Module is and how it should be used.
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<eam>
MattV: likely the time is either spent in downloading the stuff to install (in which case, caching the objects will be a big win) or in compiling a custom ruby (is a native prebuilt ruby available for your platform/version target?)
<Darin_>
And when I actually give some arguments, the numbers are way off.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Darmani>
norc: So you can use the same word in different instances?
<Darmani>
That's what it's for?
Diranged has joined #ruby
<norc>
Darmani: Think of it the other way around. It is for mixing common functionality into seperate things
<eam>
MattV: you can do some simple profiling by just watching the output and seeing what happens when, since rvm prints out what it's doing
<norc>
Darmani: Let me modify and show you
<Darmani>
Ok...
pawnbox_ has quit [Remote host closed the connection]
<Diranged>
Hey on an older Ubuntu 12 system, we're installing the ruby-rest-client package which istalls the gem into //usr/lib/ruby/vendor_ruby/restclient .. but we're finding that it doesnt show up in gem list, so anything that depends on it tries to install the latest rest-client package.
<Diranged>
On ubunt 14 (with rubygems-integration instead of rubygems), works fine..
<Diranged>
I know it sucks to support Ubuntu 12, but we hae to right now.. is there a hack to make gem properly see gems in /usr/lib/ruby/vendor_ruby/restclient?
<Diranged>
er .. in vendor_ruby
<MattV>
eam: As far as I can tell, it shouldn't be the download that's taking so long. When I try downloading the https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2 file manually, it typically downloads in less than 30 seconds.
<brendan->
Diranged: can you add that path to the GEM_PATH?
<brendan->
(i'm shooting in the dark)
arup_r has quit []
snockerton has quit [Quit: Leaving.]
ta_ has quit [Read error: Connection reset by peer]
<eam>
MattV: sorry I just noticed you said rbenv not rvm - does it have a verbose mode where it prints out what it's doing?
ta has joined #ruby
bMalum has joined #ruby
<norc>
MattV: You could look into skipping the dev documentations, the whole ri generation thing makes up for considerable time.
<eam>
if so, try piping it through something to attach a timestamp to each line, so you can see where it's spending time. Something like |ruby -ne'puts Time.now.to_s + " " + $_'
mistermocha has quit [Read error: Connection reset by peer]
<Diranged>
brendan-: trid that, no change?
<norc>
MattV: For me a fresh build on trunk usually takes around 2 1/2 minutes on my old macbook air.
Xeago has quit [Remote host closed the connection]
<MattV>
eam: From what I could tell in the documentation, it doesn't have a —verbose flag.
<norc>
Diranged: It is best to not install Ruby things through your package manager at all.
sandstrom has quit [Ping timeout: 256 seconds]
<Darmani>
norc: Okay.
<Darmani>
I think I get it.
<Diranged>
norc: thats not an option for me in this case..
<MattV>
norc: There are NFS mounts on the VM where Ruby is being installed, but I don't think Ruby is installing to one of the NFS mounts. I will double check though. Thanks!
tomchapin has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
ta has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
celly has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
<apeiros>
darin_: you know, if you call the gist .rb, it will properly highlight the code
skcin7 has joined #ruby
<eam>
norc: your macbook air would probably thrash most spinny-disk based servers on compilation time
celly has joined #ruby
<eam>
7 minutes on a hard disk vs 2 minutes on an SSD sounds about right
<Darin_>
??? Not sure I know what you mean.
yes`r has quit [Ping timeout: 240 seconds]
<norc>
eam: spinny what?
<norc>
:-)
<eam>
indeed -- but MattV may have a disk :)
<Darin_>
Oh, never mind. I see now.thanks I'll fix that.
<norc>
eam: Sorry, Ive been using ssds for such a long time now, I have kind of forgotten why I did the change in the first place.
<apeiros>
darin_: and the reason nothing is printed - because you don't call any method which prints anything
<eam>
we no longer run any of our datastore systems on spinning rust, it's just way too slow
<apeiros>
(well, you do: get_temparature, but that only prints if no temperature was given in the args)
<MattV>
eam: I do have an SSD in my host OS (OS X). The Ruby install is happening in an Ubuntu guest. I'm not sure how much overhead VirtualBox adds though.
<eam>
MattV: oh, VM can add a great deal of latency
<apeiros>
eam: aren't you the one working in a shop with >10k servers?
<norc>
eam: Honestly the fix for databases is not SSDs. It is just throwing so much RAM at it that it can hold the entire database in memory.
<norc>
Which granted is more expensive, but *that* provides for real speed,.
<eam>
apeiros: these days I'm working in a much smaller scale operation, but in the past, yes, >100k
<Darin_>
I see that. I am learning that ugly code usually doesn't run right, and if it doesn't "feel" right, it probably isn't. And I added some trash to an if/then nested in the if/then statement and it just messed up.
andikr has quit [Remote host closed the connection]
chouhou__ has quit [Remote host closed the connection]
<apeiros>
oh, even 3 orders of magnitudes more :D
<eam>
norc: except for write heavy loads
chouhoulis has joined #ruby
<eam>
agreed re: caching however
<norc>
eam: Yeah I suppose. Im just a bit biased since most my work was read focused.
Channel6 has quit [Ping timeout: 256 seconds]
<eam>
yeah, I've done read heavy in the past (ad serving, search) and it's entirely as you describe
<norc>
The work related to databases anyway.
<eam>
now I do a lot of transactional stuff
yes`r has joined #ruby
<eam>
a server grade ssd is stupid fast compared to the stuff in a laptop as well
Channel6 has joined #ruby
hobodave_ has joined #ruby
Diranged has left #ruby [#ruby]
asmodlol has quit [Ping timeout: 246 seconds]
<eam>
it's also very nice not having to constantly swap disks out of a huge array
<norc>
eam: Though since I switched things have become much more relaxed. All our databases are stored on a clustered NFS solution for maximum availability (which has still fairly decent throughput, but horrid seek times for obvious reasons).
djbkd has quit [Remote host closed the connection]
<norc>
But they can still be held in memory.
<eam>
yeah, it's always seeks and latency that are the killer
<norc>
Yup
niemcu has joined #ruby
<norc>
I think for us this NFS cluster is actually ideal, since it is a transparent solution to replication which adds 0 maintenance or setup work for us.
asmodlol has joined #ruby
<eam>
well, what do you use to actually replicate the data? A filer or some kind of block level replication?
<norc>
NetApp Filer
<eam>
standard and solid, if expensive :)
Darin_ has quit [Ping timeout: 252 seconds]
hobodave has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
mistermo_ has joined #ruby
<norc>
Yeah. It also serves the VMware images, so it simultaneously provides automatic recovery on everything.
hxegon is now known as hxegon_AFK
<norc>
eam: I must say though, they are worth their money.
<eam>
works great provided your scale is within the i/o performance of a single filer
<eam>
which many, many tasks are
chipotle has joined #ruby
yfeldblum has joined #ruby
<eam>
yeah, outsourcing that kind of complexity is generally worth the cost
<norc>
Yeah. Even things like disk replacement happens completely automatically.
sandstrom has joined #ruby
<norc>
(And we have them on-site)
roshanavand has joined #ruby
<norc>
I was really amazed by their service.
FernandoBasso has joined #ruby
<norc>
eam: How do you have replication set up for your databases?
Macaveli has joined #ruby
<apeiros>
eam: ssd stupid fast compared to laptops - even last gen laptops? iirc apple uses ssds which provide >1GB/s of throughput?
ellistaa has quit [Quit: ellistaa]
<apeiros>
(I have zero knowledge about server ssds - so honest question :D)
<eam>
apeiros: I'm less familiar with desktop products but I believe so
[dmp] has joined #ruby
polishdub has joined #ruby
curses has joined #ruby
mistermo_ has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 246 seconds]
polishdub_ has quit [Ping timeout: 260 seconds]
mary5030 has quit [Read error: Connection reset by peer]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
Coldblackice has joined #ruby
<eam>
the thing about consumer grade ssd is they can't take enough writes to serve a production database
<eam>
unless you have a mostly r/o dataset
Snowy has joined #ruby
mary5030 has joined #ruby
Macaveli has quit [Ping timeout: 260 seconds]
<apeiros>
ah, since consumer grade ssd is probably optimized for read as that's what consumers do most?
[dmp] has quit [Client Quit]
<eam>
it's primarily a matter of how the error correction works, and how much unused capacity the device has to remap failing cells
[dmp] has joined #ruby
<eam>
ssd is essentially a game of "how much extra room did we give you to compensate for the periodic and inevitable wear failures"
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<eam>
hard drives do the same thing with remapping failing sectors (the g-list), but not on the same scale
jbrhbr has quit [Quit: Leaving.]
<eam>
if you get a refurb hard disk don't be surprised if the i/o performance is degraded due to extra seeks from the remapped areas :)
chouhoulis has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
<eam>
no seeks on an ssd so the degredation doesn't tend to degrade performance -- it's just that you eventually run out of cells
jobewan is now known as jobewan_away
chouhoulis has joined #ruby
jobewan_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
A124 has joined #ruby
<eam>
looks like apple ssd claims around 40k iops (vs hundreds for disks) -- and I think the high end fusionios claim 1M
<apeiros>
heh, a slight difference :D
<eam>
that may mostly be due to PCIe though, and maybe apple's using that now
chipotle has joined #ruby
bMalum has joined #ruby
<eam>
going via a drive bus is the bottleneck (which is fantastic, and nuts)
Channel6 has quit [Ping timeout: 256 seconds]
<apeiros>
afaik apple does use PCIe by now, yes
<eam>
maybe they have similar performance now
centrx has quit [Remote host closed the connection]
<apeiros>
they claim "up to 2.0GBps"
<apeiros>
and if they use the right acronym, that's GBytes, not Gbits :)
pawnbox has quit [Ping timeout: 250 seconds]
<apeiros>
I assume a single (or a combination of) IOP reads/writes a chunk of data, so that can't be directly translated
<norc>
apeiros: I got a question. Do you have to use a HTTP proxy for your macbook at work?
bkxd has joined #ruby
bMalum has quit [Client Quit]
<apeiros>
norc: sadly, yes
<eam>
ah yeah, they switched to pcie cards in 2015
<norc>
apeiros: And do have multiple network locations, some with HTTP proxy and some without?
<apeiros>
norc: yes
<eam>
apeiros: that's not far off the PCIe bus limits depending on the configuration. Crazy fast
<norc>
And this surely must be annoying with your bash environment variables
<eam>
Apple's Samsung-made PCIe 3.0 flash card in the 2015 MacBook Pro, which comes with 128GB, 256GB and 512GB and 1TB capacities, went from a PCIe 2.0 x2 (or two I/O lanes) in the previous model to a PCIe 3.0 x4 (four I/O lanes).
<norc>
:-)
<apeiros>
norc: I think I've 4 set up regarding proxies
<apeiros>
http_proxy, https_proxy, ftp_proxy and no_proxy
hxegon_AFK is now known as hxegon
<apeiros>
(with no_proxy of course not mentioning the protocol, because fuck what)
<norc>
apeiros: I just figured out that bash can simply set up a signal handler for USR1. I also found out that fswatch can watch file changes. I also found out which core modules changes when a network location changes. I also found out how to dynamically probe for the highest priority network services proxy..
<norc>
apeiros: Want me to go on? :-)
loren has quit [Ping timeout: 276 seconds]
<apeiros>
ah, you mean that way "multiple network locations"
<apeiros>
in the OS
<norc>
Yeah.
<apeiros>
well, in bash I have a script which pings the proxy and turns on/off the env vars :)
<apeiros>
and which I can trigger manually
<norc>
I just got sick of doing this manually.
<norc>
I figured out how to do this dynamically. Completely. :D
DonOtreply has quit [Quit: DonOtreply]
<norc>
For all active interactive and non interactive bash shells
<apeiros>
mine's too, but probably less elegant than yours, so - gladly will take a look at your solution :D
<apeiros>
ah well, yeah, you have to start a new shell for it to take effect
bMalum has joined #ruby
<apeiros>
(with mine)
<apeiros>
I rarely need it though, since I rarely ever take my work laptop outside work
dn` has quit [Quit: dn`]
karapetyan has quit [Remote host closed the connection]
<eam>
if you're trying to do complex stuff with proxy configuration -- have you looked into writing a proxy.pac?
ellistaa has joined #ruby
<norc>
eam: Nope what is that?
<apeiros>
eam: that's what we use on the OS level, but that doesn't affect bash, or can it too?
<norc>
eam: My main issue is just the env variables for bash. Especially current interactive shells.
<apeiros>
eam: na, it's good for everything which uses the OS settings
<apeiros>
but sadly Terminal.app isn't one of them :(
<norc>
(well and some files for git and curl)
<norc>
apeiros: *bash
<eam>
ah interesting (I haven't done much with it myself, but I've seen others do complex things)
<apeiros>
norc: Terminal.app would be what has to interact with the OS and "update" the running bash process
<norc>
apeiros: Nope.
<apeiros>
at least I don't see a patch to bash specifically for OSX :D
jackjackdripper1 has quit [Quit: Leaving.]
<apeiros>
I mean: yes, you could do it. but that'd be ugly, no?
<eam>
I actually have some code floating around to change env vars in existing bash processes ...
<apeiros>
I'm curious to see your solution, though
<norc>
apeiros: I dont use Terminal.app anyway.
<norc>
iTerm all the way.
<norc>
It is by far the best terminal emulator I have seen on any operating system.
<apeiros>
norc: not using it. had issues with swiss german keyboard layout
<apeiros>
and with problems I mean it crapped its pants
<norc>
That sounds weird.
<apeiros>
might be solved by now, it's been a while
<eam>
I had to patch iterm2 to remove a bunch of bad behavior with ansi escape sequences
<eam>
but it's pretty good otherwise
<norc>
apeiros: I shall wrap it up tomorrow at work then. :)
<apeiros>
norc:
<apeiros>
I think some of my coworkers will be even more happy about this than me :D
<apeiros>
(they take their laptops home more often than I)
<norc>
apeiros: My most important application is cntlm though.
dlitvak has quit [Remote host closed the connection]
<norc>
(Since we are forced behind an NTLM proxy)
<slash_nick>
I thought you were talking about BMC's Control-M
solars has quit [Ping timeout: 260 seconds]
<apeiros>
ah, no ntlm for us I believe
Channel6 has joined #ruby
<norc>
All the unixoid things just dont work with NTLM.
djbkd has joined #ruby
<norc>
Also there is a serious bug with the OSX keychain that messes when you use Safari and Firefox at the same time.
ur5us has quit [Remote host closed the connection]
<norc>
So by using CNTLM you avoid all these headaches.
mistermocha has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
karapetyan has quit [Remote host closed the connection]
ur5us has joined #ruby
karapetyan has joined #ruby
mistermocha has joined #ruby
ta0_ is now known as ta0
<apeiros>
the bug in safari and firefox is only related to ntlm?
<ta0>
will there ever come a day when ruby eliminates tail calls by default? why is that not a thing? recursion seems so natural sometimes
<norc>
apeiros: As far as I know yes.
<norc>
apeiros: And it has interactions with network mounts
<ta0>
also if I create a nested hash with a block that uses &default_proc to nest, the depth to which I can index that hash is dependent on how far the stack will go, right? since it's calling that proc every time?
<norc>
(i.e. if you have smb shares authenticating with the same credentials, things just break all the time and you cannot authenticate)
ur5us has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
<eam>
norc: you use iterm2 yeah? Try running this: echo -e '\033[;i'
aegis3121 has quit [Ping timeout: 240 seconds]
<apeiros>
eam: hacking foreign computers is illegal!!!!!1!!1!elf!
<eam>
;)
<norc>
eam: wtf.
<norc>
Like really. Wtf.
aegis3121 has joined #ruby
<eam>
so once I had a server which happened to be spitting that byte sequence to its console (and thus into my terminal) and I couldn't work on it cuz ... yeah
<eam>
iterm2 added some custom sequences too, identified by the number 1337 ...
mistermocha has quit [Ping timeout: 265 seconds]
<norc>
eam: I looked at it 3 times again, and then looked up and read "iTerm 2 [...] does amazing things".
<norc>
It suddenly became quite comical.
<eam>
it does indeed
<eam>
anyway, some random server somewhere, for some stupid reason, sent that sequence while doing a POST -- which is how I discovered it
<eam>
big WTF day for me that day, let me tell you
<norc>
I can only imagine.
<eam>
but yeah if you want to change someone's iterm theme because they catted your textfile -- that's how to do it
Prominent has joined #ruby
drys has joined #ruby
<adaedra>
it's not an iterm-only feature.
synthroid has quit [Remote host closed the connection]
Zamerick has quit [Ping timeout: 276 seconds]
slash_nick is now known as slash_quit
pawnbox has joined #ruby
blackgoat has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
<eam>
the 1337 codes are
Snowy has quit [Read error: Connection reset by peer]
solars has joined #ruby
mistermocha has joined #ruby
Snowy has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
<drys>
please guys how do i solve this problem. since there is no single video format supported by the web browsers, developing a video streaming site would mean i would encode and upload the same video with three different format..this would consume server space, i have over a 1000 video and each is as large as 1.5gb
mistermocha has quit [Ping timeout: 246 seconds]
codecop has quit [Quit: Išeinu]
ur5us has quit [Ping timeout: 246 seconds]
<Radar>
drys: Upload to Vimeo and embed the Vimeo player on your site?
<eam>
1.5T of space isn't a lot
<eam>
obtaining that kind of storage is substantially cheaper than trying to address the browser codec issue
<norc>
CDN.
<norc>
People need to stop worrying about such things themselves. ;-)
<atmosx>
eam: that sequence prints a document with some gibberish on it?!
<eam>
atmosx: yeah it's the ansi sequence to print the contents of the terminal
<drys>
@Rader, Thanks for the reply. these are actually my dvd movies collection, do you think uploading it to vimeo wont send me to jail
icarus has joined #ruby
<Radar>
drys: lol
<norc>
drys: You will have to ask a lawyer if you want a good answer for this.
<atmosx>
drys: hahahaha
hobodave_ has quit [Quit: Computer has gone to sleep.]
mistermocha has joined #ruby
Jardayn has joined #ruby
ta0 has quit [Ping timeout: 240 seconds]
<norc>
drys: But anyway, people usually place such things into CDNs (like Amazon CloudFlare for example).
<eam>
1.5G for a movie rip, kids these days and their fancy high bitrate encodings
<norc>
It solves issues with availability, storage and performance.
<norc>
And it just works.
hobodave has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
<norc>
*Amazon CloudFront.
<norc>
>_>
<atmosx>
I love how amazon changes the names for everything
_Darin has joined #ruby
<drys>
okay then i will make them all available with the common video format ogg, mp4, webm
<_Darin>
Sorry, to those who I was chatting with earlier... my phone quit working and then I got relieved for the night. So, now I can get back to coding.
solars has quit [Ping timeout: 272 seconds]
atmosx has quit [Quit: Lost in trance]
ur5us has joined #ruby
<norc>
drys: Remember that container is not codec though.
chipotle has quit [Quit: cheerio]
yfeldblum has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
<norc>
_Darin: We can do your chastization now if you have time for it.
<_Darin>
I definitely have time. It's only 1230 am
patchedmonkey has joined #ruby
<_Darin>
haha. The NAVY has my sleep schedule all messed up.
patchedmonkey has quit [Max SendQ exceeded]
<drys>
everything work already with just a single format, now that i will be making the video available in 3 format how do i adjust my database table for the 3 format. do i create column on the movie table for each format?
<Radar>
Go through them. That's a nice gentle introduction to Ruby code.
<Radar>
Darmani: Is that defined in a class or just in that file?
tockitj has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani>
Just in that file.
<Darmani>
The challenge is to recreate methods like "each", "all", "select" etc.
<Darmani>
I got stuck on select lol
ShakAiolia has left #ruby [#ruby]
DoubleMalt has quit [Remote host closed the connection]
<Austneal>
Radar: Thanks! I'll take a look at it
pawnbox has quit [Ping timeout: 265 seconds]
TomyLobo has quit [Ping timeout: 265 seconds]
skcin7_ has joined #ruby
synthroid has joined #ruby
spooq has quit [Ping timeout: 255 seconds]
ESpiney has quit [Quit: Leaving]
skcin7 has quit [Ping timeout: 265 seconds]
firstdayonthejob has joined #ruby
synthroid has quit [Client Quit]
spooq has joined #ruby
<drys>
@Darmani you code actually works
<drys>
i just make a few adjustment
<Austneal>
Radar: Now... what about Visual Studio? Is there a RoR equivalent?
<Radar>
Austneal: I just use Sublime Text 3 and manage just fine.
rodfersou has quit [Quit: leaving]
<Radar>
Austneal: There isn't really a decent code-autocompleter like you'd find in a compiled lang
<apeiros>
*statically typed
<apeiros>
compiled is not too relevant
jbrhbr has joined #ruby
rrichardsr3 has joined #ruby
<apeiros>
beware: pedant at work
<apeiros>
or at large
build22 has left #ruby [#ruby]
<Radar>
pedant detected, dispersing cups of calm the fuck down
<Radar>
^ what helpa would say if I did !pedant
<Radar>
:D
<apeiros>
good thing we shut the smart ass up!
<Austneal>
Who?
<drys>
insert the whole inside an array class like class Array "your code" end save the file as .r b. then require the file in pry or irb or any .rb file.
<apeiros>
but it should dispense calm pies instead :-(
<apeiros>
calm pie girl genius
<apeiros>
whoops
<apeiros>
fucking safari
<apeiros>
copying the search term instead of the url
Jammy_Work has quit [Read error: Connection reset by peer]
gatman has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
<apeiros>
what? of course they would!
guacamole has quit [Ping timeout: 255 seconds]
<apeiros>
drys: that my_each is cheating IMO. for/in uses each, and I think the idea is to not use each, no?
<_Darin>
Sorry, got distracted for a bit. I am trying to get this working. And it works if I don't call any arguments but when I do supply arguments it doesn't call the methods.
<_Darin>
That is obvious. but where and how. It's still based on a condition.
<apeiros>
Ox0dea: modifying the receiver is bad, mkay?
<Ox0dea>
apeiros: Fine.
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
<Ox0dea>
"Iterating once should be enough for anybody."
<apeiros>
_Darin: where do you currently call the methods which print?
<apeiros>
_Darin: as in line X to Y in the gist
<_Darin>
16 - 20
dlitvak has joined #ruby
<_Darin>
if scale == "f" to_celsius
<apeiros>
actually, this looks different from last time
<apeiros>
ok, yes, 16-20. where else?
<_Darin>
22 - 25
<_Darin>
It does, I've been hacking away at it.
poguez_ has joined #ruby
<Darmani>
Ox0dea: wb ^^
jackjackdripper has joined #ruby
<apeiros>
_Darin: ok. now why do 16-20 look different than 22-26?
jackjackdripper has quit [Read error: Connection reset by peer]
<drys>
@apeiros thats true, there was no need of defining the my_seclect
jackjackdripper has joined #ruby
<Ox0dea>
Darmani: How goes it?
<Darmani>
Not bad so far.
karapetyan has quit [Remote host closed the connection]
<Darmani>
It's amazing how taking a break refreshes the mind.
<Ox0dea>
It's called hammock time.
<_Darin>
Because I got frustrated and started hacking.
<Ebok>
Is that conditional on line 22 actually saying if foo else foo?
<apeiros>
_Darin: that's not an explanation.
<Ox0dea>
Ebok: It is. :P
<apeiros>
_Darin: should they look differently?
<Ebok>
Okay, I was just wondering if I was going insane
<Ox0dea>
_Darin: This code works.
<Darmani>
Ox0dea: Hammock time o.o
Snowy has quit [Remote host closed the connection]
<apeiros>
Ox0dea: for a limited definition of "works"
<Ox0dea>
It's redundant all over the place, but it seems to be doing the right thing?
<apeiros>
(check line 23 and 25)
dlitvak has quit [Ping timeout: 245 seconds]
bkxd has joined #ruby
<apeiros>
no, ^
<Ebok>
Who is writing it?
gregf has joined #ruby
Snowy has joined #ruby
<_Darin>
No idea. When I run it with them the same, it only does the celsius conversion.
<Ox0dea>
Oh, I see.
lucasb has joined #ruby
<apeiros>
_Darin: ok, I can't work with that attitude. I suggest you read your own code closely. specifically line 23 and 25. there's more to say about your code, but like that, I'm not willing to invest any time.
pdoherty has joined #ruby
<_Darin>
Ok, I don't mean to offend. Do you mind pointing out where I came across has having a bad attitude? Seriously not knowing.
<Ox0dea>
I didn't see it either.
<apeiros>
_Darin: you don't leave the impression of even trying to put any effort in it. you come across as having to do some homework assignment and being pissed about it and preferably just getting a solution handed on a silver platter.
<_Darin>
And if I did, it's because I have been awake for a LONG time.
<Ox0dea>
_Darin: Count the number of occurrences of "fahrenheit" in your program, then do the same for "celsius".
<Ebok>
You know that they're literally telling you what lines to look at Darin
<Ebok>
At least, as a start
<Darmani>
Ox0dea: lmao
aadam21 has quit [Remote host closed the connection]
<apeiros>
it's your code, you should know whether line 16-20 should look the same as line 22-26 (and yes, they totally should look the same, and they don't, and the bug is related to that)
Snowy has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 250 seconds]
<Ox0dea>
Darmani: The transcript, in case video's not your bag: http://git.io/vu0dX
<_Darin>
I've fixed it since then.
<Darmani>
That's a 40 minute video about the benefits of taking a break?
aadam21 has joined #ruby
<apeiros>
ok, maybe the vibe I get is from you being tired. but then do everybody a favor and get rest. ask again when you're fresh.
<Ebok>
I remember this video!
<_Darin>
I just forgot to update the gist
<Ox0dea>
Darmani: Taking a break to think deeply.
<lucasb>
Hello again. I really like the shortcut [...].map(&:foo). Anyone knows if there's a shortcut for [...].map {|x| foo(x) } ? ie. calling foo as a "function" and passing the element as argument
<Darmani>
Ox0dea: Hm. Okay.
<apeiros>
lucasb: there's gems trying to provide it, but with ruby itself, only in a limited and ugly fashion.
themsay has quit [Ping timeout: 240 seconds]
<apeiros>
lucasb: e.g. .each { |x| puts(x) } -> .each(&method(:puts))
<lucasb>
apeiros: oh, cool, not so ugly after all :) really thanks!
ss_much has joined #ruby
<_Darin>
This the updated gist
<apeiros>
lucasb: lol, k, you and me, we've got a different opinion on ugly then ;-)
<apeiros>
_Darin: that program works
<lucasb>
Ox0dea: thanks!
DonOtreply has joined #ruby
<Ox0dea>
lucasb: Happy to help.
dlitvak has joined #ruby
bkxd has joined #ruby
pawnbox has joined #ruby
<_Darin>
Maybe I am trying to get it to do something it can't do then.
<apeiros>
hm, wait…
<Ebok>
How about you tell me what your goal is out fo get temperature
<_Darin>
I have it working so that when I keep the arguments nil it will function properly. But if I supply arguments, it only runs the to_celsius conversion.
atomical has joined #ruby
<Ebok>
Ah
dlitvak has quit [Remote host closed the connection]
<_Darin>
no matter if I supply a "f" or a "c" as a scale argument
ramortegui has quit [Read error: Connection reset by peer]
<Darmani>
The logic required for this method hurts my brain lol
<_Darin>
correct.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_Darin>
I bet. I am struggling as well
<Ox0dea>
Darmani: How come?
<drys>
just got back, what is the problem with the code
<Darmani>
Because... It's like backwards lol
<Ox0dea>
Darmani: *inverted
<Ebok>
Its trying to do many thing at the same time
<Darmani>
yeah.
<Ebok>
So its intent is murky, and its bugs are submerged
<_Darin>
in english I want it to say. If they are nil get the temp and scale if they are supplied then run to_celsius if the scale argument is c and to_far if the scale argument is f
<Ox0dea>
Darmani: In that particular case, `false if` is a lot clearer than `true unless`.
<_Darin>
Does that make sense?
<apeiros>
oh dear
einarj has quit [Remote host closed the connection]
<apeiros>
_Darin: use @scale
<apeiros>
_Darin: or self.scale
dstarh has joined #ruby
<Ebok>
lol
pawnbox has quit [Ping timeout: 264 seconds]
<_Darin>
haha... ok.
<Ebok>
Wow, I wasnt even looking there
<Ebok>
Nice
<Darmani>
Ox0dea: That's hard to picture...
<Darmani>
I think I know what you're saying though lol
kadoppe has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 276 seconds]
<Ox0dea>
Darmani: `unless foo` is literally just `if !foo`.
janebootydoe has joined #ruby
<apeiros>
_Darin: oddity in the parser. your scale= assignment on line 15 means the whole function has scale as local variable
<apeiros>
(not really an oddity, though)
<Darmani>
Ox0dea: Alright, thanks.
<apeiros>
i.e. scale in line 22 is reading an unset lvar, which means it has the value nil
chipotle has joined #ruby
<Ox0dea>
Darmani: In your defense, that use of `unless` was totally uncalled for.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani>
Ox0dea: If that's a joke I don't get it. Lol
<Ox0dea>
It wasn't.
kadoppe has joined #ruby
<Darmani>
ah.
<Ox0dea>
`unless` can be murky, as was the case there.
DEA7TH has joined #ruby
<Ox0dea>
Also, Line 3 is wrong. :P
<_Darin>
So they should all be @scale?
<Ebok>
Do you know what @scale means as opposed to scale?
<apeiros>
_Darin: all except line 6 on the right side of the =, yes
nertzy has joined #ruby
dstarh has quit [Client Quit]
<_Darin>
@scale is the instance variable and scale would be a local variable to the method that I am working on.
<Darmani>
Ox0dea
<Ox0dea>
Darmani
<Darmani>
oops
<Ox0dea>
spoo
<Darmani>
Ox0dea: How is that wrong? lol
<apeiros>
_Darin: the next step would then be to have line 16-20 not be repeated. if you call code in both the `if` and the only `else` at the end, it probably doesn't belong in there.
<Ox0dea>
Darmani: What does #none? do?
<Darmani>
It returns a boolean.
<Ox0dea>
How does it go about that?
jackjackdripper has quit [Quit: Leaving.]
<Darmani>
With the block given to it.
<apeiros>
_Darin: and the step after that would be to only ask for @scale when it's set to nil. not when @temperature is set to nil (which is unrelated to @scale)
mistermo_ has joined #ruby
<_Darin>
So, what I thought was a simple project is ballooning quite rapidly. haha.
<Ox0dea>
Darmani: English, please.
aadam21_ has joined #ruby
lxsameer has quit [Quit: Leaving]
<Darmani>
Ox0dea: that's not English? Lol
<Darmani>
xd
<Ox0dea>
Darmani: What does #none? tell you?
roshanavand has quit [Remote host closed the connection]
<apeiros>
_Darin: it can be written in much less code
rwy has quit [Quit: Page closed]
<Darmani>
That... None of the elements pass for true with the block given to it.
<Ox0dea>
Darmani: Precisely.
<Darmani>
...
<Darmani>
so?
<_Darin>
There is some sort of code already written for temperature conversion I think right?
<Ox0dea>
_Darin: So why're you having trouble seeing why Line 3 is wrong?
<Ox0dea>
Darmani: ^
<Ox0dea>
_Darin: Yes, it's called arithmetic.
<Darmani>
Obviously the opposite "false" must appear if the elements do appear in the block.
<Darmani>
Ox0dea: Okay so in plain English.. You're saying that if the element appears in your block... then you return false... right?
einarj has joined #ruby
zenlot1 has joined #ruby
<Ox0dea>
Darmani: Yeah, since in that case #none? doesn't hold.
<Ox0dea>
At least one element fails to fail to satisfy the predicate. :P
blacknicker has joined #ruby
<Darmani>
yeah. That makes more sense than what I wrote.
<blacknicker>
hi
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Get 'im!
<blacknicker>
what is the difference between a hash and an object?
<Darmani>
blacknicker lmaooo
<apeiros>
lets see
<Darmani>
that's great.
<_Darin>
Man, this is really kicking my butt. I now have it to ask specific questions based on which argument is missing. But everytime as soon as they are both given it shoots straight for only the celsius conversion.
zenlot has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
<shevy>
blacknicker hmmm weird nick you have there
<_Tariq>
How many people here know the ruby-parse-client gem?
<Radar>
?used
<ruboto>
Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
<_Tariq>
Ah, thanks ruboto.
<_Tariq>
I apperciate it.
<_Tariq>
Though I wonder why do you always need a human to prompt you first before you can give advice.
djbkd has quit [Remote host closed the connection]
<baweaver>
pontiki: ...is it bad I've done something similar to that? Someone cut one of our ethernet lines while screwing with the ceiling and I did in fact say something about uptime.
djbkd has joined #ruby
einarj has quit [Remote host closed the connection]
<Radar>
_Tariq: If we let the robots think for themselves then we have lost.
dlitvak has quit [Remote host closed the connection]
<Ox0dea>
Sorry, Dave.
<eam>
Radar: but we are all meat robots
jgpawletko has joined #ruby
pandaant has quit [Remote host closed the connection]
minimalism has joined #ruby
<baweaver>
HK47 would be proud
FernandoBasso has quit [Quit: Leaving]
bkxd has joined #ruby
webhat has joined #ruby
malconis has joined #ruby
jgpawletko has quit [Client Quit]
dbugger has joined #ruby
<dbugger>
Hello guys. Can someone tell me, with Nokogiri, how can I select <img> here? http://laravel.io/bin/aNxVB
Yzguy has joined #ruby
jackjackdripper has joined #ruby
Yzguy has quit [Max SendQ exceeded]
jobewan is now known as jobewan_away
bkxd has quit [Ping timeout: 240 seconds]
<apeiros>
dbugger: what have you tried?
jobewan_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dbugger>
apeiros, .css("img")
<Radar>
dbugger: Show us the full code of what you've tried please.
<apeiros>
and your problem with that approach?
<dbugger>
Well, it gives me .length == 0
<dbugger>
Basically, it does not find it
<apeiros>
dbugger: then you're leaving something out.
dlitvak has joined #ruby
_Tariq has quit [Remote host closed the connection]
<apeiros>
ah, no, you don't
dlitvak has quit [Remote host closed the connection]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
I didn't see the nested xmlns
<apeiros>
you have to specify the namespace.
dlitvak has joined #ruby
<dbugger>
That is the problem. Im not that familiar with XML, more with HTML
<zotherstupidguy>
i dont know the diff between a method and a func in ruby!! internet say fun belong to object and method not, but isnt things written out of classes belong to main object?
baweaver has quit [Read error: Connection reset by peer]
<dbugger>
I see... lets try..
malconis has quit [Ping timeout: 255 seconds]
<Radar>
zotherstupidguy: how do you define a function in Ruby?
<zotherstupidguy>
i do def Somthin
<apeiros>
zotherstupidguy: the only true "functions" in ruby are procs/lambdas
<apeiros>
toplevel methods are pseudo-functions
<dbugger>
LOVELY! Thanks guys!
<apeiros>
?guys dbugger
<ruboto>
dbugger, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<zotherstupidguy>
ohh, cool
aegis3121 has quit [Ping timeout: 260 seconds]
krobzaur has quit [Ping timeout: 245 seconds]
<apeiros>
implicit xmlns should be forbidden. so easy to miss :(
<apeiros>
(not being serious there)
niotoan has joined #ruby
zenspider has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dlitvak has quit [Remote host closed the connection]
KnownSyntax has joined #ruby
patchedmonkey has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
asmodlol has quit [Ping timeout: 272 seconds]
_Tariq has joined #ruby
Austneal has quit [Ping timeout: 252 seconds]
<_Tariq>
How do you delete a user in Parse-Ruby-Client? When I call parse_delete on the user, I get the "Parse::UserCannotBeAlteredWithoutSessionError" error
karapetyan has quit [Remote host closed the connection]
<Radar>
_Tariq: Looks like you'll need to create a session first.
<_Tariq>
...yeah, I'll see if I need to do that
<_Tariq>
But since you are already authenicated
<_Tariq>
Well, no
<_Tariq>
not authenicated as that specific user
RegulationD has quit [Remote host closed the connection]
guacamo__ has quit [Ping timeout: 240 seconds]
[Butch] has quit [Ping timeout: 255 seconds]
guacamole has joined #ruby
domgetter has joined #ruby
karapetyan has joined #ruby
wolffles has joined #ruby
<wolffles>
sup yall
<apeiros>
awesome games done quick
dlitvak has joined #ruby
emilford has quit [Quit: Lost terminal]
guacamol_ has joined #ruby
freerobby has quit [Quit: Leaving.]
guacamole has quit [Ping timeout: 272 seconds]
guacamol_ has quit [Client Quit]
guacamole has joined #ruby
<wolffles>
how come( 2.times do array[rand(array.length)] end ) doesnt work?
<apeiros>
it does work
<apeiros>
what should it do?
<wolffles>
return 2 random values from an array = [1.. 5]
<apeiros>
that it won't. because 2.times always returns 2
<apeiros>
that's the definition of Integer#times (return the receiver)
axl_ has quit [Quit: axl_]
<apeiros>
Array.new(2) { … }
<Radar>
wolffles: are you try to be intentionally obfuscating that code?