side_tracking has quit [Ping timeout: 240 seconds]
cagomez has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
X-Jester has quit [Changing host]
X-Jester has joined #ruby
morenoh149 has joined #ruby
cthulchu has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
cagomez has quit [Ping timeout: 264 seconds]
morenoh149 has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
STYNC has joined #ruby
mcr has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jblack has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 260 seconds]
<zenspider>
how strange... I'm working on some code that generates an Enumerable via chunk_while... if I do `p x.to_a` some later code raises with ZeroDivisionError. If I comment that code out, it doesn't...
jenrzzz_ has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
mcr has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Dimik has joined #ruby
qyliss_ has quit [Quit: bye]
vutral|kali has quit [Ping timeout: 264 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
naztharune has quit [Ping timeout: 248 seconds]
goatish has quit [Quit: Hibernating]
alfiemax has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
STYNC has quit [Quit: testing sorry for the spam]
STYNC has joined #ruby
ResidentBiscuit has quit []
orbyt_ has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
jblack has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
codimiracle has joined #ruby
codimiracle has quit [Remote host closed the connection]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amatas has quit [Quit: amatas]
Nikamura has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
amatas has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
vondruch_ has joined #ruby
alfiemax has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
deadnull has quit [Quit: deadnull]
gary__ has quit [Ping timeout: 260 seconds]
Cavallari has joined #ruby
Cavallari has quit [Client Quit]
tvw has joined #ruby
Cavallari has joined #ruby
jaruga has joined #ruby
gary has joined #ruby
gary is now known as Guest83443
jenrzzz has quit [Ping timeout: 248 seconds]
apparition has joined #ruby
willmichael has quit [Ping timeout: 240 seconds]
bigblind has joined #ruby
Guest83443 has quit [Remote host closed the connection]
willmichael has joined #ruby
Guest36347 has joined #ruby
morenoh149 has joined #ruby
ldnunes has joined #ruby
morenoh149 has quit [Ping timeout: 256 seconds]
amelliaa has joined #ruby
despai has joined #ruby
Guest36347 has quit [Ping timeout: 260 seconds]
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
despai has quit [Client Quit]
dinfuehr has quit [Ping timeout: 256 seconds]
gary__ has joined #ruby
shoogz has joined #ruby
gary__ has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
morenoh149 has joined #ruby
anisha__ has quit [Ping timeout: 248 seconds]
morenoh149 has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 264 seconds]
gary__ has quit [Ping timeout: 268 seconds]
gary__ has joined #ruby
Papierkorb has joined #ruby
mtkd has quit []
konsolebox has joined #ruby
mtkd has joined #ruby
gary__ has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
Mike11 has quit [Quit: Leaving.]
guardianx has joined #ruby
gary__ has quit [Ping timeout: 248 seconds]
gary has joined #ruby
gary is now known as Guest86742
dinfuehr has joined #ruby
ldnunes has quit [Ping timeout: 256 seconds]
Guest86742 has quit [Ping timeout: 276 seconds]
gary_ has joined #ruby
gary_ is now known as Guest24803
SirOliver has quit [Quit: ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
memo1 has joined #ruby
RougeR has quit [Ping timeout: 256 seconds]
goatish has joined #ruby
Guest24803 has quit [Ping timeout: 268 seconds]
memo1 has quit [Ping timeout: 248 seconds]
despai has joined #ruby
floppydh has joined #ruby
<floppydh>
Is there really a benefit for using symbols instead of just plain strings?
gary__ has joined #ruby
<phaul>
they are more light weight
<dminuoso>
floppydh: Not really.
<dminuoso>
floppydh: The real reason is just laziness.
<floppydh>
dminuoso: laziness? how so?
<dminuoso>
floppydh: one character less to type.
SirOliver has joined #ruby
memo1 has joined #ruby
<dminuoso>
floppydh: The point that phaul made is valid, but it's not the real reason we actually do it.
<floppydh>
phaul: they seem more heavyweight? - you hash each "string" and store both the interna-identifier and the string-name?
<dminuoso>
floppydh: a symbol is just a number.
<dminuoso>
(that happens to have a string representation)
<floppydh>
hmmmm... one argument I heard is that it's there for semantics, because if you see a string, it could be a lot of things, but if you use a symbol, it limits the way they can be used?
<dminuoso>
floppydh: as such comparing symbols is O(1), whereas comparing strings is O(n)
<floppydh>
sounds reasonable
<floppydh>
dminuoso: yeah that makes sense
<dminuoso>
floppydh: inside of ruby the purpose of "symbol" is basically to identify things (where comparing to find a match is necessary)
VladGh has quit [Quit: Lost terminal]
<floppydh>
but it seems highly questionable that string-comparisons are really a performance problem in your program and if performance matters why are you using ruby in the first place?
<dminuoso>
methods and variables are two examples that are identified via symbols internally
<dminuoso>
floppydh: it's just an internal optimization
<floppydh>
hmmmm mhm
knight33 has joined #ruby
<dminuoso>
the ruby team decided to just make it available
<phaul>
I think symbols are semmantically different from strings. They serve different purpose, so the real reason is not a perfomrance optimization
<dminuoso>
but the purpose of symbols is not for endusers.
<dminuoso>
its for identifying methods and such
<dminuoso>
for example
<dminuoso>
asm>> a.foo
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/961830
gary__ has quit [Ping timeout: 248 seconds]
<floppydh>
but you basically see them used everywhere no?
<floppydh>
not just in the interpreter
<dminuoso>
floppydh: dial it back a few years.
gary__ has joined #ruby
VladGh has joined #ruby
dinfuehr has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
<phaul>
dminuoso: what was different a few years back?
<dminuoso>
phaul: the "symbols are used everywhere in userland"
<phaul>
hm. was metaprogramming all with Strings back then? I mean metaprogramming is all "userland" isn;t it?
<dminuoso>
floppydh: the principle idea is this: ruby provides a function called rb_intern()
shinnya has joined #ruby
<dminuoso>
floppydh: that function has the signature: ID rb_intern(const char *)
<dminuoso>
Which gives you a universal way of turning a string into an integer that can be compared with at O(1) complexity
<dminuoso>
That mapping is referentially transparent, so every time you pass the same string, you get the same "number representation" back
<dminuoso>
The class Symbol just reifies that ID
<floppydh>
dminuoso: thanks for the lenghty explanation
<dminuoso>
Giving you the "string look" while using the rb_intern mapping as the actual internal value
<floppydh>
very insightful
gary__ has quit [Ping timeout: 248 seconds]
<dminuoso>
floppydh: Oh and the mapping is injective.
jeffreylevesque has quit [Ping timeout: 264 seconds]
<dminuoso>
That should go without saying.
jcalla has joined #ruby
<dminuoso>
phaul: The core difference is this: In order to compare two strings for equality you have to use #== which is O(n). #object_id wont work because
<floppydh>
but I guess the semantics point still makes sense, when you see a symbol you know its used as a reference from/to something - a plain string alone would require additional context
<dminuoso>
floppydh: strings are about data
<dminuoso>
floppydh: symbols about identifying things
VladGh has joined #ruby
<dminuoso>
:foo for example identifies a method
synthroid has joined #ruby
<dminuoso>
which is why
<floppydh>
mhm
<dminuoso>
>> Array.methods
<ruby[bot]>
dminuoso: # => [:[], :try_convert, :new, :allocate, :superclass, :<=>, :module_exec, :class_exec, :<=, :>=, :==, := ...check link for more (https://eval.in/961846)
<dminuoso>
Gives you a list of symbols
<dminuoso>
They identify concrete things.
<dminuoso>
They "name" things.
<dminuoso>
So symbols are about naming things. Strings are just data.
<phaul>
dminuoso: just what I wanted to point out. I think this is the key, the rest ie complexity is just implementation details
<dminuoso>
>> Object.constants
<ruby[bot]>
dminuoso: # => [:Object, :Module, :Class, :BasicObject, :Kernel, :NilClass, :NIL, :Data, :TrueClass, :TRUE, :FalseC ...check link for more (https://eval.in/961847)
<floppydh>
mhm
<dminuoso>
>> a = Struct.new(:a).new(1); p a.instance_vars
<ruby[bot]>
dminuoso: # => undefined method `instance_vars' for #<struct a=1> ...check link for more (https://eval.in/961848)
<floppydh>
I guess you can debate how much of a benefit they actually end up being in the semantics/context case, excluding implementation details
<floppydh>
s/being/making
<floppydh>
but I guess they do seem like a nice-to-have
<dminuoso>
>> a = Struct.new(:a).new(1); p a.instance_variables
<dminuoso>
floppydh: Even instance variables are referred to by symbols =)
<dminuoso>
floppydh: but the "symbol" problem is that its just a reification
<dminuoso>
In reality its just a number, Symbols reify that by giving us a string looking representation
<floppydh>
reifications are good no?
gary has joined #ruby
gary is now known as Guest68290
<dminuoso>
floppydh: You can think of Symbol as a transparent access to the intern lookup table. =P
raynold has quit [Quit: Connection closed for inactivity]
<dminuoso>
:foo is something like rb_intern("foo")
<floppydh>
so its basically syntactic sugar
<dminuoso>
floppydh: More, because rb_intern is a C function.
<dminuoso>
:foo basically exposes this in a nice fashion
<floppydh>
I see
SirOliver has quit [Quit: ZZZzzz…]
_sfiguser has joined #ruby
roshanavand has joined #ruby
rwb has quit [Ping timeout: 276 seconds]
<dminuoso>
floppydh: In reality Symbols are not even objects so
<dminuoso>
Not real objects anyway
<dminuoso>
Which is why you cant do things like
<dminuoso>
>> :foo.singleton_class
<ruby[bot]>
dminuoso: # => can't define singleton (TypeError) ...check link for more (https://eval.in/961851)
<phaul>
but Symbol.ancestors.include? Object so Im a bit confused here
<phaul>
also :foo.kind_of? Object. yet it doesnt behave like an Object.
<phaul>
dminuoso: does it undefine the inherited methods? or how does that work
SirOliver has joined #ruby
guardianx has quit []
Guest68290 has quit [Ping timeout: 256 seconds]
gary_ has joined #ruby
gary_ is now known as Guest11208
<dminuoso>
phaul: Well they exist as minimal objects on the heap
<dminuoso>
phaul: but they are constraint like I have demonstrated
<dminuoso>
>> def :foo.bar; end
<ruby[bot]>
dminuoso: # => /tmp/execpad-8b70edea28fd/source-8b70edea28fd:2: syntax error, unexpected tSYMBEG ...check link for more (https://eval.in/961873)
<dminuoso>
>> def (:foo).bar; end
<ruby[bot]>
dminuoso: # => /tmp/execpad-9a98a6f2d029/source-9a98a6f2d029:2: can't define singleton method for literals ...check link for more (https://eval.in/961874)
<phaul>
right, but where Im confused is method lookup on them. So does ruby implement a specail case for method lookups on Symbols?
<phaul>
otherwise I don't see why they don't inherit from their ancestors
<dminuoso>
phaul: Id have to check the source code first, Im not sure.
<phaul>
dminuoso: ok, no worries:) thanks anyways
tomlukeywood has joined #ruby
InfinityFye has joined #ruby
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
Guest11208 has quit [Ping timeout: 260 seconds]
Psybur_ has joined #ruby
Psybur has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
ogres has joined #ruby
conta has quit [Quit: conta]
anisha has joined #ruby
tomphp has joined #ruby
cdg has joined #ruby
tomlukeywood has quit [Remote host closed the connection]
SirOliver has quit [Quit: ZZZzzz…]
gary__ has quit [Ping timeout: 260 seconds]
nadir has quit [Quit: Connection closed for inactivity]
tomphp has quit [Client Quit]
jaruga has quit [Quit: jaruga]
vondruch has quit [Ping timeout: 260 seconds]
laibulle has joined #ruby
conta has joined #ruby
stormpack has joined #ruby
vondruch has joined #ruby
bmurt has joined #ruby
goatish has quit [Quit: Hibernating]
bmurt has quit [Client Quit]
tvw has quit [Read error: Connection reset by peer]
gary__ has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Client Quit]
InfinityFye has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
pastorinni has joined #ruby
goatish has joined #ruby
InfinityFye has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
vondruch_ is now known as vondruch
DoubleMalt has joined #ruby
DoubleMalt has quit [Client Quit]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
laibulle has quit [Remote host closed the connection]
riotjoe has joined #ruby
gary__ has quit [Ping timeout: 268 seconds]
bmurt has joined #ruby
gary has joined #ruby
gary is now known as Guest68963
k0mpa has joined #ruby
riotjones has quit [Ping timeout: 264 seconds]
SirOliver has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yohji has quit [Ping timeout: 276 seconds]
Guest68963 has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
gary_ has joined #ruby
karapetyan has joined #ruby
gary_ is now known as Guest51036
Psybur_ is now known as Psybur
Psybur has quit [Changing host]
Psybur has joined #ruby
anjen has joined #ruby
<anjen>
ey help 132316
<anjen>
(a quick question about the debuggers gems)
<anjen>
oh...duh nvm...I forgot it's still really early out west. I'll be back later.
ramortegui has joined #ruby
karapetyan has quit [Ping timeout: 268 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yohji has joined #ruby
Guest51036 has quit [Ping timeout: 264 seconds]
gary__ has joined #ruby
bmurt has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
elcontrastador has quit [Ping timeout: 276 seconds]
gary__ has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 248 seconds]
rwb has joined #ruby
gary__ has joined #ruby
safetypin has joined #ruby
naztharune has joined #ruby
herbmillerjr has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
SirOliver has quit [Quit: ZZZzzz…]
jottr has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
TomyWork has joined #ruby
riotjoe is now known as riotjones
gary__ has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has quit [Read error: Connection reset by peer]
DLSteve has joined #ruby
anisha_ has joined #ruby
NL3limin4t0r has joined #ruby
anisha has quit [Ping timeout: 264 seconds]
gary__ has joined #ruby
Zaab1t has joined #ruby
<Zaab1t>
hey -- just getting into ruby. What are your favorite videos/talks?
<NL3limin4t0r>
Zaab1t: If you have a pluralsight account you should watch the "Ruby Fundamentals" cource.
<NL3limin4t0r>
After knowing the fundamentals I learned the most by keeping the official ruby doc by hand. Every core object and method is explained in detail. https://ruby-doc.org/core-2.5.0/
<phaul>
Zaab1t: also Katrina Owen here Be Dragons is very entertaining :)
memo1 has quit [Ping timeout: 268 seconds]
stormpack has quit [Quit: Leaving]
<NL3limin4t0r>
I also have a question, I'm searching for a equivalence operator, but can't seem to find it. Does anyone know if Ruby has one?
Mike11 has joined #ruby
bigblind has quit [Ping timeout: 264 seconds]
moei has joined #ruby
gary__ has joined #ruby
ttttsul has quit [Quit: Bye~]
<NL3limin4t0r>
I basicly want that `true <operator> true` equals `true` and `false <operator> false` equals `true`.
gf3 has quit [Quit: LOLeaving]
<phaul>
== does that
Cavallari has quit [Quit: Cavallari]
<NL3limin4t0r>
xD
<NL3limin4t0r>
I'm stupid
<phaul>
nah, :) we all 'been there
<NL3limin4t0r>
was sunken to deep into a problem
<NL3limin4t0r>
I almost used the revesed XOR `true ^ !true` xD
anjen has quit [Quit: anjen]
gary__ has quit [Ping timeout: 248 seconds]
gary has joined #ruby
jpterry has quit [Ping timeout: 276 seconds]
gary is now known as Guest58007
mikecmpb_ has joined #ruby
riotjoe has joined #ruby
mikecmpbll has quit [Ping timeout: 256 seconds]
<dminuoso>
Boolean algebra courses should be a requirement for learning programming.
[Butch] has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
Rapture has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
jrafanie has joined #ruby
herbmillerjr has quit [Ping timeout: 276 seconds]
type1team has quit [Read error: Connection reset by peer]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
despai has quit [Quit: ...]
ldnunes has quit [Ping timeout: 256 seconds]
Gnut has joined #ruby
despai has joined #ruby
despai has quit [Client Quit]
<Mike11>
actually, reversed XOR is completely equivalent to the equal operator
despai has joined #ruby
despai has quit [Client Quit]
despai has joined #ruby
memo1 has joined #ruby
Guest58007 has quit [Ping timeout: 248 seconds]
jpterry has joined #ruby
gary_ has joined #ruby
gary_ is now known as Guest49851
yohji has quit [Ping timeout: 248 seconds]
<Zaab1t>
thanks phaul, checking them out!
memo1 has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
jaruga has joined #ruby
despai has quit [Quit: ...]
synthroid has joined #ruby
Guest49851 has quit [Ping timeout: 240 seconds]
netherwolfe has joined #ruby
<phaul>
Zaab1t: it's also worth looking for Jim Weirich (RIP) on youtube.
<phaul>
he had a talk on rake and xml buildier which was cool
yohji has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
gary__ has joined #ruby
char_var[buffer] has quit [Ping timeout: 248 seconds]
ldnunes has joined #ruby
goatish has quit [Quit: Hibernating]
SirOliver has joined #ruby
floppydh has quit [Quit: WeeChat 2.0.1]
Matthew1 has quit []
aufi has quit [Remote host closed the connection]
gary__ has quit [Ping timeout: 268 seconds]
alex`` has quit [Quit: WeeChat 2.0.1]
Exuma has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CrazyEddy has joined #ruby
conta has quit [Ping timeout: 268 seconds]
mikecmpb_ has quit [Quit: inabit. zz.]
gary has joined #ruby
gary is now known as Guest6147
mikecmpbll has joined #ruby
yaewa has joined #ruby
alex`` has joined #ruby
moei has quit [Ping timeout: 248 seconds]
TomyWork has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
jottr_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
_sfiguser has quit [Ping timeout: 248 seconds]
jottr has quit [Ping timeout: 256 seconds]
Guest6147 has quit [Ping timeout: 268 seconds]
gary_ has joined #ruby
gary_ is now known as Guest61642
synthroid has joined #ruby
lytol has joined #ruby
alfiemax has quit [Remote host closed the connection]
tomphp has joined #ruby
Yzguy has joined #ruby
roychri has joined #ruby
Guest61642 has quit [Ping timeout: 268 seconds]
nowhereman_ has joined #ruby
<dminuoso>
phaul: I wonder whether he is related to Stephanie Weirich.
andikr has quit [Remote host closed the connection]
kies has quit [Ping timeout: 260 seconds]
gary__ has quit [Ping timeout: 240 seconds]
jottr_ has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
desperek has joined #ruby
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
apparition has joined #ruby
gary__ has joined #ruby
eightlimbed has joined #ruby
jcarl43 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
phenom has quit [Ping timeout: 265 seconds]
gary__ has quit [Ping timeout: 248 seconds]
cschneid has joined #ruby
orbyt_ has joined #ruby
phenom has joined #ruby
adgtl has joined #ruby
<adgtl>
clear
<adgtl>
Folks
<adgtl>
Anyone wrote
<adgtl>
anyone wrote Reactive web application with Ruby?
mcr has quit [Ping timeout: 260 seconds]
<adgtl>
similar to Reactive Manifesto one?
jottr_ has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gary__ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
Zaab1t has quit [Remote host closed the connection]
ltt has joined #ruby
ltt is now known as bloomingbits
\void has joined #ruby
quobo has joined #ruby
<havenwood>
adgtl: Rails has ActionCable with WebSockets and fallbacks these days. Rails apps like Discourse prefer MessageBus, which is a similar channel but disfavors WebSockets.
dmitriy_ has quit [Read error: Connection reset by peer]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
HashNuke has quit [Remote host closed the connection]
HashNuke has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
gary has joined #ruby
pastorin_ has quit [Remote host closed the connection]
gary is now known as Guest70503
<dalitom>
Thanks guys, I think SET works for me !!!!
orbyt_ has quit [Ping timeout: 240 seconds]
Asher1 has joined #ruby
Klumben has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Asher1 is now known as sher
Guest70503 has quit [Ping timeout: 248 seconds]
Asher has quit [Disconnected by services]
sher is now known as Asher
mtkd has joined #ruby
eightlimbed has quit [Ping timeout: 276 seconds]
adlerdias has quit [Ping timeout: 264 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Mighty_Warthog has quit [Read error: Connection reset by peer]
synthroid has quit [Remote host closed the connection]
jamesaxl has quit [Read error: Connection reset by peer]
AxelAlex has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
<dminuoso>
Interesting.
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
jnollette has quit [Remote host closed the connection]
synthroid has joined #ruby
jnollette has joined #ruby
Psybur has quit [Ping timeout: 265 seconds]
<swein>
I have an in depth question, lets say I have a hash of keys[1,2,3] and key[1]=[a-z], but key 2 and 3 have only varying letters from the alphabet. What's a good way to insert empty strings "" to provide spacing so when creating CSV rows, it will all line up with columns of A's B's C's,
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<swein>
I may need to read class CSV better to see if it provides built in ability to do the searching/scanning and moving columns of like row header values
AxelAlex has joined #ruby
jerikl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
dmitriy_ has joined #ruby
n008f4g_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
jamiejackson has quit [Ping timeout: 240 seconds]
gary_ has joined #ruby
gary_ is now known as Guest80149
Mike11 has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Guest80149 has quit [Ping timeout: 264 seconds]
beauby has joined #ruby
gary__ has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
beauby has quit [Ping timeout: 268 seconds]
theinquisitor has joined #ruby
live__ has quit [Quit: Leaving]
cdg has joined #ruby
gary__ has quit [Ping timeout: 248 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
eckhardt has joined #ruby
morenoh149 has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
shinnya has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<terens>
I am using concurrent ruby. I want to build a simple downloader ( a class?) that would download a specific file via http , and update the download progress.
<terens>
I am looking for a clean way to get the progress
tomphp has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
<gizmore>
terens: tricky
morenoh149 has quit [Ping timeout: 260 seconds]
<gizmore>
terens: involves threading?
ShekharReddy has joined #ruby
eightlimbed has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
quobo has joined #ruby
rwb has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
sidetracking has joined #ruby
ta__ has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
despai has quit [Quit: ...]
<terens>
gizmore, yes
ldnunes has quit [Quit: Leaving]
<swein>
tqdm does that
eckhardt_ has joined #ruby
<swein>
thread.tqdm
<swein>
anything enumeratable
<swein>
enumerable*
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
despai has joined #ruby
<gizmore>
terens: would require you to download at a lowlevel, updating bytes received
<gizmore>
right?
eckhardt has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
dalitom has quit [Quit: Page closed]
sammi`_ has quit [Quit: Lost terminal]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
gary has joined #ruby
sammi` has joined #ruby
gary is now known as Guest80189
<terens>
I have implemented that already
<terens>
With nethttp
alfiemax has quit [Ping timeout: 248 seconds]
Dimik has quit [Ping timeout: 265 seconds]
pastorinni has joined #ruby
sameerynho has quit [Ping timeout: 265 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
conceivably has quit [Remote host closed the connection]
Guest80189 has quit [Ping timeout: 248 seconds]
Papierkorb has joined #ruby
Cavallari has quit [Quit: Cavallari]
<gizmore>
terens: then maybe use threading
<gizmore>
terens: with your http thread, write to "bytes received"
<gizmore>
terens: with your main thread, readonly "bytes received"
<gizmore>
something like that might work
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
tfitts has joined #ruby
willmichael has quit [Quit: Quit]
willmichael has joined #ruby
Ltem has quit [Quit: Leaving]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
despai has quit [Quit: ...]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
kies has joined #ruby
alfiemax has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcalla has quit [Quit: Leaving]
synthroid has quit []
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
terens has quit [Ping timeout: 248 seconds]
despai has joined #ruby
morenoh149 has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.0.1]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 248 seconds]
morenoh149 has quit [Ping timeout: 240 seconds]
jeffreylevesque has quit [Ping timeout: 240 seconds]
despai has quit [Quit: ...]
<gizmore>
nil.map{|niL|nil} # works as nop?
eightlimbed has quit [Ping timeout: 268 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
gary_ has joined #ruby
rwb has joined #ruby
gary_ is now known as Guest97448
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pastorinni has quit [Remote host closed the connection]
pastorinni has joined #ruby
eightlimbed has joined #ruby
kapil___ has joined #ruby
<phaul>
nope ? :D
eightlimbed has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Guest97448 has quit [Ping timeout: 264 seconds]
<gizmore>
nil # works as nop?
Nicmavr has joined #ruby
keithy has quit [Quit: keithy]
ramfjord has joined #ruby
Nicmavr is now known as Guest99240
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
<mozzarella>
why do you need noop?
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<gizmore>
mozzarella: doing nothin
<mozzarella>
gizmore: just do nothing instead
<gizmore>
how? :D
<gizmore>
last statement gets returned
<gizmore>
you cannot do nothing in ruby maybe
lytol has quit [Remote host closed the connection]
<gizmore>
active record sucks?
<mozzarella>
give us an example
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<gizmore>
mozzarella: of active record sucking?
<gizmore>
i only can use very basic datatypes, like string,text,int,decimal
<gizmore>
if i want a datatype like "email" i gotta write all the stuff all over again... like varchar(255), charset, the validators, etc
<gizmore>
there is no easy way to define new datatypes for activerecord
<gizmore>
then, there is no outofthebox cache for activerecord
<gizmore>
a find(1) always does a query.... an ootb cache would not ask the db
alfiemax has joined #ruby
dmitriy_ has joined #ruby
d_kam has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<gizmore>
ActiveRecord does not feature composed primary keys, like userid INT(11) friendid INT(11)
<gizmore>
ActiveRecord is slow as hell?
<havenwood>
gizmore: Do you mean it's slow at creating SQL or that it creates slow SQL?
<havenwood>
gizmore: There is an out-of-the-box cache with ActiveRecord.
<gizmore>
it has significant general overhead for what it does
<havenwood>
gizmore: You mean memory?
<gizmore>
clock cycles
<havenwood>
gizmore: Huh?
alfiemax has quit [Ping timeout: 240 seconds]
<havenwood>
gizmore: So ActiveRecord is generating SQL too slow for you? Benchmarks?
<havenwood>
gizmore: SQL is SQL.
<gizmore>
benchmark is a good idea..... anyway....
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<gizmore>
i had to work with rails for 2 or 3 years.... then did a private project for 1 or 2 years
<gizmore>
then i decided the redo all on my own from scratch
sameerynho has joined #ruby
<gizmore>
and i think i came uo with a nice pattern
<lupine>
slow in every possible way :p
<gizmore>
an own type system \o/
<gizmore>
i did own type system in ruby... but could not teach it to activerecord
<gizmore>
i redid all in php.... with type hinting.... and i think i can beat AR in some aspects (not all)
<gizmore>
i am looking forward to ruby3?? with type hinting
<havenwood>
I had a lovely time with ActiveRecord and Postgres.
<havenwood>
Though <3 Sequel.
<gizmore>
my stuff doesnt support Postgres.... only mysql/maria
<gizmore>
but it offers features like choosing your storage engine
<gizmore>
also my cache is .... working
<gizmore>
i call it "Single Identity Cache"
<havenwood>
gizmore: I think you'll find you can extend ActiveRecord types as you see fit. I don't really agree with any of your criticisms.
<havenwood>
I'm also puzzled by your penchant for PHP. ;-P
shortdudey123 has quit [Ping timeout: 240 seconds]
<lupine>
activerecord is a poor implementation of the activerecord antipattern
<lupine>
there's very little to recommend in it
<gizmore>
havenwood: php offers type hinting. which aids and helps your IDE
Dimik has joined #ruby
<havenwood>
lupine: I prefer Sequel but don't really have a problem with ActiveRecord.
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<lupine>
you do, you're just institutionalised not to notice :p
<havenwood>
Ecto is nice these days.
alex`` has quit [Ping timeout: 256 seconds]
<havenwood>
gizmore: That's not DRY. The thing is what it is. It's not the Ruby way to repeat things for the sake of the machine.
<gizmore>
havenwood: you mean type hinting?
<lupine>
(but ruby could really do with strong typing)
<havenwood>
gizmore: If you like Ruby but would prefer explicit types, consider Crystal. Pretty sure I suggest this every time you come here to talk about PHP type hinting.
<gizmore>
ruby will get type hinting soon, afaik
<havenwood>
gizmore: No, it won't.
<lupine>
(don't use crystal, it's awful)
<gizmore>
i heard type hinting is planned for ruby core :(
* lupine
sets up stall as an oracle, makes money
<havenwood>
gizmore: Ruby 3 might include some static type analysis. It won't include anything you type inline in your code. It's a tool that you can use.
<gizmore>
when you got like 100k loc, loose typing is hell
gary has joined #ruby
goatish has joined #ruby
gary is now known as Guest99887
sameerynho has quit [Ping timeout: 256 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
gizmore: ?? I don't think you mean loose typing.
<havenwood>
gizmore: Do you mean weakly typed not loosely typed?
<gizmore>
maybe
<havenwood>
gizmore: Anyway, Ruby is strongly typed.
<gizmore>
yeah right.... but your IDE cant know the types
<gizmore>
means you cannot browse code nicely
<gizmore>
and have code completion nicely
<havenwood>
gizmore: The Ruby 3 plans will allow for all of that, without you having to change your code.
kies has quit [Ping timeout: 252 seconds]
shortdudey123 has joined #ruby
<gizmore>
havenwood: yeah. i am definately looking forward to a better ruby
<gizmore>
the syntax, ecosystem, etc.. all is very nice in ruby
<gizmore>
php sucks here and there
<gizmore>
like "you cannot throw exceptions in __toString()" wtf
Guest99887 has quit [Ping timeout: 248 seconds]
<gizmore>
ruby does not suffer from such core problems
<havenwood>
gizmore: I don't use an IDE but I'm sure it will be nice.
<gizmore>
i hope so :)
<gizmore>
ruby is the most elegant language i have learned so far
<gizmore>
everything is code =)
<gizmore>
i still have to learn python and perl
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<gizmore>
on a scale from bash to php... how well does your IDE handle ruby :P
alfiemax has joined #ruby
<havenwood>
[T]he third major goal of the Ruby 3 is adding some kind of static typing while keeping the duck typing, so some kind of structure for soft-typing or something like that... It’s just a compile time check. [Y]ou can use that kind of information in IDEs so that the editors can use that data for their code completion..." ~ Matz
<gizmore>
yeah!
<gizmore>
looking forward to that
<havenwood>
Tooling is important.
<gizmore>
might recode my stuff in ruby then
<gizmore>
without rails and ActiveRecord
<gizmore>
all selfmade
<gizmore>
own type system for the win
bigblind has quit [Ping timeout: 256 seconds]
<gizmore>
most types inherit from GDT_String or GDT_Int
<gizmore>
they know how to behave in db, forms, cards, lists, html, json
amatas has quit [Quit: amatas]
<gizmore>
types like GDT_PhoneNumber add some validations or additional features.... all covered by type hinting, making it easy to write code using the types
clemens3 has quit [Ping timeout: 260 seconds]
<gizmore>
like GDT_PhoneNumber::make()->countrycodes('+49')
<gizmore>
the "countrycodes" function would be suggested by your IDE... because "make()" returns self... "GDT_PhoneNumber" in this case
AJA4350 has quit [Ping timeout: 240 seconds]
bigblind has joined #ruby
willmichael has quit [Ping timeout: 256 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]