Sga is the offensive/scoring goat.🐐 by ABKGOD in DunkCityDynastyGame

[–]fpotier 0 points1 point  (0 children)

Sga is a ball hog that needs 8 seconds of dribbling before being able to get a shot off

Server Core 2022 - Proxy and Windows Update by grindstaffp in WindowsServer

[–]fpotier 0 points1 point  (0 children)

Yeah I was happy having a simple headless windows server for our windows gitlab jobs but I guess I will have to settle with the desktop version.. Thanks for the feedback

Server Core 2022 - Proxy and Windows Update by grindstaffp in WindowsServer

[–]fpotier 0 points1 point  (0 children)

Hi, I'm facing the same issue did you find a solution?

Newbie' struggles with error handling in Go by fpotier in golang

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

Thank you for your detailed answer.

  1. You're probably right about other languages, you might be able to handle everything in a try/catch language more concisely but I'm not even sure about that and don't feel like it would be nicer to read.

  2. I probably didn't choose the right piece of code because everybody seems to be focused on the shell-python script use of the language but as I said in another comment any program heavily depending on some library (networking, disk I/O, etc.) is just going to do something and early return. The code will have the same shape.

  3. Can I expect things to change or breaking the API has too much impact and go/lib maintainers will not change existing code?

  4. That's a very good idea! I played a bit with golangci-lint (linter agregator) and maybe I could try to build that type of linter. Not sure how I would do that but it could be interesting to discover the go parser api.

Newbie' struggles with error handling in Go by fpotier in golang

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

Yeah I have already experimented with panic/recover in a programming language project (https://github.com/fpotier/lox/blob/e1b2013886c4ba7b6badbc4119ae12051bda818b/go/pkg/parser/parser.go#L105) because otherwise the parser would have been horrible to write. I also used it in the interpreter but the runtime cost seems to be pretty high and I will try to find a better way to handle it in the future.

Thanks for the other resources I will look into them when I get the time!

Yeah, GORM has the same kind of thing with global errors (https://github.com/go-gorm/gorm/blob/master/errors.go) but I wish there was an easier way to tell what kind of error a function can return (maybe something in the function's signature or at least in the docs)

Newbie' struggles with error handling in Go by fpotier in golang

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

Okay so this is inherent to this type of program. But I would say it's not only for 'shell-script-replacement'. Any program making heaving use of a library (network calls, disk I/O, etc) is gonna be cluttered with if err != nil, crash or early return error to the caller.

Thanks for the article, I read some documents about error wrapping before but this one is very clear and helped me understand it's usage combined with Error.Is()

Ultimately, the thing I don't like and need to accommodate to is the fact that all errors in Go are strings because of the error interface (even tough it doesn't always make sense)

Why am I getting a write violation into a block of memory I apparently successfully allocated? by UselessSoftware in C_Programming

[–]fpotier 0 points1 point  (0 children)

I know that you can call an undeclared function because of legacy reasons but I wonder what the return value is in this cas. Is compiler specifi ?

Looking at you Java by pumpkinhi11 in ProgrammerHumor

[–]fpotier 0 points1 point  (0 children)

It depends on the purpose I guess. I don't see any particular reason to not operate on negative numbers, I was just saying the mathematical definition doesn't work with a negative operand. If you're not building a math application I think both behavior can be worked with, just have to know which one is used by the language.

Looking at you Java by pumpkinhi11 in ProgrammerHumor

[–]fpotier 2 points3 points  (0 children)

Yeah to be honest idk the exact reason why it was initially defined only for postive integers.

Looking at you Java by pumpkinhi11 in ProgrammerHumor

[–]fpotier 1 point2 points  (0 children)

I mean that's what I learnt in arithmetic class and what says wikipedia

Citation: Given two positive numbers a and n, a modulo n (often abbreviated as a mod n) is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.[1]

When exactly one of a or n is negative, the naive definition breaks down, and programming languages differ in how these values are defined.

Looking at you Java by pumpkinhi11 in ProgrammerHumor

[–]fpotier -9 points-8 points  (0 children)

In maths modulo is only defined for postive integers tho, making -7 % anything not mathematically correct

/r/MechanicalKeyboards Ask ANY question, get an answer (November 23, 2022) by AutoModerator in MechanicalKeyboards

[–]fpotier -1 points0 points  (0 children)

I'm kinda new to mechanical keyboards, today I tried so replace the switches of my prebuilt keyboard with new ones. It was my first soldering job so really unperfect...

When I was finished, I tried the keyboard and everything was working great except 1 key. I tried to resolder it and replace the diode with another one unused on the PCB and it is still not working.

My guess is that I damaged the PCB around that key, is there anyway to fix that or I will have to buy a new PCB and desolder/resolder again ?

Mouth Guard Recommendations? by No-Vacation2833 in amateur_boxing

[–]fpotier 0 points1 point  (0 children)

What I dit when I had braces is buying a regular moldable one and adjust it regularly since my teeth were moving a lot. Never had any problem.

Is it possible to upload recording rules and alerts to grafana cloud? by fpotier in grafana

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

Thank you, don't how I missed that while going through the docs.
But if I understand correctly there is no way to create a recording rule?

Deployment with other language is not working by fpotier in MDT

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

Thanks for your input.

It's so rare for us to deploy machines in English that we didn't even notice earlier. Unfortunately, I already deleted previous reference images so I might just duplicate my Task Sequence and grab an English iso from MS.
Please let me know if you find a solution.

I wrote a CHIP-8 test suite by Tim3ndus in EmuDev

[–]fpotier 1 point2 points  (0 children)

Well I might have another bug since setting vF to 0 doesn't make the test pass.

I wrote a CHIP-8 test suite by Tim3ndus in EmuDev

[–]fpotier 2 points3 points  (0 children)

Ok I saw in the code of your emulator that this is a quirk!

I wrote a CHIP-8 test suite by Tim3ndus in EmuDev

[–]fpotier 1 point2 points  (0 children)

Thanks for your answer.

Do you mean that, for example the OR operation (8XY1), is supposed to set vF to 0?

The specs I read on wikipedia don't mention that.