<baweaver>
can you describe the problem in a sentence?
<baweaver>
not the output, not the method of generation, not an example. Just the problem itself
niemcu has joined #ruby
rubyaw has joined #ruby
rubyaw has quit [Client Quit]
konr has quit [Quit: Connection closed for inactivity]
vigintas has quit [Ping timeout: 260 seconds]
<bigmac__>
there is a part in my loop that is ran over and over, then multiplies it self then becomes unstable...
<baweaver>
bigmac__: what is the issue you are trying to solve with this code?
<bigmac__>
like trying to read array[100000000]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver>
the problem that you are attempting to code for
bollullera has left #ruby [#ruby]
<bigmac__>
its just for fun
<baweaver>
that's great
<baweaver>
but what are you trying to do?
<baweaver>
you keep telling me parts of your solution
<Ox0dea>
bigmac__: Is this still to do with strings of binary?
<bigmac__>
yes
<bigmac__>
just part of my examples
<baweaver>
now we're getting closer to the base problem
<bigmac__>
lol
pwnd_nsfw has quit [Ping timeout: 246 seconds]
<bigmac__>
i think about this stuff all day
<baweaver>
I can only ask so many times in so many different ways bigmac__
<bigmac__>
well, sometimes its embarrassing to share my ideas,
<bigmac__>
lol
<baweaver>
....so you share your solution but not the base problem?
<Ox0dea>
> base problem
<Ox0dea>
pelican.jpg
workmad3 has joined #ruby
<bigmac__>
you guys have a way of looking at my ugly function's, and show me a much better way
<baweaver>
!xy
<baweaver>
?xy
<ruboto>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<bigmac__>
i tend to take the long way to get somewhere, turns out... there is a one liner to replace my 12 lines
<bigmac__>
thanks for your help... i have to go
rideh has quit [Ping timeout: 250 seconds]
<baweaver>
bigmac__: next time help us help you. When we ask for something, there's a reason for it.
<bigmac__>
,-)
* baweaver
sighs
bricker has quit [Ping timeout: 240 seconds]
gregoriokusowski has joined #ruby
ekinmur has joined #ruby
keen__________ has joined #ruby
bigmac__ has quit [Remote host closed the connection]
keen_________ has quit [Ping timeout: 272 seconds]
<pipework>
havenwood: I'm waiting for chauffeur-driven development.
<eam>
baweaver: no limit - I'd switch away from ruby when I need more efficiency (can't fit in my fixed-size OS container) not necessarily due to any limit
h99h9h88 has joined #ruby
<pipework>
It's kinda like pairing, but one person just says what they want done and then the other person does it while the first doesn't even really pay attention.
<eam>
baweaver: I've certainly processed huge datasets in ruby before (100s of gigs)
<pipework>
Maybe I just have a secret yearning for enterprise development, and I'm hiding that fact from myself.
<baweaver>
I'd probably switch to JRuby at least by that point.
<baweaver>
then again I get impatient
<havenwood>
Matz said he was surprised to learn that Ruby was being used in supercomputing.
<eam>
I mean, I've used regular old grep on datasets that big too
<pipework>
eam: why no ack, ag, or sift?
<havenwood>
pipework: now sift i don't know
<pipework>
mmm sift
<eam>
pipework: I use ag on osx where grep is terrible, but gnu grep's roughly the same speed
<pipework>
havenwood: In 99% of cases: sift > ag > ack > grep
<eam>
every tool has odd implementation limits
<havenwood>
pipework: ooh, colors!
<pipework>
And some are just slow except that one odd case where it outperforms all the otherwise fast things.
<havenwood>
pipework: :D
<pipework>
havenwood: Yeah!
<pipework>
purty ones by default.
<eam>
I use whatever's easiest in terms of my time while still being acceptably fast
<pipework>
eam: sift has the easiest interface, but is also compatible with ag and ack as far as I can tell.
<pipework>
havenwood: sift + parallel is great.
startupality has joined #ruby
<havenwood>
pipework: i like the sound of that
* pipework
loves gnu-parallel
mollusk_ has quit [Remote host closed the connection]
<baweaver>
My definition of acceptable time taken is a fairly short chain
diegoaguilar has quit [Remote host closed the connection]
<eam>
generally, optimizing only makes sense if you're building something repetitive (like a periodic search, or code in a query path)
<pipework>
baweaver: Yet you spend hours figuring out why spark is faster and better than other things. :p
<pipework>
eam: Egh, when the tool itself is more or less a swap-in with a few small changes you get used to after a couple times using it, it's just better.
<baweaver>
^
<eam>
well sure
<pipework>
Investment of switching from grep to sift is small, but larger than ag or ack to sift which is really small.
<eam>
but the benefit of switching is also small
<eam>
(unless you're on a system with a crippled grep)
<pipework>
My time and happiness with the speed in which my tools perform is something I value greatly.
<eam>
yeah but gnu grep is roughly as fast as ag
<pipework>
And sift is much faster than both!
<havenwood>
lack of portability of grep flags is an argument for fleeing itself if portability is needed
Nanuq has quit [Ping timeout: 264 seconds]
<eam>
havenwood: all the world's a gnu
<havenwood>
eam: gnoooo
bricker has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
<eam>
what's sift doing to get that much faster?
<pipework>
I have no idea at all, I'm assuming human sacrifice.
Igorshp has quit [Remote host closed the connection]
<eam>
address space is cheap, the VM will map pages in and out as needed (it's doing that in the filesystem cache anyway on big search jobs)
djellemah has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
<pipework>
eam: would mmap be usable for really large datasets?
willardg has quit [Client Quit]
<eam>
pipework: yeah, I've worked a bunch with mmap'd huge k/v stores (tens of gigs) based on https://github.com/yahoo/mdbm
<eam>
you can mmap essentially any file smaller than your pointer size (modulo reserved address space)
<eam>
and even then, you'd just do multiple maps if you needed larger -- say if you're on 32bit
<eam>
you'd mmap every 2G or so
<EllisTAA>
it actually might be working …
<pipework>
So I could safely just always use the mmap option with grep?
h99h9h88_ has quit [Remote host closed the connection]
<eam>
pipework: as long as you don't mind an occasional segv if a file gets truncated while you're interacting with it
<eam>
;)
jgpawletko has joined #ruby
l_tonz has joined #ruby
symm- has joined #ruby
aep has quit [Ping timeout: 240 seconds]
<eam>
calling read() after a truncate just returns nothing -- but addressing memory after a file shrinks turns into an illegal access
<eam>
totally fine on static files though
<eam>
(and even then, if a file truncates while you grep it you're gonna get BS anyway)
<eam>
btw when I say faster it's less than 1% soooo just use sift if you like it
<eam>
kinda amazing that a go app is getting that kind of speed to be honest
EllisTAA has quit [Quit: EllisTAA]
knamehost has joined #ruby
craysiii has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 268 seconds]
n008f4g_ has quit [Ping timeout: 250 seconds]
EllisTAA has joined #ruby
rshetty has joined #ruby
<pipework>
I'll look more into that mmap thing. I mean, I know grep options. sift has nicer interface if I were to learn either grep or sift from scratch.
raazdaan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<eam>
I bet if someone added the parallelism into gnu grep it'd get significantly faster than sift -- but unless it's >2x I don't care much
txdv has left #ruby [#ruby]
<eam>
... I take that back, most of sift is just Cgo and inlined C
northfurr has quit [Quit: northfurr]
marr has quit [Ping timeout: 250 seconds]
<havenwood>
it seems i usually end up turning to mdfind or locate the second grep and friends are slow
<pipework>
eam: Whale, in-file parallelism or would gnu parallel be enough?
<eam>
well, a tantalizing thought while it lasted
<eam>
pipework: I suspect adding parallelism by any means would do it
jdawgaz has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
<pipework>
eam: You're sure you didn't see any human sacrifice in the source?
<eam>
the details probably matter less as the dataset grows in size
blackmesa has quit [Quit: WeeChat 1.3]
<eam>
maybe some day safe languages will be fast *eyes rust*
bricker has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
raazdaan has joined #ruby
<pipework>
life is such
RobertBirnie has joined #ruby
mag42c has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
s00pcan has quit [Ping timeout: 272 seconds]
Thomas-0725 has joined #ruby
cyle has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
EmeraldExplorer has joined #ruby
inteq has joined #ruby
DenSchub has quit [Read error: Connection reset by peer]
DenSchub has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ss_much has quit [Quit: Connection closed for inactivity]
jgpawletko has quit [Quit: jgpawletko]
RegulationD has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 264 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick>
i found in ruby the Constants and Static Variables are nearly the same
Oatmeal has quit [Ping timeout: 240 seconds]
<c_nick>
u can reinitialize the constants and all it does is throw up a warning while Static by definition needs to have the capability to reinitialize just wont require an object / class instance
moeabdol has joined #ruby
finisherr has joined #ruby
Nanuq has joined #ruby
<Ox0dea>
c_nick: Could you give an example of your interpretation of "static variable"?
rshetty has quit [Remote host closed the connection]
Bloomer has joined #ruby
aspiers has joined #ruby
baweaver has joined #ruby
<c_nick>
static as in like C++ - class variables
FungalRaincloud has joined #ruby
Oatmeal has joined #ruby
<c_nick>
so in ruby thats @@
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
shinenelson has quit [Quit: Connection closed for inactivity]
<Ox0dea>
Ah, yeah, that's probably the best analogy.
<c_nick>
Ox0dea: your scaring me now :P
<Ox0dea>
Hm?
favadi has joined #ruby
<Ox0dea>
"wont require an object" threw me a little.
_blizzy_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
In a sense, class variables are instance variables on singleton classes, but we can't instantiate those, so the relationship doesn't actually exist.
arescorpio has joined #ruby
<c_nick>
Ox0dea: yes.
SenpaiSilver has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Oatmeal has quit [Ping timeout: 240 seconds]
<Ox0dea>
c_nick: How do you figure class variables "need to have the capability to reinitialize" by definition?
roxtrongo has quit [Remote host closed the connection]
<Ox0dea>
There must be a good reason for that signature, but it's shitting in my cereal right now.
<c_nick>
Ox0dea: for me a constant is something i cannot modify or should not modify which a class variable can be re assigned different values if required. I will use a class variable for URLS (which can change later on) but a constant would be like a REGEX or something similar (though this may change too but seldom chances)
solocshaw has quit [Ping timeout: 240 seconds]
nsuke has quit [Read error: Connection reset by peer]
<Ox0dea>
c_nick: Sure, that's a decent grokking of the thing, but your wording was a little strange.
moeabdol has quit [Quit: WeeChat 1.3]
benlieb has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
<c_nick>
hehe yeah i type in a hurry i should read before pressing enter :D
gregf has quit [Quit: WeeChat 1.3]
<eam>
a constant "shouldn't change" in ruby just like a constant "shouldn't change" in C++
<eam>
in that it's possible in both, though ill-advised :)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cmoney has quit [Remote host closed the connection]
FungalRaincloud has left #ruby [#ruby]
FungalRaincloud has joined #ruby
hmsimha_ has joined #ruby
raazdaan has joined #ruby
raazdaan has quit [Client Quit]
<devbug_>
does a dsl for defining objects + relationships (i.e. collections, collections-thru, etc.) exist completly detached from the idea of databases?
<devbug_>
to rephrase, I want to compose objects with properties and in hierarchies to stay DRY
<devbug_>
my deep trawls have yet to produce anything remotely similar to what I described
<devbug_>
the closest, which is still far away, is datamapper--if that makes any sense
<Ox0dea>
baweaver: Well, don't go running it and spoil the surprise. >:)
chrissonar has joined #ruby
<agent_white>
baweaver: You must be. I was thinking about when we were talking about 1 == 1 == 1... 15 or so hours ago. Two days of no sleep is probably not good.
<baweaver>
it'll take me a while
<Ox0dea>
There's... considerable weirdness going on in there.
<Ox0dea>
I almost shit when I realized I needed a W.
<Ox0dea>
But then I just tacked it on, shifted some thangs around, and all was well.
dhjondoh has joined #ruby
tlarevo has quit [Remote host closed the connection]
last_staff has joined #ruby
tlarevo has joined #ruby
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
nemo__ has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
nemo_ has quit [Ping timeout: 268 seconds]
<baweaver>
send as a callable proc
<Ox0dea>
Praised (blamed?) be Mon_Ouie.
subscope has joined #ruby
maletor has quit [Ping timeout: 256 seconds]
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
last_staff has quit [Quit: last_staff]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
I also hoped that #not_found being the only route would work as a catch-all without having to explicitly redirect, but it's good that it doesn't.
<baweaver>
at the routes
rshetty has quit [Remote host closed the connection]
<Ox0dea>
> routes
<baweaver>
well, GET /
skade has joined #ruby
tagrudev has joined #ruby
yfeldblum has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
<Ox0dea>
The original marble did have several routes, but I don't mind my food touching.
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rshetty_ has joined #ruby
<baweaver>
getting the params from the binding receiver
dionysus69 has quit [Quit: dionysus69]
<baweaver>
not sure about the :_
last_staff has joined #ruby
<Ox0dea>
That'd be the param.
<Ox0dea>
You're dangerously good at this...
l_tonz has joined #ruby
Pupp3tm4st3r has joined #ruby
<baweaver>
send delete_at to the array with true with param as an integer
<baweaver>
(not sure what that does yet)
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
kerunaru has joined #ruby
<Ox0dea>
Not sure whence came `true`.
<baweaver>
$__
<baweaver>
[true]
<baweaver>
isn't $. 0?
ta has quit [Remote host closed the connection]
<baweaver>
...did I do that backwards too
<Ox0dea>
$. is 0 where you're reading, yes.
<baweaver>
so an array of false
skade has quit [Read error: Connection reset by peer]
rshetty_ has quit [Remote host closed the connection]
skade has joined #ruby
<baweaver>
so if the param is 0 it does something, otherwise redirects back to root with more items
<trash>
The between is slightly easier to read though (except the 1659 thing) because of using slightly less syntactic sugar.
jcp has quit [Read error: Connection reset by peer]
jcp has joined #ruby
braidn has quit [Ping timeout: 255 seconds]
<Ox0dea>
trash: It's true enough that #between? is more intention-revealing in this case, but there was no sugar in my suggestion.
Gnubie_ has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 260 seconds]
sindork_ has quit [Ping timeout: 240 seconds]
<trash>
Ox0dea: Depends on whom you are asking :-) I think the (x...y) might count as syntactic sugar.
<Ox0dea>
*who
<trash>
(always wrong about that)
<Ox0dea>
That's just how to create Ranges in Ruby, though...
<adaedra>
Isn't it syntaxic sugar for Range.new ?
Gnubie_ has joined #ruby
<Ox0dea>
Well, but, come on.
<ddv>
syntaxic? :p
<Ox0dea>
>> 9..16 === Time.new.hour # trash: This is the "sweet" approach, but wipe it from your memory.
<ruboto>
Ox0dea # => bad value for range (ArgumentError) ...check link for more (https://eval.in/459103)
sindork has joined #ruby
<Ox0dea>
The precedence of `..` is the worst thing ever.
rshetty has joined #ruby
<trash>
Ox0dea: Thanks for further input :)
felixr has quit [Ping timeout: 246 seconds]
g3funk has joined #ruby
rshetty has quit [Remote host closed the connection]
phatypus has joined #ruby
<Ox0dea>
trash: Sure thing. Just as something to file away, `===` is the "case equality" operator; it's the "equals on steroids" that makes Ruby's `when` clauses so nice, but you're advised against using it outside of that very narrow scope.
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
(Because tradition or something.)
<shevy>
he likes to suggest things you should not use!
<Ox0dea>
^
<Ox0dea>
It's like reverse psychology.
bMalum_ has joined #ruby
beauby has quit [Ping timeout: 252 seconds]
rshetty has joined #ruby
<trash>
This talk was the classical moment how people know IRC and love. :D
<trash>
It's rather a matter of how fast this notebook and the other server is.
cjk101010 has quit [Ping timeout: 268 seconds]
rshetty has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 252 seconds]
<apeiros>
thanks @ trash
<apeiros>
and you work in berlin?
rshetty has joined #ruby
arup_r has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<trash>
and live and was born
joncol has joined #ruby
<apeiros>
and now you throttle connection between 9:00 and 17:00? :D
juanpablo__ has quit [Ping timeout: 268 seconds]
rshetty has quit [Remote host closed the connection]
<trash>
We share the connection between all the customers in this house too
<trash>
Like 1000 people I guess
<adaedra>
apeiros: it's all about being efficient.
<trash>
Oh, misread your question
leafybasil has joined #ruby
<apeiros>
I was just kidding
<trash>
apeiros: No, the code is used to send SMS sensu notifications for some new kind of setup only between 9x5
<trash>
;)
<joncol>
Hi, Is there a way to convert a method to a proc and later using instance_eval to run this proc with another `self`? When I try using `p = obj.method(:fun)`, and call it with `another_obj.instance_eval(&p)`, the `self` in `fun` is still `obj` and not `another_obj`...
<Ox0dea>
The Method class has #to_proc, but UnboundMethod does not. :<
zotherstupidguy has joined #ruby
<trash>
When I'm already here. What is the best way to write the condition: when a settings['notifications'] hash has nine_to_five value and that value is true, do something? settings['notifications'].include? 'nine_to_five' and settings['notifications']['nine_to_five'] == true can be probably shortend.
<apeiros>
just use settings['notifications']['nine_to_five'] == true
<joncol>
Ox0dea: Thanks!!
<Ox0dea>
joncol: Sure thing.
<apeiros>
if the hash doesn't have that key, it'll be nil
leafybasil has quit [Ping timeout: 265 seconds]
<apeiros>
which is not == true
<trash>
Doesn't seem to work. NoMethodError: undefined method `[]' for nil:NilClass
xaa has left #ruby [#ruby]
<apeiros>
that means settings does not have ['notifications']
<trash>
Ah wait, missed that in irb.
<apeiros>
and then settings['notifications'].include? 'nine_to_five' won't work either
<trash>
Yeah, works.
<trash>
Thanks.
astrobunny has quit [Ping timeout: 268 seconds]
<joncol>
Ox0dea: but it seems the object that you bind to must be a kind_of? the method's original class... That seems a severe limitation? I basically don't use any of my surroundings in the method, so I expected it to be possible to execute it in another context.
<Ox0dea>
joncol: It sounds like you might be going about $thing the wrong way; say a little more about what you're trying to do?
<Ox0dea>
Do you know about #send?
<apeiros>
joncol: yes, it is a severe limitation. the question is why it is a method in the first place if you don't use the receiver.
tvw has joined #ruby
rbowlby has quit [Remote host closed the connection]
stardiviner has joined #ruby
hyperdrive has quit [Ping timeout: 255 seconds]
teclator has joined #ruby
BadRobot has joined #ruby
mdst has joined #ruby
<joncol>
Ox0dea: I'm doing an RPC server thing, where I want to register callbacks that should be invoked when an RPC call is received. I pass these callbacks in as blocks to the `register` function. But for esthetical reasons I want to have the callbacks be ordinary methods in a class. Everything worked fine when passing in the callbacks using `&method(:name)`, but I now got the added requirement that I need to acces
<joncol>
s the RJR Request object inside my callbacks (to get a hold of the client's IP). Thus I thought a nice solution would be to rebind `self` to the Request object, to access its instance variables.
dionysus70 has joined #ruby
hyperdrive has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
<Ox0dea>
Probably better to use that than sticking things where they mightn't belong.
astrobunny has joined #ruby
zwdr has joined #ruby
vigintas has joined #ruby
bluOxigen has joined #ruby
jenrzzz has joined #ruby
<joncol>
Ox0dea: OK, I'll look into that.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea>
joncol: That Ruby doesn't let you stick any ol' object in some other object's context is scarcely a "severe limitation"; I suspect it has saved many a foot.
<joncol>
Ox0dea: It seems a bit strange, since Ruby lets you do almost everything else :)
<Ox0dea>
joncol: I think I see more or less where you're coming from and what you're going for, but your aesthetic considerations throw a proverbial spanner into the works.
<Ox0dea>
It's like really aggressive inlining or something.
dionysus69 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 252 seconds]
<joncol>
Ox0dea: Well, I guess a solution for my problem would be to define the callbacks as "free" Procs, and then call them with whatever `self` fits. Just feels a bit ugly to have all those procs "laying about" at the point where I define them.
<Ox0dea>
joncol: Aye, I was just about to suggest something along those lines.
hmsimha_ has quit [Ping timeout: 265 seconds]
<shevy>
I shall call Koichi Sasada Mr. Speed henceforthwith and Nobu the patch monster
Pupp3tm4_ has joined #ruby
<Ox0dea>
Procs are mighty nifty, but they're really not where you should be sticking all your behavior in an object-oriented language.
tlarevo has quit [Read error: Connection reset by peer]
<shevy>
I wonder if Ox0dea is ever writing code that he also uses
<shevy>
I know he has written about unicode snowmen before. or it was adaedra. or both
Rickmasta has joined #ruby
<cyanide7>
shevy: Why write code when you can just copy and paste stackoverflow?
<shevy>
:D
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
<cyanide7>
"I swear it's mine."
<Ox0dea>
shevy: I'm running all kinds of code I wrote to use this very moment.
<Ox0dea>
"Write once, run all day."
<adaedra>
shevy: unicode snowman is mine, yes.
<Ox0dea>
shevy: Rugen does much more than snowmen, mind; it's just that trio was a really good example.
<adaedra>
that's a bad joke that went way to far.
ICantCook has quit [Ping timeout: 244 seconds]
<Ox0dea>
I don't think it's funny that Ruby doesn't have named Unicode. :<
<shevy>
lol
<cyanide7>
Is anyone else caught in the issues of writing something to make a job easier, but it turns out that the time to write it takes longer than all the future time it would save?
<shevy>
it ain't over until we have a game with unicode snowmen
<adaedra>
shevy: code it.
<Ox0dea>
!xkcd 1319 @ cyanide7
<adaedra>
:|
ICantCook has joined #ruby
elaptics has quit [Ping timeout: 256 seconds]
<cyanide7>
Ox0dea: that is my life in a nutshell.
norc has joined #ruby
<Ox0dea>
!xkcd 1205 as well.
<norc>
Why does rubocop suggest && and || over "and" and "or" ?
<Ox0dea>
norc: Because the latter have weird precedence.
haxrbyte_ has quit [Read error: Connection reset by peer]
<adaedra>
they have different precedence rules and are confusing.
haxrbyte has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<Ox0dea>
norc: That you're "supposed to" use `and` and `or` for flow control should speak volumes.
cyanide7 has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<[spoiler]>
Ox0dea re basement: :D LOL Yeah
<adaedra>
I wonder if anyone ever think of doing these lines as a motivational speech. It could go well. Maybe in front of a green background, but I don't know why.
elaptics has joined #ruby
<[spoiler]>
adaedra: you mean like Shia LaBleh did?
<adaedra>
norc: hopefully you have tests to catch bugs.
charliesome has joined #ruby
* Ox0dea
wonders how to correctly test DecayingBooleans.
<norc>
adaedra: rake stat gives me a 1:1.9 code to test ratio.
<norc>
Might not be stellar, but its something. :)
Icey has joined #ruby
<norc>
Next up Ill put in simplecov to ensure better test coverage.
<adaedra>
test size does not say much.
YaknotiS has joined #ruby
<adaedra>
I could write `expect(String.new).to be_a(String)` a thousand times.
<norc>
Heh.
<Ox0dea>
norc: Be advised that "pleasing the compiler" does not a (necessarily) healthy codebase make.
jenrzzz has joined #ruby
Cyther has quit [Ping timeout: 260 seconds]
<[spoiler]>
adaedra, Ox0dea: LOL I was joking, tbf. I don't procrastinate that often, but when I do, I procrastinate that thing like a champion
SylarRuby has quit [Remote host closed the connection]
<norc>
Ox0dea: You mean I shouldn't overdo it with rubocop?
<Ox0dea>
norc: Just don't become a slave to the metagame.
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[spoiler]>
Ox0dea: what if norc enjoys coding BDSM? Eh, eh?
<adaedra>
You can write code that ruboto likes, you can also write code which works.
<[spoiler]>
adaedra: rubucop, don't involve ruboto into this! It is innocent!
<adaedra>
s/ruboto/rubocop/
<adaedra>
9_6
<apeiros>
ruboto doesn't like code.
<apeiros>
it's codeophobic
<adaedra>
Isn't it made of it?
<apeiros>
sure
<adaedra>
That would be like hating blood.
<apeiros>
but there's people who have a phobia of blood
<adaedra>
True.
ruurd has joined #ruby
<[spoiler]>
I just don't use rubocop, because it gave me too much gief about something, then I tried fixing it and it looked like a bird took a shit over that portion of the code
<apeiros>
hemophobia :)
SylarRuby has joined #ruby
<adaedra>
[spoiler]: I try to put a fine line between do what rubocop says, fix rubocop settings to not bother me, and just fuck it.
<norc>
Ox0dea: Oh absolutely not. There is quite a few things I dont agree with (in particular some methods that are 11-15 lines long, but that is only because of splitting arguments over a couple lines)
<[spoiler]>
>> puts "Oh no, code! *Exceptions*"
<ruboto>
[spoiler] # => Oh no, code! *Exceptions* ...check link for more (https://eval.in/459209)
niemcu has quit [Ping timeout: 246 seconds]
<[spoiler]>
i think I got it wrong
<[spoiler]>
oh well
Icey has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 272 seconds]
<adaedra>
[spoiler]: also, look at all this code on codeclimate that has Fs that are still used. Pleasing automated tools are not always the priority.
rshetty has quit [Read error: Connection reset by peer]
<[spoiler]>
adaedra: When I see rubocop comments all over someone's code I just go "Oh god..."
rshetty has joined #ruby
sdothum has joined #ruby
<adaedra>
yeah, those are horrid.
<adaedra>
I stopped with rubocop personally.
Igorshp has quit [Remote host closed the connection]
<shevy>
hah
SylarRuby has quit [Remote host closed the connection]
Icey has joined #ruby
<shevy>
I did not like rubocop but it can autocorrect code!!! that's the single best feature it has
<Ox0dea>
> correct
<adaedra>
I don't like automated processes messing with my code.
<[spoiler]>
shevy: I have a love-hate relationship with anything autocorrect
lipoqil has quit [Quit: Connection closed for inactivity]
rikkipitt has quit [Quit: Leaving...]
<[spoiler]>
"bought some bats" "bangs" "bandanas" "DUCKING BANANAS"
Icey has quit [Client Quit]
Icey has joined #ruby
<Ulfalizer>
is mkmf supposed to respect CC from the environment when compiling test programs with e.g. have_func()? looking into the mkmf.log file generated for a run, it says "gcc -I/home/ ... ", even though CC is set.
ElFerna has joined #ruby
Icey has quit [Changing host]
Icey has joined #ruby
<Ox0dea>
Ulfalizer: Did you export it?
Igorshp has joined #ruby
<Ulfalizer>
Ox0dea: yep
<[spoiler]>
what is CC set to?
<[spoiler]>
is it set to GCC?
Icey has quit [Client Quit]
Icey has joined #ruby
Icey has joined #ruby
devoldmx has joined #ruby
<Ox0dea>
Ulfalizer: Try using something like `$CFLAGS="CC=clang"` in your `extconf.rb`.
Igorshp has quit [Remote host closed the connection]
<norc>
adaedra: Idk, I feel pretty strong about JSLint - it definitely is a huge benefit imo.
ruurd has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 250 seconds]
<Ulfalizer>
it's set up by Yocto (a distribution builder thingy)
blackoperat has joined #ruby
z4ph0d has joined #ruby
<Ulfalizer>
Ox0dea: unfortunately i'm working off a gem file with 'gem install'. i unpacked it to check what it was doing though, and it has RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] in it.
<Ulfalizer>
i'm a ruby noob, so i learn as i go :)
<Ox0dea>
Anything less than ∞ is simply unacceptable.
dEPy has joined #ruby
<Ox0dea>
Ulfalizer: Ah, well, that certainly should've done it.
shadoi has joined #ruby
Pupp3tm4_ has quit [Read error: Connection reset by peer]
Pupp3tm__ has joined #ruby
<Ulfalizer>
it's for nokogiri btw
atomical has joined #ruby
jimms has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 272 seconds]
misterxavier has joined #ruby
juanpablo__ has joined #ruby
<[spoiler]>
hmm
<[spoiler]>
not sure then
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]>
Ox0dea: that image looks beautiful, you're just a primitive ape who doesn't appreciate ascii art!
<[spoiler]>
Ox0dea: oh that's code.
<Ox0dea>
Ha.
Igorshp has joined #ruby
<Ox0dea>
For varying definitions of "beautiful", "ape", "art", and "code", I couldn't agree with you more.
Pupp3tm4st3r has quit [Ping timeout: 264 seconds]
shadoi has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
<shevy>
haha
<[spoiler]>
:D
<shevy>
Ox0dea is a primitive ape :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has quit [Remote host closed the connection]
l_tonz has joined #ruby
* Ox0dea
checks to see that he still has his basal ganglia.
<Ox0dea>
shevy: You're right!
gusTester has joined #ruby
Pupp3tm4st3r has joined #ruby
civil_ has joined #ruby
erbesharat has quit [Remote host closed the connection]
rbennacer has joined #ruby
ruurd has joined #ruby
erbesharat has joined #ruby
rbennacer has quit [Remote host closed the connection]
<adaedra>
Ox0dea: pics or it didn't happen.
<Ox0dea>
This is gonna hurt.
misterxavier has quit []
l_tonz has quit [Ping timeout: 246 seconds]
<Ulfalizer>
CC=thisshouldfail gem install nokogiri-1.6.6.2.gem succeeds too, when doing some local testing
<Ulfalizer>
it builds the extension as part of the install process
<Ulfalizer>
so looks like CC is being ignored for some reason :/
<Ox0dea>
I vaguely remember learning why this doesn't work, but I've since forgotten. :< https://eval.in/459227
Pupp3tm4_ has joined #ruby
Pupp3tm__ has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
shredding has quit [Ping timeout: 265 seconds]
ldnunes has quit [Ping timeout: 246 seconds]
gusTester has left #ruby [#ruby]
yeticry has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 246 seconds]
ruurd has quit [Read error: Connection reset by peer]
<Ox0dea>
Ulfalizer: I just realized I suggested using CC in CFLAGS...
<Ox0dea>
I must help you get this sorted as penance.
dEPy has quit [Quit: (null)]
rbennacer has joined #ruby
<Ulfalizer>
yeah, thought it looked a bit odd when i looked at it again :)
zapata has quit [Quit: WeeChat 1.3]
<Ulfalizer>
would be very appreciated. i'm stumbling around on a couple of days' worth of ruby knowledge.
ESpiney has joined #ruby
prestorium has joined #ruby
nsuke has joined #ruby
sdfgsdfg has joined #ruby
synthroid has joined #ruby
ruurd has joined #ruby
Pupp3tm4_ has quit [Read error: Connection reset by peer]
AMERICAN_PSYCHO has joined #ruby
Pupp3tm4st3r has joined #ruby
<Ulfalizer>
oh, wait, it's failing now during local testing
<Ulfalizer>
when giving it a broken CC
<Ulfalizer>
so i need to investigate the build environment more. very odd since i've verified three times now that it's set there too. :/
<Ulfalizer>
(and exported)
Azure has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ruby
htmldrum has quit [Ping timeout: 255 seconds]
blubjr has joined #ruby
trash has left #ruby [#ruby]
alexdunne has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
<Ulfalizer>
ah... it doesn't fail during the tests though. only later while building it.
<Ulfalizer>
so there's still an issue
rbennacer has joined #ruby
charliesome has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<Ulfalizer>
that is, CC isn't respected by have_func() and pals
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
Renich has joined #ruby
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Read error: No route to host]
<Ulfalizer>
so the updated question would be how to specify the compiler options used by e.g. have_func() when compiling the test program for the test. it doesn't seem to use CC.
Erik__ has joined #ruby
<Erik__>
Hello
postmodern has quit [Quit: Leaving]
<adaedra>
hi
<norc>
Ox0dea: If only our corporate firewall would allow imgur.
<ruboto>
Ox0dea # => ["core#hash_merge_kwd", "core#hash_merge_ptr", "core#hash_merge_ary", "core#hash_from_ary", "core#se ...check link for more (https://eval.in/459278)
RobertBirnie has joined #ruby
<Ox0dea>
norc: As an example, we used to be able to override these methods to do very strange things.
<shevy>
so I sense sadness
<shevy>
rubyists are tinker toys!
JDiPierro has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Erik__>
Will ruby replace other popular alternative languages in the future?
northfurr has quit [Quit: northfurr]
tkuchiki has joined #ruby
<shevy>
Erik__ which ones?
<jhass>
Erik__: will chainsaw's replace hammers in the future?
<Ox0dea>
Got 'im.
<shevy>
it takes a long time for a programming language to fade away
_aeris_ has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
charliesome has joined #ruby
<Ox0dea>
shevy: Which programming languages are truly gone for good?
<Erik__>
Hm, perhaps not replace
shadoi has joined #ruby
<shevy>
Ox0dea I don't know all of them, I am sure you'll find lots of those in the 1950s
<Ox0dea>
shevy: ALGOL is still very much with us.
allomov has quit [Remote host closed the connection]
CloCkWeRX has quit [Remote host closed the connection]
<Ox0dea>
In spirit, if nothing else.
charliesome has quit [Read error: Connection reset by peer]
<Erik____>
"My main beef with Ruby on Rails is that it actually has a steep learning curve. Do not believe the hype that says that it is really easy. They will show you podcasts where you build a simple blog application using scaffolding and voila! Instant website. Nothing could be further from the truth. Rails is seen to be easy because they have automated many things in the framework — this does not make it easy to understand."
dopamean_ has joined #ruby
<BadRobot>
yorickpeterse: they are a bit in a whole different world, no one uselly replies there, but its about the gems env options
<apeiros>
Erik____: and another one who uses "steep learning curve" wrong :)
sgambino has joined #ruby
ElFerna has quit [Read error: Connection reset by peer]
<BadRobot>
what does -rubygems option does?
<jhass>
Erik____: Comparing a framework to a language, great
<Ox0dea>
apeiros: It's the simplest thing that could possibly work, so why not?
joonty has joined #ruby
cdg has joined #ruby
joonty has quit [Client Quit]
<Ox0dea>
BadRobot: The -r flag does a `require`, and `ubygems` is an "alias" to `rubygems`.
<apeiros>
Ox0dea: because DATA is supposed to access data after __END__
tlarevo_ has quit [Remote host closed the connection]
<apeiros>
Ox0dea: for that reason I don't expect to be able to rewind to before that token
<Erik____>
He also says Ruby uses lambdas, I thought only blocks were used?
<Ox0dea>
apeiros: But why shouldn't you have that option?
bigmac has joined #ruby
<jhass>
Erik____: given such a major misconception, I wouldn't give much on the authors words. And please don't repeat his mistake of equaling Rails and Ruby
<Ox0dea>
Erik____: I think you would be much better served by sticking a toe in the water.
<BadRobot>
Ox0dea: thank you kindly
<Ox0dea>
BadRobot: Sure thing.
<Ox0dea>
BadRobot: Cute, right? There's also `-run`.
<apeiros>
Ox0dea: because it makes it harder to work with DATA as means to work with stuff after __END__
<Ox0dea>
apeiros: How hard is it to store the initial seek position?
dionysus69 has quit [Remote host closed the connection]
<apeiros>
Ox0dea: that said, I don't like the way DATA works anyway. I prefer what I do in my Scriptfile gem (access any .rb's __END__ data)
<BadRobot>
Ox0dea: oh so does the same thing?
<apeiros>
Ox0dea: I expect ruby to do that for me.
<Ox0dea>
apeiros: Sure, I do think local DATA would be nice.
<apeiros>
there's tons of things which are "not hard"
<apeiros>
yet I don't want to reinvent those wheels.
TDJACR has joined #ruby
ruurd has joined #ruby
<apeiros>
iow, "is it hard?" is the wrong question
zapata has joined #ruby
<apeiros>
the right question is: "is DATA only about the stuff after __END__ or not?"
bigmac is now known as i8igmac
<apeiros>
if it is, rewinding to before __END__ is wrong.
<Ox0dea>
Well, shit, I didn't realize you specified reoccurring arrays; I thought you might've mispoke and meant "elements".
dionysus69 has quit [Quit: dionysus69]
<norc>
Ox0dea: Oh wow. Now that is extremely readable.
<apeiros>
it'll become even more readable in 2.3 iirc (#count_by)
<Ox0dea>
norc: havenwood would've beat me to it; he quite likes `group_by(&:itself)`.
<Ox0dea>
I don't blame 'im.
<i8igmac>
im sorry, my understanding, the terminology is on a third grade reading level...
rshetty has quit [Ping timeout: 264 seconds]
<i8igmac>
i always appreciate your guys help
<i8igmac>
i need to read a book
cschorn_ has joined #ruby
deject3d_ has joined #ruby
cschorn_ has left #ruby [#ruby]
<Ox0dea>
i8igmac: Oh, hey, did you end up discovering `xdotool`?
<i8igmac>
um, ill look into it
dopamean_ has quit [Ping timeout: 250 seconds]
elusiveother has joined #ruby
<i8igmac>
oh, cool
<i8igmac>
i have been looking for this
Pupp3tm4st3r has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 240 seconds]
jimms has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 240 seconds]
<blubjr>
what did ruby actually get from lisp, i hear people say lisp and smalltalk as influences often but now that im looking at ruby i see a lot of smalltalk and no lisp..
Bloomer has quit [Remote host closed the connection]
existensil has quit [Quit: WeeChat 0.4.2]
<norc>
blubjr: It certainly did not get Lisps elegant weapons... for a more civilized age...
Guest53 has quit [Read error: Connection reset by peer]
Guest53 has joined #ruby
existensil has joined #ruby
jenrzzz has joined #ruby
Pupp3tm4_ has quit [Ping timeout: 252 seconds]
tens0r has quit [Quit: tens0r]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
<Ox0dea>
norc: Go try that in your favorite dialect. :P
<Ox0dea>
blubjr: Do you know a Lisp well?
DEA7TH has quit [Quit: DEA7TH]
deception1 has joined #ruby
sanjayu has quit [Ping timeout: 252 seconds]
<blubjr>
cl and scheme
<Ox0dea>
blubjr: So you're quite comfortable with the notion of closures, then?
allomov has quit [Remote host closed the connection]
<blubjr>
thats hardly something to pin as a lisp feature
<Ox0dea>
Wat.
jenrzzz has quit [Ping timeout: 252 seconds]
malconis has joined #ruby
freerobby has joined #ruby
nemo_ has quit [Remote host closed the connection]
<blubjr>
closures = lisp doesnt make any more sense in 2015 than garbage collection = lisp
lacrymology has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 268 seconds]
malconis has quit [Remote host closed the connection]
CJKinni_ has joined #ruby
malconis has joined #ruby
bmurt has joined #ruby
<Ox0dea>
blubjr: I suspect you also maintain that JavaScript has nothing to do with Scheme.
decoponio has joined #ruby
cdg has quit [Remote host closed the connection]
raazdaan has joined #ruby
<blubjr>
i don't know very much about javascript
shinnya has joined #ruby
<havenwood>
blubjr: Closure-Oriented Programming, sounds like let for lambda to me.
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
tomaz_b has quit [Ping timeout: 260 seconds]
bweston has quit [Quit: Leaving]
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
`tim` has quit [Read error: Connection reset by peer]
bweston has joined #ruby
bweston has quit [Remote host closed the connection]
pard has joined #ruby
bweston92 has joined #ruby
<pard>
greetin's
<havenwood>
pard: good mornin'
<pard>
:)
<Ox0dea>
pard: How'd 'e do ya?
rshetty_ has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
<Ox0dea>
Erm, I don't think that's the right orthography.
<pard>
kay o pard, kay o; cow-juice price byn low :)
<Ox0dea>
I'll take ten.
<blubjr>
its not homoiconic, it doesn't have restarts, its object system is completely different, correct me if im wrong
<blubjr>
aren't closures just expected nowadays
<Ox0dea>
blubjr: Closures fundamentally pervade the language.
<Ox0dea>
That just isn't true of most others.
pathrocle has joined #ruby
devoldmx has joined #ruby
<blubjr>
thats still a smalltalk bite anyway
<havenwood>
"If ... you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
ibouvousaime has joined #ruby
rwilcox has quit [Quit: WeeChat 1.2-dev]
sigurding has joined #ruby
musou has joined #ruby
<mikecmpbll>
i dunno where to ask this, any ideas why in the reference implementation for TOTP codes they drop a bit off the first byte of the hash? https://tools.ietf.org/html/rfc6238
<pard>
pardon my impertinence; i guess i've jumpd amid an actual discussion -- i had no intention to
beauby has quit [Read error: Connection reset by peer]
moeabdol1 has quit [Ping timeout: 250 seconds]
shadoi has quit [Ping timeout: 264 seconds]
sankaber has quit [Remote host closed the connection]
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pard>
why now?
jlebrech has joined #ruby
<pard>
i mean, _now_ why _now_? :)
sankaber has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has joined #ruby
umdstu has joined #ruby
elusiveother has quit [Changing host]
elusiveother has joined #ruby
<pard>
:\
<Ox0dea>
pard: What sort of research are you doing that requires such a corpus?
DiCablo has joined #ruby
<umdstu>
hey I'm trying to build an rpm for ruby-2.2.2 so that I can install ruby-2.2.2 in addition to 1.9.3 on the system... I used the --program-suffix option so the names would be different. but the libruby.so still conflixts. how do i rename that in the config?
dfinninger has quit [Remote host closed the connection]
<Ox0dea>
pard: Well, have I made some grievous error in my assessment of your character?
<pard>
no
<Ox0dea>
Right.
<pard>
my dad calld me what approximated to your postulate
<Ox0dea>
I quite enjoyed shitting in your cereal after remembering that I had that pipeline lying around somewhere.
<Ox0dea>
> plz can dl all teh gemz
<Ox0dea>
"You got it, fucker."
<umdstu>
kind of wishing i saw the first half of this convo
<pard>
.w convo
<umdstu>
yours and his
moeabdol1 has joined #ruby
<umdstu>
is there a list of all ruby configure options?
dopamean_ has joined #ruby
<umdstu>
i need to give my libruby.so a suffix during configure
dionysus69 has joined #ruby
ta has quit [Remote host closed the connection]
<pard>
ah thanks;
pdoherty has joined #ruby
<pard>
the reason i actually asked was ".... Parser has been extensively tested; in particular, it parses almost entire Rubygems corpus. For every issue, a breakdown of affected gems is offered."
<pard>
i was just wondering how has its creator testd it against "almost entire Rubygems corpus"
<ytti>
automatically?
<ytti>
use canonical parser
<ytti>
use own parser
<ytti>
compare for equality
alexdunne has joined #ruby
CJKinni_ has quit [Ping timeout: 256 seconds]
slawrence00 has joined #ruby
<Ox0dea>
umdstu: Looks like you want `--with-soname=foo`.
CJKinni__ has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has quit [Ping timeout: 272 seconds]
Pupp3tm4_ has quit [Read error: Connection reset by peer]
<pard>
ytti, my question actually was : how to source test cases, in particular, how has the https://github.com/whitequark/parser creator has testd it against the Rubygems corpus
mordocai has joined #ruby
Pupp3tm4st3r has joined #ruby
ESpiney_ has joined #ruby
diegoaguilar has joined #ruby
<Ox0dea>
pard: I bet he downloaded all the gems.
stardiviner has quit [Ping timeout: 252 seconds]
jobewan has joined #ruby
<pard>
that's what has actually baffled me -- how?
aspiers has joined #ruby
<Ox0dea>
It's impossible.
<pard>
:\
ruurd has quit [Read error: Connection reset by peer]
<ytti>
i wish parallel would ship standard in distributions
<pard>
strange, it gave me 404
<umdstu>
Ox0dea: thanks i'll take a look
kp666 has quit [Quit: Leaving]
<Ox0dea>
umdstu: Godspeed.
ruurd has joined #ruby
<umdstu>
thanks
raazdaan has quit [Read error: Connection reset by peer]
senayar has quit [Read error: Connection reset by peer]
senayar has joined #ruby
<pard>
Ox0dea, thanks
<pard>
ytti, thanks
mwlang has quit [Quit: mwlang]
pard has quit [Quit: Leaving]
jonee has joined #ruby
Pupp3tm4st3r has quit [Quit: Leaving...]
rshetty has joined #ruby
bruno- has joined #ruby
elusiveother has quit [Quit: look at me still talking when there's science to do! when i look up there, it makes me glad i'm not you!]
rshetty has quit [Remote host closed the connection]
aryaching has joined #ruby
rshetty has joined #ruby
gusTester1 has left #ruby [#ruby]
nhhagen has quit [Remote host closed the connection]
cdg has joined #ruby
acharnosh1 has joined #ruby
rshetty has quit [Remote host closed the connection]
rgtk has joined #ruby
podman has joined #ruby
dhjondoh has joined #ruby
trabulmonkee has quit [Quit: Connection closed for inactivity]
rshetty has joined #ruby
dnomyar has joined #ruby
aryaching_ has joined #ruby
aryaching_ has quit [Client Quit]
Igorshp has quit [Remote host closed the connection]
RegulationD has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 272 seconds]
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
Regulati_ has joined #ruby
rippa has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
elusiveother has joined #ruby
shredding has joined #ruby
rodfersou is now known as rodfersou|lunch
n008f4g_ has quit [Ping timeout: 260 seconds]
InternetFriend has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Jameser has joined #ruby
Channel6 has joined #ruby
bryanray has joined #ruby
denver has joined #ruby
finisherr has joined #ruby
syath has quit [Quit: WeeChat 1.2]
cdg has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
dhjondoh has joined #ruby
bnagy has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
aryaching has quit [Client Quit]
tmtwd has joined #ruby
aryaching has joined #ruby
Igorshp has joined #ruby
tagrudev has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has quit [Read error: Connection reset by peer]
bnagy has joined #ruby
Mission-Critical has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
aryaching has joined #ruby
aryaching has quit [Client Quit]
mclee_ has joined #ruby
aryaching has joined #ruby
alexdunne has joined #ruby
Fire-Dragon-DoL has joined #ruby
beast has quit [Quit: Leaving]
momomomomo_ has joined #ruby
jlebrech has quit [Remote host closed the connection]
wprice has quit [Quit: wprice]
umgrosscol has joined #ruby
aganov has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 255 seconds]
<BadRobot>
hi, I have few gems I am using locally on machine, (ffi and win32/eventlog) and when I promote for production, they do not want to do (gem install <nameofgem>) because all our prod servers are not connected to internet, any other way to do it?
<workmad3>
BadRobot: if you're deploying an app that manages gems via bundler, you can also use the `bundle pack` command to download all the gem files that the app needs, which will then be used by `bundle install` when deploying
andikr has joined #ruby
wprice has joined #ruby
<shevy>
BadRobot how do you get the gems on your servers again?
acharnosh1 has quit [Quit: WeeChat 1.3]
ldnunes has quit [Ping timeout: 246 seconds]
dhjondoh has joined #ruby
ldnunes has joined #ruby
kedare has quit [Ping timeout: 255 seconds]
dhjondoh has quit [Remote host closed the connection]
denver has quit [Killed (Sigyn (Spam is off topic on freenode.))]
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
mary5030 has joined #ruby
<BadRobot>
workmad3: trying to avoid installing more stuff on the server, the company has an extreme allergies against good technologies hahahaha and design and programming patterns
<BadRobot>
the real world they say!!!
kerunaru has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
<Erik____>
How would I write the code so I'd get the same result with .each ?
praveen_p has joined #ruby
finisherr has joined #ruby
<hxegon>
Erik____: Is there a side effect you are trying to do?
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
praveen_p has left #ruby [#ruby]
elusiveother has quit [Quit: look at me still talking when there's science to do!]
vondruch has quit [Ping timeout: 256 seconds]
roxtrongo has joined #ruby
cwong_on_irc has joined #ruby
noboyd has joined #ruby
<Erik____>
I'm learning via codecademy, and they've only taught me .each so far, so it must be some easy way to get the same result with .each aswell, as this is the task :D
finisherr has quit [Client Quit]
noboyd has quit [Client Quit]
<Erik____>
there must be*
bricker has joined #ruby
<Ox0dea>
Erik____: Get out of there before it's too late.
<hxegon>
haha
<Erik____>
What do you mean? :o
bruno- has quit [Ping timeout: 268 seconds]
skade has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
<Ox0dea>
Erik____: If something which claims to teach you Ruby is advising you to use #each to destructively update an Array, you've taken a wrong turn.
madundead has joined #ruby
<hxegon>
Erik____: pretty much
moeabdol1 has quit [Ping timeout: 256 seconds]
ibouvousaime has quit [Read error: Connection reset by peer]
<hxegon>
Erik____: I've been trying to come up with a non-shitty example (that uses .each vs .each_with_index or something) but I'm so used to doing map for everything I'm not sure how I would
<Erik____>
Wait wait wait, codecademy is bad? :OO
<Erik____>
But everyone says it's the best :o
<hxegon>
It's not aweful, but I think rubymonk or the koans are better
<hxegon>
awful*
skade has joined #ruby
bMalum has quit [Quit: bMalum]
tarspace has joined #ruby
<tarspace>
it is channer of ruby stone?
<tarspace>
or ruby programmers?
<Ox0dea>
tarspace: Either.
<hxegon>
>> x = [1, 2]; x.each_with_index { |e, i| x[i] = e*2 }; x
<Erik____>
Are those some internal jokes I'm not getting get? I got that feeling
<hxegon>
Ox0dea: you and your elegant bullshit
devoldmx has joined #ruby
<Erik____>
What kind of music do you enjoy listening to while programming?
<adaedra>
?offtopic
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Get 'im!
kirun has joined #ruby
<greenbigfrog>
does 'net/http' cache websites? I'm calling a (more or less static) json API but it displays diffrent things if I put it then with my browser
ibouvousaime has joined #ruby
acharnosh1 has quit [Quit: WeeChat 1.3]
<shevy>
Erik____ Ox0dea can be very confusing ;)
NeverDie has joined #ruby
<Ox0dea>
greenbigfrog: Net::HTTP is not sending the same headers as your browser, and any one of them could technically be the reason for a different response.
sdfgsdfg has quit [Read error: Connection reset by peer]
<greenbigfrog>
hmmm
sdfgsdfg has joined #ruby
<Erik____>
What programs have you guys made in ruby?
alexdunne has left #ruby [#ruby]
<mikecmpbll>
all of them.
DoubleMalt has quit [Remote host closed the connection]
<hxegon>
Erik____: mostly sinatra integration server stuff for ecommerce middleware
devoldmx has quit [Ping timeout: 265 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
<hxegon>
Erik____: sinatra is a simple webserver framework
rcvalle has joined #ruby
agit0 has joined #ruby
<Zarthus>
I don't blame it
mrtomme has quit [Ping timeout: 260 seconds]
<Ox0dea>
Sure, but I have no idea why it shows the code three separate times.
<Erik____>
A framework for ruby, like Rails?
cwong_on_irc1 has quit [Max SendQ exceeded]
<hxegon>
Erik____: and ecommerce middleware is stuff like a server that sends/transforms data between an ebay store and quickbooks
cwong_on_irc has quit [Ping timeout: 265 seconds]
<hxegon>
Erik____: exactly, but way simpler
prettiestPony11 has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
mrtomme has joined #ruby
cwong_on_irc has joined #ruby
<Erik____>
Are you a seasoned programmer or young?
northfurr has quit [Quit: northfurr]
FernandoBasso has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
amclain has joined #ruby
The_Phoenix has joined #ruby
<Zarthus>
I program regardless of season
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
banister has joined #ruby
<Erik____>
<Zarthus> lmao
<hxegon>
Erik____: Youngish, 23, but I've been programming for a while. I wouldn't call myself seasoned, but I'm not a beginner either
cwong_on_irc has joined #ruby
<Erik____>
For how long?
cwong_on_irc has quit [Max SendQ exceeded]
moeabdol1 has joined #ruby
GarethAdams has quit [Ping timeout: 256 seconds]
krz has quit [Quit: WeeChat 1.2]
cwong_on_irc has joined #ruby
<hxegon>
Erik____: hmm... 6-7 years? I read little brother by Cory Doctorow and thought his description of programming sounded amazing
jimms has quit [Remote host closed the connection]
cwong_on_irc has quit [Max SendQ exceeded]
<hxegon>
Erik____: but there really isn't a wrong time to start
rshetty has quit [Remote host closed the connection]
<hxegon>
Erik____: on and off though during that time except in the last 2-3 years
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Erik____>
How many languages do you know?
cwong_on_irc has joined #ruby
<Erik____>
And which ones :D
shadoi has joined #ruby
momomomomo_ has quit [Ping timeout: 272 seconds]
cwong_on_irc has quit [Max SendQ exceeded]
<hxegon>
Erik____: only 3 better than just dabling
<hxegon>
Erik____: bash/zsh, python and ruby
bweston92 has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
towski_ has joined #ruby
The_Phoenix has quit [Ping timeout: 240 seconds]
jonee has quit [Ping timeout: 240 seconds]
<Erik____>
<hxegon> You don't know HTML + CSS?
timonv has joined #ruby
cwong_on_irc1 has joined #ruby
elusiveother has joined #ruby
Jameser has quit [Ping timeout: 240 seconds]
<hxegon>
Erik____: I don't really consider those programming languages strictly IMO
<hxegon>
Erik____: but yeah
tkuchiki has quit [Remote host closed the connection]
<shevy>
Zarthus lol
<eam>
win 2
shadoi has quit [Ping timeout: 240 seconds]
<eam>
whoops
<Erik____>
Is it easier/harder to get job as ruby programmer compared to other languages?
h99h9h88 has quit [Remote host closed the connection]
<shevy>
one day I will be able to publish a massive amount of funny quotes from #ruby
GarethAdams has joined #ruby
<shevy>
use java to get a job Erik____
cwong_on_irc has quit [Ping timeout: 246 seconds]
bMalum has joined #ruby
<hxegon>
Erik____: I've only recently gotten a full time position, before that I was doing freelance projects for small business stuff, so not sure I'm the best person to ask
<adaedra>
shevy: that was mean.
<hxegon>
Erik____: Don't sell the tech, sell the ability to get shit done
momomomomo_ has joined #ruby
<mikecmpbll>
i do ruby and i have a job
mjuszczak has joined #ruby
<adaedra>
congrats.
<shevy>
adaedra java is the most powerful language according to tiobe!
<zwdr>
Hey, CSS3 is turing complete!
krz has joined #ruby
<mikecmpbll>
it's wonderful, isn't it.
<adaedra>
shevy: if only I cared.
<mikecmpbll>
god bless matz.
big|bad|wolf has joined #ruby
<Erik____>
Aye, I know that getting shit done and personality is important in the tech world.
polishdub has joined #ruby
<adaedra>
get(
dnomyar_ has joined #ruby
<Erik____>
def
<mikecmpbll>
a getter in ruby? :O
InternetFriend has joined #ruby
aspiers has quit [Ping timeout: 265 seconds]
[Butch] has joined #ruby
<adaedra>
I should make a ruby library in unicode.
<adaedra>
and it's not new you should be defining.
darkf has quit [Quit: Leaving]
<hxegon>
* faceplams
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdfgsdfg has quit [Read error: Connection reset by peer]
malconis has joined #ruby
<mikecmpbll>
:D
<hxegon>
anytime you parse HTML with a regex, thats zalgo language
benlieb has joined #ruby
<adaedra>
?zalgo
<ruboto>
I don't know anything about zalgo
benlieb has joined #ruby
rodfersou|lunch is now known as rodfersou
<karapetyan>
can i know index of deleted element in array?
<Ox0dea>
karapetyan: I think not. :<
<Ox0dea>
Are you sure you need it?
<karapetyan>
ok then i can use delete_at and store it.
<Ox0dea>
Right.
<karapetyan>
Ox0dea: thank you.
<Ox0dea>
karapetyan: Sure, but... are you sure?
segfalt has quit [Quit: leaving]
Bloomer has joined #ruby
<Ox0dea>
Never mind; a use case or two sprung up.
<karapetyan>
Ox0dea: i need remove all elements from array until there will be last element. And next removed element should be +3 index from last deleted element
<karapetyan>
ehm, i hope i describe my task correctly.
<karapetyan>
and i actually not often make good kata solution on codewars.
<karapetyan>
)
Quandl has joined #ruby
mistym- is now known as mistym
mistym has quit [Changing host]
mistym has joined #ruby
<Ox0dea>
Just keep sharpening your katana.
<Ox0dea>
Even if you only end up being able to slice through butter, you'll be able to make delicious toast.
benlieb has quit [Quit: benlieb]
mclee_ has quit [Ping timeout: 240 seconds]
<hxegon>
karapetyan: how do you like codewars? I've been meaning to try it out
<Ox0dea>
That wasn't nearly as motivational as I'd intended, but I hope you took the gist.
_djbkd has joined #ruby
stan has quit [Ping timeout: 240 seconds]
mark2 has quit [Remote host closed the connection]
Quandl has quit [Read error: Connection reset by peer]
<karapetyan>
hxegon: i like codewars.
<karapetyan>
Ox0dea: thanks]
ESpiney__ has joined #ruby
bruno- has joined #ruby
sharkman has joined #ruby
<sharkman>
test
cdg has quit [Read error: Connection reset by peer]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<sharkman>
if i have a variable, and its either a date, or a range of dates (i.e. Thu, 05 Sep 2013..Fri, 20 Dec 2013) what is a quick way to check that
<sharkman>
if i want to verify that it is a single date
tlarevo has joined #ruby
Erik____ has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
Jardayn has joined #ruby
karapetyan has quit [Remote host closed the connection]
rakm has joined #ruby
karapetyan has joined #ruby
ESpiney_ has quit [Ping timeout: 250 seconds]
moeabdol1 has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 240 seconds]
Motoservo has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 268 seconds]
Igorshp has quit [Remote host closed the connection]
<Ox0dea>
sharkman: Ask it.
Jameser has joined #ruby
SleepySensei has joined #ruby
<Erik____>
What programs do you use to write in Ruby?
karapetyan has quit [Ping timeout: 250 seconds]
<hxegon>
sharkman: well you could do dates.is_a? or a case statement
ibouvousaime has joined #ruby
Igorshp has joined #ruby
<hxegon>
sharkman: or you could do [dates].flatten to standardize it to an array
Pathfinder has joined #ruby
nemo__ has joined #ruby
<hxegon>
sharkman: I'm sure there are better ways, but that's how I've seen it done
<hxegon>
Erik____: I would highly recommend learning either emacs or vim
madundead has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
Renich has quit [Ping timeout: 252 seconds]
<shevy>
ewww
<Erik____>
Okay, what are they good for?
Renich has joined #ruby
<adaedra>
shevy: no, they are fine.
northfurr has joined #ruby
<adaedra>
Erik____: those are text editors.
<adaedra>
/powerfull/ text editors.
<shevy>
they have a huge entry barrier
<Erik____>
I know, but why them over for example notepad
<hxegon>
Erik____: well, I can only speak for vim, but after you learn it everything else seems stupidly painful to use because you edit text in vim the same way you think
umgrosscol has quit [Remote host closed the connection]
dfockler has joined #ruby
T1loc has quit [Quit: crash-test aborted]
<adaedra>
shevy: so you stop at the first difficult thing? Pff.
ruurd has quit [Read error: Connection reset by peer]
<shevy>
adaedra absolutely not. I make sure that it is worth it. emacs and vim were not worth it at all, ruby is
favadi has quit [Ping timeout: 268 seconds]
<adaedra>
lol.
<hxegon>
shevy: I feel like the entry barrier is exaturated. For the first week for sure you are floundering, but after that its nothing but gains
<adaedra>
add this to you quote collection, "emacs and vim are not worth it at all".
<Ox0dea>
> exaturated
jenrzzz has joined #ruby
<hxegon>
Erik____: for example, in notepad to delete a word behind your cursor you would mash backspace until its done. in vim, press db
<adaedra>
or ^W in insert mode.
<hxegon>
Ox0dea: wow thats misspelled
<hxegon>
exaggerated*
joonty has joined #ruby
dtraveler has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
<Erik____>
No, exaturated saturated.
<adaedra>
Erik____: emacs and vim are tools that can be a bit uneasy to learn, but once took in hand are great tools to work with.
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has quit [Client Quit]
<hxegon>
Erik____: 2 delete 2 words behind cursor, 2db. you use mnemonic key sequences (2 delete word) to do edits
<Erik____>
Alright
InternetFriend has joined #ruby
<Erik____>
db= down button?
<shevy>
hehe
<adaedra>
no, d then b keys.
<hxegon>
haha
<shevy>
it tampers with your brain
<hxegon>
j k h l, don't ask why but they aren't hard to get used to
allomov has joined #ruby
<shevy>
that was your cat type it
<hxegon>
d is delete, b is back
SleepySensei has joined #ruby
<dtraveler>
Hi, I want to replace all occurrences of " [anywordcangohere]" with "-" in a string.
<dtraveler>
I am trying to use gsub. But no luck so far. Can someone please help me?
<adaedra>
hxegon: I use vim but don't use hjkl.
Eiam_ has joined #ruby
<hxegon>
adaedra: you use arrow keys?
<adaedra>
dtraveler: what did you try?
<shevy>
adaedra you are a sinner! use vim in vi mode
<adaedra>
hxegon: yes. It's not the '80 anymore.
<shevy>
:D
<dtraveler>
adaedra: line.gsub(/\\[(\w+)\\]/, "")
<Erik____>
Vim seems pretty nice when you talk about it
northfurr has joined #ruby
Bloomer has quit []
<adaedra>
dtraveler: waouh, you went far.
<hxegon>
Erik____: I would *never* use anything else unless there was no other choice.
<dtraveler>
basically i want to replace it with "" or "-"
<shevy>
Erik____ yeah, vim is almost as good as emacs
<adaedra>
Erik____: it is! run vimtutor if you have it.
<eam>
vi style keybindings are way better, but you can just load 'em in emacs
<eam>
it's the best vi
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
Erik____: best is to try them both and see.
<hxegon>
Erik____: basically you can have tetris and browse mail in emacs and it uses key combinations, where as vim is supposed to integate with other tools
<eam>
vim, well, might be good for non-programmers
<hxegon>
Erik____: what adaedra said
<adaedra>
Personally I prefer vim, even after having worked a while with emacs.
dikaio has joined #ruby
<hxegon>
same here
<eam>
vim has this weird thing called vimscript embedded, emacs has a lisp dialect
<gisli>
Hiya, having problem with some ruby code and being unexperienced in Ruby I'm not sure what the problem is. Although the exec-command returns an exit code of '1' the 'javaORnode' variable is always "java", any ideas? https://gist.github.com/gislifreyr/9872e71673f86dae55c3
<shevy>
lisp would be twice as pretty without the )
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
<Ox0dea>
shevy: Aye, I've noticed you tend not to `end` your example code.
symm- has joined #ruby
<adaedra>
shevy is a python programmer is disguise.
<shevy>
it's one thing I would like about python actually, but only if it is optional
<dtraveler>
shevy: Thanks a lot.
shadoi has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
<Erik____>
<shevy> The whole page source is listed as "badware"
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Remote host closed the connection]
<Ox0dea>
gisli: Do you have to use that monster just to run `which`?
<shevy>
the ultimate programming language would be a merge of python and ruby. just think about unifying a philosophy that states that there is more than one way to do things AND to also state at the same time that there would be only one way to do something
<shevy>
Erik____ yeah sourceforge fell from grace
nemo__ has quit [Remote host closed the connection]
<shevy>
but the nazghul game was fine, I played it years ago up to perhaps the fourth town
<hxegon>
Erik____: lisp is an extremely simple language that is stupidly powerful. other language that are technically lisp: clojure, scheme, racket, many many more
<shevy>
ultima-nostalgia
<gisli>
Ox0dea: The monster being facter?
<Ox0dea>
gisli: Sure.
<Ox0dea>
I mean, is it doing something special?
kobain has joined #ruby
diegoviola has joined #ruby
NeverDie has quit [Ping timeout: 268 seconds]
<baweaver>
Ox0dea: going on vacation tomorrow and date tonight so might not get through that all.
<Ox0dea>
baweaver: You've got one line left?!
<shevy>
dam party!
<gisli>
Ox0dea: I need to have the value of it in a few places in puppet yes. That is, I need to know if java is installed and act on that.
<Ox0dea>
gisli: Right, you've not answered my question, though.
<baweaver>
I still have to string it all together, and one of your lines doesn't count as one line :P
<dtraveler>
Just a quick question, if an expression is present at the last line of a function, it is returned implicitly(without the return keyword)?
<eam>
dtraveler: yes
<adaedra>
the result, yes
<dtraveler>
eam: Thanks
<dtraveler>
adaedra: Thanks
<Ox0dea>
dtraveler: Thanks.
erbesharat has joined #ruby
<adaedra>
Ox0dea: Thanks.
<dtraveler>
:P Its okay.
<Ox0dea>
dtraveler: Thank you for being thankful.
sigurding has quit [Quit: sigurding]
<Ox0dea>
adaedra: Thanks for thanking.
<adaedra>
#ruby-canada.
<adaedra>
Sorry.
<dtraveler>
Ox0dea: :)
nemo_ has joined #ruby
bb010g has joined #ruby
shadoi has quit [Quit: Leaving.]
<Ox0dea>
gisli: Will that not do, then?
Igorshp has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
baweaver: Are you going to show your date this wizardry of which you are capable?
<Ox0dea>
*Muggle-ry?
<baweaver>
-> offtopic
<gisli>
Ox0dea: Ahh I see. Although I'm not getting the fact to print...
<Ox0dea>
gisli: Are you... printing it?
ibouvousaime has joined #ruby
<adaedra>
$stdout.reopen('/dev/lp0')
Eiam_ has quit [Ping timeout: 260 seconds]
<gisli>
Ox0dea: well no not really but it should be output when I run facter (sorry for not using the right words, not my 1st language)
sharkman has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
gisli: I don't know anything about Facter, but things tend not to get printed automatically.
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfrz has quit [Quit: Leaving.]
diegoaguilar has joined #ruby
The_Phoenix has joined #ruby
<gisli>
Ox0dea: okay, so how would I assign the value 'node' or 'java' to a variable?
<shevy>
variable = 'node'
<hxegon>
variable = 'node'?
<shevy>
hey
<hxegon>
jinx
<shevy>
did you copy-steal that! :D
<hxegon>
no
<shevy>
hehe
<Erik____>
Guys, I'm unable to download ruby from ruby installer: dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.3.exe because my antivirus refuses to let me see it as they've detected malware. Is there actual malware???
<hxegon>
Erik____: no
fmcgeough has joined #ruby
<Ox0dea>
Erik____: Yes, your operating system.
<gisli>
shevy, hxegon: well yeah but how woudl I do it when I'm doing this? `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' (sorry, ruby noob)
n008f4g_ has joined #ruby
<hxegon>
Erik____: what Ox0dea said, but just let it pass
<Ox0dea>
gisli: Any expression can be assigned.
<shevy>
gisli ah well `` returns something
<Ox0dea>
It *evaluates* to something.
<Erik____>
You don't like Windows? Do you prefer linux?
bryanray has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
<hxegon>
gisli: how would you print it? just put puts in front of it
<shevy>
gisli in this case you could do: variable = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java'
<hxegon>
Erik____: yeah, been windows free since I was 15
<shevy>
and now you are 16!
<hxegon>
Erik____: not hating, but it really helped me understand computers more
jezeniel has quit [Quit: Leaving]
<Erik____>
Oh, I can't hear you over all the games I can play
<Ox0dea>
hxegon: Well done, but irssi is still for masochists.
<shevy>
I sorta ditched windows almost hand-in-hand when I was going into ruby (actually, I started with perl first, so perhaps the first two years I did not use ruby)
<Erik____>
:D
<hxegon>
shevy: actually I'm 14 now. Don't oppress me with you chrononormative BS
<shevy>
hxegon :D
<adaedra>
Erik____: for dev (except Windows dev), Windows is bad.
<shevy>
being young is much cooler than being old
krz has quit [Quit: WeeChat 1.2]
<adaedra>
Ox0dea: I get you use it?
<hxegon>
Ox0dea: It works good enough for me
<Ox0dea>
hxegon: Check your causality at the wormhole, Time Lord.
<gisli>
shevy: yeah I'm doing that and returning the value in the next line but I believe this has something to do with facter because it's not picking ut up when I return it. avaORnode = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' javaORnode
<Erik____>
Hxegon, you're swedish?
<lianj>
shevy: which returns non 0 on failure. just use system instead of ``.empty? crap
<gisli>
missing a 'j' there
<Ox0dea>
adaedra: pelican.jpg, but no.
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
deception1 has quit [Quit: Leaving.]
<hxegon>
Erik____: only in spirit (._.), jk AMERICUN AS FUUUUUUCK PARTNER
devoldmx has joined #ruby
<adaedra>
Erik____: varför?
cyle has joined #ruby
linduxed has quit [Ping timeout: 240 seconds]
mjuszczak has quit []
<shevy>
lianj it is his code - if you wanna help him, please use gisli there
al2o3-cr has joined #ruby
karapetyan has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
rbowlby has joined #ruby
<hxegon>
Ox0dea: CAUSALITY TRIGGERS ME SHITLORD!
beauby has quit [Ping timeout: 256 seconds]
umdstu has quit [Ping timeout: 246 seconds]
<hxegon>
Ox0dea: you need to tag your messages for us anti-causal folk
northfurr has quit [Quit: northfurr]
zfez has quit [Quit: Page closed]
<Ox0dea>
lianj: What's terrible about ```.empty?`?
<pipework>
Ox0dea: are you intentionall backticking?
<Ox0dea>
pipework: Habit.
karapetyan has quit [Remote host closed the connection]
<Ox0dea>
I like to be precise.
<pipework>
Ox0dea: Cause I was gonna be all, "Tricksy Ox0dea"
karapetyan has joined #ruby
<adaedra>
`%x .empty?`
postmodern has joined #ruby
ochkoffein has joined #ruby
FernandoBasso has quit [Quit: Leaving]
nemo_ has quit [Remote host closed the connection]
northfurr has joined #ruby
p0wn3d__ has joined #ruby
roxtrongo has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
leafybas_ has joined #ruby
bMalum has joined #ruby
Erik____ has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
kaleido has joined #ruby
nemo_ has joined #ruby
<adaedra>
It's quiet in here.
roxtrongo has quit [Read error: Connection reset by peer]
<purplexed->
so I'm wondering about how to best deploy my two applications, that will be working together on a server... Should I be bundling it into a gem, and then gem install on the client server ?
Igorshp has joined #ruby
dopie has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 272 seconds]
leafybas_ has quit [Ping timeout: 244 seconds]
<purplexed->
is that a typical way of installing an application ?
dnomyar has joined #ruby
<purplexed->
maybe, similar to chocolatey on windows ?
Motoservo has joined #ruby
<pipework>
purplexed-: You can package your application for the system package manager(s) you want to target.
pocketprotector- has joined #ruby
to_json has quit [Quit: Leaving.]
freerobby has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
Igorshp has joined #ruby
<shevy>
gisli \o/
<purplexed->
pipework, my target, for now, will be windows ... except for windows 10, i don't think windows comes with a built in package manager
Pathfinder has quit [Ping timeout: 260 seconds]
<pipework>
purplexed-: there's a thing called orca, I think.
<pipework>
Windows ain't my thang, so I can't help anymore than that.
<purplexed->
yes, but that requires additional install on the client, doesn't it ?
<purplexed->
but yeah, I heard about orca
moeabdol1 has joined #ruby
ibouvousaime has quit [Ping timeout: 246 seconds]
<purplexed->
ocra is the name.. not orca :D
<pipework>
evidence of how in touch I am with windows.
dnomyar has quit [Ping timeout: 246 seconds]
<purplexed->
windows is getting interesting though, with their headless servers and nano servers
<pipework>
It's a shame that it's being made by microsoft though.
<pipework>
But if it makes you happy or makes you money, I have no qualms with it.
<purplexed->
it think you should spend some time looking at what is going on over at microsoft... they are really changing
<pipework>
purplexed-: I stop supporting companies that want to use data on my local network to their benefit and my detriment.
<pipework>
I isolate most things that I'm not sure about, but I get rid of things that I am sure about.
lkba has joined #ruby
<shevy>
so you isolate your cat
<pipework>
My tinfoil hat takes precedence over silly features that have been in other softwares for decades.
<purplexed->
yes, but when things change, so should your opinions. :)
<pipework>
purplexed-: They haven't changed yet, and I don't .trust them as a company.
moeabdol1 has quit [Ping timeout: 252 seconds]
<pipework>
shevy: My cat isolates me.
troulouliou_div2 has quit [Remote host closed the connection]
<purplexed->
I can identify with your opinions. But i don't think they are as valid as they have been.
djstorm has joined #ruby
<eam>
there's really not much compelling about windows at this point, and less so every year
<Ox0dea>
> We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors.
<Ox0dea>
pipework: ^
<pipework>
purplexed-: Then I don't think you're up to date on the situation in windows 10 and that they've backported their 'helpful features' to other OS's
<purplexed->
just want you to know that things are changing, ..
deception1 has joined #ruby
<purplexed->
there are lots of things I don't know either :)
<eam>
they're changing because msft is rapidly losing ground and becoming irrelevant
<eam>
you can't play the strongarm monopoly card when customers have better alternatives
<purplexed->
is there an echo in here? ;)
<gisli>
.quit
gisli has quit [Quit: leaving]
<pipework>
I'll stick to open source and companies that at least have the self-awareness to publicly appear as if they defend my privacy.
ta has joined #ruby
<pipework>
It takes a lot to repair .trust with me.
<purplexed->
.net is open source isn't it ?
<pipework>
purplexed-: One small part to a very large ecosystem.
ochkoffein has quit [Ping timeout: 250 seconds]
<purplexed->
oh well, I'm stuck working with the platform.. but I'm happy about the changes they are making.. ofcourse, Sharepoint still exists, so, they still have to make up for that
<purplexed->
and that will take some time
<pipework>
Yeah, if you're already stuck in it, it seems like stockholm syndrome would be the easiest path forward.
towski_ has quit [Remote host closed the connection]
<purplexed->
yes, I'm coding ruby because I have stockholm syndrome
<pipework>
People sometimes have moments of clarity. :D
elusiveother has quit [Quit: look at me still talking when there's science to do!]
<purplexed->
and some people are just stuck on their beliefs :p
kfrz has joined #ruby
<pipework>
I'm glad you're writing ruby and that there are some people who invest into the platform. I don't think that windows users should be imprisoned by their OS without any lifelines to the world of open source and trustworthy software.
<purplexed->
aaaaanyway
<eam>
purplexed-: if you think this perspective is borne from bias you couldn't be more wrong
ivanskie has joined #ruby
<eam>
I've worked at msft, I have many friends there
Musashi007 has joined #ruby
<eam>
they're rapidly losing ground - that's why the change of direction
bruno- has joined #ruby
<eam>
that's just a fact
<purplexed->
yeah, i can see they are losing the cloud race
baweaver has quit [Remote host closed the connection]
<purplexed->
I myself stopped using Azure because I think it sucks
cyle has quit [Quit: leaving]
shpoont has joined #ruby
<eam>
the people least happy with their ridgid licensing are msft developers -- it really doesn't impact the oss community too much anymore
<pipework>
I'm chums with people on the UX teams, browser team, and lower non-dev stuff. A number of them contribute to open source any way that they can without losing their jobs because they believe in it so earnestly.
<pipework>
eam: It causes a funny uproar when msft publishes non-free barely open code to github tough.
<pipework>
though*
northfurr has quit [Quit: northfurr]
<purplexed->
btw, I just work with ms stuff, because that's where I ended up... but I'm trying to introduce new stuff at my place of work... ruby is one of them
towski_ has joined #ruby
sigurding has joined #ruby
<pipework>
eam: Have you seen those neat libre laptops?
<pipework>
Free hardware is the goal, it's really great.
<pipework>
as in beer
zenguy_pc has quit [Read error: Connection reset by peer]
kfrz1 has joined #ruby
skweek has joined #ruby
rodfersou has quit [Quit: leaving]
chipotle has quit [Quit: cheerio]
<shadoi>
#microrubysoft
Rollabunna has quit [Remote host closed the connection]
<eam>
pipework: not gonna happen
<pipework>
eam: What do you mean? That you won't use it, or that it won't ever ship?
Rollabunna has joined #ruby
towski_ has quit [Remote host closed the connection]
<eam>
high end hardware is never gonna have non-binary blob based hardware. I just checked out https://www.crowdsupply.com/purism/librem-15 if that's what you're talking about and they ship with an nvidia chipset ...
kfrz has quit [Ping timeout: 260 seconds]
<eam>
maybe they're saying you can use the non-accelerated driver?
<pipework>
eam: They're working on acquiring hardware that can have open source replace the binary blobs.
<eam>
yeah, that's what's not gonna work
<eam>
don't get me wrong, I wish it would and I love the idea
<pipework>
eam: It's better than hardware that can't have the binary blobs replaced.
<eam>
sure
<pipework>
It opens the door for open source where right miaow most hardware can't have the binary blobs replaced.
AccordLTN has quit []
Motoservo has quit [Read error: Connection reset by peer]
Motoservo has joined #ruby
Guest53 has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
Erik_Underline has joined #ruby
<Erik_Underline>
Back
dnomyar has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ochkoffein has joined #ruby
<Erik_Underline>
What's the best line of code, to sort an array descendingly(in reverse that is), as opposed to ascendingly with .sort! ?
<Erik_Underline>
I'm Erik___ btw :P
rbennacer has quit [Remote host closed the connection]
baweaver has joined #ruby
<Coraline>
a.sort.reverse ?
rbennacer has joined #ruby
<Erik_Underline>
Huh, it's that simple xD
Motoservo has quit [Read error: Connection reset by peer]
<Erik_Underline>
I kept using a.sort! do |x,y| y<=>x end
<Ox0dea>
Erik_Underline: I'd like to show you why you should strongly consider giving Vim a shot. :)
Motoservo has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shadoi>
LOL
<shadoi>
Or: Let's restart an ages old religious flamewar!
<Ox0dea>
Somebody posted to /r/vim a while back boasting about how Sublime gives them multiple cursors, and that it really speeds up their process: http://i.imgur.com/X8nzX5H.gif
<Erik_Underline>
<Ox0dea> I've barely even learned the basics of Ruby and programming :O
<Ox0dea>
Please do try to sit through the whole thing; they thought they were really moving.
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Note well that a macro is being used in the latter case, and so the approach essentially scales infinitely.
firstdayonthejob has quit [Ping timeout: 255 seconds]
zenguy_pc has joined #ruby
<Ox0dea>
Whether there were four or four million items, the Vimmer could simply say `4000000@@` and be done with it.
<Erik_Underline>
Okay, I'll watch them. Do they program in ruby?
NeverDie has joined #ruby
<Ox0dea>
The Sublime user would still be holding Ctrl and mashing their Down arrow until the kingdom came.
<eam>
uh clearly they should've used ruby metaprogramming to solve that problem
<Ox0dea>
Erik_Underline: The language is immaterial for this demonstration.
rgtk has joined #ruby
NeverDie has quit [Max SendQ exceeded]
_djbkd has quit [Remote host closed the connection]
teclator has quit [Ping timeout: 244 seconds]
Igorshp has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<Erik_Underline>
Vim was very fast
poguez_ has joined #ruby
chipotle has joined #ruby
<Ox0dea>
Erik_Underline: Now that you've seen it, watching the other one is kind of infuriating, no?
<pipework>
There's precious few meaningful productivity features that aren't also available in the vim ecosystem.
<Erik_Underline>
It is. But that stuff seems pretty advanced for a newb like me
<Erik_Underline>
I'm still a squire, I should learn how to fight before I become a knight myself.
<pipework>
Erik_Underline: Everything is advanced until you do it though, and then everything you've done is, more or less, quite easy. :D
timonv has quit [Ping timeout: 250 seconds]
<segfalt>
I'd been using Emacs for half a year and realized after watching a talk that I missed the power of vim. Now I use Spacemacs, so I get all the pain and benefits of both :-).
<Ox0dea>
Erik_Underline: It's dangerous to go alone! Here, take this: A,^Mdesc: ''^[^Wwjy$^WwP3j
AccordLTN has joined #ruby
NeverDie has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
<pipework>
segfalt: That neat helm thing is cool.
<Erik_Underline>
<Ox0dea> What is that
<Ox0dea>
Erik_Underline: That's the macro being used in the Vim demonstration.
<segfalt>
pipework: Overall, Spacemacs is very cool. Though it does leave you feeling unsure of how it all works, unlike if you home-brew your own .emacs.d/ collection.
Motoservo has quit [Ping timeout: 250 seconds]
<Ox0dea>
Erik_Underline: You record it into a "macro buffer" once, and then you can replay it as often as you like.
<pipework>
segfalt: Yeah, but I bet people who copy other people's vimrc's without going and playing with each and every bit feel the same.
<segfalt>
I have been having some issues with macros, ironically, I go to replay a macro (or even use '.' in some modes) and I get part of my macro inserted into my buffer. Very frustrating...
<segfalt>
pipework: Totally.
_djbkd has joined #ruby
<segfalt>
pipework: I never learned Vimscript or whatever, so I just had a huge .vimrc that confused me. I did spend some time learning elisp (It's more approachable in that you can hack on it right in the editor, with context and tab-completion).
Pathfinder has joined #ruby
<Ox0dea>
Using somebody else's config files is akin to eating food you've just seen them spit out.
<segfalt>
Lol.
<pipework>
segfalt: I don't know vimscript either. I just hack stuff together.
<segfalt>
Did they look happy when they spit it out? If so, fair game!
<Erik_Underline>
Why's poignant guide to Ruby is really weird
<pipework>
Erik_Underline: It's supposed to be rather fun instead of being like a textbook.
baweaver has quit [Remote host closed the connection]
snockerton has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elusiveother has joined #ruby
<Erik_Underline>
I love it, something you can finally relate to :D It reminds me of a method of remembering stuff I learned in elementary school, associate the boring stuff with crazy stuff and you'll remember it better :D
ochkoffein has quit [Ping timeout: 240 seconds]
<Ox0dea>
Erik_Underline: I did that for pi.
jessemcgilallen has joined #ruby
<hxegon>
Erik_Underline: back from being afk reading through history: about the 'i've barely even learned...' comment. I learned vim before I leared ruby. just saying.
<hxegon>
Erik_Underline: Integrated Development Environment. For example I have tests running in a split window, a linter running everytime I save that checks my syntax, and pry screw around in and check assumptions about the how language stuff works
<hxegon>
Erik_Underline: I also have keybindings that will run rubocop on my files to check for stylistic mistakes.
<pipework>
Erik_Underline: Vim is an editor, rubymine is an IDE.
keen__________ has quit [Ping timeout: 244 seconds]
linduxed has joined #ruby
<hxegon>
what he said
<hxegon>
but you can build an ide up around vim
<segfalt>
^^
devoldmx has quit [Remote host closed the connection]
<pipework>
Vim allows much more control so that you can DIY IDE between everything in your OS.
<Erik_Underline>
I really need a good IDE. I enjoy the one I find at codecademy, but that's because I've nothing to compare to.
<hxegon>
rubymine is nice from what I've heard
<pipework>
Erik_Underline: rubymine is the only worthwhile IDE that I know of for ruby.
jamesaxl|2 has joined #ruby
ochkoffein has joined #ruby
<Erik_Underline>
Oh, nice, thanks alot
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
<Erik_Underline>
It says FREE 30 DAY TRIAL on download page on official page :/
<pipework>
Erik_Underline: Yup.
<Erik_Underline>
It costs?
karapetyan has quit [Remote host closed the connection]
<pipework>
I know many people who don't like buying software that still buy rubymine.
Motoservo has quit [Read error: Connection reset by peer]
<hxegon>
(but vim is free <.< >.> )
karapetyan has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
<pipework>
If a chum wants an IDE, he can damn whale have himself an IDE.
Trieste has quit [Ping timeout: 268 seconds]
<Erik_Underline>
But I can make my own IDE with vim...
<Erik_Underline>
"can"
craysiii has joined #ruby
<Erik_Underline>
Can learn more specifically
<pipework>
You totally could! It's very DIY, but you can also find other people's stuff too.
arocketman has joined #ruby
h99h9h88 has joined #ruby
<hxegon>
Erik_Underline: installing syntastic is a good start
<hxegon>
Erik_Underline: and vundle to make plugin management easier
`tim` has joined #ruby
Trieste has joined #ruby
<hxegon>
Erik_Underline: (syntastic checks for syntax mistakes when you save a file)
`tim` has quit [Client Quit]
Renich has quit [Ping timeout: 246 seconds]
<hxegon>
Erik_Underline: I could even whip up a starter vimrc with comments and shit explaining everything
Renich has joined #ruby
<Erik_Underline>
I'd love that :D
karapetyan has quit [Ping timeout: 265 seconds]
sigurding has joined #ruby
bMalum has joined #ruby
<Ox0dea>
Erik_Underline: Do you have somewhere to put all these fish?
Chaoborid has joined #ruby
<Erik_Underline>
Fish?
snockerton has quit [Quit: Leaving.]
<Ox0dea>
> Give a man a fish...
<pipework>
Ox0dea: Give him many fish and he may die of food poisoning?
<hxegon>
Ox0dea: I started with a vimrc with syntastic, so I'm not too woried about it
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Erik_Underline>
Master believes in me. I can do it! :D
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
Dobby can do it!
ibouvousaime has joined #ruby
momomomomo has joined #ruby
SleepySensei has joined #ruby
<Ox0dea>
hxegon: The breadth of the net that Google permits students to cast is just ridiculous; it's almost morally reprehensible to duplicate the human effort that the machines can help save us from, and that while convincing a learner that knowledge is a dish best served on spoons.
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
arocketman has quit [Quit: Page closed]
<Erik_Underline>
It's interesting how so many people are joining and leaving at the same time, but only a few of us are talking. Are they staring at us... ;-;
Pumukel has quit [Ping timeout: 246 seconds]
Guest53 has joined #ruby
ochkoffein has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
senayar has joined #ruby
northfurr has joined #ruby
<segfalt>
Erik_Underline: Lots of people like to idle, and pop in for quick questions they can ask/answer. You're just seeing their computers go to sleep and wake up :)
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Remote host closed the connection]
<Erik_Underline>
Oh, okay
kfrz1 has quit [Quit: Leaving.]
h99h9h88 has joined #ruby
northfurr has quit [Client Quit]
musl has quit [Quit: WeeChat 1.1.1]
<Erik_Underline>
I think it could improve the interface if those messages were in another bar on the side
kfrz has joined #ruby
jenrzzz has joined #ruby
<hxegon>
I use /ignore * JOINS PARTS QUITS
<hxegon>
Erik_Underline: which gets rid of that
<Erik_Underline>
Nice!
<pipework>
I just keep them in because I don't need to read every line in here.
SOLDIERz has joined #ruby
Motoservo has joined #ruby
axl_ has quit [Quit: axl_]
doddok has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 250 seconds]
<hxegon>
Ox0dea: the depth and bredth of the vim pond is enormous. I'm not going to send a man/woman into a hurricane without a boat. YOU WON'T TAKE THIS ONE EMACS. NOT ON MY WATCH *shakes fist*
<hxegon>
not realistic. that octopos needs more footpetals
<hxegon>
octopus*?
big|bad|wolf has joined #ruby
mikeharris22 has joined #ruby
<Ox0dea>
Oh, hey, /r/unixporn!
<Erik_Underline>
Emacs users at work must be those hackers on TV we see everytime
big|bad|wolf has quit [Client Quit]
<hxegon>
Ox0dea: love that sub
tvw has quit [Remote host closed the connection]
<hxegon>
xmonad4lyfe
<Ox0dea>
Did you mean dwm?
<Ox0dea>
(I'm sick.)
<hxegon>
Ox0dea: DWM is for people who don't give up after 11 hours of looking at a config
jenrzzz has quit [Ping timeout: 268 seconds]
<hxegon>
Ox0dea: who give up*
<adaedra>
herbstluftwm <3
_djbkd has quit [Remote host closed the connection]
<Erik_Underline>
hxegon /ignore * JOINS PARTS QUITS doesn't work :O Neither when I replace * with JOINS etc
<hxegon>
hmm
<Ox0dea>
hxegon: I'm not sure I follow. I fuckin' love writing C to customize my WM.
momomomomo has quit [Quit: momomomomo]
<Ox0dea>
(See my earlier parenthetical.)
<hxegon>
Ox0dea: we both got it bad. xmonads config is straight up haskell code
`tim` has joined #ruby
<Erik_Underline>
hxegon, thanks btw for that vim stuff
Soda has quit [Quit: Soda]
momomomomo has joined #ruby
<hxegon>
Erik_Underline: no prob. you still have to figure out where to put that, how to install vundle, and how to use vundle to install syntastic though
Hounddog has quit [Remote host closed the connection]
<crossbeau>
hi guys, I am trying to use 'some params filesource="sourcefile" some params' how should I get this to allow the "" inside 'some params filesource=\"source\" some params'
musl has quit [Quit: WeeChat 1.1.1]
musl has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yeticry has quit [Ping timeout: 255 seconds]
_djbkd has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 268 seconds]
_djbkd has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
symm- has joined #ruby
civil_ has quit [Ping timeout: 255 seconds]
<hxegon>
"some params filesource=\"source\" ..." not working?
<Ox0dea>
>> %q{"Let's use '"q"u'o"t"e's'"} # crossbeau
Macaveli has quit [Read error: Connection reset by peer]
phatypus has joined #ruby
Macaveli has joined #ruby
phatypus has quit [Client Quit]
Testo has joined #ruby
cdg has joined #ruby
<adaedra>
Erik_Underline: also, if you want, I can fix your other sentence in -offtopic :p
tvw has joined #ruby
chrislotix has joined #ruby
Guest53 has joined #ruby
<Erik_Underline>
Sure
opensource_ninja has joined #ruby
Rollabunna has joined #ruby
bruno- has joined #ruby
NeverDie_ has quit [Max SendQ exceeded]
JDiPierro has quit []
JDiPierro has joined #ruby
lacrymol1gy has quit [Quit: leaving]
<Testo>
Hi all, I have yaml file with line: `other: ! "%{count} days"` why `!`? thanks in advanced.
NeverDie has joined #ruby
momomomomo has quit [Quit: momomomomo]
quazimodo has joined #ruby
FrankD_ has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
Puck6633 has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
linduxed has joined #ruby
<chrislotix>
Hey folks, I have a question. Ruby docs are quite unclear so i'm trying to make sure. I'm doing "Learn ruby the hard way" and there's a line: txt = open(filename). What does open return that you can store in a variable?
Puck6633 has joined #ruby
crossbeau has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
arthurix_ has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
nemo_ has quit [Read error: Connection reset by peer]
nemo_ has joined #ruby
<mistym>
chrislotix: open returns a File object, if you're opening a file.
darthdeus has left #ruby ["Leaving"]
<hxegon>
chrislotix: File, so File.read to get contents for example
<adaedra>
what is the expected output vs the actual output?
bruno- has joined #ruby
Gi0 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Mateusz_ has joined #ruby
stamina has joined #ruby
arthurix_ has quit [Ping timeout: 240 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<Mateusz_>
I have a code that I intented to package as gem. My problem is that this code is using cache (to prevent repeated expensive API requests). Is there guideline where code packaged as gem should keep its cache? Maybe user should be forced to call "set_cache_path(path)" before using any functionality provided by gem?
phil6kites has joined #ruby
<Mateusz_>
Is there some guideline how gem should storing their caches?
sepp2k has quit [Quit: Leaving.]
Motoservo has joined #ruby
Coldblackice has joined #ruby
skade has quit [Read error: No route to host]
Pumukel has joined #ruby
<drbrain>
Mateusz_: there's no guidelines
bruno- has quit [Ping timeout: 250 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
<drbrain>
Mateusz_: if it's a per-process cache, use Dir.mktmpdir or Tempfile
blue_deref has joined #ruby
agit0 has joined #ruby
<drbrain>
if it's a cross-file cache, make a ~/.my_library_name/cache directory
ngscheurich has quit [Ping timeout: 250 seconds]
<drbrain>
err, cross-process
Testo has quit [Remote host closed the connection]
Testo has joined #ruby
momomomomo has joined #ruby
ledestin has joined #ruby
<Mateusz_>
So using "~/.my_library_name/cache" is normal? I though about it but it seemed to be an ugly solution (though I failed to find something better, explicit setting cache leads to really ugly boilerpalte code)
momomomomo has quit [Client Quit]
platzhirsch has joined #ruby
<treehug88>
Mateusz_ : yup, that's pretty normal on unix. On Mac and windows they have different conventions
<Mateusz_>
drbrain: Thanks!
<adaedra>
cache usually goes in /tmp if you don't need it to stay too long.
timonv has joined #ruby
<Mateusz_>
treehug88: Thanks! At this moment I want to have it working anywhere, I will worry about Win once/if somebody will want to use it except me :)
<drbrain>
it's best to use Tempfile or Dir.mktmpdir if the cache is ephemeral, it'll end up in /tmp and disappear when your process exits
akem has quit [Quit: Bye]
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
<Mateusz_>
I found Tempfile and Dir.mktmpdir but I want cache to stay at least for days, maybe longer.
Erik_Underline has quit [Ping timeout: 246 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
ochkoffein has quit [Ping timeout: 260 seconds]
<Mateusz_>
So ~/.something/ is the way to go, win/mac will be problematic but I may leave it for later.
synthroid has quit []
<adaedra>
Mateusz_: it's ok for mac too.
<Ox0dea>
Mateusz_: How about Gem.datadir, then?
<Ox0dea>
It's not got the greatest name as a place for cache data, but it's at least cross-platform.
<adaedra>
Anyway, if your program is meant to run as daemon, maybe do it a place with right access in /var/cache .
Erik_Underline has joined #ruby
<Ox0dea>
adaedra: Write it right.
Musashi007 has quit [Quit: Musashi007]
diegoviola has quit [Ping timeout: 265 seconds]
<adaedra>
?
<Ox0dea>
> right access
<treehug88>
adaedra 's idea is good too
<Erik_Underline>
Why do I keep disconnecting while inactive?
<Ox0dea>
Erik_Underline: Get a better client?
diegoaguilar has quit [Remote host closed the connection]
loechel has joined #ruby
rwilcox has quit [Ping timeout: 268 seconds]
<adaedra>
Erik_Underline: computer inactive? It may disconnect when going into sleep mode.
<Erik_Underline>
Better clients like what?
<Erik_Underline>
I'm on other tabs in the browser
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
What year is it?
<Erik_Underline>
...
h99h9h88 has joined #ruby
<Ox0dea>
Erik_Underline: You can't have anything running but a browser?
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__chris has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
Testo has quit [Ping timeout: 260 seconds]
Oatmeal has joined #ruby
allomov has quit [Remote host closed the connection]
<Ox0dea>
Mateusz_: That's about the size of it, but the directory doesn't automatically exist for each gem.
<beanHolez>
I am using a cookie session storage for my app. Sometimes, a user will accidentally open two browser windows when logging in. They will do what it is they need to do and close the window. Another user will come along and attempt to log in with the window the previous user accidentally opened, but because the previous user logged in with both windows open, the new user is now authenticated as the previous one. What are my choices here?
JDiPierro has quit [Remote host closed the connection]
<Mateusz_>
Ox0dea: So I need to create it... Can I expect it to work across different OSes?
<Ox0dea>
Mateusz_: You create 'data/foo/' in your top directory, and then you've got access to it via Gem.datadir('foo') wherever it ends up getting put on the user's system.
Motoservo_ has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Motoservo_ is now known as Motoservo
<Ox0dea>
beanHolez: cookie != session
duckpuppy has quit [Ping timeout: 260 seconds]
unshadow has joined #ruby
unshadow has quit [Client Quit]
northfurr has quit [Quit: northfurr]
sepp2k has joined #ruby
unshadow has joined #ruby
momomomomo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
Z00t has quit [Ping timeout: 240 seconds]
<beanHolez>
Ox0dea: A cookie containing the session_id (which is set across all browser windows) is not representative of the session?
Pathfinder has joined #ruby
moeabdol1 has quit [Ping timeout: 250 seconds]
lesshaste has joined #ruby
lesshaste has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
enigmaty has quit [Remote host closed the connection]
to_json has quit [Quit: Leaving.]
<Ox0dea>
beanHolez: It is, but you needn't be using the same session_id in different browser windows.
ruurd has joined #ruby
<Ox0dea>
You could either invalidate any existing sessions upon login, or else consider a session invalid after a certain period of inactivity.
<beanHolez>
Ox0dea: Definitely not. The problem, though, is that the cookie is set for both open windows when the first user logs in. Therefore, the second user thinks they are logging in as themselves when they are really piggybacking off of the existing cookie that has already been set.
ESpiney__ has quit [Quit: Leaving]
mjuszczak has joined #ruby
<beanHolez>
I thought so as well, but when I clear_session, it doesn't seem to do the job. Was sure I was missing something
davedev2_ has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
shpoont has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
mjuszczak has quit [Client Quit]
pdoherty has joined #ruby
skade has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
niemcu has quit [Ping timeout: 240 seconds]
shpoont has quit [Max SendQ exceeded]
Motoservo has quit [Ping timeout: 264 seconds]
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
shpoont has joined #ruby
Kero has quit [Quit: Lost terminal]
gregoriokusowski has quit [Quit: gregoriokusowski]
Motoservo has joined #ruby
shpoont has quit [Client Quit]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
rbennacer has quit [Remote host closed the connection]
prestorium has quit [Quit: Leaving]
hxegon_ has joined #ruby
rbennacer has joined #ruby
<beanHolez>
Hmm, telling me "Can't verify CSRF token authenticity"
Motoservo has quit [Read error: Connection reset by peer]
shpoont has quit [Client Quit]
SleepySensei has quit [Read error: Connection reset by peer]
<beanHolez>
karapetyan: Are you certain based on your inputs that circle.size will ever be exactly 1? Usually, you'll want to use >= or <= for those kinds of conditions
<adaedra>
This calls for the most basic form of debugging, the "puts-debug"
rbennacer has quit [Ping timeout: 250 seconds]
mjuszczak has joined #ruby
<karapetyan>
beanHolez: no, size will be 1 finally. cause inside loop i delete elements untill array.size == 1
<karapetyan>
and array.size == 1 is condition for finish loop
jessemcgilallen has joined #ruby
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
<adaedra>
karapetyan: what beanHolez says, is that usually the stop is done on the invalid range, not just the edge case. i.e., if you want to go up to 20, until i > 20 rather than until i = 20
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Erik_Underline has joined #ruby
ruby-lang519 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
EmeraldExplorer has joined #ruby
<adaedra>
karapetyan: you should put a puts to inspect how your array or maybe other variables behave at each iteration and check if that match indended behavior.
<karapetyan>
ok, thank you.
sepp2k1 has joined #ruby
Motoservo has joined #ruby
<ruby-lang519>
Hello! In define_singleton_method description(http://apidock.com/ruby/Object/define_singleton_method) it mentions that one could specify method body in a block. Is it possible to specify parameters to that method?
everbot has joined #ruby
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
shpoont has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
<Ox0dea>
>> define_method(:foo) { |a, b| a + b }; foo 17, 25 # ruby-lang519
<riceandbeans>
if I have method foo that returns type int, and I have some not so bright person that made the type on the other end require a string for whatever reason and I can't fix his code, can I just do foo.to_s or how would I have to do it?
<adaedra>
But you don't need to /master/ it.
<karapetyan>
Erik_Underline: i have some issues writing nested loops. It's always wrong and i spent 30-60 mins on debugging and fixing. I think it's not impressive
<riceandbeans>
bar = foo, bar.to_s ?
Alina-malina has quit [Read error: Connection reset by peer]
<Ox0dea>
karapetyan: Well, I suggested #rotate earlier and you didn't go for it.
<Ox0dea>
You don't really need to bother about remembering indices; everybody's wearing an ID card.
<riceandbeans>
Ox0dea: thank you
<karapetyan>
Ox0dea: ah, yes. Sure. Syntax sugar it's really handy, but i trying to understand how it works inside
<Ox0dea>
karapetyan: #rotate isn't syntactic sugar; it's the perfect method for the Josephus problem.
NeverDie has joined #ruby
Motoservo has joined #ruby
<karapetyan>
Ox0dea: i understand. Anyway i want to try solve it by my way first and after using #rotate
<Ox0dea>
karapetyan: Imagine you're the Roman general: how would you carry out the proceedings most efficiently?
TheHodge has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 240 seconds]
<karapetyan>
Ox0dea: group all warriors by 3 and kill last warrior in each 3 groups (if i correctly understood question)
Thomas-0725 has joined #ruby
<Ox0dea>
karapetyan: No, that's completely missing the point of the exercise.
<Ox0dea>
What does it mean to "group [them] by 3"?
<Ox0dea>
Where do the other two go when they lose their comrade?
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
EllisTAA has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<karapetyan>
hm, let me think :)
<Ox0dea>
karapetyan: You've got them in a circle, and you're looking at the kth Jew, the first victim.
<Ox0dea>
You kill him, and now there's a gap in the circle; what's your next move?
Silverfall has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
blue_deref has quit [Ping timeout: 244 seconds]
<karapetyan>
put another victim in a gap?
<Ox0dea>
karapetyan: And leave a different gap elsewhere, or?
sankaber has quit [Remote host closed the connection]
<Ox0dea>
What happens if you tell them to form up to make the circle complete again?
Erik_Underline has quit [Ping timeout: 246 seconds]
lipoqil has joined #ruby
<karapetyan>
narrow a circle ?
sankaber has joined #ruby
<karapetyan>
well there will be a circle again with -1 warrior :/
pepperbreath has joined #ruby
<karapetyan>
okay i can kill nth warrior and narrow circle after killing
agit0 has joined #ruby
Mateusz_ has quit [Quit: Page closed]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has joined #ruby
<karapetyan>
Ox0dea: well, all warriors that stays after victim change their index -1
<Ox0dea>
karapetyan: Okay, the first warrior is dead and the circle has been reformed; you're comfortable where you're standing, so what do you tell the Jews to do in order to bring your next kill to you?
_djbkd has quit [Remote host closed the connection]
<yorickpeterse>
My most hated methods are Array#flatten and Array#compact
bMalum has quit [Quit: bMalum]
<yorickpeterse>
Not because they are not useful, they are, but because they're incredibly often abuse in Rails code
Motoservo has joined #ruby
rbennacer has joined #ruby
<karapetyan>
Ox0dea: well, thank you anyway. Can't say that i understood how to solve this task, but now i'l try
<yorickpeterse>
the combination of "flatten.compact" or "compact.flatten" is far too common
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sasi has joined #ruby
skade has joined #ruby
<Ox0dea>
yorickpeterse: But which is better?
<yorickpeterse>
This thing called an "if statement"
<sasi>
I want to use gem_openssl that was downloaded via rubygems.. I'm trying to use check_validity on an object of type OpenSSL:X509:Certificate
Jackneill has quit [Ping timeout: 246 seconds]
Kero has joined #ruby
<yorickpeterse>
The combination is often abused when pushing objects that might be nil into an array
<yorickpeterse>
so instead of being a good citizen and checking before pushing people just chain 120938109231 methods like it's jQuery
<sasi>
I keep getting the error undefined meethod check_validity for OpenSSL:X509:Certificate
<zenspider>
I also hate that we don't have a good word for non-empty in english
<sasi>
What am I missing>
<sasi>
?
<Ox0dea>
zenspider: Occupied.
<yorickpeterse>
zenspider: "any?" would be my first thought
ramfjord has joined #ruby
h99h9h88 has joined #ruby
<Ox0dea>
yorickpeterse: But [nil] is non-empty.
sdothum has joined #ruby
FungalRaincloud has joined #ruby
<ramfjord>
Is there something like module_function for classes? IE a function that declares an instance method from a symbol representing a class method?
<sasi>
The method is there in the gem_openssl rubygem
Pumukel has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Ox0dea: that was in reference to blank?
<zenspider>
yorickpeterse: [false]
<yorickpeterse>
zenspider: not sure what blank? would do in that case
<hxegon_>
zenspider: Ox0dea inhabited might be better
tkuchiki has quit [Remote host closed the connection]
beanHolez has quit [Remote host closed the connection]
<sasi>
Do I need to do anything else?
tvw has joined #ruby
<zenspider>
you see it IN RUBYGEMS itself?
Timba-as has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<zenspider>
code to the API, not to random code you find
<sasi>
Yeah, its in gem_openssl.rb which is in rubygems/ folder
Timba-as has joined #ruby
<sasi>
Sorry for being a completely ruby noob
<zenspider>
no prob... just make sure you're using actual api
<sasi>
What do you mean? shouldn't I use the gem_openssl.rb?
<Ox0dea>
zenspider: Are you telling sasi to copy and paste?
_djbkd has joined #ruby
<zenspider>
sasi: no, you shouldn't depend on the internals of some other project. they can change at any time
<zenspider>
Ox0dea: are you causing problems?
dhollinger has quit [Quit: Leaving]
<sasi>
Oh, I see. I'll see if I can use some method from the class directly. Thanks a lot zenspider!
polishdub has quit [Quit: Leaving]
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
<zenspider>
good luck
mjuszczak has joined #ruby
umgrosscol has joined #ruby
Rickmasta has joined #ruby
<Ox0dea>
sasi: Might I suggest #verify and the @not_before instance variable?
Motoservo has joined #ruby
mike3 has joined #ruby
FungalRaincloud has quit [Quit: Leaving.]
tvw has quit [Ping timeout: 256 seconds]
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
dopamean_ has quit [Ping timeout: 252 seconds]
p0wn3d__ has quit [Ping timeout: 250 seconds]
blue_deref has joined #ruby
mordocai has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Motoservo has joined #ruby
kriskropd_ has quit [Ping timeout: 260 seconds]
<sasi>
Hey zenspider, how do I create an Object of type Certificate?
<sasi>
And not OpenSSL:x509:Certificate
<sasi>
And one more thing: my project is guaranteed to be on ruby 1.8.7 for life
vF3hNGxc47h8 has joined #ruby
<sasi>
Oxodea, thanks, how do I do that?
arthurix_ has joined #ruby
Gi0 has quit [Changing host]
Gi0 has joined #ruby
skinux has joined #ruby
<skinux>
Someone in here had stated its' difficult to have an IDE for Ruby because it's interpreted. I would like to know why it's so difficult compared to PHP or Python which are also interpreted languages?
bb010g has quit [Quit: Connection closed for inactivity]
mike3 has quit [Quit: Leaving]
arthurix has quit [Ping timeout: 255 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<c355E3B>
skinux: its not so much the interpretation bit as the metaprograming stuff
Motoservo has joined #ruby
<skinux>
What exactly is the "meta programming" of Ruby??
<c355E3B>
stuff like `define_method` `missing_method` etf
<skinux>
When I think of meta I think of HTML <meta name="this" content="that"/ >
<c355E3B>
*etc
leafybasil has quit [Remote host closed the connection]
<i8igmac>
im trying to insert into a mysql database a single \
<i8igmac>
%-UPDATE `compress`.`hash` SET `sub` = '\' WHERE `hash`.`ID` =55; -
<i8igmac>
%-UPDATE `compress`.`hash` SET `sub` = "\" WHERE `hash`.`ID` =55; -
<i8igmac>
"\" or '\' fails
<c355E3B>
skinux: the short of it is that its hard to understand what methods are available by inspecting the source.
dopie has quit [Quit: This computer has gone to sleep]
umgrosscol has quit [Remote host closed the connection]
<i8igmac>
'\' => ''
whippythellama has quit [Quit: WeeChat 1.3]
<skinux>
Hmm. I thought IDEs used API documentations or some kind of stored lists to know what methods are available.
<i8igmac>
"\" => \"\"
vF3hNGxc47h8 has quit [Ping timeout: 246 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<c355E3B>
skinux: some do, i think eclipse does that heavily for java
<skinux>
Why couldn't it be done for Ruby?
<c355E3B>
AFAIK Rubymine has done some of it
yfeldblu_ has quit [Remote host closed the connection]
<c355E3B>
you run into issues though on features like jump to method definition
<c355E3B>
if the method is really implemented with missing method and has no "real" location in source
<skinux>
Oh. Apparently missing_method isn't what I thought it was.
<Ox0dea>
skinux: *method_missing
<ytti>
meta is about self-referencing
<skinux>
I thought missing_method would return true or false depending on whether or not the method exists.