banisterfiend has quit [Ping timeout: 240 seconds]
<Matip>
this is the content of the file after writing a "9" 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 390a
JaTochNietDan has left #ruby ["Leaving"]
mercwithamouth has joined #ruby
<bnagy>
maybe truncate isn't resetting your cursor?
browndawg has joined #ruby
<bnagy>
yeah, looks like
ariedler has quit [Remote host closed the connection]
<bnagy>
rewind your handle before you write again, should fix it
BryanRuiz has joined #ruby
<BryanRuiz>
so i just sudo gem install bundler
<bnagy>
I'm so sorry
<BryanRuiz>
but if i run the command bundler, it does not exist
grenierm has left #ruby [#ruby]
<BryanRuiz>
what am i doing wrong?
<Matip>
yep, you're right bnagy. thanks!
<bnagy>
Matip: np
wreckimnaked has joined #ruby
<BryanRuiz>
are gem's installed system wide or per project?
chrishough has quit [Quit: chrishough]
eykosioux has quit [Remote host closed the connection]
eykosioux has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
Davey has joined #ruby
<BryanRuiz>
does this look familiar to anyone? /home/gitlab/gitlab/config/initializers/carrierwave.rb:1: invalid regular expression; [:word:] is not a character class: /[^[:word:]\.\-\+]/
nateberkopec has quit [Ping timeout: 264 seconds]
Davey has quit [Max SendQ exceeded]
ner0x has quit [Quit: Leaving]
Davey has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
<bnagy>
depends what you mean by familiar - I haven't seen it before, but the error is pretty clear
psyprus has joined #ruby
<bnagy>
[:word:] is not a character class. Computers are smart!
<BryanRuiz>
:)
<bnagy>
[[:word:]] is though
<BryanRuiz>
yeah, im trying to figure out why this application that always use to work all of a sudden doesnt work
IrishGringo has quit [Quit: ChatZilla 0.9.90 [Firefox 20.0/20130326150557]]
<BryanRuiz>
someone said update bundler
<bnagy>
did they change syntax? :/
<bnagy>
18>> p /[[:word:]]/
<eval-in>
bnagy => /tmp/execpad-2e0142469d70/source-2e0142469d70:2: invalid regular expression; [:word:] is not a character class: /[[:word:]]/ (http://eval.in/16371)
aemeredith has quit [Remote host closed the connection]
bradleyprice has quit [Remote host closed the connection]
Caius has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
chandankumar has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
jprovazn has joined #ruby
chussenot has quit [Ping timeout: 264 seconds]
callmeivan has quit [Remote host closed the connection]
callmeivan has joined #ruby
eykosioux has quit [Remote host closed the connection]
Morkel has joined #ruby
eykosioux has joined #ruby
Guest2782 has joined #ruby
sleetdro_ has joined #ruby
slainer68 has quit [Ping timeout: 258 seconds]
<krz>
artist_video_path and artist_photo_path are a methods. how could i write it as such pseudo code: artist_#{foo}_path foo can either be "video" or "photo"
sleetdrop has quit [Ping timeout: 240 seconds]
sleetdro_ is now known as sleetdrop
cantonic has quit [Quit: cantonic]
LnL has joined #ruby
bradhe has joined #ruby
nomenkun has quit [Remote host closed the connection]
callmeivan_ has joined #ruby
eykosioux has quit [Ping timeout: 256 seconds]
clocKwize has joined #ruby
chussenot has joined #ruby
callmeivan__ has joined #ruby
banisterfiend has joined #ruby
puppeh has quit [Read error: Connection reset by peer]
bigkevmcd has quit [Ping timeout: 252 seconds]
Guest2782 has quit [Excess Flood]
Ca1us has joined #ruby
Ca1us has quit [Changing host]
Ca1us has joined #ruby
kofno has joined #ruby
jon_than_ has left #ruby [#ruby]
banisterfiend has quit [Read error: Connection reset by peer]
puppeh has joined #ruby
callmeivan has quit [Ping timeout: 256 seconds]
callmeivan__ is now known as callmeivan
bradhe has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
callmeivan_ has quit [Ping timeout: 264 seconds]
cantonic has joined #ruby
wsterling has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
gabrielrotbart has quit [Remote host closed the connection]
baz_ has quit [Quit: Leaving]
ph^_ has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 245 seconds]
gabrielrotbart has joined #ruby
postmodern has quit [Quit: Leaving]
timmow has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
r0bby has joined #ruby
bigkevmcd has joined #ruby
yacks has joined #ruby
nomenkun has joined #ruby
haxrbyte has joined #ruby
Xlab has quit [Remote host closed the connection]
ph^ has joined #ruby
Xlab has joined #ruby
gabrielrotbart has quit [Ping timeout: 245 seconds]
Hanmac has joined #ruby
eykosioux has joined #ruby
harrymoreno has quit [Quit: harrymoreno]
<s4muel>
I remember seeing some kind of ruby idiom (i believe i saw it used in the pry shell) that shows you only the non-default methods, but i can't remember what it is.
robbyoconnor has quit [Ping timeout: 256 seconds]
<s4muel>
exactly.
r0bby has quit [Read error: No route to host]
<s4muel>
Anyone know what I'm talking about, or how to achieve that? :)
r0bby has quit [Read error: Connection reset by peer]
chiel has quit [Remote host closed the connection]
<s4muel>
aha! it seems like for my case, Gem::methods(instance_methods=false) is doing what i need. Now, the real question is the best way to get a gem's installed path.
sleetdrop has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby
<Hanmac>
pagios: i think none of the ones in the list are realy web based ... all of them are only for PC, not for browser
<pagios>
Hanmac: what would be good for a browser
Spooner has joined #ruby
sleetdrop has joined #ruby
<Hanmac>
pagios i think you are looking for website stuff like sinatra or rails
<undersc0re97>
pagios: ruby on rails?
cantonic has quit [Quit: cantonic]
<undersc0re97>
or sinatra
haxrbyte_ has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<pagios>
what would be the easiest to start with ruby on rails or sinatra? i mainly only need simple web graphical components like click on boxes to execute command etc
Scriptor has quit [Ping timeout: 258 seconds]
<Hanmac>
pagios so do you want to make an website with clickable buttons or do you want to use an website so that your program clicks on the buttons for you? ...
timmow has joined #ruby
<sebastianb>
I think he wants wysiwyg editor for rails or sinatra
* Hanmac
hates the idea of "Make your Website into an Application" ... that really anoys me
<pagios>
Hanmac: no i would like to do a small local website (runs on an STB box) and that stb box would have options to do different commands, that would execute at console level and return output to the graphical element
haxrbyte has quit [Ping timeout: 276 seconds]
<undersc0re97>
pagios: first
<undersc0re97>
learn ruby
<pagios>
undersc0re97: i know the basics
vlad_starkov has joined #ruby
GhostingCoder011 has joined #ruby
rolton has joined #ruby
kemist has quit []
eykosioux has quit [Remote host closed the connection]
maxmanders has joined #ruby
eykosioux has joined #ruby
chussenot has joined #ruby
lmf40 has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
eykosioux has quit [Ping timeout: 248 seconds]
bigkevmcd has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
chussenot has joined #ruby
camilasa_ has joined #ruby
chussenot has quit [Client Quit]
hmarr has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
xlab_ has joined #ruby
alup has joined #ruby
mengu has joined #ruby
celinedior has joined #ruby
Ontolog has joined #ruby
Animawish has quit [Quit: Animawish]
MrZYX is now known as MrZYX|off
Xlab has quit [Ping timeout: 256 seconds]
unflores has joined #ruby
timonv has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<pagios>
Hanmac: for PC GUI which one would you recommend?
arturaz has joined #ruby
Xlab has joined #ruby
<Hanmac>
pagios: i use rwx its my own wxRuby respawn ... but rubygnome is fine too i heard
teddyp1cker has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
rawler has joined #ruby
peterhellberg has joined #ruby
marcdel has quit []
nari has joined #ruby
gener1c has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
drumond19 has joined #ruby
yacks has quit [Quit: Leaving]
kofno has quit [Ping timeout: 258 seconds]
linusoleander has joined #ruby
marr has joined #ruby
Xlab has joined #ruby
sylvinus has joined #ruby
dr_bob has joined #ruby
nomenkun has quit [Remote host closed the connection]
<pagios>
is their any library to use ncurse with ruby?
<hoelzro>
pagios: Curses
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<hoelzro>
although it's *really* low level
yacks has joined #ruby
Ontolog has quit [Remote host closed the connection]
<pagios>
hoelzro: i am mainly researching a way to do some curse terminal coding that provide minimal gui features, i am afraid i cannot run x11 due to resource limitation
<hoelzro>
ah
<pagios>
anything equivalent to ncurse that would be coded high level with ruby?
<peterhellberg>
pagios: I’d check out curses as hoelzro mentioned, especially since it is in the standard library
mneorr has quit [Remote host closed the connection]
ehellman has joined #ruby
hogeo_ has quit [Remote host closed the connection]
timonv has joined #ruby
Eising has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
niceguyjames has quit [Ping timeout: 252 seconds]
piotr_ has joined #ruby
<Eising>
hey. Is Phusion Passenger still the prefered way of quickly deploying a ruby app (in this case with sinatra) on apache?
cantonic has joined #ruby
<jsaak>
i think unicorn is the new guy, but ask #ror
<Eising>
but it's not rails...
<jsaak>
still
ferdev has joined #ruby
<Eising>
Okay, I'll give them a shout
piotr__ has joined #ruby
piotr_ has quit [Ping timeout: 258 seconds]
<peterhellberg>
Eising: Yes, if you want to deploy directly in Apache. But there are other alternatives if you want to proxy to a separate server (like Unicorn or Rainbows!)
<peterhellberg>
Eising: I’m very happy with Nginx + Passenger
<bnagy>
can you have unicorns AND rainbows?
<peterhellberg>
bnagy: Why would you even want that? :)
angusiguess has quit [Ping timeout: 256 seconds]
<Eising>
peterhellberg: I have no problem proxying...
<pagios>
Hanmac: http://pastie.org/7568959 i did add require 'require_relative' i am using ruby 1.9.3
<Hanmac>
pagios: i mean: require_relative "tic_tac_toe/version"
<peterhellberg>
Eising: GitHub is using Unicorn… so it is pretty well tested in production :)
bradhe has joined #ruby
<pagios>
ok
<Eising>
I'll give it a spin then
elkclone has quit [Quit: It's never too late to unplug and run.]
m8 has joined #ruby
troessner has quit [Ping timeout: 248 seconds]
<peterhellberg>
Eising: Note that it is “designed to only serve fast clients on low-latency, high-bandwidth connections”
eykosioux has quit [Remote host closed the connection]
<peterhellberg>
Eising: That means that you need to take into consideration if your app will experience a lot of long requests/response times and/or slow clients.
<Eising>
peterhellberg: so it implements short HTTP timeouts, I take?
kofno has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
<kalleth>
well, you can set it i thought
<peterhellberg>
Eising: Something like that, yes.
<kalleth>
to 30/60 sec
<kalleth>
s'what gitlab uses
<peterhellberg>
kalleth: Yes, but the documentation clearly states “Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request and response in between Unicorn and slow clients.”
eykosioux has quit [Read error: Connection reset by peer]
<peterhellberg>
Not sure if 30-60 sec is to be considered slow though…
eykosioux has joined #ruby
chimmy has joined #ruby
<Eising>
aye, so if I had a page that relied on a slow database query, it would probably be a bad idea
<peterhellberg>
Eising: Precisely, but you should probably read up on the specifics. I’m generally using Nginx with Passenger and have only used Unicorn in a few tiny apps.
m8 has quit [Read error: Connection reset by peer]
<hoelzro>
pagios: require 'curses'
<hoelzro>
not ncurses
<pagios>
ok
m8 has joined #ruby
<pagios>
hoelzro: same error
callmeivan has quit [Ping timeout: 252 seconds]
m8 has quit [Read error: Connection reset by peer]
hmarr has joined #ruby
<Eising>
why did I say Sinatra? I meant passenger
zmanfx has quit [Ping timeout: 245 seconds]
<pagios>
i actually did apt-get install ncurses-dev
<pagios>
do i have to import any gem for curses?
<hoelzro>
I don't think so...
<peterhellberg>
pagios: No, it is in the Ruby Standard Library
m8 has joined #ruby
<pagios>
what could be my error related to?
<peterhellberg>
Eising: Passenger + Apache/Nginx is a really simple way to deploy Rack applications without too much hassle
troessner has joined #ruby
<Eising>
peterhellberg: yeah, I'm doing that then. It's what I usually do, actually, but I thought maybe something new and groundbreaking had emerged :)
nomenkun has joined #ruby
<shevy>
since rack was mentioned, is there a way to avoid using .ru files and use .rb files instead?
<pagios>
manually compiled ruby 1.9.3 on debian
zmanfx has joined #ruby
<peterhellberg>
Eising: You might get better performance characteristics from something like nginx + unicorn, but it comes with a bit more configuration
<shevy>
pagios is your ncurses installation complete?
<pagios>
yes
<peterhellberg>
No free lunch and so on :)
xcv has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
<shevy>
pagios if so, go to ext/curses/
<shevy>
pagios then try to run the .rb file there
<pagios>
shevy: which directory?
<shevy>
pagios of the extracted ruby source tarball
<shevy>
hmm
<peterhellberg>
shevy: Do you have a reason for not using a config.ru?
brianpWins has quit [Quit: brianpWins]
<shevy>
peterhellberg yeah! I dont like this extension :( but more seriously, my editor is ancient and too dumb to recognize .ru files
<Hanmac>
peanuts___: maybe that you are in the wrong channel? maybe the #rubyonrails preople are more helpfull
<peanuts___>
Hanmac: ok, thanks … I'll try on #rubyonrails
zmanfx has joined #ruby
<shevy>
pagios hmmmmm
El_loco has joined #ruby
<shevy>
I have libncursesw.so.5.9
<shevy>
pagios, what *ncurs* do you have in /usr/lib ?
<shevy>
I tested this on 1.8.7 btw, the last cool ruby version :D
heftig has quit [Ping timeout: 245 seconds]
<Hanmac>
shevy & pagios the ncurses gem looks like its for 1.8.6 ... thats why the error: ‘struct RArray’ has no member named ‘len’
* tobiasvl
slaps shevy around a bit with a large trout
hdl has joined #ruby
<pagios>
Hanmac: should it be backward compatible on 193?
<hdl>
hi there
sleetdro_ has joined #ruby
<Hanmac>
pagios & shevy 1.9.* and 1.8.7 have similar API ... but 1.8.6 have totaly different API ... and the ncursed was for 1.8.6 so it does not work with 1.8.7 or 1.9.*
<pagios>
Hanmac: you mean i cant use ncurses/curses with the latest ruby release?
<hdl>
is there anyone which know about a debian repository for uptodate ruby debian packages ?
chandankumar has quit [Read error: Connection reset by peer]
<tobiasvl>
pagios: that's a lot of code. do you have a specific problem?
<pagios>
i would like to store some critical data in my code so i dont want it to be avaialbe for ppl having read access to the rb file
<tobiasvl>
Pierreb: what the... what's this line? if ("#{$cnum}" = "#{$countrynum}" & "#{$email}" !=(null|0|nil) )
<pagios>
is there a way to store that data in a hash for example?
<pagios>
and load the hash for execution?
<injekt>
Pierreb: did you just copy that code?
<injekt>
Pierreb: there's absolutely nothing right about any of it
<Pierreb>
yes and no
<tobiasvl>
if "#{$email}" !=(null|0|nil)
<tobiasvl>
what ... what
tomku has quit [Ping timeout: 246 seconds]
<Hanmac>
pagios: critical like passwords should not go into code
<Pierreb>
output from mysql, not sure what to put there
<bnagy>
pagios: you can't protect code that will run on other people's computers
<injekt>
Pierreb: most of that is not valid
<Pierreb>
i want it to verify that email isnt empty
<Pierreb>
would nil work?
<tobiasvl>
Pierreb: you don't know ruby, do you
<pagios>
Hanmac: mainly i would need to automate a process of sending some credentials from that application
tesuki has joined #ruby
<Pierreb>
i have just started to learn ruby so yes i dont know ruby. however i need to make that work somehow and after that i can continue to learn
<injekt>
Pierreb: no, you need to learn Ruby first
Axsuul has quit [Ping timeout: 264 seconds]
<tobiasvl>
Pierreb: "#{$email}" interpolates a global (???) variable into a string. if $email is empty, the result will be the empty string, which is not equel to nil or 0. null isn't even a keyboard, and you can't chain together stuff like that anyway (nothing can be equal to the disjunction)
<tobiasvl>
Pierreb: i'm sorry but you need to pick up a beginner's book in ruby and learn the basic syntax before tackling a (fairly) long script like that
<Pierreb>
so how do i correct it then?
beiter has joined #ruby
<tobiasvl>
no easy task
<tobiasvl>
rewrite from scratch
<injekt>
step 1: learn ruby
<Pierreb>
ok ill try that then
<Hanmac>
shevy whats your opinion about http://rubyencoder.com ? for me it smells like a fake ;P
jnoob22 has quit [Remote host closed the connection]
<bnagy>
that is hilarious
noop has joined #ruby
<shevy>
Hanmac lol
<bnagy>
how do you even write that many lines that are nonsensical? Is it like pseudocode?
<shevy>
Pierreb nil is for when something that does not exist
<shevy>
Pierreb but if someone else wrote it, then trying to understand it is much harder
niceguyjames has joined #ruby
<bnagy>
I love these aspirational objects, like Gmail and Channel :D
<JonnieCache>
Hanmac: that is amazing
<JonnieCache>
i bet its just rot13 or something
Pierreb_ has joined #ruby
clocKwize has joined #ruby
miso1337 has quit [Quit: afk]
kofno has joined #ruby
Pierreb has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
Pierreb_ has quit [Ping timeout: 245 seconds]
Pierreb has joined #ruby
jonathanwallace has joined #ruby
<Hanmac>
JonnieCache: i can image an rubyEncriptor that uses pgp or something ... but its still unsecure
<JonnieCache>
yeah well im sure we can all think of lots of ways around that
kofno has quit [Ping timeout: 258 seconds]
gosshedd has joined #ruby
<Hanmac>
but i know: every protection can be broken ... thats why i do not care about ...
chessguy has joined #ruby
gosshedd has quit [Client Quit]
<JonnieCache>
you could just get the interpreter to write out all the code to a file
security is now known as megha
<JonnieCache>
or whatever
linusoleander has quit [Quit: linusoleander]
<JonnieCache>
just read it out of memory with gdb
gosshedd has joined #ruby
Xeago has joined #ruby
<Hanmac>
or the encrypt algorythm could be reverse enginiered
<bnagy>
encryption algorithms don't need to be reversed
<bnagy>
at least none worth using
dmiller has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<bnagy>
I'd probably just hook the parser in yarv and pull out src as the bytecode is being produced
<Hanmac>
bnagy: okay i mean the decrypt, but its still possible
<bnagy>
Hanmac: I just mean that the algorithms are very well known, you don't need to reverse engineer anything
<bnagy>
the only thing secret is ( should be ) the key
<bnagy>
trouble is all these dinky schemes involve putting the key on the same box as the encrypted source
<JonnieCache>
exactly. its fundamentally a stupid idea
kelabot has joined #ruby
<JonnieCache>
unless you want to plug in a usb token every time you execute the code
Xeago_ has joined #ruby
<bnagy>
there are some OK setups like that
<JonnieCache>
or use a kerberos server i suppose
codenapper has quit [Read error: Connection reset by peer]
schickung has quit [Quit: schickung]
codenapper has joined #ruby
dagobah_ has joined #ruby
Xeago has quit [Ping timeout: 256 seconds]
<bnagy>
but it still has to, like, run
dormoose has quit [Read error: Connection reset by peer]
<JonnieCache>
if your business will fail because someone else has access to your source code, maybe it sucks
dmiller has quit [Ping timeout: 258 seconds]
<bnagy>
but yeah you can make an OK copy protector if you get to use a hardware dongle
tvw has joined #ruby
jonathanwallace1 has joined #ruby
<bnagy>
but that's not the same as 'protecting your IP'
<bnagy>
that's what copyright is for :D
pasties has quit [Ping timeout: 240 seconds]
dagobah has quit [Read error: Connection reset by peer]
<Hanmac>
but the website says that you can open your suff with a loader ... so the algorythm cant be that complicated ...
jonathanwallace has quit [Ping timeout: 252 seconds]
<bnagy>
oh I didn't even look at that website - it's bound to be complete wank
Matip has quit [Ping timeout: 256 seconds]
undersc0re97 has quit [Quit: Leaving]
<bnagy>
but I guess it's for rails retards who want to protect their source from slightly more retarded customers, so the bar is pretty low
chessguy has quit [Remote host closed the connection]
El_loco has quit [Remote host closed the connection]
skattyadz has joined #ruby
<pagios>
what would be the best way to protect my source code then?
<bnagy>
legally
pasties has joined #ruby
<pagios>
if consider i can give limited access to the client, for example allow only in /etc/passwd access to /path/myruby and not a shell
<tobiasvl>
pagios: can you explain what exactly you want to protect
skattyadz has quit [Remote host closed the connection]
unflores has quit [Quit: unflores]
<pagios>
tobiasvl: ok i have an STB box on which some data (critical ones) need to be stored to establish some communication with some third party servers, also some algorithms are done so i would like to protect this ruby script, now on the STB i can enforce restrictions on shell/OS level i am wondering if that is enough since for example a malicious user can just unplug the hardisk mount it on his machine and access the source code easiliy
<mklappstuhl>
I want to get an Array that contains Date objects of the last 14 days. How would I do that?
<tobiasvl>
what's an STB box?
<tobiasvl>
a set top box box maybe
<tobiasvl>
mklappstuhl: what do you mean? you want to generate a new array with 14 Date objects, one for each of the past 14 days?
<pagios>
even when i encrypt the hardisk on the STB the user will be prompted to provide the password to decrypt so it does not make sense since he can always decrypt the hardisk once plugged on the malicous user's machine
<tobiasvl>
mklappstuhl: (Date != day you know)
<mklappstuhl>
tobiasvl: exactly
<pagios>
tobiasvl: yes, consider the STB as a laptop for instance..
<pagios>
so i need some advice from the experts in here
<mklappstuhl>
tobiasvl: yeah I know, I'm looking for something similar to Date.today
Matip has joined #ruby
jonathanwallace1 has quit [Ping timeout: 255 seconds]
<tobiasvl>
i think bnagy hit the nail on the head
<mklappstuhl>
bnagy: awesome!
br4ndon has joined #ruby
<bnagy>
pagios: there is no way you can protect data on a computer to which an attacker has physical access
jonathanwallace has joined #ruby
<A124>
Hey all.. Any idea how to use serial port?
<bnagy>
pagios: are your comms even ssl, bro? ;)
<pagios>
yes SSL tunnel
<pagios>
but my concern is the physical box
<bnagy>
A124: what OS, cause you can just open ttys0 etc on *nix
<pagios>
i was thinking maybe i can send the code in realtime from the server to the box once connection is established and then destroy the data when the box is turned off :/
<pagios>
dunno if it would be a goos solution
<bnagy>
pagios: ok, I'll humour you and pretend this might ever work
<bnagy>
does the attacker have to be able to log into this box?
<A124>
bnagy: Win, Linux Both
<tobiasvl>
man in the middle?
<pagios>
tobiasvl: man in the middle wouldnt work on encrypted tunnel
<bnagy>
pagios: cause if so, you're almost certainly screwed, if you have a skilled attacker
<bnagy>
pagios: actually that depends how you verify ssl certs
<bnagy>
but let's leave that for now
<pagios>
bnagy: he cannot login to the box since the only thing he can access is SSH and that would only allow him to fire up the ruby script and not a shell
huoxito has joined #ruby
<bnagy>
how is ssh access not logging in?
<pagios>
unless he bruteforces the box but some scripts will just destroy the data if 20 consecurtive login trial fail
<A124>
bnagy: Seems /dev/ttyS[0-9] could do on POSIX systems, now the part of Win :D
angusiguess has joined #ruby
<pagios>
bnagy: it is logging in but again it is a restricted access he will not have a Shell access on his profile
camilasa_ has quit [Remote host closed the connection]
hmarr has quit [Ping timeout: 252 seconds]
<bnagy>
why do you want to give them ssh acess at all? If they need to be able to run some script then serve it via a web interface or something
<bnagy>
giving any ssh access is unsafe
<A124>
CGI
<pagios>
bnagy: correct, limitation is that the STB cannot support X11 it would be heavy on its resources
<bnagy>
pagios: web interface has 0 to do with X
<pagios>
webinterface = apache/rubyonrails
<bnagy>
what is STB supposed to stand for anyway?
<bnagy>
pagios: well that's one bloated, horrible way, yeah, I guess
neurone-2337 is now known as neurone-1337
<pagios>
if we going web, X11 if we going local GUI on ruby
chase-work has joined #ruby
<A124>
C:/Users/User/Documents/Ruby/win32serial.rb:127:in `[]=': no implicit conversion
<A124>
of Fixnum into String (TypeError)
<bnagy>
do web. X11 is basically like writing 'root here' on the side of the machine
<A124>
bnagy: Any idea? I guess it has something to do with Ruby 1.8 -> 1.9
<pagios>
but anyways even if i use web interface, the hardisk if plugged into another computer can be compromided
<pagios>
compromised*
<bnagy>
pagios: use full disk encryption
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
lupine has joined #ruby
peanuts___ has quit [Quit: peanuts___]
<bnagy>
and don't give them the password. Tell them if it turns off then it's a support callout
hmarr has joined #ruby
<pagios>
bnagy: if i use full disk encryption, the STB will need the decryption pass to decrypt
<shevy>
A124 come back to 1.8.x :)
<pagios>
so i need to provide the password to the client user which can be a malicious user
<pagios>
:)
<bnagy>
it only needs it when it turns on
<A124>
shevy: Why? :D
<shevy>
A124 we need to use the best ruby version
<bnagy>
and, if you read what I just wrote like 5 SECONDS AGO, don't do that
angusiguess has quit [Ping timeout: 258 seconds]
<A124>
shevy: Hehe.. I like the new ones
gosshedd has quit [Quit: Lost terminal]
<A124>
Thought 1.8.6 is classic
emergion has joined #ruby
hdl1 has joined #ruby
<pagios>
bnagy: how would you solve it remotely? i am afraid that would need a physical intervention
<pagios>
since OS didnt boot yet with a full disk encryption
<bnagy>
there are hardware cards for that
mrmist has quit [Quit: leaving]
unflores has joined #ruby
<A124>
shevy: I need to write a byte to absolute position in string .. gotta find that out
decentrality has quit [Quit: demonstrate freedom //]
hdl has quit [Ping timeout: 256 seconds]
<bnagy>
but this is getting crap, and that means a 'full' PC, I dunno what your hardware constraints are
yshh has quit [Remote host closed the connection]
tonini has joined #ruby
<pagios>
hehe
tesuki has quit [Remote host closed the connection]
<shevy>
he codes on a potato
<A124>
shevy: 124.chr does it
<shevy>
124.chr # => "|"
<shevy>
indeed
<A124>
shevy: I don't need that char.. but talking to serial and need to specify size. 124 was just a test :D
Zai00 has quit [Quit: Zai00]
<shevy>
hehe
<shevy>
oh man
<shevy>
I have to switch to UTF and I dont wanna ...
unflores has quit [Remote host closed the connection]
unflores has joined #ruby
Zai00 has joined #ruby
mrmist has joined #ruby
<JonnieCache>
boo hoo
<bnagy>
pagios: basically this is boiling down to the 'trusted client' model, which is basically impossible to solve
<bnagy>
owning printers is hilarious, shit persists for EVER
tonini_ has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
jonathanwallace1 has joined #ruby
d11wtq has joined #ruby
pothibo has joined #ruby
pcarrier has joined #ruby
<pagios>
.0
<bnagy>
anyway, this is all reminding me of why I got out of defensive security in the first place
<shevy>
bnagy the booze?
<bnagy>
so I'ma drink beer instead and write fuzzers
<bnagy>
shevy: no, it's full of people that want to do stuff that's not doable
jonathanwallace has quit [Ping timeout: 264 seconds]
<bnagy>
so they try and do it anyway, then it doesn't work
aespolov has joined #ruby
<pagios>
bnagy: i think a good way is to create like a clientname/password send it to the server to authenticate once authenticated send the password to decrypt over the tunnel, load it to decerypt hardisk and then fire up the ruby script
peta_ has joined #ruby
bcuz has quit [Quit: Page closed]
peterhellberg has quit [Remote host closed the connection]
amal has quit [Ping timeout: 256 seconds]
yacks has quit [Ping timeout: 276 seconds]
<bnagy>
... ok sure, do that, whatever
jinie has joined #ruby
rking has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
aespolov has quit [Remote host closed the connection]
jgrevich has quit [Remote host closed the connection]
<A124>
bnagy: Umm..
<A124>
Any idea bout the serial?
<A124>
If I have blocking system call.. is thre a way to get out?
<A124>
Interrupt does not seem to work
chussenot has quit [Quit: chussenot]
sleetdrop has quit [Quit: Computer has gone to sleep.]
<bnagy>
A124: I don't know, I'd just be googling. Can't imagine it's too tricky though
rking has joined #ruby
amal has joined #ruby
amal has quit [Max SendQ exceeded]
fermion has quit [Quit: Computer has gone to sleep.]
amal has joined #ruby
heftig has joined #ruby
<A124>
bnagy: It is.. sadly. the gem that exists just hangs up without sending data
<A124>
bnagy: My approach was to directly talk to driver, but.. sadly, the call to kernel32 blocks
oneirophren has joined #ruby
<bnagy>
A124: code?
<bnagy>
and fwiw kernel32 isn't "talking directly to the driver" ;)
Arzaga has quit [Quit: Computer has gone to sleep.]
Bofu2U has quit [Ping timeout: 240 seconds]
peta_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
girija has quit [Ping timeout: 258 seconds]
wesside has joined #ruby
iphands_ has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.4.0]
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
zmanfx has quit [Ping timeout: 245 seconds]
sambio has joined #ruby
xclite is now known as blowjobs
ph^ has quit [Remote host closed the connection]
blowjobs is now known as xclite
carlyle has joined #ruby
sambio has quit [Client Quit]
fermion has quit [Quit: Computer has gone to sleep.]
yojimbo has joined #ruby
yojimbo is now known as yojimbo_
kimteq has joined #ruby
chiel has joined #ruby
interactionjaxsn has joined #ruby
My_Hearing is now known as Mon_Ouie
idkazuma has joined #ruby
wallerdev has quit [Quit: wallerdev]
Matip has joined #ruby
momomomomo has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
osvico has quit [Ping timeout: 255 seconds]
johnmilton has joined #ruby
chrishunt has joined #ruby
banister_ has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
jtharris has joined #ruby
peta_ has quit [Quit: peta_]
Rym has joined #ruby
Mattix has quit [Ping timeout: 252 seconds]
pcarrier has joined #ruby
DaltonUS has joined #ruby
iphands_ has quit [Ping timeout: 255 seconds]
sleetdrop has joined #ruby
acrussell has joined #ruby
ngcazz has joined #ruby
_nitti has joined #ruby
arya has joined #ruby
Bofu2U has joined #ruby
irrationalfab has joined #ruby
irrationalfab has quit [Remote host closed the connection]
irrationalfab has joined #ruby
madb055 has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
ioNull has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
mklappstuhl has quit [Ping timeout: 252 seconds]
afd__ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
zmanfx has joined #ruby
puppeh has quit [Remote host closed the connection]
puppeh has joined #ruby
puppeh has quit [Remote host closed the connection]
theRoUS has joined #ruby
jtharris has quit [Read error: Connection reset by peer]
puppeh has joined #ruby
jtharris has joined #ruby
<linduxed>
so i know that "reduce(:+)" is the same as "reduce { |sum, i| sum + i }" but i don't understand what's going on in the first case
generali_ has quit [Remote host closed the connection]
nkts has joined #ruby
<linduxed>
anyone who'd care to explain that syntax?
Czupa has quit [Remote host closed the connection]
dustint has quit [Ping timeout: 252 seconds]
nari has quit [Ping timeout: 252 seconds]
puppeh has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
adamjleonard has joined #ruby
yshh has quit [Read error: Connection reset by peer]
<tobiasvl>
the syntax is easy enough
justsee has quit [Ping timeout: 264 seconds]
<tobiasvl>
you pass the symbol :+ to the reduce method
<tobiasvl>
(all symbols start with a :)
yshh has joined #ruby
<linduxed>
oooh
<linduxed>
i keep forgetting the symbol stuff
TomJ has quit [Quit: TomJ]
rippa has quit [Ping timeout: 240 seconds]
<linduxed>
so you pass the symbol :+ which points to a method which takes two integers as arguments
<hoelzro>
linduxed: a Symbol has a #to_proc method
<tobiasvl>
basically. not quite precise, because a symbol doesn't point at anything
beiter_ has joined #ruby
SCommette has joined #ruby
<tobiasvl>
but the value of the symbol is the name of a method
gaahrdner has joined #ruby
<hoelzro>
technically, you may pass anything that responds_to to_proc
<hoelzro>
which is awesome.
<linduxed>
hoelzro: what does to_proc mean?
Ankhers has joined #ruby
<hoelzro>
it's a method that converts the invocant to a Proc object
v0n has joined #ruby
knapper_tech has quit [Ping timeout: 252 seconds]
<ccooke>
linduxed: It's a method, just like to_s and to_i - it converts the called object into something else. In this case, a proc. Not every object has one, but you can always add the method to any class.
<hoelzro>
it's used by certain methods as well as the "proc splat"
<linduxed>
hoelzro: doesn't tell me much more
<linduxed>
i don't understand what the proc is
beiter has quit [Ping timeout: 245 seconds]
beiter_ is now known as beiter
<Hanmac>
hoelzro: yes and no, inject/reduce is a little bit different that it works with inject(&:+) but also with inject(:+) ... and the second one is faster
fermion has joined #ruby
bluOxigen has joined #ruby
<hoelzro>
linduxed: a proc is kind of like a block
statarb3 has quit [Quit: Leaving]
<hoelzro>
Hanmac: do inject(&:+) and inject(:+) have differenct semantics?
tommyvyo has joined #ruby
veinofstars has quit [Quit: veinofstars]
fermion has quit [Client Quit]
<Hanmac>
the second one only works with Symbols or Strings and its faster
<hoelzro>
but they do the same thing, right?
<Hanmac>
yeah the output is the same ... but the second one does not create a proc
<hoelzro>
right
BizarreCake has quit [Ping timeout: 248 seconds]
DK1 has left #ruby [#ruby]
<hoelzro>
they're basically synonyms, is all I'm trying to say =)
arya has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
<linduxed>
what is that ampersand doing inside (&:+)?
<hoelzro>
linduxed: it calls to_proc and sets the result to the block of the invocation
<apeiros>
I love how a company like google manages to create a language whose name totally sucks for googling…
<injekt>
go-lang is usually fine, but agreed
beiter has quit [Ping timeout: 245 seconds]
beiter_ is now known as beiter
kelabot has joined #ruby
<injekt>
not only that, but a 'go' language already existed
aganov has quit [Remote host closed the connection]
jlast has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
atyz has quit [Quit: Leaving...]
wolcanus has quit [Remote host closed the connection]
Neomex has joined #ruby
<linduxed>
i think you're hard press, however, to find a worse project name than "awesome"
Neomex has quit [Client Quit]
ffranz has joined #ruby
<linduxed>
try to google that
<hoelzro>
haha
* hoelzro
uses AwesomeWM
<linduxed>
so do i
tonini has quit [Remote host closed the connection]
wolcanus has joined #ruby
LiohAu has joined #ruby
atyz has joined #ruby
<finnomenon>
xmonad <3
<linduxed>
but that doesn't change that it should have had those magic two capital letters at the end
<injekt>
I got mvc awesome
io_syl has quit [Ping timeout: 245 seconds]
beiter_ has joined #ruby
frem has quit [Quit: Farewell!]
beiter has quit [Ping timeout: 245 seconds]
beiter_ is now known as beiter
<linduxed>
the ONLY thing that saves the day is that one pretty much knows that if the info is not available at awesome.naquadah.org or at the archwiki, then it doesn't exist
banister_ has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
TomJ has joined #ruby
akashj87 has joined #ruby
fermion has joined #ruby
tobyo has joined #ruby
generali_ has joined #ruby
generali_ has quit [Remote host closed the connection]
chrishunt has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
wallerdev has joined #ruby
ariedler has joined #ruby
ioNull has joined #ruby
ioNull has quit [Max SendQ exceeded]
ioNull has joined #ruby
wyhaines has joined #ruby
aspiers has joined #ruby
<mklappstuhl>
how can I group a list of dates by month? (statistical purposes)
<Hanmac>
mklappstuhl: group_by(&:day)
Animawish has joined #ruby
chrishunt has joined #ruby
<mklappstuhl>
Hanmac: Whooaaa :) this is exactly what I've been looking for and its beautiful! thanks!
<mklappstuhl>
hey there. Having a bunch of objects with a field .created_at I'd like to get information about how many objects were created monthly
<mklappstuhl>
ah dammit, sorry. ignore last one.
_maes_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
<waxjar>
Enumerable is so good
<LiohAu>
hi guys, it seems like my ruby install is failing everything i do, how can i make a clean install ?
celinedior has joined #ruby
momomomomo has joined #ruby
smigg has joined #ruby
<LiohAu>
i just installed a new gem, and when using it i get : "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem ocunit2junit (>= 0) (Gem::LoadError)"
beiter has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
beiter has joined #ruby
F1skr has joined #ruby
Xeago has quit [Remote host closed the connection]
<momomomomo>
LiohAu: Did you install the dependency 'ocunit2junit' gem
LnL has joined #ruby
<LiohAu>
ocunit2junit gem is the gem i'm currently running, it's not a dependency of another
juarlex has joined #ruby
<LiohAu>
and i just did a sudo gem install ocunit2junit
cantonic has joined #ruby
miso1337 has joined #ruby
tomsthumb has quit [Quit: Leaving.]
<LiohAu>
the install output : "Fetching: ocunit2junit-1.2.gem (100%) Successfully installed ocunit2junit-1.2 1 gem installed Installing ri documentation for ocunit2junit-1.2... Installing RDoc documentation for ocunit2junit-1.2..."
<momomomomo>
welp, gems are a tricky situation that interact with lots of variables in your system
<LiohAu>
i think that the problem is that rvm shit
<momomomomo>
If you're not using something like RVM or rbenv, it's tough to diagnose
<momomomomo>
if you do SUDO it goes up to the system ruby
<ngcazz>
^^ this
<ngcazz>
the point of rvm is that users get to manage their own entire ruby installations
<LiohAu>
ok, that explains the sentence i read on stackoverflow saying to do not use sudo with rvm :(
<ngcazz>
yep
<ngcazz>
i think you can have a system-wide rvm
ttt has quit [Remote host closed the connection]
<LiohAu>
the problem is that without the sudo, i get these errors : "Fetching: ocunit2junit-1.2.gem (100%) Successfully installed ocunit2junit-1.2 1 gem installed Installing ri documentation for ocunit2junit-1.2... file 'lib' not found Installing RDoc documentation for ocunit2junit-1.2... file 'lib' not found"
<LiohAu>
the "file 'lib' not found"
<ngcazz>
weird
<LiohAu>
(even if now the gem itself works)
<apeiros>
banister_: not that I'd remember, no
<LiohAu>
i mean ocunit2junit works
<apeiros>
banister_: sounds like you built your sqlite gem against an sqlite which is no longer there
beiter_ has joined #ruby
beiter has quit [Ping timeout: 264 seconds]
beiter_ is now known as beiter
Vainoharhainen has quit [Quit: Leaving...]
kuzushi has quit [Ping timeout: 264 seconds]
<hoelzro>
perhaps sqlite was update from under you?
<hoelzro>
*updated
jprovazn has quit [Quit: Leaving]
carloslopes has quit [Remote host closed the connection]
<regedarek>
Hi, could you help me understand why I can't test mailer when i trigger 'post' request in sinatra?
idkazuma has quit [Remote host closed the connection]
pitzips has quit [Ping timeout: 276 seconds]
_nitti has quit [Remote host closed the connection]
ph^ has joined #ruby
veinofstars has joined #ruby
BadLarry has joined #ruby
sailias1 has quit [Ping timeout: 255 seconds]
lolmaus has joined #ruby
<lolmaus>
What was that great video lecture about the nature of `self` in Ruby?
schickung has quit [Quit: schickung]
momomomomo has quit [Quit: momomomomo]
ph^ has quit [Ping timeout: 246 seconds]
apod has joined #ruby
_nitti has joined #ruby
<mklappstuhl>
having a hash like this {{2013=>4}=>22} how would I access "22" without knowing the key?
beiter_ has joined #ruby
wolcanus has quit [Remote host closed the connection]
ferdev has quit [Ping timeout: 252 seconds]
<mklappstuhl>
invert.keys.first seems cumbersome
xcv has quit [Remote host closed the connection]
<MrZYX>
mklappstuhl: hsh.values.first
beiter has quit [Ping timeout: 245 seconds]
beiter_ is now known as beiter
_nitti_ has joined #ruby
<apeiros>
it is cumbersome to access hash values without their keys.
xcv has joined #ruby
bluefish has quit [Quit: Page closed]
emptymag00 has quit [Read error: Connection reset by peer]
<mklappstuhl>
MrZYX: haha I oversaw that I guess -.-
<MrZYX>
^ + when wishing to do so it usually means you got the wrong datastructure
<apeiros>
kinda beats the purpose of having a hash…
<apeiros>
also having a hash as a key is suspicious
* apeiros
agrees with MrZYX
<mklappstuhl>
ok, then let me tell you the original problem
browndawg has quit [Quit: Leaving.]
mikepack has joined #ruby
slainer6_ has joined #ruby
soulofpeace has joined #ruby
<mklappstuhl>
I have a bunch of dates I want to "cluster" by month. I can use group_by(&:month) but this doesn't work well as soon as dates go accross multiple years
beiter_ has joined #ruby
<hoelzro>
then group by year + month?
<mklappstuhl>
It's also an option to remove the date from the data but I felt like keeping that bit of context would be nice
blueOxigen has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
nkts has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
kuzushi_ has quit [Ping timeout: 264 seconds]
thebastl has quit [Ping timeout: 245 seconds]
beiter has quit [Ping timeout: 256 seconds]
beiter_ is now known as beiter
nkts has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
<mklappstuhl>
hoelzro: thats what I did in a hacky way by using the hash as key. didn't come up with a quick way of getting group_by to create a nested array...
bluOxigen has quit [Ping timeout: 245 seconds]
krawchyk has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
ferdev has joined #ruby
<hoelzro>
group_by { |d| d.year + '-' + d.month }
<hoelzro>
what about that?
<hoelzro>
no need for nested arrays
jandres has quit [Remote host closed the connection]
<apeiros>
d.strftime("%Y%m")
<apeiros>
d.year*100+d.month
interactionjaxsn has quit [Read error: No route to host]
interactionjaxsn has joined #ruby
baroquebobcat has joined #ruby
lolmaus has quit []
rippa has joined #ruby
<hoelzro>
why 100, apeiros?
sambio has joined #ruby
<apeiros>
easier to read
bluOxigen has joined #ruby
<apeiros>
or did you mean why I multiply at all?
beiter_ has joined #ruby
beiter has quit [Ping timeout: 252 seconds]
beiter_ is now known as beiter
sailias has joined #ruby
Animawish has quit [Quit: Animawish]
pcarrier has quit [Quit: Computer has gone to sleep.]
<hoelzro>
I'm guessing you multiply to make distinct values per year/month combination
<hoelzro>
in which case I would suggest 12
<apeiros>
well, you can easily tell what month and year 201204 is
bradhe has joined #ruby
DonRichie has joined #ruby
<apeiros>
more difficult with 24148
<apeiros>
and to ruby it won't matter whether the factor is 12 or 100
<hoelzro>
ok, fair enough
<hoelzro>
that's actually a really good strategy =)
<hoelzro>
apeiros++
blueOxigen has quit [Ping timeout: 256 seconds]
<apeiros>
if you have size constraints, the game changes, of course :)
newUser1234 has joined #ruby
<hoelzro>
indeed
pyrac has quit [Ping timeout: 276 seconds]
blueOxigen has joined #ruby
momomomomo has joined #ruby
tk_ has quit [Quit: ばいばい]
* apeiros
off, cya
apeiros has quit [Remote host closed the connection]
ckrailo has joined #ruby
mlr has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 255 seconds]
pduin has quit [Remote host closed the connection]
mlr has left #ruby [#ruby]
slainer6_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
jjbohn has joined #ruby
momomomomo has joined #ruby
slainer68 has joined #ruby
hdl1 is now known as hdl
drakedouay has joined #ruby
artofraw has joined #ruby
<drakedouay>
I set my Gemfile to point to a specific github repo, and I am getting the error 'Permission denied (public key)'. This is the offending line "gem 'capybara-webkit', :git => 'git@github.com:thoughtbot/capybara-webkit.git'". What am I doing wrong?
<hoelzro>
drakedouay: try git://github.com instead of git@github.com
<injekt>
git@github.com:thoughtbot/capybara-webkit.git is a private git url
<injekt>
or `gem 'capbara-website', github: 'thoughtbot/capybara-webkit'`
thebastl has joined #ruby
camilasa_ has quit [Remote host closed the connection]
<drakedouay>
Awesome. Thanks gus
<drakedouay>
*guys
tubbo has left #ruby [#ruby]
buscon has quit [Remote host closed the connection]
smt has quit [Quit: Konversation terminated!]
Astral__ has quit [Read error: Connection reset by peer]
aspiers has quit [Ping timeout: 248 seconds]
Astral__ has joined #ruby
cha1tanya has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
sambao21_ has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
sambao21_ is now known as sambao21
slainer68 has quit [Remote host closed the connection]
_nitti has joined #ruby
chandankumar has joined #ruby
chrishough has joined #ruby
wolcanus has joined #ruby
puppeh has joined #ruby
jandres has joined #ruby
soulofpeace has quit [Ping timeout: 245 seconds]
threesome has quit [Ping timeout: 255 seconds]
F1skr has quit [Quit: WeeChat 0.4.0]
DaltonUS has quit [Quit: DaltonUS]
carlyle_ has joined #ruby
freakazoid0223 has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
bradhe has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
xlab_ has joined #ruby
tomsthumb has joined #ruby
banister_ has quit [Remote host closed the connection]
slainer68 has joined #ruby
<drakedouay>
I am trying to remember the name of this gem I used a while back. It let you single step through a ruby application, and execute commands during runtime. I think it's name started with a p. Anyone know what I am talking about
wolcanus has quit [Ping timeout: 245 seconds]
Xlab has quit [Ping timeout: 256 seconds]
<momomomomo>
drakedouay: debugger?
jamie_ca_ has joined #ruby
<drakedouay>
momomomomo: No, that isn't i
<drakedouay>
t
<drakedouay>
pry
<drakedouay>
that is it's name
<momomomomo>
right, I was going to link that, but it's a console
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
schickung has joined #ruby
tealmage has joined #ruby
mafs has joined #ruby
mafs has quit [Excess Flood]
preyalone has joined #ruby
dhruvasagar has joined #ruby
mafs has joined #ruby
mafs has quit [Excess Flood]
preyalone has left #ruby [#ruby]
ckwalsh has joined #ruby
csmrfx has joined #ruby
fearoffish has quit [Ping timeout: 245 seconds]
mafs has joined #ruby
mafs has quit [Excess Flood]
tesuki has quit []
keymone_ has quit [Read error: Operation timed out]
miso1337 has quit [Quit: afk]
mafs has joined #ruby
mafs has quit [Excess Flood]
wsterling has joined #ruby
mafs has joined #ruby
mafs has quit [Excess Flood]
justsee has quit [Ping timeout: 245 seconds]
mafs has joined #ruby
mafs has quit [Excess Flood]
timonv has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
mafs has joined #ruby
mafs has quit [Excess Flood]
tootubular has joined #ruby
fearoffish has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
mafs has joined #ruby
mafs has quit [Excess Flood]
carloslopes has joined #ruby
carlyle_ has quit [Remote host closed the connection]
<Spooner>
I'm trying to use wxruby-ruby19 on windows with 1.9.3. It works fine when I run it normally, but when I run it from an exe (built by ocra) I get an error about "The specified procedure could not be found" (at the point when it tries to load the .so).
mafs has joined #ruby
mafs has quit [Excess Flood]
cha1tanya has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
artofraw has quit [Remote host closed the connection]
mafs has joined #ruby
mafs has quit [Excess Flood]
interactionjaxsn has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Xlab has joined #ruby
<Spooner>
Anyone have any pointers at all? Hanmac ? I've wasted hours on this and my client wants a .exe ;(
<Hanmac>
Spooner: i didnt use wxruby i use my self thing and i didnt use ocra before
dmiller_ has joined #ruby
sambao21 has joined #ruby
stef_204 has joined #ruby
ttt has joined #ruby
<Spooner>
Hanmac, OK, but what in general does that error mean? Couldn't find an entry point in the .so? Something else?
<csmrfx>
Spooner: use jruby
<csmrfx>
just my 1 cent
<csmrfx>
Spooner: also, are you sure linked libraries are .so under Windoze, or .dll?
pioz has quit [Ping timeout: 264 seconds]
<Spooner>
I'm not up for starting again ;) The application works fine. Just kicking an error for what is probably an easy thing to fix if I had a clue.
<Spooner>
csmrfx, They are still .so for Ruby libraries.
<qaguy>
injekt: I am showing the error I get from the FB api.
freerobby has quit [Quit: Leaving.]
<qaguy>
I want to rescue that error if it happens to ensure I get a user create to go through before the test runs
<injekt>
qaguy: I would suggest not hitting their api for your tests
<qaguy>
injekt: I'm testing our FB app. I need to create test users. How would I do that for FB without hitting their API?
headius has joined #ruby
<qaguy>
That's the only way I know to create test accounts on FB
<injekt>
Don't the fb libs provide test mock helpers for stuff like this? I don't like mocks but I don't think I'd like hitting the fb api every time I run my tests. Besides, there's a reason you're getting a 500 instead of a 200 response from fb, do you know the reason?
<qaguy>
No I don't and that's what weird. The call works fine say 98% of the time.
<qaguy>
And I am not changing anything in the call
<injekt>
qaguy: then you certainly don't want to catch the exception
<injekt>
you're masking a problem you haven't solved
mucker has joined #ruby
<qaguy>
Good point. Ok I'm gonna go dig a bit deeper. Thanks for the help
<injekt>
and you would usually mock an api call so you can test handling different responses. That is, you'd have a test to handle the 500 response and another to handle the 200 :)
Xeago_ has quit [Remote host closed the connection]
droppedonmyhead has quit [Quit: droppedonmyhead]
shock_one has joined #ruby
hydrozen has joined #ruby
forrest has joined #ruby
codenapper has joined #ruby
sixEch0 has joined #ruby
krawchyk_ has joined #ruby
platzhirsch has joined #ruby
sixEch0 has quit [Client Quit]
musl has quit [Quit: WeeChat 0.4.0]
musl has joined #ruby
duosrx has joined #ruby
khismetix has joined #ruby
fryguy- is now known as fryguy
mercwithamouth has quit [Ping timeout: 260 seconds]
<shevy>
Hanmac, on your terminal, what is the default colour you use?
<shevy>
or could you make a screenshot? I am wondering whether I should use white (on black) or green (on black) by default for my .rb scripts
krawchyk has quit [Ping timeout: 276 seconds]
<platzhirsch>
The JSON.parse from Ruby is not very flexible, is it? I have a JSON object: { "author" : "Jimmy", "extras" : "[\"a\",\"b\"]" } and Ruby parses extras not as an Array, but as a string, any idea how to appraoch this?
mikepack has quit [Remote host closed the connection]
<jimeh>
platzhirsch: you'll simply have to pass the String value of "extras" through JSON.parse again...
br4ndon has joined #ruby
mikepack has joined #ruby
duosrx has quit [Ping timeout: 246 seconds]
<yxhuvud>
or make certain it doesn't look like that in the first place.
<jimeh>
or that, yeah :)
duosrx has joined #ruby
<platzhirsch>
ok good, for the time being that is ok. But I really have to fix that issue on the side of the data provider
baroquebobcat has joined #ruby
duosrx has quit [Remote host closed the connection]
chipotle has joined #ruby
beiter_ has joined #ruby
D4T has joined #ruby
beiter has quit [Ping timeout: 276 seconds]
beiter_ is now known as beiter
oneirophren has joined #ruby
baroquebobcat has quit [Ping timeout: 256 seconds]
jrq has joined #ruby
baroquebobcat has joined #ruby
mengu has joined #ruby
motto has joined #ruby
etcetera has joined #ruby
Skofo has joined #ruby
sambio has quit []
mercwithamouth has joined #ruby
m8 has quit [Ping timeout: 256 seconds]
br4ndon has quit [Ping timeout: 245 seconds]
jgrevich has joined #ruby
LS\MFT has quit [Quit: Leaving]
Hanmac has joined #ruby
skattyadz has joined #ruby
mengu has quit [Ping timeout: 252 seconds]
pioz has joined #ruby
br4ndon has joined #ruby
senryu has joined #ruby
jeebster has quit [Quit: Leaving.]
elaptics is now known as elaptics`away
dmiller has joined #ruby
yojimbo_ has quit [Ping timeout: 264 seconds]
rsahae has quit [Quit: rsahae]
io_syl has quit [Ping timeout: 252 seconds]
etcetera has quit []
<davidcelis>
How do I get rubygems to stop telling me that it's "Upgraded http://rubygems.org to HTTPS" every time I gem install on 2.0.0-p0?
carlyle has quit [Ping timeout: 245 seconds]
mando has joined #ruby
grenierm_ has joined #ruby
<davidcelis>
Nevermind
timonv has joined #ruby
carlyle has joined #ruby
pyrac has quit [Quit: pyrac]
jonathanwallace1 has quit [Quit: WeeChat 0.3.9.2]
ioNull has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
wesside is now known as wes|away
tevio has joined #ruby
yojimbo_ has joined #ruby
amal has left #ruby [#ruby]
arietis has joined #ruby
ngcazz has quit [Ping timeout: 245 seconds]
jeebster has joined #ruby
jgrevich has quit [Remote host closed the connection]
io_syl has joined #ruby
pyrac has joined #ruby
jgrevich has joined #ruby
Proshot has joined #ruby
etcetera has joined #ruby
anonymuse has quit [Quit: Leaving...]
cr3 has joined #ruby
<cr3>
how can I run tests from just one *_spec.rb file from the rspec command line? I've tried using the -p option but it doesn't seem to filter as I expected
Arzaga has quit [Quit: Computer has gone to sleep.]
<MrZYX>
rspec path/to/file.rb
<shevy>
MrZYX can you turn left to right so I can call you MrXYZ pls
<MrZYX>
no
bradhe has quit [Remote host closed the connection]
<shevy>
:(
<MrZYX>
that would be too easy
<MrZYX>
for you
grenierm_ has left #ruby [#ruby]
<shevy>
but I dont wanna flip my monitor...
DonRichie has quit [Read error: Connection reset by peer]
<cr3>
MrZYX: that returns an uninitialized constant error, probably because spec/spec_helper.rb is not being loaded
wedgeV has joined #ruby
<MrZYX>
yup, it's good pratice to do that at the top of ever spec file
<MrZYX>
afaik
<MrZYX>
*every
sambao21 has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
wsterling has joined #ruby
momomomomo has quit [Quit: momomomomo]
at-912 has joined #ruby
brotspinne has quit [Quit: brotspinne]
jrq has left #ruby [#ruby]
nazty has quit [Read error: Connection reset by peer]
dayepa__ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
robert__ has joined #ruby
robert__ has joined #ruby
dayepa__ has joined #ruby
nazty has joined #ruby
JStoker has quit [Ping timeout: 246 seconds]
adkron has quit [Ping timeout: 276 seconds]
wgosling has quit [Quit: Konversation terminated!]
skattyadz has quit [Quit: skattyadz]
forlin has quit [Remote host closed the connection]
JStoker has joined #ruby
sambao21 has joined #ruby
beiter_ has joined #ruby
bradhe has joined #ruby
beiter has quit [Ping timeout: 264 seconds]
beiter_ is now known as beiter
ph^ has joined #ruby
robert_ has quit [Ping timeout: 258 seconds]
btaitelb has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
keymone has quit [Quit: keymone]
Bastiano_84 has joined #ruby
Bastiano_84 has left #ruby [#ruby]
niceguyjames has quit [Quit: Computer has gone to sleep.]
tomzx_mac has joined #ruby
sambao21 has quit [Client Quit]
_bart has joined #ruby
chessguy has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
adkron has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
emmanuelux has joined #ruby
chipotle has quit [Quit: cya]
JonnieCache has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
Arzaga has quit [Quit: Computer has gone to sleep.]
pcarrier has joined #ruby
rsahae has joined #ruby
rakl has quit [Quit: sleeping]
niceguy1234 has joined #ruby
callmeivan has quit [Remote host closed the connection]
callmeivan has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
gearaholic has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 260 seconds]
khismetix has joined #ruby
Rumsteak has quit [Ping timeout: 252 seconds]
cbot_ has joined #ruby
sambao21 has joined #ruby
nick_h has quit [Ping timeout: 252 seconds]
sambao21 has quit [Client Quit]
yankeefan04 has joined #ruby
nick_h has joined #ruby
Rumsteak has joined #ruby
<yankeefan04>
I am no longer able to install gems from my user and keep getting ERRNO::EACCES: Permission Denied, Is there a way to delete/uninstall all the ruby stuff i have on my computer and start a fresh?
carlyle_ has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
mahmoudi_ has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
astegman has joined #ruby
mahmoud__ has joined #ruby
mahmoudimus has quit [Ping timeout: 256 seconds]
senryu has quit [Quit: WeeChat 0.3.7]
wes|away has quit [Quit: Ice cream truck!]
synthetix has quit [Remote host closed the connection]
wesside has joined #ruby
pandawarrior has joined #ruby
pagios has quit [Ping timeout: 276 seconds]
mahmoudi_ has quit [Ping timeout: 264 seconds]
shock_one has quit [Ping timeout: 245 seconds]
asm89 has joined #ruby
eldariof has quit []
<asm89>
can anyone point me to a source which describes what the @@ syntax means in a class? Googling for "@@" is quite hard
dmiller has quit [Remote host closed the connection]
<MrZYX>
google for class variables
reset has joined #ruby
nomenkun_ has joined #ruby
<asm89>
MrZYX: thank you, I got some hits that should help me out
<asm89>
cheers
sambao21 has joined #ruby
dmiller has joined #ruby
Eising has left #ruby [#ruby]
JMcAfreak has joined #ruby
TheFuzzball has joined #ruby
bradhe has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 240 seconds]
hmarr has joined #ruby
bradhe has joined #ruby
niklasb has joined #ruby
chandankumar has quit [Quit: Leaving]
<TTilus>
asm89: theres a catch you should be aware of
yalue has quit [Read error: Connection reset by peer]
jjbohn|afk is now known as jjbohn
<TTilus>
asm89: @@var lives in the module/class context where it is introduced, @var lives in the context of what self is
Lord_Daedra has joined #ruby
<asm89>
TTilus: ah ok :) so if @@ is defined and you create a new intance of the class it will use the same value?
<tylersmith>
afaict from the ruby source, it compares object_ids, which obviously change. Is there a better way than comparing the names of the classes?
<Spooner>
tylersmith, Well, you are deleting the original class and creating a new one. So they are in no way the same (any more than if you say A = Class.new; A = Class.new they are the same thing).
<workmad3>
tylersmith: or if you do, make sure the entire environment is cleaned
<banisterfiend>
tylersmith: you could compare the method tables
<banisterfiend>
tylersmith: or faster, you could compare the source_location of a specific method
slainer68 has joined #ruby
<tylersmith>
I understand they aren't really the same thing, i'm just trying to find a way to fix some stuff breaking in an env where things are reloaded
<apeiros>
some things just can't be done. hard to accept with a permissive language like ruby.
wsterling has quit [Remote host closed the connection]
<Spooner>
tylersmith, Mutations doesn't seem like a good idea. If you want to change Class behaviour, use wrappers, then change the wrapped objects. Much simpler in many ways!
m8 has quit [Ping timeout: 252 seconds]
<tylersmith>
we made mutations so we're definitely stuck using it ;)
<tylersmith>
I'll look into better ways of dealing with it, thanks for the suggestions guys
jnoob22 has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
lele has quit [Ping timeout: 246 seconds]
heliumsocket has quit [Client Quit]
EPIK has joined #ruby
pyrac has quit [Quit: pyrac]
sebastianb has quit [Ping timeout: 246 seconds]
jcrawford has quit [Ping timeout: 246 seconds]
stef_204 has joined #ruby
lewix has quit [Remote host closed the connection]
schickung has joined #ruby
beiter_ has joined #ruby
lele has joined #ruby
mityaz has quit [Quit: See ya!]
mmitchell has quit [Read error: Connection reset by peer]
chrishough has quit [Quit: chrishough]
tealmage has joined #ruby
ephemerian has joined #ruby
mmitchell has joined #ruby
basex has joined #ruby
beiter has quit [Ping timeout: 264 seconds]
beiter_ is now known as beiter
ph^ has quit [Remote host closed the connection]
drakedouay has quit [Quit: leaving]
undersc0re97 has quit [Quit: Leaving]
itechjunkie has joined #ruby
undersc0re97 has joined #ruby
hormigas has joined #ruby
BizarreCake has quit [Quit: Leaving]
v0n has quit [Quit: WeeChat 0.4.0]
<hormigas>
is there a difference between an assignment like "x0 = x1" and "x0 = x1;" ? Is the ; doing anything when the assignments are on separate lines?
Mattix has joined #ruby
<hormigas>
I'm looking at some of the sciruby code, because I wouldn't mind adding some new functions, but I'm not sure if there is a reason they ended so many lines with semi-colons as I'm new to ruby
rippa has quit [Ping timeout: 240 seconds]
jcrawford has joined #ruby
yankeefan04 has quit [Remote host closed the connection]
<apeiros>
hormigas: ; is treated the same as a newline in that case
<apeiros>
i.e. if the whole line is `x0 = x1;`, then the ; is pointless
jjbohn|afk is now known as jjbohn
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros>
probably code written by a ruby novice
wsterling has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
Guest24711 has quit [Quit: Computer has gone to sleep.]
<hormigas>
that's what I thought, but I just wanted to make sure. Thanks.
wsterling has joined #ruby
AndChat| has joined #ruby
rolton has quit [Quit: Konversation terminated!]
kpshek has joined #ruby
sambao21 has joined #ruby
unflores has joined #ruby
<Hanmac>
hormigas: ; is used when you want to write multible ruby commands in one line
tealmage has quit [Remote host closed the connection]
Bish has quit [Ping timeout: 245 seconds]
robert__ is now known as robert_
yshh has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
baphled_ has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
choobie has quit [Remote host closed the connection]
hemanth has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
spacebug has quit [Read error: Connection reset by peer]
spacebug has joined #ruby
Bish has joined #ruby
sprites has joined #ruby
iphands_ has joined #ruby
pioz has joined #ruby
mmercer is now known as Daemoen
k3rn3lito has quit [Ping timeout: 245 seconds]
iphands_ has quit [Client Quit]
k3rn3lito has joined #ruby
irrationalfab has quit [Remote host closed the connection]
sprites has quit [Client Quit]
baphled has joined #ruby
chrishough has joined #ruby
DonRichie has quit [Ping timeout: 264 seconds]
pioz has quit [Client Quit]
gaahrdner has quit [Remote host closed the connection]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
gaahrdner has joined #ruby
jdunck has quit [Read error: Operation timed out]
ckrailo has quit [Ping timeout: 276 seconds]
s2013 has joined #ruby
<s2013>
hi im trying to create a function to find prime numbers but its not working properly. http://paste.ubuntu.com/5711562/ i get true for all odd numbers
codecop has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
jdunck has joined #ruby
ckrailo has joined #ruby
freerobby has quit [Quit: Leaving.]
<s2013>
can anyone take a look?
lewix has joined #ruby
gaahrdner has quit [Ping timeout: 258 seconds]
<ericwood>
first of all, do (2..n).each do |i| instead of those for loops
<s2013>
ok
<s2013>
any reason why?
<ericwood>
it's more idiomatic ruby
<ericwood>
we don't use for loops
<s2013>
oh ok
<s2013>
yeah im used to for loops mostly
<s2013>
but okay i changed it
<ericwood>
we tend to think in lambdas and closures
<s2013>
but isnt my logic correct or atleast im thinking the right way?
<ericwood>
another thing, you can do things like "return false if n % 2 == 0"
<s2013>
true
<injekt>
Ruby has a Prime class in stdlib
khismetix has quit [Ping timeout: 258 seconds]
<s2013>
i want to create the function myself. im just practicing
<injekt>
ah ok
Morkel has quit [Quit: Morkel]
Morkel has joined #ruby
<s2013>
i figured m y logic was correct.. basically it loops through the numbers and if its divisible it returns false
TomJ has joined #ruby
<injekt>
def prime?(x); 2.upto(x) {|n| return false if x % n == 0 }; true; end
average has joined #ruby
schickung has quit [Quit: schickung]
<ericwood>
nice
average has left #ruby [#ruby]
<ericwood>
that's more of the brute force way
<s2013>
whats wrong with what i have though?
<s2013>
isnt it essentially the same thing?
pkill has joined #ruby
<ericwood>
his is much more compact
<s2013>
no i mean the logic
<injekt>
your loop will return on the first instance
<Hanmac>
injekt & ericwood use 3.step(x/2,2).none? {|n| x % n == 0}
<injekt>
so 2..n makes no sense, because you return in the first hit
<injekt>
Hanmac: :D
<s2013>
injekt so for mine how would i fix it without using what you have
<injekt>
s2013: so you want the return true outside of the loop
wsterling has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
sylvinus has quit [Quit: sylvinus]
<ericwood>
I wasn't aware of .step
<ericwood>
there keep on being more and more awesome enumerable other things I forget
veinofstars has quit [Remote host closed the connection]
<injekt>
Hanmac: I'm pretty sure if I took the time I could understand every part of it
<ericwood>
I haven't seen blocks with * and & before
akashj87 has joined #ruby
<injekt>
I'm not sure why you would be pleased with thinking your code was unreadable by others
<lewix>
Hanmac: I only know ruby
<Hanmac>
lewix: it is ruby ;P
<ericwood>
Hanmac: tell me more about splats and & in blocks...
<ericwood>
I've only seen those in args
<injekt>
ericwood: you can splat args in block vars, same as blocks
<ericwood>
neat
<ericwood>
but &?!
<lewix>
looks like complicated C
_nitti has quit [Remote host closed the connection]
Iszak has joined #ruby
<lupine>
no, that's pretty standard ruby
chandankumar has quit [Quit: Leaving]
<injekt>
^
<injekt>
very standard ruby
<Hanmac>
lewix: this is my ruby code ... you dont want to see my C code ;P
<s2013>
weird, still not working
<lewix>
I'm just teasing
<lupine>
it is very clear and if you don't understand it, you don't understand ruby ^^
jlast has quit [Remote host closed the connection]
<lewix>
oh my god
<lewix>
are you that slow
<lewix>
Hanmac: its definitely a bit advance for me at this point in time = )
<cr3>
how can I express a variable in a string, with #{foo} for example, so that it looks like true (without quotes) when the variable is a boolean and looks like 'true' (with quotes, single or double doesn't matter) when the variable is a string?
tealmage has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
schickung has joined #ruby
angusiguess has joined #ruby
nfk has quit [Quit: yawn]
rsahae has joined #ruby
jjbohn has joined #ruby
Morkel has quit [Quit: Morkel]
<apeiros>
s2013: ruby convention: def prime?, not isPrime
schickung has quit [Client Quit]
<apeiros>
also, if you insist on the `is` prefix: is_prime, not isPrime
tealmage has joined #ruby
<apeiros>
2..n-1 --> 2...n
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
forrest has quit [Quit: Leaving]
Kruppe has quit [Ping timeout: 276 seconds]
<AndChat|>
Apeiros are you bored with this life
Iszak has quit [Quit: Computer has gone to sleep.]
<s2013>
true. k i fixed it
<s2013>
so i have def prime?(n)
<s2013>
that works?
<apeiros>
yes
kenneth has quit [Quit: kenneth]
<apeiros>
? is valid as the last char of a method name.
<apeiros>
obj.is_a?(Object), obj.respond_to?(:class) etc.
<s2013>
no it wasnt a question
<s2013>
i mean it was
<s2013>
but i mean i know it works. i mean is that ok. i know you could put ?
<apeiros>
yes. your method is a boolean query.
<apeiros>
which usually warrants a ? method
skattyadz has joined #ruby
enebo has quit [Quit: enebo]
generalissimo has quit [Remote host closed the connection]
<Xeago>
apeiros: up for a quick game?
<Xeago>
am platinum again, w/l ratio: .2
<apeiros>
Xeago: oh, congrats
interactionjaxsn has quit [Ping timeout: 258 seconds]
<s2013>
how do you compile ruby code into binary?
<apeiros>
no, not today @ game
<Xeago>
had 3 wins total
<Xeago>
ok
awarner_ has quit [Read error: Connection reset by peer]
<Xeago>
quite late already
<Xeago>
got my proper gear again
niklasb has quit [Read error: Operation timed out]
<apeiros>
!
<apeiros>
cool :)
mikeg has joined #ruby
<Xeago>
but am not having a vibe on the current gameplay
havenwood has quit [Remote host closed the connection]
wolcanus has quit [Ping timeout: 246 seconds]
angusiguess has quit [Ping timeout: 256 seconds]
awarner has joined #ruby
<apeiros>
wed/thu are probably ok to play
DaltonUS has quit [Quit: DaltonUS]
<Xeago>
keep being incoherent within myself
<Xeago>
ok cool!
<Xeago>
s2013: it is usually not done
bluOxigen has quit [Read error: Connection reset by peer]
davetherat has quit [Remote host closed the connection]
<Xeago>
there are some options to do it but I discourage its use
davetherat has joined #ruby
pandawarrior has quit [Read error: Connection reset by peer]
astegman has quit [Quit: Out of time]
bluOxigen has joined #ruby
pandawarrior has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
ph^ has joined #ruby
<Xeago>
ocra and releasy were mentioned earlier this week
kpshek has quit [Ping timeout: 264 seconds]
alanp has quit [Quit: No Ping reply in 180 seconds.]
alanp_ has joined #ruby
tmiller has quit [Remote host closed the connection]
Guedes has quit [Excess Flood]
timmow has quit [Read error: Connection reset by peer]
ffranz has quit [Excess Flood]
skattyadz has quit [Quit: skattyadz]
jenrzzz has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has quit [Excess Flood]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
ffranz has joined #ruby
Emmanuel_Chanel has joined #ruby
<AndChat|>
Apeiros do you do erotic cam chat with men?
AndChat| was kicked from #ruby by apeiros [off topic]
kpshek has joined #ruby
<apeiros>
was that banister?
backjlack has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
iamjarvo has quit [Quit: Leaving.]
freeayu has joined #ruby
mahmoudi_ has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
<Xeago>
you call that off topic?
jenrzzz has joined #ruby
hiroyuki has quit [Ping timeout: 256 seconds]
Proshot has quit [Quit: Leaving]
<Xeago>
could be banister
<Xeago>
it is in northern part of netherlands
<Xeago>
which is about where banister lives
mahmoudimus has quit [Ping timeout: 252 seconds]
NAYENA has quit [Quit: Leaving.]
f0ster is now known as Oxdeadbeef
Oxdeadbeef is now known as f0ster
kpshek has quit []
<apeiros>
he's probably on drugs again…
<apeiros>
well, I should get some sleep
<apeiros>
n8 all
jnoob22 has joined #ruby
<Xeago>
take care
cr3 has quit [Quit: leaving]
niklasb has joined #ruby
cbot_ has quit [Ping timeout: 258 seconds]
timmow has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
genta has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
jarred has joined #ruby
halfie has quit [Ping timeout: 240 seconds]
csexton has quit [Ping timeout: 240 seconds]
franks2_ has quit [Ping timeout: 240 seconds]
<jarred>
If I call an asynchronous method from a background worker, does that mess things up? Does the background worker just wait for the method to finish? Does it continue onto the next job and kill the asynchronous method? What happens?
cmarques has quit [Ping timeout: 256 seconds]
maetthew- has quit [Ping timeout: 240 seconds]
<Xeago>
jarred: how are you calling it asynchronous
WanderingGlitch has quit [Ping timeout: 240 seconds]
RORgasm has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 276 seconds]
csexton has joined #ruby
genta has joined #ruby
WanderingGlitch has joined #ruby
mikepack has quit [Remote host closed the connection]
halfie has joined #ruby
frem has joined #ruby
pandawarrior has quit [Quit: Leaving.]
maetthew has joined #ruby
franks2 has joined #ruby
<jarred>
The delayed job would be polling an API using Weary (https://github.com/mwunsch/weary), which performs requests asynchronously
<jarred>
I'm not 100% sure how it does that, but I can just read the code for it
_nitti has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
<Xeago>
jarred: question is, why would you want workers async?
<Xeago>
you make workers to offload it
<Xeago>
when it is offloaded you want the load to happen in the worker
<Xeago>
therefore it diminishes the usecases for further asynchrony calls within a single worker
<Xeago>
if you would want further asynchrony in a single worker I would suggest looking at what a single worker does, and maybe splitting that up in multiple steps
<Xeago>
will keep it more maintainable and scalable
<jarred>
Yeah, that's the source of my confusion. I want to periodically poll, and this library looks really nice. But, since I want to periodically poll, I figured a background worker would be ideal
bean__ has quit [Quit: Computer has gone to sleep.]
<Xeago>
jarred: have a look at what the #perform method does in Weary
<jarred>
(since this is async though, the background worker would only have utility for the "periodic" part, rather than running in a process separate from the application server)
<Xeago>
gives you a way of keeping track of a result that is not there yet
<jarred>
ah I see
alvaro_o has quit [Quit: Ex-Chat]
<Xeago>
doesn't really do all that much in perform
threesome has joined #ruby
<Xeago>
you could create Weary::Response.new yourself
<jarred>
Yeah, I can just monkey patch it
Rumsteak has quit [Quit: Rumsteak]
oneirophren has quit [Ping timeout: 256 seconds]
<jarred>
thanks for your help!
<Xeago>
give it a sec
<Xeago>
have a look at the future gem
pitzips has quit [Ping timeout: 276 seconds]
<jarred>
okay
<Xeago>
maybe that has a way to make it blocking
AndChat| has joined #ruby
uris has quit [Ping timeout: 256 seconds]
rsahae has quit [Quit: rsahae]
mercwithamouth has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
pcarrier has quit [Ping timeout: 248 seconds]
<Xeago>
kinda dirty of Weary to not expose a blocking interface
Iszak has joined #ruby
<Xeago>
kind find something in the future gem tho
<Xeago>
doubt you would need to make a request object tbh
f0ster has quit [Ping timeout: 264 seconds]
undersc0re97 has quit [Quit: Leaving]
rsahae has joined #ruby
roll_ has joined #ruby
<jarred>
It just runs the block on a different thread and returns the result. Before the result is returned, it returns the future block (a Promise object).
xclite has quit [Remote host closed the connection]
<Xeago>
yes, why make a request?
pcarrier has joined #ruby
roll_ has quit [Client Quit]
<Xeago>
you just want the Response right?
mahmoudimus has joined #ruby
zmanfx has quit [Ping timeout: 245 seconds]
<Xeago>
you are probably altering the request object I suppose
<Xeago>
makes a bit of sense then
vlad_starkov has quit [Ping timeout: 264 seconds]
<Xeago>
yea, I'd monkey patch it
undersc0re97 has joined #ruby
<Xeago>
either make a method-scoped future that just does a tap
<Xeago>
(e.g. passes through)
<Xeago>
or snip the 4 lines from within the future
mercwithamouth has joined #ruby
mahmoudi_ has quit [Ping timeout: 252 seconds]
zmanfx has joined #ruby
tevio has quit [Remote host closed the connection]
<jarred>
Yeah, I think I'll just monkey patch it so the "perform" method takes an option (:async), and when it's async, it calls itself wrapped in a future block
<Xeago>
fair enough
rsahae has quit [Ping timeout: 245 seconds]
MrZYX is now known as MrZYX|off
freeayu has quit [Ping timeout: 264 seconds]
<Xeago>
think that is a better solution if you want to keep perform