jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
<ox1eef> why?
<John_Ivan> ox1eef, because it shoves it's tail everywhere and everytime I just wanna write web code
<John_Ivan> even
<John_Ivan> even when I really try to avoid it
<John_Ivan> it finds it's way one way or another.
<ox1eef> right, you can't escape it, so it is better to embrace it
<John_Ivan> ox1eef, like, I have a simple objective of trying to display a progressbar for the typical "file form submit" html struct
<John_Ivan> and just as I come with the idea, my brain goes "argh fuck. that requires javascript...."
<ox1eef> it's easy to work with in that case, you just want to set the value attribute periodically
<John_Ivan> ox1eef, but. I just. __don't like__ javascript. I feel filthy writing it.
TrufflePump has joined #ruby
<John_Ivan> yes even for something simple
* John_Ivan gets even more depressed
<John_Ivan> ox1eef, the web could have been written so differently..
<ox1eef> i think it is a nice language, it carries some legacy stuff with it but in the modern day it is always improving, i'd prefer if classes werent introduced though
<ox1eef> it is what it is :)
<John_Ivan> ox1eef, want to know my honest opinion? I think absolutely everything should have required a single language.
<John_Ivan> C. C for everything.
<John_Ivan> just better frameworks.
<John_Ivan> but nothing else. no rust. no js. no css. no html
<John_Ivan> no sql
<ox1eef> and it will probably only get worse, as web3 comes by, as with nearly everything simplicity will disappear, and im convinced that's done by boring nerds intentionally
<John_Ivan> no python. no ruby. nothing.
<John_Ivan> just C for everything.
<ox1eef> that's virtually impossible.
<John_Ivan> ox1eef, it isn't if you think about it.
<John_Ivan> I can write a webpage with just functions
<ox1eef> closest you will get is web assembly, and even then, JS is the glue
<ox1eef> eh, that's no good, that's what makes C a pain.
<John_Ivan> ox1eef, idk. tbh, I sometimes feel like I just don't want to get involved with anything else. I just want to write my back end in ruby. my front end in ruby. my view/template in ruby.
<John_Ivan> I'd love that
<John_Ivan> css? nope. ruby.
<John_Ivan> js? ruby.
TrufflePump has quit [Ping timeout: 255 seconds]
<ox1eef> nah, don't do that, don't put all your eggs in one basket, embrace as many languages as you can - you will be a better programmer for it.
<John_Ivan> the thing is. I think I'm already at a stage where, already being a better programmer, I don't really care for other languages. In fact, the more the years pass, the more I just get more annoyed with anything else.
<John_Ivan> ox1eef, I start hating everything because of realizing how bad things are made.
<ox1eef> ruby is not perfect by any stretch of the imagination, but you might want to look into opal
<ox1eef> just look at pattern matching, that's a hot mess, and in other languages, like rust, it is implemented close to perfection
<mooff> or Crystal
<John_Ivan> but
<mooff> everything is imperfect
<John_Ivan> guys.... I picked ruby for it's syntax.
<John_Ivan> I "ran away" from python, from nodejs/js, rust and whatnot because ruby was a pleasure to read
<ox1eef> ruby has a lot of problems to be honest with you
<John_Ivan> I pick a language based on how I find it visually appealing syntax wise.
<John_Ivan> ox1eef, I don't mind.
<mooff> i think the same way you don't mind Ruby's flaws, it's possible not to mind JavaScript's :)
<ox1eef> and one of those problems is that rails became its voice, and shaped how everyone thinks, so if you can escape that and see how other languages think, all the better for you
<John_Ivan> I have written C, C#, C++, VB, FreePascal, Ruby, Python, Rust, OCaml, ELisp, Haskell and Java
<John_Ivan> I've had enough.
<John_Ivan> As I said, the more I spend time in other languages the more I start disliking/hating it.
<John_Ivan> Because I start seeing flaws
<John_Ivan> and I get annoyed with it.
<ox1eef> i can show you flaws in ruby
<ox1eef> its not perfect either
<John_Ivan> ox1eef, please.. listen to me. I'm not talking about technical flaws
<John_Ivan> or internal vulnerabilities or whatnot
<ox1eef> yes, ruby has those in buckets
<John_Ivan> ox1eef, I'm talking simply talking - semantical flaws.
<John_Ivan> now I'm repeating myself X_x
<John_Ivan> semantical flaws. paradigm.
<John_Ivan> "approach"
<John_Ivan> "library design"
<John_Ivan> these kind of flaws
<John_Ivan> are what truly bother me
<John_Ivan> and syntax.
<John_Ivan> anything else doesn't matter to me.
<John_Ivan> as it's not my concern.
<ox1eef> try pattern matching in ruby, and you will see nothing but flaws and bad design - and this is a new feature, it is a goalpost for the future, so i honestly think youd be crazy to stay with only ruby, and then be lost if it only gets worse
<mooff> John_Ivan: did you ever use <script language="VBScript">? :)
<John_Ivan> ox1eef, well. I avoid regex, so I'll avoid pattern matching too.
<John_Ivan> mooff, not VBScript no, but I'm aware of it.
<John_Ivan> I avoid anything that's overengineered.
<John_Ivan> And regex/pattern matching is honestly amusing to me how you must "learn" a new "language" to describe strings.
<John_Ivan> not to mention how TERRIBLY hard it is to read.
<John_Ivan> surely it can be done better.
<John_Ivan> but until then, I'll not bother.
<ox1eef> pattern matching is not really like regexp at all, it's more like a case statement on steroids
<John_Ivan> ox1eef, if you speak of haskell/functional programming pattern matching
<John_Ivan> ox1eef, it is.
<John_Ivan> pipe after pipe... ;/
<ox1eef> im not familiar with how haskell does it, but that sounds like syntax - conceptually it is not the same
<John_Ivan> perhaps.
<John_Ivan> I learned haskell enough to write a chat program in. I then abandoned the language
TrufflePump has joined #ruby
<John_Ivan> it enforces something that one should do anyway in imperative languages; avoiding side effects, encouraging function purity and separating your IO from your computation.
<John_Ivan> it's syntax is making me lose my head when it comes to maintenance.
<John_Ivan> also, I can't stand having to force myself to do loops through recursion only.
<ox1eef> haskell is probably not the best example, its sort of a niche that mostly mathmeticians like
<John_Ivan> I've written OCaml. that has pattern matching too
<John_Ivan> and unlike haskell, loops can be written non-recursively.
<John_Ivan> the problem? OCaml syntax is worse than haskell!
<John_Ivan> even harder to maintain.
<ox1eef> same again, a functional language which most the time math people are attracted to
<John_Ivan> Sure.
<John_Ivan> but it's been several times since I've returned to them in the "hope" that maybe there may be some other benefit to them
<John_Ivan> I even carefully read most wikipedia pages on the matter
<John_Ivan> in the end
<John_Ivan> I figured the whole paradigm is **useless**
<ox1eef> no doubt there's benefit to learning them, it's a whole other way of thinking and it has its merits
<John_Ivan> I disagree. there is no benefit in learning them.
<ox1eef> agree to disagree then :D
<John_Ivan> will do then :)
<ox1eef> trust me, set your eyes past ruby or you will set yourself for failure
<John_Ivan> There's no benefit because, in my eyes, the only benefit to programming is "better documentation", "sane semantics", "better framework/library design" and "clean syntax"
TrufflePump has quit [Ping timeout: 258 seconds]
<John_Ivan> everything else doesn't really matter because it's not to the programmer's concern.
<ox1eef> syntax doesnt really matter at all, what truly matters is the ideas
<John_Ivan> ox1eef, the ideas are language agnostic though.
<John_Ivan> and can exist in any language. either simulated or avoided.
TrufflePump has joined #ruby
<ox1eef> but if you stick with only ruby, you'll never know them
<John_Ivan> ox1eef, if there's more functional programming or more regular expressions, I'd rather not know :)
<ox1eef> as i said before, rails is what decides what is good ruby, for a large part, and i truly dislike rails and its ideas - if you like it, then youre in good company, but one day you will see that sticking with one language is mistake
<John_Ivan> ox1eef, rails in my view is good "one fits all solution". if you don't need that, maybe a microframework like "sinatra" would better suit
<John_Ivan> but "One fits all solution" is needed pretty often if you ask me.
<ox1eef> rails is the worst and best thing to happen to ruby
<John_Ivan> it's ruby. it's maintainable. it just forces you to abide by their structure
<John_Ivan> I can live with that.
<ox1eef> it is ruby alright, but it is also an opinionated framework that doesn't leave much room to think differently, and honestly that's whats make life interesting
shiru has joined #ruby
<ox1eef> the idea one could use sinatra, or roda, or whatever is a lie when you get down to it, because in reality very few do that. its rails, rails, rails, and more rails.
<John_Ivan> ox1eef, honestly, I'm a very boring person. I like my life to be with as less surprises as possible.
<ox1eef> lol alright
<John_Ivan> as such, syntax/ideas that make my life "interesting" is something I'd rather avoid.
<John_Ivan> ox1eef, I like my toolset to be as the following analogy. Imagine all code/frameworks were sets of tetris blocks.
<ox1eef> well, then rails is probably a good fit for you, but don't drink too much of the kool aid.
<John_Ivan> I only and ONLY want T blocks, ロ blocks ¬_ blocks and | blocks.
<John_Ivan> Maybe L's too.
<John_Ivan> But that's it.
<John_Ivan> No other shape.
<John_Ivan> No V's or Z's or Q's or K's or whatever
<John_Ivan> I'm all about cohesive structure.
<John_Ivan> Which is why I "depressively" talked about a single language for everything.
<John_Ivan> Can you imagine how cool that would be?
<ox1eef> itd be terrible
<John_Ivan> Your entire webapp in one language.
<John_Ivan> ox1eef, Maybe for the economy.
<ox1eef> well, you can do that - javascript runs in the browser, and on servers using node.
<John_Ivan> except, it's "javascript" :P
<ox1eef> so, aren't you lucky there are other languages, since imagine if javascript were the only one?
<John_Ivan> you know. that's an idea. I should dig out my c -> python transpiler one day and write one for ruby -> js.
<ox1eef> it exists already, as opal
<John_Ivan> ox1eef, I'd be happier that there's no others.
<John_Ivan> more happy than the fact that I'm sad of it being js :P
<John_Ivan> "OPAL (OPtimized Applicative Language) is a functional programming language first developed at the Technical University of Berlin."
<ox1eef> no, it's not that, check the github link
<John_Ivan> Reading now.
<John_Ivan> ox1eef, that is something I definitely want to look into :)
<John_Ivan> ox1eef, how mature is this?
shiru has quit [Remote host closed the connection]
<John_Ivan> Just a little worried about leaky abstraction.
pmwals09 has joined #ruby
shiru has joined #ruby
pmwals09 has quit [Read error: Connection reset by peer]
<ox1eef> it's very old by now, been around for years
<John_Ivan> ox1eef, now we just need the same thing but for css, html and sql :)
<John_Ivan> ox1eef, good :)
shiru has quit [Client Quit]
<John_Ivan> To me, syntax is very important.
shiru has joined #ruby
pmwals09 has joined #ruby
<John_Ivan> ox1eef, I feel a little, dissapointed, that you don't share the ideals I do.
<John_Ivan> Syntax is what makes code easily readable, easily navigate-able, a pleasure to write and a pleasure to look at.
<John_Ivan> Without syntax, everything falls apart.
<John_Ivan> My motivation. My interest.
<John_Ivan> My happiness..
<ox1eef> in life and especially open source, you will learn that everyone is different
<John_Ivan> Of course. It is welcome. But while I accept some things are different or some people are different, I believe there's always **one** specific "objective" answer or solution to any scenario/circumstance.
<John_Ivan> as such, I discard what doesn't meet the higher priority criteria - and when it comes to programming, syntax is #1.
<John_Ivan> in importance and priority.
shiru has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
<John_Ivan> So in my eyes, everything else is, well, to not sound rude - "inferior and unsuitable"
<John_Ivan> Languages with good syntax: C#, C, Java, Ruby
<John_Ivan> Languages with terrible syntax: Lisp, Haskell, VB, SQL, Python, OCaml
<John_Ivan> you might notice Javascript is not among either.
<John_Ivan> that is because, while I "do believe" js syntax is "relatively good", I prefer not to put it amongst them
<leftylink> oh yeah I think this is the same idea as why you can't do `x if x = nil || 5` but you can do if x = nil || 5; x end
<leftylink> pandabot: rb if x = nil || 5; x end
<leftylink> pandabot: rb x if x = nil || 5
<pandabot> stderr: -e:2:in `<main>': undefined local variable or method `x' for main:Object (NameError) - exit 1 - https://carc.in/#/r/d7fu
<leftylink> so I see that being consistent
<leftylink> even if undesirable?
shiru has joined #ruby
<ox1eef> :: x if (x = nil || 5)
<ruby-eval> ERROR: undefined local variable or method `x' for main:Object
<ox1eef> odd, works for me locally
<John_Ivan> The latter one looks like ternary syntax while the former looks like pseudo yoda structure.
shiru has quit [Remote host closed the connection]
ruby-eval has quit [Remote host closed the connection]
<John_Ivan> "good jedi, if win you must or not"
<John_Ivan> vs
ruby-eval has joined #ruby
<ox1eef> [651] 0x1eefenv.rb (main)> x if (x = nil || 5)
<ox1eef> => 5
<ox1eef> [652] 0x1eefenv.rb (main)> x if x = nil || 5
<ox1eef> => 5
<John_Ivan> "if good jedy or bad, then good."
<ox1eef> [653] 0x1eefenv.rb (main)> RUBY_VERSION
<ox1eef> => "3.1.0"
<ox1eef> oh, i probably already have x defined, lemme see
<ox1eef> indeed, that was it
<leftylink> pandabot: rb a = a
<pandabot> nil - https://carc.in/#/r/d7fv
<ox1eef> :: begin; x if x = nil || 5; rescue; x; end
<ruby-eval> => 5
<ox1eef> :: x
<ruby-eval> => 5
<leftylink> "and what happens if you assign `a` to `a` with `a` undefined? correct. nil! wat."
<ox1eef> if i remember right, locals get assigned nil at parse time
<leftylink> I've definitely wondered whether Ruby is becoming my Blub.
<leftylink> wondering whether I'll get old and set in my ways and unable to understand new languages
<John_Ivan> leftylink, in that case, you can consider me "old"
<mooff> i sort of hope "if x = nil" stops causing a warning
<John_Ivan> <- is 27 years old.
<mooff> oh god, you're cranky for 27!
<mooff> John_Ivan: i'm about the same age, also a bit cranky. but i think we better strap in, lol
<mooff> have you seen Kubernetes
<John_Ivan> mooff, that's because I actually feel like I've accelerated to feel like I'm 60 after so much crap life has thrown at me.
<mooff> amen
<John_Ivan> mooff, and only programming life alone.
<John_Ivan> mooff, I have spent my happiest times writing C# and C code. using .NET and Win32 specifically.
<John_Ivan> everything was well designed. clear. clean. it had a professional and authentic look to it
<John_Ivan> until they made the IDE larger than 50GB
<John_Ivan> Visual Studio.
<mooff> nobody should ever need more than 640K of RAM ;)
<John_Ivan> yeah, Bill Gates should be hanged.
<John_Ivan> mooff, I've only used docker. So I don't know much about Kubernetes.
<John_Ivan> Docker and Puppet
leah2 has joined #ruby
shiru has joined #ruby
<John_Ivan> But yeah, the programming life for me went downhill somewhere when Windows 8 got introduced and their VS2012 or 2015.
Guest4 has joined #ruby
<John_Ivan> I was forced to abandon the IDEs because of how fucking large they got.
<John_Ivan> And since you can't really do much with C# without .NET (unless Mono), both C and C# got "ripped" out of my hands
Guest4 has quit [Client Quit]
<John_Ivan> I switched to C++ with QT and QTCreator. Once again, very beautiful tools and well designed IDE.
<John_Ivan> Until they ruined that too ever since Microsoft bought Nokia.
<John_Ivan> Desperate, finding no other language of interest, I was forced to write filthy python for a long while until I found ruby.
<John_Ivan> mooff, my autobiography right there :(
<John_Ivan> much sadness and depression.
shiru has quit [Remote host closed the connection]
<John_Ivan> Now, finding the need to do some web related things with ruby, I encounter the horrors of css/js once more.
<clemens3> ruby and linux are nice.. using simple tty / tui interfaces with puts escape codes..
<John_Ivan> clemens3, it's how computing should have been done.
<clemens3> just use backend stuff instead of js
<John_Ivan> clemens3, I cannot unfortunately.
<John_Ivan> because it just doesn't work without it.
<clemens3> private project or work?
<John_Ivan> clemens3, private. my goal - write a progressbar for file submission html form.
<clemens3> aeh, look for another project
<John_Ivan> tell me how I'm gonna do that without javascript :V
<John_Ivan> .;/
<clemens3> lemme think
<clemens3> isnt that the job of the browser?
<clemens3> to indicate the status of a file transfer?
<clemens3> so look for another browser
<John_Ivan> it does. but it only does so in the statusbar, if enabled.
<John_Ivan> clemens3, if no js is used.
<clemens3> so problem solved
<John_Ivan> clemens3, yeah, well, I'd like a progressbar I can control and use as part of the DOM
<John_Ivan> :)
<clemens3> well, then enjoy it
* John_Ivan forces js down his throat and tries to enjoy it.
<adam12> Could try ruby2js
<John_Ivan> hey adam12
<adam12> It's not a full translation like Opal, but it might be a reasonable compromise.
<John_Ivan> yeah, I'll look into that. right now, too tired to do so.
<adam12> I don't use it because Javascript has become a lot better, and when I do need to use it, I don't usually use too much of it.
<adam12> I use Unpoly on all my projects which does 80% or more of what I need in most projects.
<John_Ivan> adam12, syntax matters a lot to me and js is just........... idk how to explain it. probably some sort of synesthesia shit but it just "smells bad"
<John_Ivan> I feel very filthy using it
<John_Ivan> enjoy the song :)
<John_Ivan> at 1:15:34
<adam12> cool
<John_Ivan> adam12, I'll be pinging you about that user path question sometime tomorrow or the day after. too tired right and you are likely too.
<John_Ivan> but I "think" I may have something figured out.
<John_Ivan> right now*
* John_Ivan curses at the web
<mooff> it puts the javascript on its skin
<mooff> > syntax doesnt really matter at all, what truly matters is the ideas
<mooff> *coffeescript enters the chat*
<John_Ivan> <mooff> it puts the javascript on its skin
<John_Ivan> HAHAHAHAHAHAHAHAHAHHHHAHAHAHAHAHAHAHHAHAHAHAHAHAHHAHAHA :D
<mooff> John_Ivan: hmm, *have* you tried coffeescript?
<John_Ivan> mooff, when I wrote a MEAN stack.
<John_Ivan> didn't like it.
<John_Ivan> mooff, it used Jade (now Pup), SaSS and CoffeeScript
<John_Ivan> the end result was something that looked like, uhhhh
<John_Ivan> mooff, like a mixture of python and js
<John_Ivan> mooff, like, you won't believe the amount of ___crap___ they introduced in with "modern" web development.
<John_Ivan> back in the day, it used to be just Adobe DreamWeaver spitting out HTML/CSS and a little js here and there. Then you coded the rest in PHP
<mooff> i believe it
<John_Ivan> mooff, now I can enumerate at least 30 nouns in the same sentence that covers a single "webapp" project.
<mooff> for what it's worth, if you go the plain, static HTML/CSS/JS route, it's never been better
<mooff> JS has improved significantly
<John_Ivan> GruntJS, GulpJS, JasmineJS, ReactJS, AngularJS, (some of these do the SAME THING), VueJS, BackboneJS, SaSS, Compass, Yeomann Scaffolder, Coffescript, Jade/Pup, NodeJS (as a platform), Cucumber, Mustache, KnockoutJS...
<mooff> unlike ox1eef, i like its classes :)
<mooff> same way i liked coffeescript's classes
<John_Ivan> mooff, I use Rails and Sinatra for my back end. I'm extremely satisfied with it.
<John_Ivan> but the front end....... *shivers*
<John_Ivan> I'll try Opal soon, hopefully tomorrow
<John_Ivan> like ok. I can manage HTML. I can live with that.
<John_Ivan> CSS? Fuck it. I'll deal with that too, despite not being a fan.
<John_Ivan> JS? Oh no no no. No ho ho ho. Hue Hue hue hue.
Rounin has quit [Ping timeout: 240 seconds]
<John_Ivan> mooff, I preach this from time to time - https://motherfuckingwebsite.com/
John_Ivan has quit [Ping timeout: 260 seconds]
John_Ivan has joined #ruby
ssh0732 has quit [Remote host closed the connection]
John_Ivan has quit [Ping timeout: 255 seconds]
bobdobbs` has quit [Quit: ERC (IRC client for Emacs 27.1)]
bobdobbs has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
RickHull has quit [Ping timeout: 244 seconds]
mooff has quit [Remote host closed the connection]
pmwals09 has quit [Remote host closed the connection]
mooff has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
gr33n7007h has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 258 seconds]
ur5us has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
teclator_ has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 258 seconds]
Ziyan has joined #ruby
gr33n7007h has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
Bitflux has joined #ruby
Ziyan_ has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
bhaak_ has joined #ruby
gr33n7007h has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
Ziyan has quit [*.net *.split]
legahc has quit [*.net *.split]
dka has quit [*.net *.split]
tv- has quit [*.net *.split]
finsternis has quit [*.net *.split]
libsys has quit [*.net *.split]
donofrio has quit [*.net *.split]
isene has quit [*.net *.split]
Byteflux has quit [*.net *.split]
bhaak has quit [*.net *.split]
rhe has quit [*.net *.split]
donofrio has joined #ruby
libsys has joined #ruby
dka has joined #ruby
finsternis has joined #ruby
legahc has joined #ruby
tv- has joined #ruby
finsternis has quit [Max SendQ exceeded]
finsternis has joined #ruby
isene has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
Ziyan has joined #ruby
Ziyan_ has quit [Ping timeout: 276 seconds]
Rounin has joined #ruby
bhaak_ is now known as bhaak
bhaak has quit [Changing host]
bhaak has joined #ruby
jpn has joined #ruby
ur5us has joined #ruby
jpn has quit [Ping timeout: 258 seconds]
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jpn has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
danjo005 has joined #ruby
danjo00 has quit [Ping timeout: 258 seconds]
danjo005 is now known as danjo00
Ziyan has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
danjo00 has quit [Read error: Connection reset by peer]
danjo00 has joined #ruby
Ziyan has quit [Ping timeout: 255 seconds]
Ziyan has joined #ruby
dionysus69 has joined #ruby
royo25 has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
edge6 has joined #ruby
Ziyan has joined #ruby
edge6 has quit [Ping timeout: 246 seconds]
<dionysus69> is there an cool way to remove \A and \z flags from URI::MailTo::EMAIL_REGEXP ?
moldorcoder7 has quit [Ping timeout: 258 seconds]
<dionysus69> I also want to use it on frontend and html5 validation expects ^ and $ instead of those
jpn has quit [Ping timeout: 260 seconds]
perrierjouet has quit [Quit: WeeChat 3.5]
ur5us has quit [Ping timeout: 258 seconds]
Ziyan has quit [Ping timeout: 255 seconds]
Ziyan has joined #ruby
<jhass[m]> Just do the boring way I guess, "^#{URI::MailTo::EMAIL_REGEXP.source[2..-3]}$"
Ziyan has quit [Ping timeout: 258 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
Ziyan has joined #ruby
<dionysus69> thanks jhass[m] :)
<dionysus69> URI::MailTo::EMAIL_REGEXP.source.gsub(/\\A/, '^').gsub(/\\z/, '$') I was going for but yours I guess is better
<dionysus69> ugh but html5 pattern validation is still not picking it up correctly
<dionysus69> there has to be more going on in there than just these flags =S
<jhass[m]> marginally. Generally if you expect a single replacement I prefer sub over gsub
<jhass[m]> Well, JS Regex != Ruby Regex
<jhass[m]> but then the most crazy thing this seems to be using is non matching groups, so
<jhass[m]> eh, non capturing I mean
<dionysus69> yea no idea :D gonna hit regex channel for correct conversion :D
jpn has joined #ruby
Ziyan has quit [Read error: Connection reset by peer]
Ziyan has joined #ruby
TrufflePump has quit [Ping timeout: 240 seconds]
jpn_ has joined #ruby
jpn has quit [Ping timeout: 276 seconds]
gproto23 has joined #ruby
TrufflePump has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
Ziyan has quit [Ping timeout: 240 seconds]
TrufflePump has joined #ruby
TrufflePump has quit [Ping timeout: 255 seconds]
wand has quit [Remote host closed the connection]
Ziyan has joined #ruby
<adam12> dionysus69: imho, validate `.@.` and leave the rest to actually sending an email to confirm
wand has joined #ruby
TrufflePump has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
jpn has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
jpn_ has quit [Ping timeout: 240 seconds]
<dionysus69> adam12: thanks but I went with URI::MailTo::EMAIL_REGEXP on backend and RFC 2822 validation on frontend
<dionysus69> which two from what I have observed are very similar
TrufflePump has joined #ruby
teclator_ is now known as teclator
Tempesta has joined #ruby
TrufflePump has quit [Ping timeout: 246 seconds]
royo25 has quit [Quit: Bye]
namkeleser has joined #ruby
TrufflePump has joined #ruby
titibandit has joined #ruby
TrufflePump has quit [Ping timeout: 246 seconds]
<adam12> dionysus69: I've found that to usually introduce subtle bugs. But I guess to each their own.
Ziyan has quit [Read error: Connection reset by peer]
Ziyan has joined #ruby
<dionysus69> dunno, I asked my supervisor if he's ok with it, I could find RFC 2822 for ruby too online if he's not ok with it :P but anyways, I validate both on frontend and backend so if let's say fontend let's something through that backend invalidates, it still wouldn't be accepted, the error would just show up differently, without customValidity message
Sankalp has quit [Read error: Connection reset by peer]
Sankalp has joined #ruby
Sankalp has joined #ruby
teclator has quit [Remote host closed the connection]
teclator_ has joined #ruby
bit4bit has joined #ruby
teclator_ is now known as teclator
Successus has joined #ruby
<Successus> Hi, I am using ruby 1:2.7+2 package from Debian, I start irb as /usr/bin/irb2.7 but the problem is when I press enter nothing happens, I can not call any command. Please tell me how to solve this problem. Thank you
<adam12> Successus: What command? What are you seeing before you type anything?
RickHull has joined #ruby
<Successus> I am seeing the regular prompt @irb(main):001:0>
<Successus> for example I write help and press enter
John_Ivan has joined #ruby
<Successus> I write puts "Hello World" and press enter but nothing happens
bit4bit has quit [Ping timeout: 255 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
<Successus> ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
<Successus> but I also compiled the newest some months ago and I had the same problem
<adam12> Successus: Interesting. What terminal are you using?
<Successus> st
blowsier0 has joined #ruby
<adam12> Successus: Try running irb with `--nocolorize --noautocomplete` flags and see if it's same issue?
<Successus> Unrecognized switch: --noautocomplete
<adam12> OK. I wasn't sure if both were supported on 2.7. Try with just --nocolorize
<Successus> same
<adam12> OK. How about with `--singleline`
<Successus> works!
<Successus> I was able to use puts to write a string
<adam12> Do you have any other terminals installed?
<Successus> yes
<Successus> lxterminal
<adam12> Can you try another terminal, but with no flags?
<Successus> I did try lxterminal
<adam12> Hard to say if it's st or irb.
<Successus> without flags, it was same
<Successus> acutally it was xterm that I tried
<Successus> I will install lxterminal
<Successus> I have sakura also, but it started giving error so I can not start it
<adam12> irb switched to a built-in readline library called reline. I _think_ the --singleline flag switches back to readline, but I don't remember. I was trying to lookup the source docs.
<adam12> It might be worth trying a very new Ruby to see if it's the same issue in new irb+reline releases. And perhaps a bug report if you can still reproduce them.
<Successus> same thing with lxterminal
<Successus> alright
<adam12> What keymap do you use
<adam12> and output of `printenv LANG`
<Successus> en_US.UTF-8
<Successus> layout: us
<adam12> I'm guessing a US keymap too then? Not a French or other keyboard?
<adam12> Ok.
<adam12> Yeah; maybe this is a reline bug that was solved on Ruby 3.1.
<adam12> As a compromise, I think you can add `--singleline` to ~/.irbrc as a default.
<Successus> alright
<adam12> A bug report to github.com/ruby/irb (or ruby/reline) might be helpful, if you can reproduce it on Ruby 3.1.
<Successus> I will compile 3.1 now
<Successus> it seems that --singleline is not the right format for irbrc?
<adam12> Oh.
<adam12> Maybe it's IRB_CONF. Let me look.
<adam12> How about IRB.conf[:USE_SINGLELINE] = true
<Successus> it just printed true
<Successus> but it has no effect
<Successus> when I run irb again
<adam12> You put that in ~/.irbrc ?
<Successus> oh wait
<Successus> works!
<Successus> I was just going to opt for a wrapper function but it is useful to know how to edit the rc
<adam12> Yeah, I bet an alias would work too. alias irb='irb --singleline'
<adam12> The trick is remembering it a year later, when the bug is fixed and you want multiline support again :P
<Successus> I see, what is multiline then?
<Successus> I won't be able to have commands longer than one line?
<Successus> seems I can print two whole lines
<adam12> Successus: It's a new method of editing a multi-line statement, where you can cursor up and down.
<adam12> Normally when you enter a multi line statement, previous lines are not editable.
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
<Successus> oh I see
<Successus> I see, when I do not use --singleline, I can use readline
<Successus> bindings from ~/.inputrc work
<Successus> bummer if I can't use that
TrufflePump has joined #ruby
<Successus> where can I find irb script?
<adam12> github.com/ruby/irb
<Successus> libexec/irb ?
<Successus> oh I see
<Successus> exe/irb?
<Successus> but how to tell it the location of ruby I just compiled?
<Successus> I can write it here? #!/usr/bin/env ruby
dionysus69 has quit [Ping timeout: 258 seconds]
<Successus> it doesn't work I get errors
TrufflePump has quit [Ping timeout: 276 seconds]
namkeleser has quit [Quit: Client closed]
TrufflePump has joined #ruby
blowsier0 has quit [Ping timeout: 258 seconds]
peer has quit [Quit: whoops]
peer has joined #ruby
_ht has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
marcos has joined #ruby
marcos is now known as marck
tumdum has joined #ruby
<marck> rails question here.  How do I generate a migration so that in postrgresql, a foreign_key changes to 'ON DELETE SET NULL' ? The child model needs to remain after a parent model gets deleted.
oxfuxxx has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
Successus has quit [Ping timeout: 258 seconds]
titibandit has quit [Remote host closed the connection]
Successus has joined #ruby
TrufflePump has quit [Ping timeout: 240 seconds]
<Successus> I am not sure how to tell irb where ruby is located?
<Successus> Please help me with this
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
entropie has quit [Ping timeout: 260 seconds]
entropie has joined #ruby
TrufflePump has joined #ruby
marck has quit [Quit: Client closed]
TrufflePump has quit [Ping timeout: 246 seconds]
<adam12> Successus: What do you mean?
bit4bit has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
<Successus> I need to test if new irb works?
TrufflePump has joined #ruby
<Successus> I had a problem with irb where it couldn't run ruby expressions unless I used --singleline
<Successus> so you said that I need to test with newest ruby, but I don't know how to run newest irb
oxfuxxx has quit [Ping timeout: 255 seconds]
jpn has joined #ruby
TrufflePump has quit [Ping timeout: 276 seconds]
<weaksauce> Successus inside irb you can type RUBY_VERSION to see what is running
<weaksauce> just use a ruby version manager like rbenv or chruby or asdf
moldorcoder7 has joined #ruby
jpn has quit [Ping timeout: 276 seconds]
<adam12> Successus: I don't know of a great way to run from compiled source. My suggestion is to compile into a prefix and then run from that prefix. It's not great but I'm not sure of a better approach.
<adam12> Successus: Something like: ./configure --prefix=$HOME/ruby31; make; make install; PATH=$HOME/ruby31/bin:$PATH irb
<Successus> I see
<Successus> that is what I needed
fredlinhares has joined #ruby
jpn has joined #ruby
<Successus> so it does not have to be the newest irb
<Successus> I changed the path variable but when I start irb it shows old version of ruby
<adam12> how about $HOME/ruby31/bin/ruby -S irb
<adam12> I'm really not sure. Maybe someone else has some ideas. I usually just ruby-install or frum.
<Successus> gives some error
fredlinhares has quit [Read error: Connection reset by peer]
jpn has quit [Ping timeout: 240 seconds]
<Successus> what is ruby-install and frum?
<Successus> I guess I can just type every command in the editor and then paste into irb
marcos has joined #ruby
marcos has quit [Client Quit]
fredlinhares has joined #ruby
<weaksauce> Successus you can use chruby and add your path to the custom compiled ruby to the rubies path
TrufflePump has joined #ruby
pgib has joined #ruby
Ziyan has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
hololeap has joined #ruby
jpn has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
<Successus> now I can't remember how I tested it, I just remember I compiled newest ruby, few months ago
<Successus> it was in december I think
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
protektwar has quit [Quit: quitting away..]
joast has quit [Ping timeout: 240 seconds]
fredlinhares has quit [Read error: Connection reset by peer]
fredlinhares has joined #ruby
jpn has joined #ruby
RickHull has quit [Ping timeout: 258 seconds]
fredlinhares has quit [Read error: Connection reset by peer]
Ziyan has quit [Ping timeout: 255 seconds]
fredlinhares has joined #ruby
Ziyan has joined #ruby
pgib has quit [Ping timeout: 258 seconds]
Ziyan has quit [Ping timeout: 244 seconds]
Ziyan has joined #ruby
pgib has joined #ruby
fef has joined #ruby
howdoi has joined #ruby
_ht has quit [Remote host closed the connection]
fef has quit [Ping timeout: 240 seconds]
Ziyan has quit [Ping timeout: 258 seconds]
Ziyan has joined #ruby
jpn has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
pgib has quit [Ping timeout: 255 seconds]
fredlinhares has quit [Read error: Connection reset by peer]
fredlinhares has joined #ruby
RickHull has joined #ruby
fredlinhares has quit [Quit: WeeChat 3.5]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
shokohsc has joined #ruby
ur5us has joined #ruby
bit4bit has quit [Remote host closed the connection]
Successus has quit []
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
tumdum has quit [Ping timeout: 255 seconds]
joast has joined #ruby
gproto23 has quit [Remote host closed the connection]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bastienleonard has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
perrierjouet has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby