<toretore>
i hate reading `def initialize foo, bar=2`
<Atomicalloy>
Yea that looks a bit weird
<bricker>
I see `some_name` is a reference, and `some_name()` is an action
<xxneolithicxx>
its one of those things where it doesnt matter, its returning a value and it looks more rubyish if its not there when it doesnt take parameters
Aww has joined #ruby
<bricker>
but without parens, you just don't know with the former
<bricker>
Either parens, or explicit receiver
<bricker>
(where possible)
AlphaAtom has quit [Ping timeout: 245 seconds]
<Atomicalloy>
So, initializer is the Ruby's constructor, right?
<bricker>
yes
<xxneolithicxx>
initialize
<toretore>
if it can be replaces by a local variable and nobody would notice, leave the parens
<harlen>
it would say obj.foo(bar), instead of obj.foo bar; as i wrote, i think.
<Atomicalloy>
Yea does make more sense also
cpt_yossarian has quit [Quit: And then he took off.]
<Atomicalloy>
The former
nii236 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpt_yossarian has joined #ruby
thatslifeson has quit [Remote host closed the connection]
PhantomSpank has quit [Remote host closed the connection]
<havenwood>
Atomicalloy: parens if it breaks the interpreter to not have them, Seattle style
dorei has quit []
ismaelga has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
michaeldeol has quit [Ping timeout: 252 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdarby has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has joined #ruby
WajidKagzi has quit [Ping timeout: 250 seconds]
amclain has joined #ruby
drocsid has quit [Quit: Lost terminal]
kblake has joined #ruby
doodlehaus has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Quit: ZNC restarting...]
fgo has quit [Ping timeout: 248 seconds]
jeramy_s has joined #ruby
simplon27 has joined #ruby
philip1 has quit [Ping timeout: 272 seconds]
simplon27 has left #ruby [#ruby]
yfeldblu_ has joined #ruby
<Hamled>
is this the right channel to ask about ruby C extension code?
bricker has quit [Ping timeout: 250 seconds]
TinkerTyper has joined #ruby
<eam>
Hamled: sure
<Hamled>
I'm running into a really odd situation... I have a rails project which uses the bcrypt gem, and when that gem's code calls __bc_crypt, the entry point to its C implementation
<Hamled>
if it calls __bc_crypt and passes in the password string that it gets from form data
<Hamled>
in the C code that string has extra characters
<Hamled>
if I call it directly in rails console with a literal string (the exact same string) no extra characters
baroquebobcat has quit [Quit: baroquebobcat]
kblake has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
<Hamled>
Is there any way I can try to detect the difference between these two strings on the rails side? I can only see the difference by doing some debug output and calling ValueStringPtr()
<Hamled>
on the C side
cjim_ has joined #ruby
narcan has joined #ruby
lidensk__ has quit [Ping timeout: 256 seconds]
McRae has quit [Ping timeout: 250 seconds]
<Hamled>
here's the relevant code: https://gist.github.com/Hamled/2490a515337fde9c992d In the output you can clearly see that the second call to __bc_crypt (the one that uses secret.to_s instead of a literal) has two extra characters
pengin has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
claptor has joined #ruby
wolflee_________ is now known as wolflee
robustus has quit [Ping timeout: 264 seconds]
horsecowdog has quit [Remote host closed the connection]
iamninja has quit [Read error: Connection reset by peer]
robustus has joined #ruby
iamninja has joined #ruby
doodlehaus has joined #ruby
reinaldob has quit [Ping timeout: 276 seconds]
<Hamled>
oh nevermind, someone has an issue for this exact thing already
mistermocha has quit [Read error: Connection reset by peer]
JDiPierro has joined #ruby
freerobby has quit [Quit: Leaving.]
mistermocha has joined #ruby
<quazimodo>
so
<Radar>
hi
<quazimodo>
why do I need teaspoon and teaspoon-guard when guard-jasmine just works
<quazimodo>
hi Radar
cmckee has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<quazimodo>
anyone know?
<quazimodo>
the advantage of using teaspoon?
x1337807x has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 248 seconds]
cmckee has quit [Client Quit]
serivichi has joined #ruby
Lucky__ has joined #ruby
haxrbyte has joined #ruby
Brozo has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
Joffily has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
diegoaguilar has joined #ruby
pontiki has joined #ruby
<pontiki>
rehi
haxrbyte has quit [Ping timeout: 256 seconds]
serivichi has quit [Ping timeout: 255 seconds]
swgillespie has joined #ruby
mjuszczak has quit []
mleung has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
ponga has joined #ruby
FernandoBasso has quit [Quit: leaving]
mleung has quit [Client Quit]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar>
quazimodo: Gives you more precision than a tablespoon iirc
<Radar>
True facts: nobody truly knows how many teaspoons fit into a tablespoon.
yfeldblu_ has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
shazaum has joined #ruby
bmurt has quit []
a346 has quit [Remote host closed the connection]
a346 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sprink has joined #ruby
<sprink>
Hi. Would anyone be kind enough to recommend a ruby stack to write 2d games with?
sankaber has joined #ruby
GriffinHeart has joined #ruby
<sprink>
on OSX
arescorpio has joined #ruby
Musashi007 has joined #ruby
tkuchiki has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dstarh has joined #ruby
<Nilium>
Because of the web dev take-over of Ruby, there's not really anything for game dev other than I think RPG Maker and that other thing unless you like the idea of writing a game engine.
<sevenseacat>
we didn't mean it, honest.
<Nilium>
Lies
<Nilium>
Also, speaking of web dev stuff, I was reviewing a code sample today and someone had submitted plagiarized w3schools code. It was kind of amazing.
<sprink>
lol
<sevenseacat>
wow
<Nilium>
For a moment, I felt like I had struck gold because of how weird it was.
a346 has quit [Read error: Connection reset by peer]
<sprink>
this is the best I could find
<Nilium>
Gosu is that other one I forget the name of always
oo_ has quit [Remote host closed the connection]
jottr_ has joined #ruby
<Nilium>
I still find it kind of weird that RPG Maker uses Ruby, but it's Japanese, so that might explain it
<sprink>
I guess it'll work. I was more or less curious if there was a more popular choice, but based on your comment I imagine it's probably the only ;)
<ponga>
what's Gosu mean anyway
<Nilium>
Dunno. Reminds me of gyoza.
<sprink>
it means really skilled in korean
<ponga>
Nilium: people think python is minority in japan
<ponga>
is that explain you
<Nilium>
I wrote GL bindings, a 3D math gem, etc. for Ruby, so I'm in the "write your own engine" camp
<ponga>
damn it sprink i didn't know so until this day altho im korean
* ponga
is shamed
dvlwrk has joined #ruby
wolflee_________ has joined #ruby
<sprink>
gosu is used a lot in video gaming communities, like starcraft. , that's only reason I know it
<sprink>
lots of koreans play that game
<ponga>
play'ed' that game yeah
<ponga>
that was national sport
<sprink>
see :)
<ponga>
true even i played starcraft
balazs has joined #ruby
<sprink>
so yeah, that's where I heard the word, in starcraft, from koreans
<zotherstupidguy>
ponga i watched that on national geographic =)
<ponga>
oh so that's how it slip into English vocab
<zotherstupidguy>
but isnt the word is japanese?
<zotherstupidguy>
it means the upper hand or somthig
<ponga>
no Japanese doens't have gosu
<Nilium>
ponga: Might explain it? I'm not Japanese and don't keep track of programming language adoption there.
<ponga>
im fluent in it, so i know
serivich has joined #ruby
<zotherstupidguy>
go, su, those are japaense kana
<ponga>
zotherstupidguy: coiencidently yes
<ponga>
but that's just because both kor/jap rely on chinese characters for nouns
<zotherstupidguy>
ponga i see, so what does it mean in what langauge?
<Nilium>
Ruby, however, is from Japan, and the Japanese do kind of have a tendency to favor Japanese things like other people do with stuff from their nations
<sprink>
from wiki page on gosu: The origin of the term is from hanja/hanzi: 高手, literally "high hand", also meaning pro or highly skilled at something,
wolflee has quit [Ping timeout: 252 seconds]
<sprink>
it means both apparently
PhantomSpank has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
<ponga>
zotherstupidguy: etymology of japanese/korean rely heavily on chinese and phonetics for noun is very similar
<Nilium>
i.e., if you ask an American if "made in America" makes something automatically better, the answer is probably yes and probably not for any good reason.
<ponga>
and reading for 高手 in japanese is not 'gosu'
<ponga>
it should be koushu
aclapinpepin has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<sprink>
Nilium: true. :)
doodlehaus has joined #ruby
<sprink>
America is #1 duh
<sprink>
:p
<zotherstupidguy>
Nilium japanese culture puts a lot of pressure on creating good things in service to the ppl, maybe thats why they think japaene product is more considerating to ppls needs. like with cellphones, japanese cellphones are unique
<ponga>
sprink: no wonder i bought Made in USA juice glass yesterday
<ponga>
over Made in China
<sprink>
America could be the worst country on the planet and we'd still think we're #1
<Nilium>
zotherstupidguy: Don't know. I think it's just another form of nationalism.
djbkd_ has joined #ruby
<zotherstupidguy>
i think there is more to it than that.
<Nilium>
Probably.
doodlehaus has quit [Remote host closed the connection]
<zotherstupidguy>
its like fear that someone from another culture wouldn't be as considerate as the exceptations is set to be
<Nilium>
Would rather leave it to sociologists and historians to work out.
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
<Nilium>
I'm in no position to explain Japan.
michael_mbp has quit [Excess Flood]
dseitz has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
dseitz has joined #ruby
<ponga>
i can't agree with 'japanese is considerating' anymore
<ponga>
their android phone is shit
moeabdol has joined #ruby
<zotherstupidguy>
Nilium who is!? we are all gaijins hehe
<_blizzy_>
I'm trying to use Mini_Magick with Rails, however, I keep getting "Photo Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
<_blizzy_>
"
<_blizzy_>
even though I have it installed. I'm using Windows 8.1
<ponga>
_blizzy_: #Ruby_on_Rails
<_blizzy_>
ponga, yeah, that's not the most helpful channel.
workmad3 has joined #ruby
<ponga>
is it not?
<ponga>
damn
<ponga>
i never go there , didn't realise
<Nilium>
Isn't it just #rails or #rubyonrails?
<zotherstupidguy>
from the error you need to install imagemagick?
<_blizzy_>
there are Linux elitists in there.
<sevenseacat>
it is helpful, but we cant diagnose things like windows problems
<Nilium>
I'm a BSD elitist.
<zotherstupidguy>
it is $rubyonrails
horsecowdog has quit [Remote host closed the connection]
<sevenseacat>
and we're not elitists, thanks.
<Nilium>
I AM.
<Nilium>
BSD FOREVER.
<zotherstupidguy>
what kind of BSD?
michael_mbp has joined #ruby
<Nilium>
FreeBSD.
shazaum has quit [Quit: Leaving]
<Nilium>
Alternatively, if you're working on a microwave, NetBSD.
<zotherstupidguy>
_blizzy_ what operating system u using?
<_blizzy_>
sorry, sevenseacat c:
<Radar>
_blizzy_: Hi, I'm here too tyvm.
<zotherstupidguy>
oh, windows!
<_blizzy_>
sorry, Radar
<Nilium>
OpenBSD's also nice for servers.
djbkd_ has quit [Ping timeout: 272 seconds]
<Radar>
_blizzy_: Show it, don't say it.
Guest59264 is now known as _chs_
<zotherstupidguy>
Nilium vim or emacs?
<_blizzy_>
Radar, IDK how I could show it from an IRC
<Nilium>
Vim, clearly.
Akagi201 has joined #ruby
<havenwood>
Nilium: wget or curl?
<Nilium>
wget.
<Nilium>
I have a personal hatred of using curl.
<zotherstupidguy>
Nilium breakingbad or game of thrones?
weemsledeux has joined #ruby
<Nilium>
Uh, haven't seen Game of Thrones, so I can't make that choice.
lidenskap has joined #ruby
<Nilium>
I'm sorry that I can't set you straight on this.
<zotherstupidguy>
Nilium fav BSD book?
moeabdol has quit [Ping timeout: 248 seconds]
<sevenseacat>
game of thrones is awesome.
<Nilium>
Don't have any, so we'll just go with the FreeBSD handbook
workmad3 has quit [Ping timeout: 256 seconds]
6JTAA0KE4 has joined #ruby
konsolebox has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_blizzy_>
lol this is funny
RegulationD has joined #ruby
<sevenseacat>
very.
<_blizzy_>
yeah, this video I'm watching
Sawbones_ has joined #ruby
<Nilium>
(use bsd)
<Nilium>
Just imagine a bearded person whispering that into everyone's ear and you basically have me.
<zotherstupidguy>
have u installed imagemagick from binary or built from source?
<Nilium>
I've done both at one point or another.
<_blizzy_>
zotherstupidguy, binary
<sevenseacat>
Nilium: thats slightly creepy.
<Nilium>
I'm good at that.
balazs has quit [Remote host closed the connection]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
inavele has joined #ruby
balazs has joined #ruby
shellfu_afk has joined #ruby
kblake has joined #ruby
<zotherstupidguy>
_blizzy_ gist the output error is a start
<_blizzy_>
zotherstupidguy, there is no output error
<_blizzy_>
I'm looking in development log
fgo has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
<Nilium>
I am a tired person.
<_blizzy_>
sleep thene.
<Nilium>
At least I got to deploy a thing today.
<sevenseacat>
Nilium: go get some rest and resume being awesome tomorrow.
serivich has quit [Ping timeout: 255 seconds]
<_blizzy_>
I'm sorry everyone if I was being a dick or rude.
<_blizzy_>
*if I.
<zotherstupidguy>
not at all!
<_blizzy_>
thxs :)
djbkd_ has joined #ruby
blt has joined #ruby
krz has joined #ruby
<zotherstupidguy>
well, best rails guy awake here i knw is radar =)
towski_ has quit [Remote host closed the connection]
<Radar>
hi what
<Radar>
what have I been tricked into this time?
konsolebox has quit [Quit: Leaving]
<_blizzy_>
sorry also, Radar. really am. you too, sevenseacat
<_blizzy_>
c:
<zotherstupidguy>
_blizzy_ needs a helping hand with rails/imagemagick/windows thingy
konsolebox has joined #ruby
<sevenseacat>
we know.
<Nilium>
Oh I should get ice cream
<Nilium>
And then watch youtube videos
<Nilium>
Yes
<Radar>
zotherstupidguy: He's cross-posting and it's now coming to a close.
<Radar>
zotherstupidguy: He's getting help in #rubyonrails
<zotherstupidguy>
Radar great!
kblake has quit [Ping timeout: 272 seconds]
gazay_ has quit [Ping timeout: 276 seconds]
<_blizzy_>
cross-posting is for cool people.
<sevenseacat>
...
<_blizzy_>
...?
<sevenseacat>
you know what you just said about being a dick?
fgo has quit [Ping timeout: 250 seconds]
<_blizzy_>
yes?
<sevenseacat>
you probably should stop doing it now.
PhantomSpank has quit [Read error: No route to host]
<sevenseacat>
those arent class methods, they're instance methods.
PhantomSpank has joined #ruby
<sevenseacat>
if they were class methods, they'd typically be prefixed with self.
<Atomicalloy>
Oh, it's called instance methods in Ruby.
<Atomicalloy>
Ah okey.
<sevenseacat>
i dont know c++, so your example means nothing to me
sent1nel has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<Atomicalloy>
The C++ code, a class Person, where Person(...) is the constructor (initialize in Ruby) taking a string argument and initialize a class variable (instance variable in Ruby) called name with the value of n(n is the argument passed).
<sevenseacat>
no, class variables are something different in ruby.
jack_rabbit has joined #ruby
Limix has joined #ruby
<sevenseacat>
class variables are like static variables in other languages.
<Ellis>
so an API is a set of instructions on how to get data from another APP?
<sevenseacat>
the best language i have to compare stuff with is php, which may or may not help you.
<Atomicalloy>
sevenseacat, I see. So private in C++ is for the implementation, variables you can only access thru the implementation (public functions)
<Atomicalloy>
sevenseacat, Sure.
<sevenseacat>
Ellis: it's an interface to another app. if you tell your browser to access /foo in your app, you'll get some HTML back. that's an interface.
<Atomicalloy>
variables you can only access thru the interface (public functions) *
b4tm4n has quit [Quit: Leaving]
nobitanobi has quit [Remote host closed the connection]
<Ellis>
sevenseacat: what’s the difference between the facebook GUI & the facebook api?
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
ah. instance variables are private in ruby, though you can always jump through hoops and access them anyway
<sevenseacat>
Ellis: not much.
<sevenseacat>
one is for a browser, one is not - though you can also use the API in your browser if you craft the requests correctly.
<Atomicalloy>
Oh okey I see. It's a bit confusing tho that they are directly created inside instance methods.
<sevenseacat>
instance variables in instance methods, makes sense to me :)
<sevenseacat>
ruby is a very dynamic and flexible language
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Atomicalloy>
Yea I see that. So, for example if I make an instance variable @name inside initialize, @name is visible for all instance methods in the class right?
<sevenseacat>
yep.
<Atomicalloy>
And for the same reason as in C++, instance variables should not be used directly?
<sevenseacat>
i dont know what the reason for C++ is, so
<Atomicalloy>
sevenseacat, Accessing them directly outside the scope of the class
wolflee_________ has quit [Read error: Connection reset by peer]
<sevenseacat>
should not be used directly by what?
<Atomicalloy>
You said, "though you can always jump through hoops and access them anyway".
<Ellis>
what is the value of an API?
<Atomicalloy>
Should this be avoided?
rejerson69_ has quit [Remote host closed the connection]
<sevenseacat>
Atomicalloy: it should
yfeldblum has quit [Remote host closed the connection]
<Atomicalloy>
sevenseacat, Ok, that's what I meant :)
<sevenseacat>
Ellis: to use an application. there isnt much point in having an app you cant use.
<Atomicalloy>
We can communicate soon I guess,
<sevenseacat>
Atomicalloy: we'll settle on some common terminology soon lol
rejerson69 has joined #ruby
<Atomicalloy>
Yea lol
<Ellis>
sevenseacat: why would a developer be interested in an API?
<sevenseacat>
Ellis: to use the data that it gives access to
Sawbones_ has quit [Remote host closed the connection]
<Ellis>
sevenseacat: gotcha. so APIs are important because we can access their data
<sevenseacat>
you want to put a weather gadget on your website showing the current weather in the user's location. so you find a weather service that provides an api, you send them the user's location, and you get back stuff to put on your website
<Ellis>
sevenseacat: gotcha, thanks for the patience.
<sevenseacat>
np :)
<sevenseacat>
think of any webapp you use that pulls in information from other places, eg. spotify can pull in data from amazon about where to purchase albums
<sevenseacat>
its using an api provided by amazon to do so
<sevenseacat>
a website is just a very specialized type of api, you have some information - a URL, some cookies, etc. - you send it to the app, and you get back some data - HTML to display in a browser
<sevenseacat>
things like web scrapers use websites as a normal api - they take the HTML response in code, and manipulate it to get the information they want
ramfjord has joined #ruby
PhantomS_ has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
longfeet_ has joined #ruby
PhantomSpank has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
longfeet_ has quit [Client Quit]
longfeet has quit [Ping timeout: 240 seconds]
<zotherstupidguy>
sevenseacat you just created APIalism =)
<sevenseacat>
?
<zotherstupidguy>
everything is an API philosphy
<sevenseacat>
well it is
balazs has quit [Remote host closed the connection]
6JTAA0KE4 has left #ruby [#ruby]
Spami_ has quit [Quit: This computer has gone to sleep]
rkazak has joined #ruby
rkazak has left #ruby [#ruby]
rkazak has joined #ruby
Musashi007 has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
RegulationD has joined #ruby
duderonomy has joined #ruby
braincrash has quit [Quit: bye bye]
inavele has quit [Ping timeout: 272 seconds]
lidenskap has quit [Remote host closed the connection]
sdothum has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
dfinninger has joined #ruby
braincrash has joined #ruby
mistermo_ has quit [Ping timeout: 265 seconds]
Brozo_ has joined #ruby
charliesome has quit [Quit: zzz]
icebourg has joined #ruby
chris349 has joined #ruby
multi_io has quit [Ping timeout: 252 seconds]
<chris349>
What is the command to start the built in ruby webserver?
charliesome has joined #ruby
Brozo has quit [Ping timeout: 245 seconds]
Musashi007 has joined #ruby
multi_io has joined #ruby
<sevenseacat>
there isnt a command to do it
PhantomSpank has joined #ruby
<sevenseacat>
you can write a script that will do it
<havenwood>
al2o3-cr: Shorthand for that: sudo ruby -run -ehttpd .
jarboot has joined #ruby
<al2o3-cr>
havenwood: always done that way thanks didn't know
cefkamcau has quit [Ping timeout: 255 seconds]
<Radar>
al2o3-cr: can be done without the sudo I think?
cefkamcau has joined #ruby
<al2o3-cr>
using port 80 though
<sevenseacat>
not on port 80
chris349 has quit [Ping timeout: 250 seconds]
<al2o3-cr>
doesn't need sudo above 1024
scripore has quit [Quit: This computer has gone to sleep]
<al2o3-cr>
I think
chris3492 has quit [Ping timeout: 250 seconds]
chris349 has joined #ruby
chris34928 has quit [Ping timeout: 250 seconds]
Channel6 has joined #ruby
dudedudeman_ has joined #ruby
<dudedudeman_>
did you guys just see my password?
<al2o3-cr>
dudedudeman_: nope
<dudedudeman_>
oh well that's good
<sevenseacat>
was it hunter2 ?
<al2o3-cr>
but i am blind ;P
<sevenseacat>
i wonder how many people actually have that as their irc password out of irony
<dudedudeman_>
ok, questino. i have multiple text fields that a user inputs data in to, and i'm working on logic for when submit is pressed. can anyone shed some light on how to if/else over multiple params?
chris349 has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
drizz has joined #ruby
<al2o3-cr>
just out of curiosity is there irc password min length?
<Radar>
dudedudeman_: Show us your password and we'll answer your question.
<dudedudeman_>
password => Radarisabutt
<sevenseacat>
oh man he so is.
paradisaeidae has quit [Ping timeout: 255 seconds]
<Radar>
dudedudeman_: ok thanks
<jenrzzz>
al2o3-cr: I think it's implementation-dependent
<Radar>
dudedudeman_: What have you tried so far?
<al2o3-cr>
jenrzzz: ah ok :)
Zamyatin has joined #ruby
lidenskap has joined #ruby
<dudedudeman_>
well, i haven't tried much because i honestly don't know where to start. i do know that that i have succesfully gotten something like this to work: if foo.empty? redirect '/' end
<Radar>
And what else would you like to try?
<Radar>
Write some pseudocode if you have to
<dudedudeman_>
but i'm trying to do a .save with a bunch of values, and i am trying to think through a good way to check if any of those values are empty
mengu has joined #ruby
mengu has joined #ruby
<dudedudeman_>
i guess this could work... if foo.thing.empty? %% bar.otherthing.empty? && radar.butt.empty? do something end
<Radar>
Sure.
<Radar>
I don't know what the %% is supposed to mean
<dudedudeman_>
ah sorry, &&
<dudedudeman_>
in the exact case of my projectd, i have a variable that i am assigning to Class.new. Class has all these attributes(I think that's the right name..?) and i'm wanting to store those values
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<xxneolithicxx>
eyo, you are foo bar'ing Radar's but with the thing and otherthing
jottr_ has joined #ruby
<dudedudeman_>
does your butt feel left out? i can foo/bar over it with something as well
<dudedudeman_>
:P
<xxneolithicxx>
no no im quite all right
<dudedudeman_>
ha. i'm sorry. i had to
mengu has quit [Ping timeout: 256 seconds]
OtterCoder has quit [Read error: Connection reset by peer]
<dudedudeman_>
i was just carrying over the joke from earlier
<dudedudeman_>
i'm doing x = Class.new and then following it up with x.foo = params[:foo] x.bar = params[:bar] and so on, and then doing an x.save
jottr_ has quit [Ping timeout: 240 seconds]
Ellis has quit [Quit: Ellis]
tjohnson has quit [Quit: Connection closed for inactivity]
cajone has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
cajone has joined #ruby
workmad3 has joined #ruby
gazay has joined #ruby
Ropeney_ has joined #ruby
Ellis has joined #ruby
<al2o3-cr>
as github.gist got an API for command line pastes?
<ponga>
havenwood: yes im using exactly same file for both tar and rvm method
nii236 has quit [Ping timeout: 256 seconds]
Eiam_ has joined #ruby
<havenwood>
ponga: Yeah, #jruby is probably best place to ask indeed. :)
<ponga>
ive gone to #jruby
<ponga>
real thanks havenwood for confirming on your machine
<havenwood>
no prob
mrmargolis has quit [Remote host closed the connection]
doodlehaus has joined #ruby
gaganjyot has joined #ruby
<chris349>
Maybe I phrase my question wrong. I have the ruby code, but it is web-based. How do I start the built in webserver to run that code and view it in a web browser?
<havenwood>
ponga: Oh, I take it back! On latest I get the Graal 0.7 thing you do!
<sevenseacat>
chris349: what ruby code is it? what framework does it use?
kenndel has joined #ruby
<ponga>
chris349: for most test-out case it is localhost:6000 or something
<havenwood>
ponga: Yeah, I can reproduce: This version of JRuby is built against Graal 0.7 but you are using it with version 0.6...
<ponga>
does your code host it on local machine so you can type in URL in your browser
<ponga>
havenwood: omg really?
<ponga>
so how do i get 0.7
<ponga>
damn!
<havenwood>
ponga: aye, just with newest
<chris349>
ponga, I have the code but I am not certain how to run it!
<ponga>
i need to report and wait
<ponga>
chris349: are you on OSX?
<sevenseacat>
chris349: what ruby code is it? what framework does it use?
<havenwood>
ponga: Good catch. I hadn't run into that yet.
<sevenseacat>
chris349: or better yet, what did the instructions say to do?
Ellis has quit [Quit: Ellis]
<ponga>
havenwood: nice im actually helping out !
<ponga>
im off to write an issue
<chris349>
I am using Linux. I dont know what framework was used and I do not have any instructions.
nobitanobi has joined #ruby
<sevenseacat>
chris349: so where did you get this code from?
<sevenseacat>
can we see it?
<ponga>
chris349: is your question "how do i run my ruby code" ?
<ponga>
then its "ruby yourcode.rb" in directory of your file
<sevenseacat>
ponga: it isnt.
<ponga>
damn
<ponga>
;p
<ponga>
he is on rails?
<chris349>
ponga, Yes. Normally I use Phusion Passengear and run the code from Apache webserver, but in this case I want to run it directly.
<sevenseacat>
he doesnt know.
<ponga>
oh
<chris349>
sevenseacat, Yes I agree. I have do it before and its a generic command.
doodlehaus has quit [Ping timeout: 276 seconds]
<sevenseacat>
chris349: so where did you get this code from? can we see it?
<havenwood>
chris349: Is there a Gemfile file in the project root directory?
<sevenseacat>
havenwood: what would that tell you? we know its a ruby app
<havenwood>
sevenseacat: If there was one, I'd be curious as to its contents.
<sevenseacat>
at least, i hope it is
<sevenseacat>
ah true
paradisaeidae has quit [Ping timeout: 244 seconds]
<zotherstupidguy>
al2o3cr a .gist is just a git repo, you can clone it and push to it
jarboot has quit [Ping timeout: 265 seconds]
<chris349>
havenwood, Yes and I have installed all the required gems.
<ponga>
chris349: so your ruby code file is IN the server
dudedudeman_ has quit [Ping timeout: 246 seconds]
<ponga>
you ran it, and you want to view it in the browser right?
<sevenseacat>
is there some severe lag between us asking questions and getting responses, or what
<ponga>
isn't by accessing the IP address of your server
<chris349>
ponga, The code is in a directory on a Linux machine. I dont know know to run it.
<al2o3-cr>
zotherstupidguy: oh I know :)
<ponga>
run it ah hah
<ponga>
chris349: can you access the shell panel of your Linux machine?
<sevenseacat>
chris349: answering *any* of the questions asked would be lovely.
<chris349>
Yes I have root access to the machine.
<ponga>
i had similar problem as chris349 before
<ponga>
chris349: did you 'cd' to the directory of your ruby file?
<sevenseacat>
this appears to be the blind leading the blind
<ponga>
then its "ruby mycode.rb" or rails code.rb or jruby code.rb
<sevenseacat>
but i'm cool with that. let us know when you're done.
<ponga>
if your machine has ruby installed in path
<chris349>
There is no .rb file in the directory.
alex88 has joined #ruby
<havenwood>
chris349: Show us the contents of the Gemfile?
<zotherstupidguy>
al2o3cr yo-mother-forker =)
<al2o3-cr>
8)
<ponga>
chris349: hang on, your code is written and saved into .rb file isn't it?
Brozo has joined #ruby
nobitanobi has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpt_yossarian has quit [Quit: And then he took off.]
alex88 has quit [Ping timeout: 264 seconds]
<chris349>
ponga, Yes there are subdirectories with .rb files but I am pretty sure what I have used before was a generic command that didnt reference any project specific file
jenrzzz has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
<chris349>
I am pretty sure also that the server starts on port 3000, not 6000
<ponga>
that's weird, i always refer to file when i run ruby
<ponga>
can you ls and show the content of it? we need to know what framework you are using
cpt_yossarian has joined #ruby
<havenwood>
chris349: Look at the Gemfile closely and write a poem about it and show us. Maybe from your verse we can divine its contents.
<sevenseacat>
lol
<ponga>
yeah we need content
<sevenseacat>
is okay, he'll probably listen to ponga.
<ponga>
no , please don't
<ponga>
im unreliable source
<sevenseacat>
i agree, but you're the only one he's answering so far.
<ponga>
i was thinking his trouble was far simpler
<ponga>
damn it
<chris349>
The contents of the directory are: app/ bin/ config/ db/ Gemfile Gemfile.locl Rakefile README.rdoc test/ vendor/
<sevenseacat>
see? :)
<ponga>
ya..
<sevenseacat>
chris349: it's a rails app. use `rails server`.
<ponga>
its rails isn't it
<sevenseacat>
let's see if he listens to that
devyn has quit [Read error: Connection reset by peer]
<ponga>
i know im fabulous but that doesn't mean one has to listen to me
<chris349>
I had already tried that. It returns: Error: Command not recognized
devyn has joined #ruby
<zotherstupidguy>
so bundle exec rails sdoesn't solve your problem
* sevenseacat
gets popcorn
<zotherstupidguy>
chris349 `bundle install` , no prolblems?
fgo has quit [Ping timeout: 250 seconds]
<chris349>
How involved would it be to add a dummy rails project? I am pretty sure this code is missing something.
<Eiam_>
al2o3-cr: well,its not terrible, but I don't like having to enumerate twice
<pontiki>
you can just sum the effort inside the inject block
<sevenseacat>
see even now i get confused as to whats part of ruby and whats part of rails
gazay has quit [Ping timeout: 250 seconds]
gazay_ is now known as gazay
<Eiam_>
you mean by like,writing code inside the inject block? =(
lemur has joined #ruby
<sevenseacat>
yeah
<Eiam_>
sevenseacat: simple solution, stay away from rails!
nii236 has quit [Ping timeout: 250 seconds]
<pontiki>
yes, that's what i mean, like
<Atomicalloy>
sevenseacat, Nevermind :p
<sevenseacat>
i <3 rails
<Atomicalloy>
sevenseacat, Am I able to change the behavior of the operator + for the specific class?
<Eiam_>
pontiki: ah well, was hoping to avoid that.
<pontiki>
why?
<sevenseacat>
Atomicalloy: i believe so.
riotjones has joined #ruby
<pontiki>
you don't like explicit blocks, just use implicit ones?
<lemur>
class X; def +(other) do_your_thing end end
<Atomicalloy>
sevenseacat, So if I have two class instances of class X, and I do instance_one + instance_two, maybe I can return the value of some instance variable.
<Atomicalloy>
lemur, Thanks will try it out.
<sevenseacat>
then yep, what lemur said.
<lemur>
+ is sugar for something like 1.+(2)
<Atomicalloy>
So far, Ruby seems very logic I mean it's not hard at all. I hope it continues this way :(
<lemur>
>> 1.+(2)
<sevenseacat>
you can do all kinds of metaprogramming shit in ruby
<baweaver>
I'll take "Engineers can't name things" for 500 Bob
seitensei has quit [Read error: Connection reset by peer]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* baweaver
*breathes*
<harlen>
sigh. 20 minutes rolling back and testing code changes because a div wasn't displaying. which happens when the display toggle line is commented out. home time. cyas :)
seitensei has joined #ruby
fgo has joined #ruby
<dopie>
hanmac, ngrok
<hanmac>
dopie: i dont know ngrok too
<sevenseacat>
!popcorn2
<sevenseacat>
oh dammit helpa.
ohaibbq has joined #ruby
dodobrain has quit [Quit: bye.. o/]
<al2o3-cr>
where is helpa as it boycotted ruby?
<sevenseacat>
it got banned from #ruby
<al2o3-cr>
really?
<sevenseacat>
ruboto is our new robot overlord now
<harlen>
why banned?
<al2o3-cr>
oh well
<sevenseacat>
because it was decreed by apeiros
laurentide_ has quit [Read error: Connection reset by peer]
<al2o3-cr>
so why hasn't ruboto got all the commands from helpa
* sevenseacat
shrugs
SOLDIERz has joined #ruby
sinkensabe has joined #ruby
<al2o3-cr>
typing that then it's like bot wars cause i've got color coded nicks ruboto(green) helpa(red) it's like good vs evil
<Radar>
brown and dark yellow on my screen
<Radar>
!gist
<helpa>
http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<sevenseacat>
heh
MyMind has quit [Read error: Connection reset by peer]
<al2o3-cr>
haha
fgo has quit [Ping timeout: 256 seconds]
jack_rabbit has quit [Ping timeout: 265 seconds]
<Atomicalloy>
sevenseacat, How long have you been coding in Ruby?
<sevenseacat>
Atomicalloy: four and a half years.
<Atomicalloy>
sevenseacat, I see. Does it take long to become good at it?
<sevenseacat>
i'll tell you when i get there.
MyMind has joined #ruby
sent1nel has joined #ruby
jakolehm has joined #ruby
<sevenseacat>
i consider myself to be good at rails. i dont consider myself to be good at ruby.
<Radar>
Atomicalloy: What does it mean to be "good"?
<Atomicalloy>
sevenseacat, Is there a difference?
<Radar>
Atomicalloy: Would you say that not having to look anything up the API docs to mean that you're "good" at something?
<A124>
wasamasa: So far switched to c++, optimized on many levels, algo, etc got from 5k years to 18 year best case estimate. (Unit is single x86 2600Mhz core, parallelism possible. Fifty quadcore computers one month.)
<sevenseacat>
very much so.
nii236 has quit [Ping timeout: 276 seconds]
<Atomicalloy>
Radar, I define it as someone who's able to pretty much do stuff and knows how to do it efficiently.
<sevenseacat>
lol
<sevenseacat>
if youre good, you can do stuff.
<sevenseacat>
i like stuff.
<certainty>
xD
sent1nel has quit [Ping timeout: 255 seconds]
<shevy>
sevenseacat mouse stuff
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
<Atomicalloy>
Radar, No, I wouldn't say that. To look up something is really part of the programming. What I say is, to feel comfortable when doing something.
<Radar>
Atomicalloy: I've been feeling comfortable doing this for a couple of years now
arturaz has joined #ruby
<Radar>
Depends on the task, really.
Akagi201 has quit [Remote host closed the connection]
<Radar>
Someone who's been doing Rails for 15 minutes can tell you how to create a blog.
codecop has joined #ruby
<Radar>
But they can't tell you how to build an ecommerce system
Akagi201 has joined #ruby
<Atomicalloy>
Radar, Yea, I see. Also, the fact that Rails gives you a lot of things ready is something new to me. When we did C back in the days, well you know how it is. Starting from the very beginning.
vin-ivar has joined #ruby
Akagi201_ has joined #ruby
<vin-ivar>
folks
<certainty>
Radar: i hear someone has build a solution for e-commerce systems with rails. :p
krz has quit [Ping timeout: 256 seconds]
<vin-ivar>
had a quick question about installing a particular gem
<sevenseacat>
fun. even i could muddle through that in ruby, without using core/stdlib
<havenwood>
al2o3-cr: Person = Struct.new :name, :age do def initialize; yield end end
<baweaver>
sevenseacat: but swore they could do rails. That type of thing gets me to say no fast.
<al2o3-cr>
havenwood: one sec
<baweaver>
It's really not even that hard, that's one of my simple tests next to fizzbuzz
zotherstupidguy has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
nii236 has quit [Ping timeout: 256 seconds]
<al2o3-cr>
havenwood: I want it so I can do Person.new do; name "whatever"; age 34; end # again contrived but you get my i hope
gagrio has joined #ruby
<fivetwentysix>
al2o3-cr: shit if you really want structs do golang
<certainty>
wat?
<baweaver>
Those aren't structs mate
<baweaver>
it's a DSL
<baweaver>
Chef and JBuilder do something very similar
<Radar>
MATE
<baweaver>
but I don't know how.
* sevenseacat
holds phone and chants MAAAAAAAATE
allenn has joined #ruby
<baweaver>
phrase of habit.
<al2o3-cr>
afk 10 minutes be bk then
<fivetwentysix>
baweaver: it's called yield
<Radar>
the more A's in the word "mate"; the friendlier you are to that person
ismaelga has joined #ruby
<sevenseacat>
we call our enemies 'mate' and we call our mates assholes
<Radar>
For example, when I greet me mate bazza, It's "MAAAAAAAAAAAATE". When I'm talking to some idiot on the train who thinks its OK to take up two seats, it's "mate"
<baweaver>
I know what yield is
<certainty>
also beware of someone calling you mte
<shevy>
mte?
nii236 has joined #ruby
* theotherstupidgu
thinkin aussies and kiwis are COOL and friendly just for using MATE;
<shevy>
I wouldn't trust them
<shevy>
they walk upside down
<sevenseacat>
we're awesome.
gauke has joined #ruby
<shevy>
:)
oo_ has quit [Remote host closed the connection]
<certainty>
shevy: the number of A's in mate is directly proportional to the level of sympathy you have for that person. So mte ... well you get it
<shevy>
hmm so
<shevy>
it's mte
<shevy>
and sshole
<shevy>
right certinty?
Musashi007 has joined #ruby
<certainty>
shevy: got it
kenndel_ has joined #ruby
<shevy>
\o/
* theotherstupidgu
germans should use MATE more often in emails
<shevy>
germans should not be allowed to write emails
haxrbyte has joined #ruby
ismaelga has quit [Ping timeout: 252 seconds]
<Radar>
Germans would use "mate", but the word is superfluous which goes against what it means to be German, so they don't.
<havenwood>
AirStar: That'd give you latest stable.
<Radar>
Don't use RVM because it's bloated.
<theotherstupidgu>
Airstar i hear mac devs like rubymine, check it out
<baweaver>
Oi
<baweaver>
Vim of GTFO
<baweaver>
That being said, I use Sublime more often
<Atomicalloy>
I have the craziest theme for Vim :)
<Radar>
Sublime is the One True Editor
<Radar>
!subjective
<helpa>
What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best.
oo_ has joined #ruby
<Radar>
*cough*
<baweaver>
less tendency for pair programming partners to want to axe murder you
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver>
I find vim has that effect for some reason.
<theotherstupidgu>
Radar github's new editor is the next sublime i suppose, i use vim anyway
<baweaver>
Atom
<AirStar>
i must install ruby by ’brew install ruby’?
<Radar>
theotherstupidgu: that Atom thing? Probably.
<Radar>
AirStar: YOU ALREADY HAVE RUBY
<Radar>
It is installed!
<Ropeney>
Visual Studio code for win?
<AirStar>
already?
<Radar>
AirStar: yes!
<baweaver>
Too young to make accurate assessments yet
<Radar>
AirStar: "ruby -v" showed you a Ruby version.
<havenwood>
AirStar: If you have OS X you have Ruby.
<Radar>
AirStar: That means it's installed!
<AirStar>
old version?
<Radar>
AirStar: Yes.
<havenwood>
AirStar: A supported but dated version.
<Radar>
AirStar: Get the new version by installing chruby + ruby-install.
<helpa>
Ropeney: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
<Radar>
Ropeney: Sorry you were saying? :)
reinaldob has joined #ruby
sandstrom has quit [Client Quit]
<Atomicalloy>
Rails 4 will be the first book I read being written from a woman
Guest29689 has joined #ruby
<Ropeney>
still railstutorial is awesome intro
<baweaver>
Radar == Ryan Bigg. Self plug
<Atomicalloy>
by a woman*
<Ropeney>
the rails 4 in action is awesome for learning in depth
<baweaver>
Noted that I need to still read through that one later Radar.
<Radar>
baweaver: READ IT NOW
<sevenseacat>
Atomicalloy: not sure how to take that one.
<baweaver>
Rails 4 Way is probably the really in depth one.
<AirStar>
how long it takes time for mastering ruby?
<Radar>
AirStar: LOL
<Radar>
This is hilarious
<Radar>
That we keep getting asked this question
<Radar>
every day
<Atomicalloy>
sevenseacat, Are you / or t ?
<baweaver>
10_000 hours
<Radar>
AirStar: Don't worry about how long it takes. Just learn.
<sevenseacat>
Atomicalloy: I am the woman that wrote that book.
<Atomicalloy>
sevenseacat, No way.
<sevenseacat>
yes way.
<Radar>
Atomicalloy: Given you're not ESL, can you explain why you wanted to know how long it took to master Ruby?
<Radar>
I don't understand the point of that question.
<AirStar>
10,000 hour ——> 416 days?
MatthewsFace has quit [Remote host closed the connection]
<Radar>
Atomicalloy: I want to know why it was important to you at that time.
alex88 has joined #ruby
<baweaver>
Ah, wasn't following you sevenseacat
<Radar>
Atomicalloy: 1,250 days @ 8hrs a day
<Radar>
last msg was for AirStar
<theotherstupidgu>
AirStar my advice not to use rails, instead try to understand basic ruby and metaprogramming, google 'dave thomas metaprogramming ruby'
jottr_ has quit [Ping timeout: 250 seconds]
<Atomicalloy>
Radar, I didn't say to master it but become good at it and I explained what I meant by good. Tho, I didn't know Rails and Ruby differ at some level, my fault :)
<baweaver>
No wonder I hadn't seen it pop up yet, not quite released yet.
<baweaver>
I was about to say, man I'm slipping.
<Radar>
Yes I liked writing it.
<Radar>
Dealing with the publisher left more to be desired.
workmad3 has joined #ruby
<theotherstupidgu>
AirStar ruby's coolness [made in japan, cool metaprogramming features, friendly community who doesn't kcikout trolls, very easy to make new prjects with] and there is no such thing as the ultimate langauge of all so relax and pickone
yfeldblum has quit [Ping timeout: 256 seconds]
<sevenseacat>
we've signed off on every single bit of the content, and its being typeset and the like as we speak.
haxrbyte has quit [Remote host closed the connection]
<AirStar>
yeah theotherstupidgu
<baweaver>
Oh I'll give it a read later when I get a chance, just thought I missed a book for a second there.
<Atomicalloy>
sevenseacat, Where are you from?
iotouch has quit [Quit: This computer has gone to sleep]
<sevenseacat>
Atomicalloy: Perth, Australia.
<baweaver>
venture a guess
<baweaver>
Aussie
<theotherstupidgu>
perth!
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<AirStar>
mac is good for programming of ruby?
sameerynho has joined #ruby
gazay has joined #ruby
<Radar>
AirStar: yes
vire has quit [Quit: Leaving]
vire has joined #ruby
<Atomicalloy>
Linux ftw
<Atomicalloy>
:)
<baweaver>
Windows is hell for Ruby.... Had to get that to behave for a few years.
<sevenseacat>
linux or mac are both good choices.
<Ropeney>
did i hear Radar you were a author in Rails 4 way?
<Atomicalloy>
baweaver, What is Windows?
reinaldob has joined #ruby
<Radar>
Ropeney: Rails 4 in Action.
reinaldob has quit [Remote host closed the connection]
<baweaver>
That was Obie Fernandez
krz has joined #ruby
hanmac has quit [Ping timeout: 265 seconds]
amundj has joined #ruby
<baweaver>
who's been oddly quiet lately.
<Ropeney>
Why so late in year to get it? :(
<AirStar>
mac book air is nice?
<theotherstupidgu>
AirStar try find Dave Thomas metaprogramming videos
<Radar>
Ropeney: Because publishers.
<Atomicalloy>
Does Rails 4 in Action require previous Rails experience?
<AirStar>
i have mac book air 11 inch.
<Radar>
Atomicalloy: no
<sevenseacat>
no.
<Atomicalloy>
Ah great :D
<Radar>
Atomicalloy: You can follow the bouncing ball and build a complete Rails app
<baweaver>
Metaprogramming when you're starting Ruby is a recipe for disaster you know.
<Radar>
^
<Atomicalloy>
Radar, Will get it :)
lxsameer has quit [Ping timeout: 248 seconds]
<Radar>
Atomicalloy: thank you
<Atomicalloy>
AirStar, You know what's 11 inches?
workmad3 has quit [Ping timeout: 264 seconds]
PhantomSpank has joined #ruby
<AirStar>
Atomicalloy: screen size
<baweaver>
AirStar: Ignore him on that, it's a crude joke.
<sevenseacat>
lol
* theotherstupidgu
thinkin 11' is screen diagonal
<baweaver>
(really, metaprogramming ruby in general is a recipe for pain)
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
<Ropeney>
Radar: Does it go into rails best practice security?
DavidDudson has quit [Read error: Connection reset by peer]
<apeiros>
not sure why the above expression should show either.
<adaedra>
why just not 2.even? ? :even : :odd
<hanmac>
apeiros: yeah like "Dont open this Door" or "Dont press this button"
<apeiros>
makes hanmacs open the door and push the button… :)
ta has joined #ruby
<hanmac>
adaedra: my sample is about that the "case <>" doent have a value it chould case for, but it does work in ruby
haxrbyte has joined #ruby
marr has joined #ruby
DavidDudson has quit [Max SendQ exceeded]
<adaedra>
ah
<hanmac>
imo its more a bug than a feature ...
DavidDudson has joined #ruby
<theotherstupidgu>
hanmac i see you predicament, thats why testing is all about
doodlehaus has joined #ruby
DavidDudson has quit [Read error: Connection reset by peer]
<theotherstupidgu>
red-green-refactor
<hanmac>
i mean yeah it does work but imo its very bad style ... (its because someone does try to avoid if /then end structure and does force it to case when ... )
iotouch has quit [Quit: This computer has gone to sleep]
<theotherstupidgu>
sorry, that didnt pass through well, could you plz explain
piotrj has joined #ruby
iotouch has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hanmac>
theotherstupidgu: "if <exp1>; <code1>; elsif <exp2>; <code2>; end" can be written in "case <>; when <exp1>; <code1>; when <exp2>; <code2>; end" ... see the missing part in case
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodlehaus has quit [Ping timeout: 248 seconds]
<theotherstupidgu>
wht missing part?
<theotherstupidgu>
2 experissions and 2 codeblocks in both if and case
nfk has joined #ruby
* theotherstupidgu
i see rainbows outside my window
scripore has quit [Quit: This computer has gone to sleep]
arta82 has joined #ruby
piotrj has quit [Remote host closed the connection]
<Ropeney>
going to hunt for the gold chest?
<flughafen>
ahoyahoy!
scripore has joined #ruby
<hanmac>
theotherstupidgu: normaly if you do case ; when you have an value or an expression in it that does return the value you want to case for right?
<theotherstupidgu>
eclipse is the best, if u work for nasa
sent1nel has quit [Ping timeout: 240 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
* flughafen
throws a ball of yarn at sevenseacat
kaleido has quit [Ping timeout: 272 seconds]
<AirStar>
then i just use vim?
<tobiasvl>
use whatever you want?
<abyss>
AirStar: any of which make you feel good
iotouch has joined #ruby
<tobiasvl>
you said you knew python, what editor do you use for that?
<adaedra>
AirStar: if it edits file and has syntax color for vim, you can use it
edwinvdgraaf has quit [Remote host closed the connection]
<AirStar>
tobiasvl: i use eclipse for python.
<tobiasvl>
oh. ok
edwinvdgraaf has joined #ruby
<adaedra>
If you want an heavy IDE for Ruby (people will argue then if it's necessary), look at RubyMine/IntelliJ
<AirStar>
PyDev
DavidDudson has joined #ruby
haxrbyte has quit [Ping timeout: 272 seconds]
kaleido has joined #ruby
SouL_|_ has quit [Ping timeout: 265 seconds]
<Ropeney>
Rubymine has 30 day trial to test out, some guys at work swear by it
<adaedra>
It's free for students
dvlwrk has quit [Ping timeout: 265 seconds]
<Ropeney>
^
jenrzzz has joined #ruby
<hanmac>
i fucking hate IntelliJ because they cant get there language plugins right ... i mean i got an ultimate version but does it support different languages? no it doesnt!
<adaedra>
It does, install the official plugins from the repository, hanmac
<adaedra>
My IntelliJ supports Ruby, PHP and JavaScript
<Ropeney>
nothing worse then it auto completing on a enter what it wasn't meant to!
A205B064 has quit [Ping timeout: 264 seconds]
<hanmac>
adaedra: nope it doesnt newest IntelliJ/IDEA doesnt support C++ from the offical repository since MONTHS!!! .... i think they do it to sell there new extra C++ IDE ...
<adaedra>
There's no C++ plugin, yes
<adaedra>
CLion is still in development, wait and see
<hanmac>
there was, but it doest work with newest IDEA anymore
<adaedra>
ah.
<adaedra>
Maybe it will get updated then
<hanmac>
that was we are all waiting ... it didnt happen in months
blackmesa has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
iotouch has quit [Quit: This computer has gone to sleep]
<adaedra>
meh
chthon has joined #ruby
Tuxified has joined #ruby
muntazz has left #ruby [#ruby]
RegulationD has joined #ruby
SouL_|_ has joined #ruby
iotouch has joined #ruby
yosafbridge` has quit [Ping timeout: 265 seconds]
moeabdol has joined #ruby
<theotherstupidgu>
adaedra intellsense for ruby??
<adaedra>
mmmh?
kedare has quit [Remote host closed the connection]
<theotherstupidgu>
in RubyMine or similar , is there intellisense for ruby?
<adaedra>
There's autocompletion, yes
<hanmac>
there is no sense for Ruby ;P
asmodlol has joined #ruby
universa1 is now known as universal
universal is now known as universa1
MyMind has quit [Read error: Connection reset by peer]
bousquet has joined #ruby
kblake has joined #ruby
moeabdol has quit [Client Quit]
MyMind has joined #ruby
c0m0 has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
roolo has joined #ruby
asmodlol has quit [Ping timeout: 250 seconds]
lkba has quit [Ping timeout: 244 seconds]
kblake has quit [Ping timeout: 240 seconds]
piotrj has joined #ruby
asmodlol has joined #ruby
KnownSyntax has joined #ruby
Igorshp has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
jottr_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
iotouch has joined #ruby
SOLDIERz has joined #ruby
msgodf has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
jottr_ has quit [Ping timeout: 264 seconds]
tomphp has joined #ruby
yosafbridge has joined #ruby
<adaedra>
FYI, Microsoft's new tool (code) has (at least) basic support for Ruby
DavidDudson has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
kedare has joined #ruby
DavidDudson has quit [Max SendQ exceeded]
piotrj has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
jakolehm has joined #ruby
DavidDudson has joined #ruby
DavidDudson has quit [Client Quit]
fgo has quit [Ping timeout: 256 seconds]
terlar has quit [Ping timeout: 256 seconds]
nii236 has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
<hanmac>
adaedra: i read that it does have problems to run on linux ... some user says it does crash while trying to build the crash log ;P
<adaedra>
oops.
jakolehm_ has quit [Ping timeout: 265 seconds]
<hanmac>
also i read that it automaticly should send everything to microsoft when it does crash without asking ... imo also not so nice turn
equinox_ has joined #ruby
joonty has quit [Quit: joonty]
mengu has quit [Remote host closed the connection]
joonty has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
platzhirsch has joined #ruby
chipotles has joined #ruby
fedexo has quit [Ping timeout: 256 seconds]
haxrbyte_ has joined #ruby
workmad3 has joined #ruby
<adaedra>
ok, ruby support may be a bug, not a feature :>
iotouch has quit [Ping timeout: 264 seconds]
piotrj has quit [Remote host closed the connection]
<hanmac>
adaedra: are you sure it does dect it as ruby? maybe it thinks its javascript? ;P
<adaedra>
it highlights module, class, string interpolation, symbols, do/end, renquire
<adaedra>
require*
<adaedra>
And clearly states "Ruby" in the language selector
jenrzzz has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
roolo_ has joined #ruby
gaganjyot has joined #ruby
fluter has joined #ruby
sent1nel has joined #ruby
quazimodo has quit [Ping timeout: 250 seconds]
<AirStar>
it is very hard day.
<AirStar>
:x
<adaedra>
?
roolo has quit [Ping timeout: 252 seconds]
Cust0sL1men has joined #ruby
<Atomicalloy>
AirStar, hahah, we already discussed your issues in ##c. Don't start here
terlar has quit [Read error: Connection reset by peer]
krz has joined #ruby
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<AirStar>
shadow chaser Atomicalloy
last_staff has quit [Quit: last_staff]
<Atomicalloy>
wut?
leafybasil has quit [Remote host closed the connection]
sent1nel has quit [Ping timeout: 255 seconds]
<fluter>
AirStar: indeed, don't give up too easy
<AirStar>
oh my god
<AirStar>
many shadow chasers
AlphaAtom has joined #ruby
sent1nel has joined #ruby
quimrstorres has joined #ruby
jakolehm_ has joined #ruby
<AirStar>
d:)
AirStar has left #ruby [#ruby]
lkba has joined #ruby
krz has quit [Ping timeout: 264 seconds]
<apeiros>
do I even want to know what's going on?
* theotherstupidgu
cooking meth and disposing dead bodies #breakingbad
lidenskap has quit [Remote host closed the connection]
seal has joined #ruby
<emilkarl>
Is it bad practice to write to use Minitest::Unit Spec and use describe/it togehter with assert_includes instead of must_include? How do people use it?
bousquet has quit []
jakolehm has quit [Ping timeout: 265 seconds]
lxsameer_ has joined #ruby
<emilkarl>
minitest/spec *
ramfjord has quit [Ping timeout: 265 seconds]
sent1nel has quit [Ping timeout: 244 seconds]
astrobunny has quit [Remote host closed the connection]
<theotherstupidgu>
why would u want to do that?
dopie has quit [Quit: This computer has gone to sleep]
thatslifeson has joined #ruby
seal has quit [Client Quit]
<emilkarl>
i dunno, but I see it in a project here
<emilkarl>
i just wonder if I should change it up to spec-like tests
<theotherstupidgu>
i don't think it reads well
<theotherstupidgu>
stick with a style
<theotherstupidgu>
personally i like specs
sameerynho has quit [Ping timeout: 248 seconds]
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<emilkarl>
but its not much of a difference, just be consequent with how u use it. if combined styles, then combine everywhere…but you would go with the second option here? http://pastie.org/10121792
thatslifeson has quit [Ping timeout: 256 seconds]
<toretore>
use the first
<emilkarl>
toretore: ok, why?
<toretore>
because it's better
<emilkarl>
ok, even tho it combines spec and unit styles?
<toretore>
the `it`? who cares
<toretore>
it's just some sugar for defining a method
<toretore>
anyway, it doesn't matter as long as it works and does the job
<emilkarl>
yep
<emilkarl>
ok
<toretore>
i would forego the whole spec thing, but that's me
dumdedum_ has joined #ruby
charliesome has quit [Quit: zzz]
blackmesa has quit [Ping timeout: 276 seconds]
doritostains has quit [Ping timeout: 265 seconds]
leafybasil has joined #ruby
terlar has joined #ruby
chipotles has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
tomphp has quit [Ping timeout: 255 seconds]
krz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
zotherstupidguy has joined #ruby
nii236 has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has joined #ruby
krz has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
jerematic has quit [Ping timeout: 255 seconds]
zz_Outlastsheep is now known as Outlastsheep
Ropeney has quit [Quit: Leaving...]
scripore has joined #ruby
SOLDIERz has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
rodfersou has joined #ruby
tomphp has joined #ruby
<shevy>
you are so lazy
tomphp is now known as Guest30019
sandstrom has quit [Quit: My computer has gone to sleep.]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
SouL_|_ has quit [Ping timeout: 250 seconds]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
doodlehaus has joined #ruby
jeromelanteri has joined #ruby
reinaldob has quit [Remote host closed the connection]
charliesome has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
gaganjyot has quit [Quit: Leaving]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
reinaldob has joined #ruby
jottr_ has joined #ruby
<shevy>
can pure rack be used for much?
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
<adaedra>
yes
<zotherstupidguy>
shevy new rack or current rack?
mooe has quit [Quit: Connection closed for inactivity]
<zotherstupidguy>
tenderlove is writing "the metal"
<shevy>
zotherstupidguy latest version of rack
reinaldob has joined #ruby
<shevy>
I don't know what is the metal
<shevy>
what I am reading like normally is "this webframework is using rack"
doodlehaus has quit [Ping timeout: 256 seconds]
reinaldob has quit [Remote host closed the connection]
wolflee has quit [Ping timeout: 245 seconds]
<zotherstupidguy>
the idea is to rewrite rack so that it is more of specification than the current middleware container it is
mengu has joined #ruby
edwinvdg_ has joined #ruby
<zotherstupidguy>
yeah, you can use rack to build web frameworks
<shevy>
hmm
wolflee has joined #ruby
<zotherstupidguy>
the best written resource on the net is a translated from chinese book about rack
<shevy>
I guess that is also something I haven't quite understood yet
reinaldob has joined #ruby
<shevy>
chinese?
reinaldob has quit [Remote host closed the connection]
Flowrhent has joined #ruby
<zotherstupidguy>
yeah, its pretty comprehensive
hackeron has quit [Ping timeout: 256 seconds]
<zotherstupidguy>
i will try find it online for you
piotrj has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
reinaldob has joined #ruby
PhantomSpank has joined #ruby
<zotherstupidguy>
but anyway, you can get a flavor of what you can do with rack by checking out somthing like almost-sinatra on github
PhantomSpank has quit [Read error: Connection reset by peer]
<zotherstupidguy>
almost-sinatra is a six-line webframework written on top of rack, so thats awesome
<jhass>
you totally can use rack directly
gagrio_ has joined #ruby
hackeron has joined #ruby
PhantomSpank has joined #ruby
jottr_ has quit [Ping timeout: 264 seconds]
<jhass>
makes sense for minimal stuff like just issuing a redirect or something
<zotherstupidguy>
jhass true, but a dsl is nice! beside he would use a templating language =)
<zotherstupidguy>
jhass ofcourse it depends on the usecase
reinaldob has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Ping timeout: 248 seconds]
PhantomSpank has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
zotherstupidguy has quit [Quit: leaving]
piotrj has joined #ruby
reinaldob has joined #ruby
zotherstupidguy has joined #ruby
<toretore>
rack *is* a specification
<jhass>
well, there are two things we call rack
reinaldob has quit [Remote host closed the connection]
<apeiros>
toretore: I think I thought I could do it better with 10y more of experience.
<Atomicalloy>
apeiros, What's hard about that?
<zotherstupidguy>
apeiros who needs large systems when you can make distrubted small ones, thats key
ismaelga has joined #ruby
<apeiros>
zotherstupidguy: many small systems form together a large system
<apeiros>
zotherstupidguy: not much different from many small classes together forming a large system
terlar has quit [Ping timeout: 250 seconds]
<apeiros>
only communication pathways are slightly different
sdothum has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
<Atomicalloy>
Define "large systems"
<jhass>
maasha: hard to tell, my guess would be that the process you call never closes its stdout
RegulationD has joined #ruby
PhantomSpank has joined #ruby
<apeiros>
Atomicalloy: your experience * number of lines of code * number of use cases
* zotherstupidguy
thinkin large system == java or big slow to develop code
Rickmasta has joined #ruby
<apeiros>
that formula can probably be improved :D
PhantomSpank has quit [Read error: Connection reset by peer]
Alina-malina has quit [Ping timeout: 256 seconds]
<toretore>
large system doesn't have anything to do with language
PhantomSpank has joined #ruby
<toretore>
large is large
<apeiros>
but to rephrase it: large depends a lot on you/the team and the tools
<maasha>
jhass: it works on some datasets, but not all. It will probably work if I used a system call and temporary files, but I would like to use open3.
<Atomicalloy>
apeiros, I have years of experience in programming, but new in Ruby. I said it before here in #ruby, I made various programs such as an NES emulator which requires times :)
<jhass>
apeiros: it's fine, just never define which outcomes count as large
<Atomicalloy>
But my main goal is web development, so I'm learning Ruby to move on with Rails.
<toretore>
maasha: obviously your stdout.read isn't reading, so it just sits there
bruno- has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
* zotherstupidguy
thinking a large system is a system that you fear, fear to change and further improve, so thats relativly large for you
<maasha>
toretore: yes, something is hanging.
<jhass>
maasha: ^ so for those datasets the process you call never finishes
PhantomSpank has joined #ruby
lidenskap has joined #ruby
<hanmac>
Atomicalloy: imo ruby is more awesome than only using it for web development ;P
<apeiros>
maasha: IME some processes require your write to be closed before they start to emit data
wookiehangover has quit [Ping timeout: 256 seconds]
<toretore>
you can make the case that ruby isn't a good fit for large systems too
<Atomicalloy>
hanmac, Yea but I wanted to move away from desktop development and start with the web :p
tvw has joined #ruby
<apeiros>
ah, seems you actually do close that
SouL_|_ has joined #ruby
<maasha>
apeiros: hm. so drop open3 and use system() and temporary files?
<zotherstupidguy>
Atomicalloy I am trying to use gamebox nowadays to write a 2d game =)
<zotherstupidguy>
ruby in games!
<toretore>
Atomicalloy: web development easily transforms in to "large system development"
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<zotherstupidguy>
workmad jhass thanks
PhantomSpank has joined #ruby
<adaedra>
I heard TLS v1.0 is at trouble too
Nimf has joined #ruby
<certainty>
cryptocalypse is coming
<certainty>
we're all going to die
<jhass>
yes, TLS 1.0 is basically SSLv3, so it has similar issues
* certainty
runs screaming like crazy
<jhass>
TLS 1.1 is okayish but the general SSL/TLS design is worrysome to many people
<mwlang>
jhass: thanks for the source references. that quickly led me to finding the “right” option. :version => :SSLv3 did the trick.
haidahaha_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haidahaha has quit []
haidahaha_ is now known as haidahaha
<mwlang>
I’m passing on the poodle links, esp. as some of the security alerts are on the gov’t’s own websites. Surely they listen to themselves, right?
SouL_|_ has quit [Ping timeout: 256 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
PhantomSpank has joined #ruby
doodlehaus has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
fluter has quit [Ping timeout: 256 seconds]
haidahaha has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
<certainty>
Das also war des Poodles Kern!
oo_ has joined #ruby
<jhass>
bah, faust
<certainty>
:)
<jhass>
had to read that :/
* hanmac
does laugh about the german sounding joke
omegahm has joined #ruby
<certainty>
jhass: i guess we all had to.
<certainty>
that's how they torture poor german students
<certainty>
i liked it though
<certainty>
in fact i've read it before voluntarily
<hanmac>
certainty: try to tell jokes in saxon dialect ... thats funny ;P
<jhass>
Faust II too?
<certainty>
jhass: well nope that one I didn't like too much. very boring
<certainty>
sequels are always bad
<certainty>
i liked faust and urfaust
<certainty>
hanmac: hehe, i can do that!
Zai00 has joined #ruby
JDiPierro has joined #ruby
SouL_|_ has joined #ruby
michael_mbp has quit [Excess Flood]
PhantomSpank has quit [Read error: Connection reset by peer]
wottam has joined #ruby
PhantomSpank has joined #ruby
haidahaha has joined #ruby
userjs has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 245 seconds]
PhantomSpank has joined #ruby
Akagi201 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<shevy>
I did not have to read Faust!
PhantomSpank has joined #ruby
<hanmac>
certainty: "Vater, der jäger is, und Sohn sitzen auf einem Hochposten am Waldrand, in der Richtung des Vaters läuft eine Frau dem Weg entlang, aber in der Richtung des Sohnes kommen mehrere Füchse aus dem Wald. und der Junge ruft: "Fixse!" worauf der Vater antwortet: "aber sag es nicht Mama""
<certainty>
hanmac: hahah, i knew that one :)
haidahaha has quit [Client Quit]
michael_mbp has joined #ruby
<certainty>
shevy: you're from austria, no?
<shevy>
yeah
<certainty>
so it has something good to it :p
Zai00 has quit [Ping timeout: 256 seconds]
haidahaha has joined #ruby
<hanmac>
shevy i hope you get my joke too :p or is saxon to difficult for you? ;P
<shevy>
we had to read some strange literature in german classes
doertedev has quit [Quit: Lost terminal]
iotouch has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<shevy>
one book was about a strange cat (Kater Muck? something like that)
PhantomSpank has joined #ruby
<certainty>
i don't know that one
<shevy>
and boring theater plays... let me try to remember...
nii236 has quit [Ping timeout: 252 seconds]
<certainty>
who names his cat muck anyway
<certainty>
cats need majestic names
<certainty>
like monolith
<certainty>
*scnr*
<shevy>
some things from Johann Nestroy
jokester has joined #ruby
oo_ has quit [Remote host closed the connection]
haidahaha_ has joined #ruby
<shevy>
it's as if you take the ancient past, and put it into modern days
<shevy>
and it is boring... what a surprise
<shevy>
they did not have youtube back then
haidahaha has quit [Read error: Connection reset by peer]
haidahaha_ is now known as haidahaha
PhantomSpank has quit [Read error: Connection reset by peer]
<shevy>
certainty I can't even remember what the cat did but apparently it was a heroic cat
haidahaha has quit [Client Quit]
PhantomSpank has joined #ruby
scripore has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<hanmac>
certainty: part of my family are "Förster/Jäger" i was told that joke then i was very little ... i think i was 8 - 10, i think in days like now that joke would been censored from some "extremist" groups like feminists or other "think about the children" fractions ...
<certainty>
shevy: the cat didn't evn have a twitter account?
PhantomSpank has joined #ruby
<shevy>
certainty no... hmm
<shevy>
I read another cat story though, Ginger the red
<shevy>
that one made me sad, the cat died against some ferrets or so :(
<certainty>
isn't that redundant?
<shevy>
haha
<shevy>
it was some heroic farm cat that killed mice
<certainty>
hanmac: you're possibly true. Did you get it when you were 8 - 10?
mostlybadfly has joined #ruby
<shevy>
until those ferrets or pack of marders or whatever it was killed it
Akagi201_ has joined #ruby
<certainty>
what's heroic about doing what cats do?
<hanmac>
certainty: yeah i think i did
Joffily has joined #ruby
<shevy>
hanmac cool, rural guys are simple people!
<certainty>
hanmac: i do think about the children and my daughter is 8. I could safely tell that joke and the only response i'd expect would be her loughing in order to try to cover that she didn't understand
<certainty>
shevy: it died defending the farm? well that's a totally different thing then
<certainty>
shevy: did you read books without cats?
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gazay has joined #ruby
lxsameer_ has quit [Ping timeout: 252 seconds]
mtakkman has joined #ruby
dstarh has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
chipotles has joined #ruby
sameerynho has joined #ruby
PhantomSpank has joined #ruby
SouL_|_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
bMalum has joined #ruby
chipotles has quit [Client Quit]
workmad3 has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
iotouch has quit [Ping timeout: 255 seconds]
ismaelga has quit [Remote host closed the connection]
iotouch has joined #ruby
sevenseacat has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
lxsameer_ has joined #ruby
zotherstupidguy has quit [Ping timeout: 245 seconds]
PhantomSpank has joined #ruby
nfk|laptop has joined #ruby
quimrstorres has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
zotherstupidguy has joined #ruby
chipotles has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
Rapier- has joined #ruby
PhantomSpank has joined #ruby
bmurt has joined #ruby
iotouch has quit [Client Quit]
jerematic has joined #ruby
sankaber has joined #ruby
sameerynho has quit [Ping timeout: 264 seconds]
leafybasil has joined #ruby
mtakkman has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
timmow_ is now known as timmow
JDiPierro has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
McRae has joined #ruby
PhantomSpank has joined #ruby
segfalt has joined #ruby
bluOxigen has joined #ruby
WajidKagzi has joined #ruby
lessless has quit [Max SendQ exceeded]
chrisarc1nd is now known as chrisarcand
kedare has joined #ruby
iotouch has joined #ruby
sgambino has joined #ruby
thumpba has joined #ruby
WajidKagzi has quit [Client Quit]
decoponio has joined #ruby
bMalum has quit [Quit: bMalum]
cpt_yossarian is now known as woodruffw
nfk|laptop has quit [Quit: yawn]
woodruffw has quit [Quit: And then he took off.]
PhantomSpank has quit [Read error: Connection reset by peer]
woodruffw has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
PhantomSpank has joined #ruby
thumpba_ has joined #ruby
Guest15 has joined #ruby
bMalum has joined #ruby
griffindy has joined #ruby
thumpba has quit [Ping timeout: 252 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
Mohan_ has quit [Ping timeout: 264 seconds]
sent1nel has joined #ruby
livathinos has quit [Ping timeout: 272 seconds]
Mohan_ has joined #ruby
scripore has joined #ruby
baash051 has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
dblessing has joined #ruby
edwinvdg_ has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dblessing has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
diegoaguilar has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
dblessing has joined #ruby
joe_meade has joined #ruby
mjuszczak has quit []
edwinvdgraaf has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 244 seconds]
chinmay_dd has joined #ruby
gaganjyot has joined #ruby
Flowrhent has quit [Quit: Remote host closed the connection.]
fgo has quit [Ping timeout: 276 seconds]
SOLDIERz has joined #ruby
cassianoleal has joined #ruby
mjuszczak has joined #ruby
cassianoleal has quit [Client Quit]
umgrosscol has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
woodruffw has quit [Ping timeout: 252 seconds]
uri_ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
<AirStar>
how many programming ordinary people use?
<certainty>
hmm?
<tobiasvl>
how many programming?
<sevenseacat>
oh man AirStar is still going
dseitz has joined #ruby
<AirStar>
yes. how many programming?
<apeiros>
AirStar: that question makes no sense. try rephrasing it?
<AirStar>
i don’t know that i will use only one programming or many?
<tobiasvl>
what is a programming?
<tobiasvl>
programming is a verb
<apeiros>
do you mean "programming *languages*"?
<AirStar>
yes
<AirStar>
programming language
<AirStar>
oh
<apeiros>
ordinary people? probably zero.
DeBot has quit [Quit: Crystal]
<AirStar>
i think that programming is noun.
<AirStar>
oh verb
DeBot has joined #ruby
philip1 has joined #ruby
blackmesa has joined #ruby
<shevy>
hmm how do I define << method again? def <<(i) that's it right?
<umgrosscol>
AirStar: ordinary people aren't usually programmers. Most programmers use two to three languages daily, but that greatly depends on the field their in.
<apeiros>
shevy: yes
<shevy>
okies
freerobby has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
hiyosi has joined #ruby
<AirStar>
i m not programmer. i only use programming language for convenience.
scripore has joined #ruby
<AirStar>
umgrosscol:
banister has joined #ruby
moeabdol has joined #ruby
lsmola_ is now known as lsmola
avril14th has quit [Remote host closed the connection]
<umgrosscol>
AirStar: I don't know many people that would use something just to inconvenience themselves.
<umgrosscol>
AirStar: with the exception of exercise equipment. Exercise is about being deliberately inconvenient to strengthen yourself.
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<segfalt>
i would start holding my breath immediately
<segfalt>
;-)
EagleDelta has joined #ruby
thatslifeson has quit [Ping timeout: 256 seconds]
Channel6 has joined #ruby
ismaelga has joined #ruby
segfalt has quit [Quit: segfalt]
[k- has joined #ruby
CloCkWeRX has joined #ruby
<apeiros>
class << Module; alias foo bar; end # is actually only 6 symbols and by the given definition "concise"
quimrstorres has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
<apeiros>
or well, 7 symbols if you consider class<< to be 2 symbols.
<cek>
well segfart was very close
<apeiros>
!kick cek insults are not welcome
<helpa>
apeiros: No.
cek was kicked from #ruby by ruboto [insults are not welcome]
<tobiasvl>
segfart. haha. wtf
<tobiasvl>
is it just me or are there more trolls in here nowadays
<jhass>
eh, I think that was actually unintentional :D
<apeiros>
I doubt that
<apeiros>
cek isn't unknown
<umgrosscol>
Not sure which keyboards have l and r next to one another.
<apeiros>
+ ^
<jhass>
and yay, another helpa conflict! :(
<umgrosscol>
Anyone know why he was trying to write ruby using perl rules?
quimrstorres has joined #ruby
shevy has quit [Ping timeout: 276 seconds]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
paulcsmith has joined #ruby
woodruffw has quit [Quit: And then he took off.]
gfawcettpq has joined #ruby
<umgrosscol>
I'm a fan of code like, Dear :backend, take: "foo", combine_with: "bar"
mrmargolis has quit [Read error: Connection reset by peer]
<apeiros>
umgrosscol: objc coder? :)
mary5030 has joined #ruby
<apeiros>
I think smalltalk has that too? not sure…
mrmargolis has joined #ruby
agarie has joined #ruby
<apeiros>
jhass: re helpa - working on it
<umgrosscol>
apeiros: Nope. Just enjoy the cutesiness of ruby.
<[k->
could be possible in ruby
kblake has joined #ruby
cek has joined #ruby
kedare has quit [Remote host closed the connection]
<cek>
so the correct answer is : klass.instance_exec { alias :new :old }
psy_ has quit [Ping timeout: 256 seconds]
<mwlang>
ugh…cap 3 kills me. what the heck is capistrano-passenger gem doing that’s so complicated that it needs sudo to restart?
<[k->
you should use alias_method?
Matachines has joined #ruby
<cek>
alias_method wouldn't help in that case
<cek>
klass being a Module.
<[k->
oh, then do the class << self thing
<mwlang>
isn’t touching the tmp/restart.txt file enough these days to restart passenger?
<cek>
[k-: i already provided the correct answer.
<theotherstupidgu>
cek gist or it never happened!
Matachines has quit [Client Quit]
<[k->
there is also module_exec
<apeiros>
mwlang: afaik yes
<mwlang>
otherwise, I have to set passenger_restart_with_sudo to true *and* add password-less sudo for my deploy user….that seems like a security risk.
<apeiros>
mwlang: at least that's how I restart it
<cek>
I hereby declare that's the only TRUE class method alias that you should use when you wish to be concise and not open a new scope.
<mwlang>
apeiros: so how do you do it with cap 3?
<apeiros>
cek: but a block opens a new scope
<cek>
mwlang: it will restart on next request
rodferso1 has quit [Quit: leaving]
<apeiros>
mwlang: I don't use cap, sorry
rodfersou has joined #ruby
<[k->
alias is not good because it affects inheritance pr something
<umgrosscol>
mwlang: can't you limit the deploy user's sudo access to a single command in the sudoers file?
<mwlang>
umgrosscol: yeah, I just gotta dig out documentation on doing that and do more testing than I intended.
<cek>
you can access local vars outside the block, class << won't allow you that.
<[k->
that much is true
<apeiros>
cek: so your arbitrary rule wasn't actually "don't open a new scope" but "need access to outside lvars"
edwinvdg_ has quit [Remote host closed the connection]
<vikaton>
are you allowed to make syscalls in erb ?
<apeiros>
mod.singleton_class.send :alias_method, foo, bar
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Matachines has joined #ruby
<apeiros>
vikaton: erb itself does not restrict you in any way regarding code running in it
edwinvdgraaf has joined #ruby
<vikaton>
oh
Lewix_ has joined #ruby
<vikaton>
cuz I'm getting erros only with syscalls
terlar has quit [Quit: WeeChat 1.1.1]
Mezjin has quit [Ping timeout: 248 seconds]
<apeiros>
vikaton: then either you have safe_level set in erb, outside erb or something else restricting you
<cek>
didn't know singleton_method existed.
terlar has joined #ruby
<cek>
i mean _)class. and all the family
shevy has joined #ruby
<umgrosscol>
mwlang: I think it's pretty straight forward for a single command you want a user to be able to execute. deployuser ALL = NOPASSWD: /etc/init.d/apache2
mrmargol_ has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
kedare has joined #ruby
iamjarvo has joined #ruby
lsmola has quit [Quit: Leaving]
edwinvdg_ has joined #ruby
mengu has quit [Remote host closed the connection]
<apeiros>
vikaton: also once safe level is restricted, you can't unrestrict it
<apeiros>
otherwise it'd be pretty pointless
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
dseitz has quit [Quit: bbl]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<vikaton>
App 21371 stderr: [ 2015-04-30 14:19:19.1851 21386/0x007f87eb075538(Worker 1) utils.rb:85 ]: *** Exception Errno::ENOENT in Rack application object (No such file or directory - echo
<vikaton>
:S
<vikaton>
thats the error im getting now
PhantomSpank has joined #ruby
tkuchiki has joined #ruby
PhantomSpank has quit [Remote host closed the connection]
shellfu_afk is now known as shellfu
nii236 has quit [Ping timeout: 252 seconds]
nettoweb has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
griffindy has joined #ruby
enebo has joined #ruby
Guest15 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Tomasso has joined #ruby
joelataylor has quit [Quit: Be back later ...]
tkuchiki has quit [Remote host closed the connection]
icebourg has joined #ruby
joelataylor has joined #ruby
terlar has joined #ruby
slash_nick has joined #ruby
leafybas_ has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<Tomasso>
i have to highlight certain parts of a text, for example when something matches to 7878484848484848484 (19 numbers), replace text by "<a href="#">7878484848484848484</a>" , but the problem is that then the function that highlights runs again, and what happens is "<a href="#">"<a href="#">7878484848484848484</a>"</a>" and so ooon... any way to look at the context where the match occurs?
ndrei has quit [Ping timeout: 255 seconds]
leafybasil has quit [Ping timeout: 264 seconds]
tagrudev has quit [Remote host closed the connection]
<jhass>
Tomasso: have a look at lookaround expressions
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<mwlang>
umgrosscol: finally got it .. I wasn’t supplying full path to the passenger-config and that gave me “syntax error” until I did: deploy ALL = (ALL) NOPASSWD: /usr/bin/passenger-config
revoohc has joined #ruby
<jhass>
Tomasso: though running text processing functions multiple times over the same text can also hint a design issue
ndrei has joined #ruby
joelataylor has quit [Ping timeout: 256 seconds]
<umgrosscol>
Tomasso: You're looking to make your replacement idempotent?
<cek>
anyone had experience with 0MQ here?
<jhass>
?anyone cek
<ruboto>
cek, Just ask your question, if anyone has, they will respond.
<umgrosscol>
Tomasso: expand the pattern to include some of the surrounding characters that you specific should not be present
rmoriz has joined #ruby
<cek>
msg send returning OK despite hitting high watermark and subscriber being unreachable
<umgrosscol>
Tomasso: So match 19 numbers that are not surrounded with > and <
leafybas_ has quit [Ping timeout: 265 seconds]
riotjones has joined #ruby
casadei_ has joined #ruby
edwinvdgraaf has joined #ruby
riotjones has quit [Read error: Connection reset by peer]
<Tomasso>
umgrosscol: that could be, but if im iterating over the list of results, I don't know to what > < belongs..
riotjones has joined #ruby
odin22 has joined #ruby
<Tomasso>
jhass: i want it to run so when the user types a certain pattern, gets detected
<umgrosscol>
Tomasso: okay, expand further.
<xxneolithicxx>
it sounds as if your almost doing a half baked search replace that may benefit from using a proper DOM parser first and be replacing all 19 number strings with a new element as long it wasnt already in an anchor
tvw has quit [Remote host closed the connection]
<umgrosscol>
Tomasso: make sure it isn't surrounded by <a heref="#"> and </a>
<xxneolithicxx>
that would make it idempotent
<jhass>
or just don't run it multiple times
<jhass>
store unchanged, parse on render
<umgrosscol>
jhass: That's a dangerous and inconvenient way to live.
<Tomasso>
I will have to detect first the number, and then add the no <> condition, but it should be in the same regex
<umgrosscol>
Tomasso: it's all one pattern.
<Tomasso>
yesh
<umgrosscol>
Tomasso: You're looking for 19 numbers NOT surrounded by the text you're going to insert.
Mohan_ has quit [Ping timeout: 250 seconds]
<xxneolithicxx>
s/[^>]?(\d{19})[^<]?/<a>\1</a>/ or something like that
last_staff has joined #ruby
<jhass>
use lookaround expressions, as I said initially
sinkensabe has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 256 seconds]
<xxneolithicxx>
that forward slash might need escaping
<jhass>
but since this looks like some automatic linking, it should run close before rendering, not before storage
leafybasil has joined #ruby
sinkensabe has joined #ruby
Mohan has joined #ruby
Mohan is now known as Guest85423
edwinvdgraaf has quit [Remote host closed the connection]
surs has quit [Quit: WeeChat 0.3.7]
<apeiros>
*sob*, ruby 2.2, Mutex is still not recursive :(
<apeiros>
or reentrant
<havenwood>
apeiros: Monitor!
<apeiros>
havenwood: Monitor is quite a bit heavier weight, no?
<jhass>
apeiros: granted, pthread makes that hard to unusable
<havenwood>
apeiros: I don't know under the hood.
horsecowdog has quit [Read error: Connection reset by peer]
<apeiros>
hm, but since I don't want to reinvent *that* wheel *too*, I guess I'll just use monitor.
<apeiros>
thanks for the hint, havenwood
<jhass>
isn't Monitor just a wrapper around Mutex & ConditionVariable?
horsecowdog has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nahtnam has joined #ruby
<apeiros>
jhass: pthread makes reentrant mutex hard to unusable?
<jhass>
yeah
<apeiros>
how come?
baroquebobcat has joined #ruby
MXfive has joined #ruby
<jhass>
let me see if I can find it again
<apeiros>
oh, if it's TL, then I'll DR
freerobby has quit [Quit: Leaving.]
<apeiros>
not that you search for it if it's long :)
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
sinkensabe has quit [Ping timeout: 264 seconds]
last_staff has quit [Quit: last_staff]
aganov has quit [Remote host closed the connection]
<jhass>
I think it was in pthread_mutex_lock(3) somewhere
edwinvdgraaf has joined #ruby
<jhass>
can't find it, but there were one or two very odd things about it
failshell has quit [Remote host closed the connection]
<apeiros>
I guess I'll have to find all Mutex.new in my code and replace it with Monitor
nateberkopec has joined #ruby
<blackjid>
hi guys, any rbenv expert here?
allcentury has quit [Ping timeout: 250 seconds]
<adaedra>
State your question, and if someone can, he'll answer.
livathinos has quit []
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Soda has joined #ruby
failshell has joined #ruby
<umgrosscol>
?anyone blackjid
<ruboto>
blackjid, Just ask your question, if anyone has, they will respond.
JDiPierro has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
PhantomSpank has joined #ruby
<jhass>
apeiros: ah I remember now, you can't use condition variables (pthread_cond_) in a reentrant mutex (pthrex_mutex_)
<blackjid>
i have server with system ruby and rbenv for the user deploy. I want to install a gem at system ruby but with --user-install so it goes to /home/deploy/.gem and that user doesn't need sudo to execute. Then, as deploy user, I want to be able to run RBENV_VERSION=system which <gem> and get /home/deploy/.gem/ruby/2.1.0/bin/<gem> but if I run which <gem> get /home/deploy/.rbenv/shims/<gem>
Tomasso has quit [Quit: Page closed]
ChoiKyuSang has joined #ruby
<apeiros>
jhass: concurrency primitives, how I love thee
<blackjid>
of course thats in the case that I have done RBENV_VERSION=system gem install <gem> --user-install and gem install <gem> from the deploy user...
<jhass>
apeiros: yeah, let's just use a semaphore for everything!
leafybasil has quit [Ping timeout: 256 seconds]
Nimf has joined #ruby
sankaber has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
sankaber has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
<havenwood>
blackjid: Running these commands from shell directly or shelling out from another Ruby?
SOLDIERz has joined #ruby
<blackjid>
running directly from the shell
Kricir has joined #ruby
<zotherstupidguy>
apeiros how to read a file starting from the 2nd line till the EOF?
freeze has joined #ruby
quimrstorres has quit [Remote host closed the connection]
konsolebox has quit [Quit: Leaving]
<apeiros>
zotherstupidguy: no need to ask me specifically. others in the channel know too.
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
<apeiros>
zotherstupidguy: you can use gets to skip the first line, then .read to read the rest
konsolebox has joined #ruby
<umgrosscol>
blackjid: You're going to have to try to manage two different sets of paths doing it like that.
<shevy>
he only wants to ask apeiros :(
<apeiros>
zotherstupidguy: or you use File.readlines + shift to skip the first line
<zotherstupidguy>
i was hoping for somthing like readlines[1...-1]
<shevy>
you have an array
<shevy>
but you get [0] as well
rbennacer has quit [Read error: Connection reset by peer]
<apeiros>
zotherstupidguy: sure. File.readlines returns an array. [1..-1] works on that.
<havenwood>
zotherstupidguy: Try it!
<jhass>
zotherstupidguy: that'll work, another one is File.readlines.drop(1).each
<zotherstupidguy>
jhass i like this one
snockerton has joined #ruby
<umgrosscol>
rbenv won't see the gems installed in for you system ruby unless you explicitly add that path to gem_home.
<zotherstupidguy>
thank you
<[k->
you could use a ruby script to mv the gems
rbennacer has joined #ruby
quimrstorres has joined #ruby
<[k->
and do a one-click install
<[k->
or rather one-command install
<umgrosscol>
blackjid: but then you could have problems with the difference in ruby version.... say the user was doing something with jruby, and you've set the path to use the system nokogiri gem... his apps won't run.
leafybasil has joined #ruby
<toretore>
file.each.drop(1)
gaganjyot has quit [Ping timeout: 255 seconds]
<umgrosscol>
blackjid: We use rbenv for the system rubies. So the only things available to users are the ruby's the sysadmins install. We just have rake, rails, and bundler installed as system gems for each of those rubies.
<toretore>
gives you an enumerator instead of reading the entire file into memory
failshell has quit [Remote host closed the connection]
claw has joined #ruby
<umgrosscol>
blackjid: So if the users want to monkey about with installing their own gems for dev, they just do it with bundle install --path=vendor/bundle or some local directory.
failshell has joined #ruby
thatslifeson has joined #ruby
<apeiros>
toretore: nope. drop sadly returns an array
<blackjid>
umgrosscol what do you mean with using rbenv for system rubies?
<umgrosscol>
blackjid: I mean that root uses rbenv. So that anyone typing which ruby would get /l/local/rbenv/shims/ruby
<IceDragon>
apeiros: what does drop do? (being to lazy to read docs)
rodfersou has quit [Quit: leaving]
<umgrosscol>
blackjid: so each user can pick from the installed rubies on the machine, but they can't install their own.
<apeiros>
IceDragon: drop(n) returns an array without the first n elements
theotherstupidgu has quit [Remote host closed the connection]
<apeiros>
IceDragon: also for future reference - I'm not your docs :-p
<IceDragon>
apeiros: so slice(n, length - n)
<IceDragon>
>_>;
theotherstupidgu has joined #ruby
<IceDragon>
apeiros: YOU WILL FOREVER BE MY DOCS, MUHAHAHAHAHAHA
gccostabr has quit [Quit: See you later!]
<apeiros>
we shall see…
<umgrosscol>
blackjid: the only not I have about doing that is throw rbenv_profile into root's directory. So when you su - over to root, you can just run . rbenv_profile when you need to work with rbenv... like for installing new ruby versions or adding system gems to a ruby version
<umgrosscol>
s/not/note/
<umgrosscol>
blackjid: Trying to get rbenv to use gems you installed to a ruby not under rbenv's directory structure sounds painful and error prone.
nobitanobi has joined #ruby
jerematic has quit []
horsecowdog has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
<umgrosscol>
blackjid: However, if you're insistent on it, you can set the GEM_HOME or GEM_PATH of your deploy user to point to /home/deployuser/.gems or wherever.
Rollabunna has joined #ruby
joelataylor has joined #ruby
nii236 has joined #ruby
<blackjid>
umgrosscol i'm not particulary insistent... what I really need is to have some rubies and gems installed at system level, that can be used by users....
Coraline has left #ruby ["Zoom zoom"]
<umgrosscol>
blackjid: We've had good luck using rbenv for that.
<blackjid>
umgrosscol my particular case.... I have multiple applications deployed on the server, with different versions of ruby using the .ruby-version file. Also those applications are monitored by the eye gem,which I want to be executed with the system ruby regardless which ruby version is using the application.
<blackjid>
umgrosscol I think your approach works for that right?
joelataylor has quit [Ping timeout: 252 seconds]
hewenhong has joined #ruby
hewenhong has quit [Client Quit]
<umgrosscol>
You'd have to have your eye gem installed for each version of ruby you're running.
nii236 has quit [Ping timeout: 256 seconds]
vire has quit [Ping timeout: 256 seconds]
<umgrosscol>
I'm not familiar with that gem. Is it a part of each application? or is it a wholly separate process?
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blackjid>
umgrosscol is not part of the application, just a separate process that monitor PIDs
<blackjid>
umgrosscol that's why I want to run it always with the same version of ruby, regardless of the application's .ruby-version
theotherstupidgu has quit [Ping timeout: 255 seconds]
<adaedra>
[k-: IDE as a service?
<umgrosscol>
blackjid: So it's your process monitor tool? Then yeah, it shouldn't matter.
<adaedra>
I've been testing Visual Studio Code since this morning with ruby code, it's rather neat
<[k->
kind of
Tuxified has quit [Ping timeout: 272 seconds]
<[k->
CodeBunk provides a Realtime Collaborative Editor with Compile/Run. CodeBunk also has Peer-to-Peer Video/Audio and Text chat facility. CodeBunk is ideal for Online Interviewing of Developers as well as Learning to code from Friends.
hewenhong has joined #ruby
<[k->
its like google docs
<[k->
but with code
<umgrosscol>
blackjid: rbenv should let you set the ruby version per application. I usually do it per user and per shell, but i think there is a local option for per directory.
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blackjid>
umgrosscol just to confirm, just install rbenv as root in /usr/local/rbenv ???
iotouch has quit [Read error: Connection reset by peer]
joelataylor has joined #ruby
iotouch has joined #ruby
zorak8 has joined #ruby
Ellis has joined #ruby
Ellis has quit [Client Quit]
colorados2 has quit [Read error: Connection reset by peer]
Atomicalloy has quit [Remote host closed the connection]
SOLDIERz has quit [Ping timeout: 276 seconds]
hewenhong has quit [Ping timeout: 256 seconds]
crus` has quit [Ping timeout: 250 seconds]
Matachines has joined #ruby
dfinninger has joined #ruby
theotherstupidgu has quit [Ping timeout: 256 seconds]
Eiam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Matachines has quit [Max SendQ exceeded]
gaganjyot has joined #ruby
<[k->
There's also anther one: http://collabedit.com/ this one is free but it doesn't run code
Matachines has joined #ruby
<adaedra>
I don't like these kind of things personally
theotherstupidgu has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
<Nimf>
You can take a look at this also: https://c9.io
<[k->
lol i posted them so we could help people code >.<
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<[k->
cloud9's website looks refreshed
<[k->
much nicer looking
<jhass>
there are tons of these by now
<Nimf>
Oh, sorry. I thought you are looking for collaborative cloud development environment
<jhass>
there's even one that spins up entire preconfigured VMs for you
dopie has joined #ruby
<jhass>
I can never remember the names of these thingys
woodruffw has joined #ruby
<[k->
i didn't know cloud9 could be collaborative till now
GaryOak_ has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
<[k->
there is nitrous.io, codeenvy, koding, codebox, etc
ndrei has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jimms has joined #ruby
<Nimf>
yup nitrous.io also looks very promising
Limix has joined #ruby
hewenhon_ has quit [Remote host closed the connection]
terlar has quit [Quit: WeeChat 1.1.1]
riotjones has joined #ruby
<ytti>
not trying to push any buttons
<ytti>
but what is the use-case for browser editor?
anisha has quit [Quit: Leaving]
<ytti>
is it for google pixel type of deals
<ytti>
or is there also use case for 'normal' desktop/laptop use?
sent1nel has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 264 seconds]
<ytti>
i wonder if one of those is GPL/BSD licensed, might be nice gitlab
Spami has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
<[k->
well it is sort of like a vm
<[k->
if you are windows and need linux tools
<[k->
you dont need to install anything else
<ytti>
you get linux tooling in-editor?
<[k->
so theres that
<[k->
yup
colorados2 has joined #ruby
<ytti>
oh, that's cool
gagrio has quit [Ping timeout: 244 seconds]
gagrio_ has quit [Ping timeout: 265 seconds]
dvlwrk has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
riotjones has quit [Ping timeout: 265 seconds]
bruno-_ has quit [Ping timeout: 255 seconds]
gauke has quit [Quit: gauke]
dopie has quit [Quit: This computer has gone to sleep]
crus has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
ta_ has joined #ruby
revoohc has quit [Quit: revoohc]
gizmore has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
ta has quit [Ping timeout: 245 seconds]
<umgrosscol>
blackjid: or wherever you want to put it.
einarj has quit [Remote host closed the connection]
revoohc has joined #ruby
<blackjid>
umgrosscol what do you do if you want to execute rbenv in a non-interactive shell script, how do you initialize it?
jimms has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
piotrj has joined #ruby
<toretore>
you don't, really
<toretore>
what's the reason you have rbenv in the first place?
ta_ has quit [Ping timeout: 250 seconds]
zdman135 has joined #ruby
<[k->
bash already initializes it
piotrj has quit [Read error: Connection reset by peer]
<[k->
so when your script is run, its there
<[k->
accessible via `code` or %x[code]
piotrj has joined #ruby
terlar has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
krz has quit [Quit: WeeChat 1.0.1]
zotherstupidguy has joined #ruby
nb_bez___ has joined #ruby
hewenhong has joined #ruby
Spami has joined #ruby
<GaryOak_>
what editors are people using for ruby these days?
<toretore>
intellij
<terrellt>
Vim.
<[k->
sublimetext
gaganjyot has quit [Ping timeout: 276 seconds]
<[k->
brackets
<nb_bez___>
Sublime
Spami has quit [Client Quit]
<[k->
lighttable maybe
<GaryOak_>
Is there anything in them that are the 'killer app' for you as a dev?
<umgrosscol>
blackjid: I think you'd source rbenv_profile. Why do you want to call rbenv non interactively? to select the ruby version? you can do that with an env varaible
pengin has joined #ruby
<GaryOak_>
For ruby specifically
Jackneill has joined #ruby
<umgrosscol>
blackjid: I think it's RBENV_VERSION if you're doing it on a user by user basis
<terrellt>
...I mean, vim's vim. It has rails.vim, ctags, ctrl+p, vim-rspec, tslime, etc etc.
revoohc has quit [Quit: revoohc]
revoohc has joined #ruby
<GaryOak_>
terrellt: what do you use to move between files?
<[k->
some people also use emacs nano gedit geany kedit
<terrellt>
:Explore
ascarter has joined #ruby
<[k->
textmate textwrangler rubymine
<GaryOak_>
Are you fast at it now?
serivich has quit [Ping timeout: 240 seconds]
DerisiveLogic has joined #ruby
<terrellt>
Or ctrl+p, really - fuzzy file searching.
<toretore>
:q\nvim otherfile
<terrellt>
Yes - I used other IDEs a year ago, I'm at least twice as fast.
<toretore>
or \r or whatever enter is
<terrellt>
toretore: Ew, :e otherfile. Never close vim!
mleung has joined #ruby
<umgrosscol>
blackjid: It's the .ruby-version file if you're not setting the env variable, but I think that env var overrides any .ruby-version
<toretore>
i use one vim per file
<toretore>
tmux for windows
<terrellt>
What, why
hewenhong has quit [Ping timeout: 240 seconds]
<terrellt>
There's tabs built -in- to vim.
<terrellt>
Tmux is important still, but yeah.
<toretore>
i don't care
<toretore>
i like tmux
sinkensabe has joined #ruby
<terrellt>
Yes, use them both, by all means, but there's so much power in keeping tabs in vim.
<toretore>
got my keys all set up and i ain't going back
iasoon has joined #ruby
<toretore>
i switch so much between the cmdline and editing that i constantly :q anyway
<terrellt>
That's where tmux is good.
<terrellt>
Panes.
<toretore>
i got panes, sessions, windows
<toretore>
got it all
<toretore>
don't need any more
<toretore>
too many levels man
<terrellt>
But ctrl+p, fuzzy search file, ctrl+t to open a file in a new tab is just -so fast-
<zlude>
Hey guys, i'm using nokogiri to parse a table, I'm using that " rows = doc.search('//tr[starts-with(@class, "Odd")]') " and it's working, but I want to get class Odd and Even, how can I do that?
DerisiveLogic has quit [Ping timeout: 276 seconds]
mjuszczak has joined #ruby
dblessing has quit [Ping timeout: 264 seconds]
scripore has joined #ruby
<GaryOak_>
xpaths are powerful but primitive
<zlude>
GaryOak_, thank you bro!
<GaryOak_>
haha no problem
<zlude>
GaryOak_, do you recommend another thing instead of xpaths?
SouL_|_ has quit [Ping timeout: 244 seconds]
<toretore>
zpath is fine
<toretore>
stick with it
<toretore>
x
Spami has joined #ruby
<GaryOak_>
you can use css selectors, but they aren't as specific as xpaths
<toretore>
path
Spami has quit [Client Quit]
fryguy9 has quit [Ping timeout: 245 seconds]
<zlude>
GaryOak_, but uses xpaths is something bad? i'm beginning in ruby .. and I want to write 'modern' codes... nothing old.
Spami has joined #ruby
<GaryOak_>
nope xpaths are fine
<zlude>
thank you! :D
<zlude>
i love ruby community
baweaver has joined #ruby
odin22 has quit [Quit: Leaving]
zorak8 has joined #ruby
dopie has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
dvlwrk has quit [Ping timeout: 240 seconds]
<GaryOak_>
that's why we're here
PhantomSpank has joined #ruby
pengin has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
Papierkorb has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<[k->
<3
PhantomSpank has joined #ruby
roolo has quit [Remote host closed the connection]
<Papierkorb>
What's the ruby solution to doing stuff concurrent? I have a bunch of URLs, all of which I want to download and using the data then update active record entries.
jtdowney has joined #ruby
mjuszczak has quit []
failshell has quit [Remote host closed the connection]
<Papierkorb>
I'm using MRI 2.2.2
thatslifeson has quit [Remote host closed the connection]
fryguy9 has joined #ruby
AirStar has quit [Quit: AirStar]
<jhass>
threads?
<toretore>
that's a question with complicated answers
dorei has joined #ruby
<toretore>
there is no one solution to concurrency
<jhass>
is it a one off script or do you want to integrate it into a (long running) application
<jhass>
?
<Papierkorb>
Well, I want to start those jobs and when they're all done, the application shall exit
<jhass>
sure, that's why I suggested a producer/consumer pattern
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
mnemon2 is now known as mnemon
PhantomSpank has quit [Read error: Connection reset by peer]
<[k->
fibers?
<Papierkorb>
jhass: Yes, I want to have some kind of 'job', which I give some kind of manager which runs multiple jobs in parallel on multiple cores at once.
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
<IceDragon>
[k-: Wait, where you suggestion that Papierkorb use Fibers, in which case, ignore me D:
<IceDragon>
suggesting*
<Papierkorb>
Oh god please not manually doing that crap
noname has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
<Papierkorb>
If it's harder to use than a one-liner in C++, then somethings wrong.
<toretore>
Papierkorb: the solution depends on the details of your problem. explain your problem better
<jhass>
producer/consumer is really easy to implement
PhantomSpank has joined #ruby
<jhass>
really easy
<havenwood>
Papierkorb: Understand what jhass said about "typhoeus hydra and pushing the responses into a queue on which a bunch of consumers listen ..."?
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
<umgrosscol>
Papierkorb: if you need parallel, jruby or rubinius. however, concurrent might be sufficient.
<GaryOak_>
FIFO to the rescue!
ch3f has joined #ruby
sent1nel has joined #ruby
<umgrosscol>
Papierkorb: I'm pretty sure the GIL yields on disk and network i/o
McRae has quit [Ping timeout: 256 seconds]
GriffinHeart has joined #ruby
<toretore>
it does
rbennacer has joined #ruby
<umgrosscol>
Papierkorb: So concurrency might be sufficient if you're doing a lot of i/o and not a lot of cpu.
<Papierkorb>
toretore: Well, I want a generic solution in general. I want to download stuff, which is then processed and put into database. jobs may be added from running jobs, so I can't create a complete list directly.
PhantomS_ has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 250 seconds]
tonyhb has joined #ruby
sagittarian has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<toretore>
Papierkorb: like i said, there is no such thing as a generic solution to concurrency
rmcafee_ has joined #ruby
<shevy>
lol
<shevy>
what kind of nick is "Papierkorb"
<shevy>
:)
<umgrosscol>
Papierkorb: yeah Resque. Uses Reddis. Add stuff to queue. Workers process from queue
<shevy>
flughafen, look at your brother here, Papierkorb
<jhass>
resque is slow though
PhantomSpank has quit [Read error: Connection reset by peer]
<jhass>
unless you have very complex computations in each job
<adaedra>
shevy: Recycle Bin
<jhass>
s/complex/expensive/
<IceDragon>
Yo shevy ma brother!
PhantomSpank has joined #ruby
wldcordeiro has joined #ruby
<toretore>
Papierkorb: you still haven't actually described the problem you're trying to solve, except for "a generic solution to running jobs concurrently"
<umgrosscol>
Papierkorb: You could spin up as many instances as you want on the same or other hosts that can process from that queue
juanpablo_ has joined #ruby
<Papierkorb>
toretore: I download webpages, do selections on one, and then store that in a database.
<toretore>
Papierkorb: how many? where do the urls come from?
PhantomSpank has quit [Read error: Connection reset by peer]
<IceDragon>
I'm gonna start telling people to just use Go when they bring on (complex) parallel programming in ruby...
Igorshp has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<toretore>
is it a list that is known from when the program starts?
kaleido has joined #ruby
<Papierkorb>
toretore: Ten to thousands maybe.
<Papierkorb>
toretore: No.
Igorshp has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Ping timeout: 250 seconds]
<umgrosscol>
queue of urls. pool of scrapers. queue of serialized data. pool of database writers.
<jhass>
toretore: it's not complex yet
JDiPierro has quit [Remote host closed the connection]
<jhass>
don't even need two pools
<toretore>
Papierkorb: so you want a long-running process that receives "jobs" in the form of urls to download?
PhantomSpank has joined #ruby
<umgrosscol>
jhass: Depends on how scalable he'd like it to be.
<jhass>
case job; when Fetch; when Process;
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<jhass>
and Fetch just pushes it into a typhoeus hydra
<Papierkorb>
toretore: basically yes, including on doing some processing them (Parsing HTML, selecting stuff)
quimrstorres has joined #ruby
<toretore>
Papierkorb: a "generic solution" to "running jobs" is resque, there are others
PhantomSpank has quit [Read error: Connection reset by peer]
\13k has joined #ruby
failshell has joined #ruby
PhantomSpank has joined #ruby
thatslifeson has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<umgrosscol>
toretore: I concur
horsecowdog has joined #ruby
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<jhass>
for what they described so far resque and sidekiq would be overkill
PhantomSpank has joined #ruby
\13k has quit [Client Quit]
<jhass>
besides they don't shut down if all work is finished
<toretore>
Papierkorb: but; i would advice that if you have to ask these questions, managing concurrency in ruby isn't going to be easy. there are other environments that make it easier
<Papierkorb>
and I don't want to set up any other server like redis for just doing some parallel stuff ..
<toretore>
that have more idiot proofing than ruby
<umgrosscol>
jhass: Given it's impossible to know the scope of how much data will be in the list or when it will stop coming in, I'd say it couldn't know when it's done.
<fivetwentysix>
toretore: golang!
wldcordeiro has quit [Quit: Leaving]
<umgrosscol>
Papierkorb: It's easier than rolling your own.
<toretore>
it's not difficult to roll your own if you know what you're doing
<fivetwentysix>
but making threads in ruby aint hard :)
duderonomy has quit [Ping timeout: 255 seconds]
\13k has joined #ruby
konsolebox has quit [Ping timeout: 245 seconds]
<toretore>
a thread pool, a queue, some way for the process to receive external input
mikecmpbll has quit [Ping timeout: 264 seconds]
<umgrosscol>
toretore: Yes, but that adds to your dev and testing time. There are off the shelf components that simplify the matter. Papierkorb just isn't too keen on using them.
wldcordeiro has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<toretore>
sometimes they complicate the matter
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb>
I don't want to learn how to administer a whole server solution when all I need is a script which does a lot just fast.
<umgrosscol>
toretore: This can be true, but in this case, it's pretty straight forward.
<toretore>
adding redis shouldn't be necessary
<Papierkorb>
If I have to do all that crap, while C++ does it easily, where's the point?
last_staff has joined #ruby
<toretore>
i'm not going to run a redis server just do run a script to download a bunch of web pages
<umgrosscol>
Papierkorb: then set up a simple straight through process that reads in a file, deletes the file, and does the processing.
bricker has joined #ruby
<umgrosscol>
Papierkorb: Restart the process periodically, or setup a watchdog to start the process when it's input file comes into existence.
fryguy9 has quit [Read error: Connection reset by peer]
fryguy91 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<toretore>
Papierkorb: if c++ does it so easily why aren't you using it? (being serious)
<fivetwentysix>
toretore: honestly, you can do what you want with Typhoeus and Nokogiri most likely for batch web processing
PhantomSpank has joined #ruby
<Papierkorb>
toretore: Because parsing HTML sucks and I don't have a easy ORM there
choke has quit [Ping timeout: 255 seconds]
<Papierkorb>
toretore: The latter I could fix, the former .. no idea what solutions there are.
PhantomSpank has quit [Read error: Connection reset by peer]
<fivetwentysix>
but then if you want C like performance
<fivetwentysix>
do golang and gokogiri
PhantomSpank has joined #ruby
<fivetwentysix>
it's just as simple
mtakkman has joined #ruby
<umgrosscol>
Or python
<toretore>
use rust
PhantomSpank has quit [Read error: Connection reset by peer]
<jhass>
(no, but since we're only suggesting non-sense now)
PhantomSpank has joined #ruby
<toretore>
with a react frontend
kith has quit [Quit: kith]
michaeldeol has joined #ruby
granthatcher has quit []
wottam has joined #ruby
gaganjyot has quit [Ping timeout: 240 seconds]
wldcordeiro has quit [Client Quit]
<havenwood>
Papierkorb: Easy parallel HTTP requests with typhoeus, curb or em-http-request. Or async HTTP requests with httpclient, wrest or em-http-request. These are tools made for the job. Or there are ThreadPools/Actor/CSP whatever concurrency primitives available in a number of gems.
ergodicsum has joined #ruby
dseitz has joined #ruby
<ergodicsum>
hello what does this code do: rocessVideoJob < Struct.new(:video_id)
<ergodicsum>
class ProcessVideoJob < Struct.new(:video_id)
lkba_ has joined #ruby
ascarter has joined #ruby
iamjarvo has joined #ruby
<jhass>
ergodicsum: it's the discouraged version of ProcessVideoJob = Struct.new(:video_id)
Cust0sL1men has quit [Ping timeout: 256 seconds]
<havenwood>
ergodicsum: Like a nasty way of saying: ProcessVideoJob = S - dangit jhass you make me delete so much by beating me to it!
<ght>
Question: I notice when I pass a hash as a method parameter, if I make changes to the values within the hash in the method, those changes remain persistent after control has been returned to the calling method.
zorak8 has quit [Quit: Leaving]
ascarter has joined #ruby
sent1nel has quit [Remote host closed the connection]
<jhass>
ght: yes, that's called pass by reference
lkba has quit [Ping timeout: 264 seconds]
<ght>
So therefore, when ruby passes a hash as a method parameter, is it passing a pointer to the area of ram that contains the hash instead of copying it?
sent1nel has joined #ruby
baweaver has quit [Remote host closed the connection]
<ninjs>
jhass how did you get so smart? lol
withnale_ has quit [Ping timeout: 252 seconds]
<jhass>
ninjs: this channel mostly
ascarter has quit [Max SendQ exceeded]
<IceDragon>
ah, the concurrency talk is over?
<IceDragon>
;-;
<IceDragon>
and I made a thing...
<adaedra>
IceDragon: we can do another talk in parallel.
lrcezimbra has joined #ruby
<ght>
Got it.
<havenwood>
Then starve our Threads.
ascarter has joined #ruby
<ght>
pass by value vs pass by reference.
<jhass>
ght: pretty much, specifically in MRI each object is an instance of a struct and only pointers to those are passed around
<jhass>
but that's an implementation detail you shouldn't care about
<IceDragon>
adaedra: *whistles*
iotouch has quit [Read error: Connection reset by peer]
iotouch has joined #ruby
<ght>
Also, when I was growing up coding, "methods" were called "functions" in C/C++/TurboPascal, except in Pascal when they wouldn't return a value, then they were calld procedures.
slash_nick has quit [Ping timeout: 264 seconds]
<adaedra>
ght: methods and functions are different things
<havenwood>
ght: I like "subroutine."
<jhass>
ght: the high level concept is pass by reference and pass by value as you said, and that's what you should care about, not how they are implemented
chthon has quit [Ping timeout: 244 seconds]
<ght>
adaedra: what's the difference?
metalic has quit [Quit: Leaving]
<adaedra>
ght: methods are functions which are called on an object
<ytti>
method lives inside an object and sees what the object sees
<umgrosscol>
ght methods belong to an object
<adaedra>
:')
<ytti>
function sees nothing but what it has
<ght>
Interesting, ok.
<havenwood>
UNBIND ALL THE METHODS \o/
<ght>
I got it.
lrcezimbra has quit [Quit: Konversation terminated!]
<adaedra>
hanmac: YOU FOOL, WHAT HAVE YOU DONE
lrcezimbra has joined #ruby
<jhass>
ght: more importantly methods have a context in which they're executed in (the object they belong to)
<umgrosscol>
you want some weird stuff about methods... ruby has transplantable methods.
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
<ght>
I got it, yes.
<ght>
Thank you, very helpful.
<adaedra>
umgrosscol: Ruby has many things.
lrcezimbra has quit [Client Quit]
Xiti has quit [Read error: Connection reset by peer]
gauke has joined #ruby
sent1nel has quit [Read error: No route to host]
PhantomSpank has quit [Read error: Connection reset by peer]
<IceDragon>
havenwood: did you just say unbind all methods?
* IceDragon
runs for cover
PhantomSpank has joined #ruby
sent1nel has joined #ruby
soulcake has quit [Quit: Quack.]
gauke has quit [Client Quit]
leafybas_ has joined #ruby
soulcake has joined #ruby
leafybas_ has quit [Read error: Connection reset by peer]
leafybas_ has joined #ruby
<adaedra>
Time to go, see ya
leafybas_ has quit [Remote host closed the connection]
<GaryOak_>
Get rid of those pesky methods
<ytti>
i heard majority of the bugs occur in methods in OO programming
<kaspergrubbe>
lol
<GaryOak_>
It's true
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
PhantomSpank has quit [Read error: Connection reset by peer]
zdman135 has quit [Remote host closed the connection]
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
PhantomSpank has quit [Read error: Connection reset by peer]
The_Phoenix has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leafybasil has quit [Ping timeout: 245 seconds]
PhantomSpank has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<A124>
Is there a way to do arry.combination(n).size, without building the array? .. yep there is.. it returns enumerable which is inteligent enough to give you just the number of combinations.
djbkd has joined #ruby
The_Phoenix has joined #ruby
<A124>
Is there a way to get number of combinations by not actually having to have the array?
The_Phoenix has quit [Max SendQ exceeded]
zorak8 has joined #ruby
Dakuan has joined #ruby
The_Phoenix has joined #ruby
<IceDragon>
>> Enumerable.method(:combinations)
<ruboto>
IceDragon # => undefined method `combinations' for class `Module' (NameError) ...check link for more (https://eval.in/321721)
<blackjid>
mm, nop I'm running them using a gem named eye.... similar to bluepill or god that is also a gem
<toretore>
well that's the same thing
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<IceDragon>
[k-: Sorta, we expected Enumerable to have the method though, since the question was, <A124> Is there a way to get number of combinations by not actually having to have the array?
<toretore>
some daemon that starts and watches processes
<blackjid>
yeap
<[k->
Enumerable is just a module that has helper functions :/
chipotles has joined #ruby
<toretore>
blackjid: in which case you don't want to depend on having the environment set up befor eyou can run it
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
array has higher order methods
blackmesa has quit [Ping timeout: 244 seconds]
jtdowney has joined #ruby
<toretore>
blackjid: since you already have rbenv installed; find the ruby executable and run it directly
<toretore>
blackjid: /path/to/rbenv/versions/foo/bin/ruby args here
<A124>
IceDragon, ruboto, The point was if there is way to do Math.combinations(k,n) and get number, not using an array.
<jhass>
A124: don't think so, go to wikipedia and pick the right formula
<blackjid>
toretore oo, and bypassing the rbenv init...
<ponga>
using sequel gives me hash inside an array, how to convert this into just a hash? ==> [{:origin_eng=>"Fun", :raw=>"ridik", :noun=>"ridiko", :adj=>"ridika", :adv=>"ridike"}]
<toretore>
blackjid: yes
scripore has quit [Quit: This computer has gone to sleep]
moeabdol has quit [Quit: WeeChat 1.1.1]
<A124>
jhass Hmm... feel that is dumb.. as if you call it on enumerable it does it without creating all the combinations actually.
<IceDragon>
ponga: just take the first element from the array?
<havenwood>
ponga: first
<shevy>
adaedra that is right, you speak german?
pengin has joined #ruby
<ponga>
oh damn
<shevy>
adaedra well, more "paper bin" perhaps, or trashbin though
<ponga>
arr[0] works
PhantomSpank has quit [Read error: Connection reset by peer]
<shevy>
arr.first would too!
scripore has joined #ruby
<ponga>
shevy: what's that different from [0]
<shevy>
should be the same
PhantomSpank has joined #ruby
* ponga
is embarrased
<shevy>
on my keyboard, [] is harder to type though
andikr has quit [Remote host closed the connection]
<IceDragon>
shevy: "first" is 2 characters extra D8<
<shevy>
ponga can you type with those korean or japanese thingies?
<havenwood>
blackjid: So you run a Ruby gem init thingy with rbenv and it hijacks PATH and then won't go back to system? Pretty sure I saw an rbenv issue on the githubs like that at some point. I'm more of an expert of switching folk from rbenv to chruby. :P
chipotles has quit [Client Quit]
<shevy>
IceDragon yeah, it's longer in amount of characters
allcentury has joined #ruby
<toretore>
"version switching" is useless on a server
<blackjid>
havenwood I have thought of that, but our workflow relly on the rbenv-vars plugin to load pero project env variables. I would need to go into a greater change to be able to do that.
tomphp has quit [Ping timeout: 250 seconds]
<umgrosscol>
havenwood: rbenv just adds a bunch of shims to the path.
Dakuan has quit [Remote host closed the connection]
<[k->
#last is not implemented on Enumerable tho
The_Phoenix has quit [Quit: Leaving.]
<umgrosscol>
havenwood: Then when you call ruby, the shim delegates to whatever version you had set.
sinkensa_ has quit [Remote host closed the connection]
<IceDragon>
[k-: Its because a collection can be infinite
<[k->
:o
Matachines has joined #ruby
<shevy>
chuck norris can count that collection
<shevy>
twice
<umgrosscol>
blackjid: Per project env variables? why not just use a config file?
<havenwood>
umgrosscol: Which causes a bug in this case where the rbenv env var setting system Ruby isn't respected.
<ponga>
shevy: you mean im fluent in writing them?
Matachines has quit [Max SendQ exceeded]
<ponga>
of course
<IceDragon>
[k-: All methods in enumerable are based around #each, if your each is just a loop { yield something }; you'd never find the end unless you broke it
piotrj has quit [Remote host closed the connection]
<IceDragon>
broke == break
<[k->
chuck norris counted that collection infinite times before shevy said twice
Matachines has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<IceDragon>
shevy, [k-: He's chuck norris what did you expect!?
<IceDragon>
3;
<umgrosscol>
havenwood: which env var? RBENV_VERSION?
<ponga>
shevy: you need help in KOR/JAP ?
<havenwood>
umgrosscol: yup
<shevy>
ponga nah, just curious how it works
joe_meade has quit [Remote host closed the connection]
<ponga>
ah
<blackjid>
umgrosscol i think it's easier, just access those variables with ENV[] insteat having to load the file first, the variables are also availble since the begining of the execution of the application
<ponga>
shevy: im on mac
<umgrosscol>
havenwood: if that's set, it should override the .ruby-version local file.
<ponga>
so the keyset is universal
tjohnson has joined #ruby
<shevy>
aha
philip1 is now known as phutchins
ramfjord has quit [Ping timeout: 256 seconds]
<ponga>
and shevy for Jap/Kor since long days ago, layout is equal to English ones
<ponga>
those funny layouts existed in like 90's only
<ponga>
perhaps 80's
<toretore>
blackjid: you can set the env vars in the unit file or whatever you have for the process daemon
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
umgrosscol: Hence the problem when you shell out from Ruby, set it, and it doesn't actually use system Ruby.
wallerdev has joined #ruby
skyjumper has joined #ruby
<umgrosscol>
havenwood: You can only set env vars for the current process and children. Since shelling out starts a child process, it can't set the parent's env variables.
PhantomSpank has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Quit: Leaving]
<umgrosscol>
havenwood: that's a child process issue. not an rbenv issue.
<havenwood>
umgrosscol: not for the parent, the child
<havenwood>
umgrosscol: no
<skyjumper>
general code structure question...
PhantomSpank has joined #ruby
<blackjid>
toretore yes yo are right, I could do that... now that you mention it, I'm already doing that, maybe I could give chruby a try .. :)
ADot has joined #ruby
<skyjumper>
is there a consensus on multiple endpoints vs multiple levels of if/else and indentations in a method?
<havenwood>
umgrosscol: nobody is talking about the parent process doing anything. look at his issue above.
<umgrosscol>
havenwood: So you shell out, set the env variable, then invoke ruby?
<havenwood>
umgrosscol: yes
zdman135 has joined #ruby
<toretore>
blackjid: chruby isn't going to be any different; it's the way you're executing the ruby binary that needs to change
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zdman135>
is there an easy way to automatically populate a hash?
lkba_ has quit [Ping timeout: 265 seconds]
<toretore>
blackjid: as in: use the full path
Hijiri has quit [Quit: WeeChat 1.0.1]
<havenwood>
toretore: I don't see why `chruby exec` wouldn't work?
<toretore>
zdman135: with what?
<toretore>
havenwood: how would it know where to find the binary?
<skyjumper>
thought i remember Linus saying more than X indentations in a function was unacceptable (X=2 maybe?)
<skyjumper>
but then lots of people say multiple endpoints are a huge no-no
<shevy>
ponga oh I see
<umgrosscol>
havenwood: and that's not working for you? rbenv the ignores the RBENV_VERSION?
<IceDragon>
skyjumper: I usually stick to "If you can't explain your method without using AND, then change it"
<havenwood>
toretore: it would run the command after sourcing the correct environment variables to run as the desired ruby
<zdman135>
you will see i am trying to create a hash from the output of an array
PhantomSpank has quit [Read error: Connection reset by peer]
<zdman135>
i just don't know what it would be
PhantomSpank has joined #ruby
<havenwood>
toretore: it's unfortunate to have to create a wrapper script with init.d sometimes. simplicity has a price on edge cases I suppose.
JDiPierro has joined #ruby
<IceDragon>
skyjumper: Just keep in mind, your methods should be easily read, you can easily explain them, and if moved into a new context, it should still be clear in what it does* (that last point, isn't always applicable though ;()
dvlwrk has joined #ruby
<skyjumper>
IceDragon: yeah definitely
serivich has joined #ruby
<[k->
while @array[0]['elements'][0]['comments'][0] != nil this might be a non-terminating expr
<havenwood>
toretore: but those cases don't seem to be less painful with more complex options, so i'll take it. ;)
<toretore>
havenwood: i'd argue that it's not simplicity but complexity
ADot has quit [Quit: Leaving.]
<[k->
what do you mean by name is the key and it equals value?
towski_ has joined #ruby
<zdman135>
[k-: yeah that was a typo the last [0] element should be [i]
<toretore>
havenwood: and that on a server you will seldom have the need to run ruby in an interactive shell, so there's not much point to having a version switcher to begin with
<[k->
do you mean to say that they are the same?
vickleton has quit [Ping timeout: 248 seconds]
<IceDragon>
[k-: it could be an empty string, and that is one hell of a statement...
<shevy>
EMPTY STRINGS FOR EMPTY DRAGONS
<[k->
well I didn't come up with it
<havenwood>
toretore: Oh, i totally agree if we're talking a production system. Complete agreement.
<IceDragon>
shevy.presence #=> OVER9000!!!!!
jottr has joined #ruby
Igorshp has quit [Remote host closed the connection]
<toretore>
havenwood: ok then :)
<zdman135>
[k-: so the output of that array makes a 'string' and I want to place that into a hash { name => 'string' }
<zdman135>
from that output
DerisiveLogic has joined #ruby
Cork has quit [Ping timeout: 264 seconds]
<zdman135>
so basically that while loop will iterate through an array grabbing a bunch of strings. and i want to populate a hash automatically
PhantomSpank has quit [Read error: Connection reset by peer]
<GaryOak_>
Postgres is tried and true, yet at the same time, the future
kstuart has joined #ruby
<zdman135>
toretore: unless there is an easier way in parsing json
<shevy>
havenwood I tried 4 days ago with a 90 MB .sql file having one and a half million INSERT INTO statements
PhantomS_ has joined #ruby
decoponyo has joined #ruby
<shevy>
after 3 days, it still was not finished
felixjet__ has joined #ruby
Hobogrammer_ has joined #ruby
<toretore>
zdman135: the input is an array, but you only want one hash?
thumpba has joined #ruby
<shevy>
the very same file, in a cluster at work (ok it's faster, more CPU more RAM), it took 30 minutes
matled- has joined #ruby
PaulCape_ has joined #ruby
<shevy>
via postgresql
tercenya has joined #ruby
<zdman135>
toretore: yes I want a hash for just that one json array
ebernhardson has joined #ruby
<zdman135>
toretore: but I want to be able to build an array of hashes
agarie_ has joined #ruby
Asher2 has joined #ruby
<toretore>
what if there are more hashes inside the array?
ItSANg___ has joined #ruby
<toretore>
there we go, that's what i wanted to know
<toretore>
you have an array of hashes, and you want an array of hashes as the end result
lidenska_ has joined #ruby
<ebernhardson>
i'm new to rspec (and ruby) and inherited a test suite. There is a common pattern used, http://pastie.org/10122491, that i think could be done much better so the error message isnt 'expected: true got: false' but i'm not sure how i should rewrite it. What rspec features should i be considering?
mikecmpbll has joined #ruby
<[k->
seems like you just want to change the key names to me...
<zdman135>
toretore: yeah, damn i didn't mean for it to get complicated, i thought it should be simple
davedev2_ has joined #ruby
iamninja_ has joined #ruby
andrew-l` has joined #ruby
<zdman135>
[k-: some elements in the current json array are unnecessary, i guess i'm just trying to grab what I want and rebuild the thing
<toretore>
zdman135: it is simple, as long as you explain properly
horsecow_ has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
<shevy>
I am a bit confused, someone help explain this please
<xxneolithicxx>
but i was probably half way there with a dumb question second guessing myself
Alina-malina has quit [Quit: Leaving]
thatslifeson has quit [Remote host closed the connection]
zotherst1pidguy has quit [Ping timeout: 252 seconds]
<[k->
headlesscamels = all lowercase
<[k->
obv havenwood likes to express things differently
<[k->
first i had heard of it
<havenwood>
[k-: headlessCamelCase as opposed to CamelCase
loadhigh has quit [Ping timeout: 264 seconds]
<[k->
that is lowerCamelCase ...
zotherstupidguy has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
Coraline has joined #ruby
Coraline has left #ruby ["Zoom zoom"]
loadhigh has joined #ruby
<shevy>
[k- yeah sort of. though I think... I will use the default display of ls
<havenwood>
[k-: well, that doesn't sounds like the monstrosity that it is in Ruby, so headlessCamelCase is more appropriate if overly polite for the offense.
<IceDragon>
net split, followed by my router tripping
<zdman135>
so one last question, I updated my gist - https://gist.github.com/zdman135/5db58025f540368e0498 I now have 2 elements in my array and not one, how do I do a .map to iterate on the array but keeping the 2 elements apart? I need to iterate through one and then iterate through the 2nd element
<IceDragon>
shevy: you could use; s = Struct.new(*hash.keys); hash.each { |key, value| s.send("#{key}=", value) }
<havenwood>
shevy: An OpenStruct is fancier than a Hash which is fancier than a Struct which is fancier than a Class which is fancier than a Module which is fancier than an Object which is fancier than a BasicObject.
<havenwood>
shevy: Then it's turtles the rest of the way down.
<IceDragon>
shevy: ah, actually, you'd need to create an instance of the struct you just made ;3
nobitanobi has quit [Remote host closed the connection]
* [k-
gets afk
<IceDragon>
shevy: so its actually just: data_klass = Struct.new(*hash.keys); s = data_klass.new(hash)
zotherstupidguy has quit [Ping timeout: 245 seconds]
<Senjai>
>> Struct.new.new
<ruboto>
Senjai # => wrong number of arguments (0 for 1+) (ArgumentError) ...check link for more (https://eval.in/321777)
<havenwood>
shevy: Use the least fancy that well suits your purpose. Or just live a little until it's too slow!
nobitano_ has joined #ruby
ascarter has joined #ruby
<Senjai>
IceDragon: OccamsRazor, 90% of its benefit (besides defaults) can be done cleanly and concisely with structs. ANd you dont need a DSL to create atttr_methods, nor do we embrace static typing in ruby.
<havenwood>
shevy: I say that, but it's not like you want to use a Class when a Hash suffices. Not just a linear order. All these things!
sargas has joined #ruby
McRae has joined #ruby
doertedev has quit [Quit: Lost terminal]
duderonomy has joined #ruby
<c_nick>
I am spawning multiple threads and in those i am writing to a SQLite3/MySQL database... there are 56 threads which are spawned at one time and there are upto 20 such iterations.
<c_nick>
I keep getting sqlite3error as concurrency becomes an issue. What could be the best way to implement such a mechanism
<IceDragon>
Senjai: And what if I want static typing in my ruby hmmm?
<Senjai>
IceDragon: Get out of my ruby and go use statically-typed-language-here
<Senjai>
:P
<shevy>
havenwood you are confusing me a lot today
nobitano_ has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<IceDragon>
Senjai: And I prefer to build my classes from ground up, screw Struct
<havenwood>
shevy: Uh oh!
<Senjai>
IceDragon: We have a way to do that. class Thing; def a_method; end; end
<Senjai>
#themoreyouknow
<IceDragon>
Senjai: Struct's don't have formal constant names, so you get screwed over in backtraces when you can't figure which class did what
<shevy>
who is the guilty class
<IceDragon>
and inheriting from a Struct looks F***ing ugly
atmosx has joined #ruby
<atmosx>
hello
<Senjai>
IceDragon: Don't use them when you shouldn't use them then :P
<Senjai>
I very rarely, VERY rarely use structs instead of proper classes
<IceDragon>
Senjai: Which is never!
<Senjai>
Like count on one hand rarely
<havenwood>
shevy: Write a script to convert a Struct to an OpenStruct or an OpenStruct to a Hash.
<Senjai>
You should also never use Virtus models.
<IceDragon>
Senjai: I don't, I just layed it out as an alternative 3:
<IceDragon>
Senjai: And you can't stop me either, I have my own Virtus models like thing
<havenwood>
shevy: Then make it optionally recursive.
scripore has joined #ruby
<IceDragon>
havenwood: You can do OpenStruct to hash using #each_pair.to_h
Nimf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
havenwood something is strange today with you
nobitanobi has joined #ruby
mdarby has joined #ruby
<havenwood>
IceDragon: Or just: to_h
<IceDragon>
havenwood: nah, I thinkk OpenStruct will eat the #to_h
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<IceDragon>
or not
* IceDragon
bows
<IceDragon>
you win this round havenwood
* IceDragon
scurries back into his cave
blackmesa has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
naftilos76 has joined #ruby
freerobby has joined #ruby
jlast has joined #ruby
diegoaguilar has joined #ruby
<shevy>
damn
PhantomS_ has quit [Read error: Connection reset by peer]
<shevy>
you are in the sex cave
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai>
something strange with havenwood? You mean more than normal? :P
PhantomSpank has joined #ruby
doodlehaus has joined #ruby
<havenwood>
All is found out?
* havenwood
flees.
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
* [k-
is back
Matachines has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
PhantomS_ has quit [Read error: Connection reset by peer]
Matachines has joined #ruby
pdoherty has quit [Quit: Leaving]
PhantomSpank has joined #ruby
A205B064 has joined #ruby
<[k->
Frankly I nvr used OpenStruct before
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
<[k->
also, the lib is 'ostruct'
lkba has joined #ruby
<havenwood>
shevy: It's trivial to convert a Hash or Struct to an OpenStruct and also to convert a Struct or OpenStruct to a Hash. So converting a Hash or OpenStruct to a Struct would be the exercise. Or recursively doing each.
<ninjs>
Every time I try to transition to a node or similar backend I get so frustrated. I'm just spoiled by ruby. haha
<shevy>
I am still missing something from "ls -al"
<Senjai>
shevy: Question, why not shell out to ls?
orionstein has joined #ruby
<shevy>
Senjai we are using ruby!
<ninjs>
You can't even call .min/.max on an array of dates like you can in ruby. :O
<Senjai>
but why... :( is my question
ghr has joined #ruby
<shevy>
I dunno
<IceDragon>
shevy: did you just multi-line block with { }
<IceDragon>
for shame!
<Senjai>
#wheelreinventing :P
<shevy>
oh yeah
<shevy>
IceDragon my convention is the ruby parser!
<apeiros>
pshee, #wheelreinventing… come to #extremewheelreinventing!
<shevy>
it's like people who do: def foo bar versus def foo(bar)
<shevy>
havenwood is parenless
<IceDragon>
ninjs: I know right, ruby just has all these convenient methods, like stuff in Enumerable, which makes working with collections a breeze
<fowl>
theres a reason to use parens
<fowl>
def foo() end vs def foo; end
reinaldo_ has joined #ruby
<shevy>
fowl is back!
<IceDragon>
O:
Dreamer3 has quit [Remote host closed the connection]
<IceDragon>
Hmm, chicken
<shevy>
dragon
<ytti>
parenthesis killed my parents, triggered
<ytti>
i never use 'em
<shevy>
lol
<ninjs>
IceDragon: For real. O
* IceDragon
drags fowl to the frying pan
<shevy>
now that was funny
baroquebobcat has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
<ninjs>
I'm not sure why people want to use javascript on the server... everyone should just come back to ruby. It's wonderful here
<Papierkorb>
I'm not sure why people *want* to use JS in general
<IceDragon>
ninjs: "But but, javascript has like a library for everything"
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ninjs>
Papierkorb: I can see it only for the cool design stuff in front-end webby stuff
c_nick1 has joined #ruby
<IceDragon>
>_>;
piotrj_ has quit [Remote host closed the connection]
<Papierkorb>
Fuck I'd rather write a OS kernel in Java than dealing with that crap
<ninjs>
IceDragon: not for doing min/max on an array of dates
FernandoBasso has joined #ruby
<IceDragon>
ninjs: it probably exists, you just need to sift through the thousands upon thousands of oddly named packages
<ninjs>
I was moving along just swimmingly porting a server method from ruby to coffeescript.. until I tried to call .min/.max on an array of dates. And couldn't. And no one had a solution
ergodicsum has quit [Quit: Page closed]
ghr has quit [Ping timeout: 255 seconds]
reinald__ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<IceDragon>
ninjs: maybe "underscore" has something
PhantomSpank has joined #ruby
<IceDragon>
or whatever the F*** the new one is called
<ninjs>
well, the solution was converting each date string to a number then doing Math.min on the numbers, then converting back into dates
<[k->
opal
<IceDragon>
eww?
c_nick has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
<Papierkorb>
Dates and every language having to do with Java one way or the other is always a mixture which doesn't work
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb>
(new Date()).toString(); - Some browsers do UTC, others local time. Absolutely fantastic
PhantomSpank has joined #ruby
<ninjs>
Right? browsers are the worst application runtime ever
<ninjs>
Widely distributed, no version control, no standardrs
Cust0sL1men has joined #ruby
<Papierkorb>
well they read the standard, then tweet #yolo and just not follow it
woodruffw_ has joined #ruby
reinaldo_ has quit [Ping timeout: 252 seconds]
Dakuan has joined #ruby
<ninjs>
Chrome is the closest thing to a savior we have.. so far I've just told everyone to use chrome for everything I make and it seems to work out
<ninjs>
don't even get me started on mobile safari though
freerobby has quit [Quit: Leaving.]
<IceDragon>
I keep forgetting browsers other than chrome and firefox exist
<IceDragon>
3;
<[k->
yolo but everybody uses u so your live is * 7bil
<[k->
life*
jtdowney has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c0m0 has quit [Ping timeout: 264 seconds]
alex88 has joined #ruby
noname has joined #ruby
jenrzzz has joined #ruby
woodruffw has quit [Ping timeout: 264 seconds]
<skyjumper>
what's a good way to raise an exception with 2 different error texts... one for the system/logging, and one for the user?
<cek>
tyring to get value of FFI pointer. Having no luck. attach_function :zmq_version, [ :pointer, :pointer, :pointer ], :void
piotrj has joined #ruby
<[k->
logging 2 exceptions
blackmesa has joined #ruby
j_mcnally has joined #ruby
<[k->
one in stderr maybe, another in a dialog
j_mcnally has quit [Max SendQ exceeded]
j_mcnally has joined #ruby
joe_meade has joined #ruby
alex88 has quit [Ping timeout: 245 seconds]
kadoppe_ has quit [Ping timeout: 265 seconds]
tejasmanohar has joined #ruby
<tejasmanohar>
>> 10.hours
<ruboto>
tejasmanohar # => undefined method `hours' for 10:Fixnum (NoMethodError) ...check link for more (https://eval.in/321792)
<tejasmanohar>
oh so can you do 10.hours, 10.minutes etc in normal ruby or is that only in rails?
piotrj has quit [Ping timeout: 244 seconds]
<apeiros>
tejasmanohar: `undefined method `hours' for 10:Fixnum` tells you that you can't
<tejasmanohar>
apeiros: hm know of any packages that implement these time things in ruby
<tejasmanohar>
without rails
Dakuan has quit [Remote host closed the connection]
<havenwood>
tejasmanohar: Cherry pick from ActiveSupport or there are other gems.
<apeiros>
tejasmanohar: activesupport
<[k->
yucks
<IceDragon>
tejasmanohar: probably some time fancy gem, like time-lord
<[k->
such large
<[k->
much bloat
kadoppe has joined #ruby
<tejasmanohar>
ah gotcha
tejasmanohar has quit [Client Quit]
allcentury has joined #ruby
<IceDragon>
[k-: you forgot to say wow
Dakuan has joined #ruby
Spami has joined #ruby
platzhirsch has quit [Quit: Leaving.]
dblessing has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
freerobby has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
<[k->
many wow
<atmosx>
this 'volt' framework looks very promising.
NinjaOps has quit [Quit: Konversation terminated!]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has joined #ruby
<IceDragon>
[k-: sorry for not being edgy
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<IceDragon>
sinatra gets the job done for me, so P:
<[k->
youtube ruby conference by confreaks
<atmosx>
[k-: well, if Opal can keep up, it will become popular. Writing ruby on both back and front-end is refreshing.
<[k->
there is a talk on volt
<atmosx>
IceDragon: volt is supposed to be used for real time applications and folks who would like to use ruby instead of JS all over the place.
linduxed has quit [Ping timeout: 265 seconds]
zotherstupidguy has quit [Ping timeout: 256 seconds]
zotherstupidguy has joined #ruby
<IceDragon>
atmosx: Oooh, cool, I still serve static pages >_>;;
<atmosx>
IceDragon: for what? a blog? :-P
<IceDragon>
yep
<IceDragon>
jk, I don't have a blog
<atmosx>
IceDragon: why not? :-)
SouL_|_ has quit [Ping timeout: 256 seconds]
marr has joined #ruby
<IceDragon>
atmosx: I don't have the patience to keep and update a blog
rhllor has joined #ruby
<IceDragon>
I'll probably write like 2 pages and then forget about it
<atmosx>
IceDragon: I don't write as much as before and most of the times I'm too bored to properly review the text... but truth to be told I'm also out of time lately.
barkerd427 is now known as zz_barkerd427
<IceDragon>
see, "ain't nobody got time for dat"
<atmosx>
IceDragon: that said, I like to have a blog, but not as it currently is... I love the structure of Gwen's blog: http://www.gwern.net/index
<xxneolithicxx>
we can rant for two pages on IRC but not to a blog that doesnt argue back. We should give it AI.
<atmosx>
IceDragon: well the content is amazing too, but I've read only a small portion to date.
<IceDragon>
neat, I can nab a topic without looking through dates like a madman
phutchins has quit [Ping timeout: 255 seconds]
sargas has quit [Quit: Leaving]
willharrison has joined #ruby
psy has quit [Ping timeout: 272 seconds]
Cust0sL1men has quit [Ping timeout: 272 seconds]
theotherstupidgu has quit [Ping timeout: 264 seconds]
<IceDragon>
xxneolithicxx: Except I don't rant that often
<IceDragon>
3x
psy has joined #ruby
Papierkorb_ has joined #ruby
zotherstupidguy has quit [Remote host closed the connection]
<xxneolithicxx>
i guess thats why you dont blog then :-P
zotherstupidguy has joined #ruby
zz_barkerd427 is now known as barkerd427
<xxneolithicxx>
if they arent being used as a personal wiki, its normally just a bunch of rants
bMalum has quit [Ping timeout: 240 seconds]
theotherstupidgu has joined #ruby
<willharrison>
any people here from orlando? was trying to see if there is a ruby users group irc channel
bMalum has joined #ruby
thumpba has quit []
<IceDragon>
ah, welcome to #ruby O:
iamjarvo has joined #ruby
<IceDragon>
xxneolithicxx: Yeah, I'm not smart enough to have a wiki, or rant that often to well... rant :(
Papierkorb has quit [Ping timeout: 256 seconds]
nfk|laptop has joined #ruby
gizmore has joined #ruby
woodruffw_ is now known as woodruffw
Alina-malina has joined #ruby
omosoj has joined #ruby
c_nick1 has left #ruby [#ruby]
chipotle has quit [Quit: cheerio]
ndrei has joined #ruby
theotherstupidgu has quit [Ping timeout: 276 seconds]
<c355E3B>
willharrison, ive found a lot of that stuff over meetup.com
piotrj has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 272 seconds]
<willharrison>
c355E3B yeah, I found some meetups, but I didn't see any irc channels listed other than one for a LUG
theotherstupidgu has joined #ruby
<c355E3B>
ah
ismaelga has quit [Remote host closed the connection]
linduxed has joined #ruby
barkerd427 is now known as zz_barkerd427
Kricir has quit [Remote host closed the connection]
dreinull75 has quit [Remote host closed the connection]
lidenska_ has quit [Remote host closed the connection]
dreinull75 has joined #ruby
yfeldblum has joined #ruby
allcentury has joined #ruby
lidenskap has joined #ruby
last_staff has joined #ruby
ponga has quit [Quit: Leaving...]
pengin has quit [Remote host closed the connection]
ponga has joined #ruby
zz_barkerd427 is now known as barkerd427
kyrylo_ has joined #ruby
ponga has quit [Client Quit]
chipotle has joined #ruby
SouL_|_ has joined #ruby
pengin has joined #ruby
wallerdev_ has joined #ruby
linduxed has quit [Ping timeout: 264 seconds]
hgl has quit [Ping timeout: 256 seconds]
wallerdev has quit [Read error: Connection reset by peer]
wallerdev_ is now known as wallerdev
lidenskap has quit [Ping timeout: 245 seconds]
mdarby has quit [Max SendQ exceeded]
kyrylo has quit [Ping timeout: 265 seconds]
xMopxShell has quit [Ping timeout: 256 seconds]
danshultz has quit [Ping timeout: 256 seconds]
mdarby has joined #ruby
theotherstupidgu has quit [Ping timeout: 244 seconds]
glcx has quit [Ping timeout: 256 seconds]
danshultz_ has joined #ruby
DexterLB has joined #ruby
hgl has joined #ruby
kenndel_ has joined #ruby
luluapple has joined #ruby
Lewix has joined #ruby
xMopxShell has joined #ruby
jeromelanteri has quit [Ping timeout: 245 seconds]
gizmore has quit [Ping timeout: 255 seconds]
synfin has joined #ruby
synfin_ has quit [Ping timeout: 256 seconds]
destructure has quit [Ping timeout: 256 seconds]
philtr_ has quit [Ping timeout: 256 seconds]
choke has quit [Ping timeout: 256 seconds]
edwardly has quit [Ping timeout: 256 seconds]
glcx has joined #ruby
Lewix_ has quit [Ping timeout: 256 seconds]
atomi has quit [Ping timeout: 256 seconds]
mrsolow has quit [Ping timeout: 256 seconds]
Kharma has quit [Ping timeout: 256 seconds]
theotherstupidgu has joined #ruby
thomas has joined #ruby
choke has joined #ruby
ascarter has joined #ruby
destructure has joined #ruby
Guest15 has joined #ruby
philtr has joined #ruby
colorados2 has quit [Read error: Connection reset by peer]
atomi has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
kloeri_ has quit [Read error: Connection reset by peer]
ch3f has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
endash has joined #ruby
ponga has joined #ruby
jlast has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
art-solopov has joined #ruby
alex88 has joined #ruby
ponga has quit [Read error: No route to host]
workmad3 has joined #ruby
ponga has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
TheMoonMaster_ is now known as TheMoonMaster
ismaelga has joined #ruby
mrdmi has joined #ruby
alex88 has joined #ruby
ponga has quit [Read error: No route to host]
redlegion has joined #ruby
gregf has quit [Quit: WeeChat 1.1.1]
ponga has joined #ruby
Zamyatin has joined #ruby
ponga has quit [Read error: No route to host]
bluOxigen has quit [Ping timeout: 264 seconds]
willharrison has joined #ruby
ponga has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
Zamyatin has joined #ruby
OrbitalKitten has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
Cust0sL1men has quit [Ping timeout: 272 seconds]
ponga has quit [Read error: No route to host]
Zamyatin has joined #ruby
dling has quit []
doodlehaus has quit [Remote host closed the connection]
ponga has joined #ruby
Hijiri has joined #ruby
x1337807x has quit [Ping timeout: 240 seconds]
Zamyatin has quit [Max SendQ exceeded]
kblake has quit [Remote host closed the connection]
Zamyatin has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
zz_barkerd427 is now known as barkerd427
Pumukel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.2/20150415140819]]
haidahaha has quit [Quit: haidahaha]
ponga has quit [Read error: No route to host]
ponga has joined #ruby
allcentury has joined #ruby
McRae has joined #ruby
OtterCoder has joined #ruby
ponga has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ponga has joined #ruby
gfawcettpq has joined #ruby
sent1nel has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
jenrzzz has joined #ruby
ponga has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
ponga has quit [Read error: No route to host]
zotherstupidguy has quit [Ping timeout: 244 seconds]
theotherstupidgu has quit [Ping timeout: 252 seconds]
zotherstupidguy has joined #ruby
ponga has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
diegoaguilar has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
theotherstupidgu has joined #ruby
ponga has quit [Read error: Connection reset by peer]
jottr has quit [Quit: WeeChat 1.1.1]
ponga has joined #ruby
jottr has joined #ruby
chipotle has quit [Quit: cheerio]
redlegion has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
workmad3 has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
redlegion has joined #ruby
rbennacer has quit [Ping timeout: 276 seconds]
iamninja has joined #ruby
dfinninger has quit [Ping timeout: 250 seconds]
ponga has quit [Read error: No route to host]
gregf has joined #ruby
charliesome has joined #ruby
ponga has joined #ruby
sevvie has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
ebernhardson|lch has joined #ruby
panga has quit [Read error: No route to host]
scripore has quit [Quit: This computer has gone to sleep]
<mwlang>
I’m loading data from an external provider’s feed. They provide descriptions of products marked up with HTML tags. I need to keep the tags, but remove styling classes and other non-essential styling markers like MARGIN=1.0 BORDER=1, etc. What’s the best way to go about this?
ponga has joined #ruby
<mwlang>
I’m thinking Nokogiri, but perhaps there’s already a gem dedicated to this?
davedev24_ has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
<mwlang>
here’s an example: <p style="MARGIN: 0in 0in 0pt" class="MsoNormal"> should be reduced to <p>
charliesome has quit [Ping timeout: 256 seconds]
Dakuan has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
umgrosscol has quit [Quit: Quit]
<apeiros>
mwlang: I doubt there's a gem doing that already. but should be fairly trivial with nokogiri.
ponga has joined #ruby
<GaryOak_>
mwlang: you could also just strip all WORD="STUFFS" between <>
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
GaryOak_: regexp it away?
<apeiros>
GaryOak_: don't. process. html. with. regex. bad idea.
<mwlang>
apeiros: I was just thinking same thing…too many edge cases that nokogiri probably already handles.
<GaryOak_>
Yeah on second thought, you end up having to check if stuff is in between the tags
jerius has quit [Quit: /quit]
ponga has joined #ruby
<apeiros>
mwlang: with nokogiri, all you need is a method which removes all attributes you don't want, + traverse all nodes & apply that method
redlegion has quit [Quit: Fuck my life]
<apeiros>
nokogiri already has a method to traverse all nodes
j_mcnally has joined #ruby
<mwlang>
who the heck is Jon Skeet?
baturay_ has quit [Ping timeout: 256 seconds]
panga has joined #ruby
davedev24_ has quit []
paulcsmith has quit [Quit: Be back later ...]
panga has quit [Read error: No route to host]
airdisa has joined #ruby
Fingel has joined #ruby
redlegion has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
<GaryOak_>
MS dev
<GaryOak_>
He's the highest score person on StackOverflow
<mwlang>
Funny… “Moderator's Note: The post looks exactly as it is supposed to look - there are no problems with its content. Please do not flag it for our attention.”
michael_mbp has quit [Excess Flood]
panga has quit [Read error: No route to host]
Hijiri has quit [Ping timeout: 246 seconds]
michael_mbp has joined #ruby
ponga has joined #ruby
SouL_|_ has quit [Ping timeout: 265 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
ponga has quit [Read error: No route to host]
Matachines has joined #ruby
ponga has joined #ruby
lidenskap has quit [Remote host closed the connection]
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
slash_nick has quit [Ping timeout: 244 seconds]
dfinninger has joined #ruby
panga has quit [Read error: No route to host]
badhatter has joined #ruby
badhatter has joined #ruby
ponga has joined #ruby
scripore has joined #ruby
omosoj is now known as sohrab
ponga has quit [Read error: No route to host]
coderhs has joined #ruby
<GaryOak_>
mwlang: all that spooky unicode must have been spooking people
lidenskap has joined #ruby
<mwlang>
GaryOak_: and sarcasm is often lost in translation. :-p
<GaryOak_>
It's a little larger scale than that, but I'm the only one working on it so I'm in the crazy programmer vacuumm
theotherstupidgu has joined #ruby
ponga has quit [Read error: No route to host]
iamjarvo has joined #ruby
ponga has joined #ruby
Hijiri has joined #ruby
rkazak has quit [Ping timeout: 272 seconds]
Igorshp has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
kyrylo_ is now known as kyrylo
Miron has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
ebernhardson has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
crimeircd has left #ruby [#ruby]
<mwlang>
well, I started writing the nokogiri walker/sanitizer and stopped and googled some more…this time I find the “sanitize” gem. Some quick testing of this and it looks like it’s gonna do the job.
<mwlang>
it’ll even plug unclosed tags in with the missing closing tags as it sanitizes.
ponga has quit [Read error: Connection reset by peer]
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
zotherstupidguy has quit [Remote host closed the connection]
panga has quit [Read error: Connection reset by peer]
zotherstupidguy has joined #ruby
ponga has joined #ruby
kblake has quit [Ping timeout: 250 seconds]
<hephaestus_rg>
hello there
ponga has quit [Read error: No route to host]
<hephaestus_rg>
i'd like to spawn a ruby server (thin for example) from inside another ruby script. it seems like i could do it with `back ticks` but how can i make sure the server lives and dies by the parent scripot
<hephaestus_rg>
*script
shellfu is now known as shellfu_afk
sandstrom has joined #ruby
griffindy has joined #ruby
ponga has joined #ruby
juanpablo_ has quit [Quit: (null)]
wallerdev has quit [Quit: wallerdev]
thatslifeson has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
juanpablo_ has joined #ruby
baweaver has quit [Remote host closed the connection]
adac has quit [Ping timeout: 276 seconds]
ponga has quit [Read error: No route to host]
jarboot has joined #ruby
ponga has joined #ruby
juanpablo_ has quit [Read error: Connection reset by peer]
juanpablo__ has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nswx>
pipework: but after rsync gem list does not show them
phutchins has joined #ruby
ponga has quit [Read error: No route to host]
swgillespie has joined #ruby
wallerdev has joined #ruby
Guest24 has quit [Ping timeout: 272 seconds]
ponga has joined #ruby
pwattste has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nswx>
ah, I see in docs:
<nswx>
The -I argument adds your unpacked rake to the ruby $LOAD_PATH which prevents RubyGems from loading the gem version (or the default version). The -S argument finds rake in the shell’s $PATH so you don’t have to type out the full path.
<nswx>
that might be related
ponga has quit [Read error: No route to host]
Pupeno has quit [Ping timeout: 276 seconds]
ponga has joined #ruby
pwattste has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
doodlehaus has joined #ruby
charliesome has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
mrmargolis has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
zotherstupidguy has quit [Ping timeout: 252 seconds]
RegulationD has quit [Remote host closed the connection]
ponga has joined #ruby
DerisiveLogic has quit [Ping timeout: 255 seconds]
charliesome_ has joined #ruby
Senjai has joined #ruby
Senjai has quit [Changing host]
ponga has quit [Read error: No route to host]
endash has quit [Quit: endash]
ponga has joined #ruby
endash has joined #ruby
endash has quit [Client Quit]
ismaelga has quit [Remote host closed the connection]