#development

1 messages · Page 68 of 1

hollow basalt
#

you need to create your own

#

or fork it

empty sentinel
#

I haven’t figured out vstudio free edition. And I dunno if it’s available at work either

hollow basalt
#

I haven’t figured out BStudio free edition
It's a mystery to behold

empty sentinel
#

Lolol. I am very much not a programmer. Scripting yes, programming no.

hollow basalt
empty sentinel
#

Very true. But the concept of “you start with nothing, build it yourself” is such a drag to me. Like, I just want to look up a phone number in AD. I don’t care for libraries, garbage collection, static void, and signed integers.

#

...yet here I am in development. LOL

hollow basalt
#

I don't know anything about netwroking but I lurk in that channel

empty sentinel
#

My ability to make scripts is built on the backs of those who build the tools I use. I salute to you programmers out there. Thank you for your hard work.

hollow basalt
#

My ability to create web apps is built on the backs of those who handle the networking. I salute the networking guys, Thank you

indigo python
#

while True:
print ("1. Utlåpn")
print ("2. innlevering")
print ("3. mine lån")
print ("4. Administrasjon av lånere")
print ("5. utstyr")
print ("6. utlånsstatestik")
print ("9. Avslutt")
print ("10. Ad bruker")
print ("11. Ad utstyr")
choise = input ("valg:")
print (choise)

if choise == "1":
    print ("Du valgte Utlån ")

elif choise == "2":
    print ("Du valgte innlevering ")    

elif choise == "3":
    print ("Du valgte mine lån")

elif choise =="4":
    print ("Du valgte administrasjon av lånere")

elif choise =="5":
    print ("utstyr")
    import equipment_test

elif choise =="6":
    print ("Du valgte utlånsstatestik")

elif choise =="9":
    import sys
    sys.exit()

elif choise == "10":
    print ("Ad bruker")
    import person_insert


elif choise == "11":
     print ("Ad utstyr")
     import equipment_insert
#

i need som help

tribal rivet
#

@everyone

#

help this guy

indigo python
#

i got it to worke

frail jewel
indigo python
#

thank you

warm sleet
#

what language is that even

indigo python
#

norwigian

warm sleet
#

python?

indigo python
#

yes

warm sleet
#
options = {
  1: "Option 1",
  2: "Option bla"
}

options[1] # returns "Option 1"
#

@indigo python ^

#

that's a more powerful way to describe this logic

indigo python
#

ok

warm sleet
#

@indigo python you could replace the menu printing you do, with a loop

#

that loop just prints every option

pseudo laurel
indigo python
#

we are supsos to do that it is a scool prodjeckt

hollow basalt
indigo python
#

?

rotund plover
#

Any nodejs devs?

autumn swan
#

It is statistically likely that there are

midnight wind
next light
#

anyone here working with lua?

pseudo laurel
#

hmmmmmmmmmmmmmm

warm sleet
#

@next light sometimes

next light
#
print("how often")
warm sleet
#

when I need to work with lua

#

I've written in like a dozen different languages :P

#

Lua is a fun one, single datatype: table and indexed by 1. (not 0)

#

unless its native lua with luac, then its 0 KEKW

next light
#

well i worked first with lua and that used index 1 and now im using luau and it still starts at 1

warm sleet
#

with luac you can have native arrays, these start at 0

next light
#

didnt know about luac

#

only known about lua/luau

#

but it doesnt matter that much with the start index

warm sleet
#

well, it does actually

#

because in luac, you can have both 0-indexed and 1-indexed arrays xD

rotund plover
#

Hey guys, I have nodejs login / register but the db connection keep crashing while my server doing backups at night and that makes the app just crash.
How can I fix it ?
What is the correct way to use try and catch to fix it ?

rotund plover
#

Mariadb

midnight wind
rotund plover
#

oh

#

Never used mongodb

peak acorn
#

lua isnt so bad

shy helm
midnight wind
#

^

#

for async operations use try, catch

fresh flint
#

Hey guys! I’m doing a high school project for my business class (mock business pitch) and my idea was requiring an app, could any one here tell me how much something like that would cost, I read somewhere online that it is about 20k-30k. This is one of our final projects so I was hoping I could get some help thanks!

midnight wind
#

idk pricing really

fresh flint
#

My idea is an app kind of like social media and LetGo & Facebook Marketplace combined but instead people sell labor? It kind of hard to explain, so sorry about that but thank for the help!^^

rotund plover
# shy helm you should be catching the exception thrown when you connect to the DB, then you...
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on Connection instance at:
    at Connection._handleProtocolError (/var/www/firebase2/node_modules/mysql/lib/Connection.js:423:8)
    at Protocol.emit (events.js:315:20)
    at Protocol._delegateError (/var/www/firebase2/node_modules/mysql/lib/protocol/Protocol.js:398:10)
    at Protocol.handleNetworkError (/var/www/firebase2/node_modules/mysql/lib/protocol/Protocol.js:371:10)
    at Connection._handleNetworkError (/var/www/firebase2/node_modules/mysql/lib/Connection.js:418:18)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read',
  fatal: true
}```
shy helm
midnight wind
#

yeah doesn't throw just crash it?

rotund plover
#

What part of it ? The throw error // or the under part ?

midnight wind
#

I never use throw

#

I just do console.error(e)

#

inside of a catch(e){}

#

maybe I'm doing something bad

#

ah As soon as JavaScript executes this line, the normal program flow is halted and the control is held back to the nearest exception handler

#

for throw

#

you never handled the error

#

@rotund plover is the throw statement inside of a try{}catch(e){} block

#

what I would do is have it try to reconnect and after like 5 tries stop and write that to console

#

instead of crashing

#

so it would look like this

Database connection lost: Reconnecting (1)
Database connection lost: Reconnecting (2)
Database connection lost: Reconnecting (3)
Database connection lost: Reconnecting (4)
Database connection lost: Reconnecting (5)
Can't connect to database!! Quitting
dawn root
#

hey.. anybody know any WYSIWYG html editor.. like Dreamweaver?

rotund plover
midnight wind
autumn swan
#

WYSIWYG is about creating the content a different way (visually), not auto-preview/refresh of manually written HTML and whatnot

midnight wind
#

I honestly don't know anything else other DreamWeaver

dawn root
#

hmm

#

thanks

obtuse night
#

Bootstrap Studio?

cunning rune
shy helm
#

String::length is the method reference, I don't think the assignment is valid though

dense stag
#

Weird question, but is anyone familiar with programming in Windows 3.11?

cunning rune
#

@shy helm i know, no error, nothing, and the test pass.

fallen cedar
#

i'm not a java guy, so had to read up about this as i found the question interesting

#

the keywords that will help you with this

functional interface
SAM
void-compatibility

#

again, not a java guy, but it seems it's a java 8 thing, brought in with lambda expressions

cunning rune
#

@fallen cedar well that's exactly what i was looking for. thanks for finding the reason why it works,
think i should be possible to use any static method reference that need a string

fallen cedar
#

yeah, so you can do sut.text("hello") and the return value (which in case of String::length is int) just won't be usable/discarded

#

same way as with any other method

#

you can happily call a method that returns something and just ignore the return value

umbral saffron
#

So if I already set up TensorFlow

#

How could I write python code

#

To say like

#

If Human = In_Frame:

#

Then it unlocks the rest of my stuff

rancid nimbus
#

Maybe. Look into opencv. You can do person detection with that.

shy helm
#

I missed the functional interface, I blame it being late 😉

peak acorn
#

Ive never seen that :: in java before haha

next igloo
#

this is to apply rotation to 3d points

spring pond
#

from what i know you usually use a library like vulcan/open gl that does all of the math

#

or just follow a tutorial

rancid nimbus
#

In openGL you can just give it a point and a point to look at and it does the rest, or you can say here is the point and here are the rotations of the angles.

spring pond
#

^ yeah

#

you should never have to do that math on your own because i'm not sure there even really is a way to open a window without using some type of library (unless you want to go really far down into the OS API)

glacial herald
#

anyone here good with FiveM and could fix an issue that i have?

nocturne galleon
#

Idk if this should go here. But I’m interested in learning JavaScript and eventually other languages. Does anyone have any sites you can recommend for learning JavaScript? I’m a beginner by the way

hollow basalt
#

Google

dapper flax
#

@nocturne galleon check out w3schools and see if it's your speed.

nocturne galleon
#

Thanks

urban comet
#

@nocturne galleon w3 schools, mozilla developer network, free code camp and code academy

rotund plover
#

Javascript someone?

bright grotto
#

some

#

what u needing

rancid nimbus
#

Tutorial are outlined a few messages above and if you need help we need to know what you need help with and the context around the problem. Javascript it common enough that there is likely a quite a bit who can help.

#

Has anyone heard of ECMAScript?

next igloo
#

Im making a 3d engine and was only able to get X and Y axis rotation
This is my code for it so far

#

It only has X and Y rotation and I am not sure how to put in Z axis rotation

peak acorn
#

How in the world

#

🧠

slate frigate
#

@next igloo you’re making a 3D engine in scratch? You absolute mad lad

peak acorn
#

For yall who work professionally in development, how much did you actually know when u got your first job?

next igloo
#

but the math is the same

#

so i was wondering how i can change the formulas to allow z axis rotation

next igloo
#

i will later port the game to the ti 84 plus ce

peak acorn
#

Can't you just write C and compile for ti84 or something like that

last dirge
#

anyone here good at c++?

#

How does this work cpp LookForVal = (__int8*)malloc(sizeof(__int8) * 400000000); // if i dont do this it returns arr length 5 for some reason?

but not this cpp LookForVal = (__int8*)malloc(sizeof(__int8) * 4); // if i dont do this it returns arr length 5 for some reason?
i love c++

next igloo
#

while javascript is more powerful, scratch has the drawing thing built in, so i wouldnt need to code that to test the engine itself

peak acorn
#

well tbf ive never written C or assembly on ti84 but im pretty sure ive read about it

next igloo
#

i havent written in any of those

spring pond
rancid nimbus
#

I would want to guess that the expected result is an array of length 5. It would be allocating a ton of ram in the first one and in the second one it would not allocate enough. Just a reminder that if you want help providing details of what you are expecting would be really help full. That can make questions turn into answers.

spring pond
#

i dont have a ton of experience with C but are pointer arrays even bounded at all? they're just pointers

#

thats why you always have another parameter in functions to determine length

rancid nimbus
#

Well, yes, but also you could receive a segmentation fault if you ask for memory that is out of your allocated memory.

spring pond
#

yeah so im saying how is he able to determine the length of the array?

rancid nimbus
#

You would have to store it separately. When you memory allocate you do size of item times count of items. Then your store that number somewhere that you can recall later. You store it latter because the memory allocate might fail.

#

You could create a struct to store both the pointer to the array and the length.

#

That is what I have done any time I have an array I check that the number is in bounds before calling it. It it isn't just write a debug statement.

cold osprey
#

oh yeah btw it's written in php as well which is hilarious

peak acorn
#

But that's minecraft

spring pond
#

memory is what you make it in c

midnight wind
#

Anyone have any experience with node and express?

#

Basically I have something like this:

router.route('/join').
  get(isLoggedIn, async(req,res)=>{
    return res.render('join.ejs');
  }).
  post(isLoggedIn, async(req, res)=>{
    //Do stuff
  }).
  get(isLoggedIn, isInRoom, async(req, res)=>{
    //Do stuff 2
  });
#

the second get is unreachable

#

how could I go around this?

deep scarab
#

have you checked that isInRoom succeeds?

midnight wind
#

if I get rid of the first get then I can do stuff 2

deep scarab
#

alright, you need the next param in your handler

#

async(req, res, next)

#

in the first get()

midnight wind
#

ahh, that's what I was missing

#

I was looking at the docs for forever

deep scarab
#

have a look at the example there

midnight wind
#

yeah thanks, newbie with express

deep scarab
#

i haven't touched express in a year or 2 so it was a good refresher

indigo python
#

while True:
print ("Hei jeg heter Iris")
navn=input ("Hva heter du?")
print ("Hei" ,navn ,"Håper du har det bra")
sporsmål=input ("Hva kan jeg hjelpe deg med?")

     if sporsmål =="Hvor gamelt er universet":
                       print("13.8miliarder")

     elif sporsmål =="hva er kloken":
                       print("se på vegen")

     elif sporsmål =="":
                       print("")

     else:
                       print("beklager vet ikke")
#

pyton script

hollow basalt
#

yes, that's a python script

tight parcel
indigo python
#

nice

warm sleet
#

i18n kek

#

@indigo python I swear, Norwegian sounds like a dutch guy who had too many drinks xD

#

ikke is 'me' in dutch/afrikaans

#

I guess navn=input ("Hva heter du?") means: what is your name?

indigo python
#

Yes hva heter du= wats your name

warm sleet
#

@indigo python "Ik heet Crystal"

#

"My name is Crystal"

indigo python
#

😂

#

Are you germane

#

Sory if i type wrong

warm sleet
#

@indigo python 50% dutch, 50% german, 100% european

warm sleet
#

condition ? true : false

#

what the fuck is C# smoking?

#

I don't get it.

empty sentinel
#

Doesn’t make sense. If that’s the official Microsoft explanation, then my advice is to steer clear of Microsoft’s documentation. For Windows, their documentation is 110% useless (which also includes the 10% wasted time reading it). So I’d imagine their programming documentation to be the same.

spring pond
#

well this is the c# docs so its a bit better

#

but maybe c# is doing something weird with the "null" value

#

?

#

ive never seen this before

#

ran this test

using System;

class MainClass {
  public static void Main(string[] args) {
    String s = null;
    Console.WriteLine(s == null ? "im null" : "im not null");
  }
}

got this result

 mcs -out:main.exe main.cs
 mono main.exe
im null
#

so idk

#

you may want to check the state of your value in other places in your program

spring pond
#

[message deleted, guy wanted to make a streaming service] thats a pretty big task lol

#

like enormous

gritty crow
#

Ich lerne deutsch!

empty sentinel
#

Depends on the type of streaming. There’s an open source Twitch Alternative that you can self host. No idea how scalable it is or anything else other than “I’ve tried it and it works, but I have no real use for it”. I even forgot what it was called.

thorn matrix
#

@empty sentinel Are you referring to Satyr?

empty sentinel
#

Could be. I couldn’t find any screenshots of it.

warm sleet
#

@spring pond I did actually figure it out in the end, sorry for not posting earlier

#

@spring pond improperly implemented an operator overload

#

x is null ? "im null" : "Im not null" would do a direct null comparison

spring pond
#

that makes sense

tired juniper
#

also I am using notepad++ so please don't tell me to use quotation marks or write body instead of BODY because that stuff doesn't matter in notepad++ trust me I have tested it

midnight wind
#

for one you have no doctype

tired juniper
#

well am I not supposed to see a rectangle

midnight wind
#

you opening the html directly in chrome or firefox?

#

I see a blue rectange

tired juniper
midnight wind
#

this works

tired juniper
#

I am using Edge Chromium

midnight wind
#

if you are running a web server then it may add DOCTYPE

#
<!DOCTYPE html>
<html lang="">
  <TITLE>Operating Systems</TITLE>
  <head>
    <style>
      .menu {
        border: 5px outset blue;
        background-color: lightblue;
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div class=menu width=500px height=500px><p>hello</p></div>
  </body>
 
  
</html>
#

use this

tired juniper
#

ok

midnight wind
#

you didn't add your doctype

#

or html tags

#

or end your body tag

tired juniper
#

well it ends it on its own but yeah I usually end it I just have forgotten

midnight wind
#

pretty sure it doesn't

#

just that you don't have anything below it so it doesn't cause errors

tired juniper
#

well I have done an experiment and when I open it and inspect element the elements I didn't close have the closing tag automatically but I will close it I usually do just forgot overlooked I guess I am doing a few pages

midnight wind
#

yeah but that's not good practive

tired juniper
#

also I did close my body tag this is not the whole document

midnight wind
#

oh ok

#

that would make more sense

tired juniper
#

I just didn't share it because I didn't want to get your attention away with a bunch of lines that don't matter for this 🙂

midnight wind
#

ok so does it work or no?

tired juniper
#

well same thing nothing appears

midnight wind
#

nothing at all?

#

show the entire html

tired juniper
#

well no rectangle

midnight wind
#

oh

tired juniper
#

ok just a sec

#

also if you are seeing it maybe it's Edge? the problem

midnight wind
#

still show the entire doc, you may have forgot to close something things

#

Edge is basically chrome

#

shouldn't the issue

tired juniper
midnight wind
#

works on my end

tired juniper
#

?

midnight wind
tired juniper
#

weird

midnight wind
#

just a sanity check, you saved right?

tired juniper
#

yup

#

works here as well

#

hmm

midnight wind
#

try making a new file and paste the content

tired juniper
#

now it works

#

?

midnight wind
#

alright

tired juniper
#

how?

#

xD

#

oh great when I closed the actual html file not the new one and reopened it it works

#

so refreshing I guess is buggy

midnight wind
#

yeah

tired juniper
#

well weird wtf but I am glad I solved it

#

also it works a sit was without the doctype and html tags I am pretty sure notepad++ or something else is just autocompleting them,what do you think? I am just curious

midnight wind
#

notepad++ is just an editor, it doesn't

#

chrome just does that

tired juniper
#

not that I am saying you should omit them but

#

ah I see

#

I was just curious

midnight wind
#

open with nodepad to check

#

@tired juniper I assume this is for a school project?

tired juniper
#

um yeah

midnight wind
#

because no one writes plain html anymore

tired juniper
#

but I am not sharing the html just the site

midnight wind
#

for popular websites

tired juniper
midnight wind
#

frameworks

#

or statically generated sites

tired juniper
#

oh I see,well yeah this is just practice for school. And then I am going to add css for design

warm sleet
#

@midnight wind notepad++ can autocomplete

#

surprisingly enough

midnight wind
midnight wind
warm sleet
#

its mundane autocompete though

midnight wind
#

never really used notepad++

warm sleet
#

it completes keywords found elsewhere in the file

midnight wind
#

but you mean autocomplete as writing or autocomplete on save

tired juniper
#

I think on save because it doesn't just write it out

#

Idk

warm sleet
#

@tired juniper the reason invalid HTML documents can still be read by a browser, is because the browser does a lot of hacky tricks

#

many websites use invalid html

#

so browsers are designed to be somewhat fault tolerant

#

faulty html, may render differently on different browsers

tired juniper
#

well that's good because you could get lost in the tags if you are writing a big website and omit some of them accidentally

warm sleet
#

@tired juniper no

#

@tired juniper you shouldnt omit any of them

#

you will get ranked lower in google search, and such

rancid nimbus
#

How does uptime give me an average CPU utilization of 10+ when it only has 4 core's? I though it would top out at 4.

tired juniper
#

well yeah but if you do it's good that at least it works

warm sleet
#

@rancid nimbus overloaded.

tired juniper
#

I definitely don't say you should

warm sleet
#

@rancid nimbus its per thread. so 4 cores 8 threads has a max load of 8.0

#

anything higher means that it has more load than the system can handle

#

and thus, programs are slower

rancid nimbus
#

I don't think it has multiple threads per core since it is a low end system.

warm sleet
#

@rancid nimbus do you know the program htop ?

rancid nimbus
#

Yes.

warm sleet
#

if its completely 100% on all cores

#

load is probably higher than the max core count

rancid nimbus
#

The number is near 80-90%

warm sleet
rancid nimbus
#

Also that was in top.

warm sleet
#

yeah top reports total cpu time

#

@tired juniper if you're looking for an editor to easily write html and css with, I recommend visual studio code

midnight wind
#

^ the autocomplete is great

warm sleet
#

it also has support for javascript, and npm should you want to delve into more advanced web development

#

and debugging/testing of a webpage, I always do with the chrome dev toolkit

#

as for what @midnight wind said about frameworks

#

writing your CSS and HTML, you don't really do

tired juniper
#

I have visual studio I have been using it for the other coding stuff c# mainly so yeah I could give it a try but I also like notepad++,but yeah if I do more advanced I will definitely try visual studio

tired juniper
warm sleet
#

you should use a framework, and the templates

midnight wind
warm sleet
#

@tired juniper visual studio code is a lightweight text editor

#

its different from visual studio

tired juniper
#

well I have both they come bundled up

warm sleet
#

notepad++ is the fucking worst

#

because

midnight wind
#

it's not an IDE like VS, VSCode is more of an advanced text editor

tired juniper
#

or I downloaded both of them I don't remember but I have it

warm sleet
#

everytime I start it up, it forces a popup: there are updates available

#

that kinda shit is just annoying.

#

gets in the way of important workflows

#

It could read a file before, it can read a file now, updates is KEKW

#

I've written my own text editor before :3

#

in lua

#

because the built in text editor of computercraft at the time, was total crap

tired juniper
#

well there is a setting in MISC. auto update maybe that will help

warm sleet
#

on my laptop I use gedit

rancid nimbus
#

Vim, nano, vs and some other generic sounding IDE are the one's I like.

warm sleet
#

or nano in console

tired juniper
#

stop with the popups and just autoupdate and don't bother you. Idk never had any annoying popups but I am not sure if that will solve it

warm sleet
#

@tired juniper main difference with those is how they get their updates

#

on windows, everyone reinvents the wheel and makes their own auto update

tired juniper
#

yeah I guess

warm sleet
#

@tired juniper as for frameworks

#

I recommend most first timers to try out bootstrap

#

Its a simple and easy to use responsive CSS framework

#

for designing desktop/mobile webapps

#

with interactive functionality, icon sets and bunch of css presets

#

like, if you want a menu with options, you just have to write the html, and provide some items in class=

#

that's it.

#

only thing you need to learn how to use, is the grid system it uses

#

You can use the grid system to align blocks on the page

#

so that if the viewport of the browser is different

#

everything scales accordingly

rancid nimbus
#

Just wondering, how does an Intel chip have a many bit address buss, but still has a really low limit. I'm looking at the x5-Z8330 processor and 36 bit address size and only 2GB( likely 2GiB) max of ram.

warm sleet
#

@rancid nimbus 36 bit, are you sure?

rancid nimbus
#

2^36 = 40G

#

That's what cat /proc/cpuinfo gives.

warm sleet
#

@rancid nimbus what kind of kernel are you running

rancid nimbus
#

I would want to guess that also it would be 64G word's. Whick would mean 64*4 GiB.

warm sleet
#

@rancid nimbus oh THAT

#

yeah

#

virtual memory

#

virtual memory space is larger

rancid nimbus
#

Linux 5.10.17 x86_64.

warm sleet
#

I have same basically, except much older kernel

#

address sizes : 39 bits physical, 48 bits virtual

rancid nimbus
#

That was physically. Virtual is 48 bit.

warm sleet
#

depends on the size of the total amount of memory the MMU can handle

#

it scales accordingly, to switch less silicon when running

#

less bits = less transistors

#

but this is all virtual memory!

#

The MMU sits inbetween this

#

and those tables it holds is OS magic

#

unless you do kernel development, you never have to think about this :3

#

bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds

#

wat

rancid nimbus
#

So cat /proc/cpuinfo is giving the number to the MMU not available to RAM?

warm sleet
#

hold on

#

if you want actual hardware info

#

you should use dmidecode

rancid nimbus
#

Ignore that. It is just what it has to do differently than a perfectly normal system according to spec.

warm sleet
#

@rancid nimbus its a 64 bit kernel

#

so address space of 64 bit

#

would be unnessary for such a low power SoC

#

but dmidecode will reveal, let me find the command

#

@rancid nimbus

Handle 0x0013, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 16 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2
tired juniper
#

Thanks for the links! I will definitely check it out

warm sleet
#

@rancid nimbus just run dmidecode --type memory

#
Handle 0x0014, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0013
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: SODIMM
    Set: None
    Locator: ChannelA-DIMM0
    Bank Locator: BANK 0
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1600 MHz
    Manufacturer: Samsung
    Serial Number: 00000000
    Asset Tag: 9876543210
    Part Number:                   
    Rank: 1
    Configured Clock Speed: 1600 MHz
#

and /proc is all virtualized

#

its userspace APIs

#

thats what the kernel presents to the programs running on the system

#

nevermind what the kernel is doing

rancid nimbus
#

-bash: dmidecode: command not found

warm sleet
#

what distro?

rancid nimbus
#

Please don't tell me to apt install.

warm sleet
#

yeah no, I am just wondering

rancid nimbus
#

LFS.

warm sleet
#

idk on which distros its preinstalled

rancid nimbus
#

Linux from scratch

warm sleet
#

leel

#

ok

#

actually, this decodes the info the bios reports to the system

#

I always forget that is there too

#

with EFI the lines get so blurred

rancid nimbus
#

My system is an EFI system.

rancid nimbus
#

I would try the npm install that it suggests. I don't know the tool.

wheat dock
#

Rephrasing:

Anyone here do Arduino development on Linux using Visual Studio Code?
I am having IDE issues

tired juniper
#

why is that caption stretching so much the width is 200 and I set the margin to 0

#

what is that yellow field

hollow basalt
#

that margin though

tired juniper
#

yeah but it's 0px,it even says it in the thing on the right in the dev tools

#

why is it so big when it's 0px?

midnight wind
#

I use platformio extension on vscode

wheat dock
#

uhhhh

#

ill look into that

midnight wind
#

I love it

wheat dock
#

it seems like my issue really lies in a bad nodejs binary

midnight wind
#

what are you using?

#

@wheat dock the official Microsoft Arduino extension?

wheat dock
#

yep

midnight wind
tired juniper
#

hey if I have target=blank_ on a hyperlink html and then I open another html using that it opens on a new tab. But then the next html page also has a target=blank_ but it doesn't open a new tab.

#

if I close that page and click again on a hyperlink again with only one page open at the moment it opens in a new tab again. why can't it open more tabs?

rancid nimbus
#

You could just install the arduino IDE and make an extension that runs the build commands and another one that uploads the code. I had written a small project in vanilla GCC to build and avrdude to upload.

real shell
#

would you recommend using angular to start to learn web development ? i have some idea about html css js but haven't tried much practically . I know some android dev with kotlin , so angular seemed not as estranged as react.
i have to work on some basic web based assignments for college so i wondered whether starting straight up with angular would be a good idea or not

vestal glen
#

I'd recommend to try and learn without any frameworks at first, so you understand how the underlying systems work that the framework then abstracts for you

warm sleet
#

@real shell diving into angular without any basic web development experience is a bad idea

#

Its a complicated framework

#

and even for those who have some experience, it is still a mindbender

indigo python
#

is ther any way to hided a import comand wen it is runing widut it sowing. in pyton

indigo python
#

we got it to worke

tribal rivet
#

nvm we got it

plush wyvern
honest sleet
#

I have a cool gif I've made for you 🙂 I don't know how I managed to put all of it in like 8mB.The game is starting to feel richer with the visual and gameplay variety in each level I recently added! I'm working on this game using only free/libre and opensource tools!
Here's the last devlog if you want to see more than a gif https://youtu.be/UdYKLcMPDQM

urban flint
#

anyone versed in python want to help make a windows client for a thing I wrote? I don't have easy access to windows but would like to provide a client for it.

#

It's for my "stadia over bluetooth" project. Basically all that needs to happen is accept inocming data over bluetooth (the library I used is in theory cross platform) and translate that into controller inputs windows will use

spring pond
#

which is no small feat

pliant siren
#

"Welcome to driver development. Good luck"

nocturne galleon
#

can i make a program open on my computer

urban flint
#

Yeah I've avoided that so far 😂

nocturne galleon
#

when i plug in a certain device

#

i want this bat file to run when i turn my piano on (plugged in via usb)

urban flint
#

Depends on how dirty you can stand it. You can find something that can list usb devices and have a program infinite loop checking for if the device has been added

#

There's probably windows api ways but that will probably take longer

hollow basalt
#

Or you know, open the bat file when you plug it

nocturne galleon
#

is there a way to make a program instantly run when u plug a usb in?

#

im sure theres some sort of way if u get viruses that do that

urban flint
#

Yes read the link I already sent

midnight wind
#

no longer works for security reasons

urban flint
#

If you mean autoplay.inf files yah that was disabled in like windows 7. Idk if that program works haven't tried it but nirsoft does good work and they say it works 🤷‍♂️

#

Haven't been to nirsoft in like 10 years I appreciate that he is still cranking out all those programs. Prolific developer

next light
#

is it okay if i paste a code here of an attempt to raycast to my fov? i wanna know if anyone is able to help me with the logic

hollow basalt
olive merlin
#

Hey, is anyone here able to tell me if app developed with mysql 5.7 in mind will work on mysql 5.5 ? client just told me he is not willing to upgrade from 5.5, but i developed the app and datab with mysql 5.7. does anyone have any experience ?

hollow basalt
#

does anyone have any experience
Someone does

warm sleet
#

@olive merlin 5.5 is End of life

#

its not used anymore

olive merlin
warm sleet
#

apps that run on 5.5, should work on 5.7 with no problem

#

only thing that needs to change is the driver

olive merlin
#

the problem is that huge migration

warm sleet
#

database migration?

#

you can migrate from 5.5 to 5.7

olive merlin
#

server migration and multiple databases

#

and the apps that they use actually require 5.5, at least I have been told that

warm sleet
#

@olive merlin that app should be updated

#

5.5 is dead.

olive merlin
#

thought so as well, aparently its not if someone keep using it

#

like people who use win xp or win 7 lol

#

u will always find people like that

warm sleet
#

glad that that's not my problems xD

olive merlin
#

yeah right? lol

warm sleet
#

@olive merlin there's no technical reason for an app that runs on 5.5, to not support 5.7

#

only difference is the driver

#

but code-wise, nothing much changed

olive merlin
#

and 5.7 to 5.5 ?

warm sleet
#

newer client on older version?

#

mh. I've never done that

olive merlin
#

I can do nothing with that if they are not willing to upgrade it

#

its not my server or my company

warm sleet
#

well.. rip

olive merlin
#

yeah I have never done that as well thats why iam a little worried

#

i guess the only thing i can do is to try it out

warm sleet
#

@olive merlin looking at the release documentation

#

as long as your app doesn't use any of the above ^

#

it should be fine

#

query code should remain functional as is

#

though they changed how GRANT's are done, and how users are stored in the database

#

DQL, DML and DDL subsets of mysql have not changed between 5.5 and 5.7

warm sleet
#

Its just the latter, which is what GRANTs are

olive merlin
#

not using grants or USER so i think i should be fine

warm sleet
#

If you are using a regular InnoDB

#

with just DQL and DML

#

should be fine

olive merlin
#

yep iam

warm sleet
#

I abstracted away the database layer in my code, and write ANSI only

#

90% of my code is invariant to the engine

#

so it can run on mysql and mssql just as well

spice silo
#

Hey, so I'm looking for a recommendation for an app, anyone know where I can turn?

rancid nimbus
#

You are looking for an app recommendation to do what?

#

Or are wanting people to review your app?

umbral saffron
#

How do you print something in Forth

#

Ping me please

spice silo
#

@rancid nimbus I'm looking for an app recommendation yeah, I'm pretty sure what I want doesn't exist and will have to be custom built. But I wanted to do a final check!

#

And the app I'm looking for is a sort of asset management tool, but nothing I've found so far fits, I need a bunch of non standard values.

spring pond
#

well depending on your experience and how scalable it has to be, you could just build it yourself

spice silo
#

Yeah I've looked into it using something like larvel, but don't really have any experience doing something like that.

warm sleet
#

@spice silo if you want a custom information system, you really will have to turn towards databases

#

and writing a program around that database, which stores and retrieves information

#

in essence, a relational database is just an excel spreadsheet on steroids

dapper flax
#

@spice silo There are plenty of asset management applications out there. Many which would allow customization, either though UIs or programmatic user exits. Is your use case business or personal?

spice silo
#

@warm sleet Yeah I've figured as much, too bad I'm not really good at that kinda stuff.

#

@dapper flax I think I've seen them all when googling, the closet I got was SnipeIT, but you couldn't really change the name of the fields without modding it. But if I'm modding I think I might as well build / have someone build a custom app.

#

It's for business, have a bunch of phones I need to manage, certs CNs, S/Ns, who has it and so on. Also wanna be able to add an order portal later, but for now I just need to keep trace of them.

#

It also needs to be onprem

warm sleet
#

@spice silo yeah just use sql

#

easiest way to keep records

spice silo
#

@warm sleet Yeah, leaning towards that, but gotta have someone build the app first : /

warm sleet
#

@spice silo quite the opposite in fact

#

systems like these, you start with a database

#

and then build your app around the database, which implements all your use cases

spice silo
#

Yeah but I still gotta build the app around the database, looked around and snipeIT uses Larvel, which seems cool, any input on that?

warm sleet
#

laravel

#

that's PHP

#

I wouldnt touch that with a 10 foot pole

spice silo
#

Why not? And what would you recommend me using to build the app? I'm thinking a webb app since then my users will be able to access it anywhere on any device

warm sleet
#

For webapps

#

you might want to just have a lightweight node.js application

#

If you add an sql client to the server side code

#

you can interact with a database

spice silo
#

Oh really, hm, is it hard to learn?

warm sleet
#

depends on what experience you have

#

it helps having done some HTML and CSS and know a bit of javascript

#

nodejs is basically javascript on the server

spice silo
#

Yeah I know both of those, but never really messed around with JS

warm sleet
#

you can use it to build web applications

#

that tutorial uses express

#

thats a webserver for nodejs

#

like 3 lines of code

#

to spawn a webserver

spice silo
#

Ah okay

warm sleet
#

express for webserver

#

express-session for session cookie handling

#

pug, I wouldn't use...

#

I prefer other libraries for that

spice silo
#

Can I then use like some kind of template to build from?

warm sleet
#

well, pug is a template engine

#

so it basically represents a skeleton of HTML

#

with small fragments of code (not really code, its part of the engine) which fills in data

#

this is called a "View"

#

View + data = html page

spice silo
#

Hm sounds similar to what I leard about Larvel, it uses views and partial view called "blades"

warm sleet
#

yeah, Laravel is a large application framework for PHP

spice silo
warm sleet
#

hah

#

I've used that one before

#

for a little attempt at doing webdevelopment in Java xD

spice silo
#

Oh okay, how'd that go? Hah

warm sleet
#

I use it as a dashboard to my clustered minecraft server lol

spice silo
#

Ah nice, is that using node.js?

warm sleet
#

Nah, that's Java

#

Instead of express, its using Spark (its also minimalist like express)

#

and template engine is handlebars

#

lemme find template code

spice silo
#

Hm okay

warm sleet
#

that table you see ^

#

that's the template for that page

spice silo
#

Not a lot really haha

warm sleet
#

@spice silo so services on line 28

#

that's a variable from the controller (in this case my java code)

#

which holds a list of 'Service'

#

and with {{#each}} it just loops over the list

#

and generates html for each item

spice silo
#

Ah okay, and then puts all the servers in the list view?

warm sleet
#

If we're talking web applications, I am specifically talking about MVC

#

@spice silo its a bit more complicated, and trying to understand this.. I may need to go back a bit

#

This is a powerful pattern when developing simple web applications

#

"MVC"

#

The user, interacts with the controller

#

like sending a HTTP GET request to the server, to fetch a document

#

the controller, executes code, like fetch data from a database

#

this data is then represented in a model

#

which is used to update a view

#

this view is then sent back to the user

spice silo
#

Hm okay

warm sleet
#

so think of that template, as the view

#

and in my case, the controller is tiny

#
    @GET
    @Path("service")
    @RequiresLogin
    public ModelAndView getServiceStatus(Request request, Response response) {
        Map<String, Object> models = new HashMap<>();
        ServiceAPIClient client = session(request).getClient();
        models.put("services", client.getStatus().getService());
        models.put("servers", client.getServers().getServer());
        models.put("page", "Status");
        models.put("page_desc", "Services");
        return new ModelAndView(models, "status/service");
    }
#

@GET at the top, specifies to my framework that this is a webserver endpoint

#

this is different in whatever language you are using

#

at the last line

#

I return a Model and view

spice silo
#

Yeah okay, but the MVC pattern would be the same right?

warm sleet
#

"status/service" is that template file you saw

#

@spice silo yeah, so this pattern isnt bound to any one language or toolset

#

its a pattern you can use in any language really

spice silo
#

Right yeah

warm sleet
#

This is an easy way to seperate, control logic, data and views

#

if you don't structure it in this way, you get spaghetti

#

the models you will be using

#

will most likely represent the data in your database

#

so controller, loads data from database, puts it in a model and combines this with a view to get a webpage

spice silo
#

I see, well I'll give it a try I guess. It's either that or keep using Excel haha

warm sleet
#

@spice silo funny enough

#

you can use OLE with excel

#

and hook it up to an SQL database

#

:D

spice silo
#

Oh, and then display the data in excel? Or what? Haha

warm sleet
#

Yea

spice silo
#

Hmm, okay so what's OLE?

warm sleet
#

excel would generate the queries for you

#

some fancy microsoft crap

#

that integrates databases

#

its from Microsoft Access

#

Access is fucking terrible

#

dont ever use it.

#

but its another way you can build database apps

#

with sql and macros

spice silo
#

Hm okay, well I've never really used it so

warm sleet
#

my university made me build an app in access

spice silo
#

Then node.js sounds like a much better option then

warm sleet
#

but access is so shit, it'd repeatedly crash during debugging

#

and crash, without saving.

#

so rip the last 10 minutes of work

spice silo
#

Yeah that sucks!

warm sleet
#

@spice silo but setting up a simple node project

#

and getting hello world to print on a webpage

#

that shouldnt be so hard

#

I recommend building each part seperately first, and later integrating them

#

like database and controller logic are two components

spice silo
#

Yeah, even I could probably do that, it's just creating the relations and displaying the data I'm scared of

warm sleet
#

@spice silo see I'm a total wingnut, and decide to build my own frameworks

#

I basically wrote my own MVC framework xD

spice silo
#

Haha nice, that's wayy beyond my scope

warm sleet
#

its quite simple

#

only annoying thing was the routing provider

#

the thing that takes a URL

#

and decides what code needs to be run

#

Its messy, about 400 lines. but it works

spice silo
#

Btw I would also want to separate data in my database, I don't want all customers to see everything. Say for example I have a phone, then I want them to be able to see the S/N etc, but not who's registered to it. Would that be hard to implement, or would it be easier to just have two separate servers/systems

warm sleet
#

you need user authentication for that

#

most likely, the thing that will seperate user groups

#

would be your application

#

so you just check, if a user is permitted to view something, and if not return a 403

spice silo
#

Hm, yeah I messed around with routing tables in Larvel, so got a basic understanding of how it would work.

warm sleet
#

@spice silo yeah, its a method + path

#

its common to use path parameters as well

#

so you have /customer/{id}/details

#

id would be userid

#

so an actual url might be: /customer/123213213/details

#

and that number is used as a variable in your code

spice silo
#

Yeah, say that I got like a tic box or something that would mark that data as not viewable for some users.

#

Ah okay

warm sleet
#

laravel does a bunch of magic stuff

#

I am not a big fan of those big frameworks mostly because its all so overcomplicated xD

spice silo
#

Well yeah, if you need something complicated I guess you need a complicated framework for it haha

warm sleet
#

the thing is

#

laravel is great

#

if you know how to use it

#

@spice silo a simple prototype proof of concept application in node

#

is far easier to maintain

#

and if you build a simple JSON api

#

you can even make it available to other tools

spice silo
#

Yeah, well I need something that's simple to maintain, since I'll probably end up being the one to maintain it for now anyways haha

warm sleet
#

This is how I actually build all my web applications

#

I usually provide a REST API

#

This API describes all the functions of the application, it also provides authentication

#

the webpage you saw earlier, it uses the API to fetch data

spice silo
#

Fetch data from the actual server nodes then?

warm sleet
#

well, these are the functions it exposes

#

how it works internally, is not interesting

#

if your context, the internals would be database code

#

@spice silo what such an API can do is basically return structured data

#

Its XML in this case, but you could also use JSON, something which nodejs can directly consume as an object

spice silo
#

So that would tell the server in what form to send the data from the server?

warm sleet
#

@spice silo well, think of it this way. If you had a product catalog

#

you may have a service to get /product/{id}

#

or a way to search

#

your webapplication, basically takes user input, decides what it needs to do

#

so if the user wants to view the details on a product page

#

the application calls the API internally, which makes a database request

#

the application then uses this data to make a response (html)

#

nice thing about having an API, is that the application using it doesnt have to be a website per-se

#

it could be another program, or even a mobile app if you wanted to

#

since you decouple the data layer from your presentation layer

spice silo
#

Ah I see

warm sleet
spice silo
#

Yeah then you can present your data anywhere you want

warm sleet
#

Remember that admin panel I showed ^ :D

#

that's the raw data that feeds it ^

spice silo
#

Hm okayy

#

Not that much there either haha

warm sleet
#

@spice silo well, this specifically, is a healthchecker xD

#

my minecraft servers ping the backend every 5 seconds

#

and if they havent pinged in 15 seconds, it marks them as 'DOWN'

#

so when you go to load this page, you can see what instances are currently running

spice silo
#

And would that auto refresh? Or would you manually have to refresh the page for that to show+

#

? *

warm sleet
#

when you send an HTTP GET to that url

#

you get the 'current' status

#

so you'd have to send another request to get updated information

spice silo
#

I see, just curios

warm sleet
#

@spice silo APIs are Application Programming Interfaces

#

its basically, a list of possible instructions for a program

spice silo
#

Yeah I know that at least haha

warm sleet
#

but APIs are special, in that they are ment for other programs

#

not so much for humans

#

though we tend to design them in such a way, that a programmer can understand

#

xD

spice silo
#

Well that makes it easier to read for a programmer I guess? Haha

warm sleet
#

@spice silo lol and the controller that generates that XML above

#
    @GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Override
    public ServiceList getStatus() {
        return new ServiceList(provider.getStatuses());
    }
#

and that provider

#
public interface StatusProvider {

    List<Service> getStatuses();

    void ping(Ping ping);
}
#

its just an interface :)

spice silo
#

Yeah okay

warm sleet
#

internals of that are a bit complicated
:3

spice silo
#

I can see why hehe

warm sleet
#

but if you clearly define your layers

#

like, a data layer with a set of functions

#

and a presentation layer, that uses said data layer

#

your code will be maintainable

#

and not turn into spaghet as quickly

spice silo
#

Yeah, I will give it a shot and see if I'm able to create something that works, feels a bit overwhelming though, especially since I'm not used to working with data layers yet : (

warm sleet
#

@spice silo start by normalizing the information you want to track

#

So, what kind of entities do you have

#

What relationships do they have

spice silo
#

Yeah, basically making map and plan of everything right?

warm sleet
#

Once you have that, it gets much easier to reason about what you want to build

#

In UML we call this a domain model

#

Which you can use to build an ER or Entity relationship diagram

#

Its just fancy words for a diagram that describes tables and relationships between tables

#

Like, for example a user id, is something that you use to make relationships

spice silo
#

Hm yeah, so is there a tool or app I can use to do all that?

warm sleet
#

Its a desktop tool you can use

#

I use Astah to make uml diagrsms

#

But astah costs money

spice silo
warm sleet
#

Though they have a free version too

#

Not just UML

#

@spice silo pen and paper help too

#

Draw a box, give it a name, and inside the box you have a list of properties/fields

spice silo
#

Or something like MS visio would work too right?

warm sleet
#

Each box repesents an entity

spice silo
warm sleet
#

I use draw.io for networking diagrams and stuff that astah sucks at

#

Haven't done much uml in that

#

But they have toolboxes for ERD's

#

Ill send you a screenshot in a moment

#

Im in kitchen rn, warming up soup

spice silo
#

Ooo nice haha

midnight wind
#

just ask

#

don't ask to ask

hollow basalt
#

can you ask to ask though

vestal spire
#

hi i'm learning how to use git and im having some problems. Anyone here can help me out?

#

I'm using vscode and git and seems like any changes I made both locally and on github doesn't sync up

#

git on my vscode says everything is up to date even though I made changes locally, added, committed, and pushed

#

also the merge conflicts doesn't show
<<<<< HEAD
and the hash. It is "hidden" under the highlighted line number

vestal spire
#

it seems to be working now somehow

peak acorn
#

How in the world do I select a range of colors randomly

spring pond
#

what do you mean by "range", do you mean an array or something more abstract

peak acorn
#

like just selecting various yellow colors basically

#

im not even sure what I have to do in terms of UI and calculation for that

spring pond
#

well if you have set values then you can just use a random index

#

if you have a fluid range of colors you'll need to do more calculations

umbral saffron
#

How would I connect an arduino to a pi wirelessly

rancid nimbus
#

Use a bluetooth serial adapter.

umbral saffron
#

Ah ty

rancid nimbus
#

You could also just stick with a USB to serial. or use the usb on the Arduino.

warm sleet
#

@umbral saffron NRL24L is nice

#

its a short range 2.4GHz wireless protocol

#

uses SPI to connect

#

which is supported by both a pi and arduino

#

that @rancid nimbus posted is regular RF

nocturne galleon
#

can someone pls remind me what this stand for in C# ||?

peak acorn
#

or operator

#

short circuit one

nocturne galleon
#

th u

warm sleet
#

operators like these are just truth tables

#

|| is a conditional logical OR

#

which means if the left operand is true, the right operand wont be evaluated

#

if you do a single | it evaluates both

#

same goes for && and &

#

&& will not evulate the right operand if the left one is false

#

like, bool isNullOrEmpty = (foo == null || foo.equals(""));

#

if you had these operands the other way around, it would raise an exception

nocturne galleon
#

Th u so match

umbral saffron
#

Ty crystal

rancid nimbus
#
true && (() => {console.log("Statement is true"); return true})() || (() => {console.log("Statement is false"); return true})()```
This takes advantage of the short circuit feature in javascript to do if else logic. The same could be done in c# at least in concept.
#

You could also do if, else if, else logic too.

rancid nimbus
#

Just to add more information about it, but | is a bit-wise or operator, & is a bit-wise and operator. The || operator is a short cut operator it is lazy. It only wants to do what is absolutely necessary. The || operator checks the left side first. If it is true then what ever the left side is it does not have to check the right side. The && operator is also lazy. It realizes it is not going to be true if it already checked its left side and found that the left side is false. This means that you can check if a pointer is null before then trying to check its value since it doesn't matter what that value is since it is not set.

native helm
#

Adding a custom olcOverlay in openLDAP with this ldif, but getting an error. Anyone spotting whats wrong with it? Of what I've gathered from googling around this should work

dn: olcOverlay=adminof,olcDatabase={1}mdb,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcMemberOf
olcOverlay: adminof
olcMemberOfRefint: TRUE
olcMemberOfGroupOC: service
olcMemberOfMemberAD: serviceAdmin
olcMemberOfMemberOfAD: adminOf

This is the error:

        additional info: <olcOverlay> handler exited with 1```
peak acorn
#

ok

#

listen here pro code formatters

#

Should there be a tab in this whitespace

#

or should i remove that white space?

#

or should it remain at nothing on the row

peak acorn
#

no flame for the open parenthesis on a newline plox

hollow basalt
peak acorn
#

tell me

#

nothing on the line or fill it in with spaces/tabs to make it equal to the other lines

hollow basalt
#

I don't

peak acorn
#

you dont ?

hollow basalt
#

I use tabs/spaces to format code

#

not to format spaces

peak acorn
#

im confusin

hollow basalt
#

Remember who you are

peak acorn
#

i know

warm sleet
#

@peak acorn tabs are nonexistent in most formats

#

tabs are either 2 or 4 spaces

peak acorn
#

Yes but should you leave the tab/ space in the source code

warm sleet
#

never introduce them in the first place

#

:P

dim lava
#

It took me too long but I finally got my testbench for AES128 CTR-mode working

nocturne galleon
#

im developing a line of more and more complex Minecraft storage computers, my first iteration is the v1 of my "C:Drive" line up, the lineup is my only current one as i have just gotten into red stone computer development. my most recent/second iteration is the C:Drive 2.0, which has 8 times more storage than the 2bit v1, and a 4x4 display.

dim lava
#

what functions does the CPU have

nocturne galleon
#

its just a series of 32 'and' gates that turn 1bit of memory either to 1, or 0, depending on the users input

#

those switches choose which bits you want to change, and the two buttons on the right select the value you want to change them to

#

the C:drive, is less of a minecraft computer, and more of a minecraft solid state drive with a display that shows the value of the bits, and an interface that lets you alter the bit values

#

hence the name

#

i still cant believe this all only took me 12 hours to learn how to do.

dim lava
#

Awesome

#

You should work on some more ALU operations

#

and a selector input to choose which operation happens

#

easy ones to do are OR, NAND, NOR, XOR, XNOR, and NOT

#

@nocturne galleon i actually help teach a college class in digital logic, which is precisely what you're doing. If you ever have any questions or need advice just ask me

nocturne galleon
#

i have examples of or, nand, nor, xor, and xnor in minecraft already, and building them into a system is going to take time and more effort, but ill get to it eventually. not 'NOT' though, ill look up and see what that is and how i can make it work in minecraft. and okay! id be happy to ask for help in that regard! ^^, thanks for the offer!

dim lava
#

Yw

#

And NOT is just one input, not two inputs. It just flips all the 1's to 0's and vice versa

nocturne galleon
#

oh okay, nope, i have that already, just forgot x,)

#

i haven't slept for like 3 days now, i should probably get some sleep then get back to my development since i have the time to.

dim lava
#

Oh yeah get some sleep

nocturne galleon
#

may i contact you via dm's if i have questions? or should i ping you here instead?

dim lava
#

either is cool

#

if you wanna show off do it here 😛

#

minecraft redstone is cool and i'm sure other people here would like to see it

nocturne galleon
#

thanks

warm sleet
#

@nocturne galleon if this kind of stuff interests you: https://www.youtube.com/watch?v=fCbAafKLqC8

More on breadboards: https://www.eater.net/breadboards
More on the 6502 project: https://www.eater.net/6502

Here are the graphing calculator models if you'd like to play with them:
https://www.desmos.com/calculator/txls6jc88c
https://www.desmos.com/calculator/i75gnzi3jb

Support these videos on Patreon: https://www.patreon.com/beneater or http...

▶ Play video
nocturne galleon
#

oh, okay ^^

warm sleet
#

Its a 35 part series on how to build a CPU from scratch using only logic gates

#

TTL, transistor-transistor-logic

nocturne galleon
#

okay, thank you!

warm sleet
#

it may not get you to tinker with electronics, but it does explain the reasoning process when it comes to designing an ALU

#

and I'm sure a redstone computer would do this along similair lines

nocturne galleon
#

i actually like tinkering with electronics already so ^^

warm sleet
#

ahh, then its right up your alley

warm sleet
#

This one is also quite good ^ :D

nocturne galleon
#

ive seen that already! ^-^

warm sleet
#

it goes in detail on VGA timing and such

nocturne galleon
#

happy electrician noises

warm sleet
#

coil whine

nocturne galleon
#

xD

vale hollow
#

Hey, anyone know a bit about HTML and htaccess here ?

hollow basalt
#

Nobody

ivory bear
#

HTML yes but htaccess no, because htaccess is Apache thing while I use nginx instead

rotund plover
#

Anyone with little knowledge in SQL?

spring pond
#

i know how the relationships and stuff like that works but i dont really have experience writing queries

rotund plover
#

I'm stuck with sum between 2 tables

spring pond
#

are you trying to sum a specific value in those tables or...?

rotund plover
#

ya

#

sum between to tables that have categories

#

each category have a number

spring pond
#

well you could take the somewhat inefficient route of just SELECT *ing from both of the tables and using list comp to sum the value you want

#

i usually use an ORM for database access so idk what the exact commands are

rotund plover
#

I already did for both separately how can I combined between them?

spring pond
#

well just add the two values?

rotund plover
#

SELECT movies.category + shows.category FROM `category` WHERE category.id='1' This is for example

#

this not working

spring pond
#

let me do a bit of research

rotund plover
#

ok I'll keep my research to

spring pond
#

it looks like this should be SELECT category FROM movies WHERE category.id=1 and another query SELECT category FROM shows WHERE category.id=1 then sum all of those values

#

you could use JOIN queries but idk how those work

rotund plover
#

ah right let me check I have an example of join I think

rotund plover
#

well I found a way

#

but something went wrong

#

its missing 2 in the sum option

nocturne galleon
#

@dim lava how would i go about making a binary counter so that my computer can have a stopwatch of sorts?

rancid nimbus
#

An adder is a digital circuit that performs addition of numbers.
In many computers and other kinds of processors adders are used in the arithmetic logic units or ALU. They are also used in other parts of the processor, where they are used to calculate addresses, table indices, increment and decrement operators and similar operations.
Although ad...

#

Each addr would be a bit and rou would set the input on one side to be 1 and then have a short tem memory cell and a clock.

#

Actually multiple half adders.

nocturne galleon
#

@-@

#

umm, ok

rancid nimbus
#

In hardware or software?

nocturne galleon
#

its in minecraft ;-;

#

im building a redstone pc, to the best of my abilities

#

my last version just let you decide whether the bit was 1 or 0, and had a display to show the bit value

#

the memory needs to be updated since i figured out it causes 4 ticks of delay, and my new memory design only causes 1 tick

dim lava
#

You'll be dealing with clock cycles now at this point btw

nocturne galleon
#

oh okay! ^^ thank you, ill write this down for later, im taking a break from this for a bit (heh, nice)

dim lava
#

Each clock cycle the stop watch may increment by one

nocturne galleon
#

okay

dim lava
#

Remind me tomorrow and i can draw a block circuit diagram for ya

#

Once you get this working, you can probably get to work on a making a simple register file. That would be very fun. You'll be able to have variables and intermediate variables and start calculating equations of multiple operations

#

(frankly you can just make this completely separate from the cpu . It will be a good way to see how registers interact with clock cycles over time)

nocturne galleon
#

okay

#

again, thank you a lot!

errant raptor
#

how do i put svg pictures into an html table that also randomize?

#

so i just need to replace these numbers with those svg code images that randomly change on refresh

hollow basalt
#

so like img-1.svg img-2.svg ?

errant raptor
#

like this <i class="fi-rr-magic-wand"></i>

hollow basalt
#

elaborate your problem using sample code

errant raptor
#

sample code?

hollow basalt
#

No

errant raptor
#

look my problem simply is, i have no clue how to change those numbers in the picture to like small svg pictures and i know u can use inline code to picture those svg pictures

#

google also hasn't been alot of help cuz i don't know how i can search it i tried a few things

dim lava
#

@errant raptor well first you need the svg pictures themself. In a vector editing program like Illustrator, you can save the file as an svg

warm sleet
#

funny enough, SVG is just XML

#

describing vectors and curves

#

@dim lava he's talking about literal SVG in html, which is possible

#

this ^ is output from a python program

#
#!/usr/bin/python3

import xml.etree.ElementTree as ET

html = ET.Element('html')
body = ET.SubElement(html, 'body')

svg = ET.SubElement(html, 'svg')
svg.set('width', '500')
svg.set('height','500')

def line(start, end, color):
    line = ET.SubElement(svg, 'line')
    (x1, y1) = start
    (x2, y2) = end

    line.set('x1', str(x1+250))
    line.set('x2', str(x2+250))
    line.set('y1', str(-y1+250))
    line.set('y2', str(-y2+250))
    line.set('style', 'stroke:'+color+'; stroke-width:1')

N = []
E = []
S = []
W = []

for i in range(1,9):
    N.append((0, i * -30))
    S.append((0, i * 30))    
    W.append((i * -30, 0))
    E.append((i * 30, 0))

for p in N+S:
    line(W[-1], p, 'red')
    line(E[-1], p, 'red')

for p in W+E:
    line(N[-1], p, 'green')
    line(S[-1], p, 'green')
  
ET.dump(svg)
#

@errant raptor take a look at those examples above ^

inner epoch
#

finally got around and fixed the last bugs on my rather strange homepage (yeah its a clock) (http://www.perbj.dk) if you want to see what it looks like

nocturne galleon
#

@dim lava just made my first full and half adders following this guide https://www.youtube.com/watch?v=1I5ZMmrOfnA

Take the 2017 PBS Digital Studios Survey: http://surveymonkey.com/r/pbsds2017. Today we're going to talk about a fundamental part of all modern computers. The thing that basically everything else uses - the Arithmetic and Logic Unit (or the ALU). The ALU may not have to most exciting name, but it is the mathematical brain of a computer and is re...

▶ Play video
dim lava
#

Awesome!

#

That adder is a tall boi

nocturne galleon
#

yee, its just so i can easily horizontally stack it

dim lava
#

Ofc

#

I don't know if you knew, but there are designs on the minecraft wiki for all sorts of logic gates and RTL components

nocturne galleon
#

cool ^^, ill check that out, but for now, time to work on a 8bit ripple adder :>

#

||kill me||

nocturne galleon
#

oh hey, i optimized my adder to be 4 blocks less in length while keeping height and width the same :>

#

also installed a fabric and added 3 mods to make it the game run at 500+ fps on my computer, vs the original 90-120fps, the three mods are
sodium- big fps improvement
lithium- improvement to tick timing
phosphor- chunk loading time cut in half

just in case someone needs these so that their projects run smoother.

sick dome
#

Are they saying to just use A >= 90, B >=80, C >= 70 and anything under 70 would also be a "C"?

dim lava
#

To make an 8 bit adder all you do is take the full adder and copy it 8 times, with the cout each adder connected to the cin of the next

nocturne galleon
#

hmm, okay!

#

thank you!

#

also love your status xD

dim lava
#

Lol

#

I actually changed it to that because i did short the main board of my tv i was trying to fix

nocturne galleon
#

oof o-o

#

well if it makes you feel better i shorted the heating wires on my 3d printer, and now it's mainboard is fried, but it can still be controlled by my pc, although the hot end doesn't heat up anymore.

#

also, new memory design, super compact and low latency :>

dim lava
#

I have a 1x4 tall memory design iirc

nocturne galleon
#

?!

#

stackable without gaps?

dim lava
#

BR <- I believe set is here but i kinda forget
TBT
BRR <- Data value here
BBB