Details
-
SkillsJavaScript, Scala
-
LocationCzech Republic
Joined devRant on 12/9/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@VaderNT So far it seems ASLR is responsible for the crashes (enabled by default in Windows). Weirdly enough, Linux implements this feature as well (and I verified it's enabled on my system), but it doesn't have any negative effect on the application. Not really sure if Windows and/or Electron are responsible 🤷♂️, only thing I can say is it works flawlessly on Linux.
-
@irene I think zero radix gets interpreted by parseInt same way as undefined (= not filled optional argument) so it goes with default radix 10. Magic :)
-
@irene map passes three arguments (item, index and whole array) and parseInt accepts optional second argument - radix I think. Some attempts at using FP in vanilla JS give very unexpected results. But with good libraries shielding programmer from this occasional traps, I think JS can be quite successfuly used in reasonable FP.
-
@jeffmon Seeing how spotty 4k support in games is, is ultra wide with lower resolution better/well supported in games?
-
I don't think it was such a great idea having different bases in parameters of one function. For example I wanted to test some operation on dates:
> const d = new Date(2018, 1, 1);
So I was (I would say naturally) expecting to get 1st January 2018. Was greeted with crashing test and a very confusing expected value:
> d.toISOString();
'2018-02-01T00:00:00.000Z'
Where the hell February came from?
JS has a few nasty traps like map:
> ['1', '10', '100'].map(Number.parseInt)
[ 1, NaN, 4 ]
But I think overall it is an alright language. I view PHP as a much much bigger mess. -
@heyheni Yeah, I wanted to avoid more dependencies, but after I found out the JS date API has no way of validating ISO date strings (it accepts many formats which may lead to e.g. swapping day and month) I gave up and used the mentioned moment library (very powerful and way better API).
-
Both lines should re-export same function - first creates a new function which calls desired function named "t", second line uses the function directly (simple assignment).
The error message was quite cryptic (from a library). Tomorrow I'll try bind, it might be the problem (library was used in static context, but who knows what they are doing inside, I don't think using "this" in static context is a good practise, but I might be wrong). -
@sonofwind Thanks for the tip. Mobx really looks clean, concise and performant.
-
That's different tasks, all named same of course, and without any description (that is in parent task). Really cumbersome...
-
@dtaposh And how is he supposed to name that AI project? It seems like a circular problem. 😁
-
It's "unhackable" in a sense that the program does 100% what it is supposed to, essentially totally bug-free. I don't think there is anything similar available for main stream languages.
Honestly, for me the reasons to try Haskell were conciseness and much higher level of abstraction than anything in popular languages.
Re-usability in FP is actually true, not like in OPP where is everything in practise so coupled and riddled with side effects to a point it's easier to rewrite it from scratch.
For tooling, you might want to check Stack (handles packages, project setup), I don't recommend using Cabal. But I am not sure you should be trying getting into Haskell, because it's very hard for people who are enthusiastic about it, while you seem determined to fail just to "prove" Haskell is bad. -
I think that is just a nature of OpenSource. Many projects, most abandoned, waiting for resurrection - fork.
-
I can relate. I have to occasionally touch SASS files and I am very happy when I return to TypeScript.
Currently I am playing with ScalaCSS, essentially a way of writing (mostly) typed styles in Scala, and I really see the appeal of that kind of approach to styling. It's always shocking to me that compiler/runtime is complaining about typos and illegal overrides which would pass silently and broke looks in classic css. -
Most of the time GUI (IntelliJ IDEA), sometimes CLI (when I am not working with code so I don't miss highlighting, jump to source and so on).
-
Some variant of Basic on ancient "cassette" PC. It was fun messing with source files of games 😁.
-
Just a note: it differs greatly depending on a language - e.g. 200 lines of old Java doesn't do much compared to succinct Haskell where 200 lines may do the same (usually better, because dev is forced to handle errors explicitly) job as 2000 lines of Java code.
-
It's very common in FP code to use names like x, y, a, b (primitives), xs, ys (collections), T, U (for a type), f, g (functions) and so on.
-
@Makenshi I don't dislike MS for making money, but for their attitude regarding their (not that great) OS. Abusing their monopol position, forcing bad tech via bribes (DirectX), forcing shops to not sell pcs with pre-installed Linux, ignoring security issues until it explodes and so on. There are companies which actually (seem to) care about users, choices and security.
-
@ctwx I don't really care that much how ppl on the internet can see me 😁. While in other cases I don't like it much, in case of Micro$oft and Window$ I find it very fitting. Their only motivation are money, everything else has low priority or don't matter to them at all. E.g. security updates are not a matter hours like it's common in Linux world, but rather days, weeks, months or years (some are never fixed to this date). They don't care much about standards as long as they can get away with it. Internet Explorer was so broken for so long. They didn't start fixing it until they lost. They are actively trying to maintain their vendor locks - DirectX in last version only available in last OS version - just because of $$$. OpenGL or Vulcan don't do such anti-user things. My "favorite" is forbidding pc shops to sell Linux pcs when Windows pcs are being sold there. If Windows were free as Linux is, I would have probably said Windows are slightly worse than Tux. But Windows are not free.
-
@ctwx A bit generalizing, aren't we? I don't work in Window$, only use it for gaming. I have almost nothing installed there (browsers, Steam, Blizzard App, few games), yet magnificent Windows managed to f*ck itself again - every time I try installing one specific update (few months old now), it fails - bunch of restarts, rollback and I am where I was. Windows are still nagging me about updates it fails to install. This exactly same error happened to me in previous Window$ installation. I am tired of that OS with its neverending brokenness and update spam.
-
I am pretty sure I saw some professor explaining why he considers HTML a programming language (he doesn't claim it's practical). Probably somewhere on YouTube, maybe computerphile?
-
@hariaakash Well, not really. It is a subset of Scala *language* which compiles to JavaScript. JS is nowadays an universal language - it's not uncommon to use it for back-end, tools or desktop applications. How could anyone compare a universal programming *language* to a library/framework? It is same bs as "Is better JavaScript or Angular?" or "Is better a car or Toyota?"...
-
I don't see how exactly is ScalaJS (which basically the Scala language) related to all those JavaScript UI frameworks. It appears that some people don't know what they are talking about...
-
Promises were fun, elegant and really simple compared to observables which I have to use in a current project 😯.
-
Yeah, this is a pain. For a toyproject I am trying out Udash framework for Scala and it's a blast - properly (not like TypeScript) typed code and also TYPED styles. There are no misspelled CSS class issues, the app simply won't compile ☺️.
-
Add more balls? 😀
-
I don't think the Haskell version can be considered idiomatic - isn't strongly recommended to state signatures of top-level functions?
-
Character in pattern is a " " (space) which is not the same as " " (non-breakable space).
-
@samblaise It's not only the parenthesis, I think I could get used to that (rainbow colors are nice). In Scala or Haskell this example would be much shorter. I wonder if the code from tutorial is subpar, not the best (most idiomatic) solution, because for example I saw a lot of bad Scala code in various tutorials/articles scattered on the Internet.
-
*Sigh* school team projects. Others were always postponing everything to a last week. By that last week I had already written my part and was really worried about parts of others... Not great experience, but I definitely learnt few things about teamwork. Cooperating in real work turned out to be significantly easier, money and having a job are probably better motivations than passing one course 😀.