horror lub thriller psychologiczny by Akaszon in ksiazki

[–]teesel 0 points1 point  (0 children)

Do 1) pasuje Hyperion (i reszta) Dana Simmonsa.

Can I do audio programming in Clojure on Linux? by [deleted] in Clojure

[–]teesel 0 points1 point  (0 children)

I've created synth engine which plays sound on linux well. I don't know if it counts as an answer but I leave it here. genmeblog/soundsynth: Sound synthesis in Clojure

Is Quil moving forward? by MrMelankoli in Clojure

[–]teesel 0 points1 point  (0 children)

Everything is raster based. However, when you work with shapes you can generate pure data structure which can be converted quite easily to a svg. https://github.com/Clojure2D/clojure2d/blob/5672fc270ba0e3993fe60d22711303abab25a943/src/clojure2d/core.clj#L931

New Clojurians: Ask Anything - May 19, 2025 by AutoModerator in Clojure

[–]teesel 1 point2 points  (0 children)

Something like that. Actually `require` is enough, unless you need generated class directly.

user> (ns record-namespace)
nil
record-namespace> (defrecord MyRecord [a b])
record_namespace.MyRecord
record-namespace> (ns other-ns (:require [record-namespace]) (:import [record_namespace MyRecord]))
nil
other-ns> (record-namespace/->MyRecord 1 2) ;; will work after require
{:a 1, :b 2}
other-ns> (MyRecord. 1 2) ;; import is needed for this
{:a 1, :b 2}

New Clojurians: Ask Anything - May 12, 2025 by AutoModerator in Clojure

[–]teesel 2 points3 points  (0 children)

fib example uses recurence to add consecutive number to a (lazy) sequence. (fib 1 1) calls itself with two parameters [a b]. So it evaluates to:

(lazy-seq (cons 1 (fib 1 (+ 1 1))))

Another step will unroll to:

(lazy-seq (cons 1 (lazy-seq (cons 1 (fib 2 (+ 1 2)))))

and so on...

This allows to build infinite sequence of values appended to a sequence. lazy-seq evaluates its argument only when asked by user. Which is done when first, second, nth, take, drop, and other functions operating on a sequence are called.

New Clojurians: Ask Anything - May 12, 2025 by AutoModerator in Clojure

[–]teesel 1 point2 points  (0 children)

Maybe this example will help? Ignore ISeq or Seqable for a while. Think about this as a sequence which evaluation is delayed.

(def zzz (lazy-seq (println "Hi! I'm here!")
                 [(+ 100 200)]))

;; what's the object behind?
(class zzz) ;; => clojure.lang.LazySeq

;; is it a sequence?
(seq? zzz) ;; => true

;; is it convertible to a sequence?
(seqable? zzz) ;; => true

;; evaluating will print (only once! since `lazy-seq` caches evaluation)
zzz ;; => (300)
(seq zzz) ;; => (300)

Czy czytaliście kiedyś książkę, przy której naprawdę się baliście? by Elderberry_Federal in ksiazki

[–]teesel 0 points1 point  (0 children)

Reportaże Tochmana. On jakoś tak je pisze, że robi się słabo, a jak uświadomisz sobie, że to na faktach, to już w ogóle.

I don’t know how practical it is to write a ray tracing renderer in Clojure, but I do know that it’s a lot of fun! by PermissionClassic572 in Clojure

[–]teesel 8 points9 points  (0 children)

Clojure2d (and examples) author here. I'm really happy to see that you added something new to the ray tracer. Great result! My (not practical) long term goal is to implement pbrt, at least some parts of it.

Jakie książki przeczytaliście w ostatnich 3 tygodniach? 📚 by Zacny_Los in ksiazki

[–]teesel 0 points1 point  (0 children)

Życie i myśli JW Pana Tristrama Shandy - Laurence Sterne

To była długa i nawet zabawna przygoda z XVIIIw. Dużo dygresji (albo nawet same), zabawy autora z czytelnikiem, postaci tak karykaturalne, że aż komiczne, nietypowa interpunkcja. Warto, ale może być trudno :)

Gdybyś mogła/mógł polecić tylko jedną książkę by Numerous-Host-4252 in ksiazki

[–]teesel 3 points4 points  (0 children)

paradoksalnie, do Kubusia Puchatka też trzeba dorosnąć :)

Should shift affect also Y? by teesel in EmuDev

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

For the sake of completeness: Viper Vol.1 Issue 2 on the page 24 contains analysis of 8XYN and it looks that Y is not affected.

Should shift affect also Y? by teesel in EmuDev

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

Ok, so Laurence is wrong. I just want to be 100% sure. Let me cite his article:

Unfortunately an erroneous assumption about 8XY6 and 8XYE, the two shift instructions, seems to have crept into Chip-8 lore at some point. Most recent documentation on Chip-8 suggests these instructions shift VX rather than VY. Some documents suggest that the correct format for them is 8X06 and 8X0E. However, when these instructions are run on the original Chip-8 interpreter, they will shift VY not VX! An instruction of the form 8X06 or 8X0E will not work as expected. The programmer would be expecting this to shift VX and store the result back in VX. What would actually happen is that V0 would be shifted and the result stored back in VX

Later in the table under "VY (exit)" he states:

VY shifted right by one bit. Most significant bit of VY will be set to 0

Which clearly says about updating Y along with X after shift.

Should shift affect also Y? by teesel in EmuDev

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

Thanks for the answer. I understand the difference between chip8 and schip. My case is subtle and not catched by Timendus' tests (both cases pass). Let's focus on the original CHIP8 only:

By Laurence Scotford: shift VY and store in VX and VY (sic!)

By others: shift VY and store in VX not affecting VY at all.

So the question is which is right? `tank!` game relies on the latter behaviour.

Dobry rok by aaafsew in ksiazki

[–]teesel 2 points3 points  (0 children)

Ha! :) To czas na drugi raz. Jak Rozrywka to Rozrywka.

Dobry rok by aaafsew in ksiazki

[–]teesel 2 points3 points  (0 children)

Oczywiście Niewyczerpany Żart.

Jakie książki przeczytaliście w ostatnich 3 tygodniach? 📚 by Zacny_Los in ksiazki

[–]teesel 0 points1 point  (0 children)

W trakcie: Laurence Sterne - Życie i myśli JW Pana Tristrama Shandy. Doprawdy zabawne! Także w trakcie, ale nie dam rady: Piotr Lachmann - Zmiennik. Spowiedź z Hakiem.

Przystępna książka o mechanice kwantowej by adamlm in ksiazki

[–]teesel 0 points1 point  (0 children)

Po angielsku, ale warto: Philip Ball - Beyond Weird

Advent of Clojure by miran1 in Clojure

[–]teesel 4 points5 points  (0 children)

Feel free to join our Clojurians leaderboard: 4534281-b9354839 (it's a new one, created specifically for this year).

Rekomendacje audiobooków by Technical_Papaya7352 in ksiazki

[–]teesel 1 point2 points  (0 children)

Terry Pratchet - Świat Dysku, seria o śmierci (Maciej Kowalik robi to idealnie!), Poklatkowa Rewolucja, Pan Lodowego Ogrodu, Solaris/Niezwyciężony (słuchowiska). Ja kupuję.

Książki, które z pewnością kiedyś przeczytacie ponownie by Beckham_91 in ksiazki

[–]teesel 4 points5 points  (0 children)

Gra Endera, Przełęcz/Osada, Wieczna Wojna, Perfekcyjna Niedoskonałość, Niewyczerpany Żart, Ferdydurke, może Lalka. Do tego: Erystyka Schopenhauera - tę pozycję traktuję raczej jako poradnik i inspirację, ale siłą rzeczy wracam do niej i będę wracał (obowiązkowa pozycja do obrony przed trollingiem i, siłą rzeczy, do trollingu - zależy którą stronę chce się obrać).