I'm getting tired of this npm shit
-
"dog" > "zebra" : "fig tree"
-
@masonwheeler said in I'm getting tired of this npm shit:
any JavaScript function can return a value or a function
Are you saying that functions aren't values?
-
@ben_lubar said in I'm getting tired of this npm shit:
@masonwheeler said in I'm getting tired of this npm shit:
any JavaScript function can return a value or a function
Are you saying that functions aren't values?
#FunctionLivesMatter
-
@Adynathos said in I'm getting tired of this npm shit:
I will try web programming again when WebAssembly gets compilers for C++
Cue emscripten
@Adynathos said in I'm getting tired of this npm shit:
JVM
Apparently there is a convertor from Java bytecode to LLVM bytecode. It seems to be ancient, but it might still work as neither bytecode has changed lately.
@Adynathos said in I'm getting tired of this npm shit:
Python
Some options seem to exist for that one too.
-
@gleemonk said in I'm getting tired of this npm shit:
@Steve_The_Cynic said in I'm getting tired of this npm shit:
but isWithin(200)(299) has no redeeming features
Sure has! How else would you define the
isBetweenZeroAnd
function!?var isBetweenZeroAnd = isWithin(0);
Then you can write
var isSmallNumber = isBetweenZeroAnd(10);
Don't you see the expressive power?
Actually, if you could pull off
isBetween(0)And(10);
That could arguably be useful.
Take that back....
<not_satirical>
I would totally go forif (0 < x < 10)
</not_satirical>
-
@blakeyrat said in I'm getting tired of this npm shit:
@masonwheeler Perhaps; but the person who sees the error won't be able to understand why it's happening or how to fix it. They're just fucked. Even if you have comprehensive error handling, the best think you can show them is a conciliatory message that sums up to "we don't know what you did wrong if anything, nor how to fix it, you're just fucked".
Users deserve more respect than that.That was (maybe, you could argue) OK as long as js was used for its original intended purpose - little animations and user interactions in web pages.
When you try using it for real applications, these "features" become a problem.
-
@ben_lubar said in I'm getting tired of this npm shit:
@masonwheeler said in I'm getting tired of this npm shit:
any JavaScript function can return a value or a function
Are you saying that functions aren't values?
No, values are simple expressions.
-
@blakeyrat said in I'm getting tired of this npm shit:
@masonwheeler Whatever. Look, as always I regret saying anything on this forum because now the jackals will all pop into this thread and tell me how stupid and wrong-headed I am.
That's because you are saying controversial things. And saying them in a forceful way, so people feel compelled to respond.
You should try saying things people agree with. Try some of these:
"Puppies are great!"
"Nazism sucks!"
"How about that stupid Lotus Notes?"It also helps when you turn the group against someone even more disliked than you.
"Fox is such an idiot, right guys? Right?"
Try it, see how it goes.
-
@xaade
SQL has theBETWEEN
operator.
-
@blakeyrat said in I'm getting tired of this npm shit:
now the jackals will all pop into this thread and tell me how stupid and wrong-headed I am.
Lame old deliberate helplessness schtick. I don't even accept this behaviour from my kids.
-
@blakeyrat said in I'm getting tired of this npm shit:
If the product is shitty, I'd rather see it never released.
How shitty does it need to be? Is shittiness relative to value? What if the software has a huge amount of value in some field such as protein folding simulations but you're using it for some other purpose it's not so good at like WYSIWYG editing a forum post?
Who decides if it's shitty at all? You have opinions on software that are wildly different from my own, for example.
If the software is open source, how does the author get the attention of others who may work on the software to improve it if they keep it secret and hidden away? You might not think this is a problem because it's open source and therefore can never be improved, but if that's your solution then you've just created the situation that prevents it from ever improving.
If the software is commercial, how does the author support development of later versions without releasing the first version for paying customers?
If the software is developed in-house in a business, how does the development team find out how closely it aligns with the business requirements without letting those users loose and seeing what they do and how easy it is for them to do?
-
@aliceif said in I'm getting tired of this npm shit:
@xaade
SQL has theBETWEEN
operator.And I love it.
Although I ran into a situation where it behaved differently than two < operators, but I can't remember why.
-
@cartman82 Humm... no. If .NET runtime breaks, you file support request and if it's really their fault, they create emergency fix that's available on request, and later gets in SP. At least that's how the "Lazy initialization bug on string class" on .NET v4.5 RTM is handled.
And also note that starting on Oct 2016, the .NET runtime update will go with the normal "Tuesday update" schedule. So if there is important fix, you need not have to ask for it or wait until the next SP release. (Okay you may still have to ask if the problem need to be fixed ASAP, but there will be at most a month's delay even if you don't)
-
@xaade said in I'm getting tired of this npm shit:
<not_satirical>
I would totally go for
if (0 < x < 10)Python does it™
-
@cartman82 said in I'm getting tired of this npm shit:
That's because you are saying controversial things.
You should try saying things people agree with.At least the controversial things are interesting and memorable.
-
We can't even make a joke npm library because it would be indistinguishable from the real libraries there.
-
@xaade said in I'm getting tired of this npm shit:
if you could pull off
isBetween(0)And(10);That could arguably be useful.
https://jsfiddle.net/pd6cauz8/6/
Edited for moar arrows and Lispier parentheses.
-
@flabdablet said in I'm getting tired of this npm shit:
Post under construction, accidentally posted, back in a jiffy
Ooooh, I can almost feel one of those drunken @flabdablet rants coming on!
-
@xaade said in I'm getting tired of this npm shit:
@aliceif said in I'm getting tired of this npm shit:
@xaade
SQL has theBETWEEN
operator.And I love it.
Although I ran into a situation where it behaved differently than two < operators, but I can't remember why.
Well...it's actually two
<=
operators, which has some obviously different behavior.
-
@cartman82 said in I'm getting tired of this npm shit:
one of those drunken @flabdablet rants
Sorry, you'll just have to make do with drunken @flabdablet Javascript.
-
@ben_lubar said in I'm getting tired of this npm shit:
Are you saying that functions aren't values?
No, just following the basic premise of what I was replying to, keeping things on the same level for the moment.
-
@flabdablet Do you have a gag bag I could borrow? Asking for a friend.
-
@Maciejasjmj said in I'm getting tired of this npm shit:
I'd rather have someone else provide it for me.
It is redundant anyways, "isBetween" doesn't need to be a function in the first place because all languages come with greater/less than operators. What you're really saying is that NPM fans don't want to think. If you'd rather have someone else provide it for you, why bother with the whole "software developer" career at all? It's probably easier to become an accountant than it is to figure out which JS build module you should be using anyways.
You say I'm right for the wrong reasons, but you follow that with something that exactly proves my point. You don't want to write it because someone may have done that already. Well guess what, someone has already done everything. All of the problems we work on today have been solved and resolved for decades, yet we keep plugging away because that's not the point of programming or CS in general. At least on a basic level we think this is fun, right? How is creating a dependency list fun?
I believe a module should be a self contained package with some special functionality, something built for a purpose. The only "purpose" for building an "isBetween" function for NPM is to put "X number of modules published on NPM". I tend to think these modules are built by code camp "graduates" who, having no experience with other languages or package managers, just dump every brain fart into a module and call it a career.
-
@aapis said in I'm getting tired of this npm shit:
It is redundant anyways, "isBetween" doesn't need to be a function in the first place because all languages come with greater/less than operators.
Bah. All languages come with regexes, doesn't mean you should be reimplementing a JSON parser in every single project you start.
@aapis said in I'm getting tired of this npm shit:
You don't want to write it because someone may have done that already. Well guess what, someone has already done everything.
No they haven't. If I write an application for store X to manage their inventory, probably no one has yet built an application which satisfies all the business requirements store X has and is configurable easily enough that store X can use their in-house resources to set it up for themselves.
But I'd rather write code which satisfies store X's requirements - picks the right columns out of their inventory database, crunches the right numbers to sum their total inventory value - than waste my time writing 1739th table control that's just as broken as all the 1738 before it. If not more, because the table control is not my main focus and I can't spend as much time on it as someone who sets out specifically to write it.
Code reuse is good. If you told me you want to write your own table control for no other reason than WAARGABLAARGH REAL PROGRAMMERS WRITE THEIR OWN CODE, I'd laugh you off. The problem in Node's ecosystem is not that those helpers exist, it's that they aren't unified.
-
@Maciejasjmj said in I'm getting tired of this npm shit:
Bah. All languages come with regexes, doesn't mean you should be reimplementing a JSON parser in every single project you start.
Of course not, my language comes with a JSON parser.
But this is still a straw man. JSON parsing is complex and takes hundreds or thousands of finely tuned LOC. This
isBetween
trash?if (10 > n && n > 20) { console.log('hai'); }
versus
isBetween = require('helperlib').isBetween; if (isBetween(n, 10, 20)) { console.log('hai'); }
And worse, you can't look at those lines of code and tell me whether or not it's inclusive or exclusive like you can the first one. All so that we could not type one variable name twice.
: fixed code bug.
-
@aapis said in I'm getting tired of this npm shit:
At least on a basic level we think this is fun, right? How is creating a dependency list fun?
Good point, but we often use libraries to skip the deal with the boring parts so that we can work on the fun tasks.
For example. if I want to make a game, I will use Unreal Engine and just program the game rules, instead of writing my own render.
-
@pydsigner said in I'm getting tired of this npm shit:
versus
Look, you never know when the client is going to say "when we said 'between', we meant 'exactly between, like, when you have 10 and 20, 15 is exactly between them'". Do you really want to change all your conditions everywhere in the codebase?
</s>
-
@Maciejasjmj said in I'm getting tired of this npm shit:
@pydsigner said in I'm getting tired of this npm shit:
versus
Look, you never know when the client is going to say "when we said 'between', we meant 'exactly between, like, when you have 10 and 20, 15 is exactly between them'". Do you really want to change all your conditions everywhere in the codebase?
</s>
Well, there's also:
- [10,20]
- (10,20]
- [10,20)
- (10,20)
Sort of like the Lethal Weapon joke:
So, when you say "On Three!" do you mean "One, two, and go! three" or "One, two, three, go!"?
-
@boomzilla javascript also has the 'goes to' operator:
let mode = :trolleybus: let i = 15; while(i --> 10) { ...
-
@bb36e said in I'm getting tired of this npm shit:
@boomzilla javascript also has the 'goes to' operator:
let mode = :trolleybus: let it = 15; while(it --> 11) { ...
You were doing the joke wrong. FTFY.
-
@bb36e said in I'm getting tired of this npm shit:
while(i --> 10)
that actually runs..... yes but...... -shudder- bu the godess it shouldn't.
that's evil!
-
@pydsigner said in I'm getting tired of this npm shit:
All so that we could not type one variable name twice.
To be fair, that "variable name" might be an arbitrarily complicated expression with side effects.
-
@aapis said in I'm getting tired of this npm shit:
At least on a basic level we think this is fun, right? How is creating a dependency list fun?
More than writing the helpers all over again and again. Because you are actually getting somewhere instead of shaving yet another yak.
And note that while
isBetween
can be considered too trivial for a helper for most purposes, there are similar trivial-looking helpers (like thenext
andprev
in C++ before they made it to the standard) that are totally game-changing.
-
@cartman82 said in I'm getting tired of this npm shit:
If your web server returns status code "zebra", you have bigger problems than currying.
Yeah, zebra issues are a real bitch to debug.
@another_sam said in I'm getting tired of this npm shit:
What if the software has a huge amount of value in some field such as protein folding simulations but you're using it for some other purpose it's not so good at like WYSIWYG editing a forum post?
Sorry, but I can't imagine any way in which Discourse would be useful in protein folding simulations.
-
@Scarlet_Manuka said in I'm getting tired of this npm shit:
zebra issues are a real bitch to debug
ZPL is nasty
-
@Bulb said in I'm getting tired of this npm shit:
Apparently there is a convertor from Java bytecode to LLVM bytecode.
Only works well for particularly static Java applications. Which isn't to say it is bad, but there are things that you do in Java that you don't do with languages that LLVM focuses on supporting (and the JIT compilation engines for the two systems have been optimised differently).
-
@Bulb said in I'm getting tired of this npm shit:
there are similar trivial-looking helpers that are totally game-changing
Syntactic sugar that wraps up a correct way of doing something and makes it much easier to use is tremendously valuable. Good examples are the
foreach
andusing
language constructs in C#; they do nothing that you couldn't do with more basic primitives, but they make doing things the right way easy and so everyone uses them and code quality is greatly improved.But
isBetween
's main value is that it correctly remembers to check for numeric nature of the values (arguably just working around a misfeature of the language in the first place, assuming you're one of these “dynamic nature is bad” people) and it's main anti-value is that it isn't immediately obvious whether the endpoints of the range are included. Lack of clarity? Don't want! (Horrible stack of dependencies as well? Really don't want!)
-
@Scarlet_Manuka said in I'm getting tired of this npm shit:
Sorry, but I can't imagine any way in which Discourse would be useful in protein folding simulations.
Great. Now that you've mentioned it on the internet, @cpradio will have to implement it as a plug-in, and Jeff will magically receive a billion dollars of funding for his 100% Open Source Civilized Protein Folding Toolkit.
-
@clatter said in I'm getting tired of this npm shit:
100% Open Source Civilized Protein Folding Toolkit
Fortunately, most proteins aren't civilized.
-
@clatter Could it be that Discourse already folds? It would explain the heavy CPU requirement, and all the performance issues could easily be explained if they gave the folding threads higher priority than the threads doing actual forum stuff.
-
@mott555 said in I'm getting tired of this npm shit:
@clatter Could it be that Discourse already folds? It would explain the heavy CPU requirement, and all the performance issues could easily be explained if they gave the folding threads higher priority than the threads doing actual forum stuff.
It's like the inverse of crowd-distributed computing.... wait.... no wonder it uses so much browser resources!
-
@dkf said in I'm getting tired of this npm shit:
But isBetween's main value is that it correctly remembers to check for numeric nature of the values (arguably just working around a misfeature of the language in the first place, assuming you're one of these “dynamic nature is bad” people)
Mine doesn't. It works perfectly for any type for which the
<=
operator returns sensible results.
-
@accalia well if C and Java both implemented it, might as well include it in js!
-
@Jaloopa said in I'm getting tired of this npm shit:
@flabdablet vb.net is a fine language
No, it's not. It's awful. If you really think it's good you should kill yourself.
-
@kt_ I interpreted "fine" as in "you should be fined for choosing it".
-
@kt_ it's C# with different syntax. The only things I particularly dislike are the lack of a ref keyword in method calls and having to remember the different syntax for things like switch blocks
-
@Jaloopa c# with a terrible syntax
-
@Jaloopa said in I'm getting tired of this npm shit:
it's C# with different syntax
That is, the semantics of the CLR are there whatever you do and both languages expose it in pretty similar ways. It's much more difficult to put something in with more radically different semantics, and if you do then you end up with larger seams when you try to do cross-language work. It's not that you can't put Haskell (for example) on top, but rather that if you do, there's going to be rather more complexity in the connecting shims than there is between C# and VB.NET.
-
@Jaloopa said in I'm getting tired of this npm shit:
@kt_ it's C# with different syntax. The only things I particularly dislike are the lack of a ref keyword in method calls and having to remember the different syntax for things like switch blocks
No it's not. lambdas, comparing string to nothing, for loop, shitty case-insensitivity making your code even more unreadable (if the syntax itself wasn't enough).
I honestly seriously hate this language.
-
@xaade said in I'm getting tired of this npm shit:
@aliceif said in I'm getting tired of this npm shit:
@xaade
SQL has theBETWEEN
operator.And I love it.
Although I ran into a situation where it behaved differently than two < operators, but I can't remember why.
You should probably post thus in I-hate-Oracle club section. ;)