Garb0 has quit [Ping timeout: 258 seconds]
_aeris_ has joined #ruby
aeris- has quit [Ping timeout: 244 seconds]
ur5us_ has quit [Ping timeout: 256 seconds]
<splud> I'm using TCPServer class for an extremely minimalistic http transaction. client is POSTing a file. I'm parsing the headers, all this is good, stuff works. However, I want to deal with error conditions in advance of suffering the whole transfer.
<splud> namely, I have content size - if this is too much (either in excess of the agreed upon max size, or for some reason, available device space is less than this), I'd like to NOT accept the content and be able to return an HTTP error 9what that is is a different matter. But the client won't get anything I send until they're done sending, right?
<splud> in the typical http POST.
<splud> how can I return an error before accepting everything?
<splud> notet that multipart means that the content-size as given in the HTTP header may not be any ONE file. Also, there may be errors thrown for proffered filenames irrespective of size, and those are not known until the mime chunks are being parsed.
ur5us_ has joined #ruby
jacktar has quit [Ping timeout: 244 seconds]
jacktar has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
ollysmith has quit [Ping timeout: 240 seconds]
ollysmith has joined #ruby
caleb_ has joined #ruby
caleb_ has quit [Quit: leaving]
skali has joined #ruby
<splud> So, I'm guessing nobody handles POST method with web services in ruby, or just trusts some framework to handle stuff?
<splud> My problem is that if someone posts several hundred MB of content, that balloons the memory used by the ruby process long before my own code sees it, so I've had to implement my own TCPServer...
mrkz_c has quit [Quit: Connection closed for inactivity]
viole has joined #ruby
<viole> anyone has experience with ROM?
<viole> I'm really frustrated trying to get started. Tthere's not a single working simple example
gigamo has quit [*.net *.split]
shrub has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
jhass has quit [*.net *.split]
joast has quit [*.net *.split]
olspookishmagus has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
ikonia has quit [*.net *.split]
dvu has quit [*.net *.split]
wmoxam has quit [*.net *.split]
wmoxam has joined #ruby
pookie has joined #ruby
shrub has joined #ruby
ikonia has joined #ruby
nyuszika7h_ has joined #ruby
dvu has joined #ruby
gigamo has joined #ruby
markmarkmark has quit [*.net *.split]
chromis has quit [*.net *.split]
isene has quit [*.net *.split]
eof has quit [*.net *.split]
newton has quit [*.net *.split]
newton has joined #ruby
chromis has joined #ruby
nyuszika7h_ is now known as nyuszika7h
Furai has quit [*.net *.split]
eam has quit [*.net *.split]
eldritch__ has quit [*.net *.split]
rapha has quit [*.net *.split]
mahlon has quit [*.net *.split]
kenichi has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
eam has joined #ruby
kenichi has joined #ruby
rapha has joined #ruby
Furai has joined #ruby
mahlon has joined #ruby
Milos has quit [*.net *.split]
atj has quit [*.net *.split]
tv- has quit [*.net *.split]
adam12 has quit [*.net *.split]
oz has quit [*.net *.split]
atj has joined #ruby
Milos has joined #ruby
atj is now known as Guest9771
Milos is now known as Guest5136
summerisle has joined #ruby
ox has joined #ruby
dannyAAM has joined #ruby
jhass has joined #ruby
eldritch_ has joined #ruby
Guest9771 is now known as atj
atj is now known as Guest3339
isene has joined #ruby
tv- has joined #ruby
markmarkmark has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
patrick has quit [Ping timeout: 268 seconds]
Guest5136 has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
Milos has quit [Client Quit]
Milos has joined #ruby
Guest3339 is now known as atj
atj is now known as Guest9956
lucerne has quit [Remote host closed the connection]
gigamo has quit [Changing host]
gigamo has joined #ruby
jetchisel has quit [Ping timeout: 265 seconds]
TomyWork has joined #ruby
teclator has joined #ruby
_ht has joined #ruby
Furai has quit [Quit: WeeChat 3.2]
Furai has joined #ruby
Guest9956 is now known as atj
atj is now known as Guest9332
vadviktor has joined #ruby
Nyeogmi has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest9332 is now known as atj
atj is now known as Guest8208
Guest8208 is now known as atj
relyks has joined #ruby
skali has joined #ruby
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
Qchmqs has joined #ruby
relyks has quit [Quit: relyks]
relyks has joined #ruby
skali is now known as skali_
skali_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Garb0 has joined #ruby
skali has joined #ruby
jetchisel has joined #ruby
BinaryVixen899 has quit [Read error: Connection reset by peer]
Garb0 has quit [Read error: Connection reset by peer]
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skali has joined #ruby
chrysanthematic has joined #ruby
chrysanthematic has quit [Client Quit]
gearnode has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
ur5us_ has quit [Ping timeout: 252 seconds]
jetchisel has joined #ruby
Rounin has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
chrysanthematic has joined #ruby
chrysanthematic has quit [Client Quit]
jhawthorn has joined #ruby
jhawthorn_ has quit [Ping timeout: 252 seconds]
wasamasa has joined #ruby
<wasamasa> is there a maintained IRC bot gem?
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wasamasa> I tried to use cinch and the example fails on me with an error deep inside the logger
<wasamasa> went through ruby toolbox and none of the alternatives seems better
<gr33n7007h> wasamasa: cinch is probably the best one out there, unless you write your own.
<wasamasa> maybe a ruby 3.0.0 incompatibility
skali has joined #ruby
<gr33n7007h> wasamasa: very likely.
<wasamasa> the problematic line is @output.puts message.encode("locale", {:invalid => :replace, :undef => :replace})
<wasamasa> so I guess String.encode no longer accepts that hash?
<wasamasa> wait
<wasamasa> it doesn't like a hash instead of an options rest argument
<wasamasa> the fuck
<wasamasa> why did they break compatibility
<gr33n7007h> wasamasa: use ```message.encode("locale", **{:invalid => :replace, :undef => :replace})```
<wasamasa> I'd need to monkeypatch that method for that, no
<wasamasa> I can also use message.encode("locale", invalid: :replace, :undef :replace)
<wasamasa> to sacrifice 1.8 compatibility or whatever
<gr33n7007h> wasamasa: ah, i thought it was something you wrote, if it's internal then yes, you'd have to monkeypatch.
<gr33n7007h> wasamasa: was just about to link this :p
jetchisel has joined #ruby
jetchisel has quit [Ping timeout: 252 seconds]
jetchisel has joined #ruby
<wasamasa> ok, fixed that and there's of course more incompatibilities
<wasamasa> argh
<wasamasa> maybe I should just use someone else's fork
<wasamasa> oh wait
Garb0 has joined #ruby
adam12 has joined #ruby
Garb0 has quit [Ping timeout: 252 seconds]
Garb0 has joined #ruby
relyks has quit [Quit: relyks]
jetchisel has quit [Ping timeout: 246 seconds]
Garb00 has joined #ruby
Garb0 has quit [Ping timeout: 252 seconds]
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jetchisel has joined #ruby
vadviktor has quit [Ping timeout: 246 seconds]
coffeejunk has joined #ruby
skali has joined #ruby
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greyrat has quit [Quit: Bye]
greyrat has joined #ruby
lucerne has joined #ruby
bandithijo has joined #ruby
bandithijo has quit [Quit: WeeChat 3.2-rc1]
bandithijo has joined #ruby
unyu has quit [Quit: WeeChat 3.2]
pookie has quit [Quit: All for nothing]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
olspookishmagus has joined #ruby
easbarbosa has joined #ruby
goldfish has joined #ruby
<easbarbosa> hey, how to add an external gem git repository to gemfile?
<easbarbosa> so far I done: gem 'floss', '0.1.0', git: 'https://git.sr.ht/~easbarbosa/floss', branch: 'main'
<easbarbosa> install with `bundle install`
<easbarbosa> but once I require it i wont find it.
<easbarbosa> `require': cannot load such file -- floss
<adam12> easbarbosa: You need to have bundler setup somehow. This can happen two ways: `bundle exec <your ruby command` or by `require "bundler/setup"`.
<adam12> easbarbosa: It sounds like that's not happening.
wasamasa has left #ruby [Bye]
<easbarbosa> adam12: haha, thanks!
Qchmqs has quit [Ping timeout: 252 seconds]
<adam12> easbarbosa: yw!
goldfish has quit [Remote host closed the connection]
ox is now known as oz
goldfish has joined #ruby
Garb00 has quit [Quit: Garb00]
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
Qchmqs has joined #ruby
bandithijo has quit [Quit: WeeChat 3.2-rc1]
bandithijo has joined #ruby
bandithijo has quit [Quit: WeeChat 3.2-rc1]
<nakilon> imagine {1 => 1, 2 => 123, 3 => 0} and that I want to chose random key proportinal to value
<nakilon> so I do h.flat_map{ |k,v| [k]*v }.sample
<nakilon> but how do I do the same if values are floats?
joast has joined #ruby
sam113102 has joined #ruby
pwnd_sfw1 has joined #ruby
ignorand has joined #ruby
<ignorand> https://github.com/ralovets/valid_url/ How would I go about using this in Ruby (without RoR models)
sam113101 has quit [Ping timeout: 272 seconds]
dvu has quit [Ping timeout: 272 seconds]
sam113102 is now known as sam113101
pwnd_sfw has quit [Ping timeout: 272 seconds]
pwnd_sfw1 is now known as pwnd_sfw
dvu has joined #ruby
Qchmqs has quit [Ping timeout: 252 seconds]
<nakilon> ok it still does not work and I broke it ..( https://i.imgur.com/cX7tIHz.mp4
<nakilon> oops, wrong channel
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<EdwardIII> nakilon: what's that?
<EdwardIII> looks interesting
Garb0 has joined #ruby
mrkz_c has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
<nakilon> EdwardIII just some procedural generation https://i.imgur.com/XJ7XdO7.mp4
<EdwardIII> nakilon: cool, which language?
<nakilon> ruby
patrick has joined #ruby
<EdwardIII> nakilon: using something like gtk/dragonruby?
<nakilon> nope, ruby-vips and ffmpeg
<EdwardIII> neat
Garb0 has quit [Ping timeout: 252 seconds]
TomyWork has quit [Quit: Leaving]
Nyeogmi has joined #ruby
Nyeogmi has quit [Changing host]
Nyeogmi has joined #ruby
Garb0 has joined #ruby
easbarbosa has quit [Ping timeout: 252 seconds]
Garb0 has quit [Quit: Garb0]
diophantoz has left #ruby [#ruby]
menace has joined #ruby
reset has joined #ruby
<leftylink> weighted random... interesting. I guess you'd sum them up and divide each by the sum to map each to a range of values between 0 and 1, and then just rand
gcd has quit [*.net *.split]
legahc has quit [*.net *.split]
kenichi has quit [*.net *.split]
peder has quit [*.net *.split]
riceandbeans has quit [*.net *.split]
lipoqil has quit [*.net *.split]
_axx has quit [*.net *.split]
gfawcett has quit [*.net *.split]
EdwardIII has quit [*.net *.split]
eam has quit [*.net *.split]
cnsvc has quit [*.net *.split]
rodd has quit [*.net *.split]
kinduff has quit [*.net *.split]
splud has quit [*.net *.split]
aesthetikx has quit [*.net *.split]
forvelin has quit [*.net *.split]
kenichi has joined #ruby
eam has joined #ruby
kinduff has joined #ruby
peder has joined #ruby
riceandbeans has joined #ruby
lipoqil has joined #ruby
splud has joined #ruby
aesthetikx has joined #ruby
forvelin has joined #ruby
gcd has joined #ruby
legahc has joined #ruby
_axx has joined #ruby
EdwardIII has joined #ruby
gfawcett has joined #ruby
rodd has joined #ruby
cnsvc has joined #ruby
postmodern has joined #ruby
Garb0 has joined #ruby
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
Qchmqs has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
ignorand1 has joined #ruby
ignorand has quit [Ping timeout: 252 seconds]
jetchisel has quit [Ping timeout: 252 seconds]
_ht has quit [Remote host closed the connection]
Qchmqs_ has joined #ruby
Qchmqs has quit [Ping timeout: 246 seconds]
ignorand1 has quit [Ping timeout: 252 seconds]
jacktar has quit [Ping timeout: 244 seconds]
jacktar has joined #ruby
Garb0 has quit [Ping timeout: 240 seconds]
Garb0 has joined #ruby
ignorand has joined #ruby
Garb0 has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
lucf117 has joined #ruby
Qchmqs_ has quit [Ping timeout: 246 seconds]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
Garb0 has joined #ruby
Garb0 has quit [Ping timeout: 240 seconds]
Garb0 has joined #ruby
bandithijo has joined #ruby
Garb0 has quit [Ping timeout: 246 seconds]