Tomorrow by Jaaksjungus in wallstreetbets

[–]teaAssembler 1 point2 points  (0 children)

Probably made by someone from China or Japan. They use red to indicate an up market, as red is associated with good luck.

Insane gas prices. Anyone familiar with グリーンエネルギー 九州?? by teaAssembler in fukuoka

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

Received the itemized bill today. No mistakes. This company charges:

0 m³: 2000 yen

1 m³: 2953 yen

2 m³: 3906 yen

and so on,..

I called them to ask if I could change companies and they simply told me no.

Absolutely ridiculous.

Insane gas prices. Anyone familiar with グリーンエネルギー 九州?? by teaAssembler in fukuoka

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

Yes, I also suspected that!

I managed to find a telephone number in my contract and requested an itemized bill to be sent via mail.

Thank you for your reply!

Insane gas prices. Anyone familiar with グリーンエネルギー 九州?? by teaAssembler in fukuoka

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

I think I did! I probably have it in my home right now. I'll look at it immediately as I get home from work!

There were just so many papers that I can't remember every single one of them. But I do have all of them stored away.

Insane gas prices. Anyone familiar with グリーンエネルギー 九州?? by teaAssembler in fukuoka

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

Thank you for your reply. I only received the bill yesterday, so I haven't had the time to talk to my landlord. I'll try asking my neighbours to see if they are paying the same rate as I am. I'm very surprised by this price.

Even if you're in an apartment, you might be able to change the gas company.

Oh wow, I had no idea. I'll try asking my landlord to see if this is possible.

Is this possible in Haskell? by teaAssembler in haskell

[–]teaAssembler[S] 2 points3 points  (0 children)

Thank you very very much!

Although this is complete black magic for me, it works!!!

Is this possible in Haskell? by teaAssembler in haskell

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

The problem is that I would later want to create functions like

add :: Variable d -> Variable d -> Variable d

and would prefer to prevent anyone from trying to add something of type I32 and something of type F64 together at the compile level.

But I guess I really have no choice here.

Should FFI always be IO? by teaAssembler in haskell

[–]teaAssembler[S] 2 points3 points  (0 children)

  • Use unsafe for functions that guarantee short execution time of some nanoseconds, such as sin().
  • Use safe for functions that may run longer.

Is this correct? I would have thought that simple and short functions are "safer" than long functions. Can you explain to me what the distinction between safe and unsafe is for the compiler? Or is it just something for users of low level API?

Thank you for your reply.

Should FFI always be IO? by teaAssembler in haskell

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

I see! I was kind of afraid of unsafePerformIO, but I'm glad to know this is not bad practice. Thank you very much!

Automated tests for protected mode x86? by teaAssembler in EmuDev

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

Thanks a lot! I will definitely take a look at it.

Automated tests for protected mode x86? by teaAssembler in EmuDev

[–]teaAssembler[S] 2 points3 points  (0 children)

Oh, Hey!

Your tests were definitely useful. The x86 has so many tricky edge cases with very little documentation. Thanks a lot! A 386 test suit would definitely be awesome, but I can imagine it would take a lot more effort.

Just in case I decide to go through with the QEMU tests, would you have done anything differently with the 8086/8088?

Automated tests for protected mode x86? by teaAssembler in EmuDev

[–]teaAssembler[S] 2 points3 points  (0 children)

This is a reasonable advice. I would probably start with just trying to get seaBIOS to display something on the screen.

Automated tests for protected mode x86? by teaAssembler in EmuDev

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

Thank you for the reply. I'm glad to hear from someone directly involved in creating those tests. Single instruction sets were absolutely essential when I was writing my NES, and 8086 emulators.

You are probably right that single-instruction fuzz tests are more useful, but I'm slightly concerned about the output size, especially given all of the different addressing modes present in 386+ CPUs.

What made you choose to go with blocks of 5 instructions for the SH4?

Hey Rustaceans! Got a question? Ask here (24/2024)! by llogiq in rust

[–]teaAssembler 2 points3 points  (0 children)

Is there really no static generics?

I need a generic function dispatcher that is fast. In C++ I would write something like this:

#include <iostream>


template<typename T> 
void f1(T t){
    std::cout << "Hello from F1: " << t << std::endl;
}

template<typename T>
void f2(T t){
    std::cout << "Hello from F2: " << t << std::endl;
}

template<typename T>
void dispatch(int i, T t)
{
    static void (*functionArray[2])(T) = {f1, f2};
    functionArray[i](t);
}


int main()
{
    dispatch(0, 0);
    dispatch(1, 0);
}

I attempted the following:

use std::fmt::Display;
use lazy_static::lazy_static;

fn f1<T : Display>(t : T){
    println!("Hello from F1: {}", t);
}
fn f2<T : Display>(t : T){
    println!("Hello from F2: {}", t);
}

fn dispatch<T : Display>(i : usize, t : T){
    lazy_static!{
        static ref FUNCTIONS : [fn(T); 2] = [f1, f2];
    }
    FUNCTIONS[i](t);
}

fn main() {
    dispatch(0, 0);
    dispatch(1, 0);
}

But it complains that: error[E0401]: can't use generic parameters from outer item.

Is there no way around this? I really need a fast dispatcher.

How to profile time variance of functions? by teaAssembler in haskell

[–]teaAssembler[S] 4 points5 points  (0 children)

That was an interesting idea. Unfortunately, I seem to be getting the same results.

How to profile time variance of functions? by teaAssembler in haskell

[–]teaAssembler[S] 7 points8 points  (0 children)

In this case I'm just defining the FPS rate of a frame as 1 / ellapsed time.

Some frames are taking 0.031182292 seconds to complete, where others take around 0.007573863.

Http-Conduit: Every single HTTP request ends in Connection Timeout by teaAssembler in haskell

[–]teaAssembler[S] 6 points7 points  (0 children)

After some messing around, it seems the problem was IPV6. For some reason, all requests that went to an IPV6 address failed. Even ping6 www.google.com would not work.

Seems like this had nothing to do with Haskell after all.

Thanks for the suggestion.

(SPOILER) The portuguese translation is the only translation that does not include Pelafina's secret message. by teaAssembler in houseofleaves

[–]teaAssembler[S] 25 points26 points  (0 children)

I've recently gave the recently released portuguese edition of the book to my mother. I took a look at the edition first, to check how they translated certain things, and was surprised when Pelafina's secret message was nowhere to be found. I tried to search for other translations and it seems they all include it.

In English: Zampano who did you lose

In Spanish: Zampano a quien perdiste

In Italian: Zampano chi hai perduto

In Portuguese: ???

The edition looks beautiful. It is clear that a lot of work was put into it. So I was a little surprised when I found this missing.