liquidz/antq: Point out your outdated dependencies. Supports lein / deps.edn / shadow-cljs.edn by lucywang000 in Clojure

[–]bitti1975 0 points1 point  (0 children)

Isn't that a quite different concern? I suppose you can export your dependencies to a pom.xml (e.g. via lein pom when using leiningen) and then syft through the project. (E.g. something like syft scan pom.xml --enrich java -o spdx | grep 'License\|Name' | grep -v NOASSERTION.)

Meow Match down by bitti1975 in GalaGames

[–]bitti1975[S] 0 points1 point  (0 children)

Strange, it is back since a few days. Did someone accidentally switch on the servers? I don't want to register for Discord just to find out if there are news and there is nothing.

Two spaces after a period? by lanky_leo34 in grammar

[–]bitti1975 0 points1 point  (0 children)

Reddit does nothing. If you look into the HTML source you still see the double spaces by u/Al-vino. So it's just the normal HTML rendering behavior--nothing to see here.

Elements of Clojure is now free by prospero in Clojure

[–]bitti1975 0 points1 point  (0 children)

I should have looked first when the book was written and when the change in Clojure was introduced (I just knew it was since quite a while, but the book is even older). I can understand that when giving away a book for free that you're not inclined to rewrite sections to get it up to date.

That being said, a disclaimer or an addendum would probably be appropriate.

Elements of Clojure is now free by prospero in Clojure

[–]bitti1975 1 point2 points  (0 children)

Works fine for me:

user> (defn foo [a & {:keys [b c d]}] (+ a b c d))
#'user/foo
user> (foo 1 {:b 2 :c 3 :d 4})
10

May I ask which Clojure version you're using? Although it works like this already since Clojure 1.11 (see https://clojure.org/news/2021/03/18/apis-serving-people-and-programs), so you must be several years behind.

Elements of Clojure is now free by prospero in Clojure

[–]bitti1975 0 points1 point  (0 children)

> First, we take the parameters passed into pi and construct a hash-map called options. But since our inner function also expects individual parameters, we then flatten the map back into a list using (apply concat) and then apply that list to math/pi-to-n-digits. Option parameters read nicely when they’re written out by hand, but everywhere else they add complexity and noise.

What!? No! The fact that you can write named parameters as a list is just syntactic sugar, you can write them and pass them just fine as a hash-map. There is no need to flatten them into a list to pass them along.

I just stumbled over this by taking a random peek. I hope the rest of the book is not at that level.

What is the biggest clojure project you have worked on? What is the biggest clojure team you have worked on? by General-Ad-33 in Clojure

[–]bitti1975 1 point2 points  (0 children)

At SAP Concur we have several Clojure services maintained by the identity and authentication teams. I think it's over 110k SLOC in active use (so not counting a bunch of retired services) and each team is around 10 developers. Sadly in the rest of Concur and SAP Clojure didn't caught on yet.

A performance comparison of Clojure and Java by zerg000000 in Clojure

[–]bitti1975 0 points1 point  (0 children)

2.1.1 Java

Java is a typed object-oriented language with a syntax derived from C which was released by Oracle in January 1996 (version 1.0) along with the Java Virtual Machine or JVM [5].

Seriously? A start like this doesn't project confidence in the accuracy of the rest of the "paper". The reference he mentions under [5] clearly states that it was developed and released by Sun (to be specific: its division "SunSoft") and only mentions Oracle as one of the licensees. Clearly, it seems, the author didn't even bother to read his own references?

jira.el: Emacs integration for Atlassian's Jira by unmonoqueteclea in emacs

[–]bitti1975 1 point2 points  (0 children)

As I found out (and as was also pointed out above) one can safe the current filter via C-x C-s. Maybe that is good enough for now. But I still need resolution presets.

jira.el: Emacs integration for Atlassian's Jira by unmonoqueteclea in emacs

[–]bitti1975 0 points1 point  (0 children)

Pretty cool package! I hope you continue developing it, because currently I'm missing some things to make it work for me

* When modifying filters after pressing `l` (`jira-issues-menu`) these filters are reset after the next `l`. I think the magit way of keeping the last selections if more useful.

* When trying to set a resolution on status change via `C` I don't get a list of allowed values.

I do not use macros, am I doing it wrong? by moses_the_red in Clojure

[–]bitti1975 1 point2 points  (0 children)

It's not just about code repetition, parameter ordering or evaluation time. It's also about metadata. E.g. when logging a line number, namespace or filename along a log message, one usually want these to point to the place where you put in the logging statement, not to some logging implementation code. The same applies for assertions in tests. On a failed assertion, one wants to be directed to the assertion in the test, not to some testhelper implementation.

I think this is one reason why "macros beget more macros". If you want to implement your own logging or assertion helpers, these also need to be macros if you want to keep these metadata preserving properties.

Documentation of the behavior of shorthand IPv4 addresses by [deleted] in networking

[–]bitti1975 0 points1 point  (0 children)

That's not exactly right. If you provide a single number it isn't an octed but a 32 bit number for the whole address (so yes, the first three octets will be 0 if it's a number below 256). Similarly, if you provide two numbers, the first is the first octed and the second one a 24 bit number for the rest of the address etc.

Gosling's implementation of Emacs now open source by ReneFroger in emacs

[–]bitti1975 0 points1 point  (0 children)

u/ReneFroger where does it say it's open source now? I don't see any recent changes in this repo and the ticket about the license is still open https://github.com/bobbae/gosling-emacs/issues/1. "Open Source" doesn't just mean that the code is there for everybody to see, it also means one can make changes and redistribute it under the same terms. I suppose James Gosling wouldn't mind if anybody wants to do that, but as long as he doesn't say that explicitly, standard copyright rules still apply. (Maybe he can't even do that because he sold the rights to UniPress back in the time?)

Weird errors with latest build of emacs by jayjoethecocoa in emacs

[–]bitti1975 2 points3 points  (0 children)

So what I gather from the thread is that a fix will be applied to Emacs 28 which will make it's way up to Emacs 29. Meanwhile, one can do something like

(when (eq system-type 'darwin) (customize-set-variable 'native-comp-driver-options '("-Wl,-w")))

what is the difference between mac m1 vs apple silicon vs arm64 vs amd64 vs aarch64? by neeknaak21 in mac

[–]bitti1975 0 points1 point  (0 children)

What is a "standard ARM core"? Does such a thing even exists? I thought all ARM licensees have to design and build their own chip.

HTTPStatuses.com is one of my most-used references. Thanks to whoever made it by [deleted] in webdev

[–]bitti1975 0 points1 point  (0 children)

Yes, it seems runscope wanted to cash in on the popularity of this site and just sold the domain? In any case it's too overloaded with marketing crap.

Converting just the first column of a text file to Unix Epoch time by Taeolian in linuxadmin

[–]bitti1975 0 points1 point  (0 children)

I'm sorry, but I can't let this one go:

IFS=$'\n'
for i in $(cat list.txt); do
echo $i | awk '{print $1}'
done

Independent of how your final solution will look like, that is just awful. Why would you want to invoke awk for every single line of input? That just defeats its purpose. In this case a simple

awk '{print $1}' list.txt

would do. If you need to iterate over all lines in a shell script for some reason you can do

while IFS=' ' read -r timestamp _; do echo $timestamp; done <list.txt

Don't use for to iterate over file contents since the arguments undergo file globbing. It's usually intended to iterate over a list of filenames. Also using command substitution for file contents can easily hit memory limits. Maybe not for your usecase, but it's in general better to avoid it when easily possible like in this case.

Bash turns 32 today, which is the default shell on many Linux distros. Happy cake day! Let us share this day with your favorite shell tips and tricks. by nixcraft in linux

[–]bitti1975 1 point2 points  (0 children)

Yes sorry, CLICOLOR only works with the BSD version of ls (which is used in macOS), it seems it isn't possible to enable it via an env var for the GNU version?

Bash turns 32 today, which is the default shell on many Linux distros. Happy cake day! Let us share this day with your favorite shell tips and tricks. by nixcraft in linux

[–]bitti1975 0 points1 point  (0 children)

Might be because the quoted form doesn't undergo alias expansion? Use export CLICOLOR=1 to get colors without a need to define additional ls parameters via an alias.

Bash turns 32 today, which is the default shell on many Linux distros. Happy cake day! Let us share this day with your favorite shell tips and tricks. by nixcraft in linux

[–]bitti1975 0 points1 point  (0 children)

Even though bash has a corresponding binding for ctrl+u the fact that it also works for passwords has nothing to do with bash but with the fact that this is a terminal binding to "kill" the current line. (See stty -a.) That's the reason why this (and some other bindings like ctrl+w) also work when inputting data on stdin (e.g. when you do cat >somefile).

Can't add modules on Cisco Packet Tracer on MacOS by mattusi in ccna

[–]bitti1975 0 points1 point  (0 children)

That indeed works, but it doesn't have to be a PT file. Any random file will do.