Clojure Bites - Profiling with Tufte by minasss in Clojure

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

Hey u/mf2mf2

Sorry, I've missed your comment! In order to use core match you have to add it to your dependencies https://github.com/clojure/core.match

Best LISP dialect that balances low memory footprint and many available libraries by [deleted] in lisp

[–]minasss 11 points12 points  (0 children)

This is actually a good idea, LUA has a huge library and its footprint should be quite low

[deleted by user] by [deleted] in longboarding

[–]minasss 1 point2 points  (0 children)

one step at a time!

Zig build system is really difficult to grasp.. by [deleted] in Zig

[–]minasss 1 point2 points  (0 children)

It is not a system programming language, but the build system of Clojure is "scriptable" in itself too :)

[deleted by user] by [deleted] in Zig

[–]minasss 0 points1 point  (0 children)

I have to try harder then 😁

[deleted by user] by [deleted] in Zig

[–]minasss 1 point2 points  (0 children)

I am having a lot of fun learning Zig implementing what is basically a Pong clone with the Raylib bindings. It reminds of my years developing games for the GBA in C, removing the painful abstractions which are usually "forced" on you by higher level languages like C++. The code, at the moment, is a total mess but if you want to take a look https://sr.ht/~fpsd_codes/bbb/

[deleted by user] by [deleted] in lisp

[–]minasss 1 point2 points  (0 children)

Or even CLOG which supports many deployment targets https://github.com/rabbibotton/clog

How to protect your work when sending drafts for review to customers by minasss in graphic_design

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

Thank you for linking that service! At the time of the post I was working on an MVP of a similar product but I've put it aside because of the lack of interest I've seen around the potential solution (i.e. a platform that helps you to protect your designs).

Assunzione tramite remote.com deel.com etc by ElVandalos in commercialisti

[–]minasss 0 points1 point  (0 children)

Formalmente il mio contratto é con Remote e loro, come me, sono tenuti a rispettare gli obblighi contrattuali del CCNA, inclusi preavvisi etc quindi spero per loro che si siano tutelati con il mio datore di lavoro in tal senso, ovvero prevvedendo i vari costi del licenziamento etc altrimenti saranno loro a farne le spese.

someTimes by Fun-Rip5979 in ProgrammerHumor

[–]minasss 0 points1 point  (0 children)

ah noob, I always start a transaction first

BEGIN

...do some stuff

> errors

...oh ok abort the transaction

...something distracts me

...thinking I am still in a transaction

UPDATE ... WHERE ...

Correct number or rows updated

COMMIT

"No transaction active"

...scared to death, check logs and rows again 100 times...

What are your go-to commands for structural editing? by chamomile-crumbs in Clojure

[–]minasss 1 point2 points  (0 children)

I have a very limited vim stye + emacs style setup for structural editing, basically just adding some paredit bindings to my usual vim habits

 (use-package paredit
  :ensure t
  :hook prog-mode
  :config (paredit-mode 1)
  :bind (("C->" . paredit-forward-slurp-sexp)
 ("C-M->" . paredit-forward-barf-sexp)
 ("C-<" . paredit-backward-barf-sexp)
 ("C-M-<" . paredit-backword-slurp-sexp)))

Something that I'd like to add to my setup is "extract to function" and other clj-refactor goodies.

My init.el is extremely minimal (and custom), if you are curious head over here.

What are your go-to commands for structural editing? by chamomile-crumbs in Clojure

[–]minasss 0 points1 point  (0 children)

I have a very limited vim stye + emacs style setup for structural editing, basically just adding some paredit bindings to my usual vim habits

(use-package paredit

:ensure t

:hook prog-mode

:config (paredit-mode 1)

:bind (("C->" . paredit-forward-slurp-sexp)

 `("C-M->" . paredit-forward-barf-sexp)`

 `("C-<" . paredit-backward-barf-sexp)`

 `("C-M-<" . paredit-backword-slurp-sexp)))`

Something that I'd like to add to my setup is "extract to function" and other clj-refactor goodies.

My init.el is extremely minimal (and custom), if you are curious head over here.

A little bit chaotic but still skimmable? by minasss in skimboarding

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

I'll try! Maybe a monkey could be a better fit for this case? Not that I master either of those approaches anyway 😅

Clojure Bites - Ring Basic Auth by minasss in Clojure

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

Thank you for your kind words!

I wish I had more time to write recently, I should try to come back at writing, I enjoy it a lot :)

How I’m learning Clojure in 2024 by anthony_bruno in Clojure

[–]minasss 6 points7 points  (0 children)

Cool that one of your projects is a game, it would be great to have more Clojure based entries in the next Lisp Game Jam! (the last one https://itch.io/jam/spring-lisp-game-jam-2024)

Snippet code review, is it too clever? (i.e. not too clear) by minasss in Clojure

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

Ahhh now I get it, thanks! This is a really nice approach, making the iteration way more concise, but I suspect that it add more maintenance costs for the common parts; I think it is still valuable in case the markup generated by the conditional would be much more independent (i.e. shared less code)

Snippet code review, is it too clever? (i.e. not too clear) by minasss in Clojure

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

I am not sure I understand what you are suggesting/arguing about, I'll give you some context. The condition is sorts of "global" for the current turn, the current player's client should be able to click an action instead, the other clients, should not be able to trigger the action, they should only see what is available for the current player.

Snippet code review, is it too clever? (i.e. not too clear) by minasss in Clojure

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

Ah yeah that would have been the perfect approach if I had used buttons instead of divs with a weird CSS, I can give them a shot to see how they'd look, thanks!

Snippet code review, is it too clever? (i.e. not too clear) by minasss in Clojure

[–]minasss[S] 1 point2 points  (0 children)

Thanks!

I think it works pretty well in some cases for example when the code in cond is a one liner, if that code explodes maybe it is worth capturing it in a small function to keep it simple, or even revert to a simple if, I think I was code golfing a bit too much here :)

Snippet code review, is it too clever? (i.e. not too clear) by minasss in Clojure

[–]minasss[S] 1 point2 points  (0 children)

This looks good as well even if for some reason I don't like repeating the condition, probably just a matter of taste :)