Fork me on GitHub
#off-topic
<
2022-08-17
>
vemv05:08:57

I never understood why unix time seemingly doesn't work with certain programs? The command will be run, no timing will be printed I see it working with cat , not with lein

p-himik06:08:10

What do you mean by the last statement - how do you run it with cat or lein?

vemv06:08:55

time cat foo or time lein foo

vemv06:08:59

the duckie helped me in the meantime and lead me to find https://superuser.com/questions/399699/unix-time-command-with-pipeline-prints-no-time-report /usr/bin/time works. Although the answer suggests zsh time also should (doesn't for me)

p-himik06:08:17

Ah, heh - the lack of sleep shows. For some reason, I thought you were running time from cat and lein and not vice versa.

1
souenzzo09:08:26

I will add this to my list of why not use zsh

p-himik09:08:59

Given that it's the same with bash - why single out zsh? (BTW on my end, it works just fine with zsh).

Martynas Maciulevičius12:08:15

It printed for time lein ancient :thinking_face: How do I reproduce it on bash?

William LaFrance16:08:39

FWIW, both zsh and bash print the time out if I run time lein with no arguments. Bash:

real	0m2.128s
user	0m1.710s
sys	0m0.270s
Zsh:
lein  1.71s user 0.24s system 124% cpu 1.565 total
As for singling out zsh, if you run which time in zsh you see time: shell reserved word. Running that in bash prints exactly what you’d expect, /usr/bin/time. Not sure why zsh anointed itself to replace the system time command. Maybe it has shiny features I don’t know about.

vemv16:08:52

on my zsh:

which time
time: shell reserved word
I have no idea why I don't always get the time. I use oh-my-zsh btw.

William LaFrance16:08:15

I have a pretty stock zsh setup which shipped with macOS, but I switched back to bash as I was setting this machine up (😎).

Martynas Maciulevičius18:08:21

Maybe lein is also a reserved word? :rolling_on_the_floor_laughing:

teodorlu14:08:57

Curious whether Clojurians agree / disagree with this: https://yoyo-code.com/programming-breakthroughs-we-need/

Alex Miller (Clojure team)14:08:30

As always, the problem with writing software is complexity, especially incidental complexity. Clojure is targeted by design at reducing complexity. So, yes, I think from a Clojure perspective, generally agree (in a broad hand-wavey way)

👍 1
phronmophobic14:08:56

I think the author identifies some symptoms, but I would say their proposed vision leads in the wrong direction. The structured programming model seems promising, but not because it makes it easier to restructure your whole program on a regular basis. > We spend endless amounts of time bikeshedding the right syntax, indentation level, tabs vs spaces, or where to put code in the structure of files I think most communities/organizations have adopted style guides that mostly avoid this problem (not totally, but it's really not that big a deal anymore). > Refactoring doesn't even need to exist as a separate concept or activity - programming itself is that. We regularly change the whole program every day. Migrating to new database? Payment provider? Frontend framework? Y*ou can just do that, without designing an interface abstraction for it, ever. You don't need UI mockups and prototypes - you just program the real thing, because it's that simple. If the user doesn't like it, *you can completely restructure it easily. (emphasis mine) This seems like the opposite direction. Essentially, it sounds like they want to somehow improve the "update" model of building software, but I'm sold on the "accretion" model of building software.

2
👍 2
rolt16:08:50

i feel like he's describing https://pharo.org/features

walterl18:08:17

While I share the author's frustrations, I don't really find the arguments convincing. "Program is not a text", "program is a model". We already work with programs as models. It seems like what he's lamenting is how we represent the models. But code is already not "just text". It's identifiers and statements and operators. Specific "words" encoded in a specific way, via rules and very sophisticated tooling, to make sense of them all. That is, it's a language. Once you're speaking a language, the problem becomes one of "translating" your model of a program into that language. Much like I'm trying to translate my thoughts into English right now, that process is often (always?) lossy, and a feature of communication. OTOH, the fact that we spend most of our time writing glue code is a testament how good we've gotten at abstracting away the "hard parts". We can (and do) use higher abstractions (frameworks), but pay for that in the way he mentions: with less control over the details. That's a feature (not a bug) of abstraction. I think Clojure is better at many of the things that the author is unhappy with, besides the general (and monumentally important) reduction in complexity. Structural editing of lisp forms is an example of a higher level abstraction over "just text", when compared to the more rudimentary line based approach of other languages. spec came to mind with the mention of testing being improved by types (specs) and fuzzing (generators). clojure-lsp+clj-kondo is a great "language tutor" to help you translate your mental model into valid Clojure. Still, I really do "get" what the author is saying. Just this week I started a new web app and realised how long it took just to get to the point where I can render HTML responses. I don't know of a good solution to that problem, though. 😞

👍 3
Max01:08:48

The bit on testing makes me think the author would appreciate property-based testing (a la haskell’s quickcheck or clojure/test.check). While I wrote haskell I pretty much only wrote property-based tests, it’s too bad that Clojure’s impl is too slow to use it ubiquitously

👀 1
teodorlu11:08:57

> it’s too bad that Clojure’s impl is too slow Too slow? As in it's running too many examples on too big data? Or that it's fundamentally slower than quickcheck in some regard? Would appreciate a reference on this, it's not an argument I've seen before 🙂

Max13:08:38

When I was working in Haskell, we didn't even think about writing quickcheck properties that ran 100 or even hundreds of cases. When I've tried to do the same thing in Clojure, people seem to get nervous about the impact on test suite runtimes. Maybe there's a cultural element there, like in Haskell more of our tests tended to be pure, but I also wouldn't be surprised if Haskell was generally more performant than Clojure. Haskell compiles to native code, there's no VM and the compiler is built to optimize idiomatic Haskell code.

👍 1
Max13:08:04

A rule we had at that job was that when we fix a bug we should in preferred order a) make the bug impossible in the type system, b) write a quickcheck test to verify the fixed behavior, or c) write a standard test to verify the fixed behavior.

Drew Verlee18:08:27

> Most of the code i write doesn't do anything interesting > Sounds like a personal problem. If you don't feel what your doing is useful then i won't matter how efficiently you do it. The innovation of today is tomorrows boilerplate.

Drew Verlee19:08:34

The rest of the piece is interesting. But not something that can be tackled systematically.

walterl19:08:44

> "The innovation of today is tomorrows boilerplate." Spot on 👌

Drew Verlee19:08:38

Some of the refactoring should be made possible by using a lisp. Though i can't say i use clojure to change existing functions very often. Does anyone?

mauricio.szabo03:08:42

Honestly, the author seems to be looking at something that understand natural language (or a subset of) where he would say "I want something like this and this" and the model writes itself. Or, he writes the first version, and says "now I want this program in fragments of 10 lines, with functions receiving at most 3 params, and I want to fix all bugs

mauricio.szabo03:08:49

The part about testing is weird, honestly. I'm not sure what he wants there - making sure the app does not have bugs and that it does not change behavior and not re-introduce bugs on newer versions is incredibly hard > The only thing worse than testing is not testing, but testing is not much better I'm not sure what to think about this statement, honestly. Yes, I saw codebases when I deleted the "core thing" that the system should do, and all tests keep passing. I also saw codebases where I deleted 85% of the code (YES, real number) and everything kept working just fine

mauricio.szabo03:08:37

The argument is that when you discuss tests, it always follows a "you just don't do it right" talk. I mean, I can say the same thing as anything in the world... > I don't like to eat, it makes me fat Well, you're not eating right > I don't like to code, it's always full of bugs and my program doesn't do what I want Well, you're not coding right etc...

1
teodorlu08:08:56

> Though i can't say i use clojure to change existing functions very often. Does anyone? I prefer not to -- I'd rather parameterize.

emccue22:08:46

Does anyone have a preferred tool for keeping structured notes? I'm about reaching my limit with the mac notes app. Something I can run offline and sync to my phone in some way would be great

Max22:08:18

I use evernote, but their app has been causing so many sync conflicts that I’m looking for an alternative

William LaFrance22:08:42

I keep meeting minutes for an organization and I’m not happy with any solution I’ve tried for keeping them organized. Currently just doing well-named Google docs. Was considering trying Evernote again, but ^ that does not bode well.

Evan23:08:17

I’ve been using https://www.notebooksapp.com for a few years. It works offline and has multiple sync options (including local sync using its built-in WebDAV server).

respatialized23:08:08

https://obsidian.md/ Despite being an emacs user, I've tried (and failed) multiple times to use org-mode (including org-roam). I've recently had better luck with Obsidian for networked notes. I use Syncthing to sync it across devices, and it works seamlessly offline and on mobile.

💯 1
respatialized23:08:46

danger bonus mode: someone added sci to it as a plugin, so you can embed Clojure expressions in your notes https://github.com/victorb/obsidian-wielder

‼️ 1
walterl23:08:32

I use Mardown files, in a git repo, with a few scripts for convenience: https://github.com/walterl/git-memex

walterl23:08:05

Syncthing syncs to my phone, where I use Markor to search/edit.

🙌 1
ksd00:08:01

not really "structured", but Standard Notes works well for plaintext notes

William LaFrance00:08:38

I want to love Standard Notes and I currently pay for their annual subscription, but I’m just so burned by the lack of printing. I need to print meeting minutes to PDF to share via email.

Max01:08:34

@U03JPRPTSTX re evernote: my gripes are 100% with the mobile app, I’ve had no sync problems with the desktop app or web

Evan Z02:08:39

Onenote and Notion are the only options I’ve found that are acceptable for my needs. Nothing else properly stores images inside the note. Obsidian has the standard limitations of markdown and stuffs the images in the same folder. Evernote is an unfocused mess.

Evan Z02:08:59

But I also use a lot of images in my notes

p-himik05:08:32

Logseq is another one, written in CLJS. Very active development and community, lots of plugins.

Adam Helins09:08:13

Logseq is excellent and free 👌 Highly recommended

🙌 2
👀 3
vonadz09:08:25

^ plus it's written in cljs and clojure

clojure-spin 1
Ben Sless12:08:43

logseq + syncthing

1
respatialized14:08:41

Does anyone know if there's a way to actually use Clojure in logseq? It seems like a big missed opportunity that all the power of Clojure is under the hood but not available to its users (except as part of queries, as far as I can tell)

seancorfield16:08:27

I'll give a mild +1 for OneNote -- I have both a work and a personal "notebook" since it supports multiple accounts, and the browser extensions make it easy to capture information (and images) while doing research. I've previously been an Evernote user but I also began to have problems with it. I have an Office 365 Home subscription so it's natural to use MS products (the Home subscription includes Skype credits and OneDrive storage as well as Office itself so it's a pretty good deal -- and I like the MS To Do app for lists that I can share with my wife and that sync across all devices).

Mark Wardle18:08:38

I was using Roam but have switched to Logseq. It is excellent and free.

nate18:08:05

same here, Roam -> Logseq

teodorlu21:08:02

Org-roam is amazing if you like Emacs! https://www.orgroam.com/

emccue14:08:50

@UK0810AQ2 How does one properly syncthing?

Ben Sless14:08:21

Install, keep the agent running. Add devices, add directory on one machine, mark devices to share with, accept sync on other devices

Adam Helins15:08:30

@UK0810AQ2 Is there a difference with any cloud storage, Dropbox and such? How does it behave when you work concurrently on the same notebook on 2 different machines?

Ben Sless15:08:16

Depends on the sync interval. Syncthing has some mechanisms to resolve conflicts but my usage isn't sophisticated enough to trip them up. Main difference from cloud storage is it's directly peer to peer, besides that I can't elaborate

walterl15:08:51

It can also find devices on the LAN