apeiros has quit [Remote host closed the connection]
avelldiroll has quit [Ping timeout: 258 seconds]
href has quit [Ping timeout: 258 seconds]
`derpy has quit [Ping timeout: 240 seconds]
adaedra has quit [Ping timeout: 264 seconds]
csk157 has joined #ruby
QualityAddict has quit [Ping timeout: 248 seconds]
cschneid has joined #ruby
govg has quit [Quit: leaving]
ta_ has joined #ruby
csk157 has quit [Ping timeout: 248 seconds]
cschneid has quit [Ping timeout: 240 seconds]
DmitryBochkarev has joined #ruby
Gucciferal has quit [Ping timeout: 268 seconds]
r0nin has joined #ruby
milardovich has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
houhoulis has quit []
oleo has quit [Quit: Leaving]
milardovich has quit [Ping timeout: 255 seconds]
Technodrome has joined #ruby
r0nin has joined #ruby
dionysus69 has joined #ruby
adaedra has joined #ruby
href has joined #ruby
workmad3 has joined #ruby
guardianx has joined #ruby
`derpy has joined #ruby
r0nin has quit [Ping timeout: 268 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
rahult has joined #ruby
zautomata has quit [Ping timeout: 268 seconds]
mson has quit [Quit: Connection closed for inactivity]
andikr has joined #ruby
DTZUZO has quit [Ping timeout: 260 seconds]
r0nin has joined #ruby
b0mbnet has joined #ruby
ta_ has quit [Remote host closed the connection]
avelldiroll has joined #ruby
ta_ has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
r0nin has joined #ruby
guardianx has quit [Read error: Connection reset by peer]
r0nin has quit [Ping timeout: 255 seconds]
alex`` has joined #ruby
rahult has quit [Quit: Back to the world of zombies]
BioSpider has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wilhelm1 has joined #ruby
stoffus has joined #ruby
b0mbnet has quit [Remote host closed the connection]
r0nin has joined #ruby
wilhelm1 has quit [Client Quit]
wilhelm1 has joined #ruby
conta has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
Xiti has joined #ruby
wilhelm1 has quit [Client Quit]
peirama has joined #ruby
RickHull has left #ruby [#ruby]
ramfjord has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
jnollette has quit [Remote host closed the connection]
zautomata has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 255 seconds]
jnollette has joined #ruby
Dimik has joined #ruby
peirama has quit [Quit: WeeChat 2.0]
iamarun has quit [Ping timeout: 248 seconds]
peirama has joined #ruby
Guest90 has joined #ruby
zautomata has quit [Ping timeout: 240 seconds]
r0nin has joined #ruby
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
ana_ has joined #ruby
bkxd has joined #ruby
dreamthese has quit [Ping timeout: 276 seconds]
hutch34 has quit [Ping timeout: 248 seconds]
Technodrome has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
cschneid has joined #ruby
peirama has quit [Quit: WeeChat 2.0]
rhyselsmore has joined #ruby
r0nin has joined #ruby
Beams has joined #ruby
Rr4sT has joined #ruby
bkxd_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
_aeris_ has quit [Remote host closed the connection]
sepp2k has joined #ruby
r0nin has quit [Ping timeout: 276 seconds]
jnollette has quit [Ping timeout: 248 seconds]
InfinityFye has joined #ruby
biberu has joined #ruby
jnollette has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r0nin has joined #ruby
aufi has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
_aeris_ has joined #ruby
dreamthese has joined #ruby
rahult has joined #ruby
ta_ has quit [Remote host closed the connection]
r0nin has quit [Ping timeout: 240 seconds]
kculpis has quit [Ping timeout: 255 seconds]
bkxd_ has quit [Ping timeout: 248 seconds]
mark_66 has joined #ruby
csk157 has joined #ruby
bkxd has joined #ruby
miskatonic has joined #ruby
b0mbnet has joined #ruby
speakingcode has joined #ruby
bkxd has quit [Client Quit]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
r0nin has joined #ruby
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
csk157 has quit [Ping timeout: 258 seconds]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
guille-moe has joined #ruby
zautomata has joined #ruby
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
urk187 has joined #ruby
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
hutch34 has joined #ruby
claudiuinberlin has joined #ruby
jaruga has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
urk187 has quit [Ping timeout: 268 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
InfinityFye has left #ruby ["Leaving"]
kies has joined #ruby
r0nin has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
cdg has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
b0mbnet has quit [Quit: Leaving]
marr has joined #ruby
ledestin has quit [Read error: Connection reset by peer]
Kero has quit [Ping timeout: 248 seconds]
Kero has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
QualityAddict has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
r0nin has joined #ruby
iamarun has joined #ruby
iamarun_ has joined #ruby
iamarun has quit [Client Quit]
iamarun_ has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
r0nin has quit [Ping timeout: 252 seconds]
ShalokShalom has quit [Remote host closed the connection]
n13z has quit [Quit: leaving]
guille-moe has joined #ruby
anisha has joined #ruby
bkxd has joined #ruby
n13z has joined #ruby
Burgestrand has joined #ruby
workmad3 has joined #ruby
claudiuinberlin has quit [Read error: Connection reset by peer]
n13z has quit [Quit: leaving]
r0nin has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
ta_ has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
bkxd has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 240 seconds]
drowze has joined #ruby
mikecmpbll has joined #ruby
ShalokShalom_ has joined #ruby
r0nin has joined #ruby
n13z has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
drowze has quit [Ping timeout: 248 seconds]
ta_ has quit [Read error: Connection reset by peer]
ta__ has joined #ruby
tomphp has joined #ruby
r0nin has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
bkxd has quit [Ping timeout: 248 seconds]
anisha has joined #ruby
ShalokShalom__ has joined #ruby
tvw has joined #ruby
ShalokShalom__ has quit [Remote host closed the connection]
csk157 has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
anisha has quit [Client Quit]
anisha has joined #ruby
milardovich has joined #ruby
bkxd has joined #ruby
biox has quit [Quit: Ping timeout (120 seconds)]
drcode has quit [Ping timeout: 248 seconds]
biox has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
sindork has quit [Ping timeout: 248 seconds]
r0nin has joined #ruby
cgfbee has quit [Ping timeout: 248 seconds]
csk157 has quit [Ping timeout: 248 seconds]
sindork has joined #ruby
milardovich has quit [Ping timeout: 276 seconds]
aufi has quit [Read error: Connection reset by peer]
aufi has joined #ruby
rahult has quit [Quit: Back to the world of zombies]
implose has joined #ruby
implose has quit [Remote host closed the connection]
mim1k has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
drowze has joined #ruby
r0nin has quit [Ping timeout: 276 seconds]
cgfbee has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
ShalokShalom_ has quit [Remote host closed the connection]
anisha has joined #ruby
maattdd_ has quit [Ping timeout: 240 seconds]
maattdd_ has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
r0nin has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
srandon111 has joined #ruby
<srandon111>
is it just me or people on perl is very unfriendly ?
<srandon111>
#perl
bkxd has joined #ruby
r0nin has quit [Ping timeout: 255 seconds]
<apeiros>
no idea, I'm not on #perl. and honestly, I think the politeness of people in #perl is not really a topic for #ruby. feel free to discuss it in #ruby-offtopic
mim1k is now known as mim1k|work
dviola has joined #ruby
r0nin has joined #ruby
bkxd_ has joined #ruby
blackmesa1 has joined #ruby
tomphp has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
r0nin has quit [Ping timeout: 248 seconds]
Fraeon has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 268 seconds]
blackmesa1 has quit [Ping timeout: 252 seconds]
mtkd has joined #ruby
jnollette has quit [Ping timeout: 248 seconds]
blackmesa1 has joined #ruby
<srandon111>
hello guys!!
r0nin has joined #ruby
jnollette has joined #ruby
qba73 has joined #ruby
hutch34 has joined #ruby
ldnunes has joined #ruby
Serpent7776 has joined #ruby
Rr4sT has quit [Quit: Connection closed for inactivity]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r0nin has quit [Ping timeout: 255 seconds]
r0nin has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
srandon111 has quit [Ping timeout: 260 seconds]
Fraeon has joined #ruby
Guest90 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lexruee has quit [Ping timeout: 255 seconds]
n13z has quit [Quit: leaving]
lexruee has joined #ruby
n13z has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
tvw has quit []
mohabaks has left #ruby ["WeeChat 1.9"]
urk187 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
r0nin has joined #ruby
G_ has joined #ruby
rhyselsmore has joined #ruby
jnyw has quit [Quit: WeeChat 2.0]
urk187 has quit [Ping timeout: 268 seconds]
r0nin has quit [Ping timeout: 268 seconds]
anisha has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
nofxx has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
tomphp has joined #ruby
nofxx has joined #ruby
faces has joined #ruby
bkxd_ has quit [Ping timeout: 248 seconds]
tomphp has quit [Client Quit]
r0nin has joined #ruby
kinbiko has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Client Quit]
nofxx has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
nofxx has joined #ruby
leitao has joined #ruby
kinbiko has quit [Ping timeout: 250 seconds]
r0nin has quit [Ping timeout: 248 seconds]
AJA4350 has joined #ruby
FahmeF has joined #ruby
Strepsils has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
r0nin has joined #ruby
BioSpider has quit [Read error: Connection reset by peer]
qba73 has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
apparition has joined #ruby
endemic has quit [Ping timeout: 255 seconds]
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
Quentinius has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
Quentinius has quit [Client Quit]
nahra has quit [Remote host closed the connection]
meinside has quit [Quit: Connection closed for inactivity]
r0nin has quit [Ping timeout: 248 seconds]
tjbp has joined #ruby
drcode has joined #ruby
milardovich has joined #ruby
qba73 has joined #ruby
Zimsky has quit [Ping timeout: 255 seconds]
ledestin has joined #ruby
endemic has quit [Ping timeout: 246 seconds]
vtx has joined #ruby
<vtx>
hi guys, has anyone here set up sinatra endpoints over https?
postmodern has quit [Quit: Leaving]
<dminuoso>
?ask
<ruby[bot]>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
milardovich has quit [Ping timeout: 248 seconds]
r0nin has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
<dminuoso>
vtx: There's various methods. The easiest would be to handle TLS termination in front of sinatra.
<vtx>
dminuoso: is it possible to add support for https entirely within my app code?
<vtx>
i guess i should explain my setup
Zimsky has joined #ruby
apeiros has joined #ruby
FahmeF has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 240 seconds]
csk157 has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
thinkpad has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
aupadhye has quit [Ping timeout: 248 seconds]
csk157 has quit [Ping timeout: 258 seconds]
thinkpad has joined #ruby
yeticry_ has quit [Ping timeout: 255 seconds]
endemic has joined #ruby
Puffball has quit [Ping timeout: 246 seconds]
r0nin has joined #ruby
ramfjord has joined #ruby
kies has quit [Ping timeout: 268 seconds]
tvw has joined #ruby
r0nin has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
skweek has joined #ruby
<vtx>
i have a react app that is deployed in docker, to marathon. the react app by default runs over https. i also have a sinatra app that is deployed to the same marathon instance. because sinatra is by default running over http, when the https react app requests data from its endpoints, the request fails because sinatra isnt running over https. the workaround right now, is to explicitly specify http when accessing the react app. but i guess i need to have the sinatra app
<vtx>
serve over https if possible
kinbiko has joined #ruby
aupadhye has joined #ruby
quobo has joined #ruby
yokel has joined #ruby
dviola has quit [Quit: WeeChat 2.0]
vayan has quit [Quit: Connection closed for inactivity]
r0nin has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
Psybur has joined #ruby
TinkerTyper has quit [Read error: Connection reset by peer]
blackmesa1 has quit [Ping timeout: 250 seconds]
Psybur_ has joined #ruby
Psybur has quit [Disconnected by services]
Psybur_ is now known as Psybur
TinkerTyper has joined #ruby
r0nin has quit [Ping timeout: 248 seconds]
FahmeF has joined #ruby
kinbiko has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
kinbiko has joined #ruby
r0nin has joined #ruby
qba73 has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 255 seconds]
r0nin has quit [Ping timeout: 248 seconds]
WhereIsMySpoon_ has joined #ruby
<WhereIsMySpoon_>
How do I specify a space using character literals?
<WhereIsMySpoon_>
or is it not possible?
<dminuoso>
WhereIsMySpoon_: You mean with ? ?
<WhereIsMySpoon_>
yes
<dminuoso>
Let me check the lexer
<WhereIsMySpoon_>
ha
<WhereIsMySpoon_>
alright :) thanks
<dminuoso>
asm>> ?a
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/914443
<apeiros>
if I remember correctly, it evaluates to true when the left expression evaluates true, and remains true until the right evaluates as true (or as false)
<dminuoso>
>> (1..10).each { |x| print x if x.even? .. x.odd? }
<WhereIsMySpoon_>
RougeT430: i like Arch, but it isnt for beginners
<RougeT430>
no it isnt haha
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
r0nin has quit [Ping timeout: 258 seconds]
<RougeT430>
i can run around linux, but this will be my first time using it as a primary os
<dminuoso>
WhereIsMySpoon_: It's like in C you can ask even the most expert C programmers any C related question, but the one detail you can get anyone, is how this program has undefined behavior: https://gist.github.com/dminuoso/954131cbed7c038e70482174b96a3a15
<RougeT430>
im taking a programming course and i really need to make the leap
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
<dminuoso>
(And I added a neat little trap to catch you off guard in there)
<dminuoso>
apeiros: ^- can you catch the undefined behavior in this?
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
csk157 has quit [Ping timeout: 260 seconds]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
<WhereIsMySpoon_>
dont you need argv* in main?
<WhereIsMySpoon_>
or am i wrong
mcr1 has quit [Ping timeout: 255 seconds]
<dminuoso>
WhereIsMySpoon_: Strictly speaking no. That is actually the trap door: Technically it should either be int main(void) or int main(int argc, char *argv[]) but the standard allows for "equivalent" (which is a fancy way of saying: anything is permissable)
Tempesta has joined #ruby
<dminuoso>
WhereIsMySpoon_: The detail lies in a little known fact that the C standard declares a translation unit that does not end in a newline to result in undefined behavior.
Tempesta has quit [Client Quit]
Tempesta has joined #ruby
<dminuoso>
This is defined as per 5.1.1.2p1.2
<dminuoso>
[...]A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character before any such splicing takes place.
<WhereIsMySpoon_>
dminuoso: T_T
<WhereIsMySpoon_>
i imagine most compilers dont adhere strictly to that though
Tempesta has quit [Client Quit]
sylario has quit [Quit: Connection closed for inactivity]
aupadhye has quit [Ping timeout: 246 seconds]
<dminuoso>
WhereIsMySpoon_: What do you mean?
aupadhye has joined #ruby
<dminuoso>
WhereIsMySpoon_: The standard places no requirement on the implementation to deal with that.
<WhereIsMySpoon_>
right
<WhereIsMySpoon_>
whast the int argc for/
<WhereIsMySpoon_>
?*
<dminuoso>
WhereIsMySpoon_: To know how many arguments are being passed in argv
<WhereIsMySpoon_>
ah
<WhereIsMySpoon_>
ive done very little c
r0nin has joined #ruby
<WhereIsMySpoon_>
really only uC based C
<dminuoso>
WhereIsMySpoon_: But with Ruby there's lots of fancy gotchas.
<WhereIsMySpoon_>
as with a lot of scripting languages :P
<dminuoso>
WhereIsMySpoon_: Now what about when you reload? Ruby needs some way obviously to figure out on the call `puts m` whether m is a variable or method. The way Ruby does it, before the parser even sees the code the lexer scans your file. Once it sees an assignment "a = ..." it then considers `a` to be a variable until the end of the scope.
jeffreylevesque has quit [Ping timeout: 252 seconds]
<dminuoso>
But lexically. Thas some some really bizarre implications like in this example:
<dminuoso>
>> puts a if (a = 10)
<ruby[bot]>
dminuoso: # => /tmp/execpad-da340f60d909/source-da340f60d909:2: warning: found = in conditional, should be == ...check link for more (https://eval.in/914497)
<dminuoso>
Bah. Run this in your irb, ruby[bot] is masking the desired output with a warning
r0nin has joined #ruby
<dminuoso>
So because lexically the assignment happens _after_ `puts a`, at the time of `puts a` a is considered to be a method (which obviously does not exist). Any code that follows would consider `a` to be a variable.
<dminuoso>
WhereIsMySpoon_: and the reason you saw nil, is because variables have to exist inside the entire method..
<WhereIsMySpoon_>
dminuoso: irb has the same complaint
<dminuoso>
WhereIsMySpoon_: Yeah but if you look afterwards, you see the NoMethodError
<WhereIsMySpoon_>
did you mean == 10?
<dminuoso>
Nope!
<dminuoso>
I meant an assignment.
<WhereIsMySpoon_>
NameError: undefined local variable or method `a' for main:Object
<WhereIsMySpoon_>
oh right
<dminuoso>
You'd think it executes the assignment first, and then print it.
<dminuoso>
So
<dminuoso>
Next level of crazyness:
<WhereIsMySpoon_>
wait wait
<WhereIsMySpoon_>
that previous exmaple
<WhereIsMySpoon_>
with m and 10
<WhereIsMySpoon_>
i expected it to print 10
<WhereIsMySpoon_>
not to print nil as well
<WhereIsMySpoon_>
why the nil
<dminuoso>
WhereIsMySpoon_: I was just about to cover that.
<WhereIsMySpoon_>
ok :)
<dminuoso>
But to do that, Ill have to do one more crazy.
<WhereIsMySpoon_>
okay :P fire away
<dminuoso>
WhereIsMySpoon_: So ruby has a method (dont ever use it) to dynamically get a variable right
<dminuoso>
WhereIsMySpoon_: The moment ruby sees any assignment to "foo" anywhere inside the body, it creates a local variable named "foo" and initializes it to nil.
<dminuoso>
Even if that assignment is in dead code.
<dminuoso>
Which was the case in my `if nil` code
<WhereIsMySpoon_>
is ruby lifting foo?
<WhereIsMySpoon_>
like js lifts variables?
<dminuoso>
Yeah. Or "hoisting"
<WhereIsMySpoon_>
yea
<dminuoso>
WhereIsMySpoon_: with `var` yes.
<dminuoso>
WhereIsMySpoon_: So the only trick is, ruby does two things if it sees an assignment to "foo"
<dminuoso>
WhereIsMySpoon_: a) it creates a local variable and hoists it.. BUT...
tjbp has joined #ruby
<dminuoso>
only any code that lexically (that means literally to the right side and below it) knows that "foo" refers to a local variable
r0nin has quit [Ping timeout: 248 seconds]
<dminuoso>
The default behavior is to assume that "foo" is a method, unless ruby has seen an assignment to it (lexically before)
<dminuoso>
WhereIsMySpoon_: So like I said, ruby specifically looks for an assignment in the style of "a = ..." to consider `a` a local variable in lexically code afterwards.
FahmeF has joined #ruby
<Bish>
why does that yield something different as if done with foo =?
<WhereIsMySpoon_>
is it because foo wasnt defined before, so it doesnt set it?
<Bish>
so local vars are methods? or what is the goal of this?
DmitryBochkarev has joined #ruby
<dminuoso>
WhereIsMySpoon_: well it was defined.. but not using =
<dminuoso>
Bish: Nope.
<WhereIsMySpoon_>
right
<Bish>
so how is foo = 3 different from setting it by bindung?
<Bish>
because at compiletime he knows about that local var by seeing foo = x
<Bish>
?
<dminuoso>
Bish: the lexer specifically looks for things like "a = ..." to consider a a variable.
milardovich has joined #ruby
<dminuoso>
It happens before compilation, heck before parsing even.
<Bish>
figured
mtkd has quit [Ping timeout: 252 seconds]
<dminuoso>
Bish: and the meaning of `a` to be a variable is scoped to lexically after the assignment
FahmeF has quit [Ping timeout: 248 seconds]
<dminuoso>
which is why `puts a if (a = 10)` will throw.
rabajaj has joined #ruby
mtkd has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
<Bish>
it does? didn't even know
milardovich has quit [Ping timeout: 246 seconds]
r0nin has quit [Ping timeout: 246 seconds]
<WhereIsMySpoon_>
dminuoso: this is awesome :P
G_ has quit [Ping timeout: 255 seconds]
<WhereIsMySpoon_>
and by awesome i mean horrifying
G_ has joined #ruby
<apeiros>
uh dminuoso, you can't create new variables in an existing binding
<apeiros>
I mean you can, but they'll only be visible through Binding#instance_variable_get or eval'ing with that binding object.
<apeiros>
(which is why pry/irb are bad tools to reason about that)
<dminuoso>
apeiros: Ahh right, and I should even know why.
<dminuoso>
I kind of hinted at it already.
<dminuoso>
the lvar table is generated at compile time... so...
r0nin has joined #ruby
<apeiros>
honestly, the way it's handled in ruby is IMO terrible
<dminuoso>
+1
<apeiros>
local_variable_set should raise for non-existing variables. and Binding.new should accept a hash
<apeiros>
in order to use it with Binding#eval for e.g. template engines.
<dminuoso>
apeiros:
<dminuoso>
Whops.
<dminuoso>
apeiros: I dislike template engines in Ruby.
<WhereIsMySpoon_>
doing when (?\) when casing on a character doesnt seem to be valid syntax
<dminuoso>
They all feel quicky.
<WhereIsMySpoon_>
(?\ ) even
<WhereIsMySpoon_>
oops
<WhereIsMySpoon_>
that was the problem
<WhereIsMySpoon_>
never mind
<dminuoso>
quirky. not quicky
DTZUZO has quit [Ping timeout: 260 seconds]
<dminuoso>
apeiros: The more I think about it, the only reason I still use ruby is because technical debts.
<apeiros>
dminuoso: how so? also do you have examples of template engines you like?
<apeiros>
dminuoso: :<
<WhereIsMySpoon_>
i like the conciseness of ruby
rahul_bajaj has joined #ruby
DTZUZO has joined #ruby
bmurt has joined #ruby
r0nin has quit [Ping timeout: 255 seconds]
<dminuoso>
apeiros: JSX is the first that felt had the right abstraction, but the reason is partially related to the fact that its syntax sugar around a native builder pattern.
mcr1 has joined #ruby
<dminuoso>
Things like jbuilder are a good start
<miskatonic>
i dislike template engines period
<apeiros>
dminuoso: ruby's jbuilder?
rabajaj has quit [Ping timeout: 248 seconds]
<dminuoso>
apeiros: Yeah. Its a bit wieldy to use, but in ruby land its the right direction
<apeiros>
IMO those aren't template engines. those are structure builders. which can work great for stuff which actually has a rigid structure.
<apeiros>
but are pointless for things like emails or pdf
csk157 has joined #ruby
Ouchy has joined #ruby
Ouchy`w has joined #ruby
<dminuoso>
apeiros: Fair enough, I have no experience in document generation.
<miskatonic>
latex is best for document generation
rahul_bajaj has quit [Ping timeout: 276 seconds]
<dminuoso>
apeiros: The reason that JSX feels like a good approach is because it gives the feeling of a template engine, but the power of everything being pure code.
<apeiros>
I concur with structure builders being a good idea to build structures. avoids a lot of the "whoops typo now my stuff is invalid crap"
<dminuoso>
Yup.
<apeiros>
and lets be clear - humans are crap at writing well formed documents
<dminuoso>
Heh.
jeffreylevesque has joined #ruby
<apeiros>
(well formed as in xml terminology)
<dminuoso>
apeiros: It's near impossible for me to generate invalid markup with JSX :)
<dminuoso>
Though I think it might let me do things like `<foo>` which are strictly speaking invalid..
<apeiros>
I remember how I was happy about xhtml being touted relentless wrt parser errors and how all the crappy devs have been whining "but what about my invalid markup?!?". but well, it was short-lived. now we have html5 which is even worse in that regard.
<apeiros>
(worse than html4)
<dminuoso>
How is HTML5 worse?
<apeiros>
it's not xml, it's not sgml.
<dminuoso>
Oh that.
<apeiros>
it's some random definition of what's valid and what's not.
<dminuoso>
apeiros: I suppose the rationale is "people write invalid code anyway..."
<dminuoso>
;-P
csk157 has quit [Ping timeout: 248 seconds]
<apeiros>
yes. it even includes a canonical sanitation recipe for common invalid code.
r0nin has joined #ruby
vee__ has quit [Ping timeout: 255 seconds]
<apeiros>
an html5 compliant parser is expected to recover from invalid code in a prescribed way.
<dminuoso>
apeiros: The thing I dislike most is the way < /> is done in HTML5.
<apeiros>
you mean that it's impossible to tell whether a tag is supposed to have content?
<dminuoso>
Like... on void elements its valid but meaningless, on non-void elements its invalid, and on foreign elements it depends on what the foreign language does.
<apeiros>
yeah, same
RougeT430 has quit [Read error: Connection reset by peer]
<apeiros>
you need a list with content-bearing tags to know that they're not self-closed.
<dminuoso>
apeiros: JSX handles this the sensible way for me.
<WhereIsMySpoon_>
dminuoso: I agree wholeheartedly there
<dminuoso>
If I do <div/> it will do the right thing.
<WhereIsMySpoon_>
< /> is stupid
<WhereIsMySpoon_>
in html that is
vee__ has joined #ruby
<dminuoso>
apeiros: And I learned this the hardway. I once had an actual <div id="reactContainer" /><div id="anotherContainer" /> ..
<dminuoso>
whenever React mounted, the other div disappeared..
<dminuoso>
Best thing is, Browsers dont give you diagnostics in the console either that your markup could be broken.
<apeiros>
the idea I liked most about xhtml was that you could add other namespaces and still have proper validation. that's the part I like about xml too.
<dminuoso>
apeiros: There's 2 great things about it. You can nest interpolation and use JSX in code anywhere.
milardovich has joined #ruby
<apeiros>
you don't need to change the xhtml spec in order to add e.g. canvas or svg or mathml. just define a namespace. add it. done. parsers are all compliant and can handle it.
r0nin has quit [Ping timeout: 240 seconds]
<dminuoso>
So something like <div>{arr.map((e) => <span>{e}</span>)}</div> is legit (its readable if you split this on 5 lines)
jeffreylevesque has quit [Ping timeout: 240 seconds]
<dminuoso>
And the reason this is nice, is because it lets you compose the construction into functions easily.
<dminuoso>
Something you just cant do with slim/haml/erb
<dminuoso>
And also variables dont magically just appear.
<dminuoso>
(angular, hint)
<dminuoso>
Its just pure JS code
<dminuoso>
Which means you dont have to "learn the engine". You just learn how interpolation works, and realize that you're writing pure JS code.
alex`` has quit [Quit: WeeChat 1.9.1]
r0nin has joined #ruby
alex`` has joined #ruby
qba73 has quit [Ping timeout: 260 seconds]
<dminuoso>
apeiros: const icon = <i className="fa fa-some-icon" />; return <div>Hello {icon} User</div>; this stuff makes any slim user jealous. =P
<dminuoso>
How many times have I wished I could just do `a = render 'blah'` in rails
<apeiros>
what does it do when icon == '</invalid>'?
r0nin_ has joined #ruby
<dminuoso>
apeiros: it doesn't compare. <div /> is desugared into React.createElement('div')
<dminuoso>
And <Foo /> into React.createElement(Foo)
r0nin has quit [Ping timeout: 255 seconds]
<dminuoso>
(Which is why this is actually just JS code)
<dminuoso>
And that function call returns a simple object that kind of looks like { type: 'div' } or { type: 'Foo' }
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<apeiros>
not sure you actually answered my question :)
jeffreylevesque_ has quit [Ping timeout: 258 seconds]
<dminuoso>
apeiros: I dont understand your question then.
<apeiros>
can you in general use {} to interpolate strings or does that use separate syntax?
qba73 has joined #ruby
<dminuoso>
{} interpolates any valid javascript expression.
<apeiros>
then my question stands
<dminuoso>
I still dont understand the question then.
<apeiros>
what happens when you interpolate a string which would turn your template invalid
<dminuoso>
A string is just a string..
<dminuoso>
Mmm. Let me show you
cdg has joined #ruby
<apeiros>
so they didn't learn from others mistakes then. sad.
jeffreylevesque_ has joined #ruby
<dminuoso>
apeiros: No you misunderstand.
<dminuoso>
apeiros: You cant create invalid HTML.
<dminuoso>
If you interpolate a string, then it will escape that string and display it.
<apeiros>
then you explained wrong
<apeiros>
because as per your explanation, one could.
<dminuoso>
As per what line?
<apeiros>
icon = '</invalid>'; return <div>Hello {icon} User</div>; -- what would that evaluate to?
<dminuoso>
apeiros: It would produce some opague object that when rendered gives the following HTML fragment: <div>Hello </invalid></div>
<apeiros>
ok, so it treats html fragments differently from strings.
<dminuoso>
apeiros: Yes, though there are mechanisms to inject strings as html should you ever want that.
<dminuoso>
I dont see it very often
<dminuoso>
But not inside JSX.
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<WhereIsMySpoon_>
if I have a class, can I not just do after its closing ‘end’, MyClass.new to run it?
<WhereIsMySpoon_>
then assign it, run methods on it
<WhereIsMySpoon_>
s/then/or/
<dminuoso>
WhereIsMySpoon_: You dont "run" classes.
<dminuoso>
WhereIsMySpoon_: A class is basically just a template, and "new" instructs ruby to build a new object from that template.
<WhereIsMySpoon_>
yea, sorry wrong words
millerti has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
bmurt has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<WhereIsMySpoon_>
i meant can i just do myClass = MyClass.new; myClass.doStuff after its closing end
<WhereIsMySpoon_>
and just run that file
Ouchy`w has quit []
<dminuoso>
WhereIsMySpoon_: ?tias
<dminuoso>
?tias WhereIsMySpoon_
<ruby[bot]>
WhereIsMySpoon_: Why don't you try it and see for yourself?
<WhereIsMySpoon_>
well i have
<dminuoso>
And?
<WhereIsMySpoon_>
sokoban/sokoban.rb:19:in `[]': wrong number of arguments (given 0, expected 1..2) (ArgumentError)
dionysus69 has quit [Ping timeout: 248 seconds]
<dminuoso>
WhereIsMySpoon_: What do you make of the error message without looking at your code.
<WhereIsMySpoon_>
well im not giving it arguments it expects, but i dont have any constructor detailed
blackmesa1 has joined #ruby
<WhereIsMySpoon_>
so id expect a 0 arg constructor
<dminuoso>
WhereIsMySpoon_: Hold on! What method is being called?
<dminuoso>
What method is it choking on particular
<WhereIsMySpoon_>
oh, on the method call after new
<WhereIsMySpoon_>
hm
<dminuoso>
WhereIsMySpoon_: Specifically?
<dminuoso>
WhereIsMySpoon_: The message tells you.
<dminuoso>
:-)
<WhereIsMySpoon_>
sokoban = Sokoban.new
<WhereIsMySpoon_>
sokoban.play
<WhereIsMySpoon_>
on .play
<dminuoso>
WhereIsMySpoon_: Nope.
<dminuoso>
WhereIsMySpoon_: Look at the error message.
<dminuoso>
WhereIsMySpoon_: Dont look at your code.
<dminuoso>
WhereIsMySpoon_: This reads:
<WhereIsMySpoon_>
i didnt paste the whole thing sorry
<WhereIsMySpoon_>
sokoban/sokoban.rb:19:in `[]': wrong number of arguments (given 0, expected 1..2) (ArgumentError)
<WhereIsMySpoon_>
from sokoban/sokoban.rb:19:in `startup'
<WhereIsMySpoon_>
from sokoban/sokoban.rb:11:in `play'
<WhereIsMySpoon_>
from sokoban/sokoban.rb:114:in `<main>'
<dminuoso>
WhereIsMySpoon_: An exception "ArgumentError" was thrown In file: sokoban/sokoban.rb, at line: 19, in the call of the method '[]' the following went wrong: wrong number of arguments (given 0, expected 1..2)
<WhereIsMySpoon_>
oh
<dminuoso>
WhereIsMySpoon_: That is how you should read this.
<WhereIsMySpoon_>
oh i see, right of course sorry
<WhereIsMySpoon_>
i just did @map_state = [][] and assumed a 2d array constructor was like that without looking it up :P
<dminuoso>
:)
<WhereIsMySpoon_>
thats line 19
<dminuoso>
WhereIsMySpoon_: So you just have to know that [] is a method call (you could also write .[]())
<dminuoso>
Likewise a[1] is a method call passing one argument: you could also write .[](1)
<apeiros>
ruby doesn't have 2d arrays ;-) (but you can nest arrays arbitrarily deep since an array is just fine as an array-element)
<dminuoso>
a[1,2] is a method call passing two arguments, you could also write .[](1,2) :-)
<WhereIsMySpoon_>
alrighty
<dminuoso>
WhereIsMySpoon_: Lesson being: Carefully read your error messages, they are usually very helpful. :)
<dminuoso>
WhereIsMySpoon_: So in this case you ended up creating an array with [], and then immediately calling the [] method on it.
<pastorinni>
7IZAALMT3: Thanks again dude!!! i'll do
<NL3limin4t0r>
I'm trying to convert an Array to a Hash with the following structure `[[:a, 1], [:b, 2], [:c, 3]]`, this can be easily done with the #to_h method on Enumarable. However if you create a new hash from scratch you can provide a default `Hash.new(0)`, is there also a way to convert an exsisting Array to a Hash while providing a default?
andikr has quit [Remote host closed the connection]
hsiktas has quit []
<NL3limin4t0r>
7IZAALMT3: The book "Practical Vim" by "Drew Neil" is also excelent.
hsiktas has joined #ruby
urk187 has joined #ruby
houhoulis has joined #ruby
aupadhye has quit [Quit: Leaving]
lexruee has quit [Ping timeout: 248 seconds]
kinbiko has quit [Ping timeout: 248 seconds]
apparition has quit [Quit: Bye]
kinbiko has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
csk157 has joined #ruby
chocoelho has quit [Ping timeout: 240 seconds]
lexruee has joined #ruby
LocaMocha has joined #ruby
miskatonic has joined #ruby
mark_66 has quit [Remote host closed the connection]
<pastorinni>
NL3limin4t0r: 7IZAALMT3: thanks for all the resources!!!
kinbiko has quit [Ping timeout: 268 seconds]
csk157 has quit [Ping timeout: 240 seconds]
dtcristo has quit [Ping timeout: 240 seconds]
jonjits[m] has quit [Ping timeout: 240 seconds]
Tagami[m] has quit [Ping timeout: 240 seconds]
astronavt[m] has quit [Ping timeout: 240 seconds]
erciccione_[m] has quit [Ping timeout: 240 seconds]
itmerc[m] has quit [Ping timeout: 250 seconds]
haylon has quit [Ping timeout: 250 seconds]
lasenna[m] has quit [Ping timeout: 246 seconds]
torarne has quit [Ping timeout: 246 seconds]
Giphy[m] has quit [Ping timeout: 246 seconds]
Matt[m]2 has quit [Ping timeout: 255 seconds]
yana[m] has quit [Ping timeout: 255 seconds]
M107262[m] has quit [Ping timeout: 255 seconds]
gokul_mr[m] has quit [Ping timeout: 252 seconds]
dman[m] has quit [Ping timeout: 252 seconds]
watzon has quit [Ping timeout: 252 seconds]
velu_aon[m] has quit [Ping timeout: 252 seconds]
aviraldg has quit [Ping timeout: 252 seconds]
zalipuha[m] has quit [Ping timeout: 248 seconds]
turt2live has quit [Ping timeout: 240 seconds]
kua[m] has quit [Ping timeout: 264 seconds]
Hanma[m] has quit [Ping timeout: 264 seconds]
aagdbl[m] has quit [Ping timeout: 276 seconds]
KevinMGranger has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 268 seconds]
kinbiko has joined #ruby
shoogz has joined #ruby
TomyLobo has joined #ruby
ldepandis has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
kinbiko has quit [Ping timeout: 240 seconds]
jamiejackson has quit [Ping timeout: 255 seconds]
mcr1 has quit [Ping timeout: 248 seconds]
kinbiko has joined #ruby
motstgo has left #ruby ["WeeChat 1.9"]
dionysus69 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
kinbiko has quit [Ping timeout: 255 seconds]
DmitryBochkarev has joined #ruby
kinbiko has joined #ruby
jxv has joined #ruby
quobo has joined #ruby
Guest90_ has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kinbiko has quit [Ping timeout: 255 seconds]
exhiled has joined #ruby
lupine has quit [Ping timeout: 255 seconds]
marxarelli|afk is now known as marxarelli
PaulCape_ has joined #ruby
kinbiko has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
serpent7776 has quit [Quit: Leaving]
ShekharReddy has quit [Quit: Connection closed for inactivity]
kinbiko has quit [Ping timeout: 264 seconds]
WhereIsMySpoon_ has quit [Quit: WhereIsMySpoon_]
Yxhvd is now known as yxhuvud
kinbiko has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 250 seconds]
DTZUZO has joined #ruby
yeticry has quit [Ping timeout: 255 seconds]
kinbiko has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
houhoulis has quit []
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
kinbiko has joined #ruby
despai has joined #ruby
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
kinbiko has quit [Ping timeout: 246 seconds]
Ltem has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Ping timeout: 276 seconds]
urk187 has quit []
ar has joined #ruby
mtkd has joined #ruby
guille-moe has joined #ruby
kinbiko has joined #ruby
chocoelho has joined #ruby
csk157 has joined #ruby
conta2 has joined #ruby
skweek has quit [Ping timeout: 255 seconds]
synthroid has joined #ruby
<ar>
hi. is there a Set implementation that guarantees that retrieval order (set.each_with_index, for example) is the same as insertion order? it seems to work like that in MRI, but the docs specifically say that the order is not guaranteed
eightlimbed has joined #ruby
Guest22298 has quit []
JasonCL has quit [Ping timeout: 255 seconds]
csk157 has quit [Ping timeout: 264 seconds]
ShekharReddy has joined #ruby
conta2 has quit [Ping timeout: 276 seconds]
kinbiko has quit [Ping timeout: 276 seconds]
Guest22298 has joined #ruby
Guest22298 has quit [Client Quit]
jaruga has quit [Ping timeout: 250 seconds]
<yxhuvud>
ar: no, but you can probably implement one pretty simply yourself as Hash is ordered by insertion. After all, set is implemented in terms of Hash.
teej has joined #ruby
<elomatreb>
Well, if your Hash is already ordered you don't need to reimplement it
kinbiko has joined #ruby
orbyt_ has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
PaulCape_ has quit [Read error: Connection reset by peer]
skweek has joined #ruby
DTZUZO has joined #ruby
PaulCapestany has joined #ruby
jxv has quit [Quit: zzz…]
Tagami[m] has joined #ruby
eightlimbed has quit [Ping timeout: 250 seconds]
conta2 has joined #ruby
jxv has joined #ruby
kinbiko has quit [Remote host closed the connection]
cdg_ has joined #ruby
kinbiko has joined #ruby
apeiros_ has joined #ruby
leah2 has quit [Ping timeout: 264 seconds]
varesa is now known as varesa|
cdg has quit [Ping timeout: 252 seconds]
tsglove has quit [Quit: Leaving]
dviola has joined #ruby
kinbiko has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 250 seconds]
techn1cs has quit [Remote host closed the connection]
Guest96591 has quit []
KnownSyntax has joined #ruby
7IZAALMT3 is now known as alex``
leah2 has joined #ruby
sanscoeur has joined #ruby
Tagami[m] has quit [Remote host closed the connection]
tsglove has joined #ruby
<NL3limin4t0r>
ar: Hash and Set are not meant to be used in a certain order. Arrays are better suited for that.
jackjackdripper has joined #ruby
A124 has quit [Ping timeout: 264 seconds]
kinbiko has joined #ruby
<elomatreb>
Conceptually true, but MRI Hashes are explicitly documented to be ordered today.
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ar>
NL3limin4t0r: except i've hit a usecase where rewriting a piece of code from using Array to Set reduced the runtime from ~30s to ~0.3s
mson has quit [Quit: Connection closed for inactivity]
skweek has quit [Ping timeout: 252 seconds]
<raynold>
ahh it's a wonderful day
<ar>
NL3limin4t0r: checking if an element already exists in an array using Array#index proved to be very expensive compared to Set#add?
eckhardt has joined #ruby
kinbiko has quit [Ping timeout: 255 seconds]
<elomatreb>
Which is precisely the point of a Set, checking if an element is in an Array is O(n), in a Set it amortizes to somewhere near constant time
<apeiros_>
same for Hash of course (ruby's Set being implemented using Hash btw.)
apeiros_ is now known as apeiros
<NL3limin4t0r>
ar: Hmm, does it make any difference if you just insert the element and than call #uniq! ?
kies has joined #ruby
<elomatreb>
Yeah that's probably a better way to put it, conceptually a Set might also be a sorted unique-element array/list (log n complexities)
Dimik has joined #ruby
<elomatreb>
NL3limin4t0r: That will be even worse, since uniq is a very expensive operation and the insert doesn't get any better because of that
<apeiros>
ar: Set will work, but since it's documented as not guaranteeing order, I'd just use Hash
<elomatreb>
I wonder if that bit of documentation is just a leftover from the days when Hashes were not documented as ordered though
<apeiros>
i.e. Hash with all values set to true. if you want to iterate, use .each_key. if you want an array at some point: .keys
kinbiko has joined #ruby
<apeiros>
elomatreb: it probably is. but it might well have been left to allow implementing it differently.
<elomatreb>
Set is a Ruby library though, not a native extension
cognoscente has joined #ruby
<apeiros>
yes. but that's an implementation detail.
<apeiros>
and leaving the docs as "set is unordered" may well be intentional to leave "it actually is ordered" an implementation detail too
<elomatreb>
Mh. But it says "it actually is ordered" on Hashes as well, and that's the same line of thought. But I guess it's not really a problem
<ar>
NL3limin4t0r: calling #uniq! makes it take… over 3 minutes now.
<apeiros>
elomatreb: no, ruby's hashes are explicitly ordered. there it's not an implementation detail.
<ar>
so, yeah, going with Hash will be better
dcluna has quit [Ping timeout: 268 seconds]
<apeiros>
it was an informed decision to "sacrifice" 16 bytes per entry to maintain a linked list for the order :)
<elomatreb>
I guess I see what you mean
skweek has joined #ruby
dcluna has joined #ruby
blackmesa1 has quit [Ping timeout: 252 seconds]
claudiuinberlin has joined #ruby
kinbiko has quit [Ping timeout: 264 seconds]
<apeiros>
I mean you can use the implementation detail. chances are very low that it'll change anytime soon. but it's something one would have to be aware. and given how trivial it is to just use Hash, I don't think there's a good point to it :)
exhiled has joined #ruby
ramfjord has joined #ruby
yabbes has joined #ruby
kinbiko has joined #ruby
Emmanuel_Chanel has quit [Read error: No route to host]
al2o3-cr has quit [Ping timeout: 240 seconds]
lytol has joined #ruby
kinbiko has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
kinbiko has joined #ruby
Tagami[m] has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kinbiko has quit [Ping timeout: 252 seconds]
JaccoP has joined #ruby
orbyt_ has joined #ruby
ldnunes has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
goyox86_ has joined #ruby
kinbiko has joined #ruby
daniman has joined #ruby
daniman has left #ruby ["WeeChat 1.9.1"]
kinbiko has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
A124 has joined #ruby
drowze has quit [Ping timeout: 276 seconds]
tvw has quit []
ldnunes has joined #ruby
kinbiko has joined #ruby
<apeiros>
NL3limin4t0r: re your hash question - not really. best you can do is Hash.new(0).merge(your_array.to_h)
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
al2o3-cr has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
tyrese has joined #ruby
<tyrese>
hey
<tyrese>
what happens if I delete .gem?
<apeiros>
.gem is gone
<Papierkorb>
Next question please
<tyrese>
does it break my gems?
<elomatreb>
Considering that's probably where they are stored, yes
<apeiros>
that depends. is .gem a directory which you use a gem home? then es, it'll be broken.
kinbiko has quit [Ping timeout: 240 seconds]
<tyrese>
how do I check
<apeiros>
but since you only said ".gem", we have *zero* idea what it is or what you use it for.
<tyrese>
same here
<tyrese>
lol
<apeiros>
tyrese: how about you provide some actually useful information?
<elomatreb>
Is it a directory? Is it a file? Where is it?
vtx has quit [Quit: vtx]
<jhass>
your PC will stop to boot, don't do it. Next pleaase!
<apeiros>
like: is it a directory? in our home?
<apeiros>
*your
<tyrese>
it's a folder - /root/.gems
<elomatreb>
jhass: It will immediately explode
<jhass>
nono, that's .gems, s for sploiding
<tyrese>
but I want to clean up /root because.. its root
<apeiros>
tyrese: then yes, that's probably where rubygems stores the gems.
<elomatreb>
Ah, right
cdg has quit [Ping timeout: 255 seconds]
<apeiros>
but that still leaves plenty of options. how did you install rubygems?
ldnunes has quit [Ping timeout: 248 seconds]
<elomatreb>
A user-install directory for the root user seems wrong though, shouldn't system-installed gems be in a /usr/lib or something like that?
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tyrese>
gem install
<tyrese>
it's gentoo - who knows
<apeiros>
elomatreb: who knows! any number of distros decide to do whatever the fuck they please
<tyrese>
I had to configure uwsgi with xml
<apeiros>
tyrese: not how you installed gems, how you installed rubygems itself, or rather ruby, since rubygems is part of it
<apeiros>
so yes, your installation uses that directory to store gems.
<tyrese>
is that a safe idea?
<apeiros>
note: it's possible to install rubygems to use different paths.
<apeiros>
define "safe". I use ruby in a user-install only.
<jhass>
are we sure yet there are actually any gems installed there?
<tyrese>
i doubt itll cause any issue now that I think about it
selim has quit [Ping timeout: 248 seconds]
goyox86_ has quit [Read error: Connection reset by peer]
<NL3limin4t0r>
apeiros: Thanks for the response, it moved quite far up.
<jhass>
as root it should use installation directory over user installation directory given there's no --user-install in the configuration, no?
goyox86_ has joined #ruby
goyox86_ is now known as goyox86
exhiled has joined #ruby
Hanma[m] has joined #ruby
watzon has joined #ruby
aviraldg has joined #ruby
M107262[m] has joined #ruby
lasenna[m] has joined #ruby
torarne has joined #ruby
jonjits[m] has joined #ruby
yana[m] has joined #ruby
dtcristo has joined #ruby
erciccione_[m] has joined #ruby
turt2live has joined #ruby
Giphy[m] has joined #ruby
astronavt[m] has joined #ruby
haylon has joined #ruby
velu_aon[m] has joined #ruby
dman[m] has joined #ruby
KevinMGranger has joined #ruby
russt has joined #ruby
<jhass>
tyrese: do you remember the name of a gem you installed? if so, what gives gem which <thatgem>
<elomatreb>
Yeah, the user directory appears in my gem env output as well but it doesn't actually exist
kua[m] has joined #ruby
aagdbl[m] has joined #ruby
Matt[m]2 has joined #ruby
zalipuha[m] has joined #ruby
gokul_mr[m] has joined #ruby
itmerc[m] has joined #ruby
selim has joined #ruby
kinbiko has quit [Ping timeout: 248 seconds]
tyrese has quit [Read error: Connection reset by peer]
blackmesa1 has joined #ruby
csk157 has joined #ruby
kinbiko has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
Guest90_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rm8 has joined #ruby
schemanic has quit [Quit: Leaving]
kinbiko has quit [Ping timeout: 268 seconds]
JustASlacker has joined #ruby
biberu has quit []
NL3limin4t0r has quit [Quit: WeeChat 1.7]
kinbiko has joined #ruby
DTZUZO has quit [Ping timeout: 264 seconds]
axsuul has quit [Ping timeout: 240 seconds]
Flashynuff has joined #ruby
DTZUZO has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
kinbiko has quit [Ping timeout: 240 seconds]
goyox86 has quit [Quit: goyox86]
csk157_1 has joined #ruby
mikecmpbll has joined #ruby
csk157 has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Remote host closed the connection]
alex`` has quit [Quit: WeeChat 1.9.1]
DTZUZO has joined #ruby
kinbiko has joined #ruby
LocaMocha has quit [Ping timeout: 240 seconds]
watzon has quit [Ping timeout: 240 seconds]
erciccione_[m] has quit [Ping timeout: 240 seconds]
aagdbl[m] has quit [Ping timeout: 246 seconds]
velu_aon[m] has quit [Ping timeout: 246 seconds]
jonjits[m] has quit [Ping timeout: 246 seconds]
torarne has quit [Ping timeout: 240 seconds]
Tagami[m] has quit [Ping timeout: 240 seconds]
ozcanesen has joined #ruby
dman[m] has quit [Ping timeout: 252 seconds]
turt2live has quit [Ping timeout: 252 seconds]
itmerc[m] has quit [Ping timeout: 248 seconds]
KevinMGranger has quit [Ping timeout: 248 seconds]
gokul_mr[m] has quit [Ping timeout: 255 seconds]
Matt[m]2 has quit [Ping timeout: 250 seconds]
dtcristo has quit [Ping timeout: 250 seconds]
aviraldg has quit [Ping timeout: 255 seconds]
haylon has quit [Ping timeout: 255 seconds]
zalipuha[m] has quit [Ping timeout: 255 seconds]
yana[m] has quit [Ping timeout: 255 seconds]
kua[m] has quit [Ping timeout: 264 seconds]
lasenna[m] has quit [Ping timeout: 264 seconds]
Hanma[m] has quit [Ping timeout: 264 seconds]
M107262[m] has quit [Ping timeout: 252 seconds]
astronavt[m] has quit [Ping timeout: 276 seconds]
Giphy[m] has quit [Ping timeout: 264 seconds]
alex`` has joined #ruby
plexigras has quit [Ping timeout: 255 seconds]
kinbiko has quit [Ping timeout: 240 seconds]
mint has quit [Ping timeout: 255 seconds]
cloaked1 has joined #ruby
Xiti has quit [Quit: Xiti]
DTZUZO has quit [Ping timeout: 248 seconds]
Technodrome has joined #ruby
vtx has joined #ruby
vtx has quit [Client Quit]
DTZUZO has joined #ruby
goyox86 has joined #ruby
kinbiko has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
goyox86 has quit [Quit: goyox86]
Sembei has joined #ruby
Xiti has joined #ruby
leitao has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
kinbiko has quit [Ping timeout: 276 seconds]
rhyselsmore has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ahrs has quit [Remote host closed the connection]
ozcanesen has quit [Quit: ozcanesen]
ahrs has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
goyox86 has joined #ruby
kinbiko has joined #ruby
epochwolf has quit [Ping timeout: 276 seconds]
epochwolf has joined #ruby
GodFather has joined #ruby
wilbert has joined #ruby
ozcanesen has joined #ruby
goyox86 has quit [Client Quit]
goyox86 has joined #ruby
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
DTZUZO has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
ozcanesen has quit [Client Quit]
DTZUZO has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cdg has joined #ruby
kinbiko has quit [Ping timeout: 255 seconds]
sylario has joined #ruby
kinbiko has joined #ruby
minimalism has joined #ruby
wilbert has quit [Changing host]
wilbert has joined #ruby
wilbert has quit [Quit: wilbert]
cdg has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
kinbiko has quit [Ping timeout: 255 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goyox86 has quit [Quit: goyox86]
kinbiko has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta__ has quit [Remote host closed the connection]
comrumino has quit [Max SendQ exceeded]
strayArch has joined #ruby
DTZUZO has quit [Ping timeout: 255 seconds]
kinbiko has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
strayArch is now known as comrumino
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
kinbiko has joined #ruby
workmad3 has joined #ruby
Psybur has quit [Ping timeout: 246 seconds]
milardovich has quit [Ping timeout: 250 seconds]
despai_ has joined #ruby
ozcanesen has joined #ruby
tomphp has joined #ruby
milardovich has joined #ruby
despai has quit [Ping timeout: 276 seconds]
kinbiko has quit [Ping timeout: 264 seconds]
tomphp has quit [Client Quit]
ozcanesen has quit [Client Quit]
silvermine has joined #ruby
ozcanesen has joined #ruby
jackjackdripper has joined #ruby
tomphp has joined #ruby
kinbiko has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ozcanesen has quit [Client Quit]
wilbert has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Client Quit]
rrichardsr3 has joined #ruby
lexruee has quit [Ping timeout: 268 seconds]
jackjackdripper has joined #ruby
reber has quit [Remote host closed the connection]
mcr1 has joined #ruby
lexruee has joined #ruby
houhoulis has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
kinbiko has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has joined #ruby
ta_ has joined #ruby
tomphp has joined #ruby
blackmesa1 has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
kinbiko has joined #ruby
cdg has joined #ruby
ta_ has quit [Remote host closed the connection]
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
banisterfiend has joined #ruby
ta_ has joined #ruby
kinbiko has quit [Ping timeout: 246 seconds]
raul782 has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
cagomez has quit [Remote host closed the connection]
tcopeland has joined #ruby
Mia has joined #ruby
ha has joined #ruby
Axy has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
kinbiko has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
nwm has quit [Read error: Connection reset by peer]
nwm_ has joined #ruby
hutch34 has joined #ruby
ha has quit [Quit: Leaving]
kinbiko has quit [Ping timeout: 276 seconds]
yabbes has quit [Ping timeout: 255 seconds]
kinbiko has joined #ruby
carel has joined #ruby
jxv has quit [Quit: string on the can snapped off]
<carel>
Hi all
ozcanesen has joined #ruby
<carel>
Is it possible for one to ask for help here or am I in the wrong channel per se ?
<apeiros>
hi carel
<apeiros>
this channel is fine for asking ruby related questions
<carel>
(I have an issue upon a gentoo box, with a rails app which is not seeing a gem or a bundle)
ozcanesen has quit [Client Quit]
<carel>
apeiros: how are you ? and thanks for the reply
<apeiros>
I'm fine
kinbiko has quit [Ping timeout: 240 seconds]
<apeiros>
for rails, there's a specific channel over at #rubyonrails
csk157_1 has quit [Ping timeout: 260 seconds]
<carel>
So I'm getting "Could not find Rake 12.1.0" in a log file and I have wiped my system rake install and run "sudo -u git bundle install --vendor/cache " which seemed to install the gem properly but it's still not seeing it ? (I have google/gitlab/gentoo/stackoverflow and do not really follow the answer, they're a bit ruby speak for me)
ozcanesen has joined #ruby
<carel>
apeiros: Just saw the respone I'll head there.
<elomatreb>
You need to auth to use that channel though
<carel>
apeiros: Thanks for the time btw. Hope I didn't break channel rules too badly.
<carel>
I thin I have, do you mean register on nickserv ?
<elomatreb>
Yep
<carel>
Cool, Thanks and sorry for bombarding.
<apeiros>
carel: don't worry, you didn't. this channel is here for help. or in the worst case, redirection ;-)
kinbiko has joined #ruby
ozcanesen has quit [Client Quit]
<carel>
I have tried looking for a nice terse Python=>Ruby tutorial but they're all lengthy and aimed at novices, you wouldn't happen to have a neat link or two up your sleaves would you ?
mjolnird has quit [Ping timeout: 255 seconds]
<carel>
Perhaps Zetcode has one these days. Learnt Qt in an afternoon with their tuts.
RougeT430 has joined #ruby
mjolnird has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
kinbiko has quit [Ping timeout: 264 seconds]
Asher has joined #ruby
ta_ has quit [Remote host closed the connection]
<apeiros>
hm no, the only one I know is the ~20min tutorial on ruby-lang.org. I doubt that's what you're looking for
<carel>
apeiros: Yeah I tend to loose interest if it starts of with a hello world :D Perhaps I should try for a fibonaci tut. Thanks once again for the friendly help and advice. Gonna work out how to tackle the login with pidgin next :D
<apeiros>
I wish I had advice :)
<apeiros>
but maybe just try a resource which starts without python
<ezrios>
Papierkorb: OK, thanks. I guess I'll have to do some digging
goyox86 has quit [Quit: goyox86]
ramfjord has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
goyox86 has joined #ruby
<ezrios>
I guess I have a followup question - is Ruby BigDecimal subject to loss of significance or catastrophic cancellation when using a fixed precision?
<ezrios>
Fixed number of sigdigs I should say
Crash1hd has left #ruby ["Leaving"]
raul782 has quit [Write error: Connection reset by peer]
oetjenj has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
milardovich has joined #ruby
nchambers is now known as god
god is now known as nchambers
webguynow has quit [Ping timeout: 255 seconds]
webguynow has joined #ruby
skweek has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.9.1]
miskatonic has quit [Remote host closed the connection]
mim1k has joined #ruby
goyox86 has quit [Quit: goyox86]
14WABU5GK has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
clemens3 has quit [Ping timeout: 260 seconds]
troys is now known as troys_
raul782 has quit [Read error: Connection reset by peer]
cschneid has quit [Remote host closed the connection]