4

Consider,

```
namespace A;

macro m00 a,b;
··display a,b;
end macro;

macro m01 a;
··m00 a,$0A;
end macro;

m01 $24;
end namespace;
```
OUT: $0A24 ("$\n").

Ah, but you just HAD to fuck me in the ass, didncha fasm2? Initializing anal bleeding:

```
namespace B;
A.m01 $24;
end namespace;
```
OUT: illegal instruction 'm00'.

Explanation: macros carry no context, and so 'm00' is unreachable from 'B' namespace.

Could I maybe write a code-capture macro to generate a wrapper that resets the namespace? Yes, and in fact, I did; brilliant exercise in mystical mindfuckery.

But why try so hard? Just pass the fucking ref, like a MAN.
EXPLICIT CTX, BITCH.

```
define @CAS $non; current addressing space
define %ICE @CAS;

macro self:PA&; recursive macro, uuuh spooky-spooky
··match ice , %ICE;

····; self->proc(args)
····match =-=> proc (args) , PA;
······path.proc ice,args; pass ref and args

····; ^self->proc()
····else match =-=> proc () , PA;
······path.proc ice; pass ref only

····; ^sneaky sneaky. set current context when self ctx;
····else match cas , @CAS;
······%ICE equ cas.PA;

····end match;

··end match;
end macro;
```

ALL TOGETHER NOW
```
namespace A;

macro m00 ice,a,b;
··display a,b;
end macro;

macro m01 ice,a;
··self->m00(a,$0A); could also be 'ice.m00 ice,a,$0A' lmao
end macro;

end namespace;

namespace B;

self A; set ice
self->m01($24);
restore %ICE; back to previous

end namespace;
```

OUT: $0A24 ("$\n").

A-há, now **I** got you from behind motherfucker!

Final note: this is 100% perl DNA seeping through the cracks of my sanity and into a fresh fasm2 framework. Why? Dingle-dongle-jungle-berries, that's why. Also crack.

Have a nice wallop.

Comments
  • 2
    whoops, 'path' is supposed to be 'ice'. That's the power of crack.
  • 1
    @Liebranca I made my first Rust app yesterday 😕 It works very good 😕 It didn't contain any bug 😕 It wasn't much source 😕 One single sharable binary 😕

    But based on what I've seen like if Some ().. C'mon what's next, no cap fr fr are probably functions too. Fr fr
  • 1
    @retoor It's pattern matching. `if let Some(foo) = maybe_foo {}` matches maybe_foo against Some(foo). E.g. if it's the Some variant it binds the contents to foo
  • 1
    @12bitfloat normal devs call that truthy. Any more of such 'new inventions'? But thanks for the help on that yesterday.
  • 1
    @retoor It's not truthy because you're extracing values

    You can also match against `Some(Some(foo))` or

    `MyCoolEnum::VariantA(...)` or even `MyStruct { a: 20, .. }`. The latter only matches when the field is 20
  • 1
    @12bitfloat let a = someval ? somval : null ?
  • 1
    @retoor That only works for null (and empty strings I guess)

    Here's a cool way to do fizzbuzz using pattern matching

    https://play.rust-lang.org//...

    Can't do that without pattern matching :P
  • 1
    @12bitfloat no, why would you :p But did you make that for me? 😍 Aww. I'm really annoyed by not the "%s" in that code tho.
  • 1
    @retoor What am I looking at 💀 Most readable C code lol

    How does that even work? I thought the format string has to be a literal? 🤔
  • 1
    @retoor I did make it for you :P
  • 1
    @12bitfloat huh indeed, is that thihg now calling always with the int patam while not having it defined in the first argument? Wtf indeed. But idea is solid.
  • 1
    @retoor Huh, it actually works https://godbolt.org/

    You learn something new every day :D

    Unused params in vararg functions should be fine I think
  • 1
    @retoor Last I tried rustc it didn't likit when I `};`'d all over her face and tits, which ruined the mood for me.

    Anyway, it's C++ but worse. Perhaps there's an octopusdog inside all of us.
  • 2
    @Liebranca I decided to do a small project to do with it. I made project generation AI software. I'm creating that for the rust project. Can't stand the syntax. I'm worried that it's something like react. Something you learn so much weird shit for that you end up with a stockholm syndrome. Do programmers realize that the syntax is to benefit user, not the machine? This is why I consider python one of the best languages ever made and Rudy maybe one of the worst. A new language that is hard... Not very attractive. Compiling it ain't a joke either.
  • 0
    @retoor rust, specifically, suffers from it's syntax primarily.

    I say 'specifically' because any compiler that gives you a high number of features/guarantees is inevitably going to result in the language itself requiring the programmer learn many more concepts to utilize it effectively, to say nothing of the striking increases in compilation time.

    But this is true for *many* languages other than C++ and rust, it's a problem inherent to high-level programming in and of itself, in that you're stacking complexity, which leads to the 'befuddling' quality of code -- ie, there's too much shit to keep in your head to fully understand how anything at all works without mind-altering, preferably injectable drugs.

    rust syntax, had it learned lessons from the innumerable syntactical idiocies of C++, would be a lot better off. However, the language leans on and propagates said intellectual failures of humanity, resulting in its decisive failure to fulfil the promise of replacing C and C++.
  • 0
    @Liebranca tf are you talking about. Rust did learn from c++, thats why it doesnt look outdated with 5 different ways of doing the same thing
Add Comment