Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Forrest Chang
@fkchang
IIRC Roda supports websockets via Faye, i don't recall what additional requirements are needed except a suitable webserver - in my mind I envision something that has the same developer experience that kemal does w/websockets, i.e. you just setup a ws route and it works.
Jamie Gaskins
@jgaskins
Check out power_strip for WebSockets
@fkchang @catmando ^^
Mitch VanDuyn
@catmando
@jgaskins that looks great!
Forrest Chang
@fkchang
2jga
@jgaskins just stumbled on that the other day, btw, good job
Mitch VanDuyn
@catmando
.
Bernhard Weichel
@bwl21
@Mogztter i came to know that asciidoctor is using Prawn. I tried to compile Prawn with Opal but failed. How do you handle Prawn in asciidoctor.js
Guillaume Grossetie
@Mogztter
@bwl21 Same here, I did try to compile Prawn with Opal but there's still some missing implementations: opal/opal#1697
With a lot of hacks Prawn was running in JavaScript but did not work as expected
Since we are now using web technologies to generate PDF, I stopped working on it
Bernhard Weichel
@bwl21
@Mogztter Thanks. As of now I am using jsPDF with good results for drawings and textannotations. But I would like to support more such as paragraphs, lists etc.
Guillaume Grossetie
@Mogztter
You should give Puppeteer a try to generate PDF using HTML and CSS
Might not work for you if you want a client-side (in the browser) solution
Mitch VanDuyn
@catmando
@bwl21 we are very heavy users of the old wkhtmltopdf but are now beta testing using puppeteer. It seems very stable and well supported. We do a lot with it. If u need any help let me know and I will put u in touch with one of developers
For example custom designs that are rendered using a combination of svg, html 5 and lots of opal and js like this one here https://hyperloop.catprint.com/drafts/new/doodle/1/1261/personalize?category=Holidays&per_page=12
Are then rendered to a print ready PDF Using puppeteer
Guillaume Grossetie
@Mogztter
That's really nice, when you say "print ready" you mean with crops marks and bleeds ? I was looking at a solution to generate them because I want to offer an Illustrator alternative :wink:
Guillaume Grossetie
@Mogztter
(I was checking your Instagram, how many cats do you have ?! 🙀😸😻)
Mitch VanDuyn
@catmando
The customer service department takes in cats that need to find homes. They stay a few weeks or a few months. I don’t know how many we have taken care of over the years maybe 30? They are not allowed in the factory cause they would get hurt, and they could damage the machinery.
Yes we also add all crop marks, bar codes, and other details by layering PDF images that are generated from html / svg. It all goes through wkhmtltopdf ( soon puppeteer)
It’s a Separate Sinatra app that runs on a cloud hosted scalable server farm
The main site is a Hyperstack app
Guillaume Grossetie
@Mogztter
so basically you generate a pdf file then you add layer on this pdf using ?
I really want to know more about this part. Currently I'm generating a A5 flyer (the pdf size is A5) but in order to add crop marks, bar codes, colors etc.. the pdf size should be bigger but I don't really know how to add layers on an existing pdf and if I want to add these details in the source HTML I will need to use a lot of absolute positioning :pensive:
Mitch VanDuyn
@catmando
@/all we are investigating a very strange problem. I am wondering if anybody has ever seen anything like this. I doubt at this point its even anything to do with Opal.
the problem is we have a method like this:
def foo(arg1, arg2, arg3, arg4 = SOME_CONST)
    ...
    puts "arg4 is true" if arg4
    puts "!arg4 is false" unless !arg4  # <---INTERMITTENTLY this line will not print when the line above and below prints!
    puts "!!arg4 is true" if !!arg4
    ...
end
yes its that bizarre
we see
Mitch VanDuyn
@catmando
arg4 is true
!!arg4 is true
however we can't reproduce it in a simple example, we are seeing this in a method used a lot in Hyperstack, and only on safari, and only when the app is minified
we have looked at the minified code, and minification seems to have done nothing incorrect
oh and the problem is intermittent
as in we can do the same sequence and sometimes the bad thing will happen, and other times it won't
oh and if we add more debugging puts and console.log statements the problem frequency goes down
we are thinking some bizarre safari bug???
Mitch VanDuyn
@catmando
oh yeah, and the problem can't be reproduced with debugger console open... so we redirected all console output to a buffer which is printed after the problem is seen.
meh.
@meh
sounds like a race condition in Safari
Elia Schito
@elia
image.png
@catmando have you tried with Safari Technology Preview? https://developer.apple.com/safari/technology-preview/
Mitch VanDuyn
@catmando
so its like the latest edge safari?
@meh @elia yeah we are pretty sure its something to do with JIT as well. if add and ensure block to the method in question (which adds a catch block, which turns off JIT) problem goes away.
the problem is that so far its pretty intermittent, so very hard to get it down to a smoking gun line of code.
Elia Schito
@elia
yep, just to see if it disappears there, could be interesting to whoever receives the bug report. An alternative to reporting via the menu is reaching out to the webkit devs on twitter, from what I remember they're super nice
Mitch VanDuyn
@catmando
okay thanks!
Jose Añasco
@merongivian
hey guys, I'm building this live code editor (for creating music) : http://negasonic.org. I need a way to get the code inside a block as pure text, is it possible?
I need a way to not run the code, unless it has changed (because of performance issues, audio performance in js is really bad he)
Bernhard Weichel
@bwl21
Megasonic.org ist parked ...