685 karma · joined Feb 27, 2016 (10y ago) · 96 submissions
comment 6d ago · link · parent
Aside from the obvious applications in biochemistry, could protein sequences also be used as a new training data source to improve overall model quality? If that's true, it's quite fascinating that we can take highly complex data we don't fully understand and use it to improve LLM training, simply because it contains so many significant structures and relationships.
comment 3w ago · link · parent
To find the right position in this spectrum, I think we need to find a level of specification that we care about.
comment 3w ago · link · parent
I want to believe this is true. But as an counterexample, do we need to hold machine code or assembly, generated from our C or Golang programs, in our heads? Or rather the Golang code is a high-level abstraction which is good enough?
If that's the case, does it mean we should go even further and treat design docs as the code suitable to hold in head and treat Golang program as a derivative? Or maybe design docs are also too low-level and the general vibe "create me an app, make no mistakes" is actually enough?
What's the right abstraction level? How to find it?
comment 1mo ago · link · parent
This machine indeed has 128 bytes of RAM, but the code and data live on the cartridges, which can include up to 64 KB of ROM (exposing 4 KB at a time, with bank switching). Also, graphics is created on the fly ("racing the beam") at TV display, so there's no need to spend precious RAM on the framebuffer.
In comparison to the later constructions based on the 6502, like NES or C64, it was certainly not an easy platform to develop games, but not as hard as your comment is suggesting.
comment 6mo ago · link · parent
* A quadratic formula program, which outputs the number of roots and the x-intercepts upon the user inputting the values of A, B, and C.
* A fighting game, with health, a store, different enemies, weapons, armor, etc, with graphics and animation.
comment 8mo ago · link · parent
x = [
123,
456,
789,
];
It makes editing such a list so much easier. Also, the commit diffs are cleaner (you don't need to add comma to the last element when appending a new one).8.
Building a multiplayer Gameboy emulator with rollback netplay(blog.rekawek.eu ↗)
1 points · by t0mek · 1y ago · discuss
9.
Show HN: Rollback netplay for Game Boy emulator(blog.rekawek.eu ↗)
2 points · by t0mek · 1y ago · discuss
comment 1y ago · link · parent
https://www.slideshare.net/slideshow/emulating-game-boy-in-j...
Essentially, there are 4 channels, each providing a number 0-15 on every tick. Emulator should mix them together (arithmetic average), scale up to 0-255 and feed to the sound buffer, adjusting the tick rate (4.19MHz) to the sound output rate (e.g.: 22 kHz) - taking every ~190 value (4.19MHz / 22 kHz) is a good start.
Now the 0..15 value that should be produced by each channel depends on its characteristics, but it's well documented:
https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware
Channels 1 and 2 produce square waves, so a bunch of low (0) and high (15) values, with optional volume envelope (gradually going down from 15 to 0 on the "high" part of the square) and frequency sweep (alternating 0s and 15s slower or faster).
Channel 3 allows an arbitrary waveform, read from the memory.
Channel 4 is a random noise, generated by the LSFR.
See SoundModeX.java for the reference:
https://github.com/trekawek/coffee-gb/tree/master/src/main/j...
comment 1y ago · link · parent
comment 1y ago · link · parent
https://newton-net-pl.translate.goog/2012/01/robot/?_x_tr_sl...
It was made of an old HTC Magic phone, acting as camera+wifi transmitter, connected to Arduino via its serial port and level shifter, to control the servo and a RGB LED. I had a lot of fan with that, even if the connection wasn't really to stable.
Thanks for sharing, maybe it's time to revive the project with the next generation of the microcontroller.
comment 1y ago · link · parent
1. If they don't have any hats, then any sentence about them would be truth.
2. The negation of the sentence, which must be truth, is "not all my hats are green". For this to be true, there must be some hats that are not green, so there must be some hats in general.
comment 2y ago · link · parent
Also, there's interesting implementation for the ZX-81, created over 20 years later and fitting in just 1024 bytes: https://users.ox.ac.uk/~uzdm0006/scans/1kchess/
comment 2y ago · link · parent
comment 2y ago · link · parent
Then if we figure out that both p and q are even, it means that p/q can be simplified (by dividing p and q by 2), which contradicts the assumption about the simplest form - and we don't need to use the infinite descent.
comment 2y ago · link · parent
It's a DSL for writing 6502 assembly.
comment 2y ago · link · parent
Now there's a much better and cheaper option: BlueSCSI [2]. It's a SCSI HDD emulator that allows to mount .img files stored on a SD card as HDD disks. It also supports CD and network card emulation.
Once the files are copied on a such a virtual drive, they can be extracted on a modern machine using via some kind of HFS explorer or an emulator.
comment 2y ago · link · parent
comment 2y ago · link · parent
fun double(x: Int) = x * 2
https://kotlinlang.org/docs/functions.html#single-expression...However, in Kotlin there's no single-line constraint, so it's possible to define an expression function e.g. with a long chain of collection methods: `filter().map().findFirst()...`
comment 3y ago · link · parent
By using our Celsius to Fahrenheit conversion tool, you know that one Celsius is equivalent to 33.8
1000 C = 1000 x 33.8 = 1832 F
Probably the explanation engine doesn't support the offset in the underlying linear formula.comment 3y ago · link · parent
SBC:
result = byte1 - byte2 - carry
carry = result < 0
return result & 0xff
ADC:
result = byte1 + byte2 + carry
carry = result > 0xff
return result & 0xff
Source - my implementation, passes tests. Look for SBC & ADC in
https://github.com/trekawek/coffee-gb/blob/master/src/main/j...comment 3y ago · link · parent
For more details and screenshots see this great blog post: https://evoniuk.github.io/posts/pitfall.html
comment 3y ago · link · parent
comment 3y ago · link · parent
Open-source, crowd-sourced air quality page. I’m running it for 3 years now. Owners of private air quality detectors can use it to built micro-communities in their neighbourhoods. Eg. organization registered at https://mosina.aqi.eco installed dozens of sensors in their home town and is advocating for improving the air quality there.
Around 13k unique users and 40k sessions per month. Cost is about $35 for VMs and storage on DigitalOcean.