00:01
raul782_ has joined #ruby
00:01
raul782_ has quit [Remote host closed the connection]
00:02
raul782_ has joined #ruby
00:02
cagomez has joined #ruby
00:04
raul782 has quit [Ping timeout: 240 seconds]
00:10
knight33 has joined #ruby
00:11
thy0 has joined #ruby
00:12
SeepingN_ is now known as SeepingN
00:19
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
00:24
bmurt has joined #ruby
00:27
raul782_ has quit []
00:27
<
nfk >
the code i'm writing looks so evil i'm glowing from the lovecraftian glee
00:28
<
SeepingN >
is it indented to look like a pentagram or something?
00:28
<
nfk >
no, that will be for another time but it took two irb instances and hours to prototype
00:29
<
nfk >
this is one part of the prototype code: (h.method :fetch).call(:home).method(:merge!).call(test: {})
00:29
<
nfk >
and this is another: p.ascend.inject([]) { |a, e| p a << e.basename.to_s }.reverse
00:29
<
nfk >
i should feel bad about my actions, right?
00:30
sameerynho has quit [Ping timeout: 252 seconds]
00:31
cagomez has quit [Remote host closed the connection]
00:32
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:32
* nfk
does the Burns gesture as they contemplate how to iterate on this wretched array
00:36
beeman has joined #ruby
00:38
eckhardt_ has joined #ruby
00:45
xfbs has quit [Quit: afk]
00:49
SeepingN has quit [Quit: The system is going down for reboot NOW!]
00:53
ZzZombo_ has joined #ruby
00:53
weaksauce has joined #ruby
00:56
ZzZombo has quit [Ping timeout: 252 seconds]
00:56
ZzZombo_ is now known as ZzZombo
00:58
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:59
Puffball has quit [Quit: Puffball]
01:05
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:15
Inside has quit [Disconnected by services]
01:17
jottr has joined #ruby
01:21
jottr has quit [Ping timeout: 240 seconds]
01:27
Guest18202 has quit [Ping timeout: 246 seconds]
01:33
JasonO has quit [Excess Flood]
01:35
JasonO has joined #ruby
01:36
lxsameer has joined #ruby
01:40
white_lilies has joined #ruby
01:40
lxsameer has quit [Ping timeout: 245 seconds]
01:42
pskosinski has quit [Ping timeout: 240 seconds]
01:44
pskosinski has joined #ruby
01:45
knight33 has joined #ruby
01:52
jottr has joined #ruby
01:54
<
nfk >
hohoho, it even works if set it to a directory deep in my filesystem hierarchy
01:56
jottr has quit [Ping timeout: 272 seconds]
01:56
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:01
ShekharReddy has joined #ruby
02:06
esrse has joined #ruby
02:12
AJA4350 has quit [Remote host closed the connection]
02:18
cadillac_ has quit [Read error: Connection reset by peer]
02:20
cadillac_ has joined #ruby
02:21
Azure has quit [Read error: Connection reset by peer]
02:22
Azure has joined #ruby
02:29
darkhanb has joined #ruby
02:39
<
knight33 >
How do I install the latest version of Ruby on Ubuntu? apt-get install ruby or ruby-full just installed 1.9. So confused right now.
02:49
white_lilies has quit [Ping timeout: 244 seconds]
02:49
lektrik has joined #ruby
02:51
<
havenwood >
knight33: That's a nice way to get modern Ruby on older Ubuntu.
02:55
<
knight33 >
Alright, I'll give it a shot :)
03:00
cadillac_ has quit [Quit: I quit]
03:00
cadillac_ has joined #ruby
03:05
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
03:06
braincrash has quit [Quit: bye bye]
03:10
braincrash has joined #ruby
03:12
cagomez has joined #ruby
03:17
duderonomy has joined #ruby
03:18
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:18
duderonomy has quit [Client Quit]
03:22
mynameisdebian has joined #ruby
03:23
mynameisdebian has quit [Client Quit]
03:23
knight33 has joined #ruby
03:26
gix has joined #ruby
03:27
RougeR has quit [Ping timeout: 245 seconds]
03:27
<
nfk >
havenwood, wouldn't such an outdated version of ubuntu be long past security updates?
03:36
lxsameer has joined #ruby
03:37
mynameisdebian has joined #ruby
03:37
mynameisdebian has quit [Client Quit]
03:41
lxsameer has quit [Ping timeout: 246 seconds]
03:52
<
havenwood >
nfk: Maybe not an LTS version. Brightbox does backport security fixes if it's an older version of Ruby that you're using.
03:53
jottr has joined #ruby
03:53
tdy has joined #ruby
03:53
<
havenwood >
Ubuntu LTS backports security fixes.
03:54
dellavg_ has joined #ruby
03:55
<
havenwood >
nfk: But yeah, that old of a Ruby should be beyond even LTS EoL...
03:57
<
havenwood >
nfk: Actually, no - 14.04.5 LTS isn't EoL until April 2019.
03:58
<
havenwood >
And that's 1.9.3.
03:58
jottr has quit [Ping timeout: 240 seconds]
04:01
<
nfk >
on one hand it's cool they support stuff for 5 whole years. on the other hand software that old is dreadful
04:02
<
nfk >
the coolest thing you get to play there is the shorthand for defining hashes
04:03
samscam7 has joined #ruby
04:03
cagomez has quit [Remote host closed the connection]
04:03
<
samscam7 >
Would anyone know which direction to point me to to try and figure out why `binding.pry` wont break my app?
04:03
<
nfk >
speaking of dreadful software, i got to listing folders right below sysroot in sinatra, which i can't say about the tk GUI
04:03
<
Radar >
samscam7: ?rule0
04:04
<
Radar >
samscam7: Can you show us what you mean?
04:04
pwnd_nsfw has quit [Ping timeout: 244 seconds]
04:05
<
samscam7 >
can u post code snippets in irc?
04:05
<
nfk >
also long overdue good night, everyone
04:05
thy0 has quit [Quit: TTFN]
04:07
<
samscam7 >
I've tried putting it in a couple of places and none of them seem to work
04:07
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
04:07
<
havenwood >
samscam7: Don't put it in backticks.
04:07
<
al2o3-cr >
why the backticks?
04:08
<
samscam7 >
i thought i saw it like that in the wiki
04:08
<
havenwood >
samscam7: Backticks mean, "this is code."
04:09
<
havenwood >
samscam7: Actually using the backticks in the context you did will call the Kernel#` method and shell out.
04:09
<
samscam7 >
but it hasn't
04:10
<
havenwood >
samscam7: Just plain 'ole: binding.pry
04:10
<
havenwood >
samscam7: Is that supposed to be lower case `def create`? You have `def Create`, which looks wrong.
04:10
<
havenwood >
samscam7: Method names are generally snake_case.
04:11
<
samscam7 >
there is prob so much wrong with this
04:11
<
samscam7 >
im scared
04:11
<
havenwood >
samscam7: I suspect the #create method is getting called, not #Create - so it never shelled out to give you: #!> Errno::ENOENT: No such file or directory - binding.pry
04:11
ShekharReddy has quit [Quit: Connection closed for inactivity]
04:12
<
havenwood >
samscam7: Lowercase the method name and get rid of the backticks and see what happens.
04:14
<
samscam7 >
ok one seconf
04:17
<
samscam7 >
ok so that fixed my first error
04:17
<
samscam7 >
but now i have a new one
04:18
hey_YOU has joined #ruby
04:19
<
havenwood >
hey_YOU: hey you
04:20
esrse has quit [Ping timeout: 252 seconds]
04:22
<
hey_YOU >
I am trying out ruby... Andi didn't wantto gt kicked out of ##linux. heh
04:25
esrse has joined #ruby
04:35
lxsameer has joined #ruby
04:36
old_relik has joined #ruby
04:37
<
old_relik >
what is the purpose of having "25px".to_i return 25? isn't that confusing?
04:39
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
04:39
<
al2o3-cr >
old_relik: use Integer() for strict conversion
04:40
lxsameer has quit [Ping timeout: 244 seconds]
04:40
<
old_relik >
I get that, but isn't the other way around broken
04:40
<
al2o3-cr >
old_relik: no
04:40
<
old_relik >
why wouldn't I ever want the conversion to be strict
04:41
dviola has quit [Quit: WeeChat 2.2]
04:41
<
al2o3-cr >
old_relik: read the docs on String#to_i
04:42
<
al2o3-cr >
it will tell you what you need to know.
04:43
<
old_relik >
I did, and I know it mentions that it ignores characters past the end of a valid number
04:43
<
old_relik >
it just seems unintuitive
04:43
<
old_relik >
and a use-case that shouldn't be a standard library especially something calles String#to_i
04:49
<
havenwood >
old_relik: What do you want it to return?
04:50
old_relik has quit [Ping timeout: 252 seconds]
04:53
<
samscam7 >
havenwood your a bloody genius
04:54
dellavg_ has quit [Ping timeout: 252 seconds]
05:02
duderonomy has joined #ruby
05:05
samscam7 has quit [Read error: Connection reset by peer]
05:10
nertzy has quit [Quit: This computer has gone to sleep]
05:12
hey_YOU has quit [Quit: Leaving]
05:16
al2o3-cr has quit [Quit: WeeChat 2.2]
05:18
reber has joined #ruby
05:19
Inline has quit [Quit: Leaving]
05:19
gr33n7007h has joined #ruby
05:24
gr33n7007h is now known as al2o3-cr
05:26
* baweaver
wanders in
05:39
<
icarus >
I'm using sinatra to query endpoints that response in json requests, and need to validate two things: a 200 response and json schema, IE that it send me a json response and not someother html error (to clarify, sinatra will return whatever get /page is handed by response.body)
05:41
<
baweaver >
icarus: You can check the response code, then you could just JSON.parse the output
05:42
<
baweaver >
if it raises an exception, bingo
05:44
<
icarus >
httparty has a neat response.code tidbid
05:44
<
baweaver >
Most HTTP libraries do
05:44
<
icarus >
I still would like to lint test a json response before passing it to a client
05:44
<
baweaver >
lint test?
05:44
<
baweaver >
clarify that
05:44
<
icarus >
Like rubocop .. for json
05:45
<
baweaver >
What are you testing for?
05:46
MoritaShinobu has joined #ruby
05:46
<
icarus >
because ... one can not trust endpoints to do their homework, im getting passed html errors occasionally and it spits out ugly sinatra garbage, thus the wont to test specifically for json, and that it be in a non-erroroneous format
05:47
<
icarus >
^ i want to make SURE its json, if not, fill response with a custom json error
05:48
<
baweaver >
Then that's not linting
05:48
<
baweaver >
That's validation
05:48
<
baweaver >
Just JSON.parse it
05:48
<
Radar >
baweaver: but what if it's HTML
05:48
<
baweaver >
If it raises an exception then it's not valid
05:49
<
baweaver >
>> require 'json'; JSON.parse("<html></html>")
05:49
<
icarus >
thats incredibly lazy, it could be html or xml, i dont want to catch general exceptions, i want to catch valid or non-valid json
05:50
<
baweaver >
That catches non-valid JSON
05:50
<
Radar >
icarus: You won't be catching general exceptions if you do it that way, rescuing JSON::ParserError.
05:51
<
Radar >
Bet you could probably pair that up with a bit of a Result class from dry-monads to have the same API for valid / non-valid responses too.
05:51
<
Radar >
But I am probably suggesting something too fanciful there
05:51
<
baweaver >
Yay lazy
05:52
agent_white has quit [Remote host closed the connection]
05:52
<
icarus >
Ok, i see what you mean by JSON.parse, JSON::ParserError can be a clear exception to watch for
05:54
<
baweaver >
(that said I dislike exceptions in general for flow control like that)
05:55
snickers has joined #ruby
05:55
<
icarus >
all the (this) sinatra endpoint is meant to do act as a microserver to wrap other json endpoints
05:55
jottr has joined #ruby
05:55
<
icarus >
its replacing a bash script using jq/csvkit
05:55
<
baweaver >
I'd likely make a method out of that then
06:03
<
icarus >
I'll figure it out
06:03
jottr has quit [Ping timeout: 244 seconds]
06:04
<
icarus >
one question i really cant get to the bottom of, how to output sprintf without quotes! > p sprintf '%0.8f' % "123"
06:04
apeiros has quit [Remote host closed the connection]
06:09
aupadhye has joined #ruby
06:20
mooe has joined #ruby
06:26
DK2 has joined #ruby
06:27
mark-6 has joined #ruby
06:27
<
baweaver >
don't use sprintf?
06:27
<
baweaver >
>> '%0.8f' % "123"
06:28
<
baweaver >
modulo and sprintf do the same thing
06:28
mark-6 has left #ruby [#ruby]
06:31
tdy has quit [Quit: WeeChat 2.2]
06:34
za1b1tsu has joined #ruby
06:34
johnny56 has quit [Ping timeout: 272 seconds]
06:41
tdy has joined #ruby
06:42
lomex has joined #ruby
06:43
alem0lars has joined #ruby
06:43
<
icarus >
>> ("123").round(8)
06:44
<
icarus >
>> (123).round(8)
06:44
<
icarus >
^ apparently .round will suffice
06:45
<
icarus >
Im so used to thinking in awk/cli terms: | awk '{print sprintf("%0.8f", $1);}'
06:50
Mortomes|Work has joined #ruby
06:58
clemens3 has joined #ruby
07:07
johnny56 has joined #ruby
07:08
mike11 has joined #ruby
07:09
esrse has quit [Ping timeout: 246 seconds]
07:10
esrse has joined #ruby
07:13
sysvalve has joined #ruby
07:16
<
baweaver >
Woo, rebuilding Ruby environment on new mac
07:36
aufi has joined #ruby
07:42
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:52
akem has joined #ruby
07:54
nowhere_man has joined #ruby
07:55
cliluw has quit [Ping timeout: 246 seconds]
07:56
cliluw has joined #ruby
08:05
shadeslayer has quit [Ping timeout: 252 seconds]
08:07
shoogz has quit [Ping timeout: 264 seconds]
08:10
baweaver is now known as baweaver_away
08:10
shadeslayer has joined #ruby
08:10
shoogz has joined #ruby
08:12
xfbs has joined #ruby
08:13
ua has joined #ruby
08:16
xfbs has quit [Client Quit]
08:24
venmx has joined #ruby
08:25
tdy has quit [Ping timeout: 252 seconds]
08:25
lxsameer has joined #ruby
08:30
CustosLiminis is now known as CustosLimen
08:31
chichou has joined #ruby
08:45
mike11 has quit [Ping timeout: 245 seconds]
08:46
RougeR has joined #ruby
08:52
Nicmavr has quit [Read error: Connection reset by peer]
08:52
Beams has joined #ruby
08:54
Nicmavr has joined #ruby
08:55
apeiros has joined #ruby
08:58
Tuor has joined #ruby
08:59
mooe has quit [Quit: Connection closed for inactivity]
09:00
Mike111 has joined #ruby
09:00
RougeR has quit [Ping timeout: 240 seconds]
09:02
NL3limin4t0r has joined #ruby
09:08
mikecmpbll has joined #ruby
09:13
cadillac_ has quit [Ping timeout: 240 seconds]
09:14
alem0lars has quit [Remote host closed the connection]
09:14
RedNifre_ has joined #ruby
09:14
RougeR has joined #ruby
09:16
alem0lars has joined #ruby
09:16
cadillac_ has joined #ruby
09:16
alem0lars has quit [Max SendQ exceeded]
09:17
alem0lars has joined #ruby
09:20
johnny56 has quit [Ping timeout: 272 seconds]
09:22
ur5us has joined #ruby
09:30
<
apeiros >
RougeR: that's my nick, yes. but I'll be offline for ~40min now :)
09:30
apeiros has quit []
09:35
alem0lars has quit [Ping timeout: 244 seconds]
09:37
GodFather has quit [Ping timeout: 272 seconds]
09:41
kapil___ has joined #ruby
09:45
RedNifre_ has quit [Ping timeout: 252 seconds]
09:45
alem0lars has joined #ruby
09:45
alem0lars has quit [Max SendQ exceeded]
09:46
alem0lars has joined #ruby
09:51
johnny56 has joined #ruby
10:00
ur5us has quit [Remote host closed the connection]
10:00
RedNifre_ has joined #ruby
10:07
RedNifre_ has quit [Ping timeout: 246 seconds]
10:07
evdubs has quit [Ping timeout: 252 seconds]
10:09
xfbs has joined #ruby
10:11
evdubs has joined #ruby
10:12
apeiros_ has joined #ruby
10:12
<
apeiros_ >
wow, that was quite precise (40min)
10:12
apeiros_ is now known as apeiros
10:13
tristanp has joined #ruby
10:14
<
TvL2386 >
well, 42min to be exact
10:18
tristanp has quit [Ping timeout: 246 seconds]
10:27
modin has quit [Ping timeout: 276 seconds]
10:29
yohji has joined #ruby
10:29
esrse has quit [Ping timeout: 252 seconds]
10:29
nowhere_man has quit [Ping timeout: 246 seconds]
10:29
esrse has joined #ruby
10:35
jottr has joined #ruby
10:41
esrse has quit [Ping timeout: 245 seconds]
10:42
apparition has joined #ruby
10:44
Tuor has quit [Ping timeout: 245 seconds]
10:56
eman0n has quit [Quit: Connection closed for inactivity]
10:58
evdubs has quit [Remote host closed the connection]
10:58
evdubs has joined #ruby
11:02
RedNifre_ has joined #ruby
11:08
Tuor has joined #ruby
11:12
code_zombie has quit [Quit: Leaving]
11:20
MaiconVieira has joined #ruby
11:20
Mike111 has quit [Ping timeout: 272 seconds]
11:21
mike11 has joined #ruby
11:25
vondruch has quit [Ping timeout: 272 seconds]
11:26
AJA4350 has joined #ruby
11:28
jottr has quit [Ping timeout: 240 seconds]
11:43
Mortomes|Work has quit [Ping timeout: 252 seconds]
11:56
nowhere_man has joined #ruby
11:57
GodFather has joined #ruby
11:59
jottr has joined #ruby
12:04
jottr has quit [Ping timeout: 250 seconds]
12:04
GodFather has quit [Ping timeout: 250 seconds]
12:07
jottr has joined #ruby
12:14
tristanp has joined #ruby
12:19
tristanp has quit [Ping timeout: 240 seconds]
12:19
thy0 has joined #ruby
12:20
GodFather has joined #ruby
12:22
cd has quit [Quit: cd]
12:25
knight33 has joined #ruby
12:27
akem has quit [Read error: Connection reset by peer]
12:28
akem has joined #ruby
12:33
nowhere_man has quit [Ping timeout: 272 seconds]
12:35
venmx has quit [Quit: leaving]
12:36
venmx has joined #ruby
12:42
vondruch has joined #ruby
12:43
IanMalcolm has joined #ruby
12:48
za1b1tsu has quit [Ping timeout: 252 seconds]
12:49
modin has joined #ruby
12:50
IanMalcolm has quit [Ping timeout: 252 seconds]
12:50
RedNifre_ has quit [Ping timeout: 252 seconds]
12:50
marahin has joined #ruby
12:50
GodFather has quit [Ping timeout: 252 seconds]
12:54
modin has quit [Ping timeout: 246 seconds]
12:59
modin has joined #ruby
13:05
apeiros has quit []
13:07
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:08
snickers has quit [Ping timeout: 272 seconds]
13:23
GodFather has joined #ruby
13:28
mike11 has quit [Quit: Leaving.]
13:28
gnufied has quit [Quit: Leaving]
13:29
knight33 has joined #ruby
13:36
Pisuke has joined #ruby
13:36
MyMind has quit [Ping timeout: 272 seconds]
13:39
gnufied has joined #ruby
13:40
nowhere_man has joined #ruby
13:44
TheBloke- is now known as TheBloke
13:50
Rapture has joined #ruby
13:51
nowhere_man has quit [Ping timeout: 240 seconds]
13:52
yohji has quit [Ping timeout: 264 seconds]
13:52
alireza has joined #ruby
13:53
<
alireza >
Hey ammigos
13:53
yohji has joined #ruby
13:53
<
alireza >
I've created a Checkout class
13:53
<
alireza >
which accepts a list of promotions
13:53
<
alireza >
or as you would say promotional rules
13:53
<
alireza >
then I created a Promotion class which has two methods `applicable?` and `apply?`
13:55
<
alireza >
and in Checkout class everytime `total` being called I iterate through promotions
13:55
<
alireza >
and call apply with `items` and `total` passed
13:55
<
alireza >
let me give you an url
13:56
<
alireza >
lxsameer: ping
14:05
za1b1tsu has joined #ruby
14:07
RedNifre_ has joined #ruby
14:08
Cork has quit [Ping timeout: 264 seconds]
14:09
Inside has joined #ruby
14:21
Tuor has quit [Ping timeout: 272 seconds]
14:21
emerson has quit [Quit: leaving]
14:23
GodFather has quit [Ping timeout: 250 seconds]
14:29
alireza has left #ruby ["WeeChat 2.1"]
14:36
Inline has joined #ruby
14:37
Inline has quit [Read error: Connection reset by peer]
14:38
Inline has joined #ruby
14:39
DTZUZO_ has quit [Ping timeout: 252 seconds]
14:40
RedNifre_ has quit [Quit: WeeChat 1.9.1]
14:46
chouhoulis has joined #ruby
14:47
DTZUZO_ has joined #ruby
14:50
desperek has joined #ruby
14:50
bmurt has joined #ruby
14:51
thomasfedb has joined #ruby
14:52
nowhere_man has joined #ruby
14:53
lomex has joined #ruby
14:59
lytol_ has joined #ruby
15:01
aupadhye has quit [Remote host closed the connection]
15:06
apeiros_ has joined #ruby
15:10
cschneid_ has joined #ruby
15:10
cschneid_ has quit [Read error: Connection reset by peer]
15:11
mike11 has joined #ruby
15:11
xfbs has quit [Quit: afk]
15:14
aufi has quit [Quit: Leaving]
15:24
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:26
TomyLobo has joined #ruby
15:37
ivanskie has joined #ruby
15:45
jordanm has joined #ruby
15:49
cagomez has joined #ruby
15:50
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:53
cagomez has quit [Ping timeout: 240 seconds]
15:54
apparition has quit [Quit: Bye]
15:55
cagomez has joined #ruby
15:55
cagomez has quit [Read error: Connection reset by peer]
15:56
cagomez has joined #ruby
15:56
cagomez has quit [Read error: Connection reset by peer]
15:57
cagomez has joined #ruby
15:57
cagomez has quit [Read error: Connection reset by peer]
15:57
cagomez has joined #ruby
15:57
cagomez has quit [Read error: Connection reset by peer]
15:58
cagomez has joined #ruby
15:58
cagomez has quit [Read error: Connection reset by peer]
15:58
cagomez has joined #ruby
15:58
cagomez has quit [Read error: Connection reset by peer]
16:03
sysvalve has quit [Quit: Leaving]
16:04
clemens3 has quit [Ping timeout: 246 seconds]
16:05
snickers has joined #ruby
16:05
MaiconVieira has quit [Quit: Page closed]
16:09
Dbugger has joined #ruby
16:10
kapil___ has quit [Quit: Connection closed for inactivity]
16:12
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:15
pwnd_nsfw has joined #ruby
16:15
tdy1 has joined #ruby
16:18
mike11 has quit [Ping timeout: 252 seconds]
16:23
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:24
apeiros_ has quit []
16:30
alem0lars has quit [Ping timeout: 240 seconds]
16:34
mikecmpbll has quit [Quit: inabit. zz.]
16:35
RougeR has quit [Ping timeout: 252 seconds]
16:38
DTZUZO_ has quit [Ping timeout: 252 seconds]
16:39
eckhardt_ has joined #ruby
16:39
DTZUZO_ has joined #ruby
16:40
AJA4350 has quit [Quit: AJA4350]
16:42
cats has quit [Ping timeout: 240 seconds]
16:43
Beams has quit [Quit: .]
16:46
ineb has joined #ruby
16:51
darkhanb has joined #ruby
16:51
<
ineb >
whats the best way to make a ruby cli project binary include necessary code?
16:52
<
ineb >
i saw $LOAD_PATH.unshift 'lib' which obviously only works if one is inside the project dir
16:52
xfbs has joined #ruby
16:53
<
ineb >
actually, that is what 'bundle gem testbin --bin' does
16:55
RougeR has joined #ruby
16:56
<
ineb >
shouldnt that be '$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"' or something?
16:57
<
ineb >
$LOAD_PATH.unshift 'lib' makes assumptions about the current directory. or am i missing something with bundler here?
16:59
weaksauce has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
17:01
duderonomy has quit [Ping timeout: 245 seconds]
17:02
RougeR has quit [Ping timeout: 244 seconds]
17:03
DTZUZO_ has quit [Ping timeout: 245 seconds]
17:08
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
17:08
yohji has quit [Remote host closed the connection]
17:11
MoritaShinobu has quit [Quit: Leaving]
17:12
jottr has quit [Ping timeout: 244 seconds]
17:12
Fusl has quit [Ping timeout: 256 seconds]
17:16
mikecmpbll has joined #ruby
17:21
<
havenwood >
ineb: In a gem, lib/ should be in your LOAD_PATH, so just: require 'skeleton'
17:22
<
havenwood >
ineb: A simpler way is just: $LOAD_PATH.prepend File.expand_path 'lib',
__dir__
17:23
<
havenwood >
I kinda prefer not being defensive about duplicates in LOAD_PATH, since require should handle that by not loading it twice.
17:24
<
havenwood >
ineb: Use #unshift instead of the nicer-reading #prepend if you need to support earlier than Ruby 2.5.
17:24
<
havenwood >
ineb:
__dir__ was introduced in Ruby 2.0, so I use it broadly
17:24
ShekharReddy has joined #ruby
17:25
<
havenwood >
$LOAD_PATH.unshift File.expand_path 'lib',
__dir__
17:25
<
ineb >
here is where my confusion starts. binaries in bin/ are meant to be called from CLI and like the bundle gem skeleton, i also get `require': cannot load such file -- digest/sip_hash on your gem when calling it via ./bin/siphash
17:25
<
havenwood >
ineb: oh, hah - did I mess up?
17:26
<
havenwood >
ineb: ooooh, you mean when you don't use it as a gem
17:26
tdy1 has quit [Quit: WeeChat 2.2]
17:27
Fusl has joined #ruby
17:27
<
havenwood >
ineb: If you want to be able to execute it without installing the gem, maybe: $LOAD_PATH.unshift File.expand_path '../lib',
__dir__
17:28
<
havenwood >
ineb: Then when you use it as a gem, you'll actually be putting lib in LOAD_PATH twice, so maybe the trick above would be good
17:28
impermanence has joined #ruby
17:28
<
havenwood >
ineb: Or maybe `require_relative`, hmm.
17:29
<
impermanence >
we're having a stupid debate on my team. which is better or more current: rvm or rbenv. I say rvm, the other guy says rbenv. I know it's stupid, but is there a consensus?
17:29
<
havenwood >
impermanence: chruby
17:29
<
impermanence >
ha fudge
17:29
<
ineb >
havenwood: i see. i missed the part where gemspec sets up the load path and provides auto-generated binaries
17:31
nowhere_man has quit [Remote host closed the connection]
17:31
nowhere_man has joined #ruby
17:31
alem0lars has joined #ruby
17:32
jasmith has quit [Ping timeout: 250 seconds]
17:32
RougeR has joined #ruby
17:33
akem__ has joined #ruby
17:33
akem has quit [Remote host closed the connection]
17:36
impermanence has quit [Remote host closed the connection]
17:40
cats has joined #ruby
17:41
chichou has quit [Ping timeout: 250 seconds]
17:41
johnny56 has quit [Ping timeout: 272 seconds]
17:41
SeepingN has joined #ruby
17:42
impermanence has joined #ruby
17:43
impermanence has left #ruby [#ruby]
17:43
impermanence has joined #ruby
17:43
catsed has joined #ruby
17:44
cats has quit [Ping timeout: 245 seconds]
17:44
catsed is now known as cats
17:45
duderonomy has joined #ruby
17:47
lxsameer has quit [Ping timeout: 264 seconds]
17:48
GodFather has joined #ruby
17:48
lxsameer has joined #ruby
17:49
za1b1tsu has quit [Ping timeout: 272 seconds]
17:53
lxsameer has quit [Ping timeout: 240 seconds]
17:56
al2o3-cr has quit [Quit: WeeChat 2.2]
17:57
akem__ has quit [Remote host closed the connection]
17:57
akem__ has joined #ruby
17:58
lxsameer has joined #ruby
18:01
icarus has quit [Ping timeout: 244 seconds]
18:03
lxsameer has quit [Ping timeout: 272 seconds]
18:04
evdubs has quit [Quit: Leaving]
18:04
MaiconVieira has joined #ruby
18:07
johnny56 has joined #ruby
18:08
lxsameer has joined #ruby
18:10
gr33n7007h has joined #ruby
18:11
conta1 has joined #ruby
18:13
icarus has joined #ruby
18:13
evdubs has joined #ruby
18:13
venmx has quit [Ping timeout: 245 seconds]
18:16
lxsameer has quit [Ping timeout: 245 seconds]
18:17
za1b1tsu has joined #ruby
18:17
moei has quit [Quit: Leaving...]
18:18
lxsameer has joined #ruby
18:20
weaksauce has joined #ruby
18:20
deathwishdave has joined #ruby
18:22
conta1 has quit [Quit: conta1]
18:22
za1b1tsu has quit [Ping timeout: 244 seconds]
18:22
apeiros_ has joined #ruby
18:23
lxsameer has quit [Ping timeout: 272 seconds]
18:24
alem0lars has quit [Ping timeout: 240 seconds]
18:27
apeiros_ has quit [Remote host closed the connection]
18:27
icarus has quit [Ping timeout: 245 seconds]
18:27
apeiros_ has joined #ruby
18:28
icarus has joined #ruby
18:28
lxsameer has joined #ruby
18:30
cthulchu has quit [Read error: Connection reset by peer]
18:31
blackmesa has joined #ruby
18:33
lxsameer has quit [Ping timeout: 272 seconds]
18:38
lxsameer has joined #ruby
18:43
lxsameer has quit [Ping timeout: 240 seconds]
18:48
lxsameer has joined #ruby
18:49
krawchyk has joined #ruby
18:51
za1b1tsu has joined #ruby
18:53
lxsameer has quit [Ping timeout: 240 seconds]
18:54
cthulchu has joined #ruby
18:55
za1b1tsu has quit [Ping timeout: 240 seconds]
18:56
jottr has joined #ruby
18:57
<
havenwood >
oops, MT
18:57
akem__ is now known as akem
18:58
lxsameer has joined #ruby
19:00
icarus has quit [Quit: leaving]
19:00
lomex has joined #ruby
19:01
jottr has quit [Ping timeout: 252 seconds]
19:02
weaksauce has quit [Ping timeout: 252 seconds]
19:03
lxsameer has quit [Ping timeout: 244 seconds]
19:06
gr33n7007h is now known as al2o3-cr
19:08
lxsameer has joined #ruby
19:11
oft_gegong has joined #ruby
19:12
<
oft_gegong >
when programming ruby on the web, by default does it use the <% %> brackets to contain the ruby language semantics/syntax?
19:12
<
havenwood >
oft_gegong: That's an ERB thing.
19:13
bmurt has joined #ruby
19:13
<
oft_gegong >
I quit internet searches, what does ERB mean? it depends on the web server configuration?
19:13
lxsameer has quit [Ping timeout: 272 seconds]
19:16
mike11 has joined #ruby
19:18
lxsameer has joined #ruby
19:19
howdoicomputer has joined #ruby
19:19
Sauvin has quit [Ping timeout: 252 seconds]
19:20
howdoicomputer has quit [Client Quit]
19:21
howdoicomputer has joined #ruby
19:21
howdoicomputer has quit [Client Quit]
19:23
lxsameer has quit [Ping timeout: 252 seconds]
19:25
Sauvin has joined #ruby
19:27
za1b1tsu has joined #ruby
19:28
howdoicomputer has joined #ruby
19:28
howdoicomputer has quit [Client Quit]
19:28
howdoicomputer has joined #ruby
19:28
howdoicomputer has quit [Client Quit]
19:28
lxsameer has joined #ruby
19:29
howdoicomputer has joined #ruby
19:31
howdoicomputer has quit [Client Quit]
19:31
howdoicomputer has joined #ruby
19:31
howdoicomputer has quit [Client Quit]
19:32
howdoicomputer has joined #ruby
19:32
Nicmavr has quit [Read error: Connection reset by peer]
19:33
howdoicomputer has quit [Client Quit]
19:33
howdoicomputer has joined #ruby
19:33
lxsameer has quit [Ping timeout: 244 seconds]
19:33
ShekharReddy has quit [Quit: Connection closed for inactivity]
19:34
Nicmavr has joined #ruby
19:35
howdoicomputer has quit [Client Quit]
19:35
howdoicomputer has joined #ruby
19:38
lxsameer has joined #ruby
19:39
siaw23 has joined #ruby
19:40
<
siaw23 >
hi i have an array like this [1, 4, 3, 5, 7, 10] is there a way i can iterate it in pairs like so [1,4], [4,3], [3,5], [5,7], [7,10]
19:41
code_zombie has joined #ruby
19:42
<
al2o3-cr >
siaw23: use each_slice(2)
19:43
<
havenwood >
siaw23: each_cons(2)
19:43
lxsameer has quit [Ping timeout: 244 seconds]
19:43
<
al2o3-cr >
oh, sorry yeah, each_cons(2) my bad ;)
19:43
<
siaw23 >
yeah each_cons is what i was looking for!!!
19:43
<
siaw23 >
havenwood: thank you!!!
19:44
<
havenwood >
siaw23: you're welcome
19:44
<
siaw23 >
al2o3-cr: each_slice is too easy :P trie working with that but knew there was something better
19:44
<
siaw23 >
thanks guys
19:46
cthulchu has quit [Read error: Connection reset by peer]
19:46
akem has quit [Read error: Connection reset by peer]
19:46
akem has joined #ruby
19:47
sanscoeur has joined #ruby
19:47
sanscoeur has quit [Read error: Connection reset by peer]
19:48
<
siaw23 >
havenwood is like one of those guys that have the whole ruby doc inscribed on their brain
19:48
lxsameer has joined #ruby
19:49
<
al2o3-cr >
siaw23: he sure is.
19:50
sanscoeur has joined #ruby
19:53
lxsameer has quit [Ping timeout: 252 seconds]
19:54
cthulchu has joined #ruby
19:58
lxsameer has joined #ruby
20:00
cagomez has joined #ruby
20:00
cagomez has quit [Read error: Connection reset by peer]
20:00
oft_gegong has quit [Quit: Page closed]
20:01
cagomez has joined #ruby
20:01
cagomez has quit [Read error: Connection reset by peer]
20:01
cagomez has joined #ruby
20:01
cagomez has quit [Read error: Connection reset by peer]
20:02
cagomez has joined #ruby
20:02
cagomez has quit [Read error: Connection reset by peer]
20:03
cagomez has joined #ruby
20:03
cagomez has quit [Read error: Connection reset by peer]
20:03
lxsameer has quit [Ping timeout: 272 seconds]
20:04
cagomez has joined #ruby
20:04
cagomez has quit [Read error: Connection reset by peer]
20:05
Dbugger has quit [Remote host closed the connection]
20:07
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:08
lxsameer has joined #ruby
20:13
moei has joined #ruby
20:13
lxsameer has quit [Ping timeout: 272 seconds]
20:16
tdy has joined #ruby
20:18
lxsameer has joined #ruby
20:19
reber has quit [Remote host closed the connection]
20:21
MaiconVieira has quit [Quit: Page closed]
20:22
jottr has joined #ruby
20:23
lxsameer has quit [Ping timeout: 246 seconds]
20:26
tdy1 has joined #ruby
20:27
tdy has quit [Ping timeout: 246 seconds]
20:27
jottr has quit [Ping timeout: 252 seconds]
20:28
savolla has joined #ruby
20:28
lxsameer has joined #ruby
20:31
TheBloke has quit [Ping timeout: 244 seconds]
20:33
lxsameer has quit [Ping timeout: 240 seconds]
20:38
lxsameer has joined #ruby
20:39
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:43
lxsameer has quit [Ping timeout: 240 seconds]
20:43
tdy1 has quit [Ping timeout: 252 seconds]
20:44
venmx has joined #ruby
20:47
blackmesa has quit [Ping timeout: 250 seconds]
20:47
blackmesa has joined #ruby
20:49
desperek has quit [Quit: xoxo]
20:50
tdy1 has joined #ruby
20:50
za1b1tsu has quit [Ping timeout: 240 seconds]
20:52
tdy1 is now known as tdy
20:52
jaequery has joined #ruby
20:55
savolla has quit [Quit: Lost terminal]
20:59
jottr has joined #ruby
21:04
weaksauce has joined #ruby
21:04
jottr has quit [Ping timeout: 240 seconds]
21:04
cd has joined #ruby
21:06
ur5us has joined #ruby
21:06
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:07
akem has quit [Read error: Connection reset by peer]
21:08
akem has joined #ruby
21:11
roshanavand has joined #ruby
21:16
venmx has quit [Ping timeout: 252 seconds]
21:16
ur5us has quit [Read error: Connection reset by peer]
21:18
lytol_ has quit [Remote host closed the connection]
21:19
cadillac_ has quit [Read error: Connection reset by peer]
21:19
jottr has joined #ruby
21:23
cadillac_ has joined #ruby
21:23
Jakoonce has joined #ruby
21:24
krawchyk has quit [Quit: krawchyk]
21:25
jottr has quit [Ping timeout: 245 seconds]
21:25
samort7 has quit [Ping timeout: 240 seconds]
21:25
tdy1 has joined #ruby
21:26
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:28
tdy has quit [Ping timeout: 252 seconds]
21:28
GodFather has quit [Ping timeout: 245 seconds]
21:31
howdoicomputer has quit [Quit: WeeChat 2.2]
21:51
venmx has joined #ruby
21:52
TomyLobo has quit [Read error: Connection reset by peer]
21:54
jottr has joined #ruby
21:57
cadillac_ has quit [Quit: I quit]
21:59
jottr has quit [Ping timeout: 272 seconds]
21:59
mike11 has quit [Read error: Connection reset by peer]
22:01
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:02
tdy1 is now known as tdy
22:03
eckhardt_ has joined #ruby
22:04
impermanence has quit [Ping timeout: 244 seconds]
22:04
blackmesa has quit [Ping timeout: 252 seconds]
22:05
blackmesa has joined #ruby
22:06
Sembei has joined #ruby
22:07
venmx has quit [Ping timeout: 245 seconds]
22:07
eckhardt_ has quit [Client Quit]
22:08
blackmesa1 has joined #ruby
22:08
Pisuke has quit [Ping timeout: 272 seconds]
22:09
ndr0s has joined #ruby
22:10
blackmesa has quit [Ping timeout: 252 seconds]
22:10
code_zombie has quit [Quit: Leaving]
22:10
ndr0s has quit [Quit: WeeChat 1.6]
22:13
eckhardt_ has joined #ruby
22:16
agent_white has joined #ruby
22:16
nine_milli_ has joined #ruby
22:16
<
nine_milli_ >
is php better than ruby?
22:18
AJA4350 has joined #ruby
22:19
chouhoulis has quit [Ping timeout: 246 seconds]
22:20
venmx has joined #ruby
22:21
sdegutis has joined #ruby
22:21
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:21
sdegutis has left #ruby [#ruby]
22:22
<
al2o3-cr >
nine_milli_: what's php?
22:24
<
apeiros_ >
probably one of those newfangled javascript frameworks
22:25
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:29
mikecmpbll has quit [Quit: inabit. zz.]
22:30
mikecmpbll has joined #ruby
22:31
weaksauce has quit [Ping timeout: 240 seconds]
22:33
xfbs has quit [Quit: afk]
22:35
tdy has quit [Ping timeout: 245 seconds]
22:36
al2o3-cr has quit [Quit: WeeChat 2.2]
22:37
gr33n7007h has joined #ruby
22:37
gr33n7007h is now known as al2o3-cr
22:38
DTZUZO_ has joined #ruby
22:42
mikecmpbll has quit [Quit: inabit. zz.]
22:44
sameerynho has joined #ruby
22:44
sameerynho is now known as Guest61135
22:45
eckhardt_ has joined #ruby
22:47
nine_milli_ has quit [Ping timeout: 244 seconds]
22:48
eckhardt_ has quit [Client Quit]
22:48
Guest61135 has quit [Ping timeout: 244 seconds]
22:54
Sauvin has quit [Ping timeout: 240 seconds]
22:54
eckhardt_ has joined #ruby
23:00
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:02
eckhardt_ has joined #ruby
23:04
Sauvin has joined #ruby
23:14
venmx has quit [Ping timeout: 246 seconds]
23:14
mynameisdebian has joined #ruby
23:16
mynameisdebian has quit [Client Quit]
23:17
RougeR has quit [Ping timeout: 264 seconds]
23:17
kujira has joined #ruby
23:23
fluxAeon has joined #ruby
23:24
mynameisdebian has joined #ruby
23:25
mynameisdebian has quit [Client Quit]
23:27
sanscoeu_ has joined #ruby
23:29
evdubs_ has joined #ruby
23:31
sanscoeur has quit [Ping timeout: 264 seconds]
23:33
evdubs has quit [Ping timeout: 252 seconds]
23:36
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:39
TheBloke has joined #ruby
23:41
mynameisdebian has joined #ruby
23:43
mynameisdebian has quit [Remote host closed the connection]
23:44
zapata has quit [Ping timeout: 252 seconds]
23:44
blackmesa has joined #ruby
23:46
blackmesa1 has quit [Ping timeout: 240 seconds]
23:48
<
baweaver_away >
Aw, they left.
23:48
baweaver_away is now known as baweaver
23:49
blackmesa has quit [Ping timeout: 252 seconds]
23:51
sanscoeu_ has quit [Remote host closed the connection]
23:53
SeepingN has quit [Quit: The system is going down for reboot NOW!]
23:54
Tempesta has quit [Quit: See ya!]
23:54
jottr has joined #ruby
23:55
zapata has joined #ruby
23:59
darkhanb has joined #ruby
23:59
jottr has quit [Ping timeout: 240 seconds]