Fork me on GitHub
#off-topic
<
2022-11-29
>
Arunima Chaudhuri12:11:09

Hello all! As a Harvard WECode Tech Fellow I get to refer attendees to get discounted tickets. 🚨Early bird tickets Sales for Harvard WECode: Women Engineers Code Conference end on Dec 3, 2022! Grab them to get a chance to attend the largest student-run Women in Computer Science conference in the world, on Feb. 18 to 19, 2023! Use the referral code to get an extra 15% discount! 🎁Referral code: WETF21 ➡️Link: http://bit.ly/wecode2023

Arunima Chaudhuri14:11:24

Hey @U04V15CAJ let me know if the group is for something else. I an delete it 😊

borkdude14:11:34

well, at least you're not a bot, that counts for something :)

borkdude14:11:20

Cool. If you want to do some post like this, giving some personal introduction may help people (like me) understanding why you are posting this, instead of just being a bot posting spam. Thanks :)

borkdude14:11:28

I mean in the original message (so everyone can read it)

respatialized18:11:49

https://buttondown.email/hillelwayne/archive/i-am-disappointed-by-dynamic-typing/ of using the dynamism of dynamically-typed languages to enhance programs with information gathered at runtime. > I can imagine all sorts of uses for this kind of trick. Here’s some I’d like to see: > • Run a test suite. If a test fails with an uncaught exception, rerun that test with the raising function augmented to breakpoint three lines before the raised exception, while also providing the current stack trace to the user with called parameters. > • Track the arguments for every call to an expensive function. If it’s called with the same parameters ten times, alert someone that they should be calling it once and storing the result. > • Profile the stacks that at some point call function f. > • Add an output assertion to an optimized function in dev/testing, checking that on all invocations it matches the result of an unoptimized function > • Collect production invocations and generate https://jestjs.io/docs/snapshot-testing from those. > When f is called with x, return f(x) but also log what the results would have been for f(x+1) and f(x-1) > .... > The overall picture is of going one step further than homoiconicity: instead of code as data we have programs as data. In dynamic languages you can write programs that take programs and output other programs. Are there many examples of this kind of program analysis in Clojure? I can't think of very many, but I don't think there's anything in the language itself that prevents us from trying to develop these kinds of techniques.

hiredman18:11:01

those seem like kind of a brainstorming list, and then once you look at the cases in detail, the requirements to make it work are very expensive, or a lot of common ways that programs are used makes them less useful, or there are adhoc solutions that are good enough

1
hiredman18:11:04

like, it depends, but often the reason expensive functions are expensive is because their inputs are large, so you are going to keep around large inputs, and spend the time to compare them, to determine if you should be caching results somewhere for re-use

hiredman18:11:43

adhoc wise, I've used something like https://gist.github.com/hiredman/a2630ea6153d06840a2723d5b2c9698c to open a repl over tap in places where I wanted to inspect and poke at things in the middle of a running program

respatialized19:11:55

I once had a similar idea to track the input size of arguments to a function operating on sequences to try and calculate the empirically observed computational complexity of the function. I agree that it would be a lot of work to implement, but doing so may help provide tools to make theoretical CS concepts more tangible to people by surfacing them in the context of a running program.

jpmonettas19:11:26

I'm working with that kind of stuff in #C03KZ3XT0CF. Currently working on deriving fn types (args and return) from execution. So I'm basically instrumenting an entire codebase, then running the tests or whatever, and collecting types information for generating documentation that can be browsed.

jpmonettas19:11:55

here you can see an unreleased experiment of this

🎉 6
jpmonettas19:11:58

there I instrumented the entire ClojureScript compiler codebase, then run a compilation of a simple program to exercise the codebase, and generated fn documentation. You can see the documentation shows types, and also examples calls

jpmonettas19:11:15

here you can see that cljs.util/file? can accept multiple things as input

😍 1
hiredman19:11:43

there was a talk I saw a video of recently at some haskell event, where the speaker was comparing haskell tooling with racket tooling, and observing that the racket tooling all worked together better because it started from a place of all being resident in memory together and being functions that you call at the repl, so there is a lot of shared context, where the haskell tooling was all kind of batch mode and sharing stuff between the tools is harder

1
💯 1
hiredman20:11:30

That's kind of another axis, static/dynamic then batch compilation/image like

1
1
hiredman20:11:45

I think the original article up there kind of conflates the two axis

hiredman20:11:02

Which a lot of tooling work does as well

hiredman20:11:46

Static analysis tools really also want batch/whole program compilation

hiredman20:11:30

You see some of that same pressure towards static analysis in clojure tooling, relying on loading files from disk rather than interacting with a running clojure process

1
respatialized21:11:02

I'm hoping that the "Clojure codebase in a Datalog DB" approach that #C03FF6W62A3 is trying to develop can become that kind of common substrate for different tools that are aware of both runtime information and information derived from the source code.

enn23:11:41

Interesting he doesn't mention Common Lisp, where there's a lot of prior art: • condition system/restarts • CLOS (and various things built in it e.g. AspectL, ContextL) this is the stuff I miss most from CL in Clojure and I agree that an image-based compilation model is a key part of this

Oliver George20:11:37

Where should I put my votes for "Clojurists Together https://clojuriststogether.us17.list-manage.com/track/click?u=26ebcffb0cf27fac7430ea3ff&amp;id=ce3763218f&amp;e=ff3d209858."? I think the Clojure community should invest more in tooling and developer affordances. Especially good ideas bought in from other places. There are limits to a terminal and monospace font! Where should I put my votes? I don't know who on the list is helping progress tooling.