This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-20
Channels
- # announcements (1)
- # beginners (48)
- # cljdoc (6)
- # cljs-dev (1)
- # cljsjs (1)
- # clojure (13)
- # clojure-dev (6)
- # clojure-estonia (1)
- # clojure-europe (1)
- # clojure-finland (8)
- # clojure-gamedev (3)
- # clojure-spec (35)
- # clojure-uk (25)
- # clojurescript (9)
- # datascript (1)
- # datomic (18)
- # figwheel-main (2)
- # fulcro (5)
- # graphql (1)
- # jobs (16)
- # off-topic (76)
- # pathom (39)
- # re-frame (6)
- # reagent (7)
- # remote-jobs (6)
- # rum (3)
- # shadow-cljs (54)
- # spacemacs (8)
- # speculative (2)
- # yada (72)
immutability also has performance costs right?
I guess you're saying it should be the default, not that mutability shouldn't also be available.
Not necessarily, but immutable-by-default seems to have a much stronger set of benefits for many things
I think it makes sense to have mutable datastructures available when needed, but immutable datastructures have good enough ™️ performance now that reaching for mutable structures right away for performance reasons is a premature optimization.
And should probably be kept to the specific locations your perf profiling has identified as being hot spots.
I believe this is one of the key problem areas. People rely too much on "perf profiling" and often misunderstand the results, which leads to inaccurate assumptions and poor decisions based on those.
Re: a shift in thinking, I think that's part of it, but another part is probably that it doesn't get talked about much. Typing is a popular flame-war, but mutable vs. immutable doesn't seem to be.
My theory on this: mutable data users mostly don’t know immutable data users, or consider them too weird to argue with … until they start to understand the benefits of immutable data and become themselves immutable data users.
Another reason is : inside each mutable data user, there is a part time immutable data user …. i.e. const
. 😆
in bash, how can I compare the result of this in a conditional, saying “greater than zero”:
errors=$(cat out/output.txt | grep FOO | wc -l)
$ echo $errors
0
$ if [[ $errors -gt 0 ]] ; then echo "yes"; else echo "no" ; fi
no
Yeah, bash is weird that way. Something about “double-square-brackets == boolean” I think? Been a while, my bash skills are rusty (not that they were all that great to start)
but anyway, yeah, double-square-brackets for if
fun fact, there is actually a binary called [
on the average unix system
If you have a shell without a [
built-in, it can fallback to that actual binary. Shell scripting is strange like that
the same apparantly, I am unsure why it is a builtin in zsh/bash
I'm guessing, but probably to avoid the overhead (fork/exec) of calling a binary just to evaluate a boolean expression.
hmm yeah makes sense, but is asking for compatibility problems
I imagine the source is identical, or there is a very insidious set of standardized tests.
if you haven’t found it yet, I find shellcheck to be immensely useful in checking bash stuff
I read about it on the Haskell reddit but never actually tried it. Thanks for the link!
The only thing where shellcheck doesn’t make a good suggestion imo is this one:
Line 21:
clojure -A:test:coal-mine:coal-mine-generator out/out.cljc $problem
>> ^-- SC2086: Double quote to prevent globbing and word splitting.
Did you mean: (apply this, apply all SC2086)
clojure -A:test:coal-mine:coal-mine-generator out/out.cljc "$problem"
Wrapping the variable in quotes is passing an extra argument, while I want to ignore it when it’s not set.probably this:
clojure -A:test:coal-mine:coal-mine-generator out/out.cljc ${problem:+"$problem"}
I found out the hard way that MacOS shell scripting is quite different from Linux. Linux utils have so much more options compared to their BSD counterparts shipped with MacOS
its not the shell, its the (what would on linux be called) core utils
Yeah, not going to attempt that :’). Its not bad perse, I just thought that the BSD family of core utils was closer to the GNU family of core utils.
This is the deal with being "unix-like". OSX is neither Unix nor Linux, but people keep trying to compare one or the other to it.
Right and we're talking Unix vs UNIX(R) Certified. As per the Wikipedia page (https://en.wikipedia.org/wiki/Unix) - The UNIX trademark passed to The Open Group, a neutral industry consortium, which allows the use of the mark for certified operating systems that comply with the Single UNIX Specification (SUS). As of 2014, the Unix version with the largest installed base is Apple's macOS.
you claimed that > OSX is neither Unix nor Linux, but posted a link from the UNIX trademark owner that > As of 2014, the Unix version with the largest installed base is Apple's macOS.
I explained. Unix vs UNIX(R) Certified. There's a difference that is explained in my previous message.
I also didn't write the Wikipedia article. As with any Wikipedia article there may be inaccuracies within the page. The purpose of linking the two pages was to show the difference.
That is ideal. You could go crazy and chroot into a sane scripting environment and everything, too 😀
dual boot with Windows, and NVIDIA drivers
Nvidia on Linux has been the bane of my life... It's like tossing a grenade in the kernel.
Have a love/hate relationship with it, I like that it at least provided performant drivers for linux
But the ArchLinux tooling is great, even if you borked your kernel and it doesnt boot, boot from USB, chroot and fix whatever you broke
The fact that ArchLinux is so barebone makes system maintenance so much easier
But yeah, maybe not run it on your production cluster
Fellow Arch user here. Follow the instructions on the Nvidia Arch Wiki page and it works just fine. Miss some of the key steps on there and you'll see issues. I'm running nvidia blob and have better performance than my Winblows installation and am running Steam Native just fine.
Per your initial statement - you shouldn't need to boot into a live usb key. That's what the fallback kernel is for
Here's one that is specifically helpful that is often forgotten (I know I did) - https://wiki.archlinux.org/index.php/NVIDIA#Pacman_hook
I don’t really know the exact circumstances, but part of the problem was having a relatively tight root partition (10G or so). Maybe I could restore with the fallback, but windows breaking my bootloader had me use the USB and that was what was familiar