#development
1 messages · Page 69 of 1
B is block, R is redstone, T is torch
oh okay ^^
the bottom can also act as a reset too
Yeah. You can stack them next to each other with 1 block of air in between
okay so technically
2widex4longx4tall
cool, my design is 2widex6longx2tall
horizantal stack with air gap, vertical stack with no gap but the one created naturally by the construction of the bit
they both take up the same space essentially
how many redstone inputs does yours need, mine only needs 1
Well at minimum, a memory cell should have 2 inputs: S and R to represent an SR Latch
S for set, R for Reset
switch<observer<piston/redstone-block<redstone-powder, each switch flick is a half tick meaning that the piston will extend, leaving the redstone block there to power the signal (1), and if you flick the switch back it will grab the redstone block back disconnecting the constant power and turning the bit to a 0
So it's just a complcated switch ;P
essentially ;p, but thats also what a latch is
A latch holds its value though, even if the input turns off
but thats not the point, the point is to store a bit's value, i flick the switch, turns into a 1, i flick the switch again, turns to a 0, this means that other components like half or full adders can access that signal without flicking a switch, the only difference between your design and mine is that yours uses a button to change the value, and mine uses a switch. which in my opinion is easier to conceptualize.
I'm confused lol. If you take the switch away, does it hold its value?
no, but why would i need to take the switch away?
Because that's what you need for a memory cell
Something that can hold its value, even if the driver of said value goes away
but why would the driver go away? there's no point. if your using a button to alter the bit, your design is superior, if your using a switch to alter the bit, mine is.
oh wait
LOL
the design still works if you take the switch away
lol
because the redstone block will stay in place :p
although if you want to use a button with the design it will cause 4 ticks of delay instead of 1, which is why im using a switch, it just works for the use
The point is in the future, you won't be using buttons
or switches
The CPU will be able to set/clear the memory on its own
Man this is making me want to download minecraft again lmao
yeah i know, but for now this is most convenient, i still know how a bit works, just using my mc knowledge to convenience me right now
yeye
@nocturne galleon You should look into SR latches, SR flip flops, and D flip flops. Once you get into registers, DFF's will be at the core of each register
(a DFF is just an SR-FF where S = D and R = /D)
anyone got a link for a good guide for wordpress dev?
Are you wanting to build a website or develope for wordpress. There are better ways to make static websites that will out perform wordpress.
i'm looking to build a website, but nothing too crazy. i'm looking for a project to get a better idea of how it works
I use hugo to generate a static website. It is pretty easy to make a basic website. Choose a template write pages "compile" the website then upload it.
what is the benefit of that vs set/reset NOR?
@proper gale They're just learning and experimenting with new things
well, that there is basically the gold standard for redstone registers
and has been for a loooong time
is than an SR latch or FF
SR
right. latch or flip flop. ie, is it clock-edge activated or not
top line is reset, bottom lines are set, and the lamps are seperated output
Let me download minecraft rq and build my old design for SR latches
I had one that was 1x3x4
set latency there is 2 tick, could be reduced to zero with an input line that sends direct to output and some repeaters, but that would add additional reset latency and really that latency isn't your bottleneck
the actual latch here is 1x2x3, rest is input/output wiring
right right got it
I used mine a ton in survival because iirc it doesn't need any repeaters
i like this design because its super stackable, doesnt need a gab, though IO from it is a PITA and slow
im looking mostly for speed, my goal by the end of next month is to be able to make a 16tick 32bit 8bit instruction length cpu with up to 1kb of programmable memory
it needs to be able to fetch, decode, read, write, and do complex calculations such as calculation a large amount of pi (the greatest cpu benchmark in my opinion) and calculating root numbers.
32 bits is a LOT
All you need to calculate pi is just division and addition
The real test of a CPU is its ability to run true programs, such as programs with branching
hmm, okay.
i heard that a good way to test a computer's capabilities is to see how many digits of pi it can calculate in 60 seconds
This was the design I've always used
You're very limited on clock speeds, CPI, and minecraft speeds itself
Minecraft computers can't tick very fast
yeah
but a 16tick should be good enough to pull off that kind of stuff... hold on
QCPU - A fast, reliable, pipelined CPU made in Minecraft.
The CPU functions on an 8 tick clock, but stalls whenever the storage or data memory is accessed. Jumps are not predicted, the decoders just disable when jumping to a location in the iCache. Immediates are handled through second bytes, as the instruction length is 8 bits & data is too
-...
this is my resource of determination right now :>
I'm trying to figure out how the heck i wired the resets together lol
?-?
If you are just getting into digital logic, your first steps should be understanding the basics of computer architecture and understanding RTL logic
(once you get logic gates down)
okay
im watching a 41 part series by crash course to learn about computers
40*
To have a true CPU, this is basically the architecture you'll end up with. Some of the specifics don't matter (like the sign extension part for branching, the 32-bit instruction, or the 3 register operands, etc), but all the major parts are there in one of the simplest ways you can represetn them
@nocturne galleon If you want to immediately apply it to minecraft redstone, watch Ben Eater's playlist on how to make an 8-bit breadboard computer. It will be much more helpful than the crash course videos
hmm...
but i learned how to make the adders from crash course, and what a 8bit adder is
within 10 minutes
I gotta close minecraft out lol, this is way too laggy for my laptop (i'm nto at my home rn)
they're both pretty long lol
but ben eater starts from a natural order in which you'd build a computer
ill do it if it helps, ill watch both u-u
crash course's videos are meant more for thoeretical understanding for CS students taking exams
just to cement my understanding
ben eater shows the implementation of everything
yeah, like how wires with higher frequency currents and more powerful currents have more interference due to the magnetism around them that they form
If you want basic CPU stuff, you can forego the memory and the branching, or even the isntruction memory
No that's the electrical engineering perspective
Ben eater doesn't deal with any of that
just the organization and architecture of the CPU and how you connect things together, and ESPECIALLY how you control things
he goes in great detail with pencil and paper too
thats what he stated IN his video ;-;
reeeee
he connects everything on his breadboard
which is the pinnacle of electrical interference 
he's probably just explaining why you can't clock things high for example
he was explaining reasons why to make a computer project on a breadboard, and things that you have to look out for
Yeah ofc, those parts aren't that relevant to you
the actual videos themselves have the juicy details
You can definitely get away with manually inputting instructions and only having a register file for now
That should basically be step #1 (and i believe some of the first things he does in his videos)
just ALU and register file and being able to load registers manually with input from you or output from the ALU
im making a calculator essentially rn :>
once you have register file set up, you can probably get away with not having memory for quite a while, if your register file is big enough
but after register file you'll want instruction memory
(which in modern computers, instruction memory = data memory, but in minecraft it's probably best to do instruction memory separately)
oh absolutely
twas just a joke
lol
that would be 3200 bites, i would have to make 3200 bytes of memory O_O
wait no
32000*
dead
this is what world edit is for
i got it already
you make a modular memory cell, use that to make a modular memory row, then use that to make a modular memory bank
and repeatedly copy the banks
okay, im done for now, ill look back on this when ready
hey I got a question about graphics. C# Why when I do this and move my Graphics with a timer it still flickers?
DoubleBuffered = true;
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
isn't this supposed to eliminate flicker?
@dim lava you win, i realize the fault in my design xD, when the switch is removed the value turns back to zero, because the observer see's a block update ;-;
ill go back to my old design which prioritized speed and was less compact, but speed is important :>
i don't know if BUDs work in large designs cause of chunk loading restrictions
buds?
Block update detector
huh, maybe not
You had some behavior there that you said detected the block update
another reason i guess
yeah, for the old memory design that requires a driver to be powered
You should look at the minecraft wiki for sr latches and d flip flops
You can use the designs on there
Mc wiki is soooo helpful for this stuff
The challenge in making a redstone computer isn't the basic components like latches and full adders. Those take just a lot of trial and error to make as small as possible. The real challenge is, how do you connect everything together so that it becomes a fully functioning cpu?
Is that a pulse generator?
yeah, but right now im focusing on optimization... and that is a storage cell, courtesy of mumbo jumbo, a mc youtuber that dabbles with redstone
I remember him lol
A lot more than dabbles
He does a lot of piston doors and moving contraptions
Decide to explore this very old school and well known component only to find it's way more powerful than I expected!
It's a latch. It's a memory cell. It's flip-flop. It's a selector. It's a counter. It's a shift register. It's ridiculously simple and it's every component in your machine!
-------------------------------------------------------...
i found a pretty useful video
essentially a super compact adder
and shifter/selector if you add the extra bits that he shows
So I'm trying to make an Android app with fairly basic functions. Most of them I'm not quite sure how to word search terms to find how to do them, and one I've tried many different methods and none have worked. I'm using C# with Xamarin Forms in Visual Studio 2019. I should note that I am not a programmer. I just want a function that looks like it doesn't exist, and I very much can't afford to pay someone else to do it.
The one I tried: I want dark mode. Every method of doing it that I've found has either not worked and thrown errors, or isn't clear enough for me to do.
The rest (not sure how to search for them): I want to be able to made a new document, save/save as, and open documents.
The goal of the app is to let me write music while away from my PC without needing paper and pencil, specifically guitar tab.
are you trying to write your own notation software with no programming experience @nocturne galleon ?
Not quite. Guitar tab is a graph of how many strings you have and you put an actual number for the fret you play on that string
Looks like this
so tab notation?
Yeah
Yeah, I can worry about that part later. Before I get in the weeds I'm trying to get the basic look and function down
if you haven't actually started and want to get into app development
I would recommend react native > c#
learning js, a little regular react, and then react native
it allows you to have an iOS and android app on essentially the same codebase
I have extremely limited experience with C# from several years ago when I tried to get into programming. The main draw is Visual Studio's visual element since doing more than console stuff on non visual environments is sorcery to me
regardless, I still highly recommend react native
react native runs on android, android tv, ios, macos, tvos, web, and windows
(windows includes xbox, mr, all that fun stuff)
Do I have to install more than I already have with the normal Windows and Android packages? It was a feat to get the Android stuff to install correctly
you should learn js before react native just as you should learn c# before xamarin
Cool, I'll just uninstall VS
I think the website is https://reactnative.dev/
yep
learn js then dive into this
I'll pass
you're not gonna be writing an app unless you understand a programming language first...
and honestly, js is a far more simpler language than c#
Either way, it doesn't help that Xamarin forms don't seem to have much flexibility with the form editor.
wait, I had no idea xamarin was cross platform 🤦♂️
that's pretty cool
I will still fall to lord zuckerberg and react though
I'm just not going to install yet another IDE that will struggle to install
you need to learn a programming language
and learn an app framework that uses that language
And I do have some experience with C#. I'm not going to just start over
I think you'll find JS to be far simpler than C#
I'm not using JS.
Considering literally everything I've tried to install for programming has had a hell of a time even downloading correctly, I'm not. The program I have works and I'm able to use USB debugging for my phone since the emulators will not work regardless of what I do to them. It's nice if it works for you. I'm not about to deal with even more frustration
Besides, once this app is done I'm not writing a single line of code again
@nocturne galleon I'm sorry but it's just unfeasible to program an app with no experience and no desire to learn
The only thing I said I don't want to learn is JS
Me posting here is because my searches came back with either no useful information or solutions that don't work
ok even with C#, you can't just jump straight into Xamarin and drag and drop visual components and expect a functioning app
Yeah, I'm aware of that
With VS, Xamarin is how you do Android apps in C#. C++ can be done without Xamarin (I think, based on how the VS page for it is worded), but that's the same situation as JS. I'm not going to restart learning
Java is the native language for Android apps
Swift/Objective-C are the native languages for iOS apps
Xamarin is a cross platform framework that uses C#
And the only thing I've heard about Java is don't
@ornate crown there are various libraries to do this
Phonegap is another one
Cordova is really popular too
Ionic is also quite common
@nocturne galleon best environment to develop android apps on is still Kotlin
Its a java dialect with some glue code to build android apps more easily
if you've already done some .NET, using java should be quite straightforward
building cross-platform apps almost always is done with HTML, CSS and javascript
I am not looking for the best environment to do it in. The details I have in my original post won't change.
Yeah but writing .NET for android is not really efficient
there's a lot of magic behind the scenes to make it work on android
This program is barely going to have any function to it. Being efficient literally won't matter
and often, you'll be spending more time getting it to work on Xamarin, than it would be if you just wrote a normal android activity
@nocturne galleon efficient as in: time spent writing code
Xamarin is quite awful if you just want a simple android activity that displays some information
It's already incredibly frustrating trying to learn. It's even more so when people repeatedly tell you to use something else
Yeah, but you're trying to get debugging going on .NET with android
that on its own, is already a hellhole, I would never put myself in
if you download android studio
you have a working app within 5 mins
elaborate "doesnt work"
Necessary to function packages won't install
you can do that with the NDK
Android development kit
package manager should be in android studio
there, you can select the android version you are building for
NDK was one that refused to install
going to replicate this real quick :)
@nocturne galleon did it get stuck here? https://i.imgur.com/dvqdU2x.png
After that
It was several parts downloaded in the setup and another thing once you open the IDE
NDK is usually supplied seperately
android studio bundles it
its unpacking right now... lets see if it errors out
[SC] StartService FAILED with error 4294967201.
Android Emulator Hypervisor Driver for AMD Processors installation failed. To install Android Emulator Hypervisor Driver for AMD Processors follow the instructions found at: https://github.com/google/android-emulator-hypervisor-driver-for-amd-processors
I guess that is expected, since I have virtualization disabled on my system, but I'll just ignore this for now
The ones I remember were:
NDK, Gradle (I think that's how you spell it), Some packages about system architectures, and literally every emulator
I created a new project
Gradle is the build tool
comparable to Nuget on .NET
though gradle can do a lot more
This is all well and good, but doesn't help me a bit
Any errors you get, if you post them here
I'm sure I can figure it out
From what i can see, I can debug just fine
it created a project, and compiles
I'm not using Android Studio, Java, JavaScript, or Kotlin. I just want to use what I know works
Kotlin is the official one, the one you'll find most support for online
using .NET for android is a cheese
you make it more difficult than it has to be
that's subjective
kotlin may be more performant than react native
@ornate crown its not about code performance
but all in all, I think cross-platform libraries are better
therefore react native makes the most sense?
and its not fun, when you get into rendering issues and such
React is like all the other HTML5 apps
those are all the same to me
works, best way to make cross platform work
if you need native performance, its more tricky
@nocturne galleon you reject any suggestion to learn something else
Because I'd have to use an IDE that doesn't install correctly
then you are doing something wrong, don't blame it on the IDE
And I already have a very basic understanding of C#
Yeah but C# isnt going to help you build android apps easily
its the wrong tool for the job
I download and hit install. The IDE does the rest and fails at it
I just told you it wouldn't download needed packages
yes... but why?
The error message was a slightly more verbose "Failed to download". No specific error codes
I suggest you run it again, and post a screenshot ^^
I suggest people stop trying to get me to use something I have said repeatedly I will not use. I have a set up that does compile and does put a functioning apk on my phone. I'm not messing with any additional software
fine
whatever
then dont post here complaining, and then rejecting any suggestion
also; if you ever want to learn something: be open to the new.
I was very specific in what I needed help with, and the response I got was to not use the one setup that works for me
No real help was provided
I was ignored
No you weren't
and the response was justified
but I dont want to argue
you clearly have it all working
And I'm sorry I'm being short with you, Crystal. I've been arguing with Beaker about it for a while now
Its cool
Its cool
No
XD
hey can I use the mousecoords in C# as a public variable? I need them but I can use them only in the mouseclick event now with the MouseEventArgs
Can you send the code?
alright so what you exactly need?
So this draws a Graphic when I click on the mouse(and the tmUpdate starts the timer control from WinForms and moves the Graphic around). However it creates its own graphic separate from the one that is made with a mouseclick. I want it to use the Graphic that I make using the mouseclick and move THAT around
Well I'm programming in Java and not C# but they're very similar.
so either use the mousepos variable in another method which can't happen or get the mousecoords to be public
well
just
put
outside of any functions
at the begiining
of the class
public int mouseX;
public int mouseY;
and just define them
in the function
yeah?
mouseX = 173;
on ex.
same with mouseY
and same with any other such variable
well yeah but then how is the other method gonna see that value? The timer method?
no
uh
so
when you define the variable
that's
outside of any method
so
you define it
outside of any method
and you set its value
in some function
that value isn't set "locally"
its set globally for that variable
so just put mouseX or any other variable
in any other function
and if its defined in some other function it will see that same value
so if I set the value in a method the same value can be accessed by another one?
yeah...
huh ok I will try that I thought everything in the method was local
no
if method is defined outside of that method
*variable
anything you do to that variable inside any method
will be global
(in most cases)
is this winforms?
yup
@tired juniper are you trying to make changes to the form, in an event?
because you should use BeginInvoke() for that
render thread is seperate from the event pump
@tired juniper point is scoped locally
so its not available in tmUpdate()
if you wish to make it a property of your form
you should define it as a class field
instead of a variable in a method
yeah I figured it out.just made it public
@tired juniper nah
public private has nothing to do with this
its scoped to that method
i don't like c#
I should have tried at least to do what you said not just assume it won't work
class Foo {
Point MyPoint {get; set;}
//... class body here
}
no I make the variables public and then assign values in the mouseclick method so it uses e as mousecoords
This would define MyPoint as a property of Foo
and then use them in the timer method and it works
@tired juniper you should use properties, instead of variables
yeah but it works with variables
this.MyPoint = new Point()
you should use Java 😂
@fleet geyser I do both C# and java :P
and don't be offended but just what you are suggesting is a bit more complicated to me than variables and if it works it's good enough
@tired juniper nah, but this is a nice way to define properties of your objects
well maybe I will😆
it automatically generates a getter and setter function, which you could customize later on
cool thing with properties is you can do this:
Point MyPoint {get; private set;}
this way its public, but only class-private can update the value
this way its public, but only class-private can update the value
well yeah I might learn it just to be able to do more stuff in general you have a point
@tired juniper you can also create a private variable, and then make your property accessor get fetch a value from your private variable
that's nice
private int wat = 32
int FooProperty {
get {
return wat;
}
set {
wat = value;
}
}
@tired juniper like so ^
this gives you control over what goes in and out
though you don't do this most of the time
oh yeah I have done that before actually
Java is incredibly verbose, and doesnt have property members
in java, you just create a getFoo and setFoo
😄
@fleet geyser do you know lombok?
nope
but yeah this is for more advanced stuff. f you just want to do simple things you don't need it ,but it's cool definitely
well
Its compiler sugar for java
lombok does it during compilation
and it integrates with maven
so you just designate a @Getter above your variable
I love when things happen automagically
and it generates those during compilation
@fleet geyser if you make a class that purely holds data, you can add a @Data above the class
This generates, getters and setters ,as well as hashCode(), equals() toString() etc
👍
@fleet geyser in that regard, I would favor C# over Java
ah maybe
because C# as a language, has more features
but i like java
cuz java is more bare bones
but
it allows you to create a lot of libraries
do you know any other languages ?
I wouldn't bash on a language, unless you know how to program in it :P
@fleet geyser power of lombok: https://i.imgur.com/xaBanrn.png
ah yes it does that too
@fleet geyser though I'd be careful with that
not every IDE has lombok support
IDEA does. which is nice
yup
maven will compile it just fine
its just the autocomplete that has to know about lombok
And Maven
and needs a plugin
so does every student :P
GAGAHGAHAHA
I somehow
Forced my friend to try
programminga
And I setuped Intelliij for him
In like
5 mins?
Xd
If it recognizes your mail
One of my favorite IDEA features https://i.imgur.com/zmy6jsx.png
JavaEE integration is so useful :)
Please tell me taht isn't default intellij theme
?
Are you using Intellij's default theme or some other theme plugin?
I really don't like Intellij's default themes lol
Its just dracula
uh
GAGAHAGAHGA
I like to customize my IDE so I can enjoy it Xd
I use Material UI Oceanic
I use my IDEs to get work done.
aghahgaaha
not to make a carnival happen
agaghhahhha
well theme i use
isn't anything special
just some color scheme and oceanic coor
xd
*color
https://i.imgur.com/1CiMni8.png ¯_(ツ)_/¯
idk why ur trying so hard to laugh
Just download a theme you like
Ye
nah i'm not trying nor i want
i just like putting GAGHAAHA cuz it doesn't sound mean
XD
@fleet geyser favoring one language over another isnt really gonna help you at work
yeah i know i just prefer java
being flexible, programming in a wide range of languages, that's where true skill lies.
for things like server side etc.
however
i prefer java
*C#
for Client applications
Server side I would almost always pick Java
Yup
Client really depends on what I would be making
I would use C#
yeah
And I would maybe use Java for client too
Cuz I'm lazy learning new language for Linux and Mac
really depends on what the target is
If I put Bundled Jar in program
It can run on pretty much any OS with minimal modifications
😄
yeah, until you have to do native integration xD
I've written programs in Java before that were augmented with bits of C
though you need to compile that library for every target platform
which kinda defeats the purpose of java
nah
without learning 3 new langs
easier would be to just write C
but
as far as i know
C langs only work on Windows (you could use something like Wine, but lets be real that's not great)
Oh
Lol
C compiles to any architecture
and C standard library doesnt change
welp i'm stupid then
C is probably the most cross platform language there is frankly
There is a C compiler for so many rando architecture you've never heard of
most of the time you just have to provide a different header
I really don't like C and C==
but thats just for userspace syscalls
@dim lava yeah... no xD All that mutex crap I got sick of reaaal quick
C++ 20 has some new really good threading constructs
if you were able to
Arduino C++ isn't really C+;
i wouldn't be going crazy every time i need to write arduino code
Alright its based on C++ whatever lol
only bits of C++ I've ever written was a compat library for a project of mine
So my code would be compatible on both avr-atmel and armv7
It's a heavily restricted version of C++ that is basically just C with a few random C++ features
I've had some really fun adventures with C++ and AVR
I spent about 30 hours getting Clang to compile C++20 for an Atmel micro controller
@fleet geyser there isnt
Arduinos run machine code.
i know
so you need a language that compiles to machine code.
JS is even harder no
Java is a VM language
or more
It's a microcontroller, there is no operating system or runtime environment
ik that too
^
uh
@fleet geyser if you know all of this, why you ask such a stupid question? xD
Therefore managed languages like Java or JS cannot run in it
I've been a programmer for 10 years
I've been for 2
Right
@dim lava I got a plan for this bag of NRF24L's I have
Gonna turn the new greenhouse we have, into a 'smart' greenhouse
New assignment yesterday, understand the fuck out of AES and Galois theory so i can make an advanced extension off an open source AES accelerator core
Awesome
I looked online for those automated gardening water systems
thought $500 for a starter kit was outrageous
I really liked that in highschool i took 4 years of an engineering class
@dim lava I did a major in software development, and then took a half year minor course in embedded development
So like i can do drafting, design, and some construction if i need to
lot of fun tinkering with electronics, rasperry pi's and arduinos
I never learned PCB design
I've done a little bit of it
I did manage to make a couple designs in KiCad
I mostly focus on FPGAs
use EasyEDA
figuring out how netlists and such work
it has community with 1000s of templates
I'm currently in a computer engineering major, I've done embedded internships, and right now I'm in academic research for analytical hardware security
@dim lava in the other campus, I actually saw embedded engineering students etch their own PCBs
I scoffed at that, and just ordered mine online xD
agahgaahgaha
Considering i hate chemistry i probably wouldnt try to etch myself
and you can choose black color for free
@dim lava photolithography ftw
I ordered 5 of PCBs with them, tho shipping was 3 months because of corona, quality is real good
If you're American use OSH Park. Made in US and they have purple PCBs 
Bit more expensive but from what I've heard faster turn around and shipping times
I have primarily red PCBs xD
Oh yeah then JLC is probably best lol
I use black ones
@dim lava I remember one of the assignments, making a virtual traffic light system on a breadboard
I thought this was so incredibly boring, that I asked my teacher if I could do something else
he agreed, and I made a DMX controller with a desktop program that communicates with the chip over serial :D
LOL
agayhgaghaghahaha
I controlled a set of stage fixtures with that
Love it
Right now in my Microprocessors 2 class, we're making an RTOS for ARM and the final project is an internet-connected video game
@dim lava lol. I'd almost grab buildroot and use raspberry pi with an RT kernel
We're starting everything from scratch
wdym?
with microcontrollers?
Rtos - real time operating system, meant for tasks that occur frequently or rarely that must be completed as soon as possible
And yeah, an ARM Microprocessor
things like network switches and such, modems and other communication gear
aha
almost always use realtime programming
@dim lava any specific tools you guys are using for developing this realtime OS ?
i would love to know what would be classified as micro processor in 80s when your PC was actually micro computer
@dim lava erlang is quite powerful for stuff like this :)
tough. xD
No stl
@fleet geyser you know your microwave, has a display, buttons and dials ?
agahgahgha
if it has buttons and dials, it has a microcontroller inside
I'm a forever C++ guy, but I've seen a lot of potential for Rust in the embedded space and I've been pondering it
probably Xd
hey you or anyone else know how to reduce flickering when I set the timer interval to very low like 30ms? I tried Double Buffering but didn't work
@tired juniper what do you mean flickering?
well the graphic flickers when it moves around because the panel refreshes very quickly I guess
@tired juniper if you are making changes to the layout, you should call SuspendLayout()
you could try googling, because not every time will you find an answer in discord
then make your changes
after which you can resume layout
this should reduce any sort of flickering in your form
and my screen refresh rate can't cope up I guess
@tired juniper nah
ok I will try that
I tried a few stuff from Google but didn't work
@warm sleet I'm trying to understand these galois fields... It's so confusing lmao
Abstract math that has applications in cryptography
@dim lava My calculus knowledge is serviceable at best
It's pretty far from calculus
I'm running on highschool math. with some things I taught myself
Finite prime fields
Calculus is all about them infinites
Galois is all about that modular math
Still goes above my head, sorry
Yea
It's that, but with prime numbers
last time I had heavy maths involved in programming
was when I was working on telemetry systems for sewers
calculating flowrate based on sensor values
I need to try to represent this in hardware
fuck tonn of geometry.
Oof
@dim lava cus a pipe is round
and if water level on the intake is above the pipe
gravity comes into play
I'm good at math and calculus, but this is all super far removed from anything i know
It's heavily involved with group theory and number theory
well, it involved integrating and interpolating values
over a set range of 2 million values
with 15 minute intervals
I was tasked with this, because the old implementation in PHP was slow and faulty
That's when you just use numpy and go do something else 
They used doctrine and laravel
Yeah thankfully i rarely had to deal with that
but.. I did have to read 2000 lines of php code
ultimately, I scrapped that code, and took the reference material that was used to write it
and reimplement the whole thing.
went from 45 seconds execution, to just under 4
oh php
The people that like to shit on JS obviously have never dealt with PHP 😂
PHP is. awful
GHAHAEGAHA
yeah....
Awful to maintain
@dim lava that really depends on who writes it
you can write maintainable code in php, somewhat.
but its OO constructs are.. so flaky too
If you ever want to giggle at PHP ^
This article is great
its full of sarcasm and humor
The worst is that the includes are all fucking relative to the first includer... So you end up putting everything in the same directory with no organization at all
Oh I've read this site multiple times lmao
Basically every time i would finish a site I would read through it again to save myself
From the anguish that followed
@dim lava you run into an issue
you figure out that an ini_set would fix it
then your co-worker comes at your desk, angrily yells at you: you can use ini_set! that is dangerous.
doesn't elaborate why
I've thankfully never had to use that
Lol
you can break something elsewhere
@dim lava
https://i.imgur.com/Az1mdgY.png
at least java has List<T>
LMAO
@warm sleet https://en.wikipedia.org/wiki/Galois/Counter_Mode thisis what i'm trying to understand
@dim lava xD have you checked section 2.5? xD
I'm gettin there lol
@tired juniper there isnt one
pretty sure with WPF you're supposed to use the event handler provided by the control
which doesnt have a MouseClickEvent
only button click and such
Could you not handle an event for MouseLeftButtonUp or MouseLeftButtonDown? https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/ms596681(v=vs.95)?redirectedfrom=MSDN
@waxen mesa Silverlight?
You got the wrong library there bud
though I guess this would be a generic type for such an event
doh! Yes I do sorry my bad
What is your opinion about the Electron framework?
Yes
@orchid basin because of electron, by the year 2050 we'll need double the amount of powerplants
most bloated application framework I've ever come across
true, but except that?
what do you mean?
discord eats memory for breakfast, and CPU is pinned when you scroll through chat history
that's electron for ya.
Except all the bloat, what is good about it?
idunno? simple framework to develop cross platform applications with?
my main issue with electron is the fact that its just a webbrowser in disguise
Yes, true also. I try to look past that with the ease of development if your expertise is web sites
cross platform
one unified codebase
but that's about it
you can use the same devs maybe?
@midnight wind its for people who need more than just a web API
it provides integration with hardware and native access
something you cannot do in a browser
but tbh, its just a bloated framework to build multimedia applications
and its just enough javascript to tell a webdev to become an app dev
well yeah
ofc
@midnight wind I guess its easy, a browser takes care of providing a unified API to all common multimedia IO
such as microphone, media decoding, video streaming, notifications
and this is why discord can act as a desktop app, as well as use microphone in a webbrowser
but things like desktop screen sharing, would only work on electron, because it uses native APIs to do this
features like application sharing (instead of a single screen) would include audio on windows, this feature isnt available on linux last I checked
do you mean desktop screen would only work on electron and not regular browsers?
I'm asking that in general (library neutral), if you mean it's not possible to do in browsers
@hollow basalt because you can just use a native process to stream this data to a socket that electron can read
you can't spawn this process from within a browser.
Is that a yes or no
I'm asking in general, a yes or no question
not caring about library or frameworks whatsoever to achieve
@hollow basalt this is iG
a browser is sandboxed.
and thus cannot access native APIs on the system
Still not a yes or no
electron cheats, because it is launched as a native process.
@hollow basalt if you understand what i am saying, you can answer this yourself
So you won't answer it?
nope
got it
because your question wouldnt be a yes no
because electron isnt the only framework out there
ok. By the way in Windows forms how do I make the subform not close when I click the ok button. I have a messagebox pop up and then the form closes. How do I make it not close? if anyone else knows they can answer as well
@tired juniper depends on your application context
you can use Form.ShowDialog() to create a new window, that is not a popup
yeah but I mean when I click ok on the actual form the pop up comes then I click ok on the pop up and then the form closes(it's a subform of my mainform.) How do I make it not close(the form) when I click the ok button on the form?
you are using a messagebox?
those are not a dialog or form
merely a messagebox
you can't customize those, beyond what the API allows you to
no the messagebox is not that important,it might have been any event. I just want in a particular case when I click ok on the form(it's a button on the subform of my mainform) the subform to stay open instead of close
well, you created the event handler for that button ?
yeah
by default a form does not have a 'close' button, except the X in the window itself
so I am not sure what you are getting at
yeah but when I click ok it closes(it's a subform)
yeah
that's a dialog.
well yeah
yeah
forms are closed by calling Form.Close()
and how do I do the opposite? When I click ok is there a way to keep it open?
not calling that function?
well,can you call the function click and then it pops up a messagebox but after you close the messagebox it doesn't close the dialog(subform)
yes, that's an event handler of your form, calling a message box
the messagebox returns a result when you close it
if you evaluate that, you can then decide on what to do
ok,thanks! so in my case I put it on the OK button of the dialog(subform)
wait what
we're not talking about the same thing here...
because you cannot customize the layout of a MessageBox
no,I mean that result thing which I set to none I put it on the OK button of the dialog? Or the MessageBox?
Look, a form can be opened in two ways: either a seperate window, or a dialog
Dialogs force themselve ontop, and have to be closed before you can interact with the parent
MessageBoxes are their own thing on their own
they behave like dialogs
yeah I know but in order not to close my dialog I assume I put that result on the OK button of the dialog itself?
?!
oh wait no, I will try something I think I got it
@tired juniper idk what you are doing
but this is how you close a form
a button doesnt 'close' by default
well I have my DialogResult for my button to OK. So when I click it it closes the dialog. But when I set DialogResult to none for the button it still closes the dialog. That's what bothers me. Isn't it supposed to stay open then?
no
dialogs are for a dialogue between the user and the computer
they close when the dialogue has finished
when you do MessageBox.Show() the code halts execution at that point, until the dialog closes
yeah but can I keep it open after the messagebox is finished and closed,using what you sent me in the screenshot?
this one
private void Button1_Click(object sender, EventArgs e) {
var result = MessageBox.Show("foo", "bar", MessageBoxButtons.YesNo);
MessageBox.Show($"You selected: {result.ToString()}");
}
@tired juniper these things are ment to close as soon as you click one of the buttons
thats what a MessageBox is.
if you need more custom functionality in such a dialog, you make a new form
and spawn it, instead of a MessageBox
When I click ok on the MessageBox,the "ValidationForm" closes. I want to keep it open
my brain can't read cyrrilic
well ignore it imagine it's any string
@tired juniper how do you spawn the validation form?
ValidationForm.ShowDialog()
okay, can you show me the code behind ValidationForm?
the bit that is interesting, is in the validationform, where you call your messagebox
you put that in the constructor ?
and just in case this is the whole thing but it's complicated https://paste.mod.gg/citewejozo.cs
which one?
that's because if there are no errors, it should enter everything that was in the validationform,in the main form once you click ok
but now because I can't keep the Validation form from closing it always does it
button_ok.DialogResult = DialogResult.None;
I tried this but it still closes
im recreating this setup real quick
in an empty project
doesnt happen here
I have two forms
Form1 spawns Form2 when I press a button, form2 has another button, when pressed will spawn a messagebox
but it doesnt close the parent for me
@tired juniper are you sure there's no uncaught exception you are missing?
oh yeah it was the exception I think
there was an exception
well whatever, I am just gonna deal with the exception and it's fine
anyway thanks for the help!
@tired juniper this is why I hate .NET honestly lol
there's so much shit that happens underneath, that you dont ever see
and if you do something wrong, you get odd behavior
yeah
Exception thrown: 'System.Exception' in WindowsFormsApp2.exe
An unhandled exception of type 'System.Exception' occurred in WindowsFormsApp2.exe
reeeee

xD because in some of his old videos he used to do that sound "reeeeee!".His period where the videos were kinda crazy
he would jump out of the cupboard and scream reeeeee!
first time I saw it being used as a meme was in one of h3's videos
yeah I guess it's a popular meme so YouTubers use it
or it was I don't know if it still is
This is just your average degenerate "influencer"
its just boring popular culture
well yeah
it goes in the if sentence in the try,sets the Dialog Result of the OK button to None and then exits the method and closes the dialog? Why??? Liteally no reason
any other scenario where it sets it to none it doesn't close
I checked the value was set to None and it still closed it. and in other cases where there is setting dialogresult to none(other if sentences or anywhere else in code it works and does not close)
@tired juniper do you know how to use the debugger?
yes I used it. I literally saw it skipping the else sentence going into the if before that and then exiting the method and straight up closing the dialog
and returning to the code that calls it in the main form
and the if clause sets Dialogresult to none even checked locals it's None alright and it still closes
also no exception it doesn't go into the catch
so that dialog is unrelated
but the source is the code that you call that Validator with
yeah and what then?
how do you create this validator in MainForm ?
private void button_form_Click(object sender, EventArgs e)
{
ValidationForm validationForm = new ValidationForm(this);
validationForm.ShowDialog();
}

