aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sina has quit [Quit: Connection closed for inactivity]
Aliv3 has joined #ruby
Devalo has joined #ruby
orbyt_ has joined #ruby
troys_ is now known as troys
Success has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
_sfiguser has quit [Quit: Leaving]
mim1k has joined #ruby
Devalo has quit [Ping timeout: 268 seconds]
troys has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 255 seconds]
mim1k has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
tcopeland has joined #ruby
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
Lyubo1 has quit [Ping timeout: 252 seconds]
alfiemax has quit [Ping timeout: 255 seconds]
Devalo has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
Devalo has joined #ruby
nowhere_man has joined #ruby
lytol has quit [Remote host closed the connection]
rubyguynew has joined #ruby
Lyubo1 has joined #ruby
lexruee has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jameser has joined #ruby
lexruee has quit [Client Quit]
Devalo has quit [Ping timeout: 260 seconds]
<rubyguynew>
hey guys i'm having problems with saving non-standard letters such as ø to a file, i tried adding # encoding: utf-8 to the top of my source file, but doesn't really work anyone got advice?
lexruee has joined #ruby
lexruee has quit [Remote host closed the connection]
<apeiros>
for procs yes, for methods, it'd be nice since you could avoid `def foo(a, b, c); @a = a; @b = b; @c = c; end`
<apeiros>
you'd be able to just `def foo(@a, @b, @c); end`
* apeiros
off for commute, laters!
apeiros has quit []
al2o3-cr has quit [Ping timeout: 240 seconds]
lytol has joined #ruby
Rouge has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
gradio has joined #ruby
anisha has joined #ruby
mbr has quit [Quit: leaving]
nofxx has quit [Ping timeout: 255 seconds]
gradio has quit [Ping timeout: 260 seconds]
michael3 has quit [Ping timeout: 240 seconds]
ap4y1 has quit [Quit: WeeChat 1.9.1]
etehtsea has joined #ruby
al2o3-cr has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
etehtsea has quit [Client Quit]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
scientes has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
gradio has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
dionysus69 has joined #ruby
jenrzzz has joined #ruby
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
daxroc has quit [Ping timeout: 252 seconds]
Brak____________ has quit [Ping timeout: 252 seconds]
Chew has quit [Ping timeout: 252 seconds]
AndyWojo has quit [Ping timeout: 255 seconds]
mr_foto has quit [Remote host closed the connection]
kryptoz has quit [Remote host closed the connection]
papanik has quit [Ping timeout: 260 seconds]
AndyWojo has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
conta has joined #ruby
Devalo has joined #ruby
konsolebox_ has quit [Ping timeout: 248 seconds]
Immune has quit [Ping timeout: 248 seconds]
_ppp is now known as pwns3c
enterprisey has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
pwns3c is now known as _ppp
ShekharReddy has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
konsolebox has quit [Ping timeout: 260 seconds]
mjolnird has joined #ruby
ur5us has joined #ruby
<_ppp>
Hello, i would like to write a backend server and i dont master any programming languages. i did some nodejs some sinatra/ruby but have time to learn a solid language (1month) and start writing the backend. The backend mainly would authenticate users have a dashboard for monitoring stuff and a place to do some ui drag and drop stuff and some api calls. Can you please guide me in the best way to tackle this project? Should i
<_ppp>
consider python?php?ruby?
<elomatreb>
Well, asking in a Ruby channel you probably know the answer we'll give. You should be able to do this relatively easily with Rails, but other languages are just as capable
al2o3-cr has joined #ruby
_ppp has left #ruby ["Leaving"]
konsolebox has joined #ruby
rupam123456 has joined #ruby
aroaminggeek has joined #ruby
_ppp has joined #ruby
_ppp has left #ruby ["Leaving"]
<apeiros_>
given the seemingly smallish task and the limited time (1 month), I'd probably go with sinatra over rails
apeiros_ is now known as apeiros
ramfjord has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
mson has quit [Quit: Connection closed for inactivity]
al2o3-cr has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
Devalo has joined #ruby
nofxx has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Devalo has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
guille-moe has joined #ruby
biberu has joined #ruby
aufi has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
TomyWork has joined #ruby
Technodrome has joined #ruby
Hexafox[I] has joined #ruby
claudiuinberlin has joined #ruby
madhatter has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 248 seconds]
BioSpider has joined #ruby
BioSpider has quit [Max SendQ exceeded]
BioSpider has joined #ruby
BioSpider has quit [Max SendQ exceeded]
al2o3-cr has joined #ruby
madhatter has joined #ruby
konsolebox has quit [Ping timeout: 255 seconds]
BioSpider has joined #ruby
konsolebox has joined #ruby
Sina has joined #ruby
mark_66 has joined #ruby
Defenestrate has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
alfiemax_ has quit [Remote host closed the connection]
konsolebox has joined #ruby
elphe has joined #ruby
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
dinfuehr has joined #ruby
hs367 has joined #ruby
postmodern has quit [Quit: Leaving]
hs367 has quit [Remote host closed the connection]
quarters has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 240 seconds]
hightower2 has joined #ruby
selim has quit [Ping timeout: 268 seconds]
marr has joined #ruby
selim has joined #ruby
ur5us has quit [Remote host closed the connection]
tomphp has joined #ruby
gradio has left #ruby ["Leaving"]
aupadhye has joined #ruby
dn` has quit [Read error: Connection reset by peer]
QualityAddict has quit [Remote host closed the connection]
dn`_ has joined #ruby
zautomata has quit [Ping timeout: 255 seconds]
guille-moe has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
QualityAddict has joined #ruby
MrSparkle has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
alfiemax has joined #ruby
<Bish>
im having a model, which changes another model on save
<Bish>
for a batch insert, i dont want that "hook" to run
<Bish>
right now i am having a class variable set to false, if i don't want this behaviour to happen
<Bish>
but now i have multiple threads in a single process, where some might want this behaviour some do not..
<Bish>
how do i go with that?
alfiemax has quit [Ping timeout: 248 seconds]
MrSparkle has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
Devalo has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
minimalism has quit [Quit: minimalism]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nahra` has quit [Remote host closed the connection]
<apeiros>
Bish: best would probably to untangle that save. i.e. that your model never saves another model on its own save.
nahra has joined #ruby
duderonomy has joined #ruby
Ag3nt has joined #ruby
Brak____________ has joined #ruby
daxroc has joined #ruby
Chew has joined #ruby
<Bish>
well, i wanted to be transparent..
alfiemax has joined #ruby
<Bish>
because users of that software can define their own "selections" of said mdoel
<Bish>
for example "find every user which last name begins with X"
<Bish>
and if a user marries, and changes his name to Charles Xavier
<Bish>
i want him to be part of that selection
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
p0p0pr37_ has joined #ruby
<Bish>
so i wanted this to be as transparent as possible
<Bish>
it works well, but as soon as i do batch inserts, it's too slow
Freshnuts has quit [Quit: Leaving]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
bmn has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 268 seconds]
p0p0pr37 has quit [Ping timeout: 255 seconds]
p0p0pr37_ is now known as p0p0pr37
alfiemax has quit [Ping timeout: 248 seconds]
bmn has joined #ruby
Serpent7776 has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
imode has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
Beams has joined #ruby
elphe has quit [Ping timeout: 258 seconds]
elphe has joined #ruby
rikkipitt has joined #ruby
Azure has quit [Read error: Connection reset by peer]
<elomatreb>
That sounds like something that should be solved on the database level? (Not to mention the concept of last/first name being difficult if you have international users)
Azure has joined #ruby
sjors_ has joined #ruby
Devalo has joined #ruby
<sjors_>
Is it possible to call a method that has keyword parameters by providing a hash containing the keys and arguments?
Veejay has joined #ruby
Caius has quit [Remote host closed the connection]
<elomatreb>
Yes, ** does keyword splatting
<Veejay>
Hello everyone, I was wondering, is there a way to create a Queue from existing data? (Array, Set, etc)
<Veejay>
Having to call new then iterating over the data to push them to the Queue seems strangely involved for Ruby
<Veejay>
(Queue in the context or Thread I mean)
<Veejay>
of*
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
alfiemax has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
<sjors_>
elomatreb: Thank you, I will look into that
alfiemax has quit [Ping timeout: 260 seconds]
osvimer has quit [Ping timeout: 248 seconds]
anisha has quit [Quit: This computer has gone to sleep]
osvimer has joined #ruby
pifon has quit [Quit: Connection closed for inactivity]
plexigras has joined #ruby
ldnunes has joined #ruby
guille-moe has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
armando has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
Defenestrate has quit [Quit: Leaving]
Devalo has quit [Ping timeout: 240 seconds]
ferr has joined #ruby
ferr has left #ruby [#ruby]
Devalo has joined #ruby
sjors_ has quit [Quit: This computer has gone to sleep]
sjors_ has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
alfiemax has joined #ruby
tomphp has joined #ruby
osvimer has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 250 seconds]
<Bish>
elomatreb: oh wow, thats a complex task
<Bish>
elomatreb: those "user defineable selections" are implemented in ruby
<Bish>
i would have to write a parser for the own syntax i created in plpgsql
<Bish>
but in future projects, i would do that, yes.
<elomatreb>
Sure, but depending on what selections you have you can probably do them in SQL (maybe even through the AR interface), which is usually faster than doing it in Ruby
<elomatreb>
But I don't know your system so I'll shut up
<Bish>
well, my end-user are not technical...
<Bish>
so i have a dialog.. where they can click them together, phpmyadmin style
<matthewd>
Bish: No.. this is a solution to your stated "don't save changes to the related object" problem
<matthewd>
Yeah.. sort of
<Bish>
i get it, yes, i am not using activerecord
<Bish>
i hate rails and everything that comes with it
<matthewd>
It's funny because it was a hugely controversial feature because no-one would want it
claudiuinberlin has joined #ruby
<matthewd>
Yeah, I assumed so. And that makes it even funnier.
<Bish>
well i don't want it either, but i need it performance wise
al2o3-cr has joined #ruby
<Bish>
otherwise my customer wait 24 hour for an import
<Bish>
been there, was not a happy time
<matthewd>
Well, I assumed you weren't using it. Actively hating it is an option too, I suppose.
<Bish>
the only
<bob_f>
Eh. If you don't want to use some default Rails magic then don't use it. i.e. remove your related-object hook and call it explicitly, and then abstract all of that away.
<Bish>
or don't use rails because it's unflexiable af
<Bish>
but i don't want to start a flamewar
<Bish>
never used it, because of said reason
<Bish>
so i would rather not judge
<bob_f>
If Rails is one thing, it's unflexiable. I can't argue that.
<Bish>
something like my selection implementation in rails, i would kill myself
<Bish>
land i am not saying this lightly, i mean it
<matthewd>
You hate it and everything that comes with it, and it's 'unflexiable af', but you've never used it. And you don't want to start a flamewar.
<Veejay>
Burgestrand: Not that big of an issue though, it's litterally two lines, thanks a lot
<bob_f>
Why not just use arel ?
<Bish>
matthewd: well, i tried to use it, until i noticed how unflexible it is
<Burgestrand>
Veejay I double-checked with the source and I can say it's a definite no :)
<bob_f>
Bish: unflexiable*
<Bish>
bob_f: thanks
<Bish>
and startup times where horrible back then atleast
<Bish>
bob_f: what's arel?
<Bish>
whats*
<Bish>
no that was correct, right? confused today :(
<bob_f>
Bish: ActiveRelation. It's what ActiveRecord is built on top of.
<matthewd>
It falls under the "everything that comes with it" banner
<bob_f>
You can use it to build queries.
<Veejay>
Burgestrand: And also, I was only wondering because I'm making liberal use of the Queue (I gather the data prior to creating the queue, when usually, the queue is being populated dynamically, as the threads are already consuming it)
GodFather has joined #ruby
<Bish>
bob_f: well, i google'd it up, and what does arel give me except building sql with strings?
<Burgestrand>
Veejay :)
<Burgestrand>
Bish the point of arel is to not build SQL with strings
<Bish>
certainly can't create a user definable select with it? can i?
<bob_f>
Sure you can.
rikkipitt has quit [Quit: Leaving...]
<bob_f>
You may have to do some programming though, so be careful.
<Bish>
well, i am using sequel for that, and i really think this cannot keep up
<Bish>
wehn i read .where('a < 3')
<matthewd>
It's an important component in AR/Rails's flexiability
<Bish>
lol, which isn't existing you say.
dn`_ has quit [Quit: dn`_]
dn` has joined #ruby
<matthewd>
You may have confused me with yourself, there. But okay. Sequel is a great library, so if you're happy with that, great.
<Bish>
sorry, really don't want to be that guy.. but i REALLY really cannot see how ActiveRecord is ANY good
<Bish>
it's not like im argueing iphone vs android or something
<Bish>
best thing i can say about it is it's platform independent? i think? works on every db same way?
<Bish>
certainly can argue that's a good thing
<Bish>
not a good thing*
<matthewd>
You seem to be trying very hard to pick a fight, while also trying pretty hard to throw vague insults instead of identifying concrete shortcomings
tacoboy has joined #ruby
<Bish>
no. sorry.. can't stop.. in this particular manner
<elomatreb>
(and of course not trying to start a flamewar)
<Bish>
but i will try
<Bish>
nono, really, don't want that, but i have storng feelings regarding that
<matthewd>
That's not going to provide a productive conversation, so it's time to call this discussion concluded
<matthewd>
Bish: The trick is you don't have to share them
<Bish>
you're right
<Bish>
matthewd: well, depends on what you want i guess
tacoboy has quit [Remote host closed the connection]
<Bish>
after_create -> { ...
<Bish>
what kind of syntax is that?
<Bish>
first parameter=proc{} ?
charliesome has joined #ruby
<matthewd>
Ruby, and yes that's a stabby lambda
<Bish>
isn't that confsing while the rest of the world uses blocks in ruby?
<Bish>
i mean i like it, it looks like some event-based language
<Bish>
this ->{ that }
<Bish>
but never seen it
<bob_f>
:\
<matthewd>
I don't know where you're seeing this example
<Bish>
guess after_create can do both? get a stabby as first parameter, or a block?
<matthewd>
Yes, it accepts both, mostly to allow using other non-proc callables. I don't have any particular reason one would use that form with a proc directly.
* dminuoso
raises a hand
<dminuoso>
in-place function composition!
* dminuoso
hides from the harsh comment matthewd is preparing to type
<matthewd>
dminuoso: In this context, as a parameter to after_create
<matthewd>
:P
<dminuoso>
matthewd: Yes, I know. :P
<Bish>
i like it, more readable than after_create {... } even though it's subtle
mr_foto has joined #ruby
<matthewd>
My guess would be that David's just unused to using that form, because he's more likely to use a symbol + a method
<dminuoso>
matthewd: Honestly I enjoy the fact that unlike Enumerable Rails is much more open to callables instead of blocks.
<Bish>
then what are blocks good for dminuoso ?
<dminuoso>
Bish: Blocks are just a low level optimization for avoiding to create an RObject around the internal block.
<dminuoso>
Semantically they are just functions (like proc/lambda)
<Bish>
blocks are faster, like, really?
<Bish>
didn't even expect that
<dminuoso>
Bish: A tiny bit because ruby does not have to create an explicit object around them. It's not much honestly.
<Bish>
dminuoso: well, but you could live without them?
<Bish>
if you say you like the fact rails uses procs more regulary?
|ifei5good has joined #ruby
|ifei5g00d has quit [Read error: Connection reset by peer]
mr_foto has quit [Client Quit]
Devalo has joined #ruby
zautomata has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamarun has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 240 seconds]
Ag3nt has quit [Ping timeout: 240 seconds]
biberu has quit [Ping timeout: 260 seconds]
jaruga has joined #ruby
biberu has joined #ruby
BioSpider has quit [Read error: Connection reset by peer]
al2o3-cr has quit [Ping timeout: 240 seconds]
BioSpider has joined #ruby
Devalo has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
reaVer has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
drowze has joined #ruby
Technodrome has joined #ruby
Ag3nt has joined #ruby
alfiemax has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nickjj has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
guille-moe has quit [Ping timeout: 268 seconds]
Elodin has joined #ruby
al2o3-cr has joined #ruby
<Elodin>
hello, how do i make installed gems to be in my path, i just had to install tmuxinator and i would like its executable to be in my path
al2o3-cr has quit [Ping timeout: 240 seconds]
<Elodin>
nevermind i think i should add the gems/bin manually to path
Bish has quit [Ping timeout: 248 seconds]
Bish has joined #ruby
rabajaj has quit [Quit: Leaving]
raynold has quit [Quit: Connection closed for inactivity]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Elodin has left #ruby ["WeeChat 1.9.1"]
uZiel has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
guille-moe has joined #ruby
voker57 has quit [Remote host closed the connection]
JsilverT has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
<KrzaQ>
I want to upload a fairly large file over https. Normally, I'd use the httpclient gem, but I want to show upload progress as it goes - does anyone know if it's feasible with it, or if there's an alternative?
claudiuinberlin has quit [Max SendQ exceeded]
ramfjord has quit [Ping timeout: 248 seconds]
alfiemax_ has joined #ruby
hogetaro has joined #ruby
Psybur has joined #ruby
ogres has joined #ruby
synthroid has joined #ruby
yeticry has quit [Ping timeout: 248 seconds]
pwnd_nsfw has quit [Ping timeout: 248 seconds]
yeticry has joined #ruby
apparition has joined #ruby
BTRE has quit [Quit: Leaving]
pwnd_nsfw has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 260 seconds]
kryptoz has joined #ruby
al2o3-cr has joined #ruby
govg has joined #ruby
BTRE has joined #ruby
yeticry_ has joined #ruby
Puffball has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rouge has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
Burgestrand has quit [Quit: Closing time!]
al2o3-cr has quit [Ping timeout: 240 seconds]
drowze has quit [Quit: WeeChat 1.9.1]
tacoboy has joined #ruby
dviola has joined #ruby
im0nde has joined #ruby
hutch34 has joined #ruby
kristofferR has joined #ruby
Hexafox[I] has quit [Ping timeout: 240 seconds]
Ag3nt has quit [Quit: leaving]
Mon_Ouie has quit [Quit: WeeChat 1.9.1]
alfiemax_ has quit []
Rouge has quit [Ping timeout: 255 seconds]
kryptoz has quit [Remote host closed the connection]
bmurt has joined #ruby
shinnya has joined #ruby
cdg has joined #ruby
rgr has joined #ruby
kryptoz has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
Rouge has joined #ruby
iamarun has joined #ruby
alveric1 has joined #ruby
alveric has quit [Ping timeout: 248 seconds]
jameser has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
BioSpider has quit [Ping timeout: 246 seconds]
ledestin has joined #ruby
<Bish>
KrzaQ: i like resumeable uploads
<Bish>
like .. partial uploads, even gives you a progressbar, which is useable
<Bish>
requires some html5 javascript stuff, tho
<KrzaQ>
it's an api, I just want to show the progress in the client app
<Bish>
so you can't change the way it gets uploaded?
<Bish>
and you want to do it from ruby?
<Bish>
sorry i misunderstood, thought u want get uploaded to
<KrzaQ>
I have a ruby script that does post('https://...', myfile.zip)
mson has joined #ruby
<KrzaQ>
I want to show progress of this upload
<Bish>
i think mechanize was able to have some sort of upload callback
<KrzaQ>
I didn't see anything in the docs, though the examples were mostly html-download-takeaction oriented
<ccooke>
Precision is an important consideration in performance. Most things don't need it arbitrary precision, but if you actually do then you have options
al2o3-cr has joined #ruby
synthroid has quit [Remote host closed the connection]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 240 seconds]
mikecmpb_ has quit [Quit: inabit. zz.]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
aufi has quit [Quit: Leaving]
chouhoulis has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
centrx has joined #ruby
mikecmpbll has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
troys has joined #ruby
scientes has quit [Ping timeout: 268 seconds]
Psybur has quit [Ping timeout: 248 seconds]
<elomatreb>
>> 0.2r + 0.1r # No need for bigdecimal
<apeiros>
well, technically only the lhs side use (left-hand-side)
<apeiros>
though beware, some people will call the method an operator too, even though it's IMO wrong.
<RickHull>
mostly by analogy from C, I suspect
eckhardt has joined #ruby
<apeiros>
probably, yse
<apeiros>
*yes
<RickHull>
that ruby chose to implement them with methods doesn't (much) change their usage and interpretation
guille-moe has quit [Ping timeout: 255 seconds]
conta1 has joined #ruby
<apeiros>
sure, but it does change their nature and their workings. and since there are operators in ruby, it's just wrong to misidentify a method as an operator.
<porfavordama>
apeiros : what is that double star thing called by the way ?
<RickHull>
yep -- and confusion and miscommunication can result
<apeiros>
porfavordama: huh, fun, I'm not even sure. kwarg-splat?
<apeiros>
kwarg = keyword argument - just in case
<RickHull>
* tends to be known as splat. ** sometimes double-splat
<porfavordama>
haha okay. I didn't know how to search it :D
<porfavordama>
Thanks !
<apeiros>
hm, yeah true, I think I've heard double-splat a couple of times
<RickHull>
in my head, I often call it star, mostly with the super-star-args idiom ;)
iamarun has quit [Remote host closed the connection]
<apeiros>
heh, one of the cases where I notice that I don't always think in fully formed terms :D
hutch34 has quit [Ping timeout: 240 seconds]
<RickHull>
super-star-args would be a good blog name
<RickHull>
i call dibs
<RickHull>
or maybe a debate / flamewar platform
<porfavordama>
Oh now I got that super star args thingy :D
<apeiros>
hm, that didn't quite work out how I thought it would :D
<dminuoso>
Why? :(
<porfavordama>
:D
<dminuoso>
As long as String has #chars, there's a fully sane implementation for it.
<apeiros>
dminuoso: because what should String#each iterate over? bytes? chars? lines? something else? that's why it was dropped, so you can have explicit code.
* dminuoso
cries
<apeiros>
and if you just said String#chars - 1.8 iterated over lines ;-)
<apeiros>
porfavordama: Hash and Set f.ex.
Devalo has joined #ruby
<apeiros>
also as just said above, Enumerator
<porfavordama>
apeiros : Oh, right. Thanks ^^
ramfjord has quit [Ping timeout: 268 seconds]
<dminuoso>
apeiros, I can hardly remember anything from back then.
motstgo_ has joined #ruby
<dminuoso>
Didn't the current core behavior of Symbol#to_proc came from ActiveSupport back then?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
<apeiros>
I think it came from why and AS picked it up and gave it support
<apeiros>
back then it was slow AF
<apeiros>
good think syntax constructs can be optimized
<dminuoso>
Now _why is a name I havent heard in a long while.
rexwin_ has left #ruby [#ruby]
hutch34 has joined #ruby
mikecmpbll has joined #ruby
_the_blackadder has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has quit [Remote host closed the connection]
ramfjord has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
blackmesa has joined #ruby
guacamole has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
eckhardt has joined #ruby
Senecea has joined #ruby
dinfuehr has quit [Ping timeout: 255 seconds]
Dimik has joined #ruby
dinfuehr has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
Puffball has joined #ruby
mostlybadfly has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 is now known as gizmore
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Success>
is there a way i can parse an html file and convert <link rel="stylesheet" href="source.css"> to <style>/*source.css contents*/</style>
ozzieneher has quit [Ping timeout: 255 seconds]
<baweaver>
Success: Nokogiri
nadir has quit [Quit: Connection closed for inactivity]
<baweaver>
XPath to get the stylesheet, yank it, pull the href, File open, append to style tag in head, done.
guacamole has joined #ruby
tvw has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
urk187 has joined #ruby
aScottishBoat has joined #ruby
sinduck has quit [Ping timeout: 248 seconds]
blackmesa has quit [Quit: WeeChat 1.9.1]
jackjackdripper has quit [Quit: Leaving.]
scientes has joined #ruby
<aScottishBoat>
Anyone ever write Ruby for ManageIQ? I've been doing that today, learning how to hack onto MiQ. Man, what a ride. But it's been quite fruitful.
SeepingN has joined #ruby
<Success>
thanks that was actually easier than i expected
raynold has joined #ruby
scientes has quit [Ping timeout: 240 seconds]
<Success>
how would I make the html output pretty and formatted?
<baweaver>
....good luck
blackpajamas has joined #ruby
* baweaver
isn't actually sure
blackpajamas has quit [Client Quit]
JsilverT has quit [Quit: WeeChat 2.0-dev]
<baweaver>
So we have Success and aScottishBoat, today's a good day in Ruby
TomyWork has quit [Ping timeout: 240 seconds]
<aScottishBoat>
baweaver, what do you mean?
<baweaver>
puns
<baweaver>
puns are what I mean
<aScottishBoat>
oh god
<aScottishBoat>
+1
<aScottishBoat>
for everyone
<baweaver>
do you come with Scotch? That'd make it better
<aScottishBoat>
I do. Caol Ila Moscatel-aged to be exact
<aScottishBoat>
Ever try that one?
<baweaver>
Then it is indeed a good day
<baweaver>
#ruby-offtopic?
konsolebox has quit [Ping timeout: 240 seconds]
<aScottishBoat>
does it even exist?
<aScottishBoat>
hey it does. Sure hop on
patrick99e99 has joined #ruby
<apeiros>
so by way of #ruby-offtopic, we now also reached suppress and went full circle?
<patrick99e99>
Hi everyone.. I am just wondering, if I have a string like this: "name:4:3", is there a way to use split, to only split on the first colon character? so I'd get: ['name', '4:3'] ?
<apeiros>
patrick99e99: split(":", 2)
sonOfRa has quit [Remote host closed the connection]
<aScottishBoat>
apeiros, I s'pose so
<patrick99e99>
apeiros: oh cool, thanks! I didn't know about that 2nd parameter
jaruga has joined #ruby
sonOfRa has joined #ruby
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
jaruga has quit [Client Quit]
scientes has joined #ruby
scientes has quit [Changing host]
scientes has joined #ruby
imode has joined #ruby
rippa has joined #ruby
Devalo has quit [Remote host closed the connection]
centrx has quit []
Devalo has joined #ruby
allcentury has joined #ruby
VladGh has joined #ruby
selim has quit [Ping timeout: 255 seconds]
VladGh has quit [Remote host closed the connection]
conta1 has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 248 seconds]
Devalo has quit [Ping timeout: 248 seconds]
VladGh has joined #ruby
selim has joined #ruby
scientes has quit [Ping timeout: 240 seconds]
muelleme has joined #ruby
ColeHub has joined #ruby
Technodrome has joined #ruby
ur5us has joined #ruby
roshanavand has joined #ruby
LocaMocha has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
jottr has joined #ruby
cdg has quit [Remote host closed the connection]
reaVer has joined #ruby
cdg has joined #ruby
GodFather has joined #ruby
orbyt_ has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
polishdub has left #ruby [#ruby]
anisha has quit [Ping timeout: 240 seconds]
nadir has joined #ruby
anisha has joined #ruby
<patrick99e99>
apeiros: one more split question for you... what if I have: 'hello:world,greetings:my, friendly,friend,whatup:dawg', and I want to split on the last comma before a colon, so that I get: ['hello:world', 'greetings:my, friendly,friend', 'whatup:dawg'] Can I do that with split, or do I have to use scan?
kies has quit [Remote host closed the connection]
<baweaver>
Scan
<apeiros>
patrick99e99: with lookaheads
claudiuinberlin has joined #ruby
<patrick99e99>
apeiros: would that be like .scan(/,(?=:)/) ?
<baweaver>
Try and get the tuning (E A D G B E) and the time signature (2/4) out of that.
<RickHull>
what about whether a problem is suitable for regex or not? and also the various classes of regex (e.g. PCRE)
workmad3 has quit [Ping timeout: 250 seconds]
<baweaver>
Is it HTML?
<RickHull>
XHTML!
<baweaver>
Then don't use Regex
<RickHull>
SGML
<baweaver>
All other things are fair game
<baweaver>
(even then you could totally use flip-flop ops to get HTML :D )
<RickHull>
most "regular expression" implementations have additional features that go beyond regular languages, which can lead to pathological behavior
<ruby[bot]>
shazbotmcnasty: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<shazbotmcnasty>
oh thanks ruby[bot]
<apeiros>
shazbotmcnasty: sounds like you don't have bundler installed
<shazbotmcnasty>
oh ok. this is ubuntu 16.04, I've installed build-essential and ruby-full
<apeiros>
bundler is not part of ruby
<shazbotmcnasty>
did i miss something in particular or should i give the server a restart or somthin
<shazbotmcnasty>
ohh
<apeiros>
it's a gem
<baweaver>
apeiros: which version? :troll:
<baweaver>
(2.5 I think is bringing it into core)
kapil___ has quit [Quit: Connection closed for inactivity]
<shazbotmcnasty>
apeiros: how would one um, get one?
<apeiros>
and if this thing you installed is a gem and depends on bundler, it should update its gemspec.
<shazbotmcnasty>
I'm just using preconfigured ruby stuff for my zammad server
<apeiros>
gem install bundler
hutch34 has joined #ruby
<apeiros>
baweaver: oh, in 2.5 already? I somewhat expected it to be later
<baweaver>
I remember seeing something along that line
<apeiros>
IMO it'd be nice if they'd just roll bundlers features into rubygems
<apeiros>
a good part is already there afaik
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
<RickHull>
that was planned at one point, I thought
<RickHull>
the bundler gem is now bundled with ruby 2.5.0-preview1
biberu has quit []
<shazbotmcnasty>
so now i'm getting the danged "Your ruby version is 2.3.1, but your Gemfile specified 2.4.1"
<shazbotmcnasty>
:<
kies has joined #ruby
<RickHull>
you can run multiple versions of ruby, abandoning the distro packaged ruby
<RickHull>
or you can edit your Gemfile to relax that restriction
<RickHull>
not sure if that's a transitive restriction based on some gem actually depending on ruby == 2.4.1
<RickHull>
(which would be strange -- probably your Gemfile says something about required ruby version)
pilne has joined #ruby
<RickHull>
it looks like rubygems will depend on bundler, and I imagine from there, necessary features will migrate from bundler codebase to rubygems codebase
<shazbotmcnasty>
I think i figured it out. installed ruby via ubuntu then installed bundler as a gem
<shazbotmcnasty>
imma try it a different way
<shazbotmcnasty>
yep nope didn't help
dviola has joined #ruby
iceden has quit [Read error: Connection reset by peer]
<shazbotmcnasty>
RickHull: I would love to, I've never used ruby before and am attempting to follow a walkthrough with preconfigured ruby scripts. How would one examine their gemfile
<shazbotmcnasty>
cd ..
<shazbotmcnasty>
ls
<RickHull>
e.g. `less path/to/Gemfile`
anisha has quit [Quit: This computer has gone to sleep]
<RickHull>
you can `cat path/to/Gemfile` and then copy/paste it to a paste site
<RickHull>
that link shows installing the particular ruby version with rvm (a ruby version manager)
Immune has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
<shazbotmcnasty>
Oh it does says requires 2.4.1 - and what you're looking at is the install from source section, i installed zammad from deb - and am setting up the fetchmail section, the link i gave you, which is the first time ruby has came up
PaulCapestany has quit [Ping timeout: 248 seconds]
lytol has quit [Remote host closed the connection]
<shazbotmcnasty>
I will install the correct version via that walkthrough :<
iceden has joined #ruby
nullobject has joined #ruby
enterprisey has joined #ruby
<RickHull>
shazbotmcnasty: the deb install should be fine, I expect
<RickHull>
they would need to keep their deb repos update and package ruby 2.4.1 themselves
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull>
it's possible they haven't kept their debs up to dat4e
UserOO7_ has joined #ruby
postmodern has joined #ruby
imode has quit [Ping timeout: 240 seconds]
mjolnird has quit [Quit: Leaving]
UserOO7_ is now known as UserOO7
jenrzzz has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
<shazbotmcnasty>
suprisingly it didn't actually install a bunch of those prereqs so i'm doing that now
PaulCapestany has joined #ruby
UserOO7 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 268 seconds]
kitsunenokenja has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
cagomez has joined #ruby
synthroid has quit []
UserOO7 has joined #ruby
roshanavand has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
ColeHub has left #ruby ["Bye."]
<pragmatism>
test
<shazbotmcnasty>
test received
UserOO7 has quit [Ping timeout: 255 seconds]
<pragmatism>
ty
elphe has joined #ruby
eckhardt has joined #ruby
guacamole has joined #ruby
<apeiros>
test failed. please reboot.
<RickHull>
press alt-F4 to acknowledge
underport has joined #ruby
* apeiros
can't find f4 on the touchbar :<
<RickHull>
overpriced and underpowered QED
eckhardt has quit [Client Quit]
<apeiros>
you won't hear me contradicting you
<RickHull>
I don't need you to contradict me!
<RickHull>
(I'm plenty)
<apeiros>
are you really old enough to contradict yourself? o0
<RickHull>
I'm old enough to buy my own ticket to #ruby-offtopic ;)
underport has quit [Quit: Leaving]
UserOO7 has joined #ruby
Quentinius has joined #ruby
Ltem has quit [Quit: Leaving]
UserOO7 has quit [Read error: Connection reset by peer]
Quentinius has quit [Client Quit]
UserOO7 has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
* Ober
dislikes editing code that does not use matz's standard indentation
br0d1n has quit [Quit: Leaving]
sepp2k has quit [Quit: Leaving.]
sammi` has joined #ruby
Psybur has quit [Ping timeout: 248 seconds]
Quentinius has joined #ruby
sucks has joined #ruby
hutch34 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
UserOO7 has quit [Remote host closed the connection]
UserOO7 has joined #ruby
Quentinius has quit [Client Quit]
shazbotmcnasty has quit [Read error: Connection reset by peer]
mjolnird has joined #ruby
orbyt_ has joined #ruby
sucks has quit [Ping timeout: 255 seconds]
troys_ is now known as troys
UserOO7 has quit [Remote host closed the connection]
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
twe4ked has quit [Ping timeout: 252 seconds]
twe4ked has joined #ruby
jottr has quit [Quit: WeeChat 1.9.1]
charliesome has joined #ruby
aroaminggeek has joined #ruby
allcentury has joined #ruby
milardov_ has joined #ruby
orbyt_ has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
<bambanx>
hello guys
milardovich has quit [Ping timeout: 260 seconds]
<RickHull>
shazbotmcnasty: let's say you want a Priority header (with a priority value, say 1-10)
<baweaver>
and ladies too :)
<baweaver>
bambanx: What's up?
<RickHull>
X-Zammad-Ticket-Priority:7
<bambanx>
hehe baweaver sorry my native language is spanish i though guys means for ladies too
<RickHull>
X-Zammad-Ticket-Source:facebook
<bambanx>
baweaver, so what is the best way? say hello folks?
<baweaver>
Something like that :)
<baweaver>
How can we help you today?
workmad3 has joined #ruby
<bambanx>
in nothing really just saying hello, always enjoy the vibrant and nice ruby community
<baweaver>
Hello hello
<bambanx>
well maybe yes, what is meteprogramming in ruby?
minimalism has joined #ruby
<baweaver>
Programs that write programs
<bambanx>
like a function but more complex?
<bambanx>
meta*
<baweaver>
Think that you have 100 text files, you edit them all by hand
<RickHull>
typically, the coder writes the code that gets executed. in metaprogramming, the coder writes code that writes/manipulates the code that will get executed
<baweaver>
If you automate that process you've gone one step further in abstraction by making a Ruby script for it
<baweaver>
Metaprogramming is to go one step further
<RickHull>
macros in C could be considered metaprogramming
<baweaver>
Though when starting out it's best to focus on just regular programming
<baweaver>
attr_writer and friends are technically metaprogramming
<baweaver>
attr_writer :attribute defines a method: def attribute; @attribute end
<baweaver>
So it's part of a Ruby program that writes more Ruby
<baweaver>
Oooooo. A Lemur that draws more Lemurs
* baweaver
tries to think how he's going to explain metaprogramming with Lemur pictures
<baweaver>
Ship it!
workmad3 has quit [Ping timeout: 248 seconds]
<RickHull>
how about a picture of you watching lemurs