<oprypin>
mattrberry, not crimgui but crystal-imgui 😬
<oprypin>
the other one didn't get as far along as mine
<oprypin>
mattrberry, it works with anything ofc but i have looked only into sfml. perhaps simply binding this lib would just make it work? https://github.com/Tyyppi77/imgui_sdl
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
oprypin has quit [Remote host closed the connection]
oprypin has joined #crystal-lang
sgt_chuckles has quit [Ping timeout: 272 seconds]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 260 seconds]
deimos_ has quit [Quit: leaving]
deimos_ has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #crystal-lang
jhass has quit [Remote host closed the connection]
jhass has joined #crystal-lang
<FromGitter>
<mattrberry> Ah nifty, well I'll look into it sometime! I'd be curious about adding a debugger to CryBoy
<FromGitter>
<mattrberry> If that works, I'll probably also use it for the gba emulator I'm working on now :)
<FromGitter>
<mattrberry> Hey all, I've just pushed my first really experiment with macros to github. I call it bitfield (https://github.com/mattrberry/bitfield), and it's essentially a macro for defining fixed-length bitfields in crystal. I'd love for some feedback, since I'm sure there's still a *lot* for me to learn about macros. One thing I'm currently missing that I'd love to add support for would be custom getters/setters on
<FromGitter>
... the inheriting classes, but I don't think that's currently possible in my implementation given the fact that I define the methods on the inheriting class in the `finished` macro. Otherwise, I'm debating moving from classes to structs, but I want to run some performance tests first, so I'm leaving it as is for now
<FromGitter>
<mattrberry> I also still need to add a version file
zorp has joined #crystal-lang
postmodern has quit [Quit: Leaving]
alexherbo2 has joined #crystal-lang
Vexatos has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter>
<riffraff169> shards.yml still has your-name-here as author....
<FromGitter>
<riffraff169> interesting, i havent needed to use macros yet (still a new crystal coder)....your module is all macros...
<FromGitter>
<Blacksmoke16> they have their uses
<FromGitter>
<mattrberry> Ty 👍
sagax has quit [Remote host closed the connection]
<oprypin>
@mattrberry: are you happily using sdl at the moment? which shard?
<oprypin>
i will probably want to figure something out for sdl anyway. make sure to poke me for any question; the questions will be useful for me too, to see what's missing
<FromGitter>
<mattrberry> I'm using yabaddaden's sdl shard. It's missing a lot, but I've added some more bindings just in my own repo. I've debated someday trying to parse the sdl library to generate bindings
<oprypin>
well i wouldn't do it any other way 😊 sfml and imgui are generated
<oprypin>
sdl is probably a lot more of a challenge
<FromGitter>
<mattrberry> Iirc people generate the bindings dor other languages, so I may be able to take some inspiration from those
<FromGitter>
<mattrberry> I haven't really looked into it yet though because I've managed to get just enough to work for my needs
<FromGitter>
<Blacksmoke16> looks like a good place for a comment :S
<oprypin>
😂
<riffraff169>
so if you call f on the class it calls the macro, but on an instance it is a method...weird
<FromGitter>
<Blacksmoke16> its not an instance, its a var that is assigned `A.class`
<FromGitter>
<asterite> The thing is, macros can only be called on class types, and they must be known at compile-time
<FromGitter>
<asterite> in theory that variable is know to be a class type at compile-time, but the compiler doesn't care: it will only invoke a macro if it's an explicit type, like Foo or Bar, never a variable
<FromGitter>
<asterite> (or any other expression, that's why with parens it also calls the method)
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
<deimos_>
unexpected side effect from coding in crystal, my ruby code is getting much better because i handle the Nil case by default, rather than waiting for runtime errors
woodruffw has quit [Ping timeout: 272 seconds]
woodruffw has joined #crystal-lang
woodruffw has quit [Ping timeout: 272 seconds]
<FromGitter>
<mattrberry> I've recently started to write some Ruby at work, prior to which I've never used Ruby. It was pretty easy to pick up thanks to Crystal :)