Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:53
    straight-shoota closed #11334
  • 18:53
    straight-shoota closed #11318
  • 18:13
    yxhuvud synchronize #11289
  • 18:11
    yxhuvud synchronize #11289
  • 17:34
    straight-shoota edited #11340
  • 17:33
    straight-shoota labeled #11340
  • 17:33
    straight-shoota labeled #11340
  • 17:33
    straight-shoota opened #11340
  • 17:04
    straight-shoota labeled #11339
  • 17:04
    straight-shoota labeled #11339
  • 17:02
    will closed #11339
  • 16:27
    will opened #11339
  • 16:27
    will labeled #11339
  • 13:06
    straight-shoota milestoned #11277
  • 12:39
    straight-shoota milestoned #11338
  • 11:33
    straight-shoota milestoned #11327
  • 11:33
    straight-shoota demilestoned #11326
  • 11:33
    straight-shoota milestoned #11326
  • 10:42
    straight-shoota labeled #11338
  • 10:42
    straight-shoota labeled #11338
Jason Waldrip
@jwaldrip
well it is, but it isnt
the response io is the body io
response.to_io will give me the full stream
but im trying that now anyway
that writes the headers to the body :-)
not what I wanted
George Dietrich
@Blacksmoke16
hmm
Jason Waldrip
@jwaldrip
I just want to do a straight copy of the incoming IO
Elias Perez
@eliasjpr

Hello Everyone, I want to share with you a small shard that I have been working on. The shard name is called JoobQ (https://github.com/azutoolkit/joobq) and is a job scheduler very much like Sidekiq, It has a nice set of features and a dashboard UI (https://github.com/azutoolkit/dashforge) https://dashforge.io/

Features:
Priority queues based on number of workers
Reliable queue
Error Handling
Retry Jobs with automatic Delays
Cron Like Periodic Jobs
Delayed Jobs
Stop execution of workers
Jobs expiration

Jason Waldrip
@jwaldrip
whats the webm?
video
got it
Very nice
Elias Perez
@eliasjpr
this is a lengthier demo
Elias Perez
@eliasjpr
Thank you Json
Jason*
Jason Waldrip
@jwaldrip
ill respond to either
Elias Perez
@eliasjpr
haha
George Dietrich
@Blacksmoke16

I just want to do a straight copy of the incoming IO

Maybe IO.copy then?

Jason Waldrip
@jwaldrip
looking at that as well... but have to do some hackyness on the server response side with response.@io
George Dietrich
@Blacksmoke16
hmm
Jason Waldrip
@jwaldrip
some patching required

To gain access to the IO private method.

class HTTP::Client
  def unsafe_internal_io
    io
  end
end

then

def proxy(request : HTTP::Request, target_io : IO)
  io = @http_client.unsafe_internal_io
  request.to_io io
  io.flush
  IO.copy(io, target_io)
end
mfiano
@mjfiano:matrix.org
[m]
Hmm, lack of parallel assignment just caused me to debug for hours
George Dietrich
@Blacksmoke16
oh?
mfiano
@mjfiano:matrix.org
[m]
Yeah, this is wrong, and not the assignment operator I want https://gist.github.com/mfiano/c3c3599f7ebb0b7c834526e8465cc669
George Dietrich
@Blacksmoke16
wew, that looks like a pita
mfiano
@mjfiano:matrix.org
[m]
This is known as parallel assignment, when all the rhs of the expressions are evaluated before the lhs, such that all assignments happen at the same time, unlike that, where assignments of earlier values are using the newer bindings in later assignment expressions
THe solution in Crystal seems to be make a bunch of temp vars, or wrap it up with a nice macro bow on top. not built in i guess
George Dietrich
@Blacksmoke16
super minor but you could do def *(other a : self, *, into b : self) : self, then you wont need the a = self etc
but still support doing into: obj
Jason Waldrip
@jwaldrip
i believe you can also do parallel assignment with
into[0], into[1] = a[0, 0] * b[0, 0] + a[0, 1] * b[1, 0] + a[0, 2] * b[2, 0] + a[0, 3] * b[3, 0]
mfiano
@mjfiano:matrix.org
[m]
Yeah I tried that first, but it doesn't give the expected results for an array lookup
It's still not parallel in this case
mfiano
@mjfiano:matrix.org
[m]
@Blacksmoke16: If I do that then I wouldn't be able to assign into into. I need all 3 variables.
George Dietrich
@Blacksmoke16
ohh a isn't the same as other
mfiano
@mjfiano:matrix.org
[m]
no it';s the receiver
George Dietrich
@Blacksmoke16
:thumbsup:
mfiano
@mjfiano:matrix.org
[m]
so i can either allocate a copy of the array to work with, or i can hope LLVM's register allocator can fit 16 temp addresses in registers
no idea
Same thing in Nim. those a/b assignments are just to pass the structs by value
But using classes here
Ary Borenszweig
@asterite
what's the problem? a, b, or into are the same ones so the data gets overwritten?
mfiano
@mjfiano:matrix.org
[m]
The latter. into can actually be the reciever, shared structure with A
So I need to do all the assignments at once, rather than serially
Which implies temporary storage and a mess of this already messy method
I wish there was something like psetf from Lisp :)