|
Shaggar posted:typescript is inferior to c# and still involves javascript at some point i keep finding bugs in js libraries' type definitions.
|
# ? Oct 30, 2017 18:45 |
|
|
# ? Jun 8, 2024 16:08 |
|
akadajet posted:nah, it's not even close im this test:
|
# ? Oct 30, 2017 18:45 |
before i start, let me say that i clearly am biased in favour of python here any pitches for a comparison of use of R and python in prod? basically i may need to put forth an argument against R and prod, but i am not sure if i have all the right bases covered as for why the project itself is an internal web dashboard with bunch of pages with interactive plots that should update itself once per hour, or on user's click of update button. an update of a page is comprised of fetching new numbers from sql and executing trivial stats script on them. there are no infrastructure requirements for integration with ldap or oauth or ad or something. the two and a half 1) R Shiny (bad imho, pure R-stan, although boss has used it in prod for similar purpose aeons ago) 1a) R Shiny with plot.ly (well, at least something, battle-tested interactive web plots) 2) Dash with plot.ly (Shiny for Python from people who know tf they are doing (plot.ly authors)) in cases 1 and 1a deployment happens through homebrew webserver with god knows loving what and why and R integrations. drawbacks on free edition: 1) no scaling or process persistence 2) community-written db drivers in case 2 deployment, it's a standard python framework for web apps with all that the consequences. bundle consists of flask, plot.ly, and react.js, and is simplified for analysts. im not even sure what are the specific drawbacks here, it just a regular web app that we can throw into one of our aws things or just on-premises. it also has its own db drivers. with that said, semi lang-specific things id hold against r compared to python in prod: 1) its slow (analysts are writing, not professional r developers) 2) its really bad with error handling, reporting, and poo poo (again, analysts are writing) 3) we wont be able to find a person to maintain or optimise it (in that specific job location, remote is not an option), whereas getting a competent python dude would be easy 4) its bad about lots of data (lovely gc, memory management) 5) the shiny thing doesn't seem to be nowhere near as battle-tested as plot.ly, flask, or react 6) S3/S4 poo poo 7) lots of other archaic idiocy anything else? am i elbow deep in my rear end trying to ban r from prod?
|
|
# ? Oct 30, 2017 19:21 |
|
sounds right. R sucks to deploy.
|
# ? Oct 30, 2017 19:47 |
|
Shaggar posted:typescript is inferior to c# and still involves javascript at some point you would probably like bridge.net. doesn't fix the latter but it does the former
|
# ? Oct 30, 2017 22:25 |
|
When I did typescript I still ended up having to cast poo poo to any enough that the type safety of the language wasn't that helpful.
|
# ? Oct 30, 2017 22:54 |
|
Sapozhnik posted:why aren't you using babel async await is only a special case of bidirectional messaging which is what my app primarily utilises. The hurdles I am jumping through are animation frame for scheduling at the start of a display frame, and idle callback for after a frame has painted but before the next frame starts. If you start with a dataurl it needs to be converted to a Response an async process ~2ms, convert to a Blob, another ~2ms async process, then into an ImageBitmap which I blit onto an offscreen WebGL texture then finally push into the view. Now punt the ImageBitmap processing into a separate thread as it takes too long. Basically take each pipeline stage and execute in the idle frame time and then only at the end synchronise to the start of a frame and update the display.
|
# ? Oct 30, 2017 23:32 |
|
Sweevo posted:
this just tests if any bits are set at all, you'd need (varname & 0b111000) == 0b111000, etc. the fancy bit solution is code:
|
# ? Oct 30, 2017 23:32 |
|
suffix posted:this just tests if any bits are set at all, you'd need (varname & 0b111000) == 0b111000, etc. i love it
|
# ? Oct 30, 2017 23:41 |
|
it is almost 9 pm and i have spent three hours trying to figure out why chrome is refusing to open a websocket connection and just silently going "teehee ;-) *fartz* *The WebSocket handshake was cancelled*" a flash of recollection from what Git tells me was October 2015 reminded me that Content-Security-Policy is a thing that exists i feel the need to learn at least three new spoken languages so that i may weave a tapestry of profanity rich enough to do justice to my rage right now
|
# ? Oct 31, 2017 01:46 |
|
That's pretty terrible, for a while now you must assume some work is required to access almost anything other than images from a different domain in a browser. You don't explicitly mention but you certainly wouldn't see a CSP error from a non-browser websocket client.
|
# ? Oct 31, 2017 02:11 |
|
motedek posted:sounds right. R sucks to deploy. I never even met anyone who wrote R applications, they're all about writing individual scripts to help them in some study/analysis and that sounds alright in my book
|
# ? Oct 31, 2017 10:21 |
Symbolic Butt posted:I never even met anyone who wrote R applications, they're all about writing individual scripts to help them in some study/analysis and that sounds alright in my book we have one guy in our company, and boss had some on her last job. r is very much ok for scripts and analysis stuff, it's a scripting language made for that
|
|
# ? Oct 31, 2017 10:23 |
|
lol at “deploying” r
|
# ? Oct 31, 2017 13:46 |
|
ctps: discovered staging environment uses a forked and very divergent version of production environment configuration for this (extremely critical and fundamental) widgetserver so instead of making 1 extremely dangerous change and testing it on staging and then deploying it to production, i now have to make 1 extremely dangerous change for staging which doesn't tell me anything about the other extremely dangerous change i'm making to production lol
|
# ? Oct 31, 2017 14:23 |
|
shutupandshipit
|
# ? Oct 31, 2017 15:36 |
c r in prod s: im making a python demo to see if 6 week deadline is doable
|
|
# ? Oct 31, 2017 15:37 |
|
Sapozhnik posted:x11 is an async rpc protocol for bitmapped rendering that also provides an event stream Well, sort of - it has stuff for bitmaps and sending them to/from the server, but it's actually closer in layer of abstraction to GDI - there are X commands to draw lines, rectangles, render text, all that sort of stuff. It's not quite as dumb as pushing a bitmap (though more and more that's how modern UI toolkits have used it, partly because server and client are nearly always on the same machine these days and partly because it's hard to make modern fancy looking UIs using the basic X rendering primitives). Still not a good place to put the network communication though, really you want your whole high level UI toolkit (line edits, labels, combo boxes, layout managers) running on the server side. quote:display postscript i guess in some old incarnations runs imperative code on the renderer side of things but even then it's an immediate-mode rendering api. A better comparison is actually NeWS from back in the day. Also PostScript based, but your UI toolkit (equivalent of gtk or Qt) was written in PostScript, ran in the display server, and your app could run arbitrary PostScript there too. It was Sun proprietary and so X killed it, which is a shame because I could see it going a whole other direction once the Internet hit big.
|
# ? Oct 31, 2017 15:48 |
|
Symbolic Butt posted:I never even met anyone who wrote R applications, they're all about writing individual scripts to help them in some study/analysis and that sounds alright in my book it's great for that until executives get confused and want to make them into "products" and don't want to hire real developers
|
# ? Oct 31, 2017 16:00 |
|
what’s a fun offline coding challenge that i can do in around 10 hours while im on a plane?
|
# ? Oct 31, 2017 17:58 |
|
MALE SHOEGAZE posted:what’s a fun offline coding challenge that i can do in around 10 hours while im on a plane? I enjoyed Raytracer In One Weekend but it’s not really a challenge. I don’t know C++ though, maybe it’s more boring if you do.
|
# ? Oct 31, 2017 18:28 |
|
forums rewrite imo
|
# ? Oct 31, 2017 18:44 |
|
Fart app.
|
# ? Oct 31, 2017 19:01 |
can someone chew for me what in practice is flask and where it fits in my 10 year old concept "lets install something apache and then slam it up with php files" of webserver "administration"
|
|
# ? Oct 31, 2017 19:18 |
St Evan Echoes posted:forums rewrite imo
|
|
# ? Oct 31, 2017 19:29 |
|
cinci zoo sniper posted:can someone chew for me what in practice is flask and where it fits in my 10 year old concept "lets install something apache and then slam it up with php files" of webserver "administration" Also, sorry about the PHP.
|
# ? Oct 31, 2017 19:47 |
John Big Booty posted:A framework for small web apps and ~~microservices~~, if I recall correctly. Basically you just run it and reverse proxy from a real webserver. although our workplace does apparently exactly that, it all started as a mysql+php trashfire with understandable consequences oh and yeah ty, so the microservice thing is basically like a self-contained baby webserver
|
|
# ? Oct 31, 2017 19:50 |
|
cinci zoo sniper posted:oh and yeah ty, so the microservice thing is basically like a self-contained baby webserver You can run it directly on 80, but it's usually better to proxy it.
|
# ? Oct 31, 2017 20:04 |
|
in the beginning there were static web servers then people wanted to do dynamic things on the web so people added cgi capabilities to static web servers then people noticed that serving dynamic requests from separate processes that were spawned once per request was hella slow very smart man rasmus lehrdorf saw this state of affairs, and decided that the problem was the "separate processes" bit instead of the "spawned once per request bit" so he wrote a shittastic script interpreter and embedded it inside the static web server apache. also somewhere around this time mod_perl was created to do something similar as a hack to make unmodified perl scripts (because why would you use a lang other than perl) think they were running in a separate process whereas they were actually running in a shared interpreter inside the apache web server (because why would you use a web server other than apache) people were very smart in 1998 also somewhere around this time sun decided that they should stick their oar in, after seeing what a tremendous success java applets were they created the "servlet" standard. this was a novel scheme where you actually had your web applications running as long-running processes, and the best tool for managing these long-running processes was 2001 was the year of the galaxy brain in java land. i think there was also a lot of excitement about xml anyway yeah these days you just have separate script interpreters that accept plain old http requests on high ports on localhost. although php is still huffing glue like usual so you have this thing called php_fpm where it uses the "fastcgi" protocol instead of literally just loving http aargh. but for the most part, in the modern small-brain world, the typical solution is that you set up your static web server to face the outside world. it handles logging, ssl, and static content serving. urls corresponding to dynamic resources get pattern-matched and sent to your application server processes using http reverse proxying. nginx is a fashionable static web server because it's built around async io and its really fast!!! but apache is perfectly fine too and nginx vs apache is more a question of fashion than anything terribly meaningful.
|
# ? Oct 31, 2017 20:06 |
|
try reading wikipedia sometime, might learn something
|
# ? Oct 31, 2017 20:09 |
John Big Booty posted:The code runs on top of any number of smaller servers that implement the WSGI standard (https://wsgi.readthedocs.io/en/latest/) Most similar frameworks have one bundled in, but you rarely want to use them for production. oic (kinda). ill leave that a devops headache, i just need to get a flask-based dashboard ( https://plot.ly/dash/ ) running for internal use
|
|
# ? Oct 31, 2017 20:12 |
Sapozhnik posted:in the beginning there were static web servers this is seriously cool, thanks!
|
|
# ? Oct 31, 2017 20:14 |
tef posted:try reading wikipedia sometime, might learn something sounds like im in the right place then
|
|
# ? Oct 31, 2017 20:15 |
unrelated java question about chitchat im having elsewhere public static void main(String args[ ]) this declares main public static void main(final String[] args) throws Exception this seeming declares main too 1) arguments cant be altered 2) it is supposed to throw exception it never does, e.g. if inside method there is throw OtherException everything still happens ignoring this what i saw somewhere is that throws Exception is supposed to help with stack traces in some way, could anyone briefly comment on this?
|
|
# ? Oct 31, 2017 21:10 |
|
1) The final keyword doesn't change the signature of the method in Java. As for the brackets, Java lets you put them either after the type or after the name when declaring arrays. It's pretty dumb. 2) That just means "might throw java.lang.Exception (or something that extends it)." It doesn't mean "will throw Exception" and has no effect on stack traces.
|
# ? Oct 31, 2017 21:19 |
CPColin posted:1) The final keyword doesn't change the signature of the method in Java. As for the brackets, Java lets you put them either after the type or after the name when declaring arrays. It's pretty dumb. i see. Richard's answer there then is some bollocks i take it?
|
|
# ? Oct 31, 2017 21:23 |
|
throws Exception is useful if you have code in there that throws a checked exception. if you dont have throws Exception, and you invoke code that throws a checked exception, you need to wrap it with try/catch.
|
# ? Oct 31, 2017 21:23 |
|
also i always make all method parameters final because that was the input to the function and it shouldn't change
|
# ? Oct 31, 2017 21:24 |
|
cinci zoo sniper posted:i see. Richard's answer there then is some bollocks i take it? Yeah, his answer has a vague smell of cargo culting. "The args are declared final because technically they should not be altered." The "technically" in that sentence is bogus. If you want to give your variables a general air of immutability, fine, declare stuff final. Otherwise, there's no inherent harm in having non-final method parameters, aside from confusing a newbie programmer when he tries to reassign a method parameter and the value isn't reflected in the calling code. Declaring an array final can give a false sense of security, anyway, because the individual elements can still be reassigned. "You should usually specify that main throws Exception so that stack traces can be echoed to console easily without needing to do e.printStackTrace() etc." It sounds like Richard got tired of wrapping everything his main() methods call in try/catch blocks that just print a stack trace and now prefers letting everything bubble out. That's fine, but there's really no need to add "throws Exception" until something actually needs it. It's also more desirable to be specific about what might actually be thrown, in my preferred style. Some people absolutely hate checked exceptions in Java and just declare "throws Exception" every time. They write bad libraries that I hate. "I personally think it's a bit of a mistake in Java that arrays can sometimes be declared in that manner."
|
# ? Oct 31, 2017 21:34 |
|
|
# ? Jun 8, 2024 16:08 |
CPColin posted:Yeah, his answer has a vague smell of cargo culting. thanks for detailed explanation!
|
|
# ? Oct 31, 2017 21:38 |