00:07
rvalue has quit [Ping timeout: 264 seconds]
00:17
rvalue has joined #ruby
00:19
jenrzzz_ has joined #ruby
00:53
jenrzzz_ has quit [Ping timeout: 268 seconds]
01:10
Vonter has quit [Ping timeout: 256 seconds]
01:12
Vonter has joined #ruby
01:14
jenrzzz_ has joined #ruby
01:32
<
zayd >
Am I supposed to use #variable or #{variable} when I'm only printing one variable at a time with puts?
01:40
FetidToot has quit [Quit: Ping timeout (120 seconds)]
01:41
FetidToot has joined #ruby
01:43
<
zayd >
sam113101, what am i supposed to use then?
01:49
<
weaksauce >
zayd get in the habit of using p instead of puts
01:49
<
weaksauce >
but either way for single variables just use the name `p foo_bar`
01:51
<
zayd >
probably should have been more clear with this, but as in single variables i meant "Kernel: #{@kernel}"
01:51
<
zayd >
weaksauce, what do they do differently? sorry if this is a dumb question, i'm still kind of new to ruby
01:53
<
weaksauce >
zayd if you puts a string it will output in a human readable way where if you us p it will be the actual string with newlines listed etc
01:53
<
weaksauce >
technically puts calls to_s and the p calls inspect i think
01:53
<
zayd >
so i should use `p` in most cases?
01:54
<
weaksauce >
i do for most things
01:54
<
weaksauce >
sometimes puts is useful but most times p is more relevant
01:56
<
weaksauce >
don't mind the splat
01:56
<
weaksauce >
same as if you were to do 1,2,3,4,5,6 etc
02:00
<
weaksauce >
but to answer your original question it's better to label it if you can like "kernel: #{@kernel}"
02:01
<
weaksauce >
i find that annoying to write though so i'll just do p [:kernel, kernel]
02:27
jenrzzz_ has quit [Ping timeout: 268 seconds]
02:41
Pixi has quit [Quit: Leaving]
02:43
Pixi has joined #ruby
02:49
jenrzzz_ has joined #ruby
03:37
jenrzzz_ has quit [Ping timeout: 256 seconds]
03:46
jenrzzz_ has joined #ruby
04:10
jenrzzz_ has quit [Ping timeout: 240 seconds]
04:58
grenierm has joined #ruby
05:11
Goodbye_Vincent has quit [Quit: ]
05:13
Goodbye_Vincent has joined #ruby
06:02
_ht has joined #ruby
06:19
user71 has joined #ruby
06:28
jenrzzz_ has joined #ruby
06:33
jenrzzz_ has quit [Ping timeout: 260 seconds]
07:28
jetchisel has quit [Ping timeout: 256 seconds]
07:28
jetchisel has joined #ruby
07:36
krocos has joined #ruby
07:38
krocos has quit [Client Quit]
07:52
jenrzzz_ has joined #ruby
07:59
<
[0x1eef_] >
Anyone from Uruguay here?
07:59
jenrzzz_ has quit [Ping timeout: 268 seconds]
08:00
jenrzzz_ has joined #ruby
08:05
jenrzzz_ has quit [Ping timeout: 256 seconds]
08:21
grenierm has quit [Quit: Client closed]
08:30
Vonter has quit [Ping timeout: 268 seconds]
08:32
Vonter has joined #ruby
08:38
jenrzzz_ has joined #ruby
08:52
jmcantrell has quit [Ping timeout: 256 seconds]
08:53
patrick__ has quit [Ping timeout: 256 seconds]
08:53
patrick__ has joined #ruby
08:55
jmcantrell has joined #ruby
09:12
jenrzzz_ has quit [Ping timeout: 260 seconds]
09:23
jenrzzz_ has joined #ruby
09:38
gr33n7007h has quit [Quit: WeeChat 4.2.1]
09:38
weaksauc_ has joined #ruby
09:40
gr33n7007h has joined #ruby
09:40
havenwood4 has joined #ruby
09:41
havenwood has quit [Ping timeout: 268 seconds]
09:41
weaksauce has quit [Ping timeout: 268 seconds]
09:41
havenwood4 is now known as havenwood
09:46
<
rapha >
No, pero hay mi terceca (?) classe de Espanol manana!
09:46
<
henk >
zayd: you might also not know but be interested in 'pp'
09:47
<
rapha >
zayd: pp is what i mostly use for debugging when there's no debugger. puts for user-facing output.
09:50
jenrzzz_ has quit [Ping timeout: 256 seconds]
09:50
user71 has quit [Quit: Leaving]
10:04
infinity_fye has joined #ruby
10:04
infinity_fye has quit [Remote host closed the connection]
10:05
infinityfye has quit [Ping timeout: 276 seconds]
10:32
TomyWork has joined #ruby
10:34
cybniv has joined #ruby
10:35
weaksauce has joined #ruby
10:36
eoli3n_ has joined #ruby
10:36
adam127 has joined #ruby
10:36
havenwood0 has joined #ruby
10:36
meimei_ has joined #ruby
10:36
away has joined #ruby
10:36
cuppajoeman_ has joined #ruby
10:37
itok_ has joined #ruby
10:37
kapil_ has joined #ruby
10:37
wryishly has joined #ruby
10:37
olusx has joined #ruby
10:37
dannyAAM_ has joined #ruby
10:38
hexology- has joined #ruby
10:39
intellig1nt_boat has joined #ruby
10:39
mweckbec1er has joined #ruby
10:39
ghostbusters2 has joined #ruby
10:39
gcd has joined #ruby
10:41
weyhmueller_ has joined #ruby
10:44
havenwood has quit [*.net *.split]
10:44
weaksauc_ has quit [*.net *.split]
10:44
dannyAAM has quit [*.net *.split]
10:44
niv has quit [*.net *.split]
10:44
eoli3n has quit [*.net *.split]
10:44
whysthatso125070 has quit [*.net *.split]
10:44
gcd_ has quit [*.net *.split]
10:44
meimei has quit [*.net *.split]
10:44
pounce has quit [*.net *.split]
10:44
mweckbecker has quit [*.net *.split]
10:44
tweaks has quit [*.net *.split]
10:44
weyhmueller has quit [*.net *.split]
10:44
olus has quit [*.net *.split]
10:44
adam12 has quit [*.net *.split]
10:44
itok has quit [*.net *.split]
10:44
mx has quit [*.net *.split]
10:44
hexology has quit [*.net *.split]
10:44
kapil has quit [*.net *.split]
10:44
wryish has quit [*.net *.split]
10:44
ghostbuster has quit [*.net *.split]
10:44
cuppajoeman has quit [*.net *.split]
10:44
intelligent_boat has quit [*.net *.split]
10:44
havenwood0 is now known as havenwood
10:44
adam127 is now known as adam12
10:44
cuppajoeman_ is now known as cuppajoeman
10:44
eoli3n_ is now known as eoli3n
10:44
dannyAAM_ is now known as dannyAAM
10:44
itok_ is now known as itok
10:44
meimei_ is now known as meimei
10:50
pounce has joined #ruby
10:51
tweaks has joined #ruby
10:52
user71 has joined #ruby
10:56
Vonter has quit [Ping timeout: 268 seconds]
10:58
Vonter has joined #ruby
11:06
away is now known as mx
11:28
Goodbye_Vincent has quit [Ping timeout: 264 seconds]
11:29
FullMetalStacket has joined #ruby
11:30
Goodbye_Vincent has joined #ruby
11:33
xdminsy has joined #ruby
11:35
FullMetalStacket has quit [Quit: Konversation terminated!]
11:36
mweckbec1er has quit [Quit: leaving]
11:37
mweckbecker has joined #ruby
11:44
graywolf has joined #ruby
11:50
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
11:50
crespire1 has joined #ruby
11:54
<
[0x1eef_] >
rapha: Your spanish is better than mine.
12:12
Aminda has quit [Ping timeout: 255 seconds]
12:14
Aminda has joined #ruby
12:22
graywolf has quit [Quit: WeeChat 4.0.4]
12:26
hexology- is now known as hexology
12:31
user71 has quit [Quit: Leaving]
12:48
infinityfye has joined #ruby
12:51
Vonter has quit [Ping timeout: 246 seconds]
12:53
Vonter has joined #ruby
13:08
jenrzzz_ has joined #ruby
13:13
jenrzzz_ has quit [Ping timeout: 260 seconds]
13:17
Goodbye_Vincent has quit [Quit: ]
13:18
Goodbye_Vincent has joined #ruby
13:19
donofrio_ has quit [Ping timeout: 264 seconds]
13:20
donofrio has joined #ruby
13:25
Goodbye_Vincent has quit [Ping timeout: 256 seconds]
13:28
Goodbye_Vincent has joined #ruby
13:42
wyclif has joined #ruby
13:48
user71 has joined #ruby
13:49
user71 has quit [Client Quit]
14:22
jenrzzz_ has joined #ruby
14:25
wyclif has quit [Quit: leaving]
14:28
jenrzzz_ has quit [Ping timeout: 256 seconds]
14:32
fercell has joined #ruby
14:35
Vonter has quit [Ping timeout: 252 seconds]
14:36
Vonter has joined #ruby
14:44
Goodbye_Vincent has quit [Ping timeout: 252 seconds]
15:00
cek has joined #ruby
15:01
<
rapha >
well what can i say, i binge watched all of Narcos
_and_ Narcos: Mexico
15:02
<
rapha >
(and no, Griselda)
15:06
Goodbye_Vincent has joined #ruby
15:11
dviola has joined #ruby
15:53
reset has quit [Quit: reset]
16:15
Pixi has quit [Quit: Leaving]
16:16
Pixi has joined #ruby
16:20
jenrzzz_ has joined #ruby
16:25
jenrzzz_ has quit [Ping timeout: 268 seconds]
16:33
jenrzzz_ has joined #ruby
16:39
jenrzzz_ has quit [Ping timeout: 260 seconds]
16:40
user71 has joined #ruby
16:55
nil78 has quit [Read error: Connection reset by peer]
16:56
nil78 has joined #ruby
16:57
jenrzzz_ has joined #ruby
17:07
jenrzzz has quit [Ping timeout: 256 seconds]
17:19
mexen has joined #ruby
17:21
dviola has quit [Quit: WeeChat 4.2.1]
17:22
joahim has joined #ruby
17:26
dviola has joined #ruby
17:43
jenrzzz has joined #ruby
17:49
Vonter has quit [Ping timeout: 256 seconds]
17:49
TomyWork has quit [Remote host closed the connection]
17:50
Vonter has joined #ruby
17:57
rvalue has quit [Ping timeout: 268 seconds]
18:04
rvalue has joined #ruby
18:28
joahim has quit [Ping timeout: 268 seconds]
18:37
Doc_X has quit [Ping timeout: 268 seconds]
18:38
Doc_X has joined #ruby
18:45
reset has joined #ruby
18:45
reset has quit [*.net *.split]
18:46
reset has joined #ruby
18:56
joahim has joined #ruby
19:02
jenrzzz_ has quit [Ping timeout: 252 seconds]
19:06
joahim has quit [Read error: Connection reset by peer]
19:08
jenrzzz_ has joined #ruby
19:09
<
rapha >
hola joahim
19:13
jenrzzz has quit [Read error: Connection reset by peer]
19:13
jenrzzz has joined #ruby
19:15
jenrzzz_ has quit [Ping timeout: 255 seconds]
19:16
yosafbridge has quit [Quit: Leaving]
19:17
jenrzzz_ has joined #ruby
19:38
yosafbridge has joined #ruby
19:40
dviola has quit [Ping timeout: 260 seconds]
19:40
howdoi has joined #ruby
19:43
pgib has joined #ruby
19:49
<
rapha >
weaksauce: alright, sooo ... it works when using webrick, either directly or through rackup. puma, unicorn and iodine do NOT work.
19:55
<
adam12 >
rapha: what does not work
19:55
<
adam12 >
Iodine buffers responses. I bet Unicorn does too.
19:55
<
adam12 >
(taking a stab in the dark about what might be similar to both)
19:56
<
adam12 >
Almost guarantee it's something related to buffering, but I am not familiar enough with Turbo.
19:57
<
adam12 >
Oh. You said Puma doesn't work
19:57
<
adam12 >
How many workers/threads for them?
19:57
<
adam12 >
I'm not sure that matters since you stepped the code, but might as well ask.
19:59
<
rapha >
wait, with puma i forgot to specify
19:59
<
adam12 >
Can you add a few? Perhaps the websocket connection is blocking.
20:00
<
rapha >
puma 10/10 and not working :P
20:00
<
adam12 >
Small demo I can try?
20:00
<
rapha >
and `ruby -run -e httpd . --bind-address=0.0.0.0 --port=3000` is only 1/1, right?
20:00
<
adam12 >
Oh I see it. I'll clone the one you shared.
20:00
<
adam12 >
I doubt it. Webrick has an unbound number of threads, if I remember right.
20:02
<
rapha >
hmm even with webrick it won't work with the locally served javascript
20:03
<
rapha >
ah, that's because of my mimetype change code not working
20:07
<
adam12 >
That's the issue
20:07
<
adam12 >
Return `text/html` for the content URL
20:07
<
adam12 >
get '/example-content' do
20:07
<
adam12 >
+ response.headers["Content-type"] = "text/html"
20:12
<
rapha >
even with just 1/1 workers/threads
20:12
<
rapha >
thank you for solving this riddle, adam12 :)
20:13
<
adam12 >
Yeah. I thought it used websockets by default but I must have been mistaken.
20:13
<
adam12 >
I used Iodine in a project where I proxied websockets, so I know that if you run it single-thread/single-worker, weird things happen
20:14
<
adam12 >
Sadly that contract didn't renew this year :\ I need to find another contract or two to fill some time gaps.
20:14
<
rapha >
oh, sorry to hear that
20:14
<
adam12 >
Thanks. It happens :)
20:14
<
rapha >
didn't know you were self-employed
20:14
<
adam12 >
I've run my own agency sine 2006.
20:15
<
rapha >
sooo ... not self-employed, but having your own company, with employees and all?
20:15
<
adam12 >
No employees.
20:15
<
adam12 >
(not sure I'd want the stress of having to keep them employed too)
20:15
<
rapha >
so, self-employed but calling it agency because that sells better :)
20:16
<
adam12 >
Exactly :)
20:17
<
rapha >
i understand about the stress of having to care for employees. there's other models, too, though. a few people i know are running a cargo bike manufacturing shop. carbon fibre and stuff. and it's entirely employee-run. they do have a "boss" but they elect him and he can step down from being the boss whenever he doesn't feel like being the boss anymore.
20:17
<
adam12 >
I'm actually considering a full-time role this year for the first time .. ever.
20:17
<
rapha >
takes good communications skills on all sides, but then everything is shared, stress included, which gives a really strong backbone to the whole thing.
20:18
<
adam12 >
Writing code and solving issues is a lot more interesting to me than sales, marketing, accounting, etc. I have bookkeeper + accountant to alleviate some pieces, but the grind as a solo is very hard.
20:18
<
rapha >
i tried to do it and it broke me.
20:18
<
rapha >
twice actually, once in 2003, once in 2008.
20:19
<
rapha >
now i'm happily (more or less) employed.
20:23
<
rapha >
and now, since i'm on sick leave, finally the next step in this little project ... figure out streams and add a C3 chart on top.
20:24
<
rapha >
and then figure out how to have a separate Thread push fresh data into it every second
20:30
<
adam12 >
I need to do a project with Turbo just to see how much it's changed since I used it last.
20:39
<
rapha >
how about something that keeps stock of your pantry and fridge?
20:42
<
adam12 >
rapha: Interesting :)
20:50
Guest40 has joined #ruby
20:54
xdminsy has quit [Read error: Connection reset by peer]
21:04
_ht has quit [Remote host closed the connection]
21:08
mmohammadi9812 has joined #ruby
21:14
pgib has quit [Remote host closed the connection]
21:17
mmohammadi9812 has quit [Remote host closed the connection]
21:17
pgib has joined #ruby
21:19
mmohammadi9812 has joined #ruby
21:19
Guest40 has quit [Ping timeout: 250 seconds]
21:25
mmohammadi9812 has quit [Ping timeout: 272 seconds]
21:26
<
rapha >
huh? it's almost as if github is down?
21:26
<
rapha >
since 45 minutes? o_O
21:30
pgib has quit [Ping timeout: 252 seconds]
21:31
jenrzzz_ has quit [Ping timeout: 240 seconds]
21:31
jenrzzz_ has joined #ruby
21:32
pgib has joined #ruby
21:33
<
adam12 >
And it's not even Tuesday? Weird.
21:33
<
adam12 >
All green here.
21:35
<
adam12 >
Looks like a routing issue maybe.
21:35
<
rapha >
From, of all places, downforeveryoneorjustme.com to, of all places, GH. That'd be funny.
21:39
jenrzzz_ has quit [Ping timeout: 246 seconds]
21:40
mange has joined #ruby
21:45
<
weaksauce >
so it was just a mime issue rapha ?
21:45
<
rapha >
yes, weaksauce. that was all.
21:45
<
weaksauce >
annoying
21:46
<
rapha >
now i'm annoyed at a new thing: using modern JS libraries without a bundler.
21:47
jenrzzz_ has joined #ruby
21:47
<
weaksauce >
yeah js not even once
21:52
jenrzzz_ has quit [Ping timeout: 255 seconds]
21:55
jenrzzz_ has joined #ruby
21:57
<
rapha >
hmm i think i just have to .gsub(/import\s+['"]@([\w+\/]/, 'import "nodes_modules/\1') the .js files before serving them
22:00
jenrzzz_ has quit [Ping timeout: 256 seconds]
22:02
justache has quit [Read error: Connection reset by peer]
22:02
user71 has quit [Quit: Leaving]
22:05
justache has joined #ruby
22:06
<
rapha >
argh. that doesn't work. it makes the browser thing it should access .../node_modules/...
22:07
<
rapha >
would have to map a path on the fly, not sure i want to do that.
22:07
pgib has quit [Read error: Connection reset by peer]
22:07
<
adam12 >
rapha: download from esm.sh :P
22:07
<
adam12 >
I'm planning on making a non-Rails version of importmaps-rails I think. I
_hate_ bundlers for JS.
22:07
<
adam12 >
(tho esbuild is OK)
22:08
jenrzzz_ has joined #ruby
22:09
<
rapha >
interesting. i've never heard of ESM before yesterday or esm.sh until now. so i thought "let me try and see what rails does" which led to "can i make something like importmaps-rails myself?"
22:09
* rapha
checks out adam12's project
22:09
<
rapha >
does it work a little already?
22:11
<
rapha >
hmm it knows about source and destination paths, have something that looks like it's doing something and something that looks like it's writing something.
22:22
jenrzzz_ has quit [Ping timeout: 272 seconds]
22:25
jenrzzz_ has joined #ruby
22:34
<
rapha >
and there is no write_manifest. i'm so sure i must have an older version.
*scratches head*
22:48
<
rapha >
alright, got it
22:49
cek has quit [Quit: Connection closed for inactivity]
22:49
<
rapha >
but it doesn't yet know how to deal with the '@' stuff, does it :/
22:53
<
rapha >
btw i looked at esm.sh and i don't want to use it as it's a CDN
22:56
<
adam12 >
rapha: It's beta. I'm going to start using it on gemdocs.org.
22:56
<
adam12 >
I wouldn't use esm.sh as CDN, but rather `curl esm.sh/some-dependency > vendor/some-dependency.js`
22:56
<
rapha >
but i like yours
22:56
<
adam12 >
I haven't tested it with @ but that's a good idea.
22:57
<
rapha >
is it a good idea to go with something like importmap-rails paths when calling AssetDigest::Digest#new?
22:57
<
rapha >
as in, assets/config/manifest.js?
23:00
ruby[bot] has quit [Read error: Connection reset by peer]
23:00
ruby[bot] has joined #ruby
23:02
<
rapha >
ah, evidently not. atm it doesn't mkdir_p the path to the manifest.
23:04
Guest63 has joined #ruby
23:05
<
rapha >
hmm, and wouldn't such a digester have to output an importmap, as well?
23:05
Guest63 has quit [Client Quit]
23:17
jenrzzz_ has quit [Ping timeout: 240 seconds]
23:18
Vonter has quit [Ping timeout: 255 seconds]
23:20
Vonter has joined #ruby
23:32
jenrzzz_ has joined #ruby
23:40
<
adam12 >
rapha: I'd probably have it output an importmap too eventually, but for now I just do it manually.
23:41
jenrzzz_ has quit [Ping timeout: 252 seconds]
23:55
jenrzzz_ has joined #ruby