arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://archive.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1548307898640.png (26.98 KB, 1200x1200, 1200px-Unofficial_JavaScri….png)

 No.1440

Right now my favorite language is javascript. I know and have used several other languages in the past, especially python, but I've decided that I see no reason to use anything but javascript nowdays, unless I need a certain tool for a specific job. Why? It turns out it's really comfortable to use, it makes sense, can look good if you format it nicely, it evolves quickly and smartly every year, it's everywhere: Web Applications, Desktop Applications, Mobile Applications, even on Embedded Devices (something I'm interested to try one day). I still have to catch up periodically because it's actually a pretty rich language, which ironically evolved from what appears to have been a quick hack. Right now it's still seen as a meme language by some, I personally fear Node, NPM and the ecosystem in general might not be as mature as they could be, but it works now and hopefully it evolves in an intelligent and safe way.

 No.1441

> Weak typing
> Makes sense

 No.1442

>>1441
I actually prefer it that way. I've had no problems, very rarely do a type check, and there's always a way to enhance type checking through TypeScript (though not applicable for runtime checks).

 No.1443

I used to love it too, until they hurled classes in there and plethora other minutae syntax candies. Evolution the C++ way. Node seem to have ground almost to a halt - you have to apply tonns of makeup to cover for the dated commonjs format.

A corollary of Conway's law in full swing, heh?

The prototype inheritance is nice still.

 No.1445

Is embedded device these days just an euphemism for a lower performing computer? You will never develop real-time systems in JavaScript, that's for sure, and I doubt that systems with actually constrained resources, like so-called IoT sensors would waste cycles and power on interpreters.

 No.1446

>>1445
>Is embedded device these days just an euphemism for a lower performing computer?
These days it covers everything from cheap watches to my OpenWRT router.

>I doubt that systems with actually constrained resources, like so-called IoT sensors would waste cycles and power on interpreters.

CPUs make up a small and shrinking fraction of the unit price and power consumption. You should know this dance by now.

 No.1452

>>1445
>Is embedded device these days just an euphemism for a lower performing computer?
Embedded basically means a single purpose device. It's also normally devices that people don't recognize as "computers". And since it's single purpose you can cut resources (CPU, memory, disk space) to the bone to reduce costs. Indeed when you're shipping thousands or millions of units then every cent saved adds up to a huge amount of money.

>I doubt that systems with actually constrained resources, like so-called IoT sensors would waste cycles and power on interpreters.

Pretty much. There are interpreters that run on bare metal and implement a subset of high level languages like Python or JS but they're so utterly pointless because having a general purpose, high level language interpreter abstracting the hardware and all the difficult stuff from you kills all the efficiency gains of having a low resource, single purpose device in the first place. They're just little larping projects for web weenies who don't want to put any effort into learning something for real.

>>1440
>even on Embedded Devices (something I'm interested to try one day)
Gluing together a few API calls ontop of someone else's interpreter is not going to teach you much about embedded development and is not going to open any doors for you since literally a four year old can do it. If you're interested in embedded then learn C.

 No.1462

>>1452
>Gluing together a few API calls ontop of someone else's interpreter is not going to teach you much about embedded development and is not going to open any doors for you since literally a four year old can do it. If you're interested in embedded then learn C.

Sure, for things that clearly require a lot of performance on limited devices something like C is a must. But as chips get faster I don't see a problem with using a higher level language which allows making complex stuff more easily. Plus for simple hobby projects it doesn't hurt.

 No.1463

>>1462
>But as chips get faster I don't see a problem with using a higher level language which allows making complex stuff more easily.
It hurts profit. If you manufacture 100.000 units then $1 more for RAM is $100.000 lost.

>for simple hobby projects it doesn't hurt.

Sure.

 No.1464

>>1463
You're not just setting 100K on fire. You're also not hiring good embedded C programmers and you're getting to market faster. That might bite you in the ass, but it seems to be working out on the whole.

 No.1468

I tried to make CRUD REST api with frontend interface for a week now. Making routes in express.js is simple but i have problem with writing frontend, I even tried to locally run blog from Koa.js github examples pages, most of those examples dont work on my machine, even tho i go line by line with manual. I dont know if i am soykaf, this "framework culture" is soykaf or what. Isnt webdev supposed to be simple?

 No.1470

>>1468
>Isnt webdev supposed to be simple?
No. It is however supposed to be dominated by a bunch of code monkeys, so keep plugging away. Now may be a good time to return to hello world and check for stupid errors like running the wrong thing.

 No.1471

>>1442
> [] 0
< true
> [] []

< false

you prefer this?
i mean, it's easy enough to avoid these issues, but how is this /preferable/ to say python's type system?

 No.1472

>>1471
sorry, stupid website thinks i wanna format things
-____-
> [] \=\= 0
< true
> [] \=\= []
< false

 No.1473

>>1471
>>1472
surely, there must be a way to make this okay..
> [] \ 0
< true
> [] \ []

 No.1474

>>1473
>>1472
>>1471
why on earth is this so difficult..
> [] == 0
< true
> [] == []
< false

 No.1475

>>1470
if you are so smart try to run this app locally, fucking impossible. In JS world code or framework works whole few months, then its unusable
https://github.com/johndatserakis/koa-vue-notes-api
https://github.com/johndatserakis/koa-react-notes-web

 No.1476

>>1475
>In JS world code or framework works whole few months, then its unusable
Could you please fix the syntax error here?
I can not parse it.

 No.1477

>>1476
i wrote something wrong? i am not natve speaker, so i am sorry, i got A from last english exam though

 No.1478

>>1477
Yeah, I'm not sure what the error is because i can't understand what you're trying to say.
maybe i would understand if you (or anyone who understands) were to rephrase it.

 No.1479

He has observed the fleeting nature of frameworks and of JS code in general.

 No.1480

>>1479
Thanks. I see how that could mean that now.



[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]