SeepingN has quit [Quit: The system is going down for reboot NOW!]
skryking has quit [Ping timeout: 245 seconds]
skryking has joined #ruby
fphilipe_ has quit [Ping timeout: 276 seconds]
psilly0 has quit [Quit: psilly0]
amateur_rubyist has quit [Remote host closed the connection]
amateur_rubyist has joined #ruby
r29v has quit [Quit: r29v]
amateur_rubyist has quit [Ping timeout: 248 seconds]
catbusters has joined #ruby
henninb has quit [Remote host closed the connection]
r29v has joined #ruby
bambanx has joined #ruby
s3nd1v0g1us has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
^amra has joined #ruby
<^amra>
I have a string "^1SomeText1^2SomeText2^NSomeText3", how can I replace all between ^1 and ^2, ^2 and ^N, ^N and ^N+i by <font color="#f00">$1</font>
grilix has joined #ruby
<^amra>
For example: /\^1/
<^amra>
For example: /\^1SomeText1^/ to <font color="#f00">SomeText1</font>, and /\^2SomeText2^/ to <font color="#0cc">SomeText2</font>
<^amra>
For example: /\^1SomeText1^/ to <font color="#f00">SomeText1</font>^, and /\^2SomeText2^/ to <font color="#0cc">SomeText2</font>^
Swyper has joined #ruby
RiPuk has quit [Ping timeout: 245 seconds]
r29v has quit [Quit: r29v]
greengriminal has joined #ruby
<havenwood>
^amra: Where do those hex codes come from?
<^amra>
Which one?
<^amra>
#f00? html
<mozzarella>
yeah but both are different
<^amra>
for each text different color #hex code
<mozzarella>
how do you determine which one, though
<havenwood>
^amra: Why is the zero one zero and why is the city-cee one city-cee?
hope_canyon has joined #ruby
<^amra>
havenwood, umm, what do you mean?
<leftylink>
anytime I'm looking to do something with text between two instances of T, I consider splitting the text on T with String#split.
john2496 has quit []
<^amra>
Hm, this is idea... I need to split text first? Then work with each splitted value, right?
<havenwood>
^amra: An example of leftylink's strategy would be: "^1SomeText1^2SomeText2^3SomeText3"[/(?<=\A\^1).+(?=\d+\z)/].split(/\d+\^\d+/)
<^amra>
I have ["U", "n", "n", "a", "m", "e", "d", "P", "l", "a", "yer_1"], but how can I understand where is ^1 color code or ^2 ^3 etc?
<^amra>
And this code ignores digits in text
<^amra>
'^1U1^2n223^3nd^4a22^5m^6e^7d^8P^9l^0a^7yer_1'.scan(/(?<=\^\d)[^\^\d]+/) - will be without digits in array
<^amra>
I do this: '^1U1^2n223^3nd^4a22^5m^6e^7d^8P^9l^0a^7yer_1'.split(/\^\d/) and get ["", "U1", "n223", "nd", "a22", "m", "e", "d", "P", "l", "a", "yer_1"]
<^amra>
But i lost the ^1 ^2 ^N color codes
<leftylink>
then it looks like you shouldn't split on the \d, no? only the ^.
<havenwood>
^amra: You should show us the desired results up front.
<havenwood>
^amra: If you show us what you have, but not what you want, we can only stab wildly.
<^amra>
Now when I use split(/\^\d/) all ^N color markers was cropped out
<^amra>
splitting is correct but without needed color markers ^N
<havenwood>
^amra: We didn't know those were color markers. mozzarella asked: <mozzarella>:how do you determine which one, though
<^amra>
havenwood, sorry my fault. I want to split all by ^N(*.*)^N
<leftylink>
I accuse being too specific, but okay I'll humour it. note that if an Enumerable needs to be split before each occurrence of a given element (here, '^'), then Enumerable#slice_before is named appropriately for the occasion.
<havenwood>
(Since we'll just make the tests pass.)
<hope_canyon>
hi folks - have tried in the ROR channel already, thought i'd try here. I have a question for SCSS users: can anyone tell me precisely when SCSS is compiled and output as CSS in a rails app? I'm doing some dumb shit with IMGKit and it will apparently only accept paths to css files for the stylesheets attribute accessor. If there's a compiled css file somewhere in the application when the server runs, I am guessing i could just use that?
<havenwood>
leftylink: Create a file with the content: loop { fork { load File.absolute_path __FILE__ } }
<havenwood>
leftylink: Just don't run it. >.>
<havenwood>
hope_canyon: Would that depend on whether you're using Sprockets or Webpacker?
<^amra>
havenwood, this is the three view of output
<havenwood>
^amra: This is a picture of what?
<^amra>
Where is every string with ^\d ^\w is a marker.
<^amra>
And after that text in marker
<hope_canyon>
havenwood: sprockets! we're on rails 4.2.1.
<havenwood>
^amra: I'm totally lost on what this is and what you're trying to show. It's better to show us text. Gists are nice since they can be edited, we can fork them, comment, etc.
<^amra>
^^f12U1^x1^111d => ^<^f>12U1<^x>1<^1>11d
<^amra>
Oh ok
<^amra>
Which gist I must use?
<havenwood>
^amra: I don't get it. I'd say do a gist of example inputs with desired output for each.
<^amra>
ok
<havenwood>
^amra: Do you have a GitHub account? If so, just gist.github.com.
<brool>
when i google your error message the most common answer i see is for you to install "ruby-dev", but those comments are from a few years ago so i don't know if they're still relevant
RiPuk has quit [Ping timeout: 248 seconds]
SCHAPiE has joined #ruby
RiPuk has joined #ruby
sagax has quit [Quit: Konversation terminated!]
sagax has joined #ruby
<al2o3-cr>
sebcarotte: start with pasting the full error.
<brool>
on a paste bin
<al2o3-cr>
sebcarotte: to a pastebin of your choice
dbugger has quit [Remote host closed the connection]
ElFerna has joined #ruby
dbugger has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
marahin has quit [Ping timeout: 252 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
poontangmessiah has joined #ruby
marahin has joined #ruby
marahin has quit [Changing host]
marahin has joined #ruby
Nicmavr has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grilix has quit [Ping timeout: 245 seconds]
dbugger has quit [Quit: Leaving]
jcalla has quit [Ping timeout: 258 seconds]
absolutejam has joined #ruby
thomas_25 has joined #ruby
jangid has joined #ruby
tdy has joined #ruby
grilix has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
jangid has left #ruby ["ERC (IRC client for Emacs 26.2)"]
jottr has joined #ruby
sagax has quit [Remote host closed the connection]
john2496 has quit [Remote host closed the connection]
yann-kaelig has joined #ruby
thomas_25 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 252 seconds]
al-damiri has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
DTZUZO has joined #ruby
crankharder has joined #ruby
haengma has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
haengma has quit [Client Quit]
haengma has joined #ruby
banisterfiend has joined #ruby
john2496 has joined #ruby
absolutejam has quit [Ping timeout: 272 seconds]
banisterfiend has quit [Client Quit]
john2496 has quit [Ping timeout: 246 seconds]
absolutejam has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
schneider has quit [Ping timeout: 244 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
teardown has quit [Ping timeout: 245 seconds]
za1b1tsu has quit [Remote host closed the connection]
Criten has joined #ruby
<Criten>
:D
thomas_25 has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
sebcarotte has quit [Remote host closed the connection]
thomas_25 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs1 has joined #ruby
involans has quit [Quit: involans]
greengriminal has joined #ruby
bmurt has joined #ruby
teser has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElFerna has quit [Read error: Connection reset by peer]
ElFerna has joined #ruby
ElFerna has quit [Remote host closed the connection]
involans has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<brool>
:D
involans has quit [Quit: involans]
banisterfiend has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
MrCrackPot has quit [Max SendQ exceeded]
MrCrackPot has joined #ruby
MrCrackPot has quit [Max SendQ exceeded]
MrCrackPot has joined #ruby
absolutejam has quit [Ping timeout: 272 seconds]
ellcs1 has quit [Ping timeout: 264 seconds]
jaequery has joined #ruby
involans has joined #ruby
r29v has quit [Quit: r29v]
tdy has quit [Ping timeout: 244 seconds]
involans has quit [Quit: involans]
grilix has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
s2013 has joined #ruby
<quintasan>
How do I stub TCPSocket using minitest so that it can receive puts? I tried using spy gem but now my tests failed with 'called private method puts for nil:NilClass' https://dpaste.de/uKAG
greengriminal has quit [Quit: Leaving]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
unreal has joined #ruby
haengma has quit [Remote host closed the connection]