• What are you working on? v67 - March 2017
    3,527 replies, posted
Some good points but please let us not teach our children to switch to Javascript.
Any alternatives?
C#
I don't think people who complain about javascript actually understand javascript. Probably the closest thing to javascript will be scala.
Is there a scripting engine implementation of C#?
It looks like WebAssembly already shipped, why didn't I hear about that?
https://github.com/dotnet/roslyn/wiki/Scripting-API-Samples Or just load regular assemblies, there's no difference.
Heck, there's even a implementation that runs in your browser; https://github.com/aspnet/blazor Not that I'd recommend going for C#-in-browser as your main C# implementation, .NET Core is too good to ignore - and fully cross-platform too. When the CoreRT project gets a bit further ahead you'll even have natively compiled C# binaries with no need for a runtime installed.
I suppose it's pretty hard to find remote work as a recent graduate? I need work to support myself while my partner studies overseas and there's no work over there. Language barrier, tough work visas, smaller city and whatnot. I could probably be frugal and live off of like 16k USD while over there but.. there's no work.
Try freelancing on upwork maybe?
Elaborate? Because there's plenty of reasons to hate on Javascript, some of which have been listed already.
This is a "camera" put out by the VA Dept of Game and Inland fisheries: https://www.dgif.virginia.gov/fishing/shadcam/ It seems simple enough. a script that polls for a new image every 5 seconds or so so that viewers can look for fish. I'd want to write an application that send the image to some image recognition API to see if there are any fish in the picture, but such APIs are cost prohibitive to be calling every 5 seconds. Does anyone else have any ideas?
cost prohibitive like you have to pay to use it, or like the processing time is too slow to allow you to do it every 5 seconds?
Like you have to pay and they limit you to X requests per month. If you make 1 request every 5 seconds, the API would have to allow about 520,000 requests per month
Again, the complaints about javascript are usually just 'its javascript, its bad'. The only thing I've ever really heard someone complain about was due to not understanding prototype chains, which can pretty annoying to deal with at first. But then reading a little bit about it takes away that mystery. Also one issue that I have encountered in javascript was with shift operations. Something something 32 bit only. https://files.facepunch.com/forum/upload/134492/0ffa41fb-2539-48ba-8c18-636011f13541/image.png I not saying to use javascript for like a replacement to lua in a game or something though. I think the power of javascript is found behind the web, where it is a brainless crossplatform language available to everyone on damn near every electronic device.
C# is one of the fastest languages you can use if speed is a concern. Even development time, autocompletion works 100% of time compared to JS or Lua where you simply can't predict what an object can be at runtime in some cases.
I've never met anyone in real life that would actually defend javascript. If you're not dealing with tiny scripts you're just gonna have a really bad time in any language that treats types like that.
I use js everyday and I have no issues with it, but whenever I see someone defend js, this always comes to my mind Wat
my initial response wasn't to defend javascript, but that usually the hatred isn't justified. it's very good at what it does for the web.
I always feel like JS was designed so there are no ways to introduce errors i.e. everything has a defined result but then they gave up on it half way and so now some things give errors some things give undefined and some things give falsey stuff. Also the concept of "falsey" values
heyy I remember you c# fanatic ;v Both Java and LuaJIT outperform C#. And autocomplete doesn't make or break dev time, there are plenty of super viable solutions if you're not doing anything wonky (namely with libraries which is the important thing arguably). Not to mention LuaJIT/JS are easier to embed (java, too, technically) in languages that aren't an IL language. Javascript, on the other hand, makes even more assumptions than Lua making it next to impossible to JIT optimally. Actually, interesting story about Java: It's bootup process is fat. It does a bunch of weirdly unnecessary steps but after the warmup period the java engineers have packed in just an absolutely astounding amount of performance.. despite printing "hello world" steps through 1000 unnecessary steps. Anyway, embedding C# in anything other than C# is a pain unless you make abuse of some features of it, requires a huge runtime on top (think: practically the size of embedding one or two CEFs), and binding non-C# functions (without using p/invoke) is even more of a pain. That being said, C# outperforms almost everything else, so it definitely isn't slow. Arguing about useless things aside, natives! https://i.imgur.com/7lFW1DD.png
1 step forward, 2 steps back for me today Was looking for more ways to speed up my frametime, and happened upon an ARB extension that allows vertex shaders to write to gl_Layer My shadows share a common frame buffer / render target, which is stored as an array texture. This way, from the geometry shader lights can supply the index to write into. However, geometry shaders are slow, and I was using it as a pass-through measure solely for the gl_Layer variable. So I changed over my shaders, and alas it does work and is faster, however somehow 1 light type is now slower :/ https://facepunch.com/fp/emotes_std/suicide.gif
https://files.facepunch.com/forum/upload/108652/055f39cf-3324-4773-a168-7611f85166db/image.png https://files.facepunch.com/forum/upload/108652/9114f028-ad75-4e92-9ed7-9087f6a00aee/image.png https://files.facepunch.com/forum/upload/108652/28e08fa0-c66d-49fb-bd6c-54c4720f6f55/image.png
Without using p/Invoke to manually bind a bunch of exported functions. And using dllimport/exports to bind C# as a scripting language will have more overhead than if C# exposed a native binding API.
Well its first implementation (which I guess is where all these quirks come from) was done in 10 days. I don't know much about language design but I don't think that's long enough to design (let alone design and implement) something.
https://files.facepunch.com/forum/upload/133270/db7c3668-4618-40e1-82fc-7d9fa924faea/2018-04-14_00-28-01.mp4
I can't get Upwork to accept my profile.
PROGRESS! https://files.facepunch.com/forum/upload/133270/4a66fa7e-a8d9-42ab-8f2d-46d664166bc3/2018-04-14_01-11-47.mp4
I wholeheartedly believe this is a feature of Lua: to deter those who cannot distinguish between offsets and indices—which are explicitly not the same thing—and people who cannot resist contaminating other languages with concepts from others. See also: Java, C#, and TypeScript. Did JavaScript need TypeScript? No, because 1. TC-39 can fuck up JavaScript all by themselves, they don't need Microsoft's help and 2. it certainly doesn't mean we can't ignore lessons learned from CoffeeScript about pointless transpiled garbage. There are too many people who can't use JavaScript adequately as it is, but hey, let's add more shit for people to hopelessly never master and use to hack together products. The longer I work in software development, the more I realize you have to have solid beliefs about these things, and they certainly don't exist at the language level. These things exist at the, "Oh look, I suddenly can't recruit anyone for my team because my tech stack is fucking obscure, hostile, or promotes dead-end career growth" and the "Ah yes, let's throw out usefulness in pursuit of correctness" levels.
https://i.imgur.com/VrazAph.gifv Working on this again. I have a colleague making models for me. I did the ugly humanoid model myself though, I've finally learned Blender. Gonna work on adding an inventory now.
Sorry, you need to Log In to post a reply to this thread.